import React from 'react'; import $ from 'jquery/src/ajax'; import { Modal, message, Spin, Upload, Button, Form } from 'antd'; import { getprovince, splitUrl } from '@/tools.js'; const DemandDetail = Form.create()( React.createClass({ getInitialState() { return { visible: false, loading: false, auditStatus: 0, textFileList: [], videoFileList: [], pictureUrl: [] }; }, loadData(id) { this.setState({ loading: true }); $.ajax({ method: 'get', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/user/jtBusiness/project/detail', data: { id: id }, success: function(data) { let thisData = data.data; if (!thisData) { if (data.error && data.error.length) { message.warning(data.error[0].message); } thisData = {}; } let categoryList = this.props.categoryList,name=''; categoryList.map(item=>{ if((item.children).length){ (item.children).map(atem=>{ if(atem.value==thisData.categoryId){ name=item.label+'/'+atem.label; return; } }) } }) let tagFirst =thisData.tags?thisData.tags.split(','):[],tagTxt=[]; (this.props.tagList).map(item=>{ for(let j=0;j
{ this.handleSubmit(e, 0); }} id="demand-form" >
{theData.name} {this.state.name}
{theData.province!='0'?getprovince(theData.province):'全国'} {theData.isHot ? '是' : '否'}
{theData.price}万元 {theData.activityPrice}万元 {theData.offset} 万元 {theData.memberPrice} 万元 {theData.activityFlag ? '有效' : '无效'} {this.state.createTime}
{this.state.tags}
{theData.advertisement}
{theData.introduce}
{theData.value}
{theData.applyConditions}
{ this.setState({ previewImage: file.url || file.thumbUrl, previewVisible: true }); }} /> { this.setState({ previewVisible: false }); }} > { this.setState({ previewImage: file.url || file.thumbUrl, previewVisible: true }); }} /> { this.setState({ previewVisible: false }); }} >
{this.props.data.auditStatus == '2' && ( )}
); } }) ); export default DemandDetail;