talentsList.jsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  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. render: r => {
  232. let text = '';
  233. r && r.map((v,i)=>(
  234. text += (i === 0 ? '':',')+getCompanyName(v)
  235. ))
  236. return(
  237. <Tooltip placement="top" title={text}>
  238. {
  239. r && r.map((v,i)=>(
  240. i <= 2 ? (i === 0 ? '':',')+getCompanyName(v) : null
  241. ))
  242. }
  243. {
  244. r.length > 3 ? '.....' : null
  245. }
  246. </Tooltip>
  247. )
  248. }
  249. },
  250. {
  251. title: "操作",
  252. dataIndex: "c",
  253. render: (text, record, index) => {
  254. return (
  255. <div>
  256. {
  257. <Button
  258. type="primary"
  259. onClick={event => {
  260. this.stopPropagation(event);
  261. this.edit(record);
  262. }}
  263. >
  264. 编辑
  265. </Button>
  266. }
  267. {
  268. <Popconfirm
  269. okText="确定"
  270. cancelText="取消"
  271. title="您确定删除?删除后,招聘信息将不再显示"
  272. onConfirm={() => {
  273. this.delete(record.id);
  274. }}
  275. >
  276. <Button
  277. type="danger"
  278. style={{ marginLeft: "10px" }}
  279. onClick={event => {
  280. this.stopPropagation(event);
  281. }}
  282. >
  283. 删除
  284. </Button>
  285. </Popconfirm>
  286. }
  287. <Button
  288. type="primary"
  289. style={{ marginLeft: "10px" }}
  290. onClick={event => {
  291. this.stopPropagation(event);
  292. if (record.releaseStatus) {
  293. this.remove(record, 0);
  294. } else {
  295. this.remove(record, 1);
  296. }
  297. }}
  298. >
  299. {record.releaseStatus ? "撤销发布" : "发布"}
  300. </Button>
  301. </div>
  302. );
  303. }
  304. },
  305. {
  306. title: "发布时间",
  307. dataIndex: "releaseTimeConvert",
  308. key: "releaseTimeConvert"
  309. }
  310. ],
  311. //数据列表
  312. dataSource: []
  313. };
  314. },
  315. componentWillMount() {
  316. this.loadData();
  317. },
  318. detailes(record) {
  319. this.setState({
  320. loading: true
  321. });
  322. $.ajax({
  323. method: "get",
  324. dataType: "json",
  325. crossDomain: false,
  326. url: globalConfig.context + "/api/admin/banners/selectBanners",
  327. data: {
  328. id: record.id
  329. },
  330. success: function(data) {
  331. let thisdata = data.data;
  332. this.setState({
  333. id: thisdata.id,
  334. title: thisdata.title,
  335. bannerUrl: thisdata.bannerUrl
  336. ? splitUrl(thisdata.bannerUrl, ",", globalConfig.avatarUploadHost)
  337. : [],
  338. sortNumber: thisdata.sort,
  339. display: thisdata.display,
  340. position: thisdata.position
  341. });
  342. }.bind(this)
  343. }).always(
  344. function() {
  345. this.setState({
  346. loading: false
  347. });
  348. }.bind(this)
  349. );
  350. },
  351. //点击大图
  352. maximg(url) {
  353. this.setState({
  354. imgeditvisible: true,
  355. maximg: url
  356. });
  357. },
  358. //删除按钮
  359. delete(id) {
  360. $.ajax({
  361. method: "post",
  362. dataType: "json",
  363. crossDomain: false,
  364. url: globalConfig.context + "/api/admin/recruitment/deleteRecruitment",
  365. data: {
  366. id
  367. },
  368. success: function(data) {
  369. if (data.error && data.error.length) {
  370. message.warning(data.error[0].message);
  371. } else {
  372. message.success('删除成功')
  373. this.loadData();
  374. }
  375. }.bind(this)
  376. }).always(
  377. function() {
  378. this.setState({
  379. loading: false
  380. });
  381. }.bind(this)
  382. );
  383. },
  384. //阻止默认冒泡
  385. stopPropagation(e) {
  386. e.stopPropagation();
  387. e.nativeEvent.stopImmediatePropagation();
  388. },
  389. imghandleCancel() {
  390. this.setState({
  391. imgeditvisible: false
  392. });
  393. },
  394. //项目列表整行点击
  395. tableRowClick(record, index) {
  396. this.setState({
  397. editvisible: true
  398. });
  399. this.edit(record);
  400. },
  401. edithandleCancel(e) {
  402. this.setState(
  403. {
  404. editvisible: false
  405. },
  406. () => {
  407. this.addReset();
  408. }
  409. );
  410. this.loadData();
  411. },
  412. search() {
  413. this.loadData();
  414. },
  415. add() {
  416. this.setState({
  417. editvisible: true,
  418. flag: false
  419. });
  420. this.addReset();
  421. },
  422. cancelAdd() {
  423. this.setState(
  424. {
  425. editvisible: false
  426. },
  427. () => {
  428. this.setState({
  429. flag: true
  430. });
  431. this.addReset();
  432. }
  433. );
  434. this.loadData();
  435. },
  436. //撤下
  437. remove(record,flag) {
  438. $.ajax({
  439. method: "post",
  440. dataType: "json",
  441. crossDomain: false,
  442. url: globalConfig.context + "/api/admin/recruitment/updateRecruitment",
  443. data: {
  444. id: record.id,
  445. releaseStatus: flag
  446. },
  447. success: function(data) {
  448. if (data.error && data.error.length) {
  449. message.warning(data.error[0].message);
  450. } else {
  451. this.loadData();
  452. }
  453. }.bind(this)
  454. }).always(
  455. function() {
  456. this.setState({
  457. loading: false
  458. });
  459. }.bind(this)
  460. );
  461. },
  462. //编辑按钮操作
  463. edit(record) {
  464. this.setState({
  465. flag: true,
  466. editvisible: true
  467. });
  468. this.setState({
  469. loading: true
  470. });
  471. $.ajax({
  472. method: "get",
  473. dataType: "json",
  474. crossDomain: false,
  475. url: globalConfig.context + "/api/admin/recruitment/selectRecruitment",
  476. data: {
  477. id: record.id
  478. },
  479. success: function(data) {
  480. let thisdata = data.data;
  481. let str = "";
  482. placeList.forEach(item => {
  483. if (item.value == thisdata.region) {
  484. str = item.place;
  485. }
  486. });
  487. this.setState({
  488. id: thisdata.id,
  489. name: thisdata.name,
  490. releaseStatus: thisdata.releaseStatus,
  491. province: thisdata.province + "",
  492. region: thisdata.region,
  493. regionStr: str,
  494. editorcontext: thisdata.content,
  495. sort: thisdata.sort,
  496. locations: thisdata.locations,
  497. checked:thisdata.locations.length === companyList.length,
  498. indeterminate: thisdata.locations.length < companyList.length,
  499. time: thisdata.releaseTimeConvert,
  500. createTimeConvert: thisdata.createTimeConvert
  501. });
  502. }.bind(this)
  503. }).always(
  504. function() {
  505. this.setState({
  506. loading: false
  507. });
  508. }.bind(this)
  509. );
  510. },
  511. addNew(flag) {
  512. if (this.state.flag) {
  513. $.ajax({
  514. method: "post",
  515. dataType: "json",
  516. crossDomain: false,
  517. url:
  518. globalConfig.context + "/api/admin/recruitment/updateRecruitment",
  519. data: {
  520. id: this.state.id,
  521. name: this.state.name,
  522. province: this.state.province,
  523. sort: this.state.sort,
  524. locations: this.state.locations.join(','),
  525. content: this.state.editorcontext,
  526. region: this.state.region,
  527. releaseStatus: flag,
  528. releaseTimes: this.state.time
  529. },
  530. success: function(data) {
  531. if (data.error && data.error.length) {
  532. message.warning(data.error[0].message);
  533. } else {
  534. message.success('保存成功');
  535. this.cancelAdd();
  536. }
  537. }.bind(this)
  538. }).always(
  539. function() {
  540. this.setState({
  541. loading: false
  542. });
  543. }.bind(this)
  544. );
  545. } else {
  546. $.ajax({
  547. method: "post",
  548. dataType: "json",
  549. crossDomain: false,
  550. url: globalConfig.context + "/api/admin/recruitment/addRecruitment",
  551. data: {
  552. name: this.state.name,
  553. province: this.state.province,
  554. sort: this.state.sort,
  555. locations: this.state.locations.join(','),
  556. content: this.state.editorcontext,
  557. region: this.state.region,
  558. releaseStatus: flag,
  559. releaseTimes: this.state.time
  560. },
  561. success: function(data) {
  562. let theArr = [];
  563. if (data.error && data.error.length) {
  564. message.warning(data.error[0].message);
  565. } else {
  566. message.success('保存成功');
  567. this.cancelAdd();
  568. }
  569. }.bind(this)
  570. }).always(
  571. function() {
  572. this.setState({
  573. loading: false
  574. });
  575. }.bind(this)
  576. );
  577. }
  578. },
  579. //新增框的清零
  580. addReset() {
  581. this.setState({
  582. name: undefined,
  583. sort: undefined,
  584. locations: [],
  585. display: 1,
  586. province: [],
  587. editorcontext: "",
  588. region: undefined,
  589. time: undefined,
  590. indeterminate: false,
  591. checked:false,
  592. });
  593. },
  594. //搜索部分的清零
  595. reset() {
  596. this.setState({
  597. nameSearch: undefined,
  598. locationSearch: undefined,
  599. },()=>{
  600. this.loadData();
  601. })
  602. },
  603. imgOk() {
  604. this.setState({
  605. imgeditvisible: false
  606. });
  607. },
  608. getOrgCodeUrl(e) {
  609. this.setState({ bannerUrl: e });
  610. },
  611. render() {
  612. const FormItem = Form.Item;
  613. const rowSelection = {
  614. selectedRowKeys: this.state.selectedRowKeys,
  615. onChange: (selectedRowKeys, selectedRows) => {
  616. this.setState({
  617. selectedRows: selectedRows.slice(-1),
  618. selectedRowKeys: selectedRowKeys.slice(-1)
  619. });
  620. }
  621. };
  622. const { TextArea } = Input; //文本域
  623. const { TabPane } = Tabs; //标签页
  624. const { MonthPicker, RangePicker, WeekPicker } = DatePicker; //日期输入框
  625. const dateFormat = "YYYY/MM/DD"; //日期格式
  626. const theData = this.state.data || {};
  627. return (
  628. <div className="user-content">
  629. <div className="content-title">
  630. <span>招聘列表</span>
  631. <div className="user-search">
  632. <Input
  633. placeholder="请输入职位名称"
  634. value={this.state.nameSearch}
  635. onChange={e => {
  636. this.setState({ nameSearch: e.target.value });
  637. }}
  638. style={{
  639. width: "150px",
  640. marginRight: "10px",
  641. marginBottom: "10px"
  642. }}
  643. />
  644. <Select
  645. placeholder="请选择公司"
  646. style={{ width: 150 }}
  647. value={this.state.locationSearch}
  648. onChange={e => {
  649. this.setState({
  650. locationSearch: e
  651. });
  652. }}
  653. >
  654. {
  655. companyList.map((v)=>(
  656. <Select.Option key={v.value} value={v.value}>{v.label}</Select.Option>
  657. ))
  658. }
  659. </Select>
  660. <Button
  661. type="primary"
  662. onClick={this.search}
  663. style={{ marginRight: "10px" }}
  664. >
  665. 搜索
  666. </Button>
  667. <Button onClick={this.reset} style={{ marginRight: "10px" }}>
  668. 重置
  669. </Button>
  670. <Button
  671. type="primary"
  672. onClick={this.add}
  673. style={{ marginLeft: "100px" }}
  674. >
  675. 新增职位
  676. </Button>
  677. </div>
  678. <div className="patent-table">
  679. <SpinContainer spinning={this.state.loading}>
  680. <Table
  681. columns={this.state.columns}
  682. dataSource={this.state.dataSource}
  683. onRowClick={this.tableRowClick}
  684. pagination={this.state.pagination}
  685. bordered
  686. size="small"
  687. />
  688. </SpinContainer>
  689. </div>
  690. </div>
  691. <div className="patent-desc">
  692. <Modal
  693. className="customeDetails"
  694. title={this.state.flag ? "职位详情" : "新增职位"}
  695. visible={this.state.editvisible}
  696. onOk={this.edithandleCancel}
  697. width={"1000px"}
  698. onCancel={
  699. this.state.flag ? this.edithandleCancel : this.cancelAdd
  700. }
  701. footer=""
  702. >
  703. <Form
  704. layout="horizontal"
  705. onSubmit={this.edithandleSubmit}
  706. id="demand-form"
  707. >
  708. <SpinContainer spinning={this.state.loading}>
  709. <div className="clearfix">
  710. <FormItem
  711. className="half-item"
  712. labelCol={{ span: 8 }}
  713. wrapperCol={{ span: 12 }}
  714. label="职位名称"
  715. >
  716. <Input
  717. placeholder="请输入职位名称"
  718. value={this.state.name}
  719. onChange={e => {
  720. this.setState({ name: e.target.value });
  721. }}
  722. style={{ width: "240px" }}
  723. />
  724. </FormItem>
  725. <div className="clearfix">
  726. <FormItem
  727. className="half-item"
  728. labelCol={{ span: 8 }}
  729. wrapperCol={{ span: 12 }}
  730. label="发布时间"
  731. >
  732. <DatePicker
  733. placeholder="请输入发布时间"
  734. format="YYYY-MM-DD HH:mm:ss"
  735. showTime
  736. value={
  737. this.state.time ? moment(this.state.time) : null
  738. }
  739. onChange={(e, f) => {
  740. this.setState({ time: f });
  741. }}
  742. style={{ width: "240px" }}
  743. />
  744. </FormItem>
  745. </div>
  746. <div className="clearfix">
  747. <FormItem
  748. className="half-item"
  749. labelCol={{ span: 8 }}
  750. wrapperCol={{ span: 12 }}
  751. label="招聘省份"
  752. >
  753. <Select
  754. style={{ width: 120 }}
  755. placeholder="请选择省份"
  756. value={this.state.province}
  757. onChange={e => {
  758. this.setState({
  759. province: e
  760. });
  761. let str = "";
  762. provinceStatus.forEach(item => {
  763. if (item.value == e) {
  764. str = item.key;
  765. }
  766. });
  767. placeList.forEach(item => {
  768. item.children.forEach(key => {
  769. if (key == str) {
  770. this.setState({
  771. regionStr: item.place,
  772. region: item.value
  773. });
  774. }
  775. });
  776. });
  777. }}
  778. >
  779. {provinceStatus.map(item => {
  780. return (
  781. <Option value={item.value}>{item.key}</Option>
  782. );
  783. })}
  784. </Select>
  785. </FormItem>
  786. </div>
  787. <FormItem
  788. className="half-item"
  789. labelCol={{ span: 8 }}
  790. wrapperCol={{ span: 12 }}
  791. label="排序"
  792. >
  793. <Input
  794. placeholder="请输入数字"
  795. value={this.state.sort}
  796. onChange={e => {
  797. this.setState({
  798. sort: e.target.value
  799. });
  800. }}
  801. style={{ width: "140px" }}
  802. />
  803. </FormItem>
  804. <FormItem
  805. className="half-item"
  806. labelCol={{ span: 8 }}
  807. wrapperCol={{ span: 12 }}
  808. label="公司"
  809. >
  810. <Checkbox indeterminate={this.state.indeterminate} checked={this.state.checked} onChange={(e)=>{
  811. this.setState({
  812. locations: e.target.checked ? getCompanyValueArray():[],
  813. indeterminate: false,
  814. checked:e.target.checked
  815. })
  816. }}>全选</Checkbox>
  817. <Checkbox.Group
  818. options={companyList}
  819. value={this.state.locations}
  820. onChange={(e) => {
  821. this.setState({
  822. locations: e,
  823. indeterminate: companyList.length > e.length,
  824. checked: companyList.length === e.length
  825. });
  826. }}
  827. />
  828. </FormItem>
  829. </div>
  830. <div className="clearfix">
  831. <FormItem
  832. labelCol={{ span: 4 }}
  833. wrapperCol={{ span: 18 }}
  834. label="招聘内容"
  835. >
  836. <Editors
  837. textContent={this.state.editorcontext}
  838. uploadUrl={"/api/admin/recruitment/uploadFile"}
  839. globalConfig={globalConfig.uploadPath}
  840. placeholder="业务项目客户基本条件"
  841. handleRichText={value => {
  842. // this.setState({ editorcontext: value });
  843. this.setState({
  844. editorcontext: value
  845. });
  846. }}
  847. />
  848. </FormItem>
  849. </div>
  850. <div className="clearfix">
  851. <Button
  852. type="primary"
  853. size="large"
  854. onClick={e => {
  855. this.addNew(0);
  856. }}
  857. style={{
  858. float: "right",
  859. marginRight: "80px",
  860. marginTop: "20px"
  861. }}
  862. >
  863. 保存
  864. </Button>
  865. <Button
  866. type="primary"
  867. size="large"
  868. onClick={e => {
  869. this.addNew(1);
  870. }}
  871. style={{
  872. float: "right",
  873. marginRight: "20px",
  874. marginTop: "20px"
  875. }}
  876. >
  877. 保存并发布
  878. </Button>
  879. </div>
  880. </SpinContainer>
  881. </Form>
  882. </Modal>
  883. </div>
  884. <Modal
  885. visible={this.state.imgeditvisible}
  886. onCancel={this.imghandleCancel}
  887. onOk={this.imgOk}
  888. >
  889. <img style={{ width: "100%" }} src={this.state.maximg} />
  890. </Modal>
  891. </div>
  892. );
  893. }
  894. })
  895. );
  896. export default TalentsList;