Merge remote-tracking branch 'origin/master'
| | |
| | | import request from '@/config/axios' |
| | | |
| | | export const getPage = async (params: PageParam) => { |
| | | export const getPage = async (params) => { |
| | | return await request.get({ url: '/model/mpk/project/page', params }) |
| | | } |
| | | |
| | |
| | | return request.get({ url: '/model/mpk/project/list'}) |
| | | } |
| | | |
| | | export const getProjectModel = async (params: PageParam) => { |
| | | export const getProjectModel = async (params) => { |
| | | return await request.get({ url: '/model/mpk/project/getProjectModel', params }) |
| | | } |
| | |
| | | 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' |
| | | } |
| | |
| | | import ProjectForm from './ProjectForm.vue' |
| | | import ProjectPackage from './ProjectPackage.vue' |
| | | import RelevanceModel from './ProjectPackageModelDialog.vue' |
| | | import * as projectApi from "@/api/model/mpk/project"; |
| | | |
| | | defineOptions({name: 'MpkProject'}) |
| | | |
| | |
| | | const handleCommand = (command: string, row) => { |
| | | switch (command) { |
| | | case 'packageModel': |
| | | packageModel(row.id, row.projectName, row.projectCode, row.models) |
| | | packageModel(row.id, row.projectName, row.projectCode) |
| | | break |
| | | default: |
| | | break |
| | |
| | | |
| | | //打包 |
| | | const projectPackageRef = ref(); |
| | | const packageModel = (projectId, projectName, projectCode, models) => { |
| | | let ids = models.map(e => e.id); |
| | | if (ids && ids.length > 0) { |
| | | projectPackageRef.value.open(projectId, projectName, projectCode, ids.join(",")); |
| | | } else { |
| | | const packageModel = async (projectId, projectName, projectCode) => { |
| | | //校验是否关联模型 |
| | | const data = await projectApi.getProjectModel({page: 1, pageSize: 1, projectId: projectId}) |
| | | if (data.total === 0) { |
| | | message.error("请先为项目添加模型!") |
| | | return |
| | | } |
| | | projectPackageRef.value.open(projectId, projectName, projectCode); |
| | | } |
| | | |
| | | /** 搜索按钮操作 */ |