xg
This commit is contained in:
parent
e0f1681d34
commit
8d2806315b
@ -1,36 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
:model="queryParams"
|
|
||||||
ref="queryForm"
|
|
||||||
size="small"
|
|
||||||
:inline="true"
|
|
||||||
v-show="showSearch"
|
|
||||||
label-width="68px"
|
|
||||||
>
|
|
||||||
<el-form-item label="医院名称" prop="hospitalName">
|
<el-form-item label="医院名称" prop="hospitalName">
|
||||||
<el-input
|
<el-input v-model="queryParams.hospitalName" placeholder="请输入医院名称" clearable @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.hospitalName"
|
|
||||||
placeholder="请输入医院名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="医院编码" prop="hospitalCode">
|
<el-form-item label="医院编码" prop="hospitalCode">
|
||||||
<el-input
|
<el-input v-model="queryParams.hospitalCode" placeholder="请输入医院编码" clearable @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.hospitalCode"
|
|
||||||
placeholder="请输入医院编码"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="医院地址" prop="hospitalAddress">
|
<el-form-item label="医院地址" prop="hospitalAddress">
|
||||||
<el-input
|
<el-input v-model="queryParams.hospitalAddress" placeholder="请输入医院地址" clearable
|
||||||
v-model="queryParams.hospitalAddress"
|
@keyup.enter.native="handleQuery" />
|
||||||
placeholder="请输入医院地址"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -38,39 +17,18 @@
|
|||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||||
type="primary"
|
v-hasPermi="['system:hospital:add']">新增</el-button>
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['system:hospital:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||||
type="success"
|
v-hasPermi="['system:hospital:edit']">修改</el-button>
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['system:hospital:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||||
type="danger"
|
v-hasPermi="['system:hospital:remove']">删除</el-button>
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['system:hospital:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -84,11 +42,17 @@
|
|||||||
</el-col>-->
|
</el-col>-->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="hospitalList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="hospitalList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||||
<el-table-column label="医院名称" align="center" prop="hospitalName" />
|
<el-table-column label="医院名称" align="center" prop="hospitalName" />
|
||||||
|
<el-table-column label="医院类型" align="center" prop="category">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.category == 1 ? '家医机构' : '' }}
|
||||||
|
{{ scope.row.category == 2 ? '齐鲁名医机构' : '' }}
|
||||||
|
{{ scope.row.category == 3 ? '专病机构' : "" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="医院编码" align="center" prop="hospitalCode" />
|
<el-table-column label="医院编码" align="center" prop="hospitalCode" />
|
||||||
<el-table-column label="医院地址" align="center" prop="hospitalAddress" />
|
<el-table-column label="医院地址" align="center" prop="hospitalAddress" />
|
||||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||||
@ -96,78 +60,42 @@
|
|||||||
<el-table-column label="显示顺序" align="center" prop="hospitalSort" />
|
<el-table-column label="显示顺序" align="center" prop="hospitalSort" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||||
size="mini"
|
v-hasPermi="['system:hospital:edit']">修改</el-button>
|
||||||
type="text"
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||||
icon="el-icon-edit"
|
v-hasPermi="['system:hospital:remove']">删除</el-button>
|
||||||
@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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
<pagination
|
@pagination="getList" />
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改医院信息管理对话框 -->
|
<!-- 添加或修改医院信息管理对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
|
||||||
<el-form-item label="医院名称" prop="hospitalName">
|
<el-form-item label="医院名称" prop="hospitalName">
|
||||||
<el-input
|
<el-input v-model="form.hospitalName" style="width:200px" maxlength="50" placeholder="请输入医院名称" />
|
||||||
v-model="form.hospitalName"
|
</el-form-item>
|
||||||
style="width:200px"
|
<el-form-item label="医院类型" prop="category">
|
||||||
maxlength="50"
|
<el-select v-model="form.category" placeholder="请选择医院类型" clearable style="width: 200px;">
|
||||||
placeholder="请输入医院名称"
|
<el-option v-for="item in categorylist" :key="item.id" :label="item.Name" :value="item.id">
|
||||||
/>
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="医院编码" prop="hospitalCode">
|
<!-- <el-form-item label="医院编码" prop="hospitalCode">
|
||||||
<el-input v-model="form.hospitalCode" placeholder="请输入医院编码" />
|
<el-input v-model="form.hospitalCode" placeholder="请输入医院编码" />
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
<el-form-item label="医院地址" prop="hospitalAddress">
|
<el-form-item label="医院地址" prop="hospitalAddress">
|
||||||
<el-input
|
<el-input style="width:200px" v-model="form.hospitalAddress" maxlength="300" placeholder="请输入医院地址" />
|
||||||
style="width:200px"
|
|
||||||
v-model="form.hospitalAddress"
|
|
||||||
maxlength="300"
|
|
||||||
placeholder="请输入医院地址"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系电话" prop="phone">
|
<el-form-item label="联系电话" prop="phone">
|
||||||
<el-input
|
<el-input v-model="form.phone" maxlength="11" oninput="value=value.replace(/[^\d]/g,'')" style="width:200px"
|
||||||
v-model="form.phone"
|
placeholder="请输入联系电话" />
|
||||||
maxlength="11"
|
|
||||||
oninput="value=value.replace(/[^\d]/g,'')"
|
|
||||||
style="width:200px"
|
|
||||||
placeholder="请输入联系电话"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="显示顺序" prop="hospitalSort">
|
<el-form-item label="显示顺序" prop="hospitalSort">
|
||||||
<el-input
|
<el-input v-model.number="form.hospitalSort" maxlength="5" style="width:200px" placeholder="值越小,排名越靠前" />
|
||||||
v-model.number="form.hospitalSort"
|
|
||||||
maxlength="5"
|
|
||||||
style="width:200px"
|
|
||||||
placeholder="值越小,排名越靠前"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="医院简介" prop="hospitalIntroduce">
|
<el-form-item label="医院简介" prop="hospitalIntroduce">
|
||||||
<editor
|
<editor @imgs="imgs" :min-height="100" v-model="form.hospitalIntroduce" style="width:1000px;"></editor>
|
||||||
@imgs="imgs"
|
|
||||||
:min-height="100"
|
|
||||||
v-model="form.hospitalIntroduce"
|
|
||||||
style="width:1000px;"
|
|
||||||
></editor>
|
|
||||||
<!-- <el-input v-model="form.hospitalIntroduce" type="textarea" placeholder="请输入内容" /> -->
|
<!-- <el-input v-model="form.hospitalIntroduce" type="textarea" placeholder="请输入内容" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -223,8 +151,21 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
categorylist: [
|
||||||
|
{
|
||||||
|
Name: '家医机构',
|
||||||
|
id: 1,
|
||||||
|
}, {
|
||||||
|
Name: '齐鲁名医机构',
|
||||||
|
id: 2,
|
||||||
|
}, {
|
||||||
|
Name: '专病机构',
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
category: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
hospitalName: null,
|
hospitalName: null,
|
||||||
@ -238,6 +179,13 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
category: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择医院类型",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
hospitalName: [
|
hospitalName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@ -288,6 +236,9 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listHospital(this.queryParams).then(response => {
|
listHospital(this.queryParams).then(response => {
|
||||||
|
response.rows.forEach(e => {
|
||||||
|
e.category = Number(e.category)
|
||||||
|
})
|
||||||
this.hospitalList = response.rows;
|
this.hospitalList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -342,6 +293,7 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getHospital(id).then(response => {
|
getHospital(id).then(response => {
|
||||||
|
response.data.category = Number(response.data.category)
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改医院信息管理";
|
this.title = "修改医院信息管理";
|
||||||
@ -354,17 +306,17 @@ export default {
|
|||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateHospital(this.form).then(response => {
|
updateHospital(this.form).then(response => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addHospital(this.form).then(response => {
|
addHospital(this.form).then(response => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -376,14 +328,14 @@ export default {
|
|||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除此医院的信息?")
|
.confirm("是否确认删除此医院的信息?")
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return delHospital(ids);
|
return delHospital(ids);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user