| | |
| | | </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" |
| | |
| | | <el-select |
| | | v-model="scope.row.pointid" |
| | | filterable |
| | | clearable |
| | | @change="(value) => changeOutputPoint(value,scope.row)" |
| | | placeholder="请选择"> |
| | | <el-option |
| | |
| | | 添加 |
| | | </el-button> |
| | | <el-button |
| | | @click="deleteRow(scope.$index, dataForm.mmModelParamList)" |
| | | @click="deleteRow(scope.$index, scope.row, dataForm.mmModelParamList)" |
| | | type="text" |
| | | size="mini"> |
| | | 删除 |
| | |
| | | '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 |
| | |
| | | |
| | | 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 |
| | |
| | | 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) |