| | |
| | | <!-- |
| | | * @Date: 2024-01-05 23:47:53 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-16 00:19:18 |
| | | * @LastEditTime: 2024-01-16 01:03:35 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/Map.vue |
| | | --> |
| | | <template> |
| | |
| | | :rowspan="v.rowspan" :colspan="v.colspan" :key="v.rowIndex + '-' + v.colIndex"> |
| | | <img @click="addDevice($event,v)" @mousedown="e => e.stopPropagation()" v-if="v.type ===2 && status!==2 && !v.id" src="./img/+.png" alt="添加机床" title="添加机床"> |
| | | <Device v-if="v.id" :id="v.id" style="width: 100%;height: 100%;" :deviceList="deviceList" |
| | | :plantDeviceList="plantDeviceList"></Device> |
| | | :plantDeviceList="plantDeviceList" ::info="info"></Device> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | :title="添加设备" |
| | | title="添加设备" |
| | | :close-on-click-modal="false" |
| | | width="20%" |
| | | :visible.sync="addStatus"> |
| | |
| | | id (val) { |
| | | if (!val) { |
| | | this.map = [] |
| | | }else { |
| | | // getRequest('machineList',{plantId: val}).then(res => { |
| | | // this.plantDeviceList = res.list.map(item => { |
| | | // return { |
| | | // machineId: item.id, |
| | | // machineName: item.machineName |
| | | // } |
| | | // }) || [] |
| | | // }) |
| | | } |
| | | }, |
| | | currentMap: { |
| | |
| | | contextmenu(e) { |
| | | console.log(e) |
| | | if(this.status ===2) return |
| | | if (!this.range.x) return |
| | | if (this.range.x === undefined) return |
| | | // if (this.range.x !=='') return |
| | | e.preventDefault() |
| | | e.stopPropagation() |
| | |
| | | addDevice (e,v) { |
| | | e.stopPropagation() |
| | | this.addStatus = true |
| | | this.deviceId = '' |
| | | this.currentAdd = v |
| | | }, |
| | | del () { |