proservlist.jsx 25 KB

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