gaosp
2024-03-08 8b887f86a35b9711135087c9fc54f85a6ebf50d5
src/container/Map/Map.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-01-05 23:47:53
 * @LastEditors: Sneed
 * @LastEditTime: 2024-03-03 10:03:43
 * @LastEditTime: 2024-03-08 09:11:52
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/Map.vue
-->
<template>
@@ -427,23 +427,28 @@
        },
        sign(type) {
         //if(type == 2){//2:设备
            console.log('hh',this);
            //console.log('hh',this);
            const { x, x1, y, y1 } = this.range
            
            for (var i = x; i <= x1; i++) {
               for (var j = y; j <= y1; j++) {
                  let arr = [...(this.map[i])]
                  if (arr[j].colspan < 4 || arr[j].rowspan  <  4) { //x1-x<3 || y1-y<3
                  if (type == 2 && (arr[j].colspan < 4 || arr[j].rowspan  <  4)) { //x1-x<3 || y1-y<3
                     return this.$message({
                        type: 'error',
                        message: '单元格较小,无法展示设备,请至少合并4行4列单元格'
                     })
                  }
                  
                  arr[j].type = type
                  arr[j].id = undefined
                  this.$set(this.map, i, arr)
               }
            }
         //}
            this.showAction = false
@@ -584,6 +589,7 @@
        position: relative;
        display: flex;
        flex-direction: column;
        background: rgba(0,0,0,.6);
    }
}