Commit a3a8c5a3 authored by 姬鋆屾's avatar 姬鋆屾

tui

parent f1e22ac7
...@@ -63,7 +63,9 @@ ...@@ -63,7 +63,9 @@
</div> </div>
</div> </div>
<div class="mt20"> <div class="mt20">
<el-button type="primary" @click="saveForm">确定</el-button> <el-button type="primary" @click="saveForm" :loading="btnLoading"
>确定</el-button
>
<el-button @click="cancleFn">取消</el-button> <el-button @click="cancleFn">取消</el-button>
</div> </div>
</div> </div>
...@@ -110,6 +112,7 @@ export default { ...@@ -110,6 +112,7 @@ export default {
errorStatus: "", errorStatus: "",
}, },
duration: "", duration: "",
btnLoading: false,
}; };
}, },
...@@ -162,12 +165,21 @@ export default { ...@@ -162,12 +165,21 @@ export default {
"分钟"; "分钟";
this.dealParams.durtion = this.duration; this.dealParams.durtion = this.duration;
} }
this.btnLoading = true;
// 保存结果处理 // 保存结果处理
this.$post(this.urls.saveUrl, this.dealParams).then((res) => { this.$post(this.urls.saveUrl, this.dealParams)
if (res.code == 1) { .then((res) => {
this.cancleFn(); this.btnLoading = false;
} if (res.code == 1) {
}); this.cancleFn();
this.$message.success(res.msg);
}
})
.catch((error) => {
this.btnLoading = false;
console.log(error);
this.$message.error(error.message);
});
}, },
cancleFn() { cancleFn() {
this.open = false; this.open = false;
......
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