采剥量,损失和贫化
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
7c202e3981
commit
40b97f8a0f
18
src/App.vue
18
src/App.vue
@ -1,17 +1,17 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useGreyAndColorWeakness } from "@@/composables/useGreyAndColorWeakness"
|
import { useGreyAndColorWeakness } from "@@/composables/useGreyAndColorWeakness";
|
||||||
import { usePany } from "@@/composables/usePany"
|
import { usePany } from "@@/composables/usePany";
|
||||||
import { useTheme } from "@@/composables/useTheme"
|
import { useTheme } from "@@/composables/useTheme";
|
||||||
import zhCn from "element-plus/es/locale/lang/zh-cn" // Element Plus 中文包
|
import zhCn from "element-plus/es/locale/lang/zh-cn"; // Element Plus 中文包
|
||||||
|
|
||||||
const { initTheme } = useTheme()
|
const { initTheme } = useTheme();
|
||||||
const { initGreyAndColorWeakness } = useGreyAndColorWeakness()
|
const { initGreyAndColorWeakness } = useGreyAndColorWeakness();
|
||||||
const { initStarNotification, initStoreNotification } = usePany()
|
const { initStarNotification, initStoreNotification } = usePany();
|
||||||
|
|
||||||
// 初始化主题
|
// 初始化主题
|
||||||
initTheme()
|
initTheme();
|
||||||
// 初始化灰色模式和色弱模式
|
// 初始化灰色模式和色弱模式
|
||||||
initGreyAndColorWeakness()
|
initGreyAndColorWeakness();
|
||||||
// 初始化通知
|
// 初始化通知
|
||||||
// initStarNotification()
|
// initStarNotification()
|
||||||
// initStoreNotification()
|
// initStoreNotification()
|
||||||
|
51
src/common/apis/tables/diceke/ExcavationQuantityReport.ts
Normal file
51
src/common/apis/tables/diceke/ExcavationQuantityReport.ts
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import { request } from "@/http/axios";
|
||||||
|
|
||||||
|
// /** 查 */
|
||||||
|
// export function findAllMiningglossApi() {
|
||||||
|
// return request({
|
||||||
|
// url: "/dicekeMiningloss/findAllMininggloss",
|
||||||
|
// method: "get",
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /** 删 */
|
||||||
|
// export function deletedicekeMininglossApi(lossID: any) {
|
||||||
|
// return request({
|
||||||
|
// url: `/dicekeMiningloss/deletedicekeMiningloss/${lossID}`,
|
||||||
|
// method: "delete",
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /** 根据id查损失和贫化信息 */
|
||||||
|
// export function finddicekeMiningrecordById(lossID: any) {
|
||||||
|
// return request({
|
||||||
|
// url: `/dicekeMiningloss/finddicekeMininglossById/${lossID}`,
|
||||||
|
// method: "get",
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
/** 根据年月查采剥量 */
|
||||||
|
export function findTotalMiningByMonthApi(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/dicekeTotalMining/findTotalMiningByMonth",
|
||||||
|
method: "get",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// /** 修改采剥量 */
|
||||||
|
export function updateTotalMiningApi(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/dicekeTotalMining/updateTotalMining",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// /** 新增损失和贫化信息 */
|
||||||
|
// export function savedicekeMininglossApi(data: any) {
|
||||||
|
// return request({
|
||||||
|
// url: "/dicekeMiningloss/savedicekeMiningloss",
|
||||||
|
// method: "post",
|
||||||
|
// data: data,
|
||||||
|
// });
|
||||||
|
// }
|
52
src/common/apis/tables/diceke/LossDepletionReport.ts
Normal file
52
src/common/apis/tables/diceke/LossDepletionReport.ts
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
import { request } from "@/http/axios";
|
||||||
|
|
||||||
|
/** 查 */
|
||||||
|
export function findAllMiningglossApi() {
|
||||||
|
return request({
|
||||||
|
url: "/dicekeMiningloss/findAllMininggloss",
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删 */
|
||||||
|
export function deletedicekeMininglossApi(lossID: any) {
|
||||||
|
return request({
|
||||||
|
url: `/dicekeMiningloss/deletedicekeMiningloss/${lossID}`,
|
||||||
|
method: "delete",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据id查损失和贫化信息 */
|
||||||
|
export function finddicekeMiningrecordById(lossID: any) {
|
||||||
|
return request({
|
||||||
|
url: `/dicekeMiningloss/finddicekeMininglossById/${lossID}`,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据年月查损失和贫化信息 */
|
||||||
|
export function findLossByMonthApi(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/dicekeMiningloss/findLossByMonth",
|
||||||
|
method: "get",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改损失和贫化信息 */
|
||||||
|
export function updatedicekeMininglossApi(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/dicekeMiningloss/updatedicekeMiningloss",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增损失和贫化信息 */
|
||||||
|
export function savedicekeMininglossApi(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/dicekeMiningloss/savedicekeMiningloss",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
@ -39,8 +39,8 @@ body {
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-family:
|
font-family:
|
||||||
Inter, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial,
|
Inter, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
|
||||||
sans-serif;
|
"Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||||
@extend %scrollbar;
|
@extend %scrollbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,25 @@
|
|||||||
import dayjs from "dayjs"
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
const INVALID_DATE = "N/A"
|
const INVALID_DATE = "N/A";
|
||||||
|
|
||||||
/** 格式化日期时间 */
|
/** 格式化日期时间 */
|
||||||
export function formatDateTime(datetime: string | number | Date = "", template: string = "YYYY-MM-DD HH:mm:ss") {
|
export function formatDateTime(
|
||||||
const day = dayjs(datetime)
|
datetime: string | number | Date = "",
|
||||||
return day.isValid() ? day.format(template) : INVALID_DATE
|
template: string = "YYYY-MM-DD HH:mm:ss",
|
||||||
|
) {
|
||||||
|
const day = dayjs(datetime);
|
||||||
|
return day.isValid() ? day.format(template) : INVALID_DATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDate(val: Date) {
|
||||||
|
let endY = val.getFullYear();
|
||||||
|
let endM = val.getMonth() + 1;
|
||||||
|
let endD = val.getDate();
|
||||||
|
let enddate =
|
||||||
|
endY +
|
||||||
|
"-" +
|
||||||
|
(endM < 10 ? "0" + endM : endM) +
|
||||||
|
"-" +
|
||||||
|
(endD < 10 ? "0" + endD : endD);
|
||||||
|
return enddate;
|
||||||
}
|
}
|
||||||
|
@ -53,12 +53,12 @@ function logout() {
|
|||||||
</div>
|
</div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<a target="_blank" href="https://github.com/un-pany/v3-admin-vite">
|
<!-- <a target="_blank" href="https://github.com/un-pany/v3-admin-vite">
|
||||||
<el-dropdown-item>GitHub</el-dropdown-item>
|
<el-dropdown-item>GitHub</el-dropdown-item>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" href="https://gitee.com/un-pany/v3-admin-vite">
|
<a target="_blank" href="https://gitee.com/un-pany/v3-admin-vite">
|
||||||
<el-dropdown-item>Gitee</el-dropdown-item>
|
<el-dropdown-item>Gitee</el-dropdown-item>
|
||||||
</a>
|
</a> -->
|
||||||
<el-dropdown-item divided @click="logout">
|
<el-dropdown-item divided @click="logout">
|
||||||
退出登录
|
退出登录
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
30
src/main.ts
30
src/main.ts
@ -1,28 +1,28 @@
|
|||||||
/* eslint-disable perfectionist/sort-imports */
|
/* eslint-disable perfectionist/sort-imports */
|
||||||
|
|
||||||
// core
|
// core
|
||||||
import { pinia } from "@/pinia"
|
import { pinia } from "@/pinia";
|
||||||
import { router } from "@/router"
|
import { router } from "@/router";
|
||||||
import { installPlugins } from "@/plugins"
|
import { installPlugins } from "@/plugins";
|
||||||
import App from "@/App.vue"
|
import App from "@/App.vue";
|
||||||
// css
|
// css
|
||||||
import "normalize.css"
|
import "normalize.css";
|
||||||
import "nprogress/nprogress.css"
|
import "nprogress/nprogress.css";
|
||||||
import "element-plus/theme-chalk/dark/css-vars.css"
|
import "element-plus/theme-chalk/dark/css-vars.css";
|
||||||
import "vxe-table/lib/style.css"
|
import "vxe-table/lib/style.css";
|
||||||
import "@@/assets/styles/index.scss"
|
import "@@/assets/styles/index.scss";
|
||||||
import "virtual:uno.css"
|
import "virtual:uno.css";
|
||||||
|
|
||||||
// 创建应用实例
|
// 创建应用实例
|
||||||
const app = createApp(App)
|
const app = createApp(App);
|
||||||
|
|
||||||
// 安装插件(全局组件、自定义指令等)
|
// 安装插件(全局组件、自定义指令等)
|
||||||
installPlugins(app)
|
installPlugins(app);
|
||||||
|
|
||||||
// 安装 pinia 和 router
|
// 安装 pinia 和 router
|
||||||
app.use(pinia).use(router)
|
app.use(pinia).use(router);
|
||||||
|
|
||||||
// router 准备就绪后挂载应用
|
// router 准备就绪后挂载应用
|
||||||
router.isReady().then(() => {
|
router.isReady().then(() => {
|
||||||
app.mount("#app")
|
app.mount("#app");
|
||||||
})
|
});
|
||||||
|
@ -3,10 +3,11 @@ import {
|
|||||||
adddicekeMiningrecord,
|
adddicekeMiningrecord,
|
||||||
deletedicekeMiningrecord,
|
deletedicekeMiningrecord,
|
||||||
findAllMiningrecord,
|
findAllMiningrecord,
|
||||||
finddicekeMiningrecordById, updatedicekeMiningrecord
|
finddicekeMiningrecordById,
|
||||||
} from "@@/apis/tables/diceke/DicekeMiningrecord.js"
|
updatedicekeMiningrecord,
|
||||||
import {findAllPlateArea} from "@@/apis/tables/diceke/plateArea.js";
|
} from "@@/apis/tables/diceke/DicekeMiningrecord.js";
|
||||||
import {findAllshovel} from "@@/apis/tables/diceke/shovel.js";
|
import { findAllPlateArea } from "@@/apis/tables/diceke/plateArea.js";
|
||||||
|
import { findAllshovel } from "@@/apis/tables/diceke/shovel.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -15,70 +16,66 @@ export default {
|
|||||||
updatedicekeMiningrecordform: false,
|
updatedicekeMiningrecordform: false,
|
||||||
dicekeMiningrecordform: null,
|
dicekeMiningrecordform: null,
|
||||||
plateAreaQuerry: null,
|
plateAreaQuerry: null,
|
||||||
shovelQuerry: null
|
shovelQuerry: null,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 页面渲染之前执行,一般调用methods定义的方法
|
// 页面渲染之前执行,一般调用methods定义的方法
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
findAllMiningrecord().then((Response) => {
|
findAllMiningrecord().then((Response) => {
|
||||||
console.log(Response)
|
console.log(Response);
|
||||||
this.dicekeMiningrecordQuery = Response.data.dicekeMiningrecordVoList
|
this.dicekeMiningrecordQuery = Response.data.dicekeMiningrecordVoList;
|
||||||
console.log(this.dicekeMiningrecordQuery)
|
console.log(this.dicekeMiningrecordQuery);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 删除平盘
|
// 删除平盘
|
||||||
removeDataById(id) {
|
removeDataById(id) {
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm("此操作将永久删除平盘记录,是否继续?", "提示", {
|
||||||
"此操作将永久删除平盘记录,是否继续?",
|
confirmButtonText: "确定",
|
||||||
"提示",
|
cancelButtonText: "取消",
|
||||||
{
|
type: "warning",
|
||||||
confirmButtonText: "确定",
|
})
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deletedicekeMiningrecord(id).then(() => {
|
deletedicekeMiningrecord(id).then(() => {
|
||||||
// 删除成功
|
// 删除成功
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "success",
|
type: "success",
|
||||||
message: "删除成功!"
|
message: "删除成功!",
|
||||||
})
|
});
|
||||||
// 重新加载列表
|
// 重新加载列表
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "info",
|
type: "info",
|
||||||
message: "已取消删除"
|
message: "已取消删除",
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.isEdit = false;
|
this.isEdit = false;
|
||||||
this.dicekeMiningrecordform = {
|
this.dicekeMiningrecordform = {
|
||||||
shovelID: null,
|
shovelID: null,
|
||||||
plateID: null,
|
plateID: null,
|
||||||
totalMiningTon: '',
|
totalMiningTon: "",
|
||||||
metalTon: '',
|
metalTon: "",
|
||||||
miningGrade: '',
|
miningGrade: "",
|
||||||
oxidationRate: '',
|
oxidationRate: "",
|
||||||
avgGrade: '',
|
avgGrade: "",
|
||||||
dressingGrade: '',
|
dressingGrade: "",
|
||||||
avgOxidationRate: '',
|
avgOxidationRate: "",
|
||||||
beizhu: ''
|
beizhu: "",
|
||||||
}; // 清空表单内容
|
}; // 清空表单内容
|
||||||
// 加载平盘和电产信息
|
// 加载平盘和电产信息
|
||||||
Promise.all([findAllPlateArea(), findAllshovel()])
|
Promise.all([findAllPlateArea(), findAllshovel()])
|
||||||
.then(([plateAreaResponse, shovelResponse]) => {
|
.then(([plateAreaResponse, shovelResponse]) => {
|
||||||
this.plateAreaQuerry = plateAreaResponse.data.plateArea;
|
this.plateAreaQuerry = plateAreaResponse.data.plateArea;
|
||||||
this.shovelQuerry = shovelResponse.data.shovel;
|
this.shovelQuerry = shovelResponse.data.shovel;
|
||||||
this.updatedicekeMiningrecordform = true; // 数据加载完成后再打开弹窗
|
this.updatedicekeMiningrecordform = true; // 数据加载完成后再打开弹窗
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
ElMessage.error("加载平盘和电产信息失败,请稍后重试");
|
ElMessage.error("加载平盘和电产信息失败,请稍后重试");
|
||||||
@ -86,52 +83,68 @@ export default {
|
|||||||
this.updatedicekeMiningrecordform = true;
|
this.updatedicekeMiningrecordform = true;
|
||||||
},
|
},
|
||||||
handleEdit(id) {
|
handleEdit(id) {
|
||||||
this.isEdit = true
|
this.isEdit = true;
|
||||||
finddicekeMiningrecordById(id).then((Response) => {
|
finddicekeMiningrecordById(id).then((Response) => {
|
||||||
this.dicekeMiningrecordform = Response.data.dicekeMiningrecordServiceById
|
this.dicekeMiningrecordform =
|
||||||
this.updatedicekeMiningrecordform = true
|
Response.data.dicekeMiningrecordServiceById;
|
||||||
})
|
this.updatedicekeMiningrecordform = true;
|
||||||
findAllPlateArea().then((Response)=>{
|
});
|
||||||
this.plateAreaQuerry = Response.data.plateArea
|
findAllPlateArea().then((Response) => {
|
||||||
})
|
this.plateAreaQuerry = Response.data.plateArea;
|
||||||
findAllshovel().then((Response)=>{
|
});
|
||||||
this.shovelQuerry = Response.data.shovel
|
findAllshovel().then((Response) => {
|
||||||
})
|
this.shovelQuerry = Response.data.shovel;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
updatePlateArea(){
|
updatePlateArea() {
|
||||||
if (this.isEdit){
|
if (this.isEdit) {
|
||||||
updatedicekeMiningrecord(this.dicekeMiningrecordform).then(() => {
|
updatedicekeMiningrecord(this.dicekeMiningrecordform)
|
||||||
ElMessage({
|
.then(() => {
|
||||||
type: "success",
|
ElMessage({
|
||||||
message: "修改成功!"
|
type: "success",
|
||||||
|
message: "修改成功!",
|
||||||
|
});
|
||||||
|
this.updatedicekeMiningrecordform = false;
|
||||||
|
this.getList();
|
||||||
})
|
})
|
||||||
this.updatedicekeMiningrecordform = false
|
.catch(() => {
|
||||||
this.getList()
|
ElMessage.error("修改失败,请稍后重试");
|
||||||
}).catch(() => {
|
});
|
||||||
ElMessage.error("修改失败,请稍后重试")
|
} else {
|
||||||
})
|
adddicekeMiningrecord(this.dicekeMiningrecordform)
|
||||||
}else{
|
.then(() => {
|
||||||
adddicekeMiningrecord(this.dicekeMiningrecordform).then(() => {
|
ElMessage({
|
||||||
ElMessage({
|
type: "success",
|
||||||
type: "success",
|
message: "新增成功!",
|
||||||
message: "新增成功!"
|
});
|
||||||
|
this.updatedicekeMiningrecordform = false;
|
||||||
|
this.getList(); // 刷新列表
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
ElMessage.error("新增失败,请稍后重试");
|
||||||
});
|
});
|
||||||
this.updatedicekeMiningrecordform = false;
|
|
||||||
this.getList(); // 刷新列表
|
|
||||||
}).catch(() => {
|
|
||||||
ElMessage.error("新增失败,请稍后重试");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<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;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
>
|
||||||
<!-- 查询条件输入框 -->
|
<!-- 查询条件输入框 -->
|
||||||
<el-input v-model="searchQuery" placeholder="请输入铲号或平盘" style="width: 200px; margin-right: 10px;" />
|
<el-input
|
||||||
|
v-model="searchQuery"
|
||||||
|
placeholder="请输入铲号或平盘"
|
||||||
|
style="width: 200px; margin-right: 10px"
|
||||||
|
/>
|
||||||
<el-button type="primary" @click="searchData">查询</el-button>
|
<el-button type="primary" @click="searchData">查询</el-button>
|
||||||
|
|
||||||
<!-- 新增按钮 -->
|
<!-- 新增按钮 -->
|
||||||
@ -139,31 +152,71 @@ export default {
|
|||||||
type="primary"
|
type="primary"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
style="width: 100px; display: flex; justify-content: center; align-items: center;">
|
style="
|
||||||
|
width: 100px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="dicekeMiningrecordQuery" border style="width: 100%" :span-method="spanMethod">
|
<el-table
|
||||||
|
:cell-style="rowStyle"
|
||||||
|
:data="dicekeMiningrecordQuery"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
:span-method="spanMethod"
|
||||||
|
>
|
||||||
<!-- 表格列定义 -->
|
<!-- 表格列定义 -->
|
||||||
<el-table-column prop="plateRange" label="平盘(#)" />
|
<el-table-column align="center" prop="plateRange" label="平盘(#)" />
|
||||||
<el-table-column prop="shovelCode" label="铲号(#)" />
|
<el-table-column align="center" prop="shovelCode" label="铲号(#)" />
|
||||||
<el-table-column prop="totalMiningTon" label="采矿量(t)" />
|
<el-table-column
|
||||||
<el-table-column prop="metalTon" label="金属量(#)" />
|
align="center"
|
||||||
<el-table-column prop="miningGrade" label="块段采矿品位(%)" />
|
prop="totalMiningTon"
|
||||||
<el-table-column prop="oxidationRate" label="块段氧化率(%)" />
|
label="采矿量(t)"
|
||||||
<el-table-column prop="avgGrade" label="全月平均品位(%)" />
|
/>
|
||||||
<el-table-column prop="dressingGrade" label="选矿平均品位(%)" />
|
<el-table-column align="center" prop="metalTon" label="金属量(#)" />
|
||||||
<el-table-column prop="avgOxidationRate" label="全月平均氧化率(%)" />
|
<el-table-column
|
||||||
<el-table-column prop="beizhu" label="备注" />
|
align="center"
|
||||||
<el-table-column fixed="right" label="操作" width="150" 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">
|
||||||
<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 type="primary" text bg size="small" plain @click="handleEdit(scope.row.recordID)">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleEdit(scope.row.recordID)"
|
||||||
|
>
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
text bg size="small"
|
size="small"
|
||||||
@click="removeDataById(scope.row.recordID)"
|
@click="removeDataById(scope.row.recordID)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@ -172,42 +225,86 @@ export default {
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-dialog v-model="updatedicekeMiningrecordform" title="修改Mo品味信息" width="500">
|
<el-dialog
|
||||||
|
v-model="updatedicekeMiningrecordform"
|
||||||
|
title="修改Mo品味信息"
|
||||||
|
width="500"
|
||||||
|
>
|
||||||
<el-form :model="dicekeMiningrecordform">
|
<el-form :model="dicekeMiningrecordform">
|
||||||
<el-form-item label="电产" :label-width="formLabelWidth">
|
<el-form-item label="电产" :label-width="formLabelWidth">
|
||||||
<el-select v-model="dicekeMiningrecordform.shovelID" placeholder="请选择电产">
|
<el-select
|
||||||
<el-option v-for="shovel in shovelQuerry" :key="shovel.shovelID" :label="shovel.shovelCode" :value="shovel.shovelID" />
|
v-model="dicekeMiningrecordform.shovelID"
|
||||||
|
placeholder="请选择电产"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="shovel in shovelQuerry"
|
||||||
|
:key="shovel.shovelID"
|
||||||
|
:label="shovel.shovelCode"
|
||||||
|
:value="shovel.shovelID"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="平盘" :label-width="formLabelWidth">
|
<el-form-item label="平盘" :label-width="formLabelWidth">
|
||||||
<el-select v-model="dicekeMiningrecordform.plateID" placeholder="请选择平盘">
|
<el-select
|
||||||
<el-option v-for="plateArea in plateAreaQuerry" :key="plateArea.plateID" :label="plateArea.plateRange" :value="plateArea.plateID" />
|
v-model="dicekeMiningrecordform.plateID"
|
||||||
|
placeholder="请选择平盘"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="plateArea in plateAreaQuerry"
|
||||||
|
:key="plateArea.plateID"
|
||||||
|
:label="plateArea.plateRange"
|
||||||
|
:value="plateArea.plateID"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="采矿量(t)" :label-width="formLabelWidth">
|
<el-form-item label="采矿量(t)" :label-width="formLabelWidth">
|
||||||
<el-input v-model="dicekeMiningrecordform.totalMiningTon" autocomplete="off" />
|
<el-input
|
||||||
|
v-model="dicekeMiningrecordform.totalMiningTon"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="金属量(#)" :label-width="formLabelWidth">
|
<el-form-item label="金属量(#)" :label-width="formLabelWidth">
|
||||||
<el-input v-model="dicekeMiningrecordform.metalTon" autocomplete="off" />
|
<el-input
|
||||||
|
v-model="dicekeMiningrecordform.metalTon"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="块段采矿品位(%)" :label-width="formLabelWidth">
|
<el-form-item label="块段采矿品位(%)" :label-width="formLabelWidth">
|
||||||
<el-input v-model="dicekeMiningrecordform.miningGrade" autocomplete="off" />
|
<el-input
|
||||||
|
v-model="dicekeMiningrecordform.miningGrade"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="块段氧化率(%)" :label-width="formLabelWidth">
|
<el-form-item label="块段氧化率(%)" :label-width="formLabelWidth">
|
||||||
<el-input v-model="dicekeMiningrecordform.oxidationRate" autocomplete="off" />
|
<el-input
|
||||||
|
v-model="dicekeMiningrecordform.oxidationRate"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="全月平均品位(%)" :label-width="formLabelWidth">
|
<el-form-item label="全月平均品位(%)" :label-width="formLabelWidth">
|
||||||
<el-input v-model="dicekeMiningrecordform.avgGrade" autocomplete="off" />
|
<el-input
|
||||||
|
v-model="dicekeMiningrecordform.avgGrade"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选矿平均品位(%)" :label-width="formLabelWidth">
|
<el-form-item label="选矿平均品位(%)" :label-width="formLabelWidth">
|
||||||
<el-input v-model="dicekeMiningrecordform.dressingGrade" autocomplete="off" />
|
<el-input
|
||||||
|
v-model="dicekeMiningrecordform.dressingGrade"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="全月平均氧化率(%)" :label-width="formLabelWidth">
|
<el-form-item label="全月平均氧化率(%)" :label-width="formLabelWidth">
|
||||||
<el-input v-model="dicekeMiningrecordform.avgOxidationRate" autocomplete="off" />
|
<el-input
|
||||||
|
v-model="dicekeMiningrecordform.avgOxidationRate"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" :label-width="formLabelWidth">
|
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||||
<el-input v-model="dicekeMiningrecordform.beizhu" autocomplete="off" />
|
<el-input
|
||||||
|
v-model="dicekeMiningrecordform.beizhu"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -215,9 +312,7 @@ export default {
|
|||||||
<el-button @click="updatedicekeMiningrecordform = false">
|
<el-button @click="updatedicekeMiningrecordform = false">
|
||||||
取消
|
取消
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="updatePlateArea">
|
<el-button type="primary" @click="updatePlateArea"> 提交 </el-button>
|
||||||
提交
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
190
src/pages/demo/diceke/ExcavationQuantityReport.vue
Normal file
190
src/pages/demo/diceke/ExcavationQuantityReport.vue
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
<script>
|
||||||
|
import {
|
||||||
|
findTotalMiningByMonthApi,
|
||||||
|
updateTotalMiningApi,
|
||||||
|
} from "@@/apis/tables/diceke/excavationQuantityReport.ts";
|
||||||
|
import { getDate } 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 = getDate(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>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div style="margin-bottom: 20px">
|
||||||
|
<el-date-picker v-model="date" type="month" placeholder="选择年月">
|
||||||
|
</el-date-picker>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
style="margin-left: 20px"
|
||||||
|
@click="getMouthLoss"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
: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-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>
|
197
src/pages/demo/diceke/LossDepletionReport.vue
Normal file
197
src/pages/demo/diceke/LossDepletionReport.vue
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
<script>
|
||||||
|
import {
|
||||||
|
findAllMiningglossApi,
|
||||||
|
deletedicekeMininglossApi,
|
||||||
|
finddicekeMiningrecordById,
|
||||||
|
findLossByMonthApi,
|
||||||
|
updatedicekeMininglossApi,
|
||||||
|
savedicekeMininglossApi,
|
||||||
|
} from "@@/apis/tables/diceke/LossDepletionReport.ts";
|
||||||
|
import { getDate } 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 = getDate(this.date);
|
||||||
|
const res = await findLossByMonthApi(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>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div style="margin-bottom: 20px">
|
||||||
|
<el-date-picker v-model="date" type="month" placeholder="选择年月">
|
||||||
|
</el-date-picker>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
style="margin-left: 20px"
|
||||||
|
@click="getMouthLoss"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
: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="采下废石(%)" />
|
||||||
|
<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="损失率(%)" />
|
||||||
|
<el-table-column align="center" prop="amount" label="配矿配矿量(t)" />
|
||||||
|
<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>
|
@ -4,119 +4,129 @@ import {
|
|||||||
deletePlateArea,
|
deletePlateArea,
|
||||||
findAllPlateArea,
|
findAllPlateArea,
|
||||||
findPlateAreaById,
|
findPlateAreaById,
|
||||||
updatePlateAreaApi
|
updatePlateAreaApi,
|
||||||
} from "@@/apis/tables/diceke/plateArea.js"
|
} from "@@/apis/tables/diceke/plateArea.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
plateAreaQuerry: null, // 电铲平台数据
|
plateAreaQuerry: null, // 电铲平台数据
|
||||||
updatePlateAreaform: false,
|
updatePlateAreaform: false,
|
||||||
plateAreaform: null
|
plateAreaform: null,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 页面渲染之前执行,一般调用methods定义的方法
|
// 页面渲染之前执行,一般调用methods定义的方法
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
findAllPlateArea().then((Response) => {
|
findAllPlateArea().then((Response) => {
|
||||||
console.log(Response)
|
console.log(Response);
|
||||||
this.plateAreaQuerry = Response.data.plateArea
|
this.plateAreaQuerry = Response.data.plateArea;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 删除平盘
|
// 删除平盘
|
||||||
removeDataById(id) {
|
removeDataById(id) {
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm("此操作将永久删除平盘记录,是否继续?", "提示", {
|
||||||
"此操作将永久删除平盘记录,是否继续?",
|
confirmButtonText: "确定",
|
||||||
"提示",
|
cancelButtonText: "取消",
|
||||||
{
|
type: "warning",
|
||||||
confirmButtonText: "确定",
|
})
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deletePlateArea(id).then(() => {
|
deletePlateArea(id).then(() => {
|
||||||
// 删除成功
|
// 删除成功
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "success",
|
type: "success",
|
||||||
message: "删除成功!"
|
message: "删除成功!",
|
||||||
})
|
});
|
||||||
// 重新加载列表
|
// 重新加载列表
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "info",
|
type: "info",
|
||||||
message: "已取消删除"
|
message: "已取消删除",
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.isEdit = false // 设置为新增操作
|
this.isEdit = false; // 设置为新增操作
|
||||||
this.plateAreaform = { plateRange: '' } // 初始化为空数据
|
this.plateAreaform = { plateRange: "" }; // 初始化为空数据
|
||||||
this.updatePlateAreaform = true // 显示弹窗
|
this.updatePlateAreaform = true; // 显示弹窗
|
||||||
},
|
},
|
||||||
/** 修改平盘信息 */
|
/** 修改平盘信息 */
|
||||||
handleEdit(id) {
|
handleEdit(id) {
|
||||||
this.isEdit = true
|
this.isEdit = true;
|
||||||
findPlateAreaById(id).then((Response) => {
|
findPlateAreaById(id)
|
||||||
this.plateAreaform = Response.data.dicekePlatearea
|
.then((Response) => {
|
||||||
this.updatePlateAreaform = true
|
this.plateAreaform = Response.data.dicekePlatearea;
|
||||||
}).catch(() => {
|
this.updatePlateAreaform = true;
|
||||||
ElMessage.error("查询失败,请稍后重试")
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
ElMessage.error("查询失败,请稍后重试");
|
||||||
|
});
|
||||||
},
|
},
|
||||||
updatePlateArea() {
|
updatePlateArea() {
|
||||||
if (this.isEdit){
|
if (this.isEdit) {
|
||||||
updatePlateAreaApi(this.plateAreaform).then(() => {
|
updatePlateAreaApi(this.plateAreaform)
|
||||||
ElMessage({
|
.then(() => {
|
||||||
type: "success",
|
ElMessage({
|
||||||
message: "修改成功!"
|
type: "success",
|
||||||
|
message: "修改成功!",
|
||||||
|
});
|
||||||
|
this.updatePlateAreaform = false;
|
||||||
|
this.getList();
|
||||||
})
|
})
|
||||||
this.updatePlateAreaform = false
|
.catch(() => {
|
||||||
this.getList()
|
ElMessage.error("修改失败,请稍后重试");
|
||||||
}).catch(() => {
|
});
|
||||||
ElMessage.error("修改失败,请稍后重试")
|
} else {
|
||||||
})
|
addPlateAreaApi(this.plateAreaform)
|
||||||
}else {
|
.then(() => {
|
||||||
addPlateAreaApi(this.plateAreaform).then(() => {
|
ElMessage({
|
||||||
ElMessage({
|
type: "success",
|
||||||
type: "success",
|
message: "新增成功!",
|
||||||
message: "新增成功!"
|
});
|
||||||
|
this.updatePlateAreaform = false;
|
||||||
|
this.getList();
|
||||||
})
|
})
|
||||||
this.updatePlateAreaform = false
|
.catch(() => {
|
||||||
this.getList()
|
ElMessage.error("新增失败,请稍后重试");
|
||||||
}).catch(() => {
|
});
|
||||||
ElMessage.error("新增失败,请稍后重试")
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div style="margin-bottom: 20px;">
|
<div style="margin-bottom: 20px">
|
||||||
<el-button type="primary" @click="handleAdd" icon="el-icon-plus">新增平盘</el-button>
|
<el-button type="primary" @click="handleAdd">新增平盘</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="plateAreaQuerry" border style="width: 100%" :span-method="spanMethod">
|
<el-table
|
||||||
|
:data="plateAreaQuerry"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
:span-method="spanMethod"
|
||||||
|
>
|
||||||
<!-- 表格列定义 -->
|
<!-- 表格列定义 -->
|
||||||
<el-table-column prop="plateRange" label="平盘(#)" />
|
<el-table-column prop="plateRange" label="平盘(#)" />
|
||||||
<el-table-column fixed="right" label="操作" width="300" align="center">
|
<el-table-column fixed="right" label="操作" width="300" align="center">
|
||||||
<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 type="primary" text bg size="small" plain @click="handleEdit(scope.row.plateID)">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleEdit(scope.row.plateID)"
|
||||||
|
>
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
text bg size="small"
|
size="small"
|
||||||
@click="removeDataById(scope.row.plateID)"
|
@click="removeDataById(scope.row.plateID)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@ -133,12 +143,8 @@ export default {
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="updatePlateAreaform = false">
|
<el-button @click="updatePlateAreaform = false"> 取消 </el-button>
|
||||||
取消
|
<el-button type="primary" @click="updatePlateArea"> 提交 </el-button>
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" @click="updatePlateArea">
|
|
||||||
提交
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -4,128 +4,150 @@ import {
|
|||||||
deletePrecipitation,
|
deletePrecipitation,
|
||||||
findAllPrecipitation,
|
findAllPrecipitation,
|
||||||
findPrecipitationById,
|
findPrecipitationById,
|
||||||
updatePrecipitationApi
|
updatePrecipitationApi,
|
||||||
} from "@@/apis/tables/diceke/Precipitation.ts"
|
} from "@@/apis/tables/diceke/Precipitation.ts";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
precipitationQuerry: null, // 电铲平台数据
|
precipitationQuerry: null, // 电铲平台数据
|
||||||
updateprecipitationform: false,
|
updateprecipitationform: false,
|
||||||
precipitationform: null
|
precipitationform: null,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 页面渲染之前执行,一般调用methods定义的方法
|
// 页面渲染之前执行,一般调用methods定义的方法
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
findAllPrecipitation().then((Response) => {
|
findAllPrecipitation().then((Response) => {
|
||||||
console.log(Response)
|
console.log(Response);
|
||||||
this.precipitationQuerry = Response.data.precipitation
|
this.precipitationQuerry = Response.data.precipitation;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
removeDataById(id) {
|
removeDataById(id) {
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm("此操作将永久删除降水量记录,是否继续?", "提示", {
|
||||||
"此操作将永久删除降水量记录,是否继续?",
|
confirmButtonText: "确定",
|
||||||
"提示",
|
cancelButtonText: "取消",
|
||||||
{
|
type: "warning",
|
||||||
confirmButtonText: "确定",
|
})
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deletePrecipitation(id).then(() => {
|
deletePrecipitation(id).then(() => {
|
||||||
// 删除成功
|
// 删除成功
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "success",
|
type: "success",
|
||||||
message: "删除成功!"
|
message: "删除成功!",
|
||||||
})
|
});
|
||||||
// 重新加载列表
|
// 重新加载列表
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "info",
|
type: "info",
|
||||||
message: "已取消删除"
|
message: "已取消删除",
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.isEdit = false // 设置为新增操作
|
this.isEdit = false; // 设置为新增操作
|
||||||
this.precipitationform = { plateRange: "" } // 初始化为空数据
|
this.precipitationform = { plateRange: "" }; // 初始化为空数据
|
||||||
this.updateprecipitationform = true // 显示弹窗
|
this.updateprecipitationform = true; // 显示弹窗
|
||||||
},
|
},
|
||||||
handleEdit(id) {
|
handleEdit(id) {
|
||||||
this.isEdit = true
|
this.isEdit = true;
|
||||||
findPrecipitationById(id).then((Response) => {
|
findPrecipitationById(id)
|
||||||
this.precipitationform = Response.data.precipitationById
|
.then((Response) => {
|
||||||
console.log(this.precipitationform)
|
this.precipitationform = Response.data.precipitationById;
|
||||||
this.updateprecipitationform = true
|
console.log(this.precipitationform);
|
||||||
}).catch(() => {
|
this.updateprecipitationform = true;
|
||||||
ElMessage.error("查询失败,请稍后重试")
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
ElMessage.error("查询失败,请稍后重试");
|
||||||
|
});
|
||||||
},
|
},
|
||||||
formatMonth(dateTime) {
|
formatMonth(dateTime) {
|
||||||
if (!dateTime) return "-"
|
if (!dateTime) return "-";
|
||||||
return dateTime.slice(0, 7) // 直接截取 "yyyy-MM"
|
return dateTime.slice(0, 7); // 直接截取 "yyyy-MM"
|
||||||
// 或用 dayjs(需安装):
|
// 或用 dayjs(需安装):
|
||||||
// return dayjs(dateTime).format('YYYY-MM');
|
// return dayjs(dateTime).format('YYYY-MM');
|
||||||
},
|
},
|
||||||
updatePrecipitation() {
|
updatePrecipitation() {
|
||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
updatePrecipitationApi(this.precipitationform).then(() => {
|
updatePrecipitationApi(this.precipitationform)
|
||||||
ElMessage({
|
.then(() => {
|
||||||
type: "success",
|
ElMessage({
|
||||||
message: "修改成功!"
|
type: "success",
|
||||||
|
message: "修改成功!",
|
||||||
|
});
|
||||||
|
this.updateprecipitationform = false;
|
||||||
|
this.getList();
|
||||||
})
|
})
|
||||||
this.updateprecipitationform = false
|
.catch(() => {
|
||||||
this.getList()
|
ElMessage.error("修改失败,请稍后重试");
|
||||||
}).catch(() => {
|
});
|
||||||
ElMessage.error("修改失败,请稍后重试")
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
addPrecipitationApi(this.precipitationform).then(() => {
|
addPrecipitationApi(this.precipitationform)
|
||||||
ElMessage({
|
.then(() => {
|
||||||
type: "success",
|
ElMessage({
|
||||||
message: "新增成功!"
|
type: "success",
|
||||||
|
message: "新增成功!",
|
||||||
|
});
|
||||||
|
this.updateprecipitationform = false;
|
||||||
|
this.getList();
|
||||||
})
|
})
|
||||||
this.updateprecipitationform = false
|
.catch(() => {
|
||||||
this.getList()
|
ElMessage.error("新增失败,请稍后重试");
|
||||||
}).catch(() => {
|
});
|
||||||
ElMessage.error("新增失败,请稍后重试")
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div style="margin-bottom: 20px;">
|
<div style="margin-bottom: 20px">
|
||||||
<el-button type="primary" @click="handleAdd" icon="el-icon-plus">
|
<el-button type="primary" @click="handleAdd" icon="el-icon-plus">
|
||||||
新增降水量
|
新增降水量
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="precipitationQuerry" border style="width: 100%" :span-method="spanMethod">
|
<el-table
|
||||||
|
:cell-style="rowStyle"
|
||||||
|
:data="precipitationQuerry"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
:span-method="spanMethod"
|
||||||
|
>
|
||||||
<!-- 表格列定义 -->
|
<!-- 表格列定义 -->
|
||||||
<el-table-column prop="amount" label="降水量" />
|
<el-table-column align="center" prop="amount" label="降水量" />
|
||||||
<el-table-column prop="unit" label="计量单位" />
|
<el-table-column align="center" prop="unit" label="计量单位" />
|
||||||
<el-table-column prop="monthDate" label="月份" :formatter="(row) => formatMonth(row.monthDate)" />
|
<el-table-column
|
||||||
<el-table-column fixed="right" label="操作" width="300" align="center">
|
align="center"
|
||||||
|
prop="monthDate"
|
||||||
|
label="月份"
|
||||||
|
:formatter="(row) => formatMonth(row.monthDate)"
|
||||||
|
/>
|
||||||
|
<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 type="primary" text bg size="small" plain @click="handleEdit(scope.row.precipID)">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleEdit(scope.row.precipID)"
|
||||||
|
>
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
text bg size="small"
|
size="small"
|
||||||
@click="removeDataById(scope.row.precipID)"
|
@click="removeDataById(scope.row.precipID)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@ -134,7 +156,11 @@ export default {
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-dialog v-model="updateprecipitationform" title="修改降水量信息" width="500">
|
<el-dialog
|
||||||
|
v-model="updateprecipitationform"
|
||||||
|
title="修改降水量信息"
|
||||||
|
width="500"
|
||||||
|
>
|
||||||
<el-form :model="precipitationform">
|
<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="precipitationform.amount" autocomplete="off" />
|
||||||
@ -152,9 +178,7 @@ export default {
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="updateprecipitationform = false">
|
<el-button @click="updateprecipitationform = false"> 取消 </el-button>
|
||||||
取消
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" @click="updatePrecipitation">
|
<el-button type="primary" @click="updatePrecipitation">
|
||||||
提交
|
提交
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -4,121 +4,132 @@ import {
|
|||||||
deleteTableDataApi,
|
deleteTableDataApi,
|
||||||
findAllshovel,
|
findAllshovel,
|
||||||
findShovelById,
|
findShovelById,
|
||||||
updateshovelApi
|
updateshovelApi,
|
||||||
} from "@@/apis/tables/diceke/shovel.js"
|
} from "@@/apis/tables/diceke/shovel.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
shovelQuerry: null, // 电铲平台数据
|
shovelQuerry: null, // 电铲平台数据
|
||||||
shovelform: null,
|
shovelform: null,
|
||||||
updateshovelform: false
|
updateshovelform: false,
|
||||||
|
};
|
||||||
}
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 页面渲染之前执行,一般调用methods定义的方法
|
// 页面渲染之前执行,一般调用methods定义的方法
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
findAllshovel().then((Response) => {
|
findAllshovel().then((Response) => {
|
||||||
console.log(Response)
|
console.log(Response);
|
||||||
this.shovelQuerry = Response.data.shovel
|
this.shovelQuerry = Response.data.shovel;
|
||||||
console.log(this.shovelQuerry)
|
console.log(this.shovelQuerry);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 删除电铲
|
// 删除电铲
|
||||||
removeDataById(id) {
|
removeDataById(id) {
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm("此操作将永久删除电铲记录,是否继续?", "提示", {
|
||||||
"此操作将永久删除电铲记录,是否继续?",
|
confirmButtonText: "确定",
|
||||||
"提示",
|
cancelButtonText: "取消",
|
||||||
{
|
type: "warning",
|
||||||
confirmButtonText: "确定",
|
})
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deleteTableDataApi(id).then(() => {
|
deleteTableDataApi(id).then(() => {
|
||||||
// 删除成功
|
// 删除成功
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "success",
|
type: "success",
|
||||||
message: "删除成功!"
|
message: "删除成功!",
|
||||||
})
|
});
|
||||||
// 重新加载列表
|
// 重新加载列表
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "info",
|
type: "info",
|
||||||
message: "已取消删除"
|
message: "已取消删除",
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 新增电铲信息
|
// 新增电铲信息
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.isEdit = false
|
this.isEdit = false;
|
||||||
this.shovelform = { shovelCode: '', attribute: '1' }
|
this.shovelform = { shovelCode: "", attribute: "1" };
|
||||||
this.updateshovelform = true // 显示弹窗
|
this.updateshovelform = true; // 显示弹窗
|
||||||
},
|
},
|
||||||
/** 修改电铲信息 */
|
/** 修改电铲信息 */
|
||||||
handleEdit(id) {
|
handleEdit(id) {
|
||||||
this.isEdit = true
|
this.isEdit = true;
|
||||||
findShovelById(id).then((Response) => {
|
findShovelById(id)
|
||||||
this.shovelform = Response.data.dicekeShovel
|
.then((Response) => {
|
||||||
|
this.shovelform = Response.data.dicekeShovel;
|
||||||
if (this.shovelform.attribute === 1) {
|
if (this.shovelform.attribute === 1) {
|
||||||
this.shovelform.attribute = '自营'
|
this.shovelform.attribute = "自营";
|
||||||
} else if (this.shovelform.attribute === 2) {
|
} else if (this.shovelform.attribute === 2) {
|
||||||
this.shovelform.attribute = '外委'
|
this.shovelform.attribute = "外委";
|
||||||
}
|
}
|
||||||
this.updateshovelform = true
|
this.updateshovelform = true;
|
||||||
}).catch(() => {
|
|
||||||
ElMessage.error("查询失败,请稍后重试")
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
ElMessage.error("查询失败,请稍后重试");
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
updateshovel() {
|
updateshovel() {
|
||||||
|
if (this.shovelform.attribute === "自营") {
|
||||||
if (this.shovelform.attribute === '自营') {
|
this.shovelform.attribute = 1;
|
||||||
this.shovelform.attribute = 1
|
} else if (this.shovelform.attribute === "外委") {
|
||||||
} else if (this.shovelform.attribute === '外委') {
|
this.shovelform.attribute = 2;
|
||||||
this.shovelform.attribute = 2
|
|
||||||
}
|
}
|
||||||
if(this.isEdit){
|
if (this.isEdit) {
|
||||||
updateshovelApi(this.shovelform).then(() => {
|
updateshovelApi(this.shovelform)
|
||||||
ElMessage({
|
.then(() => {
|
||||||
type: "success",
|
ElMessage({
|
||||||
message: "修改成功!"
|
type: "success",
|
||||||
|
message: "修改成功!",
|
||||||
|
});
|
||||||
|
this.updateshovelform = false;
|
||||||
|
this.getList();
|
||||||
})
|
})
|
||||||
this.updateshovelform = false
|
.catch(() => {
|
||||||
this.getList()
|
ElMessage.error("修改失败,请稍后重试");
|
||||||
}).catch(() => {
|
});
|
||||||
ElMessage.error("修改失败,请稍后重试")
|
} else {
|
||||||
})
|
addShovelApi(this.shovelform)
|
||||||
}else {
|
.then(() => {
|
||||||
addShovelApi(this.shovelform).then(() => {
|
ElMessage({
|
||||||
ElMessage({
|
type: "success",
|
||||||
type: "success",
|
message: "新增成功!",
|
||||||
message: "新增成功!"
|
});
|
||||||
})
|
this.updateshovelform = false;
|
||||||
this.updateshovelform = false
|
this.getList();
|
||||||
this.getList()
|
})
|
||||||
}).catch(() => {
|
.catch(() => {
|
||||||
ElMessage.error("新增失败,请稍后重试")
|
ElMessage.error("新增失败,请稍后重试");
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<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;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<el-input v-model="searchQuery" placeholder="请输入铲号" style="width: 200px; margin-right: 10px;" />
|
<el-input
|
||||||
|
v-model="searchQuery"
|
||||||
|
placeholder="请输入铲号"
|
||||||
|
style="width: 200px; margin-right: 10px"
|
||||||
|
/>
|
||||||
<el-button type="primary" @click="searchData">查询</el-button>
|
<el-button type="primary" @click="searchData">查询</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 新增按钮 -->
|
<!-- 新增按钮 -->
|
||||||
@ -126,26 +137,43 @@ export default {
|
|||||||
type="primary"
|
type="primary"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
style="width: 100px; display: flex; justify-content: center; align-items: center;">
|
style="
|
||||||
|
width: 100px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
>
|
||||||
新增
|
新增
|
||||||
</el-button> </div>
|
</el-button>
|
||||||
<el-table :data="shovelQuerry" border style="width: 100%" :span-method="spanMethod">
|
</div>
|
||||||
|
<el-table
|
||||||
|
:cell-style="rowStyle"
|
||||||
|
:data="shovelQuerry"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
:span-method="spanMethod"
|
||||||
|
>
|
||||||
<!-- 表格列定义 -->
|
<!-- 表格列定义 -->
|
||||||
<el-table-column prop="shovelCode" label="铲号(#)" />
|
<el-table-column align="center" prop="shovelCode" label="铲号(#)" />
|
||||||
<el-table-column label="属性">
|
<el-table-column align="center" label="属性">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.attribute === 1 ? '自营' : '外委' }}</span>
|
<span>{{ scope.row.attribute === 1 ? "自营" : "外委" }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" width="300" align="center">
|
<el-table-column fixed="right" label="操作" width="300" align="center">
|
||||||
<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 type="primary" text bg size="small" plain @click="handleEdit(scope.row.shovelID)">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleEdit(scope.row.shovelID)"
|
||||||
|
>
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
text bg size="small"
|
size="small"
|
||||||
@click="removeDataById(scope.row.shovelID)"
|
@click="removeDataById(scope.row.shovelID)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@ -168,12 +196,8 @@ export default {
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="updateshovelform = false">
|
<el-button @click="updateshovelform = false"> 取消 </el-button>
|
||||||
取消
|
<el-button type="primary" @click="updateshovel"> 提交 </el-button>
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" @click="updateshovel">
|
|
||||||
提交
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -197,8 +197,43 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
title: "降水量报表",
|
title: "降水量报表",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "lossDepletionReport",
|
||||||
|
component: () => import("@/pages/demo/diceke/LossDepletionReport.vue"),
|
||||||
|
name: "",
|
||||||
|
meta: {
|
||||||
|
title: "损失和贫化报表",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "excavationQuantityReport",
|
||||||
|
component: () => import("@/pages/demo/diceke/excavationQuantityReport.vue"),
|
||||||
|
name: "",
|
||||||
|
meta: {
|
||||||
|
title: "采剥量报表",
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// path: "/caiqu",
|
||||||
|
// component: Layouts,
|
||||||
|
// redirect: "/caiqu",
|
||||||
|
// meta: {
|
||||||
|
// title: "采区",
|
||||||
|
// elIcon: "Link",
|
||||||
|
// },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: "shovel",
|
||||||
|
// component: () => import("@/pages/demo/diceke/shovel.vue"),
|
||||||
|
// name: "shovel",
|
||||||
|
// meta: {
|
||||||
|
// title: "电铲维护",
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user