feat(router): 添加医生工作站等功能模块路由配置
- 新增医生工作站路由,包含待写病历功能 - 添加全部功能模块路由,支持功能列表和配置页面 - 集成待办事项模块路由,完善工作流功能 - 配置相关API接口和服务类,实现用户配置管理 - 实现待写病历列表展示和相关业务逻辑 - 完善首页统计数据显示功能
This commit is contained in:
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<div class="pending-emr-container">
|
||||
<div class="header">
|
||||
<h2>待写病历</h2>
|
||||
<div class="actions">
|
||||
<el-button type="primary" @click="refreshList">刷新</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-card class="search-card">
|
||||
<el-form :model="queryParams" inline>
|
||||
<el-form-item label="患者姓名">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入患者姓名"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-table
|
||||
:data="emrList"
|
||||
v-loading="loading"
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="busNo" label="病历号" width="150" />
|
||||
<el-table-column prop="gender" label="性别" width="80">
|
||||
<template #default="{ row }">
|
||||
{{ getGenderText(row.gender) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="age" label="年龄" width="80" />
|
||||
<el-table-column prop="registerTime" label="挂号时间" width="180">
|
||||
<template #default="{ row }">
|
||||
{{ parseTime(row.registerTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click.stop="handleWriteEmr(row)">写病历</el-button>
|
||||
<el-divider direction="vertical" />
|
||||
<el-button link type="primary" @click.stop="handleViewPatient(row)">查看患者</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:size="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="PendingEmr">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { listPendingEmr, getPendingEmrCount } from '@/views/doctorstation/components/api.js'
|
||||
import { parseTime } from '@/utils/index.js'
|
||||
import Pagination from '@/components/Pagination'
|
||||
|
||||
// 响应式数据
|
||||
const loading = ref(true)
|
||||
const total = ref(0)
|
||||
const emrList = ref([])
|
||||
|
||||
// 查询参数
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
patientName: undefined
|
||||
})
|
||||
|
||||
// 获取待写病历列表
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const response = await listPendingEmr(queryParams)
|
||||
// 根据后端返回的数据结构调整
|
||||
if (response.code === 200) {
|
||||
emrList.value = response.data || []
|
||||
total.value = Array.isArray(response.data) ? response.data.length : 0
|
||||
} else {
|
||||
ElMessage.error(response.msg || '获取待写病历列表失败')
|
||||
emrList.value = []
|
||||
total.value = 0
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取待写病历列表失败:', error)
|
||||
ElMessage.error('获取待写病历列表失败')
|
||||
emrList.value = []
|
||||
total.value = 0
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNum = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
queryParams.patientName = undefined
|
||||
queryParams.pageNum = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
// 刷新列表
|
||||
const refreshList = () => {
|
||||
getList()
|
||||
}
|
||||
|
||||
// 行点击事件
|
||||
const handleRowClick = (row) => {
|
||||
// 可以在这里处理行点击事件
|
||||
console.log('点击行:', row)
|
||||
}
|
||||
|
||||
// 写病历
|
||||
const handleWriteEmr = (row) => {
|
||||
console.log('写病历:', row)
|
||||
// 触发写病历事件,通知父组件切换到病历页面
|
||||
emit('writeEmr', row)
|
||||
}
|
||||
|
||||
// 查看患者
|
||||
const handleViewPatient = (row) => {
|
||||
console.log('查看患者:', row)
|
||||
// 触发查看患者事件
|
||||
emit('viewPatient', row)
|
||||
}
|
||||
|
||||
// 获取性别文本
|
||||
const getGenderText = (genderValue) => {
|
||||
const genderMap = {
|
||||
1: '男',
|
||||
2: '女'
|
||||
}
|
||||
return genderMap[genderValue] || '未知'
|
||||
}
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
// 定义emit
|
||||
const emit = defineEmits(['writeEmr', 'viewPatient'])
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pending-emr-container {
|
||||
padding: 20px;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.search-card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
219
openhis-ui-vue3/src/views/doctorstation/pendingEmr.vue
Normal file
219
openhis-ui-vue3/src/views/doctorstation/pendingEmr.vue
Normal file
@@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<div class="pending-emr-page">
|
||||
<!-- 页面头部 -->
|
||||
<div class="page-header">
|
||||
<h2>
|
||||
<el-icon style="margin-right: 8px;">
|
||||
<Document />
|
||||
</el-icon>
|
||||
待写病历
|
||||
</h2>
|
||||
<div class="header-actions">
|
||||
<el-button type="primary" @click="refreshList">
|
||||
<el-icon>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
刷新
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 搜索区域 -->
|
||||
<el-card class="search-card">
|
||||
<el-form :model="queryParams" inline>
|
||||
<el-form-item label="患者姓名">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入患者姓名"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<el-icon>
|
||||
<Search />
|
||||
</el-icon>
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<el-icon>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<el-table
|
||||
:data="emrList"
|
||||
v-loading="loading"
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="busNo" label="病历号" width="150" />
|
||||
<el-table-column prop="gender" label="性别" width="80">
|
||||
<template #default="{ row }">
|
||||
{{ getGenderText(row.gender) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="age" label="年龄" width="80" />
|
||||
<el-table-column prop="registerTime" label="挂号时间" width="180">
|
||||
<template #default="{ row }">
|
||||
{{ parseTime(row.registerTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click.stop="handleWriteEmr(row)">写病历</el-button>
|
||||
<span class="table-divider">|</span>
|
||||
<el-button link type="primary" @click.stop="handleViewPatient(row)">查看患者</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:size="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { listPendingEmr, getPendingEmrCount } from '@/views/doctorstation/components/api.js'
|
||||
import { parseTime } from '@/utils/index.js'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { Document, Refresh, Search, Delete } from '@element-plus/icons-vue'
|
||||
import { ElDivider } from 'element-plus'
|
||||
|
||||
// 响应式数据
|
||||
const loading = ref(true)
|
||||
const total = ref(0)
|
||||
const emrList = ref([])
|
||||
|
||||
// 查询参数
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
patientName: undefined
|
||||
})
|
||||
|
||||
// 获取待写病历列表
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const response = await listPendingEmr(queryParams)
|
||||
// 根据后端返回的数据结构调整
|
||||
if (response.code === 200) {
|
||||
emrList.value = response.data || []
|
||||
total.value = Array.isArray(response.data) ? response.data.length : 0
|
||||
} else {
|
||||
ElMessage.error(response.msg || '获取待写病历列表失败')
|
||||
emrList.value = []
|
||||
total.value = 0
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取待写病历列表失败:', error)
|
||||
ElMessage.error('获取待写病历列表失败')
|
||||
emrList.value = []
|
||||
total.value = 0
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNum = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
queryParams.patientName = undefined
|
||||
queryParams.pageNum = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
// 刷新列表
|
||||
const refreshList = () => {
|
||||
getList()
|
||||
}
|
||||
|
||||
// 行点击事件
|
||||
const handleRowClick = (row) => {
|
||||
// 可以在这里处理行点击事件
|
||||
console.log('点击行:', row)
|
||||
}
|
||||
|
||||
// 写病历
|
||||
const handleWriteEmr = (row) => {
|
||||
console.log('写病历:', row)
|
||||
// 这里可以触发写病历事件
|
||||
// 可能需要跳转到病历编辑页面
|
||||
}
|
||||
|
||||
// 查看患者
|
||||
const handleViewPatient = (row) => {
|
||||
console.log('查看患者:', row)
|
||||
// 这里可以触发查看患者事件
|
||||
}
|
||||
|
||||
// 获取性别文本
|
||||
const getGenderText = (genderValue) => {
|
||||
const genderMap = {
|
||||
1: '男',
|
||||
2: '女'
|
||||
}
|
||||
return genderMap[genderValue] || '未知'
|
||||
}
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pending-emr-page {
|
||||
padding: 20px;
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.el-icon {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.table-divider {
|
||||
margin: 0 8px;
|
||||
color: #dcdfe6;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user