forked from huge/frontEnd/hugeOA

Mr Ke
2020-04-14 7cd6587d43dfda47b043c775ea9e67ee4c1bbd08
跳转问题
3 files modified
21 ■■■■ changed files
src/api/httpurl.js 4 ●●●● patch | view | raw | blame | history
src/components/page/DocumentEditPage/index.jsx 14 ●●●● patch | view | raw | blame | history
src/components/page/DocumentEditPage/index.scss 3 ●●●●● patch | view | raw | blame | history
src/api/httpurl.js
@@ -1,6 +1,6 @@
//内网测试地址
let StagingUrl = 'http://192.168.0.114:9072';
// let StagingUrl = "http://120.79.193.119:9072";
// let StagingUrl = 'http://192.168.0.114:9072';
let StagingUrl = "http://120.79.193.119:9072";
//mock地址
src/components/page/DocumentEditPage/index.jsx
@@ -44,7 +44,7 @@
    _this.setState({
      loading: true,
      disabled: id ? true : false
    })
    })
    fetch({
      url: 'api/document/findDetail',
      params: {
@@ -58,6 +58,7 @@
          documentType: res.documentType || 'DT00002'
        },
        loading: false,
        fileList: res.attachmentList && res.attachmentList.map((a) => ({ ...a, key: a.id, uid: a.id, name: a.fileName + '.' + a.suffix})) || []
      });
    });
  }
@@ -100,7 +101,8 @@
        iconLoading: false,
      });
      message.success("提交成功!");
      this.props.history.goBack()
      this.props.history.push("/index/rules")
      // this.props.history.goBack()
    });
    // Fetch.savePatrolCom(savedate)
    //   .then(res => {
@@ -140,6 +142,10 @@
        this.setState({ fileList });
      },
      fileList: fileList,
      onPreview: (file) => {
        console.log(file)
      },
      showUploadList: { showPreviewIcon: true, showDownloadIcon: true, showRemoveIcon: disabled ? false : true }
      // onDownload: (file) => {
      //   console.log(file)
      //   Fetch.attachmentDownload(file.uid)
@@ -233,8 +239,8 @@
            {savedate.documentType == 'DT00001' &&
              <Row gutter={16} >
                <Col className="gutter-row" >
                  <Upload {...props}>
                    <Button disabled={disabled}>
                  <Upload {...props} >
                    <Button disabled={disabled} style={{ display: disabled ? 'none' : 'inline-block' }}>
                      <Icon type="upload" />上传文件</Button>
                  </Upload>
                </Col>
src/components/page/DocumentEditPage/index.scss
@@ -7,6 +7,9 @@
/** Happy Coding */
.document-edit-page {
  &-main {
    & .ant-upload.ant-upload-select{
      display: flex;
    }
  }
}