|
@@ -46,7 +46,7 @@
|
|
<div class="header-btn">
|
|
<div class="header-btn">
|
|
|
|
|
|
<el-button type="primary" size="small" @click="addEleClick">新增</el-button>
|
|
<el-button type="primary" size="small" @click="addEleClick">新增</el-button>
|
|
- <el-button type="info" size="small">编辑</el-button>
|
|
|
|
|
|
+ <el-button type="info" size="small" @click="editEleClick" :disabled="checkedList.length<1">编辑</el-button>
|
|
<el-button type="success" size="small" @click="openClick(row,1)" :loading="openLoading">启用</el-button>
|
|
<el-button type="success" size="small" @click="openClick(row,1)" :loading="openLoading">启用</el-button>
|
|
<el-button type="warning" size="small" @click="openClick(row,0)" :loading="closeLoading">停用</el-button>
|
|
<el-button type="warning" size="small" @click="openClick(row,0)" :loading="closeLoading">停用</el-button>
|
|
<el-button type="danger" size="small" @click="rowDel(row)" :loading="removeLoad">删除</el-button>
|
|
<el-button type="danger" size="small" @click="rowDel(row)" :loading="removeLoad">删除</el-button>
|
|
@@ -88,7 +88,7 @@
|
|
label="绑定岗位"
|
|
label="绑定岗位"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-link type="primary" @click="eleCheck(scope.row,scope.$index,1)">查看</el-link>
|
|
|
|
|
|
+ <el-link type="primary" @click="selectPost(scope.row,scope.$index,1)">查看</el-link>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -212,13 +212,13 @@
|
|
提示:配置之后会把所有元素表该元素字段都自动配置电签岗位对应关系。
|
|
提示:配置之后会把所有元素表该元素字段都自动配置电签岗位对应关系。
|
|
</p>
|
|
</p>
|
|
<div class="source-radio-group">
|
|
<div class="source-radio-group">
|
|
- <el-radio-group v-model="selectedSourceOption">
|
|
|
|
|
|
+ <el-radio-group v-model="selectedSourceOption" :disabled="isEleView">
|
|
<el-radio :label="0">适配所有元素表</el-radio>
|
|
<el-radio :label="0">适配所有元素表</el-radio>
|
|
<el-radio :label="1">部分元素表</el-radio>
|
|
<el-radio :label="1">部分元素表</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</div>
|
|
</div>
|
|
<!-- 并行显示的下拉框 -->
|
|
<!-- 并行显示的下拉框 -->
|
|
- <div v-if="selectedSourceOption === 1" 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"
|
|
@@ -252,12 +252,13 @@
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
<el-table
|
|
<el-table
|
|
- v-else
|
|
|
|
|
|
+
|
|
|
|
+ v-if="selectedSourceOption === 1&&isEleView"
|
|
:data="elementList1"
|
|
:data="elementList1"
|
|
border
|
|
border
|
|
- style="width: 100%">
|
|
|
|
|
|
+ style="width: 100%;margin-top: 20px;">
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="label"
|
|
|
|
|
|
+ prop="name"
|
|
label="元素表名称"
|
|
label="元素表名称"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -265,7 +266,7 @@
|
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
|
|
+ <span slot="footer" class="dialog-footer" v-if="!isEleView">
|
|
<el-button @click="quitClose">取 消</el-button>
|
|
<el-button @click="quitClose">取 消</el-button>
|
|
<el-button type="primary" @click="confirmSourceSelection">确 定</el-button>
|
|
<el-button type="primary" @click="confirmSourceSelection">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
@@ -279,7 +280,7 @@
|
|
:before-close="handleBindPostClose">
|
|
:before-close="handleBindPostClose">
|
|
<div class="bind-post-content">
|
|
<div class="bind-post-content">
|
|
<!-- 参建方分类 + 岗位名称下拉框 -->
|
|
<!-- 参建方分类 + 岗位名称下拉框 -->
|
|
- <div class="dropdown-pair">
|
|
|
|
|
|
+ <div class="dropdown-pair" v-if="!isPosView">
|
|
<el-select v-model="partyCategorySelect" placeholder="请选择参建方分类" style="flex: 1; margin-right: 10px;">
|
|
<el-select v-model="partyCategorySelect" placeholder="请选择参建方分类" style="flex: 1; margin-right: 10px;">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in partyCategoryOptions"
|
|
v-for="item in partyCategoryOptions"
|
|
@@ -300,7 +301,7 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 岗位列表 -->
|
|
<!-- 岗位列表 -->
|
|
- <div class="position-list-container">
|
|
|
|
|
|
+ <div class="position-list-container" v-if="!isPosView">
|
|
<el-scrollbar > <!-- 18行 * 30px = 540px -->
|
|
<el-scrollbar > <!-- 18行 * 30px = 540px -->
|
|
<ul class="position-checkbox-list">
|
|
<ul class="position-checkbox-list">
|
|
<li v-for="(item, index) in positionList" :key="index" class="position-item">
|
|
<li v-for="(item, index) in positionList" :key="index" class="position-item">
|
|
@@ -309,6 +310,25 @@
|
|
</ul>
|
|
</ul>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-table
|
|
|
|
+
|
|
|
|
+ v-if="isPosView"
|
|
|
|
+ :data="positionList1"
|
|
|
|
+ border
|
|
|
|
+ style="width: 100%;margin-top: 20px;">
|
|
|
|
+
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="name"
|
|
|
|
+ label="所属方"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="name"
|
|
|
|
+ label="岗位名称"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ </el-table>
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="positionClose">取 消</el-button>
|
|
<el-button @click="positionClose">取 消</el-button>
|
|
@@ -319,7 +339,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import {getRoleList,getListPage,getElementList,getTableTypeList,getTableList,queryAllRoleList,submitEle,elementDetail,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";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -376,6 +396,9 @@
|
|
],
|
|
],
|
|
positionNameOptions: [],
|
|
positionNameOptions: [],
|
|
positionList: [],
|
|
positionList: [],
|
|
|
|
+ positionList1:[],
|
|
|
|
+ isPosView: true, // 是否查看
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -440,10 +463,12 @@
|
|
type: this.tabPosition,
|
|
type: this.tabPosition,
|
|
roleName: this.postText
|
|
roleName: this.postText
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
|
+ console.log(res,'res');
|
|
|
|
+
|
|
this.roleListLoading = false;
|
|
this.roleListLoading = false;
|
|
- if (res.code == 200) {
|
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
this.roleListLoading = false;
|
|
this.roleListLoading = false;
|
|
- this.roleData = res.data;
|
|
|
|
|
|
+ this.roleData = res.data.data;
|
|
}else{
|
|
}else{
|
|
this.roleData = [];
|
|
this.roleData = [];
|
|
}
|
|
}
|
|
@@ -481,6 +506,16 @@
|
|
},
|
|
},
|
|
addEleClick() {
|
|
addEleClick() {
|
|
this.addDialogVisible = true;
|
|
this.addDialogVisible = true;
|
|
|
|
+ this.tableData1=[{}]
|
|
|
|
+ },
|
|
|
|
+ editEleClick(row) {
|
|
|
|
+
|
|
|
|
+ this.addDialogVisible = true;
|
|
|
|
+ this.tableData1 = [...this.checkedList]
|
|
|
|
+ console.log( this.tableData1,' this.tableData1');
|
|
|
|
+ this.isPosView=false
|
|
|
|
+ this.isEleView=false
|
|
|
|
+
|
|
},
|
|
},
|
|
//启用
|
|
//启用
|
|
openClick(row,type){
|
|
openClick(row,type){
|
|
@@ -554,6 +589,14 @@
|
|
handleAdd(row,index) {
|
|
handleAdd(row,index) {
|
|
console.log('新增', row);
|
|
console.log('新增', row);
|
|
this.tableData1.splice(index, 0, {});
|
|
this.tableData1.splice(index, 0, {});
|
|
|
|
+ this.elementList = [];
|
|
|
|
+ this.selectedSourceOption = 1;
|
|
|
|
+ this.elementTableNameSelect = [];
|
|
|
|
+ this.elementCategorySelect = '';
|
|
|
|
+ this.positionList = [];
|
|
|
|
+ this.positionNameSelect = [];
|
|
|
|
+ this.partyCategorySelect = '';
|
|
|
|
+
|
|
|
|
|
|
// 新增操作的逻辑
|
|
// 新增操作的逻辑
|
|
},
|
|
},
|
|
@@ -586,13 +629,16 @@
|
|
async remove(ids) {
|
|
async remove(ids) {
|
|
this.removeLoad = true;
|
|
this.removeLoad = true;
|
|
removeEle(ids).then(res => {
|
|
removeEle(ids).then(res => {
|
|
|
|
+ console.log(res,'res');
|
|
|
|
+
|
|
this.removeLoad = false;
|
|
this.removeLoad = false;
|
|
- if (res.code == 200) {
|
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
this.$message({
|
|
this.$message({
|
|
type: "success",
|
|
type: "success",
|
|
message: "删除成功!",
|
|
message: "删除成功!",
|
|
});
|
|
});
|
|
this.getTableData();
|
|
this.getTableData();
|
|
|
|
+ this.getRoleData();
|
|
}
|
|
}
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
this.removeLoad = false;
|
|
this.removeLoad = false;
|
|
@@ -618,7 +664,10 @@
|
|
this.isEleView = false;
|
|
this.isEleView = false;
|
|
this.eleCheckRow = row;
|
|
this.eleCheckRow = row;
|
|
this.eleIndex=index
|
|
this.eleIndex=index
|
|
- this.selectedSourceOption=0
|
|
|
|
|
|
+ this.selectedSourceOption=row.tableType
|
|
|
|
+ if(row.id){
|
|
|
|
+ this.getEleDetail(row.id,1)
|
|
|
|
+ }
|
|
|
|
|
|
this.getElementCategoryOptions();
|
|
this.getElementCategoryOptions();
|
|
|
|
|
|
@@ -629,14 +678,36 @@
|
|
|
|
|
|
},
|
|
},
|
|
//查看详情
|
|
//查看详情
|
|
- getEleDetail(id){
|
|
|
|
|
|
+ getEleDetail(id,type){
|
|
elementDetail({
|
|
elementDetail({
|
|
id
|
|
id
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- if (res.code == 200) {
|
|
|
|
- this.elementList1 = res.data;
|
|
|
|
|
|
+ console.log(res.data,'res.dat');
|
|
|
|
+
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ if(type==1){
|
|
|
|
+ this.elementList = res.data.data;
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ this.elementList1 = res.data.data;
|
|
|
|
+ }
|
|
|
|
+
|
|
}else{
|
|
}else{
|
|
this.elementList1 = [];
|
|
this.elementList1 = [];
|
|
|
|
+ this.elementList = [];
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getPosDetail(id){
|
|
|
|
+ roleDetail({
|
|
|
|
+ id
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log(res.data,'res.dat');
|
|
|
|
+
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.positionList1 = res.data.data;
|
|
|
|
+ }else{
|
|
|
|
+ this.positionList1 = [];
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -715,7 +786,7 @@
|
|
},
|
|
},
|
|
// 确认按钮点击事件
|
|
// 确认按钮点击事件
|
|
confirmSourceSelection() {
|
|
confirmSourceSelection() {
|
|
- if (this.selectedSourceOption === 1) {
|
|
|
|
|
|
+ if (this.selectedSourceOption === 0) {
|
|
// 处理适配所有元素表的逻辑
|
|
// 处理适配所有元素表的逻辑
|
|
console.log("适配所有元素表");
|
|
console.log("适配所有元素表");
|
|
// this.eleCheckRow.tableType = 1;
|
|
// this.eleCheckRow.tableType = 1;
|
|
@@ -739,7 +810,7 @@
|
|
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 (item.id === this.eleCheckRow.id) {
|
|
- this.tableData1[index].tableIds = this.elementTableNameSelect.join(',');
|
|
|
|
|
|
+ this.tableData1[index].tableIds = this.elementTableNameSelect
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}else{
|
|
}else{
|
|
@@ -759,14 +830,23 @@
|
|
this.sourceDialogVisible = false;
|
|
this.sourceDialogVisible = false;
|
|
},
|
|
},
|
|
// 打开绑定岗位弹窗
|
|
// 打开绑定岗位弹窗
|
|
- selectPost(row) {
|
|
|
|
|
|
+ selectPost(row,index,type) {
|
|
|
|
+ console.log(type,'type');
|
|
|
|
+
|
|
|
|
+ if(type===1){
|
|
|
|
+ this.isPosView=true
|
|
|
|
+ this.getPosDetail(row.id)
|
|
|
|
+ }else{
|
|
|
|
+ this.isPosView=false
|
|
|
|
+ this.partyCategorySelect='1'
|
|
|
|
+ this.getPositionList();
|
|
|
|
+ this.selectedPostRow = row;
|
|
|
|
+ this.positionNameSelect = [];
|
|
|
|
+ this.partyCategorySelect = '';
|
|
|
|
+ this.positionList = [];
|
|
|
|
+ }
|
|
this.bindPostDialogVisible = true;
|
|
this.bindPostDialogVisible = true;
|
|
- this.partyCategorySelect='1'
|
|
|
|
- this.getPositionList();
|
|
|
|
- this.selectedPostRow = row;
|
|
|
|
- this.positionNameSelect = [];
|
|
|
|
- this.partyCategorySelect = '';
|
|
|
|
- this.positionList = [];
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
changePositionName() {
|
|
changePositionName() {
|
|
this.getPositionList();
|
|
this.getPositionList();
|
|
@@ -799,14 +879,14 @@
|
|
// this.selectedPostRow.roleIds = this.positionNameSelect.join(',');
|
|
// this.selectedPostRow.roleIds = this.positionNameSelect.join(',');
|
|
this.tableData1.forEach((item, index) => {
|
|
this.tableData1.forEach((item, index) => {
|
|
if (item.id === this.selectedPostRow.id) {
|
|
if (item.id === this.selectedPostRow.id) {
|
|
- this.tableData1[index].roleIds =this.positionNameSelect.join(',');
|
|
|
|
|
|
+ this.tableData1[index].roleIds =this.positionNameSelect
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}else{
|
|
}else{
|
|
// this.selectedPostRow.roleIds = '';
|
|
// this.selectedPostRow.roleIds = '';
|
|
this.tableData1.forEach((item, index) => {
|
|
this.tableData1.forEach((item, index) => {
|
|
if (item.id === this.selectedPostRow.id) {
|
|
if (item.id === this.selectedPostRow.id) {
|
|
- this.tableData1[index].roleIds =''
|
|
|
|
|
|
+ this.tableData1[index].roleIds =[]
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -821,6 +901,9 @@
|
|
).then((res) => {
|
|
).then((res) => {
|
|
if(res.data.code==200){
|
|
if(res.data.code==200){
|
|
this.$message.success(res.data.msg)
|
|
this.$message.success(res.data.msg)
|
|
|
|
+ this.getTableData();
|
|
|
|
+ this.getRoleData();
|
|
|
|
+ this.addDialogVisible=false
|
|
}else{
|
|
}else{
|
|
this.$message.error(res.data.msg)
|
|
this.$message.error(res.data.msg)
|
|
}
|
|
}
|
|
@@ -850,7 +933,7 @@
|
|
.post-list{
|
|
.post-list{
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
height: calc(100% - 110px);
|
|
height: calc(100% - 110px);
|
|
- border: 1px solid red;
|
|
|
|
|
|
+ // border: 1px solid red;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|