Commit 8b3773b5 authored by liuzhaoh's avatar liuzhaoh

导入功能修改

parent de930a40
......@@ -318,8 +318,10 @@ const onExportFile = () => {
};
// 模板下载
const onDownloadTemplate = () => {
window.open('https://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx')
return
window.open(
"https://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx"
);
return;
axios
.get("https://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx", {
responseType: "blob",
......@@ -367,17 +369,27 @@ const handleError = () => {
duration: 5 * 1000,
});
};
const handleSuccess = () => {
ElMessage({
message: "文件上传成功",
type: "success",
duration: 5 * 1000,
});
const handleSuccess = (res) => {
if (res.code == 1) {
if (res.data && res.data.length > 0) {
ElMessage({
message: res.msg,
type: "error",
duration: 5 * 1000,
});
} else {
this.checkTableData = [];
ElMessage({
message: res.msg,
type: "success",
duration: 5 * 1000,
});
}
}
getDeviceContent();
};
const handleProgress = (evt, uploadFile) => {};
const beforeUpload = (file) => {
console.log(file);
if (
file.type !== "application/vnd.ms-excel" &&
file.type !==
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment