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