lecture.jsx 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. import React from 'react';
  2. import { Icon, Button, Spin, message, Table, Cascader, Input, Modal, DatePicker, Upload, Checkbox } from 'antd';
  3. import { techFieldList, getTechField } from '../../../DicTechFieldList';
  4. import { beforeUpload, getBase64 } from '../../../tools';
  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.uid != nextProps.uid) {
  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/lecture/upload"}
  34. data={{ 'uid': this.props.uid, 'sign': 'lecture_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 Lecture = React.createClass({
  47. loadLectureData(pageNo) {
  48. this.setState({
  49. loading: true
  50. });
  51. $.ajax({
  52. method: "get",
  53. dataType: "json",
  54. crossDomain: false,
  55. url: globalConfig.context + '/api/admin/lecture/list',
  56. data: {
  57. pageNo: pageNo || 1,
  58. pageSize: this.state.lecturePagination.pageSize,
  59. username: this.state.searchLectureUser, //用户名称
  60. name: this.state.searchLectureName, //讲座名称
  61. startLectureTime: this.state.startLectureTime,
  62. endLectureTime: this.state.endLectureTime
  63. },
  64. success: function (data) {
  65. let theArr = [];
  66. if (!data.data || !data.data.list) {
  67. if (data.error && data.error.length) {
  68. message.warning(data.error[0].message);
  69. };
  70. } else {
  71. for (let i = 0; i < data.data.list.length; i++) {
  72. let thisdata = data.data.list[i];
  73. theArr.push({
  74. key: i,
  75. id: thisdata.id,
  76. uid: thisdata.uid,
  77. lectureTime: thisdata.lectureTime,
  78. lecturer: thisdata.lecturer,
  79. endTime: thisdata.endTime,
  80. name: thisdata.name,
  81. summary: thisdata.summary,
  82. username: thisdata.username,
  83. lectureUrl: thisdata.lectureUrl,
  84. lectureTimeFormattedDate: thisdata.lectureTimeFormattedDate,
  85. endTimeFormattedDate: thisdata.endTimeFormattedDate,
  86. hot: thisdata.hot,
  87. dynamic: thisdata.dynamic
  88. });
  89. };
  90. this.state.lecturePagination.current = data.data.pageNo;
  91. this.state.lecturePagination.total = data.data.totalCount;
  92. };
  93. this.setState({
  94. lectureTableData: theArr,
  95. lecturePagination: this.state.lecturePagination
  96. });
  97. }.bind(this),
  98. }).always(function () {
  99. this.setState({
  100. loading: false
  101. });
  102. }.bind(this));
  103. },
  104. loadHotData() {
  105. this.setState({
  106. loading: true
  107. });
  108. $.ajax({
  109. method: "get",
  110. dataType: "json",
  111. crossDomain: false,
  112. url: globalConfig.context + '/api/admin/lecture/hotList',
  113. success: function (data) {
  114. let theArr = [];
  115. if (!data.data) {
  116. if (data.error && data.error.length) {
  117. message.warning(data.error[0].message);
  118. };
  119. } else {
  120. for (let i = 0; i < data.data.length; i++) {
  121. let thisdata = data.data[i];
  122. theArr.push({
  123. key: i,
  124. id: thisdata.id,
  125. uid: thisdata.uid,
  126. lectureTime: thisdata.lectureTime,
  127. lecturer: thisdata.lecturer,
  128. endTime: thisdata.endTime,
  129. name: thisdata.name,
  130. summary: thisdata.summary,
  131. username: thisdata.username,
  132. lectureUrl: thisdata.lectureUrl,
  133. lectureTimeFormattedDate: thisdata.lectureTimeFormattedDate,
  134. endTimeFormattedDate: thisdata.endTimeFormattedDate,
  135. hot: thisdata.hot,
  136. dynamic: thisdata.dynamic
  137. });
  138. };
  139. };
  140. this.setState({
  141. hotTableData: theArr
  142. });
  143. }.bind(this),
  144. }).always(function () {
  145. this.setState({
  146. loading: false
  147. });
  148. }.bind(this));
  149. },
  150. loadDynamicData() {
  151. this.setState({
  152. loading: true
  153. });
  154. $.ajax({
  155. method: "get",
  156. dataType: "json",
  157. crossDomain: false,
  158. url: globalConfig.context + '/api/admin/lecture/dynamic',
  159. success: function (data) {
  160. let theArr = [];
  161. if (!data.data) {
  162. if (data.error && data.error.length) {
  163. message.warning(data.error[0].message);
  164. };
  165. } else {
  166. for (let i = 0; i < data.data.length; i++) {
  167. let thisdata = data.data[i];
  168. theArr.push({
  169. key: i,
  170. id: thisdata.id,
  171. uid: thisdata.uid,
  172. lectureTime: thisdata.lectureTime,
  173. lecturer: thisdata.lecturer,
  174. endTime: thisdata.endTime,
  175. name: thisdata.name,
  176. summary: thisdata.summary,
  177. username: thisdata.username,
  178. lectureUrl: thisdata.lectureUrl,
  179. lectureTimeFormattedDate: thisdata.lectureTimeFormattedDate,
  180. endTimeFormattedDate: thisdata.endTimeFormattedDate,
  181. hot: thisdata.hot,
  182. dynamic: thisdata.dynamic
  183. });
  184. };
  185. };
  186. this.setState({
  187. dynamicTableData: theArr
  188. });
  189. }.bind(this),
  190. }).always(function () {
  191. this.setState({
  192. loading: false
  193. });
  194. }.bind(this));
  195. },
  196. loadData() {
  197. this.loadLectureData();
  198. this.loadHotData();
  199. this.loadDynamicData();
  200. },
  201. getInitialState() {
  202. return {
  203. loading: false,
  204. addVisible: false,
  205. addModal: {},
  206. selectedRowKeys: [],
  207. selectedRows: [],
  208. lecturePagination: {
  209. defaultCurrent: 1,
  210. defaultPageSize: 10,
  211. showQuickJumper: true,
  212. pageSize: 10,
  213. onChange: function (page) {
  214. this.loadLectureData(page);
  215. }.bind(this),
  216. showTotal: function (total) {
  217. return '共' + total + '条数据';
  218. }
  219. },
  220. lectureColumns: [
  221. {
  222. title: '讲堂名称',
  223. dataIndex: 'name',
  224. key: 'name',
  225. }, {
  226. title: '开讲人姓名',
  227. dataIndex: 'lecturer',
  228. key: 'lecturer',
  229. }, {
  230. title: '描述',
  231. dataIndex: 'summary',
  232. key: 'summary',
  233. width: '50%'
  234. }, {
  235. title: '开始时间',
  236. dataIndex: 'lectureTimeFormattedDate',
  237. key: 'lectureTimeFormattedDate',
  238. }, {
  239. title: '结束时间',
  240. dataIndex: 'endTimeFormattedDate',
  241. key: 'endTimeFormattedDate',
  242. }, {
  243. title: '展示图',
  244. dataIndex: 'lectureUrl',
  245. key: 'lectureUrl',
  246. render: text => {
  247. if (text) {
  248. return '已上传'
  249. } else {
  250. return '未上传'
  251. };
  252. }
  253. }
  254. ],
  255. userTableData: [],
  256. lectureTableData: [],
  257. hotTableData: [],
  258. dynamicTableData: []
  259. };
  260. },
  261. delectRow() {
  262. let deletedIds = [];
  263. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  264. let rowItem = this.state.selectedRows[idx];
  265. if (rowItem.id) {
  266. deletedIds.push(rowItem.id)
  267. };
  268. };
  269. this.setState({
  270. selectedRowKeys: [],
  271. loading: deletedIds.length > 0
  272. });
  273. $.ajax({
  274. method: "POST",
  275. dataType: "json",
  276. crossDomain: false,
  277. url: globalConfig.context + "/api/admin/lecture/delete",
  278. data: {
  279. ids: deletedIds
  280. }
  281. }).done(function (data) {
  282. if (data.error && data.error.length) {
  283. message.warning(data.error[0].message);
  284. } else {
  285. message.success('删除成功!');
  286. this.loadData();
  287. };
  288. this.setState({
  289. loading: false,
  290. });
  291. }.bind(this));
  292. },
  293. componentWillMount() {
  294. this.loadData();
  295. },
  296. submit() {
  297. this.setState({
  298. loading: true
  299. });
  300. $.ajax({
  301. method: "post",
  302. dataType: "json",
  303. crossDomain: false,
  304. url: globalConfig.context + (this.state.addModal.id ? '/api/admin/lecture/update' : '/api/admin/lecture/add'),
  305. data: {
  306. 'id': this.state.addModal.id,
  307. "uid": this.state.addModal.uid,
  308. "lecturer": this.state.addModal.lecturer,
  309. "name": this.state.addModal.name,
  310. "summary": this.state.addModal.summary,
  311. "lectureUrl": this.state.addModal.lectureUrl,
  312. "lectureTimeFormattedDate": this.state.addModal.lectureTimeFormattedDate,
  313. "endTimeFormattedDate": this.state.addModal.endTimeFormattedDate,
  314. "hot": this.state.addModal.showBig ? 1 : 0,
  315. "dynamic": this.state.addModal.showStar ? 1 : 0
  316. },
  317. success: function (data) {
  318. if (data.error && data.error.length) {
  319. message.warning(data.error[0].message);
  320. } else {
  321. message.success('保存成功!');
  322. this.setState({ addVisible: false });
  323. this.loadData();
  324. };
  325. }.bind(this),
  326. }).always(function () {
  327. this.setState({
  328. loading: false
  329. });
  330. }.bind(this));
  331. },
  332. cleanCache(sign) {
  333. this.setState({
  334. loading: true
  335. });
  336. $.ajax({
  337. method: "post",
  338. dataType: "json",
  339. crossDomain: false,
  340. url: globalConfig.context + '/api/admin/lecture/cleanCache',
  341. data: {
  342. 'cacheKey': sign
  343. },
  344. success: function (data) {
  345. if (data.error && data.error.length) {
  346. message.warning(data.error[0].message);
  347. } else {
  348. message.success('清除缓存成功!');
  349. };
  350. }.bind(this),
  351. }).always(function () {
  352. this.setState({
  353. loading: false
  354. });
  355. }.bind(this));
  356. },
  357. // resetUser() {
  358. // this.state.searchUserNumber = undefined;
  359. // this.state.searchUserName = undefined;
  360. // this.state.searchField = undefined;
  361. // this.state.searchPfs = undefined;
  362. // this.state.searchUnit = undefined;
  363. // this.loadUserData();
  364. // },
  365. resetList() {
  366. this.state.searchLectureUser = undefined;
  367. this.state.searchLectureName = undefined;
  368. this.state.startLectureTime = undefined;
  369. this.state.endLectureTime = undefined;
  370. this.loadLectureData();
  371. },
  372. addClick() {
  373. this.setState({
  374. addVisible: true
  375. });
  376. },
  377. listTableRowClick(record, index) {
  378. this.state.addModal = record;
  379. this.state.addModal.showBig = record.hot ? true : false;
  380. this.state.addModal.showStar = record.dynamic ? true : false;
  381. this.setState({
  382. addVisible: true
  383. });
  384. },
  385. render() {
  386. const rowSelection = {
  387. selectedRowKeys: this.state.selectedRowKeys,
  388. onChange: (selectedRowKeys, selectedRows) => {
  389. this.setState({
  390. selectedRows: selectedRows,
  391. selectedRowKeys: selectedRowKeys
  392. });
  393. }
  394. };
  395. const hasSelected = this.state.selectedRowKeys.length > 0;
  396. return (
  397. <div className="admin-content" >
  398. <div className="admin-content-title">科技讲堂管理</div>
  399. <div className="admin-content-warp">
  400. <div className="admin-content-header">
  401. <span>讲堂列表</span>
  402. <Button type="primary" onClick={() => { this.cleanCache('lecture_list_cache_key'); }}>清除缓存</Button>
  403. <Button type='danger' disabled={!hasSelected} onClick={this.delectRow}>
  404. 删除<Icon type="minus" />
  405. </Button>
  406. <Button type="primary" onClick={() => { this.addClick(); }}>新增</Button>
  407. </div>
  408. <div className="admin-content-search">
  409. <Input placeholder="开讲人名称" style={{ width: 160 }}
  410. value={this.state.searchLectureUser}
  411. onChange={(e) => { this.setState({ searchLectureUser: e.target.value }); }} />
  412. <Input placeholder="讲座标题" style={{ width: 160 }}
  413. value={this.state.searchLectureName}
  414. onChange={(e) => { this.setState({ searchLectureName: e.target.value }); }} />
  415. <span>开始时间</span>
  416. <DatePicker
  417. showTime
  418. format="YYYY-MM-DD HH:mm:ss"
  419. placeholder="选择开始搜索时间"
  420. value={this.state.startLectureTime ? moment(this.state.startLectureTime, "YYYY-MM-DD HH:mm:ss") : undefined}
  421. onChange={(t, str) => {
  422. this.setState({ startLectureTime: str });
  423. }} />
  424. <span>到</span>
  425. <DatePicker
  426. showTime
  427. format="YYYY-MM-DD HH:mm:ss"
  428. placeholder="选择结束搜索时间"
  429. value={this.state.endLectureTime ? moment(this.state.endLectureTime, "YYYY-MM-DD HH:mm:ss") : undefined}
  430. onChange={(t, str) => {
  431. this.setState({ endLectureTime: str });
  432. }} />
  433. <Button type="primary" onClick={() => { this.loadLectureData() }}>搜索</Button>
  434. <Button onClick={this.resetList}>重置</Button>
  435. </div>
  436. <Spin spinning={this.state.loading}>
  437. <Table size="middle" columns={this.state.lectureColumns}
  438. dataSource={this.state.lectureTableData}
  439. rowSelection={rowSelection}
  440. onRowClick={this.listTableRowClick}
  441. style={{
  442. cursor: 'pointer',
  443. }}
  444. pagination={this.state.lecturePagination} />
  445. </Spin>
  446. </div>
  447. <div className="clearfix">
  448. <div className="admin-content-warp" style={{ width: '50%', float: 'left' }}>
  449. <div className="admin-content-header">
  450. <span>大咖页列表</span>
  451. <Button type="primary" onClick={() => { this.cleanCache('big_shot_lecture_cache_key'); }}>清除缓存</Button>
  452. </div>
  453. <Spin spinning={this.state.loading}>
  454. <Table size="middle" columns={this.state.lectureColumns}
  455. dataSource={this.state.hotTableData}
  456. onRowClick={this.listTableRowClick}
  457. style={{
  458. cursor: 'pointer',
  459. }}
  460. pagination={false} />
  461. </Spin>
  462. </div>
  463. <div className="admin-content-warp" style={{ width: '50%', float: 'left' }}>
  464. <div className="admin-content-header">
  465. <span>明星动态列表</span>
  466. <Button type="primary" onClick={() => { this.cleanCache('lecture_dynamic_list_cache_key'); }}>清除缓存</Button>
  467. </div>
  468. <Spin spinning={this.state.loading}>
  469. <Table size="middle" columns={this.state.lectureColumns}
  470. dataSource={this.state.dynamicTableData}
  471. onRowClick={this.listTableRowClick}
  472. style={{
  473. cursor: 'pointer',
  474. }}
  475. pagination={false} />
  476. </Spin>
  477. </div>
  478. </div>
  479. <Modal
  480. title="科技讲堂详情" width={600}
  481. visible={this.state.addVisible}
  482. maskClosable={false}
  483. footer={null}
  484. afterClose={() => { this.state.addModal = {} }}
  485. onCancel={() => { this.setState({ addVisible: false }) }} >
  486. <Spin spinning={this.state.loading}>
  487. <div className="modal-box">
  488. <span className="modal-box-title">开讲人</span>
  489. <div className="modal-box-detail">
  490. <Input value={this.state.addModal.lecturer}
  491. onChange={(e) => {
  492. this.state.addModal.lecturer = e.target.value;
  493. this.setState({ addModal: this.state.addModal });
  494. }} />
  495. </div>
  496. </div>
  497. <div className="modal-box">
  498. <span className="modal-box-title">讲堂标题</span>
  499. <div className="modal-box-detail">
  500. <Input value={this.state.addModal.name}
  501. onChange={(e) => {
  502. this.state.addModal.name = e.target.value;
  503. this.setState({ addModal: this.state.addModal });
  504. }} />
  505. </div>
  506. </div>
  507. <div className="modal-box">
  508. <span className="modal-box-title">讲堂描述</span>
  509. <div className="modal-box-detail">
  510. <Input type="textarea" value={this.state.addModal.summary} rows={4}
  511. onChange={(e) => {
  512. this.state.addModal.summary = e.target.value;
  513. this.setState({ addModal: this.state.addModal });
  514. }} />
  515. </div>
  516. </div>
  517. <div className="modal-box">
  518. <span className="modal-box-title">开讲时间</span>
  519. <div className="modal-box-detail">
  520. <DatePicker
  521. showTime
  522. format="YYYY-MM-DD HH:mm:ss"
  523. placeholder="选择开始时间"
  524. value={this.state.addModal.lectureTimeFormattedDate ? moment(this.state.addModal.lectureTimeFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
  525. onChange={(t, str) => {
  526. this.state.addModal.lectureTimeFormattedDate = str;
  527. this.setState({ addModal: this.state.addModal });
  528. }} />
  529. <span>到</span>
  530. <DatePicker
  531. showTime
  532. format="YYYY-MM-DD HH:mm:ss"
  533. placeholder="选择结束时间"
  534. value={this.state.addModal.endTimeFormattedDate ? moment(this.state.addModal.endTimeFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
  535. onChange={(t, str) => {
  536. this.state.addModal.endTimeFormattedDate = str;
  537. this.setState({ addModal: this.state.addModal });
  538. }} />
  539. </div>
  540. </div>
  541. <div className="modal-box">
  542. <span className="modal-box-title">讲堂图片</span>
  543. <div className="modal-box-detail clearfix">
  544. <Avatar uid={this.state.addModal.uid}
  545. imageUrl={this.state.addModal.lectureUrl ? (globalConfig.avatarHost + "/upload" + this.state.addModal.lectureUrl) : null}
  546. urlData={(url) => { this.state.addModal.lectureUrl = url }} />
  547. </div>
  548. </div>
  549. <div className="modal-box">
  550. <span className="modal-box-title">其他选项</span>
  551. <div className="modal-box-detail clearfix">
  552. <Checkbox checked={this.state.addModal.showBig}
  553. onChange={(e) => {
  554. this.state.addModal.showBig = e.target.checked;
  555. this.setState({ addModal: this.state.addModal });
  556. }}>显示到大咖说</Checkbox>
  557. <Checkbox checked={this.state.addModal.showStar}
  558. onChange={(e) => {
  559. this.state.addModal.showStar = e.target.checked;
  560. this.setState({ addModal: this.state.addModal });
  561. }}>显示到明星动态</Checkbox>
  562. </div>
  563. </div>
  564. <div className="modal-box">
  565. <Button type="primary" onClick={this.submit}>提交</Button>
  566. <Button type="ghost" onClick={() => { this.setState({ addVisible: false }) }}>取消</Button>
  567. </div>
  568. </Spin>
  569. </Modal>
  570. </div>
  571. );
  572. }
  573. });
  574. export default Lecture;
  575. // loadUserData(pageNo) {
  576. // this.setState({
  577. // loading: true
  578. // });
  579. // $.ajax({
  580. // method: "get",
  581. // dataType: "json",
  582. // crossDomain: false,
  583. // url: globalConfig.context + '/api/admin/lecture/starAndExpertList',
  584. // data: {
  585. // pageNo: pageNo || 1,
  586. // pageSize: this.state.userPagination.pageSize,
  587. // number: this.state.searchUserNumber, //编号
  588. // username: this.state.searchUserName, //名称
  589. // engagedField: this.state.searchField ? this.state.searchField.join(',') : undefined,
  590. // professionalTitle: this.state.searchPfs,
  591. // workUnit: this.state.searchUnit
  592. // },
  593. // success: function (data) {
  594. // let theArr = [];
  595. // if (!data.data || !data.data.list) {
  596. // if (data.error && data.error.length) {
  597. // message.warning(data.error[0].message);
  598. // };
  599. // } else {
  600. // for (let i = 0; i < data.data.list.length; i++) {
  601. // let thisdata = data.data.list[i];
  602. // theArr.push({
  603. // key: i,
  604. // uid: thisdata.uid,
  605. // engagedField: thisdata.engagedField ? thisdata.engagedField.split(',') : [],
  606. // username: thisdata.username,
  607. // professionalTitle: thisdata.professionalTitle,
  608. // workUnit: thisdata.workUnit,
  609. // number: thisdata.number,
  610. // achievementNums: thisdata.achievementNums,
  611. // });
  612. // };
  613. // this.state.userPagination.current = data.data.pageNo;
  614. // this.state.userPagination.total = data.data.totalCount;
  615. // };
  616. // this.setState({
  617. // userTableData: theArr,
  618. // userPagination: this.state.userPagination
  619. // });
  620. // }.bind(this),
  621. // }).always(function () {
  622. // this.setState({
  623. // loading: false
  624. // });
  625. // }.bind(this));
  626. // },
  627. // <div className="admin-content-warp">
  628. // <div className="admin-content-header">专家明星列表</div>
  629. // <div className="admin-content-search">
  630. // <Input placeholder="编号" style={{ width: 100 }}
  631. // value={this.state.searchUserNumber}
  632. // onChange={(e) => { this.setState({ searchUserNumber: e.target.value }); }} />
  633. // <Input placeholder="专家明星名称" style={{ width: 160 }}
  634. // value={this.state.searchUserName}
  635. // onChange={(e) => { this.setState({ searchUserName: e.target.value }); }} />
  636. // <Cascader placeholder="请选择一个行业" style={{ width: 300 }}
  637. // options={techFieldList}
  638. // value={this.state.searchField}
  639. // onChange={(e) => { this.setState({ searchField: e }) }} />
  640. // <Input placeholder="职称名字" style={{ width: 160 }}
  641. // value={this.state.searchPfs}
  642. // onChange={(e) => { this.setState({ searchPfs: e.target.value }); }} />
  643. // <Input placeholder="工作单位" style={{ width: 160 }}
  644. // value={this.state.searchUnit}
  645. // onChange={(e) => { this.setState({ searchUnit: e.target.value }); }} />
  646. // <Button type="primary" onClick={() => { this.loadUserData() }}>搜索</Button>
  647. // <Button onClick={this.resetUser}>重置</Button>
  648. // </div>
  649. // <Spin spinning={this.state.loading}>
  650. // <Table columns={this.state.userColumns}
  651. // dataSource={this.state.userTableData}
  652. // pagination={this.state.userPagination}
  653. // onRowClick={this.userTableRowClick} />
  654. // </Spin>
  655. // </div>