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

fix bug 16:16

上级 a46d1aba
......@@ -123,7 +123,7 @@ let buttonStatusIn = [
//已上架
{ L1: "05", L2: "05", L3: "0" },
//已下架
{ L1: "03", L2: "03", L3: "0" },
{ L1: "039", L2: "039", L3: "0" },
//已拒绝/未上架
{ L1: "039", L2: "039", L3: "0" },
];
......@@ -138,7 +138,7 @@ let buttonStatusOut = [
//已上架
{ L1: "05", L2: "05", L3: "0" },
//已下架
{ L1: "03", L2: "03", L3: "0" },
{ L1: "039", L2: "039", L3: "0" },
//已拒绝/未上架
{ L1: "09", L2: "039", L3: "0" },
];
......
......@@ -34,11 +34,17 @@ export function getIdList(data) {
return list;
}
//区域
export function getAdministrative(data) {
export function getDivision(data) {
if(data === null) {
return
}
let list = data.split('|');
//for(let i)
console.log(list);
return list
let num = [];
for(let i=0;i<list.length;i++) {
num[i] = parseInt(list[i]);
}
//console.log(list);
return num;
}
export function getLevelList(data) {
let level = [];
......
......@@ -254,7 +254,7 @@
expand-trigger="hover"
:options="organizationRegion"
v-model="formOrganization.administrativeId"
></el-cascader> -->
></el-cascader>-->
</el-form-item>
<el-form-item>
<el-select size="mini" v-model="formOrganization.level" placeholder="全部医院级别">
......@@ -296,7 +296,12 @@
@selection-change="selectionChangeOrganization"
:row-key="getRowKeys"
>
<el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
<el-table-column
type="selection"
width="55"
:selectable="selectableOrganization"
:reserve-selection="true"
></el-table-column>
<el-table-column prop="name" label="医院名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="hospitalLevel" label="医院级别" align="center"></el-table-column>
<el-table-column prop="provinceName" label="所属省份" align="center"></el-table-column>
......@@ -520,6 +525,7 @@ export default {
};
return {
idTypeValue: 1,
idTypeProject: '',
itemOrganization: itemOrganization,
itemPerson: itemPerson,
projectId: null,
......@@ -635,6 +641,11 @@ export default {
totalPerson: 10,
updatedPerson: false,
changedPerson: [],
//记录上次
scopeOfOrganizationLast: [],
scopeOfPeopleLast: [],
setKindOfOrganizationLast: '',
setKindOfPeopleLast: '',
//选择项目组件 数据
optionsComponent: [],
optionsCertificate: [],
......@@ -820,6 +831,7 @@ export default {
if (res.code == "000000" && res.data.projectData != null) {
let editData = res.data;
this.setEditData(editData);
this.idTypeProject = res.data.projectData.idType;
this.projectStatus = res.data.projectData.projectStatus;
if (this.projectStatus == 1) {
this.showStorage = true;
......@@ -896,7 +908,9 @@ export default {
};
//console.log(postData);
vm.POST("portal/portalInfo/insertOrUpdate", postData).then(res => {
vm.$message.info(res.message);
if(option == "storage" || option == "storageEdit") {
vm.$message.info(res.message);
}
if (res.code == "000000") {
//console.log(res);
this.projectId = res.data.id;
......@@ -918,8 +932,14 @@ export default {
res => {
if (res.code == "000000") {
this.scopeReq = res.data.scopeReq;
console.log(this.scopeReq);
//operationData.getAdministrative(res.data.scopeReq.scopeOfAdministrative);
//console.log(this.scopeReq);
//operationData.getDivision(res.data.scopeReq.scopeOfAdministrative);
this.setKindOfOrganizationLast = this.scopeReq.setKindOfOrganization;
this.setKindOfPeopleLast = this.scopeReq.setKindOfPeople;
this.scopeOfOrganizationLast = operationData.getDivision(this.scopeReq.scopeOfOrganization);
this.scopeOfPeopleLast = operationData.getDivision(this.scopeReq.scopeOfPeople);
//this.changedOrganization = list;
}
}
);
......@@ -980,6 +1000,7 @@ export default {
this.stepData = [true, false, false];
} else if (active == 1) {
this.stepData = [false, true, false];
this.operationLast();
this.initRange();
this.getDepartment();
} else if (active == 2) {
......@@ -1102,13 +1123,14 @@ export default {
projectName: this.formData.projectName
};
vm.GET("portal/portalInfo/checkProjectName", param).then(res => {
this.$message.info(res.message);
if (res.code == "000000") {
//移动到第二页 选择范围
this.insertOrUpdate("add");
// this.active++;
// this.stepData = [false, true, false];
//this.initRange();
} else {
this.$message.info(res.message);
}
});
} else {
......@@ -1120,7 +1142,7 @@ export default {
} else if (this.active == 1) {
if (this.idType == 1) {
//内部管理员
if (this.tagsRegion.length > 0) {
if (this.tagsRegion.length > 0 || this.idTypeProject == 2) {
//选择了范围
let req = {
projectId: this.projectId,
......@@ -1427,7 +1449,9 @@ export default {
//this.organizationRegion = organizationArea;
//debugger;
//改
this.organizationRegion = operationData.getOrganizationList(this.tagsRegion);
this.organizationRegion = operationData.getOrganizationList(
this.tagsRegion
);
},
//初始化范围树
setTreeData(administrative) {
......@@ -1633,6 +1657,16 @@ export default {
}
});
},
selectableOrganization(row, index) {
if (this.projectStatus == 4) {
if (row.status == 1) {
//console.log("scopeReq",this.scopeReq);
return false;
}
return true;
}
return true;
},
//改变 设定机构选项
selectionChangeOrganization(rows) {
this.changedOrganization = [];
......@@ -1736,36 +1770,41 @@ export default {
kind = 3;
}
} else if (type == "organization") {
if (this.checkTableState.multipleOrganization == true) {
//设置机构类别0:无 1:全选 2:去掉 3:选中
kind = 1;
if (this.changedOrganization2.length > 0) {
kind = 2;
}
} else if (this.checkTableState.multipleOrganization == false) {
//设置机构类别0:无 1:全选 2:去掉 3:选中
if (this.checkTableState.multipleOrganization === false) {
//全部不选
kind = 0;
if (this.changedOrganization.length > 0) {
kind = 3;
}
} else if (this.checkTableState.multipleOrganization === true) {
//设置机构类别0:无 1:全选 2:去掉 3:选中
kind = 1;
if (this.changedOrganization2.length > 0) {
kind = 2;
}
} else if(this.checkTableState.multipleOrganization === '') {
kind = this.setKindOfOrganizationLast;
}
} else if (type == "department") {
if (this.multipleSelectionDepartment.length > 0) {
kind = 3;
}
} else if (type == "person") {
if (this.checkTableState.multiplePerson == true) {
//设置机构类别0:无 1:全选 2:去掉 3:选中
kind = 1;
if (this.changedPerson.length > 0) {
kind = 2;
}
} else if (this.checkTableState.multiplePerson == false) {
//设置人员类别0:无 1:全选 2:去掉 3:选中
if (this.checkTableState.multiplePerson === false) {
//全部不选
kind = 0;
if (this.changedPerson.length > 0) {
kind = 3;
}
} else if (this.checkTableState.multiplePerson === true) {
kind = 1;
if (this.changedPerson2.length > 0) {
kind = 2;
}
} else if(this.checkTableState.multiplePerson === '') {
kind = this.setKindOfPeopleLast;
}
}
return kind;
......@@ -1892,7 +1931,6 @@ export default {
this.initOrganizationStatus();
}
} else if (vm.checkTableState.multipleOrganization === true) {
let intersect2 = operationData.getIntersect(
idList,
this.changedOrganization
......@@ -1930,12 +1968,20 @@ export default {
let scope = "";
//2:去掉 3:选中
if (type == 2) {
for (let i = 0; i < this.changedOrganization2.length; i++) {
scope += this.changedOrganization2[i] + "|";
// console.log(this.scopeOfOrganizationLast,this.changedOrganization);
let differenceScope = operationData.getDifference(this.scopeOfOrganizationLast,this.changedOrganization);
//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] + "|";
}
} else if (type == 3) {
for (let i = 0; i < this.changedOrganization.length; i++) {
scope += this.changedOrganization[i] + "|";
let differenceScope = operationData.getDifference(this.scopeOfOrganizationLast,this.changedOrganization2);
let unionScope = operationData.getUnion(this.changedOrganization,differenceScope);
for (let i = 0; i < unionScope.length; i++) {
scope += unionScope[i] + "|";
}
}
scope = scope.substring(0, scope.length - 1);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册