Bladeren bron

实现只显示到行社的树

jiawuxian 2 jaren geleden
bovenliggende
commit
53c5dc42e5

+ 7 - 0
src/api/system/public.js

@@ -8,6 +8,13 @@ export function deptTreeSelect() {
   })
 }
 
+export function handsheDeptTreeSelect() {
+  return request({
+    url: '/system/dept/deptTree/hangshe',
+    method: 'get'
+  })
+}
+
 // 查询文件
 export function getFile(code) {
   return request({

+ 12 - 2
src/components/orgTree/index.vue

@@ -30,7 +30,7 @@
 
 <script>
 import tableListMixins from "@/mixins/tableList";
-import {deptTreeSelect} from "@/api/system/public";
+import {deptTreeSelect,handsheDeptTreeSelect} from "@/api/system/public";
 
 export default {
   name: "orgTree",
@@ -54,6 +54,12 @@ export default {
       defaultKey:null,
     }
   },
+  props:{
+    hangsheTree:{
+      type:Boolean,
+      default:false,
+    }
+  },
   watch: {
     // 根据名称筛选机构树
     deptName(val) {
@@ -70,7 +76,11 @@ export default {
     },
     /** 查询机构下拉树结构 */
     getDeptTree() {
-      deptTreeSelect().then(response => {
+      let method=deptTreeSelect;
+      if(this.hangsheTree){
+        method=handsheDeptTreeSelect
+      }
+      method().then(response => {
         this.treeList = response.data;
         this.defaultKeys.push(response.data[0].id);
         this.$emit('defaultKey',response.data[0].id);

+ 2 - 0
src/views/resumption/plan/index.vue

@@ -8,6 +8,7 @@
           @defaultKey="getDefaultKey"
           @checkChange="checkChange"
           @click="clickTreeNode"
+          hangsheTree
         ></org-tree>
       </el-col>
 
@@ -359,6 +360,7 @@ export default {
         planName: null,
         pageNum: 1,
         pageSize: 10,
+        checkSub:false,
         ...query,
       },
       pageData: [],

+ 1 - 0
src/views/resumption/rule/index.vue

@@ -8,6 +8,7 @@
           @defaultKey="getDefaultKey"
           @checkChange="checkChange"
           @click="clickTreeNode"
+          hangsheTree
         ></org-tree>
       </el-col>