From f9b459a3fefd5fab0ee8e19268adb9d9eadab2a7 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期二, 17 十二月 2024 18:16:58 +0800 Subject: [PATCH] 预测项setting的值修改最大输入长度为1000 --- src/views/model/pre/item/MmPredictItemForm.vue | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/views/model/pre/item/MmPredictItemForm.vue b/src/views/model/pre/item/MmPredictItemForm.vue index c7d32b1..1aa3fbc 100644 --- a/src/views/model/pre/item/MmPredictItemForm.vue +++ b/src/views/model/pre/item/MmPredictItemForm.vue @@ -136,9 +136,7 @@ <Icon icon="ep:upload"/> 上传模型 </el-button> - <el-button - size="small" type="primary" @click="setReplaceModelOnly(true)" - v-if="formType.value === 'update'"> + <el-button type="primary" plain @click="setReplaceModelOnly(true)"> <Icon icon="ep:upload"/> 更新模型 </el-button> @@ -147,7 +145,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" @@ -251,6 +249,7 @@ <el-select v-model="scope.row.pointid" filterable + clearable @change="(value) => changeOutputPoint(value,scope.row)" placeholder="请选择"> <el-option @@ -284,7 +283,7 @@ <el-table-column prop="valuetype" label="类型" align="center" min-width="150"/> <el-table-column prop="" label="值" align="center" min-width="200"> <template #default="scope"> - <el-input size="mini" v-model="scope.row.value" maxlength="256" + <el-input size="mini" v-model="scope.row.value" maxlength="1000" :disabled="scope.row.key === 'pyFile'" style="width:100%;height:100%"/> </template> @@ -363,7 +362,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 +563,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 +635,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 +835,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) -- Gitblit v1.9.3