导出功能源代码
exportExcel() {
if (!this.form.date[0] || !this.form.date[1]) {
this.$message.info("请输入查询时间范围");
return;
}
if (!this.form.selectedOptions[2]) {
this.$message.info("请选择具体监测点");
return;
}
historyExport({
startTime: this.form.date[0],
endTime: this.form.date[1],
pointId: this.form.selectedOptions[2],
}).then((msg) => {
this.$message({
type: "success",
message: this.$t("message.operationSuccess"),
});
let exportObj = {
taskId: msg,
taskName: "站点列表",
taskStatus: 0,
rootPath: "historyPath",
};
this.$store.dispatch("PushExportNotice", exportObj);
});
},
举一反三