2025-05-02 17:02:48 +08:00
|
|
|
|
<script>
|
|
|
|
|
import {
|
2025-05-02 23:21:50 +08:00
|
|
|
|
adddicekeMiningrecord,
|
2025-05-02 17:02:48 +08:00
|
|
|
|
deletedicekeMiningrecord,
|
|
|
|
|
findAllMiningrecord,
|
2025-05-08 21:39:47 +08:00
|
|
|
|
finddicekeMiningrecordById,
|
|
|
|
|
updatedicekeMiningrecord,
|
|
|
|
|
} from "@@/apis/tables/diceke/DicekeMiningrecord.js";
|
|
|
|
|
import { findAllPlateArea } from "@@/apis/tables/diceke/plateArea.js";
|
|
|
|
|
import { findAllshovel } from "@@/apis/tables/diceke/shovel.js";
|
2025-05-02 17:02:48 +08:00
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dicekeMiningrecordQuery: null,
|
|
|
|
|
updatedicekeMiningrecordform: false,
|
2025-05-02 23:21:50 +08:00
|
|
|
|
dicekeMiningrecordform: null,
|
|
|
|
|
plateAreaQuerry: null,
|
2025-05-08 21:39:47 +08:00
|
|
|
|
shovelQuerry: null,
|
|
|
|
|
};
|
2025-05-02 17:02:48 +08:00
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
// 页面渲染之前执行,一般调用methods定义的方法
|
2025-05-08 21:39:47 +08:00
|
|
|
|
this.getList();
|
2025-05-02 17:02:48 +08:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getList() {
|
|
|
|
|
findAllMiningrecord().then((Response) => {
|
2025-05-08 21:39:47 +08:00
|
|
|
|
console.log(Response);
|
|
|
|
|
this.dicekeMiningrecordQuery = Response.data.dicekeMiningrecordVoList;
|
|
|
|
|
console.log(this.dicekeMiningrecordQuery);
|
|
|
|
|
});
|
2025-05-02 17:02:48 +08:00
|
|
|
|
},
|
|
|
|
|
// 删除平盘
|
|
|
|
|
removeDataById(id) {
|
2025-05-08 21:39:47 +08:00
|
|
|
|
ElMessageBox.confirm("此操作将永久删除平盘记录,是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
2025-05-02 17:02:48 +08:00
|
|
|
|
.then(() => {
|
|
|
|
|
deletedicekeMiningrecord(id).then(() => {
|
|
|
|
|
// 删除成功
|
|
|
|
|
ElMessage({
|
|
|
|
|
type: "success",
|
2025-05-08 21:39:47 +08:00
|
|
|
|
message: "删除成功!",
|
|
|
|
|
});
|
2025-05-02 17:02:48 +08:00
|
|
|
|
// 重新加载列表
|
2025-05-08 21:39:47 +08:00
|
|
|
|
this.getList();
|
|
|
|
|
});
|
2025-05-02 17:02:48 +08:00
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
ElMessage({
|
|
|
|
|
type: "info",
|
2025-05-08 21:39:47 +08:00
|
|
|
|
message: "已取消删除",
|
|
|
|
|
});
|
|
|
|
|
});
|
2025-05-02 17:02:48 +08:00
|
|
|
|
},
|
2025-05-02 23:21:50 +08:00
|
|
|
|
handleAdd() {
|
|
|
|
|
this.isEdit = false;
|
|
|
|
|
this.dicekeMiningrecordform = {
|
|
|
|
|
shovelID: null,
|
|
|
|
|
plateID: null,
|
2025-05-08 21:39:47 +08:00
|
|
|
|
totalMiningTon: "",
|
|
|
|
|
metalTon: "",
|
|
|
|
|
miningGrade: "",
|
|
|
|
|
oxidationRate: "",
|
|
|
|
|
avgGrade: "",
|
|
|
|
|
dressingGrade: "",
|
|
|
|
|
avgOxidationRate: "",
|
|
|
|
|
beizhu: "",
|
|
|
|
|
}; // 清空表单内容
|
2025-05-02 23:21:50 +08:00
|
|
|
|
// 加载平盘和电产信息
|
|
|
|
|
Promise.all([findAllPlateArea(), findAllshovel()])
|
|
|
|
|
.then(([plateAreaResponse, shovelResponse]) => {
|
|
|
|
|
this.plateAreaQuerry = plateAreaResponse.data.plateArea;
|
|
|
|
|
this.shovelQuerry = shovelResponse.data.shovel;
|
2025-05-08 21:39:47 +08:00
|
|
|
|
this.updatedicekeMiningrecordform = true; // 数据加载完成后再打开弹窗
|
2025-05-02 23:21:50 +08:00
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
ElMessage.error("加载平盘和电产信息失败,请稍后重试");
|
|
|
|
|
});
|
|
|
|
|
this.updatedicekeMiningrecordform = true;
|
|
|
|
|
},
|
2025-05-02 17:02:48 +08:00
|
|
|
|
handleEdit(id) {
|
2025-05-08 21:39:47 +08:00
|
|
|
|
this.isEdit = true;
|
2025-05-02 17:02:48 +08:00
|
|
|
|
finddicekeMiningrecordById(id).then((Response) => {
|
2025-05-08 21:39:47 +08:00
|
|
|
|
this.dicekeMiningrecordform =
|
|
|
|
|
Response.data.dicekeMiningrecordServiceById;
|
|
|
|
|
this.updatedicekeMiningrecordform = true;
|
|
|
|
|
});
|
|
|
|
|
findAllPlateArea().then((Response) => {
|
|
|
|
|
this.plateAreaQuerry = Response.data.plateArea;
|
|
|
|
|
});
|
|
|
|
|
findAllshovel().then((Response) => {
|
|
|
|
|
this.shovelQuerry = Response.data.shovel;
|
|
|
|
|
});
|
2025-05-02 23:21:50 +08:00
|
|
|
|
},
|
2025-05-08 21:39:47 +08:00
|
|
|
|
updatePlateArea() {
|
|
|
|
|
if (this.isEdit) {
|
|
|
|
|
updatedicekeMiningrecord(this.dicekeMiningrecordform)
|
|
|
|
|
.then(() => {
|
|
|
|
|
ElMessage({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "修改成功!",
|
|
|
|
|
});
|
|
|
|
|
this.updatedicekeMiningrecordform = false;
|
|
|
|
|
this.getList();
|
2025-05-02 23:21:50 +08:00
|
|
|
|
})
|
2025-05-08 21:39:47 +08:00
|
|
|
|
.catch(() => {
|
|
|
|
|
ElMessage.error("修改失败,请稍后重试");
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
adddicekeMiningrecord(this.dicekeMiningrecordform)
|
|
|
|
|
.then(() => {
|
|
|
|
|
ElMessage({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "新增成功!",
|
|
|
|
|
});
|
|
|
|
|
this.updatedicekeMiningrecordform = false;
|
|
|
|
|
this.getList(); // 刷新列表
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
ElMessage.error("新增失败,请稍后重试");
|
2025-05-02 23:21:50 +08:00
|
|
|
|
});
|
|
|
|
|
}
|
2025-05-08 21:39:47 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<div
|
|
|
|
|
style="
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
"
|
|
|
|
|
>
|
2025-05-02 23:21:50 +08:00
|
|
|
|
<!-- 查询条件输入框 -->
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="searchQuery"
|
|
|
|
|
placeholder="请输入铲号或平盘"
|
|
|
|
|
style="width: 200px; margin-right: 10px"
|
|
|
|
|
/>
|
2025-05-02 23:21:50 +08:00
|
|
|
|
<el-button type="primary" @click="searchData">查询</el-button>
|
|
|
|
|
|
|
|
|
|
<!-- 新增按钮 -->
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
icon="el-icon-plus"
|
2025-05-08 21:39:47 +08:00
|
|
|
|
style="
|
|
|
|
|
width: 100px;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
"
|
|
|
|
|
>
|
2025-05-02 23:21:50 +08:00
|
|
|
|
新增
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-table
|
|
|
|
|
:cell-style="rowStyle"
|
|
|
|
|
:data="dicekeMiningrecordQuery"
|
|
|
|
|
border
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
:span-method="spanMethod"
|
|
|
|
|
>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
<!-- 表格列定义 -->
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-table-column align="center" prop="plateRange" label="平盘(#)" />
|
|
|
|
|
<el-table-column align="center" prop="shovelCode" label="铲号(#)" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="totalMiningTon"
|
|
|
|
|
label="采矿量(t)"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column align="center" prop="metalTon" label="金属量(#)" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="miningGrade"
|
|
|
|
|
label="块段采矿品位(%)"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="oxidationRate"
|
|
|
|
|
label="块段氧化率(%)"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="avgGrade"
|
|
|
|
|
label="全月平均品位(%)"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="dressingGrade"
|
|
|
|
|
label="选矿平均品位(%)"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="avgOxidationRate"
|
|
|
|
|
label="全月平均氧化率(%)"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column align="center" prop="beizhu" label="备注" />
|
|
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="150">
|
2025-05-02 17:02:48 +08:00
|
|
|
|
<template #default="scope">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<div style="display: flex; justify-content: center; gap: 8px">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="handleEdit(scope.row.recordID)"
|
|
|
|
|
>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
修改
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="danger"
|
2025-05-08 21:39:47 +08:00
|
|
|
|
size="small"
|
2025-05-02 17:02:48 +08:00
|
|
|
|
@click="removeDataById(scope.row.recordID)"
|
|
|
|
|
>
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
v-model="updatedicekeMiningrecordform"
|
|
|
|
|
title="修改Mo品味信息"
|
|
|
|
|
width="500"
|
|
|
|
|
>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
<el-form :model="dicekeMiningrecordform">
|
2025-05-02 23:21:50 +08:00
|
|
|
|
<el-form-item label="电产" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-select
|
|
|
|
|
v-model="dicekeMiningrecordform.shovelID"
|
|
|
|
|
placeholder="请选择电产"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="shovel in shovelQuerry"
|
|
|
|
|
:key="shovel.shovelID"
|
|
|
|
|
:label="shovel.shovelCode"
|
|
|
|
|
:value="shovel.shovelID"
|
|
|
|
|
/>
|
2025-05-02 23:21:50 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="平盘" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-select
|
|
|
|
|
v-model="dicekeMiningrecordform.plateID"
|
|
|
|
|
placeholder="请选择平盘"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="plateArea in plateAreaQuerry"
|
|
|
|
|
:key="plateArea.plateID"
|
|
|
|
|
:label="plateArea.plateRange"
|
|
|
|
|
:value="plateArea.plateID"
|
|
|
|
|
/>
|
2025-05-02 23:21:50 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
<el-form-item label="采矿量(t)" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="dicekeMiningrecordform.totalMiningTon"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="金属量(#)" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="dicekeMiningrecordform.metalTon"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="块段采矿品位(%)" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="dicekeMiningrecordform.miningGrade"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="块段氧化率(%)" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="dicekeMiningrecordform.oxidationRate"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="全月平均品位(%)" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="dicekeMiningrecordform.avgGrade"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="选矿平均品位(%)" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="dicekeMiningrecordform.dressingGrade"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="全月平均氧化率(%)" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="dicekeMiningrecordform.avgOxidationRate"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备注" :label-width="formLabelWidth">
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="dicekeMiningrecordform.beizhu"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button @click="updatedicekeMiningrecordform = false">
|
|
|
|
|
取消
|
|
|
|
|
</el-button>
|
2025-05-08 21:39:47 +08:00
|
|
|
|
<el-button type="primary" @click="updatePlateArea"> 提交 </el-button>
|
2025-05-02 17:02:48 +08:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|