图片显示

mast_item_banktwo
杨树林 5 years ago
parent ab0ea20998
commit e432345379

@ -18,6 +18,7 @@ import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css';
import QuillForEditor from "../../common/quillForEditor";
import QuestionModalPicture from "./component/QuestionModalPicture";
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -35,6 +36,8 @@ class Paperreview_single extends Component {
questions: 0,
totalscore: 0,
total: 0,
url: ""
}
}
@ -67,9 +70,20 @@ class Paperreview_single extends Component {
Singlemagaziness = () => {
}
handleShowUploadImage = (url) => {
// console.log('==============>>>>>>>>>>>>',url);
// setUrl(url);
this.setState({
url:url
})
}
handleClose=()=>{
this.setState({
url:'',
})
}
render() {
let {questions, totalscore, total, items} = this.state;
let {questions, totalscore, total, items,url} = this.state;
let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props;
@ -113,6 +127,11 @@ class Paperreview_single extends Component {
onMouseEnter={() => this.props.showparagraphs(indexxy,name)} style={{
minHeight: "114px",
}}>
{url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
:
""
}
<style>{
`
.programquill .ql-editor{
@ -196,6 +215,7 @@ class Paperreview_single extends Component {
<QuillForEditor
readOnly={true}
value={itemssname}
showUploadImage={this.handleShowUploadImage}
/>
}
@ -239,6 +259,7 @@ class Paperreview_single extends Component {
<QuillForEditor
readOnly={true}
value={itemsnamesy}
showUploadImage={this.handleShowUploadImage}
/>
}
@ -270,6 +291,7 @@ class Paperreview_single extends Component {
<QuillForEditor
readOnly={true}
value={string}
showUploadImage={this.handleShowUploadImage}
/>
:""
:

@ -18,7 +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'
import QuestionModalPicture from '../component/QuestionModalPicture.js'
const { TabPane } = Tabs;
const Search = Input.Search;
class Contentpart extends Component {
@ -199,7 +199,7 @@ class Contentpart extends Component {
<div className=" clearfix mt25">
<div className="educontent mt10 pb20 w1200s">
{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';
//立即申请试用
class QuestionModalys extends Component {
class QuestionModalPicture extends Component {
constructor(props) {
super(props);
@ -21,17 +21,30 @@ class QuestionModalys extends Component {
return(
<Modal
keyboard={false}
closable={false}
closable={true}
footer={null}
destroyOnClose={true}
title=""
centered={true}
visible={this.props.url?true:false}
onCancel={this.props.handleClose}
>
{/* 显示上传的图片信息 */}
<div className="show_upload_image" style={{ display: this.props.url ? 'block' : 'none'}}>
<Icon type="close" className="image_close" onClick={this.props.handleClose}/>
<div className="image_info">
<style>
{
`
.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=""/>
</div>
</div>
@ -40,4 +53,4 @@ class QuestionModalys extends Component {
}
}
export default QuestionModalys;
export default QuestionModalPicture;

@ -16,6 +16,7 @@ import {
import '../testioncss/testioncss.css';
import '../../tpm/newshixuns/css/Newshixuns.css';
import QuillForEditor from "../../../common/quillForEditor";
import QuestionModalPicture from "../../question/component/QuestionModalPicture";
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -33,6 +34,7 @@ class Paperlibraryseeid_items extends Component {
questions: 0,
totalscore: 0,
total: 0,
url: ""
}
}
@ -65,9 +67,20 @@ class Paperlibraryseeid_items extends Component {
Singlemagaziness = () => {
}
handleShowUploadImage = (url) => {
// console.log('==============>>>>>>>>>>>>',url);
// setUrl(url);
this.setState({
url:url
})
}
handleClose=()=>{
this.setState({
url:'',
})
}
render() {
let {questions, totalscore, total, items} = this.state;
let {questions, totalscore, total, items,url} = this.state;
let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props;
@ -109,6 +122,11 @@ class Paperlibraryseeid_items extends Component {
style={{
minHeight: "114px",
}}>
{url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
:
""
}
<style>{
`
.programquill .ql-editor{
@ -192,6 +210,8 @@ class Paperlibraryseeid_items extends Component {
<QuillForEditor
readOnly={true}
value={itemssname}
showUploadImage={this.handleShowUploadImage}
/>
}
@ -234,6 +254,8 @@ class Paperlibraryseeid_items extends Component {
<QuillForEditor
readOnly={true}
value={itemsnamesy}
showUploadImage={this.handleShowUploadImage}
/>
}
@ -264,6 +286,8 @@ class Paperlibraryseeid_items extends Component {
<QuillForEditor
readOnly={true}
value={string}
showUploadImage={this.handleShowUploadImage}
/>
:""
:

Loading…
Cancel
Save