From a96168050125b5607bd3a1a8464996935ed90360 Mon Sep 17 00:00:00 2001 From: ChenQiuYu Date: Tue, 6 May 2025 12:02:29 +0800 Subject: [PATCH] dev --- src/assets/config/apiConfig.ts | 1 + src/components/charge/ChargeQueue.vue | 1 - src/components/common/Header.vue | 35 +++++++++-- src/components/registration/Edit.vue | 49 +++++++++++++-- src/components/registration/List.vue | 90 ++++++++++++++++++--------- src/views/Login.vue | 36 +++++++---- src/views/outpatient/index.vue | 1 + src/views/registration/index.vue | 57 ++++++++++++----- 8 files changed, 201 insertions(+), 69 deletions(-) diff --git a/src/assets/config/apiConfig.ts b/src/assets/config/apiConfig.ts index a4ff29f..ea4c0f6 100644 --- a/src/assets/config/apiConfig.ts +++ b/src/assets/config/apiConfig.ts @@ -5,6 +5,7 @@ export enum apiConfig{ "ManagerLogin"="manager/user/login",//登录 "signIn"="sign/in",//签到 "signOut"="sign/out",//签退 + "getInfo"="manager/user/verify",//获取用户信息 /** * 接诊操作 */ diff --git a/src/components/charge/ChargeQueue.vue b/src/components/charge/ChargeQueue.vue index e7d8b23..a59ff3f 100644 --- a/src/components/charge/ChargeQueue.vue +++ b/src/components/charge/ChargeQueue.vue @@ -85,7 +85,6 @@ const clickFirst = () => { clickItem(ChargeQueueList.value[0]) } const getOrderList = () => { - debugger post("medical/record/getChargeQueue", {query: query.value}).then( (res: any) => { ChargeQueueList.value = res.list diff --git a/src/components/common/Header.vue b/src/components/common/Header.vue index c114873..91aa20d 100644 --- a/src/components/common/Header.vue +++ b/src/components/common/Header.vue @@ -11,8 +11,9 @@ 医保 统计 设置 -
- 退出登录 +
+ {{username}} + 退出登录
@@ -146,12 +147,24 @@ header { padding: 15px 0; } -.btn { +.info { color: #FFF; font-size: 18px; float: right; - margin-right: 24px; - margin-top: 10px; + display: flex; + align-items: center; // 垂直居中 + .username{ + display: inline-block; + height: 50px; + line-height: 50px; + } + .hover{ + margin-left: 10px; + cursor: pointer; + &:hover{ + color: #4d6de4 !important; + } + } } diff --git a/src/components/registration/Edit.vue b/src/components/registration/Edit.vue index eb2dd85..6c2598b 100644 --- a/src/components/registration/Edit.vue +++ b/src/components/registration/Edit.vue @@ -24,16 +24,16 @@ - + - + - - + + @@ -42,6 +42,21 @@ + + + + + + + + @@ -89,8 +105,19 @@ - - + + + + + + + + + + + + @@ -152,6 +179,8 @@ import Mask from "@/components/common/Mask.vue"; import psnCertTypes from "@/assets/config/directory/psnCertTypes.json" import {getKey} from "@/utils/discrotyUtil.ts"; import insutypes from "@/assets/config/directory/insutypes.json" +import depts from "@/assets/config/directory/depts.json"; + // 定义医生选项的接口 interface Doctor { @@ -259,6 +288,7 @@ const socialCard: any = ref({ const id = ref(null) const init = () => { isShow.value = true + list() edit_data.value.organizationDoctorId = props.doctorId id.value = props.id if (id.value) { @@ -299,10 +329,17 @@ const deleteCard = () => { const showBtn = ref(false) const showCardBtn = () => { showBtn.value = true + } const hide = () => { showBtn.value = false } +const sectionList = ref([]) +const list = () => { + post('organization/section/allList').then((res: any) => { + sectionList.value = res + }) +} defineExpose({init}) \ No newline at end of file diff --git a/src/views/Login.vue b/src/views/Login.vue index 317f688..3886e40 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -12,6 +12,7 @@ import {useWsStore} from "@/stores/wsStore.ts"; const username = ref('') const password = ref('') const router = useRouter(); +const loading = ref(false) interface NetWorkType { ip: string, @@ -25,6 +26,7 @@ const netWork = ref({ const handleLogin = () => { + loading.value = true if (netWork.value.mac == "00-00-00-00-00") { //提示 获取本地IP地址失败,将使用默认IP地址 ElMessage({ @@ -33,33 +35,40 @@ const handleLogin = () => { duration: 1000, }) } - - - post(apiConfig.ManagerLogin, {username: username.value, password: password.value}).then((token: any) => { + post(apiConfig.ManagerLogin, {username: username.value, password: password.value},{catch_error: true}).then((token: any) => { localStorage.setItem('token', token) //签到,如果 签到成功,则直接调用success,如果失败,调用error + ElMessage({ + message: "登录成功,正在读卡签到,请稍后...", + type: 'success', + duration: 1000, + }) post(apiConfig.signIn, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true}).then((res: any) => { success() }).catch(() => { error() }) + }).catch(() => { + loading.value = false }) } const success = () => { - ElMessage({ - message: "登录成功,即将为您跳转到首页", - type: 'success', - duration: 1000, - onClose: () => { + loading.value = false + ElMessageBox.alert('登录成功且签到,即将为您进入到首页', '签到提示', { + type:'success', + showClose: false, + callback: (action: Action) => { router.push("/home/index") - } + }, }) } const error = () => { - ElMessageBox.alert('签到失败,我们将已非签到模式启动系统', '签到提示', { + loading.value = false + ElMessageBox.alert('读卡签到失败,我们将以非签到模式启动系统', '签到提示', { confirmButtonText: '确定', + type:'error', showClose: false, callback: (action: Action) => { router.push("/home/index") @@ -105,7 +114,10 @@ const showAuth = () => {
-