|
@@ -74,6 +74,7 @@ const total = ref(0)
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
|
const summaryLoading = ref(false)
|
|
const summaryLoading = ref(false)
|
|
|
const currentDeptName = ref('5号国')
|
|
const currentDeptName = ref('5号国')
|
|
|
|
|
+const selectedDeptType = ref('1')
|
|
|
const cardStatistics = ref({
|
|
const cardStatistics = ref({
|
|
|
cumulativeWorkingLayers: 0,
|
|
cumulativeWorkingLayers: 0,
|
|
|
totalDailyFuel: 0,
|
|
totalDailyFuel: 0,
|
|
@@ -82,6 +83,8 @@ const cardStatistics = ref({
|
|
|
utilizationRate: 0
|
|
utilizationRate: 0
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+const deptColumnLabel = computed(() => (selectedDeptType.value === '1' ? '项目部' : '队伍'))
|
|
|
|
|
+
|
|
|
const syncQueryFromRoute = () => {
|
|
const syncQueryFromRoute = () => {
|
|
|
const createTime = route.query.createTime
|
|
const createTime = route.query.createTime
|
|
|
|
|
|
|
@@ -107,7 +110,13 @@ const loadList = useDebounceFn(async () => {
|
|
|
deptId: query.value.deptId,
|
|
deptId: query.value.deptId,
|
|
|
createTime: query.value.createTime
|
|
createTime: query.value.createTime
|
|
|
})
|
|
})
|
|
|
- list.value = data?.list ?? []
|
|
|
|
|
|
|
+ list.value = (data?.list ?? []).map((item) => ({
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ deptDisplayName:
|
|
|
|
|
+ selectedDeptType.value === '1'
|
|
|
|
|
+ ? item.projectDeptName || '-'
|
|
|
|
|
+ : item.teamName || item.projectDeptName || '-'
|
|
|
|
|
+ }))
|
|
|
total.value = data?.total ?? 0
|
|
total.value = data?.total ?? 0
|
|
|
} finally {
|
|
} finally {
|
|
|
loading.value = false
|
|
loading.value = false
|
|
@@ -149,6 +158,7 @@ function resetQuery() {
|
|
|
|
|
|
|
|
function handleDeptNodeClick(node) {
|
|
function handleDeptNodeClick(node) {
|
|
|
currentDeptName.value = node?.name || '5号国'
|
|
currentDeptName.value = node?.name || '5号国'
|
|
|
|
|
+ selectedDeptType.value = String(node?.type || '1')
|
|
|
loadSummary()
|
|
loadSummary()
|
|
|
handleQuery()
|
|
handleQuery()
|
|
|
}
|
|
}
|
|
@@ -272,7 +282,15 @@ watch(
|
|
|
show-border>
|
|
show-border>
|
|
|
<ZmTableColumn type="index" label="序号" :width="70" fixed="left" />
|
|
<ZmTableColumn type="index" label="序号" :width="70" fixed="left" />
|
|
|
<ZmTableColumn
|
|
<ZmTableColumn
|
|
|
- v-for="column in tableColumns"
|
|
|
|
|
|
|
+ prop="deptDisplayName"
|
|
|
|
|
+ :label="deptColumnLabel"
|
|
|
|
|
+ :min-width="180"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ cover-formatter
|
|
|
|
|
+ :real-value="(row) => formatCellValue(row, 'deptDisplayName')"
|
|
|
|
|
+ />
|
|
|
|
|
+ <ZmTableColumn
|
|
|
|
|
+ v-for="column in tableColumns.slice(1)"
|
|
|
:key="column.prop"
|
|
:key="column.prop"
|
|
|
:prop="column.prop"
|
|
:prop="column.prop"
|
|
|
:label="column.label"
|
|
:label="column.label"
|