Переглянути джерело

新冠核酸检测报告中日期查询可以携带时分秒

xiaochan 3 роки тому
батько
коміт
9600a50924
1 змінених файлів з 25 додано та 25 видалено
  1. 25 25
      src/views/examination/CovidExamResult.vue

+ 25 - 25
src/views/examination/CovidExamResult.vue

@@ -2,13 +2,12 @@
   <el-container>
     <el-header height="36px" style="margin-top: 8px">
       <el-date-picker
-        v-model="dateRange"
-        type="daterange"
-        range-separator="至"
-        start-placeholder="开始日期"
-        end-placeholder="结束日期"
-        :shortcuts="shortcuts"
-        style="width: 260px"
+          v-model="dateRange"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :shortcuts="shortcuts"
       ></el-date-picker>
       <span></span>
       <el-select v-model="type" style="width: 130px">
@@ -27,27 +26,28 @@
         <el-table-column prop="ordrCreateDate" label="送检时间"></el-table-column>
       </el-table>
       <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="currentPage"
-        :page-sizes="[15, 30, 45, 70, 100]"
-        :page-size="pageSize"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="totalSize"
-        style="margin-top: 5px"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[15, 30, 45, 70, 100]"
+          :page-size="pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="totalSize"
+          style="margin-top: 5px"
       ></el-pagination>
     </el-main>
   </el-container>
 </template>
 
 <script>
-import { ref } from 'vue'
-import { formatDate } from '@/utils/date'
-import { shortcuts } from '@/data/shortcuts'
-import { fetchCovidExamData } from '@/api/inspections'
+import {ref} from 'vue'
+import {formatDate, formatDatetime} from '@/utils/date'
+import {shortcuts} from '@/data/shortcuts'
+import {fetchCovidExamData} from '@/api/inspections'
 import store from '@/store'
-import { writeExcelFile, createWorkSheet } from '@/utils/excel'
-import { ElMessage } from 'element-plus'
+import {writeExcelFile, createWorkSheet} from '@/utils/excel'
+import {ElMessage} from 'element-plus'
+
 export default {
   setup() {
     const windowSize = store.state.app.windowSize
@@ -82,8 +82,8 @@ export default {
         return
       }
       const param = {
-        start: formatDate(dateRange.value[0]),
-        end: formatDate(dateRange.value[1]),
+        start: formatDatetime(dateRange.value[0]),
+        end: formatDatetime(dateRange.value[1]),
         currentPage: currentPage.value,
         pageSize: pageSize.value,
         type: type.value,
@@ -151,8 +151,8 @@ export default {
 
 function initTypes() {
   return [
-    { code: 1, name: '核酸检测' },
-    { code: 2, name: '抗体检测' },
+    {code: 1, name: '核酸检测'},
+    {code: 2, name: '抗体检测'},
   ]
 }
 </script>