|
@@ -254,7 +254,7 @@
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
<el-table
|
|
<el-table
|
|
-
|
|
|
|
|
|
+ v-loading="elementLoading"
|
|
v-if="selectedSourceOption === 1&&isEleView"
|
|
v-if="selectedSourceOption === 1&&isEleView"
|
|
:data="elementList1"
|
|
:data="elementList1"
|
|
border
|
|
border
|
|
@@ -283,7 +283,7 @@
|
|
<div class="bind-post-content">
|
|
<div class="bind-post-content">
|
|
<!-- 参建方分类 + 岗位名称下拉框 -->
|
|
<!-- 参建方分类 + 岗位名称下拉框 -->
|
|
<div class="dropdown-pair" v-if="!isPosView">
|
|
<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;" @change="changePositionName">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in partyCategoryOptions"
|
|
v-for="item in partyCategoryOptions"
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -291,7 +291,7 @@
|
|
:value="item.value">
|
|
:value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- <el-select v-model="positionNameSelect" filterable multiple placeholder="请输入岗位名称进行模糊检索" style="flex: 1;" @change="changePositionName" >
|
|
|
|
|
|
+ <el-select v-model="positionNameSelect" filterable multiple placeholder="请输入岗位名称进行模糊检索" style="flex: 1;" v-loading="positionNameLoading">
|
|
|
|
|
|
<el-option
|
|
<el-option
|
|
v-for="item in positionNameOptions"
|
|
v-for="item in positionNameOptions"
|
|
@@ -313,7 +313,7 @@
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
<el-table
|
|
<el-table
|
|
-
|
|
|
|
|
|
+ v-loading="bindPosLoading"
|
|
v-if="isPosView"
|
|
v-if="isPosView"
|
|
:data="positionList1"
|
|
:data="positionList1"
|
|
border
|
|
border
|
|
@@ -332,7 +332,7 @@
|
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
|
|
+ <span slot="footer" class="dialog-footer" v-if="!isPosView">
|
|
<el-button @click="positionClose">取 消</el-button>
|
|
<el-button @click="positionClose">取 消</el-button>
|
|
<el-button type="primary" @click="confirmBindPostSelection">确 定</el-button>
|
|
<el-button type="primary" @click="confirmBindPostSelection">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
@@ -390,7 +390,10 @@ import { log } from "@antv/g2plot/lib/utils";
|
|
],
|
|
],
|
|
elementList:[],
|
|
elementList:[],
|
|
elementList1:[],
|
|
elementList1:[],
|
|
|
|
+ elementLoading: false,
|
|
|
|
+
|
|
bindPostDialogVisible: false,
|
|
bindPostDialogVisible: false,
|
|
|
|
+ bindPosLoading: false,
|
|
partyCategorySelect: '', // 参建方分类选中值
|
|
partyCategorySelect: '', // 参建方分类选中值
|
|
positionNameSelect: [], // 岗位名称选中值
|
|
positionNameSelect: [], // 岗位名称选中值
|
|
partyCategoryOptions: [
|
|
partyCategoryOptions: [
|
|
@@ -399,9 +402,14 @@ import { log } from "@antv/g2plot/lib/utils";
|
|
{ value: '3', label: '业主方' }
|
|
{ value: '3', label: '业主方' }
|
|
],
|
|
],
|
|
positionNameOptions: [],
|
|
positionNameOptions: [],
|
|
|
|
+ positionNameLoading: false,
|
|
|
|
+
|
|
positionList: [],
|
|
positionList: [],
|
|
positionList1:[],
|
|
positionList1:[],
|
|
- isPosView: true, // 是否查看
|
|
|
|
|
|
+ isPosView: true, //
|
|
|
|
+ // 是否查看
|
|
|
|
+ selectedPostRow: {},
|
|
|
|
+ selectedPostIndex: 0,
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -699,11 +707,12 @@ import { log } from "@antv/g2plot/lib/utils";
|
|
},
|
|
},
|
|
//查看详情
|
|
//查看详情
|
|
getEleDetail(id,type){
|
|
getEleDetail(id,type){
|
|
|
|
+ this.elementLoading = true;
|
|
elementDetail({
|
|
elementDetail({
|
|
id
|
|
id
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- console.log(res.data,'res.dat');
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ this.elementLoading = false;
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
if(type==1){
|
|
if(type==1){
|
|
this.elementList = res.data.data;
|
|
this.elementList = res.data.data;
|
|
@@ -719,10 +728,12 @@ import { log } from "@antv/g2plot/lib/utils";
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getPosDetail(id){
|
|
getPosDetail(id){
|
|
|
|
+ this.bindPosLoading = true;
|
|
roleDetail({
|
|
roleDetail({
|
|
id
|
|
id
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- console.log(res.data,'res.dat');
|
|
|
|
|
|
+ this.bindPosLoading = false;
|
|
|
|
+
|
|
|
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.positionList1 = res.data.data;
|
|
this.positionList1 = res.data.data;
|
|
@@ -826,7 +837,6 @@ import { log } from "@antv/g2plot/lib/utils";
|
|
|
|
|
|
this.tableData1.forEach((item, index) => {
|
|
this.tableData1.forEach((item, index) => {
|
|
if (index==this.eleIndex) {
|
|
if (index==this.eleIndex) {
|
|
-
|
|
|
|
this.tableData1[index].tableType = 1;
|
|
this.tableData1[index].tableType = 1;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -858,19 +868,27 @@ import { log } from "@antv/g2plot/lib/utils";
|
|
},
|
|
},
|
|
// 打开绑定岗位弹窗
|
|
// 打开绑定岗位弹窗
|
|
selectPost(row,index,type) {
|
|
selectPost(row,index,type) {
|
|
- console.log(type,'type');
|
|
|
|
-
|
|
|
|
|
|
+ this.selectedPostIndex=index;
|
|
if(type===1){
|
|
if(type===1){
|
|
this.isPosView=true
|
|
this.isPosView=true
|
|
- this.getPosDetail(row.id)
|
|
|
|
|
|
+
|
|
|
|
+ if(row.id){
|
|
|
|
+ this.getPosDetail(row.id)
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
this.isPosView=false
|
|
this.isPosView=false
|
|
this.partyCategorySelect='1'
|
|
this.partyCategorySelect='1'
|
|
this.getPositionList();
|
|
this.getPositionList();
|
|
this.selectedPostRow = row;
|
|
this.selectedPostRow = row;
|
|
- this.positionNameSelect = [];
|
|
|
|
- this.partyCategorySelect = '';
|
|
|
|
- this.positionList = [];
|
|
|
|
|
|
+ if(row.roleIds&&row.roleIds.length>0){
|
|
|
|
+ this.positionNameSelect = row.roleIds;
|
|
|
|
+ this.partyCategorySelect=row.partyCategory
|
|
|
|
+ }else{
|
|
|
|
+ this.positionNameSelect = [];
|
|
|
|
+ this.partyCategorySelect = '';
|
|
|
|
+ this.positionList = [];
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
this.bindPostDialogVisible = true;
|
|
this.bindPostDialogVisible = true;
|
|
|
|
|
|
@@ -880,10 +898,11 @@ import { log } from "@antv/g2plot/lib/utils";
|
|
},
|
|
},
|
|
// 获取岗位列表
|
|
// 获取岗位列表
|
|
getPositionList() {
|
|
getPositionList() {
|
|
|
|
+ this.positionNameLoading = true;
|
|
queryAllRoleList({
|
|
queryAllRoleList({
|
|
type:this.partyCategorySelect
|
|
type:this.partyCategorySelect
|
|
}).then(res => {
|
|
}).then(res => {
|
|
-
|
|
|
|
|
|
+ this.positionNameLoading = false;
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.positionNameOptions = res.data.data.map(item => ({
|
|
this.positionNameOptions = res.data.data.map(item => ({
|
|
value: item.id,
|
|
value: item.id,
|
|
@@ -905,15 +924,17 @@ import { log } from "@antv/g2plot/lib/utils";
|
|
if (this.positionNameSelect.length > 0) {
|
|
if (this.positionNameSelect.length > 0) {
|
|
// 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 (this.selectedPostIndex == index) {
|
|
this.tableData1[index].roleIds =this.positionNameSelect
|
|
this.tableData1[index].roleIds =this.positionNameSelect
|
|
|
|
+ this.tableData1[index].partyCategory =this.partyCategorySelect
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}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 (this.selectedPostIndex == index) {
|
|
this.tableData1[index].roleIds =[]
|
|
this.tableData1[index].roleIds =[]
|
|
|
|
+ this.tableData1[index].partyCategory = ''
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|