|
@@ -1,7 +1,13 @@
|
|
|
<template>
|
|
|
<el-button @click="setAuditClick" v-if="permissions()">发送</el-button>
|
|
|
- <emr-audit-dialog :emr-id="emrInfo.id"/>
|
|
|
- <el-button @click="finalControl">标记终末质控</el-button>
|
|
|
+ <emr-audit-dialog :emr-id="emrInfo.id"
|
|
|
+ :final-control="patInfo.finalControl"
|
|
|
+ :count="historyCount"/>
|
|
|
+ <template v-if="permissions() && patInfo.finalControl === 0">
|
|
|
+ <el-divider direction="vertical"/>
|
|
|
+ <el-button @click="finalControl">标记终末质控</el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
<el-table :data="data"
|
|
|
:height="getWindowSize.h / 1.1"
|
|
|
:expand-row-keys="expandRow"
|
|
@@ -97,10 +103,6 @@ import {BizException, ExceptionEnum} from "@/utils/BizException";
|
|
|
import {uuid} from "@/utils/getUuid";
|
|
|
import {scoringCriteriaList} from "@/data";
|
|
|
|
|
|
-const {patInfo} = defineProps({
|
|
|
- patInfo: Object
|
|
|
-})
|
|
|
-
|
|
|
const elTableRef = ref(null)
|
|
|
|
|
|
const emrInfo = ref({
|
|
@@ -112,6 +114,10 @@ const emrInfo = ref({
|
|
|
times: 0
|
|
|
})
|
|
|
|
|
|
+const historyCount = ref(0)
|
|
|
+
|
|
|
+const patInfo = ref({})
|
|
|
+
|
|
|
const data = ref([])
|
|
|
const expandRow = ref([])
|
|
|
|
|
@@ -125,7 +131,8 @@ const setAuditClick = () => {
|
|
|
doctor: emrInfo.value.code === 'shoucibingchengjilu' ? emrInfo.value.referPhysician : emrInfo.value.createId,
|
|
|
patNo: emrInfo.value.patNo,
|
|
|
times: emrInfo.value.times,
|
|
|
- list: elTableRef.value.getSelectionRows()
|
|
|
+ list: elTableRef.value.getSelectionRows(),
|
|
|
+ finalControl: patInfo.value.finalControl
|
|
|
}
|
|
|
setAudit(temp).then(() => {
|
|
|
queryAudit(emrInfo.value)
|
|
@@ -184,9 +191,10 @@ const rowContextmenu = (row, column, event) => {
|
|
|
|
|
|
const queryAudit = (val) => {
|
|
|
emrInfo.value = val
|
|
|
- getAuditMessages(emrInfo.value.id, emrInfo.value.code).then(async res => {
|
|
|
+ getAuditMessages(emrInfo.value.id, emrInfo.value.code, patInfo.value.finalControl).then(async res => {
|
|
|
expandRow.value = []
|
|
|
- data.value = res
|
|
|
+ data.value = res.data
|
|
|
+ historyCount.value = res.historyCount
|
|
|
elTableRef.value.clearSelection()
|
|
|
await nextTick()
|
|
|
let tempList = []
|
|
@@ -233,11 +241,13 @@ const addAudit = () => {
|
|
|
|
|
|
const finalControl = () => {
|
|
|
updateFinalControl(emrInfo.value.patNo, emrInfo.value.times).then(res => {
|
|
|
- console.log(res)
|
|
|
+ emrMitt.emit('setPatInfo', 'finalControl', 1)
|
|
|
+ queryAudit(emrInfo.value)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ patInfo.value = emrMitt.emit('getPatInfo')
|
|
|
emrMitt.on('audit', queryAudit)
|
|
|
})
|
|
|
</script>
|