| | |
| | | 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 }) |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | export const packageProject = (params) => { |
| | | return request.download({ url: '/model/mpk/file/packageModel', params }) |
| | | // 超时时间两分钟 |
| | | return request.download({ url: '/model/mpk/file/packageModel', params, timeout: 2 * 60 * 1000 }) |
| | | } |
| | | |
| | | export const list = () => { |
| | | 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 }) |
| | | } |
| | |
| | | export interface MmPredictItemPageReqVO extends PageParam { |
| | | itemno?: string, |
| | | itemname?: string, |
| | | itemtypeid?: string, |
| | | modulename?: string, |
| | | } |
| | | |
| | | // 查询MmPredictItem列表 |
| | |
| | | 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); |
| | | } |
| | | |
| | | /** 搜索按钮操作 */ |
| | |
| | | class="!w-240px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="类型" prop="itemtypeid"> |
| | | <el-select |
| | | v-model="queryParams.itemtypeid" |
| | | placeholder="请选择" |
| | | clearable |
| | | class="!w-240px"> |
| | | <el-option |
| | | v-for="item in itemTypeList" |
| | | :key="item.id" |
| | | :label="item.itemtypename" |
| | | :value="item.id"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管网名称" prop="modulename"> |
| | | <el-input |
| | | v-model="queryParams.modulename" |
| | | placeholder="请输入管网名称" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | class="!w-240px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="handleQuery"> |
| | | <Icon icon="ep:search" class="mr-5px"/> |
| | |
| | | <dict-tag :type="DICT_TYPE.PRED_GRANULARITY" :value="scope.row.granularity" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="是否融合" align="center" prop="isfuse"> |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.COM_IS_INT" :value="scope.row.isfuse" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="是否检查" align="center" prop="workchecked"> |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.COM_IS_INT" :value="scope.row.workchecked" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="管网名称" align="center" prop="modulename" /> |
| | | <el-table-column label="是否启用" align="center" prop="status"> |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.COM_IS_INT" :value="scope.row.status" /> |
| | |
| | | <script lang="ts" setup> |
| | | import MmPredictItemForm from './MmPredictItemForm.vue' |
| | | import MmPredictItemChart from './MmPredictItemChart.vue' |
| | | import * as MmItemType from '@/api/model/pre/type' |
| | | import * as MmPredictItem from '@/api/model/pre/item' |
| | | import {DICT_TYPE} from "@/utils/dict"; |
| | | |
| | |
| | | const message = useMessage() // 消息弹窗 |
| | | const {t} = useI18n() // 国际化 |
| | | |
| | | const itemTypeList = ref([]) |
| | | const loading = ref(true) // 列表的加载中 |
| | | const total = ref(0) // 列表的总页数 |
| | | const list = ref([]) // 列表的数据 |
| | |
| | | pageSize: 10, |
| | | itemno: undefined, |
| | | itemname: undefined, |
| | | itemtypeid: undefined, |
| | | modulename: undefined, |
| | | }) |
| | | const isList = ref([ |
| | | { |
| | |
| | | /** 初始化 **/ |
| | | onMounted(async () => { |
| | | await getList() |
| | | // 获取预测项类型列表 |
| | | itemTypeList.value = await MmItemType.getItemTypeList() |
| | | }) |
| | | </script> |
| | |
| | | <ContentWrap> |
| | | <el-table v-loading="loading" :data="list"> |
| | | <el-table-column label="模型编号" align="center" prop="modelCode" min-width="100"/> |
| | | <el-table-column label="模型名称" align="center" prop="modelName" min-width="100"/> |
| | | <el-table-column label="模型类型" align="center" prop="modelType" min-width="100"/> |
| | | <el-table-column label="模型名称" header-align="center" align="left" prop="modelName" min-width="100"/> |
| | | <el-table-column label="模型类型" align="center" prop="modelType" min-width="100"> |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.SCHE_MODEL_TYPE" :value="scope.row.modelType" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="类名" header-align="center" align="left" prop="className" min-width="200"/> |
| | | <el-table-column label="方法名" align="center" prop="methodName" min-width="100"/> |
| | | <el-table-column label="参数数量" align="center" prop="portLength" min-width="100"/> |