From 333626d05a8ce4cf553e2a1e3fed1259d0814fb1 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期一, 21 四月 2025 18:11:03 +0800 Subject: [PATCH] 1 --- src/views/hosp/order/index.vue | 67 +++++++++++++++++++++++++++++++-- 1 files changed, 63 insertions(+), 4 deletions(-) diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue index 195cfd2..25a9c78 100644 --- a/src/views/hosp/order/index.vue +++ b/src/views/hosp/order/index.vue @@ -161,12 +161,22 @@ </div> <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> + <!-- <el-col :span="1.5"> <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport" + v-hasPermi="['hosp:order:export']" + >瀵煎嚭</el-button + > + </el-col> --> + <el-col :span="1.5"> + <el-button + type="primary" + icon="el-icon-download" + size="mini" + @click="exportDialogVisible = true" v-hasPermi="['hosp:order:export']" >瀵煎嚭</el-button > @@ -1536,6 +1546,21 @@ <!-- <el-button @click="cancel">鍙� 娑�</el-button> --> </div> </el-dialog> + + <el-dialog + title="璇烽�夋嫨瀵煎嚭鑼冨洿" + :visible.sync="exportDialogVisible" + width="30%" + > + <el-radio-group v-model="exportType"> + <el-radio :label="'0'">褰撳墠椤垫暟鎹�</el-radio> + <el-radio :label="'1'">鍏ㄩ儴鏁版嵁</el-radio> + </el-radio-group> + <span slot="footer" class="dialog-footer"> + <el-button @click="exportDialogVisible = false">鍙栨秷</el-button> + <el-button type="primary" @click="confirmExport">纭畾</el-button> + </span> + </el-dialog> </div> </template> @@ -1686,6 +1711,8 @@ // 鏃ユ湡鑼冨洿 datetimerange: [], marryalls: 0, + exportDialogVisible: false, // 鎺у埗寮规 + exportType: "0", // dqyorqbsj 鐨勫�硷紝榛樿褰撳墠椤� // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, @@ -3114,10 +3141,27 @@ this.Projectssopen = false; }); }, - - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - console.log(this.queryParams) + this.$confirm("璇烽�夋嫨瀵煎嚭鑼冨洿", "瀵煎嚭鏁版嵁", { + distinguishCancelAndClose: true, + confirmButtonText: "瀵煎嚭鍏ㄩ儴", + cancelButtonText: "浠呭鍑哄綋鍓嶉〉", + type: "warning", + }) + .then(() => { + // 鐢ㄦ埛鐐瑰嚮浜嗏�滃鍑哄叏閮ㄢ�� + this.exportData(true); + }) + .catch((action) => { + if (action === "cancel") { + // 鐢ㄦ埛鐐瑰嚮浜嗏�滀粎瀵煎嚭褰撳墠椤碘�� + this.exportData(false); + } + }); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + /* handleExport() { + console.log(this.queryParams); this.download( "/hosp/order/exportOrderList", { @@ -3125,6 +3169,21 @@ }, `order_${new Date().getTime()}.xlsx` ); + }, */ + confirmExport() { + this.exportDialogVisible = false; + + + const exportParams = { + ...this.queryParams, + dqyorqbsj: this.exportType, // 娣诲姞杩欎釜瀛楁 + }; + + this.download( + "/hosp/order/exportOrderList", + exportParams, + `order_${new Date().getTime()}.xlsx` + ); }, }, }; -- Gitblit v1.8.0