update docs_0822

This commit is contained in:
lb
2023-08-23 16:30:59 +08:00
parent a28544b671
commit d4a427ec5e
4 changed files with 76 additions and 22 deletions

View File

@@ -238,7 +238,9 @@ export default {
page: this.page,
limit: this.size,
};
// this.dataList = [{}];
// this.tableLoading = false;
// return;
this.$http[this.urls.pageIsPostApi ? "post" : "get"](
this.urls.page,
this.urls.pageIsPostApi
@@ -666,6 +668,38 @@ export default {
case "导入":
this.openUploadDialog();
break;
case "导出":
this.$http({
method: "post",
url: this.urls.export,
data: { page: this.page },
responseType: "blob",
}).then((res) => {
// console.log("导出", res);
const filename = res.headers['content-disposition'].split('filename=')[1];
const blob = new Blob([res.data]);
/** 通知 */
this.$notify({
title: "成功",
message: "开始下载",
type: "success",
duration: 1200,
});
if ("download" in document.createElement("a")) {
const alink = document.createElement("a");
alink.download = filename;
alink.style.display = "none";
alink.target = "_blank";
alink.href = URL.createObjectURL(blob);
document.body.appendChild(alink);
alink.click();
URL.revokeObjectURL(alink.href);
document.body.removeChild(alink);
} else {
navigator.msSaveBlob(blob, filename);
}
});
break;
case "手动添加": {
this.openDialog();
return;
@@ -762,14 +796,14 @@ export default {
duration: 1500,
});
}
// 尾托检测
if (this.tableSelectedIds.length == 1 && this.tableSelectedIds[0].typeDictValue != "2") {
return this.$message({
message: "只能选择尾托",
type: "warning",
duration: 1500,
});
}
// // 尾托检测 - 由后端限制
// if (this.tableSelectedIds.length == 1 && this.tableSelectedIds[0].typeDictValue != "2") {
// return this.$message({
// message: "只能选择尾托",
// type: "warning",
// duration: 1500,
// });
// }
this.palletDialogVisible = true;
this.$nextTick(() => {
this.$refs["pallet-dialog"].init();