Browse Source

feat(board): 添加IFS移库失败看板功能

- 新增ifsCallErrorLogBoard API接口用于获取看板数据
- 创建ifsTransferErrorBoard.vue组件实现看板展示功能
- 配置路由映射到新的看板页面
- 实现表格数据显示、自动刷新等功能
- 添加重试操作按钮支持手动重试处理
- 设置定时刷新机制每30秒更新一次数据
master
常熟吴彦祖 2 weeks ago
parent
commit
6323e11ebc
  1. 5
      src/api/warehouse/ifsCallErrorLog.js
  2. 3
      src/router/index.js
  3. 220
      src/views/modules/board/ifsTransferErrorBoard.vue

5
src/api/warehouse/ifsCallErrorLog.js

@ -17,4 +17,7 @@ export const retryIfsCall = data => createAPI('api/ifsCallErrorLog/retry', 'POST
export const closeIfsCall = data => createAPI('api/ifsCallErrorLog/closeRetry', 'POST', data)
// 批量重试IFS接口调用 - rqrq
export const batchRetryIfsCall = data => createAPI('api/ifsCallErrorLog/batchRetry', 'POST', data)
export const batchRetryIfsCall = data => createAPI('api/ifsCallErrorLog/batchRetry', 'POST', data)
export const ifsCallErrorLogBoard = data => createAPI('board/ifsCallErrorLogBoard', 'POST', data)

3
src/router/index.js

@ -30,7 +30,8 @@ const globalRoutes = [
{ path: '/dashboard-buffer-board', component: _import('modules/dashboard/buffer-board'), name: 'dashboard-buffer-board', meta: { title: '缓存区看板' } },
{ path: '/dashboard-workshop-feeding-board', component: _import('modules/dashboard/workshop-feeding-board'), name: 'dashboard-workshop-feeding-board', meta: { title: '车间AGV放料区看板' } },
{ path: '/dashboard-exception-board', component: _import('modules/dashboard/exception-board'), name: 'dashboard-exception-board', meta: { title: '异常处理区看板' } },
{ path: '/dashboard-master-board', component: _import('modules/dashboard/warehouse-3d-board'), name: 'dashboard-inventory-board', meta: { title: '库存分析看板' } }
{ path: '/dashboard-master-board', component: _import('modules/dashboard/warehouse-3d-board'), name: 'dashboard-inventory-board', meta: { title: '库存分析看板' } },
{ path: '/dashboard-ifsTransferErrorBoard', component: _import('modules/board/ifsTransferErrorBoard'), name: 'ifsTransferErrorBoard', meta: { title: 'IFS移库失败看板' } },
]
// 主入口路由(需嵌套上左右整体布局)

220
src/views/modules/board/ifsTransferErrorBoard.vue

@ -0,0 +1,220 @@
<template>
<div class="mod-config">
<div style="text-align: center">
<h1>IFS移库失败看板</h1>
</div>
<div class="board2">
<!-- @mouseenter.native="mouseEnter"-->
<!-- @mouseleave.native="mouseLeave"-->
<el-table
:height="height"
:data="tableData"
ref="wt_table"
border
:row-class-name="tableRowClassName"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="item.columnProp === 'processStatus'">
<el-tag
:type="getStatusType(scope.row.processStatus)"
size="small">
{{ getStatusLabel(scope.row.processStatus) }}
</el-tag>
</span>
<span v-else-if="item.columnProp === 'operate'">
<el-button
v-if="scope.row.processStatus === 'PENDING'"
type="text"
size="small"
@click="showDetailDialog(scope.row)">
查看详情
</el-button>
<!-- rqrq - 使用全局重试状态控制按钮 -->
<el-button
v-if="scope.row.processStatus === 'PENDING'"
type="text"
size="small"
style="color: #E6A23C;"
:loading="retryingRowId === scope.row.id"
:disabled="retryingRowId !== null"
@click="handleRetry(scope.row)">
{{ retryingRowId === scope.row.id ? '重试中...' : '重试' }}
</el-button>
<span v-else>-</span>
</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
let rollstop = ''
let rolltimer = ''//
let refresher = '' //
import {
ifsCallErrorLogBoard
} from '@/api/warehouse/ifsCallErrorLog.js'
export default {
name: 'soLiuhuaBoard',
data () {
return {
pageIndex: 1,
totalPage: 1,
height: 200,
tableData: [],
//
// refreshTime: 5,
// rollTime: 5,
// rollPx: 1,
columnList: [
{
columnProp: "partNo",
headerAlign: "center",
align: "center",
columnLabel: "物料编号",
columnWidth: 120,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "lotBatchNo",
headerAlign: "center",
align: "center",
columnLabel: "批次号",
columnWidth: 120,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "sourceLocation",
headerAlign: "center",
align: "center",
columnLabel: "源库位",
columnWidth: 80,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "destLocation",
headerAlign: "center",
align: "center",
columnLabel: "目标库位",
columnWidth: 80,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "qty",
headerAlign: "center",
align: "center",
columnLabel: "数量",
columnWidth: 80,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "serialNos",
headerAlign: "center",
align: "center",
columnLabel: "标签",
columnWidth: 260,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "createdAt",
headerAlign: "center",
align: "center",
columnLabel: "创建时间",
columnWidth: 150,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
],
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 80
})
// this.autoRoll()
},
methods: {
tableRowClassName ({row, rowIndex}) {
return ''
},
search () {
let inData= {number:this.pageIndex};
ifsCallErrorLogBoard(inData).then(({data}) => {
this.tableData = data.rows;
this.totalPage= data.maxPage;
if(this.pageIndex+1>data.maxPage){
this.pageIndex=1
}else {
this.pageIndex=this.pageIndex+1
}
})
},
refreshTable () {
refresher = setInterval(() => {
this.search()
}, 30000)
}
},
created () {
this.search()
this.refreshTable()
}
}
</script>
<style >
.board2 .el-table .cell {
line-height: 13px;
font-size: 12px;
height: 13px;
padding: 0px;
}
.board2 .el-table .success-row {
background: #1bb61b;
}
.board2 .el-table .false-row {
/*background: #cbcb14;*/
background: #db1212;
}
.board2 .el-table .yellow-row{
background: #ffff00;
}
</style>
Loading…
Cancel
Save