|
@@ -185,10 +185,10 @@
|
|
width="100"
|
|
width="100"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" @click="handleAdd(scope.row,$index)">
|
|
|
|
|
|
+ <el-button type="text" @click="handleAdd(scope.row,scope.$index)">
|
|
<i class="el-icon-circle-plus-outline" style="font-size: 20px;color:#67C23A"></i>
|
|
<i class="el-icon-circle-plus-outline" style="font-size: 20px;color:#67C23A"></i>
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button type="text" @click="handleDelete(scope.row,$index)">
|
|
|
|
|
|
+ <el-button type="text" @click="handleDelete(scope.row,row,scope.$index)">
|
|
<i class="el-icon-remove-outline" style="font-size: 20px;color:red"></i>
|
|
<i class="el-icon-remove-outline" style="font-size: 20px;color:red"></i>
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -203,6 +203,7 @@
|
|
<!-- 选择元素来源 -->
|
|
<!-- 选择元素来源 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
append-to-body
|
|
append-to-body
|
|
|
|
+
|
|
title="选择元素来源"
|
|
title="选择元素来源"
|
|
:visible.sync="sourceDialogVisible"
|
|
:visible.sync="sourceDialogVisible"
|
|
width="50%"
|
|
width="50%"
|
|
@@ -219,7 +220,7 @@
|
|
</div>
|
|
</div>
|
|
<!-- 并行显示的下拉框 -->
|
|
<!-- 并行显示的下拉框 -->
|
|
<div v-if="selectedSourceOption === 1&&!isEleView" class="dropdown-container">
|
|
<div v-if="selectedSourceOption === 1&&!isEleView" class="dropdown-container">
|
|
- <el-select v-model="elementCategorySelect" placeholder="请选择表分类" style="flex: 1; margin-right: 10px;" clearable @change="changeSelect" >
|
|
|
|
|
|
+ <el-select v-model="elementCategorySelect" placeholder="请选择表分类" style="flex: 1; margin-right: 10px;" clearable @change="changeSelect" >
|
|
<el-option
|
|
<el-option
|
|
v-for="item in elementCategoryOptions"
|
|
v-for="item in elementCategoryOptions"
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -228,6 +229,7 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<el-select
|
|
<el-select
|
|
|
|
+ v-loading="loadingList"
|
|
v-model="elementTableNameSelect"
|
|
v-model="elementTableNameSelect"
|
|
placeholder="请输入元素表名称进行模糊检索"
|
|
placeholder="请输入元素表名称进行模糊检索"
|
|
style="flex: 1;"
|
|
style="flex: 1;"
|
|
@@ -267,7 +269,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer" v-if="!isEleView">
|
|
<span slot="footer" class="dialog-footer" v-if="!isEleView">
|
|
- <el-button @click="quitClose">取 消</el-button>
|
|
|
|
|
|
+
|
|
<el-button type="primary" @click="confirmSourceSelection">确 定</el-button>
|
|
<el-button type="primary" @click="confirmSourceSelection">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -341,6 +343,7 @@
|
|
<script>
|
|
<script>
|
|
import {getRoleList,getListPage,getElementList,getTableTypeList,getTableList,queryAllRoleList,submitEle,elementDetail,roleDetail,removeEle,updateStatusEle} from "@/api/sigital/signer.js";
|
|
import {getRoleList,getListPage,getElementList,getTableTypeList,getTableList,queryAllRoleList,submitEle,elementDetail,roleDetail,removeEle,updateStatusEle} from "@/api/sigital/signer.js";
|
|
import { getDictionary } from "@/api/system/dict";
|
|
import { getDictionary } from "@/api/system/dict";
|
|
|
|
+import { log } from "@antv/g2plot/lib/utils";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -377,6 +380,7 @@
|
|
eleIndex: 0,
|
|
eleIndex: 0,
|
|
selectedSourceOption: 1, // 默认选中 "适配所有元素表"
|
|
selectedSourceOption: 1, // 默认选中 "适配所有元素表"
|
|
elementCategorySelect: '', // 元素分类表分类选中值
|
|
elementCategorySelect: '', // 元素分类表分类选中值
|
|
|
|
+ loadingList: false,
|
|
elementTableNameSelect: [], // 元素表名称筛选选中值
|
|
elementTableNameSelect: [], // 元素表名称筛选选中值
|
|
elementCategoryOptions: [
|
|
elementCategoryOptions: [
|
|
|
|
|
|
@@ -476,15 +480,19 @@
|
|
},
|
|
},
|
|
positionClick(event, item){
|
|
positionClick(event, item){
|
|
this.selectedItem = item;
|
|
this.selectedItem = item;
|
|
|
|
+ this.getTableData();
|
|
|
|
+
|
|
},
|
|
},
|
|
getTableData() {
|
|
getTableData() {
|
|
|
|
+
|
|
|
|
+
|
|
this.$refs.multipleTable.clearSelection();
|
|
this.$refs.multipleTable.clearSelection();
|
|
this.tableLoading = true;
|
|
this.tableLoading = true;
|
|
getListPage({
|
|
getListPage({
|
|
size: this.pageSize,
|
|
size: this.pageSize,
|
|
current: this.currentPage,
|
|
current: this.currentPage,
|
|
keyword: this.postText,
|
|
keyword: this.postText,
|
|
- id: this.selectedItem.id||'',
|
|
|
|
|
|
+ roleId: this.selectedItem.roleId||''
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.tableLoading = false;
|
|
this.tableLoading = false;
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
@@ -588,14 +596,14 @@
|
|
},
|
|
},
|
|
handleAdd(row,index) {
|
|
handleAdd(row,index) {
|
|
console.log('新增', row);
|
|
console.log('新增', row);
|
|
- this.tableData1.splice(index, 0, {});
|
|
|
|
- this.elementList = [];
|
|
|
|
- this.selectedSourceOption = 1;
|
|
|
|
- this.elementTableNameSelect = [];
|
|
|
|
- this.elementCategorySelect = '';
|
|
|
|
- this.positionList = [];
|
|
|
|
- this.positionNameSelect = [];
|
|
|
|
- this.partyCategorySelect = '';
|
|
|
|
|
|
+ this.tableData1.splice(index + 1, 0, {});
|
|
|
|
+ // this.elementList = [];
|
|
|
|
+ // this.selectedSourceOption = 1;
|
|
|
|
+ // this.elementTableNameSelect = [];
|
|
|
|
+ // this.elementCategorySelect = '';
|
|
|
|
+ // this.positionList = [];
|
|
|
|
+ // this.positionNameSelect = [];
|
|
|
|
+ // this.partyCategorySelect = '';
|
|
|
|
|
|
|
|
|
|
// 新增操作的逻辑
|
|
// 新增操作的逻辑
|
|
@@ -656,17 +664,29 @@
|
|
},
|
|
},
|
|
//选择元素来源
|
|
//选择元素来源
|
|
eleCheck(row,index,type) {
|
|
eleCheck(row,index,type) {
|
|
|
|
+ console.log(row,'row');
|
|
|
|
+ this.eleCheckRow=row;
|
|
|
|
+ this.eleIndex=index;
|
|
if(type===1){
|
|
if(type===1){
|
|
this.isEleView = true;
|
|
this.isEleView = true;
|
|
this.getEleDetail(row.id)
|
|
this.getEleDetail(row.id)
|
|
this.selectedSourceOption=row.tableType
|
|
this.selectedSourceOption=row.tableType
|
|
}else{
|
|
}else{
|
|
this.isEleView = false;
|
|
this.isEleView = false;
|
|
- this.eleCheckRow = row;
|
|
|
|
- this.eleIndex=index
|
|
|
|
|
|
+
|
|
this.selectedSourceOption=row.tableType
|
|
this.selectedSourceOption=row.tableType
|
|
|
|
+
|
|
if(row.id){
|
|
if(row.id){
|
|
this.getEleDetail(row.id,1)
|
|
this.getEleDetail(row.id,1)
|
|
|
|
+ }else{
|
|
|
|
+ console.log(row,'222');
|
|
|
|
+
|
|
|
|
+ this.elementCategorySelect=row.eleType
|
|
|
|
+ this.changeSelect(row.eleType)
|
|
|
|
+ this.elementTableNameSelect=row.tableIds
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
this.getElementCategoryOptions();
|
|
this.getElementCategoryOptions();
|
|
@@ -730,11 +750,11 @@
|
|
},
|
|
},
|
|
//获取元素表List
|
|
//获取元素表List
|
|
getElementTableOptions(){
|
|
getElementTableOptions(){
|
|
|
|
+ this.loadingList = true;
|
|
getTableList({
|
|
getTableList({
|
|
-
|
|
|
|
tableType:this.elementCategorySelect
|
|
tableType:this.elementCategorySelect
|
|
}).then(res => {
|
|
}).then(res => {
|
|
-
|
|
|
|
|
|
+ this.loadingList = false;
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.elementTableOptions = res.data.data.map(item => ({
|
|
this.elementTableOptions = res.data.data.map(item => ({
|
|
value: item.id,
|
|
value: item.id,
|
|
@@ -786,13 +806,15 @@
|
|
},
|
|
},
|
|
// 确认按钮点击事件
|
|
// 确认按钮点击事件
|
|
confirmSourceSelection() {
|
|
confirmSourceSelection() {
|
|
|
|
+ console.log(this.eleIndex,'eleIndex');
|
|
|
|
+
|
|
if (this.selectedSourceOption === 0) {
|
|
if (this.selectedSourceOption === 0) {
|
|
// 处理适配所有元素表的逻辑
|
|
// 处理适配所有元素表的逻辑
|
|
console.log("适配所有元素表");
|
|
console.log("适配所有元素表");
|
|
// this.eleCheckRow.tableType = 1;
|
|
// this.eleCheckRow.tableType = 1;
|
|
this.tableData1.forEach((item, index) => {
|
|
this.tableData1.forEach((item, index) => {
|
|
if (item.id === this.eleCheckRow.id) {
|
|
if (item.id === this.eleCheckRow.id) {
|
|
- this.tableData1[index].tableType = 1;
|
|
|
|
|
|
+ this.tableData1[index].tableType = 0;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
@@ -800,23 +822,28 @@
|
|
|
|
|
|
} else {
|
|
} else {
|
|
// 处理适配部分元素表的逻辑
|
|
// 处理适配部分元素表的逻辑
|
|
- console.log("适配部分元素表");
|
|
|
|
- // this.eleCheckRow.tableType = 2
|
|
|
|
|
|
+
|
|
|
|
+
|
|
this.tableData1.forEach((item, index) => {
|
|
this.tableData1.forEach((item, index) => {
|
|
- if (item.id === this.eleCheckRow.id) {
|
|
|
|
- this.tableData1[index].tableType = 2;
|
|
|
|
|
|
+ if (index==this.eleIndex) {
|
|
|
|
+
|
|
|
|
+ this.tableData1[index].tableType = 1;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if (this.elementTableNameSelect.length > 0) {
|
|
if (this.elementTableNameSelect.length > 0) {
|
|
this.tableData1.forEach((item, index) => {
|
|
this.tableData1.forEach((item, index) => {
|
|
- if (item.id === this.eleCheckRow.id) {
|
|
|
|
|
|
+ if (index==this.eleIndex) {
|
|
this.tableData1[index].tableIds = this.elementTableNameSelect
|
|
this.tableData1[index].tableIds = this.elementTableNameSelect
|
|
|
|
+ this.tableData1[index].eleType = this.elementCategorySelect;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}else{
|
|
}else{
|
|
this.tableData1.forEach((item, index) => {
|
|
this.tableData1.forEach((item, index) => {
|
|
- if (item.id === this.eleCheckRow.id) {
|
|
|
|
|
|
+ if (index==this.eleIndex) {
|
|
this.tableData1[index].tableIds ='';
|
|
this.tableData1[index].tableIds ='';
|
|
|
|
+ this.tableData1[index].eleType=''
|
|
|
|
+ this.elementList1 = [];
|
|
|
|
+ this.elementList = [];
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|