题库列表二次校验

main
hujunpeng 3 months ago
parent c2a14dada8
commit 2e09971d64
  1. 22
      packages/examination/src/views/question/questionList.tsx

@ -113,10 +113,17 @@ class QuestionList extends Component<any, States> {
const idList = [id]; const idList = [id];
delQuestion(idList) delQuestion(idList)
.then((res) => { .then((res) => {
const success = res['success']; const success = res.data.success;
if (success) { const info = res.data.message;
if (success === "true") {
message.success('删除成功'); message.success('删除成功');
this.handlegetList('def'); this.handlegetList('def');
} else if (success === "error") {
Modal.confirm({
content: info,
cancelButtonProps: { style: { display: 'none' } },
onOk: () => {return}
});
} else { } else {
message.error('删除失败,请稍后重试'); message.error('删除失败,请稍后重试');
} }
@ -145,10 +152,17 @@ class QuestionList extends Component<any, States> {
onOk: () => { onOk: () => {
delQuestion(selectedRowKeys) delQuestion(selectedRowKeys)
.then((res) => { .then((res) => {
const success = res['success']; const success = res.data.success;
if (success) { const info = res.data.message;
if (success === "true") {
message.success('删除成功'); message.success('删除成功');
this.handlegetList('def'); this.handlegetList('def');
} else if (success === "error") {
Modal.confirm({
content: info,
cancelButtonProps: { style: { display: 'none' } },
onOk: () => {return}
});
} else { } else {
message.error('删除失败,请稍后重试'); message.error('删除失败,请稍后重试');
} }

Loading…
Cancel
Save