|
@@ -5,6 +5,7 @@ import { useDebounceFn } from '@vueuse/core'
|
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
|
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
|
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
|
|
+import { resolveDailyReportDeptId } from '@/utils/dailyReportDept'
|
|
|
import download from '@/utils/download'
|
|
import download from '@/utils/download'
|
|
|
|
|
|
|
|
defineOptions({ name: 'DailyReport' })
|
|
defineOptions({ name: 'DailyReport' })
|
|
@@ -268,7 +269,8 @@ function rowClassName(data: { row: List; rowIndex: number }) {
|
|
|
return ''
|
|
return ''
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const id = useUserStore().getUser.deptId ?? 157
|
|
|
|
|
|
|
+const TOP_DEPT_ID = 163
|
|
|
|
|
+const id = resolveDailyReportDeptId(useUserStore().getUser.deptId, TOP_DEPT_ID)
|
|
|
|
|
|
|
|
const deptId = id
|
|
const deptId = id
|
|
|
|
|
|
|
@@ -291,6 +293,14 @@ const query = ref<Query>({
|
|
|
]
|
|
]
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+const taskName = computed({
|
|
|
|
|
+ get: () => query.value.taskName,
|
|
|
|
|
+ set: (value: string | undefined) => {
|
|
|
|
|
+ query.value.taskName = value
|
|
|
|
|
+ query.value.wellName = value
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
function handleSizeChange(val: number) {
|
|
function handleSizeChange(val: number) {
|
|
|
query.value.pageSize = val
|
|
query.value.pageSize = val
|
|
|
handleQuery()
|
|
handleQuery()
|
|
@@ -342,9 +352,10 @@ function resetQuery() {
|
|
|
query.value = {
|
|
query.value = {
|
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
- deptId: 157,
|
|
|
|
|
|
|
+ deptId: id,
|
|
|
contractName: '',
|
|
contractName: '',
|
|
|
taskName: '',
|
|
taskName: '',
|
|
|
|
|
+ wellName: '',
|
|
|
createTime: [
|
|
createTime: [
|
|
|
...rangeShortcuts[2].value().map((item) => dayjs(item).format('YYYY-MM-DD HH:mm:ss'))
|
|
...rangeShortcuts[2].value().map((item) => dayjs(item).format('YYYY-MM-DD HH:mm:ss'))
|
|
|
]
|
|
]
|
|
@@ -390,12 +401,10 @@ const handleExport = () => {
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
<div
|
|
<div
|
|
|
- class="daily-report-page grid grid-cols-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ class="daily-report-page grid grid-cols-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
|
|
|
<el-form
|
|
<el-form
|
|
|
size="default"
|
|
size="default"
|
|
|
- class="col-span-2 bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-8 gap-8 flex items-center"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ class="col-span-2 bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-8 gap-8 flex items-center">
|
|
|
<div class="flex items-center gap-8">
|
|
<div class="flex items-center gap-8">
|
|
|
<el-segmented class="h-12" v-model="tab" :options="tabOptions" @change="handleQuery()" />
|
|
<el-segmented class="h-12" v-model="tab" :options="tabOptions" @change="handleQuery()" />
|
|
|
</div>
|
|
</div>
|
|
@@ -406,17 +415,15 @@ const handleExport = () => {
|
|
|
placeholder="请输入项目"
|
|
placeholder="请输入项目"
|
|
|
clearable
|
|
clearable
|
|
|
@keyup.enter="handleQuery()"
|
|
@keyup.enter="handleQuery()"
|
|
|
- class="!w-240px"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="!w-240px" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item v-show="tab !== '井'" label="任务">
|
|
<el-form-item v-show="tab !== '井'" label="任务">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="query.taskName"
|
|
|
|
|
|
|
+ v-model="taskName"
|
|
|
placeholder="请输入任务"
|
|
placeholder="请输入任务"
|
|
|
clearable
|
|
clearable
|
|
|
@keyup.enter="handleQuery()"
|
|
@keyup.enter="handleQuery()"
|
|
|
- class="!w-240px"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="!w-240px" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="创建时间">
|
|
<el-form-item label="创建时间">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
@@ -427,8 +434,7 @@ const handleExport = () => {
|
|
|
end-placeholder="结束日期"
|
|
end-placeholder="结束日期"
|
|
|
:shortcuts="rangeShortcuts"
|
|
:shortcuts="rangeShortcuts"
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
- class="!w-220px"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="!w-220px" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
<el-form-item class="ml-auto">
|
|
<el-form-item class="ml-auto">
|
|
@@ -445,25 +451,23 @@ const handleExport = () => {
|
|
|
<!-- 第二行左侧:自动落入第 2 行第 1 列 -->
|
|
<!-- 第二行左侧:自动落入第 2 行第 1 列 -->
|
|
|
<DeptTreeSelect
|
|
<DeptTreeSelect
|
|
|
v-show="tab === '队伍'"
|
|
v-show="tab === '队伍'"
|
|
|
- :top-id="163"
|
|
|
|
|
- :deptId="deptId"
|
|
|
|
|
|
|
+ :top-id="TOP_DEPT_ID"
|
|
|
|
|
+ :dept-id="deptId"
|
|
|
v-model="query.deptId"
|
|
v-model="query.deptId"
|
|
|
|
|
+ :init-select="false"
|
|
|
title="队伍"
|
|
title="队伍"
|
|
|
- class="daily-report-side"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="daily-report-side" />
|
|
|
<WellSelect
|
|
<WellSelect
|
|
|
v-show="tab === '井'"
|
|
v-show="tab === '井'"
|
|
|
- :deptId="163"
|
|
|
|
|
- v-model="query.wellName"
|
|
|
|
|
|
|
+ :dept-id="deptId"
|
|
|
|
|
+ v-model="taskName"
|
|
|
v-model:contract-name="query.contractName"
|
|
v-model:contract-name="query.contractName"
|
|
|
- class="daily-report-side"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="daily-report-side" />
|
|
|
<!-- <div class="p-4 bg-white dark:bg-[#1d1e1f] shadow rounded-lg h-full"> </div> -->
|
|
<!-- <div class="p-4 bg-white dark:bg-[#1d1e1f] shadow rounded-lg h-full"> </div> -->
|
|
|
|
|
|
|
|
<!-- 第二行右侧:自动落入第 2 行第 2 列 -->
|
|
<!-- 第二行右侧:自动落入第 2 行第 2 列 -->
|
|
|
<div
|
|
<div
|
|
|
- class="daily-report-table-card bg-white dark:bg-[#1d1e1f] shadow rounded-lg p-4 flex flex-col min-h-0"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ class="daily-report-table-card bg-white dark:bg-[#1d1e1f] shadow rounded-lg p-4 flex flex-col min-h-0">
|
|
|
<div class="flex-1 relative min-h-0">
|
|
<div class="flex-1 relative min-h-0">
|
|
|
<el-auto-resizer class="absolute">
|
|
<el-auto-resizer class="absolute">
|
|
|
<template #default="{ width, height }">
|
|
<template #default="{ width, height }">
|
|
@@ -481,13 +485,11 @@ const handleExport = () => {
|
|
|
row-key="id"
|
|
row-key="id"
|
|
|
scrollbar-always-on
|
|
scrollbar-always-on
|
|
|
:expand-row-keys="expandRowKeys"
|
|
:expand-row-keys="expandRowKeys"
|
|
|
- border
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ border>
|
|
|
<el-table-column type="expand" fixed="left">
|
|
<el-table-column type="expand" fixed="left">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<div
|
|
<div
|
|
|
- class="flex items-center gap-8 h-10 px-14 sticky left-0 w-fit box-border bg-[var(--el-bg-color)]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ class="flex items-center gap-8 h-10 px-14 sticky left-0 w-fit box-border bg-[var(--el-bg-color)]">
|
|
|
<el-tag>桥塞: {{ row.groupIdBridgePlug }} </el-tag>
|
|
<el-tag>桥塞: {{ row.groupIdBridgePlug }} </el-tag>
|
|
|
<el-tag>趟数: {{ row.groupIdRunCount }} </el-tag>
|
|
<el-tag>趟数: {{ row.groupIdRunCount }} </el-tag>
|
|
|
<el-tag>井数: {{ row.groupIdCumulativeWorkingWell }} </el-tag>
|
|
<el-tag>井数: {{ row.groupIdCumulativeWorkingWell }} </el-tag>
|
|
@@ -531,8 +533,7 @@ const handleExport = () => {
|
|
|
:total="total"
|
|
:total="total"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
@size-change="handleSizeChange"
|
|
@size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|