|
|
@@ -2,7 +2,6 @@
|
|
|
import { IotStatApi } from '@/api/pms/stat'
|
|
|
import { rangeShortcuts } from '@/utils/formatTime'
|
|
|
import dayjs from 'dayjs'
|
|
|
-import type { Ref } from 'vue'
|
|
|
|
|
|
interface RhDeviceListRow {
|
|
|
projectDeptId: number
|
|
|
@@ -22,7 +21,6 @@ interface RhTeamRateRow {
|
|
|
utilizationRate: number
|
|
|
}
|
|
|
|
|
|
-const TABLE_HEIGHT = 220
|
|
|
const TEAM_TABLE_HEIGHT = 500
|
|
|
const DEFAULT_TIME_RANGE = rangeShortcuts[2]
|
|
|
.value()
|
|
|
@@ -35,10 +33,9 @@ const teamDialogVisible = ref(false)
|
|
|
const teamLoading = ref(false)
|
|
|
const currentProjectDeptName = ref('')
|
|
|
const teamList = ref<RhTeamRateRow[]>([])
|
|
|
-const kbScale = inject<Ref<number>>('ryKbScale', ref(1))
|
|
|
|
|
|
const tableData = computed(() => list.value)
|
|
|
-const tableHeight = computed(() => Math.round(TABLE_HEIGHT * kbScale.value))
|
|
|
+const tableHeight = '100%'
|
|
|
|
|
|
function formatRate(value?: number | null) {
|
|
|
return `${(Number(value ?? 0) * 100).toFixed(2)}%`
|
|
|
@@ -120,22 +117,22 @@ onMounted(() => {
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- v-loading="loading" -->
|
|
|
- <div class="device-list-panel__body flex-1 min-h-0">
|
|
|
+ <div class="device-list-panel__body flex flex-col flex-1 min-h-0">
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
:height="tableHeight"
|
|
|
class="device-list-table"
|
|
|
@row-click="handleRowClick">
|
|
|
- <el-table-column prop="projectDeptName" label="项目部" min-width="150" align="center" />
|
|
|
- <el-table-column prop="teamCount" label="队伍数量" min-width="88" align="center" />
|
|
|
- <el-table-column prop="cumulativeDays" label="累计天数" min-width="92" align="center" />
|
|
|
- <el-table-column prop="constructionDays" label="施工天数" min-width="92" align="center" />
|
|
|
+ <el-table-column prop="projectDeptName" label="项目部" align="center" />
|
|
|
+ <el-table-column prop="teamCount" label="队伍数量" width="72" align="center" />
|
|
|
+ <el-table-column prop="cumulativeDays" label="累计天数" width="72" align="center" />
|
|
|
+ <el-table-column prop="constructionDays" label="施工天数" width="72" align="center" />
|
|
|
<!-- <el-table-column label="注气量(万方)" min-width="150" align="center">
|
|
|
<template #default="{ row }">
|
|
|
{{ formatGasInjection(row.gasInjection) }}
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column label="设备利用率" min-width="110" align="center">
|
|
|
+ <el-table-column label="设备利用率" align="center">
|
|
|
<template #default="{ row }">
|
|
|
{{ formatRate(row.utilizationRate) }}
|
|
|
</template>
|
|
|
@@ -185,12 +182,12 @@ onMounted(() => {
|
|
|
|
|
|
.ry-device-list-panel__picker {
|
|
|
display: flex;
|
|
|
- width: calc(220px * var(--kb-scale, 1));
|
|
|
+ width: calc(260px * var(--kb-scale, 1));
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.ry-device-list-panel__picker-input {
|
|
|
- width: calc(220px * var(--kb-scale, 1)) !important;
|
|
|
+ width: calc(260px * var(--kb-scale, 1)) !important;
|
|
|
|
|
|
:deep(.el-input__wrapper) {
|
|
|
min-height: calc(28px * var(--kb-scale, 1));
|