图片显示

dev_aliyun2
杨树林 5 years ago committed by harry
parent 1b10ff292a
commit 2df2b8a0c7

@ -6,6 +6,7 @@ import {
import './questioncss/questioncom.css'; import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css'; import '../tpm/newshixuns/css/Newshixuns.css';
import QuillForEditor from "../../common/quillForEditor"; import QuillForEditor from "../../common/quillForEditor";
import QuestionModalPicture from "./component/QuestionModalPicture";
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -23,6 +24,8 @@ class Paperreview_single extends Component {
questions: 0, questions: 0,
totalscore: 0, totalscore: 0,
total: 0, total: 0,
url: ""
} }
} }
@ -55,10 +58,21 @@ class Paperreview_single extends Component {
Singlemagaziness = () => { Singlemagaziness = () => {
} }
handleShowUploadImage = (url) => {
// console.log('==============>>>>>>>>>>>>',url);
// setUrl(url);
this.setState({
url:url
})
}
handleClose=()=>{
this.setState({
url:'',
})
}
render() { render() {
let { questions, totalscore, total, items } = this.state; let {questions, totalscore, total, items,url} = this.state;
let { objectsingle, indexx, paperreviewsingleindex, indexxy, name } = this.props; let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props;
var itemssname = ""; var itemssname = "";
@ -97,10 +111,15 @@ class Paperreview_single extends Component {
} }
return ( return (
<div key={indexxy} <div key={indexxy}
className={"w100s borderwdswuh mb20 pd20 "} className={ "w100s borderwdswuh mb20 pd20 "}
onMouseEnter={() => this.props.showparagraphs(indexxy, name)} style={{ onMouseEnter={() => this.props.showparagraphs(indexxy,name)} style={{
minHeight: "114px", minHeight: "114px",
}}> }}>
{url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
:
""
}
<style>{ <style>{
` `
.programquill .ql-editor{ .programquill .ql-editor{
@ -184,6 +203,7 @@ class Paperreview_single extends Component {
<QuillForEditor <QuillForEditor
readOnly={true} readOnly={true}
value={itemssname} value={itemssname}
showUploadImage={this.handleShowUploadImage}
/> />
} }
@ -227,6 +247,7 @@ class Paperreview_single extends Component {
<QuillForEditor <QuillForEditor
readOnly={true} readOnly={true}
value={itemsnamesy} value={itemsnamesy}
showUploadImage={this.handleShowUploadImage}
/> />
} }
@ -258,6 +279,7 @@ class Paperreview_single extends Component {
<QuillForEditor <QuillForEditor
readOnly={true} readOnly={true}
value={string} value={string}
showUploadImage={this.handleShowUploadImage}
/> />
: "" : ""
: :

@ -18,7 +18,7 @@ import LoadingSpin from '../../../common/LoadingSpin';
import Contentquestionbank from "./Contentquestionbank"; import Contentquestionbank from "./Contentquestionbank";
import Listjihe from "./Listjihe"; import Listjihe from "./Listjihe";
import Certifiedprofessional from "../../modals/Certifiedprofessional"; import Certifiedprofessional from "../../modals/Certifiedprofessional";
import QuestionModalys from '../component/QuestionModalPicture.js' import QuestionModalPicture from '../component/QuestionModalPicture.js'
const { TabPane } = Tabs; const { TabPane } = Tabs;
const Search = Input.Search; const Search = Input.Search;
class Contentpart extends Component { class Contentpart extends Component {
@ -199,7 +199,7 @@ class Contentpart extends Component {
<div className=" clearfix mt25"> <div className=" clearfix mt25">
<div className="educontent mt10 pb20 w1200s"> <div className="educontent mt10 pb20 w1200s">
{url? {url?
<QuestionModalys {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalys> <QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
: :
"" ""
} }

@ -6,7 +6,7 @@ import './../questioncss/questioncom.css'
import './../../../common/components/comment/index.scss'; import './../../../common/components/comment/index.scss';
//立即申请试用 //立即申请试用
class QuestionModalys extends Component { class QuestionModalPicture extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -21,17 +21,30 @@ class QuestionModalys extends Component {
return( return(
<Modal <Modal
keyboard={false} keyboard={false}
closable={false} closable={true}
footer={null} footer={null}
destroyOnClose={true} destroyOnClose={true}
title="" title=""
centered={true} centered={true}
visible={this.props.url?true:false} visible={this.props.url?true:false}
onCancel={this.props.handleClose}
> >
{/* 显示上传的图片信息 */} {/* 显示上传的图片信息 */}
<div className="show_upload_image" style={{ display: this.props.url ? 'block' : 'none'}}> <style>
<Icon type="close" className="image_close" onClick={this.props.handleClose}/> {
<div className="image_info"> `
.intermediatecenter{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
`
}
</style>
<div className="show_upload_image intermediatecenter" style={{ display: this.props.url ? 'block' : 'none'}}>
{/*<Icon type="close" className="image_close" onClick={this.props.handleClose}/>*/}
<div className="image_info intermediatecenter">
<img className="image" src={ this.props.url} alt=""/> <img className="image" src={ this.props.url} alt=""/>
</div> </div>
</div> </div>
@ -40,4 +53,4 @@ class QuestionModalys extends Component {
} }
} }
export default QuestionModalys; export default QuestionModalPicture;

@ -6,6 +6,7 @@ import {
import '../testioncss/testioncss.css'; import '../testioncss/testioncss.css';
import '../../tpm/newshixuns/css/Newshixuns.css'; import '../../tpm/newshixuns/css/Newshixuns.css';
import QuillForEditor from "../../../common/quillForEditor"; import QuillForEditor from "../../../common/quillForEditor";
import QuestionModalPicture from "../../question/component/QuestionModalPicture";
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -23,6 +24,7 @@ class Paperlibraryseeid_items extends Component {
questions: 0, questions: 0,
totalscore: 0, totalscore: 0,
total: 0, total: 0,
url: ""
} }
} }
@ -55,10 +57,21 @@ class Paperlibraryseeid_items extends Component {
Singlemagaziness = () => { Singlemagaziness = () => {
} }
handleShowUploadImage = (url) => {
// console.log('==============>>>>>>>>>>>>',url);
// setUrl(url);
this.setState({
url:url
})
}
handleClose=()=>{
this.setState({
url:'',
})
}
render() { render() {
let { questions, totalscore, total, items } = this.state; let {questions, totalscore, total, items,url} = this.state;
let { objectsingle, indexx, paperreviewsingleindex, indexxy, name } = this.props; let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props;
var itemssname = ""; var itemssname = "";
@ -95,10 +108,15 @@ class Paperlibraryseeid_items extends Component {
return ( return (
<div key={indexxy} <div key={indexxy}
className={"w100s borderwdswuh mb20 pd20 "} className={ "w100s borderwdswuh mb20 pd20 "}
style={{ style={{
minHeight: "114px", minHeight: "114px",
}}> }}>
{url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
:
""
}
<style>{ <style>{
` `
.programquill .ql-editor{ .programquill .ql-editor{
@ -182,6 +200,8 @@ class Paperlibraryseeid_items extends Component {
<QuillForEditor <QuillForEditor
readOnly={true} readOnly={true}
value={itemssname} value={itemssname}
showUploadImage={this.handleShowUploadImage}
/> />
} }
@ -224,6 +244,8 @@ class Paperlibraryseeid_items extends Component {
<QuillForEditor <QuillForEditor
readOnly={true} readOnly={true}
value={itemsnamesy} value={itemsnamesy}
showUploadImage={this.handleShowUploadImage}
/> />
} }
@ -254,6 +276,8 @@ class Paperlibraryseeid_items extends Component {
<QuillForEditor <QuillForEditor
readOnly={true} readOnly={true}
value={string} value={string}
showUploadImage={this.handleShowUploadImage}
/> />
: "" : ""
: :

Loading…
Cancel
Save