|
@@ -9,15 +9,38 @@
|
|
|
<el-table :data="returnData.resultData" :height="tableHeight" stripe highlight-current-row>
|
|
|
<el-table-column type="expand">
|
|
|
<template #default="props">
|
|
|
- <el-table :data="props.row.children" v-show="props.row.isChildren">
|
|
|
- <template v-for="(col, index) in returnData.headTitle" :key="index">
|
|
|
- <el-table-column v-if="col.prop === 'item'" :prop="col.prop" :label="col.label" fixed width="140">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column v-else-if="col.prop === 'total'" :prop="col.prop" :label="col.label" fixed>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column v-else :prop="col.prop" :label="col.label"></el-table-column>
|
|
|
- </template>
|
|
|
- </el-table>
|
|
|
+ <div v-if="props.row.isChildren">
|
|
|
+ <el-table :data="props.row.children">
|
|
|
+ <template v-for="(col, index) in returnData.headTitle" :key="index">
|
|
|
+ <el-table-column v-if="col.prop === 'item'" :prop="col.prop" :label="col.label" fixed width="140">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-else-if="col.prop === 'total'" :prop="col.prop" :label="col.label" fixed>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-else :prop="col.prop" :label="col.label"></el-table-column>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="props.row.isDept">
|
|
|
+ <el-header>
|
|
|
+ <el-button type="primary" icon="Download" @click="exportPage(props.row.children)"
|
|
|
+ style="margin-left: 5px">导出</el-button>
|
|
|
+ </el-header>
|
|
|
+ <el-table :data="props.row.children.slice(pageSize * (currentPage - 1), pageSize * currentPage)">
|
|
|
+ <el-table-column prop="dept" label="科室" width="140"></el-table-column>
|
|
|
+ <el-table-column prop="doctor" label="医生" width="140"></el-table-column>
|
|
|
+ <el-table-column prop="patNo" label="门诊号" width="140"></el-table-column>
|
|
|
+ <el-table-column prop="times" label="门诊次数" width="140"></el-table-column>
|
|
|
+ <el-table-column prop="psnName" label="病人姓名" width="140"></el-table-column>
|
|
|
+ <el-table-column prop="cbd" label="参保地" width="140"></el-table-column>
|
|
|
+ <el-table-column prop="zd" label="诊断" width="270" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="czr" label="操作人" width="140"></el-table-column>
|
|
|
+ <el-table-column prop="rq" label="结算时间" width="140"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination :current-page="currentPage" :page-size="pageSize" :page-sizes="[15, 30, 45, 60]"
|
|
|
+ :total="props.row.children.length" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ style="margin-top: 5px" @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"></el-pagination>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template v-for="(col, index) in returnData.headTitle" :key="index">
|
|
@@ -37,15 +60,27 @@ import { ElMessage } from 'element-plus'
|
|
|
import store from '@/store'
|
|
|
import { selectOutpatientCoordination } from '@/api/ybkf/yb-mztc'
|
|
|
import PageLayer from '@/layout/PageLayer.vue'
|
|
|
+import { Export } from '@/utils/ExportExcel'
|
|
|
|
|
|
export default {
|
|
|
setup() {
|
|
|
const windowSize = store.state.app.windowSize;
|
|
|
const tableHeight = windowSize.h / 1.02;
|
|
|
+ const pageSize = ref(15)
|
|
|
+ const currentPage = ref(1)
|
|
|
+ const handleSizeChange = (val) => {
|
|
|
+ pageSize.value = val
|
|
|
+ }
|
|
|
+ const handleCurrentChange = (val) => {
|
|
|
+ currentPage.value = val
|
|
|
+ }
|
|
|
const queryTerm = reactive({
|
|
|
month: formatMonth1(new Date()),
|
|
|
});
|
|
|
const returnData = ref([]);
|
|
|
+ onMounted(() => {
|
|
|
+ query()
|
|
|
+ });
|
|
|
const query = () => {
|
|
|
if (queryTerm.month) {
|
|
|
queryTerm.month = formatMonth1(queryTerm.month);
|
|
@@ -66,11 +101,30 @@ export default {
|
|
|
returnData.value = [];
|
|
|
});
|
|
|
};
|
|
|
+ const exportPage = (data) => {
|
|
|
+ const title = {
|
|
|
+ dept: "科室",
|
|
|
+ doctor: "医生",
|
|
|
+ patNo: "门诊号",
|
|
|
+ times: "门诊次数",
|
|
|
+ psnName: "病人姓名",
|
|
|
+ cbd: "参保地",
|
|
|
+ zd: "诊断",
|
|
|
+ czr: "操作人",
|
|
|
+ rq: "结算时间",
|
|
|
+ };
|
|
|
+ Export(data, title, '门诊统筹数据导出');
|
|
|
+ }
|
|
|
return {
|
|
|
queryTerm,
|
|
|
+ pageSize,
|
|
|
+ currentPage,
|
|
|
+ handleSizeChange,
|
|
|
+ handleCurrentChange,
|
|
|
returnData,
|
|
|
tableHeight,
|
|
|
query,
|
|
|
+ exportPage,
|
|
|
};
|
|
|
},
|
|
|
components: { PageLayer }
|