This commit is contained in:
parent
3acec66ddd
commit
6b53804282
2
.env
2
.env
@ -1,7 +1,7 @@
|
||||
# 所有环境的环境变量(命名必须以 VITE_ 开头)
|
||||
|
||||
## 项目标题
|
||||
VITE_APP_TITLE = 数据运营管理平台
|
||||
VITE_APP_TITLE = 智慧矿山数据管理平台
|
||||
|
||||
## 路由模式 hash 或 html5
|
||||
VITE_ROUTER_HISTORY = hash
|
||||
|
@ -3,8 +3,8 @@
|
||||
## 后端接口地址(如果解决跨域问题采用反向代理就只需写相对路径)
|
||||
## VITE_BASE_URL = /api/v1
|
||||
|
||||
# VITE_BASE_URL = http://124.71.209.231:8000
|
||||
VITE_BASE_URL = null
|
||||
VITE_BASE_URL = http://124.71.209.231:8000
|
||||
# VITE_BASE_URL = null
|
||||
|
||||
|
||||
## 开发环境域名和静态资源公共路径(一般 / 或 ./ 都可以)
|
||||
|
BIN
src/common/assets/images/layouts/logo.jpg
Normal file
BIN
src/common/assets/images/layouts/logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
@ -4,7 +4,7 @@ const VITE_APP_TITLE = import.meta.env.VITE_APP_TITLE
|
||||
|
||||
<template>
|
||||
<footer class="layout-footer">
|
||||
MIT © 2021-PRESENT {{ VITE_APP_TITLE }}
|
||||
MIT © 2025-PRESENT {{ VITE_APP_TITLE }}
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
|
@ -5,7 +5,7 @@ import SvgDashboard from "../images/dashboard.svg?component" // vite-svg-loader
|
||||
<template>
|
||||
<div class="app-container center">
|
||||
<SvgDashboard class="svg" />
|
||||
<p>欢迎来到数据运营管理平台</p>
|
||||
<p>欢迎来到智慧矿山数据管理平台</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -1,17 +1,35 @@
|
||||
<script>
|
||||
import {
|
||||
updateFangpaishuiPumpoperationrecordApi,
|
||||
deleteFangpaishuiPumpoperationrecordApi,
|
||||
findPumpoperationrecordByDetailApi,
|
||||
addFangpaishuiPumpoperationrecordApi,
|
||||
findFangpaishuiPumpoperationrecordByMonthApi,
|
||||
} from "@@/apis/tables/drainageWorkshop/pumpOperationLog.ts";
|
||||
import {} from "@@/apis/tables/drainageWorkshop/pumpOperationLog.ts";
|
||||
import { getSpecificDate } from "@@/utils/datetime";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
date: "",
|
||||
tableList: [],
|
||||
tableList: [
|
||||
{
|
||||
projectName: "运矿量",
|
||||
unit: "节",
|
||||
month: { plan: "15167", actual: "15624", percentage: "103.01" },
|
||||
cumulativeForMonth: {
|
||||
plan: "",
|
||||
actual: "",
|
||||
percentage: "",
|
||||
},
|
||||
notes: "每次交班必须至少留1列重矿,在葵站待命",
|
||||
},
|
||||
{ projectName: "其中:东倒", unit: "节", month: { plan: "" } },
|
||||
{ projectName: "西倒", unit: "节" },
|
||||
{ projectName: "", unit: "单位" },
|
||||
{ projectName: "装车质量", unit: "t/列" },
|
||||
{ projectName: "电机车周转量", unit: "吨公里" },
|
||||
{ projectName: "电机车综合效率", unit: "吨台班" },
|
||||
{ projectName: "电机车出车率(台班)", unit: "吨" },
|
||||
{ projectName: "电机作业率(分时)", unit: "吨" },
|
||||
{ projectName: "电机车完好率(台班)", unit: "吨" },
|
||||
{ projectName: "", unit: "单位" },
|
||||
{ projectName: "列车周转时间", unit: "分" },
|
||||
{ projectName: "大选厂卸车数" },
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -21,8 +39,8 @@ export default {
|
||||
methods: {
|
||||
//获取列表
|
||||
async getList() {
|
||||
const res = await findAllMiningglossApi();
|
||||
console.log(res);
|
||||
// const res = await findAllMiningglossApi();
|
||||
// console.log(res);
|
||||
},
|
||||
//按月查询
|
||||
async getMouthLoss() {
|
||||
@ -30,80 +48,15 @@ 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("新增失败,请稍后重试");
|
||||
});
|
||||
// 合并
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (columnIndex === 0) {
|
||||
if (rowIndex === 12) {
|
||||
return {
|
||||
rowspan: 1,
|
||||
colspan: 1,
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -127,67 +80,60 @@ export default {
|
||||
:data="tableList"
|
||||
border
|
||||
style="width: 100%"
|
||||
:span-method="spanMethod"
|
||||
:span-method="objectSpanMethod"
|
||||
: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
|
||||
align="center"
|
||||
prop="projectName"
|
||||
fixed
|
||||
label="项目"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="unit"
|
||||
label="单位"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" prop="amount" label="月份">
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="month.plan"
|
||||
label="计划"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="month.actual"
|
||||
label="实际"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="month.percentage"
|
||||
label="%"
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="amount" label="一月份累计">
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="cumulativeForMonth.plan"
|
||||
label="计划"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="cumulativeForMonth.actual"
|
||||
label="实际"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="cumulativeForMonth.percentage"
|
||||
label="%"
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="notes"
|
||||
label="备注"
|
||||
></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>
|
||||
|
@ -156,7 +156,7 @@ async function handleUserLogin(formEl) {
|
||||
await formEl.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
loading.value = true;
|
||||
loginFormData.password = $md5(loginFormData.password);
|
||||
// loginFormData.password = $md5(loginFormData.password);
|
||||
loginApi(loginFormData)
|
||||
.then(({ data }) => {
|
||||
userStore.setToken(data.token);
|
||||
@ -240,6 +240,7 @@ function updateCountdown() {
|
||||
}
|
||||
//忘记密码
|
||||
function forgetPwd() {
|
||||
forgetFormData.password = ''
|
||||
isForgetPwd.value = true;
|
||||
}
|
||||
watch(isDisabled, (newVal, oldVal) => {
|
||||
@ -258,7 +259,7 @@ watch(isDisabled, (newVal, oldVal) => {
|
||||
<div class="title-left">
|
||||
<img src="@@/assets/images/layouts/img.png" />
|
||||
</div>
|
||||
<div class="title-text">数据运营管理平台</div>
|
||||
<div class="title-text">智慧矿山数据管理平台</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<el-form
|
||||
@ -356,12 +357,12 @@ watch(isDisabled, (newVal, oldVal) => {
|
||||
<el-link type="primary" @click="forgetPwd()">忘记密码? </el-link>
|
||||
</div>
|
||||
|
||||
<div class="login-thirdprty">
|
||||
<div class="login-thirdprty" v-if="!isForgetPwd">
|
||||
<div class="css-1vli2z"></div>
|
||||
<div class="css-wna3id">其他方式登录</div>
|
||||
<div class="css-1vli2z"></div>
|
||||
</div>
|
||||
<div class="iconAll">
|
||||
<div class="iconAll" v-if="!isForgetPwd">
|
||||
<button>
|
||||
<i class="iconfont icon-weixin"></i>
|
||||
</button>
|
||||
|
2
types/auto/components.d.ts
vendored
2
types/auto/components.d.ts
vendored
@ -35,8 +35,10 @@ declare module 'vue' {
|
||||
ElMain: typeof import('element-plus/es')['ElMain']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
|
Loading…
x
Reference in New Issue
Block a user