hbchen 1 tahun lalu
induk
melakukan
7578ef87c7

+ 1 - 6
src/main.js

@@ -151,12 +151,7 @@ router.beforeEach(async(to, from, next) => {
 
   /* 沙盘详情name添加 */
   if (to.path === "/sandflow") {
-    to.matched[1].name =
-      to.query.type === "view"
-        ? "查看逻辑"
-        : to.query.id
-        ? "编辑逻辑"
-        : "添加逻辑";
+    to.matched[1].name = to.query.SandboxId? "编辑逻辑": "添加逻辑";
   }
 
   if (to.path === "/analyseVariety") {

+ 1 - 0
src/routes/modules/chartRoutes.js

@@ -175,6 +175,7 @@ export default [
 			// },
 			{
 				path: "sandflow",
+				name: '添加逻辑',
 				component: () => import('@/views/sandbox_manage/sandFlowNew/index.vue'),
 				hidden: true,
 			}

+ 5 - 2
src/views/sandbox_manage/index_new_version.vue

@@ -53,7 +53,10 @@
         </el-col>
       </div>
     </div>
-    <div class="sandbox-chart-box" :style="{visibility:rightType=='list'?'hidden':'visible',width:rightType=='list'?'1px':'unset'}">
+    <div class="sandbox-chart-box" 
+    :style="{visibility:rightType=='list'?'hidden':'visible',
+            width:rightType=='list'?'1px':'unset',
+            flexGrow:rightType=='list'?'unset':1}">
       <div class="sandbox-chart-head">
         <div class="sandbox-chartHead-author">作者:<span>{{ this.viewSandbox.SysUserName }}</span></div>
         <div class="sandbox-chartHead-title">{{ this.viewSandbox.Name }}</div>
@@ -1372,7 +1375,7 @@ import { myGraph } from './common/gragh';
   }
   .sandbox-chart-box{
     background-color: white;
-    flex-grow: 1;
+    // flex-grow: 1;
     height: 100%;
     border: 1px solid #DCDFE6;
     border-radius: 4px;

+ 5 - 6
src/views/sandbox_manage/sandFlowNew/index.vue

@@ -806,8 +806,8 @@ const { line} = configOpt;
       }
     },
     created(){
-      this.getSandboxClassify()
-      +this.$route.query.SandboxId && this.getGraphData();
+      this.getSandboxClassify();
+      this.$route.query.SandboxId && this.getGraphData(this.$route.query.SandboxId)
     },
     mounted(){
       this.init()
@@ -863,6 +863,7 @@ const { line} = configOpt;
       },
       /* 编辑页 自动保存 */
       autoSave() {
+        // return 
         this.loopTimer = setInterval(() => {
           if(!this.sandSaveParams.Name || !this.sandSaveParams.SandboxClassifyId) return;
           const { Name, SandboxClassifyId } = this.sandSaveParams;
@@ -1283,7 +1284,7 @@ const { line} = configOpt;
           spinner: 'el-icon-loading',
           background: 'rgba(255, 255, 255, 0.8)'
         });
-        return
+        // return
         const { cells } = this.graph.toJSON();
         this.graph.toSVG(async (dataUri) => {
           const params = new FormData();
@@ -1322,14 +1323,12 @@ const { line} = configOpt;
           this.lockLoding.close();
           //如果是新增,直接跳转到编辑页面
           if(!SandboxId){
-            this.$router.push({
+            this.$router.replace({
               path: '/sandflow',
               query: {
                 SandboxId:sandData.SandboxId,
               },
             });
-            this.getGraphData(sandData.SandboxId);
-            return
           }
           
           callback && callback();