bug修改

This commit is contained in:
caoyang
2022-03-09 10:26:48 +08:00
parent f4b834726d
commit 100a7f4962
6 changed files with 54 additions and 22 deletions
+2 -1
View File
@@ -503,7 +503,8 @@ module.exports = {
CannotExceed100characters:'cannot exceed 100 characters', CannotExceed100characters:'cannot exceed 100 characters',
cantExeed:'cannot exceed ', cantExeed:'cannot exceed ',
characters:' characters', characters:' characters',
Processing:'Processing', Processing:'Processing',
See:'See', See:'See',
labelNameCannotDuplicate:'Label name cannot be duplicate',
} }
+2
View File
@@ -509,4 +509,6 @@ module.exports = {
characters:'字符', characters:'字符',
Processing:'办理', Processing:'办理',
See:'查看', See:'查看',
labelNameCannotDuplicate:'标签名称不能重复',
} }
@@ -335,6 +335,16 @@
message: res.db_field_txt + '不能为空', message: res.db_field_txt + '不能为空',
trigger: 'blur' 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' || } else if (res.field_show_type === 'CHECKBOX' || res.field_show_type === 'list_multi' ||
res.field_show_type === 'date' || res.field_show_type === 'file') { res.field_show_type === 'date' || res.field_show_type === 'file') {
rule.push({ rule.push({
+28 -11
View File
@@ -176,20 +176,33 @@
// this.loadData() // this.loadData()
}, },
created() { created() {
const date = new Date(), this.refresh()
year = date.getFullYear(), },
month = date.getMonth()+1, watch:{
myDate = date.getDate() drawVisible(val){
this.today = `${year}/${month < 10 ? '0'+month : month}/${myDate < 10 ? '0'+myDate : myDate}` if(val&&this.timer){
if(this.timer){ clearInterval(this.timer)
clearInterval(this.timer) }else{
}else{ clearInterval(this.timer)
eventBUs.$emit('searchReset') this.initSetTimeout(this.today)//调用每隔10秒刷新数据
this.initSetTimeout(this.today)//调用每隔10秒刷新数据 }
} }
}, },
methods:{ methods:{
// 定时刷新页面
refresh(){
const date = new Date(),
year = date.getFullYear(),
month = date.getMonth()+1,
myDate = date.getDate()
this.today = `${year}/${month < 10 ? '0'+month : month}/${myDate < 10 ? '0'+myDate : myDate}`
if(this.timer){
clearInterval(this.timer)
}else{
eventBUs.$emit('searchReset')
this.initSetTimeout(this.today)//调用每隔10秒刷新数据
}
},
//上传 //上传
handleUpload(){ handleUpload(){
// if(this.timer){ // if(this.timer){
@@ -200,6 +213,9 @@
//调取已入库文件 //调取已入库文件
handleFileExport(){ handleFileExport(){
this.drawVisible=true this.drawVisible=true
if(this.timer){
clearInterval(this.timer)
}
}, },
//批量删除 //批量删除
handleDel(){ handleDel(){
@@ -336,6 +352,7 @@
}, },
docVisible(val){ docVisible(val){
this.drawVisible=val this.drawVisible=val
}, },
//文件详情跳转 //文件详情跳转
detailClick(val){ detailClick(val){
@@ -146,7 +146,7 @@
}) })
}, },
afterVisibleChange(val) { afterVisibleChange(val) {
console.log('visible', val); // console.log('visible', val);
}, },
onClose() { onClose() {
this.visible = false; this.visible = false;
@@ -136,8 +136,8 @@
width: 170 width: 170
} }
], ],
labelCol: { span:4 }, labelCol: { span:6 },
wrapperCol: { span: 18 }, wrapperCol: { span: 16 },
form:{}, form:{},
rules:{ rules:{
dictName:[{ required: true, message: this.$t('PleaseEnterLabelName'), trigger: 'change' }, dictName:[{ required: true, message: this.$t('PleaseEnterLabelName'), trigger: 'change' },
@@ -210,7 +210,13 @@
this.contentVisible=false this.contentVisible=false
this.form={} this.form={}
}else{ }else{
this.$message.warning(this.$t('operationFailed')) if(res.message='标签名称不能重复'){
this.$message.warning(this.$t('labelNameCannotDuplicate'))
}else{
this.$message.warning(this.$t('operationFailed'))
}
} }
}) })
@@ -226,14 +232,10 @@
this.form={} this.form={}
}else{ }else{
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
}) })
} }
} }
}) })
}, },
@@ -356,8 +358,8 @@
} }
.tag-content{ .tag-content{
.tag-item{ .tag-item{
.ant-col-4{ .ant-col-6{
min-width: 100px; min-width: 130px;
} }
} }
} }