更新
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// export const URL = "https://yushengapi.qxyushen.top";
|
||||
export const URL = "https://test.vespa.qxyushen.top";
|
||||
export const URL = "https://yushengapi.qxyushen.top";
|
||||
// export const URL = "https://test.vespa.qxyushen.top";
|
||||
// https://vespa.qxyushen.top 正式
|
||||
// http://1.13.101.98
|
||||
// https://test.vespa.qxyushen.top
|
||||
|
||||
@@ -61,11 +61,11 @@ export function useData() {
|
||||
},
|
||||
{
|
||||
label: "累计获取数量",
|
||||
prop: "is_tester"
|
||||
prop: "total_num"
|
||||
},
|
||||
{
|
||||
label: "用户礼物数量",
|
||||
prop: "is_use_give"
|
||||
prop: "num"
|
||||
},
|
||||
{
|
||||
label: "获取时间",
|
||||
|
||||
@@ -420,64 +420,64 @@ export function useData() {
|
||||
const exportFormRef = ref(null)
|
||||
const exportExcel = () => {
|
||||
let exportTableList = []
|
||||
// addDialog({
|
||||
// title: `导出数据`,
|
||||
// props: {
|
||||
// formInline: {
|
||||
// time: ''
|
||||
// }
|
||||
// },
|
||||
// width: "40%",
|
||||
// closeOnClickModal: false,
|
||||
// contentRenderer: () => h(ExportForm, { ref: exportFormRef, formInline: null }),
|
||||
// beforeSure: (done, { options }) => {
|
||||
// const FormRef = exportFormRef.value.getRef();
|
||||
// const curData = options.props.formInline;
|
||||
// const exportData = async (formData) => {
|
||||
// const { data, code } = await queryList({
|
||||
// ...searchForm.value,
|
||||
// coin1: searchForm.value.coin1 ? searchForm.value.coin1 : '',
|
||||
// coin2: searchForm.value.coin2 ? searchForm.value.coin2 : '',
|
||||
// page: pagination.value.currentPage,
|
||||
// page_limit: pagination.value.pageSize
|
||||
// });
|
||||
// if (code) {
|
||||
// exportTableList = data.lists;
|
||||
// const res = exportTableList.map(item => {
|
||||
// const arr = [];
|
||||
// tableLabel.value.forEach(column => {
|
||||
// arr.push(item[column.prop as string]);
|
||||
// });
|
||||
// return arr;
|
||||
// });
|
||||
// const titleList = [];
|
||||
// tableLabel.value.forEach(column => {
|
||||
// titleList.push(column.label);
|
||||
// });
|
||||
// res.unshift(titleList);
|
||||
// const workSheet = utils.aoa_to_sheet(res);
|
||||
// const workBook = utils.book_new();
|
||||
// utils.book_append_sheet(workBook, workSheet, "数据报表");
|
||||
// writeFile(workBook, `礼物记录列表统计${formData.start_time} - ${formData.end_time}.xlsx`);
|
||||
// message("导出成功", {
|
||||
// type: "success"
|
||||
// });
|
||||
// done()
|
||||
// } else {
|
||||
// message("获取数据失败,请重试!", {
|
||||
// type: "error"
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// FormRef.validate(valid => {
|
||||
// if (valid) {
|
||||
// if (curData.time && curData.time.length) {
|
||||
// exportData({ start_time: curData.time[0] || '', end_time: curData.time[1] || '' })
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
addDialog({
|
||||
title: `导出数据`,
|
||||
props: {
|
||||
formInline: {
|
||||
time: ''
|
||||
}
|
||||
},
|
||||
width: "40%",
|
||||
closeOnClickModal: false,
|
||||
contentRenderer: () => h(ExportForm, { ref: exportFormRef, formInline: null }),
|
||||
beforeSure: (done, { options }) => {
|
||||
const FormRef = exportFormRef.value.getRef();
|
||||
const curData = options.props.formInline;
|
||||
const exportData = async (formData) => {
|
||||
const { data, code } = await queryList({
|
||||
...searchForm.value,
|
||||
coin1: searchForm.value.coin1 ? searchForm.value.coin1 : '',
|
||||
coin2: searchForm.value.coin2 ? searchForm.value.coin2 : '',
|
||||
page: 1,
|
||||
page_limit: 10000
|
||||
});
|
||||
if (code) {
|
||||
exportTableList = data.lists;
|
||||
const res = exportTableList.map(item => {
|
||||
const arr = [];
|
||||
tableLabel.value.forEach(column => {
|
||||
arr.push(item[column.prop as string]);
|
||||
});
|
||||
return arr;
|
||||
});
|
||||
const titleList = [];
|
||||
tableLabel.value.forEach(column => {
|
||||
titleList.push(column.label);
|
||||
});
|
||||
res.unshift(titleList);
|
||||
const workSheet = utils.aoa_to_sheet(res);
|
||||
const workBook = utils.book_new();
|
||||
utils.book_append_sheet(workBook, workSheet, "数据报表");
|
||||
writeFile(workBook, `想会员列表统计${formData.start_time} - ${formData.end_time}.xlsx`);
|
||||
message("导出成功", {
|
||||
type: "success"
|
||||
});
|
||||
done()
|
||||
} else {
|
||||
message("获取数据失败,请重试!", {
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
}
|
||||
FormRef.validate(valid => {
|
||||
if (valid) {
|
||||
if (curData.time && curData.time.length) {
|
||||
exportData({ start_time: curData.time[0] || '', end_time: curData.time[1] || '' })
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
// 找回账号
|
||||
|
||||
@@ -37,8 +37,8 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
proxyReq.method = 'OPTIONS';
|
||||
// https://test.vespa.qxyushen.top
|
||||
// 'http://yushenggliht.qxyushen.top'
|
||||
// res.setHeader('Access-Control-Allow-Origin', 'http://yushenggliht.qxyushen.top');
|
||||
res.setHeader('Access-Control-Allow-Origin', 'https://test.vespa.qxyushen.top');
|
||||
res.setHeader('Access-Control-Allow-Origin', 'http://yushenggliht.qxyushen.top');
|
||||
// res.setHeader('Access-Control-Allow-Origin', 'https://test.vespa.qxyushen.top');
|
||||
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
||||
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
|
||||
res.end();
|
||||
|
||||
Reference in New Issue
Block a user