Jelajahi Sumber

拉取代码

admin 3 tahun lalu
induk
melakukan
b0792432ec
2 mengubah file dengan 42 tambahan dan 14 penghapusan
  1. 12 2
      src/api/exctab/excelmodel.js
  2. 30 12
      src/views/manager/projectinfo/tree.vue

+ 12 - 2
src/api/exctab/excelmodel.js

@@ -2,12 +2,22 @@ import request from '@/router/axios';
 
 //分页获取清表
 export const getList = (params) => {
+        return request({
+            url: '/api/blade-manager/exceltab/list',
+            method: 'get',
+            params
+        })
+    }
+    // 关联清表树all
+export const tabLazytreeAll = (params) => {
     return request({
-        url: '/api/blade-manager/exceltab/list',
+        url: '/api/blade-manager/exceltab/tab-lazytree-all',
         method: 'get',
         params
     })
-}
+};
+
+
 
 //清表树
 export const tabLazytree = (params) => {

+ 30 - 12
src/views/manager/projectinfo/tree.vue

@@ -308,18 +308,19 @@
         <el-select
           v-model="GLExcelFrom.name"
           placeholder="请选择"
+          @change="changetherr()"
         >
           <el-option
             v-for="(item,key) in  GLExcelData"
             :key="key"
-            :label="item.label"
-            :value="item.value"
+            :label="item.name"
+            :value="item.id"
           >
           </el-option>
         </el-select>
         <el-scrollbar>
           <el-input
-            v-model="GLExcelFrom.name"
+            v-model="GLExcelFrom.search"
             placeholder="请输入需要选择的内容"
           ></el-input>
           <el-tree
@@ -1228,6 +1229,7 @@
 </template>
 
 <script>
+let setTimeout22
 import {
   saveFormAndElement, selectFormElements,
   importWbsTree
@@ -1241,7 +1243,7 @@ import { findProjectTree as getAlltree } from "@/api/manager/projectinfo";
 import { getList as getAttchFromOriginalName } from "@/api/resource/attach";
 import { getDictionary } from "@/api/system/dict";
 import { mapGetters } from "vuex";
-import { getList, tabLazytree } from '@/api/exctab/excelmodel'
+import { getList, tabLazytreeAll } from '@/api/exctab/excelmodel'
 export default {
   data () {
     return {
@@ -1250,18 +1252,18 @@ export default {
       GLExcel: false,
       GLExcelFrom: {
         name: '',
-
+        search: '',//搜素框舒服的值
       },
       GLExcelData: [],//
       GLExcelProps: {
         label: 'name',
-        children: 'zones',
-        isLeaf: 'leaf'
+        children: 'children',
+        isLeaf: 'childrenlength'
       },
       exceldata: [],//清表模板
       //#endregion
 
-
+      //#region 
       id: '',
       projectid: '',
       filterText: '',
@@ -1334,6 +1336,7 @@ export default {
       namelist: [],
 
       infoNameVisible: false,
+      //#endregion
     };
   },
   computed: {
@@ -1928,19 +1931,34 @@ export default {
     async getList (da) {//获取清表模板信息
       const { data: res } = await getList(da)
       console.log(res);
+      if (res.code === 200 && res.msg === '操作成功') {
+        this.GLExcelData = res.data.records
+      }
     },
-    async tabLazytree () {//清表树信息
-      // const { data: res } = await tabLazytree({})
-      // console.log(res);
+    async tabLazytreeAll () {//清表树信息
+      const { data: res } = await tabLazytreeAll({
+        modeId: this.GLExcelFrom.name,
+        name: this.GLExcelFrom.search,
+      })
+      console.log(res);
+      if (res.code === 200 && res.msg === '操作成功') {
+        this.exceldata = res.data
+      }
     },
     Associationlist (scope) {//关联清表点击事件
       this.GLExcel = true
       this.getList({
         current: 1,
         size: 100000,
-        parentId: scope.row.id
+        parentId: 0
       })
     },
+    changetherr () {//清表类型选择框change事件
+      if (this.GLExcelFrom.name) {
+        this.GLExcelFrom.search = ''
+        this.tabLazytreeAll()
+      }
+    },
     GLExcelMD () {//弹框关闭事件
 
     },