|
|
@@ -178,13 +178,16 @@ function renderTemplate(data) {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
-function exportExcel() {
|
|
|
+function exportExcel(type: "all" | "true" | "false" = "all") {
|
|
|
const month = dayjs(store.currentCalendar).format("YYYY-MM");
|
|
|
|
|
|
getByMonth(month).then(res => {
|
|
|
store.months[month] = res;
|
|
|
- trueExcelRef.value.exportExcel(`${month}信息中心值班表`, res);
|
|
|
- falseExcelRef.value.exportExcel(month, res);
|
|
|
+
|
|
|
+ if (type === "all" || type === "true")
|
|
|
+ trueExcelRef.value.exportExcel(`${month}信息中心值班表`, res);
|
|
|
+ if (type === "all" || type === "false")
|
|
|
+ falseExcelRef.value.exportExcel(month, res);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -235,8 +238,14 @@ onMounted(async () => {
|
|
|
>生成 {{ dayjs(store.currentCalendar).format("YYYY-MM") }}排班
|
|
|
</el-button>
|
|
|
|
|
|
- <el-button @click="exportExcel" type="success" icon="Download"
|
|
|
- >导出excel
|
|
|
+ <el-button @click="exportExcel('all')" type="success" icon="Download"
|
|
|
+ >导出两个excel
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="exportExcel('true')" type="success" icon="Download"
|
|
|
+ >导出真excel
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="exportExcel('false')" type="success" icon="Download"
|
|
|
+ >导出假excel
|
|
|
</el-button>
|
|
|
<div style="margin: 5px" ref="sortRef">
|
|
|
<el-tag
|