门诊医生排班->科室名称管理后端接口,前端基础页面
This commit is contained in:
27
openhis-ui-vue3/src/api/appoinmentmanage/dept.js
Normal file
27
openhis-ui-vue3/src/api/appoinmentmanage/dept.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询科室列表
|
||||
export function listDept(query) {
|
||||
return request({
|
||||
url: '/dept/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询科室详细
|
||||
export function getDept(deptId) {
|
||||
return request({
|
||||
url: '/dept/' + deptId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 搜索科室列表
|
||||
export function searchDept(query) {
|
||||
return request({
|
||||
url: '/dept/search',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@@ -26,6 +26,21 @@ import Layout from '@/layout'
|
||||
|
||||
// 公共路由
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: '/appoinmentmanage',
|
||||
component: Layout,
|
||||
redirect: '/appoinmentmanage',
|
||||
name: 'AppoinmentManage',
|
||||
meta: { title: '预约管理', icon: 'component' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/appoinmentmanage/index.vue'),
|
||||
name: 'AppoinmentManageIndex',
|
||||
meta: { title: '预约管理' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
|
||||
222
openhis-ui-vue3/src/views/appoinmentmanage/index.vue
Normal file
222
openhis-ui-vue3/src/views/appoinmentmanage/index.vue
Normal file
@@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<div class="appoinmentmanage-container">
|
||||
<div class="appoinmentmanage-header">
|
||||
<h2 class="appoinmentmanage-title">预约管理</h2>
|
||||
</div>
|
||||
|
||||
<div class="appoinmentmanage-content">
|
||||
<!-- 查询条件 -->
|
||||
<div class="query-condition">
|
||||
<el-select v-model="queryParams.orgName" placeholder="全部机构" class="query-select">
|
||||
<el-option label="全部机构" value=""></el-option>
|
||||
<el-option label="演示医院" value="演示医院"></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-select v-model="queryParams.deptName" placeholder="全部科室" class="query-select">
|
||||
<el-option label="全部科室" value=""></el-option>
|
||||
<el-option label="口腔科" value="口腔科"></el-option>
|
||||
<el-option label="妇产科" value="妇产科"></el-option>
|
||||
<el-option label="测试内科" value="测试内科"></el-option>
|
||||
<el-option label="高值耗材房" value="高值耗材房"></el-option>
|
||||
<el-option label="其他内科" value="其他内科"></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-button type="primary" @click="handleQuery" class="query-button">查询</el-button>
|
||||
<el-button @click="handleReset" class="reset-button">重置</el-button>
|
||||
<el-button type="success" @click="handleAppointmentSetting" class="appointment-setting-button">预约设置</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 科室列表 -->
|
||||
<div class="dept-table-container">
|
||||
<el-table :data="deptList" border style="width: 100%" class="centered-table">
|
||||
<el-table-column prop="id" label="ID" width="150"></el-table-column>
|
||||
<el-table-column prop="orgName" label="卫生机构" width="350"></el-table-column>
|
||||
<el-table-column prop="deptName" label="科室名称" width="350"></el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="400"></el-table-column>
|
||||
<el-table-column prop="status" label="作废标志">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.status ? 'success' : 'danger'">
|
||||
{{ scope.row.status ? '有效' : '无效' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="350" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="small" @click="handleEdit(scope.row)">
|
||||
<el-icon><EditPen /></el-icon>
|
||||
</el-button>
|
||||
<el-button type="info" size="small" @click="handleView(scope.row)">
|
||||
<el-icon><View /></el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="pagination-container">
|
||||
<el-pagination
|
||||
v-model:current-page="pagination.currentPage"
|
||||
v-model:page-size="pagination.pageSize"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pagination.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="AppoinmentManage">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { EditPen, View } from '@element-plus/icons-vue'
|
||||
import { listDept } from '@/api/appoinmentmanage/dept'
|
||||
|
||||
// 查询参数
|
||||
const queryParams = ref({
|
||||
orgName: '',
|
||||
deptName: ''
|
||||
})
|
||||
|
||||
// 科室列表
|
||||
const deptList = ref([])
|
||||
|
||||
// 分页参数
|
||||
const pagination = ref({
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
})
|
||||
|
||||
// 获取科室列表
|
||||
const getDeptList = async () => {
|
||||
try {
|
||||
const res = await listDept({
|
||||
...queryParams.value,
|
||||
pageNo: pagination.value.currentPage,
|
||||
pageSize: pagination.value.pageSize
|
||||
})
|
||||
if (res.code === 200) {
|
||||
// 修改数据赋值方式,适配后端返回的数据结构
|
||||
deptList.value = res.data
|
||||
pagination.value.total = res.data.length
|
||||
} else {
|
||||
ElMessage.error(res.msg || '获取科室列表失败')
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取科室列表失败:', error)
|
||||
ElMessage.error('获取科室列表失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 查询
|
||||
const handleQuery = () => {
|
||||
pagination.value.currentPage = 1
|
||||
getDeptList()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const handleReset = () => {
|
||||
queryParams.value = {
|
||||
orgName: '',
|
||||
deptName: ''
|
||||
}
|
||||
pagination.value.currentPage = 1
|
||||
getDeptList()
|
||||
}
|
||||
|
||||
// 预约设置
|
||||
const handleAppointmentSetting = () => {
|
||||
ElMessage.info('预约设置功能待开发')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = (row) => {
|
||||
ElMessage.info(`编辑科室: ${row.deptName}`)
|
||||
}
|
||||
|
||||
// 查看
|
||||
const handleView = (row) => {
|
||||
ElMessage.info(`查看科室: ${row.deptName}`)
|
||||
}
|
||||
|
||||
// 分页大小变化
|
||||
const handleSizeChange = (size) => {
|
||||
pagination.value.pageSize = size
|
||||
getDeptList()
|
||||
}
|
||||
|
||||
// 当前页码变化
|
||||
const handleCurrentChange = (current) => {
|
||||
pagination.value.currentPage = current
|
||||
getDeptList()
|
||||
}
|
||||
|
||||
// 页面加载时获取科室列表
|
||||
onMounted(() => {
|
||||
getDeptList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.appoinmentmanage-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
.appoinmentmanage-header {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.appoinmentmanage-title {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.appoinmentmanage-content {
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.query-condition {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.query-select {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.query-button, .reset-button, .appointment-setting-button {
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.dept-table-container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/* 表格居中样式 */
|
||||
.centered-table {
|
||||
:deep(.el-table__header-wrapper th.el-table__cell),
|
||||
:deep(.el-table__body-wrapper td.el-table__cell) {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -30,7 +30,7 @@
|
||||
<span class="menu-icon">👥</span>
|
||||
<span>患者管理</span>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<div class="menu-item" @click="navigateToAppoinmentManage">
|
||||
<span class="menu-icon">💉</span>
|
||||
<span>预约管理</span>
|
||||
</div>
|
||||
@@ -203,6 +203,10 @@ function awaitingMedicineBtn() {
|
||||
router.push({ path: '/medicationmanagement/statisticalManagement/earlyWarning' });
|
||||
}
|
||||
|
||||
// 跳转到预约管理页面
|
||||
function navigateToAppoinmentManage() {
|
||||
router.push({ path: '/appoinmentmanage' });
|
||||
}
|
||||
function getExpirationWarningCount() {
|
||||
getExpirationWarning({ pageNo: 1, pageSize: 10 }).then((res) => {
|
||||
total.value = res.data.total || 0;
|
||||
|
||||
Reference in New Issue
Block a user