From 2717813966ced88c6a1635663dd01b502158a1b8 Mon Sep 17 00:00:00 2001
From: houzhongjian <houzhongyi@126.com>
Date: 星期四, 05 十二月 2024 17:01:36 +0800
Subject: [PATCH] 1、路由信息存储与session 2、修改与脚手架的跳转对接方式

---
 src/views/model/pre/item/MmPredictItemForm.vue |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/views/model/pre/item/MmPredictItemForm.vue b/src/views/model/pre/item/MmPredictItemForm.vue
index c7d32b1..eb370a4 100644
--- a/src/views/model/pre/item/MmPredictItemForm.vue
+++ b/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)

--
Gitblit v1.9.3