|
|
@@ -0,0 +1,166 @@
|
|
|
+<template>
|
|
|
+ <el-button @click="setAuditClick" v-if="permissions()">发送</el-button>
|
|
|
+ <el-table :data="data"
|
|
|
+ :max-height="getWindowSize.h / 1.1"
|
|
|
+ :expand-row-keys="expandRow"
|
|
|
+ @row-contextmenu="rowContextmenu"
|
|
|
+ ref="elTableRef"
|
|
|
+ row-key="rowId">
|
|
|
+ <el-table-column type="expand">
|
|
|
+ <template #default="{row}">
|
|
|
+ <div style="width: 100%;padding: 10px">
|
|
|
+ <table width="100%">
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ 审核人:{{ row.approverName }}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ 审核时间:{{ row.reviewTime }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ 修改人:{{ row.modifyPersonName }}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ 修改时间:{{ row.modificationTime }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ 状态: {{ row.remediationStatusName }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </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>
|
|
|
+ <template #default="{row}" v-if="permissions()">
|
|
|
+ <el-input v-model="row.remark"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="numberOfDefects" label="缺陷数">
|
|
|
+ <template #default="{row}" v-if="permissions()">
|
|
|
+ <el-input-number style="width: 40px"
|
|
|
+ v-model="row.numberOfDefects"
|
|
|
+ :min="1"
|
|
|
+ :controls="false"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column type="selection" v-if="permissions()"/>
|
|
|
+ </el-table>
|
|
|
+ <right-click-menu :config="opt" :mouse-position="mousePosition"/>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup name='EmrAudit'>
|
|
|
+import {emrMitt} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
+import {getAuditMessages, rectifyMedicalRecords, setAudit} from "@/api/zhu-yuan-yi-sheng/emr-audit";
|
|
|
+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')
|
|
|
+
|
|
|
+const elTableRef = ref(null)
|
|
|
+
|
|
|
+const emrInfo = ref({
|
|
|
+ id: 0,
|
|
|
+ code: "",
|
|
|
+})
|
|
|
+
|
|
|
+const data = ref([])
|
|
|
+const expandRow = ref([])
|
|
|
+
|
|
|
+const permissions = () => {
|
|
|
+ return needRule(56);
|
|
|
+}
|
|
|
+
|
|
|
+const setAuditClick = () => {
|
|
|
+ let temp = {
|
|
|
+ id: emrInfo.value.id,
|
|
|
+ list: elTableRef.value.getSelectionRows()
|
|
|
+ }
|
|
|
+ setAudit(temp).then(() => {
|
|
|
+ queryAudit(emrInfo.value.id, emrInfo.value.code)
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const mousePosition = ref()
|
|
|
+const opt = [
|
|
|
+ {
|
|
|
+ name: '已整改',
|
|
|
+ click: (data) => {
|
|
|
+ rectifyMedicalRecords(data.id, 1).then(() => {
|
|
|
+ queryAudit(emrInfo.value.id, emrInfo.value.code)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ validator: (data) => {
|
|
|
+ return !!data.approver;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '已知无需整改',
|
|
|
+ click: (data) => {
|
|
|
+ rectifyMedicalRecords(data.id, 2).then(() => {
|
|
|
+ queryAudit(emrInfo.value.id, emrInfo.value.code)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ validator: (data) => {
|
|
|
+ return !!data.approver;
|
|
|
+ }
|
|
|
+ }
|
|
|
+]
|
|
|
+const rowContextmenu = (row, column, event) => {
|
|
|
+ event.preventDefault()
|
|
|
+ mousePosition.value = {
|
|
|
+ event,
|
|
|
+ data: row,
|
|
|
+ index: 0
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const queryAudit = (id, code) => {
|
|
|
+ emrInfo.value = {
|
|
|
+ id,
|
|
|
+ code
|
|
|
+ }
|
|
|
+
|
|
|
+ getAuditMessages(id, code).then(async res => {
|
|
|
+ expandRow.value = []
|
|
|
+ data.value = res
|
|
|
+ elTableRef.value.clearSelection()
|
|
|
+ await nextTick()
|
|
|
+ let tempList = []
|
|
|
+
|
|
|
+ for (let i = 0, len = data.value.length; i < len; i++) {
|
|
|
+ let item = data.value[i]
|
|
|
+ item.rowId = i;
|
|
|
+ if (stringNotBlank(item.approver)) {
|
|
|
+ expandRow.value.push(i);
|
|
|
+ elTableRef.value.toggleRowSelection(item);
|
|
|
+ tempList.push(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!permissions()) {
|
|
|
+ data.value = tempList
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ emrMitt.on('audit', queryAudit)
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+
|
|
|
+</style>
|