拆分条款详情修改

This commit is contained in:
caoyang
2022-04-09 20:24:46 +08:00
parent 7d9dc44461
commit e08332d385
11 changed files with 230 additions and 111 deletions
+15 -6
View File
@@ -342,7 +342,7 @@
if (res.field_show_type === '1') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'blur'
})
if(res.db_field_name=='standNumber'){
@@ -359,35 +359,44 @@
res.field_show_type === 'date' || res.field_show_type === 'file') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'change'
})
} else if (res.field_show_type === 'NUMBER') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'blur'
})
} else if (res.field_show_type === 'TEXTAREA') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'blur'
})
} else if (res.field_show_type === 'RADIO' || res.field_show_type === '3') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'change'
})
}else if (res.field_show_type === '7') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'change',
})
}
}
if (res.field_show_type === '1' ||
res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10'
|| res.field_show_type === '11') {
rule.push({
max: res.db_length,
message: res.db_field_txt + this.$t('cantExeed') + res.db_length + this.$t('characters'),
trigger: 'blur'
})
}
if (rule.length > 0) {
rules[res.db_field_name] = rule
}
+6 -6
View File
@@ -52,7 +52,7 @@
// console.log('file',this.accept)
this.fileTypeSatus=false
if(this.myfileList&&this.myfileList.length>=1){
this.$message.warning('只能上传一个文件')
this.$message.warning(this.$t('onlyOnefileUploaded'))
return false
}else{
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
@@ -88,7 +88,7 @@
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(`${info.file.name} 文件上传失败。`);
this.$message.error(`${info.file.name}`+this.$t('fileUploadFailed'));
} else if (status === 'removed') {
this.myfileList = info.fileList;
this.fileList = []
@@ -102,7 +102,7 @@
// console.log('remove',this.fileList)
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.success(`${info.file.name} 删除成功。`);
this.$message.success(`${info.file.name}`+this.$t('deletedSuccessfully'));
} else if (status === 'done') {
this.fileList = []
this.myfileList = info.fileList;
@@ -121,7 +121,7 @@
// console.log('file1111',this.fileList)
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error('最多只能上传一个文件');
this.$message.error(this.$t('onlyOnefileUploaded'));
return
}
// console.log('my222',this.myfileList)
@@ -137,7 +137,7 @@
if(this.myfileList.length > 0){
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.success(`${info.file.name} 文件上传成功。`);
this.$message.success(`${info.file.name}`+this.$t('fileUploadFailed'));
}
} else if (status === 'uploading') {
this.myfileList = info.fileList;
@@ -146,7 +146,7 @@
}
}
}else{
this.$message.warning('不支持上传该类型的文件!')
this.$message.warning(this.$t('typeCannotUploaded'))
}
},
}
+25 -16
View File
@@ -380,58 +380,67 @@
if (res.field_show_type === '1') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'blur'
})
if(res.db_field_name=='standNumber'){
rule.push(
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
)
}else if(res.db_field_name=='standName'){
rule.push(
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
)
}
// if(res.db_field_name=='standNumber'){
// rule.push(
// { min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
// )
// }else if(res.db_field_name=='standName'){
// rule.push(
// { min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
// )
// }
} else if (res.field_show_type === 'CHECKBOX' || res.field_show_type === 'list_multi' ||
res.field_show_type === 'date' || res.field_show_type === 'file') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'change'
})
} else if (res.field_show_type === 'NUMBER') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'blur'
})
} else if (res.field_show_type === 'TEXTAREA') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'blur'
})
} else if (res.field_show_type === 'RADIO' || res.field_show_type === '3') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'change'
})
}else if (res.field_show_type === '7') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'change',
})
}else if (res.field_show_type === '0') {
rule.push({
required: true,
message: res.db_field_txt + '不能为空',
message: res.db_field_txt + this.$t('cannotEmpty'),
trigger: 'change',
})
}
}
if (res.field_show_type === '1' ||
res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10'
|| res.field_show_type === '11') {
rule.push({
max: res.db_length,
message: res.db_field_txt + this.$t('cantExeed') + res.db_length + this.$t('characters'),
trigger: 'blur'
})
}
if (rule.length > 0) {
rules[res.db_field_name] = rule
}
@@ -92,7 +92,7 @@
},
beforeUpload(file,fileList) {
if(this.myfileList&&this.myfileList.length>=1){
this.$message.warning('只能上传一个文件')
this.$message.warning(this.$t('onlyOnefileUploaded'))
return false
}else{
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
@@ -139,7 +139,7 @@
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(`${info.file.name} 文件上传失败。`);
this.$message.error(`${info.file.name}`+this.$t('fileUploadFailed'));
} else if (status === 'removed') {
this.myfileList = info.fileList;
this.fileList = []
@@ -153,7 +153,7 @@
// console.log('remove',this.fileList)
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.success(`${info.file.name} 删除成功。`);
this.$message.success(`${info.file.name}`+this.$t('deletedSuccessfully'));
} else if (status === 'done') {
// console.log('file1111',this.fileList)
this.$emit('uploadSuccess', this.fileList,'success')
@@ -174,7 +174,7 @@
this.$emit('uploadSuccess', this.fileList,'success')
this.$message.destroy()
this.$message.error('最多只能上传一个文件');
this.$message.error(this.$t('onlyOnefileUploaded'));
return
}
// console.log('my222',this.myfileList)
@@ -191,7 +191,7 @@
// console.log('file1111',this.fileList)
this.$emit('uploadSuccess', this.fileList,'success')
this.$message.destroy()
this.$message.success(`${info.file.name} 文件上传成功。`);
this.$message.success(`${info.file.name}`+this.$t('fileUploadFailed'));
}
} else if (status === 'uploading') {
this.myfileList = info.fileList;
+1 -1
View File
@@ -21,7 +21,7 @@
<span v-if="ol.text==$t('backDocument')&&record.flag==0" class="text">
{{ol.text}}
</span>
<span v-if="ol.text==$t('See')" class="text">
<span v-if="ol.text==$t('view')" class="text">
{{ol.text}}
</span>
<span v-if="ol.text==$t('delete')">