AuditHistory.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="layout_container layout-horizontal" style="height: 550px;">
  3. <aside style="width: 800px">
  4. <div
  5. v-if="histories.length === 0"
  6. style="font-size: 36px;
  7. height: 86%;
  8. color: #777777;
  9. display: flex;
  10. align-items: center;
  11. justify-content: center"
  12. >
  13. 没有有效的质控记录
  14. </div>
  15. <div v-else style="overflow-y: auto; height: 500px">
  16. <el-timeline style="max-width: 800px">
  17. <el-timeline-item v-for="item in histories" :timestamp="item.applicationTime" placement="top">
  18. <el-card>
  19. <h4>
  20. 患者:{{ item.patName }} / {{ item.patNo }} / {{ item.times }}
  21. </h4>
  22. <p v-if="item.majorError" class="major-error">主要错误:{{item.majorError}}</p>
  23. <p class="audit-remark">审核结果:{{ item.auditRemark }}</p>
  24. <p v-if="item.coderNote" class="coder-note">编码员备注:{{ item.coderNote }}</p>
  25. <p style="font-size: 12px; color: dimgray">
  26. <span>审核人:{{ item.auditStaffName }}</span>
  27. <span style="margin-left: 32px">审核时间:{{ item.auditTime }}</span>
  28. </p>
  29. <img :src="item.auditState === 'APPROVED' ? approveImg : rejectImg" alt="" class="img-state">
  30. </el-card>
  31. </el-timeline-item>
  32. </el-timeline>
  33. </div>
  34. </aside>
  35. <div v-if="showLeaderAudit" style="margin-left: 12px;border-left: 1px solid #dadada">
  36. <GroupLeaderAudit :data="props.patinfo" :close-modal="closeDialog" />
  37. </div>
  38. <div style="position: absolute; bottom: 20px; right: 20px">
  39. <el-button
  40. v-if="leaderAuditVisible"
  41. @click="openGroupLeaderAudit"
  42. size="default"
  43. >
  44. {{leaderAuditText}}
  45. </el-button>
  46. <el-button @click="closeDialog" size="default" color="black">关闭</el-button>
  47. </div>
  48. </div>
  49. </template>
  50. <script setup>
  51. import {useUserStore} from "@/pinia/user-store";
  52. import {fetchAuditHistories} from "@/api/case-front-sheet";
  53. import rejectImg from "@/assets/reject.png"
  54. import approveImg from "@/assets/approved.png"
  55. import GroupLeaderAudit from "@/components/inpatient/frontsheet-printpage/GroupLeaderAudit.vue";
  56. const props = defineProps({
  57. patinfo: {
  58. type: Object,
  59. required: true,
  60. }
  61. })
  62. const emits = defineEmits(["cyDialogConfirm"]);
  63. const histories = ref([])
  64. const userStore = useUserStore()
  65. const isGroupLeader = userStore.isFSCGroupLeader
  66. const leaderAuditVisible = computed(() => {
  67. return histories.value.length > 0 && isGroupLeader
  68. })
  69. const showLeaderAudit = ref(false)
  70. const leaderAuditText = computed(() => {
  71. return showLeaderAudit.value ? '还原' : '组长审核'
  72. })
  73. function openGroupLeaderAudit() {
  74. if (showLeaderAudit.value) {
  75. showLeaderAudit.value = false
  76. return
  77. }
  78. let coderName = '';
  79. histories.value.forEach(item => {
  80. if (coderName.indexOf(item.auditStaffName) === -1) {
  81. coderName += ("," + item.auditStaffName)
  82. }
  83. })
  84. props.patinfo.coderName = coderName.substring(1)
  85. if (histories.value.length > 0 && isGroupLeader) {
  86. showLeaderAudit.value = true
  87. }
  88. }
  89. function closeDialog() {
  90. emits("cyDialogConfirm")
  91. }
  92. onMounted(() => {
  93. fetchAuditHistories(props.patinfo).then(res => {
  94. histories.value = res
  95. })
  96. })
  97. </script>
  98. <style scoped>
  99. :deep(.el-card) {
  100. position: relative;
  101. }
  102. .img-state {
  103. width: 64px;
  104. position: absolute;
  105. top: 0;
  106. right: 0;
  107. }
  108. .major-error {
  109. color: darkred;
  110. }
  111. .audit-remark {
  112. color: #0000fa;
  113. }
  114. .coder-note {
  115. color: #016669;
  116. }
  117. </style>