From 75fa1bb87cf216dc4525d1a427924de464b03e80 Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Tue, 14 Apr 2020 10:33:39 +0800
Subject: [PATCH] 修稿favicon、修改bug

---
 src/components/page/DocumentEditPage/index.jsx |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/components/page/DocumentEditPage/index.jsx b/src/components/page/DocumentEditPage/index.jsx
index d650694..ba3c510 100644
--- a/src/components/page/DocumentEditPage/index.jsx
+++ b/src/components/page/DocumentEditPage/index.jsx
@@ -99,6 +99,8 @@
       _this.setState({
         iconLoading: false,
       });
+      message.success("提交成功!");
+      this.props.history.goBack()
     });
     // Fetch.savePatrolCom(savedate)
     //   .then(res => {
@@ -114,9 +116,9 @@
   cancle = () => {
     // this.props.history.push("/index/workbench");
     const { id } = this.props.match.params;
-    if(id){
+    if (id) {
       this.props.history.goBack()
-    }else {
+    } else {
       this.props.history.push("/index/workbench");
     }
     // console.log(this.props)
@@ -126,6 +128,9 @@
     const { savedate, fileList, loading, disabled } = this.state;
     const props = {
       action: BASE_URL + `api/attachment/materials?associateId=${savedate.documentType == 'DT00002' ? 1001 : 1002}&entityId=` + savedate.id,
+      header: {
+        Authorization: window.localStorage.getItem('token')
+      },
       onChange: ({ file, fileList }) => {
         if (file.status !== 'uploading') {
           console.log(file);
@@ -165,7 +170,7 @@
             <Row gutter={16}>
               <Col className="gutter-row" >
                 文档类型:
-            </Col>
+              </Col>
             </Row>
             <Row gutter={16}>
               <Col className="gutter-row" style={{ margin: '12px 0' }} >
@@ -184,7 +189,7 @@
               <Row gutter={16} style={{ marginTop: '12px' }}>
                 <Col className="gutter-row" style={{ marginTop: '12px' }}>
                   通知标题:
-                </Col>
+                                </Col>
               </Row>
             }
             {
@@ -192,7 +197,7 @@
               <Row gutter={16} style={{ marginTop: '12px' }}>
                 <Col className="gutter-row" style={{ marginTop: '12px' }}>
                   规章制度标题:
-                </Col>
+                                </Col>
               </Row>
             }
             <Row gutter={16}>
@@ -206,7 +211,7 @@
               <Row gutter={16}>
                 <Col className="gutter-row" >
                   通知内容:
-            </Col>
+                                </Col>
               </Row>
             }
             {
@@ -258,9 +263,9 @@
                 </Col>
               </Row>
             }
-            <Row gutter={16} style={{ marginTop: '12px' }}>
-              <Col span={2} className="gutter-row" ><Button disabled={disabled} style={{ marginRight: '15px', width: '100px' }} type="primary" loading={this.state.iconLoading} onClick={this.submit}>发布</Button></Col>
-              <Col span={2} className="gutter-row" ><Button style={{ marginLeft: '15px', width: '100px' }} onClick={this.cancle}>返回</Button></Col>
+            <Row type="flex" gutter={20} style={{ marginTop: '12px' }}>
+              <Col className="gutter-row" ><Button onClick={this.cancle}>返回</Button></Col>
+              <Col className="gutter-row" ><Button disabled={disabled} type="primary" loading={this.state.iconLoading} onClick={this.submit}>发布</Button></Col>
             </Row>
           </Card>
         </Spin>

--
Gitblit v1.8.0