|
@@ -0,0 +1,160 @@
|
|
|
+<template>
|
|
|
+
|
|
|
+ <div class="layout_container">
|
|
|
+ <header>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="dateRange"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ style="width: 220px"
|
|
|
+ ></el-date-picker>
|
|
|
+ <el-input v-model="zyh" class="w-50 m-2" style="width: 240px" placeholder="请输入门诊号" clearable>
|
|
|
+ <template #prepend>门诊号 </template>
|
|
|
+ </el-input>
|
|
|
+ <el-input v-model="xm" class="w-50 m-2" style="width: 240px" placeholder="请输入姓名" clearable>
|
|
|
+ <template #prepend>姓名 </template>
|
|
|
+ </el-input>
|
|
|
+ <el-button type="primary" icon="Search" @click="query" style="margin-left: 5px">查询</el-button>
|
|
|
+ <el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出</el-button>
|
|
|
+ </header>
|
|
|
+ <div class="layout_main">
|
|
|
+ <xc-table :data="returnData" localPaging>
|
|
|
+ <el-table-column type="index" label="序号" align="center"></el-table-column>
|
|
|
+ <template v-for="col in returnData.tableDisplays">
|
|
|
+ <el-table-column v-if="col.prop.endsWith('-t')" :prop="col.prop" :label="col.label" :width="col.width" :align="col.align">
|
|
|
+ <template v-for="cell in returnData.chirdData">
|
|
|
+ <el-table-column v-if="cell.pid === col.id" :prop="cell.prop" :label="cell.label" :sortable="col.px"
|
|
|
+ :width="cell.width" :align="cell.align">
|
|
|
+ </el-table-column>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-else :prop="col.prop" :label="col.label" :width="col.width" :align="col.align" :sortable="col.px">
|
|
|
+ </el-table-column>
|
|
|
+ </template>
|
|
|
+ </xc-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+</template>
|
|
|
+<script setup name="PowersiMip" >
|
|
|
+
|
|
|
+import { reactive, ref } from 'vue'
|
|
|
+import { shortcuts, clockinShortcuts } from '@/data/shortcuts'
|
|
|
+import { formatDate, getDateRangeFormatDate } from '@/utils/date'
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
+import { selectReportPortalMenu, exportReportPortalData } from '@/api/reports/high-report'
|
|
|
+import XcTable from '@/components/xiao-chan/xc-table/XcTable.vue'
|
|
|
+
|
|
|
+let nowDay = new Date()
|
|
|
+nowDay.setTime(nowDay.getTime() - 24 * 60 * 60 * 1000)
|
|
|
+let yf, inday
|
|
|
+if (nowDay.getMonth() < 9) {
|
|
|
+ yf = '0' + (nowDay.getMonth() + 1)
|
|
|
+} else {
|
|
|
+ yf = nowDay.getMonth() + 1
|
|
|
+}
|
|
|
+if (nowDay.getDate() < 10) {
|
|
|
+ inday = '0' + (nowDay.getDate() + 1)
|
|
|
+} else {
|
|
|
+ inday = nowDay.getDate() + 1
|
|
|
+}
|
|
|
+let s1 = nowDay.getFullYear() + "-" + yf + "-" + inday
|
|
|
+let s2 = nowDay.getFullYear() + "-" + yf + "-" + '01'
|
|
|
+const start = formatDate(s2);
|
|
|
+const end = formatDate(s1);
|
|
|
+const dateRange = ref([]);
|
|
|
+const queryTerm = reactive({
|
|
|
+ startTime: "",
|
|
|
+ endTime: "",
|
|
|
+ dept: "",
|
|
|
+ doctor: "",
|
|
|
+ zyh: "",
|
|
|
+ xm: "",
|
|
|
+ reportId: "mz_powersi",
|
|
|
+ menuId: "199",
|
|
|
+ type: "1",
|
|
|
+});
|
|
|
+
|
|
|
+const xm = ref('')
|
|
|
+const zyh = ref('')
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ queryTerm.startTime = start + ' 00:00:00';
|
|
|
+ queryTerm.endTime = end + " 23:59:59";
|
|
|
+ dateRange.value = [start, end];
|
|
|
+ const param = {
|
|
|
+ str: '',
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
+const returnData = ref({
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 30,
|
|
|
+ total: 0,
|
|
|
+ data: []
|
|
|
+});
|
|
|
+
|
|
|
+const query = async () => {
|
|
|
+ if (dateRange.value) {
|
|
|
+ let dateS = getDateRangeFormatDate(dateRange.value);
|
|
|
+ queryTerm.startTime = dateS.startTime;
|
|
|
+ queryTerm.endTime = dateS.endTime;
|
|
|
+ } else {
|
|
|
+ queryTerm.startTime = start;
|
|
|
+ queryTerm.endTime = end;
|
|
|
+ ElMessage({
|
|
|
+ type: "info",
|
|
|
+ message: "默认查询本月的数据",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ queryTerm.xm = xm.value
|
|
|
+ queryTerm.zyh = zyh.value
|
|
|
+ await selectReportPortalMenu(queryTerm)
|
|
|
+ .then((res) => {
|
|
|
+ let id
|
|
|
+ returnData.value.tableDisplays = []
|
|
|
+ returnData.value.chirdData = []
|
|
|
+ res.tableDisplays.forEach(item => {
|
|
|
+ if (item.prop.endsWith('-t')) {
|
|
|
+ id = item.id
|
|
|
+ if(item.sortable === 'true'){
|
|
|
+ item.px = true
|
|
|
+ }
|
|
|
+ returnData.value.tableDisplays.push(item)
|
|
|
+ } else {
|
|
|
+ if(item.sortable === 'true'){
|
|
|
+ item.px = true
|
|
|
+ }
|
|
|
+ if (item.pid === id) {
|
|
|
+ returnData.value.chirdData.push(item)
|
|
|
+ } else {
|
|
|
+ returnData.value.tableDisplays.push(item)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ returnData.value.data = res.dataList
|
|
|
+ returnData.value.total = returnData.value.data.length
|
|
|
+ });
|
|
|
+};
|
|
|
+const exportData = () => {
|
|
|
+ if (returnData.value.data.length <= 0) {
|
|
|
+ ElMessage({
|
|
|
+ message: '没有可以导出的数据!',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ queryTerm.xm = xm.value
|
|
|
+ queryTerm.zyh = zyh.value
|
|
|
+ // 导出excel表格标题
|
|
|
+ queryTerm.exportName = '移动支付统计'
|
|
|
+ exportReportPortalData(queryTerm)
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|