| | |
| | | <el-form |
| | | ref="formRef" |
| | | v-loading="formLoading" |
| | | element-loading-text="打包时间较长,请耐心等待" |
| | | :model="formData" |
| | | :rules="formRules" |
| | | label-width="80px" |
| | |
| | | </Dialog> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import * as ProjectApi from '@/api/mpk/project' |
| | | import * as ProjectApi from '@/api/model/mpk/project' |
| | | import download from "@/utils/download"; |
| | | import {FormRules} from "element-plus"; |
| | | import {formatToDateString} from "@/utils/dateUtil"; |
| | |
| | | projectId: undefined, |
| | | projectName: undefined, |
| | | projectCode: undefined, |
| | | ids: undefined, |
| | | version: undefined, |
| | | }) |
| | | |
| | | /** 打开弹窗 */ |
| | | const open = async (projectId,projectName,projectCode,ids) => { |
| | | const open = async (projectId,projectName,projectCode) => { |
| | | dialogVisible.value = true |
| | | formData.projectId = projectId |
| | | formData.projectName = projectName |
| | | formData.projectCode = projectCode |
| | | formData.ids = ids |
| | | formData.log = undefined |
| | | formData.version = 'V' |
| | | } |
| | |
| | | formLoading.value = true |
| | | formData.zipFileName = 'IAILMPK.' + formData.projectCode + '.' + formatToDateString(new Date()) + '.zip' |
| | | const data = await ProjectApi.packageProject(formData) |
| | | debugger |
| | | download.zip(data, formData.zipFileName) |
| | | formLoading.value = false |
| | | dialogVisible.value = false |