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

debug

parent 434d112a
Pipeline #15854 failed with stages
in 36 seconds
......@@ -58,7 +58,7 @@ module.exports = function override(config, env) {
loader: require.resolve('less-loader'),
options: {
// theme vars, also can use theme.js instead of this.
modifyVars: { "@brand-primary": "#1DA57A" },
// modifyVars: { "@brand-primary": "#1DA57A" },
},
},
]
......
......@@ -94,11 +94,6 @@
"umi-request": "^1.2.17"
}
},
"@wojtekmaj/date-utils": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/@wojtekmaj/date-utils/download/@wojtekmaj/date-utils-1.0.2.tgz",
"integrity": "sha1-MTSMVyYGrEKq+be7IgdPwLFjzCs="
},
"abab": {
"version": "1.0.4",
"resolved": "https://registry.npm.taobao.org/abab/download/abab-1.0.4.tgz?cache=0&sync_timestamp=1573609024450&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fabab%2Fdownload%2Fabab-1.0.4.tgz",
......@@ -4965,14 +4960,6 @@
"resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"get-user-locale": {
"version": "1.4.0",
"resolved": "https://registry.npm.taobao.org/get-user-locale/download/get-user-locale-1.4.0.tgz",
"integrity": "sha1-osS12kb+7J8DybB9GXsWIEkKU3A=",
"requires": {
"lodash.once": "^4.1.1"
}
},
"get-value": {
"version": "2.0.6",
"resolved": "https://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz",
......@@ -7002,11 +6989,6 @@
"resolved": "https://registry.npm.taobao.org/lodash.memoize/download/lodash.memoize-4.1.2.tgz",
"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4="
},
"lodash.once": {
"version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/lodash.once/download/lodash.once-4.1.1.tgz",
"integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
},
"lodash.template": {
"version": "4.5.0",
"resolved": "https://registry.npm.taobao.org/lodash.template/download/lodash.template-4.5.0.tgz",
......@@ -7185,11 +7167,6 @@
"resolved": "https://registry.npm.taobao.org/merge/download/merge-1.2.1.tgz",
"integrity": "sha1-OL6/gMMiCopIe2/Ps5QbsRcgwUU="
},
"merge-class-names": {
"version": "1.3.0",
"resolved": "https://registry.npm.taobao.org/merge-class-names/download/merge-class-names-1.3.0.tgz?cache=0&sync_timestamp=1572830576065&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmerge-class-names%2Fdownload%2Fmerge-class-names-1.3.0.tgz",
"integrity": "sha1-xM3BqYGoHdmvwnqkKH6RKjN8Xe4="
},
"merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz",
......@@ -7522,6 +7499,22 @@
"prepend-http": "^1.0.0",
"query-string": "^4.1.0",
"sort-keys": "^1.0.0"
},
"dependencies": {
"query-string": {
"version": "4.3.4",
"resolved": "https://registry.npm.taobao.org/query-string/download/query-string-4.3.4.tgz?cache=0&sync_timestamp=1591853336029&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquery-string%2Fdownload%2Fquery-string-4.3.4.tgz",
"integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=",
"requires": {
"object-assign": "^4.1.0",
"strict-uri-encode": "^1.0.0"
}
},
"strict-uri-encode": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
}
}
},
"normalize.css": {
......@@ -9587,12 +9580,13 @@
"integrity": "sha1-kJCykNH5FyjTwi5UhDykSupatoc="
},
"query-string": {
"version": "4.3.4",
"resolved": "https://registry.npm.taobao.org/query-string/download/query-string-4.3.4.tgz",
"integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=",
"version": "6.13.1",
"resolved": "https://registry.npm.taobao.org/query-string/download/query-string-6.13.1.tgz?cache=0&sync_timestamp=1591853336029&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquery-string%2Fdownload%2Fquery-string-6.13.1.tgz",
"integrity": "sha1-2RPM/OO0s6cTmJ/m05Rm2S5xzK0=",
"requires": {
"object-assign": "^4.1.0",
"strict-uri-encode": "^1.0.0"
"decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0",
"strict-uri-encode": "^2.0.0"
}
},
"querystring": {
......@@ -9820,6 +9814,14 @@
"react-lifecycles-compat": "^3.0.4"
}
},
"rc-upload": {
"version": "3.2.0",
"resolved": "https://registry.npm.taobao.org/rc-upload/download/rc-upload-3.2.0.tgz?cache=0&sync_timestamp=1592472784086&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frc-upload%2Fdownload%2Frc-upload-3.2.0.tgz",
"integrity": "sha1-JR/DyRBZAugIYApBTzaPKF1jv7o=",
"requires": {
"classnames": "^2.2.5"
}
},
"rc-util": {
"version": "4.21.1",
"resolved": "https://registry.npm.taobao.org/rc-util/download/rc-util-4.21.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frc-util%2Fdownload%2Frc-util-4.21.1.tgz",
......@@ -9861,22 +9863,19 @@
"dotenv": "^4.0.0"
}
},
"react-calendar": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/react-calendar/download/react-calendar-3.1.0.tgz",
"integrity": "sha1-ejhKcPmOAhd9F2xF9pGPtqFc5B8=",
"requires": {
"@wojtekmaj/date-utils": "^1.0.2",
"get-user-locale": "^1.2.0",
"merge-class-names": "^1.1.1",
"prop-types": "^15.6.0"
}
},
"react-content-loader": {
"version": "5.0.4",
"resolved": "https://registry.npm.taobao.org/react-content-loader/download/react-content-loader-5.0.4.tgz",
"integrity": "sha1-FJNJHS9rMJ0oHYQUSmVUF+pzRIY="
},
"react-day-picker": {
"version": "7.4.8",
"resolved": "https://registry.npm.taobao.org/react-day-picker/download/react-day-picker-7.4.8.tgz",
"integrity": "sha1-Z1YlJA0/rhtBwKnVF3yWjIUXwdQ=",
"requires": {
"prop-types": "^15.6.2"
}
},
"react-dev-utils": {
"version": "4.2.3",
"resolved": "https://registry.npm.taobao.org/react-dev-utils/download/react-dev-utils-4.2.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freact-dev-utils%2Fdownload%2Freact-dev-utils-4.2.3.tgz",
......@@ -11474,6 +11473,11 @@
"wbuf": "^1.7.2"
}
},
"split-on-first": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/split-on-first/download/split-on-first-1.1.0.tgz?cache=0&sync_timestamp=1573659333652&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsplit-on-first%2Fdownload%2Fsplit-on-first-1.1.0.tgz",
"integrity": "sha1-9hCv7uOxK84dDDBCXnY5i3gkml8="
},
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz",
......@@ -11549,9 +11553,9 @@
}
},
"strict-uri-encode": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-2.0.0.tgz",
"integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY="
},
"string-length": {
"version": "1.0.1",
......
......@@ -12,10 +12,12 @@
"moment": "^2.26.0",
"postcss-px2rem": "^0.3.0",
"qs": "^6.9.4",
"query-string": "^6.13.1",
"rc-form": "^2.4.11",
"rc-upload": "^3.2.0",
"react": "^16.8.4",
"react-calendar": "^3.1.0",
"react-content-loader": "^5.0.4",
"react-day-picker": "^7.4.8",
"react-document-title": "^2.0.3",
"react-dom": "^16.8.4",
"react-router-dom": "^5.2.0",
......
import React, {useState} from 'react';
import {Icon, Popover} from "antd-mobile";
import './index.less'
const Item = Popover.Item;
const MailA = (props) => {
const {onDelete, data} = props;
const [visible, setVisible] = useState(false);
const visibleChange = (visible) => {
setVisible(visible)
};
const onSelect = (val) => {
onDelete(data.uid);
visibleChange(false)
};
console.log(data.type.indexOf('image') > -1)
return (
<div>
<div className={`adjunct-card ${data.type.indexOf('image') > -1 ? 'adjunct-pdf' : 'adjunct-word'}`}>
<div className="adjunct-title">
<img alt="" src={data.type.indexOf('image') > -1 ? '/img/test/pdf.png' : '/img/test/word.png'} className="adjunct-img"/>
<div className="adjunct-content">
<p className="adjunct-title-1">{data.name}</p>
</div>
</div>
<Popover
mask
visible={visible}
overlay={[
(<Item key="4" value="scan">删除</Item>),
]}
onVisibleChange={visibleChange}
onSelect={onSelect}
>
<Icon type="ellipsis" className="adjunct-icon" size="xxs"/>
</Popover>
</div>
</div>
);
};
export default MailA;
......@@ -17,7 +17,7 @@ class Index extends PureComponent {
}
render() {
const {type, data} = this.props;
const {visible} = this.state
const {visible} = this.state;
return (
<div className={`adjunct-card ${type ? 'adjunct-word' : 'adjunct-pdf'}`}>
......
......@@ -27,6 +27,8 @@
transform: rotate(90deg);
}
.adjunct-title-1{
max-width: 240px;
overflow: auto;
font-size:14px;
}
.adjunct-title-2{
......
import React from 'react';
// import moment from 'moment'
import moment from 'moment'
import './index.less'
const Index = (props) => {
// const {data} = props;
const {data} = props;
return (
<div className="mail-card" onClick={props.onClick}>
<div className="mail-item mail-title">
6.1日,部门考察工作出差事宜
{data.TITLE}
</div>
<div className="mail-item mail-label">
<span>发件人:</span>
<span>琳琳</span>
<span>{data.SEND_NAME}</span>
</div>
<div className="mail-item mail-label">
<span>时间:</span>
<span>2020-05-26 16:00:00</span>
<span>{data.SEND_TIME ? moment(data.SEND_TIME).format("YYYY-MM-DD HH:mm:ss") : ''}</span>
</div>
</div>
);
......
......@@ -10,7 +10,11 @@ const CardItem = (props) => {
}, [addStatus])
const contentCLick = () => {
!status && !data.iconAdd && data.text && workUrl(`/blank/work/${data.id}/${data.text}`)
!status && !data.iconAdd && (data.text !== '内部邮局' && data.text !== '个人日程' && data.text !== '办公用品采购' && data.text !== '') && workUrl(`/blank/work/${data.id}/${data.text}`);
!status && !data.iconAdd && data.text === '内部邮局' && workUrl(`/blank/mail`);
!status && !data.iconAdd && data.text === '个人日程' && workUrl(`/blank/date`);
!status && !data.iconAdd && data.text === '办公用品采购' && workUrl(`/blank/work/${data.id}/${data.text}?type=application`);
// !status && !data.iconAdd && data.text === '会议申请' && workUrl(`/blank/work/${data.id}/${data.text}`);
data.iconAdd && addCommon()
};
const iconClick = () => {
......
......@@ -10,7 +10,7 @@ const Index = (props) => {
{item.title}
</div>
<div className="auto-list-content">
{item.content || ''}
{item.title === '参加人数' ? <a onClick={props.meetClick} className="meet-people">{item.content || ''}</a> : (item.content || '')}
</div>
</div>
))}
......
@import '../../variable.less';
.auto-list-card{
width: 100%;
}
......@@ -40,3 +42,14 @@
font-size: 14px;
line-height: 22px;
}
.meet-people{
color: @primary;
}
.good-item{
margin-top: 12px;
}
.meet-box .good-item{
margin-top: 0;
}
......@@ -23,7 +23,7 @@ const AddressBook = (props) => {
method: 'post',
url: '/idtAppServiceV6/oApp/getDeptTree',
}).then(res => {
setStart(false)
setStart(false);
setLoading(false);
setData(res)
});
......@@ -38,7 +38,7 @@ const AddressBook = (props) => {
const index = newData.findIndex(item => item.DEPTID === DEPTID);
const checked = newData[index].checked ? newData[index] : false;
newData[index] = {...newData[index], loading: true, children: [], checked: !checked};
setData(newData)
setData(newData);
!checked && getUser(DEPTID)
};
const getUser = (DEPTID) => {
......
......@@ -238,7 +238,7 @@ const Process = (props) => {
<WingBlank>
<div id="event-basic"/>
<WhiteSpace/>
{resultLoading ? <Basic data={basic}/> : <Skeleton/>}
{resultLoading ? <Basic data={basic} attachId={uuid} {...props}/> : <Skeleton/>}
<div id="event-adjunct"/>
<WhiteSpace/>
{resultLoading ? <Adjunct data={adjunctData}/> : <Skeleton/>}
......
......@@ -8,6 +8,7 @@ import Basic from '../commponents/Basic'
import Adjunct from '../commponents/Adjunct'
import Flow from '../commponents/Flow';
import Option from '../commponents/Option';
import Goods from '../commponents/Goods'
import '../index.less'
......@@ -50,7 +51,7 @@ const Process = (props) => {
}, []);
//获取basic数据
const [basic, setBasic] = useState([]);
const [basicLoading, setBasicLoading] = useState(false)
const [basicLoading, setBasicLoading] = useState(false);
const getBasic = uuid => {
axiosRequest({
method: 'post',
......@@ -65,7 +66,25 @@ const Process = (props) => {
});
setBasic(result)
});
}
};
const [applicateData, setapplicateData] = useState([])
const getApplication = (uuid) => {
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/getChildGridDataList`,
body: {attachId: uuid, templatePath: 'cgwpxx_list'}
}).then(res => {
setBasicLoading(true);
setapplicateData(res.rows)
});
};
const treeClick = (BGYPMC) => {
const newData = [...applicateData];
const index = newData.findIndex(item => item.BGYPMC === BGYPMC);
const checked = newData[index].checked ? newData[index] : false;
newData[index] = {...newData[index], checked: !checked};
setapplicateData(newData)
};
//获取Flow数据
const [flowData, setFlowData] = useState([]);
const [flowLoading, setFlowLoading] = useState(false)
......@@ -105,9 +124,10 @@ const Process = (props) => {
};
useEffect(() => {
const {uuid} = props.match.params;
templateId && tableId && getBasic(uuid)
templateId && tableId && getBasic(uuid);
templateId && tableId && getFlow(uuid);
templateId && tableId && getAdjunct(uuid)
templateId && tableId && getAdjunct(uuid);
templateId && tableId && getApplication(uuid);
getButton()
}, [nodeId]);
......@@ -212,7 +232,14 @@ const Process = (props) => {
<WingBlank>
<div id="event-basic"/>
<WhiteSpace/>
{resultLoading ? <Basic data={basic}/> : <Skeleton/>}
{resultLoading ? (
<div>
<Basic data={basic}/>
<WhiteSpace/>
<div className="good-title">申领物品信息</div>
<Goods data={applicateData} onClick={treeClick}/>
</div>
) : <Skeleton/>}
<div id="event-adjunct"/>
<WhiteSpace/>
{resultLoading ? <Adjunct data={adjunctData}/> : <Skeleton/>}
......
import React, {useState, useEffect} from 'react';
import Document from 'react-document-title'
import AddressList from '../commponents/Goods';
import Meet from '../commponents/Meet';
import axiosRequest from '../../../utils/request';
import Skeleton from '../../../components/Skeleton'
import '../index.less'
const AddressBook = (props) => {
const {attachId} = props.match.params;
const [loading, setLoading] = useState(false);
const [data, setData] = useState([]);
......@@ -12,7 +14,8 @@ const AddressBook = (props) => {
setLoading(true);
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getDeptTree',
url: '/idtAppServiceV6/application/interfaces/getChry.jsp',
body: {attachId}
}).then(res => {
setLoading(false);
setData(res)
......@@ -29,26 +32,12 @@ const AddressBook = (props) => {
const checked = newData[index].checked ? newData[index] : false;
newData[index] = {...newData[index], loading: true, children: [], checked: !checked};
setData(newData);
!checked && getUser(DEPTID)
};
const getUser = (DEPTID) => {
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/getSearchAddressBook?deptId=${DEPTID}`,
}).then(res => {
const child = res.userList && res.userList.length > 0 ? res.userList : [];
const newData = [...data];
const index = newData.findIndex(item => item.DEPTID === DEPTID);
newData[index] = {...newData[index], loading: false, children: child, checked: true};
setData(newData)
// setData()
});
};
return (
<Document title="参加人数">
<div>
<div className='adMainBox'>
{loading ? <Skeleton/> : (<AddressList data={data} onClick={treeClick}/>)}
<div className='adMainBox meet-box'>
{loading ? <Skeleton/> : (<Meet data={data} onClick={treeClick}/>)}
</div>
</div>
......
......@@ -29,21 +29,8 @@ const AddressBook = (props) => {
const checked = newData[index].checked ? newData[index] : false;
newData[index] = {...newData[index], loading: true, children: [], checked: !checked};
setData(newData);
!checked && getUser(DEPTID)
};
const getUser = (DEPTID) => {
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/getSearchAddressBook?deptId=${DEPTID}`,
}).then(res => {
const child = res.userList && res.userList.length > 0 ? res.userList : [];
const newData = [...data];
const index = newData.findIndex(item => item.DEPTID === DEPTID);
newData[index] = {...newData[index], loading: false, children: child, checked: true};
setData(newData)
// setData()
});
};
return (
<Document title="参加人数">
<div>
......
......@@ -3,11 +3,11 @@ import '../index.less'
import List from '../../../components/List'
const Basic = (props) => {
const {data} = props
const {data, attachId} = props;
return (
<div>
<List listData={data}/>
<List listData={data} meetClick={() => props.history.push(`/blank/people/${attachId}`)}/>
</div>
);
};
......
......@@ -6,18 +6,22 @@ const Index = (props) => {
return (
<div className="address-box">
{data && data.length > 0 && data.map((item, index) => (
<div key={index}>
<div className="address-item address-title" onClick={() => onClick(item.DEPTID)}>
{item.NAME || ''}
<div key={index} className="good-item">
<div className="address-item address-title" onClick={() => onClick(item.BGYPMC)}>
品名:{item.BGYPMC || ''}
<img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/>
</div>
{ item.checked && (
<div className="address-item-box">
{item.children.map((child, index2) => (
<div className="address-item" key={index2}>
111111
<div>
<div className="address-item address-title">
领取人:{item.BGYPMC || ''}
</div>
<div className="address-item address-title">
申请数量:{item.SL || ''}
</div>
<div className="address-item address-title">
实际发放数量:{item.BGYPMC || ''}
</div>
))}
</div>
)}
......
import React from 'react';
import './index.less'
import ChildAddress from '../../../components/AddressList/ChildAddress'
const Index = (props) => {
const {data, onClick} = props;
return (
<div className="address-box">
{data && data.length > 0 && data.map((item, index) => (
<div key={index} className="good-item">
<div className="address-item address-title" onClick={() => onClick(item.BGYPMC)}>
{item.BGYPMC || ''}
<img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/>
</div>
{ item.checked && item.children.length > 0 && (
<div>
<ChildAddress data={item.children}/>
</div>
)}
</div>
))}
</div>
);
};
export default Index;
......@@ -48,3 +48,7 @@
.address-title{
font-weight: bold;
}
.mt-12{
margin-top: 12px;
}
......@@ -167,3 +167,9 @@
.address-title{
font-weight: bold;
}
.good-title{
margin-top: 10px;
padding: 0 17px;
font-size: 16px;
font-weight: bold;
}
import React, {useState} from 'react';
import {WhiteSpace, WingBlank, Modal, Button, List, InputItem, DatePicker} from 'antd-mobile'
import Calendar from 'react-calendar'
import 'react-calendar/dist/Calendar.css';
import React, {useState, useEffect} from 'react';
import {WhiteSpace, WingBlank, Modal, Button, List, InputItem, DatePicker, Toast} from 'antd-mobile'
import DayPicker from 'react-day-picker';
import 'react-day-picker/lib/style.css';
import Document from 'react-document-title'
import axiosRequest from '../../../utils/request';
import '../index.less'
import { createForm } from 'rc-form';
import moment from 'moment'
const DateCalendar = (props) => {
const [value, onChange] = useState(new Date());
// const [value, onChange] = useState(new Date());
useEffect(() => {
getDate()
}, []);
const getDate = () => {
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/getMyRc.jsp',
body: {upaccount: 1},
}).then(res => {
console.log(res)
});
}
const data = [{}, {}];
......@@ -22,9 +33,19 @@ const DateCalendar = (props) => {
const onSubmit = () => {
props.form.validateFields({ force: true }, (error) => {
if (!error) {
console.log(props.form.getFieldsValue());
} else {
alert('Validation failed');
const values = props.form.getFieldsValue();
values.starttime = moment(values.starttime).format("YYYY-MM-DD HH:mm:ss");
values.endtime = moment(values.endtime).format("YYYY-MM-DD HH:mm:ss");
values.upaccount = 1;
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/addCalendar.jsp',
body: values,
}).then(res => {
Toast.success('添加成功');
getDate();
onReset()
});
}
});
};
......@@ -32,21 +53,77 @@ const DateCalendar = (props) => {
setEditVisible(false);
props.form.resetFields();
};
//自定义日历组件
const [selectedDays, setSelectedDays] = useState(new Date(moment()));
const modifiers = {birthday: [new Date(2020,5,2), new Date(2020,5,3)]};
const WEEKDAYS_LONG = {
zh: ['周日', '周一', '周二', '周三', '周四', '周五', '周六',]
};
const WEEKDAYS_SHORT = {
zh: ['日', '一', '二', '三', '四', '五', '六'],
};
const MONTHS = {
zh: ['01 月', '02 月', '03 月', '04 月', '05 月', '06 月', '07 月', '08 月', '09 月', '10 月', '11 月', '12 月'],
};
const FIRST_DAY = { zh: 0 };
function formatDay(d, locale = 'zh') {
return `${WEEKDAYS_LONG[locale][d.getDay()]}, ${d.getDate()} ${
MONTHS[locale][d.getMonth()]
} ${d.getFullYear()}`;
}
function formatMonthTitle(d, locale = 'zh') {
return `${d.getFullYear()}${MONTHS[locale][d.getMonth()]} `;
}
function formatWeekdayShort(i, locale = 'zh') {
return WEEKDAYS_SHORT[locale][i];
}
function formatWeekdayLong(i, locale = 'zh') {
return WEEKDAYS_SHORT[locale][i];
}
function getFirstDayOfWeek(locale = 'zh') {
return FIRST_DAY[locale];
}
const localeUtils = {
formatDay,
formatMonthTitle,
formatWeekdayShort,
formatWeekdayLong,
getFirstDayOfWeek,
};
//查看详情
// const dateSelect = (day) => {
// axiosRequest({
// method: 'post',
// url: '/idtAppServiceV6/application/interfaces/getMyRcList.jsp',
// body: {},
// }).then(res => {
// console.log(res)
// });
// };
const openInfo = () => {
setVisible(true)
};
return (
<Document title="待办">
<WingBlank>
<WhiteSpace/>
<Calendar
defaultValue={new Date(2020, 6, 20)}
calendarType="US"
onChange={onChange}
value={value}
<div className="auto-day-picker">
<DayPicker
locale="zh"
localeUtils={localeUtils}
modifiers={modifiers}
selectedDays={selectedDays}
onDayClick={(day) => setSelectedDays(day)}
/>
</div>
<WhiteSpace/>
<div className="date-todo-card">
{data.map((item, index) => (
<div key={index} className="date-todo-item" onClick={() => setVisible(true)}>
<div key={index} className="date-todo-item" onClick={() => openInfo()}>
<div>出差携带物资</div>
<div>
<p>8:00</p>
......@@ -64,18 +141,16 @@ const DateCalendar = (props) => {
<form>
<List>
<InputItem
{...getFieldProps('title')}
{...getFieldProps('subject')}
placeholder="请输入标题"
>输入标题</InputItem>
<DatePicker
mode="date"
{...getFieldProps('dp', {rules: [{ required: true, message: '必须选择开始日期' }],})}
{...getFieldProps('starttime', {rules: [{ required: true, message: '必须选择开始日期' }],})}
>
<List.Item>选择开始日期</List.Item>
</DatePicker>
<DatePicker
mode="date"
{...getFieldProps('dp2', {rules: [{ required: true, message: '必须选择开始日期' }]})}
{...getFieldProps('endtime', {rules: [{ required: true, message: '必须选择开始日期' }]})}
>
<List.Item>选择结束日期</List.Item>
</DatePicker>
......
import React from 'react';
import {WingBlank, List, InputItem, TextareaItem, WhiteSpace} from 'antd-mobile'
import 'react-calendar/dist/Calendar.css';
import Document from 'react-document-title'
import '../index.less'
......
import React, {useState} from 'react';
import {WingBlank, List, InputItem, TextareaItem, WhiteSpace} from 'antd-mobile'
import 'react-calendar/dist/Calendar.css';
import {WingBlank, List, InputItem, TextareaItem, WhiteSpace, Toast} from 'antd-mobile'
import Document from 'react-document-title';
import '../index.less';
import axiosRequest from '../../../utils/request';
import Upload from 'rc-upload';
import MailA from '../../../components/Adjunct/MailA'
import { createForm } from 'rc-form';
......@@ -11,25 +12,47 @@ import { createForm } from 'rc-form';
const Send = (props) => {
const {getFieldProps} = props.form;
const [loading, setLoading] = useState(false)
const [loading, setLoading] = useState(false);
console.log(loading)
const onSubmit = () => {
props.form.validateFields({ force: true }, (error) => {
const values = props.form.getFieldsValue();
const jsonParam = {...values, _mail_option: 'send', _mail_has_blob: upload.length > 0};
setLoading(true);
const formData = new FormData();
upload.length > 0 && upload.forEach(file => {
formData.append('blob', file);
});
if (!error) {
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getGridDataList',
body: values,
url: '/idtAppServiceV6/jspmail/sendMail',
body: {jsonParam: JSON.stringify(jsonParam)},
}).then(res => {
Toast.success('发送成功');
props.history.push('/blank/mail');
setLoading(true)
});
console.log(loading);
}
});
};
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 (
<Document title="内部邮局">
<WingBlank>
......@@ -37,22 +60,29 @@ const Send = (props) => {
<form>
<List>
<InputItem
{...getFieldProps('title')}
{...getFieldProps('_mail_title_text')}
placeholder="请输入主题"
>主题</InputItem>
<InputItem
{...getFieldProps('title2')}
{...getFieldProps('_mail_sjr_text')}
placeholder="请输入收件人"
>收件人</InputItem>
<TextareaItem
title="内容"
placeholder="请输内容"
{...getFieldProps('title3')}
{...getFieldProps('_mail_editor_text')}
rows={4}
/>
{/*<List.Item>*/}
{/*<input type="file"/>*/}
{/*</List.Item>*/}
<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>
</form>
<div className="event-footer">
......
......@@ -6,7 +6,7 @@ import axiosRequest from '../../../utils/request';
import Skeleton from '../../../components/Skeleton'
import Document from 'react-document-title'
import Empty from '../../Empty'
// import Loading from "../../../components/Loading";
import Loading from "../../../components/Loading";
import '../index.less'
......@@ -23,19 +23,19 @@ const Mail = (props) => {
const [data, setData] = useState([]);
const getData = (scroll) => {
const pageMap ={};
const pageMap ={nowPage: current + 1, pageSize: 10, folderId: tab, searshKeyWord: '', searshTitle: '',searshSender:'', searshToUser: '',searshAttach: '',searshTime: '',readStatus: false};
setLoading(true);
scroll && current > 0 && window.scrollTo(0, document.body.scrollHeight);
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getGridDataList',
url: '/idtAppServiceV6/jspmail/mailGetMailList',
body: pageMap,
}).then(res => {
setStart(false);
setEnd(res.rows && res.rows.length >= 10);
let result = end && res.rows ? data.concat(res.rows) : data;
res.rows && res.rows.length >= 10 && setCurrent(current + 1);
current > 0 && res.rows && res.rows.length === 0 && setCurrent(current - 1);
setEnd(res.List && res.List.length >= 10);
let result = end && res.List ? data.concat(res.List) : data;
res.List && res.List.length >= 10 && setCurrent(current + 1);
current > 0 && res.List && res.List.length === 0 && setCurrent(current - 1);
setData(result);
setLoading(false);
});
......@@ -60,7 +60,7 @@ const Mail = (props) => {
// };
//tab已读未读切换
const [tab, setTab] = useState();
const [tab, setTab] = useState('accept_folder');
const tabChange = val => {
setCurrent(0);
setData([]);
......@@ -69,54 +69,57 @@ const Mail = (props) => {
};
useEffect(() => {
window.scrollTo(0, 0);
getData()
}, []);
useEffect(() => {
if (tab) {
setStart(true);
getData(false, [])
}
}, [tab]);
const tabs = [
{ title: '收件箱', key: 'receive' },
{ title: '发件箱', key: 'send' }
{ title: '收件箱', key: 'accept_folder' },
{ title: '发件箱', key: 'send_folder' }
];
const Text = [{}, {}, {}];
return (
<Document title="通知">
<div>
<WhiteSpace/>
<MailTab tabs={tabs} onClick={tabChange}/>
<WingBlank className="mail-content">
<WingBlank className="mail-content mb-50">
{ start ? <div> <WhiteSpace/><Skeleton/><WhiteSpace/><Skeleton/><WhiteSpace/><Skeleton/></div> : ( !start && (
Text.length > 0 ? Text.map((item, index) => (
data.length > 0 ? data.map((item, index) => (
<div key={index}>
<WhiteSpace/>
<MailCard key={index} data={item}/>
<MailCard key={index} data={item} />
</div>
)) : <Empty/>
))}
</WingBlank>
<div>
{loading && (
<div className="pos-line content-loading">
<Loading/>
<WhiteSpace/>
<WhiteSpace/>
</div>
)}
{!loading && !end && data.length > 0 && (
<div className="content-end">
—————— 我是有底线的 ——————
</div>
)}
</div>
{/*{loading && (*/}
{/*<div className="pos-line content-loading">*/}
{/*<Loading/>*/}
{/*<WhiteSpace/>*/}
{/*<WhiteSpace/>*/}
{/*</div>*/}
{/*)}*/}
{/*{!loading && !end && data.length > 0 && (*/}
{/*<div className="content-end">*/}
{/*—————— 我是有底线的 ——————*/}
{/*</div>*/}
{/*)}*/}
<div className="event-footer">
<div className="event-footer-button">写信</div>
<div className="event-footer-button" onClick={() => props.history.push('/blank/mail-send')}>
<img alt="" src="/img/process-edit.png" className="process-edit"/>
写信
</div>
</div>
</div>
</Document>
......
......@@ -55,6 +55,12 @@
bottom: 0; left: 0; right: 0;
z-index: 10;
}
.content-end{
width: 100%;
text-align: center;
color: rgba(67, 67, 67, 0.2);
margin-top: 20px;
}
.event-footer-button{
width: 100%;
height: 100%;
......@@ -62,9 +68,86 @@
align-items: center;
justify-content: center;
font-size: 15px;
background: @primary;
background: @primary !important;
color: #ffffff;
}
.mail-content{
margin-top: 38px;
}
.auto-day-picker{
:global{
.DayPicker{
font-size: 20px;
width: 100%;
background: #ffffff;
border: 1px solid rgba(38, 104, 255, 0.1);
border-radius: 8px;
}
.DayPicker-Day{
padding: 0;
width: 43px;
height: 43px;
}
.DayPicker-Day--birthday:not(.DayPicker-Day--outside) {
position: relative;
&:after{
position: absolute;
content: '';
display: block;
width: 4px;
height: 4px;
border-radius: 2px;
background-color: @primary !important;
left: 50%;
margin-left: -2px;
margin-top: -2px;
}
//background-color: rgba(51, 51, 51, 1);
//color: white;
}
.DayPicker-Day--selected.DayPicker-Day--birthday:after{
background-color: #ffffff !important;
}
.DayPicker-Day .DayPicker-Day--birthday .DayPicker-Day--selected{
background: @primary !important;
color: #ffffff;
}
.DayPicker-NavButton{
position: static;
margin-top: 20px;
}
.DayPicker-NavButton--next{
margin-left: 265px;
}
.DayPicker-Caption > div{
text-align: center;
font-size: 20px;
margin-top: -23px;
}
.DayPicker-Month{
margin-top: -10px;
}
}
}
.mb-50{
margin-bottom: 100px;
}
.auto-upload{
margin: 10px 15px;
height: 51px;
display: flex;
justify-content: center;
align-items: center;
color: rgba(60, 151, 255, 1);
background: rgba(234, 244, 255, 1);
font-size: 17px;
}
.upload-title{
padding: 0 15px;
}
.hidden-upload{
position: absolute;
z-index: 10;
//visibility: hidden;
}
......@@ -7,6 +7,7 @@ import Skeleton from '../../components/Skeleton'
import Document from 'react-document-title'
import Empty from '../Empty'
import Loading from "../../components/Loading";
import queryString from 'query-string'
const Notice = (props) => {
const {type, name} = props.match.params;
......@@ -56,7 +57,10 @@ const Notice = (props) => {
}, [data]);
const checkLog = (OPERATEID, UUID, FLOWTBID) => {
props.history.push(`/blank/info/${OPERATEID}/${UUID}/${FLOWTBID}`)
const query = queryString.parse(props.location.search);
Object.keys(query).length > 0
? props.history.push(`/blank/${query.type}/${OPERATEID}/${UUID}/${FLOWTBID}`)
: props.history.push(`/blank/info/${OPERATEID}/${UUID}/${FLOWTBID}`)
};
//回到顶部
......
......@@ -14,6 +14,7 @@ import Process from './pages/EventProcessing/Process'
import SubmitDetail from './pages/EventProcessing/SubmitDetail'
import Date from './pages/UnCommon/Date'
import Mail from './pages/UnCommon/Mail'
import Application from './pages/EventProcessing/UnCommon/Application'
import MainInfo from './pages/UnCommon/Mail/Info'
import MainSend from './pages/UnCommon/Mail/Send'
import People from './pages/EventProcessing/UnCommon/People'
......@@ -44,7 +45,8 @@ const ReactRouter = () => {
<Route path="/blank/mail" component={Mail}/>
<Route path="/blank/mail-info" component={MainInfo}/>
<Route path="/blank/mail-send" component={MainSend}/>
<Route path="/blank/people" component={People}/>
<Route path="/blank/people/:attachId" component={People}/>
<Route path="/blank/application/:id/:uuid/:FLOWTBID" component={Application}/>
<Route path="/blank/work/:type/:name" component={WorkDetail}/>
<Route path="/blank/submit/:flowNodeId/:uuid/:flowTbId" component={SubmitDetail}/>
......
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