talentsList.jsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import "react-quill/dist/quill.bubble.css";
  4. import moment from "moment";
  5. import {
  6. Form,
  7. Icon,
  8. Button,
  9. Input,
  10. Select,
  11. Table,
  12. message,
  13. DatePicker,
  14. Modal,
  15. Upload,
  16. Popconfirm,
  17. Cascader,
  18. InputNumber,
  19. Radio,
  20. TimePicker,
  21. Tabs,
  22. Tag, Tooltip, Checkbox
  23. } from "antd";
  24. import { areaSelect, getProvince } from "@/NewDicProvinceList"; //省市区
  25. import {
  26. getGameState,
  27. splitUrl,
  28. getprovince,
  29. getStatuslist,
  30. getLvl,
  31. placeList,
  32. province,
  33. provinceStatus,
  34. beforeUploadFile,
  35. getPicPath
  36. } from "@/tools.js";
  37. const { Option } = Select;
  38. import Editors from "@/richTextEditors"; //富文本编辑器
  39. import ad01 from "./image/ad01.jpg";
  40. import ad02 from "./image/ad02.jpg";
  41. import ad03 from "./image/ad03.jpg";
  42. import ad04 from "./image/ad04.jpg";
  43. import SpinContainer from "../../SpinContainer";
  44. import {companyList, getCompanyName, getCompanyValueArray} from "../../common/configure";
  45. const PicturesWall = React.createClass({
  46. getInitialState() {
  47. return {
  48. previewVisible: false,
  49. previewImage: "",
  50. fileList: []
  51. };
  52. },
  53. getDefaultProps() {
  54. return {
  55. changeClick: this.modifyChange
  56. };
  57. },
  58. handleCancel() {
  59. this.setState({ previewVisible: false });
  60. },
  61. handlePreview(file) {
  62. this.setState({
  63. previewImage: file.url || file.thumbUrl,
  64. previewVisible: true
  65. });
  66. },
  67. handleChange(info) {
  68. let fileList = info.fileList;
  69. this.setState({ fileList });
  70. this.props.fileList(fileList);
  71. },
  72. componentWillReceiveProps(nextProps) {
  73. this.state.fileList = nextProps.pictureUrl;
  74. },
  75. render() {
  76. const { previewVisible, previewImage, fileList } = this.state;
  77. const uploadButton = (
  78. <div>
  79. <Icon type="plus" />
  80. <div className="ant-upload-text">点击上传</div>
  81. </div>
  82. );
  83. return (
  84. <div style={{ display: "inline-block" }}>
  85. <Upload
  86. beforeUpload={beforeUploadFile}
  87. // action={globalConfig.context + "/api/admin/purchase/uploadPicture"}
  88. // url: '//172.16.0.253:8080' + '/api/admin/banners/addBanners',
  89. action={globalConfig.context + "/api/admin/recruitment/uploadFile"}
  90. data={{ sign: "purchase_picture" }}
  91. listType="picture-card"
  92. fileList={fileList}
  93. onPreview={this.handlePreview}
  94. onChange={this.handleChange}
  95. >
  96. {fileList && fileList.length >= 1 ? null : uploadButton}
  97. </Upload>
  98. <Modal
  99. maskClosable={false}
  100. visible={previewVisible}
  101. footer={null}
  102. onCancel={this.handleCancel}
  103. >
  104. <img alt="" style={{ width: "100%" }} src={previewImage} />
  105. </Modal>
  106. </div>
  107. );
  108. }
  109. });
  110. //主体
  111. const TalentsList = Form.create()(
  112. React.createClass({
  113. loadData(pageNo) {
  114. this.state.data = [];
  115. this.setState({
  116. loading: true,
  117. page: pageNo
  118. });
  119. $.ajax({
  120. method: "get",
  121. dataType: "json",
  122. url: globalConfig.context + "/api/admin/recruitment/listRecruitment",
  123. data: {
  124. pageNo: pageNo || this.state.pagination.current || 1,
  125. pageSize: this.state.pagination.pageSize,
  126. name: this.state.nameSearch,
  127. location: this.state.locationSearch,
  128. },
  129. success: function(data) {
  130. let theArr = [];
  131. if (!data.data || !data.data.list) {
  132. if (data.error && data.error.length) {
  133. message.warning(data.error[0].message);
  134. }
  135. } else {
  136. for (let i = 0; i < data.data.list.length; i++) {
  137. let thisdata = data.data.list[i];
  138. thisdata.key = i+1;
  139. theArr.push(thisdata);
  140. }
  141. this.state.pagination.current = data.data.pageNo;
  142. this.state.pagination.total = data.data.totalCount;
  143. }
  144. this.setState({
  145. dataSource: theArr,
  146. pagination: this.state.pagination
  147. });
  148. }.bind(this)
  149. }).always(
  150. function() {
  151. this.setState({
  152. loading: false
  153. });
  154. }.bind(this)
  155. );
  156. },
  157. getInitialState() {
  158. return {
  159. loading: false,
  160. flag: true,
  161. imgeditvisible: false,
  162. checked:false,
  163. indeterminate: false,
  164. activeKey: "1",
  165. purchaseImg: [],
  166. locations: [],
  167. maximg: "",
  168. timesArr: [],
  169. pagination: {
  170. defaultCurrent: 1,
  171. defaultPageSize: 10,
  172. showQuickJumper: true,
  173. pageSize: 10,
  174. onChange: function(page) {
  175. this.loadData(page);
  176. this.setState({
  177. selectedRowKeys: []
  178. });
  179. }.bind(this),
  180. showTotal: function(total) {
  181. return "共" + total + "条数据";
  182. }
  183. },
  184. //数据类型
  185. columns: [
  186. {
  187. title: "序号",
  188. dataIndex: "key",
  189. key: "key"
  190. },
  191. {
  192. title: "职位名称",
  193. dataIndex: "name",
  194. key: "name"
  195. },
  196. {
  197. title: "招聘省份",
  198. dataIndex: "province",
  199. key: "province",
  200. render: e => {
  201. let str = "";
  202. provinceStatus.forEach(item => {
  203. if (item.value == e) {
  204. str = item.key;
  205. }
  206. });
  207. return str;
  208. }
  209. },
  210. {
  211. title: "排序",
  212. dataIndex: "sort",
  213. key: "sort"
  214. },
  215. {
  216. title: "是否发布",
  217. dataIndex: "releaseStatus",
  218. key: "releaseStatus",
  219. render: s => {
  220. return s ? (
  221. <Tag color="#87d068">已发布</Tag>
  222. ) : (
  223. <Tag color="#f50">未发布</Tag>
  224. );
  225. }
  226. },
  227. {
  228. title: "公司",
  229. dataIndex: "locations",
  230. key: "locations",
  231. width:150,
  232. render: r => {
  233. let text = '';
  234. r && r.map((v,i)=>(
  235. text += (i === 0 ? '':',')+getCompanyName(v)
  236. ))
  237. return(
  238. <Tooltip placement="top" title={text}>
  239. {
  240. r && r.map((v,i)=>(
  241. i <= 2 ? (i === 0 ? '':',')+getCompanyName(v) : null
  242. ))
  243. }
  244. {
  245. r.length > 3 ? '.....' : null
  246. }
  247. </Tooltip>
  248. )
  249. }
  250. },
  251. {
  252. title: "操作",
  253. dataIndex: "c",
  254. render: (text, record, index) => {
  255. return (
  256. <div>
  257. {
  258. <Button
  259. type="primary"
  260. onClick={event => {
  261. this.stopPropagation(event);
  262. this.edit(record);
  263. }}
  264. >
  265. 编辑
  266. </Button>
  267. }
  268. {
  269. <Popconfirm
  270. okText="确定"
  271. cancelText="取消"
  272. title="您确定删除?删除后,招聘信息将不再显示"
  273. onConfirm={() => {
  274. this.delete(record.id);
  275. }}
  276. >
  277. <Button
  278. type="danger"
  279. style={{ marginLeft: "10px" }}
  280. onClick={event => {
  281. this.stopPropagation(event);
  282. }}
  283. >
  284. 删除
  285. </Button>
  286. </Popconfirm>
  287. }
  288. <Button
  289. type="primary"
  290. style={{ marginLeft: "10px" }}
  291. onClick={event => {
  292. this.stopPropagation(event);
  293. if (record.releaseStatus) {
  294. this.remove(record, 0);
  295. } else {
  296. this.remove(record, 1);
  297. }
  298. }}
  299. >
  300. {record.releaseStatus ? "撤销发布" : "发布"}
  301. </Button>
  302. </div>
  303. );
  304. }
  305. },
  306. {
  307. title: "发布时间",
  308. dataIndex: "releaseTimeConvert",
  309. key: "releaseTimeConvert"
  310. }
  311. ],
  312. //数据列表
  313. dataSource: []
  314. };
  315. },
  316. componentWillMount() {
  317. this.loadData();
  318. },
  319. detailes(record) {
  320. this.setState({
  321. loading: true
  322. });
  323. $.ajax({
  324. method: "get",
  325. dataType: "json",
  326. crossDomain: false,
  327. url: globalConfig.context + "/api/admin/banners/selectBanners",
  328. data: {
  329. id: record.id
  330. },
  331. success: function(data) {
  332. let thisdata = data.data;
  333. this.setState({
  334. id: thisdata.id,
  335. title: thisdata.title,
  336. bannerUrl: thisdata.bannerUrl
  337. ? splitUrl(thisdata.bannerUrl, ",", globalConfig.avatarUploadHost)
  338. : [],
  339. sortNumber: thisdata.sort,
  340. display: thisdata.display,
  341. position: thisdata.position
  342. });
  343. }.bind(this)
  344. }).always(
  345. function() {
  346. this.setState({
  347. loading: false
  348. });
  349. }.bind(this)
  350. );
  351. },
  352. //点击大图
  353. maximg(url) {
  354. this.setState({
  355. imgeditvisible: true,
  356. maximg: url
  357. });
  358. },
  359. //删除按钮
  360. delete(id) {
  361. $.ajax({
  362. method: "post",
  363. dataType: "json",
  364. crossDomain: false,
  365. url: globalConfig.context + "/api/admin/recruitment/deleteRecruitment",
  366. data: {
  367. id
  368. },
  369. success: function(data) {
  370. if (data.error && data.error.length) {
  371. message.warning(data.error[0].message);
  372. } else {
  373. message.success('删除成功')
  374. this.loadData();
  375. }
  376. }.bind(this)
  377. }).always(
  378. function() {
  379. this.setState({
  380. loading: false
  381. });
  382. }.bind(this)
  383. );
  384. },
  385. //阻止默认冒泡
  386. stopPropagation(e) {
  387. e.stopPropagation();
  388. e.nativeEvent.stopImmediatePropagation();
  389. },
  390. imghandleCancel() {
  391. this.setState({
  392. imgeditvisible: false
  393. });
  394. },
  395. //项目列表整行点击
  396. tableRowClick(record, index) {
  397. this.setState({
  398. editvisible: true
  399. });
  400. this.edit(record);
  401. },
  402. edithandleCancel(e) {
  403. this.setState(
  404. {
  405. editvisible: false
  406. },
  407. () => {
  408. this.addReset();
  409. }
  410. );
  411. this.loadData();
  412. },
  413. search() {
  414. this.loadData();
  415. },
  416. add() {
  417. this.setState({
  418. editvisible: true,
  419. flag: false
  420. });
  421. this.addReset();
  422. },
  423. cancelAdd() {
  424. this.setState(
  425. {
  426. editvisible: false
  427. },
  428. () => {
  429. this.setState({
  430. flag: true
  431. });
  432. this.addReset();
  433. }
  434. );
  435. this.loadData();
  436. },
  437. //撤下
  438. remove(record,flag) {
  439. $.ajax({
  440. method: "post",
  441. dataType: "json",
  442. crossDomain: false,
  443. url: globalConfig.context + "/api/admin/recruitment/updateRecruitment",
  444. data: {
  445. id: record.id,
  446. releaseStatus: flag
  447. },
  448. success: function(data) {
  449. if (data.error && data.error.length) {
  450. message.warning(data.error[0].message);
  451. } else {
  452. this.loadData();
  453. }
  454. }.bind(this)
  455. }).always(
  456. function() {
  457. this.setState({
  458. loading: false
  459. });
  460. }.bind(this)
  461. );
  462. },
  463. //编辑按钮操作
  464. edit(record) {
  465. this.setState({
  466. flag: true,
  467. editvisible: true
  468. });
  469. this.setState({
  470. loading: true
  471. });
  472. $.ajax({
  473. method: "get",
  474. dataType: "json",
  475. crossDomain: false,
  476. url: globalConfig.context + "/api/admin/recruitment/selectRecruitment",
  477. data: {
  478. id: record.id
  479. },
  480. success: function(data) {
  481. let thisdata = data.data;
  482. let str = "";
  483. placeList.forEach(item => {
  484. if (item.value == thisdata.region) {
  485. str = item.place;
  486. }
  487. });
  488. this.setState({
  489. id: thisdata.id,
  490. name: thisdata.name,
  491. releaseStatus: thisdata.releaseStatus,
  492. province: thisdata.province + "",
  493. region: thisdata.region,
  494. regionStr: str,
  495. editorcontext: thisdata.content,
  496. sort: thisdata.sort,
  497. locations: thisdata.locations,
  498. checked:thisdata.locations.length === companyList.length,
  499. indeterminate: thisdata.locations.length < companyList.length,
  500. time: thisdata.releaseTimeConvert,
  501. createTimeConvert: thisdata.createTimeConvert
  502. });
  503. }.bind(this)
  504. }).always(
  505. function() {
  506. this.setState({
  507. loading: false
  508. });
  509. }.bind(this)
  510. );
  511. },
  512. addNew(flag) {
  513. if (this.state.flag) {
  514. $.ajax({
  515. method: "post",
  516. dataType: "json",
  517. crossDomain: false,
  518. url:
  519. globalConfig.context + "/api/admin/recruitment/updateRecruitment",
  520. data: {
  521. id: this.state.id,
  522. name: this.state.name,
  523. province: this.state.province,
  524. sort: this.state.sort,
  525. locations: this.state.locations.join(','),
  526. content: this.state.editorcontext,
  527. region: this.state.region,
  528. releaseStatus: flag,
  529. releaseTimes: this.state.time
  530. },
  531. success: function(data) {
  532. if (data.error && data.error.length) {
  533. message.warning(data.error[0].message);
  534. } else {
  535. message.success('保存成功');
  536. this.cancelAdd();
  537. }
  538. }.bind(this)
  539. }).always(
  540. function() {
  541. this.setState({
  542. loading: false
  543. });
  544. }.bind(this)
  545. );
  546. } else {
  547. $.ajax({
  548. method: "post",
  549. dataType: "json",
  550. crossDomain: false,
  551. url: globalConfig.context + "/api/admin/recruitment/addRecruitment",
  552. data: {
  553. name: this.state.name,
  554. province: this.state.province,
  555. sort: this.state.sort,
  556. locations: this.state.locations.join(','),
  557. content: this.state.editorcontext,
  558. region: this.state.region,
  559. releaseStatus: flag,
  560. releaseTimes: this.state.time
  561. },
  562. success: function(data) {
  563. let theArr = [];
  564. if (data.error && data.error.length) {
  565. message.warning(data.error[0].message);
  566. } else {
  567. message.success('保存成功');
  568. this.cancelAdd();
  569. }
  570. }.bind(this)
  571. }).always(
  572. function() {
  573. this.setState({
  574. loading: false
  575. });
  576. }.bind(this)
  577. );
  578. }
  579. },
  580. //新增框的清零
  581. addReset() {
  582. this.setState({
  583. name: undefined,
  584. sort: undefined,
  585. locations: [],
  586. display: 1,
  587. province: [],
  588. editorcontext: "",
  589. region: undefined,
  590. time: undefined,
  591. indeterminate: false,
  592. checked:false,
  593. });
  594. },
  595. //搜索部分的清零
  596. reset() {
  597. this.setState({
  598. nameSearch: undefined,
  599. locationSearch: undefined,
  600. },()=>{
  601. this.loadData();
  602. })
  603. },
  604. imgOk() {
  605. this.setState({
  606. imgeditvisible: false
  607. });
  608. },
  609. getOrgCodeUrl(e) {
  610. this.setState({ bannerUrl: e });
  611. },
  612. render() {
  613. const FormItem = Form.Item;
  614. const rowSelection = {
  615. selectedRowKeys: this.state.selectedRowKeys,
  616. onChange: (selectedRowKeys, selectedRows) => {
  617. this.setState({
  618. selectedRows: selectedRows.slice(-1),
  619. selectedRowKeys: selectedRowKeys.slice(-1)
  620. });
  621. }
  622. };
  623. const { TextArea } = Input; //文本域
  624. const { TabPane } = Tabs; //标签页
  625. const { MonthPicker, RangePicker, WeekPicker } = DatePicker; //日期输入框
  626. const dateFormat = "YYYY/MM/DD"; //日期格式
  627. const theData = this.state.data || {};
  628. return (
  629. <div className="user-content">
  630. <div className="content-title">
  631. <span>招聘列表</span>
  632. <div className="user-search">
  633. <Input
  634. placeholder="请输入职位名称"
  635. value={this.state.nameSearch}
  636. onChange={e => {
  637. this.setState({ nameSearch: e.target.value });
  638. }}
  639. style={{
  640. width: "150px",
  641. marginRight: "10px",
  642. marginBottom: "10px"
  643. }}
  644. />
  645. <Select
  646. placeholder="请选择公司"
  647. style={{ width: 150 }}
  648. value={this.state.locationSearch}
  649. onChange={e => {
  650. this.setState({
  651. locationSearch: e
  652. });
  653. }}
  654. >
  655. {
  656. companyList.map((v)=>(
  657. <Select.Option key={v.value} value={v.value}>{v.label}</Select.Option>
  658. ))
  659. }
  660. </Select>
  661. <Button
  662. type="primary"
  663. onClick={this.search}
  664. style={{ marginRight: "10px" }}
  665. >
  666. 搜索
  667. </Button>
  668. <Button onClick={this.reset} style={{ marginRight: "10px" }}>
  669. 重置
  670. </Button>
  671. <Button
  672. type="primary"
  673. onClick={this.add}
  674. style={{ marginLeft: "100px" }}
  675. >
  676. 新增职位
  677. </Button>
  678. </div>
  679. <div className="patent-table">
  680. <SpinContainer spinning={this.state.loading}>
  681. <Table
  682. columns={this.state.columns}
  683. dataSource={this.state.dataSource}
  684. onRowClick={this.tableRowClick}
  685. pagination={this.state.pagination}
  686. bordered
  687. size="small"
  688. />
  689. </SpinContainer>
  690. </div>
  691. </div>
  692. <div className="patent-desc">
  693. <Modal
  694. className="customeDetails"
  695. title={this.state.flag ? "职位详情" : "新增职位"}
  696. visible={this.state.editvisible}
  697. onOk={this.edithandleCancel}
  698. width={"1000px"}
  699. onCancel={
  700. this.state.flag ? this.edithandleCancel : this.cancelAdd
  701. }
  702. footer=""
  703. >
  704. <Form
  705. layout="horizontal"
  706. onSubmit={this.edithandleSubmit}
  707. id="demand-form"
  708. >
  709. <SpinContainer spinning={this.state.loading}>
  710. <div className="clearfix">
  711. <FormItem
  712. className="half-item"
  713. labelCol={{ span: 8 }}
  714. wrapperCol={{ span: 12 }}
  715. label="职位名称"
  716. >
  717. <Input
  718. placeholder="请输入职位名称"
  719. value={this.state.name}
  720. onChange={e => {
  721. this.setState({ name: e.target.value });
  722. }}
  723. style={{ width: "240px" }}
  724. />
  725. </FormItem>
  726. <div className="clearfix">
  727. <FormItem
  728. className="half-item"
  729. labelCol={{ span: 8 }}
  730. wrapperCol={{ span: 12 }}
  731. label="发布时间"
  732. >
  733. <DatePicker
  734. placeholder="请输入发布时间"
  735. format="YYYY-MM-DD HH:mm:ss"
  736. showTime
  737. value={
  738. this.state.time ? moment(this.state.time) : null
  739. }
  740. onChange={(e, f) => {
  741. this.setState({ time: f });
  742. }}
  743. style={{ width: "240px" }}
  744. />
  745. </FormItem>
  746. </div>
  747. <div className="clearfix">
  748. <FormItem
  749. className="half-item"
  750. labelCol={{ span: 8 }}
  751. wrapperCol={{ span: 12 }}
  752. label="招聘省份"
  753. >
  754. <Select
  755. style={{ width: 120 }}
  756. placeholder="请选择省份"
  757. value={this.state.province}
  758. onChange={e => {
  759. this.setState({
  760. province: e
  761. });
  762. let str = "";
  763. provinceStatus.forEach(item => {
  764. if (item.value == e) {
  765. str = item.key;
  766. }
  767. });
  768. placeList.forEach(item => {
  769. item.children.forEach(key => {
  770. if (key == str) {
  771. this.setState({
  772. regionStr: item.place,
  773. region: item.value
  774. });
  775. }
  776. });
  777. });
  778. }}
  779. >
  780. {provinceStatus.map(item => {
  781. return (
  782. <Option value={item.value}>{item.key}</Option>
  783. );
  784. })}
  785. </Select>
  786. </FormItem>
  787. </div>
  788. <FormItem
  789. className="half-item"
  790. labelCol={{ span: 8 }}
  791. wrapperCol={{ span: 12 }}
  792. label="排序"
  793. >
  794. <Input
  795. placeholder="请输入数字"
  796. value={this.state.sort}
  797. onChange={e => {
  798. this.setState({
  799. sort: e.target.value
  800. });
  801. }}
  802. style={{ width: "140px" }}
  803. />
  804. </FormItem>
  805. <FormItem
  806. className="half-item"
  807. labelCol={{ span: 8 }}
  808. wrapperCol={{ span: 12 }}
  809. label="公司"
  810. >
  811. <Checkbox indeterminate={this.state.indeterminate} checked={this.state.checked} onChange={(e)=>{
  812. this.setState({
  813. locations: e.target.checked ? getCompanyValueArray():[],
  814. indeterminate: false,
  815. checked:e.target.checked
  816. })
  817. }}>全选</Checkbox>
  818. <Checkbox.Group
  819. options={companyList}
  820. value={this.state.locations}
  821. onChange={(e) => {
  822. this.setState({
  823. locations: e,
  824. indeterminate: companyList.length > e.length,
  825. checked: companyList.length === e.length
  826. });
  827. }}
  828. />
  829. </FormItem>
  830. </div>
  831. <div className="clearfix">
  832. <FormItem
  833. labelCol={{ span: 4 }}
  834. wrapperCol={{ span: 18 }}
  835. label="招聘内容"
  836. >
  837. <Editors
  838. textContent={this.state.editorcontext}
  839. uploadUrl={"/api/admin/recruitment/uploadFile"}
  840. globalConfig={globalConfig.uploadPath}
  841. placeholder="业务项目客户基本条件"
  842. handleRichText={value => {
  843. // this.setState({ editorcontext: value });
  844. this.setState({
  845. editorcontext: value
  846. });
  847. }}
  848. />
  849. </FormItem>
  850. </div>
  851. <div className="clearfix">
  852. <Button
  853. type="primary"
  854. size="large"
  855. onClick={e => {
  856. this.addNew(0);
  857. }}
  858. style={{
  859. float: "right",
  860. marginRight: "80px",
  861. marginTop: "20px"
  862. }}
  863. >
  864. 保存
  865. </Button>
  866. <Button
  867. type="primary"
  868. size="large"
  869. onClick={e => {
  870. this.addNew(1);
  871. }}
  872. style={{
  873. float: "right",
  874. marginRight: "20px",
  875. marginTop: "20px"
  876. }}
  877. >
  878. 保存并发布
  879. </Button>
  880. </div>
  881. </SpinContainer>
  882. </Form>
  883. </Modal>
  884. </div>
  885. <Modal
  886. visible={this.state.imgeditvisible}
  887. onCancel={this.imghandleCancel}
  888. onOk={this.imgOk}
  889. >
  890. <img style={{ width: "100%" }} src={this.state.maximg} />
  891. </Modal>
  892. </div>
  893. );
  894. }
  895. })
  896. );
  897. export default TalentsList;