| | |
| | | </template> |
| | | |
| | | <script setup name="apsPartRouteStat"> |
| | | import { query,updateStat } from "@/api/apsPartRouteStat/apsPartRouteStat"; |
| | | import { query,updateStat } from "@/api/ApsPartRouteStat/ApsPartRouteStat"; |
| | | import { ref } from "vue"; |
| | | import * as XLSX from 'xlsx'; |
| | | |
| | |
| | | colList.push({ |
| | | field: 'dateCol', |
| | | title: '日期', |
| | | fixed: 'left', |
| | | children: [ |
| | | { field: `resourceName`, title: '资源组', width: 150}, |
| | | { field: `resourceName`, title: '资源组', width: 250, type: 'html'}, |
| | | ], |
| | | width: 160 |
| | | }) |
| | |
| | | children: [ |
| | | { field: `designTimes${colKey}`, title: '设计工时', width: 80}, |
| | | { field: `requireTimes${colKey}`, title: '需求工时', width: 80}, |
| | | { field: `capacityLoad${colKey}`, title: '产能负荷', width: 80}, |
| | | { field: `capacityLoad${colKey}`, title: '产能负荷', width: 80, type: 'html'}, |
| | | ], |
| | | width: 160 |
| | | }) |
| | |
| | | } |
| | | for (const [key, listValue] of Object.entries(mapItem)) { |
| | | data.push(key); |
| | | item[`resourceName`] = key; |
| | | |
| | | let tableKey = 0; |
| | | let flag = false; |
| | | listValue.forEach(listItem => { |
| | | |
| | | tableKey++ |
| | | item[`designTimes${tableKey}`] = listItem.designTimes; |
| | | item[`requireTimes${tableKey}`] = listItem.requireTimes; |
| | | item[`capacityLoad${tableKey}`] = listItem.capacityLoad+'%'; |
| | | item[`capacityLoad${tableKey}`] = listItem.capacityLoad > 100 ? `<font color="red">${listItem.capacityLoad}%</font>` :listItem.capacityLoad+'%'; |
| | | data.push(listItem.designTimes); |
| | | data.push(listItem.requireTimes); |
| | | data.push(listItem.capacityLoad+'%'); |
| | | if (listItem.capacityLoad > 100) { |
| | | flag = true; |
| | | } |
| | | }); |
| | | |
| | | item[`resourceName`] = flag ? `<div class='el-badge'><sup class="el-badge__content is-fixed is-dot"></sup>${key}</div>` : key; |
| | | } |
| | | exportData.value.push(data); |
| | | dataList.push(item); |