gaosp
2024-01-29 a359332dbd9fbedee6db289a8dfcf1986d8639b1
src/container/Map/Map.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-01-05 23:47:53
 * @LastEditors: Sneed
 * @LastEditTime: 2024-01-23 21:41:33
 * @LastEditTime: 2024-01-29 22:46:03
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/Map.vue
-->
<template>
@@ -49,7 +49,7 @@
        </div>
        <el-dialog title="放置设备" top="94px" :close-on-click-modal="false" width="100%" :visible.sync="addStatus" >
            <el-select class="wkshoplist" clearable v-model="deviceId" placeholder="请选择">
                <el-option v-for="item in deviceList" :key="item.machineId" :label="item.machineName"
                <el-option v-show="!hasPushed.includes(item.machineId)" v-for="item in deviceList" :key="item.machineId" :label="item.machineName"
                    :value="item.machineId">
                </el-option>
            </el-select>
@@ -133,7 +133,8 @@
            tdMounseDown: false,
            range: { x: '', x1: '', y: '', y1: '' },
            currentAdd: {},
            colgroups: []
            colgroups: [],
            hasPushed: [],
        }
    },
    watch: {
@@ -368,6 +369,15 @@
        addDevice(e, v) {
            e.stopPropagation()
            this.addStatus = true
            let hasPushed = []
            this.map.forEach(item  => {
                item.forEach(v =>  {
                    if (v.id) {
                        hasPushed.push(v.id)
                    }
                })
            })
            this.hasPushed = hasPushed
            this.deviceId = ''
            this.currentAdd = v
        },