Browse Source

优化代码

xiaochan 1 năm trước cách đây
mục cha
commit
105d5c7bbd

+ 15 - 11
src/components/xiao-chan/xc-personnel/XcPersonnel.vue

@@ -1,7 +1,8 @@
-<script setup name='XcPersonnel'>
+<script setup lang="ts">
 import {stringNotBlank} from "@/utils/blank-utils";
+import {ref, toRefs, onMounted, computed} from 'vue'
 
-const {options, modelValue, code} = defineProps({
+const props = defineProps({
   options: {
     type: Array,
     default: []
@@ -15,30 +16,33 @@ const {options, modelValue, code} = defineProps({
     default: null
   }
 })
+
+const {options, modelValue, code} = toRefs(props)
 const elSelectRef = ref(null)
 
 const valModel = computed({
-  get: () => modelValue[code],
+  get: () => modelValue.value[code.value],
   set: (val) => {
-    modelValue[code + 'Name'] = elSelectRef.value.states.selectedLabel
-    modelValue[code] = val
+    modelValue.value[code.value + 'Name'] = elSelectRef.value.states.selectedLabel
+    modelValue.value[code.value] = val
   }
 })
 
-let queryVal = $ref('')
+
+const queryVal = ref('')
 const remoteMethod = (val) => {
-  queryVal = val
+  queryVal.value = val
 }
 
 const optionsChange = computed(() => {
-  return options.filter((item) => {
-    if (stringNotBlank(item.name) && item.name.includes(queryVal)) {
+  return options.value.filter((item) => {
+    if (stringNotBlank(item.name) && item.name.includes(queryVal.value)) {
       return true
     }
-    if (stringNotBlank(item.pyCode) && item.pyCode.includes(queryVal.toLocaleUpperCase())) {
+    if (stringNotBlank(item.pyCode) && item.pyCode.includes(queryVal.value.toLocaleUpperCase())) {
       return true
     }
-    return !!(stringNotBlank(item.dCode) && item.dCode.includes(queryVal.toLocaleUpperCase()));
+    return !!(stringNotBlank(item.dCode) && item.dCode.includes(queryVal.value.toLocaleUpperCase()));
   })
 })
 

+ 1 - 2
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue

@@ -70,8 +70,7 @@
                :pat-no="patInfo.inpatientNo"
                :times="patInfo.admissTimes"/>
     <emr-electrocardiogram v-if="index === 8"
-                           :pat-no="patInfo.inpatientNo"
-                           :times="patInfo.admissTimes"/>
+                           :pat-no="patInfo.inpatientNo"/>
     <BloodSugarQuery v-if="index === 9" :pat-no="patInfo.inpatientNo"
                      :times="patInfo.admissTimes"/>
     <pims-web-view v-if="index === 10" :pat-no="patInfo.inpatientNo"/>

+ 5 - 10
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrElectrocardiogram.vue

@@ -1,23 +1,18 @@
 <script setup>
 const props = defineProps({
-    patNo: String,
-    times: Number
-})
-
-onMounted(() => {
-
+  patNo: String,
 })
 
 const src = computed(() => {
-    return `http://172.16.32.192/website/Service/Search.aspx?id=${props.patNo}`
+  return `http://172.16.32.192/website/Service/Search.aspx?id=${props.patNo}`
 })
 
 </script>
 
 <template>
-    <div style="height: 100%;width: 100%">
-        <iframe :src="src" width="100%" height="100%"/>
-    </div>
+  <div style="height: 100%;width: 100%">
+    <iframe :src="src" width="100%" height="100%"/>
+  </div>
 </template>
 
 <style scoped lang="scss">

+ 3 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue

@@ -846,6 +846,7 @@ const clickSaveData = async () => {
       saveSuccessFunc(data)
     }).catch((error) => {
       if (error.code === 7002) {
+        getOutline()
         saveSuccessFunc(data)
       }
     })
@@ -1663,8 +1664,8 @@ const emrMittInit = () => {
     const componentView: {
       view: {
         focusEnter: () => void
-      } & HTMLElement,
-    } = iframe.contentDocument.getElementById(id) as any
+      } & HTMLElement
+    } & HTMLElement = iframe.contentDocument.getElementById(id) as any
 
     if (editor && editor.view) {
       componentView.view.focusEnter()

+ 29 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrAudit.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-button @click="setAuditClick" v-if="permissions()">发送</el-button>
+  <el-button @click="auditDialog.dialog = true" v-if="permissions()">发送</el-button>
   <el-divider direction="vertical"/>
   <emr-audit-dialog :emr-id="emrInfo.id"
                     :final-control="patientInfo.finalControl"
@@ -96,12 +96,21 @@
   </el-table>
   <right-click-menu v-if="!permissions()" :config="opt" :mouse-position="mousePosition"/>
 
+  <el-dialog v-model="auditDialog.dialog" title="发送到" @opened="auditDialog.handleOpen">
+    发送给:
+    <XcPersonnel v-model="auditDialog" :options="auditDialog.personnelAll" code="doctor"/>
+    <template #footer>
+      <el-button @click="setAuditClick" type="primary">
+        确认
+      </el-button>
+    </template>
+  </el-dialog>
+
   <xc-dialog-v2 title="系统自动评级" v-model="scoreDialog"
                 @confirm="confirmTheQuality"
                 show-button
                 @cancel="scoreDialog = false"
-                manual-shutdown
-  >
+                manual-shutdown>
     <span style="color: red">
       注:此功能会直接修改病案首页中
       病案质量、质控医师、质控日期
@@ -149,6 +158,8 @@ import {selectControlByPatNo} from "@/api/emr-control/emr-control";
 import XcElOption from "@/components/xiao-chan/xc-el-option/XcElOption.vue";
 import {userInfoStore} from "@/utils/store-public";
 import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
+import {getPersonnelAll} from "@/api/public-api";
+import XcPersonnel from "@/components/xiao-chan/xc-personnel/XcPersonnel.vue";
 
 const elTableRef = ref(null)
 
@@ -170,10 +181,24 @@ const permissions = () => {
   return needRule(56);
 }
 
+const auditDialog = ref({
+  dialog: false,
+  doctor: '',
+  personnelAll: [],
+  handleOpen: () => {
+    auditDialog.value.doctor = emrInfo.value.code === 'shoucibingchengjilu' ? emrInfo.value.referPhysician : emrInfo.value.createId;
+    if (auditDialog.value.personnelAll.length === 0) {
+      getPersonnelAll().then((res) => {
+        auditDialog.value.personnelAll = res
+      })
+    }
+  }
+})
+
 const setAuditClick = () => {
   let temp = {
     id: emrInfo.value.id,
-    doctor: emrInfo.value.code === 'shoucibingchengjilu' ? emrInfo.value.referPhysician : emrInfo.value.createId,
+    doctor: auditDialog.value.doctor,
     patNo: emrInfo.value.patNo,
     times: emrInfo.value.times,
     list: elTableRef.value.getSelectionRows(),