Parcourir la source

优化和修复问题

xiaochan il y a 2 ans
Parent
commit
0a8affb606

+ 1 - 0
.env.dev

@@ -2,3 +2,4 @@ ENV = 'dev'
 
 VITE_BASE_URL = 'http://172.16.30.61:9201'
 VITE_SOCKET_URL = 'ws://172.16.30.61:9201/websocket/'
+VITE_EMR_CONTROL_URL = 'http://172.16.30.67:9227'

+ 2 - 1
.env.production

@@ -1,4 +1,5 @@
 ENV = 'production'
 
 VITE_BASE_URL = 'http://172.16.32.160:8706'
-VITE_SOCKET_URL = 'ws://172.16.32.160:8706/websocket/'
+VITE_SOCKET_URL = 'ws://172.16.32.160:8706/websocket/'
+VITE_EMR_CONTROL_URL = 'http://172.16.30.160:8706'

+ 1 - 1
src/api/zhu-yuan-yi-sheng/connotation-quality-control.js

@@ -1,6 +1,6 @@
 import axios from "axios";
 
-let url = 'http://172.16.30.61:9227/'
+let url = import.meta.env.VITE_EMR_CONTROL_URL
 
 export function save(data) {
     return axios.post(url + 'save', data)

+ 9 - 0
src/api/zhu-yuan-yi-sheng/emr-audit.js

@@ -33,3 +33,12 @@ export function getHistoricalAudit(emrId) {
         params: {emrId}
     })
 }
+
+
+export function updateFinalControl(patNo, times) {
+    return request({
+        url: url + '/updateFinalControl',
+        method: 'get',
+        params: {patNo, times}
+    })
+}

+ 4 - 1
src/components/menu-item/RightClickMenu.vue

@@ -34,6 +34,7 @@
 <script setup name='RightClickMenu'>
 import {ref} from "vue";
 import {onClickOutside} from '@vueuse/core'
+import {useZIndex} from "element-plus";
 
 const props = defineProps({
   config: {
@@ -110,9 +111,11 @@ const whetherToDisable = (data) => {
   return validator()
 
 }
+const zIndex = ref(useZIndex().currentZIndex + 1)
 
 watch(() => props.mousePosition, () => {
   modal.value = true
+  zIndex.value = useZIndex().nextZIndex()
   nextTick(() => {
     calculateTheLocation(props.mousePosition.event.pageX, props.mousePosition.event.pageY)
   })
@@ -168,7 +171,7 @@ onMounted(() => {
   position: fixed;
   margin: 5px;
   padding: 5px;
-  z-index: 100;
+  z-index: v-bind(zIndex);
   background-color: white;
   box-shadow: 2px 2px 3px 0 rgb(4 4 4);
   border-radius: 5px;

+ 10 - 1
src/components/xiao-chan/date-picker/XcDatePicker.vue

@@ -9,6 +9,7 @@
 
 <script setup name='XcDatePicker'>
 import {shortcuts} from "@/data/shortcuts";
+import {currentAndAFewDaysAgo} from "@/utils/date";
 
 
 const props = defineProps({
@@ -19,6 +20,10 @@ const props = defineProps({
   type: {
     type: [String],
     default: 'daterange'
+  },
+  aFewDaysAgo: {
+    type: Number,
+    default: null,
   }
 })
 const emits = defineEmits(['update:modelValue'])
@@ -36,10 +41,14 @@ watch(() => props.modelValue, () => {
   value.value = props.modelValue
 }, {immediate: true})
 
-onMounted(() => {
+onMounted(async () => {
   if (props.type === 'daterange') {
     short.value = shortcuts
   }
+  if (props.aFewDaysAgo != null) {
+    let data = await currentAndAFewDaysAgo(props.aFewDaysAgo);
+    change(data)
+  }
 })
 
 </script>

+ 4 - 2
src/components/xiao-chan/select-v3/XcSelectV3.vue

@@ -74,6 +74,7 @@ import {onClickOutside} from '@vueuse/core'
 import {functionDebounce} from "@/utils/debounce";
 import sleep from "@/utils/sleep";
 import {stringIsBlank} from "@/utils/blank-utils";
+import {useZIndex} from "element-plus";
 
 const props = defineProps({
   modelValue: {
@@ -157,6 +158,7 @@ onClickOutside(selectRef, () => {
 })
 
 const selectInputRef = ref(null)
+const zIndex = ref(useZIndex().currentZIndex)
 const boxClick = async () => {
   if (props.disabled) {
     return
@@ -166,6 +168,7 @@ const boxClick = async () => {
   isFocus = true
   showOptions = !showOptions
   if (showOptions) {
+    zIndex.value = useZIndex().nextZIndex()
     ifVisibleArea()
     await edgeDetectionJudgment()
   }
@@ -511,8 +514,7 @@ onMounted(() => {
     position: absolute;
     overflow: auto;
     display: flex;
-    //direction: rtl;
-    z-index: 999999;
+    z-index: v-bind(zIndex);
     top: 26px;
     box-shadow: 0 0 12px rgba(0, 0, 0, .12);
     background-color: white;

+ 0 - 4
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/EmrControlRuleDialog.vue

@@ -37,10 +37,6 @@ const dialog = ref(false)
 
 onMounted(() => {
 
-  if (isDev) {
-    return
-  }
-
   myPatientQualityControl().then((res) => {
 
     patientList.value = res.timeQualityControl.details

+ 0 - 1
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/YzQueryCondition.vue

@@ -273,7 +273,6 @@ const queryYz = async (isScroll = true) => {
       patNo: props.patientInfo.inpatientNo,
       times: props.patientInfo.admissTimes
     })
-    console.log(yzData.value)
   } catch (e) {
     yzData.value = []
   }

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

@@ -1,10 +1,11 @@
 <template>
   <div style="display: flex;align-items: center;height: 30px">
     <el-button-group>
-      <el-button :disabled="!emrConfig.editor"
-                 type="success"
-                 icon="CircleCheck"
-                 @click="clickSaveData">
+      <el-button
+          :disabled="!emrConfig.editor"
+          type="success"
+          icon="CircleCheck"
+          @click="clickSaveData">
         保存
       </el-button>
       <el-button
@@ -113,7 +114,6 @@
     <el-divider direction="vertical"/>
     <el-checkbox v-model="autoSave" label="自动保存" @change="autoSaveChange"/>
     <el-checkbox v-model="isOpenPage" label="分页线" @change="openOrClosePage"/>
-
   </div>
 
   <div style="display: flex">
@@ -651,7 +651,7 @@ const emrEvent = {
       let newDate = await getServerDateApi()
       view.setAttribute('fragment', {
         name: values['查房标题'].value,
-        createId: extractFields('编辑者编码'),
+        createId: userData.code,
         creationTime: newDate,
         referPhysician: extractFields('管床医生编码'),
         consultPhysician: extractFields('主治医生编码'),
@@ -1624,6 +1624,7 @@ const monitorPageRefresh = (event) => {
 /**
  * 打开已经保存了的病历
  * @param id 病历 id
+ * @param flag 显示tag
  */
 const openAndSaveTheMedicalRecord = (id, flag = 2) => {
   saveDocumentId.value = `/emr/runtime/?documentId=${id}#/`
@@ -1757,7 +1758,8 @@ const 解析病程记录 = () => {
   saveDialog.analyzeTheCourseOfTheDisease = true
   let fragment = []
   循环病程返回数据元((values, node) => {
-    let data
+    let data = {}
+
     let fragmentData = node.view.getAttribute('fragment')
 
     function listNull(name) {

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

@@ -1,6 +1,7 @@
 <template>
   <el-button @click="setAuditClick" v-if="permissions()">发送</el-button>
   <emr-audit-dialog :emr-id="emrInfo.id"/>
+  <el-button @click="finalControl">标记终末质控</el-button>
   <el-table :data="data"
             :height="getWindowSize.h / 1.1"
             :expand-row-keys="expandRow"
@@ -83,7 +84,7 @@
 
 <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 {getAuditMessages, rectifyMedicalRecords, setAudit, updateFinalControl} 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";
@@ -96,6 +97,10 @@ 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({
@@ -226,6 +231,11 @@ const addAudit = () => {
   elTableRef.value.toggleRowSelection(tempData);
 }
 
+const finalControl = () => {
+  updateFinalControl(emrInfo.value.patNo, emrInfo.value.times).then(res => {
+    console.log(res)
+  })
+}
 
 onMounted(() => {
   emrMitt.on('audit', queryAudit)

+ 31 - 32
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrAuditDialog.vue

@@ -1,29 +1,28 @@
 <template>
-    <el-button @click="historicalAuditClick">历史审核</el-button>
-
-    <el-dialog v-model="dialog" title="历史记录" width="70%">
-
-        <el-scrollbar :height="getWindowSize.h / 1.5">
-            <el-timeline>
-                <el-timeline-item
-                        v-for="(value,key) in historicalInfo"
-                        :key="key"
-                        placement="top"
-                        :timestamp="key">
-                    <el-table :data="value">
-                        <el-table-column prop="approverName" label="审核人"/>
-                        <el-table-column prop="name" label="质控名称"/>
-                        <el-table-column prop="scoringCriteriaName" label="评分"/>
-                        <el-table-column prop="numberOfDefects" label="缺陷数"/>
-                        <el-table-column prop="modifyPersonName" label="修改人"/>
-                        <el-table-column prop="modificationTime" label="修改时间"/>
-                        <el-table-column prop="remark" label="备注"/>
-                        <el-table-column prop="remediationStatusName" label="整改"/>
-                    </el-table>
-                </el-timeline-item>
-            </el-timeline>
-        </el-scrollbar>
-    </el-dialog>
+  <el-button @click="historicalAuditClick">历史审核</el-button>
+
+  <el-dialog v-model="dialog" title="历史记录" width="70%" destroy-on-close>
+    <el-scrollbar :height="getWindowSize.h / 1.5">
+      <el-timeline>
+        <el-timeline-item
+            v-for="(value,key) in historicalInfo"
+            :key="key"
+            placement="top"
+            :timestamp="key">
+          <el-table :data="value">
+            <el-table-column prop="approverName" label="审核人"/>
+            <el-table-column prop="name" label="质控名称"/>
+            <el-table-column prop="scoringCriteriaName" label="评分"/>
+            <el-table-column prop="numberOfDefects" label="缺陷数"/>
+            <el-table-column prop="modifyPersonName" label="修改人"/>
+            <el-table-column prop="modificationTime" label="修改时间"/>
+            <el-table-column prop="remark" label="备注"/>
+            <el-table-column prop="remediationStatusName" label="整改"/>
+          </el-table>
+        </el-timeline-item>
+      </el-timeline>
+    </el-scrollbar>
+  </el-dialog>
 </template>
 
 <script setup name='EmrAuditDialog'>
@@ -31,9 +30,9 @@ import {getHistoricalAudit} from "@/api/zhu-yuan-yi-sheng/emr-audit";
 import {getWindowSize} from "@/utils/window-size";
 
 const props = defineProps({
-    emrId: {
-        type: Number,
-    }
+  emrId: {
+    type: Number,
+  }
 })
 
 const dialog = ref(false)
@@ -41,10 +40,10 @@ const dialog = ref(false)
 const historicalInfo = ref({})
 
 const historicalAuditClick = () => {
-    getHistoricalAudit(props.emrId).then((res) => {
-        historicalInfo.value = res
-        dialog.value = true
-    })
+  getHistoricalAudit(props.emrId).then((res) => {
+    historicalInfo.value = res
+    dialog.value = true
+  })
 }
 
 </script>

+ 0 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init.js

@@ -1,8 +1,6 @@
 import store from '@/store'
 import {deletePatientEmrByDocumentId, insertEmrData} from "@/api/zhu-yuan-yi-sheng/emr-patient";
-import {stringNotBlank} from "@/utils/blank-utils";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
-import mitt from "@/utils/mitt";
 import EventBus from "@/utils/mitt";
 
 // 患者数据

+ 0 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr_control_rule/RuleSift.vue

@@ -74,10 +74,6 @@ const exportExcel = () => {
   Export(props.data, title, "质控数据")
 }
 
-onMounted(() => {
-  console.log(props.data)
-})
-
 </script>
 
 <style scoped lang="scss">

+ 5 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js

@@ -202,9 +202,9 @@ getServerDateApi().then(res => {
 
 // 医嘱查询条件
 export const queryParam = ref({
-    displayRange: 0,
+    displayRange: 2,
     frequCode: isDev ? frequCodeEnum.all : frequCodeEnum.longTerm,
-    zhuangTai: isDev ? 0 : 3,
+    zhuangTai: 0,
     groupNo: '73',
     patNo: '',
     times: 0,
@@ -308,6 +308,9 @@ export const mingXi = ref({
 export const clickOnThePatient = async (patNo) => {
     switchPatients()
     huanZheXinXi.value = await getPatientInfo(patNo)
+    queryParam.value.frequCode = frequCodeEnum.all
+    queryParam.value.zhuangTai = 0
+    queryParam.value.displayRange = 2
     clearAssociate()
 }