Sfoglia il codice sorgente

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-editer into develop

haojianlong 4 anni fa
parent
commit
7bdfd58dd2
3 ha cambiato i file con 36 aggiunte e 32 eliminazioni
  1. 5 5
      package.json
  2. 29 25
      src/components/baseEditer.vue
  3. 2 2
      src/components/edit/edit-dialog.vue

+ 5 - 5
package.json

@@ -8,11 +8,11 @@
     "lint": "vue-cli-service lint"
   },
   "dependencies": {
-    "@saga-web/base": "2.1.25",
-    "@saga-web/big": "1.0.109",
-    "@saga-web/draw": "2.1.106",
-    "@saga-web/feng-map": "1.0.41",
-    "@saga-web/graph": "2.1.123",
+    "@saga-web/base": "2.1.27",
+    "@saga-web/big": "1.0.110",
+    "@saga-web/draw": "2.1.107",
+    "@saga-web/feng-map": "1.0.43",
+    "@saga-web/graph": "2.1.124",
     "ant-design-vue": "^1.6.0",
     "core-js": "^3.6.4",
     "element-ui": "^2.13.2",

+ 29 - 25
src/components/baseEditer.vue

@@ -792,6 +792,7 @@ export default {
           .then(res => {
             if (res.Result == "success") {
               this.graphId = res.Data;
+              this.scene.undoStack.isChange = false;
               Message({
                 message: "保存成功!",
                 type: "success"
@@ -816,37 +817,40 @@ export default {
     },
     // 自动保存接口
     saveMsgNoMessage() {
-      const Elements = this.scene.saveMsgItem();
-      const Seq = Number(this.urlMsg.seq);
-      const data = {
-        Elements,
-        Name: this.appName, // 名称
-        CategoryId: this.urlMsg.categoryId,
-        ProjectID: this.urlMsg.projectId, // 项目ID
-        BuildingID: this.urlMsg.BuildingID, // 建筑ID
-        FloorID: this.urlMsg.FloorID, // 楼层id
-        Seq // 楼层id
-      };
-      saveGroup(data)
-        .then(res => {
-          if (res.Result == "success") {
-            this.graphId = res.Data;
-            console.log("自动保存成功");
-          } else {
+      if (this.scene.undoStack.isChange) {
+        const Elements = this.scene.saveMsgItem();
+        const Seq = Number(this.urlMsg.seq);
+        const data = {
+          Elements,
+          Name: this.appName, // 名称
+          CategoryId: this.urlMsg.categoryId,
+          ProjectID: this.urlMsg.projectId, // 项目ID
+          BuildingID: this.urlMsg.BuildingID, // 建筑ID
+          FloorID: this.urlMsg.FloorID, // 楼层id
+          Seq // 楼层id
+        };
+        saveGroup(data)
+          .then(res => {
+            if (res.Result == "success") {
+              this.graphId = res.Data;
+              this.scene.undoStack.isChange = false;
+              console.log("自动保存成功");
+            } else {
+              Message({
+                message: "服务器连接失败!请关掉编辑器窗口,重新打开绘制!",
+                type: "error"
+              });
+              console.log("自动保存失败");
+            }
+          })
+          .catch(err => {
             Message({
               message: "服务器连接失败!请关掉编辑器窗口,重新打开绘制!",
               type: "error"
             });
             console.log("自动保存失败");
-          }
-        })
-        .catch(err => {
-          Message({
-            message: "服务器连接失败!请关掉编辑器窗口,重新打开绘制!",
-            type: "error"
           });
-          console.log("自动保存失败");
-        });
+      }
     }
   },
   watch: {

+ 2 - 2
src/components/edit/edit-dialog.vue

@@ -164,8 +164,8 @@
                     },
                     {
                         title: '设备内码',
-                        dataIndex: 'sbjbm',
-                        key: 'sbjbm',
+                        dataIndex: 'assetnum',
+                        key: 'assetnum',
                         width: '25%',
                     },
                 ],