|
@@ -4,11 +4,16 @@
|
|
|
住院号:
|
|
|
<el-input style="width: 120px" v-model="patNo" clearable/>
|
|
|
<el-button @click="queryClick">查询</el-button>
|
|
|
+ <span style="margin-left: 12px; color: #8e8e8e">提示:
|
|
|
+ <span style="font-weight: bold;color: #727272">双击</span>
|
|
|
+ 危急值条目可快速处理该危急值。</span>
|
|
|
</el-header>
|
|
|
|
|
|
<el-main>
|
|
|
- <xc-table :local-data="data" :height="20">
|
|
|
+ <xc-table :local-data="data" :final-height="tableHeight" small @rowDblClick="handle">
|
|
|
<el-table-column label="危急值" prop="content"/>
|
|
|
+ <el-table-column label="处理人" prop="handleStaffName" width="70"/>
|
|
|
+ <el-table-column label="处理时间" prop="handleTime" width="135"/>
|
|
|
</xc-table>
|
|
|
</el-main>
|
|
|
|
|
@@ -17,12 +22,20 @@
|
|
|
|
|
|
<script setup name='CriticalValue'>
|
|
|
import {huanZheXinXi} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
|
|
|
-import {getCriticalValues} from "@/api/zhu-yuan-yi-sheng/critical-value";
|
|
|
+import {getCriticalValues, handleZyCriticalValue} from "@/api/zhu-yuan-yi-sheng/critical-value";
|
|
|
import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
|
|
|
+import store from "@/store";
|
|
|
+import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
+import {formatDatetime} from "@/utils/date";
|
|
|
|
|
|
const patNo = ref('')
|
|
|
const data = ref([])
|
|
|
|
|
|
+const windowSize = store.state.app.windowSize
|
|
|
+const tableHeight = windowSize.h - 86
|
|
|
+
|
|
|
+const userName = store.state.user.info.name
|
|
|
+
|
|
|
const queryClick = () => {
|
|
|
if (!patNo.value) {
|
|
|
patNo.value = ''
|
|
@@ -32,6 +45,18 @@ const queryClick = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+function handle(row) {
|
|
|
+ if (row.handleTime && row.handleStaffName) {
|
|
|
+ xcMessage.warning('该条目已有处理时间和处理人,请勿重复处理。')
|
|
|
+ } else {
|
|
|
+ handleZyCriticalValue(row.id).then(res => {
|
|
|
+ xcMessage.success(res)
|
|
|
+ row.handleStaffName = userName
|
|
|
+ row.handleTime = formatDatetime(new Date())
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
watch(() => huanZheXinXi.value.inpatientNo, () => {
|
|
|
patNo.value = huanZheXinXi.value.inpatientNo
|
|
|
queryClick()
|