UPDATE: 勾选被检设备下载检测结果数据等

This commit is contained in:
贾同学
2025-08-29 15:09:05 +08:00
parent a847419ab5
commit ddbaf5651a
4 changed files with 14 additions and 24 deletions

View File

@@ -136,8 +136,8 @@ export const importSubPlan = (params: Plan.ResPlan) => {
// 导出计划检测结果数据
export const exportPlanCheckData = (params: Plan.ResPlan) => {
return http.download(`/adPlan/exportPlanCheckData?planId=${params.id}&report=1`)
export const exportPlanCheckData = (params: any) => {
return http.download(`/adPlan/exportPlanCheckData?planId=${params.id}&devIds=${params.devIds}&report=${params.report}`)
}
// 导入子检测计划检测结果数据

View File

@@ -57,9 +57,10 @@
type="primary"
icon="Download"
v-auth.plan="'import_subplan'"
@click="exportPlanCheckResultData"
@click="exportPlanCheckResultData(scope.selectedListIds)"
:disabled="!scope.isSelected"
>
导出检测结果
数据下载
</el-button>
<el-button
v-auth.plan="'add_subplan'"
@@ -626,12 +627,16 @@ const exportPlan = async () => {
useDownload(exportSubPlan, `${subPlanFormContent.name}_子计划元信息`, params, false, '.zip')
)
}
const exportPlanCheckResultData = async () => {
const exportPlanCheckResultData = async (selectedListIds: string[]) => {
const params = {
id: planFormContent.value.id
id: planFormContent.value.id,
report: 1,
devIds: selectedListIds.join(',')
}
ElMessageBox.confirm(`确认导出${planFormContent.value.name}计划检测结果`, '温馨提示', { type: 'warning' }).then(
() => useDownload(exportPlanCheckData, `${planFormContent.value.name}_计划检测结果`, params, false, '.zip')
ElMessageBox.confirm(`确认下载【${planFormContent.value.name}】勾选的被检设备等信息`, '温馨提示', {
type: 'warning'
}).then(() =>
useDownload(exportPlanCheckData, `${planFormContent.value.name}_检测计划检测数据包`, params, false, '.zip')
)
}

View File

@@ -13,7 +13,6 @@
<el-col :span="10">
<el-form-item :label-width="110" label="名称" prop="name">
<el-input
:disabled="allDisabled"
v-model="formContent.name"
autocomplete="off"
maxlength="32"
@@ -360,7 +359,7 @@
</el-col>
</el-row>
</el-form>
<template #footer v-if="!allDisabled">
<template #footer>
<div class="dialog-footer">
<el-button @click="close()"> </el-button>
<el-button type="primary" @click="save()"> </el-button>
@@ -583,9 +582,6 @@ let dialogTitle = computed(() => {
} else if (titleType.value === 'add') {
return '新增检测计划'
} else {
if (formContent && formContent.importFlag === 1) {
return '检测计划信息'
}
return '编辑检测计划'
}
})

View File

@@ -65,7 +65,6 @@
<!-- 表格操作 -->
<template #operation="scope">
<el-button
v-if="scope.row.importFlag == 0"
type="primary"
v-auth.plan="'edit'"
link
@@ -74,16 +73,6 @@
>
编辑
</el-button>
<el-button
v-if="scope.row.importFlag == 1"
type="primary"
v-auth.plan="'edit'"
link
icon="View"
@click="openDialog('edit', scope.row)"
>
详情
</el-button>
<el-button type="primary" v-auth.plan="'delete'" link :icon="Delete" @click="handleDelete(scope.row)">
删除
</el-button>