提交 fdf66e66 编写于 作者: zhentian.jia's avatar zhentian.jia

fix bug

上级 9bdee209
...@@ -1258,9 +1258,9 @@ export default { ...@@ -1258,9 +1258,9 @@ export default {
this.updatedOrganization == false this.updatedOrganization == false
) { ) {
this.updatedOrganization = true; this.updatedOrganization = true;
console.log('机构被更新',this.updatedOrganization); console.log("机构被更新", this.updatedOrganization);
} }
if(this.updatedOrganization == true) { if (this.updatedOrganization == true) {
this.changedOrganization[this.formOrganization.pageNum] = []; this.changedOrganization[this.formOrganization.pageNum] = [];
this.changedOrganization[ this.changedOrganization[
this.formOrganization.pageNum this.formOrganization.pageNum
...@@ -1310,13 +1310,25 @@ export default { ...@@ -1310,13 +1310,25 @@ export default {
} }
} else if (type == "organization") { } else if (type == "organization") {
if (this.checkTableState.multipleOrganization == true) { if (this.checkTableState.multipleOrganization == true) {
//机构全选 //设置机构类别0:无 1:全选 2:去掉 3:选中
kind = 1; kind = 1;
for(let key in this.changedOrganization) { for (let key in this.changedOrganization) {
if (this.changedOrganization[key][1].length > 0) {
kind = 2;
}
} }
} else { } else {
//全部不选
kind = 0;
for (let key in this.changedOrganization) {
if (this.changedOrganization[key][0].length > 0) {
kind = 3;
}
}
}
} else if (type == "department") {
if (this.multipleSelectionDepartment.length > 0) {
kind = 3;
} }
} }
return kind; return kind;
...@@ -1421,6 +1433,38 @@ export default { ...@@ -1421,6 +1433,38 @@ export default {
} }
}); });
}, },
//获取机构id列表
getScopeOrganization(type) {
let scope = "";
if (type == 2) {
for (let key in this.changedOrganization) {
let organizationItem = this.changedOrganization[key][1];
console.log("organizationItem:", organizationItem);
for (let i = 0; i < organizationItem.length; i++) {
scope += organizationItem[i].id + "|";
}
}
} else if (type == 3) {
for (let key in this.changedOrganization) {
let organizationItem = this.changedOrganization[key][0];
for (let i = 0; i < organizationItem.length; i++) {
scope += organizationItem[i].id + "|";
}
}
}
scope = scope.substring(0, scope.length - 1);
console.log("scope", scope);
return scope;
},
//获取科室列表
getScopeDepartment() {
let scope = "";
for (let i = 0; i < this.multipleSelectionDepartment.length; i++) {
scope += this.multipleSelectionDepartment[i].id + "|";
}
scope = scope.substring(0, scope.length - 1);
return scope;
},
//查询人员列表 //查询人员列表
getPeople() { getPeople() {
let req = { let req = {
...@@ -1428,18 +1472,26 @@ export default { ...@@ -1428,18 +1472,26 @@ export default {
setKindOfAdministrative: this.getKind("administrative"), setKindOfAdministrative: this.getKind("administrative"),
//scopeOfAdministrative: "000_110", //scopeOfAdministrative: "000_110",
setKindOfOrganization: this.getKind("organization"), setKindOfOrganization: this.getKind("organization"),
scopeOfOrganization: "2|3|4|5|6|7", //scopeOfOrganization: "2|3|4|5|6|7",
setKindOfDepartment: 3, setKindOfDepartment: this.getKind("department"),
scopeOfDepartment: 54, //scopeOfDepartment: 54,
pageNum: this.formPersonnel.pageNum, pageNum: this.formPersonnel.pageNum,
pageSize: this.formPersonnel.pageSize pageSize: this.formPersonnel.pageSize
}; };
if (req.setKindOfAdministrative == 3) { if (req.setKindOfAdministrative == 3) {
req.scopeOfAdministrative = this.getScope("administrative"); req.scopeOfAdministrative = this.getScope("administrative");
} }
if (req.setKindOfOrganization == 2 || req.setKindOfOrganization == 3) {
req.scopeOfOrganization = this.getScopeOrganization(
req.setKindOfOrganization
);
}
if (req.setKindOfDepartment == 3) {
req.scopeOfDepartment = this.getScopeDepartment();
}
vm.GET("scope/v1/people", req).then(res => { vm.GET("scope/v1/people", req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
console.log(res.code); console.log(res);
this.tablePerson = res.data.people; this.tablePerson = res.data.people;
this.totalPerson = res.data.total; this.totalPerson = res.data.total;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册