|
@@ -1,5 +1,5 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { QhseMonthReportApi } from '@/api/pms/qhse'
|
|
|
|
|
|
|
+import { QhseMonthReportSummaryApi, QhseMonthReportApi } from '@/api/pms/qhse'
|
|
|
import { useTableComponents } from '@/components/ZmTable/useTableComponents'
|
|
import { useTableComponents } from '@/components/ZmTable/useTableComponents'
|
|
|
import QhseMonthReportPreviewDrawer from './preview-drawer.vue'
|
|
import QhseMonthReportPreviewDrawer from './preview-drawer.vue'
|
|
|
import type { QhseMonthReportItem, QhseMonthReportListItem } from './types'
|
|
import type { QhseMonthReportItem, QhseMonthReportListItem } from './types'
|
|
@@ -13,8 +13,7 @@ const currentId = ref<number>()
|
|
|
|
|
|
|
|
const queryFormRef = ref()
|
|
const queryFormRef = ref()
|
|
|
const queryParams = reactive({
|
|
const queryParams = reactive({
|
|
|
- title: '',
|
|
|
|
|
- createTime: undefined as string[] | undefined
|
|
|
|
|
|
|
+ yearMonths: ''
|
|
|
})
|
|
})
|
|
|
const pagination = reactive({
|
|
const pagination = reactive({
|
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
@@ -26,7 +25,7 @@ const { ZmTable, ZmTableColumn } = useTableComponents<QhseMonthReportListItem>()
|
|
|
async function getList() {
|
|
async function getList() {
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
try {
|
|
try {
|
|
|
- const res = await QhseMonthReportApi.getQhseMonthReportPage({
|
|
|
|
|
|
|
+ const res = await QhseMonthReportSummaryApi.getQhseMonthReportSummaryList({
|
|
|
...queryParams,
|
|
...queryParams,
|
|
|
pageNo: pagination.pageNo,
|
|
pageNo: pagination.pageNo,
|
|
|
pageSize: pagination.pageSize
|
|
pageSize: pagination.pageSize
|
|
@@ -49,7 +48,10 @@ function resetQuery() {
|
|
|
getList()
|
|
getList()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function handleView(row: QhseMonthReportItem) {
|
|
|
|
|
|
|
+async function handleView(row: QhseMonthReportItem) {
|
|
|
|
|
+ const res = await QhseMonthReportSummaryApi.getQhseMonthReportSummary({
|
|
|
|
|
+ yearMonths: row.yearMonths
|
|
|
|
|
+ })
|
|
|
currentId.value = row.id
|
|
currentId.value = row.id
|
|
|
visible.value = true
|
|
visible.value = true
|
|
|
}
|
|
}
|
|
@@ -85,17 +87,20 @@ onMounted(() => {
|
|
|
inline
|
|
inline
|
|
|
label-position="left"
|
|
label-position="left"
|
|
|
class="report-summary-query min-w-0 overflow-hidden rounded-lg bg-white p-4 shadow dark:bg-[#1d1e1f]">
|
|
class="report-summary-query min-w-0 overflow-hidden rounded-lg bg-white p-4 shadow dark:bg-[#1d1e1f]">
|
|
|
- <el-form-item label="月报标题" prop="title">
|
|
|
|
|
|
|
+ <!-- <el-form-item label="月报标题" prop="title">
|
|
|
<el-input v-model="queryParams.title" placeholder="请输入月报标题" clearable />
|
|
<el-input v-model="queryParams.title" placeholder="请输入月报标题" clearable />
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="创建日期" prop="createTime">
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="queryParams.createTime"
|
|
|
|
|
|
|
+ </el-form-item> -->
|
|
|
|
|
+ <el-form-item label="月报期次" prop="yearMonths">
|
|
|
|
|
+ <!-- <el-date-picker
|
|
|
|
|
+ v-model="queryParams.yearMonths"
|
|
|
type="daterange"
|
|
type="daterange"
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
+ range-separator="至"
|
|
|
start-placeholder="开始日期"
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
end-placeholder="结束日期"
|
|
|
- class="!w-300px" />
|
|
|
|
|
|
|
+ :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
|
|
+ :shortcuts="rangeShortcuts"
|
|
|
|
|
+ class="w-full!" /> -->
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="report-summary-query__actions">
|
|
<el-form-item class="report-summary-query__actions">
|
|
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
|
@@ -103,7 +108,8 @@ onMounted(() => {
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
- <div class="report-summary-data-panel bg-white dark:bg-[#1d1e1f] shadow rounded-lg flex flex-col p-4 min-h-0">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="report-summary-data-panel bg-white dark:bg-[#1d1e1f] shadow rounded-lg flex flex-col p-4 min-h-0">
|
|
|
<div class="flex-1 min-h-0 relative">
|
|
<div class="flex-1 min-h-0 relative">
|
|
|
<el-auto-resizer class="report-summary-table-view absolute">
|
|
<el-auto-resizer class="report-summary-table-view absolute">
|
|
|
<template #default="{ width, height }">
|
|
<template #default="{ width, height }">
|
|
@@ -114,14 +120,14 @@ onMounted(() => {
|
|
|
:max-height="height"
|
|
:max-height="height"
|
|
|
:height="height"
|
|
:height="height"
|
|
|
show-border>
|
|
show-border>
|
|
|
- <ZmTableColumn label="月报标题" prop="title" :min-width="260" />
|
|
|
|
|
- <ZmTableColumn label="工单填报人" prop="personName" width="160" />
|
|
|
|
|
- <ZmTableColumn
|
|
|
|
|
|
|
+ <ZmTableColumn label="月报期次" prop="yearMonths" />
|
|
|
|
|
+ <ZmTableColumn label="月报标题" prop="title" />
|
|
|
|
|
+ <!-- <ZmTableColumn
|
|
|
label="创建日期"
|
|
label="创建日期"
|
|
|
prop="createTime"
|
|
prop="createTime"
|
|
|
cover-formatter
|
|
cover-formatter
|
|
|
:real-value="({ createTime }) => formatDate(createTime)"
|
|
:real-value="({ createTime }) => formatDate(createTime)"
|
|
|
- width="160" />
|
|
|
|
|
|
|
+ width="160" /> -->
|
|
|
<ZmTableColumn label="操作" width="100" fixed="right">
|
|
<ZmTableColumn label="操作" width="100" fixed="right">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<el-button size="default" link type="success" @click="handleView(row)">
|
|
<el-button size="default" link type="success" @click="handleView(row)">
|
|
@@ -141,13 +147,10 @@ onMounted(() => {
|
|
|
<strong>{{ item.title || '-' }}</strong>
|
|
<strong>{{ item.title || '-' }}</strong>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="report-summary-card__field">
|
|
<div class="report-summary-card__field">
|
|
|
- <span>填报人</span>
|
|
|
|
|
- <strong>{{ item.personName || '-' }}</strong>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="report-summary-card__field">
|
|
|
|
|
- <span>创建日期</span>
|
|
|
|
|
- <strong>{{ formatDate(item.createTime) }}</strong>
|
|
|
|
|
|
|
+ <span>月报期次</span>
|
|
|
|
|
+ <strong>{{ item.yearMonths || '-' }}</strong>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
<div class="report-summary-card__actions">
|
|
<div class="report-summary-card__actions">
|
|
|
<el-button size="default" link type="success" @click="handleView(item)">
|
|
<el-button size="default" link type="success" @click="handleView(item)">
|
|
|
查看
|
|
查看
|