| | |
| | | /* |
| | | * @Date: 2024-01-10 20:37:45 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-13 21:27:18 |
| | | * @LastEditTime: 2024-01-14 15:03:32 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/api/Api.js |
| | | */ |
| | | import ajax from '@/utils/ajax' |
| | |
| | | machineConcern: { |
| | | url: '/machine/concern', |
| | | method: 'POST' |
| | | }, |
| | | machineQuery: { |
| | | url: '/machine/pageQuery', |
| | | method: 'POST' |
| | | }, |
| | | machineSave: { |
| | | url: '/machine/save', |
| | | method: 'POST' |
| | | }, |
| | | machineUpdate: { |
| | | url: '/machine/modify', |
| | | method: 'POST' |
| | | } |
| | | } |
| | | // æ£å¼ç¯å¢é
ç½®å°å |
| | |
| | | <!-- |
| | | * @Date: 2024-01-05 23:47:53 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-13 23:22:52 |
| | | * @LastEditTime: 2024-01-14 15:07:18 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/Map.vue |
| | | --> |
| | | <template> |
| | |
| | | <div class="plant-name" v-if="status===2">{{plantName}}</div> |
| | | <el-input class="plant-name" v-if="status!==2" v-model="plantName" placeholder="请è¾å
¥åå"/> |
| | | </div> |
| | | <div class="table" > |
| | | <div class="table" :class="$route.name ==='preview' ? 'active' : ''" > |
| | | <div class="table-action" :style="position" v-show="showAction && status !== 2"> |
| | | <div @click="merge">åå¹¶</div> |
| | | <div @click="split">æå</div> |
| | | <div @click="sign(1)">è¿é</div> |
| | | <div @click="sign(2)">æºåº</div> |
| | | <div @click="sign(0)">åæ¶</div> |
| | | <div @click="edit" v-if="showEdit">ä¿®æ¹æºåº</div> |
| | | <!-- <div>å¢å è¡</div> --> |
| | | <!-- <div>å é¤è¡</div> --> |
| | | <!-- <div>å¢å å</div> --> |
| | |
| | | </div> --> |
| | | <Device v-if="v.id" :id="v.id" style="width: 100%;height: 100%;"></Device> |
| | | </td> |
| | | <!-- <td></td> --> |
| | | </tr> |
| | | <!-- <tr> |
| | | <td></td> |
| | | </tr> --> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <addMachine :id="id" @setmachineId="setmachineId" v-else @close="close"/> |
| | | <addMachine :id="id" :machineid="machineid" @setmachineId="setmachineId" v-else @close="close"/> |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | }, |
| | | id: { |
| | | type: [Number,String] |
| | | } |
| | | }, |
| | | computed: { |
| | | showEdit() { |
| | | try { |
| | | const { x, x1, y, y1 } = this.range |
| | | if (this.range && x && x1 && y && y1) { |
| | | let start = this.map[x][y] |
| | | return this.map[x][y].id && (start.rowIndex + start.rowspan -1) === x1 && (start.colIndex + start.colspan -1) === y1 |
| | | } |
| | | } catch (error) { |
| | | return false |
| | | } |
| | | }, |
| | | machineid () { |
| | | try { |
| | | const { x, x1, y, y1 } = this.range |
| | | if (this.range && x && x1 && y && y1) { |
| | | let start = this.map[x][y] |
| | | if (this.map[x][y].id && (start.rowIndex + start.rowspan -1) === x1 && (start.colIndex + start.colspan -1) === y1) { |
| | | return start.id |
| | | } else { |
| | | return '' |
| | | } |
| | | } |
| | | } catch (error) { |
| | | return '' |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | if (this.currentMap.length > 0) this.map = this.currentMap |
| | | this.rows = this.currentMap.length; |
| | | this.cols = this.currentMap[0].length; |
| | | if (this.$route.name === 'preview') { |
| | | this.$nextTick(() => { |
| | | let {width} = document.querySelector('.table div').getBoundingClientRect() |
| | | console.log(document.querySelector('.table div').getBoundingClientRect()) |
| | | // document.querySelector('.table').scrollLeft |
| | | // document.querySelector('.table').scrollTo({left: }) |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | immediate: true |
| | | }, |
| | |
| | | try { |
| | | this.height = (document.querySelector('.table').getBoundingClientRect().height - 30) / 20 |
| | | } catch (error) { |
| | | |
| | | } |
| | | |
| | | console.log(this.$route.name) |
| | | }, |
| | | beforeUpdate() { |
| | | try { |
| | |
| | | }, |
| | | contextmenu(e) { |
| | | console.log(e) |
| | | if(this.status ===2) return |
| | | if(this.status ===2) return |
| | | if (!this.range.x) return |
| | | // if (this.range.x !=='') return |
| | | e.preventDefault() |
| | | e.stopPropagation() |
| | |
| | | close () { |
| | | this.addStatus = false |
| | | }, |
| | | edit (e) { |
| | | if(this.status ===2) return |
| | | e.stopPropagation() |
| | | this.addStatus = true |
| | | }, |
| | | setmachineId (id) { |
| | | console.log(id) |
| | | if (!id) return |
| | |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | @keyframes move { |
| | | 0% { |
| | | // left: 100%; |
| | | // transform: translate(0,0); |
| | | // scrollTop: 0 |
| | | } |
| | | 100% { |
| | | // left: 100%; |
| | | // transform: translate(-100%,0); |
| | | // scrollTop: 100% |
| | | } |
| | | } |
| | | .map { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | } |
| | | } |
| | | |
| | | .table.active { |
| | | // position: relative; |
| | | // left: 100%; |
| | | // animation: move 6s infinite alternate; |
| | | } |
| | | .table { |
| | | // margin-top: 10px; |
| | | // display: flex; |
| | |
| | | height: 100%; |
| | | position: relative; |
| | | overflow-x: scroll; |
| | | |
| | | .table-action { |
| | | position: absolute; |
| | | z-index: 999; |
| | |
| | | <!-- |
| | | * @Date: 2024-01-10 22:28:38 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-12 21:21:48 |
| | | * @LastEditTime: 2024-01-14 15:04:42 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/addMachine.vue |
| | | --> |
| | | <template> |
| | |
| | | <el-input class="value" v-model="addInfo.name"></el-input> |
| | | </div> |
| | | <div class="map-add-item"> |
| | | <span>æºåº</span> |
| | | <el-select class="value" v-model="addInfo.id" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in accountList" :key="item.machineId" :label="item.uuid" :value="item.machineId"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <span>æºåº</span> |
| | | <el-select :disabled="!!machineid" class="value" v-model="addInfo.id" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in accountList" :key="item.machineId" :label="item.uuid" :value="item.machineId"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="map-add-item"> |
| | | <span>IP</span> |
| | | <el-input class="value" v-model="addInfo.ip"></el-input> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { getWsl,getPcl,getRequest } from '@/api/Api' |
| | | import { getWsl, getPcl, getRequest } from '@/api/Api' |
| | | export default { |
| | | props: ['id'], |
| | | data () { |
| | | props: ['id', 'machineid'], |
| | | data() { |
| | | return { |
| | | shiftTypes: [ |
| | | { |
| | |
| | | }, |
| | | } |
| | | }, |
| | | created () { |
| | | watch: { |
| | | machineid: { |
| | | handler(val) { |
| | | if (val) { |
| | | setTimeout(() => { |
| | | getRequest('machineQuery', { size: 10, machineId: val }).then(res => { |
| | | this.changewsl(res.data.records[0].workshopId) |
| | | this.$nextTick(() => { |
| | | try { |
| | | Object.keys(this.addInfo).forEach(item => { |
| | | this.addInfo[item] = res.data.records[0][item] |
| | | }) |
| | | // this.addInfo.id = res.data.records[0].id |
| | | } catch (error) { |
| | | console.error(error) |
| | | } |
| | | }) |
| | | }) |
| | | }, 1000) |
| | | |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | created() { |
| | | getPcl().then(res => { |
| | | this.protocolList = res.data |
| | | }) |
| | | getWsl().then(res => { |
| | | this.workshopList = res.data |
| | | }) |
| | | getRequest('accountQuery',{}).then(res => { |
| | | getRequest('accountQuery', {}).then(res => { |
| | | console.log(res) |
| | | try { |
| | | this.accountList = res.data |
| | | } catch (error) { |
| | | this.accountList = [] |
| | | } |
| | | |
| | | |
| | | }) |
| | | }, |
| | | methods: { |
| | | saveDevice () { |
| | | this.$emit('setmachineId',this.addInfo.id) |
| | | return |
| | | this.$http.postJson('/machine/save',{ |
| | | ...this.addInfo, |
| | | plantId: this.id |
| | | }).then(res => { |
| | | this.$emit('setmachineId',this.addInfo.id) |
| | | }) |
| | | saveDevice() { |
| | | let url = '/machine/save' |
| | | if (this.machineid) { |
| | | getRequest('machineUpdate',{ |
| | | ...this.addInfo, |
| | | plantId: this.id |
| | | }).then(res => { |
| | | this.$emit('setmachineId', this.addInfo.id) |
| | | }) |
| | | } else { |
| | | getRequest('machineSave',{ |
| | | ...this.addInfo, |
| | | plantId: this.id |
| | | }).then(res => { |
| | | this.$emit('setmachineId', this.addInfo.id) |
| | | }) |
| | | } |
| | | }, |
| | | changewsl (val) { |
| | | console.log(val) |
| | | changewsl(val) { |
| | | console.log(val, 'changewsl') |
| | | try { |
| | | this.sectionIds = this.workshopList.find(item => item.id ===val).sections |
| | | this.sectionIds = this.workshopList.find(item => item.id === val).sections |
| | | } catch (error) { |
| | | this.sectionIds = [] |
| | | } |
| | | }, |
| | | close () { |
| | | close() { |
| | | this.$emit('close') |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .map-add { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: auto; |
| | | position: relative; |
| | | .map-add-item { |
| | | margin-top: 24px; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | span { |
| | | width: 150px; |
| | | font-size: 16px; |
| | | color: #C6DCE0; |
| | | text-align: right; |
| | | margin-right: 16px; |
| | | } |
| | | .value { |
| | | width: 400px; |
| | | } |
| | | } |
| | | .map-add-footer { |
| | | position: absolute; |
| | | bottom: 0; |
| | | .map-add { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: auto; |
| | | position: relative; |
| | | |
| | | .map-add-item { |
| | | margin-top: 24px; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | span { |
| | | width: 150px; |
| | | font-size: 16px; |
| | | color: #C6DCE0; |
| | | text-align: right; |
| | | padding-right: 30px; |
| | | width: 100%; |
| | | margin-right: 16px; |
| | | } |
| | | |
| | | .value { |
| | | width: 400px; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | | .map-add-footer { |
| | | position: absolute; |
| | | bottom: 0; |
| | | text-align: right; |
| | | padding-right: 30px; |
| | | width: 100%; |
| | | } |
| | | }</style> |
| | |
| | | <!-- |
| | | * @Date: 2024-01-06 17:40:19 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-13 11:35:29 |
| | | * @LastEditTime: 2024-01-14 14:12:18 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/deviceType/index.vue |
| | | --> |
| | | <template> |
| | |
| | | <el-input class="item-value" v-model="queryInfo.name"></el-input> |
| | | |
| | | </div> |
| | | |
| | | |
| | | <div class="item"> |
| | | <el-button type="primary" size="small" @click="query">æ¥è¯¢</el-button> |
| | | </div> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | :title="!dataForm.id ? 'æ°å»º' : 'ç¼è¾'" |
| | | :close-on-click-modal="false" |
| | | width="80%" |
| | | :visible.sync="addVisible"> |
| | | <!-- æ·»å å
容--> |
| | | <el-form :model="dataForm" label-width="100px" ref="dataForm"> |
| | | <el-row :gutter="20"> |
| | | <el-col :xs="24":sm="6":md="6":lg="6":xl="6"> |
| | | <el-form-item label="åç§°" prop="name"> |
| | | <el-input v-model="dataForm.name" placeholder="åç§°" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | |
| | | </el-form> |
| | | <!-- æé® --> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button size="mini" @click="cancel">åæ¶</el-button> |
| | | <el-button size="mini" type="primary" @click="dataFormSubmit()">ä¿å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { deviceTypeUpdate,deviceTypeCreate } from '@/api/Api' |
| | | export default { |
| | | props: ['addVisible','row'], |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | dataForm: { |
| | | id: 0, // titleæ¾ç¤ºæ°å¢è¿æ¯ä¿®æ¹ |
| | | name: '' |
| | | } |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | | addVisible: { |
| | | handler (val) { |
| | | if (val) { |
| | | this.init() |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | created () { |
| | | console.log('add create'); |
| | | this.init(this.row) |
| | | }, |
| | | methods: { |
| | | init(row) { |
| | | if (this.$refs['dataForm']) { |
| | | this.$refs['dataForm'].resetFields() |
| | | } |
| | | if (row !== undefined) { |
| | | this.dataForm.id = row.id |
| | | this.dataForm.name = row.name |
| | | |
| | | } else { |
| | | this.dataForm.id = '' |
| | | } |
| | | }, |
| | | /* æ¥è¯¢ä½¿ç¨é¨é¨*/ |
| | | cancel () { |
| | | this.$emit('close') |
| | | }, |
| | | /* æäº¤*/ |
| | | dataFormSubmit() { |
| | | if (this.dataForm.id === '') { // æ°å¢ |
| | | deviceTypeCreate(this.dataForm).then(res => { |
| | | this.$message({ |
| | | message: 'æ°å¢æå', |
| | | type: 'success', |
| | | duration: 1500, |
| | | onClose: () => { |
| | | this.$emit('confirm') |
| | | this.visible = false |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | deviceTypeUpdate(this.dataForm).then(res => { |
| | | this.$message({ |
| | | message: 'ä¿®æ¹æå', |
| | | type: 'success', |
| | | duration: 1500, |
| | | onClose: () => { |
| | | this.$emit('confirm') |
| | | this.visible = false |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .el-form-item__content { |
| | | .el-select,.el-input { |
| | | width: 100%; |
| | | } |
| | | } |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 178px; |
| | | height: 178px; |
| | | line-height: 178px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 178px; |
| | | height: 178px; |
| | | display: block; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Date: 2024-01-06 17:40:19 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-14 14:11:17 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/devicemaintenance/index.vue |
| | | --> |
| | | <template> |
| | | <div class="maintenance"> |
| | | <div class="nav">æºåºç»´æ¤</div> |
| | | <List ref="list" :url="url"> |
| | | <template slot="search"> |
| | | <div class="item"> |
| | | <span>åç§°</span> |
| | | <el-input class="item-value" v-model="queryInfo.name"></el-input> |
| | | </div> |
| | | <div class="item"> |
| | | <el-button type="primary" size="small" @click="query">æ¥è¯¢</el-button> |
| | | </div> |
| | | <div class="item"> |
| | | <el-button type="primary" size="small" @click="reset">éç½®</el-button> |
| | | </div> |
| | | </template> |
| | | |
| | | <template slot="table-tool"> |
| | | <el-button type="primary" size="mini" @click="add">æ·»å 设å¤ç±»å</el-button> |
| | | </template> |
| | | |
| | | <template slot="columns"> |
| | | <el-table-column |
| | | prop="id" |
| | | label="ID" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="åç§°" |
| | | width="180"> |
| | | </el-table-column> |
| | | |
| | | </template> |
| | | |
| | | </List> |
| | | <manage-add-update v-if="addOrUpdateVisible" :addVisible="addOrUpdateVisible" @close="close" @confirm="confirm" |
| | | :row="row"></manage-add-update> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import List from '../list/index.vue' |
| | | import ManageAddUpdate from './Manage-add-update' |
| | | import { getUrl } from '@/api/Api' |
| | | export default { |
| | | components: { |
| | | List, |
| | | ManageAddUpdate |
| | | }, |
| | | data () { |
| | | return { |
| | | url: '', |
| | | queryInfo: { |
| | | name: '' |
| | | }, |
| | | row: {}, |
| | | addOrUpdateVisible: false |
| | | } |
| | | }, |
| | | created () { |
| | | this.url = getUrl('machineQuery') |
| | | }, |
| | | methods: { |
| | | reset () { |
| | | Object.keys(this.queryInfo).forEach(key => { |
| | | this.queryInfo[key] = '' |
| | | }) |
| | | }, |
| | | query () { |
| | | this.$refs.list.pageQuery(this.queryInfo) |
| | | }, |
| | | add() { |
| | | this.row = {id:''} |
| | | this.addOrUpdateVisible = true |
| | | |
| | | }, |
| | | close() { |
| | | this.addOrUpdateVisible = false |
| | | }, |
| | | confirm() { |
| | | this.query() |
| | | this.close() |
| | | }, |
| | | addOrUpdateHandle(row) { |
| | | this.row = row |
| | | this.addOrUpdateVisible = true |
| | | } |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | .maintenance { |
| | | .item-value { |
| | | .el-input__inner { |
| | | background: transparent; |
| | | border-radius: 2px; |
| | | border: 1px solid #435F9E; |
| | | } |
| | | } |
| | | .el-button--mini { |
| | | background: transparent; |
| | | } |
| | | .el-button--primary { |
| | | background-color: transparent; |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .maintenance { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | color: #FFF; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .nav { |
| | | padding: 10px 30px; |
| | | } |
| | | |
| | | .item { |
| | | margin-top: 20px; |
| | | margin-left: 50px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | span { |
| | | width: 120px; |
| | | font-size: 16px; |
| | | font-family: PingFangSC, PingFang SC; |
| | | color: #C6DCE0; |
| | | text-align: right; |
| | | padding-right: 20px; |
| | | } |
| | | |
| | | .item-value { |
| | | width: 200px; |
| | | border: 1px solid #435F9E; |
| | | } |
| | | |
| | | .btn { |
| | | line-height: 1.5; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .reset { |
| | | background: #AAB6BA; |
| | | color: #FFF; |
| | | } |
| | | |
| | | .query { |
| | | background: #5DD1FC; |
| | | color: #FFF; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <ul v-if="showSub"> |
| | | <li @click="navigateTo('ledger')">å°è´¦</li> |
| | | <li @click="navigateTo('deviceType')">设å¤ç±»å管ç</li> |
| | | <!-- <li @click="navigateTo('devicemaintenance')">æºåºç»´æ¤</li> --> |
| | | </ul> |
| | | </li> |
| | | </ul> |
| | |
| | | 7: 'component', |
| | | ledger: 'ledger', |
| | | deviceType: 'deviceType', |
| | | preview: 'preview' |
| | | preview: 'preview', |
| | | devicemaintenance: 'devicemaintenance' |
| | | } |
| | | |
| | | if (['3','4','5','8'].includes(name)) { |
| | |
| | | <!-- |
| | | * @Date: 2024-01-13 20:46:33 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-13 23:35:27 |
| | | * @LastEditTime: 2024-01-14 13:18:54 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/device.vue |
| | | --> |
| | | <template> |
| | |
| | | <li> |
| | | <img src="./img/sd.png" alt=""> |
| | | <div> |
| | | <p>{{ item.cycleCount || 0 }}</p> |
| | | <p>{{ efficiency}}</p> |
| | | <p>è½åå©ç¨ç</p> |
| | | </div> |
| | | </li> |
| | | <li> |
| | | <img src="./img/sd.png" alt=""> |
| | | <div> |
| | | <p>{{ item.cycleCount || 0 }}</p> |
| | | <p>{{ utilizationDaily}}</p> |
| | | <p>æ¥å©ç¨ç</p> |
| | | </div> |
| | | </li> |
| | | <li> |
| | | <img src="./img/sd.png" alt=""> |
| | | <div> |
| | | <p>{{ item.cycleCount || 0 }}</p> |
| | | <p>{{ info.cycleCount}}</p> |
| | | <p>å®å·¥ä»¶æ°</p> |
| | | </div> |
| | | </li> |
| | |
| | | <script> |
| | | import { getRequest,getUrl } from '@/api/Api' |
| | | export default { |
| | | props: ['id'], |
| | | props: { |
| | | id: { |
| | | type: [String,Number] |
| | | }, |
| | | info: { |
| | | type: Object, |
| | | default: function () { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | care: false, |
| | | item: {} |
| | | } |
| | | }, |
| | | computed: { |
| | | efficiency () { |
| | | return this.info.efficiency || 0 |
| | | }, |
| | | utilizationDaily () { |
| | | return this.info.utilizationDaily || 0 |
| | | }, |
| | | cycleCount () { |
| | | return this.info.cycleCount || 0 |
| | | } |
| | | }, |
| | | methods: { |
| | | change (val) { |
| | | console.log(val) |
| | | getRequest('machineConcern',{concern: val ? 1 : 0,id: this.item.id}).then(res => { |
| | | getRequest('machineConcern',{concern: val ? 1 : 0,id: this.id}).then(res => { |
| | | console.log(res) |
| | | }) |
| | | }, |
| | |
| | | <!-- |
| | | * @Date: 2024-01-06 17:40:19 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-13 22:38:31 |
| | | * @LastEditTime: 2024-01-14 13:24:19 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/index.vue |
| | | --> |
| | | <template> |
| | |
| | | <div class="right"> |
| | | <Status class="right-status" :info="info" style="justify-content: flex-start;"> |
| | | <template slot="before"> |
| | | <div style="margin-right: 200px;"> |
| | | <el-button type="primary" size="mini" :class="concernFlag === 0 ? 'active' : ''" |
| | | @click="query(0)">å
¨é¨</el-button> |
| | | <div style="margin-right: auto;"> |
| | | <el-button type="primary" size="mini" :class="concernFlag === '' ? 'active' : ''" |
| | | @click="query('')">å
¨é¨</el-button> |
| | | <el-button type="primary" size="mini" :class="concernFlag === 1 ? 'active' : ''" |
| | | @click="query(1)">å
³æ³¨</el-button> |
| | | <!-- <el-button type="primary" size="mini" style="margin-right: auto;">æçå
³æ³¨</el-button> --> |
| | |
| | | </Status> |
| | | <div class="list-box"> |
| | | <div class="list"> |
| | | <Item v-for="item in list" :id="item.id" :key="item.id"></Item> |
| | | <Item v-for="item in list" :id="item.id" :info="item" :key="item.id"></Item> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | concernFlag: 0, |
| | | concernFlag: '', |
| | | searchWord: '', |
| | | list: [], |
| | | info: { |
| | |
| | | component: () => import('@/container/deviceType/index')
|
| | | },
|
| | | {
|
| | | path: 'devicemaintenance',
|
| | | name: 'devicemaintenance',
|
| | | component: () => import('@/container/devicemaintenance/index')
|
| | | },
|
| | | {
|
| | | path: 'preview',
|
| | | name: 'preview',
|
| | | component: () => import('@/container/preview/index')
|