微调
This commit is contained in:
@@ -156,12 +156,12 @@
|
||||
归档
|
||||
</el-button>
|
||||
<!-- 数据操作模式下的功能 -->
|
||||
<div v-if="form.activeTabs === 5" style="overflow-x: auto;width: 260px; display: flex; justify-content: center;align-items: center;">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="PieChart"
|
||||
@click="openDrawer('检测数据查询', scope.row)"
|
||||
v-if="form.activeTabs === 5"
|
||||
>
|
||||
检测数据查询
|
||||
</el-button>
|
||||
@@ -171,10 +171,10 @@
|
||||
link
|
||||
icon="Switch"
|
||||
@click="openDrawer('误差体系更换', scope.row)"
|
||||
v-if="form.activeTabs === 5"
|
||||
>
|
||||
误差体系更换
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</ProTable>
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
:append-to-body="true"
|
||||
/>
|
||||
<!-- 报告生成弹框 -->
|
||||
<ReportResultPopup ref="reportPopup" @reportGenerated="handleReportGenerated"></ReportResultPopup>
|
||||
<ReportResultPopup ref="reportPopup"></ReportResultPopup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -204,8 +204,7 @@ import { onBeforeMount, onMounted, type PropType, reactive, ref, watch } from 'v
|
||||
import {type Action, ElMessage, ElMessageBox} from 'element-plus'
|
||||
import TestPopup from './testPopup.vue'
|
||||
import dataCheckPopup from './dataCheckSingleChannelSingleTestPopup.vue'
|
||||
import CompareDataCheckSingleChannelSingleTestPopup
|
||||
from '@/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue'
|
||||
import CompareDataCheckSingleChannelSingleTestPopup from '@/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue'
|
||||
import ProTable from '@/components/ProTable/index.vue'
|
||||
import SelectTestItemPopup from '@/views/home/components/selectTestItemPopup.vue'
|
||||
import WriteTHPopup from '@/views/home/components/writeTHPopup.vue'
|
||||
@@ -214,13 +213,13 @@ import { type Device } from '@/api/device/interface/device'
|
||||
import {type ColumnProps, type ProTableInstance} from '@/components/ProTable/interface'
|
||||
import {type Plan} from '@/api/plan/interface'
|
||||
import {type StandardDevice} from '@/api/device/interface/standardDevice'
|
||||
import { downloadDevData, downloadDevDataWithHeaders, generateDevReport, getBoundPqDevList } from '@/api/plan/plan'
|
||||
import {downloadDevData, generateDevReport, getBoundPqDevList} from '@/api/plan/plan'
|
||||
import {getPqDev} from '@/api/device/device'
|
||||
import {useAppSceneStore, useModeStore} from '@/stores/modules/mode' // 引入模式 store
|
||||
import {useCheckStore} from '@/stores/modules/check'
|
||||
import {CheckData} from '@/api/check/interface'
|
||||
import {useAuthStore} from '@/stores/modules/auth'
|
||||
import { useDownload, useDownloadWithServerFileName } from '@/hooks/useDownload'
|
||||
import {useDownload} from '@/hooks/useDownload'
|
||||
import {documentedPqDev} from '@/api/device/report'
|
||||
import {ResultEnum} from '@/enums/httpEnum'
|
||||
import {getPqMonList} from '@/api/device/monitor/index.ts'
|
||||
@@ -1033,7 +1032,6 @@ const openDrawer = async (title: string, row: any) => {
|
||||
// 单个设备报告生成
|
||||
if (title === '报告生成') {
|
||||
if (modeStore.currentMode == '比对式') {
|
||||
console.log(row)
|
||||
reportPopup.value?.open(row)
|
||||
} else {
|
||||
await generateDevReport({
|
||||
@@ -1050,9 +1048,9 @@ const openDrawer = async (title: string, row: any) => {
|
||||
}
|
||||
|
||||
if (title === '报告下载') {
|
||||
await useDownloadWithServerFileName(
|
||||
downloadDevDataWithHeaders,
|
||||
row.createId, // 备用文件名
|
||||
await useDownload(
|
||||
downloadDevData,
|
||||
row.createId,
|
||||
{
|
||||
planId: checkStore.plan.id,
|
||||
devId: row.id
|
||||
@@ -1122,11 +1120,6 @@ const handleQuitClicked = () => {
|
||||
emit('batchGenerateClicked') // 触发事件
|
||||
}
|
||||
|
||||
// 处理报告生成完成事件
|
||||
const handleReportGenerated = () => {
|
||||
emit('batchGenerateClicked') // 触发事件通知父组件刷新数据
|
||||
}
|
||||
|
||||
defineExpose({changeActiveTabs})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user