用的是vue的气泡确认框,因为项目多次用到,记录一下,方便直接用
this.$confirm("确定要取消该任务吗?", "提示", {
cancelButtonText: "取消",
confirmButtonText: "确定",
type: "warning",
})
.then(() => { //公司封装的请求方法
var _t = this;
const params = {
recordId: _t.checkId,
};
_t.$api.post(
"api/json",
params,
api.RATE_CANCELRULE,
function (res) {
if (res.statusCode == 0) {
if (JSON.parse(res.bizContent).code == 0) {
_t.alertMessageTip(_t, res.errorMsg);
_t.getData();
} else {
_t.alertDialogTip(_t, JSON.parse(res.bizContent).info);
}
} else {
_t.alertDialogTip(_t, res.errorMsg);
}
}
);
})
.catch(() => {});