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

等级调整更新

上级 9c260852
......@@ -121,6 +121,13 @@
v-show="showButton(scope.row,'L3')"
@click="openDialog(scope.row,'L3')"
>升级次级负责人</el-button>
<el-button
class="button-text"
type="text"
size="small"
v-show="showButton(scope.row,'L3_2')"
@click="openDialog(scope.row,'L3_2')"
>降为次级负责人</el-button>
<el-button
class="button-text"
type="text"
......@@ -375,7 +382,10 @@ export default {
tagsRegion: [],
doctorId: "",
allSelectedKeys: [],
attachRegionId: ""
attachRegionId: "",
creator: false,
hospitalMasterAdmin: false,
};
},
created() {
......@@ -420,7 +430,7 @@ export default {
};
let fileArray = [
{
type: '',
type: "",
base64: fileJson
}
];
......@@ -434,35 +444,35 @@ export default {
openLoading(vm);
uploadExcel(reqStr, projectId).then(res => {
setTimeout(function() {
closeLoading(vm);
if (res.code == "000000") {
if (res.data.success == true) {
//导入成功
vm.dialogSuccess = true;
vm.updateNum = res.data.total;
vm.queryRoleList();
} else {
if (res.data.outCount == true) {
//导入数据超5000
vm.failType = 1;
vm.dialogFail = true;
vm.failNum = res.data.total;
vm.failExcelUrl = res.data.url;
closeLoading(vm);
if (res.code == "000000") {
if (res.data.success == true) {
//导入成功
vm.dialogSuccess = true;
vm.updateNum = res.data.total;
vm.queryRoleList();
} else {
//导入失败
// setTimeout(function() {
if (res.data.outCount == true) {
//导入数据超5000
vm.failType = 1;
vm.dialogFail = true;
vm.failNum = res.data.total;
vm.failExcelUrl = res.data.url;
} else {
//导入失败
// setTimeout(function() {
vm.failType = 2;
vm.dialogFail = true;
vm.failNum = res.data.total;
vm.failExcelUrl = res.data.url;
// }, 800);
// }, 800);
}
}
} else {
//接口失败
vm.$message.error(res.message);
}
} else {
//接口失败
vm.$message.error(res.message);
}
console.log(res);
console.log(res);
}, 1000);
});
};
......@@ -491,7 +501,14 @@ export default {
vm.totalRows = res.data.total;
vm.activeUser = res.data.activeUser;
vm.creator = res.data.creator;
console.log("activeUser", vm.activeUser, "vm.creator", vm.creator);
vm.hospitalMasterAdmin = res.data.hospitalMasterAdmin;
console.log(
"activeUser",
vm.activeUser,
"vm.creator",
vm.creator,
vm.hospitalMasterAdmin
);
//this.roleList = setRoleList(res.data.roleList);
this.organizationList = res.data.organizationList;
this.departmentsList = res.data.departmentsList;
......@@ -519,7 +536,7 @@ export default {
type: "success"
});
} else {
this.$message.error("设置失败!");
this.$message.error(res.message);
}
});
},
......@@ -554,7 +571,7 @@ export default {
if (vm.activeUser == "L1") {
//当前内部管理员
if (row.projeceRole == "L2") {
if (projeceRole == "L0") {
if (projeceRole == "L0" || projeceRole == "L3_2") {
flag = true;
}
} else if (row.projeceRole == "L3") {
......@@ -568,25 +585,44 @@ export default {
}
} else if (vm.activeUser == "L2") {
//当前项目负责人
if (row.projeceRole == "L3") {
if (projeceRole == "L2" || projeceRole == "L0") {
flag = true;
}
} else if (row.projeceRole == "L0") {
if (projeceRole == "L2" || projeceRole == "L3") {
flag = true;
//新规则
if (vm.creator == true) {
//项目负责人是:项目创建者
if (row.projeceRole == "L3") {
if (projeceRole == "L2" || projeceRole == "L0") {
flag = true;
}
} else if (row.projeceRole == "L0") {
if (projeceRole == "L2" || projeceRole == "L3") {
flag = true;
}
} else if (row.projeceRole == "L2") {
//创建项目项目管理员可以修改其他项目管理员
if (projeceRole == "L0" || projeceRole == "L3_2") {
flag = true;
}
}
} else if (row.projeceRole == "L2" && vm.creator == true) {
//创建项目项目管理员可以修改其他项目管理员
if (projeceRole == "L0") {
flag = true;
} else {
//不是项目创建者
if (row.projeceRole == "L3") {
if (projeceRole == "L0") {
flag = true;
}
} else if (row.projeceRole == "L0") {
if (projeceRole == "L3") {
flag = true;
}
}
}
} else if (vm.activeUser == "L3") {
//当前次级负责人
if (row.projeceRole == "L0") {
if (projeceRole == "L3") {
flag = true;
//新规则
if (vm.hospitalMasterAdmin == true) {
//次级负责人是:构主管理员
if (row.projeceRole == "L0") {
if (projeceRole == "L3") {
flag = true;
}
}
}
}
......@@ -612,10 +648,15 @@ export default {
this.dialog.name = row.userName;
this.scopeRow = row;
this.scopeRow.updateL = projeceRole;
if (projeceRole == "L3_2") {
this.scopeRow.updateL = "L3";
}
if (row.projeceRole == "L2") {
this.dialog.role = "项目负责人";
if (projeceRole == "L0") {
this.dialog.option = "降级为普通用户";
} else if (projeceRole == "L3_2") {
this.dialog.option = "降级为次级负责人";
}
} else if (row.projeceRole == "L3") {
this.dialog.role = "次级负责人";
......@@ -711,12 +752,23 @@ export default {
// allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys);
// vm.allSelectedKeys = allSelectedKeys;
console.log('getHalfCheckedKeys():',this.$refs.tree.getHalfCheckedKeys());
console.log('getSimpleCheckedNodes():',operationData.getSimpleCheckedNodes(this.$refs.tree.store));
let checkedTree = operationData.getSimpleCheckedNodes(this.$refs.tree.store);
let halfCheckedTree = this.$refs.tree.getHalfCheckedKeys()
vm.allSelectedKeys = operationData.setSelectedKeys(checkedTree,halfCheckedTree);
console.log('vm.allSelectedKeys',vm.allSelectedKeys);
console.log(
"getHalfCheckedKeys():",
this.$refs.tree.getHalfCheckedKeys()
);
console.log(
"getSimpleCheckedNodes():",
operationData.getSimpleCheckedNodes(this.$refs.tree.store)
);
let checkedTree = operationData.getSimpleCheckedNodes(
this.$refs.tree.store
);
let halfCheckedTree = this.$refs.tree.getHalfCheckedKeys();
vm.allSelectedKeys = operationData.setSelectedKeys(
checkedTree,
halfCheckedTree
);
console.log("vm.allSelectedKeys", vm.allSelectedKeys);
vm.initCheckList(vm.allSelectedKeys);
},
getTreeCheck() {
......@@ -733,9 +785,14 @@ export default {
// return { type: 2, key: key };
// }),
// allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys);
let checkedTree = operationData.getSimpleCheckedNodes(this.$refs.tree.store);
let halfCheckedTree = this.$refs.tree.getHalfCheckedKeys()
let allSelectedKeys = operationData.setSelectedKeys(checkedTree,halfCheckedTree);
let checkedTree = operationData.getSimpleCheckedNodes(
this.$refs.tree.store
);
let halfCheckedTree = this.$refs.tree.getHalfCheckedKeys();
let allSelectedKeys = operationData.setSelectedKeys(
checkedTree,
halfCheckedTree
);
vm.allSelectedKeys = allSelectedKeys;
return allSelectedKeys;
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册