mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 04:54:58 +08:00
This commit is contained in:
parent
6679c19a0b
commit
4b40bec196
|
@ -215,6 +215,11 @@ body {
|
|||
background: rgba($main-color, .05);
|
||||
}
|
||||
}
|
||||
.el-button.is-round {
|
||||
height: 28px;
|
||||
padding: 5px 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.pagination-part {
|
||||
|
|
|
@ -1,48 +1,88 @@
|
|||
<template>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="80">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户名" prop="userName">
|
||||
<el-input v-model="formData.userName" placeholder="请输入用户名" :disabled="type === 'edit'"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="60" :disabled="type === 'edit'">
|
||||
<el-row :gutter="gutter">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入姓名"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="角色" prop="role">
|
||||
<el-select v-model="formData.role" placeholder="请选择角色">
|
||||
<el-option v-for="item in roleOption" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-form-item label="住院号" prop="code" :label-width="rightWidth">
|
||||
<el-input v-model="formData.code" placeholder="请输入住院号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="gutter">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-radio-group v-model="formData.sex">
|
||||
<el-radio label="男">男</el-radio>
|
||||
<el-radio label="女">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="科室" prop="dept" :label-width="rightWidth">
|
||||
<el-select v-model="formData.dept" placeholder="请选择科室">
|
||||
<el-option v-for="item in getDeptData()" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="gutter">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱" prop="mailbox">
|
||||
<el-input v-model="formData.mailbox" placeholder="请输入邮箱"></el-input>
|
||||
<el-form-item label="身高" prop="bodyHeight">
|
||||
<el-input v-model="formData.bodyHeight" placeholder="请输入电话"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="有无病史" prop="isMedicalHistory" :label-width="rightWidth">
|
||||
<el-radio-group v-model="formData.isMedicalHistory">
|
||||
<el-radio label="无">无</el-radio>
|
||||
<el-radio label="有">有</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-row :gutter="gutter">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="体重" prop="bodyWeight">
|
||||
<el-input v-model="formData.bodyWeight" placeholder="请输入体重"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="病史名称" prop="medicalHistoryName" :label-width="rightWidth">
|
||||
<el-input v-model="formData.medicalHistoryName" placeholder="请输入病史"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="gutter">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input v-model="formData.age" placeholder="请输入年龄"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="过敏史名称" prop="allergyHistoryName" :label-width="rightWidth">
|
||||
<el-input v-model="formData.medicalHistoryName" placeholder="请输入过敏史"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="gutter">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input v-model="formData.phone" placeholder="请输入电话"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用" prop="time">
|
||||
<el-radio-group v-model="formData.enable">
|
||||
<el-radio :label="true" border>有效</el-radio>
|
||||
<el-radio :label="false" border>禁用</el-radio>
|
||||
</el-radio-group>
|
||||
<el-form-item label="住院时间" prop="hospitalTime" :label-width="rightWidth">
|
||||
<el-date-picker v-model="formData.hospitalTime" type="date" placeholder="请输入住院时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div style="text-align: right;padding-top: 80px;">
|
||||
<div v-if="type !== 'edit'" style="text-align: right;">
|
||||
<el-button class="f18" @click="close">取消</el-button>
|
||||
<el-button class="f18" type="primary" @click="saveData">确认</el-button>
|
||||
</div>
|
||||
|
@ -52,6 +92,7 @@
|
|||
<script lang='ts' setup>
|
||||
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getDeptData } from '@/static-data/core'
|
||||
|
||||
const emit = defineEmits(['close'])
|
||||
|
||||
|
@ -59,23 +100,20 @@ const props = defineProps({
|
|||
type: String
|
||||
})
|
||||
|
||||
const roleOption = [
|
||||
{ label: '普通用户', value: '普通用户' },
|
||||
{ label: '中级管理员', value: '中级管理员' },
|
||||
{ label: '高级管理员', value: '高级管理员' },
|
||||
]
|
||||
const gutter = 20
|
||||
const rightWidth = 100
|
||||
const rules = reactive({
|
||||
userName: [
|
||||
{ required: true, message: '请输入用户名', trigger: ['blur', 'change'] },
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入姓名', trigger: ['blur', 'change'] },
|
||||
],
|
||||
role: [
|
||||
{ required: true, message: '请选择角色', trigger: ['blur', 'change'] },
|
||||
code: [
|
||||
{ required: true, message: '请输入住院号', trigger: ['blur', 'change'] },
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '请输入电话', trigger: ['blur', 'change'] },
|
||||
dept: [
|
||||
{ required: true, message: '请选择科室', trigger: ['blur', 'change'] },
|
||||
],
|
||||
hospitalTime: [
|
||||
{ required: true, message: '请输入住院时间', trigger: ['blur', 'change'] },
|
||||
],
|
||||
})
|
||||
|
||||
|
@ -131,7 +169,8 @@ const saveData = async () => {
|
|||
display: block;
|
||||
text-align: justify;
|
||||
text-align-last: justify;
|
||||
padding: 0 10px 0 20px;
|
||||
// padding: 0 10px 0 20px;
|
||||
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -28,23 +28,19 @@
|
|||
@row-click="tableRowClick">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="#" width="55" align="center" />
|
||||
<el-table-column property="code" label="住院号" width="120" align="center" />
|
||||
<el-table-column property="name" label="姓名" width="120" align="center" />
|
||||
<el-table-column label="手机号" width="220" align="center">
|
||||
<template #default="scope">{{ scope.row.phone.slice(0, 3) + '****' + scope.row.phone.slice(7)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="role" label="角色" width="220" align="center" />
|
||||
<el-table-column label="启用" width="120" align="center">
|
||||
<el-table-column property="dept" label="科室" width="160" align="center" />
|
||||
<el-table-column property="doctor" label="主诊医生" width="160" align="center" />
|
||||
<el-table-column label="手术数据" header-align="center">
|
||||
<template #default="scope">
|
||||
<span @click.stop><el-switch v-model="scope.row.enable" @change="enableChange(scope.row)" /></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<span @click.stop>
|
||||
<el-button link icon="RefreshLeft" @click="resetPassword(scope.row)">密码</el-button>
|
||||
<el-button link icon="EditPen" @click="editData(scope.row)">修改</el-button>
|
||||
<el-button link icon="Delete" @click="removeData(scope.row)">删除</el-button>
|
||||
<span @click.stop style="padding: 0 50px;">
|
||||
<el-button v-if="scope.row.userInfo" type="primary" round @click="viewUserInfo(scope.row)">个人信息</el-button>
|
||||
<el-button v-if="scope.row.surgeryInfo" type="primary" round @click="viewSurgeryInfo(scope.row)">手术信息</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -54,8 +50,8 @@
|
|||
<CommonPagination :total="100" @paginationChange="paginationChange" />
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog v-model="isFormDialog" :title="formDialogTitle" width="40%"><PatientsForm ref="patientsFormRef" :type="formDialogTitle === '添加' ? 'add' : 'edit'" @close="isFormDialog = false" /></el-dialog>
|
||||
<ImportDialog ref="importDialogRef" title="用户导入" templateUrl="#" importUrl="#" />
|
||||
<el-dialog v-model="isFormDialog" :title="formDialogTitle" width="40%"><PatientsForm ref="patientsFormRef" :type="formDialogTitle === '增加患者' ? 'add' : 'edit'" @close="isFormDialog = false" /></el-dialog>
|
||||
<ImportDialog ref="importDialogRef" title="患者导入" templateUrl="#" importUrl="#" />
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
|
@ -73,29 +69,32 @@ const importDialogRef = ref()
|
|||
const isFormDialog = ref(false)
|
||||
const formDialogTitle = ref('')
|
||||
const queryParams = ref({
|
||||
userName: ''
|
||||
name: '',
|
||||
dept: ''
|
||||
} as any)
|
||||
const tableData = ref([] as any)
|
||||
|
||||
queryData({user: '测试', dept: getDeptData()[0].label})
|
||||
queryData({name: '测试', dept: getDeptData()[0].label})
|
||||
|
||||
function queryData (e: any) {
|
||||
tableData.value = []
|
||||
while (tableData.value.length < 10) {
|
||||
tableData.value.push({
|
||||
userName: 'cscs',
|
||||
// hospital
|
||||
name: e.userName,
|
||||
code: '123456', // 住院号
|
||||
name: e.name,
|
||||
phone: '12312345678',
|
||||
role: '高级管理员',
|
||||
enable: true,
|
||||
dept: e.dept,
|
||||
doctor: '张医生',
|
||||
userInfo: Boolean(tableData.value.length < 2),
|
||||
surgeryInfo: Boolean(tableData.value.length < 1)
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const addData = () => {
|
||||
isFormDialog.value = true
|
||||
formDialogTitle.value = '添加'
|
||||
formDialogTitle.value = '增加患者'
|
||||
setTimeout(() => {
|
||||
patientsFormRef.value.resetData()
|
||||
}, 0)
|
||||
|
@ -113,21 +112,16 @@ const removeData = (e?: any) => {
|
|||
}
|
||||
})
|
||||
}
|
||||
const enableChange = (e: any) => {
|
||||
|
||||
}
|
||||
const resetPassword = (e: any) => {
|
||||
ElMessageBox.confirm('是否确定要重置密码?', '系统提醒', { type: 'warning' }).then(() => {
|
||||
ElMessage.success('重置成功!')
|
||||
}).catch(() => { })
|
||||
}
|
||||
const editData = (e: any) => {
|
||||
const viewUserInfo = (e: any) => {
|
||||
isFormDialog.value = true
|
||||
formDialogTitle.value = '修改'
|
||||
formDialogTitle.value = '个人信息'
|
||||
setTimeout(() => {
|
||||
patientsFormRef.value.resetData()
|
||||
patientsFormRef.value.formData = e
|
||||
}, 0)
|
||||
}
|
||||
const viewSurgeryInfo = (e: any) => {
|
||||
|
||||
}
|
||||
const tableRowClick = (row: any) => {
|
||||
tableRef.value.toggleRowSelection(row)
|
||||
|
|
|
@ -1,14 +1,40 @@
|
|||
<template>
|
||||
<div>
|
||||
|
||||
<div class="surgery-info-page">
|
||||
<div class="header-box">
|
||||
<h3 class="f18">电子病史</h3>
|
||||
<div class="btn-box">
|
||||
<el-button></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.surgery-info-page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.header-box {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border-bottom: 1px solid $border-color;
|
||||
padding-bottom: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h3 {
|
||||
color: $main-color;
|
||||
}
|
||||
.btn-box {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -100,12 +100,13 @@ const breakRemote = (e: RemoteItem) => {
|
|||
|
||||
.header-box {
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
height: 190px;
|
||||
background: white;
|
||||
padding: 20px 50px;
|
||||
padding: 10px 50px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.task-btn-item {
|
||||
cursor: pointer;
|
||||
|
@ -146,7 +147,7 @@ const breakRemote = (e: RemoteItem) => {
|
|||
|
||||
.content-box {
|
||||
width: 100%;
|
||||
height: calc(100% - 235px);
|
||||
height: calc(100% - 205px);
|
||||
margin-top: 15px;
|
||||
background: white;
|
||||
padding: 20px 50px;
|
||||
|
|
Loading…
Reference in New Issue
Block a user