techAchievementDesc.jsx 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259
  1. import React from 'react';
  2. import { Icon, Tooltip, Modal, message, Spin, Upload, Input, InputNumber, Select, DatePicker, Button, Radio, Form, Cascader, Tag } from 'antd';
  3. import moment from 'moment';
  4. import './techAchievement.less';
  5. import ajax from 'jquery/src/ajax/xhr.js';
  6. import $ from 'jquery/src/ajax';
  7. import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
  8. import { beforeUploadFile, splitUrl, companySearch, getAchievementCategory } from '../../tools.js';
  9. const KeyWordTagGroup = React.createClass({
  10. getInitialState() {
  11. return {
  12. tags: [],
  13. inputVisible: false,
  14. inputValue: ''
  15. };
  16. },
  17. handleClose(removedTag) {
  18. const tags = this.state.tags.filter(tag => tag !== removedTag);
  19. this.props.tagsArr(tags);
  20. this.setState({ tags });
  21. },
  22. showInput() {
  23. this.setState({ inputVisible: true }, () => this.input.focus());
  24. },
  25. handleInputChange(e) {
  26. this.setState({ inputValue: e.target.value });
  27. },
  28. handleInputConfirm() {
  29. const state = this.state;
  30. const inputValue = state.inputValue;
  31. let tags = state.tags;
  32. if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
  33. tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
  34. }
  35. this.props.tagsArr(tags);
  36. this.setState({
  37. tags,
  38. inputVisible: false,
  39. inputValue: '',
  40. });
  41. },
  42. componentWillMount() {
  43. this.state.tags = this.props.keyWordArr;
  44. },
  45. componentWillReceiveProps(nextProps) {
  46. if (this.props.keyWordArr != nextProps.keyWordArr) {
  47. this.state.tags = nextProps.keyWordArr;
  48. };
  49. },
  50. render() {
  51. const { tags, inputVisible, inputValue } = this.state;
  52. return (
  53. <div className="keyWord-tips">
  54. {tags.map((tag, index) => {
  55. const isLongTag = tag.length > 10;
  56. const tagElem = (
  57. <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
  58. {isLongTag ? `${tag.slice(0, 10)}...` : tag}
  59. </Tag>
  60. );
  61. return isLongTag ? <Tooltip title={tag}>{tagElem}</Tooltip> : tagElem;
  62. })}
  63. {inputVisible && (
  64. <Input
  65. ref={input => this.input = input}
  66. type="text"
  67. style={{ width: 78 }}
  68. value={inputValue}
  69. onChange={this.handleInputChange}
  70. onBlur={this.handleInputConfirm}
  71. onPressEnter={this.handleInputConfirm}
  72. />
  73. )}
  74. {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
  75. </div>
  76. );
  77. }
  78. });
  79. const PicturesWall = React.createClass({
  80. getInitialState() {
  81. return {
  82. previewVisible: false,
  83. previewImage: '',
  84. fileList: [],
  85. }
  86. },
  87. handleCancel() {
  88. this.setState({ previewVisible: false })
  89. },
  90. handlePreview(file) {
  91. this.setState({
  92. previewImage: file.url || file.thumbUrl,
  93. previewVisible: true,
  94. });
  95. },
  96. handleChange(info) {
  97. let fileList = info.fileList;
  98. this.setState({ fileList });
  99. this.props.fileList(fileList);
  100. },
  101. componentWillReceiveProps(nextProps) {
  102. this.state.fileList = nextProps.pictureUrl;
  103. },
  104. render() {
  105. const { previewVisible, previewImage, fileList } = this.state;
  106. const uploadButton = (
  107. <div>
  108. <Icon type="plus" />
  109. <div className="ant-upload-text">点击上传</div>
  110. </div>
  111. );
  112. return (
  113. <div className="clearfix">
  114. <Upload
  115. action={globalConfig.context + "/api/user/achievement/uploadPicture"}
  116. data={{ 'sign': this.props.pictureSign }}
  117. listType="picture-card"
  118. fileList={fileList}
  119. onPreview={this.handlePreview}
  120. onChange={this.handleChange} >
  121. {fileList.length >= 5 ? null : uploadButton}
  122. </Upload>
  123. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  124. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  125. </Modal>
  126. </div>
  127. );
  128. }
  129. });
  130. const AchievementDetailShow = Form.create()(React.createClass({
  131. getInitialState() {
  132. return {
  133. visible: false,
  134. loading: false,
  135. textFileList: [],
  136. techPlanFileList: [],
  137. businessPlanFileList: [],
  138. maturityPictureUrl: [],
  139. technicalPictureUrl: [],
  140. tags: []
  141. };
  142. },
  143. loadData(id) {
  144. this.setState({
  145. loading: true
  146. });
  147. $.ajax({
  148. method: "get",
  149. dataType: "json",
  150. crossDomain: false,
  151. url: globalConfig.context + (window.userData.type == "1" ? "/api/user/achievement/orgDetail" : "/api/user/achievement/userDetail"),
  152. data: {
  153. id: id
  154. },
  155. success: function (data) {
  156. let thisData = data.data;
  157. if (!thisData) {
  158. if (data.error && data.error.length) {
  159. message.warning(data.error[0].message);
  160. };
  161. thisData = {};
  162. };
  163. this.setState({
  164. data: thisData,
  165. tags: thisData.keyword ? thisData.keyword.split(",") : [],
  166. technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  167. maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
  168. });
  169. }.bind(this),
  170. }).always(function () {
  171. this.setState({
  172. loading: false
  173. });
  174. }.bind(this));
  175. },
  176. offShelf() {
  177. this.setState({
  178. loading: true
  179. });
  180. $.ajax({
  181. method: "post",
  182. dataType: "json",
  183. crossDomain: false,
  184. url: globalConfig.context + "/api/user/achievement/offShelf",
  185. data: { "id": this.props.data.id }
  186. }).done(function (data) {
  187. if (!data.error.length) {
  188. message.success('撤销成功!');
  189. this.setState({
  190. visible: false,
  191. releaseSubmitVisible: false
  192. });
  193. this.props.handleOk();
  194. } else {
  195. message.warning(data.error[0].message);
  196. }
  197. }.bind(this));
  198. },
  199. componentWillMount() {
  200. if (this.props.data.id) {
  201. this.loadData(this.props.data.id);
  202. } else {
  203. this.state.data = {};
  204. };
  205. },
  206. componentWillReceiveProps(nextProps) {
  207. if (!this.props.visible && nextProps.visible) {
  208. this.state.textFileList = [];
  209. this.state.techPlanFileList = [];
  210. this.state.businessPlanFileList = [];
  211. if (nextProps.data.id) {
  212. this.loadData(nextProps.data.id);
  213. } else {
  214. this.state.data = {};
  215. this.state.tags = [];
  216. this.state.maturityPictureUrl = [];
  217. this.state.technicalPictureUrl = [];
  218. };
  219. this.props.form.resetFields();
  220. };
  221. },
  222. render() {
  223. const theData = this.state.data || {};
  224. const { getFieldDecorator } = this.props.form;
  225. const FormItem = Form.Item
  226. const formItemLayout = {
  227. labelCol: { span: 8 },
  228. wrapperCol: { span: 14 },
  229. };
  230. return (
  231. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  232. <Spin spinning={this.state.loading}>
  233. <div className="clearfix">
  234. <FormItem className="half-item"
  235. {...formItemLayout}
  236. label="编号" >
  237. <span>{theData.serialNumber}</span>
  238. </FormItem>
  239. <FormItem className="half-item"
  240. {...formItemLayout}
  241. label="名称" >
  242. <span>{theData.name}</span>
  243. </FormItem>
  244. <FormItem className="half-item"
  245. {...formItemLayout}
  246. label="数据类别" >
  247. {(() => {
  248. switch (theData.dataCategory) {
  249. case "0":
  250. return <span>成果</span>;
  251. case "1":
  252. return <span>技术</span>;
  253. case "2":
  254. return <span>项目</span>;
  255. }
  256. })()}
  257. </FormItem>
  258. <FormItem className="half-item"
  259. {...formItemLayout}
  260. label="类型" >
  261. <span>{getAchievementCategory(theData.category)}</span>
  262. </FormItem>
  263. </div>
  264. <div className="clearfix">
  265. <FormItem className="half-item"
  266. {...formItemLayout}
  267. label="是否发布" >
  268. {(() => {
  269. switch (theData.releaseStatus) {
  270. case "0":
  271. return <span>未发布</span>;
  272. case "1":
  273. return <div>
  274. <span>已发布</span>
  275. <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>撤消发布</Button>
  276. <Modal maskClosable={false} title="确认"
  277. visible={this.state.releaseSubmitVisible}
  278. width='300px'
  279. footer={null}
  280. onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
  281. <span>确认要撤销发布吗?</span>
  282. <Button className="modal-submit" type="primary" onClick={this.offShelf} >确认</Button>
  283. <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
  284. </Modal>
  285. </div>;
  286. }
  287. })()}
  288. </FormItem>
  289. <FormItem className="half-item"
  290. {...formItemLayout}
  291. label="发布时间" >
  292. <span>{theData.releaseDateFormattedDate}</span>
  293. </FormItem>
  294. <FormItem className="half-item"
  295. {...formItemLayout}
  296. label="审核状态" >
  297. {(() => {
  298. switch (theData.auditStatus) {
  299. case "0":
  300. return <span>未提交审核(草稿)</span>;
  301. case "1":
  302. return <span>提交审核</span>;
  303. case "2":
  304. return <span>审核中</span>;
  305. case "3":
  306. return <span>审核通过</span>;
  307. case "4":
  308. return <span>审核未通过</span>;
  309. }
  310. })()}
  311. </FormItem>
  312. </div>
  313. <FormItem
  314. labelCol={{ span: 4 }}
  315. wrapperCol={{ span: 18 }}
  316. label="关键词" >
  317. {this.state.tags.map((tag) => {
  318. return <Tooltip key={tag} title={tag}>
  319. <Tag key={tag}>{tag}</Tag>
  320. </Tooltip>;
  321. })}
  322. </FormItem>
  323. <FormItem
  324. labelCol={{ span: 4 }}
  325. wrapperCol={{ span: 18 }}
  326. label="摘要" >
  327. <span>{theData.summary}</span>
  328. </FormItem>
  329. <FormItem
  330. labelCol={{ span: 4 }}
  331. wrapperCol={{ span: 18 }}
  332. label="成果简介" >
  333. <span>{theData.introduction}</span>
  334. </FormItem>
  335. <FormItem
  336. labelCol={{ span: 4 }}
  337. wrapperCol={{ span: 18 }}
  338. label="技术图片" >
  339. <div className="clearfix">
  340. <Upload className="demandDetailShow-upload"
  341. listType="picture-card"
  342. fileList={this.state.technicalPictureUrl}
  343. onPreview={(file) => {
  344. this.setState({
  345. previewImage: file.url || file.thumbUrl,
  346. previewVisible: true,
  347. });
  348. }} >
  349. </Upload>
  350. <Modal maskClosable={false} footer={null}
  351. visible={this.state.previewVisible}
  352. onCancel={() => { this.setState({ previewVisible: false }) }}>
  353. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  354. </Modal>
  355. </div>
  356. </FormItem>
  357. <FormItem
  358. labelCol={{ span: 4 }}
  359. wrapperCol={{ span: 18 }}
  360. label="应用领域" >
  361. <span>{getIndustryCategory(theData.fieldA, theData.fieldB)}</span>
  362. </FormItem>
  363. <div className="clearfix">
  364. <FormItem className="half-item"
  365. {...formItemLayout}
  366. label="成熟度" >
  367. {(() => {
  368. switch (theData.maturity) {
  369. case "0":
  370. return <span>正在研发</span>;
  371. case "1":
  372. return <span>已有样品</span>;
  373. case "2":
  374. return <span>通过小试</span>;
  375. case "3":
  376. return <span>通过中试</span>;
  377. case "4":
  378. return <span>可以量产</span>;
  379. }
  380. })()}
  381. </FormItem>
  382. <FormItem className="half-item"
  383. {...formItemLayout}
  384. label="创新度" >
  385. {(() => {
  386. switch (theData.innovation) {
  387. case "0":
  388. return <span>行业先进</span>;
  389. case "1":
  390. return <span>行业领先</span>;
  391. case "2":
  392. return <span>国内先进</span>;
  393. case "3":
  394. return <span>国内领先</span>;
  395. case "4":
  396. return <span>国际先进</span>;
  397. case "5":
  398. return <span>国际领先</span>;
  399. }
  400. })()}
  401. </FormItem>
  402. </div>
  403. <FormItem
  404. labelCol={{ span: 4 }}
  405. wrapperCol={{ span: 18 }}
  406. label="成熟度证明材料(图片)" >
  407. <Upload className="demandDetailShow-upload"
  408. listType="picture-card"
  409. fileList={this.state.maturityPictureUrl}
  410. onPreview={(file) => {
  411. this.setState({
  412. previewImage: file.url || file.thumbUrl,
  413. previewVisible: true,
  414. });
  415. }} >
  416. </Upload>
  417. </FormItem>
  418. <FormItem
  419. labelCol={{ span: 4 }}
  420. wrapperCol={{ span: 6 }}
  421. label="成熟度证明材料(文本)" >
  422. <p>{theData.maturityTextFileUrl ?
  423. <span className="download-file">
  424. <a onClick={() => { window.open(globalConfig.context + '/api/user/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
  425. </span>
  426. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  427. </FormItem>
  428. <FormItem
  429. labelCol={{ span: 4 }}
  430. wrapperCol={{ span: 18 }}
  431. label="成熟度证明材料(视频地址)" >
  432. <span>{theData.maturityVideoUrl}</span>
  433. </FormItem>
  434. <div className="clearfix" >
  435. <FormItem className="half-item"
  436. {...formItemLayout}
  437. label="成果所有人名称" >
  438. <span>{theData.ownerName}</span>
  439. </FormItem>
  440. <FormItem className="half-item"
  441. {...formItemLayout}
  442. label="所有人证件号" >
  443. <span>{theData.ownerIdNumber}</span>
  444. </FormItem>
  445. <FormItem className="half-item"
  446. {...formItemLayout}
  447. label="所有人联系电话" >
  448. <span>{theData.ownerMobile}</span>
  449. </FormItem>
  450. <FormItem className="half-item"
  451. {...formItemLayout}
  452. label="所有人电子邮箱" >
  453. <span>{theData.ownerEmail}</span>
  454. </FormItem>
  455. <FormItem className="half-item"
  456. {...formItemLayout}
  457. label="所有人通信地址" >
  458. <span>{theData.ownerPostalAddress}</span>
  459. </FormItem>
  460. </div>
  461. <div className="clearfix">
  462. <FormItem className="half-item"
  463. {...formItemLayout}
  464. label="所有人类型" >
  465. {(() => {
  466. switch (theData.ownerType) {
  467. case "0":
  468. return <span>个人</span>;
  469. case "1":
  470. return <span>组织</span>;
  471. }
  472. })()}
  473. </FormItem>
  474. </div>
  475. {theData.ownerType == "1" ? <div className="clearfix">
  476. <FormItem className="half-item"
  477. {...formItemLayout}
  478. label="所属组织名称" >
  479. <span>{theData.orgName}</span>
  480. </FormItem>
  481. <FormItem className="half-item"
  482. {...formItemLayout}
  483. label="所属组织地址" >
  484. <span>{theData.orgAddress}</span>
  485. </FormItem>
  486. <FormItem className="half-item"
  487. {...formItemLayout}
  488. label="所属组织邮箱" >
  489. <span>{theData.orgEmail}</span>
  490. </FormItem>
  491. <FormItem className="half-item"
  492. {...formItemLayout}
  493. label="所属组织联系人名称" >
  494. <span>{theData.orgContacts}</span>
  495. </FormItem>
  496. <FormItem className="half-item"
  497. {...formItemLayout}
  498. label="所属组织联系人电话" >
  499. <span>{theData.orgContactsMobile}</span>
  500. </FormItem>
  501. </div> : <div></div>}
  502. <div className="clearfix">
  503. <FormItem className="half-item"
  504. {...formItemLayout}
  505. label="合作方式" >
  506. {(() => {
  507. switch (theData.cooperationMode) {
  508. case "0":
  509. return <span>技术转让</span>;
  510. case "1":
  511. return <span>授权生产</span>;
  512. }
  513. })()}
  514. </FormItem>
  515. <FormItem className="half-item"
  516. {...formItemLayout}
  517. label="转让方式" >
  518. {(() => {
  519. switch (theData.transferMode) {
  520. case "0":
  521. return <span>完全转让</span>;
  522. case "1":
  523. return <span>许可转让</span>;
  524. case "2":
  525. return <span>技术入股</span>;
  526. }
  527. })()}
  528. </FormItem>
  529. </div>
  530. <div className="clearfix">
  531. <FormItem className="half-item"
  532. {...formItemLayout}
  533. label="议价方式" >
  534. {(() => {
  535. switch (theData.bargainingMode) {
  536. case "0":
  537. return <span>面议</span>;
  538. case "1":
  539. return <span>定价</span>;
  540. }
  541. })()}
  542. </FormItem>
  543. <FormItem className="half-item"
  544. {...formItemLayout}
  545. label="转让价格" >
  546. <span>{theData.transferPrice} 万元</span>
  547. </FormItem>
  548. </div>
  549. <FormItem
  550. labelCol={{ span: 4 }}
  551. wrapperCol={{ span: 18 }}
  552. label="技术场景" >
  553. <span>{theData.technicalScene}</span>
  554. </FormItem>
  555. <FormItem
  556. labelCol={{ span: 4 }}
  557. wrapperCol={{ span: 18 }}
  558. label="技术突破" >
  559. <span>{theData.breakthrough}</span>
  560. </FormItem>
  561. <FormItem
  562. labelCol={{ span: 4 }}
  563. wrapperCol={{ span: 18 }}
  564. label="专利情况" >
  565. <span>{theData.patentCase}</span>
  566. </FormItem>
  567. <FormItem
  568. labelCol={{ span: 4 }}
  569. wrapperCol={{ span: 18 }}
  570. label="获奖情况" >
  571. <span>{theData.awards}</span>
  572. </FormItem>
  573. <FormItem
  574. labelCol={{ span: 4 }}
  575. wrapperCol={{ span: 18 }}
  576. label="技术团队情况" >
  577. <span>{theData.teamDes}</span>
  578. </FormItem>
  579. <FormItem
  580. labelCol={{ span: 4 }}
  581. wrapperCol={{ span: 18 }}
  582. label="技术参数" >
  583. <span>{theData.parameter}</span>
  584. </FormItem>
  585. <FormItem
  586. labelCol={{ span: 4 }}
  587. wrapperCol={{ span: 6 }}
  588. label="技术方案" >
  589. <p>{theData.techPlanUrl ?
  590. <span className="download-file">
  591. <a onClick={() => { window.open(globalConfig.context + '/api/user/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
  592. </span>
  593. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  594. </FormItem>
  595. <FormItem
  596. labelCol={{ span: 4 }}
  597. wrapperCol={{ span: 6 }}
  598. label="商业计划书" >
  599. <p>{theData.businessPlanUrl ?
  600. <span className="download-file">
  601. <a onClick={() => { window.open(globalConfig.context + '/api/user/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
  602. </span>
  603. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  604. </FormItem>
  605. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  606. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  607. </FormItem>
  608. </Spin>
  609. </Form >
  610. )
  611. }
  612. }));
  613. const AchievementDetailForm = Form.create()(React.createClass({
  614. getInitialState() {
  615. return {
  616. visible: false,
  617. loading: false,
  618. auditStatus: 0,
  619. textFileList: [],
  620. techPlanFileList: [],
  621. businessPlanFileList: [],
  622. maturityPictureUrl: [],
  623. technicalPictureUrl: [],
  624. tags: []
  625. };
  626. },
  627. loadData(id) {
  628. this.setState({
  629. loading: true
  630. });
  631. $.ajax({
  632. method: "get",
  633. dataType: "json",
  634. crossDomain: false,
  635. url: globalConfig.context + (window.userData.type == "1" ? "/api/user/achievement/orgDetail" : "/api/user/achievement/userDetail"),
  636. data: {
  637. id: id
  638. },
  639. success: function (data) {
  640. let thisData = data.data;
  641. if (!thisData) {
  642. if (data.error && data.error.length) {
  643. message.warning(data.error[0].message);
  644. };
  645. thisData = {};
  646. };
  647. this.setState({
  648. data: thisData,
  649. orgDisplay: thisData.ownerType,
  650. tags: thisData.keyword ? thisData.keyword.split(",") : [],
  651. technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  652. maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
  653. });
  654. }.bind(this),
  655. }).always(function () {
  656. this.setState({
  657. loading: false
  658. });
  659. }.bind(this));
  660. },
  661. getTagsArr(e) {
  662. this.setState({ tags: e });
  663. },
  664. getMaturityPictureUrl(e) {
  665. this.setState({ maturityPictureUrl: e });
  666. },
  667. getTechnicalPictureUrl(e) {
  668. this.setState({ technicalPictureUrl: e });
  669. },
  670. handleSubmit(e) {
  671. e.preventDefault();
  672. this.props.form.validateFields((err, values) => {
  673. //keyword长度判断
  674. if (this.state.tags.length < 3) {
  675. message.warning('关键词数量不能小于3个!');
  676. return;
  677. };
  678. //url转化
  679. let theTechnicalPictureUrl = [];
  680. if (this.state.technicalPictureUrl.length) {
  681. let picArr = [];
  682. this.state.technicalPictureUrl.map(function (item) {
  683. picArr.push(item.response.data);
  684. });
  685. theTechnicalPictureUrl = picArr.join(",");
  686. };
  687. let theMaturityPictureUrl = [];
  688. if (this.state.maturityPictureUrl.length) {
  689. let picArr = [];
  690. this.state.maturityPictureUrl.map(function (item) {
  691. picArr.push(item.response.data);
  692. });
  693. theMaturityPictureUrl = picArr.join(",");
  694. };
  695. if (!err) {
  696. this.setState({
  697. loading: true
  698. });
  699. $.ajax({
  700. method: "POST",
  701. dataType: "json",
  702. crossDomain: false,
  703. url: this.props.data.id ? globalConfig.context + '/api/user/achievement/update' : globalConfig.context + '/api/user/achievement/apply',
  704. data: {
  705. id: this.props.data.id,
  706. dataCategory: values.dataCategory,
  707. serialNumber: this.props.data.serialNumber,
  708. name: values.name,
  709. keyword: this.state.tags ? this.state.tags.join(",") : [],
  710. keywords: this.state.tags,
  711. category: values.category,
  712. summary: values.summary,
  713. introduction: values.introduction,
  714. technicalPictureUrl: theTechnicalPictureUrl,
  715. fieldA: values.field ? values.field[0] : undefined,
  716. fieldB: values.field ? values.field[1] : undefined,
  717. maturity: values.maturity,
  718. maturityPictureUrl: theMaturityPictureUrl,
  719. maturityTextFileUrl: this.state.maturityTextFileUrl,
  720. maturityVideoUrl: values.maturityVideoUrl,
  721. innovation: values.innovation,
  722. cooperationMode: values.cooperationMode,
  723. transferMode: values.transferMode,
  724. bargainingMode: values.bargainingMode,
  725. transferPrice: values.transferPrice,
  726. technicalScene: values.technicalScene,
  727. breakthrough: values.breakthrough,
  728. patentCase: values.patentCase,
  729. awards: values.awards,
  730. teamDes: values.teamDes,
  731. parameter: values.parameter,
  732. releaseStatus: values.releaseStatus,
  733. techPlanUrl: this.state.techPlanUrl,
  734. businessPlanUrl: this.state.businessPlanUrl,
  735. auditStatus: this.state.auditStatus
  736. }
  737. }).done(function (data) {
  738. this.state.auditStatus = 0;
  739. if (!data.error.length) {
  740. message.success('保存成功!');
  741. this.setState({
  742. visible: false
  743. });
  744. this.props.handleOk();
  745. } else {
  746. message.warning(data.error[0].message);
  747. }
  748. }.bind(this));
  749. }
  750. });
  751. },
  752. componentWillMount() {
  753. if (this.props.data.id) {
  754. this.loadData(this.props.data.id);
  755. } else {
  756. this.state.data = {};
  757. };
  758. },
  759. componentWillReceiveProps(nextProps) {
  760. if (!this.props.visible && nextProps.visible) {
  761. this.state.textFileList = [];
  762. this.state.techPlanFileList = [];
  763. this.state.businessPlanFileList = [];
  764. if (nextProps.data.id) {
  765. this.loadData(nextProps.data.id);
  766. } else {
  767. this.state.data = {};
  768. this.state.tags = [];
  769. this.state.maturityPictureUrl = [];
  770. this.state.technicalPictureUrl = [];
  771. };
  772. this.props.form.resetFields();
  773. };
  774. },
  775. render() {
  776. const theData = this.state.data || {};
  777. const { getFieldDecorator } = this.props.form;
  778. const FormItem = Form.Item
  779. const formItemLayout = {
  780. labelCol: { span: 8 },
  781. wrapperCol: { span: 14 },
  782. };
  783. return (
  784. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  785. <div className="clearfix">
  786. <FormItem className="half-item"
  787. {...formItemLayout}
  788. label="编号" >
  789. <span>{theData.serialNumber}</span>
  790. </FormItem>
  791. <FormItem className="half-item"
  792. {...formItemLayout}
  793. label="名称" >
  794. {getFieldDecorator('name', {
  795. rules: [{ required: true, message: '此项为必填项!' }],
  796. initialValue: theData.name
  797. })(
  798. <Input />
  799. )}
  800. </FormItem>
  801. <FormItem className="half-item"
  802. {...formItemLayout}
  803. label="数据类别" >
  804. {getFieldDecorator('dataCategory', {
  805. rules: [{ required: true, message: '此项为必填项!' }],
  806. initialValue: theData.dataCategory
  807. })(
  808. <Select placeholder="选择数据类型" style={{ width: 160 }} >
  809. <Select.Option value="0" >成果</Select.Option>
  810. <Select.Option value="1" >技术</Select.Option>
  811. <Select.Option value="2" >项目</Select.Option>
  812. </Select>
  813. )}
  814. </FormItem>
  815. <FormItem className="half-item"
  816. {...formItemLayout}
  817. label="类型" >
  818. {getFieldDecorator('category', {
  819. rules: [{ required: true, message: '此项为必填项!' }],
  820. initialValue: theData.category
  821. })(
  822. <Select style={{ width: 160 }} placeholder="请选择成果类型">
  823. {this.props.achievementCategoryOption}
  824. </Select>
  825. )}
  826. </FormItem>
  827. <div className="clearfix">
  828. <FormItem className="half-item"
  829. {...formItemLayout}
  830. label="是否发布" >
  831. {(() => {
  832. switch (theData.releaseStatus) {
  833. case "0":
  834. return <span>未发布</span>;
  835. case "1":
  836. return <span>已发布</span>;
  837. }
  838. })()}
  839. </FormItem>
  840. <FormItem className="half-item"
  841. {...formItemLayout}
  842. label="发布时间" >
  843. <span>{theData.releaseDateFormattedDate}</span>
  844. </FormItem>
  845. <FormItem className="half-item"
  846. {...formItemLayout}
  847. label="审核状态" >
  848. {(() => {
  849. switch (theData.auditStatus) {
  850. case "0":
  851. return <span>未提交审核(草稿)</span>;
  852. case "1":
  853. return <span>提交审核</span>;
  854. case "2":
  855. return <span>审核中</span>;
  856. case "3":
  857. return <span>审核通过</span>;
  858. case "4":
  859. return <span>审核未通过</span>;
  860. }
  861. })()}
  862. </FormItem>
  863. </div>
  864. </div>
  865. <FormItem
  866. labelCol={{ span: 4 }}
  867. wrapperCol={{ span: 18 }}
  868. label="关键词" >
  869. <KeyWordTagGroup
  870. keyWordArr={this.state.tags}
  871. tagsArr={this.getTagsArr}
  872. visible={this.props.visible} />
  873. </FormItem>
  874. <FormItem
  875. labelCol={{ span: 4 }}
  876. wrapperCol={{ span: 18 }}
  877. label="摘要" >
  878. {getFieldDecorator('summary', {
  879. initialValue: theData.summary
  880. })(
  881. <Input type="textarea" rows={4} />
  882. )}
  883. </FormItem>
  884. <FormItem
  885. labelCol={{ span: 4 }}
  886. wrapperCol={{ span: 18 }}
  887. label="成果简介" >
  888. {getFieldDecorator('introduction', {
  889. initialValue: theData.introduction
  890. })(
  891. <Input type="textarea" rows={4} placeholder="项目成果简介;项目核心创新点;项目详细用途;预期效益说明;主要技术(性能)指标;市场前景;应用范围;发展历程。" />
  892. )}
  893. </FormItem>
  894. <FormItem
  895. labelCol={{ span: 4 }}
  896. wrapperCol={{ span: 18 }}
  897. label="技术图片" >
  898. <PicturesWall
  899. pictureSign="achievement_technical_picture"
  900. fileList={this.getTechnicalPictureUrl}
  901. pictureUrl={this.state.technicalPictureUrl} />
  902. <p>图片建议:专利证书或专利申请书图片、技术图纸、样品图片、技术相关网络图片;成熟度处于非研发阶段的项目,必须上传样品图片,如未上传,成熟度将视为处在研发阶段。</p>
  903. </FormItem>
  904. <FormItem
  905. labelCol={{ span: 4 }}
  906. wrapperCol={{ span: 18 }}
  907. label="应用领域" >
  908. {getFieldDecorator('field', {
  909. rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
  910. initialValue: [theData.fieldA, theData.fieldB]
  911. })(
  912. <Cascader style={{ width: 300 }} options={IndustryObject} placeholder="应用领域" />
  913. )}
  914. </FormItem>
  915. <div className="clearfix">
  916. <FormItem className="half-item"
  917. {...formItemLayout}
  918. label="成熟度" >
  919. {getFieldDecorator('maturity', {
  920. initialValue: theData.maturity
  921. })(
  922. <Select placeholder="选择成熟度" style={{ width: 160 }} >
  923. <Select.Option value="0" >正在研发</Select.Option>
  924. <Select.Option value="1" >已有样品</Select.Option>
  925. <Select.Option value="2" >通过小试</Select.Option>
  926. <Select.Option value="3" >通过中试</Select.Option>
  927. <Select.Option value="4" >可以量产</Select.Option>
  928. </Select>
  929. )}
  930. </FormItem>
  931. <FormItem className="half-item"
  932. {...formItemLayout}
  933. label="创新度" >
  934. {getFieldDecorator('innovation', {
  935. initialValue: theData.innovation
  936. })(
  937. <Select placeholder="选择创新度" style={{ width: 160 }} >
  938. <Select.Option value="0" >行业先进</Select.Option>
  939. <Select.Option value="1" >行业领先</Select.Option>
  940. <Select.Option value="2" >国内先进</Select.Option>
  941. <Select.Option value="3" >国内领先</Select.Option>
  942. <Select.Option value="4" >国际先进</Select.Option>
  943. <Select.Option value="5" >国际领先</Select.Option>
  944. </Select>
  945. )}
  946. </FormItem>
  947. </div>
  948. <FormItem
  949. labelCol={{ span: 4 }}
  950. wrapperCol={{ span: 18 }}
  951. label="成熟度证明材料(图片)" >
  952. <PicturesWall
  953. pictureSign="achievement_maturity_picture"
  954. fileList={this.getMaturityPictureUrl}
  955. pictureUrl={this.state.maturityPictureUrl} />
  956. </FormItem>
  957. <FormItem
  958. labelCol={{ span: 4 }}
  959. wrapperCol={{ span: 6 }}
  960. label="成熟度证明材料(文本)" >
  961. <Upload
  962. name="ratepay"
  963. action={globalConfig.context + "/api/user/achievement/uploadTextFile"}
  964. data={{ 'sign': 'achievement_maturity_text_file' }}
  965. beforeUpload={beforeUploadFile}
  966. fileList={this.state.textFileList}
  967. onChange={(info) => {
  968. if (info.file.status !== 'uploading') {
  969. console.log(info.file, info.fileList);
  970. }
  971. if (info.file.status === 'done') {
  972. if (!info.file.response.error.length) {
  973. message.success(`${info.file.name} 文件上传成功!`);
  974. } else {
  975. message.warning(info.file.response.error[0].message);
  976. return;
  977. };
  978. this.state.maturityTextFileUrl = info.file.response.data;
  979. } else if (info.file.status === 'error') {
  980. message.error(`${info.file.name} 文件上传失败。`);
  981. };
  982. this.setState({ textFileList: info.fileList.slice(-1) });
  983. }} >
  984. <Button><Icon type="upload" /> 上传需求文本文件 </Button>
  985. </Upload>
  986. <p style={{ marginTop: '10px' }}>{theData.maturityTextFileUrl ?
  987. <span className="download-file">
  988. <a onClick={() => { window.open(globalConfig.context + '/api/user/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
  989. </span>
  990. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  991. </FormItem>
  992. <FormItem
  993. labelCol={{ span: 4 }}
  994. wrapperCol={{ span: 18 }}
  995. label="成熟度证明材料(视频地址)" >
  996. {getFieldDecorator('maturityVideoUrl', {
  997. initialValue: theData.maturityVideoUrl
  998. })(
  999. <Input />
  1000. )}
  1001. </FormItem>
  1002. <div className="clearfix">
  1003. <FormItem className="half-item"
  1004. {...formItemLayout}
  1005. label="合作方式" >
  1006. {getFieldDecorator('cooperationMode', {
  1007. rules: [{ required: true, message: '此项为必填项!' }],
  1008. initialValue: theData.cooperationMode
  1009. })(
  1010. <Radio.Group>
  1011. <Radio value="0">技术转让</Radio>
  1012. <Radio value="1">授权生产</Radio>
  1013. </Radio.Group>
  1014. )}
  1015. </FormItem>
  1016. <FormItem className="half-item"
  1017. {...formItemLayout}
  1018. label="转让方式" >
  1019. {getFieldDecorator('transferMode', {
  1020. initialValue: theData.transferMode
  1021. })(
  1022. <Select placeholder="选择转让方式" style={{ width: 160 }} >
  1023. <Select.Option value="0" >完全转让</Select.Option>
  1024. <Select.Option value="1" >许可转让</Select.Option>
  1025. <Select.Option value="2" >技术入股</Select.Option>
  1026. </Select>
  1027. )}
  1028. </FormItem>
  1029. </div>
  1030. <div className="clearfix">
  1031. <FormItem className="half-item"
  1032. {...formItemLayout}
  1033. label="议价方式" >
  1034. {getFieldDecorator('bargainingMode', {
  1035. initialValue: theData.bargainingMode
  1036. })(
  1037. <Radio.Group>
  1038. <Radio value="0">面议</Radio>
  1039. <Radio value="1">定价</Radio>
  1040. </Radio.Group>
  1041. )}
  1042. </FormItem>
  1043. <FormItem className="half-item"
  1044. {...formItemLayout}
  1045. label="转让价格" >
  1046. {getFieldDecorator('transferPrice', {
  1047. initialValue: theData.transferPrice
  1048. })(
  1049. <InputNumber />
  1050. )}
  1051. <span style={{ marginLeft: '20px' }}>万元</span>
  1052. </FormItem>
  1053. </div>
  1054. <FormItem
  1055. labelCol={{ span: 4 }}
  1056. wrapperCol={{ span: 18 }}
  1057. label="技术场景" >
  1058. {getFieldDecorator('technicalScene', {
  1059. initialValue: theData.technicalScene
  1060. })(
  1061. <Input type="textarea" rows={2} placeholder="说明解决了什么问题。" />
  1062. )}
  1063. </FormItem>
  1064. <FormItem
  1065. labelCol={{ span: 4 }}
  1066. wrapperCol={{ span: 18 }}
  1067. label="技术突破" >
  1068. {getFieldDecorator('breakthrough', {
  1069. initialValue: theData.breakthrough
  1070. })(
  1071. <Input type="textarea" rows={2} placeholder="说明该技术成果突破性的研究。" />
  1072. )}
  1073. </FormItem>
  1074. <FormItem
  1075. labelCol={{ span: 4 }}
  1076. wrapperCol={{ span: 18 }}
  1077. label="专利情况" >
  1078. {getFieldDecorator('patentCase', {
  1079. initialValue: theData.patentCase
  1080. })(
  1081. <Input type="textarea" rows={2} placeholder="一个“技术”可能由多个专利构成,需要说明技术-专利的关系。" />
  1082. )}
  1083. </FormItem>
  1084. <FormItem
  1085. labelCol={{ span: 4 }}
  1086. wrapperCol={{ span: 18 }}
  1087. label="获奖情况" >
  1088. {getFieldDecorator('awards', {
  1089. initialValue: theData.awards
  1090. })(
  1091. <Input type="textarea" rows={2} placeholder="一个“技术”可能存在社会奖励情况,需要说明社会奖励情况。" />
  1092. )}
  1093. </FormItem>
  1094. <FormItem
  1095. labelCol={{ span: 4 }}
  1096. wrapperCol={{ span: 18 }}
  1097. label="技术团队情况" >
  1098. {getFieldDecorator('teamDes', {
  1099. initialValue: theData.teamDes
  1100. })(
  1101. <Input type="textarea" rows={2} placeholder="一个“技术”、“项目”可能存在团队,需要说明团队情况。" />
  1102. )}
  1103. </FormItem>
  1104. <FormItem
  1105. labelCol={{ span: 4 }}
  1106. wrapperCol={{ span: 18 }}
  1107. label="技术参数" >
  1108. {getFieldDecorator('parameter', {
  1109. initialValue: theData.parameter
  1110. })(
  1111. <Input type="textarea" rows={2} placeholder="描述技术参数信息" />
  1112. )}
  1113. </FormItem>
  1114. <FormItem
  1115. labelCol={{ span: 4 }}
  1116. wrapperCol={{ span: 6 }}
  1117. label="技术方案" >
  1118. <Upload
  1119. name="ratepay"
  1120. action={globalConfig.context + "/api/user/achievement/uploadTextFile"}
  1121. data={{ 'sign': 'achievement_tech_plan' }}
  1122. beforeUpload={beforeUploadFile}
  1123. fileList={this.state.techPlanFileList}
  1124. onChange={(info) => {
  1125. if (info.file.status !== 'uploading') {
  1126. console.log(info.file, info.fileList);
  1127. }
  1128. if (info.file.status === 'done') {
  1129. if (!info.file.response.error.length) {
  1130. message.success(`${info.file.name} 文件上传成功!`);
  1131. } else {
  1132. message.warning(info.file.response.error[0].message);
  1133. return;
  1134. };
  1135. this.state.techPlanUrl = info.file.response.data;
  1136. } else if (info.file.status === 'error') {
  1137. message.error(`${info.file.name} 文件上传失败。`);
  1138. };
  1139. this.setState({ techPlanFileList: info.fileList.slice(-1) });
  1140. }} >
  1141. <Button><Icon type="upload" /> 上传技术方案文件 </Button>
  1142. </Upload>
  1143. <p style={{ marginTop: '10px' }}>{theData.techPlanUrl ?
  1144. <span className="download-file">
  1145. <a onClick={() => { window.open(globalConfig.context + '/api/user/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
  1146. </span>
  1147. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1148. </FormItem>
  1149. <FormItem
  1150. labelCol={{ span: 4 }}
  1151. wrapperCol={{ span: 6 }}
  1152. label="商业计划书" >
  1153. <Upload
  1154. name="ratepay"
  1155. action={globalConfig.context + "/api/user/achievement/uploadTextFile"}
  1156. data={{ 'sign': 'achievement_business_plan' }}
  1157. beforeUpload={beforeUploadFile}
  1158. fileList={this.state.businessPlanFileList}
  1159. onChange={(info) => {
  1160. if (info.file.status !== 'uploading') {
  1161. console.log(info.file, info.fileList);
  1162. }
  1163. if (info.file.status === 'done') {
  1164. if (!info.file.response.error.length) {
  1165. message.success(`${info.file.name} 文件上传成功!`);
  1166. } else {
  1167. message.warning(info.file.response.error[0].message);
  1168. return;
  1169. };
  1170. this.state.businessPlanUrl = info.file.response.data;
  1171. } else if (info.file.status === 'error') {
  1172. message.error(`${info.file.name} 文件上传失败。`);
  1173. };
  1174. this.setState({ businessPlanFileList: info.fileList.slice(-1) });
  1175. }} >
  1176. <Button><Icon type="upload" /> 上传商业计划书文件 </Button>
  1177. </Upload>
  1178. <p style={{ marginTop: '10px' }}>{theData.businessPlanUrl ?
  1179. <span className="download-file">
  1180. <a onClick={() => { window.open(globalConfig.context + '/api/user/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
  1181. </span>
  1182. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1183. </FormItem>
  1184. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  1185. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1186. <Button className="set-submit" type="ghost" onClick={(e) => { this.state.auditStatus = 1; }} htmlType="submit">发布</Button>
  1187. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  1188. </FormItem>
  1189. </Form >
  1190. )
  1191. }
  1192. }));
  1193. const AchievementDetail = React.createClass({
  1194. getInitialState() {
  1195. return {
  1196. visible: false
  1197. };
  1198. },
  1199. showModal() {
  1200. this.setState({
  1201. visible: true,
  1202. });
  1203. },
  1204. handleCancel(e) {
  1205. this.setState({
  1206. visible: false,
  1207. });
  1208. this.props.closeDesc(false);
  1209. },
  1210. handleOk(e) {
  1211. this.setState({
  1212. visible: false,
  1213. });
  1214. this.props.closeDesc(false, true);
  1215. },
  1216. componentWillReceiveProps(nextProps) {
  1217. this.state.visible = nextProps.showDesc;
  1218. },
  1219. render() {
  1220. if (this.props.data) {
  1221. return (
  1222. <div className="patent-desc">
  1223. <Modal maskClosable={false} title="成果详情" visible={this.state.visible}
  1224. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  1225. width='1000px'
  1226. footer=''
  1227. className="admin-desc-content">
  1228. {(() => {
  1229. if (this.props.data.auditStatus && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
  1230. return <AchievementDetailShow
  1231. data={this.props.data}
  1232. closeDesc={this.handleCancel}
  1233. visible={this.state.visible}
  1234. handleOk={this.handleOk} />
  1235. } else {
  1236. return <AchievementDetailForm
  1237. data={this.props.data}
  1238. achievementCategoryOption={this.props.achievementCategoryOption}
  1239. closeDesc={this.handleCancel}
  1240. visible={this.state.visible}
  1241. handleOk={this.handleOk} />
  1242. }
  1243. })()}
  1244. </Modal>
  1245. </div>
  1246. );
  1247. } else {
  1248. return <div></div>
  1249. }
  1250. },
  1251. });
  1252. export default AchievementDetail;