desc: 修改逻辑顺序
This commit is contained in:
parent
22beeffc53
commit
abf1afcdf2
@ -2,7 +2,7 @@
|
||||
<el-dialog :title="title" :visible.sync="show" width="800px" :before-close="doClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :disabled="disabled" @click="draftRule">{{ isAdd? $t('global.add'): $t('global.edit') }}
|
||||
<el-button type="primary" @click="draftRule">{{ isAdd? $t('global.add'): $t('global.edit') }}
|
||||
</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
@ -231,7 +231,6 @@ export default {
|
||||
});
|
||||
cb(results);
|
||||
} catch (error) {
|
||||
console.error(error, '查询用户list');
|
||||
cb(results);
|
||||
}
|
||||
} else {
|
||||
@ -264,8 +263,8 @@ export default {
|
||||
this.show = false;
|
||||
},
|
||||
draftRule() {
|
||||
if (this.formModel.amount <= this.maxTotal && this.formModel.amount) {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
if (this.formModel.amount <= this.maxTotal && this.formModel.amount) {
|
||||
if (this.isAdd) {
|
||||
this.$emit('addRuleForm', {
|
||||
operator: OperatorModel.TRANSFER,
|
||||
@ -294,8 +293,8 @@ export default {
|
||||
});
|
||||
}
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user