Commit 2f016c16 authored by 熊成伟's avatar 熊成伟

debug

parent 2744ec8c
Pipeline #16361 failed with stages
in 36 seconds
......@@ -267,6 +267,19 @@
"rmc-steps": "~1.0.0",
"rmc-tabs": "~1.2.0",
"rmc-tooltip": "~1.0.0"
},
"dependencies": {
"rc-checkbox": {
"version": "2.0.3",
"resolved": "https://registry.npm.taobao.org/rc-checkbox/download/rc-checkbox-2.0.3.tgz?cache=0&sync_timestamp=1594780152378&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frc-checkbox%2Fdownload%2Frc-checkbox-2.0.3.tgz",
"integrity": "sha1-Q2qdUIlI4iSYDwU16nOLSBd6jyU=",
"requires": {
"babel-runtime": "^6.23.0",
"classnames": "2.x",
"prop-types": "15.x",
"rc-util": "^4.0.4"
}
}
}
},
"anymatch": {
......@@ -9711,14 +9724,12 @@
}
},
"rc-checkbox": {
"version": "2.0.3",
"resolved": "https://registry.npm.taobao.org/rc-checkbox/download/rc-checkbox-2.0.3.tgz",
"integrity": "sha1-Q2qdUIlI4iSYDwU16nOLSBd6jyU=",
"version": "2.3.1",
"resolved": "https://registry.npm.taobao.org/rc-checkbox/download/rc-checkbox-2.3.1.tgz?cache=0&sync_timestamp=1594780152378&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frc-checkbox%2Fdownload%2Frc-checkbox-2.3.1.tgz",
"integrity": "sha1-KmG8QwF8eDvS6fGmdVO/jv56pNM=",
"requires": {
"babel-runtime": "^6.23.0",
"classnames": "2.x",
"prop-types": "15.x",
"rc-util": "^4.0.4"
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.1"
}
},
"rc-collapse": {
......
......@@ -13,6 +13,7 @@
"postcss-px2rem": "^0.3.0",
"qs": "^6.9.4",
"query-string": "^5.1.1",
"rc-checkbox": "^2.3.1",
"rc-form": "^2.4.11",
"rc-upload": "^3.2.0",
"react": "^16.8.4",
......
import React, {useState, useEffect} from 'react';
import {Button, Checkbox, WhiteSpace, WingBlank} from "antd-mobile";
const AgreeItem = Checkbox.AgreeItem;
const TreeData = (props) => {
const {data, onClick, closeModal} = props;
const [treeData, setTreeData] = useState([]);
useEffect(() => {
const newData = JSON.parse(JSON.stringify(data));
newData.map((item, index) => {item.subList = newData.filter(child => item.XH === child.LSID); item.keyIndex = index});
setTreeData(newData);
}, [data]);
const [sGood, setSGood] = useState([])
const checkGood = (keyIndex, checked) => {
const newData = [...sGood];
const Index = sGood.findIndex(item => item === keyIndex);
checked ? newData.push(keyIndex) : newData.splice(Index, 1);
setSGood(newData)
};
const submit = () => {
getAll()
};
const getAll = val => {
const result = data.filter((item, index) => sGood.indexOf(index) > -1);
result.map(item => {
const a = treeFindPath(treeData[0] && treeData[0].subList, item.keyIndex === item);
console.log(a)
})
};
function treeFindPath (tree, func, path = []) {
if (!tree) return []
for (const data of tree) {
// 这里按照你的需求来存放最后返回的内容吧
path.push(data.keyIndex);
if (data.subList) {
const findChildren = treeFindPath(data.subList, func, path)
if (findChildren.length) return findChildren
}
path.pop()
}
return []
}
const getProps = (data) => (
<div className="address-box">
{data && data.length > 0 && data.map((item, index) => (
<div key={index}>
<div onClick={() => onClick(item.keyIndex)} className="address-item">
<div className="address-title">{item.MC || ''}</div>
<img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/>
</div>
{ item.checked && item.subList && (item.subList.length > 0 ? (
<div className="address-item-box">
{item.subList.map((child, index2) => child.subList.length === 0 ? (
<div className="address-item" key={index2}>
<div className="xm-box pos-aline">
<input checked={sGood.indexOf(child.keyIndex) > -1} className="auto-checkbox" type="checkbox" onChange={val => checkGood(child.keyIndex, val.target.checked)}/>
{child.XM || ''}
</div>
<div className="address-user">
<img alt="" className='smallIco mr-5' src='/img/tel.png' />
<a className="address-phone">{child.YDDH || '无'}</a>
</div>
</div>
) : getProps(child.subList))}
</div>
): (
<div className="address-item" key={item.keyIndex}>
<div className="xm-box pos-aline">
<input checked={sGood.indexOf(item.keyIndex) > -1} className="auto-checkbox" type="checkbox" onChange={val => checkGood(item.keyIndex, val.target.checked)}/>
{item.XM || ''}
</div>
<div className="address-user">
<img alt="" className='smallIco mr-5' src='/img/tel.png' />
<a className="address-phone">{item.YDDH || '无'}</a>
</div>
</div>
))}
</div>
))}
</div>
);
return (
<div>
<WingBlank>
<div className="address-box-auto">
{getProps(treeData[0] && treeData[0].subList)}
</div>
<WhiteSpace/>
<div className="modal-form-footer">
<Button className="date-button mr-12 bg-gray" inline onClick={closeModal}>取消</Button>
<Button className="date-button" inline type="primary" onClick={submit}>确认选择</Button>
</div>
</WingBlank>
</div>
);
};
export default TreeData;
......@@ -36,7 +36,7 @@
transition: transform 350ms;
}
.address-item-box .address-item{
padding: 15px 40px;
padding: 15px 15px 15px 40px;
}
.address-empty{
display: flex;
......@@ -46,5 +46,33 @@
background: #ffffff;
}
.address-title{
font-weight: bold;
text-align: left !important;
//font-weight: bold;
}
.address-box-auto{
width: 320px;
height: 400px;
overflow: auto;
}
.checkbox-ss{
display: none;
}
input[type=checkbox]{
-moz-appearance:none; /* Firefox */
-webkit-appearance:none; /* Safari 和 Chrome */
//position: relative;
//left: -40px;
display: block;
width: 23px;
height: 23px;
cursor: pointer;
border-radius: 50%;
border: 1px solid #000;
margin-left: -20px;
margin-right: 10px;
}
input[type="checkbox"]:checked{
background-color: green
}
......@@ -12,7 +12,7 @@ class Index extends PureComponent {
this.setState({visible})
};
onSelect = (val) => {
console.log(this.props.id);
this.props.onClick();
this.visibleChange(false)
}
render() {
......
import React from 'react';
import List from '../../../components/List'
import AdjunctList from '../../../components/Adjunct'
import axiosRequest from "../../../utils/request";
const Adjunct = (props) => {
......@@ -11,11 +12,23 @@ const Adjunct = (props) => {
// iframe.src = "javascript: '<script>location.href=\"" + src + "\"<\/script>'";
// document.getElementsByTagName('body')[0].appendChild(iframe);
// }
const download = (uuid) => {
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/downloadLargeFile',
body: {
uuid
},
}).then(res => {
})
}
const listData = [
{title: '附件', line: data.length > 0, content:
<div>
{data.length > 0 ? data.map((item, index) => (
<AdjunctList key={index} data={item}/>
<AdjunctList key={index} data={item} onClick={() => download(item.UUID)}/>
)) : '无'}
</div>
},
......
......@@ -2,22 +2,19 @@ import React from 'react';
import {WingBlank} from "antd-mobile";
import Document from 'react-document-title'
import Send from './components/Send';
import Receive from './components/Receive';
import Goods from './components/Goods';
import Meeting from './components/Meeting';
import Notice from './components/Notice';
import Meeting from './components/Meet';
import Normal from './components/Normal'
const Work = (props) => {
const {name} = props.match.params;
const {name} = props.match.params
return (
<Document title="新增">
<WingBlank>
{name.indexOf('发文') > -1 && <Send {...props}/>}
{name.indexOf('收文') > -1 && <Receive {...props}/>}
{name.indexOf('会议') > -1 && <Meeting {...props}/>}
{name.indexOf('办公用品') > -1 && <Goods {...props}/>}
{name.indexOf('通知公告') > -1 && <Notice {...props}/>}
{name.indexOf('会议申请') > -1 && <Meeting {...props}/>}
{name.indexOf('办公用品') < 0 && name.indexOf('会议申请') < 0 && (<Normal {...props}/>)}
</WingBlank>
</Document>
);
......
......@@ -13,7 +13,7 @@ import './index.less'
const Notice = (props) => {
const {type, name} = props.match.params;
const [start, setStart] = useState(true);
const [end, setEnd] = useState(true)
const [end, setEnd] = useState(true);
const [current, setCurrent] = useState(0);
const [searchWord, setSearchWord] = useState();
......@@ -25,7 +25,7 @@ const Notice = (props) => {
const getData = (scroll) => {
const pageMap ={searchWord, page: current + 1, rows: 10, operateId: tab};
setLoading(true);
scroll && current > 0 && window.scrollTo(0, document.body.scrollHeight)
scroll && current > 0 && window.scrollTo(0, document.body.scrollHeight);
tab && axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getGridDataList',
......@@ -79,12 +79,12 @@ const Notice = (props) => {
};
const tabSearch = val => {
setCurrent(0);
setData([])
setSearchWord(val)
setData([]);
setSearchWord(val);
setEnd(true)
}
useEffect(() => {
window.scrollTo(0, 0)
window.scrollTo(0, 0);
getData()
}, [])
useEffect(() => {
......
This diff is collapsed.
This diff is collapsed.
import React, {useState} from 'react';
import {Modal, WhiteSpace, WingBlank} from "antd-mobile";
import React, {useState, useEffect} from 'react';
import {List, Modal, WhiteSpace, WingBlank} from "antd-mobile";
import './index.less'
import axiosRequest from "../../../utils/request";
const alert = Modal.alert;
const Send = (props) => {
const [visible, setVisible] = useState(false);
const {visible, onClose, selectR} = props
const data = [{}, {}, {}, {}];
const selectRoom = (HYSDD) => {
onClose(false);
alert('会议室选择', '确定选中此会议室吗', [
{ text: '取消', onPress: () => onClose(true)},
{ text: '确认',
onPress: () =>{
selectR(HYSDD)
}
},
])
};
const [data, setData] = useState([]);
useEffect(() => {
const developer = localStorage.getItem('developer');
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/control/getGrid',
body: {
script: 'getMeetRoom',
replaceMap: JSON.stringify({developer}),
args: JSON.stringify([]),
keys: JSON.stringify([])
},
}).then((res) => {
setData(res.DataList)
})
}, []);
return (
<div>
<WingBlank>
<WhiteSpace/>
<div>
{data.length > 0 && data.map((item, index) => (
<div>
<div>
</div>
<span>{['科兴', '申请中', ''][item]}</span>
</div>
))}
</div>
</WingBlank>
<Modal
title="选择会议室"
className="date-modal"
visible={visible}
transparent
onClose={() => setVisible(false)}
onClose={() => onClose(false)}
>
<WingBlank className="meet-room">
<List>
{data && data.length > 0 && data.map((item, index) => (
<List.Item className="room-flex" key={index} onClick={() => selectRoom(item.HYSDD)} extra={
<div>{item.ZT}</div>
}> {item.HYSM}{item.HYSDD}</List.Item>
))}
</List>
<WhiteSpace/>
</WingBlank>
</Modal>
</div>
);
......
import React, {useState, useEffect} from 'react';
import { createForm } from 'rc-form';
import axiosRequest from "../../../utils/request";
import {DatePicker, List, TextareaItem, WhiteSpace, WingBlank, Picker, InputItem} from "antd-mobile";
import MailA from '../../../components/Adjunct/MailA'
import Upload from 'rc-upload';
import './index.less'
import queryString from "query-string";
const Send = (props) => {
const [searchValue, setSearchValue] = useState({});
useEffect(() => {
const query = queryString.parse(props.location.search);
let search = {};
if (Object.keys(query).length > 0) {
const data = JSON.parse(localStorage.getItem('search'));
search = {...data, ...query}
}
setSearchValue(search);
localStorage.removeItem('search')
}, []);
const {getFieldProps} = props.form;
const onSubmit = () => {
props.form.validateFields({ force: true }, (error) => {
if (!error) {
const values = props.form.getFieldsValue();
console.log(values);
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/addCalendar.jsp',
body: values,
}).then(res => {});
}
});
};
const district = [
{label: '111', value: '111'}
];
const [upload2, setUpload2] = useState([]);
const uploaderProps2 = {
multiple: true,
beforeUpload(file) {
const newUpload = [...upload2, file];
setUpload2(newUpload);
return false
}
};
const uploadDelete2 = uid => {
const newData = [...upload2];
const Index = newData.findIndex(item => item.uid === uid);
Index > -1 && newData.splice(Index, 1);
setUpload2(newData)
};
const CustomChildren = ({ extra, onClick }) => (
<div onClick={onClick} className="time-meeting">
<span>{extra}</span>
</div>
);
const getPlace = () => {
// saveValue()
};
const getPeople = () => {
// saveValue()
};
const saveValue = values => {
localStorage.setItem('search', JSON.stringify(values))
}
return (
<div>
<form>
<List className="send-content">
<InputItem {...getFieldProps('s1')}>会议标题</InputItem>
<DatePicker mode="date" className="send-date-style" {...getFieldProps('endtime', {initialValue: setSearchValue.endtime})}>
<List.Item arrow="horizontal">会议日期</List.Item>
</DatePicker>
<List.Item className="auto-flex-2" extra={
<div className="pos-aline auto-time-select">
<DatePicker mode="time" className="send-date-style" {...getFieldProps('endtime', {initialValue: setSearchValue.endtime22})}>
<CustomChildren/>
</DatePicker>
-
<DatePicker mode="time" className="send-date-style" {...getFieldProps('endtime22', {initialValue: setSearchValue.endtime22})}>
<CustomChildren/>
</DatePicker>
</div>
}>会议时间</List.Item>
<List.Item className="auto-flex" extra={
<div>
<div className="meet-select-btn">选择会议地点</div>
</div>
}>会议地点</List.Item>
<InputItem {...getFieldProps('s3')}>参加人数</InputItem>
<Picker data={district} cols={1} {...getFieldProps('ss1', {preserve: true})}>
<List.Item arrow="horizontal">会议类别</List.Item>
</Picker>
<InputItem {...getFieldProps('s3')}>预约单位</InputItem>
<DatePicker mode="date" className="send-date-style" {...getFieldProps('endtime2', {preserve: true})}>
<List.Item arrow="horizontal">预约时间</List.Item>
</DatePicker>
<List.Item extra="11111">预约人</List.Item>
<InputItem {...getFieldProps('s3s')}>联系方式</InputItem>
<List.Item className="auto-flex" extra={
<div>
<div className="meet-select-btn">选择参会人员</div>
</div>
}>参会人员</List.Item>
<TextareaItem
title="备注"
placeholder="请输入备注"
{...getFieldProps('_mail_editor_text')}
rows={4}
/>
{/*附件*/}
<div className="am-textarea-label upload-title">附件:</div>
<WingBlank>
{upload2.length > 0 && upload2.map((item, index) => (
<MailA key={index} data={item} onDelete={uploadDelete2}/>
))}
</WingBlank>
<Upload className="auto-upload" {...uploaderProps2}>
<a className="auto-upload">上传附件 +</a>
</Upload>
<WhiteSpace/>
</List>
<div className="event-footer">
<div className="event-footer-button" onClick={onSubmit}>发送</div>
</div>
</form>
</div>
);
};
export default createForm()(Send);
This diff is collapsed.
import React, {useState} from 'react';
import { createForm } from 'rc-form';
import axiosRequest from "../../../utils/request";
import {DatePicker, List, TextareaItem, WhiteSpace, WingBlank, Picker} from "antd-mobile";
import MailA from '../../../components/Adjunct/MailA'
import Upload from 'rc-upload';
import './index.less'
const Send = (props) => {
const {getFieldProps} = props.form;
const onSubmit = () => {
props.form.validateFields({ force: true }, (error) => {
if (!error) {
const values = props.form.getFieldsValue();
console.log(values);
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/addCalendar.jsp',
body: values,
}).then(res => {});
}
});
};
const district = [
{label: '111', value: '111'}
];
const [upload, setUpload] = useState([]);
const uploaderProps = {
multiple: true,
beforeUpload(file) {
const newUpload = [...upload, file];
setUpload(newUpload);
return false
}
};
const uploadDelete = uid => {
const newData = [...upload];
const Index = newData.findIndex(item => item.uid === uid);
Index > -1 && newData.splice(Index, 1);
setUpload(newData)
};
return (
<div>
<form>
<List className="send-content">
<Picker data={district} cols={1} {...getFieldProps('ss1')}>
<List.Item arrow="horizontal">标题</List.Item>
</Picker>
<DatePicker mode="date" className="send-date-style"{...getFieldProps('endtime')}>
<List.Item arrow="horizontal">登记日期</List.Item>
</DatePicker>
<List.Item extra="11111">登记人</List.Item>
<DatePicker mode="date" className="send-date-style"{...getFieldProps('endtime2')}>
<List.Item arrow="horizontal">发布日期</List.Item>
</DatePicker>
<DatePicker mode="date" className="send-date-style"{...getFieldProps('endtime3')}>
<List.Item arrow="horizontal">有效期</List.Item>
</DatePicker>
<TextareaItem
title="内容"
placeholder="请输入内容"
{...getFieldProps('_mail_editor_text')}
rows={4}
/>
{/*正文*/}
<div className="am-textarea-label upload-title">附件:</div>
<WingBlank>
{upload.length > 0 && upload.map((item, index) => (
<MailA key={index} data={item} onDelete={uploadDelete}/>
))}
</WingBlank>
<Upload className="auto-upload" {...uploaderProps}>
<a className="auto-upload">上传附件 +</a>
</Upload>
<WhiteSpace/>
</List>
<div className="event-footer">
<div className="event-footer-button" onClick={onSubmit}>发送</div>
</div>
</form>
</div>
);
};
export default createForm()(Send);
import React, {useEffect, useState} from 'react';
import {Button, Modal, WhiteSpace, WingBlank} from "antd-mobile";
import './index.less'
import axiosRequest from "../../../utils/request";
import TreeData from '../../../components/AddressList/TreeData'
const Send = (props) => {
const {visible, onClose} = props;
const closeModal = () => {
onClose(false)
};
const [data, setData] = useState([]);
useEffect(() => {
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/exclude/control/getList',
body: {
script: 'hysqTreeAll',
args: JSON.stringify(['47c2c4f9235aa97f01235aa97f7c0000']),
},
}).then((res) => {
res.map(item => {item.ATTACH_ID = ''; item.checked = false} );
setData(res)
})
}, []);
const onClick = (keyIndex) => {
const newData = JSON.parse(JSON.stringify(data));
// const result = newData.findIndex(item => item.XH === XH);
newData[keyIndex].checked = !newData[keyIndex].checked;
setData(newData)
};
const submit = val => {
console.log(val)
}
return (
<div>
<Modal
title="选择参会人员"
className="date-modal"
visible={visible}
transparent
onClose={() => onClose(false)}
>
<TreeData
data={data}
onClick={onClick}
closeModal={closeModal}
/>
</Modal>
</div>
);
};
export default Send;
import React, {useState} from 'react';
import { createForm } from 'rc-form';
import axiosRequest from "../../../utils/request";
import {DatePicker, List, TextareaItem, WhiteSpace, WingBlank, Picker, InputItem} from "antd-mobile";
import MailA from '../../../components/Adjunct/MailA'
import Upload from 'rc-upload';
import './index.less'
const Send = (props) => {
const {getFieldProps} = props.form;
const onSubmit = () => {
props.form.validateFields({ force: true }, (error) => {
if (!error) {
const values = props.form.getFieldsValue();
console.log(values);
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/addCalendar.jsp',
body: values,
}).then(res => {});
}
});
};
const district = [
{label: '111', value: '111'}
];
const [upload, setUpload] = useState([]);
const [upload2, setUpload2] = useState([]);
const uploaderProps = {
multiple: true,
beforeUpload(file) {
const newUpload = [...upload, file];
setUpload(newUpload);
return false
}
};
const uploadDelete = uid => {
const newData = [...upload];
const Index = newData.findIndex(item => item.uid === uid);
Index > -1 && newData.splice(Index, 1);
setUpload(newData)
};
const uploaderProps2 = {
multiple: true,
beforeUpload(file) {
const newUpload = [...upload2, file];
setUpload2(newUpload);
return false
}
};
const uploadDelete2 = uid => {
const newData = [...upload2];
const Index = newData.findIndex(item => item.uid === uid);
Index > -1 && newData.splice(Index, 1);
setUpload2(newData)
}
return (
<div>
<form>
<List className="send-content">
<Picker data={district} cols={1} {...getFieldProps('ss11')}>
<List.Item arrow="horizontal">来文单位</List.Item>
</Picker>
<InputItem {...getFieldProps('s1111')}>文件字号</InputItem>
<InputItem {...getFieldProps('s2')}>文件标题</InputItem>
<Picker data={district} cols={1} {...getFieldProps('ss1')}>
<List.Item arrow="horizontal">文件类别</List.Item>
</Picker>
<DatePicker className="send-date-style"{...getFieldProps('endtime')}>
<List.Item arrow="horizontal">收文日期</List.Item>
</DatePicker>
<InputItem {...getFieldProps('s121')}>收文编号</InputItem>
<InputItem {...getFieldProps('s1')}>份数</InputItem>
<Picker data={district} cols={1} {...getFieldProps('ss1')}>
<List.Item arrow="horizontal">文件密级</List.Item>
</Picker>
<Picker data={district} cols={1} {...getFieldProps('ss2')}>
<List.Item arrow="horizontal">紧急程度</List.Item>
</Picker>
<Picker data={district} cols={1} {...getFieldProps('ss3')}>
<List.Item arrow="horizontal">经办人</List.Item>
</Picker>
<Picker data={district} cols={1} {...getFieldProps('ss4')}>
<List.Item arrow="horizontal">联系电话</List.Item>
</Picker>
<TextareaItem
title="拟办意见"
placeholder="请输入拟办意见"
{...getFieldProps('_mail_editor_text')}
rows={4}
/>
{/*正文*/}
<div className="am-textarea-label upload-title">正文:</div>
<WingBlank>
{upload.length > 0 && upload.map((item, index) => (
<MailA key={index} data={item} onDelete={uploadDelete}/>
))}
</WingBlank>
<Upload className="auto-upload" {...uploaderProps}>
<a className="auto-upload">上传正文 +</a>
</Upload>
{/*<WhiteSpace/>*/}
{/*附件*/}
<div className="am-textarea-label upload-title">附件:</div>
<WingBlank>
{upload2.length > 0 && upload2.map((item, index) => (
<MailA key={index} data={item} onDelete={uploadDelete2}/>
))}
</WingBlank>
<Upload className="auto-upload" {...uploaderProps2}>
<a className="auto-upload">上传附件 +</a>
</Upload>
<WhiteSpace/>
</List>
<div className="event-footer">
<div className="event-footer-button" onClick={onSubmit}>发送</div>
</div>
</form>
</div>
);
};
export default createForm()(Send);
import React, {useState} from 'react';
import { createForm } from 'rc-form';
import axiosRequest from "../../../utils/request";
import {DatePicker, List, TextareaItem, WhiteSpace, WingBlank, Picker, InputItem, Switch} from "antd-mobile";
import MailA from '../../../components/Adjunct/MailA'
import Upload from 'rc-upload';
import './index.less'
const Send = (props) => {
const {getFieldProps, setFieldsValue} = props.form;
const onSubmit = () => {
props.form.validateFields({ force: true }, (error) => {
if (!error) {
const values = props.form.getFieldsValue();
console.log(values);
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/addCalendar.jsp',
body: values,
}).then(res => {});
}
});
};
const district = [
{label: '111', value: '111'}
];
const [upload, setUpload] = useState([]);
const [upload2, setUpload2] = useState([]);
const uploaderProps = {
multiple: true,
beforeUpload(file) {
const newUpload = [...upload, file];
setUpload(newUpload);
return false
}
};
const uploadDelete = uid => {
const newData = [...upload];
const Index = newData.findIndex(item => item.uid === uid);
Index > -1 && newData.splice(Index, 1);
setUpload(newData)
};
const uploaderProps2 = {
multiple: true,
beforeUpload(file) {
const newUpload = [...upload2, file];
setUpload2(newUpload);
return false
}
};
const uploadDelete2 = uid => {
const newData = [...upload2];
const Index = newData.findIndex(item => item.uid === uid);
Index > -1 && newData.splice(Index, 1);
setUpload2(newData)
}
return (
<div>
<form>
<List className="send-content">
<InputItem {...getFieldProps('s1')}>标题</InputItem>
<InputItem {...getFieldProps('s2')}>拟稿人</InputItem>
<InputItem {...getFieldProps('s3')}>拟稿电话</InputItem>
<InputItem {...getFieldProps('s4')}>拟稿部门</InputItem>
<DatePicker className="send-date-style"{...getFieldProps('endtime')}>
<List.Item arrow="horizontal">拟稿日期</List.Item>
</DatePicker>
<Picker data={district} cols={1} {...getFieldProps('ss1')}>
<List.Item arrow="horizontal">核稿人</List.Item>
</Picker>
<Picker data={district} cols={1} {...getFieldProps('ss2')}>
<List.Item arrow="horizontal">复核人</List.Item>
</Picker>
<Picker data={district} cols={1} {...getFieldProps('ss3')}>
<List.Item arrow="horizontal">紧急程度</List.Item>
</Picker>
<Picker data={district} cols={1} {...getFieldProps('ss4')}>
<List.Item arrow="horizontal">密级</List.Item>
</Picker>
<Picker data={district} cols={1} {...getFieldProps('ss5')}>
<List.Item arrow="horizontal">公开属性</List.Item>
</Picker>
<List.Item extra={
<Switch
{...getFieldProps('Switch1', {
initialValue: true,
valuePropName: 'checked',
})}
onClick={(checked) => setFieldsValue({Switch1: checked,})}
/>
}>是否解读</List.Item>
<Picker data={district} cols={1} {...getFieldProps('ss6')}>
<List.Item arrow="horizontal">文种</List.Item>
</Picker>
<Picker data={district} cols={1} {...getFieldProps('ss7')}>
<List.Item arrow="horizontal">主送机关</List.Item>
</Picker>
<Picker data={district} cols={1} {...getFieldProps('ss8')}>
<List.Item arrow="horizontal">抄送机关</List.Item>
</Picker>
<TextareaItem
title="拟办意见"
placeholder="请输入拟办意见"
{...getFieldProps('_mail_editor_text')}
rows={4}
/>
{/*正文*/}
<div className="am-textarea-label upload-title">正文:</div>
<WingBlank>
{upload.length > 0 && upload.map((item, index) => (
<MailA key={index} data={item} onDelete={uploadDelete}/>
))}
</WingBlank>
<Upload className="auto-upload" {...uploaderProps}>
<a className="auto-upload">上传正文 +</a>
</Upload>
{/*<WhiteSpace/>*/}
{/*附件*/}
<div className="am-textarea-label upload-title">附件:</div>
<WingBlank>
{upload2.length > 0 && upload2.map((item, index) => (
<MailA key={index} data={item} onDelete={uploadDelete2}/>
))}
</WingBlank>
<Upload className="auto-upload" {...uploaderProps2}>
<a className="auto-upload">上传附件 +</a>
</Upload>
<WhiteSpace/>
</List>
<div className="event-footer">
<div className="event-footer-button" onClick={onSubmit}>发送</div>
</div>
</form>
</div>
);
};
export default createForm()(Send);
......@@ -97,3 +97,58 @@
border: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 5px;
}
.meet-room-content{
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 10px;
}
.meet-room > .meet-room-content:not(:last-child){
border-bottom: 1px solid rgba(239, 239, 239, 1);
}
.meet-room > .meet-room-content:first-child{
border-top: 1px solid rgba(239, 239, 239, 1);
}
.room-style{
height: 42px;
}
.room-flex .am-list-line .am-list-content{
flex: 2;
}
.goods-before{
height: 50px;
display: flex;
justify-content: center;
align-items: center;
font-size: 17px;
background: @primary;
color: #ffffff;
margin: 10px 15px;
}
.ml-40{
margin-left: 30px;
}
.room-num{
width: 60px;
height: 29px;
border:0 solid rgba(38, 104, 255, 0.2);
border-radius:6px;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 249, 249, 1);
}
.footer-button{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
background: @primary;
color: #ffffff;
}
.footer-button.btn-disabled{
background: rgba(151, 151, 151, 1) !important;
}
......@@ -20,6 +20,7 @@ import MainInfo from './pages/UnCommon/Mail/Info'
import MainSend from './pages/UnCommon/Mail/Send'
import People from './pages/EventProcessing/UnCommon/People'
import Login from './pages/Login'
import MeetInfo from './pages/Work/components/MeetInfo'
import NoFound from './pages/NoFound'
......@@ -49,6 +50,7 @@ const ReactRouter = () => {
<Route path="/blank/people/:attachId" component={People}/>
<Route path="/blank/application/:id/:uuid/:FLOWTBID" component={Application}/>
<Route path="/blank/meet/add-room" component={MeetInfo}/>
<Route path="/blank/work/:type/:name" component={WorkDetail}/>
<Route path="/blank/work-add/:name" component={WorkAdd}/>
<Route path="/blank/submit/:flowNodeId/:uuid/:flowTbId" component={SubmitDetail}/>
......
......@@ -69,6 +69,9 @@ export const createAPI = (baseURL) => {
}
localStorage.setItem("token", response.data.token);
}
if (response && response.data && response.data.developer) {
localStorage.setItem("developer", response.data.developer);
}
if (response && response.data && response.data.leftOperateBar) {
localStorage.removeItem("menu");
const menu = response.data.leftOperateBar.map(item => ({ icon: item.imgType, text: item.nodeName, id: item.id, children: item.children }))
......
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