Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleDelete = () => {
Dialog.confirm({
content: '确认删除该任务吗',
onOk: () => {
this.fetchData();
},
});
};
publish() {
const { locale = {} } = this.props;
const { type } = this.state.form;
if (this.state.isNewConfig) {
this.validation();
}
const content = this.getCodeVal();
if (!content) {
return;
}
if (validateContent.validate({ content, type })) {
return this._publishConfig();
} else {
Dialog.confirm({
content: locale.codeValErrorPrompt,
onOk: () => this._publishConfig(),
});
return false;
}
}
handleDispatch(val) {
Dialog.confirm({
title: '提示',
content: '确认订单以及发货信息已处理完成?',
onOk: () => {
UserAjax.sendGood(val).then((res)=>{
if(res.data.status===0){
Message.success("操作成功!!");
this.getData();
}
})
},
});
};
handleDetail = (val) => {
content: `确定${record.is_disabled ? '启用' : '禁用'}用户"${record.user_name}"吗`,
onOk: () => {
this.props.updateBindingData('disable', {
data: record
}, (res) => {
if (res.status == "SUCCESS") {
this.props.updateBindingData('userList', {
data: {}
});
}
});
}
});
break;
case 'delete':
Dialog.confirm({
title: '提示',
content: `确定删除用户"${record.user_name}"吗`,
onOk: () => {
this.props.updateBindingData('delUser', {
data: { id: record.id }
}, (res) => {
if (res.status == "SUCCESS") {
this.props.updateBindingData('userList', {
data: {}
});
}
});
}
});
break;
}
handleRemove = () => {
Dialog.confirm({
title: '提示',
content: '确认删除该项目吗?',
});
};
deleteServiceSync(record) {
const {clusterId} = record
const {locale = {}, clusterModels = []} = this.props
Dialog.confirm({
title: locale.confirm,
content: locale.confirmMsg,
onOk: () => deleteCluster({clusterId}).then(() => {
let pageNum = 1
if (this.state.pageNum > 1) {
if (clusterModels.length === 1) {
pageNum = this.state.pageNum - 1
}
}
this.turnPage(pageNum)
Message.success(locale.successMsg)
})
})
}