|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<el-button @click="setAuditClick" v-if="permissions()">发送</el-button>
|
|
|
+ <emr-audit-dialog :emr-id="emrInfo.id"/>
|
|
|
<el-table :data="data"
|
|
|
:max-height="getWindowSize.h / 1.1"
|
|
|
:expand-row-keys="expandRow"
|
|
@@ -7,9 +8,20 @@
|
|
|
ref="elTableRef"
|
|
|
row-key="rowId">
|
|
|
<el-table-column type="expand">
|
|
|
+ <template #header>
|
|
|
+ <el-button text @click="addAudit">添加</el-button>
|
|
|
+ </template>
|
|
|
<template #default="{row}">
|
|
|
<div style="width: 100%;padding: 10px">
|
|
|
- <table width="100%">
|
|
|
+ <table style="width: 100%">
|
|
|
+ <tr v-if="!permissions()">
|
|
|
+ <td>
|
|
|
+ <el-button type="success" @click="rectification(row,1)">已整改</el-button>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <el-button type="warning" @click="rectification(row,2)">已知无需整改</el-button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
审核人:{{ row.approverName }}
|
|
@@ -35,11 +47,25 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="项目" width="180"/>
|
|
|
- <el-table-column prop="scoringCriteriaName" label="等级" width="40"/>
|
|
|
- <el-table-column prop="remark" label="备注" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="name" label="项目" width="180">
|
|
|
+ <template #default="{row}">
|
|
|
+ <el-input v-model="row.name" :maxlength="100" v-if="row.disposition"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="scoringCriteriaName" label="等级" width="40">
|
|
|
+ <template #default="{row}">
|
|
|
+ <select v-model="row.scoringCriteria" v-if="row.disposition">
|
|
|
+ <option v-for="item in scoringCriteriaList"
|
|
|
+ :key="item.code"
|
|
|
+ :value="item.code">
|
|
|
+ {{ item.name }}
|
|
|
+ </option>
|
|
|
+ </select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="remark" label="备注">
|
|
|
<template #default="{row}" v-if="permissions()">
|
|
|
- <el-input v-model="row.remark"></el-input>
|
|
|
+ <el-input v-model="row.remark" :maxlength="100"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="numberOfDefects" label="缺陷数">
|
|
@@ -52,7 +78,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column type="selection" v-if="permissions()"/>
|
|
|
</el-table>
|
|
|
- <right-click-menu :config="opt" :mouse-position="mousePosition"/>
|
|
|
+ <right-click-menu v-if="!permissions()" :config="opt" :mouse-position="mousePosition"/>
|
|
|
</template>
|
|
|
|
|
|
<script setup name='EmrAudit'>
|
|
@@ -62,15 +88,22 @@ import {needRule} from "@/utils/public";
|
|
|
import {getWindowSize} from "@/utils/window-size";
|
|
|
import RightClickMenu from "@/components/menu-item/RightClickMenu.vue";
|
|
|
import {ref} from "vue";
|
|
|
-import {stringNotBlank} from "@/utils/blank-utils";
|
|
|
-
|
|
|
-let editor = emrMitt.emit('editor')
|
|
|
+import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
|
|
|
+import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
+import EmrAuditDialog
|
|
|
+ from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrAuditDialog.vue";
|
|
|
+import {BizException, ExceptionEnum} from "@/utils/BizException";
|
|
|
+import {uuid} from "@/utils/getUuid";
|
|
|
|
|
|
const elTableRef = ref(null)
|
|
|
|
|
|
const emrInfo = ref({
|
|
|
id: 0,
|
|
|
code: "",
|
|
|
+ createId: '',
|
|
|
+ referPhysician: "",
|
|
|
+ patNo: '',
|
|
|
+ times: 0
|
|
|
})
|
|
|
|
|
|
const data = ref([])
|
|
@@ -83,10 +116,13 @@ const permissions = () => {
|
|
|
const setAuditClick = () => {
|
|
|
let temp = {
|
|
|
id: emrInfo.value.id,
|
|
|
+ doctor: emrInfo.value.code === 'shoucibingchengjilu' ? emrInfo.value.referPhysician : emrInfo.value.createId,
|
|
|
+ patNo: emrInfo.value.patNo,
|
|
|
+ times: emrInfo.value.times,
|
|
|
list: elTableRef.value.getSelectionRows()
|
|
|
}
|
|
|
setAudit(temp).then(() => {
|
|
|
- queryAudit(emrInfo.value.id, emrInfo.value.code)
|
|
|
+ queryAudit(emrInfo.value)
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -95,9 +131,7 @@ const opt = [
|
|
|
{
|
|
|
name: '已整改',
|
|
|
click: (data) => {
|
|
|
- rectifyMedicalRecords(data.id, 1).then(() => {
|
|
|
- queryAudit(emrInfo.value.id, emrInfo.value.code)
|
|
|
- })
|
|
|
+ rectification(data, 1)
|
|
|
},
|
|
|
validator: (data) => {
|
|
|
return !!data.approver;
|
|
@@ -106,15 +140,33 @@ const opt = [
|
|
|
{
|
|
|
name: '已知无需整改',
|
|
|
click: (data) => {
|
|
|
- rectifyMedicalRecords(data.id, 2).then(() => {
|
|
|
- queryAudit(emrInfo.value.id, emrInfo.value.code)
|
|
|
- })
|
|
|
+ rectification(data, 2)
|
|
|
},
|
|
|
validator: (data) => {
|
|
|
return !!data.approver;
|
|
|
}
|
|
|
+ }, {
|
|
|
+ name: '删除',
|
|
|
+ click: (data) => {
|
|
|
+
|
|
|
+ },
|
|
|
+ validator: (data) => {
|
|
|
+ return !!data.disposition;
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
+
|
|
|
+const rectification = (data, flag) => {
|
|
|
+ if (!data.approver) {
|
|
|
+ return xcMessage.error('操作失败')
|
|
|
+ } else {
|
|
|
+ rectifyMedicalRecords(data.id, flag).then(() => {
|
|
|
+ queryAudit(emrInfo.value)
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
const rowContextmenu = (row, column, event) => {
|
|
|
event.preventDefault()
|
|
|
mousePosition.value = {
|
|
@@ -124,13 +176,9 @@ const rowContextmenu = (row, column, event) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const queryAudit = (id, code) => {
|
|
|
- emrInfo.value = {
|
|
|
- id,
|
|
|
- code
|
|
|
- }
|
|
|
-
|
|
|
- getAuditMessages(id, code).then(async res => {
|
|
|
+const queryAudit = (val) => {
|
|
|
+ emrInfo.value = val
|
|
|
+ getAuditMessages(emrInfo.value.id, emrInfo.value.code).then(async res => {
|
|
|
expandRow.value = []
|
|
|
data.value = res
|
|
|
elTableRef.value.clearSelection()
|
|
@@ -147,14 +195,41 @@ const queryAudit = (id, code) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (tempList.length > 0) {
|
|
|
+ emrMitt.emit('setShowIframe', 5)
|
|
|
+ }
|
|
|
+
|
|
|
if (!permissions()) {
|
|
|
- data.value = tempList
|
|
|
+ data.value = tempList;
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
+const addAudit = () => {
|
|
|
+ let editor = emrMitt.emit('editor')
|
|
|
+ if (stringIsBlank(editor?.documentData._id)) {
|
|
|
+ BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择病历。");
|
|
|
+ }
|
|
|
+ let tempData = {
|
|
|
+ rowId: uuid(8, 10),
|
|
|
+ name: '',
|
|
|
+ scoringCriteria: 1,
|
|
|
+ scoringCriteriaName: '轻',
|
|
|
+ numberOfDefects: 1,
|
|
|
+ remark: '',
|
|
|
+ disposition: true,
|
|
|
+ }
|
|
|
+ data.value.push(tempData)
|
|
|
+ elTableRef.value.toggleRowSelection(tempData);
|
|
|
+}
|
|
|
+
|
|
|
+let scoringCriteriaList = [
|
|
|
+ {code: 1, name: '轻'},
|
|
|
+ {code: 2, name: '中'},
|
|
|
+ {code: 3, name: '重'},
|
|
|
+]
|
|
|
|
|
|
onMounted(() => {
|
|
|
emrMitt.on('audit', queryAudit)
|