haojianlong 3 yıl önce
ebeveyn
işleme
da50d4dc56

+ 1 - 1
package.json

@@ -19,7 +19,7 @@
     "@persagy-web/big": "2.2.61",
     "@persagy-web/draw": "2.2.17",
     "@persagy-web/graph": "2.2.52",
-    "@persagy-web/big-edit": "2.2.45",
+    "@persagy-web/big-edit": "2.2.46",
     "@persagy-web/edit": "2.2.36",
     "@types/uuid": "^8.0.0",
     "ant-design-vue": "^1.6.5",

+ 2 - 0
src/components/editview/leftToolBar/addItemModel.vue

@@ -19,6 +19,7 @@
               :data="categoryList"
               showPanel
               width="300"
+              :hideClear="true"
               @confirm="changeEquip"
             ></Cascader>
             <Cascader
@@ -26,6 +27,7 @@
               allText="全部"
               multiple
               :data="buildFloorList"
+              :hideClear="true"
               @confirm="changeFloor"
               showPanel
               width="300"

+ 34 - 31
src/views/home.vue

@@ -342,47 +342,50 @@ export default {
               cancelButtonText: "取消",
             })
               .then(() => {
-                let routeUrl = this.$router.resolve({
-                  name: "Editer",
-                  query: {
-                    graphId: res.graphId,
-                    id: res.id,
-                    categoryName: encodeURI(this.categoryName),
-                    isPub: 0,
-                    projectId: this.projectId,
-                  },
-                });
-                window.open(routeUrl.href, "_blank");
+                const query= {
+                  graphId: res.graphId,
+                  id: res.id,
+                  categoryName: encodeURI(this.categoryName),
+                  isPub: 0,
+                  projectId: this.projectId,
+                }
+                this.finalToEdit(query)
               })
               .catch(() => {});
           } else {
-            let routeUrl = this.$router.resolve({
-              name: "Editer",
-              query: {
-                graphId: data.graphId,
-                id: data.id,
-                categoryName: encodeURI(this.categoryName),
-                isPub: this.isPub,
-                projectId: this.projectId,
-              },
-            });
-            window.open(routeUrl.href, "_blank");
+            const query={
+              graphId: data.graphId,
+              id: data.id,
+              categoryName: encodeURI(this.categoryName),
+              isPub: this.isPub,
+              projectId: this.projectId,
+            }
+            this.finalToEdit(query)
           }
         });
       } else {
         // 进入草稿
-        let routeUrl = this.$router.resolve({
+        const query= {
+          graphId: data.graphId,
+          id: data.id,
+          categoryName: encodeURI(this.categoryName),
+          isPub: this.isPub,
+          projectId: this.projectId,
+        }
+        this.finalToEdit(query)
+      }
+    },
+    /**
+     * 点击已发布,最终跳转编辑器
+     */
+    finalToEdit(query) {
+      setTimeout(() => {
+        const routeUrl = this.$router.resolve({
           name: "Editer",
-          query: {
-            graphId: data.graphId,
-            id: data.id,
-            categoryName: encodeURI(this.categoryName),
-            isPub: this.isPub,
-            projectId: this.projectId,
-          },
+          query,
         });
         window.open(routeUrl.href, "_blank");
-      }
+      }, 500)
     },
     /////////////////接口
     // 查询图形信息