diff --git a/src/api/dashboard/dashboard.js b/src/api/dashboard/dashboard.js index 2065e72..32f48cf 100644 --- a/src/api/dashboard/dashboard.js +++ b/src/api/dashboard/dashboard.js @@ -15,4 +15,6 @@ export const bufferBoard = data => createAPI('/api/dashboard/bufferBoard', 'POST export const workshopFeedingBoard = data => createAPI('/api/dashboard/workshopFeedingBoard', 'POST', data) +export const exceptionBoard = data => createAPI('/api/dashboard/exceptionBoard', 'POST', data) + diff --git a/src/router/index.js b/src/router/index.js index 3f811ad..e88f82d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -27,6 +27,7 @@ const globalRoutes = [ { path: '/dashboard-material-receiving-board', component: _import('modules/dashboard/material-receiving-board'), name: 'dashboard-material-receiving-board', meta: { title: '原材收货区看板' } }, { 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/inventory-board'), name: 'dashboard-inventory-board', meta: { title: '库存分析看板' } } ] diff --git a/src/views/modules/dashboard/buffer-board.vue b/src/views/modules/dashboard/buffer-board.vue index d640c17..bc62bd8 100644 --- a/src/views/modules/dashboard/buffer-board.vue +++ b/src/views/modules/dashboard/buffer-board.vue @@ -161,14 +161,14 @@ export default { this.timeInterval = setInterval(() => { this.updateTime() }, 1000) - + // 首次加载数据 this.getDataList() - // 每30秒刷新一次数据 + // 每10秒刷新一次数据 this.dataInterval = setInterval(() => { this.getDataList() - }, 30000) + }, 10000) }, beforeDestroy() { @@ -188,7 +188,7 @@ export default { bufferBoard({}).then(({data}) => { if (data && data.code === 200) { console.log('获取缓存区数据成功:', data.data) - // TODO: 处理返回的数据 + // TODO: 处理返回的数据,覆盖而非追加,避免内存累积 // if (data.data) { // this.bufferList = data.data.bufferList || [] // } @@ -438,6 +438,7 @@ export default { width: 100%; border-collapse: separate; border-spacing: 0; + height: 700px; thead { tr { diff --git a/src/views/modules/dashboard/exception-board.vue b/src/views/modules/dashboard/exception-board.vue new file mode 100644 index 0000000..5475ba5 --- /dev/null +++ b/src/views/modules/dashboard/exception-board.vue @@ -0,0 +1,840 @@ + + + + + + diff --git a/src/views/modules/dashboard/finished-product-board.vue b/src/views/modules/dashboard/finished-product-board.vue index d210e15..97a7730 100644 --- a/src/views/modules/dashboard/finished-product-board.vue +++ b/src/views/modules/dashboard/finished-product-board.vue @@ -239,10 +239,10 @@ export default { // 首次加载数据 this.getDataList() - // 每30秒刷新一次数据 + // 每10秒刷新一次数据 this.dataInterval = setInterval(() => { this.getDataList() - }, 30000) + }, 10000) }, beforeDestroy() { @@ -262,7 +262,7 @@ export default { finishedProductBoard({}).then(({data}) => { if (data && data.code === 200) { console.log('获取成品入库出库区数据成功:', data.data) - // TODO: 处理返回的数据 + // TODO: 处理返回的数据,覆盖而非追加,避免内存累积 // if (data.data) { // this.packagingList = data.data.packagingList || [] // this.inboundList = data.data.inboundList || [] diff --git a/src/views/modules/dashboard/inventory-board.vue b/src/views/modules/dashboard/inventory-board.vue new file mode 100644 index 0000000..f716eed --- /dev/null +++ b/src/views/modules/dashboard/inventory-board.vue @@ -0,0 +1,1370 @@ + + + + + + diff --git a/src/views/modules/dashboard/material-receiving-board.vue b/src/views/modules/dashboard/material-receiving-board.vue index 5cd0281..2bcf7c6 100644 --- a/src/views/modules/dashboard/material-receiving-board.vue +++ b/src/views/modules/dashboard/material-receiving-board.vue @@ -229,10 +229,10 @@ export default { // 首次加载数据 this.getDataList() - // 每30秒刷新一次数据 + // 每10秒刷新一次数据 this.dataInterval = setInterval(() => { this.getDataList() - }, 30000) + }, 10000) }, beforeDestroy() { @@ -252,7 +252,7 @@ export default { materialReceivingBoard({}).then(({data}) => { if (data && data.code === 200) { console.log('获取原材收货区数据成功:', data.data) - // TODO: 处理返回的数据 + // TODO: 处理返回的数据,覆盖而非追加,避免内存累积 // if (data.data) { // this.receivingList = data.data.receivingList || [] // this.inboundList = data.data.inboundList || [] diff --git a/src/views/modules/dashboard/picking-board.vue b/src/views/modules/dashboard/picking-board.vue index 627a97f..9713040 100644 --- a/src/views/modules/dashboard/picking-board.vue +++ b/src/views/modules/dashboard/picking-board.vue @@ -117,6 +117,7 @@ export default { return { currentTime: '', timeInterval: null, + dataInterval: null, // 模拟工单数据 workOrders: [ @@ -227,13 +228,23 @@ export default { this.timeInterval = setInterval(() => { this.updateTime() }, 1000) + + // 首次加载数据 this.getDataList() + + // 每10秒刷新一次数据 + this.dataInterval = setInterval(() => { + this.getDataList() + }, 10000) }, beforeDestroy() { if (this.timeInterval) { clearInterval(this.timeInterval) } + if (this.dataInterval) { + clearInterval(this.dataInterval) + } }, methods: { @@ -242,10 +253,14 @@ export default { manualPicking({}).then(({data}) => { if (data && data.code === 200) { console.log('获取数据成功:', data.data) + // TODO: 处理返回的数据,覆盖而非追加,避免内存累积 + // if (data.data) { + // this.leftPanelList = data.data.leftPanelList || [] + // this.rightPanelList = data.data.rightPanelList || [] + // } } }).catch(error => { console.error('获取数据失败:', error) - this.$message.error('获取数据失败') }) }, /** diff --git a/src/views/modules/dashboard/robot-picking-board.vue b/src/views/modules/dashboard/robot-picking-board.vue index 32546cf..c88ceba 100644 --- a/src/views/modules/dashboard/robot-picking-board.vue +++ b/src/views/modules/dashboard/robot-picking-board.vue @@ -235,10 +235,10 @@ export default { // 首次加载数据 this.getDataList() - // 每30秒刷新一次数据 + // 每10秒刷新一次数据 this.dataInterval = setInterval(() => { this.getDataList() - }, 30000) + }, 10000) }, beforeDestroy() { @@ -258,7 +258,7 @@ export default { robotPicking({}).then(({data}) => { if (data && data.code === 200) { console.log('获取机械臂拣选数据成功:', data.data) - // TODO: 处理返回的数据 + // TODO: 处理返回的数据,覆盖而非追加,避免内存累积 // if (data.data) { // this.containerPickingList = data.data.containerList || [] // this.materialPickingList = data.data.materialList || [] diff --git a/src/views/modules/dashboard/slitting-board.vue b/src/views/modules/dashboard/slitting-board.vue index 1fcea52..e658a6b 100644 --- a/src/views/modules/dashboard/slitting-board.vue +++ b/src/views/modules/dashboard/slitting-board.vue @@ -217,10 +217,10 @@ export default { // 首次加载数据 this.getDataList() - // 每30秒刷新一次数据 + // 每10秒刷新一次数据 this.dataInterval = setInterval(() => { this.getDataList() - }, 30000) + }, 10000) }, beforeDestroy() { @@ -240,7 +240,7 @@ export default { slittingBoard({}).then(({data}) => { if (data && data.code === 200) { console.log('获取分切区数据成功:', data.data) - // TODO: 处理返回的数据 + // TODO: 处理返回的数据,覆盖而非追加,避免内存累积 // if (data.data) { // this.assistArmList = data.data.assistArmList || [] // this.slittingInboundList = data.data.slittingInboundList || [] diff --git a/src/views/modules/dashboard/workshop-feeding-board.vue b/src/views/modules/dashboard/workshop-feeding-board.vue index a7bcb2f..2661688 100644 --- a/src/views/modules/dashboard/workshop-feeding-board.vue +++ b/src/views/modules/dashboard/workshop-feeding-board.vue @@ -134,14 +134,14 @@ export default { this.timeInterval = setInterval(() => { this.updateTime() }, 1000) - + // 首次加载数据 this.getDataList() - // 每30秒刷新一次数据 + // 每10秒刷新一次数据 this.dataInterval = setInterval(() => { this.getDataList() - }, 30000) + }, 10000) }, beforeDestroy() { @@ -161,7 +161,7 @@ export default { workshopFeedingBoard({}).then(({data}) => { if (data && data.code === 200) { console.log('获取车间AGV放料区数据成功:', data.data) - // TODO: 处理返回的数据 + // TODO: 处理返回的数据,覆盖而非追加,避免内存累积 // if (data.data) { // this.feedingList = data.data.feedingList || [] // } @@ -409,6 +409,7 @@ export default { width: 100%; border-collapse: separate; border-spacing: 0; + height: 700px; thead { tr {