update 报表管理

Tento commit je obsažen v:
lb 2022-11-17 09:31:02 +08:00
rodič 4f4453045a
revize e5ed3b092c
2 změnil soubory, kde provedl 27 přidání a 7 odebrání

Zobrazit soubor

@ -73,9 +73,9 @@ const LifeRemainComponent = {
computed: {
statusColor() {
const colors = [
'rgba(255,84,76,0.6)', // red < 0
'#FFBD43', // yellow < 10
'rgba(142,254,83,0.6)' // green >= 10
'rgba(255,84,76,0.6)', // red < 10%
'#FFBD43', // yellow < 20%
'rgba(142,254,83,0.6)' // green
]
return this.injectData.remain < 0 ? colors[0] : this.injectData.remain < 10 ? colors[1] : colors[2]
}
@ -160,6 +160,8 @@ export const sparepartsProps = [
{ prop: 'location', label: '库位', align: 'center' }
]
// TODO: 2022.11.17 修改数据和剩余寿命组件
export const sparepartsDatalist = [
{ 'name': '激光打孔', 'eq': 'A2一次固化机', 'pl': 'C线', 'update_time': '2007-08-31 09:15:24', 'remain': -32, 'stock': 457, 'location': '库位74' },
{ 'name': '磨边单元', 'eq': 'B1一次冷却机', 'pl': 'C线', 'update_time': '2016-10-02 22:23:09', 'remain': -95, 'stock': 5600, 'location': '库位10' },

Zobrazit soubor

@ -27,14 +27,18 @@
<ul class="report-item__list">
<li v-if="!item.quantity">
<span class="icon icon-no-reports" />
<span>暂无报表</span>
<span style="color: #909090;">暂无报表</span>
</li>
<template v-else>
<li v-for="n in item.quantity" :key="n">
<li v-for="n in item.reportNames" :key="n">
<span class="icon" />
<span>{{ n }}</span>
</li>
<!-- <li v-for="n in item.quantity" :key="n">
<span class="icon" />
<span>报表{{ n }}</span>
</li>
</li> -->
</template>
</ul>
</div>
@ -212,7 +216,21 @@ export default {
init() {
list({}).then(res => {
this.allNum = 0
this.sortList = res.data
this.sortList = res.data.map(item => {
if (item.name === '能源') {
return { ...item, reportNames: ['产线电量日能耗统计'] }
} else if (item.name === '订单') {
return { ...item, reportNames: ['订单历史记录', '在线订单进度'] }
} else if (item.name === '设备') {
return { ...item, reportNames: ['设备报警', '设备加工数量统计', '设备OEE'] }
} else if (item.name === '人员') {
return { ...item, reportNames: ['班组加工数量统计'] }
} else if (item.name === '产线') {
return { ...item, reportNames: ['产线日产量统计', '产线历史产量记录'] }
} else {
return item
}
})
res.data.forEach(item => {
this.allNum += item.quantity
})