xiaochan 1 год назад
Родитель
Сommit
24f9fe577e

+ 0 - 75
src/components/login/ReLoginComp.vue

@@ -1,75 +0,0 @@
-<script setup lang="ts">
-import {onMounted} from "vue";
-import {ElIcon} from "element-plus";
-import {Loading} from "@element-plus/icons-vue";
-import {userInfoStore} from "@/utils/store-public";
-import store from '@/store'
-import {loginApi} from '@/api/login'
-
-const props = defineProps<{
-  success: () => void,
-  error: () => void
-}>()
-
-const reLogin = () => {
-  let params = {
-    codeRs: userInfoStore.value.codeRs,
-    password: userInfoStore.value.password
-  }
-
-  loginApi(params).then((res) => {
-    store.commit('user/tokenChange', res.token)
-    store.commit('user/sidChange', res.sid)
-    store.commit('user/infoChange', res)
-    props.success()
-  }).catch(() => {
-    props.error()
-  })
-
-}
-
-onMounted(() => {
-  reLogin()
-})
-
-</script>
-
-<template>
-  <div class="re-login_box">
-    <div class="re-login_header">
-      <h3>
-        令牌过期,正在重新登录。
-      </h3>
-    </div>
-    <div class="re-login_loading">
-      <el-icon class="is-loading" :size="100">
-        <Loading/>
-      </el-icon>
-    </div>
-  </div>
-</template>
-
-<style lang="scss">
-$re-login-width: 500px;
-
-.re-login_box {
-  position: fixed;
-  width: $re-login-width;
-  height: 20%;
-  border-radius: 5px;
-  top: 20%;
-  left: calc(50% - $re-login-width / 2);
-  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
-
-  .re-login_header {
-    text-align: center;
-  }
-
-  .re-login_loading {
-    text-align: center;
-  }
-
-}
-
-
-</style>

+ 0 - 36
src/components/login/re-login.ts

@@ -1,36 +0,0 @@
-// @ts-ignore
-import ReLoginComp from "./ReLoginComp.vue";
-import {h, render} from 'vue'
-import {ElMessage} from "element-plus";
-
-const login = document.createElement('div');
-let current = false
-const reLogin = () => {
-    return new Promise<void>((resolve, reject) => {
-        if (current) {
-            resolve()
-            return
-        }
-        current = true
-        document.body.append(login);
-
-        const re = h(ReLoginComp, {
-            success: () => {
-                ElMessage.success('登录成功,请重新执行操作。')
-                document.body.removeChild(login)
-                resolve()
-                current = false
-            },
-            error: () => {
-                ElMessage.error('自动登录失败,请重新登录')
-                document.body.removeChild(login)
-                reject()
-                current = false
-            }
-        }, null)
-        render(re, login)
-    })
-}
-
-
-export default reLogin

+ 84 - 98
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrInspect.vue

@@ -1,30 +1,25 @@
 <template>
-  <div style="height: 5px"/>
-  <div class="main">
-    <div class="side-class">
-      <el-auto-resizer>
-        <template #default="{ height }">
-          <div v-title="'查询指定住院次数住院的检查信息,默认为当前打开的病历次数,可修改为其他次数,修改后请点击查询。<br />' +
-           '<span style=\'background-color:red\'>目前无法查看图片检查结果,如果有了,会做上来。</span>'">
-            住院次数:
-            <el-input-number v-model="admissTimes" :min="1" :max="props.times"/>
-            <el-button @click="query">查询</el-button>
+
+  <CyFlex tab-position="vertical">
+    <template #header>
+      <CyFlex>
+        <template #header>
+          <div style="padding: 5px ">
+            <ElInputNumber
+                @change="querySearch"
+                v-model="admissTimes"/>
+            <el-divider direction="vertical"/>
             <el-button type="primary" @click="openPatientImage(patNo)">
               影像
             </el-button>
           </div>
-          <vxe-table :data="sideData"
-                     :height="height"
-                     class="vxe-padding_zero"
-                     show-overflow
-                     :row-config="{isHover : true, isCurrent: true,height: 24}"
-                     @cell-click="sideRow">
-            <vxe-column title="日期" field="startTime" width="135"/>
-            <vxe-column title="名称" field="orderName"/>
-          </vxe-table>
         </template>
-      </el-auto-resizer>
-    </div>
+        <CyVxeTable>
+          <vxe-column title="日期" field="checkTime" width="135"/>
+          <vxe-column title="名称" field="orderName" width="220"/>
+        </CyVxeTable>
+      </CyFlex>
+    </template>
 
     <div class="main-class">
       <el-form>
@@ -32,49 +27,50 @@
           {{ rowData.orderName }}
         </el-form-item>
         <el-form-item label="检查所见:">
-          <el-input type="textarea" rows="5" readonly v-model="record.checkWhatYouSee"/>
+          <el-input type="textarea" rows="15" readonly v-model="rowData.examinationSee"/>
         </el-form-item>
         <el-form-item label="诊断意见:">
-          <el-input type="textarea" rows="5" readonly v-model="record.diagnosticOpinion"/>
-        </el-form-item>
-        <el-form-item label="">
-          <el-button type="primary"
-                     @click="copyClick">
-            复制
-          </el-button>
-        </el-form-item>
-        <el-form-item label="">
-          <el-button type="primary"
-                     @click="copyAndPasteClick">
-            复制并粘贴
-          </el-button>
-          点击后,上方文本框,并直接粘贴到病历光标处,请注意光标所在位置,如果不知道光标位置,请用复制,粘贴错了可以使用【撤销】后在鼠标右键粘贴。
+          <el-input type="textarea" rows="5" readonly v-model="rowData.examinationreSult"/>
         </el-form-item>
         <el-form-item label="报告医生:">
-          {{ record?.reportName }}
+          {{ rowData?.doctorName }}
         </el-form-item>
         <el-form-item label="报告时间:">
-          {{ record?.reportDate }}
+          {{ rowData?.reportTime }}
         </el-form-item>
-        <el-form-item label="审核医生:">
-          {{ record?.confirmName }}
+        <el-form-item label="检查医生:">
+          {{ rowData?.checkDoctorName }}
         </el-form-item>
-        <el-form-item label="审核时间:">
-          {{ record?.confirmDate }}
+        <el-form-item label="检查时间:">
+          {{ rowData?.checkTime }}
+        </el-form-item>
+        <el-form-item label="">
+          <div style="text-align: right;width: 100%">
+            <el-button type="primary"
+                       @click="copyClick">
+              复制
+            </el-button>
+            <el-button type="warning"
+                       @click="copyAndPasteClick">
+              复制并粘贴
+            </el-button>
+          </div>
         </el-form-item>
       </el-form>
     </div>
-  </div>
+  </CyFlex>
 </template>
 
 <script setup lang="ts">
-import {getExamine} from "@/api/zhu-yuan-yi-sheng/emr-patient";
-import {onMounted, ref} from "vue";
-import {queryCheckTextResults} from '@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
+import {ref} from "vue";
 import {
   copyAsDataSource,
   emrMitt
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
+import CyFlex from "@/components/cy/flex/src/CyFlex.vue";
+import useVxeTable from "@/utils/cy-use/useVxeTable";
+import {magicApi} from "@/utils/database/magic-api-request";
+import {ElInputNumber} from "element-plus";
 import {openPatientImage} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 
 const props = defineProps({
@@ -82,50 +78,51 @@ const props = defineProps({
   times: Number
 })
 
-const sideData = ref([])
-
 const emits = defineEmits(['close'])
 
-const record = ref<{
-  checkWhatYouSee?: string,
-  diagnosticOpinion?: string,
-  diagnosticOpinionTemp?: string
-  reportName?: string
-  reportDate?: string
-  confirmName?: string
-  confirmDate?: string
-}>({
-  checkWhatYouSee: '',
-  diagnosticOpinion: '',
-  diagnosticOpinionTemp: '',
+type JcType = {
+  orderName: string,
+  examinationSee: string,
+  examinationreSult: string,
+  checkTime: string,
+  reportTime: string,
+  doctorCode: string,
+  doctorName: string,
+  checkDoctorCode: string,
+  checkDoctorName: string
+  patientUid: string
+  orderType: string
+}
+
+const rowData = ref<JcType>({
+  checkDoctorCode: "",
+  checkDoctorName: "",
+  checkTime: "",
+  doctorCode: "",
+  doctorName: "",
+  examinationSee: "",
+  examinationreSult: "",
+  orderName: "",
+  orderType: "",
+  patientUid: "",
+  reportTime: ""
 })
 
-const rowData = ref<{
-  orderName?: string,
-  reqNo?: string,
-  actOrderNo?: string,
-  startTime?: string,
-  inpatientNo?: string,
-  admissTimes?: string,
-  receiveFlag?: string,
-  orderType?: string
-}>({
-  orderName: ''
+const admissTimes = ref<number>(props.times ?? 0)
+
+const {CyVxeTable, tableProps, querySearch} = useVxeTable<JcType>({
+  keyField: 'patientUid',
+  mountedQuery: true,
+  remoteSearch: () => magicApi({
+    method: 'get',
+    url: '/intergration/jyjc/checkTheCallbacks',
+    params: {patNo: props.patNo, times: admissTimes.value}
+  }),
+  tableProps: {
+    onCellClick: ({row}) => rowData.value = row
+  }
 })
 
-const sideRow = ({row}) => {
-  rowData.value = row
-  queryCheckTextResults(row.inpatientNo, row.reqNo).then((res) => {
-    record.value = res['record']
-    record.value.diagnosticOpinionTemp = record.value.diagnosticOpinion
-  }).catch(() => {
-    record.value = {
-      checkWhatYouSee: '',
-      diagnosticOpinion: '',
-      diagnosticOpinionTemp: '',
-    }
-  })
-}
 
 const orderType = {
   'type_08': 'CT检查结果',
@@ -135,12 +132,13 @@ const orderType = {
 function assemblyData() {
   let data: {}
   const key = 'type_' + rowData.value.orderType
+  console.log(rowData.value)
   if (orderType[key]) {
-    data = copyAsDataSource(record.value.diagnosticOpinionTemp, orderType[key])
+    data = copyAsDataSource(rowData.value.examinationSee, orderType[key])
   } else {
     data = {
       type: 'text',
-      data: record.value.diagnosticOpinionTemp
+      data: rowData.value.examinationSee
     }
   }
   return data
@@ -166,18 +164,6 @@ function copyAndPasteClick() {
 }
 
 
-const admissTimes = ref<number>(props.times)
-
-const query = () => {
-  getExamine(props.patNo, admissTimes.value).then(res => {
-    sideData.value = res as any
-  })
-}
-
-onMounted(() => {
-  query()
-})
-
 </script>
 
 <style scoped lang="scss">

+ 6 - 2
src/components/zhu-yuan-yi-sheng/public/PatientList.vue

@@ -19,8 +19,7 @@
       </div>
     </template>
 
-    <CyVxeTable
-        class="vxe-padding_zero">
+    <CyVxeTable>
       <VxeColumn title="床" field="bedNo" width="50"/>
       <VxeColumn title="姓名" field="name" width="70">
         <template #default="{row}">
@@ -84,6 +83,11 @@ const {tableRef, CyVxeTable, tableProps, mutation} = useVxeTable(
     {
       rowHeight: 32,
       keyField: 'inpatientNo',
+      tableCss: {
+        '--vxe-table-cell-padding-left': 0,
+        '--vxe-table-cell-padding-right': 0,
+        '--vxe-table-column-padding-mini': 0
+      },
       tableProps: {
         onCellClick: handleClickOverview,
         onCellMenu: ({row, $event, rowIndex}) => settingUpAThirdLevelDoctor(row, $event, rowIndex)

+ 1 - 0
src/utils/cy-use/useDateRange.tsx

@@ -1,3 +1,4 @@
+//@ts-nocheck
 import {ElDatePicker} from "element-plus";
 import {ref, Ref} from 'vue'
 import {currentAndAFewDaysAgo, elDateRangeAddTime} from "@/utils/moment-utils";

+ 81 - 0
src/utils/cy-use/useTsxUtils.ts

@@ -0,0 +1,81 @@
+import {Ref, isRef} from "vue";
+
+function tsxRenderTemplate(comp: () => any, name: string) {
+    return {
+        [name]: comp
+    }
+}
+
+type TsxRenderTemplateFunc = (comp: string | number | (() => any)) => any
+
+export interface TsxRenderTemplate {
+    (options: string | number | (() => any)): any
+
+    default: TsxRenderTemplateFunc,
+
+    [key: string]: TsxRenderTemplateFunc,
+}
+
+// @ts-ignore
+export const tsxTemplate: TsxRenderTemplate = new Proxy(tsxRenderTemplate, {
+    get(target, p: string, receiver: any): any {
+        return (value: () => any) => target(value, p)
+    },
+    apply(target: (comp: () => any, name: string) => { [p: string]: any }, thisArg: any, argArray: any[]): any {
+        return target(argArray[0], 'default')
+    }
+})
+
+
+function tsxVModelFunc<D>(modelValue: D, name: keyof D, watch: Function) {
+    const updateName = 'onUpdate:' + name.toString()
+
+    if (isRef(modelValue)) {
+        const value = 'value'
+        return {
+            [name]: modelValue[value],
+            [updateName]: (val: any) => {
+                modelValue[value] = val
+                watch && watch(val)
+            }
+        }
+    }
+
+    return {
+        [name]: modelValue[name],
+        [updateName]: (val: any) => {
+            modelValue[name] = val
+            watch && watch(val)
+        }
+    }
+}
+
+
+export interface tsxVModel {
+    (options: Ref<any>): any
+
+    [key: string]: TsxRenderTemplateFunc,
+}
+
+// @ts-ignore
+export const tsxVModel: tsxVModel = new Proxy(tsxVModelFunc, {
+    get(target: <D>(modelValue: D, name: keyof D, watch: Function) => { [p: string]: (el: any) => void }, p: string | symbol, receiver: any): any {
+        return (value: any, watch: Function) => target(value, p, watch)
+    },
+    apply(target: any, thisArg: any, argArray: any[]): any {
+        return target(argArray[0], argArray[1] ?? 'modelValue')
+    }
+})
+
+export const prevent = ($event: Event) => {
+    return {
+        stop: function () {
+            $event && $event.stopPropagation()
+            return this
+        },
+        prevent: function () {
+            $event && $event.preventDefault()
+            return this
+        }
+    }
+}

+ 13 - 16
src/utils/cy-use/useVxeTable.tsx

@@ -12,6 +12,7 @@ import setDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
 import CyDialog from "@/components/cy/dialog/src/CyDialog.vue";
 import {IsCyDialog} from "@/components/cy/dialog/src/useCyDialog";
 import CyFlex from "@/components/cy/flex/src/CyFlex.vue";
+import {tsxTemplate, tsxVModel} from "@/utils/cy-use/useTsxUtils";
 
 declare type PageQuery = {
     currentPage?: number,
@@ -24,6 +25,11 @@ declare type SimplifiedConfiguration<D> = {
     currentKey?: string | number,
     remoteSearch?: (data?: PageQuery & any) => Promise<D[]>,
     tableProps?: VxeTableEventProps<D> & VxeTableProps<D>,
+    tableCss?: {
+        '--vxe-table-cell-padding-left'?: string | number
+        '--vxe-table-cell-padding-right'?: string | number,
+        '--vxe-table-column-padding-mini'?: string | number,
+    },
     showPage?: boolean,
     result?: string,
     total?: string,
@@ -35,18 +41,6 @@ declare type SimplifiedConfiguration<D> = {
 }
 
 
-function tsxVModel(modelValue: object, name: string, modelName?: string) {
-    const updateName = modelName || name
-    return {
-        // @ts-ignore
-        [updateName]: modelValue[name],
-        ['onUpdate:' + updateName]: (el: any) => {
-            // @ts-ignore
-            modelValue[name] = el
-        }
-    }
-}
-
 function useVxeTable<D = any>(simplifiedConfiguration: SimplifiedConfiguration<D>) {
     const tableRef: Ref<TablePublicMethods<D> & TableExportMethods<D> | undefined> = ref()
     const props: VxeTableProps<D> & VxeTableEventProps<D> & SimplifiedConfiguration<D> = reactive({
@@ -138,6 +132,9 @@ function useVxeTable<D = any>(simplifiedConfiguration: SimplifiedConfiguration<D
                 ref={tableRef}
                 {...defaultProps.value}
                 {...props}
+                size={'mini'}
+                // @ts-ignore
+                style={{...simplifiedConfiguration.tableCss}}
             >
 
                 {{
@@ -191,7 +188,7 @@ function useVxeTable<D = any>(simplifiedConfiguration: SimplifiedConfiguration<D
                         }
 
                         return [
-                            simplifiedConfiguration.showCheckbox ?
+                            simplifiedConfiguration?.showCheckbox ?
                                 <VxeColumn type="checkbox" width={"max-content"}>
                                     {{
                                         // @ts-ignore
@@ -225,12 +222,12 @@ function useVxeTable<D = any>(simplifiedConfiguration: SimplifiedConfiguration<D
                 </div>
                 <div style="height:max-content">
                     <VxePager
-                        onPageChange={(data) => {
+                        onPageChange={(_data) => {
                             pageChange()
                         }}
                         size={"small"}
-                        {...tsxVModel(pageVO, 'currentPage')}
-                        {...tsxVModel(pageVO, 'pageSize')}
+                        {...tsxVModel.currentPage(pageVO)}
+                        {...tsxVModel.pageSize(pageVO)}
                         total={pageVO.total}
                         {...simplifiedConfiguration.pagesProps}
                         {...pagerProps}

+ 5 - 0
src/utils/database/magic-api-request.ts

@@ -61,4 +61,9 @@ const request = <D = any>(options: AxiosRequestConfig): Promise<D> => {
     return service(options)
 }
 
+export const magicApi = (options: AxiosRequestConfig) => {
+    options.url = '/thyy/api' + options.url
+    return request(options)
+}
+
 export default request

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -9,7 +9,7 @@
         <div style="width: max-content; height: 100%">
           <YzSidebar></YzSidebar>
         </div>
-        <div style="flex: 1">
+        <div style="flex: 1; width: 0">
           <CyFlex>
             <template #header>
               <yz-tag :patient-info="patientInfo"/>

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/table/YzTableV3.vue

@@ -326,7 +326,7 @@ onMounted(() => {
   <vxe-table
       border
       height="100%"
-      style="width: '100%'"
+      style="width: 100%"
       :menu-config="menuConfig"
       @menu-click="tableRightClick"
       @cell-dblclick="setDefaultStopTime"

+ 1 - 2
src/views/view/patient360/src/Patient360.vue

@@ -14,11 +14,10 @@
 import router from "@/router";
 import request from "@/utils/request-v2";
 import InfoView from "@/views/view/patient360/comp/InfoView.vue";
-import {patInfo, ns, outOrHosp, handleQueryData, medicalTrackGrouping} from "@/views/view/patient360/src/index";
+import {patInfo, ns, outOrHosp, medicalTrackGrouping} from "@/views/view/patient360/src/index";
 import '../patient360.scss'
 import ViewHospMain from "@/views/view/patient360/hospComp/ViewHospMain.vue";
 import ViewOutPatient from "@/views/view/patient360/out-patient-comp/ViewOutPatient.vue";
-import {isDev} from "@/utils/public";
 
 function getMedicalTrack(patientId: string, outOrHosp: 1 | 2) {
   return request({