| | |
| | | }, |
| | | // 清除本地所有标绘信息 |
| | | deleteAllPlot() { |
| | | this.$confirm("该操作将清除所有标绘信息,是否继续?", "清除", { |
| | | this.$confirm("该操作将删除所有标绘历史记录,是否继续?", "清除", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | axios({ |
| | | method: "GET", |
| | | url: "http://10.10.4.121:8070/PM20221203225_OpenAPI3_Service-0.0.1-SNAPSHOT/biaoHui/list", |
| | | }).then((response) => { |
| | | let hisIDArr = []; |
| | | response.data.result.forEach((item) => { |
| | | hisIDArr.push({ |
| | | id: item.id, |
| | | }); |
| | | }); |
| | | axios |
| | | .post( |
| | | "http://10.10.4.121:8070/PM20221203225_OpenAPI3_Service-0.0.1-SNAPSHOT/biaoHui/del", |
| | | hisIDArr, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.$message({ |
| | | message: "标绘数据已清除", |
| | | message: "删除成功", |
| | | type: "success", |
| | | }); |
| | | this.initData({}); |
| | | } else { |
| | | this.$message.error("删除失败!"); |
| | | } |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |