diff --git a/src/pages/demo/electricLocomotiveWorkshop/dataImport.vue b/src/pages/demo/electricLocomotiveWorkshop/dataImport.vue index a0cfac9..41fa05c 100644 --- a/src/pages/demo/electricLocomotiveWorkshop/dataImport.vue +++ b/src/pages/demo/electricLocomotiveWorkshop/dataImport.vue @@ -23,11 +23,7 @@ import type { UploadProps, UploadUserFile } from "element-plus"; const fileList = ref([ { - name: "food.jpeg", - url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100", - }, - { - name: "food2.jpeg", + name: "副本2025年4月份电机车运输综合报表", url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100", }, ]); diff --git a/src/pages/demo/electricLocomotiveWorkshop/homeworkTimeLedger.vue b/src/pages/demo/electricLocomotiveWorkshop/homeworkTimeLedger.vue index 2fd327c..56eda1e 100644 --- a/src/pages/demo/electricLocomotiveWorkshop/homeworkTimeLedger.vue +++ b/src/pages/demo/electricLocomotiveWorkshop/homeworkTimeLedger.vue @@ -190,7 +190,7 @@ export default { :header-align="center" :cell-style="rowStyle" > - + @@ -233,6 +233,12 @@ export default { label="作业率" /> + + diff --git a/src/pages/demo/electricLocomotiveWorkshop/mineralTransportationStatistics.vue b/src/pages/demo/electricLocomotiveWorkshop/mineralTransportationStatistics.vue index f61d134..4e98f04 100644 --- a/src/pages/demo/electricLocomotiveWorkshop/mineralTransportationStatistics.vue +++ b/src/pages/demo/electricLocomotiveWorkshop/mineralTransportationStatistics.vue @@ -37,38 +37,133 @@ export default { diff --git a/src/pages/demo/electricLocomotiveWorkshop/needMiningTime.vue b/src/pages/demo/electricLocomotiveWorkshop/needMiningTime.vue index c2dab0a..846535d 100644 --- a/src/pages/demo/electricLocomotiveWorkshop/needMiningTime.vue +++ b/src/pages/demo/electricLocomotiveWorkshop/needMiningTime.vue @@ -30,82 +30,6 @@ export default { const res = await findTotalMiningByMonthApi(data); console.log(res); }, - removeDataById(id) { - ElMessageBox.confirm("此操作将永久删除降水量记录,是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - deletePrecipitation(id).then(() => { - // 删除成功 - ElMessage({ - type: "success", - message: "删除成功!", - }); - // 重新加载列表 - this.getList(); - }); - }) - .catch(() => { - ElMessage({ - type: "info", - message: "已取消删除", - }); - }); - }, - handleAdd() { - this.isEdit = false; // 设置为新增操作 - this.precipitationform = { plateRange: "" }; // 初始化为空数据 - this.updateprecipitationform = true; // 显示弹窗 - }, - handleEdit(id) { - this.isEdit = true; - findPrecipitationById(id) - .then((Response) => { - this.precipitationform = Response.data.precipitationById; - console.log(this.precipitationform); - this.updateprecipitationform = true; - }) - .catch(() => { - ElMessage.error("查询失败,请稍后重试"); - }); - }, - formatMonth(dateTime) { - if (!dateTime) return "-"; - return dateTime.slice(0, 7); // 直接截取 "yyyy-MM" - // 或用 dayjs(需安装): - // return dayjs(dateTime).format('YYYY-MM'); - }, - updatePrecipitation() { - if (this.isEdit) { - updatePrecipitationApi(this.precipitationform) - .then(() => { - ElMessage({ - type: "success", - message: "修改成功!", - }); - this.updateprecipitationform = false; - this.getList(); - }) - .catch(() => { - ElMessage.error("修改失败,请稍后重试"); - }); - } else { - addPrecipitationApi(this.precipitationform) - .then(() => { - ElMessage({ - type: "success", - message: "新增成功!", - }); - this.updateprecipitationform = false; - this.getList(); - }) - .catch(() => { - ElMessage.error("新增失败,请稍后重试"); - }); - } - }, }, }; @@ -135,8 +59,7 @@ export default { :header-align="center" :cell-style="rowStyle" > - - + @@ -149,27 +72,12 @@ export default { /> - - + + + + diff --git a/src/pages/demo/electricLocomotiveWorkshop/singleMachineOutput.vue b/src/pages/demo/electricLocomotiveWorkshop/singleMachineOutput.vue index 8a7aa95..522c062 100644 --- a/src/pages/demo/electricLocomotiveWorkshop/singleMachineOutput.vue +++ b/src/pages/demo/electricLocomotiveWorkshop/singleMachineOutput.vue @@ -248,7 +248,7 @@ export default { :cell-style="rowStyle" > - + + + diff --git a/src/pages/demo/electricLocomotiveWorkshop/transportationComprehensive.vue b/src/pages/demo/electricLocomotiveWorkshop/transportationComprehensive.vue index 8933327..d9589dd 100644 --- a/src/pages/demo/electricLocomotiveWorkshop/transportationComprehensive.vue +++ b/src/pages/demo/electricLocomotiveWorkshop/transportationComprehensive.vue @@ -12,6 +12,7 @@ export default { return { date: "", tableList: [], + fillinTime: "2025年4月25日", }; }, created() { @@ -30,164 +31,94 @@ export default { const res = await findTotalMiningByMonthApi(data); console.log(res); }, - removeDataById(id) { - ElMessageBox.confirm("此操作将永久删除降水量记录,是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - deletePrecipitation(id).then(() => { - // 删除成功 - ElMessage({ - type: "success", - message: "删除成功!", - }); - // 重新加载列表 - this.getList(); - }); - }) - .catch(() => { - ElMessage({ - type: "info", - message: "已取消删除", - }); - }); - }, - handleAdd() { - this.isEdit = false; // 设置为新增操作 - this.precipitationform = { plateRange: "" }; // 初始化为空数据 - this.updateprecipitationform = true; // 显示弹窗 - }, - handleEdit(id) { - this.isEdit = true; - findPrecipitationById(id) - .then((Response) => { - this.precipitationform = Response.data.precipitationById; - console.log(this.precipitationform); - this.updateprecipitationform = true; - }) - .catch(() => { - ElMessage.error("查询失败,请稍后重试"); - }); - }, - formatMonth(dateTime) { - if (!dateTime) return "-"; - return dateTime.slice(0, 7); // 直接截取 "yyyy-MM" - // 或用 dayjs(需安装): - // return dayjs(dateTime).format('YYYY-MM'); - }, - updatePrecipitation() { - if (this.isEdit) { - updatePrecipitationApi(this.precipitationform) - .then(() => { - ElMessage({ - type: "success", - message: "修改成功!", - }); - this.updateprecipitationform = false; - this.getList(); - }) - .catch(() => { - ElMessage.error("修改失败,请稍后重试"); - }); - } else { - addPrecipitationApi(this.precipitationform) - .then(() => { - ElMessage({ - type: "success", - message: "新增成功!", - }); - this.updateprecipitationform = false; - this.getList(); - }) - .catch(() => { - ElMessage.error("新增失败,请稍后重试"); - }); - } - }, }, };