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

流程全部走通

上级 69f0c762
......@@ -83,7 +83,15 @@ export function inOrganization(list,id) {
}
return flag;
}
export function initTags(value) {
let tags = [];
for (let j = 0; j < value.length; j++) {
let tagsComponent = {};
tagsComponent.value = value.value;
tagsComponent[j].name = this.optionsComponent[j].label;
}
return tags;
}
//机构列表
export function getOrganizationList(data) {
let list = [];
......@@ -114,7 +122,7 @@ export function getHospitalList(data) {
}
list.push(obj);
}
console.log(list);
//console.log(list);
return list;
}
......
......@@ -299,7 +299,7 @@
<el-table-column
type="selection"
width="55"
:selectable="selectableOrganization"
:selectable="selectableTableList"
:reserve-selection="true"
></el-table-column>
<el-table-column prop="name" label="医院名称" min-width="100" align="center"></el-table-column>
......@@ -338,7 +338,11 @@
style="width: 100%"
@selection-change="selectionChangeDepartment"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column
type="selection"
width="55"
:selectable="selectableTableList"
></el-table-column>
<el-table-column prop="name" label="科室名称" align="center"></el-table-column>
<div slot="empty">
<div class="table-empty">
......@@ -401,7 +405,12 @@
@selection-change="selectionChangePerson"
:row-key="getRowKeysPerson"
>
<el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
<el-table-column
type="selection"
width="55"
:reserve-selection="true"
:selectable="selectableTableList"
></el-table-column>
<el-table-column prop="name" label="人员名称" align="center"></el-table-column>
<el-table-column prop="hospitalName" label="所属医院" align="center"></el-table-column>
<el-table-column prop="departmentName" label="所属科室" align="center"></el-table-column>
......@@ -631,7 +640,7 @@ export default {
},
formPerson: {
hospitalId: 0,
departmentId: 0,
departmentId: -1,
name: "",
pageNum: 1,
pageSize: 10
......@@ -644,7 +653,9 @@ export default {
pageSizePerson: 2,
totalPerson: 10,
updatedPerson: false,
lookedPerson: [],
changedPerson: [],
changedPerson2: [],
//记录上次
scopeOfOrganizationLast: [],
scopeOfPeopleLast: [],
......@@ -732,9 +743,10 @@ export default {
vm = this;
(this.projectId = vm.getUrlSearch(window.location.href, "projectId")),
(this.peopleLevel = vm.getUrlSearch(window.location.href, "level"));
this.editManager();
this.changeOnStep(this.active);
this.getComponentInfo();
this.editManager();
this.idTypeValue = vm.idType;
//console.log('this.idType:'+vm.idType);
if (vm.idType == 2) {
......@@ -743,6 +755,7 @@ export default {
this.$nextTick(function() {
//this.getDepartment();
//this.idTypeValue = 2;
//this.editManager();
});
},
// 挂载到Dom完成时
......@@ -816,7 +829,7 @@ export default {
componentEdit.push(editData.componentData[i].relevanceId);
}
this.formComponent.component = componentEdit;
this.changeValue(componentEdit);
this.initTags(componentEdit);
if (editData.certificateData.length > 0) {
this.formComponent.configure = 1;
this.formComponent.certificate =
......@@ -1144,6 +1157,7 @@ export default {
}
}
} else if (this.active == 1) {
//进入第三步
if (this.idType == 1) {
//内部管理员
if (this.tagsRegion.length > 0 || this.idTypeProject == 2) {
......@@ -1176,6 +1190,7 @@ export default {
if (req.setKindOfPeople == 2 || req.setKindOfPeople == 3) {
req.scopeOfPeople = this.getScopePeople(req.setKindOfPeople);
}
openLoading(vm);
vm.POST("portal/scope", req).then(res => {
closeLoading(vm);
......@@ -1442,6 +1457,7 @@ export default {
//设定人员
this.getHospital();
this.departmentList = this.getDepartmentList();
//console.log('departmentList',this.departmentList);
this.getPeople();
}
},
......@@ -1664,7 +1680,7 @@ export default {
}
});
},
selectableOrganization(row, index) {
selectableTableList(row, index) {
if (this.projectStatus == 4) {
if (row.status == 1) {
//console.log("scopeReq",this.scopeReq);
......@@ -1704,6 +1720,7 @@ export default {
//改变人员 table的check状态
selectionChangePerson(rows) {
this.changedPerson = [];
this.changedPerson2 = [];
if (rows) {
rows.forEach(row => {
if (row) {
......@@ -1711,11 +1728,19 @@ export default {
}
});
}
console.log(this.changedPerson);
this.changedPerson2 = operationData.getDifference(
this.lookedPerson,
this.changedPerson
);
console.log(
"选",
this.changedPerson,
"没",
this.changedPerson2
);
},
//设定机构table全选
checkAll(flag, name) {
//console.log(flag + " " + name);
if (name == "multipleOrganization") {
//机构全选
let checkItem = this.checkTableState[name];
......@@ -1751,32 +1776,54 @@ export default {
} else if (name == "multiplePerson") {
//人员全选
if (flag === true) {
let checkItem = this.checkTableState[name];
if (checkItem !== true) {
let idList = operationData.getIdList(this.tablePerson);
//console.log('idList',idList,'changedPerson',this.changedPerson);
let difference = operationData.getDifference(
idList,
this.changedPerson
);
//console.log('difference',difference);
if (difference.length > 0) {
this.$refs[name].toggleAllSelection();
this.checkTableState[name] = true;
}
this.checkTableState[name] = true;
this.changedPerson2 = [];
this.changedPerson = operationData.getDifference(
this.lookedPerson,
this.changedPerson2
);
} else {
this.$refs[name].clearSelection();
this.checkTableState[name] = false;
this.changedPerson = [];
this.changedPerson2 = operationData.getDifference(
this.lookedPerson,
this.changedPerson
);
}
//置空
this.changedPerson = [];
}
},
//获取用户类型
getKind(type) {
let kind = 0;
let kind = 3;
if (type == "administrative") {
kind = 3;
if (this.updatedTree == true) {
kind = 3;
}
if(this.idType === 2) {
return 0;
}
} else if (type == "administrativeScope") {
kind = 3;
if (this.tagsRegion.length > 0) {
kind = 3;
}
if(this.idType === 2) {
return 0;
}
} else if (type == "organization") {
//设置机构类别0:无 1:全选 2:去掉 3:选中
if (this.checkTableState.multipleOrganization === false) {
......@@ -1920,6 +1967,7 @@ export default {
//console.log(res.data);
this.tableOrganization = res.data.organizationList;
this.totalOrganization = res.data.total;
//console.log("changedOrganization", this.changedOrganization);
let idList = operationData.getIdList(this.tableOrganization);
let intersect = operationData.getIntersect(
......@@ -1982,7 +2030,6 @@ export default {
//console.log('differenceScope',differenceScope);
let unionScope = operationData.getUnion(this.changedOrganization2,differenceScope);
//console.log('unionScope',unionScope);
// debugger;
for (let i = 0; i < unionScope.length; i++) {
scope += unionScope[i] + "|";
}
......@@ -2002,14 +2049,22 @@ export default {
let scope = "";
//2:去掉 3:选中
if (type == 2) {
for (let i = 0; i < this.changedPerson2.length; i++) {
scope += this.changedPerson2[i] + "|";
let differenceScope = operationData.getDifference(this.scopeOfPeopleLast,this.changedPerson);
//console.log('differenceScope',differenceScope);
let unionScope = operationData.getUnion(this.changedPerson2,differenceScope);
for (let i = 0; i < unionScope.length; i++) {
scope += unionScope[i] + "|";
}
} else if (type == 3) {
for (let i = 0; i < this.changedPerson.length; i++) {
scope += this.changedPerson[i] + "|";
//console.log(this.changedPerson2,this.scopeOfPeople);
let differenceScope = operationData.getDifference(this.scopeOfPeopleLast,this.changedPerson2);
let unionScope = operationData.getUnion(this.changedPerson,differenceScope);
// debugger;
for (let i = 0; i < unionScope.length; i++) {
scope += unionScope[i] + "|";
}
}
scope = scope.substring(0, scope.length - 1);
console.log("scope people", scope);
return scope;
......@@ -2064,8 +2119,8 @@ export default {
searchPeople() {
let searchForm = this.formPerson;
if (
searchForm.hospitalId == "0" &&
searchForm.departmentId == "0" &&
searchForm.hospitalId === 0 &&
searchForm.departmentId === -1 &&
searchForm.name == ""
) {
this.getPeople();
......@@ -2106,7 +2161,7 @@ export default {
closeLoading(vm);
console.log(res);
if (res.code == "000000") {
this.tablePerson = res.data.organizationList;
this.tablePerson = res.data.people;
this.totalPerson = res.data.total;
}
});
......@@ -2148,8 +2203,28 @@ export default {
idList,
this.changedPerson
);
if (intersect.length == 0) {
this.initPeopleStatus();
this.lookedPerson = operationData.getUnion(
this.lookedPerson,
idList
);
this.changedPerson2 = operationData.getDifference(
this.lookedPerson,
this.changedPerson
);
//console.log('全部看过的:',this.lookedPerson);
if (vm.checkTableState.multiplePerson === "") {
if (intersect.length == 0) {
this.initPeopleStatus();
}
} else if (vm.checkTableState.multiplePerson === true) {
let intersect2 = operationData.getIntersect(
idList,
this.changedPerson
);
// console.log('intersect2',intersect2);
if (intersect2.length == 0) {
this.$refs.multiplePerson.toggleAllSelection();
}
}
}
});
......@@ -2158,13 +2233,13 @@ export default {
getDepartmentList() {
let list = [];
list[0] = {
value: 0,
value: -1,
label: '全部',
};
for (let i = 0; i < this.tableDepartment.length; i++) {
if (this.tableDepartment[i].status == 1) {
let obj = {
id: this.tableDepartment[i].id,
value: this.tableDepartment[i].id,
label: this.tableDepartment[i].name
};
list.push(obj);
......@@ -2222,9 +2297,26 @@ export default {
}
//console.log('this.tagsComponent',this.tagsComponent);
},
initTags(value) {
console.log('value',value,'optionsComponent',this.optionsComponent);
//debugger;
this.tagsComponent = [];
let len = 0;
for (let i = 0; i < value.length; i++) {
for (let j = 0; j < this.optionsComponent.length; j++) {
if (value[i] == this.optionsComponent[j].value) {
this.tagsComponent[len] = {};
this.tagsComponent[len].value = this.optionsComponent[j].value;
this.tagsComponent[len].name = this.optionsComponent[j].label;
len++;
}
}
}
//console.log('this.tagsComponent',this.tagsComponent);
},
//选择组件数据绑定
handleCloseComponent(tag) {
if (this.projectStatus != 4) {
if (this.projectStatus == 1 || this.projectStatus == 2) {
this.tagsComponent.splice(this.tagsComponent.indexOf(tag), 1);
this.formComponent.component = [];
for (let j = 0; j < this.tagsComponent.length; j++) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册