|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div class="screen-wrap"> |
|
|
|
<div class="top-bar"> |
|
|
|
<div class="header-left"><div class="logo-box">LOGO</div></div> |
|
|
|
<div class="header-left"><img class="site-navbar__brand-logo" src="~@/assets/img/lc.png" alt="龙闯电梯"></div> |
|
|
|
<div class="header-center"> |
|
|
|
<div class="title">生产进度管理看板 · VL2.5升级</div> |
|
|
|
</div> |
|
|
|
@ -22,7 +22,7 @@ |
|
|
|
<span class="legend-item"><i class="dot todo"></i>未开始</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table class="board-table" :data="boardList" :height="tableHeight" v-loading="loading" border stripe> |
|
|
|
<el-table class="board-table" :data="boardList" :height="tableHeight" border stripe> |
|
|
|
<el-table-column type="index" label="序号" width="60" align="center"></el-table-column> |
|
|
|
<el-table-column prop="projectNo" label="项目号" min-width="130" align="center"></el-table-column> |
|
|
|
<el-table-column prop="floors" label="楼层" min-width="80" align="center"></el-table-column> |
|
|
|
@ -43,15 +43,26 @@ const NODE_TEMPLATE = ['stocking', 'assy', 'inspect', 'pack'] |
|
|
|
export default { |
|
|
|
name: 'ScreenRenovationProgress', |
|
|
|
data() { |
|
|
|
return { loading: false, tableHeight: 640, currentTime: '', timerId: null, boardList: [], kpi: { total: 0, processing: 0, finished: 0, finishRate: 0 } } |
|
|
|
return { loading: false, boardTimerId: null, tableHeight: 640, currentTime: '', timerId: null, boardList: [], kpi: { total: 0, processing: 0, finished: 0, finishRate: 0 } } |
|
|
|
}, |
|
|
|
mounted() { this.setTableHeight(); this.loadBoardData(); this.updateTime(); this.timerId = setInterval(this.updateTime, 1000); window.addEventListener('resize', this.setTableHeight) }, |
|
|
|
beforeDestroy() { if (this.timerId) clearInterval(this.timerId); window.removeEventListener('resize', this.setTableHeight) }, |
|
|
|
mounted() { this.setTableHeight(); this.loadBoardData(); this.updateTime(); this.timerId = setInterval(this.updateTime, 1000); |
|
|
|
// 看板数据10秒刷新一次 |
|
|
|
this.boardTimerId = setInterval(() => { |
|
|
|
this.loadBoardData() |
|
|
|
}, 10000) |
|
|
|
|
|
|
|
window.addEventListener('resize', this.setTableHeight) }, |
|
|
|
beforeDestroy() { if (this.timerId) clearInterval(this.timerId); |
|
|
|
if (this.boardTimerId) { |
|
|
|
clearInterval(this.boardTimerId) |
|
|
|
} |
|
|
|
window.removeEventListener('resize', this.setTableHeight) }, |
|
|
|
methods: { |
|
|
|
setTableHeight() { |
|
|
|
this.tableHeight = Math.max(420, window.innerHeight - 240) |
|
|
|
}, |
|
|
|
loadBoardData() { |
|
|
|
if (this.loading) return |
|
|
|
this.loading = true |
|
|
|
getRenovationOrderList({ page: 1, limit: 300 }).then(({data}) => { |
|
|
|
this.loading = false |
|
|
|
@ -94,17 +105,7 @@ export default { |
|
|
|
this.currentTime = `${d.format('YYYY/MM/DD')} ${weekList[now.getDay()]} ${d.format('HH:mm:ss')}` |
|
|
|
}, |
|
|
|
getMockList() { |
|
|
|
return [ |
|
|
|
{ projectNo: 'GZ-202603-001', buildingName: '虹桥大厦旧楼加装', elevatorType: '客梯', floors: 6, site: '上海', planFinishDate: '3月18日', status: '进行中', finishDate: '', nodeList: [{ nodeCode: 'stocking', status: '已完成' }, { nodeCode: 'assy', status: '进行中' }] }, |
|
|
|
{ projectNo: 'GZ-202603-002', buildingName: '东苑小区电梯更新', elevatorType: '载货梯', floors: 8, site: '苏州', planFinishDate: '3月22日', status: '已排产', finishDate: '', nodeList: [] }, |
|
|
|
{ projectNo: 'GZ-202603-003', buildingName: '金桥写字楼改造', elevatorType: '客梯', floors: 10, site: '杭州', planFinishDate: '3月16日', status: '已完成', finishDate: '3月15日', nodeList: NODE_TEMPLATE.map(code => ({ nodeCode: code, status: '已完成' })) }, |
|
|
|
{ projectNo: 'GZ-202603-003', buildingName: '金桥写字楼改造', elevatorType: '客梯', floors: 10, site: '杭州', planFinishDate: '3月16日', status: '已完成', finishDate: '3月15日', nodeList: NODE_TEMPLATE.map(code => ({ nodeCode: code, status: '已完成' })) }, |
|
|
|
{ projectNo: 'GZ-202603-004', buildingName: '长宁社区旧梯焕新', elevatorType: '客梯', floors: 7, site: '上海', planFinishDate: '3月20日', status: '进行中', finishDate: '', nodeList: [{ nodeCode: 'stocking', status: '已完成' }, { nodeCode: 'assy', status: '已完成' }, { nodeCode: 'inspect', status: '进行中' }] }, |
|
|
|
{ projectNo: 'GZ-202603-005', buildingName: '龙湖广场货梯升级', elevatorType: '载货梯', floors: 5, site: '南京', planFinishDate: '3月21日', status: '已排产', finishDate: '', nodeList: [] }, |
|
|
|
{ projectNo: 'GZ-202603-006', buildingName: '海棠苑住宅加装', elevatorType: '客梯', floors: 9, site: '无锡', planFinishDate: '3月23日', status: '进行中', finishDate: '', nodeList: [{ nodeCode: 'stocking', status: '已完成' }, { nodeCode: 'assy', status: '进行中' }] }, |
|
|
|
{ projectNo: 'GZ-202603-007', buildingName: '工业园卸货梯整改', elevatorType: '载货梯', floors: 4, site: '常州', planFinishDate: '3月24日', status: '已完成', finishDate: '3月23日', nodeList: NODE_TEMPLATE.map(code => ({ nodeCode: code, status: '已完成' })) }, |
|
|
|
{ projectNo: 'GZ-202603-008', buildingName: '世纪花园电梯改造', elevatorType: '客梯', floors: 11, site: '宁波', planFinishDate: '3月25日', status: '已排产', finishDate: '', nodeList: [{ nodeCode: 'stocking', status: '未开始' }] } |
|
|
|
] |
|
|
|
return [] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|