feat: 🚀 订阅功能
This commit is contained in:
40
src/views/foundation/subscribe/warehousing/init/btnClick.ts
Normal file
40
src/views/foundation/subscribe/warehousing/init/btnClick.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
// 直接导出函数,无需额外包装对象
|
||||
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;
|
||||
}
|
||||
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 handleAdd = (item: any, selectionList: any[]) => {
|
||||
console.log("刷新操作", item);
|
||||
let length = selectionList.length;
|
||||
if (length && length > 100) {
|
||||
useMsg("warning", "选中刷新数据最大100条!");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
del: handleDel,
|
||||
add: handleAdd
|
||||
};
|
||||
2
src/views/foundation/subscribe/warehousing/init/index.ts
Normal file
2
src/views/foundation/subscribe/warehousing/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
Reference in New Issue
Block a user