2024-12-05 | houzhongjian | |
2024-12-05 | dengzedong | |
2024-12-05 | dengzedong | |
2024-12-05 | dengzedong |
.env.prod
@@ -1,15 +1,15 @@ # 生产环境:只在打包时使用 # 测试环境:只在打包时使用 NODE_ENV=production VITE_DEV=false # 请求路径 VITE_BASE_URL='http://localhost:48080' VITE_BASE_URL='http://10.88.4.131' # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务 VITE_UPLOAD_TYPE=server # 上传路径 VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' VITE_UPLOAD_URL='http://10.88.4.131/admin-api/infra/file/upload' # 接口地址 VITE_API_URL=/admin-api @@ -24,10 +24,16 @@ VITE_SOURCEMAP=false # 打包路径 VITE_BASE_PATH=/ VITE_BASE_PATH=/plat # 数据采集服务所在服务器,映射截图图片用 VITE_VIDEO_CAMERA_DOMAIN='10.88.4.131' # 输出路径 VITE_OUT_DIR=dist-prod VITE_OUT_DIR=dist # 商城H5会员端域名 VITE_MALL_H5_DOMAIN='http://' # 公共静态文件路径 VITE_STATIC_DIR=/plat/ # 验证码的开关 VITE_APP_CAPTCHA_ENABLE=false src/api/login/index.ts
@@ -42,10 +42,10 @@ return request.get({ url: '/system/auth/get-permission-info' }) } // 获取用应用户权限信息 export const getUserAppInfo = (id: number) => { return request.get({ url: '/system/auth/get-app-permission-info?id=' + id }) } // // 获取用应用户权限信息 // export const getUserAppInfo = (id: number) => { // return request.get({ url: '/system/auth/get-app-permission-info?id=' + id }) // } //获取登录验证码 export const sendSmsCode = (data: SmsCodeVO) => { src/api/model/mpk/mpk.ts
@@ -42,8 +42,8 @@ return request.post({ url: '/model/mpk/api/test', data: params }) } export const list = () => { return request.get({ url: '/model/mpk/file/list'}) export const list = (params) => { return request.get({ url: '/model/mpk/file/list', params}) } export const publish = (params) => { src/layout/components/Logo/src/Logo.vue
@@ -7,8 +7,11 @@ import {isRelogin} from "@/config/axios/service"; import router from "@/router"; import type {RouteRecordRaw} from "vue-router"; import {CACHE_KEY, useCache} from "@/hooks/web/useCache"; import {CACHE_KEY, useCache, useSessionCache} from "@/hooks/web/useCache"; import {getAccessToken} from "@/utils/auth"; import {getInfo} from "@/api/login"; const { wsCache } = useCache() const { wsSessionCache } = useSessionCache() defineOptions({ name: 'Logo' }) @@ -68,11 +71,11 @@ /** 刷新所有菜单权限 */ const gotoHome = async () => { const userStore = useUserStoreWithOut() const permissionStore = usePermissionStoreWithOut() isRelogin.show = true wsCache.set(CACHE_KEY.USER, null) await userStore.setUserInfoAction() let userInfo = await getInfo() wsCache.set(CACHE_KEY.USER, userInfo) wsSessionCache.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus) isRelogin.show = false // 后端过滤菜单 await permissionStore.generateRoutes() src/store/modules/permission.ts
@@ -3,9 +3,9 @@ import { cloneDeep } from 'lodash-es' import remainingRouter from '@/router/modules/remaining' import { flatMultiLevelRoutes, generateRoute } from '@/utils/routerHelper' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {CACHE_KEY, useSessionCache} from '@/hooks/web/useCache' const { wsCache } = useCache() const { wsSessionCache } = useSessionCache() export interface PermissionState { routers: AppRouteRecordRaw[] @@ -35,8 +35,8 @@ return new Promise<void>(async (resolve) => { // 获得菜单列表,它在登录的时候,setUserInfoAction 方法中已经进行获取 let res: AppCustomRouteRecordRaw[] = [] if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) { res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[] if (wsSessionCache.get(CACHE_KEY.ROLE_ROUTERS)) { res = wsSessionCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[] } const routerMap: AppRouteRecordRaw[] = generateRoute(res) // 动态路由,404一定要放到最后面 src/store/modules/user.ts
@@ -1,10 +1,17 @@ import { store } from '@/store' import { defineStore } from 'pinia' import { getAccessToken, removeToken } from '@/utils/auth' import { CACHE_KEY, useCache, deleteUserCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache, deleteUserCache, useSessionCache, deleteUserSessionCache } from '@/hooks/web/useCache' import { getInfo, loginOut } from '@/api/login' const { wsCache } = useCache() const { wsSessionCache } = useSessionCache() interface UserVO { id: number @@ -61,9 +68,10 @@ this.roles = userInfo.roles this.user = userInfo.user this.isSetUser = true console.log(userInfo.menus) wsCache.set(CACHE_KEY.USER, userInfo) wsCache.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus) if(!wsSessionCache.get(CACHE_KEY.ROLE_ROUTERS)) { wsSessionCache.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus) } }, async setUserAvatarAction(avatar: string) { const userInfo = wsCache.get(CACHE_KEY.USER) @@ -83,6 +91,7 @@ await loginOut() removeToken() deleteUserCache() // 删除用户缓存 deleteUserSessionCache() //删除路由缓存 this.resetState() }, resetState() { src/views/Home/Index.vue
@@ -25,12 +25,13 @@ import * as AppApi from '@/api/system/app' import {Apps} from "@/views/Home/types"; import {CACHE_KEY, useCache} from "@/hooks/web/useCache"; import {CACHE_KEY, useCache, useSessionCache} from "@/hooks/web/useCache"; defineOptions({name: 'Home'}) const {wsCache} = useCache() const {wsSessionCache} = useSessionCache() const loading = ref(true) @@ -44,9 +45,9 @@ const getAppMenuList = async (id, appCode) => { const data = await AppApi.getAppMenuList(id) let userInfo = wsCache.get(CACHE_KEY.USER) userInfo.menus = data // userInfo.menus = data wsCache.set(CACHE_KEY.USER, userInfo) wsCache.set(CACHE_KEY.ROLE_ROUTERS, data) wsSessionCache.set(CACHE_KEY.ROLE_ROUTERS, data) window.location.href = '/plat/index' } @@ -70,11 +71,12 @@ if (type === 0) { await getAppMenuList(id, appCode) } else { const data = await AppApi.getAppMenuList(id) let userInfo = wsCache.get(CACHE_KEY.USER) userInfo.menus = data wsCache.set(CACHE_KEY.USER, userInfo) wsCache.set(CACHE_KEY.ROLE_ROUTERS, data) // const data = await AppApi.getAppMenuList(id) // let userInfo = wsCache.get(CACHE_KEY.USER) // userInfo.menus = data // wsCache.set(CACHE_KEY.USER, userInfo) // wsSessionCache.set(CACHE_KEY.ROLE_ROUTERS, data) localStorage.setItem(appCode, id) window.open(item.appDomain + '/index', '_blank') // window.open('/plat/shasteel', '_blank') // window.location.href = '/plat/shasteel' src/views/data/ind/category/CategoryForm.vue
@@ -33,13 +33,13 @@ <script lang="ts" setup> import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import * as CategoryApi from '@/api/data/ind/category' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {CACHE_KEY, useSessionCache} from '@/hooks/web/useCache' import { CommonStatusEnum, SystemMenuTypeEnum } from '@/utils/constants' import { defaultProps, handleTree } from '@/utils/tree' defineOptions({ name: 'IndItemCategoryForm' }) const { wsCache } = useCache() const { wsSessionCache } = useSessionCache() const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -114,7 +114,7 @@ } finally { formLoading.value = false // 清空,从而触发刷新 wsCache.delete(CACHE_KEY.ROLE_ROUTERS) wsSessionCache.delete(CACHE_KEY.ROLE_ROUTERS) } } src/views/data/plan/category/CategoryForm.vue
@@ -33,13 +33,13 @@ <script lang="ts" setup> import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import * as CategoryApi from '@/api/data/plan/category' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {CACHE_KEY, useCache, useSessionCache} from '@/hooks/web/useCache' import { CommonStatusEnum, SystemMenuTypeEnum } from '@/utils/constants' import { defaultProps, handleTree } from '@/utils/tree' defineOptions({ name: 'PlanItemCategoryForm' }) const { wsCache } = useCache() const { wsSessionCache } = useSessionCache() const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -114,7 +114,7 @@ } finally { formLoading.value = false // 清空,从而触发刷新 wsCache.delete(CACHE_KEY.ROLE_ROUTERS) wsSessionCache.delete(CACHE_KEY.ROLE_ROUTERS) } } src/views/model/mpk/file/MpkRun.vue
@@ -34,28 +34,24 @@ </el-col> </el-row> <el-divider content-position="left">模型参数信息</el-divider> <el-row :gutter="20"> <el-col :span="2" style="margin-bottom: 10px;margin-left: 20px"> <el-button tag="a" :href="staticDir + '/template/模型参数导入模板.xlsx'" download="模型参数导入模板.xlsx" style="text-decoration: none;" type="primary" size="small" link>模板下载</el-button> </el-col> <el-col :span="2" style="margin-bottom: 10px;"> <el-upload ref="uploadRef" v-model:file-list="fileList" :show-file-list="false" :action="importUrl" :auto-upload="true" :disabled="formLoading" :before-upload="beforeUpload" :headers="uploadHeaders" :on-error="submitFormError" :on-success="submitFormSuccess" accept=".xlsx" > <el-button type="primary" size="small" link>参数导入</el-button> </el-upload> </el-col> </el-row> <div style="display:flex;flex-direction: row;align-items: center;margin-bottom: 6px"> <el-button tag="a" :href="staticDir + '/template/模型参数导入模板.xlsx'" download="模型参数导入模板.xlsx" style="text-decoration: none;" type="primary" size="small" link>模板下载</el-button> <el-upload ref="uploadRef" v-model:file-list="fileList" :show-file-list="false" :action="importUrl" :auto-upload="true" :disabled="formLoading" :before-upload="beforeUpload" :headers="uploadHeaders" :on-error="submitFormError" :on-success="submitFormSuccess" accept=".xlsx" > <el-button type="primary" size="small" link>参数导入</el-button> </el-upload> </div> <el-row v-for="(item,index) in datas" :key="index" :gutter="20"> <el-col :span="24"> <el-form-item :label="'参数_' + (index)" required style="width: 100%"> @@ -87,23 +83,31 @@ </el-table-column> <el-table-column prop="" label="参数名称" align="center"> <template #default="scope"> <el-input size="small" v-model="scope.row.name" :disabled="true" maxlength="50" clearable /> </template> </el-table-column> <el-table-column prop="" label="参数value" align="center"> <template #default="scope"> <el-input size="small" v-model="scope.row.settingValue" :disabled="scope.row.settingKey === 'pyFile'" maxlength="50" clearable /> </template> </el-table-column> <el-table-column label="操作" fixed="right" header-align="center" align="center" width="100"> <template #default="scope"> <el-button @click="deleteRow(scope.$index)" key="danger" type="danger" :disabled="scope.row.settingKey === 'pyFile'" link >删除</el-button> </template> </el-table-column> <!-- <el-table-column label="操作" fixed="right" header-align="center" align="center" width="100">--> <!-- <template #default="scope">--> <!-- <el-button--> <!-- @click="deleteRow(scope.$index)"--> <!-- key="danger"--> <!-- type="danger"--> <!-- :disabled="scope.row.settingKey === 'pyFile'"--> <!-- link--> <!-- >删除</el-button>--> <!-- </template>--> <!-- </el-table-column>--> </el-table> <el-divider content-position="left">模型运行结果</el-divider> <el-input v-model="modelRunResult" placeholder="" rows="4" type="textarea" /> src/views/model/mpk/project/ProjectForm.vue
@@ -140,7 +140,7 @@ // 所有模型列表 const modelList = ref([]) const getModelList = async () => { modelList.value = await MpkApi.list() modelList.value = await MpkApi.list({}) } // 模型筛选 src/views/model/pre/item/MmPredictItemForm.vue
@@ -147,7 +147,7 @@ </el-row> <el-row v-if="dataForm.itemtypename === 'NormalItem'"> <el-col :span="12"> <el-form-item label="关联项目"> <el-form-item label="关联项目" prop="mmPredictModel.mpkprojectid"> <el-select v-model="dataForm.mmPredictModel.mpkprojectid" placeholder="请选择"> <el-option v-for="item in mpkProjectList" @@ -363,7 +363,7 @@ 添加 </el-button> <el-button @click="deleteRow(scope.$index, dataForm.mmModelParamList)" @click="deleteRow(scope.$index, scope.row, dataForm.mmModelParamList)" type="text" size="mini"> 删除 @@ -564,6 +564,7 @@ 'dmModuleItem.moduleid': [{required: true, message: '管网不能为空', trigger: 'blur'}], 'dmModuleItem.itemorder': [{required: true, message: '排序不能为空', trigger: 'blur'}], 'mmPredictItem.predictlength': [{required: true, message: '预测长度不能为空', trigger: 'blur'}], 'mmPredictModel.mpkprojectid': [{required: true, message: '关联项目不能为空', trigger: 'blur'}], }) const formRef = ref() // 表单 Ref @@ -635,7 +636,7 @@ let flag = false dataForm.value.mmItemOutputList.forEach(e => { if (e.resultstr == undefined || e.resultstr === '' || e.resultType == undefined || e.resultType === '' || e.pointid == undefined || e.pointid === '' || (e.resultType === 2 && (e.resultIndex == undefined || e.resultIndex === ''))) { if (e.resultstr == undefined || e.resultstr === '' || e.resultType == undefined || e.resultType === '' || (e.resultType === 2 && (e.resultIndex == undefined || e.resultIndex === ''))) { message.error("模型输出数据异常") flag = true return @@ -835,9 +836,9 @@ rows.splice(index, 0, row) } function deleteRow(index: string, rows) { if (!rows || rows.length === 1) { message.error('不能全部删除!') function deleteRow(index, row, rows) { if (!rows || rows.length === 1 || rows.filter(e => e.modelparamportorder === row.modelparamportorder).length === 1) { message.error('不可删除!') return } rows.splice(index, 1) src/views/model/sche/model/ScheduleModelForm.vue
@@ -7,15 +7,11 @@ :rules="formRules" label-width="120px" > <el-divider content-position="left">基本信息</el-divider> <el-row> <el-col :span="12"> <el-form-item label="模型编号" prop="modelCode"> <el-input v-model="formData.modelCode" placeholder="请输入模型编号" /> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="模型名称" prop="modelName"> <el-input v-model="formData.modelName" placeholder="请输入模型名称" /> </el-form-item> </el-col> </el-row> @@ -45,36 +41,54 @@ </el-form-item> </el-col> </el-row> <el-divider content-position="left">模型信息</el-divider> <div style="width: 120px;text-align: right;margin-bottom: 8px"> <el-popover placement="right" :width="300" trigger="click" ref="modelPopover" @before-enter="model = undefined"> <template #reference> <span style="color: #409eff;cursor: pointer">关联模型信息</span> </template> <template #default> <div style="display:flex;flex-direction: row;align-items: center;"> <el-cascader style="width: 100%" v-model="model" placeholder="选择模型" :teleported="false" @change="changeModel" :options="scheduleModelList"/> </div> </template> </el-popover> </div> <el-row> <el-col :span="24"> <el-col :span="12"> <el-form-item label="模型名称" prop="modelName"> <el-input v-model="formData.modelName" placeholder="请输入模型名称" :disabled="true" /> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="类名" prop="className"> <el-input v-model="formData.className" placeholder="请输入类名 " /> <el-input v-model="formData.className" placeholder="请输入类名" :disabled="true" /> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="12"> <el-form-item label="方法名" prop="methodName"> <el-input v-model="formData.methodName" placeholder="请输入方法名 " /> <el-input v-model="formData.methodName" placeholder="请输入方法名" :disabled="true" /> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="参数数量" prop="portLength"> <el-input-number v-model="formData.portLength" :min="0" controls-position="right" /> <el-input-number v-model="formData.portLength" :min="0" controls-position="right" :disabled="true" /> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="24"> <el-form-item label="参数构造" prop="paramStructure"> <el-input v-model="formData.paramStructure" placeholder="请输入参数构造 " /> <el-input v-model="formData.paramStructure" placeholder="请输入参数构造" :disabled="true" /> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="24"> <el-form-item label="模型路径" prop="modelPath"> <el-input v-model="formData.modelPath" placeholder="模型路径" /> <el-input v-model="formData.modelPath" placeholder="模型路径" :disabled="true" /> </el-form-item> </el-col> </el-row> @@ -89,7 +103,7 @@ width="100" align="center"> <template #default="scope"> <el-input size="mini" v-model="scope.row.modelparamportorder" maxlength="5" clearable <el-input v-model="scope.row.modelparamportorder" maxlength="5" clearable :disabled="true" style="width:100%; hight:100%"/> </template> </el-table-column> @@ -99,7 +113,7 @@ width="100" align="center"> <template #default="scope"> <el-input size="mini" v-model="scope.row.modelparamorder" maxlength="5" clearable <el-input v-model="scope.row.modelparamorder" maxlength="5" clearable style="width:100%;hight:100%"/> </template> </el-table-column> @@ -109,7 +123,7 @@ width="150" align="center"> <template #default="scope"> <el-select v-model="scope.row.modelparamtype" placeholder="请选择"> <el-select v-model="scope.row.modelparamtype" placeholder="请选择" @change="changeModelparamtype(scope.row)"> <el-option v-for="dict in getStrDictOptions(DICT_TYPE.MODEL_PARAM_TYPE)" :key="dict.value" @@ -124,8 +138,25 @@ label="参数名称" align="center"> <template #default="scope"> <el-select size="mini" <el-select v-if="scope.row.modelparamtype === 'NormalItem'" v-model="scope.row.modelparamid" placeholder="请选择" filterable style="width: 100%"> <el-option-group v-for="group in modelparamListMap['NormalItem']" :key="group.value" :label="group.label" > <el-option v-for="item in group.children" :key="item.value" :label="item.label" :value="item.value" /> </el-option-group> </el-select> <el-select v-else v-model="scope.row.modelparamid" filterable placeholder="请选择"> @@ -162,7 +193,7 @@ </el-button> <el-button link @click.prevent="deleteRow(scope.$index, formData.paramList)" @click.prevent="deleteRow(scope.$index, scope.row, formData.paramList)" type="primary" size="small"> 删除 @@ -181,7 +212,7 @@ label="键" align="center"> <template #default="scope"> <el-input size="mini" v-model="scope.row.key" maxlength="20" clearable <el-input v-model="scope.row.key" maxlength="20" clearable :disabled="true" style="width:100%;hight:100%"/> </template> </el-table-column> @@ -190,7 +221,7 @@ label="名称" align="center"> <template #default="scope"> <el-input size="mini" v-model="scope.row.name" maxlength="20" clearable <el-input v-model="scope.row.name" maxlength="20" clearable :disabled="true" style="width:100%;hight:100%"/> </template> </el-table-column> @@ -199,7 +230,7 @@ label="类型" align="center"> <template #default="scope"> <el-select v-model="scope.row.valuetype" placeholder="请选择"> <el-select v-model="scope.row.valuetype" placeholder="请选择" :disabled="true"> <el-option v-for="dict in getStrDictOptions(DICT_TYPE.MODEL_METHOD_SETTING_VALUE_TYPE)" :key="dict.value" @@ -214,32 +245,32 @@ label="值" align="center"> <template #default="scope"> <el-input size="mini" v-model="scope.row.value" maxlength="256" clearable <el-input v-model="scope.row.value" maxlength="256" clearable :disabled="scope.row.key === 'pyFile'" style="width:100%;hight:100%"/> </template> </el-table-column> <el-table-column prop="" label="操作" width="100" align="center"> <template #default="scope"> <el-button @click.prevent="addRow(scope.$index, formData.settingList)" link type="primary" size="small"> 添加 </el-button> <el-button @click.prevent="deleteRow(scope.$index, formData.settingList)" link type="primary" size="small"> 删除 </el-button> </template> </el-table-column> <!-- <el-table-column--> <!-- prop=""--> <!-- label="操作"--> <!-- width="100"--> <!-- align="center">--> <!-- <template #default="scope">--> <!-- <el-button--> <!-- @click.prevent="addRow(scope.$index, formData.settingList)"--> <!-- link--> <!-- type="primary"--> <!-- size="small">--> <!-- 添加--> <!-- </el-button>--> <!-- <el-button--> <!-- @click.prevent="deleteRow(scope.$index, formData.settingList)"--> <!-- link--> <!-- type="primary"--> <!-- size="small">--> <!-- 删除--> <!-- </el-button>--> <!-- </template>--> <!-- </el-table-column>--> </el-table> </el-form> <template #footer> @@ -252,6 +283,7 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import * as ScheduleModelApi from '@/api/model/sche/model' import { CommonStatusEnum } from '@/utils/constants' import * as MpkApi from "@/api/model/mpk/mpk"; defineOptions({ name: 'ScheduleModelForm' }) @@ -274,19 +306,8 @@ resultStrId: undefined, invocation: undefined, status: CommonStatusEnum.ENABLE, paramList: [{ modelparamportorder: '1', modelparamorder: '1', modelparamtype: '', modelparamid: '', datalength: '' }], settingList: [{ key: '', value: '', valuetype: '', name: '' }] paramList: [], settingList: [] }) const formRules = reactive({ modelCode: [{ required: true, message: '模型编号不能为空', trigger: 'blur' }], @@ -295,6 +316,10 @@ }) const formRef = ref() // 表单 Ref const modelparamListMap = ref({}) // 调度模型列表 const scheduleModelList = ref([]) const model = ref() const modelPopover = ref() const addRow = function (index, rows) { let row = JSON.parse(JSON.stringify(rows[index])) @@ -302,9 +327,9 @@ this.orderRow(rows) } const deleteRow = function (index, rows) { if (!rows || rows.length === 1) { message.error('不能全部删除!') const deleteRow = function (index, row, rows) { if (!rows || rows.length === 1 || rows.filter(e => e.modelparamportorder === row.modelparamportorder).length === 1) { message.error('不可删除!') return } rows.splice(index, 1) @@ -341,6 +366,8 @@ } // 加载参数列表 modelparamListMap.value = await ScheduleModelApi.getModelParamList() // 加载调度模型列表 getScheduleModelList() } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 @@ -385,20 +412,82 @@ resultStrId: undefined, invocation: undefined, status: CommonStatusEnum.ENABLE, paramList: [{ modelparamportorder: '1', modelparamorder: '1', modelparamtype: '', modelparamid: '', datalength: '' }], settingList: [{ key: '', value: '', valuetype: '', name: '' }] paramList: [], settingList: [] } formRef.value?.resetFields() } const getScheduleModelList = async () => { let list = await MpkApi.list({pyType: 'schedul'}) if (list && list.length > 0) { scheduleModelList.value = list.map(e => { return { label: e.pyChineseName, value: e, children: e.modelMethods.map(m => { return { label: m.methodName, value: m } }) } }) } } // 选择调度模型 const changeModel = async () => { // 校验 if (model.value && model.value.length > 0) { const modelInfo = model.value[0] const methodInfo = model.value[1] formData.value.modelName = modelInfo.pyChineseName formData.value.className = modelInfo.pkgName + '.impl.' + modelInfo.pyName + 'Impl'; formData.value.methodName = methodInfo.methodName formData.value.portLength = methodInfo.dataLength // 参数构造 let paramStructure = [] for (let i = 0; i < methodInfo.dataLength; i++) { paramStructure.push('[[D') } if (methodInfo.model === 1) { paramStructure.push('java.util.HashMap') } paramStructure.push('java.util.HashMap') formData.value.paramStructure = paramStructure.join(',') formData.value.modelPath = modelInfo.pyModule // 输入参数 let paramList = [] for (let i = 0; i < methodInfo.dataLength; i++) { paramList.push({ modelparamportorder: i+1 + '', modelparamorder: '1', modelparamtype: '', modelparamid: '', datalength: 0 }) } formData.value.paramList = paramList // 设置参数 let settingList = [] methodInfo.methodSettings.forEach(e => { settingList.push({ key: e.settingKey, value: e.value, valuetype: e.valueType, name: e.name }) }) formData.value.settingList = settingList modelPopover.value.hide() }else { message.error("请先选择模型") } } function changeModelparamtype(row) { row.modelparamid = '' } </script> src/views/model/sche/scheme/ScheduleSchemeForm.vue
@@ -72,7 +72,7 @@ </el-row> <el-row> <el-col :span="12"> <el-form-item label="关联项目"> <el-form-item label="关联项目" prop="mpkprojectid"> <el-select v-model="formData.mpkprojectid" placeholder="请选择"> <el-option v-for="item in mpkProjectList" @@ -136,6 +136,7 @@ triggerCondition: [{required: true, message: '触发条件不能为空', trigger: 'blur'}], modelId: [{required: true, message: '调度模型不能为空', trigger: 'blur'}], triggerCondition: [{required: true, message: '触发条件不能为空', trigger: 'blur'}], mpkprojectid: [{required: true, message: '关联项目不能为空', trigger: 'blur'}], }) const formRef = ref() // 表单 Ref const scheduleModelList = ref([] as ScheduleModelApi.ScheduleModelVO[]) src/views/system/appmenu/AppMenuForm.vue
@@ -115,13 +115,13 @@ <script lang="ts" setup> import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import * as MenuApi from '@/api/system/menu' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {CACHE_KEY, useCache, useSessionCache} from '@/hooks/web/useCache' import { CommonStatusEnum, SystemAppMenuTypeEnum } from '@/utils/constants' import { defaultProps, handleTree } from '@/utils/tree' defineOptions({ name: 'SystemAppMenuForm' }) const { wsCache } = useCache() const { wsSessionCache } = useSessionCache() const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -214,7 +214,7 @@ } finally { formLoading.value = false // 清空,从而触发刷新 wsCache.delete(CACHE_KEY.ROLE_ROUTERS) wsSessionCache.delete(CACHE_KEY.ROLE_ROUTERS) } } src/views/system/appmenu/index.vue
@@ -116,11 +116,12 @@ import { handleTree } from '@/utils/tree' import * as MenuApi from '@/api/system/menu' import AppMenuForm from './AppMenuForm.vue' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {CACHE_KEY, useCache, useSessionCache} from '@/hooks/web/useCache' defineOptions({ name: 'SystemAppMenu' }) const { wsCache } = useCache() const { wsSessionCache } = useSessionCache() const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -190,7 +191,8 @@ await message.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存') // 清空,从而触发刷新 wsCache.delete(CACHE_KEY.USER) wsCache.delete(CACHE_KEY.ROLE_ROUTERS) // wsCache.delete(CACHE_KEY.ROLE_ROUTERS) wsSessionCache.delete(CACHE_KEY.ROLE_ROUTERS) // 刷新浏览器 location.reload() } catch {} src/views/system/menu/MenuForm.vue
@@ -115,13 +115,13 @@ <script lang="ts" setup> import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import * as MenuApi from '@/api/system/menu' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {CACHE_KEY, useCache, useSessionCache} from '@/hooks/web/useCache' import { CommonStatusEnum, SystemMenuTypeEnum } from '@/utils/constants' import { defaultProps, handleTree } from '@/utils/tree' defineOptions({ name: 'SystemMenuForm' }) const { wsCache } = useCache() const { wsSessionCache } = useSessionCache() const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -214,7 +214,7 @@ } finally { formLoading.value = false // 清空,从而触发刷新 wsCache.delete(CACHE_KEY.ROLE_ROUTERS) wsSessionCache.delete(CACHE_KEY.ROLE_ROUTERS) } } src/views/system/menu/index.vue
@@ -125,11 +125,12 @@ import { handleTree } from '@/utils/tree' import * as MenuApi from '@/api/system/menu' import MenuForm from './MenuForm.vue' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {CACHE_KEY, useCache, useSessionCache} from '@/hooks/web/useCache' defineOptions({ name: 'SystemMenu' }) const { wsCache } = useCache() const { wsSessionCache } = useSessionCache() const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -186,7 +187,7 @@ await message.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存') // 清空,从而触发刷新 wsCache.delete(CACHE_KEY.USER) wsCache.delete(CACHE_KEY.ROLE_ROUTERS) wsSessionCache.delete(CACHE_KEY.ROLE_ROUTERS) // 刷新浏览器 location.reload() } catch {}