pm 1 жил өмнө
parent
commit
a4279be96c

+ 3 - 3
src/components/ImageUpload/index.vue

@@ -19,7 +19,7 @@
     >
       <i class="el-icon-plus"></i>
     </el-upload>
-    
+
     <!-- 上传提示 -->
     <div class="el-upload__tip" slot="tip" v-if="showTip">
       请上传
@@ -77,7 +77,7 @@ export default {
       dialogVisible: false,
       hideUpload: false,
       baseUrl: process.env.VUE_APP_BASE_API,
-      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/uploadMinio", // 上传的图片服务器地址
+      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
       headers: {
         Authorization: "Bearer " + getToken(),
       },
@@ -127,7 +127,7 @@ export default {
     },
     // 上传成功回调
     handleUploadSuccess(res) {
-      this.uploadList.push({ name: res.fileName, url: res.fileName });
+      this.uploadList.push({ name: res.fileName, url: res.url });
       if (this.uploadList.length === this.number) {
         this.fileList = this.fileList.concat(this.uploadList);
         this.uploadList = [];

+ 12 - 9
src/components/separationPoint/index.vue

@@ -174,16 +174,19 @@ export default {
                 // 获取隔离点信息,并将选中的 labelText 推入数组
 
                 this.$nextTick(() => {
-                  selectIsIsolationPointById(pos.pointId).then((res) => {
-                    this.selectedText.push({
-                      pointName: res.data.pointName,
-                      pointId: res.data.pointId,
-                      pointType: res.data.pointType,
-                      powerType: res.data.powerType,
+                  if(this.$route.query.sopId!==null||this.$route.query.ticketId!==null){
+                    selectIsIsolationPointById(pos.pointId).then((res) => {
+                      this.selectedText.push({
+                        pointName: res.data.pointName,
+                        pointId: res.data.pointId,
+                        pointType: res.data.pointType,
+                        powerType: res.data.powerType,
+                      });
+                      console.log(this.selectedText,'$emit');
+                      this.$emit("selection-changed", this.selectedText);
                     });
-                    console.log(this.selectedText,'$emit');
-                    this.$emit("selection-changed", this.selectedText);
-                  });
+                  }
+
                 });
               } else {
                 // 取消选中状态,恢复普通矩形和文字,切换为未选中的图片

+ 4 - 4
src/views/mes/job/jobm/NewOperations.vue

@@ -122,7 +122,7 @@
                       disabled
                     />
                   </el-form-item>
-                  <el-form-item label="产线" prop="workline">
+                  <el-form-item label="产线" prop="workline">
                     <el-input
                       v-model="form.workline"
                       placeholder="请输入产线"
@@ -131,7 +131,7 @@
                     />
                   </el-form-item>
                   <div class="text item">
-                    <p>已选隔离点</p>
+                    <p style="color:#606266;font-weight: 600;font-size: 16px">已选隔离点</p>
                     <el-table
                       :data="tableData"
                       stripe
@@ -392,7 +392,7 @@ export default {
         ticketCode: "",
         ticketContent: "",
         workshopName: "", //车间名称
-        workline: "", //产线
+        workline: "", //产线
         spoint: [], //已选隔离点
         locker: "", //上锁人
         coLocker: "", //共锁人
@@ -975,7 +975,7 @@ export default {
         ticketCode: "",
         ticketContent: "",
         workshopName: "", //车间名称
-        workline: "", //产线
+        workline: "", //产线
         spoint: [], //已选隔离点
         locker: "", //上锁人
         coLocker: "", //共锁人

+ 3 - 3
src/views/mes/job/jobm/index.vue

@@ -48,8 +48,8 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="产线" prop="workareaId">
-        <el-select v-model="queryParams.workareaId" placeholder="请选择产线">
+      <el-form-item label="产线" prop="workareaId">
+        <el-select v-model="queryParams.workareaId" placeholder="请选择产线">
           <el-option
             v-for="dict in this.workareaList"
             :key="dict.value"
@@ -203,7 +203,7 @@
           />
         </template>
       </el-table-column>
-      <el-table-column label="产线" align="center" prop="workareaName">
+      <el-table-column label="产线" align="center" prop="workareaName">
       </el-table-column>
       <el-table-column label="隔离点总数" align="center" prop="pointCount">
       </el-table-column>

+ 18 - 6
src/views/mes/md/workshop/index.vue

@@ -53,7 +53,7 @@
           plain
           icon="el-icon-refresh-left"
           size="mini"
-          @click="handleAdd"
+          @click="handlerefresh"
           v-hasPermi="['mes:cal:workshop:refresh']"
         >刷新
         </el-button>
@@ -107,9 +107,10 @@
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
         </template>
       </el-table-column>
-      <el-table-column label="车间地图" align="center" prop="remark">
+      <el-table-column label="车间地图" align="center" prop="attr1">
         <template slot-scope="scope">
-          <img src="" alt="">
+          <img v-if="scope.row.attr1" style="width:50px;height:50px" :src="scope.row.attr1" alt="">
+          <span v-else>-</span>
         </template>
       </el-table-column>
       <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
@@ -172,9 +173,9 @@
 <!--          <el-radio v-model="radio" label="1">启用</el-radio>-->
 <!--          <el-radio v-model="radio" label="2">停用</el-radio>-->
 <!--        </el-form-item>-->
-<!--        <el-form-item label="车间地图" prop="calendarType">-->
-<!--          <ImageUpload :limit="1" :value="form.sipUrl" :fileSize="5" @onUploaded="handleImgUplaoded" @onRemoved="handleImgRemoved" ></ImageUpload>-->
-<!--        </el-form-item>-->
+        <el-form-item label="车间地图" prop="attr1">
+          <ImageUpload :limit="1" :value="form.attr1" :fileSize="5" @onUploaded="handleImgUplaoded" @onRemoved="handleImgRemoved" ></ImageUpload>
+        </el-form-item>
 
 
 
@@ -291,6 +292,9 @@ export default {
       this.open = false;
       this.reset();
     },
+    handlerefresh(){
+      this.getList()
+    },
     // 表单重置
     reset() {
       this.form = {
@@ -329,6 +333,14 @@ export default {
       this.single = selection.length!==1
       this.multiple = !selection.length
     },
+    //图片上传成功
+    handleImgUplaoded(imgUrl){
+      this.form.attr1 = imgUrl;
+    },
+    //图片移除
+    handleImgRemoved(imgUrl){
+      this.form.attr1 = null;
+    },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();

+ 6 - 6
src/views/mes/sop/sopm/NewSop.vue

@@ -32,7 +32,7 @@
               <el-tab-pane label="SOP新增" name="first">
                 <!-- 新增作业票信息-->
                 <el-form ref="form" :model="form" label-width="70px">
-                  <el-form-item label="名称" prop="sopName">
+                  <el-form-item label="SOP名称" prop="sopName">
                     <el-input
                       v-model="form.sopName"
                       placeholder="请输入SOP名称"
@@ -41,7 +41,7 @@
                   </el-form-item>
                   <el-row>
                     <el-col :span="16">
-                      <el-form-item label="编号" prop="sopCode">
+                      <el-form-item label="SOP编号" prop="sopCode">
                         <el-input
                           v-model="form.sopCode"
                           placeholder="请输入SOP编号"
@@ -77,7 +77,7 @@
                       />
                     </el-select>
                   </el-form-item>
-                  <el-form-item label="作业内容" prop="sopContent">
+                  <el-form-item label="SOP内容" prop="sopContent">
                     <el-input
                       type="textarea"
                       v-model="form.sopContent"
@@ -105,7 +105,7 @@
                       disabled
                     />
                   </el-form-item>
-                  <el-form-item label="产线" prop="workline">
+                  <el-form-item label="产线" prop="workline">
                     <el-input
                       v-model="form.workline"
                       style="width: 100%"
@@ -114,7 +114,7 @@
                   </el-form-item>
 
                   <div class="text item">
-                    <p>已选隔离点</p>
+                    <p style="color:#606266;font-weight: 600;font-size: 16px">已选隔离点</p>
                     <el-table
                       :data="tableData"
                       stripe
@@ -210,7 +210,7 @@ export default {
         sopCode: "",
         SOPType: "",
         workshopName: "", //车间名称
-        workline: "", //产线
+        workline: "", //产线
         workareaName: "",
         spoint: [], //已选隔离点
       },

+ 4 - 4
src/views/mes/sop/sopm/index.vue

@@ -48,8 +48,8 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="产线" prop="workareaId">
-        <el-select v-model="queryParams.workareaId" placeholder="请选择产线">
+      <el-form-item label="产线" prop="workareaId">
+        <el-select v-model="queryParams.workareaId" placeholder="请选择产线">
           <el-option
             v-for="dict in this.workareaList"
             :key="dict.value"
@@ -178,7 +178,7 @@
           <dict-tag :options="dict.type.sop_type" :value="scope.row.sopType" />
         </template>
       </el-table-column>
-      <el-table-column label="产线" align="center" prop="workareaName">
+      <el-table-column label="产线" align="center" prop="workareaName">
       </el-table-column>
       <el-table-column label="隔离点数量" align="center" prop="pointCount">
       </el-table-column>
@@ -326,7 +326,7 @@ export default {
   },
 
   methods: {
-    
+
     // 格式化日期查询数据
     formatDate(date) {
       if (date && date instanceof Date && !isNaN(date)) {

+ 204 - 39
src/views/mes/wa/workarea/MapData.vue

@@ -1,53 +1,218 @@
 <template>
-  <div class="newOperations">
-    <!--    newOperations盒子开始-->
+  <div class="mapdata">
+    <div id="container" ref="container" style="width:1100px"></div>
     <div class="left">
-      <MapData ></MapData>
-    </div>
-    <div class="right">
-              <el-input
-                type="textarea"
-                v-model="value"
-                placeholder="请输入内容"
-                rows="20"
-              />
+      <el-input v-model="value" type="textarea" :rows="30" ></el-input>
+      <el-button @click="refresh" type="primary" style="width: 80px;align-self: flex-end">刷新</el-button>
+
     </div>
-<!--    盒子结束-->
   </div>
+
 </template>
+
 <script>
-import MapData from "./MapData.vue";
+import Konva from "konva";
+import { getWorkareaInfo } from '@/api/mes/wa/workarea'
+
 export default {
-  name:'MapData',
-  components: {
-    MapData,
-  },
-  data(){
+  name: "KonvaExample",
+  data() {
     return {
+      stage: null,
+      layer: null,
+      selectedStates: [], // 用于存储每个元素的选中状态
+      selectedText: [], // 用于存储未选中的元素文本
+      rects: [], // 白色r        ect合集
+      texts: [], // 白色text合集
+      redrects: [], // 红色rect合集
+      redtexts: [], // 白色text合集
+      value:'哈哈哈'
+    };
+  },
 
-      value:'哈哈哈哈'
-    }
-  }
-}
+  mounted() {
+    this.initKonva();
+    this.getWorkAreaInfo()
+   console.log(this.$route.query.workareaId,'workareaId');
+  },
+
+  methods: {
+    getWorkAreaInfo(){
+      const workareaId=this.$route.query.workareaId;
+      getWorkareaInfo(workareaId).then(response => {
+        console.log(response,'工作区域预览接口调用');
+        this.value= response.data.map;
+        console.log(this.value,'Value')
+      })
+    },
+    refresh(){
+      this.initKonva();
+    },
+    initKonva() {
+      // 创建舞台
+      this.stage = new Konva.Stage({
+        container: this.$refs.container, // 容器元素
+        width: 1100,
+        height: 790,
+      });
+
+      // 创建图层
+      this.layer = new Konva.Layer();
+
+      // 创建底图
+      const bgImage = new Image();
+      bgImage.src = require("@/assets/images/table.png");
+      bgImage.onload = () => {
+        const knovaImage = new Konva.Image({
+          x: 330,
+          y: 10,
+          image: bgImage,
+          width: 500,
+          height: 790,
+          draggable: false,
+        });
+        this.layer.add(knovaImage);
+        this.layer.draw();
+      };
+
+      // 绘制无限网格
+      this.drawGrid(50, 50, "#e0e0e0"); // 每个单元格50x50,浅灰色网格
+
+      // 渲染数据
+      const imageSrc = require("@/assets/images/localSetIcon.jpg"); // 图片路径
+      this.renderGrid(imageSrc, 6, 3, 450, 100, 120, 100, 50, 50, 60, 25);
+
+      // 将图层添加到舞台
+      this.stage.add(this.layer);
+      this.layer.draw();
+
+      // 禁止舞台拖拽
+      this.stage.draggable(false);
+    },
+
+    // 绘制无限网格
+    drawGrid(cellWidth, cellHeight, gridColor) {
+      const width = 1100;
+      const height = 830;
+
+      // 绘制竖线
+      for (let i = 0; i <= width; i += cellWidth) {
+        const verticalLine = new Konva.Line({
+          points: [i, 0, i, height],
+          stroke: gridColor,
+          strokeWidth: 1,
+        });
+        this.layer.add(verticalLine);
+      }
+
+      // 绘制横线
+      for (let j = 0; j <= height; j += cellHeight) {
+        const horizontalLine = new Konva.Line({
+          points: [0, j, width, j],
+          stroke: gridColor,
+          strokeWidth: 1,
+        });
+        this.layer.add(horizontalLine);
+      }
+
+      this.layer.draw();
+    },
+
+    renderGrid(imageSrc) {
+      this.selectedStates = []; // 用数组来存储选中状态
+      this.rects = [];
+      this.texts = [];
+      this.redrects = [];
+      this.redtexts = [];
+      this.selectedText = [];
+
+      const positions = [
+        { row: 2, col: 9, pointName: "E-1" },
+        { row: 2, col: 11, pointName: "E-2" },
+        { row: 2, col: 13, pointName: "E-3" },
+        { row: 4, col: 9, pointName: "E-4" },
+        { row: 4, col: 11, pointName: "E-5" },
+        { row: 4, col: 13, pointName: "E-6" },
+        { row: 6, col: 9, pointName: "E-7" },
+        { row: 6, col: 11, pointName: "E-8" },
+        { row: 6, col: 13, pointName: "E-9" },
+        { row: 8, col: 9, pointName: "E-10" },
+        { row: 8, col: 11, pointName: "E-11" },
+        { row: 8, col: 13, pointName: "E-12" },
+        { row: 10, col: 9, pointName: "E-13" },
+        { row: 10, col: 11, pointName: "E-14" },
+        { row: 10, col: 13, pointName: "E-15" },
+        { row: 12, col: 9, pointName: "E-16" },
+        { row: 12, col: 11, pointName: "E-17" },
+        { row: 12, col: 13, pointName: "E-18" },
+      ];
+
+      positions.forEach((pos, index) => {
+        const x = pos.col * 50; // 每个单元格宽度为50
+        const y = pos.row * 50; // 每个单元格高度为50
+        const labelText = pos.pointName; // 对应的文字
+
+        const point = new Image();
+        point.src = imageSrc;
+        point.onload = () => {
+          const knovaImage = new Konva.Image({
+            x: x,
+            y: y,
+            image: point,
+            width: 50,
+            height: 50,
+            draggable: false,
+          });
+
+          this.layer.add(knovaImage);
+
+          // 普通矩形
+          const rect = new Konva.Rect({
+            x: x - 3,
+            y: y + 55,
+            width: 60,
+            height: 25,
+            cornerRadius: 10,
+            stroke: "red",
+            strokeWidth: 2,
+            fill: "white",
+          });
+          this.layer.add(rect);
+          this.rects.push(rect); // 用数组存储
+
+          // 普通文字
+          const text = new Konva.Text({
+            x: x + 12,
+            y: y + 60,
+            fontSize: 20,
+            text: labelText,
+            fontFamily: "Calibri",
+            fill: "red",
+          });
+          this.layer.add(text);
+          this.texts.push(text); // 用数组存储
+
+          this.layer.draw();
+        };
+      });
+    },
+  },
+};
 </script>
-<style lang="scss" scoped>
-.newOperations {
-  width: 99%;
+
+<style scoped lang="scss">
+#container {
+  width: 100%;
   height: 100%;
-  // background: pink;
-  margin: 10px;
+}
+.mapdata{
+  width: 100%;
+  height: 100%;
+  display: flex;
+}
+.left{
+  flex: 1;
   display: flex;
-  .left {
-    width: 75%;
-    height: 830px;
-    background: #eee;
-    margin-right: 10px;
-  }
-  .right {
-    flex: 1;
-    .right_top {
-      height: 540px;
-    }
-  }
+  flex-direction: column;
 }
 </style>

+ 0 - 345
src/views/mes/wa/workarea/MapView.vue

@@ -1,345 +0,0 @@
-<template>
-  <div id="container" ref="container"></div>
-</template>
-
-<script>
-import Konva from "konva";
-import { selectIsIsolationPointById,getIsIsolationPointPage } from "@/api/mes/spm/segregationPoint";
-import { mapGetters } from "vuex";
-
-export default {
-  name: "KonvaExample",
-  // props: {
-  //   points: {
-  //     type: Object,
-  //     default: null,
-  //   },
-  // },
-  data() {
-    return {
-      stage: null,
-      layer: null,
-      selectedStates: [], // 用于存储每个元素的选中状态
-      selectedText: [], // 用于存储未选中的元素文本
-      rects: [], //白色rect合集
-      texts: [], //白色text合集
-      redrects: [], //红色rect合集
-      redtexts: [], //白色text合集
-    };
-  },
-
-  mounted() {
-    this.initKonva();
-    console.log(this.points, "points");
-    console.log(
-      this.getSelectSopPoints,
-      this.getSopEdit,
-      "getSopEdit - getSelectSopPoints"
-    );
-  },
-  computed: {
-    ...mapGetters("sopSelectPoints", ["getSelectSopPoints", "getSopEdit"]),
-  },
-  methods: {
-    initKonva() {
-      // 创建舞台
-      this.stage = new Konva.Stage({
-        container: this.$refs.container, // 容器元素
-        width: 1270,
-        height: 830,
-      });
-
-      // 创建图层
-      this.layer = new Konva.Layer();
-
-      // 创建底图
-      const bgImage = new Image();
-      bgImage.src = require("@/assets/images/table.png");
-      bgImage.onload = () => {
-        const knovaImage = new Konva.Image({
-          x: 330,
-          y: 10,
-          image: bgImage,
-          width: 500,
-          height: 790,
-          draggable: false,
-        });
-        this.layer.add(knovaImage);
-        this.layer.draw();
-      };
-
-      // 绘制无限网格
-      this.drawGrid(50, 50, "#e0e0e0"); // 每个单元格50x50,浅灰色网格
-
-      // 渲染数据
-      const imageSrc = require("@/assets/images/localSetIcon.jpg"); // 图片路径
-      this.renderGrid(imageSrc, 6, 3, 450, 100, 120, 100, 50, 50, 60, 25);
-
-      // 将图层添加到舞台
-      this.stage.add(this.layer);
-      this.layer.draw();
-
-      // 禁止舞台拖拽
-      this.stage.draggable(false);
-    },
-
-    // 绘制无限网格
-    drawGrid(cellWidth, cellHeight, gridColor) {
-      const width = 1270;
-      const height = 830;
-
-      // 绘制竖线
-      for (let i = 0; i <= width; i += cellWidth) {
-        const verticalLine = new Konva.Line({
-          points: [i, 0, i, height],
-          stroke: gridColor,
-          strokeWidth: 1,
-        });
-        this.layer.add(verticalLine);
-      }
-
-      // 绘制横线
-      for (let j = 0; j <= height; j += cellHeight) {
-        const horizontalLine = new Konva.Line({
-          points: [0, j, width, j],
-          stroke: gridColor,
-          strokeWidth: 1,
-        });
-        this.layer.add(horizontalLine);
-      }
-
-      this.layer.draw();
-    },
-
-    renderGrid(imageSrc) {
-      this.selectedStates = {}; // 用对象来存储选中状态,键为文字内容
-      this.rects = {};
-      this.texts = {};
-      this.redrects = {};
-      this.redtexts = {};
-      this.selectedText = [];
-
-      const positions = [
-        { row: 2, col: 9 }, // E-1
-        { row: 2, col: 11 }, // E-2
-        { row: 2, col: 13 }, // E-3
-        { row: 4, col: 9 }, // E-4
-        { row: 4, col: 11 }, // E-5
-        { row: 4, col: 13 }, // E-6
-        { row: 6, col: 9 }, // E-7
-        { row: 6, col: 11 }, // E-8
-        { row: 6, col: 13 }, // E-9
-        { row: 8, col: 9 }, // E-10
-        { row: 8, col: 11 }, // E-11
-        { row: 8, col: 13 }, // E-12
-        { row: 10, col: 9 }, // E-13
-        { row: 10, col: 11 }, // E-14
-        { row: 10, col: 13 }, // E-15
-        { row: 12, col: 9 }, // E-16
-        { row: 12, col: 11 }, // E-17
-        { row: 12, col: 13 }, // E-18
-      ];
-
-
-
-
-      positions.forEach((pos, index) => {
-        const x = pos.col * 50; // 每个单元格宽度为50
-        const y = pos.row * 50; // 每个单元格高度为50
-        const labelText = pos.pointName; // 对应的文字
-
-        const point = new Image();
-        point.src = imageSrc;
-        point.onload = () => {
-          const knovaImage = new Konva.Image({
-            x: x,
-            y: y,
-            image: point,
-            width: 50,
-            height: 50,
-            draggable: false,
-          });
-          // // 添加点击事件,仅当 getSopEdit 为 true 时才允许点击a
-          // if (this.getSopEdit == true) {
-          //   knovaImage.on("click", () => {
-          //     // 切换选中状态,基于文本内容
-          //     this.selectedStates[labelText] = !this.selectedStates[labelText];
-          //
-          //     if (this.selectedStates[labelText]) {
-          //       // 选中状态,显示红色矩形和文字,切换为选中的图片
-          //       this.rects[labelText].visible(false);
-          //       this.texts[labelText].visible(false);
-          //       this.redrects[labelText].visible(true);
-          //       this.redtexts[labelText].visible(true);
-          //
-          //       const selectedImage = new Image();
-          //       selectedImage.src = require("@/assets/images/localSetSelect.jpg");
-          //       selectedImage.onload = () => {
-          //         knovaImage.image(selectedImage); // 更新图像
-          //         this.layer.draw(); // 更新图层
-          //       };
-          //
-          //       // 获取隔离点信息,并将选中的 labelText 推入数组
-          //
-          //       this.$nextTick(() => {
-          //         selectIsIsolationPointById(pos.pointId).then((res) => {
-          //           this.selectedText.push({
-          //             pointName: res.data.pointName,
-          //             pointId: res.data.pointId,
-          //             pointType: res.data.pointType,
-          //             powerType: res.data.powerType,
-          //           });
-          //           console.log(this.selectedText,'$emit');
-          //           this.$emit("selection-changed", this.selectedText);
-          //         });
-          //       });
-          //     } else {
-          //       // 取消选中状态,恢复普通矩形和文字,切换为未选中的图片
-          //       this.rects[labelText].visible(true);
-          //       this.texts[labelText].visible(true);
-          //       this.redrects[labelText].visible(false);
-          //       this.redtexts[labelText].visible(false);
-          //
-          //       const normalImage = new Image();
-          //       normalImage.src = imageSrc; // 未选中的默认图片路径
-          //       normalImage.onload = () => {
-          //         knovaImage.image(normalImage); // 更新图像
-          //         this.layer.draw(); // 更新图层
-          //       };
-          //
-          //       // 从选中数组中移除该项
-          //       this.selectedText = this.selectedText.filter(
-          //         (item) => item.pointName !== labelText
-          //       );
-          //     }
-          //
-          //     // 确保图层重新渲染
-          //     this.layer.draw();
-          //     this.$emit("selection-changed", this.selectedText);
-          //   });
-          // }
-
-
-          this.layer.add(knovaImage);
-
-          // 普通矩形
-          const rect = new Konva.Rect({
-            x: x - 3,
-            y: y + 55,
-            width: 60,
-            height: 25,
-            cornerRadius: 10,
-            stroke: "red",
-            strokeWidth: 2,
-            fill: "white",
-          });
-          this.layer.add(rect);
-          this.rects[labelText] = rect; // 用文字作为键存储
-
-          // 普通文字
-          const text = new Konva.Text({
-            x: x + 12,
-            y: y + 60,
-            fontSize: 20,
-            text: labelText,
-            fontFamily: "Calibri",
-            fill: "red",
-          });
-          this.layer.add(text);
-          this.texts[labelText] = text; // 用文字作为键存储
-
-          // 红色矩形(初始隐藏)
-          const redrect = new Konva.Rect({
-            x: x - 3,
-            y: y + 55,
-            width: 60,
-            height: 25,
-            cornerRadius: 10,
-            stroke: "red",
-            strokeWidth: 2,
-            fill: "red",
-            visible: false,
-          });
-          this.layer.add(redrect);
-          this.redrects[labelText] = redrect; // 用文字作为键存储
-
-          // 红色文字(初始隐藏)
-          const redtext = new Konva.Text({
-            x: x + 12,
-            y: y + 60,
-            fontSize: 20,
-            text: labelText,
-            fontFamily: "Calibri",
-            fill: "white",
-            visible: false,
-          });
-          this.layer.add(redtext);
-          this.redtexts[labelText] = redtext; // 用文字作为键存储
-
-          // 检查 this.getSelectSopPoints 是否包含当前点的 pointId
-          if (this.getSelectSopPoints.includes(pos.pointId.toString())) {
-            // 设置为选中状态
-            this.selectedStates[labelText] = true;
-            this.rects[labelText].visible(false);
-            this.texts[labelText].visible(false);
-            this.redrects[labelText].visible(true);
-            this.redtexts[labelText].visible(true);
-
-            // 切换图片为选中状态的图片
-            const selectedImage = new Image();
-            selectedImage.src = require("@/assets/images/localSetSelect.jpg"); // 选中的图片路径
-            selectedImage.onload = () => {
-              knovaImage.image(selectedImage); // 更新图像
-              this.layer.draw(); // 更新图层
-            };
-            // 将选中的 labelText 推入数组
-            this.$nextTick(() => {
-              getIsIsolationPointPage({ current: 1, size: 100 }).then((res) => {
-                const allPoints = res.data.records; // 假设返回的数据结构是 { records: [点数据] }
-
-                // 根据 pos.pointId 查找对应的 pointType 和 powerType
-                const pointInfo = allPoints.find(point => point.pointId == pos.pointId);
-
-                if (pointInfo) {
-                  this.selectedText.push({
-                    pointName: labelText,
-                    pointId: pos.pointId,
-                    pointType: pointInfo.pointType,
-                    powerType: pointInfo.powerType,
-                  });
-                } else {
-                  // 如果没有找到对应的点信息,可以处理这种情况
-                  console.warn(`未找到 pointId 为 ${pos.pointId} 的点信息`);
-                  this.selectedText.push({
-                    pointName: labelText,
-                    pointId: pos.pointId,
-                    pointType: '',
-                    powerType: '',
-                  });
-                }
-                // console.log(this.selectedText,'默认拿到的points')
-                // 触发父组件的 selection-changed 事件
-                this.$emit("selection-changed", this.selectedText);
-              }).catch((error) => {
-                console.error("获取隔离点信息失败", error);
-              });
-            });
-
-          }
-
-          this.layer.draw();
-        };
-      });
-    },
-
-    //     methods结束
-  },
-};
-</script>
-
-<style scoped lang="scss">
-#container {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 105
src/views/mes/wa/workarea/index.vue

@@ -187,112 +187,7 @@
       @pagination="getList"
     />
 
-    <!-- 添加或修改班组对话框 -->
-<!--    <el-dialog :visible.sync="open" width="660px" append-to-body>-->
-<!--      <div slot="title" class="dialog-title">-->
-<!--        <i></i>-->
-<!--        <span class="title">{{ title }}</span>-->
-<!--      </div>-->
-<!--      <el-form ref="form" :model="form" :rules="rules" label-width="110px">-->
-<!--        <el-form-item label="区域名称" prop="workareaName">-->
-<!--          <el-input-->
-<!--            style="width: 318px"-->
-<!--            v-model="form.workareaName"-->
-<!--            placeholder="请输入区域名称"-->
-<!--          />-->
-<!--        </el-form-item>-->
-<!--        <el-row>-->
-<!--          <el-col :span="13">-->
-<!--            <el-form-item label="区域编码" prop="workareaCode">-->
-<!--              <el-input-->
-<!--                v-model="form.workareaCode"-->
-<!--                placeholder="请输入区域编码"-->
-<!--              />-->
-<!--            </el-form-item>-->
-<!--          </el-col>-->
-<!--          <el-col :span="5">-->
-<!--            <el-form-item label-width="80">-->
-<!--              <el-switch-->
-<!--                v-model="autoGenFlag"-->
-<!--                active-color="#13ce66"-->
-<!--                active-text="自动生成"-->
-<!--                @change="handleAutoGenChange(autoGenFlag)"-->
-<!--                v-if="optType != 'view'"-->
-<!--              >-->
-<!--              </el-switch>-->
-<!--            </el-form-item>-->
-<!--          </el-col>-->
-<!--        </el-row>-->
 
-<!--        <el-form-item label="区域类型" prop="workareaType">-->
-<!--          <el-input-->
-<!--            style="width: 318px"-->
-<!--            v-model="form.workareaType"-->
-<!--            placeholder="请输入区域类型"-->
-<!--          />-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="所属车间" prop="workshopId">-->
-<!--          <el-select-->
-<!--            style="width: 318px"-->
-<!--            v-model="form.workshopId"-->
-<!--            placeholder="请选择所属车间"-->
-<!--          >-->
-<!--            <el-option-->
-<!--              v-for="dict in this.WorkShopListOptions"-->
-<!--              :key="dict.key"-->
-<!--              :label="dict.label"-->
-<!--              :value="dict.value"-->
-<!--            />-->
-<!--          </el-select>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="地图" prop="map">-->
-<!--          <el-input-->
-<!--            style="width: 318px"-->
-<!--            v-model="form.map"-->
-<!--            placeholder="请输入地图"-->
-<!--          />-->
-<!--          &lt;!&ndash;          <ImageUpload :limit="1" :value="form.map" :fileSize="5" @onUploaded="handleImgUplaoded" @onRemoved="handleImgRemoved" ></ImageUpload>&ndash;&gt;-->
-<!--        </el-form-item>-->
-<!--        &lt;!&ndash;        <el-form-item label="备注" prop="remark">&ndash;&gt;-->
-<!--        &lt;!&ndash;          <el-input style="width: 318px" type="textarea"  v-model="form.remark" placeholder="请输入备注" />&ndash;&gt;-->
-<!--        &lt;!&ndash;        </el-form-item>&ndash;&gt;-->
-<!--      </el-form>-->
-
-<!--      <div slot="footer" class="dialog-footer">-->
-<!--        <el-button type="primary" @click="cancel" v-if="optType == 'view'"-->
-<!--          >返回</el-button-->
-<!--        >-->
-<!--        <el-button type="primary" @click="submitForm" v-else>确 定</el-button>-->
-<!--        <el-button @click="cancel">取 消</el-button>-->
-<!--      </div>-->
-<!--    </el-dialog>-->
-
-<!--    &lt;!&ndash; 地图预览 &ndash;&gt;-->
-<!--    <el-dialog-->
-<!--      title="地图预览"-->
-<!--      :visible.sync="dialogVisibleMap"-->
-<!--      :before-close="handleClose"-->
-<!--      width="100%"-->
-
-<!--    >-->
-<!--      <div class="content" style="display: flex">-->
-<!--        &lt;!&ndash; 将 mapData 作为 prop 传递给 MapData 组件 &ndash;&gt;-->
-<!--        <MapData :points="mapData" />-->
-<!--        <el-button-->
-<!--          type="primary"-->
-<!--          size="mini"-->
-
-<!--          style="height: 35px"-->
-<!--          >刷新</el-button-->
-<!--        >-->
-<!--        <el-input-->
-<!--          type="textarea"-->
-<!--          v-model="mapData"-->
-<!--          placeholder="请输入内容"-->
-<!--          rows="20"-->
-<!--        />-->
-<!--      </div>-->
-<!--    </el-dialog>-->
   </div>
 </template>
 

+ 3 - 3
vue.config.js

@@ -35,15 +35,15 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        // http://36.133.174.236:9090
-        target: `http://192.168.1.127:9090`,
+        // http://36.133.174.236:9090  http://192.168.1.127:9090
+        target: `http://192.168.31.110:9090`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''
         }
       },
       '/ureport': {
-        target: 'http://192.168.1.127:9090',
+        target: 'http://192.168.31.110:9090',
         ws:false,
         changeOrigin: true,
         pathRewrite: {