Parcourir la source

Merge branch 'master' of http://code.pacsonline.cn/zskk_bg/guochanhua

lgy il y a 4 jours
Parent
commit
5b032f470f

+ 7 - 3
jcjyhr/web/src/components/table/header/index.vue

@@ -298,9 +298,13 @@ const onChangeShowColumn = (value: string | number | boolean, field: string) =>
 const onImportBeforeUpload = (file: any) => {
     console.log(file)
 }
-const onSuccess = () => {
-    baTable.onTableHeaderAction('refresh', { loading: true })
-    ElMessage.success(t('layouts.Import successful'))
+const onSuccess = (e) => {
+    if(e.code == 1) {
+        baTable.onTableHeaderAction('refresh', { loading: true })
+        ElMessage.success(t('layouts.Import successful'))
+    }else {
+        ElMessage.error(t('layouts.Import failed'))
+    }
 }
 const onError = () => {
     console.log('上传错误')

+ 2 - 1
jcjyhr/web/src/lang/backend/en.ts

@@ -39,7 +39,8 @@ export default {
         'Dark mode': 'Dark mode',
         'Exit full screen': 'Exit Full Screen',
         'Full screen is not supported': 'Your browser does not support full screen, please change another browser and try again~',
-        'Import successful': 'Import successful'
+        'Import successful': 'Import successful',
+        'Import failed': 'Import failed',
     },
     terminal: {
         Terminal: 'Terminal',

+ 2 - 1
jcjyhr/web/src/lang/backend/zh-cn.ts

@@ -40,7 +40,8 @@ export default {
         'Dark mode': '暗黑模式',
         'Exit full screen': '退出全屏',
         'Full screen is not supported': '您的浏览器不支持全屏,请更换浏览器再试~',
-        'Import successful': '导入成功'
+        'Import successful': '导入成功',
+        'Import failed': '导入失败',
     },
     terminal: {
         Terminal: '终端',

+ 2 - 1
jcjyhr/web/src/lang/backend/zh-cn/hospital/hrpatient.ts

@@ -17,7 +17,8 @@ export default {
     status: '互认状态',
     'quick Search Fields': 'ID',
     index: '序号',
-    tab_my: '本机构患者',
+    // tab_my: '本机构患者',
+    tab_my: '机构患者',
     tab_other: '其他机构的患者',
 
     Search_MY_ORGNAME: '机构信息',

+ 0 - 1
jcjyhr/web/src/layouts/backend/router-view/main.vue

@@ -51,7 +51,6 @@ const addKeepAliveComponentName = function (keepAliveName: string | undefined) {
 
 onBeforeMount(() => {
     proxy.eventBus.on('onTabViewRefresh', (menu: RouteLocationNormalized) => {
-        debugger
         state.keepAliveComponentNameList = state.keepAliveComponentNameList.filter((name: string) => menu.meta.keepalive !== name)
         state.componentKey = ''
         nextTick(() => {

+ 1 - 1
jcjyhr/web/src/stores/localSelect.ts

@@ -56,7 +56,7 @@ export const useLocalSelect = defineStore('localSelect', {
             DICT_LIST: getDefaultLocalSelectOption(),
             GENDER_LIST: getDefaultLocalSelectOption(),
             INS_LIST: getCodeLocalSelectOption(),
-            INS_NAME_LIST: getDefaultLocalSelectOption(),
+            INS_NAME_LIST: getCodeLocalSelectOption(),
             INS_TYPE_LIST: getDefaultLocalSelectOption(),
             HR_RANGE_LIST: getDefaultLocalSelectOption(),
             GROUP_LIST: getCodeLocalSelectOption(),

+ 43 - 22
jcjyhr/web/src/views/backend/hospital/detail/table.vue

@@ -8,6 +8,7 @@
           <el-tooltip
             class="item"
             effect="dark"
+            v-if="(!Array.isArray(tableData) && tableData.INSPECT_REPORT_ITEMS.length) || ( Array.isArray(tableData) && tableData.length)"
             :content="localData.tableData.LAB_ITEMNAME?timeFormat(localData.tableData.REPORTTIME, 'yyyy.mm.dd hh:MM') + ' ' + localData.tableData.LAB_ITEMNAME:'检查项目'"
             placement="top-start"
             >
@@ -15,7 +16,7 @@
           </el-tooltip>
           <el-tag v-if="localData.tableData.INSPECT_REPORT_ITEMS" :key="localData.tableData.HR_RANGE" type="success" effect="dark">{{localData.tableData.HR_RANGE}}</el-tag>
         </div>
-        <div v-if="localData.tableData.LAB_ITEMNAME_TYPE_CODE == '2'" >
+        <div v-if="switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '2'" >
           <p>鉴定结果: {{localData.tableData.INSPECT_REPORT_ITEMS[0].LAB_ITEMDETAILINTERPRETATION}}</p>
           <p>药敏结果:{{localData.tableData.INSPECT_REPORT_ITEMS[0].LAB_ITEMDETAILINTERPRETATION_BIA}}</p>
         </div>
@@ -26,15 +27,15 @@
           effect="dark"
           :content="localData.tableData.BHR_REASON?localData.tableData.BHR_REASON:getHrResultLabel(localData.tableData.HR_STATUS)"
           placement="top-start"
-          v-if="props.from != 'patientTable' && localData.tableData.HR_STATUS == '2' &&(localData.tableData.LAB_ITEMNAME_TYPE_CODE == '1' && localData.tableData.LAB_HR_ITEMNAME_CODE) || localData.tableData.LAB_ITEMNAME_TYPE_CODE == '2'"
+          v-if="props.from != 'patientTable' && localData.tableData.HR_STATUS == '2' &&(switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '1' && localData.tableData.LAB_HR_ITEMNAME_CODE) || switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '2'"
         >
            <div class="hr-select-box">{{getHrResultLabel(localData.tableData.HR_STATUS)}}</div>
         </el-tooltip>
-        <span v-else-if="props.from != 'patientTable' && localData.tableData.HR_STATUS !== '2' &&(localData.tableData.LAB_ITEMNAME_TYPE_CODE == '1' && localData.tableData.LAB_HR_ITEMNAME_CODE) || localData.tableData.LAB_ITEMNAME_TYPE_CODE == '2'" style="color: var(--el-color-success);font-weight: 800;font-size: 16px;margin-right:12px;">{{getHrResultLabel(localData.tableData.HR_STATUS)}}</span>
-        <el-button v-if="localData.tableData.INSPECT_REPORT_ITEMS" type="primary" :color="'var(--ba-vars-color-main-primary)'" @click="handleReportView('INSPECT')">查看报告</el-button>
+        <span v-else-if="props.from != 'patientTable' && localData.tableData.HR_STATUS !== '2' &&(switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '1' && localData.tableData.LAB_HR_ITEMNAME_CODE) || switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '2'" style="color: var(--el-color-success);font-weight: 800;font-size: 16px;margin-right:12px;">{{getHrResultLabel(localData.tableData.HR_STATUS)}}</span>
+        <el-button v-if="localData.tableData.INSPECT_REPORT_ITEMS && localData.tableData.REPORT" type="primary" :color="'var(--ba-vars-color-main-primary)'" @click="handleReportView(localData.tableData)">查看报告</el-button>
       </div>
     </div>
-    <el-table v-if="localData.tableData.LAB_ITEMNAME_TYPE_CODE == '1'" :data="localData.tableData.INSPECT_REPORT_ITEMS" header-cell-class-name="table-header-cell" stripe  style="width: 100%">
+    <el-table v-if="switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '1'" :data="localData.tableData.INSPECT_REPORT_ITEMS" header-cell-class-name="table-header-cell" stripe  style="width: 100%">
       <el-table-column type="index" label="序号" width="70" align="center" />
       <el-table-column prop="LAB_ITEMDETAILNAME_EN" label="代号" width="90" align="center" />
       <el-table-column prop="LAB_ITEMDETAILNAME" label="项目名称" width="180" align="center" />
@@ -71,7 +72,7 @@
         </template>
       </el-table-column> -->
     </el-table>
-    <div v-else-if="localData.tableData.LAB_ITEMNAME_TYPE_CODE == '2'">
+    <div v-if="switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '2'">
       <el-table
         class="ba-data-table w100"
         :data="localData.tableData.INSPECT_REPORT_ITEMS" 
@@ -88,22 +89,22 @@
       </el-table>
       <p style="padding: 12px;font-weight: 600;color: var(--el-text-color-primary);">评语:{{localData.tableData.REPORT_COMMENT}}</p>
     </div>
-    <el-table v-else :data="tableData" header-cell-class-name="table-header-cell" stripe style="width: 100%">
+    <el-table v-if="tableData.length" :data="tableData" header-cell-class-name="table-header-cell" stripe style="width: 100%">
       <el-table-column type="index" label="序号" width="60" align="center" />
       <el-table-column prop="STUDYTIME" label="检查时间" width="100" align="center" />
       <el-table-column prop="EXAM_ITEMNAME" label="项目名称" width="120" align="center" />
       <el-table-column prop="OBSERVATIONS_COMMENT" label="检查所见/影像所见" width="200" align="center">
         <template #default="{ row }">
-          <span v-if="!row.isCoExpanded && row.OBSERVATIONS_COMMENT.length > 40" v-html="(row.OBSERVATIONS_COMMENT.slice(0, 40) + '...')"></span>
+          <span v-if="!row.isCoExpanded && row.OBSERVATIONS_COMMENT && row.OBSERVATIONS_COMMENT.length > 40" v-html="(row.OBSERVATIONS_COMMENT.slice(0, 40) + '...')"></span>
           <span v-else v-html="row.OBSERVATIONS_COMMENT"></span>
-          <el-button v-if="!row.isCoExpanded && row.OBSERVATIONS_COMMENT.length > 40" type="text" @click="showFullContent(row, 'comment')">更多</el-button>
+          <el-button v-if="!row.isCoExpanded && row.OBSERVATIONS_COMMENT && row.OBSERVATIONS_COMMENT.length > 40" type="text" @click="showFullContent(row, 'comment')">更多</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="OBSERVATIONS_RESULT" label="影像诊断/意见" width="200" align="center">
         <template #default="{ row }">
-          <span v-if="!row.isReExpanded" v-html="(row.OBSERVATIONS_RESULT.slice(0, 40) + '...')"></span>
+          <span v-if="!row.isReExpanded" v-html="(row.OBSERVATIONS_RESULT && row.OBSERVATIONS_RESULT.slice(0, 40) + '...')"></span>
           <span v-else v-html="row.OBSERVATIONS_RESULT"></span>
-          <el-button v-if="!row.isReExpanded" type="text" @click="showFullContent(row, 'result')">更多</el-button>
+          <el-button v-if="!row.isReExpanded && row.OBSERVATIONS_RESULT" type="text" @click="showFullContent(row, 'result')">更多</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="HR_RANGE" label="互认范围" width="80" align="center" />
@@ -127,11 +128,21 @@
         </template>
       </el-table-column>
       <el-table-column label="检查报告/影像图片" min-width="120" align="center">
-        <template #default="scope">
+        <!-- <template #default="scope">
           <el-button link type="primary" size="small" @click="handleReportView(scope.row)">
             报告查看
           </el-button>
           <el-button link type="primary" size="small" @click="goImageView">影像查看</el-button>
+        </template> -->
+
+        <template #default="scope">
+          <el-button v-if="scope.row.REPORT" link type="primary" size="small" @click="handleReportView(scope.row)">
+            报告查看 
+          </el-button>
+          <el-button v-else link disabled size="small">暂无报告附件</el-button>
+
+          <el-button v-if="scope.row.STUDY_ID" link type="primary" size="small" @click="goImageView(scope.row)">影像查看</el-button>
+          <el-button v-else link disabled size="small">暂无影像关联</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -160,6 +171,7 @@ import { useI18n } from 'vue-i18n'
 import { timeFormat } from '/@/utils/common'
 import { getHrResultLabel } from '/@/utils/hrResult'
 import examReport from '/@/assets/examreport.png'
+import { config } from '/@/utils/config'
 const { t } = useI18n()
 const dialogVisible:any = inject('dialogVisible')
 defineOptions({
@@ -181,19 +193,27 @@ const props = withDefaults(defineProps<Props>(), {
     activeIndex: 0
 })
 const handleReportView = (row: any) => {
-    if(row && row == 'INSPECT') {
-        // fetchGetAttachment(localData.tableData.REPORT)
-        dialogVisible(localData.tableData.REPORT)
-    }else {
-        dialogVisible(row.REPORT)
-    }
+    // if(row && row == 'INSPECT') {
+    //     dialogVisible(localData.tableData.REPORT)
+    // }else {
+    //     dialogVisible(row.REPORT)
+    // }
+    fetchGetAttachment(row.REPORT)
 }
 const fetchGetAttachment = (Report: string) => {
    
     dialogVisible(Report)
 }
-const goImageView = () => {
-    window.open('http://aipacsview.pacsonline.cn/#/pc?studyurl=https%3A%2F%2Fquery.pacsonline.cn%2Fquery%2F%3Faddress%3D&study_id=600162858d43dfc92c107759ecdb030b&node_type=1&node_type=1&version=V4.0.0.0')
+const goImageView = (row: TableRow) => {
+    // window.open('http://aipacsview.pacsonline.cn/#/pc?studyurl=https%3A%2F%2Fquery.pacsonline.cn%2Fquery%2F%3Faddress%3D&study_id=600162858d43dfc92c107759ecdb030b&node_type=1&node_type=1&version=V4.0.0.0')
+    window.open( config.pacsview_url + row.STUDY_ID +'&node_type=&node_type=1&version=V1.2.0.0')
+}
+const switchType = (code: string) => {
+    if(code && code !== '11'){
+        return '1'
+    }else if(code && code === '11') {
+        return '2'
+    }
 }
 const checkData = () => {  //检验细项 是否展示互认结果列 (大项不存在互认项目编码)
     const hasCode = props.tableData.INSPECT_REPORT_ITEMS.some((item: any) => !props.tableData.LAB_HR_ITEMNAME_CODE && item.LAB_HR_ITEMDETAILNAME_CODE);
@@ -220,8 +240,9 @@ const localData = reactive<{
 }>({
     tableData: props.tableData,
 });
+console.log(localData, '======')
 const formatTableData = () => {
-    if((localData.tableData.LAB_ITEMNAME_TYPE_CODE == '2' || localData.tableData.LAB_ITEMNAME_TYPE_CODE == '1') && localData.tableData && props.hrrecords && !checkData()){ //检验-微生物 或 检验-大项有互认项目编码
+    if((switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '2' || switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '1') && localData.tableData && props.hrrecords && !checkData()){ //检验-微生物 或 检验-大项有互认项目编码
         const findMatchingItem = props.hrrecords.find((it: { ITEMNAMECODE: string; }) => it.ITEMNAMECODE === localData.tableData.LAB_HR_ITEMNAME_CODE);
         localData.tableData = {
             ...localData.tableData,
@@ -229,7 +250,7 @@ const formatTableData = () => {
             BHR_REASON: findMatchingItem?(findMatchingItem.BHR_REASON ? findMatchingItem.BHR_REASON: getHrResultLabel(findMatchingItem?.HR_STATUS)): getHrResultLabel(findMatchingItem?.HR_STATUS),
             cascaderValue: findMatchingItem?(findMatchingItem.BHR_CODE ? [findMatchingItem.HR_STATUS,findMatchingItem.BHR_CODE]:[findMatchingItem.HR_STATUS]):['0']
         }
-    }else if(localData.tableData && localData.tableData.LAB_ITEMNAME_TYPE_CODE == '1' && props.hrrecords){ // 检验
+    }else if(localData.tableData && switchType(localData.tableData.LAB_ITEMNAME_TYPE_CODE) == '1' && props.hrrecords){ // 检验
         const INSPECTREPORTITEMS = localData.tableData.INSPECT_REPORT_ITEMS.map((item: any) => {
             const findMatchingItem = props.hrrecords.find((it: { ITEMNAMECODE: string; }) => it.ITEMNAMECODE === item.LAB_ITEMDETAILNAME_CODE);
             return {

+ 2 - 2
jcjyhr/web/src/views/backend/hospital/hrpatient/index.vue

@@ -4,9 +4,9 @@
             <el-tab-pane :label="t('hospital.hrpatient.tab_my')" name="first" >
                 <MyTable ref="myTableRef" highlight-current-row />
             </el-tab-pane>
-            <el-tab-pane :label="t('hospital.hrpatient.tab_other')" name="second" lazy="true">
+            <!-- <el-tab-pane :label="t('hospital.hrpatient.tab_other')" name="second" lazy="true">
                 <OtherTable ref="otherTableRef" highlight-current-row />
-            </el-tab-pane>
+            </el-tab-pane> -->
             <el-tab-pane name="three">
               <template #label>
                 <div class="table-search">

+ 5 - 2
jcjyhr/web/src/views/backend/hospital/hrpatient/myTable.vue

@@ -115,14 +115,17 @@ const baTable = new baTableClass(
             { comSearchWeight: 20, comSearchLabel: t('hospital.hrpatient.Search_LAB_ITEMNAME'), showOverflowTooltip: true, label: t('hospital.hrpatient.LAB_ITEMNAME'), prop: 'LAB_ITEMNAME', width: 130, align: 'center', operator: 'LIKE', sortable: false, },
             { comSearchWeight: 10, comSearchLabel: t('hospital.hrpatient.Search_EXAM_ITEMNAME'), showOverflowTooltip: true, label: t('hospital.hrpatient.EXAM_ITEMNAME'), prop: 'EXAM_ITEMNAME', width: 130, align: 'center', operator: 'LIKE', sortable: false, },
             { comSearchWeight: 30, comSearchLabel: t('hospital.hrpatient.Search_create_time'), showOverflowTooltip: true, label: t('hospital.hrpatient.create_time'), prop: 'create_time', align: 'center', render: 'datetime', operator: 'RANGE', sortable: 'custom', width: 130, timeFormat: 'yyyy-mm-dd hh:MM' },
-            { comSearchWeight: 110, comSearchLabel: t('hospital.hrpatient.Search_MY_ORGNAME'), show: false, showOverflowTooltip: true, label: t('hospital.hrpatient.MY_ORGNAME'), prop: 'ORGNAME', align: 'center', operator: 'IN', 
+            { comSearchWeight: 110, comSearchLabel: t('hospital.hrpatient.Search_MY_ORGNAME'), show: false, showOverflowTooltip: true, label: t('hospital.hrpatient.MY_ORGNAME'), prop: 'ORGCODE', align: 'center', operator: 'IN', 
                 filterable: true,
                 comSearchRender: 'localSelect',
                 local: localSelect.INS_NAME_LIST,
                 localExt: {
                     clearable: false,
                 },
-                width: 125
+                width: 125,
+                formatter(row, column, cellValue, index) {
+                    return row.ORGNAME
+                },
                 // comSearchRender: 'remoteSelect', remote: {
                 //     // TODO 后期看看需不需要传ID服务端做对应调整
                 //     pk: "name",

+ 4 - 1
jcjyhr/web/src/views/backend/hospital/hrpatient/otherTable.vue

@@ -58,8 +58,11 @@ const baTable = new baTableClass(
         column: [
             { fixed: true, label: '序号', type: 'index', width: 52, align: 'center', operator: false },
             { fixed: true, comSearchWeight: 30, comSearchLabel: t('hospital.hrpatient.Search_create_time'), label: t('hospital.hrpatient.create_time'), prop: 'create_time', align: 'center', render: 'datetime', operator: 'RANGE', sortable: 'custom', width: 130, timeFormat: 'yyyy-mm-dd hh:MM' },
-            { fixed: true, comSearchWeight: 40, comSearchLabel: t('hospital.hrpatient.Search_OTHER_ORGNAME'), showOverflowTooltip: true, label: t('hospital.hrpatient.OTHER_ORGNAME'), prop: 'ORGNAME', align: 'center', 
+            { fixed: true, comSearchWeight: 40, comSearchLabel: t('hospital.hrpatient.Search_OTHER_ORGNAME'), showOverflowTooltip: true, label: t('hospital.hrpatient.OTHER_ORGNAME'), prop: 'ORGCODE', align: 'center', 
                 operator: 'LIKE', sortable: 'custom',width: 120,
+                formatter(row, column, cellValue, index) {
+                    return row.ORGNAME
+                },
                 // operator: 'IN', 
                 // comSearchRender: 'remoteSelect', remote: {
                 //     // TODO 后期看看需不需要传ID服务端做对应调整

+ 17 - 4
jcjyhr/web/src/views/backend/hospital/patient/allTable.vue

@@ -63,8 +63,11 @@ const baTable = new baTableClass(
             // { label: t('hospital.patient.ID'), prop: 'ID', align: 'center', width: 70, operator: 'RANGE', sortable: 'custom' },
 
             { fixed: true, label: '序号', type: 'index', width: 52, align: 'center', operator: false },
-            { fixed: true, comSearchWeight: 30, comSearchLabel: t('hospital.patient.Search_create_time'), showOverflowTooltip: true, label: t('hospital.patient.create_time'), prop: 'create_time', align: 'center', render: 'datetime', operator: 'RANGE', sortable: 'custom', width: 135, timeFormat: 'yyyy-mm-dd hh:MM' },
-            { fixed: true, comSearchWeight: 110, comSearchLabel: t('hospital.patient.Search_ORGNAME'), showOverflowTooltip: true, label: t('hospital.patient.ORGNAME'), prop: 'ORGNAME', align: 'center', operator: 'IN', sortable: 'custom', width: 125,
+            { fixed: true, comSearchWeight: 30, comSearchLabel: t('hospital.patient.Search_create_time'), showOverflowTooltip: true, label: t('hospital.patient.create_time'), prop: 'CREATE_TIME', align: 'center', render: 'datetime', operator: 'RANGE', sortable: 'custom', width: 135, timeFormat: 'yyyy-mm-dd hh:MM' },
+            { fixed: true, comSearchWeight: 110, comSearchLabel: t('hospital.patient.Search_ORGNAME'), showOverflowTooltip: true, label: t('hospital.patient.ORGNAME'), prop: 'ORGCODE', align: 'center', operator: 'IN', sortable: 'custom', width: 125,
+                formatter(row, column, cellValue, index) {
+                    return row.ORGNAME
+                },
                 // comSearchRender: 'remoteSelect', remote: {
                 //     // TODO 后期看看需不需要传ID服务端做对应调整
                 //     pk: "name",
@@ -102,7 +105,7 @@ const baTable = new baTableClass(
             },
             { fixed: true, comSearchWeight: 80, showOverflowTooltip: true, label: t('hospital.patient.AGE'), prop: 'AGE', align: 'center', operator: false, sortable: 'custom',
                 formatter: function(row, column, cellValue) {
-                    return FormatUtil.AGE.display(cellValue)
+                    return cellValue?FormatUtil.AGE.display(cellValue):''
                 }
             },
             { fixed: true, comSearchWeight: 70, showOverflowTooltip: true, label: t('hospital.patient.ID_CARDNUM'), prop: 'ID_CARDNUM', align: 'center', operatorPlaceholder: t('Accurate query'), operator: 'eq', sortable: false, width: 90 },
@@ -115,7 +118,7 @@ const baTable = new baTableClass(
             // { label: t('Operate'), align: 'center', width: 100, render: 'buttons', buttons: optButtons, operator: false },
         ],
         dblClickNotEditColumn: [undefined],
-        defaultOrder: { prop: 'create_time', order: 'desc' },
+        defaultOrder: { prop: 'CREATE_TIME', order: 'desc' },
     },
     {
         defaultItems: { ORGNAME: null, NAME: null, GENDER: null, AGE: null, ID_CARDNUM: null, MPI: null, ENCOUNTER_DATE: null, CHIEFCOMPLAINT: null, DIAGNOSENAME: null, LAB_ITEMNAME: null, EXAM_ITEMNAME: null },
@@ -155,6 +158,12 @@ defineExpose({
 });
 const updateBaTable = inject('updateBaTable') as any
 const loadData = () => {
+    if (!baTable.table.filter?.orderBy) {
+        baTable.table.filter = {
+            ...baTable.table.filter,
+            order: 'CREATE_TIME,desc'
+        }
+    }
     baTable.getIndex()?.then(() => {
         baTable.initSort()
         baTable.dragSort()
@@ -165,6 +174,10 @@ onMounted(async() => {
     baTable.table.ref = tableRef.value
     baTable.mount()
     await localSelect.initLISTS([localSelect._KEY.GENDER_LIST, localSelect._KEY.INS_NAME_LIST, ])
+    baTable.table.filter = {
+        ...baTable.table.filter,
+        order: 'CREATE_TIME,desc'
+    }
     loadData()
     // baTable.getIndex()?.then(() => {
     //     baTable.initSort()

+ 18 - 4
jcjyhr/web/src/views/backend/hospital/patient/todayTable.vue

@@ -57,8 +57,11 @@ const baTable = new baTableClass(
             // { type: 'selection', align: 'center', operator: false },
             // { label: t('hospital.patient.ID'), prop: 'ID', align: 'center', width: 70, operator: 'RANGE', sortable: 'custom' },
             { fixed: true, label: t('hospital.patient.index'), type: 'index', width: 52, align: 'center', operator: false },
-            { fixed: true, comSearchWeight: 30, comSearchLabel: t('hospital.patient.Search_create_time'), showOverflowTooltip: true, label: t('hospital.patient.create_time'), prop: 'create_time', align: 'center', render: 'datetime', operator: 'RANGE', sortable: 'custom', width: 135, timeFormat: 'yyyy-mm-dd hh:MM' },
-            { fixed: true, comSearchWeight: 110, comSearchLabel: t('hospital.patient.Search_ORGNAME'), showOverflowTooltip: true, label: t('hospital.patient.ORGNAME'), prop: 'ORGNAME', align: 'center', operator: 'IN', sortable: 'custom', width: 125,
+            { fixed: true, comSearchWeight: 30, comSearchLabel: t('hospital.patient.Search_create_time'), showOverflowTooltip: true, label: t('hospital.patient.create_time'), prop: 'CREATE_TIME', align: 'center', render: 'datetime', operator: 'RANGE', sortable: 'custom', width: 135, timeFormat: 'yyyy-mm-dd hh:MM' },
+            { fixed: true, comSearchWeight: 110, comSearchLabel: t('hospital.patient.Search_ORGNAME'), showOverflowTooltip: true, label: t('hospital.patient.ORGNAME'), prop: 'ORGCODE', align: 'center', operator: 'IN', sortable: 'custom', width: 125,
+                formatter(row, column, cellValue, index) {
+                    return row.ORGNAME
+                },
                 // comSearchRender: 'remoteSelect', remote: {
                 //     // TODO 后期看看需不需要传ID服务端做对应调整
                 //     pk: "name",
@@ -89,7 +92,7 @@ const baTable = new baTableClass(
             },
             {show: false, comSearchWeight: 80, showOverflowTooltip: true, label: t('hospital.patient.AGE'), prop: 'AGE_DAY', align: 'center', operator: 'RANGE', sortable: 'custom',
                 formatter: function(row, column, cellValue) {
-                    return FormatUtil.AGE.display(cellValue)
+                    return cellValue?FormatUtil.AGE.display(cellValue):''
                 }
             },
             // 年龄搜索格式化 补齐4位 前补0 后补Y
@@ -108,7 +111,7 @@ const baTable = new baTableClass(
             // { label: t('Operate'), align: 'center', width: 100, render: 'buttons', buttons: optButtons, operator: false },
         ],
         dblClickNotEditColumn: [undefined],
-        defaultOrder: { prop: 'create_time', order: 'desc' },
+        defaultOrder: { prop: 'CREATE_TIME', order: 'desc' },
     },
     {
         defaultItems: { ORGNAME: null, NAME: null, GENDER: null, AGE: null, ID_CARDNUM: null, MPI: null, ENCOUNTER_DATE: null, CHIEFCOMPLAINT: null, DIAGNOSENAME: null, LAB_ITEMNAME: null, EXAM_ITEMNAME: null },
@@ -152,6 +155,12 @@ defineExpose({
 // const updateTotalCount = inject('updateTotalCount') as any;
 const updateBaTable = inject('updateBaTable') as any
 const loadData = () => {
+    if (!baTable.table.filter?.orderBy) {
+        baTable.table.filter = {
+            ...baTable.table.filter,
+            order: 'CREATE_TIME,desc'
+        }
+    }
     baTable.getIndex()?.then(() => {
         baTable.initSort()
         baTable.dragSort()
@@ -163,6 +172,11 @@ onMounted(async() => {
     baTable.table.ref = tableRef.value
     baTable.mount()
     await localSelect.initLISTS([localSelect._KEY.GENDER_LIST, localSelect._KEY.INS_NAME_LIST, ])
+    baTable.table.filter = {
+        ...baTable.table.filter,
+        order: 'CREATE_TIME,desc'
+
+    }
     loadData()
     // baTable.getIndex()?.then(() => {
     //     baTable.initSort()