Commit 76b61129 by ‘巴博尔’

Merge branch 'feature_lyj' of git.nyinhong.com:PeiZhen-Java/peizhen-vue into feature/v1/plb

parents 1ae1da87 fffe0074
import request from '@/utils/request'
// 查询医生列表
export function listDoctor(query) {
return request({
url: '/system/doctor/list',
method: 'get',
params: query
})
}
// 查询医生详细
export function getDoctor(id) {
return request({
url: '/system/doctor/' + id,
method: 'get'
})
}
// 新增医生
export function addDoctor(data) {
return request({
url: '/system/doctor',
method: 'post',
data: data
})
}
// 修改医生
export function updateDoctor(data) {
return request({
url: '/system/doctor',
method: 'put',
data: data
})
}
// 删除医生
export function delDoctor(id) {
return request({
url: '/system/doctor/' + id,
method: 'delete'
})
}
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',
method: 'post',
data: data
})
}
// 修改医院
export function updateHospital(data) {
return request({
url: '/system/hospital',
method: 'put',
data: data
})
}
// 删除医院
export function delHospital(id) {
return request({
url: '/system/hospital/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询科室列表
export function listDepartment(query) {
return request({
url: '/system/department/list',
method: 'get',
params: query
})
}
// 查询科室详细
export function getDepartment(id) {
return request({
url: '/system/department/' + id,
method: 'get'
})
}
// 新增科室
export function addDepartment(data) {
return request({
url: '/system/department',
method: 'post',
data: data
})
}
// 修改科室
export function updateDepartment(data) {
return request({
url: '/system/department',
method: 'put',
data: data
})
}
// 删除科室
export function delDepartment(id) {
return request({
url: '/system/department/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询文章列表
export function listArticle(query) {
return request({
url: '/system/article/list',
method: 'get',
params: query
})
}
// 查询文章详细
export function getArticle(id) {
return request({
url: '/system/article/' + id,
method: 'get'
})
}
// 新增文章
export function addArticle(data) {
return request({
url: '/system/article',
method: 'post',
data: data
})
}
// 修改文章
export function updateArticle(data) {
return request({
url: '/system/article',
method: 'put',
data: data
})
}
// 删除文章
export function delArticle(id) {
return request({
url: '/system/article/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询业务列表
export function listBusiness(query) {
return request({
url: '/system/business/list',
method: 'get',
params: query
})
}
// 查询业务详细
export function getBusiness(id) {
return request({
url: '/system/business/' + id,
method: 'get'
})
}
// 新增业务
export function addBusiness(data) {
return request({
url: '/system/business',
method: 'post',
data: data
})
}
// 修改业务
export function updateBusiness(data) {
return request({
url: '/system/business',
method: 'put',
data: data
})
}
// 删除业务
export function delBusiness(id) {
return request({
url: '/system/business/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询轮播图列表
export function listCarousel(query) {
return request({
url: '/system/carousel/list',
method: 'get',
params: query
})
}
// 查询轮播图详细
export function getCarousel(id) {
return request({
url: '/system/carousel/' + id,
method: 'get'
})
}
// 新增轮播图
export function addCarousel(data) {
return request({
url: '/system/carousel',
method: 'post',
data: data
})
}
// 修改轮播图
export function updateCarousel(data) {
return request({
url: '/system/carousel',
method: 'put',
data: data
})
}
// 删除轮播图
export function delCarousel(id) {
return request({
url: '/system/carousel/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询新闻资讯列表
export function listInformation(query) {
return request({
url: '/system/information/list',
method: 'get',
params: query
})
}
// 查询新闻资讯详细
export function getInformation(id) {
return request({
url: '/system/information/' + id,
method: 'get'
})
}
// 新增新闻资讯
export function addInformation(data) {
return request({
url: '/system/information',
method: 'post',
data: data
})
}
// 修改新闻资讯
export function updateInformation(data) {
return request({
url: '/system/information',
method: 'put',
data: data
})
}
// 删除新闻资讯
export function delInformation(id) {
return request({
url: '/system/information/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询公告列表
export function listNotice(query) {
return request({
url: '/system/notices/list',
method: 'get',
params: query
})
}
// 查询公告详细
export function getNotice(id) {
return request({
url: '/system/notices/' + id,
method: 'get'
})
}
// 新增公告
export function addNotice(data) {
return request({
url: '/system/notices',
method: 'post',
data: data
})
}
// 修改公告
export function updateNotice(data) {
return request({
url: '/system/notices',
method: 'put',
data: data
})
}
// 删除公告
export function delNotice(id) {
return request({
url: '/system/notices/' + id,
method: 'delete'
})
}
<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="name">
<el-input
v-model="queryParams.name"
placeholder="请输入姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属医院" prop="hid">
<el-input
v-model="queryParams.hid"
placeholder="请输入所属医院"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属科室" prop="did">
<el-input
v-model="queryParams.did"
placeholder="请输入所属科室"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="rank">
<el-input
v-model="queryParams.rank"
placeholder="请输入"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="degree">
<el-input
v-model="queryParams.degree"
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:doctor: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:doctor: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:doctor: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:doctor:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="doctorList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="所属医院" align="center" prop="hid" />
<el-table-column label="所属科室" align="center" prop="did" />
<el-table-column label="" align="center" prop="rank" />
<el-table-column label="" align="center" prop="degree" />
<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:doctor:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:doctor: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="80px">
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="所属医院" prop="hid">
<el-input v-model="form.hid" placeholder="请输入所属医院" />
</el-form-item>
<el-form-item label="所属科室" prop="did">
<el-input v-model="form.did" placeholder="请输入所属科室" />
</el-form-item>
<el-form-item label="" prop="rank">
<el-input v-model="form.rank" placeholder="请输入" />
</el-form-item>
<el-form-item label="" prop="degree">
<el-input v-model="form.degree" placeholder="请输入" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listDoctor, getDoctor, delDoctor, addDoctor, updateDoctor } from "@/api/hispotalManage/doctor";
export default {
name: "Doctor",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 医生表格数据
doctorList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
hid: undefined,
did: undefined,
rank: undefined,
degree: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询医生列表 */
getList() {
this.loading = true;
listDoctor(this.queryParams).then(response => {
this.doctorList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
name: undefined,
hid: undefined,
did: undefined,
rank: undefined,
degree: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined,
delFlag: undefined
};
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.loading = true;
this.reset();
const id = row.id || this.ids
getDoctor(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改医生";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateDoctor(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addDoctor(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除医生编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delDoctor(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/doctor/export', {
...this.queryParams
}, `doctor_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<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="cityId">
<el-input
v-model="queryParams.cityId"
placeholder="请输入城市"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="医院名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入医院名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="医院logo" prop="logo">
<el-input
v-model="queryParams.logo"
placeholder="请输入医院logo"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="医院等级,0-未定义,具体查看model中定义" prop="level">
<el-input
v-model="queryParams.level"
placeholder="请输入医院等级,0-未定义,具体查看model中定义"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="经度" prop="lng">
<el-input
v-model="queryParams.lng"
placeholder="请输入经度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="纬度" prop="lat">
<el-input
v-model="queryParams.lat"
placeholder="请输入纬度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="医院类别" prop="category">
<el-input
v-model="queryParams.category"
placeholder="请输入医院类别"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="医院介绍" prop="introduce">
<el-input
v-model="queryParams.introduce"
placeholder="请输入医院介绍"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="科室" prop="departments">
<el-input
v-model="queryParams.departments"
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="" align="center" prop="id" v-if="true"/>
<el-table-column label="城市" align="center" prop="cityId" />
<el-table-column label="医院名称" align="center" prop="name" />
<el-table-column label="医院logo" align="center" prop="logo" />
<el-table-column label="医院等级,0-未定义,具体查看model中定义" align="center" prop="level" />
<el-table-column label="经度" align="center" prop="lng" />
<el-table-column label="纬度" align="center" prop="lat" />
<el-table-column label="医院类别" align="center" prop="category" />
<el-table-column label="医院介绍" align="center" prop="introduce" />
<el-table-column label="科室" align="center" prop="departments" />
<el-table-column label="状态:0-禁用,1-启用" align="center" prop="status" />
<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="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="城市" prop="cityId">
<el-input v-model="form.cityId" placeholder="请输入城市" />
</el-form-item>
<el-form-item label="医院名称" prop="name">
<el-input v-model="form.name" placeholder="请输入医院名称" />
</el-form-item>
<el-form-item label="医院logo" prop="logo">
<el-input v-model="form.logo" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="医院等级,0-未定义,具体查看model中定义" prop="level">
<el-input v-model="form.level" placeholder="请输入医院等级,0-未定义,具体查看model中定义" />
</el-form-item>
<el-form-item label="经度" prop="lng">
<el-input v-model="form.lng" placeholder="请输入经度" />
</el-form-item>
<el-form-item label="纬度" prop="lat">
<el-input v-model="form.lat" placeholder="请输入纬度" />
</el-form-item>
<el-form-item label="医院类别" prop="category">
<el-input v-model="form.category" placeholder="请输入医院类别" />
</el-form-item>
<el-form-item label="医院介绍" prop="introduce">
<el-input v-model="form.introduce" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="科室" prop="departments">
<el-input v-model="form.departments" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" 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/hispotalManage/hospital";
export default {
name: "Hospital",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 医院表格数据
hospitalList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
cityId: undefined,
name: undefined,
logo: undefined,
level: undefined,
lng: undefined,
lat: undefined,
category: undefined,
introduce: undefined,
departments: undefined,
status: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询医院列表 */
getList() {
this.loading = true;
listHospital(this.queryParams).then(response => {
this.hospitalList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
cityId: undefined,
name: undefined,
logo: undefined,
level: undefined,
lng: undefined,
lat: undefined,
category: undefined,
introduce: undefined,
departments: undefined,
status: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined,
delFlag: undefined
};
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.loading = true;
this.reset();
const id = row.id || this.ids
getHospital(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改医院";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateHospital(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addHospital(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除医院编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delHospital(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/hospital/export', {
...this.queryParams
}, `hospital_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<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="parentId">
<el-input
v-model="queryParams.parentId"
placeholder="请输入上级科室"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="排序" prop="order">
<el-input
v-model="queryParams.order"
placeholder="请输入排序"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="名称" prop="title">
<el-input
v-model="queryParams.title"
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:department: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:department: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:department: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:department:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="departmentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="上级科室" align="center" prop="parentId" />
<el-table-column label="排序" align="center" prop="order" />
<el-table-column label="名称" align="center" prop="title" />
<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:department:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:department: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="80px">
<el-form-item label="上级科室" prop="parentId">
<el-input v-model="form.parentId" placeholder="请输入上级科室" />
</el-form-item>
<el-form-item label="排序" prop="order">
<el-input v-model="form.order" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="名称" prop="title">
<el-input v-model="form.title" placeholder="请输入名称" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listDepartment, getDepartment, delDepartment, addDepartment, updateDepartment } from "@/api/hispotalManage/office";
export default {
name: "Department",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 科室表格数据
departmentList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
parentId: undefined,
order: undefined,
title: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询科室列表 */
getList() {
this.loading = true;
listDepartment(this.queryParams).then(response => {
this.departmentList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
parentId: undefined,
order: undefined,
title: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined,
delFlag: undefined
};
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.loading = true;
this.reset();
const id = row.id || this.ids
getDepartment(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改科室";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateDepartment(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addDepartment(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除科室编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delDepartment(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/department/export', {
...this.queryParams
}, `department_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<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="cityId">
<el-input
v-model="queryParams.cityId"
placeholder="请输入城市"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="文章标题" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入文章标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="轮播图" prop="cover">
<el-input
v-model="queryParams.cover"
placeholder="请输入轮播图"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input
v-model="queryParams.author"
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:article: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:article: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:article: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:article:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="articleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="城市" align="center" prop="cityId" />
<el-table-column label="文章标题" align="center" prop="title" />
<el-table-column label="轮播图" align="center" prop="cover" />
<el-table-column label="作者" align="center" prop="author" />
<el-table-column label="内容" align="center" prop="content" />
<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:article:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:article: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="80px">
<el-form-item label="城市" prop="cityId">
<el-input v-model="form.cityId" placeholder="请输入城市" />
</el-form-item>
<el-form-item label="文章标题" prop="title">
<el-input v-model="form.title" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="轮播图" prop="cover">
<el-input v-model="form.cover" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input v-model="form.author" placeholder="请输入作者" />
</el-form-item>
<el-form-item label="内容">
<editor v-model="form.content" :min-height="192"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listArticle, getArticle, delArticle, addArticle, updateArticle } from "@/api/operation/article";
export default {
name: "Article",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 文章表格数据
articleList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
cityId: undefined,
title: undefined,
cover: undefined,
author: undefined,
content: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询文章列表 */
getList() {
this.loading = true;
listArticle(this.queryParams).then(response => {
this.articleList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
cityId: undefined,
title: undefined,
cover: undefined,
author: undefined,
content: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined,
delFlag: undefined
};
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.loading = true;
this.reset();
const id = row.id || this.ids
getArticle(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改文章";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateArticle(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addArticle(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除文章编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delArticle(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/article/export', {
...this.queryParams
}, `article_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<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="cityId">
<el-input
v-model="queryParams.cityId"
placeholder="请输入城市"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="位置" prop="site">
<el-input
v-model="queryParams.site"
placeholder="请输入位置"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="描述" prop="descr">
<el-input
v-model="queryParams.descr"
placeholder="请输入描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="图片" prop="imgUrl">
<el-input
v-model="queryParams.imgUrl"
placeholder="请输入图片"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="链接" prop="linkUrl">
<el-input
v-model="queryParams.linkUrl"
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="['accompany:carousel: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="['accompany:carousel: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="['accompany:carousel: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="['accompany:carousel:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="carouselList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="城市" align="center" prop="cityId" />
<el-table-column label="位置" align="center" prop="site" />
<el-table-column label="描述" align="center" prop="descr" />
<el-table-column label="图片" align="center" prop="imgUrl" />
<el-table-column label="链接" align="center" prop="linkUrl" />
<el-table-column label="状态;0-禁用,1-启用" align="center" prop="status" />
<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="['accompany:carousel:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['accompany:carousel: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="80px">
<el-form-item label="城市" prop="cityId">
<el-input v-model="form.cityId" placeholder="请输入城市" />
</el-form-item>
<el-form-item label="位置" prop="site">
<el-input v-model="form.site" placeholder="请输入位置" />
</el-form-item>
<el-form-item label="描述" prop="descr">
<el-input v-model="form.descr" placeholder="请输入描述" />
</el-form-item>
<el-form-item label="图片" prop="imgUrl">
<el-input v-model="form.imgUrl" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="链接" prop="linkUrl">
<el-input v-model="form.linkUrl" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listCarousel, getCarousel, delCarousel, addCarousel, updateCarousel } from "@/api/operation/carousel";
export default {
name: "Carousel",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 轮播图表格数据
carouselList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
cityId: undefined,
site: undefined,
descr: undefined,
imgUrl: undefined,
linkUrl: undefined,
status: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询轮播图列表 */
getList() {
this.loading = true;
listCarousel(this.queryParams).then(response => {
this.carouselList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
cityId: undefined,
site: undefined,
descr: undefined,
imgUrl: undefined,
linkUrl: undefined,
status: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined,
delFlag: undefined
};
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.loading = true;
this.reset();
const id = row.id || this.ids
getCarousel(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改轮播图";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateCarousel(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addCarousel(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除轮播图编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delCarousel(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('accompany/carousel/export', {
...this.queryParams
}, `carousel_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<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="hospitals">
<el-input
v-model="queryParams.hospitals"
placeholder="请输入提供医院"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="业务名称" prop="name">
<el-input
v-model="queryParams.name"
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:business: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:business: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:business: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:business:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="businessList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="提供医院" align="center" prop="hospitals" />
<el-table-column label="业务名称" align="center" prop="name" />
<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:business:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:business: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="80px">
<el-form-item label="提供医院" prop="hospitals">
<el-input v-model="form.hospitals" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="业务名称" prop="name">
<el-input v-model="form.name" placeholder="请输入业务名称" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBusiness, getBusiness, delBusiness, addBusiness, updateBusiness } from "@/api/operation/business";
export default {
name: "Business",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 业务表格数据
businessList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
hospitals: undefined,
name: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询业务列表 */
getList() {
this.loading = true;
listBusiness(this.queryParams).then(response => {
this.businessList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
hospitals: undefined,
name: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined,
delFlag: undefined
};
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.loading = true;
this.reset();
const id = row.id || this.ids
getBusiness(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改业务";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateBusiness(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addBusiness(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除业务编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delBusiness(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/business/export', {
...this.queryParams
}, `business_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<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="cityId">
<el-input
v-model="queryParams.cityId"
placeholder="请输入城市"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="标题" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="封面" prop="cover">
<el-input
v-model="queryParams.cover"
placeholder="请输入封面"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="内容" prop="info">
<el-input
v-model="queryParams.info"
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:information: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:information: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:information: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:information:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="informationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="城市" align="center" prop="cityId" />
<el-table-column label="标题" align="center" prop="title" />
<el-table-column label="封面" align="center" prop="cover" />
<el-table-column label="内容" align="center" prop="info" />
<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:information:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:information: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="80px">
<el-form-item label="城市" prop="cityId">
<el-input v-model="form.cityId" placeholder="请输入城市" />
</el-form-item>
<el-form-item label="标题" prop="title">
<el-input v-model="form.title" placeholder="请输入标题" />
</el-form-item>
<el-form-item label="封面" prop="cover">
<el-input v-model="form.cover" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="内容" prop="info">
<el-input v-model="form.info" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listInformation, getInformation, delInformation, addInformation, updateInformation } from "@/api/operation/news";
export default {
name: "Information",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 新闻资讯表格数据
informationList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
cityId: undefined,
title: undefined,
cover: undefined,
info: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询新闻资讯列表 */
getList() {
this.loading = true;
listInformation(this.queryParams).then(response => {
this.informationList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
cityId: undefined,
title: undefined,
cover: undefined,
info: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined
};
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.loading = true;
this.reset();
const id = row.id || this.ids
getInformation(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改新闻资讯";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateInformation(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addInformation(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除新闻资讯编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delInformation(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/information/export', {
...this.queryParams
}, `information_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<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="cityId">
<el-input
v-model="queryParams.cityId"
placeholder="请输入城市"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="内容" prop="info">
<el-input
v-model="queryParams.info"
placeholder="请输入内容"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="位置" prop="site">
<el-input
v-model="queryParams.site"
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:notice: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:notice: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:notice: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:notice:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="城市" align="center" prop="cityId" />
<el-table-column label="内容" align="center" prop="info" />
<el-table-column label="位置" align="center" prop="site" />
<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:notice:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:notice: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="80px">
<el-form-item label="城市" prop="cityId">
<el-input v-model="form.cityId" placeholder="请输入城市" />
</el-form-item>
<el-form-item label="内容" prop="info">
<el-input v-model="form.info" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="位置" prop="site">
<el-input v-model="form.site" placeholder="请输入位置" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/operation/notice";
export default {
name: "Notice",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 公告表格数据
noticeList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
cityId: undefined,
info: undefined,
site: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询公告列表 */
getList() {
this.loading = true;
listNotice(this.queryParams).then(response => {
this.noticeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
cityId: undefined,
info: undefined,
site: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined
};
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.loading = true;
this.reset();
const id = row.id || this.ids
getNotice(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改公告";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateNotice(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addNotice(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除公告编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delNotice(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/notice/export', {
...this.queryParams
}, `notice_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
...@@ -36,7 +36,7 @@ module.exports = { ...@@ -36,7 +36,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8080`, // target: `http://localhost:8080`,
target: `http://http://192.168.0.169:8089`, target: `http://192.168.0.169:8089`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment