This commit is contained in:
parent
6b53804282
commit
715048ed55
@ -30,6 +30,7 @@
|
||||
"pinia": "3.0.1",
|
||||
"screenfull": "6.0.2",
|
||||
"vue": "3.5.13",
|
||||
"vue-baidu-map-3x": "1.0.40",
|
||||
"vue-router": "4.5.0",
|
||||
"vxe-table": "4.6.25"
|
||||
},
|
||||
|
@ -1,13 +1,12 @@
|
||||
import { request } from "@/http/axios";
|
||||
|
||||
// /** 查 */
|
||||
// export function findAllMiningglossApi() {
|
||||
// return request({
|
||||
// url: "/dicekeMiningloss/findAllMininggloss",
|
||||
// method: "get",
|
||||
// });
|
||||
// }
|
||||
|
||||
/** 查 */
|
||||
export function findAllMiningglossApi() {
|
||||
return request({
|
||||
url: "/dicekeMiningloss/findAllMininggloss",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
// /** 删 */
|
||||
// export function deletedicekeMininglossApi(lossID: any) {
|
||||
// return request({
|
||||
|
@ -14,6 +14,7 @@ import "@@/assets/styles/index.scss";
|
||||
import "@@/assets/iconfont/iconfont.css";
|
||||
import "virtual:uno.css";
|
||||
import md5 from 'js-md5';
|
||||
// import BaiduMap from 'vue-baidu-map-3x'
|
||||
|
||||
// 创建应用实例
|
||||
const app = createApp(App);
|
||||
@ -24,7 +25,12 @@ installPlugins(app);
|
||||
|
||||
// 安装 pinia 和 router
|
||||
app.use(pinia).use(router);
|
||||
|
||||
// //百度地图
|
||||
// app.use(BaiduMap, {
|
||||
// ak: '7yzvYFhbIVXAhpllFyLKAKu6xZDYYlFl',
|
||||
// v: '3.0',
|
||||
// type: 'WebGL'
|
||||
// });
|
||||
// router 准备就绪后挂载应用
|
||||
router.isReady().then(() => {
|
||||
app.mount("#app");
|
||||
|
@ -131,14 +131,7 @@ export default {
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div
|
||||
style="
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<div style="margin-bottom: 20px; display: flex; align-items: center">
|
||||
<!-- 查询条件输入框 -->
|
||||
<el-input
|
||||
v-model="searchQuery"
|
||||
@ -151,15 +144,12 @@ export default {
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
icon="el-icon-plus"
|
||||
style="
|
||||
width: 100px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
新增
|
||||
>新增
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
|
@ -2,6 +2,7 @@
|
||||
import {
|
||||
findTotalMiningByMonthApi,
|
||||
updateTotalMiningApi,
|
||||
findAllMiningglossApi,
|
||||
} from "@@/apis/tables/diceke/ExcavationQuantityReport.ts";
|
||||
import { getSpecificDate } from "@@/utils/datetime";
|
||||
export default {
|
||||
@ -19,6 +20,7 @@ export default {
|
||||
//获取列表
|
||||
async getList() {
|
||||
const res = await findAllMiningglossApi();
|
||||
this.tableList = res.data.dicekeMininglossVoList;
|
||||
console.log(res);
|
||||
},
|
||||
//按月查询
|
||||
@ -129,13 +131,22 @@ export default {
|
||||
:cell-style="rowStyle"
|
||||
>
|
||||
<!-- 表格列定义 -->
|
||||
<el-table-column align="center" prop="amount" label="平盘(m)" />
|
||||
<el-table-column align="center" prop="amount" label="铲号(#)" />
|
||||
<el-table-column align="center" prop="amount" label="出矿量(t)" />
|
||||
<el-table-column align="center" prop="amount" label="剥离量(t)" />
|
||||
<el-table-column align="center" prop="amount" label="采剥总量(t)" />
|
||||
<el-table-column align="center" prop="amount" label="计量单位" />
|
||||
<el-table-column align="center" prop="amount" label="月份" />
|
||||
<el-table-column align="center" prop="plateRange" label="平盘(m)" />
|
||||
<el-table-column align="center" prop="shovelCode" label="电铲(#)" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="strippingAndTotalMiningTon"
|
||||
label="实采总量(t)"
|
||||
/>
|
||||
<el-table-column align="center" prop="wasteRockTon" label="采下废石(%)" />
|
||||
<el-table-column align="center" prop="dilutionRate" label="贫化率(%)" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="strippingAndTotalMiningTon"
|
||||
label="圈定矿量(t)"
|
||||
/>
|
||||
<el-table-column align="center" prop="amount" label="损失矿量(t)" />
|
||||
<el-table-column align="center" prop="lossRate" label="损失率(%)" />
|
||||
<el-table-column align="center" fixed="right" label="操作" width="300">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; justify-content: center; gap: 8px">
|
||||
|
@ -1,115 +1,51 @@
|
||||
<script>
|
||||
import {
|
||||
updateFangpaishuiPumpoperationrecordApi,
|
||||
deleteFangpaishuiPumpoperationrecordApi,
|
||||
findPumpoperationrecordByDetailApi,
|
||||
addFangpaishuiPumpoperationrecordApi,
|
||||
findFangpaishuiPumpoperationrecordByMonthApi,
|
||||
} from "@@/apis/tables/drainageWorkshop/pumpOperationLog.ts";
|
||||
import { getSpecificDate } from "@@/utils/datetime";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
date: "",
|
||||
tableList: [],
|
||||
};
|
||||
<template>
|
||||
<div class="box">
|
||||
<el-upload
|
||||
v-model:file-list="fileList"
|
||||
class="upload-demo"
|
||||
drag
|
||||
action=""
|
||||
multiple
|
||||
:on-change="handleChange"
|
||||
>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">将文件拖拽或 <em>点击上传</em></div>
|
||||
<!-- <template #tip>
|
||||
<div class="el-upload__tip">将文件拖拽至窗口或点击上传</div>
|
||||
</template> -->
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import type { UploadProps, UploadUserFile } from "element-plus";
|
||||
|
||||
const fileList = ref<UploadUserFile[]>([
|
||||
{
|
||||
name: "food.jpeg",
|
||||
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
|
||||
},
|
||||
created() {
|
||||
// 页面渲染之前执行,一般调用methods定义的方法
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//获取列表
|
||||
async getList() {
|
||||
const res = await findAllMiningglossApi();
|
||||
console.log(res);
|
||||
},
|
||||
//按月查询
|
||||
async getMouthLoss() {
|
||||
let data = getSpecificDate(this.date);
|
||||
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("新增失败,请稍后重试");
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "food2.jpeg",
|
||||
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
|
||||
},
|
||||
]);
|
||||
|
||||
const handleChange: UploadProps["onChange"] = (uploadFile, uploadFiles) => {
|
||||
fileList.value = fileList.value.slice(-3);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">上传</div>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.upload-demo {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -11,7 +11,149 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
date: "",
|
||||
tableList: [],
|
||||
tableList: [
|
||||
{
|
||||
index: "1",
|
||||
unitsNum: "8", //台数
|
||||
totalTime: "5760", //总时间
|
||||
productionTime: "4560", //生产时间
|
||||
noproductionTimeCount: "1200", //计
|
||||
operatingRate: "", //作业率
|
||||
classAUnitsNum: "4", //台 数
|
||||
classAtotalTime: "2880", //总时间
|
||||
classAproductionTime: "1920", //生产时间
|
||||
classAcount: "960", //计
|
||||
classAoperatingRate: "", //作业率
|
||||
classBunitsNum: "4", //台 数
|
||||
classBtotalTime: "2880", //总时间
|
||||
classBproductionTime: "2640", //生产时间
|
||||
classBcount: "240", //计
|
||||
classBoperatingRate: "", //作业率
|
||||
classCunitsNum: "0", //台 数
|
||||
classCtotalTime: "0", //总时间
|
||||
classCproductionTime: "0", //生产时间
|
||||
classCcount: "0", //计
|
||||
classCoperatingRate: "", //作业率
|
||||
},
|
||||
{
|
||||
index: "2",
|
||||
unitsNum: "8", //台数
|
||||
totalTime: "5760", //总时间
|
||||
productionTime: "4560", //生产时间
|
||||
noproductionTimeCount: "1200", //计
|
||||
operatingRate: "", //作业率
|
||||
classAUnitsNum: "4", //台 数
|
||||
classAtotalTime: "2880", //总时间
|
||||
classAproductionTime: "2640", //生产时间
|
||||
classAcount: "240", //计
|
||||
classAoperatingRate: "", //作业率
|
||||
classBunitsNum: "0", //台 数
|
||||
classBtotalTime: "0", //总时间
|
||||
classBproductionTime: "0", //生产时间
|
||||
classBcount: "0", //计
|
||||
classBoperatingRate: "", //作业率
|
||||
classCunitsNum: "4", //台 数
|
||||
classCtotalTime: "2880", //总时间
|
||||
classCproductionTime: "1920", //生产时间
|
||||
classCcount: "960", //计
|
||||
classCoperatingRate: "", //作业率
|
||||
},
|
||||
{
|
||||
index: "3",
|
||||
unitsNum: "8", //台数
|
||||
totalTime: "5760", //总时间
|
||||
productionTime: "4560", //生产时间
|
||||
noproductionTimeCount: "1200", //计
|
||||
operatingRate: "", //作业率
|
||||
classAUnitsNum: "0", //台 数
|
||||
classAtotalTime: "0", //总时间
|
||||
classAproductionTime: "0", //生产时间
|
||||
classAcount: "0", //计
|
||||
classAoperatingRate: "", //作业率
|
||||
classBunitsNum: "4", //台 数
|
||||
classBtotalTime: "2880", //总时间
|
||||
classBproductionTime: "1920", //生产时间
|
||||
classBcount: "960", //计
|
||||
classBoperatingRate: "", //作业率
|
||||
classCunitsNum: "4", //台 数
|
||||
classCtotalTime: "2880", //总时间
|
||||
classCproductionTime: "1920", //生产时间
|
||||
classCcount: "960", //计
|
||||
classCoperatingRate: "", //作业率
|
||||
},
|
||||
{
|
||||
index: "4",
|
||||
unitsNum: "8", //台数
|
||||
totalTime: "5760", //总时间
|
||||
productionTime: "4560", //生产时间
|
||||
noproductionTimeCount: "1200", //计
|
||||
operatingRate: "", //作业率
|
||||
classAUnitsNum: "4", //台 数
|
||||
classAtotalTime: "2880", //总时间
|
||||
classAproductionTime: "1920", //生产时间
|
||||
classAcount: "960", //计
|
||||
classAoperatingRate: "", //作业率
|
||||
classBunitsNum: "4", //台 数
|
||||
classBtotalTime: "2880", //总时间
|
||||
classBproductionTime: "2640", //生产时间
|
||||
classBcount: "240", //计
|
||||
classBoperatingRate: "", //作业率
|
||||
classCunitsNum: "4", //台 数
|
||||
classCtotalTime: "2880", //总时间
|
||||
classCproductionTime: "1920", //生产时间
|
||||
classCcount: "960", //计
|
||||
classCoperatingRate: "", //作业率
|
||||
},
|
||||
{
|
||||
index: "5",
|
||||
unitsNum: "8", //台数
|
||||
totalTime: "5760", //总时间
|
||||
productionTime: "4620", //生产时间
|
||||
noproductionTimeCount: "1140", //计
|
||||
operatingRate: "", //作业率
|
||||
classAUnitsNum: "0", //台 数
|
||||
classAtotalTime: "0", //总时间
|
||||
classAproductionTime: "0", //生产时间
|
||||
classAcount: "0", //计
|
||||
classAoperatingRate: "", //作业率
|
||||
classBunitsNum: "4", //台 数
|
||||
classBtotalTime: "2880", //总时间
|
||||
classBproductionTime: "2160", //生产时间
|
||||
classBcount: "720", //计
|
||||
classBoperatingRate: "", //作业率
|
||||
classCunitsNum: "4", //台 数
|
||||
classCtotalTime: "2880", //总时间
|
||||
classCproductionTime: "2460", //生产时间
|
||||
classCcount: "420", //计
|
||||
classCoperatingRate: "", //作业率
|
||||
},
|
||||
],
|
||||
classList: [
|
||||
{
|
||||
name: "甲班",
|
||||
unitsNum: "classAUnitsNum",
|
||||
totalTime: "classAtotalTime",
|
||||
productionTime: "classAproductionTime",
|
||||
count: "classAcount",
|
||||
operatingRate: "classAoperatingRate",
|
||||
},
|
||||
{
|
||||
name: "乙班",
|
||||
unitsNum: "classBUnitsNum",
|
||||
totalTime: "classBtotalTime",
|
||||
productionTime: "classBproductionTime",
|
||||
count: "classBcount",
|
||||
operatingRate: "classBoperatingRate",
|
||||
},
|
||||
{
|
||||
name: "丙班",
|
||||
unitsNum: "classCunitsNum",
|
||||
totalTime: "classCtotalTime",
|
||||
productionTime: "classCproductionTime",
|
||||
count: "classCcount",
|
||||
operatingRate: "classCoperatingRate",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -24,88 +166,6 @@ export default {
|
||||
const res = await findAllMiningglossApi();
|
||||
console.log(res);
|
||||
},
|
||||
//按月查询
|
||||
async getMouthLoss() {
|
||||
let data = getSpecificDate(this.date);
|
||||
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("新增失败,请稍后重试");
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -127,67 +187,52 @@ export default {
|
||||
:data="tableList"
|
||||
border
|
||||
style="width: 100%"
|
||||
:span-method="spanMethod"
|
||||
:header-align="center"
|
||||
:cell-style="rowStyle"
|
||||
>
|
||||
<!-- 表格列定义 -->
|
||||
<el-table-column align="center" prop="amount" label="平盘(m)" />
|
||||
<el-table-column align="center" prop="amount" label="铲号(#)" />
|
||||
<el-table-column align="center" prop="amount" label="出矿量(t)" />
|
||||
<el-table-column align="center" prop="amount" label="剥离量(t)" />
|
||||
<el-table-column align="center" prop="amount" label="采剥总量(t)" />
|
||||
<el-table-column align="center" prop="amount" label="计量单位" />
|
||||
<el-table-column align="center" prop="amount" label="月份" />
|
||||
<el-table-column align="center" fixed="right" label="操作" width="300">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; justify-content: center; gap: 8px">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleEdit(scope.row.precipID)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="removeDataById(scope.row.precipID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
v-model="updateprecipitationform"
|
||||
title="修改降水量信息"
|
||||
width="500"
|
||||
>
|
||||
<el-form :model="precipitationform">
|
||||
<el-form-item label="降水量" :label-width="formLabelWidth">
|
||||
<el-input v-model="precipitationform.amount" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计量单位" :label-width="formLabelWidth">
|
||||
<el-input v-model="precipitationform.unit" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="月份" :label-width="formLabelWidth">
|
||||
<el-date-picker
|
||||
v-model="precipitationform.monthDate"
|
||||
type="datetime"
|
||||
placeholder="选择月份"
|
||||
<el-table-column align="center" prop="index" label="项目" />
|
||||
<el-table-column align="center" label="计">
|
||||
<el-table-column align="center" prop="unitsNum" label="台数" />
|
||||
<el-table-column align="center" prop="totalTime" label="总时间" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productionTime"
|
||||
label="生产时间"
|
||||
/>
|
||||
<el-table-column align="center" label="非生产时间">
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="noproductionTimeCount"
|
||||
label="计"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="updateprecipitationform = false"> 取消 </el-button>
|
||||
<el-button type="primary" @click="updatePrecipitation">
|
||||
提交
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="operatingRate" label="作业率" />
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="各班电机车作业情况">
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="item.name"
|
||||
v-for="(item, index) in classList"
|
||||
:key="index"
|
||||
>
|
||||
<el-table-column align="center" :prop="item.unitsNum" label="台数" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
:prop="item.totalTime"
|
||||
label="总时间"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
:prop="item.productionTime"
|
||||
label="生产时间"
|
||||
/>
|
||||
<el-table-column align="center" :prop="item.count" label="计" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
:prop="item.classoperatingRate"
|
||||
label="作业率"
|
||||
/> </el-table-column
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -12,6 +12,7 @@ export default {
|
||||
return {
|
||||
date: "",
|
||||
tableList: [],
|
||||
oreQuantity: "88",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -30,82 +31,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("新增失败,请稍后重试");
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -123,6 +48,11 @@ export default {
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="title" style="text-align: right; margin-bottom: 10px">
|
||||
<el-tag type="primary" effect="dark" size="large"
|
||||
>计划运矿量{{ this.oreQuantity }}万吨
|
||||
</el-tag>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableList"
|
||||
border
|
||||
@ -139,55 +69,6 @@ export default {
|
||||
<el-table-column align="center" prop="amount" label="采剥总量(t)" />
|
||||
<el-table-column align="center" prop="amount" label="计量单位" />
|
||||
<el-table-column align="center" prop="amount" label="月份" />
|
||||
<el-table-column align="center" fixed="right" label="操作" width="300">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; justify-content: center; gap: 8px">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleEdit(scope.row.precipID)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="removeDataById(scope.row.precipID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
v-model="updateprecipitationform"
|
||||
title="修改降水量信息"
|
||||
width="500"
|
||||
>
|
||||
<el-form :model="precipitationform">
|
||||
<el-form-item label="降水量" :label-width="formLabelWidth">
|
||||
<el-input v-model="precipitationform.amount" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计量单位" :label-width="formLabelWidth">
|
||||
<el-input v-model="precipitationform.unit" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="月份" :label-width="formLabelWidth">
|
||||
<el-date-picker
|
||||
v-model="precipitationform.monthDate"
|
||||
type="datetime"
|
||||
placeholder="选择月份"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="updateprecipitationform = false"> 取消 </el-button>
|
||||
<el-button type="primary" @click="updatePrecipitation">
|
||||
提交
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -12,7 +12,182 @@ export default {
|
||||
return {
|
||||
date: "",
|
||||
machine: "",
|
||||
tableList: [],
|
||||
tableList: [
|
||||
{
|
||||
//日期
|
||||
index: "1",
|
||||
//东川河
|
||||
dongchuanRiver: {
|
||||
vehiclesNum: "36",
|
||||
tonnage: "",
|
||||
},
|
||||
//西川河
|
||||
xichuanRiver: {
|
||||
vehiclesNum: "",
|
||||
tonnage: "",
|
||||
},
|
||||
//合计
|
||||
riverAmount: "",
|
||||
//选矿卸
|
||||
mineralProcessing: {
|
||||
vehiclesNum: "36",
|
||||
tonnage: "",
|
||||
},
|
||||
mineralProcessingAmount: "", //合计
|
||||
workingWorkbench: "360", //作业台时
|
||||
count: "360", //计
|
||||
powerFailure: "", //停电
|
||||
fault: "", //故障
|
||||
standby: "", //待命
|
||||
other: "", //其他
|
||||
percentage: "360", //百分比
|
||||
},
|
||||
{
|
||||
//日期
|
||||
index: "2",
|
||||
//东川河
|
||||
dongchuanRiver: {
|
||||
vehiclesNum: "",
|
||||
tonnage: "",
|
||||
},
|
||||
//西川河
|
||||
xichuanRiver: {
|
||||
vehiclesNum: "72",
|
||||
tonnage: "",
|
||||
},
|
||||
//合计
|
||||
riverAmount: "",
|
||||
//选矿卸
|
||||
mineralProcessing: {
|
||||
vehiclesNum: "72",
|
||||
tonnage: "",
|
||||
},
|
||||
mineralProcessingAmount: "", //合计
|
||||
workingWorkbench: "660", //作业台时
|
||||
count: "60", //计
|
||||
powerFailure: "", //停电
|
||||
fault: "", //故障
|
||||
standby: "", //待命
|
||||
other: "", //其他
|
||||
percentage: "60", //百分比
|
||||
},
|
||||
{
|
||||
//日期
|
||||
index: "3",
|
||||
//东川河
|
||||
dongchuanRiver: {
|
||||
vehiclesNum: "12",
|
||||
tonnage: "",
|
||||
},
|
||||
//西川河
|
||||
xichuanRiver: {
|
||||
vehiclesNum: "36",
|
||||
tonnage: "",
|
||||
},
|
||||
//合计
|
||||
riverAmount: "",
|
||||
//选矿卸
|
||||
mineralProcessing: {
|
||||
vehiclesNum: "36",
|
||||
tonnage: "",
|
||||
},
|
||||
mineralProcessingAmount: "", //合计
|
||||
workingWorkbench: "360", //作业台时
|
||||
count: "360", //计
|
||||
powerFailure: "", //停电
|
||||
fault: "", //故障
|
||||
standby: "", //待命
|
||||
other: "", //其他
|
||||
percentage: "360", //百分比
|
||||
},
|
||||
{
|
||||
//日期
|
||||
index: "4",
|
||||
//东川河
|
||||
dongchuanRiver: {
|
||||
vehiclesNum: "72",
|
||||
tonnage: "",
|
||||
},
|
||||
//西川河
|
||||
xichuanRiver: {
|
||||
vehiclesNum: "",
|
||||
tonnage: "",
|
||||
},
|
||||
//合计
|
||||
riverAmount: "",
|
||||
//选矿卸
|
||||
mineralProcessing: {
|
||||
vehiclesNum: "84",
|
||||
tonnage: "",
|
||||
},
|
||||
mineralProcessingAmount: "", //合计
|
||||
workingWorkbench: "660", //作业台时
|
||||
count: "60", //计
|
||||
powerFailure: "", //停电
|
||||
fault: "", //故障
|
||||
standby: "", //待命
|
||||
other: "", //其他
|
||||
percentage: "60", //百分比
|
||||
},
|
||||
{
|
||||
//日期
|
||||
index: "5",
|
||||
//东川河
|
||||
dongchuanRiver: {
|
||||
vehiclesNum: "36",
|
||||
tonnage: "",
|
||||
},
|
||||
//西川河
|
||||
xichuanRiver: {
|
||||
vehiclesNum: "",
|
||||
tonnage: "",
|
||||
},
|
||||
//合计
|
||||
riverAmount: "",
|
||||
//选矿卸
|
||||
mineralProcessing: {
|
||||
vehiclesNum: "36",
|
||||
tonnage: "",
|
||||
},
|
||||
mineralProcessingAmount: "", //合计
|
||||
workingWorkbench: "360", //作业台时
|
||||
count: "360", //计
|
||||
powerFailure: "", //停电
|
||||
fault: "", //故障
|
||||
standby: "", //待命
|
||||
other: "", //其他
|
||||
percentage: "360", //百分比
|
||||
},
|
||||
{
|
||||
//日期
|
||||
index: "6",
|
||||
//东川河
|
||||
dongchuanRiver: {
|
||||
vehiclesNum: "72",
|
||||
tonnage: "",
|
||||
},
|
||||
//西川河
|
||||
xichuanRiver: {
|
||||
vehiclesNum: "",
|
||||
tonnage: "",
|
||||
},
|
||||
//合计
|
||||
riverAmount: "",
|
||||
//选矿卸
|
||||
mineralProcessing: {
|
||||
vehiclesNum: "72",
|
||||
tonnage: "",
|
||||
},
|
||||
mineralProcessingAmount: "", //合计
|
||||
workingWorkbench: "660", //作业台时
|
||||
count: "60", //计
|
||||
powerFailure: "", //停电
|
||||
fault: "", //故障
|
||||
standby: "", //待命
|
||||
other: "", //其他
|
||||
percentage: "60", //百分比
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -31,82 +206,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("新增失败,请稍后重试");
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -133,6 +232,13 @@ export default {
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
class="title"
|
||||
style="display: flex; justify-content: space-between; margin-bottom: 10px"
|
||||
>
|
||||
<el-tag type="primary" effect="dark" size="large">1501机台</el-tag>
|
||||
<el-tag type="primary" effect="dark" size="large">2025年4月甲班</el-tag>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableList"
|
||||
border
|
||||
@ -142,29 +248,29 @@ export default {
|
||||
:cell-style="rowStyle"
|
||||
>
|
||||
<!-- 表格列定义 -->
|
||||
<el-table-column align="center" prop="index" label="日期(号)" />
|
||||
<el-table-column align="center" prop="amount" label="倒装站装车">
|
||||
<el-table-column align="center" prop="amount" label="东川河"
|
||||
<el-table-column align="center" prop="index" label="日期" />
|
||||
<el-table-column align="center" label="倒装站装车">
|
||||
<el-table-column align="center" label="东川河"
|
||||
><el-table-column
|
||||
align="center"
|
||||
prop="amount"
|
||||
prop="dongchuanRiver.vehiclesNum"
|
||||
label="车数"
|
||||
></el-table-column
|
||||
><el-table-column
|
||||
align="center"
|
||||
prop="amount"
|
||||
prop="dongchuanRiver.tonnage"
|
||||
label="吨数"
|
||||
></el-table-column
|
||||
></el-table-column>
|
||||
<el-table-column align="center" prop="amount" label="西川河">
|
||||
<el-table-column align="center" label="西川河">
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="amount"
|
||||
prop="xichuanRiver.vehiclesNum"
|
||||
label="车数"
|
||||
></el-table-column
|
||||
><el-table-column
|
||||
align="center"
|
||||
prop="amount"
|
||||
prop="xichuanRiver。tonnage"
|
||||
label="吨数"
|
||||
></el-table-column
|
||||
></el-table-column>
|
||||
@ -174,62 +280,46 @@ export default {
|
||||
label="合计"
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="amount" label="百花岭">
|
||||
<el-table-column align="center" prop="amount" label="选矿卸">
|
||||
<el-table-column align="center" label="百花岭">
|
||||
<el-table-column align="center" label="选矿卸">
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="amount"
|
||||
prop="mineralProcessing.vehiclesNum"
|
||||
label="车数"
|
||||
></el-table-column
|
||||
><el-table-column
|
||||
align="center"
|
||||
prop="amount"
|
||||
prop="mineralProcessing.tonnage"
|
||||
label="吨数"
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="amount" label="合计" />
|
||||
<el-table-column align="center" prop="amount" label="电机车运用情况">
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="electricLocomotives"
|
||||
label="电机车运用情况"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="amount"
|
||||
prop="workingWorkbench"
|
||||
label="作业台时"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" prop="amount" label="停车台时">
|
||||
<el-table-column align="center" prop="amount" label="计">
|
||||
<el-table-column align="center" label="停车台时">
|
||||
<el-table-column align="center" prop="count" label="计">
|
||||
</el-table-column
|
||||
><el-table-column align="center" prop="amount" label="停电">
|
||||
><el-table-column align="center" prop="powerFailure" label="停电">
|
||||
</el-table-column
|
||||
><el-table-column align="center" prop="amount" label="故障">
|
||||
><el-table-column align="center" prop="fault" label="故障">
|
||||
</el-table-column
|
||||
><el-table-column align="center" prop="amount" label="待命">
|
||||
><el-table-column align="center" prop="standby" label="待命">
|
||||
</el-table-column
|
||||
><el-table-column align="center" prop="amount" label="其它">
|
||||
><el-table-column align="center" prop="other" label="其它">
|
||||
</el-table-column
|
||||
><el-table-column align="center" prop="amount" label="%">
|
||||
><el-table-column align="center" prop="percentage" label="%">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" fixed="right" label="操作" width="300">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; justify-content: center; gap: 8px">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleEdit(scope.row.precipID)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="removeDataById(scope.row.precipID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
1
types/auto/components.d.ts
vendored
1
types/auto/components.d.ts
vendored
@ -48,6 +48,7 @@ declare module 'vue' {
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTree: typeof import('element-plus/es')['ElTree']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user