gaosp
2024-01-16 6d1bb629a56c3274630bb74cf93a855a7c96cbec
src/container/Map/Map.vue
@@ -1,7 +1,7 @@
<!--
 * @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>
@@ -38,7 +38,7 @@
                                :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>
@@ -46,7 +46,7 @@
            </div>
        </div>
        <el-dialog
        :title="添加设备"
        title="添加设备"
        :close-on-click-modal="false"
        width="20%"
        :visible.sync="addStatus">
@@ -182,6 +182,15 @@
        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: {
@@ -266,7 +275,7 @@
        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()
@@ -361,6 +370,7 @@
        addDevice (e,v) {
            e.stopPropagation()
            this.addStatus = true
            this.deviceId = ''
            this.currentAdd =  v
        },
        del () {