机构 科室
This commit is contained in:
parent
fbdfa42cbf
commit
cb95f361c9
@ -20,7 +20,7 @@ export function getAgencyCategory(id) {
|
||||
// 新增机构类别
|
||||
export function addAgencyCategory(data) {
|
||||
return request({
|
||||
url: '/system/agencyCategory',
|
||||
url: '/system/agencyCategory/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@ -29,7 +29,7 @@ export function addAgencyCategory(data) {
|
||||
// 修改机构类别
|
||||
export function updateAgencyCategory(data) {
|
||||
return request({
|
||||
url: '/system/agencyCategory',
|
||||
url: '/system/agencyCategory/edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
|
||||
@ -197,7 +197,7 @@
|
||||
label-width="130px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="所属区域" prop="areaCode">
|
||||
<el-form-item label="行政区划" prop="areaCode">
|
||||
<el-select
|
||||
v-model="form.provinceName"
|
||||
clearable
|
||||
@ -241,7 +241,7 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="form.streetCode"
|
||||
v-model="form.regionName"
|
||||
clearable
|
||||
placeholder="请选择街道"
|
||||
style="width: 129px; margin-left: 10px"
|
||||
@ -255,7 +255,7 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="form.areaCode"
|
||||
v-model="form.streetName"
|
||||
clearable
|
||||
placeholder="请选择社区"
|
||||
style="width: 129px; margin-left: 10px"
|
||||
@ -297,8 +297,14 @@
|
||||
<el-input v-model="form.agencyName" placeholder="请输入机构名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="机构状态" prop="agencyStatus">
|
||||
<el-radio v-model="radio" label="ON">启用</el-radio>
|
||||
<el-radio v-model="radio" label="OFF">禁用</el-radio>
|
||||
<!-- <el-form-item label="是否并发" prop="concurrent"> -->
|
||||
<el-radio-group v-model="form.agencyStatus" size="small">
|
||||
<el-radio label="ON">启用</el-radio>
|
||||
<el-radio label="OFF">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- </el-form-item> -->
|
||||
<!-- <el-radio v-model="form.agencyStatus" label="ON">启用</el-radio>
|
||||
<el-radio v-model="form.agencyStatus" label="OFF">禁用</el-radio> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="机构简称" prop="agencyAbbreviation">
|
||||
<el-input
|
||||
@ -328,7 +334,7 @@
|
||||
:key="isResouceShow"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="卫生机构类别" prop="agencyCategoryId">
|
||||
<el-cascader
|
||||
:props="{ checkStrictly: true }"
|
||||
@ -492,12 +498,12 @@ export default {
|
||||
provincelist: [],
|
||||
isResouceShow: 1,
|
||||
isResouceShows: 1,
|
||||
treeOption: {
|
||||
lazy: true,
|
||||
// treeOption: {
|
||||
// lazy: true,
|
||||
|
||||
checkStrictly: true, // 是否可选择任意一级
|
||||
// lazyLoad: this.lazyLoad,
|
||||
},
|
||||
// checkStrictly: true, // 是否可选择任意一级
|
||||
// // lazyLoad: this.lazyLoad,
|
||||
// },
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
@ -682,21 +688,22 @@ export default {
|
||||
return delAgency(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
// this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
children.splice(index, 1);
|
||||
// children.splice(index, 1);
|
||||
this.gettreelist();
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
lazyLoad(node, resolve) {
|
||||
// 这儿过来了吗对
|
||||
// console.log(node, "children", this.treeOptions);
|
||||
// const id = node.level === 0 ? 0 : node.data.id;
|
||||
// setTimeout(() => {
|
||||
// resolve(this.treeOptions);
|
||||
// // this.$off("load-data", this.lazyLoad);
|
||||
// }, 300);
|
||||
},
|
||||
// lazyLoad(node, resolve) {
|
||||
// // 这儿过来了吗对
|
||||
// // console.log(node, "children", this.treeOptions);
|
||||
// // const id = node.level === 0 ? 0 : node.data.id;
|
||||
// // setTimeout(() => {
|
||||
// // resolve(this.treeOptions);
|
||||
// // // this.$off("load-data", this.lazyLoad);
|
||||
// // }, 300);
|
||||
// },
|
||||
gettreelist() {
|
||||
agencyList().then((res) => {
|
||||
// 接口请求
|
||||
@ -1010,7 +1017,7 @@ export default {
|
||||
|
||||
.el-col-4 {
|
||||
// width: 18%;
|
||||
height: 285px;
|
||||
height: 600px;
|
||||
overflow: scroll;
|
||||
}
|
||||
.information {
|
||||
|
||||
@ -193,14 +193,16 @@
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="父级类别" prop="parentCategoryId">
|
||||
<el-cascader
|
||||
:props="props"
|
||||
@change="change"
|
||||
style="width: 250px"
|
||||
:props="{ checkStrictly: true }"
|
||||
:options="treeOptions"
|
||||
@change="change($event)"
|
||||
style="width: 250px; color: black"
|
||||
v-model="form.parentCategoryId"
|
||||
:show-all-levels="false"
|
||||
ref="cascader"
|
||||
:placeholder="
|
||||
form.parentCategoryId ? form.parentCategoryId : '主分类'
|
||||
form.parentCategoryName ? form.parentCategoryName : '请选择父级类别'
|
||||
"
|
||||
ref="cascader"
|
||||
:key="isResouceShow"
|
||||
></el-cascader>
|
||||
<!-- <el-input v-model="form.parentCategoryId" placeholder="请输入父级类别id" /> -->
|
||||
@ -266,71 +268,18 @@ import {
|
||||
addAgencyCategory,
|
||||
updateAgencyCategory,
|
||||
} from "@/api/system/agencyCategory";
|
||||
|
||||
import { agencyCategoryList, } from "@/api/system/agency";
|
||||
export default {
|
||||
name: "AgencyCategory",
|
||||
data() {
|
||||
return {
|
||||
treeOptions: [],
|
||||
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
isResouceShow: 1,
|
||||
|
||||
treeOption: {
|
||||
lazy: true,
|
||||
checkStrictly: true, // 是否可选择任意一级
|
||||
lazyLoad(node, resolve) {
|
||||
console.log(node, resolve);
|
||||
const id = node.level === 0 ? 0 : node.data.id;
|
||||
setTimeout(() => {
|
||||
if (id == 9999999) {
|
||||
getStationCategoryList(0).then((res) => {
|
||||
// 接口请求
|
||||
res.data.forEach((e) => {
|
||||
e.value = e.id;
|
||||
e.label = e.goodsCategoryName;
|
||||
});
|
||||
resolve(
|
||||
res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
};
|
||||
})
|
||||
);
|
||||
});
|
||||
} else if (id == 0) {
|
||||
var data = [
|
||||
{
|
||||
label: "商品主分类",
|
||||
children: [],
|
||||
id: 9999999,
|
||||
},
|
||||
];
|
||||
resolve(
|
||||
data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
};
|
||||
})
|
||||
);
|
||||
} else {
|
||||
getStationCategoryList(id).then((res) => {
|
||||
// 接口请求
|
||||
res.data.forEach((e) => {
|
||||
e.value = e.id;
|
||||
e.label = e.goodsCategoryName;
|
||||
});
|
||||
resolve(
|
||||
res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
};
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
}, 300);
|
||||
},
|
||||
},
|
||||
|
||||
// 选中数组
|
||||
ids: [],
|
||||
options: [
|
||||
@ -376,18 +325,28 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
parentCategoryId: [
|
||||
{ required: true, message: "父级类别id不能为空", trigger: "blur" },
|
||||
],
|
||||
// parentCategoryId: [
|
||||
// { required: true, message: "父级类别id不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.gettreelistitem()
|
||||
},
|
||||
methods: {
|
||||
gettreelistitem() {
|
||||
agencyCategoryList().then((res) => {
|
||||
// 接口请求
|
||||
this.treeOptions = res.data.map((item) => {
|
||||
return { value: item.id, ...item };
|
||||
});
|
||||
});
|
||||
},
|
||||
change(e) {
|
||||
this.form.parentId = e[e.length - 1];
|
||||
console.log(e,'9')
|
||||
this.form.parentCategoryId = e[e.length - 1];
|
||||
},
|
||||
/** 查询机构类别列表 */
|
||||
getList() {
|
||||
|
||||
@ -436,7 +436,7 @@
|
||||
style="width: 205px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in option"
|
||||
v-for="item in optionsubdivisionCategory"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@ -451,10 +451,23 @@
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="标准科室对照" prop="normDepartmentCompareId">
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="form.normDepartmentCompareId"
|
||||
placeholder="请选择"
|
||||
style="width: 205px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionnormDepartmentCompare"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input
|
||||
v-model="form.normDepartmentCompareId"
|
||||
placeholder="请输入标准科室对照id"
|
||||
/>
|
||||
/> -->
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="标准科室对照名称" prop="normDepartmentCompareName">
|
||||
<el-input
|
||||
@ -526,6 +539,10 @@ export default {
|
||||
name: "Department",
|
||||
data() {
|
||||
return {
|
||||
// 细分
|
||||
optionsubdivisionCategory:[],
|
||||
// 标准科室对照4
|
||||
optionnormDepartmentCompare:[],
|
||||
option: [],
|
||||
nodeTypeoptions: [],
|
||||
treeOptions: [],
|
||||
@ -669,11 +686,11 @@ export default {
|
||||
console.log(e, "78");
|
||||
// console.log(this.$refs.cascader)
|
||||
// this.form.parentId = e;
|
||||
this.form.parentId = e[e.length - 1];
|
||||
this.form.agencyId = e[e.length - 1];
|
||||
},
|
||||
|
||||
changeagencyCategoryId(e) {
|
||||
this.form.agencyCategoryId = e[e.length - 1];
|
||||
this.form.parentDepartmentId = e[e.length - 1];
|
||||
},
|
||||
// gettreelistitem() {
|
||||
// agencyCategoryList().then((res) => {
|
||||
@ -702,14 +719,14 @@ export default {
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.open = true;
|
||||
this.upload.title = "机构导入";
|
||||
this.upload.title = "科室导入";
|
||||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download(
|
||||
"/system/importDownload/downloadTemplate?fileType=agency",
|
||||
{},
|
||||
`机构导入模板.xlsx`
|
||||
`科室导入模板.xlsx`
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user