lighter 4 月之前
父節點
當前提交
cd097dff94
共有 6 個文件被更改,包括 14 次插入44 次删除
  1. 0 1
      .env.production
  2. 0 1
      .env.show
  3. 0 1
      .env.tz
  4. 0 1
      src/utils/websocket.ts
  5. 14 39
      src/views/examination/UploadToHealthCard.vue
  6. 0 1
      src/vite-env.d.ts

+ 0 - 1
.env.production

@@ -1,7 +1,6 @@
 ENV = 'production'
 
 VITE_BASE_URL = 'http://172.16.32.167:8077'
-VITE_SOCKET_URL = 'ws://172.16.32.160:8707/websocket/'
 VITE_EMR_CONTROL_URL = '172.16.32.160:9227'
 VITE_SOCKET_V2 = 'ws://172.16.32.160:20922/websocket'
 

+ 0 - 1
.env.show

@@ -1,7 +1,6 @@
 ENV = 'development'
 
 VITE_BASE_URL = 'http://demo.hnthyy.cn:8706'
-VITE_SOCKET_URL = 'ws://demo.hnthyy.cn:8707/websocket/'
 
 VITE_DATA_BASE = 'http://172.16.30.61:9205'
 

+ 0 - 1
.env.tz

@@ -1,7 +1,6 @@
 ENV = 'tz'
 
 VITE_BASE_URL = 'http://172.16.20.115:8077'
-VITE_SOCKET_URL = 'ws://172.16.20.115:8707/websocket/'
 VITE_EMR_CONTROL_URL = '172.16.20.115:9227'
 VITE_DATA_BASE = 'http://172.16.20.115:9205'
 VITE_SOCKET_V2 = 'http://172.16.20.115:8707/socketApi'

+ 0 - 1
src/utils/websocket.ts

@@ -31,7 +31,6 @@ export function initWebSocket() {
   const userStore = useUserStore().userInfo;
 
   const url = `${env.VITE_SOCKET_V2}/intergrationPlatform/${userStore.code}`;
-  // const url = `${env.VITE_SOCKET_URL}/02896-172.16.30.66-a4f2eddf9e114c7dad5a9473a3d75020fAhr5UY4`;
 
   webSocket = useCySocket(url, {
     setInfo: false,

+ 14 - 39
src/views/examination/UploadToHealthCard.vue

@@ -1,5 +1,4 @@
 <template>
-
   <div class="layout_container">
     <header>
       <el-date-picker
@@ -22,8 +21,8 @@
       <aside class="layout_el-table">
         <el-table ref="indexTable" :data="inspectionsIndex" stripe @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55"></el-table-column>
-          <el-table-column prop="ordr_CREATE_DATE" label="报告时间" width="160"></el-table-column>
-          <el-table-column prop="aply_CTNT" label="检验名称" width="260"></el-table-column>
+          <el-table-column prop="trscDate" label="报告时间" width="160"></el-table-column>
+          <el-table-column prop="examPurpose" label="检验名称" width="260"></el-table-column>
         </el-table>
       </aside>
       <div class="layout_main">
@@ -51,9 +50,10 @@
 <script setup>
 import {onMounted, ref} from 'vue'
 import {healthCardShortcuts} from '@/data/shortcuts'
-import {ElMessage, ElMessageBox} from 'element-plus'
+import {ElMessageBox} from 'element-plus'
 import {getIndexByBarCode, getIndexByTjNo, pushSelectedResult} from '@/api/inspections'
 import {formatDate} from '@/utils/date'
+import {xcMessage} from "@/utils/xiaochan-element-plus";
 
 const datePeriod = ref([])
 const customerInfo = ref({})
@@ -66,17 +66,12 @@ const autoPush = ref(true)
 
 const makeParam = (value) => {
   if (!datePeriod.value) {
-    ElMessage({
-      message: '请选择日期范围',
-      type: 'warning',
-      duration: 2000,
-      showClose: true,
-    })
+    xcMessage.warning('请选择日期范围')
     return
   }
   return {
-    start: formatDate(datePeriod.value[0]),
-    end: formatDate(datePeriod.value[1]),
+    reqStartTime: formatDate(datePeriod.value[0]),
+    reqEndTime: formatDate(datePeriod.value[1]),
     content: value,
   }
 }
@@ -114,12 +109,7 @@ const scanBarCode = () => {
 
 const fixTjNo = () => {
   if (!customerInfo.value.name) {
-    ElMessage({
-      message: '请先扫描健康证条码。',
-      type: 'warning',
-      duration: 2500,
-      showClose: true,
-    })
+    xcMessage.warning('请先扫描健康证条码。')
     return
   }
   ElMessageBox.prompt('请扫描或输入【' + customerInfo.value.name + '】的体检号', '提示', {
@@ -128,12 +118,7 @@ const fixTjNo = () => {
   }).then(({value}) => {
     getIndexByTjNo(makeParam(value)).then((res) => {
       if (!res || res.length === 0) {
-        ElMessage({
-          message: '没有找到体检号【' + value + '】对应的检查,请确认日期范围是否正确。',
-          type: 'warning',
-          duration: 2500,
-          showClose: true,
-        })
+        xcMessage.warning('没有找到体检号【' + value + '】对应的检查,请确认日期范围是否正确。')
       } else {
         inspectionsIndex.value = res
         if (autoPush.value && isInspectionsCompleted(inspectionsIndex.value)) {
@@ -155,13 +140,13 @@ const isInspectionsCompleted = (val) => {
   let jk02 = false
   let jk03 = false
   val.forEach((item) => {
-    if (item.aply_CTNT.indexOf('大便培养') !== -1 || item.aply_CTNT.indexOf('大便体检') !== -1) {
+    if (item.examPurpose.indexOf('大便培养') !== -1 || item.examPurpose.indexOf('大便体检') !== -1) {
       jk01 = true
     }
-    if (item.aply_CTNT.indexOf('甲肝抗体') !== -1 && item.aply_CTNT.indexOf('戊肝抗体') !== -1) {
+    if (item.examPurpose.indexOf('甲肝抗体') !== -1 && item.examPurpose.indexOf('戊肝抗体') !== -1) {
       jk02 = true
     }
-    if (item.aply_CTNT.indexOf('核酸') !== -1) {
+    if (item.examPurpose.indexOf('核酸') !== -1) {
       jk03 = true
     }
   })
@@ -187,20 +172,10 @@ const uploadSelected = (rows) => {
   pushSelectedResult(param).then((res) => {
     pushResult.value = res
     if (res.JK01 === '推送成功' && res.JK02 === '推送成功') {
-      ElMessage({
-        message: '推送成功。',
-        type: 'success',
-        duration: 2500,
-        showClose: true,
-      })
+      xcMessage.success('推送成功。')
       scanBarCode()
     } else {
-      ElMessage({
-        message: '推送失败。',
-        type: 'error',
-        duration: 2500,
-        showClose: true,
-      })
+      xcMessage.error('推送失败。')
     }
   })
 }

+ 0 - 1
src/vite-env.d.ts

@@ -1,7 +1,6 @@
 /// <reference types="vite/client" />
 interface ImportMetaEnv {
   readonly VITE_BASE_URL: string;
-  readonly VITE_SOCKET_URL: string;
   readonly VITE_EMR_CONTROL_URL: string;
 
   readonly VITE_DATA_BASE: string;