|
|
@ -212,7 +212,7 @@ export default {
|
|
|
|
this.$axios
|
|
|
|
this.$axios
|
|
|
|
.get("/api/excel/cellNumSearch", {
|
|
|
|
.get("/api/excel/cellNumSearch", {
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
|
cellNum: this.model.cellNum
|
|
|
|
cellRowStr: this.model.cellNum
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
@ -229,22 +229,37 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
executeTemplate() {
|
|
|
|
executeTemplate() {
|
|
|
|
this.$axios
|
|
|
|
this.active++;
|
|
|
|
.get("/api/excel/executeTemplate", {
|
|
|
|
let a = document.createElement("a"); //创建一个a标签元素
|
|
|
|
params: {
|
|
|
|
a.style.display = "none"; //设置元素不可见
|
|
|
|
newCellData: this.model.newCellData
|
|
|
|
a.target = "_blank";
|
|
|
|
}
|
|
|
|
a.href = `/api/excel/executeTemplate?newCellData=${encodeURIComponent(
|
|
|
|
})
|
|
|
|
this.model.newCellData
|
|
|
|
.then(res => {
|
|
|
|
)}&cellRowStr=${this.model.cellNum}`;
|
|
|
|
const { data } = res;
|
|
|
|
document.body.appendChild(a); //加入
|
|
|
|
if (data.success) {
|
|
|
|
a.click(); //触发点击,下载
|
|
|
|
} else {
|
|
|
|
document.body.removeChild(a) / 释放;
|
|
|
|
this.$message.error(data.msg);
|
|
|
|
setTimeout(() => {
|
|
|
|
}
|
|
|
|
this.active++;
|
|
|
|
})
|
|
|
|
}, 2000);
|
|
|
|
.catch(err => {
|
|
|
|
|
|
|
|
console.log(err);
|
|
|
|
// this.$axios
|
|
|
|
});
|
|
|
|
// .get("/api/excel/executeTemplate", {
|
|
|
|
|
|
|
|
// params: {
|
|
|
|
|
|
|
|
// newCellData: this.model.newCellData,
|
|
|
|
|
|
|
|
// cellRowStr: this.model.cellNum
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// .then(res => {
|
|
|
|
|
|
|
|
// const { data } = res;
|
|
|
|
|
|
|
|
// if (data.success) {
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.$message.error(data.msg);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// .catch(err => {
|
|
|
|
|
|
|
|
// console.log(err);
|
|
|
|
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|