From c9fea71eed0b59b1a724176a80bd7846f24d7b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 21 Feb 2020 17:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/question/component/Contentpart.js | 24 +++++++++- .../modules/question/component/Listjihe.js | 43 ++++++++++++++++-- .../component/QuestionModalPicture.js | 44 +++++++++++++++++++ 3 files changed, 107 insertions(+), 4 deletions(-) create mode 100644 public/react/src/modules/question/component/QuestionModalPicture.js diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 142e34ccc..c26994147 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -18,6 +18,7 @@ import LoadingSpin from '../../../common/LoadingSpin'; import Contentquestionbank from "./Contentquestionbank"; import Listjihe from "./Listjihe"; import Certifiedprofessional from "../../modals/Certifiedprofessional"; +import QuestionModalys from '../component/QuestionModalPicture.js' const { TabPane } = Tabs; const Search = Input.Search; class Contentpart extends Component { @@ -28,12 +29,25 @@ class Contentpart extends Component { chakanjiexibool:false, mydisplay:false, occupation:2, + url: "" } } //初始化 componentDidMount(){ + } + handleShowUploadImage = (url) => { + // console.log('==============>>>>>>>>>>>>',url); + // setUrl(url); + this.setState({ + url:url + }) + } + handleClose=()=>{ + this.setState({ + url:'', + }) } chakanjiexibool=(index)=>{ @@ -128,7 +142,7 @@ class Contentpart extends Component { } render() { - let {page,mydisplay}=this.state; + let {page,mydisplay,url}=this.state; let {defaultActiveKey,item_type,booljupyterurls}=this.props; const defaultActiveKeys=defaultActiveKey+''; let isysladmins=false; @@ -184,6 +198,11 @@ class Contentpart extends Component { return (
+ {url? + this.handleClose()}> + : + "" + } { mydisplay===true? @@ -386,6 +405,9 @@ class Contentpart extends Component { showmodels={(e)=>this.props.showmodels(e)} showmodelysl={(e)=>this.props.showmodelysl(e)} showmodelsInaudit={(e)=>this.props.showmodelsInaudit(e)} + handleShowUploadImage={(e)=>this.handleShowUploadImage(e)} + handleClose={()=>this.handleClose()} + > diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js index fe7d079ef..a31b74636 100644 --- a/public/react/src/modules/question/component/Listjihe.js +++ b/public/react/src/modules/question/component/Listjihe.js @@ -8,7 +8,8 @@ import { Table, Pagination, Radio, - Tooltip + Tooltip, + Icon } from "antd"; import './../questioncss/questioncom.css'; import QuillForEditor from "../../../common/quillForEditor"; @@ -31,6 +32,7 @@ class Listjihe extends Component { page: 1, name: "单选题", nd: "简单", + url: "" } } @@ -39,7 +41,21 @@ class Listjihe extends Component { } + handleShowUploadImage = (url) => { + try { + this.props.handleShowUploadImage(url); + }catch (e) { + + } + } + handleClose=()=>{ + try { + this.props.handleClose(); + }catch (e) { + + } + } //选用 Selectingpracticaltraining = (id) => { let data = {} @@ -63,8 +79,10 @@ class Listjihe extends Component { } + + render() { - let {page, name, nd} = this.state; + let {page, name, nd,url} = this.state; let {defaultActiveKey, items, listjihe, chakanjiexiboolindex, keindex} = this.props; // 编程答案 @@ -173,11 +191,26 @@ class Listjihe extends Component { } - return (
{/*顶部*/} + + + {/* 显示上传的图片信息 */} + {/*
*/} + {/* this.handleClose()}/>*/} + {/*
*/} + {/* */} + {/*
*/} + {/*
*/}