医院信息管理+科室信息管理+资讯信息管理
This commit is contained in:
parent
dcb81ccedc
commit
215f3a9c67
44
src/api/system/InformationCategory.js
Normal file
44
src/api/system/InformationCategory.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询资讯分类列表
|
||||||
|
export function listInformationCategory(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/InformationCategory/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询资讯分类详细
|
||||||
|
export function getInformationCategory(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/InformationCategory/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增资讯分类
|
||||||
|
export function addInformationCategory(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/InformationCategory/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改资讯分类
|
||||||
|
export function updateInformationCategory(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/InformationCategory/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除资讯分类
|
||||||
|
export function delInformationCategory(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/InformationCategory/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
44
src/api/system/hospital.js
Normal file
44
src/api/system/hospital.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询医院信息管理列表
|
||||||
|
export function listHospital(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/hospital/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询医院信息管理详细
|
||||||
|
export function getHospital(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/hospital/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增医院信息管理
|
||||||
|
export function addHospital(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/hospital/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改医院信息管理
|
||||||
|
export function updateHospital(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/hospital/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除医院信息管理
|
||||||
|
export function delHospital(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/hospital/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
441
src/views/system/InformationCategory/index.vue
Normal file
441
src/views/system/InformationCategory/index.vue
Normal file
@ -0,0 +1,441 @@
|
|||||||
|
<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="informationCategoryCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.informationCategoryCode"
|
||||||
|
placeholder="请输入资讯分类编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类名称" prop="informationCategoryName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.informationCategoryName"
|
||||||
|
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:InformationCategory: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:InformationCategory: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:InformationCategory: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:InformationCategory:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="InformationCategoryList" @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="informationCategoryCode" />
|
||||||
|
<el-table-column label="资讯分类名称" align="center" prop="informationCategoryName" />
|
||||||
|
<el-table-column label="资讯分类类型" align="center" prop="informationCategoryType"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.informationCategoryType == "HEALTH_NOUS" ? "健康咨询" : "" }}
|
||||||
|
{{ scope.row.informationCategoryType == "OTHER" ? "其他" : "" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="资讯分类排序" align="center" prop="sort" />
|
||||||
|
<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:InformationCategory:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:InformationCategory: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="addopen" width="1100px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :inline="true">
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in form.informationCategoryList"
|
||||||
|
:key="index"
|
||||||
|
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-form-item label="资讯分类名称"
|
||||||
|
:rules="rules.informationCategoryList.informationCategoryName"
|
||||||
|
:prop="`informationCategoryList.${index}.informationCategoryName`"
|
||||||
|
>
|
||||||
|
<el-input style="width:200px" v-model="item.informationCategoryName" placeholder="请输入资讯分类名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类排序"
|
||||||
|
:rules="rules.informationCategoryList.sort"
|
||||||
|
:prop="`informationCategoryList.${index}.sort`"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.sort" style="width:200px" placeholder="请输入资讯分类排序" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类类型"
|
||||||
|
:rules="rules.informationCategoryList.informationCategoryType"
|
||||||
|
:prop="`informationCategoryList.${index}.informationCategoryType`"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- <el-input style="width:200px" placeholder="请输入资讯分类排序" /> -->
|
||||||
|
<el-radio v-model="item.informationCategoryType" label="HEALTH_NOUS">健康咨询</el-radio>
|
||||||
|
<el-radio v-model="item.informationCategoryType" label="OTHER">其他</el-radio>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
circle
|
||||||
|
plain
|
||||||
|
icon="el-icon-circle-plus-outline"
|
||||||
|
@click="adddisease"
|
||||||
|
v-if="index == 0"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
circle
|
||||||
|
plain
|
||||||
|
@click="deldisease(index)"
|
||||||
|
v-if="index != 0"
|
||||||
|
>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</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>
|
||||||
|
<!-- 修改 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||||
|
<el-form-item label="资讯分类名称" prop="informationCategoryName">
|
||||||
|
<el-input
|
||||||
|
v-model="form.informationCategoryName"
|
||||||
|
placeholder="请输入资讯分类名称"
|
||||||
|
style="width: 250px"
|
||||||
|
maxlength="15"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="资讯分类排序" prop="sort">
|
||||||
|
<el-input
|
||||||
|
v-model="form.sort"
|
||||||
|
placeholder="请输入分类排序"
|
||||||
|
style="width: 250px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类类型" prop="informationCategoryType">
|
||||||
|
|
||||||
|
<el-radio v-model="form.informationCategoryType" label="HEALTH_NOUS">健康咨询</el-radio>
|
||||||
|
<el-radio v-model="form.informationCategoryType" label="OTHER">其他</el-radio>
|
||||||
|
</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 { listInformationCategory, getInformationCategory, delInformationCategory, addInformationCategory, updateInformationCategory } from "@/api/system/InformationCategory";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "InformationCategory",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 资讯分类表格数据
|
||||||
|
InformationCategoryList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
addopen:false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
informationCategoryCode: null,
|
||||||
|
informationCategoryName: null,
|
||||||
|
informationCategoryType: null,
|
||||||
|
sort: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
informationCategoryList: {
|
||||||
|
informationCategoryName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
informationCategoryType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类类型",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
sort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
informationCategoryName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
informationCategoryType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类类型",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
sort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//删除deldisease
|
||||||
|
deldisease(index) {
|
||||||
|
this.form.informationCategoryList.splice(index, 1);
|
||||||
|
},
|
||||||
|
adddisease() {
|
||||||
|
var obj = {
|
||||||
|
informationCategoryName: "",
|
||||||
|
informationCategoryType: "",
|
||||||
|
sort: "",
|
||||||
|
};
|
||||||
|
if (this.form.informationCategoryList.length == 5) {
|
||||||
|
this.$message.error("最多只能5条");
|
||||||
|
} else {
|
||||||
|
this.form.informationCategoryList.push(obj);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 查询资讯分类列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listInformationCategory(this.queryParams).then(response => {
|
||||||
|
this.InformationCategoryList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.addopen = false;
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
// reset() {
|
||||||
|
// this.form = {
|
||||||
|
|
||||||
|
// id: null,
|
||||||
|
// informationCategoryCode: null,
|
||||||
|
// informationCategoryName: null,
|
||||||
|
// informationCategoryType: null,
|
||||||
|
// sort: null,
|
||||||
|
// createBy: null,
|
||||||
|
// createTime: null,
|
||||||
|
// updateBy: null,
|
||||||
|
// updateTime: null
|
||||||
|
// };
|
||||||
|
|
||||||
|
// this.resetForm("form");
|
||||||
|
// },
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
informationCategoryList: [
|
||||||
|
{
|
||||||
|
// id: null,
|
||||||
|
// informationCategoryCode: null,
|
||||||
|
informationCategoryName: null,
|
||||||
|
informationCategoryType: null,
|
||||||
|
sort: 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.addopen = true;
|
||||||
|
this.title = "添加资讯分类";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getInformationCategory(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) {
|
||||||
|
updateInformationCategory(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addInformationCategory(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.addopen = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除资讯分类编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delInformationCategory(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/InformationCategory/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `InformationCategory_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
372
src/views/system/hospital/index.vue
Normal file
372
src/views/system/hospital/index.vue
Normal file
@ -0,0 +1,372 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="医院名称" prop="hospitalName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.hospitalName"
|
||||||
|
placeholder="请输入医院名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="医院编码" prop="hospitalCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.hospitalCode"
|
||||||
|
placeholder="请输入医院编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="医院地址" prop="hospitalAddress">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.hospitalAddress"
|
||||||
|
placeholder="请输入医院地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="联系电话" prop="phone">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.phone"
|
||||||
|
placeholder="请输入联系电话"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item label="显示顺序" prop="hospitalSort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.hospitalSort"
|
||||||
|
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:hospital: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:hospital: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:hospital: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:hospital:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="hospitalList" @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="hospitalName" />
|
||||||
|
<el-table-column label="医院编码" align="center" prop="hospitalCode" />
|
||||||
|
<el-table-column label="医院地址" align="center" prop="hospitalAddress" />
|
||||||
|
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||||
|
<!-- <el-table-column label="医院简介" align="center" prop="hospitalIntroduce" /> -->
|
||||||
|
<el-table-column label="显示顺序" align="center" prop="hospitalSort" />
|
||||||
|
<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:hospital:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:hospital: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="700px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
|
||||||
|
<el-form-item label="医院名称" prop="hospitalName">
|
||||||
|
<el-input v-model="form.hospitalName" style="width:200px" placeholder="请输入医院名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="医院编码" prop="hospitalCode">
|
||||||
|
<el-input v-model="form.hospitalCode" placeholder="请输入医院编码" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="医院地址" prop="hospitalAddress">
|
||||||
|
<el-input style="width:200px" v-model="form.hospitalAddress" placeholder="请输入医院地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系电话" prop="phone">
|
||||||
|
<el-input v-model="form.phone" style="width:200px" placeholder="请输入联系电话" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="显示顺序" prop="hospitalSort">
|
||||||
|
<el-input v-model="form.hospitalSort" style="width:200px" placeholder="请输入显示顺序" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="医院简介" prop="hospitalIntroduce">
|
||||||
|
<editor
|
||||||
|
@imgs="imgs"
|
||||||
|
:min-height="100"
|
||||||
|
v-model="form.hospitalIntroduce"
|
||||||
|
></editor>
|
||||||
|
<!-- <el-input v-model="form.hospitalIntroduce" type="textarea" 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 { listHospital, getHospital, delHospital, addHospital, updateHospital } from "@/api/system/hospital";
|
||||||
|
import editor from "@/components/Editor";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { editor },
|
||||||
|
name: "Hospital",
|
||||||
|
data() {
|
||||||
|
// 验证手机号的规则
|
||||||
|
var checkMobile = (rule, value, cb) => {
|
||||||
|
// 验证手机号的正则表达式
|
||||||
|
const regMobile =
|
||||||
|
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||||
|
if (regMobile.test(value)) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
cb(new Error("请输入正确的联系电话"));
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
imgsurl: { pictureUrlList: [] },
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 医院信息管理表格数据
|
||||||
|
hospitalList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
hospitalName: null,
|
||||||
|
hospitalCode: null,
|
||||||
|
hospitalAddress: null,
|
||||||
|
phone: null,
|
||||||
|
hospitalIntroduce: null,
|
||||||
|
hospitalSort: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
hospitalName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择医院名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
hospitalSort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择显示排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
phone: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: checkMobile,
|
||||||
|
message: "",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
hospitalIntroduce: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择医院简介",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
hospitalAddress: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择医院地址",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
imgs(item) {
|
||||||
|
console.log(item)
|
||||||
|
this.imgsurl.pictureUrlList.push(item);
|
||||||
|
},
|
||||||
|
/** 查询医院信息管理列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listHospital(this.queryParams).then(response => {
|
||||||
|
this.hospitalList = response.rows;
|
||||||
|
console.log(this.hospitalList)
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
hospitalName: null,
|
||||||
|
hospitalCode: null,
|
||||||
|
hospitalAddress: null,
|
||||||
|
phone: null,
|
||||||
|
hospitalIntroduce: null,
|
||||||
|
hospitalSort: 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
|
||||||
|
getHospital(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
console.log(this.form)
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改医院信息管理";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateHospital(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addHospital(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 delHospital(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/hospital/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `hospital_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@ -365,9 +365,9 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
>
|
>
|
||||||
<el-form-item label="医院编码" prop="departmentCode" label-width="120">
|
<el-form-item label="医院编码" prop="hospitalCode" label-width="120">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="nurseStationqueryParams.departmentCode"
|
v-model="nurseStationqueryParams.hospitalCode"
|
||||||
placeholder="请输入科室编码"
|
placeholder="请输入科室编码"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
@ -435,16 +435,16 @@
|
|||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
property="hospitalIntroduce"
|
property="hospitalIntroduce"
|
||||||
label="医院介绍"
|
label="医院介绍"
|
||||||
align="center"
|
align="center"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
property="phone"
|
property="phone"
|
||||||
label="医院电话"
|
label="联系电话"
|
||||||
align="center"
|
align="center"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
>
|
>
|
||||||
@ -541,6 +541,8 @@ export default {
|
|||||||
nurseStationqueryParams: {
|
nurseStationqueryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
hospitalCode:"",
|
||||||
|
hospitalName:"",
|
||||||
},
|
},
|
||||||
infolist: [],
|
infolist: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
@ -567,6 +569,7 @@ export default {
|
|||||||
parentId: null,
|
parentId: null,
|
||||||
hospitalId: null,
|
hospitalId: null,
|
||||||
hospitalName: null,
|
hospitalName: null,
|
||||||
|
hospitalCode: null,
|
||||||
departmentCode: null,
|
departmentCode: null,
|
||||||
departmentName: null,
|
departmentName: null,
|
||||||
departmentPhone: null,
|
departmentPhone: null,
|
||||||
@ -722,7 +725,7 @@ export default {
|
|||||||
this.nnerVisibleindex = index;
|
this.nnerVisibleindex = index;
|
||||||
console.log(this.nnerVisibleindex);
|
console.log(this.nnerVisibleindex);
|
||||||
this.innerVisible = true;
|
this.innerVisible = true;
|
||||||
this.homenumber = item;
|
// this.homenumber = item;
|
||||||
},
|
},
|
||||||
//修改医院按钮
|
//修改医院按钮
|
||||||
clickitem() {
|
clickitem() {
|
||||||
@ -734,6 +737,8 @@ export default {
|
|||||||
this.nurseStationqueryParams = {
|
this.nurseStationqueryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
hospitalCode:"",
|
||||||
|
hospitalName:"",
|
||||||
};
|
};
|
||||||
this.info();
|
this.info();
|
||||||
},
|
},
|
||||||
@ -747,8 +752,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
info() {
|
info() {
|
||||||
list(this.queryParams).then((response) => {
|
list(this.nurseStationqueryParams,).then((response) => {
|
||||||
this.infolist = response.rows;
|
this.infolist = response.rows;
|
||||||
|
console.log(this.infolist)
|
||||||
this.total2 = response.total;
|
this.total2 = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user