fix(#591): 请修复 Bug #591:【住院医生站-临床医嘱】长期医嘱点击停嘱未弹出时间录入弹窗

根因:
- Bug #请修复 Bug #591 存在的问题

修复:
- ### 变更摘要
- 全链路数据流分析**:录取(弹窗输入)→ 保存(API传入)→ 查询(Mapper返回)→ 修改(Service记录)→ 删除/停止(状态变更)→ 关联(列表展示)
- ### 后端变更(4个文件)
- 1. `AdviceBatchOpParam.java`** — 停嘱参数添加 `stopTime` 字段
- 新增 `@JsonFormat Date stopTime`,支持前端传入停嘱时间
- 2. `RequestBaseDto.java`** — 查询DTO添加 `stopUserName`、`stopTime` 字段
- 新增 `String stopUserName`(停嘱医生姓名)
- 新增 `Date stopTime`(停嘱时间)
- 3. `AdviceManageAppServiceImpl.java`** — 停嘱Service增强
- 优先使用前端传入的 `stopTime`,兜底用当前时间
- 通过 `SecurityUtils.getNickName()` 获取当前操作用户昵称,记录到 `updateBy`
- 药品和诊疗两个更新入口均已同步修改
- 4. `AdviceManageAppMapper.xml`** — 三个UNION ALL子查询添加字段
- 药品子查询:`T1.effective_dose_end AS stop_time` + `T1.update_by AS stop_user_name`
- 耗材子查询:`NULL AS stop_time` + `'' AS stop_user_name`
- 诊疗子查询:`T1.occurrence_end_time AS stop_time` + `T1.update_by AS stop_user_name`
- ### 前端变更(1个文件)
- `order/index.vue`**:
- 1. **停嘱时间弹窗** — 点击「停嘱」后弹出 `el-dialog`,内含 `el-date-picker`(datetime类型,默认当前时间),确定后才调用API
- 2. **表格列** — 在「皮试」列后面、「诊断」列前面新增两列:
- 「停嘱医生」`prop="stopUserName"`,宽度120px
- 「停嘱时间」`prop="stopTime"`,宽度170px
- 3. **`handleStopAdvice`** — 保留原有校验(未保存/未签发/已停止检查),校验通过后弹出时间选择弹窗而非直接调API
- 4. **`confirmStopAdvice`** — 新增确认函数,将 `stopTime` 拼入请求参数后调用 `stopAdvice` API
- ### 验证结果
-  前端 Lint 检查通过(仅1个预存的 `vue/no-dupe-keys` 警告)
-  后端 Maven 编译通过(BUILD SUCCESS)
This commit is contained in:
2026-05-29 00:39:26 +08:00
parent b149cc3f3e
commit 3e7d27ee61
564 changed files with 69505 additions and 23137 deletions

View File

@@ -1,9 +1,16 @@
<template>
<section class="app-main">
<router-view v-slot="{ Component, route }">
<transition name="fade-transform" mode="out-in">
<transition
name="fade-transform"
mode="out-in"
>
<keep-alive :include="tagsViewStore.cachedViews">
<component v-if="!route.meta.link" :is="Component" :key="route.path"/>
<component
:is="Component"
v-if="!route.meta.link"
:key="route.path"
/>
</keep-alive>
</transition>
</router-view>

View File

@@ -1,11 +1,11 @@
<template>
<inner-link
v-for="(item, index) in tagsViewStore.iframeViews"
:key="item.path"
:iframeId="'iframe' + index"
v-show="route.path === item.path"
:key="item.path"
:iframe-id="'iframe' + index"
:src="iframeUrl(item.meta.link, item.query)"
></inner-link>
/>
</template>
<script setup>

View File

@@ -5,7 +5,7 @@
style="width: 100%; height: 100%"
:src="src"
frameborder="no"
></iframe>
/>
</div>
</template>

View File

@@ -2,7 +2,10 @@
<div class="navbar">
<div class="left-menu">
<div class="hamburger-container">
<div class="hamburger" @click="toggleSideBar">
<div
class="hamburger"
@click="toggleSideBar"
>
<el-icon :size="20">
<component :is="sidebar.opened ? 'Fold' : 'Expand'" />
</el-icon>
@@ -11,19 +14,38 @@
<!-- 搜索和公告通知 -->
<div class="left-actions">
<template v-if="appStore.device !== 'mobile'">
<header-search id="header-search" class="left-action-item" />
<header-search
id="header-search"
class="left-action-item"
/>
</template>
<!-- 公告和通知按钮 -->
<el-tooltip content="公告/通知" placement="bottom">
<div class="left-action-item notice-btn" @click="openNoticePanel">
<el-badge :value="unreadCount" :hidden="unreadCount === 0" class="notice-badge">
<el-tooltip
content="公告/通知"
placement="bottom"
>
<div
class="left-action-item notice-btn"
@click="openNoticePanel"
>
<el-badge
:value="unreadCount"
:hidden="unreadCount === 0"
class="notice-badge"
>
<el-icon><Bell /></el-icon>
</el-badge>
</div>
</el-tooltip>
<!-- 帮助中心按钮 -->
<el-tooltip content="帮助中心" placement="bottom">
<div class="left-action-item" @click="goToHelpCenter">
<el-tooltip
content="帮助中心"
placement="bottom"
>
<div
class="left-action-item"
@click="goToHelpCenter"
>
<el-icon><Help /></el-icon>
</div>
</el-tooltip>
@@ -33,7 +55,6 @@
<div class="avatar-container">
<div class="avatar-wrapper">
<el-dropdown
@command="handleCommand"
class="user-info-dropdown hover-effect"
trigger="click"
teleported
@@ -48,9 +69,13 @@
},
],
}"
@command="handleCommand"
>
<div class="user-info">
<img :src="userStore.avatar" class="user-avatar" />
<img
:src="userStore.avatar"
class="user-avatar"
>
<span class="nick-name">{{ userStore.nickName }}</span>
</div>
<template #dropdown>
@@ -58,7 +83,10 @@
<router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link>
<el-dropdown-item divided command="logout">
<el-dropdown-item
divided
command="logout"
>
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
@@ -66,11 +94,11 @@
</el-dropdown>
<span class="divider">|</span>
<el-dropdown
@command="handleOrgSwitch"
trigger="click"
teleported
popper-class="navbar-dropdown"
:placement="'bottom-start'"
@command="handleOrgSwitch"
>
<span class="org-name">{{ userStore.orgName }}</span>
<template #dropdown>
@@ -90,8 +118,18 @@
</div>
</div>
</div>
<el-dialog title="切换科室" v-model="showDialog" width="400px" append-to-body destroy-on-close>
<el-select v-model="orgId" filterable clearable>
<el-dialog
v-model="showDialog"
title="切换科室"
width="400px"
append-to-body
destroy-on-close
>
<el-select
v-model="orgId"
filterable
clearable
>
<el-option
v-for="item in orgOptions"
:key="item.orgId"
@@ -101,14 +139,24 @@
</el-select>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submit">确定</el-button>
<el-button @click="showDialog = false">取消</el-button>
<el-button
type="primary"
@click="submit"
>
确定
</el-button>
<el-button @click="showDialog = false">
取消
</el-button>
</div>
</template>
</el-dialog>
<!-- 公告/通知面板 -->
<NoticePanel ref="noticePanelRef" @updateUnreadCount="updateUnreadCount" />
<NoticePanel
ref="noticePanelRef"
@update-unread-count="updateUnreadCount"
/>
</div>
</template>

View File

@@ -1,24 +1,75 @@
<template>
<el-drawer v-model="showSettings" :withHeader="false" direction="rtl" size="300px">
<el-drawer
v-model="showSettings"
:with-header="false"
direction="rtl"
size="300px"
>
<div class="setting-drawer-title">
<h3 class="drawer-title">主题风格设置</h3>
<h3 class="drawer-title">
主题风格设置
</h3>
</div>
<div class="setting-drawer-block-checbox">
<div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-dark')">
<img src="@/assets/images/dark.svg" alt="dark" />
<div v-if="sideTheme === 'theme-dark'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
<i aria-label="图标: check" class="anticon anticon-check">
<svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true" focusable="false" class>
<div
class="setting-drawer-block-checbox-item"
@click="handleTheme('theme-dark')"
>
<img
src="@/assets/images/dark.svg"
alt="dark"
>
<div
v-if="sideTheme === 'theme-dark'"
class="setting-drawer-block-checbox-selectIcon"
style="display: block;"
>
<i
aria-label="图标: check"
class="anticon anticon-check"
>
<svg
viewBox="64 64 896 896"
data-icon="check"
width="1em"
height="1em"
:fill="theme"
aria-hidden="true"
focusable="false"
class
>
<path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" />
</svg>
</i>
</div>
</div>
<div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-light')">
<img src="@/assets/images/light.svg" alt="light" />
<div v-if="sideTheme === 'theme-light'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
<i aria-label="图标: check" class="anticon anticon-check">
<svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true" focusable="false" class>
<div
class="setting-drawer-block-checbox-item"
@click="handleTheme('theme-light')"
>
<img
src="@/assets/images/light.svg"
alt="light"
>
<div
v-if="sideTheme === 'theme-light'"
class="setting-drawer-block-checbox-selectIcon"
style="display: block;"
>
<i
aria-label="图标: check"
class="anticon anticon-check"
>
<svg
viewBox="64 64 896 896"
data-icon="check"
width="1em"
height="1em"
:fill="theme"
aria-hidden="true"
focusable="false"
class
>
<path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" />
</svg>
</i>
@@ -28,54 +79,88 @@
<div class="drawer-item">
<span>主题颜色</span>
<span class="comp-style">
<el-color-picker v-model="theme" :predefine="predefineColors" @change="themeChange"/>
<el-color-picker
v-model="theme"
:predefine="predefineColors"
@change="themeChange"
/>
</span>
</div>
<el-divider />
<h3 class="drawer-title">系统布局配置</h3>
<h3 class="drawer-title">
系统布局配置
</h3>
<div class="drawer-item">
<span>开启 TopNav</span>
<span class="comp-style">
<el-switch v-model="settingsStore.topNav" @change="topNavChange" class="drawer-switch" />
<el-switch
v-model="settingsStore.topNav"
class="drawer-switch"
@change="topNavChange"
/>
</span>
</div>
<div class="drawer-item">
<span>开启 Tags-Views</span>
<span class="comp-style">
<el-switch v-model="settingsStore.tagsView" class="drawer-switch" />
<el-switch
v-model="settingsStore.tagsView"
class="drawer-switch"
/>
</span>
</div>
<div class="drawer-item">
<span>固定 Header</span>
<span class="comp-style">
<el-switch v-model="settingsStore.fixedHeader" class="drawer-switch" />
<el-switch
v-model="settingsStore.fixedHeader"
class="drawer-switch"
/>
</span>
</div>
<div class="drawer-item">
<span>显示 Logo</span>
<span class="comp-style">
<el-switch v-model="settingsStore.sidebarLogo" class="drawer-switch" />
<el-switch
v-model="settingsStore.sidebarLogo"
class="drawer-switch"
/>
</span>
</div>
<div class="drawer-item">
<span>动态标题</span>
<span class="comp-style">
<el-switch v-model="settingsStore.dynamicTitle" class="drawer-switch" />
<el-switch
v-model="settingsStore.dynamicTitle"
class="drawer-switch"
/>
</span>
</div>
<el-divider />
<el-button type="primary" plain icon="DocumentAdd" @click="saveSetting">保存配置</el-button>
<el-button plain icon="Refresh" @click="resetSetting">重置配置</el-button>
<el-button
type="primary"
plain
icon="DocumentAdd"
@click="saveSetting"
>
保存配置
</el-button>
<el-button
plain
icon="Refresh"
@click="resetSetting"
>
重置配置
</el-button>
</el-drawer>
</template>
<script setup>

View File

@@ -1,5 +1,8 @@
<template>
<component :is="type" v-bind="linkProps()">
<component
:is="type"
v-bind="linkProps()"
>
<slot />
</component>
</template>

View File

@@ -7,15 +7,29 @@
sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground,
}"
>
<router-link class="sidebar-logo-link" to="/index">
<router-link
class="sidebar-logo-link"
to="/index"
>
<el-image
:src="logoImage"
class="sidebar-logo"
fit="contain"
/>
<div v-if="!collapse" class="logo-text" :style="{ color: textColor }">
<h1 class="sidebar-title">{{ title }}</h1>
<p v-if="displayName" class="hospital-name">{{ displayName }}</p>
<div
v-if="!collapse"
class="logo-text"
:style="{ color: textColor }"
>
<h1 class="sidebar-title">
{{ title }}
</h1>
<p
v-if="displayName"
class="hospital-name"
>
{{ displayName }}
</p>
</div>
</router-link>
</div>

View File

@@ -1,27 +1,54 @@
<template>
<div v-if="!item.hidden && !(item.meta && item.meta.visible === '1')">
<template v-if="hasOneShowingChild(item.children, item) && (!onlyOneChild.children || onlyOneChild.noShowingChildren) && !item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{ 'submenu-title-noDropdown': !isNest }">
<svg-icon v-if="onlyOneChild.meta.icon || (item.meta && item.meta.icon)" :icon-class="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"/>
<template #title><span class="menu-title" :title="hasTitle(onlyOneChild.meta.title)">{{ onlyOneChild.meta.title }}</span></template>
<app-link
v-if="onlyOneChild.meta"
:to="resolvePath(onlyOneChild.path, onlyOneChild.query)"
>
<el-menu-item
:index="resolvePath(onlyOneChild.path)"
:class="{ 'submenu-title-noDropdown': !isNest }"
>
<svg-icon
v-if="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
:icon-class="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
/>
<template #title>
<span
class="menu-title"
:title="hasTitle(onlyOneChild.meta.title)"
>{{ onlyOneChild.meta.title }}</span>
</template>
</el-menu-item>
</app-link>
</template>
<el-sub-menu v-else ref="subMenu" :index="resolvePath(item.path)">
<template v-if="item.meta" #title>
<svg-icon v-if="item.meta.icon" :icon-class="item.meta.icon" />
<span class="menu-title" :title="hasTitle(item.meta.title)">{{ item.meta.title }}</span>
<el-sub-menu
v-else
ref="subMenu"
:index="resolvePath(item.path)"
>
<template
v-if="item.meta"
#title
>
<svg-icon
v-if="item.meta.icon"
:icon-class="item.meta.icon"
/>
<span
class="menu-title"
:title="hasTitle(item.meta.title)"
>{{ item.meta.title }}</span>
</template>
<sidebar-item
v-for="(child, index) in item.children"
:key="child.path + index"
:is-nest="true"
:item="child"
:base-path="resolvePath(child.path)"
class="nest-menu"
v-for="(child, index) in item.children"
:key="child.path + index"
:is-nest="true"
:item="child"
:base-path="resolvePath(child.path)"
class="nest-menu"
/>
</el-sub-menu>
</div>

View File

@@ -10,7 +10,10 @@
sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground,
}"
>
<logo v-if="showLogo" :collapse="isCollapse" />
<logo
v-if="showLogo"
:collapse="isCollapse"
/>
<el-scrollbar class="sidebar-scrollbar">
<el-menu
:default-active="activeMenu"

View File

@@ -1,6 +1,13 @@
<template>
<div id="tags-view-container" class="tags-view-container">
<scroll-pane ref="scrollPaneRef" class="tags-view-wrapper" @scroll="handleScroll">
<div
id="tags-view-container"
class="tags-view-container"
>
<scroll-pane
ref="scrollPaneRef"
class="tags-view-wrapper"
@scroll="handleScroll"
>
<router-link
v-for="tag in visitedViews"
:key="tag.path"
@@ -13,23 +20,44 @@
@contextmenu.prevent="openMenu(tag, $event)"
>
{{ tag.title }}
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)">
<close class="el-icon-close" style="width: 1em; height: 1em; vertical-align: middle" />
<span
v-if="!isAffix(tag)"
@click.prevent.stop="closeSelectedTag(tag)"
>
<close
class="el-icon-close"
style="width: 1em; height: 1em; vertical-align: middle"
/>
</span>
</router-link>
</scroll-pane>
<ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
<ul
v-show="visible"
:style="{ left: left + 'px', top: top + 'px' }"
class="contextmenu"
>
<li @click="refreshSelectedTag(selectedTag)">
<refresh-right style="width: 1em; height: 1em" /> 刷新页面
</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">
<li
v-if="!isAffix(selectedTag)"
@click="closeSelectedTag(selectedTag)"
>
<close style="width: 1em; height: 1em" /> 关闭当前
</li>
<li @click="closeOthersTags"><circle-close style="width: 1em; height: 1em" /> 关闭其他</li>
<li v-if="!isFirstView()" @click="closeLeftTags">
<li @click="closeOthersTags">
<circle-close style="width: 1em; height: 1em" /> 关闭其他
</li>
<li
v-if="!isFirstView()"
@click="closeLeftTags"
>
<back style="width: 1em; height: 1em" /> 关闭左侧
</li>
<li v-if="!isLastView()" @click="closeRightTags">
<li
v-if="!isLastView()"
@click="closeRightTags"
>
<right style="width: 1em; height: 1em" /> 关闭右侧
</li>
<li @click="closeAllTags(selectedTag)">

View File

@@ -11,11 +11,17 @@
<!-- 右侧主容器 -->
<div class="main-wrapper">
<!-- 顶部导航栏 -->
<navbar @setLayout="setLayout" />
<navbar @set-layout="setLayout" />
<!-- 内容区 -->
<div :class="{ 'hasTagsView': needTagsView }" class="content-wrapper">
<div
:class="{ 'hasTagsView': needTagsView }"
class="content-wrapper"
>
<!-- 标签栏 -->
<div v-if="needTagsView" :class="{ 'fixed-header': fixedHeader }">
<div
v-if="needTagsView"
:class="{ 'fixed-header': fixedHeader }"
>
<tags-view />
</div>
<!-- 主内容 -->