|
|
@@ -5,6 +5,7 @@ import type { Ref } from 'vue'
|
|
|
|
|
|
interface RdProductionBriefRow {
|
|
|
id?: number
|
|
|
+ deptId?: number
|
|
|
projectName?: string
|
|
|
deptName?: string
|
|
|
rdStatusLabel?: string
|
|
|
@@ -39,6 +40,7 @@ const props = withDefaults(
|
|
|
const selectedDate = ref(DEFAULT_DATE)
|
|
|
const loading = ref(false)
|
|
|
const list = ref<RdProductionBriefRow[]>([])
|
|
|
+const router = useRouter()
|
|
|
const kbScale = inject<Ref<number>>('rdKbScale', ref(1))
|
|
|
const tableHeight = computed<number | string>(() =>
|
|
|
props.pageMode === 'full' ? '100%' : Math.round(TABLE_HEIGHT * kbScale.value)
|
|
|
@@ -120,6 +122,20 @@ function handleDateChange() {
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
+function handleRowClick(row: RdProductionBriefRow) {
|
|
|
+ const query: Record<string, string | number | string[]> = {
|
|
|
+ createTime: getCreateTimeRange()
|
|
|
+ }
|
|
|
+
|
|
|
+ if (row.deptId) query.deptId = row.deptId
|
|
|
+ if (row.taskName) query.taskName = row.taskName
|
|
|
+
|
|
|
+ router.push({
|
|
|
+ name: 'IotRdDailyReport',
|
|
|
+ query
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
async function getList() {
|
|
|
loading.value = true
|
|
|
|
|
|
@@ -175,7 +191,8 @@ onMounted(() => {
|
|
|
element-loading-background="rgb(222 236 252 / 72%)"
|
|
|
border
|
|
|
class="device-list-table production-brief-table"
|
|
|
- :class="{ 'device-list-table--full': props.pageMode === 'full' }">
|
|
|
+ :class="{ 'device-list-table--full': props.pageMode === 'full' }"
|
|
|
+ @row-click="handleRowClick">
|
|
|
<el-table-column prop="projectName" label="项目" min-width="150" align="center">
|
|
|
<template #default="{ row }">
|
|
|
{{ formatText(row.projectName) }}
|
|
|
@@ -300,6 +317,10 @@ onMounted(() => {
|
|
|
background: #b8cee5;
|
|
|
}
|
|
|
|
|
|
+ :deep(.el-table__body tr) {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
:deep(.el-table__row:hover > td.el-table__cell) {
|
|
|
background: #75a5d6 !important;
|
|
|
}
|