diff --git a/src/views/system/department/index.vue b/src/views/system/department/index.vue
index d17938c..08b02ff 100644
--- a/src/views/system/department/index.vue
+++ b/src/views/system/department/index.vue
@@ -13,103 +13,284 @@
/>
-->
-
+
-
+
-
+
-
+
- 搜索
- 重置
+ 搜索
+ 重置
- 新增
+ 新增
- 修改
+ 修改
- 删除
+ 删除
- 导入
+ 导入
- 导出
+ 导出
-
+
-
+
-
-
-
+
+
+
- {{ scope.row.departmentType == "ADMINISTRATION_LOGISTICS" ? "行政后勤类" : "" }}
- {{ scope.row.departmentType == "MEDICAL_ASSISTANCE" ? "医疗辅助类" : "" }}
- {{ scope.row.departmentType == "MEDICAL_TECHNOLOGY" ? "医疗技术类" : "" }}
- {{ scope.row.departmentType == "CLINICAL_SERVICES" ? "临床服务类" : "" }}
+ {{
+ scope.row.departmentType == "ADMINISTRATION_LOGISTICS"
+ ? "行政后勤类"
+ : ""
+ }}
+ {{
+ scope.row.departmentType == "MEDICAL_ASSISTANCE"
+ ? "医疗辅助类"
+ : ""
+ }}
+ {{
+ scope.row.departmentType == "MEDICAL_TECHNOLOGY"
+ ? "医疗技术类"
+ : ""
+ }}
+ {{
+ scope.row.departmentType == "CLINICAL_SERVICES"
+ ? "临床服务类"
+ : ""
+ }}
-
- {{ scope.row.provideServiceCategory == "OUTPATIENT_SERVICE" ? "门诊" : "" }}
- {{ scope.row.provideServiceCategory == "EMERGENCY_TREATMENT" ? "急诊" : "" }}
- {{ scope.row.provideServiceCategory == "BE_HOSPITALIZED" ? "住院" : "" }}
+
+ {{
+ scope.row.provideServiceCategory == "OUTPATIENT_SERVICE"
+ ? "门诊"
+ : ""
+ }}
+ {{
+ scope.row.provideServiceCategory == "EMERGENCY_TREATMENT"
+ ? "急诊"
+ : ""
+ }}
+ {{
+ scope.row.provideServiceCategory == "BE_HOSPITALIZED"
+ ? "住院"
+ : ""
+ }}
{{ scope.row.provideServiceCategory == "WARD" ? "病区" : "" }}
- {{ scope.row.provideServiceCategory == "MEDICAL_TECHNOLOGY" ? "医技" : "" }}
+ {{
+ scope.row.provideServiceCategory == "MEDICAL_TECHNOLOGY"
+ ? "医技"
+ : ""
+ }}
{{ scope.row.provideServiceCategory == "DRUG" ? "药剂" : "" }}
- {{ scope.row.provideServiceCategory == "FINANCE" ? "财务" : "" }}
- {{ scope.row.provideServiceCategory == "ADMINISTRATION" ? "行政" : "" }}
- {{ scope.row.provideServiceCategory == "PHARMACY" ? "药房" : "" }}
- {{ scope.row.provideServiceCategory == "DRUG_STORAGE" ? "药库" : "" }}
- {{ scope.row.provideServiceCategory == "PUBLIC_HEALTH" ? "公卫" : "" }}
-
-
-
+ {{
+ scope.row.provideServiceCategory == "FINANCE" ? "财务" : ""
+ }}
+ {{
+ scope.row.provideServiceCategory == "ADMINISTRATION"
+ ? "行政"
+ : ""
+ }}
+ {{
+ scope.row.provideServiceCategory == "PHARMACY" ? "药房" : ""
+ }}
+ {{
+ scope.row.provideServiceCategory == "DRUG_STORAGE"
+ ? "药库"
+ : ""
+ }}
+ {{
+ scope.row.provideServiceCategory == "PUBLIC_HEALTH"
+ ? "公卫"
+ : ""
+ }}
+
+
+
- 修改
- 删除
+ 修改
+ 删除
-
+
-
-
+
+
将文件拖到此处,或
@@ -117,8 +298,13 @@
仅允许导入xls、xlsx格式文件。
- 下载模板
+ 下载模板
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
@@ -425,8 +727,8 @@ export default {
id: "",
// 表单校验
rules: {
- nodeType:[
- { required: true, message: "节点类型不能为空", trigger: "blur" },
+ nodeType: [
+ { required: true, message: "节点类型不能为空", trigger: "blur" },
],
hospitalAgencyName: [
{ required: true, message: "所属机构不能为空", trigger: "blur" },
@@ -541,7 +843,6 @@ export default {
},
// 所属机构
change(e) {
- console.log(this.form.hospitalAgencyIdtwo)
if (e) {
this.form.hospitalAgencyId = e[e.length - 1];
if (this.form.hospitalAgencyId) {
@@ -674,6 +975,7 @@ export default {
createTime: null,
updateBy: null,
updateTime: null,
+ parentDepartmentName:null,
};
this.resetForm("form");
},
@@ -694,25 +996,25 @@ export default {
this.multiple = !selection.length;
},
getLeafIds(nodes) {
- console.log(nodes,';node')
+ console.log(nodes, ';node')
- this.form.hospitalAgencyIdtwo=JSON.parse(localStorage.getItem('user')).hospitalAgencyId;
+ this.form.hospitalAgencyIdtwo = JSON.parse(localStorage.getItem('user')).hospitalAgencyId;
let leafIds = [];
nodes.forEach(node => {
- if(node.id==this.form.hospitalAgencyIdtwo){
- this.form.hospitalAgencyName=node.label;
+ if (node.id == this.form.hospitalAgencyIdtwo) {
+ this.form.hospitalAgencyName = node.label;
- }else{
- if (node.children) {
- // 如果有子节点,递归调用getLeafIds
- leafIds = leafIds.concat(this.getLeafIds(node.children));
} else {
- // 如果没有子节点,取当前节点的id
- leafIds.push(node.id);
- }
+ if (node.children) {
+ // 如果有子节点,递归调用getLeafIds
+ leafIds = leafIds.concat(this.getLeafIds(node.children));
+ } else {
+ // 如果没有子节点,取当前节点的id
+ leafIds.push(node.id);
+ }
}
@@ -728,8 +1030,8 @@ export default {
this.reset();
this.open = true;
this.title = "添加科室信息";
- if(localStorage.getItem('roleKey') !='admin'){
- this.getLeafIds(this.treeOptions)
+ if (localStorage.getItem('roleKey') != 'admin') {
+ this.getLeafIds(this.treeOptions)
}
@@ -764,7 +1066,10 @@ export default {
this.getList();
});
} else {
- this.form.hospitalAgencyId=this.form.hospitalAgencyIdtwo
+ if (!this.form.hospitalAgencyId) {
+ this.form.hospitalAgencyId = this.form.hospitalAgencyIdtwo
+ }
+
addDepartment(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;