|
|
|
@ -35,17 +35,18 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col
|
|
|
|
|
:span="12"
|
|
|
|
|
style="padding-left: 30px;
|
|
|
|
|
style="
|
|
|
|
|
padding-left: 30px;
|
|
|
|
|
border-left: 2px solid #d1d1d1;
|
|
|
|
|
min-height: 200px;"
|
|
|
|
|
min-height: 200px;
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<div class="title-bar">
|
|
|
|
|
<div class="lefttitle">请选择</div>
|
|
|
|
|
<div class="righttitle">
|
|
|
|
|
已选择<label style="padding: 0px 3px">{{
|
|
|
|
|
deptCheckedUsers.length
|
|
|
|
|
}}</label
|
|
|
|
|
>
|
|
|
|
|
}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -88,13 +89,12 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dicOptions:[],
|
|
|
|
|
dicOptions: [],
|
|
|
|
|
loading: true,
|
|
|
|
|
queryParams: {
|
|
|
|
|
},
|
|
|
|
|
queryParams: {},
|
|
|
|
|
defaultProps: {
|
|
|
|
|
children: 'children',
|
|
|
|
|
label: 'label'
|
|
|
|
|
children: "children",
|
|
|
|
|
label: "label",
|
|
|
|
|
},
|
|
|
|
|
dialogStatus: "",
|
|
|
|
|
statusOptions: [],
|
|
|
|
@ -113,101 +113,107 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getList() {
|
|
|
|
|
let that = this;
|
|
|
|
|
this.getDicts("project_type").then((response) => {
|
|
|
|
|
getList() {
|
|
|
|
|
let that = this;
|
|
|
|
|
this.getDicts("project_type").then((response) => {
|
|
|
|
|
let dicOptionsTempProject = [];
|
|
|
|
|
response.data.forEach((o)=>{
|
|
|
|
|
response.data.forEach((o) => {
|
|
|
|
|
dicOptionsTempProject.push({
|
|
|
|
|
id: 'P'+ o.dictValue,
|
|
|
|
|
id: "P" + o.dictValue,
|
|
|
|
|
label: o.dictLabel,
|
|
|
|
|
dictType: o.dictType,
|
|
|
|
|
dictId: o.dictValue,
|
|
|
|
|
labelSrc: '项目人员',
|
|
|
|
|
labelSrc: "项目人员",
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
that.dicOptions.push({
|
|
|
|
|
id:'project',
|
|
|
|
|
label:'项目人员',
|
|
|
|
|
children:dicOptionsTempProject,
|
|
|
|
|
id: "project",
|
|
|
|
|
label: "项目人员",
|
|
|
|
|
children: dicOptionsTempProject,
|
|
|
|
|
});
|
|
|
|
|
this.getDicts("project_section_type").then((response2) => {
|
|
|
|
|
let dicOptionsTempSection = [];
|
|
|
|
|
response2.data.forEach((o)=>{
|
|
|
|
|
dicOptionsTempSection.push({
|
|
|
|
|
id: 'S'+o.dictValue,
|
|
|
|
|
label: o.dictLabel,
|
|
|
|
|
dictType: o.dictType,
|
|
|
|
|
dictId: o.dictValue,
|
|
|
|
|
labelSrc: '标段人员',
|
|
|
|
|
let dicOptionsTempSection = [];
|
|
|
|
|
response2.data.forEach((o) => {
|
|
|
|
|
dicOptionsTempSection.push({
|
|
|
|
|
id: "S" + o.dictValue,
|
|
|
|
|
label: o.dictLabel,
|
|
|
|
|
dictType: o.dictType,
|
|
|
|
|
dictId: o.dictValue,
|
|
|
|
|
labelSrc: "标段人员",
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
that.dicOptions.push({
|
|
|
|
|
id:'section',
|
|
|
|
|
label:'标段人员',
|
|
|
|
|
children:dicOptionsTempSection,
|
|
|
|
|
that.dicOptions.push({
|
|
|
|
|
id: "section",
|
|
|
|
|
label: "标段人员",
|
|
|
|
|
children: dicOptionsTempSection,
|
|
|
|
|
});
|
|
|
|
|
//加载选中
|
|
|
|
|
dicOptionsTempProject.forEach((item) => {
|
|
|
|
|
if (item.dictType == 'project_type') {
|
|
|
|
|
if (that.selectflowProcessProjectPersonTypeId.indexOf(item.dictId) >= 0) {
|
|
|
|
|
that.deptCheckedUsers.push({
|
|
|
|
|
id: 'P'+item.dictId,
|
|
|
|
|
label: item.label,
|
|
|
|
|
labelSrc: '项目人员',
|
|
|
|
|
dictType: 'project_type',
|
|
|
|
|
dictId: item.dictId
|
|
|
|
|
});
|
|
|
|
|
//加载选中
|
|
|
|
|
dicOptionsTempProject.forEach((item) => {
|
|
|
|
|
if (item.dictType == "project_type") {
|
|
|
|
|
if (
|
|
|
|
|
that.selectflowProcessProjectPersonTypeId.indexOf(
|
|
|
|
|
item.dictId
|
|
|
|
|
) >= 0
|
|
|
|
|
) {
|
|
|
|
|
that.deptCheckedUsers.push({
|
|
|
|
|
id: "P" + item.dictId,
|
|
|
|
|
label: item.label,
|
|
|
|
|
labelSrc: "项目人员",
|
|
|
|
|
dictType: "project_type",
|
|
|
|
|
dictId: item.dictId,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
dicOptionsTempSection.forEach((item) => {
|
|
|
|
|
if (item.dictType == 'project_section_type') {
|
|
|
|
|
if (that.selectflowProcessSectionPersonTypeId.indexOf(item.dictId) >= 0) {
|
|
|
|
|
that.deptCheckedUsers.push({
|
|
|
|
|
id: 'S'+item.dictId,
|
|
|
|
|
label: item.label,
|
|
|
|
|
labelSrc: '标段人员',
|
|
|
|
|
dictType: 'project_section_type',
|
|
|
|
|
dictId: item.dictId
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
dicOptionsTempSection.forEach((item) => {
|
|
|
|
|
if (item.dictType == "project_section_type") {
|
|
|
|
|
if (
|
|
|
|
|
that.selectflowProcessSectionPersonTypeId.indexOf(
|
|
|
|
|
item.dictId
|
|
|
|
|
) >= 0
|
|
|
|
|
) {
|
|
|
|
|
that.deptCheckedUsers.push({
|
|
|
|
|
id: "S" + item.dictId,
|
|
|
|
|
label: item.label,
|
|
|
|
|
labelSrc: "标段人员",
|
|
|
|
|
dictType: "project_section_type",
|
|
|
|
|
dictId: item.dictId,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
that.deptcheckedkeys = [];
|
|
|
|
|
that.deptCheckedUsers.forEach((item) => {
|
|
|
|
|
that.deptcheckedkeys.push(item.id);
|
|
|
|
|
});
|
|
|
|
|
that.$nextTick(()=>{
|
|
|
|
|
that.$refs.projecttree.setCheckedKeys(that.deptcheckedkeys,true);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
that.deptcheckedkeys = [];
|
|
|
|
|
that.deptCheckedUsers.forEach((item) => {
|
|
|
|
|
that.deptcheckedkeys.push(item.id);
|
|
|
|
|
});
|
|
|
|
|
that.$nextTick(() => {
|
|
|
|
|
that.$refs.projecttree.setCheckedKeys(that.deptcheckedkeys, true);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handleQuery() {},
|
|
|
|
|
handleDeptNodeClick(data, checkedNodes) {
|
|
|
|
|
this.deptCheckedUsers = [];
|
|
|
|
|
checkedNodes.checkedNodes.forEach((element) => {
|
|
|
|
|
var ishas = false;
|
|
|
|
|
if(element.id == 'project' || element.id == 'section'){
|
|
|
|
|
if (element.id == "project" || element.id == "section") {
|
|
|
|
|
ishas = true;
|
|
|
|
|
}
|
|
|
|
|
this.deptCheckedUsers.forEach((element2) => {
|
|
|
|
|
if (element2.id == element.id) {
|
|
|
|
|
ishas = true;
|
|
|
|
|
}
|
|
|
|
|
this.deptCheckedUsers.forEach((element2) => {
|
|
|
|
|
if (element2.id == element.id) {
|
|
|
|
|
ishas = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (!ishas) {
|
|
|
|
|
this.deptCheckedUsers.push({
|
|
|
|
|
dictId: element.dictId,
|
|
|
|
|
dictType: element.dictType,
|
|
|
|
|
id: element.id,
|
|
|
|
|
label: element.label,
|
|
|
|
|
labelSrc: element.labelSrc,
|
|
|
|
|
});
|
|
|
|
|
if (!ishas) {
|
|
|
|
|
this.deptCheckedUsers.push({
|
|
|
|
|
dictId: element.dictId,
|
|
|
|
|
dictType: element.dictType,
|
|
|
|
|
id: element.id,
|
|
|
|
|
label: element.label,
|
|
|
|
|
labelSrc: element.labelSrc
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
clearSelectList() {
|
|
|
|
@ -227,8 +233,8 @@ export default {
|
|
|
|
|
this.deptCheckedUsers.forEach((item) => {
|
|
|
|
|
this.deptcheckedkeys.push(item.id);
|
|
|
|
|
});
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
this.$refs.projecttree.setCheckedKeys(this.deptcheckedkeys,true);
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.projecttree.setCheckedKeys(this.deptcheckedkeys, true);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -372,7 +378,7 @@ export default {
|
|
|
|
|
.userlist li label {
|
|
|
|
|
float: left;
|
|
|
|
|
margin-left: 12px;
|
|
|
|
|
width: 80px;
|
|
|
|
|
width: 136px;
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|