同一个页面多个表单验证写法

  commit() {
    let firstCheck = ''
    this.$refs.ruleForm1.validate(valid => {
    firstCheck = valid
  })
      let secondCheck = ''
      this.$refs.ruleForm2.validate(valid => {
        secondCheck = valid
    })
    let thirdCheck = ''
    this.$refs.ruleForm3.validate(valid => {
      console.log(valid)
      thirdCheck = valid
    })
    let fourCheck = ''
    this.$refs.ruleForm4.validate(valid => {
      console.log(valid)
      fourCheck = valid
    })
    //

if(firstCheck=true && secondCheck=true && thirdCheck=true && fourCheck=true ) {
addResearBoBao({
clueCharacteristics: this.form.clueFeauter,
gmtDiscover: this.form.findTime,
involvedTime: this.form.inivoTime,
disposeDept: this.form.doCompany,
contact: this.form.conteneStyle,
disposePerson: this.form.doPeople,
clueFeatures: this.form.jiBie,
controlCause : this.form.manReson,
suspicionAccDispose: {
// handleType 处置指令 “CAPITAL_ASTRICT”
handleType: this.form.doDirect,
// receivers 任务执行方 accId 联盟成员id accName 联盟成员名称
receivers: this.xianYiRenSelLabel,
// deadline 截止时间(不要了)
deadline:this.form.endTime,
// suspicionPersonInfo 嫌疑人基础信息
suspicionPersonInfo:
{
// name 姓名
name: this?.peopleInfo?.name,
// idCard 身份证号
idCard: this?.peopleInfo?.IDCard,
// address 所属地址 省 市 区 this?.peopleInfo?.iphoneNum
address: this?.peopleInfo?.iphoneNum,
// handleObjectList 账号信息(账号类型,账号信息)
handleObjectList: this.peopleListInfo,
// [{account: “111”, accountType: “00”}]
}
},
victimPersuadeProtect:
{
// receivers 任务执行方
receivers: this.victorNeedDoTaskSele,
// [{accName: “浙江省杭州银行”, accId: “zjshzbank”},
// {accName: “浙江省管局”, accId: “zjsbtech”}]
// victimInfo 受害人基础信息
victimInfo: {
// name 姓名
name: this?.peopleInfo2?.name,
// idCard 身份证号
idCard: this?.peopleInfo2?.IDCard,
// address 所属地址 省 市 区 this?.peopleInfo2?.iphoneNum
address: this?.peopleInfo2?.iphoneNum,
// handleObjectList 账号信息(账号类型,账号信息)
handleObjectList: this.peopleListInfo2,
// [{account: “111”, accountType: “00”}]
},
},

victimTransactionProtect: {
  receivers: this.fightEdPeoSeleLabel,
  victimInfo: {
    // name 姓名
    name: this?.peopleInfo2?.name,
    // idCard  身份证号
    idCard: this?.peopleInfo2?.IDCard,
    // address  所属地址 省 市 区   this?.peopleInfo2?.iphoneNum
    address: this?.peopleInfo2?.iphoneNum,
    // handleObjectList  账号信息(账号类型,账号信息)
    handleObjectList: this.peopleListInfo2,
    // [{account: "111", accountType: "00"}]
  },
  // [{accName: this.fightEdPeoSeleLabel, accId: this.form.taskFighedtDo}]
},
// 文件列表
attachList:this.fileListval,
// involvedTime:this.form.taskStatus,

}).then(res => {
console.log(res)

let { data, errorCode, errorMessage } = res.data
if (errorCode == "SUCCESS") {
  this.checkEnd=true
  // this.$router.push({ path: '/clue/riskreport' })
} else {
  this.$message.error(errorMessage)
}

}).catch(err => {
console.log(err)
})
}
else {
this.$message.warn(‘请确认信息是否填写完整’)
}
},

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值