机构类别 科室 细分类别
This commit is contained in:
parent
cb95f361c9
commit
a3484e392c
@ -8,6 +8,13 @@ export function listDepartment(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getDepartmentList(query) {
|
||||
return request({
|
||||
url: '/system/department/getDepartmentList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询科室信息详细
|
||||
export function getDepartment(id) {
|
||||
|
||||
44
src/api/system/subdivision.js
Normal file
44
src/api/system/subdivision.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询细分类别信息列表
|
||||
export function listSubdivision(query) {
|
||||
return request({
|
||||
url: '/system/subdivision/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询细分类别信息详细
|
||||
export function getSubdivision(id) {
|
||||
return request({
|
||||
url: '/system/subdivision/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增细分类别信息
|
||||
export function addSubdivision(data) {
|
||||
return request({
|
||||
url: '/system/subdivision',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改细分类别信息
|
||||
export function updateSubdivision(data) {
|
||||
return request({
|
||||
url: '/system/subdivision',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除细分类别信息
|
||||
export function delSubdivision(id) {
|
||||
return request({
|
||||
url: '/system/subdivision/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -32,27 +32,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类别等级" prop="categoryLevel">
|
||||
<!-- <el-input v-model="form.categoryLevel" placeholder="请选择类别等级" /> -->
|
||||
<el-select v-model="form.categoryLevel" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="类别等级,1:一级类型,2:二级类别,3:三级类别等" prop="categoryLevel">
|
||||
<el-input
|
||||
v-model="queryParams.categoryLevel"
|
||||
placeholder="请输入类别等级,1:一级类型,2:二级类别,3:三级类别等"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="类别排序" prop="categorySort">
|
||||
<!-- <el-form-item label="类别排序" prop="categorySort">
|
||||
<el-input
|
||||
v-model="queryParams.categorySort"
|
||||
placeholder="请输入类别排序"
|
||||
@ -67,7 +47,7 @@
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -145,13 +125,13 @@
|
||||
<el-table-column label="父级类别id" align="center" prop="parentCategoryId" /> -->
|
||||
<el-table-column label="类别名称" align="center" prop="categoryName" />
|
||||
<el-table-column label="类别编码" align="center" prop="categoryCode" />
|
||||
<el-table-column label="类别等级" align="center" prop="categoryLevel">
|
||||
<!-- <el-table-column label="类别等级" align="center" prop="categoryLevel">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status == "1" ? "一级类别" : "" }}
|
||||
{{ scope.row.status == "2" ? "二级类别" : "" }}
|
||||
{{ scope.row.status == "3" ? "三级类别" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="类别排序" align="center" prop="categorySort" />
|
||||
<el-table-column label="类别概述" align="center" prop="categoryRemark" />
|
||||
<el-table-column
|
||||
@ -221,8 +201,7 @@
|
||||
placeholder="请输入类别编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类别等级" prop="categoryLevel">
|
||||
<!-- <el-input v-model="form.categoryLevel" placeholder="请选择类别等级" /> -->
|
||||
<!-- <el-form-item label="类别等级" prop="categoryLevel">
|
||||
<el-select
|
||||
v-model="form.categoryLevel"
|
||||
placeholder="请选择"
|
||||
@ -236,7 +215,7 @@
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="类别排序" prop="categorySort">
|
||||
<el-input
|
||||
v-model="form.categorySort"
|
||||
|
||||
@ -342,10 +342,10 @@
|
||||
style="width: 205px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionstype"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in departmentoptions"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -392,8 +392,21 @@
|
||||
:key="isResouceShow"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="上级科室" prop="parentDepartmentId`">
|
||||
<el-cascader
|
||||
<el-form-item label="上级科室" prop="parentDepartmentId">
|
||||
<el-select
|
||||
v-model="form.parentDepartmentId"
|
||||
placeholder="请选择"
|
||||
style="width: 205px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsparentDepartment"
|
||||
:key="item.departmentCode"
|
||||
:label="item.departmentName"
|
||||
:value="item.departmentCode"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-cascader
|
||||
:props="{ checkStrictly: true }"
|
||||
:options="treeOptionsagencyCategoryId"
|
||||
@change="changeagencyCategoryId($event)"
|
||||
@ -407,7 +420,7 @@
|
||||
:show-all-levels="false"
|
||||
ref="cascader"
|
||||
:key="isResouceShows"
|
||||
></el-cascader>
|
||||
></el-cascader> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="提供服务类别" prop="provideServiceCategory">
|
||||
<el-select
|
||||
@ -437,9 +450,9 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsubdivisionCategory"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="item.subdivisionCategoryCode"
|
||||
:label="item.subdivisionCategoryName"
|
||||
:value="item.subdivisionCategoryCode"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -531,14 +544,17 @@ import {
|
||||
delDepartment,
|
||||
addDepartment,
|
||||
updateDepartment,
|
||||
getDepartmentList
|
||||
} from "@/api/system/department";
|
||||
import { agencyList, getAgencytype } from "@/api/system/agency";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { listSubdivision, } from "@/api/system/subdivision";
|
||||
|
||||
export default {
|
||||
name: "Department",
|
||||
data() {
|
||||
return {
|
||||
optionsparentDepartment:[],
|
||||
// 细分
|
||||
optionsubdivisionCategory:[],
|
||||
// 标准科室对照4
|
||||
@ -547,7 +563,7 @@ export default {
|
||||
nodeTypeoptions: [],
|
||||
treeOptions: [],
|
||||
treeOptionsagencyCategoryId: [],
|
||||
optionstype:[],
|
||||
departmentoptions:[],
|
||||
options: [
|
||||
// {
|
||||
// value: "PUBLIC_HEALTH",
|
||||
@ -668,14 +684,34 @@ export default {
|
||||
// this.gettreelistitem();
|
||||
this.info();
|
||||
this.infolist();
|
||||
this.getinfo();
|
||||
this.getinfolist();
|
||||
this.infodepartment()
|
||||
},
|
||||
methods: {
|
||||
getinfolist(){
|
||||
listSubdivision().then(res=>{
|
||||
this.optionsubdivisionCategory=res.rows
|
||||
})
|
||||
},
|
||||
getinfo(){
|
||||
getDepartmentList().then(res=>{
|
||||
console.log(res,'666')
|
||||
this.optionsparentDepartment=res.data
|
||||
})
|
||||
},
|
||||
info() {
|
||||
var dictType = "node_type";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
this.nodeTypeoptions = res.data;
|
||||
});
|
||||
},
|
||||
infodepartment() {
|
||||
var dictType = "department_type";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
this.departmentoptions = res.data;
|
||||
});
|
||||
},
|
||||
infolist() {
|
||||
var dictType = "provide_service_category";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
|
||||
282
src/views/system/subdivision/index.vue
Normal file
282
src/views/system/subdivision/index.vue
Normal file
@ -0,0 +1,282 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="细分类别名称" prop="subdivisionCategoryName">
|
||||
<el-input
|
||||
v-model="queryParams.subdivisionCategoryName"
|
||||
placeholder="请输入细分类别名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="细分类别编码" prop="subdivisionCategoryCode">
|
||||
<el-input
|
||||
v-model="queryParams.subdivisionCategoryCode"
|
||||
placeholder="请输入细分类别编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="细分类别排序" prop="sort">
|
||||
<el-input
|
||||
v-model="queryParams.sort"
|
||||
placeholder="请输入细分类别排序"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:subdivision:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:subdivision:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:subdivision:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:subdivision:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="subdivisionList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||
<el-table-column label="细分类别名称" align="center" prop="subdivisionCategoryName" />
|
||||
<el-table-column label="细分类别编码" align="center" prop="subdivisionCategoryCode" />
|
||||
<el-table-column label="细分类别排序" align="center" prop="sort" />
|
||||
<el-table-column label="细分类别概述" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:subdivision:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:subdivision:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改细分类别信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :inline="true">
|
||||
<el-form-item label="细分类别名称" prop="subdivisionCategoryName">
|
||||
<el-input v-model="form.subdivisionCategoryName" placeholder="请输入细分类别名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="细分类别编码" prop="subdivisionCategoryCode">
|
||||
<el-input v-model="form.subdivisionCategoryCode" placeholder="请输入细分类别编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="细分类别排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入细分类别排序" />
|
||||
</el-form-item>
|
||||
<el-form-item label="细分类别概述" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入细分类别概述" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSubdivision, getSubdivision, delSubdivision, addSubdivision, updateSubdivision } from "@/api/system/subdivision";
|
||||
|
||||
export default {
|
||||
name: "Subdivision",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 细分类别信息表格数据
|
||||
subdivisionList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
subdivisionCategoryName: null,
|
||||
subdivisionCategoryCode: null,
|
||||
sort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询细分类别信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSubdivision(this.queryParams).then(response => {
|
||||
this.subdivisionList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
subdivisionCategoryName: null,
|
||||
subdivisionCategoryCode: null,
|
||||
sort: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加细分类别信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getSubdivision(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改细分类别信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateSubdivision(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSubdivision(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除细分类别信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delSubdivision(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/subdivision/export', {
|
||||
...this.queryParams
|
||||
}, `subdivision_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user