activity.jsx 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. import React from 'react';
  2. import { Icon, Button, Spin, message, Table, Input, Modal, DatePicker, Upload, Select } from 'antd';
  3. import { beforeUpload, getBase64, getActivityForm, getActivityType, splitUrl } from '../../../tools';
  4. import { activityForm, activityType } from '../../../dataDic';
  5. import moment from 'moment';
  6. import ajax from 'jquery/src/ajax/xhr.js';
  7. import $ from 'jquery/src/ajax';
  8. const Avatar = React.createClass({
  9. getInitialState() {
  10. return {
  11. imageUrl: ''
  12. }
  13. },
  14. handleChange(info) {
  15. if (info.file.status === 'done') {
  16. // Get this url from response in real world.
  17. getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
  18. this.props.urlData(info.file.response.data);
  19. }
  20. },
  21. componentWillReceiveProps(nextProps) {
  22. if (this.props.visible && !nextProps.visible) {
  23. this.state.imageUrl = null;
  24. };
  25. },
  26. render() {
  27. const imageUrl = this.state.imageUrl;
  28. return (
  29. <Upload
  30. className="avatar-uploader"
  31. name={this.props.name}
  32. showUploadList={false}
  33. action={globalConfig.context + "/api/admin/activity/upload"}
  34. data={{ 'sign': 'activity_title_picture' }}
  35. beforeUpload={beforeUpload}
  36. onChange={this.handleChange} >
  37. {
  38. (imageUrl || this.props.imageUrl) ?
  39. <img src={imageUrl || this.props.imageUrl} role="presentation" id={this.props.name} /> :
  40. <Icon type="plus" className="avatar-uploader-trigger" />
  41. }
  42. </Upload>
  43. );
  44. }
  45. });
  46. const PicturesWall = React.createClass({
  47. getInitialState() {
  48. return {
  49. previewVisible: false,
  50. previewImage: '',
  51. fileList: [],
  52. }
  53. },
  54. handleCancel() {
  55. this.setState({ previewVisible: false })
  56. },
  57. handlePreview(file) {
  58. this.setState({
  59. previewImage: file.url || file.thumbUrl,
  60. previewVisible: true,
  61. });
  62. },
  63. handleChange(info) {
  64. let fileList = info.fileList;
  65. this.setState({ fileList });
  66. this.props.fileList(fileList);
  67. },
  68. componentWillReceiveProps(nextProps) {
  69. this.state.fileList = nextProps.pictureUrl;
  70. },
  71. render() {
  72. const { previewVisible, previewImage, fileList } = this.state;
  73. const uploadButton = (
  74. <div>
  75. <Icon type="plus" />
  76. <div className="ant-upload-text">点击上传</div>
  77. </div>
  78. );
  79. return (
  80. <div className="clearfix">
  81. <Upload
  82. action={globalConfig.context + "/api/admin/activity/upload"}
  83. data={{ 'sign': 'activity_content_picture' }}
  84. listType="picture-card"
  85. fileList={fileList}
  86. onPreview={this.handlePreview}
  87. onChange={this.handleChange} >
  88. {fileList.length >= 5 ? null : uploadButton}
  89. </Upload>
  90. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  91. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  92. </Modal>
  93. </div>
  94. );
  95. }
  96. });
  97. const Activity = React.createClass({
  98. loadData(pageNo) {
  99. this.setState({
  100. loading: true
  101. });
  102. $.ajax({
  103. method: "get",
  104. dataType: "json",
  105. crossDomain: false,
  106. url: globalConfig.context + '/api/admin/activity/list',
  107. data: {
  108. pageNo: pageNo || 1,
  109. pageSize: this.state.pagination.pageSize,
  110. sTime: this.state.startDate, //活动开始时间(startTime起)
  111. eTime: this.state.endDate, //活动开始时间(startTime止)
  112. name: this.state.searchName,
  113. host: this.state.searchHost,
  114. type: this.state.searchType ? Number(this.state.searchType) : undefined, // 活动类型
  115. form: this.state.searchForm ? Number(this.state.searchForm) : undefined, //活动形式
  116. },
  117. success: function (data) {
  118. let theArr = [];
  119. if (!data.data || !data.data.list) {
  120. if (data.error && data.error.length) {
  121. message.warning(data.error[0].message);
  122. };
  123. } else {
  124. for (let i = 0; i < data.data.list.length; i++) {
  125. let thisdata = data.data.list[i];
  126. theArr.push({
  127. key: i,
  128. id: thisdata.id,
  129. startTime: thisdata.startTime,
  130. startTimeFormattedDate: thisdata.startTimeFormattedDate,
  131. endTime: thisdata.endTime,
  132. endTimeFormattedDate: thisdata.endTimeFormattedDate,
  133. name: thisdata.name,
  134. host: thisdata.host,
  135. type: thisdata.type,
  136. form: thisdata.form,
  137. enrollDeadline: thisdata.enrollDeadline,
  138. enrollDeadlineFormattedDate: thisdata.enrollDeadlineFormattedDate
  139. });
  140. };
  141. this.state.pagination.current = data.data.pageNo;
  142. this.state.pagination.total = data.data.totalCount;
  143. };
  144. this.setState({
  145. tableData: theArr,
  146. pagination: this.state.pagination
  147. });
  148. }.bind(this),
  149. }).always(function () {
  150. this.setState({
  151. loading: false
  152. });
  153. }.bind(this));
  154. },
  155. loadDetailData() {
  156. this.setState({
  157. loading: true
  158. });
  159. $.ajax({
  160. method: "get",
  161. dataType: "json",
  162. crossDomain: false,
  163. url: globalConfig.context + '/api/admin/activity/detail',
  164. data: {
  165. id: this.state.RowData.id //新闻主键ID(数字类型,非字符串)
  166. },
  167. success: function (data) {
  168. let theObj = {}, theArr = [];
  169. if (!data.data) {
  170. if (data.error && data.error.length) {
  171. message.warning(data.error[0].message);
  172. };
  173. } else {
  174. theObj = data.data;
  175. theArr = theObj.asist ? theObj.asist.split(',') : [];
  176. theObj.imgUrls = theObj.imgUrls ? splitUrl(theObj.imgUrls, ',', globalConfig.avatarHost + '/upload') : [];
  177. };
  178. this.setState({
  179. RowData: theObj,
  180. asistArray: theArr
  181. });
  182. }.bind(this),
  183. }).always(function () {
  184. this.setState({
  185. loading: false
  186. });
  187. }.bind(this));
  188. },
  189. getInitialState() {
  190. return {
  191. loading: false,
  192. visible: false,
  193. selectedRowKeys: [],
  194. selectedRows: [],
  195. asistArray: [],
  196. keysObj: {},
  197. RowData: {},
  198. pagination: {
  199. defaultCurrent: 1,
  200. defaultPageSize: 10,
  201. showQuickJumper: true,
  202. pageSize: 10,
  203. onChange: function (page) {
  204. this.loadData(page);
  205. }.bind(this),
  206. showTotal: function (total) {
  207. return '共' + total + '条数据';
  208. }
  209. },
  210. columns: [
  211. {
  212. title: '活动名称',
  213. dataIndex: 'name',
  214. key: 'name',
  215. width: '20%'
  216. }, {
  217. title: '主办单位',
  218. dataIndex: 'host',
  219. key: 'host',
  220. }, {
  221. title: '活动类型',
  222. dataIndex: 'type',
  223. key: 'type',
  224. render: (text) => { return getActivityType(text); }
  225. }, {
  226. title: '活动形式',
  227. dataIndex: 'form',
  228. key: 'form',
  229. render: (text) => { return getActivityForm(text); }
  230. }, {
  231. title: '报名截止时间',
  232. dataIndex: 'enrollDeadlineFormattedDate',
  233. key: 'enrollDeadlineFormattedDate'
  234. }, {
  235. title: '活动开始时间',
  236. dataIndex: 'startTimeFormattedDate',
  237. key: 'startTimeFormattedDate'
  238. }
  239. ],
  240. tableData: []
  241. };
  242. },
  243. tableRowClick(record, index) {
  244. this.state.RowData = record;
  245. this.loadDetailData();
  246. this.setState({
  247. visible: true
  248. });
  249. },
  250. componentWillMount() {
  251. this.loadData();
  252. let theTypeOption = [], theFormOption = [];
  253. activityType.map((item) => {
  254. theTypeOption.push(
  255. <Select.Option key={item.value}>{item.key}</Select.Option>
  256. )
  257. });
  258. activityForm.map((item) => {
  259. theFormOption.push(
  260. <Select.Option key={item.value}>{item.key}</Select.Option>
  261. )
  262. });
  263. this.state.activityTypeOption = theTypeOption;
  264. this.state.activityFormOption = theFormOption;
  265. },
  266. submit() {
  267. if (!this.state.RowData.name) {
  268. message.warning('必须填写一个标题!');
  269. return;
  270. };
  271. if (!this.state.RowData.startTimeFormattedDate) {
  272. message.warning('必须选择一个活动开始时间!');
  273. return;
  274. };
  275. if (!this.state.RowData.type) {
  276. message.warning('必须选择一个活动类型!');
  277. return;
  278. };
  279. if (!this.state.RowData.form) {
  280. message.warning('必须选择一个活动形式!');
  281. return;
  282. };
  283. if (!this.state.RowData.address) {
  284. message.warning('必须选择一个活动地点!');
  285. return;
  286. };
  287. let imgUrls = null;
  288. if (this.state.RowData.imgUrls.length) {
  289. let picArr = [];
  290. this.state.RowData.imgUrls.map(function (item) {
  291. picArr.push(item.response.data);
  292. });
  293. imgUrls = picArr.join(",");
  294. };
  295. this.setState({
  296. loading: true
  297. });
  298. $.ajax({
  299. method: "post",
  300. dataType: "json",
  301. crossDomain: false,
  302. url: globalConfig.context + (this.state.RowData.id ? '/api/admin/activity/update' : '/api/admin/activity/add'),
  303. data: {
  304. id: this.state.RowData.id || null, //主键,如果不填主键则为新增记录,填主键则为更新
  305. name: this.state.RowData.name,// 标题,
  306. address: this.state.RowData.address,// 活动地址,
  307. host: this.state.RowData.host,// 主办单位,
  308. undertake: this.state.RowData.undertake,// 承办单位,
  309. asist: this.state.asistArray ? this.state.asistArray.join(',') : undefined,// 协办单位A,协办单位B,
  310. type: this.state.RowData.type,// 0, //活动类型
  311. form: this.state.RowData.form,// 1, //活动形式
  312. imgUrls: imgUrls,// 活动图片,
  313. result: this.state.RowData.result,// 活动结果,
  314. titleUrl: this.state.RowData.titleUrl,// 题图URL,
  315. summary: this.state.RowData.summary,// 描述,
  316. startTimeFormattedDate: this.state.RowData.startTimeFormattedDate,// 2012-02-02, //活动开始时间 yyyy-MM-dd
  317. endTimeFormattedDate: this.state.RowData.endTimeFormattedDate,// 2012-09-09, //活动结束时间 yyyy-MM-dd
  318. enrollDeadlineFormattedDate: this.state.RowData.enrollDeadlineFormattedDate,// 2012-09-09, //报名结束时间 yyyy-MM-dd
  319. },
  320. success: function (data) {
  321. if (data.error && data.error.length) {
  322. message.warning(data.error[0].message);
  323. } else {
  324. message.success('保存成功!');
  325. this.setState({ visible: false });
  326. this.loadData();
  327. };
  328. }.bind(this),
  329. }).always(function () {
  330. this.setState({
  331. loading: false
  332. });
  333. }.bind(this));
  334. },
  335. delectRow() {
  336. let deletedIds = [];
  337. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  338. let rowItem = this.state.selectedRows[idx];
  339. if (rowItem.id) {
  340. deletedIds.push(rowItem.id)
  341. };
  342. };
  343. this.setState({
  344. selectedRowKeys: [],
  345. loading: deletedIds.length > 0
  346. });
  347. $.ajax({
  348. method: "POST",
  349. dataType: "json",
  350. crossDomain: false,
  351. url: globalConfig.context + "/api/admin/activity/delete",
  352. data: {
  353. ids: deletedIds
  354. }
  355. }).done(function (data) {
  356. if (data.error && data.error.length) {
  357. message.warning(data.error[0].message);
  358. } else {
  359. message.success('删除成功!');
  360. };
  361. this.setState({
  362. loading: false,
  363. });
  364. this.loadData();
  365. }.bind(this));
  366. },
  367. reset() {
  368. this.state.startDate = undefined;
  369. this.state.endDate = undefined;
  370. this.state.searchName = undefined;
  371. this.state.searchHost = undefined;
  372. this.state.searchType = undefined;
  373. this.state.searchForm = undefined;
  374. this.loadData();
  375. },
  376. render() {
  377. const rowSelection = {
  378. selectedRowKeys: this.state.selectedRowKeys,
  379. onChange: (selectedRowKeys, selectedRows) => {
  380. this.setState({
  381. selectedRows: selectedRows.slice(-1),
  382. selectedRowKeys: selectedRowKeys.slice(-1)
  383. });
  384. }
  385. };
  386. const hasSelected = this.state.selectedRowKeys.length > 0;
  387. return (
  388. <div className="admin-content" >
  389. <div className="admin-content-title">
  390. <span>活动圈管理</span>
  391. <Button type="primary" style={{ float: 'right' }}
  392. onClick={() => { this.setState({ RowData: {}, visible: true }) }}>
  393. 添加<Icon type="plus" />
  394. </Button>
  395. </div>
  396. <div className="admin-content-warp">
  397. <div className="admin-content-search">
  398. <Input placeholder="活动名称" style={{ width: 200 }}
  399. value={this.state.searchName}
  400. onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
  401. <Input placeholder="主办单位" style={{ width: 200 }}
  402. value={this.state.searchHost}
  403. onChange={(e) => { this.setState({ searchHost: e.target.value }); }} />
  404. <Select placeholder="活动类型"
  405. style={{ width: 100 }}
  406. value={this.state.searchType}
  407. onChange={(e) => { this.setState({ searchType: e }) }}>
  408. {this.state.activityTypeOption}
  409. </Select>
  410. <Select placeholder="活动形式"
  411. style={{ width: 100 }}
  412. value={this.state.searchForm}
  413. onChange={(e) => { this.setState({ searchForm: e }) }}>
  414. {this.state.activityFormOption}
  415. </Select>
  416. <span>活动时间</span>
  417. <DatePicker style={{ width: 150 }}
  418. showTime
  419. format="YYYY-MM-DD HH:mm:ss"
  420. placeholder="搜索开始时间"
  421. value={this.state.startDate ? moment(this.state.startDate, "YYYY-MM-DD HH:mm:ss") : undefined}
  422. onChange={(t, str) => {
  423. this.setState({ startDate: str });
  424. }} />
  425. <span>到</span>
  426. <DatePicker style={{ width: 150 }}
  427. showTime
  428. format="YYYY-MM-DD HH:mm:ss"
  429. placeholder="搜索结束时间"
  430. value={this.state.endDate ? moment(this.state.endDate, "YYYY-MM-DD HH:mm:ss") : undefined}
  431. onChange={(t, str) => {
  432. this.setState({ endDate: str });
  433. }} />
  434. <Button type="primary" onClick={() => { this.loadData() }}>搜索</Button>
  435. <Button onClick={this.reset}>重置</Button>
  436. <Button type='danger' disabled={!hasSelected} onClick={this.delectRow}>
  437. 删除<Icon type="minus" />
  438. </Button>
  439. </div>
  440. <Spin spinning={this.state.loading}>
  441. <Table className="no-all-select" columns={this.state.columns}
  442. dataSource={this.state.tableData}
  443. pagination={this.state.pagination}
  444. rowSelection={rowSelection}
  445. onRowClick={this.tableRowClick} />
  446. </Spin>
  447. </div>
  448. <Modal title="活动详情" width={600} className="activity-modal"
  449. visible={this.state.visible}
  450. maskClosable={false}
  451. footer={null}
  452. afterClose={() => { this.state.RowData = {}; this.state.asist = null; this.state.asistArray = []; }}
  453. onCancel={() => { this.setState({ visible: false }) }} >
  454. <Spin spinning={this.state.loading}>
  455. <div className="clearfix">
  456. <div className="modal-box">
  457. <span className="modal-box-title">活动标题</span>
  458. <div className="modal-box-detail">
  459. <Input value={this.state.RowData.name}
  460. onChange={(e) => {
  461. this.state.RowData.name = e.target.value;
  462. this.setState({ RowData: this.state.RowData });
  463. }} />
  464. </div>
  465. </div>
  466. <div className="modal-box">
  467. <span className="modal-box-title">标题图片</span>
  468. <div className="modal-box-detail clearfix" style={{ width: '360px' }}>
  469. <Avatar visible={this.state.visible}
  470. imageUrl={this.state.RowData.titleUrl ? (globalConfig.avatarHost + "/upload" + this.state.RowData.titleUrl) : null}
  471. urlData={(url) => { this.state.RowData.titleUrl = url }} />
  472. </div>
  473. </div>
  474. <div className="modal-box">
  475. <span className="modal-box-title">活动描述</span>
  476. <div className="modal-box-detail">
  477. <Input type="textarea" rows={4} value={this.state.RowData.summary}
  478. onChange={(e) => {
  479. this.state.RowData.summary = e.target.value;
  480. this.setState({ RowData: this.state.RowData });
  481. }} />
  482. </div>
  483. </div>
  484. <div className="modal-box">
  485. <span className="modal-box-title">活动类型</span>
  486. <div className="modal-box-detail" style={{ width: '160px' }}>
  487. <Select placeholder="选择活动类型"
  488. style={{ width: 120 }}
  489. value={this.state.RowData.type}
  490. onChange={(e) => {
  491. this.state.RowData.type = e;
  492. this.setState({ RowData: this.state.RowData });
  493. }}>
  494. {this.state.activityTypeOption}
  495. </Select>
  496. </div>
  497. <span className="modal-box-title">活动形式</span>
  498. <div className="modal-box-detail" style={{ width: '160px' }}>
  499. <Select placeholder="选择活动形式"
  500. style={{ width: 120 }}
  501. value={this.state.RowData.form}
  502. onChange={(e) => {
  503. this.state.RowData.form = e;
  504. this.setState({ RowData: this.state.RowData });
  505. }}>
  506. {this.state.activityFormOption}
  507. </Select>
  508. </div>
  509. </div>
  510. <div className="modal-box">
  511. <span className="modal-box-title">活动地址</span>
  512. <div className="modal-box-detail">
  513. <Input value={this.state.RowData.address}
  514. onChange={(e) => {
  515. this.state.RowData.address = e.target.value;
  516. this.setState({ RowData: this.state.RowData });
  517. }} />
  518. </div>
  519. </div>
  520. <div className="modal-box">
  521. <span className="modal-box-title">主办单位</span>
  522. <div className="modal-box-detail">
  523. <Input value={this.state.RowData.host}
  524. onChange={(e) => {
  525. this.state.RowData.host = e.target.value;
  526. this.setState({ RowData: this.state.RowData });
  527. }} />
  528. </div>
  529. </div>
  530. <div className="modal-box">
  531. <span className="modal-box-title">承办单位</span>
  532. <div className="modal-box-detail">
  533. <Input value={this.state.RowData.undertake}
  534. onChange={(e) => {
  535. this.state.RowData.undertake = e.target.value;
  536. this.setState({ RowData: this.state.RowData });
  537. }} />
  538. </div>
  539. </div>
  540. <div className="modal-box">
  541. <span className="modal-box-title">协办单位</span>
  542. <div className="modal-box-detail">
  543. <Input value={this.state.asist} style={{ width: '320px', marginRight: '20px' }}
  544. onChange={(e) => { this.setState({ asist: e.target.value }); }} />
  545. <Button onClick={() => {
  546. let _me = this, theArr = this.state.asistArray.concat(), theBool = true;
  547. if (!theArr.length) {
  548. theArr.push(this.state.asist);
  549. } else {
  550. this.state.asistArray.map((item, i) => {
  551. if (item === _me.state.asist) {
  552. theBool = false;
  553. };
  554. });
  555. if (theBool) {
  556. theArr.push(_me.state.asist);
  557. } else {
  558. message.warning('已经录入该单位!')
  559. }
  560. };
  561. this.setState({ asistArray: theArr, asist: null });
  562. }}>添加</Button>
  563. </div>
  564. <div className="modal-box-detail" style={{ marginLeft: '106px' }}>
  565. {this.state.asistArray.map((item, i) => {
  566. return <p key={i}>{item}</p>
  567. })}
  568. </div>
  569. </div>
  570. <div className="modal-box">
  571. <span className="modal-box-title">活动时间</span>
  572. <div className="modal-box-detail">
  573. <DatePicker style={{ width: '150px' }}
  574. showTime
  575. format="YYYY-MM-DD HH:mm:ss"
  576. placeholder="选择开始时间"
  577. value={this.state.RowData.startTimeFormattedDate ? moment(this.state.RowData.startTimeFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
  578. onChange={(t, str) => {
  579. this.state.RowData.startTimeFormattedDate = str;
  580. this.setState({ RowData: this.state.RowData });
  581. }} />
  582. <span>到</span>
  583. <DatePicker style={{ width: '150px' }}
  584. showTime
  585. format="YYYY-MM-DD HH:mm:ss"
  586. placeholder="选择结束时间"
  587. value={this.state.RowData.endTimeFormattedDate ? moment(this.state.RowData.endTimeFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
  588. onChange={(t, str) => {
  589. this.state.RowData.endTimeFormattedDate = str;
  590. this.setState({ RowData: this.state.RowData });
  591. }} />
  592. </div>
  593. </div>
  594. <div className="modal-box">
  595. <span className="modal-box-title">报名截止时间</span>
  596. <div className="modal-box-detail">
  597. <DatePicker style={{ width: '150px' }}
  598. showTime
  599. format="YYYY-MM-DD HH:mm:ss"
  600. placeholder="选择截止时间"
  601. value={this.state.RowData.enrollDeadlineFormattedDate ? moment(this.state.RowData.enrollDeadlineFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
  602. onChange={(t, str) => {
  603. this.state.RowData.enrollDeadlineFormattedDate = str;
  604. this.setState({ RowData: this.state.RowData });
  605. }} />
  606. </div>
  607. </div>
  608. <div className="modal-box">
  609. <span className="modal-box-title">活动图片</span>
  610. <div className="modal-box-detail">
  611. <PicturesWall
  612. fileList={(e) => { this.state.RowData.imgUrls = e; this.setState({ RowData: this.state.RowData }); }}
  613. pictureUrl={this.state.RowData.imgUrls || []} />
  614. </div>
  615. </div>
  616. <div className="modal-box">
  617. <span className="modal-box-title">活动结果描述</span>
  618. <div className="modal-box-detail">
  619. <Input type="textarea" rows={4} value={this.state.RowData.result}
  620. onChange={(e) => {
  621. this.state.RowData.result = e.target.value;
  622. this.setState({ RowData: this.state.RowData });
  623. }} />
  624. </div>
  625. </div>
  626. </div>
  627. <div className="modal-box">
  628. <Button type="primary" onClick={this.submit}>提交</Button>
  629. <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>
  630. </div>
  631. </Spin>
  632. </Modal>
  633. </div >
  634. );
  635. }
  636. });
  637. export default Activity;