ADD:导出检测计划检测结果;
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import type { Plan } from './interface'
|
import type {Plan} from './interface'
|
||||||
import http from '@/api'
|
import http from '@/api'
|
||||||
import type { ErrorSystem } from '../device/interface/error'
|
import type {ErrorSystem} from '../device/interface/error'
|
||||||
import type { Device } from '../device/interface/device'
|
import type {Device} from '../device/interface/device'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name 检测计划管理模块
|
* @name 检测计划管理模块
|
||||||
@@ -133,3 +133,9 @@ export const exportSubPlan = (params: Plan.ResPlan) => {
|
|||||||
export const importSubPlan = (params: Device.ReqPqDevParams) => {
|
export const importSubPlan = (params: Device.ReqPqDevParams) => {
|
||||||
return http.upload(`/adPlan/importSubPlan`, params)
|
return http.upload(`/adPlan/importSubPlan`, params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 导出计划检测结果数据
|
||||||
|
export const exportPlanCheckData = (params: Plan.ResPlan) => {
|
||||||
|
return http.download(`/adPlan/exportPlanCheckData?planId=${params.id}`)
|
||||||
|
}
|
||||||
@@ -53,8 +53,18 @@
|
|||||||
>
|
>
|
||||||
导出子计划元信息
|
导出子计划元信息
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" icon="Upload">导入检测结果</el-button>
|
<el-button
|
||||||
<el-button type="primary" icon="Box" v-if="!isTabPlanFather">数据合并</el-button>
|
type="primary"
|
||||||
|
icon="Download"
|
||||||
|
v-auth.plan="'import_subplan'"
|
||||||
|
@click="exportPlanCheckResultData"
|
||||||
|
>
|
||||||
|
导出检测结果
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" icon="Upload" v-auth.plan="'add_subplan'">导入检测结果</el-button>
|
||||||
|
<el-button type="primary" icon="Box" v-auth.plan="'add_subplan'" v-if="!isTabPlanFather">
|
||||||
|
数据合并
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
@@ -156,7 +166,7 @@ import PlanPopup from '@/views/plan/planList/components/planPopup.vue' // 导入
|
|||||||
import { Plan } from '@/api/plan/interface'
|
import { Plan } from '@/api/plan/interface'
|
||||||
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
|
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
|
||||||
import { ColumnProps, ProTableInstance, SearchRenderScope } from '@/components/ProTable/interface'
|
import { ColumnProps, ProTableInstance, SearchRenderScope } from '@/components/ProTable/interface'
|
||||||
import { deletePlan, exportSubPlan, getDevListByPlanId, subPlanBindDev } from '@/api/plan/plan'
|
import { deletePlan, exportPlanCheckData, exportSubPlan, getDevListByPlanId, subPlanBindDev } from '@/api/plan/plan'
|
||||||
import { Device } from '@/api/device/interface/device'
|
import { Device } from '@/api/device/interface/device'
|
||||||
import { useDictStore } from '@/stores/modules/dict'
|
import { useDictStore } from '@/stores/modules/dict'
|
||||||
import DevTransfer from '@/views/plan/planList/components/devTransfer.vue'
|
import DevTransfer from '@/views/plan/planList/components/devTransfer.vue'
|
||||||
@@ -583,6 +593,14 @@ const exportPlan = async () => {
|
|||||||
useDownload(exportSubPlan, `${subPlanFormContent.name}_子计划元信息`, params, false, '.zip')
|
useDownload(exportSubPlan, `${subPlanFormContent.name}_子计划元信息`, params, false, '.zip')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
const exportPlanCheckResultData = async () => {
|
||||||
|
const params = {
|
||||||
|
id: planFormContent.value.id
|
||||||
|
}
|
||||||
|
ElMessageBox.confirm(`确认导出${planFormContent.value.name}计划检测结果?`, '温馨提示', { type: 'warning' }).then(
|
||||||
|
() => useDownload(exportPlanCheckData, `${planFormContent.value.name}_计划检测结果`, params, false, '.zip')
|
||||||
|
)
|
||||||
|
}
|
||||||
defineExpose({ open, handleTableDataUpdate })
|
defineExpose({ open, handleTableDataUpdate })
|
||||||
|
|
||||||
interface ChildrenPlanProps {
|
interface ChildrenPlanProps {
|
||||||
|
|||||||
Reference in New Issue
Block a user