duy před 2 měsíci
rodič
revize
ad90646f54
1 změnil soubory, kde provedl 31 přidání a 2 odebrání
  1. 31 2
      src/views/digital/signer.vue

+ 31 - 2
src/views/digital/signer.vue

@@ -388,6 +388,8 @@ import { log } from "@antv/g2plot/lib/utils";
                 elementTableOptions: [
                
                 ],
+                allElementTableOptions: [],
+
                 elementList:[],
                 elementList1:[],
                 elementLoading: false,
@@ -402,6 +404,7 @@ import { log } from "@antv/g2plot/lib/utils";
                     { value: '3', label: '业主方' }
                 ],
                 positionNameOptions: [],
+                allPositionNameOptions  : [],
                 positionNameLoading: false,
 
                 positionList: [],
@@ -417,7 +420,7 @@ import { log } from "@antv/g2plot/lib/utils";
             elementTableNameSelect(newVal) {
                 if (newVal) {
                     let arr=[]; 
-                    this.elementTableOptions.forEach(item => {
+                    this.allElementTableOptions.forEach(item => {
                         newVal.forEach(tableName => {
                             if (item.value === tableName) {
                               arr.push(item)
@@ -436,7 +439,7 @@ import { log } from "@antv/g2plot/lib/utils";
             positionNameSelect(newVal) {
                 if (newVal) {
                     let arr=[]; 
-                    this.positionNameOptions.forEach(item => {
+                    this.allPositionNameOptions.forEach(item => {
                         newVal.forEach(roleName => {
                             if (item.value === roleName) {
                               arr.push(item)
@@ -673,6 +676,7 @@ import { log } from "@antv/g2plot/lib/utils";
             //选择元素来源
             eleCheck(row,index,type) {
                 console.log(row,'row');
+                this.getAllElements()
                 this.eleCheckRow=row;
                 this.eleIndex=index;
                 if(type===1){
@@ -759,6 +763,19 @@ import { log } from "@antv/g2plot/lib/utils";
             changeSelect(){
               this.getElementTableOptions();
             },
+            getAllElements(){ 
+                getTableList({
+                    tableType:''
+                }).then(res => {
+            
+                    if (res.data.code == 200) {
+                        this.allElementTableOptions = res.data.data.map(item => ({
+                            value: item.id,
+                            label: item.tabChName
+                        }));
+                    }else{  this.allElementTableOptions = [];}
+                });
+            },
             //获取元素表List
             getElementTableOptions(){
                 this.loadingList = true;
@@ -896,6 +913,18 @@ import { log } from "@antv/g2plot/lib/utils";
             changePositionName() {
                 this.getPositionList();
             },
+            getAllPositionNameOptions() {
+                queryAllRoleList({
+                    type:''
+                }).then(res => {
+                    if (res.data.code == 200) {
+                        this.allPositionNameOptions = res.data.data.map(item => ({
+                            value: item.id,
+                            label: item.roleName
+                        }));
+                    }else{  this.allPositionNameOptions = [];}
+                });
+            },
             // 获取岗位列表
             getPositionList() {
                 this.positionNameLoading = true;