Browse Source

pms 瑞都 日报 汇总页面跳转穿透

zhangcl 2 days ago
parent
commit
6f1cc9b9a0

+ 16 - 7
src/views/pms/iotrddailyreport/index.vue

@@ -65,6 +65,13 @@
   <ContentWrap ref="tableContainerRef">
     <el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
       <el-table-column label="主键id" align="center" prop="id" v-if="false"/>
+      <el-table-column
+        label="创建时间"
+        align="center"
+        prop="createTime"
+        :formatter="dateFormatter"
+        :width="columnWidths.createTime"
+      />
       <el-table-column label="施工队伍" align="center" prop="deptName" :width="columnWidths.deptName"/>
       <el-table-column label="项目" align="center" prop="contractName" :width="columnWidths.contractName"/>
       <el-table-column label="任务" align="center" prop="taskName" :width="columnWidths.taskName"/>
@@ -108,13 +115,7 @@
       <el-table-column label="外租设备" align="center" prop="externalRental" :width="columnWidths.externalRental"/>
       <el-table-column label="故障情况" align="center" prop="malfunction" :width="columnWidths.malfunction"/>
       <el-table-column label="故障误工H" align="center" prop="faultDowntime" :width="columnWidths.faultDowntime"/>
-      <el-table-column
-        label="创建时间"
-        align="center"
-        prop="createTime"
-        :formatter="dateFormatter"
-        :width="columnWidths.createTime"
-      />
+
       <el-table-column label="操作" align="center" min-width="120px" fixed="right">
         <template #default="scope">
           <el-button
@@ -156,6 +157,7 @@ import download from '@/utils/download'
 import { IotRdDailyReportApi, IotRdDailyReportVO } from '@/api/pms/iotrddailyreport'
 import IotRdDailyReportForm from './IotRdDailyReportForm.vue'
 import {DICT_TYPE} from "@/utils/dict";
+import { useRoute } from 'vue-router'
 
 
 /** 瑞都日报 列表 */
@@ -167,6 +169,9 @@ const { push } = useRouter() // 路由跳转
 const loading = ref(true) // 列表的加载中
 const list = ref<IotRdDailyReportVO[]>([]) // 列表的数据
 const total = ref(0) // 列表的总页数
+
+const route = useRoute() // 路由信息
+
 const queryParams = reactive({
   pageNo: 1,
   pageSize: 10,
@@ -437,6 +442,10 @@ let resizeObserver: ResizeObserver | null = null;
 
 /** 初始化 **/
 onMounted(() => {
+  // 检查是否有路由参数传递过来的 wellName
+  if (route.query.wellName) {
+    queryParams.taskName = route.query.wellName as string
+  }
   getList()
   // 创建 ResizeObserver 监听表格容器尺寸变化
   if (tableContainerRef.value?.$el) {

+ 24 - 1
src/views/pms/iotrddailyreport/statistics.vue

@@ -67,7 +67,17 @@
       <el-table-column label="项目部" align="center" prop="projectDeptName" :width="columnWidths.projectDeptName"/>
       <el-table-column label="队伍" align="center" prop="deptName" :width="columnWidths.deptName"/>
       <el-table-column label="甲方" align="center" prop="manufactureName" :width="columnWidths.manufactureName"/>
-      <el-table-column label="井号" align="center" prop="wellName" :width="columnWidths.wellName"/>
+      <el-table-column label="井号" align="center" prop="wellName" :width="columnWidths.wellName">
+        <template #default="scope">
+          <el-link
+            type="primary"
+            @click="handleWellNameClick(scope.row.wellName)"
+            :underline="false"
+          >
+            {{ scope.row.wellName }}
+          </el-link>
+        </template>
+      </el-table-column>
       <el-table-column label="工艺" align="center" prop="techniques" :width="columnWidths.techniques"/>
       <el-table-column label="总工作量" align="center" prop="workloadDesign" :width="columnWidths.workloadDesign"/>
       <!-- 已完成工作量分组列 -->
@@ -318,6 +328,19 @@ const getList = async () => {
   }
 }
 
+/** 井号点击操作 */
+const handleWellNameClick = (wellName: string) => {
+  if (!wellName) return
+
+  // 跳转到日报列表页面,传递井号参数
+  push({
+    name: 'IotRdDailyReport',
+    query: {
+      wellName: wellName
+    }
+  })
+}
+
 /** 搜索按钮操作 */
 const handleQuery = () => {
   queryParams.pageNo = 1