zhangh преди 2 години
родител
ревизия
3468d03f15
променени са 2 файла, в които са добавени 13 реда и са изтрити 5 реда
  1. 12 4
      src/views/manager/projectinfo/tree.vue
  2. 1 1
      vue.config.js

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

@@ -1291,6 +1291,7 @@ import { getList, tabLazytreeAll, saveLinkTab, getExcelHtml } from '@/api/exctab
 export default {
   data () {
     return {
+      jiedianId: '',//节点Id
       //#region 
       sortTag: false,
       sortTag2: false,
@@ -1490,6 +1491,7 @@ export default {
     },
 
     setLeftType (type, data, node) {
+      this.jiedianId = data.id
       if (type == 4 || type == 5) {
         this.leftType = type;
       }
@@ -2055,6 +2057,10 @@ export default {
         size: 100000,
         parentId: 0
       })
+      this.GLExcelFrom.name = scope.row.modeId
+      setTimeout(() => {
+        this.$refs.tree.setCheckedKeys([scope.row.excelId])
+      }, 2000)
       this.GLExcelFrom.id = scope.row.pkeyId
     },
     changetherr () {//清表类型选择框change事件
@@ -2067,19 +2073,20 @@ export default {
       this.GLExcelFrom.name = ""
       this.GLExcelFrom.search = ''
       this.GLExcelFrom.id = ''
+      this.exceldata = []
       this.$refs.tree.setCheckedKeys([])
       this.GLExcel = false
     },
     checkchange (data) {//节点选中回调
-      if (this.$refs.tree.getCheckedNodes().length == 0) {
+      if (this.$refs.tree.getCheckedNodes().length === 0) {
         this.$refs.tree.setCheckedKeys([])
-      } else {
+      } else if (this.$refs.tree.getCheckedNodes().length >= 1) {
         this.$refs.tree.setCheckedKeys([data.id])
       }
     },
     async saveLinkTab () {//保存按钮
       const { data: res } = await saveLinkTab({
-        exceTabId: this.$refs.tree.getCheckedNodes()[0].id,
+        exceTabId: this.$refs.tree.getCheckedNodes()[this.$refs.tree.getCheckedNodes.length - 1].id,
         tabId: this.GLExcelFrom.id,
       })
       console.log(res);
@@ -2090,9 +2097,10 @@ export default {
         })
         this.GLExcel = false
         this.GLExcelMD()
+        this.setLeftType(4, { id: this.jiedianId })
       }
     },
-    filterNode222 (GLExcelFromvalue, data) {
+    filterNode222 (GLExcelFromvalue, dataAssociationlist) {
       if (!value) return true;
       return data.name.indexOf(value) !== -1;
     },

+ 1 - 1
vue.config.js

@@ -28,7 +28,7 @@ module.exports = {
                 //本地服务接口地址
                 // target: 'http://localhost',
                 // target: 'http://192.168.4.6',
-                target: 'http://47.110.251.215',
+                target: 'http://47.110.251.215:8090',
                 // target: 'http://192.168.4.44',
                 //远程演示服务地址,可用于直接启动项目
                 //target: 'https://saber.bladex.vip/api',