UPDATE: 勾选被检设备下载检测结果数据等
This commit is contained in:
@@ -136,8 +136,8 @@ export const importSubPlan = (params: Plan.ResPlan) => {
|
|||||||
|
|
||||||
|
|
||||||
// 导出计划检测结果数据
|
// 导出计划检测结果数据
|
||||||
export const exportPlanCheckData = (params: Plan.ResPlan) => {
|
export const exportPlanCheckData = (params: any) => {
|
||||||
return http.download(`/adPlan/exportPlanCheckData?planId=${params.id}&report=1`)
|
return http.download(`/adPlan/exportPlanCheckData?planId=${params.id}&devIds=${params.devIds}&report=${params.report}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导入子检测计划检测结果数据
|
// 导入子检测计划检测结果数据
|
||||||
|
|||||||
@@ -57,9 +57,10 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="Download"
|
icon="Download"
|
||||||
v-auth.plan="'import_subplan'"
|
v-auth.plan="'import_subplan'"
|
||||||
@click="exportPlanCheckResultData"
|
@click="exportPlanCheckResultData(scope.selectedListIds)"
|
||||||
|
:disabled="!scope.isSelected"
|
||||||
>
|
>
|
||||||
导出检测结果
|
数据下载
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-auth.plan="'add_subplan'"
|
v-auth.plan="'add_subplan'"
|
||||||
@@ -626,12 +627,16 @@ const exportPlan = async () => {
|
|||||||
useDownload(exportSubPlan, `${subPlanFormContent.name}_子计划元信息`, params, false, '.zip')
|
useDownload(exportSubPlan, `${subPlanFormContent.name}_子计划元信息`, params, false, '.zip')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
const exportPlanCheckResultData = async () => {
|
const exportPlanCheckResultData = async (selectedListIds: string[]) => {
|
||||||
const params = {
|
const params = {
|
||||||
id: planFormContent.value.id
|
id: planFormContent.value.id,
|
||||||
|
report: 1,
|
||||||
|
devIds: selectedListIds.join(',')
|
||||||
}
|
}
|
||||||
ElMessageBox.confirm(`确认导出${planFormContent.value.name}计划检测结果?`, '温馨提示', { type: 'warning' }).then(
|
ElMessageBox.confirm(`确认下载【${planFormContent.value.name}】勾选的被检设备等信息?`, '温馨提示', {
|
||||||
() => useDownload(exportPlanCheckData, `${planFormContent.value.name}_计划检测结果`, params, false, '.zip')
|
type: 'warning'
|
||||||
|
}).then(() =>
|
||||||
|
useDownload(exportPlanCheckData, `${planFormContent.value.name}_检测计划检测数据包`, params, false, '.zip')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item :label-width="110" label="名称" prop="name">
|
<el-form-item :label-width="110" label="名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="allDisabled"
|
|
||||||
v-model="formContent.name"
|
v-model="formContent.name"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
maxlength="32"
|
maxlength="32"
|
||||||
@@ -360,7 +359,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer v-if="!allDisabled">
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="close()">取 消</el-button>
|
<el-button @click="close()">取 消</el-button>
|
||||||
<el-button type="primary" @click="save()">确 定</el-button>
|
<el-button type="primary" @click="save()">确 定</el-button>
|
||||||
@@ -583,9 +582,6 @@ let dialogTitle = computed(() => {
|
|||||||
} else if (titleType.value === 'add') {
|
} else if (titleType.value === 'add') {
|
||||||
return '新增检测计划'
|
return '新增检测计划'
|
||||||
} else {
|
} else {
|
||||||
if (formContent && formContent.importFlag === 1) {
|
|
||||||
return '检测计划信息'
|
|
||||||
}
|
|
||||||
return '编辑检测计划'
|
return '编辑检测计划'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -65,7 +65,6 @@
|
|||||||
<!-- 表格操作 -->
|
<!-- 表格操作 -->
|
||||||
<template #operation="scope">
|
<template #operation="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.importFlag == 0"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
v-auth.plan="'edit'"
|
v-auth.plan="'edit'"
|
||||||
link
|
link
|
||||||
@@ -74,16 +73,6 @@
|
|||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</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 type="primary" v-auth.plan="'delete'" link :icon="Delete" @click="handleDelete(scope.row)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user