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

tui

parent f1e22ac7
......@@ -63,7 +63,9 @@
</div>
</div>
<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>
</div>
</div>
......@@ -110,6 +112,7 @@ export default {
errorStatus: "",
},
duration: "",
btnLoading: false,
};
},
......@@ -162,12 +165,21 @@ export default {
"分钟";
this.dealParams.durtion = this.duration;
}
this.btnLoading = true;
// 保存结果处理
this.$post(this.urls.saveUrl, this.dealParams).then((res) => {
if (res.code == 1) {
this.cancleFn();
}
});
this.$post(this.urls.saveUrl, this.dealParams)
.then((res) => {
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() {
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