Commit 3c0987e2 by fanyongjun

9.16

parent adae09af
...@@ -29,3 +29,12 @@ code { ...@@ -29,3 +29,12 @@ code {
monospace; monospace;
} }
.apply-file-label .ant-form-item-label > label::after{
display: none
}
.apply-file-label > .apply-file-span::after{
content: ':';
// position: relative;
// top: -0.5px;
margin: 0 8px 0 2px;
}
...@@ -315,6 +315,7 @@ class AssetListCOM extends Component { ...@@ -315,6 +315,7 @@ class AssetListCOM extends Component {
onCancel={e => { onCancel={e => {
this.setState({ showModal: false }); this.setState({ showModal: false });
}} }}
footer={null}
> >
<DataDetail <DataDetail
tableModel={tableModel} tableModel={tableModel}
......
import React, { Component, Fragment, useState } from 'react'; import React, { Component, Fragment, useState } from 'react';
import { Table, Descriptions, Row, Col, Input, Checkbox, Divider, Pagination, Form, DatePicker, Button, message, Upload } from 'antd'; import { Table, Descriptions, Row, Col, Input, Checkbox, Divider, Pagination, Form, DatePicker, Button, message, Upload, Tooltip, Icon } from 'antd';
import classnames from 'classnames'; import classnames from 'classnames';
import { CheckOutlined } from '@ant-design/icons'; import { CheckOutlined } from '@ant-design/icons';
...@@ -187,6 +187,16 @@ const ApplyDescFunc = ({ dataDesc, form, apply }) => { ...@@ -187,6 +187,16 @@ const ApplyDescFunc = ({ dataDesc, form, apply }) => {
}); });
const normFile = e => { const normFile = e => {
console.log(e)
const isLt20M = e.file.size / 1024 / 1024 < 20;
const isJPG = e.file.type === 'image/jpeg';
const isPNG = e.file.type === 'image/png';
if (!isLt20M) {
return
}
if(!(isJPG || isPNG)){
return
}
let data = [] let data = []
if(e.fileList[0]){ if(e.fileList[0]){
data = e.fileList.slice(-1) data = e.fileList.slice(-1)
...@@ -197,11 +207,17 @@ const ApplyDescFunc = ({ dataDesc, form, apply }) => { ...@@ -197,11 +207,17 @@ const ApplyDescFunc = ({ dataDesc, form, apply }) => {
const props = { const props = {
beforeUpload: file => { beforeUpload: file => {
const isLt20M = file.size / 1024 / 1024 < 20; const isLt20M = file.size / 1024 / 1024 < 20;
const isJPG = file.type === 'image/jpeg';
const isPNG = file.type === 'image/png';
if (!isLt20M) { if (!isLt20M) {
return message.error('上传文件不能超过 20MB!') message.error('上传文件不能超过 20MB!')
return false
} }
if(!(isJPG || isPNG)){
return false; message.error('上传格式错误')
return false
}
return false
}, },
}; };
...@@ -272,12 +288,14 @@ const ApplyDescFunc = ({ dataDesc, form, apply }) => { ...@@ -272,12 +288,14 @@ const ApplyDescFunc = ({ dataDesc, form, apply }) => {
rules: [{ required: true, message: '请填写申请说明' }], rules: [{ required: true, message: '请填写申请说明' }],
})(<Input.TextArea placeholder="申请说明" />)} })(<Input.TextArea placeholder="申请说明" />)}
</Form.Item> </Form.Item>
<Form.Item label="结束时间">
<Form.Item label={<span>数据验收确认时间 <Tooltip overlayStyle={{maxWidth:"100%"}} title={<span style={{whiteSpace:"nowrap"}}>申请该接口后,用户确认接口数据无异常时间节点</span>}><Icon type="question-circle"></Icon></Tooltip></span>}>
{getFieldDecorator('expire', { {getFieldDecorator('expire', {
rules: [{ required: true, message: '请选择结束时间' }], rules: [{ required: true, message: '请选择结束时间' }],
})(<DatePicker />)} })(<DatePicker />)}
</Form.Item> </Form.Item>
<Form.Item label="附件" > <Form.Item className="apply-file-label" label={<span ><span className="apply-file-span">附件</span><span style={{margin: '0 8px 0 2px'}}>:</span><span style={{fontSize:12,color:'rgba(0,0,0,.45)',width:300, wordWrap: 'break-word',wordBreak: 'break-all'}}>请上传线下数据中台接口申请表记录图片(信息中心已签字确认),申请表可在 数据管理》规范文档中下载,本附件仅支持JPG或者PNG格式</span></span>} >
{getFieldDecorator('file', { {getFieldDecorator('file', {
rules: [{ required: true, message: '请上传附件'}], rules: [{ required: true, message: '请上传附件'}],
valuePropName: 'fileList', valuePropName: 'fileList',
...@@ -295,7 +313,6 @@ const ApplyDescFunc = ({ dataDesc, form, apply }) => { ...@@ -295,7 +313,6 @@ const ApplyDescFunc = ({ dataDesc, form, apply }) => {
message.error('请选择下列字段'); message.error('请选择下列字段');
return; return;
} }
if (!err) { if (!err) {
if (apply) { if (apply) {
set_keyword({ keyword: ''}); set_keyword({ keyword: ''});
......
...@@ -115,6 +115,7 @@ export default class MetadataListCOM extends Component { ...@@ -115,6 +115,7 @@ export default class MetadataListCOM extends Component {
onCancel={e => { onCancel={e => {
this.setState({ showModal: false }); this.setState({ showModal: false });
}} }}
footer={null}
> >
<DataDetail tableModel={tableModel}/> <DataDetail tableModel={tableModel}/>
<Tabs <Tabs
......
...@@ -199,11 +199,7 @@ export default class ListBox extends Component { ...@@ -199,11 +199,7 @@ export default class ListBox extends Component {
onCancel={e => { onCancel={e => {
this.setState({ showModal: false }); this.setState({ showModal: false });
}} }}
footer={ footer={null}
<div>
<Button type="primary" onClick={e => { this.setState({ showModal: false, }); }}>关闭</Button>
</div>
}
> >
<DetailBox <DetailBox
tableModel={tableModel} tableModel={tableModel}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment