损失和贫化
Some checks failed
Build And Deploy v3-admin-vite / build-and-deploy (push) Has been cancelled
Some checks failed
Build And Deploy v3-admin-vite / build-and-deploy (push) Has been cancelled
This commit is contained in:
parent
40b97f8a0f
commit
fa6f4625f2
@ -11,7 +11,7 @@ export function formatDateTime(
|
|||||||
return day.isValid() ? day.format(template) : INVALID_DATE;
|
return day.isValid() ? day.format(template) : INVALID_DATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDate(val: Date) {
|
export function getSpecificDate(val: Date) {
|
||||||
let endY = val.getFullYear();
|
let endY = val.getFullYear();
|
||||||
let endM = val.getMonth() + 1;
|
let endM = val.getMonth() + 1;
|
||||||
let endD = val.getDate();
|
let endD = val.getDate();
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
import {
|
import {
|
||||||
findTotalMiningByMonthApi,
|
findTotalMiningByMonthApi,
|
||||||
updateTotalMiningApi,
|
updateTotalMiningApi,
|
||||||
} from "@@/apis/tables/diceke/excavationQuantityReport.ts";
|
} from "@@/apis/tables/diceke/ExcavationQuantityReport.ts";
|
||||||
import { getDate } from "@@/utils/datetime";
|
import { getSpecificDate } from "@@/utils/datetime";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -23,7 +23,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//按月查询
|
//按月查询
|
||||||
async getMouthLoss() {
|
async getMouthLoss() {
|
||||||
let data = getDate(this.date);
|
let data = getSpecificDate(this.date);
|
||||||
const res = await findTotalMiningByMonthApi(data);
|
const res = await findTotalMiningByMonthApi(data);
|
||||||
console.log(res);
|
console.log(res);
|
||||||
},
|
},
|
||||||
|
@ -7,12 +7,14 @@ import {
|
|||||||
updatedicekeMininglossApi,
|
updatedicekeMininglossApi,
|
||||||
savedicekeMininglossApi,
|
savedicekeMininglossApi,
|
||||||
} from "@@/apis/tables/diceke/LossDepletionReport.ts";
|
} from "@@/apis/tables/diceke/LossDepletionReport.ts";
|
||||||
import { getDate } from "@@/utils/datetime";
|
import { getSpecificDate } from "@@/utils/datetime";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
date: "",
|
date: "",
|
||||||
tableList: [],
|
tableList: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
lossReportForm: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -23,13 +25,12 @@ export default {
|
|||||||
//获取列表
|
//获取列表
|
||||||
async getList() {
|
async getList() {
|
||||||
const res = await findAllMiningglossApi();
|
const res = await findAllMiningglossApi();
|
||||||
console.log(res);
|
this.tableList = res.data.dicekeMininglossVoList;
|
||||||
},
|
},
|
||||||
//按月查询
|
//按月查询
|
||||||
async getMouthLoss() {
|
async getMouthLoss() {
|
||||||
let data = getDate(this.date);
|
let data = getSpecificDate(this.date);
|
||||||
const res = await findLossByMonthApi(data);
|
const res = await findLossByMonthApi(data);
|
||||||
console.log(res);
|
|
||||||
},
|
},
|
||||||
removeDataById(id) {
|
removeDataById(id) {
|
||||||
ElMessageBox.confirm("此操作将永久删除降水量记录,是否继续?", "提示", {
|
ElMessageBox.confirm("此操作将永久删除降水量记录,是否继续?", "提示", {
|
||||||
@ -38,7 +39,7 @@ export default {
|
|||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deletePrecipitation(id).then(() => {
|
deletedicekeMininglossApi(id).then(() => {
|
||||||
// 删除成功
|
// 删除成功
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "success",
|
type: "success",
|
||||||
@ -55,58 +56,12 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleAdd() {
|
//修改
|
||||||
this.isEdit = false; // 设置为新增操作
|
|
||||||
this.precipitationform = { plateRange: "" }; // 初始化为空数据
|
|
||||||
this.updateprecipitationform = true; // 显示弹窗
|
|
||||||
},
|
|
||||||
handleEdit(id) {
|
handleEdit(id) {
|
||||||
this.isEdit = true;
|
this.dialogVisible = 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("新增失败,请稍后重试");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
//修改提交
|
||||||
|
lossReportSub() {},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -133,30 +88,34 @@ export default {
|
|||||||
:cell-style="rowStyle"
|
:cell-style="rowStyle"
|
||||||
>
|
>
|
||||||
<!-- 表格列定义 -->
|
<!-- 表格列定义 -->
|
||||||
<el-table-column align="center" prop="amount" label="平盘(m)" />
|
<el-table-column align="center" prop="plateRange" label="平盘(m)" />
|
||||||
<el-table-column align="center" prop="amount" label="电铲(#)" />
|
<el-table-column align="center" prop="shovelCode" label="电铲(#)" />
|
||||||
<el-table-column align="center" prop="amount" label="实采总量(t)" />
|
<el-table-column align="center" prop="strippingAndTotalMiningTon" label="实采总量(t)" />
|
||||||
<el-table-column align="center" prop="amount" label="采下废石(%)" />
|
<el-table-column align="center" prop="wasteRockTon" label="采下废石(%)" />
|
||||||
<el-table-column align="center" prop="amount" label="贫化率(%)" />
|
<el-table-column align="center" prop="dilutionRate" label="贫化率(%)" />
|
||||||
<el-table-column align="center" prop="amount" label="固定矿量(t)" />
|
<el-table-column align="center" prop="strippingAndTotalMiningTon" 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="lossRate" label="损失率(%)" />
|
||||||
<el-table-column align="center" prop="amount" label="配矿配矿量(t)" />
|
<el-table-column
|
||||||
<el-table-column align="center" prop="amount" label="月份" />
|
align="center"
|
||||||
|
prop="allocationTon"
|
||||||
|
label="配矿配矿量(t)"
|
||||||
|
/>
|
||||||
|
<el-table-column align="center" prop="month" label="月份" />
|
||||||
<el-table-column align="center" fixed="right" label="操作" width="300">
|
<el-table-column align="center" fixed="right" label="操作" width="300">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div style="display: flex; justify-content: center; gap: 8px">
|
<div style="display: flex; justify-content: center; gap: 8px">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleEdit(scope.row.precipID)"
|
@click="handleEdit(scope.row.lossID)"
|
||||||
>
|
>
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
size="small"
|
||||||
@click="removeDataById(scope.row.precipID)"
|
@click="removeDataById(scope.row.lossID)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -164,32 +123,24 @@ export default {
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-dialog
|
<el-dialog v-model="dialogVisible" title="修改损失和贫化信息" width="500">
|
||||||
v-model="updateprecipitationform"
|
<!-- <el-form :model="lossReportForm">
|
||||||
title="修改降水量信息"
|
|
||||||
width="500"
|
|
||||||
>
|
|
||||||
<el-form :model="precipitationform">
|
|
||||||
<el-form-item label="降水量" :label-width="formLabelWidth">
|
<el-form-item label="降水量" :label-width="formLabelWidth">
|
||||||
<el-input v-model="precipitationform.amount" autocomplete="off" />
|
<el-input v-model="lossReportForm.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>
|
||||||
|
|
||||||
<el-form-item label="月份" :label-width="formLabelWidth">
|
<el-form-item label="月份" :label-width="formLabelWidth">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="precipitationform.monthDate"
|
v-model="lossReportForm.monthDate"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
placeholder="选择月份"
|
placeholder="选择月份"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form> -->
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="updateprecipitationform = false"> 取消 </el-button>
|
<el-button @click="dialogVisible = false"> 取消 </el-button>
|
||||||
<el-button type="primary" @click="updatePrecipitation">
|
<el-button type="primary" @click="lossReportSub"> 提交 </el-button>
|
||||||
提交
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -207,7 +207,7 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "excavationQuantityReport",
|
path: "excavationQuantityReport",
|
||||||
component: () => import("@/pages/demo/diceke/excavationQuantityReport.vue"),
|
component: () => import("@/pages/demo/diceke/ExcavationQuantityReport.vue"),
|
||||||
name: "",
|
name: "",
|
||||||
meta: {
|
meta: {
|
||||||
title: "采剥量报表",
|
title: "采剥量报表",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user