Browse Source

sop调试、大纲、新增节点bug

kyoyue 4 tháng trước cách đây
mục cha
commit
c1aec31567

+ 3 - 3
src/views/wechat/sop_task/add_sop/components/msgContant.vue

@@ -183,9 +183,9 @@
       });
       const messageVar = ref([]);
       onMounted(async () => {
-        // let res = sopMsgVar();
-        // console.log(res);
-        // messageVar.value = res.data.messageVar || [];
+        let res = sopMsgVar();
+        console.log(res);
+        messageVar.value = res.data.messageVar || [];
         // messageVar.value = [{ name: '客户名称', value: 'wang' }];
       });
 

+ 3 - 3
src/views/wechat/sop_task/add_sop/components/msgContantForwards.vue

@@ -207,9 +207,9 @@
 
       const messageVar = ref([]);
       onMounted(async () => {
-        // let res = sopMsgVar();
-        // console.log(res);
-        // messageVar.value = res.data.forwardVar || [];
+        let res = sopMsgVar();
+        console.log(res);
+        messageVar.value = res.data.forwardVar || [];
         // messageVar.value = [{ label: '客户名称', value: 'wang' }];
       });
       // 插入变量函数

+ 3 - 3
src/views/wechat/sop_task/add_sop/components/nodeMsgContant.vue

@@ -175,9 +175,9 @@
       
       const messageVar = ref([]);
       onMounted(async () => {
-        // let res = sopMsgVar();
-        // console.log(res);
-        // messageVar.value = res.data.messageVar || [];
+        let res = sopMsgVar();
+        console.log(res);
+        messageVar.value = res.data.messageVar || [];
         // messageVar.value = [{ name: '客户名称', value: 'wang' }];
       });
 

+ 3 - 3
src/views/wechat/sop_task/add_sop/components/nodeMsgContantForwards.vue

@@ -175,9 +175,9 @@
       });
       const messageVar = ref([]);
        onMounted(async () => {
-        // let res = sopMsgVar();
-        // console.log(res);
-        // messageVar.value = res.data.forwardVar || [];
+        let res = sopMsgVar();
+        console.log(res);
+        messageVar.value = res.data.forwardVar || [];
         // messageVar.value = [{ label: '客户名称', value: 'wang' }];
       });
 

+ 53 - 52
src/views/wechat/sop_task/index.vue

@@ -238,61 +238,62 @@
       async function handleTree(record: Recordable) {
         loading.value = true;
         
-        treeData.value = [
-          {
-            title: 'parent 1',
-            key: '0-0',
-            children: [
-              {
-                title: 'parent 1-0',
-                key: '0-0-0',
-                children: [
-                  { title: 'leaf', key: '0-0-0-0' },
-                  {
-                    key: '0-0-0-1',title: 'leaf',
-                  },
-                  { title: 'leaf', key: '0-0-0-2' },
-                ],
-              },
-              {
-                title: 'parent 1-1',
-                key: '0-0-1',
-                children: [{ title: 'leaf', key: '0-0-1-0' }],
-              },
-              {
-                title: 'parent 1-2',
-                key: '0-0-2',
-                children: [
-                  { title: 'leaf 1', key: '0-0-2-0' },
-                  {
-                    title: 'leaf 2',
-                    key: '0-0-2-1',
-                  },
-                ],
-              },
-            ],
-          },
-          {
-            title: 'parent 2',
-            key: '0-1',
-            children: [
-              {
-                title: 'parent 2-0',
-                key: '0-1-0',
-                children: [
-                  { title: 'leaf', key: '0-1-0-0' },
-                  { title: 'leaf', key: '0-1-0-1' },
-                ],
-              },
-            ],
-          },
-        ];
+        // treeData.value = [
+        //   {
+        //     title: 'parent 1',
+        //     key: '0-0',
+        //     children: [
+        //       {
+        //         title: 'parent 1-0',
+        //         key: '0-0-0',
+        //         children: [
+        //           { title: 'leaf', key: '0-0-0-0' },
+        //           {
+        //             key: '0-0-0-1',title: 'leaf',
+        //           },
+        //           { title: 'leaf', key: '0-0-0-2' },
+        //         ],
+        //       },
+        //       {
+        //         title: 'parent 1-1',
+        //         key: '0-0-1',
+        //         children: [{ title: 'leaf', key: '0-0-1-0' }],
+        //       },
+        //       {
+        //         title: 'parent 1-2',
+        //         key: '0-0-2',
+        //         children: [
+        //           { title: 'leaf 1', key: '0-0-2-0' },
+        //           {
+        //             title: 'leaf 2',
+        //             key: '0-0-2-1',
+        //           },
+        //         ],
+        //       },
+        //     ],
+        //   },
+        //   {
+        //     title: 'parent 2',
+        //     key: '0-1',
+        //     children: [
+        //       {
+        //         title: 'parent 2-0',
+        //         key: '0-1-0',
+        //         children: [
+        //           { title: 'leaf', key: '0-1-0-0' },
+        //           { title: 'leaf', key: '0-1-0-1' },
+        //         ],
+        //       },
+        //     ],
+        //   },
+        // ];
+           let res = await outlineSopTask({ id: record.id });
+          console.log(res.data)
+        treeData.value = res.data;
         expandedKeys.value = getExpandedKeys(treeData.value); // 收集所有节点的key
         loading.value = false;
         treeModalVisible.value = true;
-        //   let res = await outlineSopTask({ id: record.id });
-        //   console.log(res.data)
-        // treeData.value = res.data;  
+         
       }
 
       // 递归收集所有 key