|
@@ -63,7 +63,7 @@
|
|
<el-table class="table-box" border :data="addForm.memberList">
|
|
<el-table class="table-box" border :data="addForm.memberList">
|
|
<el-table-column label="序号" prop="name" width="50" type="index" show-overflow-tooltip/>
|
|
<el-table-column label="序号" prop="name" width="50" type="index" show-overflow-tooltip/>
|
|
<el-table-column label="姓名" prop="userName" show-overflow-tooltip/>
|
|
<el-table-column label="姓名" prop="userName" show-overflow-tooltip/>
|
|
- <el-table-column label="联系电话" prop="userPhone" width="230" show-overflow-tooltip/>
|
|
|
|
|
|
+ <el-table-column label="联系电话" prop="mobile" width="230" show-overflow-tooltip/>
|
|
<el-table-column label="所属部门" prop="deptName" width="470" show-overflow-tooltip/>
|
|
<el-table-column label="所属部门" prop="deptName" width="470" show-overflow-tooltip/>
|
|
<el-table-column label="状态" prop="isStart" width="200" show-overflow-tooltip>
|
|
<el-table-column label="状态" prop="isStart" width="200" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -84,7 +84,7 @@
|
|
<div class="table-button-box">
|
|
<div class="table-button-box">
|
|
<p class="table-button-null"></p>
|
|
<p class="table-button-null"></p>
|
|
<p class="table-button-p"
|
|
<p class="table-button-p"
|
|
- @click="tableButton(3,scope.row)"
|
|
|
|
|
|
+ @click="tableButton(3,scope.$index)"
|
|
>删除</p>
|
|
>删除</p>
|
|
<p class="table-button-null"></p>
|
|
<p class="table-button-null"></p>
|
|
</div>
|
|
</div>
|
|
@@ -111,7 +111,7 @@
|
|
//import { getInfo } from "@/api/basicsModules/index";
|
|
//import { getInfo } from "@/api/basicsModules/index";
|
|
|
|
|
|
import { systemTopicDetail,systemTopicAdd,systemTopicEdit } from "@/api/integratedManagement/index";
|
|
import { systemTopicDetail,systemTopicAdd,systemTopicEdit } from "@/api/integratedManagement/index";
|
|
- import { systemUserSelectUser } from "@/api/commonality/permission";
|
|
|
|
|
|
+ import { systemUserSelectUser,systemUserSelectByPage } from "@/api/commonality/permission";
|
|
import userDialog from "./userDialog.vue";
|
|
import userDialog from "./userDialog.vue";
|
|
export default {
|
|
export default {
|
|
name: 'addPage',
|
|
name: 'addPage',
|
|
@@ -126,7 +126,8 @@
|
|
optionsUser:[],
|
|
optionsUser:[],
|
|
addForm:{
|
|
addForm:{
|
|
topicName:'',
|
|
topicName:'',
|
|
- isStart:'',
|
|
|
|
|
|
+ isStart:true,
|
|
|
|
+ account:'',
|
|
userId:'',
|
|
userId:'',
|
|
userName:'',
|
|
userName:'',
|
|
userPhone:'',
|
|
userPhone:'',
|
|
@@ -183,13 +184,18 @@
|
|
systemTopicDetail(){
|
|
systemTopicDetail(){
|
|
systemTopicDetail({id:this.propsData.id}).then(response => {
|
|
systemTopicDetail({id:this.propsData.id}).then(response => {
|
|
let obj = response.data.topic;
|
|
let obj = response.data.topic;
|
|
- obj.memberList = response.data.memberList;
|
|
|
|
|
|
+ // obj.memberList = response.data.memberList;
|
|
this.userSelectList(obj.userName);
|
|
this.userSelectList(obj.userName);
|
|
this.$set(this,'addForm',obj);
|
|
this.$set(this,'addForm',obj);
|
|
|
|
+ let list = [];
|
|
|
|
+ for(let i=0;i<response.data.memberList.length;i++){
|
|
|
|
+ list.push(response.data.memberList[i].userId)
|
|
|
|
+ }
|
|
|
|
+ this.systemUserSelectByPage(list,response.data.memberList)
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//操作按钮
|
|
//操作按钮
|
|
- tableButton(type){
|
|
|
|
|
|
+ tableButton(type,index){
|
|
let self = this;
|
|
let self = this;
|
|
if(type == 1){
|
|
if(type == 1){
|
|
//新增
|
|
//新增
|
|
@@ -201,6 +207,14 @@
|
|
this.$refs['userDialog'].userDialogOpen();
|
|
this.$refs['userDialog'].userDialogOpen();
|
|
}else if(type == 3){
|
|
}else if(type == 3){
|
|
//删除
|
|
//删除
|
|
|
|
+ this.$confirm('是否确认删除?', "警告", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(function() {
|
|
|
|
+ }).then(() => {
|
|
|
|
+ self.addForm.memberList.splice(index,1)
|
|
|
|
+ }).catch(() => {});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
@@ -231,6 +245,7 @@
|
|
for(let i=0;i<self.optionsUser.length;i++){
|
|
for(let i=0;i<self.optionsUser.length;i++){
|
|
if(val == self.optionsUser[i].userId){
|
|
if(val == self.optionsUser[i].userId){
|
|
this.$set(this.addForm,'userId',self.optionsUser[i].userId);
|
|
this.$set(this.addForm,'userId',self.optionsUser[i].userId);
|
|
|
|
+ this.$set(this.addForm,'account',self.optionsUser[i].account);
|
|
this.$set(this.addForm,'userName',self.optionsUser[i].userName);
|
|
this.$set(this.addForm,'userName',self.optionsUser[i].userName);
|
|
this.$set(this.addForm,'deptId',self.optionsUser[i].deptId);
|
|
this.$set(this.addForm,'deptId',self.optionsUser[i].deptId);
|
|
this.$set(this.addForm,'deptName',self.optionsUser[i].deptName);
|
|
this.$set(this.addForm,'deptName',self.optionsUser[i].deptName);
|
|
@@ -261,8 +276,39 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//接受选中人员
|
|
//接受选中人员
|
|
- setUserList(list){
|
|
|
|
- this.$set(this.addForm,'memberList',list);
|
|
|
|
|
|
+ setUserList(list,dataList){
|
|
|
|
+ let self = this;
|
|
|
|
+ let newList = [];
|
|
|
|
+ for(let o=0;o<dataList.length;o++){
|
|
|
|
+ let num = 0;
|
|
|
|
+ for(let i=0;i<self.addForm.memberList.length;i++){
|
|
|
|
+ if(self.addForm.memberList[i].userId == dataList[o].userId){
|
|
|
|
+ newList.push(self.addForm.memberList[i]);
|
|
|
|
+ num++
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(num == 0){
|
|
|
|
+ newList.push(dataList[o]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.systemUserSelectByPage(list,newList);
|
|
|
|
+ },
|
|
|
|
+ //处理人员数据
|
|
|
|
+ userDataSet(list,dataList){
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ //获取人员列表
|
|
|
|
+ systemUserSelectByPage(list,dataList){
|
|
|
|
+ systemUserSelectByPage({userIds:list[0]?list:['-999999999999999999'],pageSize:100}).then(response => {
|
|
|
|
+ for(let i=0;i<response.data.records.length;i++){
|
|
|
|
+ for(let o=0;o<dataList.length;o++){
|
|
|
|
+ if(response.data.records[i].userId == dataList[o].userId){
|
|
|
|
+ response.data.records[i].isStart = dataList[o].isStart;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$set(this.addForm,'memberList',response.data.records);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|