firmList.jsx 26 KB

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