导出功能
This commit is contained in:
@@ -82,6 +82,14 @@
|
||||
</a-form>
|
||||
|
||||
<a-divider />
|
||||
<!-- action -->
|
||||
<div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysOrderList:selectExport'" type="primary" @click="handlExport(2)"><icon-export /> 选择数据导出 </a-button>
|
||||
<a-button v-has="'admin:sysOrderList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||
<a-button v-has="'admin:sysOrderList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
|
||||
<!-- table -->
|
||||
<a-table
|
||||
@@ -90,7 +98,7 @@
|
||||
:data="tableData"
|
||||
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
|
||||
row-key="post_id"
|
||||
row-key="order_inquiry_id"
|
||||
@selection-change="(selection) => {deleteData = selection;}"
|
||||
@page-change="handlePageChange"
|
||||
@page-size-change="handlepage_sizeChange"
|
||||
@@ -421,10 +429,10 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue';
|
||||
import { getOrderList,getOrderDetail,cancelInquiry,inquiryCase} from '@/api/order/list';
|
||||
import {exportInquiry, getOrderList,getOrderDetail,cancelInquiry,inquiryCase} from '@/api/order/list';
|
||||
import { parseTime } from '@/utils/parseTime';
|
||||
import {formatDoctorTitle,formatOrderCancelReason} from "@/utils/format"
|
||||
|
||||
import { downloadFile } from '@/utils/downloadFile';
|
||||
// Akiraka 20230210 删除数据
|
||||
const deleteData = ref([])
|
||||
// Akiraka 20230210 删除对话框
|
||||
@@ -723,7 +731,44 @@ const handleResetQuery = () => {
|
||||
//getOrderInfo(queryForm);
|
||||
|
||||
}
|
||||
|
||||
const handlExport=async(type)=>{
|
||||
proxy.$loading.show();
|
||||
let fromData=null;
|
||||
if(type==1){
|
||||
fromData={
|
||||
type,
|
||||
...queryForm
|
||||
}
|
||||
}else if(type==2){
|
||||
if(deleteData.value.length==0){
|
||||
proxy.$message.warning('请勾选数据');
|
||||
proxy.$loading.hide();
|
||||
return false;
|
||||
};
|
||||
let id='';
|
||||
deleteData.value.forEach((item)=>{
|
||||
if(id){
|
||||
id=","+item
|
||||
}else{
|
||||
id=item;
|
||||
}
|
||||
})
|
||||
fromData={
|
||||
type,
|
||||
id
|
||||
}
|
||||
}else if(type==3){
|
||||
fromData={
|
||||
type
|
||||
}
|
||||
}
|
||||
const {code,data}=await exportInquiry(fromData);
|
||||
if(code==200){
|
||||
downloadFile(data,'问诊订单');
|
||||
}
|
||||
proxy.$loading.hide();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getOrderInfo(pager);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user