| | |
| | | </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-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 |
| | |
| | | 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) |