feat: 🚀 发布测试环境
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
:href="scope.row.download_url"
|
||||
v-if="
|
||||
scope.row.status == 1 &&
|
||||
Math.abs((new Date(scope.row.date).getTime() - new Date().getTime()) / (24 * 60 * 60 * 1000)) <= 7
|
||||
Math.abs((new Date(scope.row.created_at).getTime() - new Date().getTime()) / (24 * 60 * 60 * 1000)) <= 7
|
||||
"
|
||||
>下载</a
|
||||
>
|
||||
|
||||
@@ -66,7 +66,12 @@ const selectionChange = (selection: any) => {
|
||||
};
|
||||
const handleButtonClickCallback = (item: any) => {
|
||||
const { type } = item;
|
||||
btnClick[type](item, dataStore.selectionList, proTableRef);
|
||||
// dataStore.selectionList, proTableRef
|
||||
btnClick[type]({
|
||||
selectionList: dataStore.selectionList,
|
||||
proTableRef,
|
||||
initParam: dataStore.initParam
|
||||
});
|
||||
};
|
||||
|
||||
//搜索
|
||||
|
||||
@@ -1,38 +1,21 @@
|
||||
import { getMaterialListReloadApi } from "@/api/modules/foundationMaterial";
|
||||
import { getMaterialListReloadApi, getMaterialListExportApi } from "@/api/modules/foundationMaterial";
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
//getMaterialListResetApi
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleExport = (item: any, selectionList: any[], proTable: any) => {
|
||||
console.log("导出操作", item);
|
||||
console.log(selectionList, "=selectionList=");
|
||||
let length = selectionList.length;
|
||||
if (!length) {
|
||||
useMsg("warning", "请选择需要删除的数据!");
|
||||
return;
|
||||
|
||||
// 导出
|
||||
export const handleExport = async (params: any) => {
|
||||
const { initParam } = params;
|
||||
const result = await getMaterialListExportApi(initParam);
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", "导出成功 !");
|
||||
}
|
||||
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
proTable.value!.getTableList();
|
||||
// const result = await commitListApi();
|
||||
// if (result.status === 200) {
|
||||
// useMsg("success", "删除成功 !");
|
||||
// } else {
|
||||
// useMsg("error", result.message);
|
||||
// }
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
// proTable: any getMaterialListReloadApi
|
||||
export const handleReload = async (item: any, selectionList: any[], proTable: any) => {
|
||||
console.log("刷新操作", item);
|
||||
//刷新
|
||||
export const handleReload = async (params: any) => {
|
||||
const { selectionList, proTable } = params;
|
||||
let length = selectionList.length;
|
||||
let ids: any = [];
|
||||
if (length && length > 100) {
|
||||
useMsg("warning", "选中刷新数据最大100条!");
|
||||
useMsg("warning", "选中刷新数据最大100条 !");
|
||||
return;
|
||||
}
|
||||
selectionList.forEach((item: any) => {
|
||||
|
||||
@@ -2,7 +2,7 @@ export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "foundationSubscribeWarehousingBtnExport",
|
||||
type: "add",
|
||||
type: "export",
|
||||
props: {
|
||||
type: "primary"
|
||||
}
|
||||
|
||||
@@ -73,7 +73,11 @@ const selectionChange = (selection: any) => {
|
||||
};
|
||||
const handleButtonClickCallback = (item: any) => {
|
||||
const { type } = item;
|
||||
btnClick[type](item, dataStore.selectionList, proTable);
|
||||
btnClick[type]({
|
||||
selectionList: dataStore.selectionList,
|
||||
proTable,
|
||||
initParam: dataStore.initParam
|
||||
});
|
||||
};
|
||||
//搜索
|
||||
const handleSearch = async (params: any) => {
|
||||
|
||||
@@ -1,29 +1,12 @@
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { getSubscribeResetListApi } from "@/api/modules/warehousing";
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleDel = (item: any, selectionList: any[], proTable: any) => {
|
||||
console.log("导出操作", item);
|
||||
console.log(selectionList, "=selectionList=");
|
||||
let length = selectionList.length;
|
||||
if (!length) {
|
||||
useMsg("warning", "请选择需要删除的数据!");
|
||||
return;
|
||||
import { getSubscribeResetListApi, getSubscribeResetListExportApi } from "@/api/modules/warehousing";
|
||||
// 导出
|
||||
export const handleExport = async (params: any) => {
|
||||
const { initParam } = params;
|
||||
const result = await getSubscribeResetListExportApi(initParam);
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", "导出成功 !");
|
||||
}
|
||||
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
proTable.value!.getTableList();
|
||||
// const result = await commitListApi();
|
||||
// if (result.status === 200) {
|
||||
// useMsg("success", "删除成功 !");
|
||||
// } else {
|
||||
// useMsg("error", result.message);
|
||||
// }
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
// proTable: any
|
||||
export const handleReSet = async (item: any, selectionList: any[], proTable: any) => {
|
||||
@@ -47,6 +30,6 @@ export const handleReSet = async (item: any, selectionList: any[], proTable: any
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
del: handleDel,
|
||||
export: handleExport,
|
||||
reset: handleReSet
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user