Fix required item prompt error (#1158)

pull/1161/head
Svamei 2 years ago committed by GitHub
parent 0836720572
commit 292dd9ad59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -548,21 +548,6 @@ export default {
{ key: 1, display_name: '超时' },
{ key: 0, display_name: '不超时' },
],
rules: {
tenantId: [{ required: true, message: 'this is required', trigger: 'blur' }],
itemId: [{ required: true, message: 'this is required', trigger: 'blur' }],
tpId: [{ required: true, message: 'this is required', trigger: 'blur' }],
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maxSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
queueType: [{ required: true, message: 'this is required', trigger: 'blur' }],
executeTimeOut: [{ required: true, message: 'this is required', trigger: 'blur' }],
keepAliveTime: [{ required: true, message: 'this is required', trigger: 'blur' }],
isAlarm: [{ required: true, message: 'this is required', trigger: 'blur' }],
capacity: [{ required: true, message: 'this is required', trigger: 'blur' }],
capacityAlarm: [{ required: true, message: 'this is required', trigger: 'blur' }],
livenessAlarm: [{ required: true, message: 'this is required', trigger: 'blur' }],
rejectedType: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
dialogStatus: '',
textMap: {
update: this.$t('common.edit'),
@ -582,6 +567,25 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
tenantId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tpId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maxSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
queueType: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
executeTimeOut: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
keepAliveTime: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
isAlarm: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
capacity: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
capacityAlarm: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
livenessAlarm: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
rejectedType: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
// this.fetchData()
//

@ -207,13 +207,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
tenantId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemName: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
owner: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemDesc: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -224,6 +217,17 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
tenantId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemName: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
owner: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemDesc: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
this.fetchData();
//

@ -380,18 +380,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
tenantId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tpId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
receives: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
secretKey: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
platform: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
configType: [
{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },
],
enable: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -403,6 +391,22 @@ export default {
size: 500,
};
},
computed:{
rules(){
return{
tenantId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tpId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
receives: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
secretKey: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
platform: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
configType: [
{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },
],
enable: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
this.fetchData();
//

@ -264,10 +264,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -279,6 +275,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -264,10 +264,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -279,6 +275,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -264,10 +264,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -279,6 +275,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -263,10 +263,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -278,6 +274,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -264,10 +264,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -279,6 +275,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -263,10 +263,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -278,6 +274,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -264,10 +264,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -279,6 +275,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -352,10 +352,6 @@ export default {
create: 'Create',
info: 'Info',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -367,6 +363,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -362,10 +362,6 @@ export default {
create: 'Create',
info: 'Info',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -377,6 +373,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -362,10 +362,6 @@ export default {
create: 'Create',
info: 'Info',
},
rules: {
coreSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
maximumSize: [{ required: true, message: 'this is required', trigger: 'blur' }],
},
temp: {
id: undefined,
tenantId: '',
@ -377,6 +373,14 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maximumSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
//
this.initSelect();

@ -177,16 +177,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
tenantId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tenantName: [
{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },
],
owner: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tenantDesc: [
{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },
],
},
temp: {
id: undefined,
tenantId: '',
@ -197,6 +187,20 @@ export default {
visible: true,
};
},
computed:{
rules(){
return{
tenantId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tenantName: [
{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },
],
owner: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tenantDesc: [
{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },
],
}
},
},
created() {
this.fetchData();
},

@ -483,24 +483,26 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
temp: {
id: undefined,
tenantId: '',
itemId: '',
rejectedType: null,
customRejectedType: null,
coreSize: 4,
maxSize: 8,
},
visible: true,
};
},
computed:{
rules(){
return{
tenantId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
itemId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tpId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
coreSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
maxSize: [
{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },
// {
// validator: (rule, value, callback) => {
// if (parseInt(value) < parseInt(this.temp.coreSize)) {
// console.log(value);
// console.log(this.temp.coreSize);
// callback('线线');
// }
// callback();
// },
// },
],
maxSize: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },],
queueType: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
allowCoreThreadTimeOut: [
{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },
@ -522,18 +524,8 @@ export default {
executeTimeOut: [
{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' },
],
},
temp: {
id: undefined,
tenantId: '',
itemId: '',
rejectedType: null,
customRejectedType: null,
coreSize: 4,
maxSize: 8,
},
visible: true,
};
}
},
},
created() {
this.fetchData();

@ -167,12 +167,6 @@ export default {
update: 'Edit',
create: 'Create',
},
rules: {
role: [{ required: true, message: this.$t('message.requiredError'), trigger: 'change' }],
userName: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tenants: [{ required: false, message: this.$t('message.requiredError'), trigger: 'blur' }],
password: [{ required: false, message: this.$t('message.requiredError'), trigger: 'blur' }],
},
temp: {
id: undefined,
role: '',
@ -193,6 +187,16 @@ export default {
},
};
},
computed:{
rules(){
return{
role: [{ required: true, message: this.$t('message.requiredError'), trigger: 'change' }],
userName: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
tenants: [{ required: false, message: this.$t('message.requiredError'), trigger: 'blur' }],
password: [{ required: false, message: this.$t('message.requiredError'), trigger: 'blur' }],
}
},
},
created() {
this.fetchData();
this.initData();

Loading…
Cancel
Save