From 6757788e4aab958ccb4ba39649a04f8f411f3c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E6=9D=B0=E5=88=9A?= <1543758718@qq.com> Date: Thu, 24 Jul 2025 22:18:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/main.ts | 3 +- src/pages/demo/diceke/DicekeMiningloss.vue | 255 +++++++++++------- src/pages/demo/diceke/DicekeMiningrecord.vue | 11 +- .../demo/diceke/ExcavationQuantityReport.vue | 2 + src/pages/demo/diceke/LossDepletionReport.vue | 2 + src/pages/demo/diceke/PlateArea.vue | 2 + src/pages/demo/diceke/Precipitation.vue | 13 +- src/pages/demo/diceke/shovel.vue | 12 +- .../needMiningTime.vue | 1 + .../singleMachineOutput.vue | 119 ++++++++ 11 files changed, 311 insertions(+), 110 deletions(-) diff --git a/package.json b/package.json index 9dbd7e7..574eb5c 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@element-plus/icons-vue": "2.3.1", "axios": "1.8.4", "dayjs": "1.11.13", + "echarts": "5.6.0", "element-plus": "2.9.7", "js-cookie": "3.0.5", "js-md5": "0.8.3", diff --git a/src/main.ts b/src/main.ts index 83d3e38..b94436e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,6 +14,7 @@ import "@@/assets/styles/index.scss"; import "@@/assets/iconfont/iconfont.css"; import "virtual:uno.css"; import md5 from 'js-md5'; +import * as echarts from 'echarts' // import BaiduMap from 'vue-baidu-map-3x' // 创建应用实例 @@ -22,7 +23,7 @@ const app = createApp(App); app.provide('md5', md5); // 安装插件(全局组件、自定义指令等) installPlugins(app); - +app.config.globalProperties.$echarts = echarts // 安装 pinia 和 router app.use(pinia).use(router); // //百度地图 diff --git a/src/pages/demo/diceke/DicekeMiningloss.vue b/src/pages/demo/diceke/DicekeMiningloss.vue index ab80f33..d70717f 100644 --- a/src/pages/demo/diceke/DicekeMiningloss.vue +++ b/src/pages/demo/diceke/DicekeMiningloss.vue @@ -4,10 +4,10 @@ import { deletedicekeMiningrecord, findAllMiningrecord, finddicekeMiningrecordById, - updatedicekeMiningrecord -} from "@@/apis/tables/diceke/DicekeMiningrecord.js" -import { findAllPlateArea } from "@@/apis/tables/diceke/plateArea.js" -import { findAllshovel } from "@@/apis/tables/diceke/shovel.js" + updatedicekeMiningrecord, +} from "@@/apis/tables/diceke/DicekeMiningrecord.js"; +import { findAllPlateArea } from "@@/apis/tables/diceke/plateArea.js"; +import { findAllshovel } from "@@/apis/tables/diceke/shovel.js"; export default { data() { @@ -16,52 +16,48 @@ export default { updatedicekeMiningrecordform: false, dicekeMiningrecordform: null, plateAreaQuerry: null, - shovelQuerry: null - } + shovelQuerry: null, + }; }, created() { // 页面渲染之前执行,一般调用methods定义的方法 - this.getList() + this.getList(); }, methods: { getList() { findAllMiningrecord().then((Response) => { - console.log(Response) - this.dicekeMiningrecordQuery = Response.data.dicekeMiningrecordVoList - console.log(this.dicekeMiningrecordQuery) - }) + console.log(Response); + this.dicekeMiningrecordQuery = Response.data.dicekeMiningrecordVoList; + console.log(this.dicekeMiningrecordQuery); + }); }, // 删除平盘 removeDataById(id) { - ElMessageBox.confirm( - "此操作将永久删除平盘记录,是否继续?", - "提示", - { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - } - ) + ElMessageBox.confirm("此操作将永久删除平盘记录,是否继续?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) .then(() => { deletedicekeMiningrecord(id).then(() => { // 删除成功 ElMessage({ type: "success", - message: "删除成功!" - }) + message: "删除成功!", + }); // 重新加载列表 - this.getList() - }) + this.getList(); + }); }) .catch(() => { ElMessage({ type: "info", - message: "已取消删除" - }) - }) + message: "已取消删除", + }); + }); }, handleAdd() { - this.isEdit = false + this.isEdit = false; this.dicekeMiningrecordform = { shovelID: null, plateID: null, @@ -72,82 +68,106 @@ export default { avgGrade: "", dressingGrade: "", avgOxidationRate: "", - beizhu: "" - } // 清空表单内容 + beizhu: "", + }; // 清空表单内容 // 加载平盘和电产信息 Promise.all([findAllPlateArea(), findAllshovel()]) .then(([plateAreaResponse, shovelResponse]) => { - this.plateAreaQuerry = plateAreaResponse.data.plateArea - this.shovelQuerry = shovelResponse.data.shovel - this.updatedicekeMiningrecordform = true // 数据加载完成后再打开弹窗 + this.plateAreaQuerry = plateAreaResponse.data.plateArea; + this.shovelQuerry = shovelResponse.data.shovel; + this.updatedicekeMiningrecordform = true; // 数据加载完成后再打开弹窗 }) .catch(() => { - ElMessage.error("加载平盘和电产信息失败,请稍后重试") - }) - this.updatedicekeMiningrecordform = true + ElMessage.error("加载平盘和电产信息失败,请稍后重试"); + }); + this.updatedicekeMiningrecordform = true; }, handleEdit(id) { - this.isEdit = true + this.isEdit = true; finddicekeMiningrecordById(id).then((Response) => { - this.dicekeMiningrecordform = Response.data.dicekeMiningrecordServiceById - this.updatedicekeMiningrecordform = true - }) + this.dicekeMiningrecordform = + Response.data.dicekeMiningrecordServiceById; + this.updatedicekeMiningrecordform = true; + }); findAllPlateArea().then((Response) => { - this.plateAreaQuerry = Response.data.plateArea - }) + this.plateAreaQuerry = Response.data.plateArea; + }); findAllshovel().then((Response) => { - this.shovelQuerry = Response.data.shovel - }) + this.shovelQuerry = Response.data.shovel; + }); }, updatePlateArea() { if (this.isEdit) { - updatedicekeMiningrecord(this.dicekeMiningrecordform).then(() => { - ElMessage({ - type: "success", - message: "修改成功!" + updatedicekeMiningrecord(this.dicekeMiningrecordform) + .then(() => { + ElMessage({ + type: "success", + message: "修改成功!", + }); + this.updatedicekeMiningrecordform = false; + this.getList(); }) - this.updatedicekeMiningrecordform = false - this.getList() - }).catch(() => { - ElMessage.error("修改失败,请稍后重试") - }) + .catch(() => { + ElMessage.error("修改失败,请稍后重试"); + }); } else { - adddicekeMiningrecord(this.dicekeMiningrecordform).then(() => { - ElMessage({ - type: "success", - message: "新增成功!" + adddicekeMiningrecord(this.dicekeMiningrecordform) + .then(() => { + ElMessage({ + type: "success", + message: "新增成功!", + }); + this.updatedicekeMiningrecordform = false; + this.getList(); // 刷新列表 }) - this.updatedicekeMiningrecordform = false - this.getList() // 刷新列表 - }).catch(() => { - ElMessage.error("新增失败,请稍后重试") - }) + .catch(() => { + ElMessage.error("新增失败,请稍后重试"); + }); } - } - } -} + }, + }, +};