1. 增加异常信息弹框提示

This commit is contained in:
梁州 2026-02-25 15:17:11 +08:00
parent c4a61f5b1e
commit b3bc5acc97
3 changed files with 63 additions and 2 deletions

View File

@ -32,9 +32,18 @@ const switchToDistribute = (params) => {
}) })
} }
const getStandErrMsg = (params) => {
return request({
url: '/stand/getStandErrMsg',
method: 'post',
data: params
})
}
export { export {
getStandsByPage, getStandsByPage,
updateStandInfo, updateStandInfo,
switchToCreate, switchToCreate,
switchToDistribute switchToDistribute,
getStandErrMsg
} }

View File

@ -52,6 +52,7 @@
<el-table-column prop="pickVehicleCount" label="站台料箱数量" min-width="120px"/> <el-table-column prop="pickVehicleCount" label="站台料箱数量" min-width="120px"/>
<el-table-column prop="allowNoPlan" label="非计划" :formatter="allowNoPlanFormat" show-overflow-tooltip <el-table-column prop="allowNoPlan" label="非计划" :formatter="allowNoPlanFormat" show-overflow-tooltip
min-width="120px"/> min-width="120px"/>
<el-table-column prop="errMsg" label="报错信息" min-width="120px" show-overflow-tooltip />
<el-table-column fixed="right" label="操作" width="120px"> <el-table-column fixed="right" label="操作" width="120px">
<template v-slot="scope"> <template v-slot="scope">
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button> <el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>

View File

@ -64,6 +64,9 @@ const icon_img_url = require('@/assets/fdbk_log.png')
</script> </script>
<script> <script>
import {getStandErrMsg} from "@/api/stand";
import {ElMessageBox} from "element-plus";
export default { export default {
name: 'HomeView', name: 'HomeView',
components: { components: {
@ -75,6 +78,21 @@ export default {
return store.getters.getUserName return store.getters.getUserName
} }
}, },
data() {
return {
standId: store.getters.getStandId,
timer: '',
queryErrFlag: true
}
},
mounted() {
this.timer = setInterval(() => {
this.queryStandErrMsg()
}, 300000)
},
beforeUnmount() {
clearInterval(this.timer)
},
methods: { methods: {
handleCommand: (command) => { handleCommand: (command) => {
const param = { const param = {
@ -110,7 +128,40 @@ export default {
ElMessage.error('发生错误') ElMessage.error('发生错误')
}) })
} }
} },
queryStandErrMsg() {
console.log("触发")
if (this.standId === '' || this.standId === null) {
clearInterval(this.timer)
return
}
if (!this.queryErrFlag) {
return
}
const request = {
standId: this.standId
}
getStandErrMsg(request).then(res => {
const response = res.data
console.log(response)
if (response.code === 200) {
this.queryErrFlag = false
ElMessageBox.alert(response.returnData, '警告', {
autofocus: true,
confirmButtonText: '确认',
center: true,
type: 'warning',
closeOnPressEscape: true,
showClose: false,
callback: (action) => {
if (action === 'confirm') {
this.queryErrFlag = true
}
}
})
}
})
},
} }
} }
</script> </script>