Kaynağa Gözat

日志分析添加住院号/门诊ID作为可选的搜索条件,添加分页

lighter 3 yıl önce
ebeveyn
işleme
07eee64109

+ 26 - 2
src/views/medical-insurance/allpatient/LogAnalyse.vue

@@ -17,11 +17,12 @@
         end-placeholder="结束日期"
         style="width: 220px"
       ></el-date-picker>
+      <el-input v-model="headerParam.patNo" clearable placeholder="住院号/门诊ID" style="width: 130px"></el-input>
       <el-divider direction="vertical"></el-divider>
       <el-button type="primary" icon="el-icon-search" @click="fetchSiLogs">检索</el-button>
     </el-header>
     <el-main>
-      <el-table :data="logs" :height="tableHeight" stripe highlight-current-row @row-dblclick="formatBodyResult">
+      <el-table :data="logs.slice(pageSize * (currentPage - 1), pageSize * currentPage)" :height="tableHeight" stripe highlight-current-row @row-dblclick="formatBodyResult">
         <el-table-column prop="msgid" label="报文ID" width="230"></el-table-column>
         <el-table-column prop="insuplcAdmdvs" label="参保区划" width="60"></el-table-column>
         <el-table-column prop="opter" label="操作员" width="70"></el-table-column>
@@ -39,6 +40,16 @@
           </template>
         </el-table-column>
       </el-table>
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[15, 30, 45, 60]"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="logs.length"
+        style="margin-top: 5px"
+      ></el-pagination>
       <el-drawer v-model="showFormatModal" :with-header="false" :size="drawerWidth">
         <div :style="formattedStyle">
           <div :style="formattedChildStyle">
@@ -64,7 +75,7 @@ export default {
   setup() {
     const store = useStore()
     const windowSize = store.state.app.windowSize
-    const tableHeight = windowSize.h - 80
+    const tableHeight = windowSize.h - 85
     const dateRange = ref(null)
 
     const fullWidth = window.innerWidth
@@ -95,8 +106,17 @@ export default {
       endtime: null,
       logType: 1,
       infno: null,
+      patNo: null,
     })
     const logs = ref([])
+    const pageSize = ref(30)
+    const currentPage = ref(1)
+    const handleSizeChange = (val) => {
+      pageSize.value = val
+    }
+    const handleCurrentChange = (val) => {
+      currentPage.value = val
+    }
     const showFormatModal = ref(false)
     const formattedBody = ref(null)
     const formattedResult = ref(null)
@@ -134,6 +154,10 @@ export default {
       formattedResult,
       fetchSiLogs,
       formatBodyResult,
+      pageSize,
+      currentPage,
+      handleCurrentChange,
+      handleSizeChange,
     }
   },
 }