编号校验修改
This commit is contained in:
@@ -249,14 +249,14 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="24" >
|
<a-col :span="24" v-if='contentList != []'>
|
||||||
<a-tabs>
|
<a-tabs>
|
||||||
<a-tab-pane v-for='(item,index) in contentList' :tab="item.cut == 'cn' ? item.text : item.textEn" :key="index + 1">
|
<a-tab-pane v-for='(item,index) in contentList' :tab="item.cut == 'cn' ? item.text : item.textEn" :key="index + 1">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required">*</span>
|
<span class="Required" v-if='required'>*</span>
|
||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('ParameterNo')">{{$t('ParameterNo')}}</span>
|
:title="$t('ParameterNo')">{{$t('ParameterNo')}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -271,7 +271,7 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required">*</span>
|
<span class="Required" v-if='required'>*</span>
|
||||||
<span class="title-text-text" :title="$t('NParameterName')">{{$t('NParameterName')}}</span>
|
<span class="title-text-text" :title="$t('NParameterName')">{{$t('NParameterName')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel">
|
<a-form-model-item class="itemModel">
|
||||||
@@ -448,7 +448,6 @@ export default {
|
|||||||
} else if (long && long == 'en-us') {
|
} else if (long && long == 'en-us') {
|
||||||
this.cut = 'en'
|
this.cut = 'en'
|
||||||
}
|
}
|
||||||
console.log(this.cut)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getcontentListedEdit() {
|
getcontentListedEdit() {
|
||||||
@@ -595,6 +594,7 @@ export default {
|
|||||||
item1.description= '' // 描述
|
item1.description= '' // 描述
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
console.log(this.contentList)
|
||||||
};
|
};
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -644,6 +644,11 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// value.technologyTerritory = value.technologyTerritory.split(',')
|
// value.technologyTerritory = value.technologyTerritory.split(',')
|
||||||
// }
|
// }
|
||||||
|
if(this.formInline.controlType == 11){
|
||||||
|
this.required = false
|
||||||
|
}else{
|
||||||
|
this.required = true
|
||||||
|
}
|
||||||
this.formInline = value
|
this.formInline = value
|
||||||
this.title = this.$t('edit')
|
this.title = this.$t('edit')
|
||||||
this.flag = 0
|
this.flag = 0
|
||||||
@@ -674,41 +679,44 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let falg = 1
|
let falg = 1
|
||||||
this.contentList.forEach((item,index) => {
|
if(this.formInline.controlType != 11){
|
||||||
let reg = /^[0-9a-zA-Z-/. ]{1,}$/
|
this.contentList.forEach((item,index) => {
|
||||||
// 编号的限制
|
let reg = /^[0-9a-zA-Z-/. ]{1,}$/
|
||||||
if(item.paramsNumber == '' || item.paramsNumber === undefined) {
|
// 编号的限制
|
||||||
this.$message.warning(this.$t('standard')+this.$t('cannotEmpty'))
|
if(item.paramsNumber == '' || item.paramsNumber === undefined ) {
|
||||||
falg = 0
|
this.$message.warning(this.$t('standard')+this.$t('cannotEmpty'))
|
||||||
return
|
falg = 0
|
||||||
} else if(item.paramsNumber.length > 15){
|
return
|
||||||
this.$message.warning(this.$t('standard')+this.$t('cantExeed')+'15'+this.$t('Characters'))
|
} else if(item.paramsNumber.length > 15){
|
||||||
falg = 0
|
this.$message.warning(this.$t('standard')+this.$t('cantExeed')+'15'+this.$t('Characters'))
|
||||||
return
|
falg = 0
|
||||||
} else if(item.paramsNumber.match(reg) === null) {
|
return
|
||||||
this.$message.warning(this.$t('standard')+this.$t('onlyThree'))
|
} else if(item.paramsNumber.match(reg) === null) {
|
||||||
falg = 0
|
this.$message.warning(this.$t('standard')+this.$t('onlyThree'))
|
||||||
return
|
|
||||||
}
|
|
||||||
// 参数名称的限制
|
|
||||||
if(item.paramsName == '' || item.paramsName === undefined) {
|
|
||||||
this.$message.warning(this.$t('ParameterName')+this.$t('cannotEmpty'))
|
|
||||||
falg = 0
|
|
||||||
return
|
|
||||||
} else if(item.paramsName.length > 100){
|
|
||||||
this.$message.warning(this.$t('ParameterName')+this.$t('cantExeed')+'100'+this.$t('Characters'))
|
|
||||||
falg = 0
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if(item.description !== undefined && item.description !== null){
|
|
||||||
// 参数说明的限制
|
|
||||||
if(item.description.length > 2000){
|
|
||||||
this.$message.warning(this.$t('ParameterDescription')+this.$t('cantExeed')+'2000'+this.$t('Characters'))
|
|
||||||
falg = 0
|
falg = 0
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
// 参数名称的限制
|
||||||
})
|
if(item.paramsNumber == '' || item.paramsNumber === undefined) {
|
||||||
|
this.$message.warning(this.$t('ParameterName')+this.$t('cannotEmpty'))
|
||||||
|
falg = 0
|
||||||
|
return
|
||||||
|
} else if(item.paramsName.length > 100){
|
||||||
|
this.$message.warning(this.$t('ParameterName')+this.$t('cantExeed')+'100'+this.$t('Characters'))
|
||||||
|
falg = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(item.description !== undefined && item.description !== null){
|
||||||
|
// 参数说明的限制
|
||||||
|
if(item.description.length > 2000){
|
||||||
|
this.$message.warning(this.$t('ParameterDescription')+this.$t('cantExeed')+'2000'+this.$t('Characters'))
|
||||||
|
falg = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if(falg === 1) {
|
if(falg === 1) {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user