hrSituation.jsx 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. import React from 'react';
  2. import { Input, InputNumber, Button, Form, Icon, Spin, message, Table, Modal, Upload } from 'antd';
  3. import { beforeUpload } from '../../../../tools.js';
  4. import './hrSituation.less'
  5. import ajax from 'jquery/src/ajax/xhr.js'
  6. import $ from 'jquery/src/ajax';
  7. const HrSituationDescFrom = Form.create()(React.createClass({
  8. getInitialState() {
  9. return {
  10. loading: false
  11. };
  12. },
  13. handleSubmit(e) {
  14. e.preventDefault();
  15. this.props.form.validateFields((err, values) => {
  16. if (values.firmTotal < values.firmInService + values.firmPartTime + values.firmTemporary) {
  17. message.warning("总体情况的在职人员数、兼职人员数、临时聘用人员数相加小于等于企业职工总数!");
  18. return;
  19. };
  20. if (values.firmTotal < values.techTotal) {
  21. message.warning("科技人员数小于等于企业职工总数!");
  22. return;
  23. };
  24. if (values.firmInService < values.techInService || values.firmPartTime < values.techPartTime || values.firmTemporary < values.techTemporary ||
  25. values.firmForeign < values.techForeign || values.firmAbroad < values.techAbroad || values.firmCore < values.techCore) {
  26. message.warning("科技人员各项人数小于等于企业职工各项人数!");
  27. return;
  28. };
  29. if (values.firmTotal < values.doctor + values.master + values.undergraduate + values.college) {
  30. message.warning("全体人员结构中学历一栏人数总和小于等于职工人数!");
  31. return;
  32. };
  33. if (values.firmTotal < values.belowThirty + values.thirtyoneToThirtyfour + values.fortyoneToFifty + values.aboveFifty) {
  34. message.warning("全体人员结构中年龄一栏人数总和小于等于职工人数!");
  35. return;
  36. };
  37. if (values.year) {
  38. message.warning("请输入年份!");
  39. return;
  40. }
  41. if (!err) {
  42. this.props.spinState(true);
  43. $.ajax({
  44. method: "POST",
  45. dataType: "json",
  46. crossDomain: false,
  47. url: globalConfig.context + "/api/admin/updateOrgHumanResource",
  48. data: {
  49. id: this.props.data.id,
  50. uid: this.props.data.uid,
  51. year: values.data.year,
  52. aboveFifty: values.aboveFifty,
  53. belowThirty: values.belowThirty,
  54. college: values.college,
  55. doctor: values.doctor,
  56. firmAbroad: values.firmAbroad,
  57. firmCore: values.firmCore,
  58. firmForeign: values.firmForeign,
  59. firmInService: values.firmInService,
  60. firmPartTime: values.firmPartTime,
  61. firmTemporary: values.firmTemporary,
  62. firmTotal: values.firmTotal,
  63. fortyoneToFifty: values.fortyoneToFifty,
  64. intermediateTitle: values.intermediateTitle,
  65. juniorTitle: values.juniorTitle,
  66. master: values.master,
  67. seniorMechanic: values.seniorMechanic,
  68. seniorTitle: values.seniorTitle,
  69. techAbroad: values.techAbroad,
  70. techCore: values.techCore,
  71. techForeign: values.techForeign,
  72. techInService: values.techInService,
  73. techPartTime: values.techPartTime,
  74. techTemporary: values.techTemporary,
  75. techTotal: values.techTotal,
  76. thirtyoneToThirtyfour: values.thirtyoneToThirtyfour,
  77. undergraduate: values.undergraduate,
  78. rosterUrl: this.state.rosterUrl,
  79. socialSecurityUrl: this.state.socialSecurityUrl
  80. }
  81. }).done(function (data) {
  82. if (!data.error.length) {
  83. message.success('保存成功!');
  84. this.props.closeModal();
  85. this.props.spinState(false);
  86. this.props.form.resetFields();
  87. } else {
  88. message.warning(data.error[0].message);
  89. this.props.spinState(false);
  90. }
  91. }.bind(this));
  92. }
  93. });
  94. },
  95. render() {
  96. const { getFieldDecorator } = this.props.form;
  97. const formItemLayout = {
  98. labelCol: { span: 8 },
  99. wrapperCol: { span: 16 },
  100. };
  101. const FormItem = Form.Item;
  102. return (
  103. <Form onSubmit={this.handleSubmit} className="hrSituation-form">
  104. <div className="clearfix">
  105. <FormItem className="half-item"
  106. {...formItemLayout}
  107. label="年份"
  108. >
  109. {getFieldDecorator('year', {
  110. initialValue: this.props.data.year || null
  111. })(
  112. <InputNumber />
  113. )}
  114. </FormItem>
  115. </div>
  116. <p className="hrSituation-title">总体情况</p>
  117. <div className="clearfix">
  118. <span className="hrSituation-span">总数(人)</span>
  119. <FormItem className="half-item"
  120. {...formItemLayout}
  121. label="企业职工"
  122. >
  123. {getFieldDecorator('firmTotal', {
  124. initialValue: this.props.data.firmTotal || null
  125. })(
  126. <InputNumber />
  127. )}
  128. </FormItem>
  129. <FormItem className="half-item"
  130. {...formItemLayout}
  131. label="科技人员"
  132. >
  133. {getFieldDecorator('techTotal', {
  134. initialValue: this.props.data.techTotal || null
  135. })(
  136. <InputNumber />
  137. )}
  138. </FormItem>
  139. <FormItem className="half-item" style={{ width: '50%' }}>
  140. <span>其中科技人员占比
  141. {(() => {
  142. if (!this.props.form.getFieldValue('techTotal') || !this.props.form.getFieldValue('firmTotal')) {
  143. return 0
  144. }
  145. return (this.props.form.getFieldValue('techTotal') / this.props.form.getFieldValue('firmTotal') * 100).toFixed(2)
  146. })()}
  147. %</span>
  148. </FormItem>
  149. <span className="hrSituation-span">在职人员(人)</span>
  150. <FormItem className="half-item"
  151. {...formItemLayout}
  152. label="企业职工"
  153. >
  154. {getFieldDecorator('firmInService', {
  155. initialValue: this.props.data.firmInService || null
  156. })(
  157. <InputNumber />
  158. )}
  159. </FormItem>
  160. <FormItem className="half-item"
  161. {...formItemLayout}
  162. label="科技人员"
  163. >
  164. {getFieldDecorator('techInService', {
  165. initialValue: this.props.data.techInService || null
  166. })(
  167. <InputNumber />
  168. )}
  169. </FormItem>
  170. <span className="hrSituation-span">兼职人员(人)</span>
  171. <FormItem className="half-item"
  172. {...formItemLayout}
  173. label="企业职工"
  174. >
  175. {getFieldDecorator('firmPartTime', {
  176. initialValue: this.props.data.firmPartTime || null
  177. })(
  178. <InputNumber />
  179. )}
  180. </FormItem>
  181. <FormItem className="half-item"
  182. {...formItemLayout}
  183. label="科技人员"
  184. >
  185. {getFieldDecorator('techPartTime', {
  186. initialValue: this.props.data.techPartTime || null
  187. })(
  188. <InputNumber />
  189. )}
  190. </FormItem>
  191. <span className="hrSituation-span">临时聘用人员(人)</span>
  192. <FormItem className="half-item"
  193. {...formItemLayout}
  194. label="企业职工"
  195. >
  196. {getFieldDecorator('firmTemporary', {
  197. initialValue: this.props.data.firmTemporary || null
  198. })(
  199. <InputNumber />
  200. )}
  201. </FormItem>
  202. <FormItem className="half-item"
  203. {...formItemLayout}
  204. label="科技人员"
  205. >
  206. {getFieldDecorator('techTemporary', {
  207. initialValue: this.props.data.techTemporary || null
  208. })(
  209. <InputNumber />
  210. )}
  211. </FormItem>
  212. <span className="hrSituation-span">外籍人员(人)</span>
  213. <FormItem className="half-item"
  214. {...formItemLayout}
  215. label="企业职工"
  216. >
  217. {getFieldDecorator('firmForeign', {
  218. initialValue: this.props.data.firmForeign || null
  219. })(
  220. <InputNumber />
  221. )}
  222. </FormItem>
  223. <FormItem className="half-item"
  224. {...formItemLayout}
  225. label="科技人员"
  226. >
  227. {getFieldDecorator('techForeign', {
  228. initialValue: this.props.data.techForeign || null
  229. })(
  230. <InputNumber />
  231. )}
  232. </FormItem>
  233. <span className="hrSituation-span">留学归国人员(人)</span>
  234. <FormItem className="half-item"
  235. {...formItemLayout}
  236. label="企业职工"
  237. >
  238. {getFieldDecorator('firmAbroad', {
  239. initialValue: this.props.data.firmAbroad || null
  240. })(
  241. <InputNumber />
  242. )}
  243. </FormItem>
  244. <FormItem className="half-item"
  245. {...formItemLayout}
  246. label="科技人员"
  247. >
  248. {getFieldDecorator('techAbroad', {
  249. initialValue: this.props.data.techAbroad || null
  250. })(
  251. <InputNumber />
  252. )}
  253. </FormItem>
  254. <span className="hrSituation-span">干人计划人员(人)</span>
  255. <FormItem className="half-item"
  256. {...formItemLayout}
  257. label="企业职工"
  258. >
  259. {getFieldDecorator('firmCore', {
  260. initialValue: this.props.data.firmCore || null
  261. })(
  262. <InputNumber />
  263. )}
  264. </FormItem>
  265. <FormItem className="half-item"
  266. {...formItemLayout}
  267. label="科技人员"
  268. >
  269. {getFieldDecorator('techCore', {
  270. initialValue: this.props.data.techCore || null
  271. })(
  272. <InputNumber />
  273. )}
  274. </FormItem>
  275. </div>
  276. <p className="hrSituation-title">全体人员结构</p>
  277. <div className="clearfix">
  278. <span className="hrSituation-span">学历人数</span>
  279. <FormItem className="half-item"
  280. {...formItemLayout}
  281. label="博士"
  282. >
  283. {getFieldDecorator('doctor', {
  284. initialValue: this.props.data.doctor || null
  285. })(
  286. <InputNumber />
  287. )}
  288. </FormItem>
  289. <FormItem className="half-item"
  290. {...formItemLayout}
  291. label="硕士"
  292. >
  293. {getFieldDecorator('master', {
  294. initialValue: this.props.data.master || null
  295. })(
  296. <InputNumber />
  297. )}
  298. </FormItem>
  299. <FormItem className="half-item"
  300. {...formItemLayout}
  301. label="本科"
  302. >
  303. {getFieldDecorator('undergraduate', {
  304. initialValue: this.props.data.undergraduate || null
  305. })(
  306. <InputNumber />
  307. )}
  308. </FormItem>
  309. <FormItem className="half-item"
  310. {...formItemLayout}
  311. label="大专及以下"
  312. >
  313. {getFieldDecorator('college', {
  314. initialValue: this.props.data.college || null
  315. })(
  316. <InputNumber />
  317. )}
  318. </FormItem>
  319. </div>
  320. <div className="clearfix">
  321. <span className="hrSituation-span">职称人数</span>
  322. <FormItem className="half-item"
  323. {...formItemLayout}
  324. label="高级职称"
  325. >
  326. {getFieldDecorator('seniorTitle', {
  327. initialValue: this.props.data.seniorTitle || null
  328. })(
  329. <InputNumber />
  330. )}
  331. </FormItem>
  332. <FormItem className="half-item"
  333. {...formItemLayout}
  334. label="中级职称"
  335. >
  336. {getFieldDecorator('intermediateTitle', {
  337. initialValue: this.props.data.intermediateTitle || null
  338. })(
  339. <InputNumber />
  340. )}
  341. </FormItem>
  342. <FormItem className="half-item"
  343. {...formItemLayout}
  344. label="初级职称"
  345. >
  346. {getFieldDecorator('juniorTitle', {
  347. initialValue: this.props.data.juniorTitle || null
  348. })(
  349. <InputNumber />
  350. )}
  351. </FormItem>
  352. <FormItem className="half-item"
  353. {...formItemLayout}
  354. label="高级技工"
  355. >
  356. {getFieldDecorator('seniorMechanic', {
  357. initialValue: this.props.data.seniorMechanic || null
  358. })(
  359. <InputNumber />
  360. )}
  361. </FormItem>
  362. </div>
  363. <div className="clearfix">
  364. <span className="hrSituation-span">年龄人数</span>
  365. <FormItem className="half-item"
  366. {...formItemLayout}
  367. label="30及以下"
  368. >
  369. {getFieldDecorator('belowThirty', {
  370. initialValue: this.props.data.belowThirty || null
  371. })(
  372. <InputNumber />
  373. )}
  374. </FormItem>
  375. <FormItem className="half-item"
  376. {...formItemLayout}
  377. label="31-34"
  378. >
  379. {getFieldDecorator('thirtyoneToThirtyfour', {
  380. initialValue: this.props.data.thirtyoneToThirtyfour || null
  381. })(
  382. <InputNumber />
  383. )}
  384. </FormItem>
  385. <FormItem className="half-item"
  386. {...formItemLayout}
  387. label="41-50"
  388. >
  389. {getFieldDecorator('fortyoneToFifty', {
  390. initialValue: this.props.data.fortyoneToFifty || null
  391. })(
  392. <InputNumber />
  393. )}
  394. </FormItem>
  395. <FormItem className="half-item"
  396. {...formItemLayout}
  397. label="50以上"
  398. >
  399. {getFieldDecorator('aboveFifty', {
  400. initialValue: this.props.data.aboveFifty || null
  401. })(
  402. <InputNumber />
  403. )}
  404. </FormItem>
  405. </div>
  406. <div className="hrSituation-roster">
  407. <Upload
  408. name="socialSecurity"
  409. action={globalConfig.context + "/techservice/cognizance/upload"}
  410. data={{ 'sign': this.props.year + 'socialSecurity' }}
  411. beforeUpload={beforeUpload}
  412. onChange={(info) => {
  413. if (info.file.status !== 'uploading') {
  414. console.log(info.file, info.fileList);
  415. }
  416. if (info.file.status === 'done') {
  417. message.success(`${info.file.name} 文件上传成功!`);
  418. this.state.socialSecurityUrl = info.file.response.data;
  419. } else if (info.file.status === 'error') {
  420. message.error(`${info.file.name} 文件上传失败。`);
  421. }
  422. }}
  423. >
  424. <Button><Icon type="upload" /> 上传社保文件 </Button>
  425. </Upload>
  426. </div>
  427. <div className="hrSituation-roster">
  428. <Upload
  429. name="roster"
  430. action={globalConfig.context + "/techservice/cognizance/upload"}
  431. data={{ 'sign': this.props.year + 'roster' }}
  432. beforeUpload={beforeUpload}
  433. onChange={(info) => {
  434. if (info.file.status !== 'uploading') {
  435. console.log(info.file, info.fileList);
  436. }
  437. if (info.file.status === 'done') {
  438. message.success(`${info.file.name} 文件上传成功!`);
  439. this.state.rosterUrl = info.file.response.data;
  440. } else if (info.file.status === 'error') {
  441. message.error(`${info.file.name} 文件上传失败。`);
  442. }
  443. }}
  444. >
  445. <Button><Icon type="upload" /> 上传花名册文件 </Button>
  446. </Upload>
  447. </div>
  448. <div>
  449. <span style={{ color: "red" }}>提示</span>
  450. <p>1、总体情况的在职人员数、兼职人员数、临时聘用人员数相加小于等于企业职工总数。</p>
  451. <p>2、科技人员数小于等于企业职工总数。</p>
  452. <p>3、科技人员各项人数小于等于企业职工各项人数。</p>
  453. <p>4、全体人员结构中学历一栏人数总和小于等于职工人数。</p>
  454. <p>5、全体人员结构中年龄一栏人数总和小于等于职工人数。</p>
  455. <Button style={{ marginTop: "20px" }} className="set-submit" type="primary" htmlType="submit">保存</Button>
  456. </div>
  457. </Form >
  458. );
  459. },
  460. }));
  461. const HrSituationDesc = React.createClass({
  462. getInitialState() {
  463. return {
  464. visible: false,
  465. loading: false
  466. };
  467. },
  468. componentWillReceiveProps(nextProps) {
  469. this.state.visible = nextProps.showDesc
  470. },
  471. showModal() {
  472. this.setState({
  473. visible: true,
  474. });
  475. },
  476. handleOk() {
  477. this.setState({
  478. visible: false,
  479. });
  480. this.props.closeDesc(false);
  481. },
  482. handleCancel(e) {
  483. this.setState({
  484. visible: false,
  485. });
  486. this.props.closeDesc(false);
  487. },
  488. spinChange(e) {
  489. this.setState({
  490. loading: e
  491. });
  492. },
  493. render() {
  494. return (
  495. <div className="patent-addNew">
  496. <Spin spinning={this.state.loading} className='spin-box'>
  497. <Modal title="人力资源状况" visible={this.state.visible}
  498. onOk={this.handleOk} onCancel={this.handleCancel}
  499. width='1200px'
  500. footer=''
  501. >
  502. <HrSituationDescFrom data={this.props.data}
  503. spinState={this.spinChange} closeModal={this.handleCancel} />
  504. </Modal>
  505. </Spin>
  506. </div>
  507. );
  508. },
  509. });
  510. const HrSituation = React.createClass({
  511. loadData(pageNo) {
  512. this.state.data = [];
  513. this.setState({
  514. loading: true
  515. });
  516. $.ajax({
  517. method: "post",
  518. dataType: "json",
  519. crossDomain: false,
  520. url: globalConfig.context + "/api/admin/orgHumanResource",
  521. data: {
  522. pageNo: pageNo || 1,
  523. pageSize: this.state.pagination.pageSize,
  524. uid: this.props.data.uid
  525. }
  526. }).done((data) => {
  527. if (data.error.length || !data.data || !data.data.list) {
  528. message.warning(data.error[0].message);
  529. return;
  530. };
  531. for (let i = 0; i < data.data.list.length; i++) {
  532. let thisdata = data.data.list[i];
  533. this.state.data.push({
  534. key: i,
  535. id: thisdata.id,
  536. uid: thisdata.uid,
  537. year: thisdata.year,
  538. aboveFifty: thisdata.aboveFifty,
  539. belowThirty: thisdata.belowThirty,
  540. college: thisdata.college,
  541. doctor: thisdata.doctor,
  542. firmAbroad: thisdata.firmAbroad,
  543. firmCore: thisdata.firmCore,
  544. firmForeign: thisdata.firmForeign,
  545. firmInService: thisdata.firmInService,
  546. firmPartTime: thisdata.firmPartTime,
  547. firmTemporary: thisdata.firmTemporary,
  548. firmTotal: thisdata.firmTotal,
  549. fortyoneToFifty: thisdata.fortyoneToFifty,
  550. intermediateTitle: thisdata.intermediateTitle,
  551. juniorTitle: thisdata.juniorTitle,
  552. master: thisdata.master,
  553. seniorMechanic: thisdata.seniorMechanic,
  554. seniorTitle: thisdata.seniorTitle,
  555. techAbroad: thisdata.techAbroad,
  556. techCore: thisdata.techCore,
  557. techForeign: thisdata.techForeign,
  558. techInService: thisdata.techInService,
  559. techPartTime: thisdata.techPartTime,
  560. techTemporary: thisdata.techTemporary,
  561. techTotal: thisdata.techTotal,
  562. thirtyoneToThirtyfour: thisdata.thirtyoneToThirtyfour,
  563. undergraduate: thisdata.undergraduate,
  564. attachment: [thisdata.rosterDownloadFileName, thisdata.socialSecurityDownloadFileName]
  565. });
  566. };
  567. this.state.pagination.current = data.data.pageNo;
  568. this.state.pagination.total = data.data.totalCount;
  569. this.setState({
  570. dataSource: this.state.data,
  571. pagination: this.state.pagination
  572. });
  573. }).always(function () {
  574. this.setState({
  575. loading: false
  576. });
  577. }.bind(this));
  578. },
  579. getInitialState() {
  580. return {
  581. selectedRowKeys: [],
  582. selectedRows: [],
  583. loading: false,
  584. pagination: {
  585. defaultCurrent: 1,
  586. defaultPageSize: 10,
  587. showQuickJumper: true,
  588. pageSize: 10,
  589. onChange: function (page) {
  590. this.loadData(page);
  591. }.bind(this),
  592. showTotal: function (total) {
  593. return '共' + total + '条数据';
  594. }
  595. },
  596. columns: [
  597. {
  598. title: '年份',
  599. dataIndex: 'year',
  600. key: 'year'
  601. }, {
  602. title: '总人数',
  603. dataIndex: 'firmTotal',
  604. key: 'firmTotal'
  605. }, {
  606. title: '科技人员',
  607. dataIndex: 'techTotal',
  608. key: 'techTotal'
  609. }, {
  610. title: '博士人数',
  611. dataIndex: 'doctor',
  612. key: 'doctor',
  613. }, {
  614. title: '高级职称人数',
  615. dataIndex: 'seniorTitle',
  616. key: 'seniorTitle',
  617. }, {
  618. title: '30岁以下人数',
  619. dataIndex: 'belowThirty',
  620. key: 'belowThirty',
  621. }, {
  622. title: '相关附件',
  623. dataIndex: 'attachment',
  624. key: 'attachment',
  625. render: (text) => {
  626. <a href="" onClick={() => {
  627. window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
  628. }}></a>
  629. }
  630. }
  631. ],
  632. dataSource: []
  633. };
  634. },
  635. componentWillMount() {
  636. this.loadData();
  637. },
  638. tableRowClick(record, index) {
  639. this.state.RowData = record;
  640. this.setState({
  641. showDesc: true
  642. });
  643. },
  644. delectRow() {
  645. let deletedIds = [];
  646. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  647. let rowItem = this.state.selectedRows[idx];
  648. if (rowItem.id) {
  649. deletedIds.push(rowItem.id)
  650. }
  651. }
  652. this.setState({
  653. selectedRowKeys: [],
  654. loading: deletedIds.length > 0
  655. });
  656. $.ajax({
  657. method: "POST",
  658. dataType: "json",
  659. crossDomain: false,
  660. url: globalConfig.context + "/techservice/cognizance/deleteFinance",
  661. data: {
  662. ids: deletedIds
  663. }
  664. }).done(function (data) {
  665. if (!data.error.length) {
  666. message.success('保存成功!');
  667. this.setState({
  668. loading: false,
  669. });
  670. } else {
  671. message.warning(data.error[0].message);
  672. };
  673. this.loadData();
  674. }.bind(this));
  675. },
  676. closeDesc(e) {
  677. this.state.showDesc = e;
  678. this.loadData();
  679. },
  680. render() {
  681. const rowSelection = {
  682. selectedRowKeys: this.state.selectedRowKeys,
  683. onChange: (selectedRowKeys, selectedRows) => {
  684. this.setState({
  685. selectedRows: selectedRows,
  686. selectedRowKeys: selectedRowKeys
  687. });
  688. }
  689. };
  690. const hasSelected = this.state.selectedRowKeys.length > 0;
  691. return (
  692. <div className="user-content" >
  693. <div className="content-title">
  694. <span>人力资源状况</span>
  695. </div>
  696. <div className="user-search">
  697. <p>
  698. <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
  699. onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
  700. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  701. disabled={!hasSelected}
  702. onClick={this.delectRow}>删除<Icon type="minus" /></Button>
  703. </p>
  704. </div>
  705. <div className="patent-table">
  706. <Spin spinning={this.state.loading}>
  707. <Table columns={this.state.columns}
  708. dataSource={this.state.dataSource}
  709. pagination={this.state.pagination}
  710. rowSelection={rowSelection}
  711. onRowClick={this.tableRowClick} />
  712. </Spin>
  713. </div>
  714. <HrSituationDesc data={this.state.RowData}
  715. showDesc={this.state.showDesc} closeDesc={this.closeDesc} />
  716. </div >
  717. );
  718. }
  719. });
  720. export default HrSituation;