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