Explorar el Código

流程树过滤其他、待删除类别

cyy hace 2 años
padre
commit
8c576d3248
Se han modificado 2 ficheros con 23 adiciones y 24 borrados
  1. 23 22
      src/business/platform/cat/type/tree.vue
  2. 0 2
      src/store/modules/ibps/modules/param.js

+ 23 - 22
src/business/platform/cat/type/tree.vue

@@ -3,19 +3,13 @@
     v-model="visible"
     closeable
     position="left"
-    :style="{ height: '100%',width:'80%'}"
+    :style="{ height: '100%', width: '80%' }"
     @opened="loadTreeData"
     @close="handleClose"
   >
-    <van-nav-bar
-      :title="title"
-      fixed
-    />
+    <van-nav-bar :title="title" fixed />
     <div class="ibps-fixed-navbar ibps-fixed-top">
-      <van-loading
-        v-if="loading"
-        vertical
-      >加载中...</van-loading>
+      <van-loading v-if="loading" vertical>加载中...</van-loading>
       <ibps-tree
         v-else
         :tree-data="treeData"
@@ -48,7 +42,6 @@ export default {
     categoryKey: {
       type: String
     }
-
   },
   data() {
     return {
@@ -79,18 +72,27 @@ export default {
         return
       }
       this.loading = true
-      findTreeData({ 'categoryKey': this.categoryKey }).then(response => {
-        const data = response.data || []
-        const treeData = TreeUtils.transformToTreeFormat(data, {
-          idKey: 'id',
-          parentIdKey: 'parentId',
-          childrenKey: 'children'
+      findTreeData({ categoryKey: this.categoryKey })
+        .then(response => {
+          const data = response.data || []
+          const treeData = TreeUtils.transformToTreeFormat(data, {
+            idKey: 'id',
+            parentIdKey: 'parentId',
+            childrenKey: 'children'
+          })
+          const mid = []
+          treeData[0].children.forEach((it, i) => {
+            if (it.name != '待删除' && it.name != '其它') {
+              mid.push(it)
+            }
+          })
+          treeData[0].children = mid
+          this.treeData = treeData
+          this.loading = false
+        })
+        .catch(() => {
+          this.loading = false
         })
-        this.treeData = treeData
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
     },
     handleClose() {
       this.$emit('close', false)
@@ -103,4 +105,3 @@ export default {
   }
 }
 </script>
-

+ 0 - 2
src/store/modules/ibps/modules/param.js

@@ -46,11 +46,9 @@ export default {
             commit('pitchDept', data)
         },
         setLevel ({ commit }, data) {
-            console.log(data)
             commit('level', data)
         },
         setflowList ({ commit }, data) {
-            console.log('safdaew35345')
             commit('flowList', data)
         }
     }