From 5c475d3ac8ee98713e0f0962dd9464daccfb9eb1 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期四, 28 十一月 2024 18:16:07 +0800 Subject: [PATCH] 模型参数改为output --- src/views/model/mpk/file/MpkForm.vue | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/views/model/mpk/file/MpkForm.vue b/src/views/model/mpk/file/MpkForm.vue index 860d50c..22d5efc 100644 --- a/src/views/model/mpk/file/MpkForm.vue +++ b/src/views/model/mpk/file/MpkForm.vue @@ -41,13 +41,14 @@ :action="importUrl" :auto-upload="true" :disabled="uploadLoading" + v-loading="uploadLoading" :before-upload="beforeUpload" :headers="uploadHeaders" :on-error="submitFormError" :on-success="submitFormSuccess" - accept=".pyd" + accept=".py" > - <el-tooltip content="上传.pyd算法文件" placement="top" effect="light"> + <el-tooltip content="上传.py算法文件" placement="top" effect="light"> <el-button type="primary"> <Icon icon="ep:upload"/> 模型上传 @@ -115,7 +116,7 @@ float: right; color: var(--el-text-color-secondary); font-size: 13px;"> - <img :src="'/SimtreeUnitImage/' + item.iconName" style="height: 24px;" :alt=" item.iconDesc" /> + <img :src="staticDir + 'SimtreeUnitImage/' + item.iconName" style="height: 24px;" :alt=" item.iconDesc" /> </span> </el-option> </el-select> @@ -209,6 +210,7 @@ @click="updateSetting(scope.row)" key="danger" type="primary" + :disabled="scope.row.settingKey === 'pyFile'" link >修改 </el-button> @@ -216,6 +218,7 @@ @click="deleteSetting(props.row.methodSettings,scope.$index)" key="danger" type="danger" + :disabled="scope.row.settingKey === 'pyFile'" link >删除 </el-button> @@ -266,6 +269,8 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改 const route = useRoute() // 路由 const router = useRouter(); + + const staticDir = ref(import.meta.env.VITE_STATIC_DIR) const treeData = ref([]) const iconList = ref([] as MpkIconApi.MpkIconVO) @@ -429,7 +434,7 @@ } const data = response.data; formData.value.filePath = data.filePath - formData.value.pyName = data.fileName.replace('.pyd', '') + formData.value.pyName = data.fileName message.success('上传成功') uploadLoading.value = false } @@ -446,7 +451,9 @@ if (id) { formLoading.value = true try { + debugger formData.value = await MpkApi.getMpk(id) + debugger } finally { formLoading.value = false } -- Gitblit v1.9.3