潘志宝
2025-02-28 4a859a6d69984c77fa8166255c65f5a94eb0bd71
src/views/model/pre/item/MmPredictItemForm.vue
@@ -732,18 +732,30 @@
      return
    }
    let flag = false
    dataForm.value.mmItemOutputList.forEach(e => {
      if (e.resultstr == undefined || e.resultstr === '' || e.resultType == undefined || e.resultType === ''
        || (e.resultType === 2 && (e.resultIndex == undefined || e.resultIndex === ''))
        || (e.iscumulant === 1 && e.cumuldivisor == undefined)
      ) {
        message.error("模型输出数据异常")
        flag = true
        return
        message.error("输出数据异常")
        throw new Error('输出数据异常');
      }
    })
    if (flag) return
    //校验模型输入
    dataForm.value.mmModelParamList.forEach(e => {
      if (e.modelparamid == undefined || e.modelparamid == '') {
        message.error("输入数据异常")
        throw new Error('输入数据异常');
      }
      // ind_ascii类型输出的序号必须是1,且所在端口序号最大为1(一个ind_ascii类型输入独占一个端口)
      if (e.modelparamtype === 'IND_ASCII') {
        if (e.modelparamorder != 1 || dataForm.value.mmModelParamList.filter(p => p.modelparamportorder === e.modelparamportorder).length != 1) {
          message.error("输入数据异常:IND_ASCII类型输入独占一个端口")
          throw new Error('输入数据异常:IND_ASCII类型输入独占一个端口');
        }
      }
    })
  }
  if (dataForm.value.itemtypename === 'MergeItem') {
    if (expressionList.value == undefined || expressionList.value.length <= 1) {
@@ -761,7 +773,6 @@
    })
    if (flag) return
  }
  // 提交请求
  formLoading.value = true