Forráskód Böngészése

qhse看板证书穿透

yanghao 5 napja
szülő
commit
5cd4ea8a42
1 módosított fájl, 20 hozzáadás és 2 törlés
  1. 20 2
      src/views/pms/fiveDailyReportSummary/index.vue

+ 20 - 2
src/views/pms/fiveDailyReportSummary/index.vue

@@ -74,6 +74,7 @@ const total = ref(0)
 const loading = ref(false)
 const summaryLoading = ref(false)
 const currentDeptName = ref('5号国')
+const selectedDeptType = ref('1')
 const cardStatistics = ref({
   cumulativeWorkingLayers: 0,
   totalDailyFuel: 0,
@@ -82,6 +83,8 @@ const cardStatistics = ref({
   utilizationRate: 0
 })
 
+const deptColumnLabel = computed(() => (selectedDeptType.value === '1' ? '项目部' : '队伍'))
+
 const syncQueryFromRoute = () => {
   const createTime = route.query.createTime
 
@@ -107,7 +110,13 @@ const loadList = useDebounceFn(async () => {
       deptId: query.value.deptId,
       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
   } finally {
     loading.value = false
@@ -149,6 +158,7 @@ function resetQuery() {
 
 function handleDeptNodeClick(node) {
   currentDeptName.value = node?.name || '5号国'
+  selectedDeptType.value = String(node?.type || '1')
   loadSummary()
   handleQuery()
 }
@@ -272,7 +282,15 @@ watch(
               show-border>
               <ZmTableColumn type="index" label="序号" :width="70" fixed="left" />
               <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"
                 :prop="column.prop"
                 :label="column.label"