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

fix bug 16:16

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