添加数据
Some checks failed
Build And Deploy v3-admin-vite / build-and-deploy (push) Has been cancelled

This commit is contained in:
吕杰刚 2025-07-23 01:51:07 +08:00
parent 6b53804282
commit 715048ed55
10 changed files with 482 additions and 522 deletions

View File

@ -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"
},

View File

@ -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({

View File

@ -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");

View File

@ -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

View File

@ -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">

View File

@ -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: [],
};
},
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("新增失败,请稍后重试");
});
}
<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",
},
{
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>

View File

@ -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-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 align="center" label="非生产时间">
<el-table-column
align="center"
prop="noproductionTimeCount"
label="计"
/>
</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>

View File

@ -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>

View File

@ -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="amount"
prop="electricLocomotives"
label="电机车运用情况"
>
<el-table-column
align="center"
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>

View File

@ -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']
}