[update] 限制
This commit is contained in:
@@ -358,7 +358,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
certCategory: [
|
certCategory: [
|
||||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('certificationCategory'), type: 'array', trigger: 'change' },
|
// { required: true, message: this.$t('pleaseSelect')+this.$t('certificationCategory'), type: 'array', trigger: 'change' },
|
||||||
],
|
],
|
||||||
isMust: [
|
isMust: [
|
||||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('Required'), trigger: 'change' },
|
{ required: true, message: this.$t('pleaseSelect')+this.$t('Required'), trigger: 'change' },
|
||||||
@@ -428,7 +428,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
Onchangelabel(val) {
|
Onchangelabel(val) {
|
||||||
console.log(val,'lllll')
|
|
||||||
// 新增
|
// 新增
|
||||||
if(this.title === '新增') {
|
if(this.title === '新增') {
|
||||||
let _tt = []
|
let _tt = []
|
||||||
@@ -505,6 +504,45 @@ export default {
|
|||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
|
if(this.formInline.certCategory == undefined) {
|
||||||
|
this.$message.warning(this.$t('certificationCategory')+this.$t('cannotEmpty'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let falg = 1
|
||||||
|
this.contentList.forEach((item,index) => {
|
||||||
|
let reg = /^[0-9a-zA-Z-]{1,}$/
|
||||||
|
// 编号的限制
|
||||||
|
if(item.paramsNumber == '') {
|
||||||
|
this.$message.warning(this.$t('standard')+this.$t('cannotEmpty'))
|
||||||
|
falg = 0
|
||||||
|
return
|
||||||
|
} else if(item.paramsNumber.length > 15){
|
||||||
|
this.$message.warning(this.$t('standard')+this.$t('cantExeed')+'15'+this.$t('Characters'))
|
||||||
|
falg = 0
|
||||||
|
return
|
||||||
|
} else if(item.paramsNumber.match(reg) === null) {
|
||||||
|
this.$message.warning(this.$t('standard')+this.$t('onlyThree'))
|
||||||
|
falg = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 参数名称的限制
|
||||||
|
if(item.paramsName == '') {
|
||||||
|
this.$message.warning(this.$t('ParameterName')+this.$t('cannotEmpty'))
|
||||||
|
falg = 0
|
||||||
|
return
|
||||||
|
} else if(item.paramsName.length > 30){
|
||||||
|
this.$message.warning(this.$t('ParameterName')+this.$t('cantExeed')+'30'+this.$t('Characters'))
|
||||||
|
falg = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 参数说明的限制
|
||||||
|
if(item.description.length > 200){
|
||||||
|
this.$message.warning(this.$t('ParameterDescription')+this.$t('cantExeed')+'200'+this.$t('Characters'))
|
||||||
|
falg = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(falg === 1) {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let url = ''
|
let url = ''
|
||||||
@@ -539,6 +577,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleInput(value) {
|
handleInput(value) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user