From 3de4087c8acdd5e409b2dbf036f2730087279eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 25 Mar 2020 15:51:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/common/quillForEditor/ImageBlot.js | 2 +- .../modules/testpaper/Paperlibraryseeid.js | 41 +++++++++++++++---- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/public/react/src/common/quillForEditor/ImageBlot.js b/public/react/src/common/quillForEditor/ImageBlot.js index 6e585f31f..096843caf 100644 --- a/public/react/src/common/quillForEditor/ImageBlot.js +++ b/public/react/src/common/quillForEditor/ImageBlot.js @@ -17,7 +17,7 @@ export default class ImageBlot extends BlockEmbed { const node = super.create(); node.setAttribute('alt', value.alt); node.setAttribute('src', value.url); - console.log('~~~~~~~~~~~', node, value); + // console.log('~~~~~~~~~~~', node, value); node.addEventListener('click', function () { try { value.onclick(value.url); diff --git a/public/react/src/modules/testpaper/Paperlibraryseeid.js b/public/react/src/modules/testpaper/Paperlibraryseeid.js index ce529c05e..064af7546 100644 --- a/public/react/src/modules/testpaper/Paperlibraryseeid.js +++ b/public/react/src/modules/testpaper/Paperlibraryseeid.js @@ -31,7 +31,8 @@ class Paperlibraryseeid extends Component { modalsType:false, titilesm:"", titiless:"", - boolok:"知道了" + boolok:"知道了", + exercise_id:0, } @@ -94,17 +95,38 @@ class Paperlibraryseeid extends Component { } preservation = () => { //保存试卷 - this.setState({ - modalsType: true, - titilesm: "功能正在内测中,敬请期待", - titiless: "", - }) - + // this.setState({ + // modalsType: true, + // titilesm: "功能正在内测中,敬请期待", + // titiless: "", + // }) + let id = this.props.match.params.id; + let url=`/examination_banks/${id}/send_to_course.json`; + var data={ + course_id:1309 + }; + this.getwangluodata(url,data); + + // 2413 + } + getwangluodata=(url,data)=>{ + axios.post(url,data).then((response) => { + if (response) { + // console.log("组卷发送"); + // console.log(response); + if(response.data){ + if(response.data.status===0){ + this.setState({ + exercise_id:response.data.exercise_id + }) + } + } + } + }); } - setitem_type = (item_type) => { @@ -134,7 +156,8 @@ class Paperlibraryseeid extends Component { render() { let {paperlibrartdata,defaultActiveKey,titilesm,titiless,boolok,modalsType} = this.state; const params = this.props && this.props.match && this.props.match.params; - // ////console.log(params); + // console.log("params"); + // console.log(params); let urlsysl=`/paperlibrary?defaultActiveKey=${defaultActiveKey}`; return (