Commit cca3986d by 曾经

配置保存 loading优化

parent 55443f0a
......@@ -14,6 +14,8 @@ export default {
data() {
return {
canSave: false,
load: false,
isSave: false,
formData: {
configs: [
{
......@@ -398,6 +400,7 @@ export default {
}, 200);
},
init() {
this.load = true;
doFetchGet(url.getAbnormalSetting).then(res => {
let { errorCode, result, message } = res.data || {};
if (errorCode != 0) {
......@@ -410,7 +413,7 @@ export default {
this.isFirstSave = true;
}
this.updateData(result);
});
}).finally(()=> this.load = false);
},
updateData(result) {
let { frozen, configs } = result;
......@@ -489,6 +492,7 @@ export default {
this.formData = formData;
},
submit() {
this.isSave = true;
doFetch(url.saveAbnormalSetting, this.submitData).then(res => {
let { errorCode, message } = res.data || {};
if (errorCode != 0) {
......@@ -497,7 +501,7 @@ export default {
} else {
this.$router.go(-1);
}
});
}).finally(()=> this.isSave = false);;
},
save() {
this.$refs.submitForm.validate(valid => {
......
<template>
<div class="abnormal-setting-page-box">
<div class="abnormal-setting-page-box" v-loading="load">
<div class="abnormal-setting-page">
<el-alert
:title="'配置/修改“异常规则”后(仅调整“是否自动冻结”配置,不算作“修改异常规则”),次日【异常会员】列表将全量更新,系统会根据最新的异常规则来判断“异常会员”并展示在列表中;\r\n若未修改配置,列表不会更新。也即如被判定为异常会员,该会员会一直存在于异常会员列表中,即使后续该会员情况发生改变不符合异常规则。'"
......@@ -332,6 +332,7 @@
<el-row type="flex" class="page-bottom" justify="center" align="middle">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="save" :disabled="!canSave"
:loading="isSave"
>保存</el-button
>
</el-row>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment