Commit d1b256f2 authored by 熊成伟's avatar 熊成伟

debug

parent ec452cb5
Pipeline #15875 passed with stages
in 59 seconds
......@@ -5,7 +5,7 @@ import './index.less'
const Index = (props) => {
const {data} = props;
return (
<div className="mail-card" onClick={props.onClick}>
<div className="mail-card" onClick={() => props.onClick(data.UUID)}>
<div className="mail-item mail-title">
{data.TITLE}
</div>
......
......@@ -7,7 +7,7 @@ const Index = (props) => {
<div className="auto-step">
<ul className="auto-step-card">
{
data.map((item, index) => (
data.length > 0 && data.map((item, index) => (
<li className="auto-step-item" key={index}>
<div className={`auto-step-item-title ${index === data.length -1 ? 'step-current' : 'step-success'}`}>
<div className="auto-step-item-title-name">{item.FLOW_ALIASED}</div>
......
......@@ -26,19 +26,21 @@ const Process = (props) => {
window.scrollTo(0, 0)
}, []);
const [blob, setBlob] = useState(false);
const [flow, setFlow] = useState(false)
useEffect(() => {
const {id} = props.match.params;
setFlowTbId(FLOWTBID);
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/dispatcher`,
url: `/idtAppServiceV6/oApp/childDispatcher`,
body: {
operateId: id,
formType: 'form',
uuid,
mobileSign: 1
templatePath: 'cgwpxx_list',
returnJson: true
}
}).then(res => {
setBlob(Object.keys(res.blob).length > 0);
setFlow(res.property.showFlow === '1');
// const keys = res.elementList ? Object.keys(res.elementList) : [];
// console.log(keys);
setBasic(res.elementList ? res.elementList.map(item => ({title: item.showName})) : []);
......@@ -47,6 +49,7 @@ const Process = (props) => {
setNodeId(res.property && res.property.curNodeId);
// setOperateId(res.property && res.property.operateId);
});
// const {id} = props.match.params;
}, []);
//获取basic数据
......@@ -87,7 +90,7 @@ const Process = (props) => {
};
//获取Flow数据
const [flowData, setFlowData] = useState([]);
const [flowLoading, setFlowLoading] = useState(false)
const [flowLoading, setFlowLoading] = useState(false);
const getFlow = uuid => {
axiosRequest({
method: 'post',
......@@ -125,8 +128,8 @@ const Process = (props) => {
useEffect(() => {
const {uuid} = props.match.params;
templateId && tableId && getBasic(uuid);
templateId && tableId && getFlow(uuid);
templateId && tableId && getAdjunct(uuid);
templateId && tableId && flow && getFlow(uuid);
templateId && tableId && blob && getAdjunct(uuid);
templateId && tableId && getApplication(uuid);
getButton()
}, [nodeId]);
......@@ -223,7 +226,7 @@ const Process = (props) => {
});
};
const resultLoading = basicLoading && adjunctLoading && flowLoading;
const resultLoading = basicLoading && (!blob || adjunctLoading) && (!flow || flowLoading);
return (
<Document title="待办详情">
<div>
......@@ -242,18 +245,18 @@ const Process = (props) => {
) : <Skeleton/>}
<div id="event-adjunct"/>
<WhiteSpace/>
{resultLoading ? <Adjunct data={adjunctData}/> : <Skeleton/>}
{resultLoading ? (blob && <Adjunct data={adjunctData}/>) : <Skeleton/>}
<div id="event-flow"/>
<WhiteSpace/>
{resultLoading ? <Flow data={flowData}/> : <Skeleton/>}
{resultLoading ? (flow && <Flow data={flowData}/>) : <Skeleton/>}
<div id="event-option"/>
<WhiteSpace/>
{resultLoading ? <Option onChange={optionChange}/> : <Skeleton/>}
{resultLoading ? (flow && <Option onChange={optionChange}/>) : <Skeleton/>}
</WingBlank>
</div>
<div className="event-footer">
{ resultLoading && (
{ resultLoading && flow && (
<div className={`event-footer-button ${(footStatus && disabled) ? 'button-disabled' : '' }`} onClick={footStatus && !disabled ? showActionSheet: textClick}>
{!footStatus && (
<img alt="" src="/img/process-edit.png" className="process-edit"/>
......
......@@ -3,25 +3,33 @@ import {WhiteSpace, WingBlank, Modal, Button, List, InputItem, DatePicker, Toast
import DayPicker from 'react-day-picker';
import 'react-day-picker/lib/style.css';
import Document from 'react-document-title'
import Skeleton from '../../../components/Skeleton'
import axiosRequest from '../../../utils/request';
import '../index.less'
import { createForm } from 'rc-form';
import moment from 'moment'
const alert = Modal.alert;
const DateCalendar = (props) => {
// const [value, onChange] = useState(new Date());
useEffect(() => {
getDate()
getRange()
getDate()
}, []);
const [data, setData] = useState([])
const getDate = () => {
const upaccount = localStorage.getItem('upaccount');
const [data, setData] = useState([]);
const [loading, setLoading] = useState(false);
const getDate = (dd) => {
setLoading(true);
const starttime = moment(dd).startOf('day').format("YYYY-MM-DD HH:mm:ss");
const endtime = moment(dd).endOf('day').format("YYYY-MM-DD HH:mm:ss");
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/getMyRc.jsp',
body: {upaccount},
url: '/idtAppServiceV6/application/interfaces/getMyRcList.jsp',
body: {starttime, endtime}
}).then(res => {
setLoading(false);
setData(res);
});
}
......@@ -37,7 +45,6 @@ const DateCalendar = (props) => {
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 = localStorage.getItem('upaccount');
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/addCalendar.jsp',
......@@ -56,7 +63,6 @@ const DateCalendar = (props) => {
};
//自定义日历组件
const [selectedDays, setSelectedDays] = useState(new Date(moment()));
const modifiers = {birthday: [new Date(2020,5,2), new Date(2020,5,3)]};
const WEEKDAYS_LONG = {
zh: ['周日', '周一', '周二', '周三', '周四', '周五', '周六',]
};
......@@ -93,34 +99,72 @@ const DateCalendar = (props) => {
};
//查看详情
// const dateSelect = (day) => {
// axiosRequest({
// method: 'post',
// url: '/idtAppServiceV6/application/interfaces/getMyRcList.jsp',
// body: {},
// }).then(res => {
// console.log(res)
// });
// };
const [birthday, setBirthday] = useState([]);
const modifiers = {birthday: birthday};
const getRange = (dd) => {
const starttime = moment(dd).startOf('month').format("YYYY-MM-DD HH:mm:ss");
const endtime = moment(dd).endOf('month').format("YYYY-MM-DD HH:mm:ss");
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/getMyRc.jsp',
body: {starttime, endtime},
}).then(res => {
const date = [];
res.map(item => {
let time = item.SJ;
let year = parseInt(time.substr(0, 4), 0);
let month = parseInt(time.substr(4, 2), 0) - 1;
let day = parseInt(time.substr(6, 2), 0);
let result = moment(new Date(year, month, day)).startOf('day').valueOf();
date.indexOf(result) < 0 && date.push(result);
return null;
});
const bir = date.map(item => new Date(item));
setBirthday(bir)
});
};
const dateDelete = () => {
setVisible(false);
alert('删除日程', '确定删除此日程吗', [
{ text: '取消', onPress: () => setVisible(true)},
{
text: '确认',
onPress: () =>
new Promise((resolve) => {
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/deleteGRRC.jsp',
body: {uuid: dateInfo.UUID},
}).then(res => {
resolve();
Toast.success('删除成功', 1, () => {
getDate(selectedDays);
})
// const dateDelete = (day) => {
// axiosRequest({
// method: 'post',
// url: '/idtAppServiceV6/application/interfaces/deleteGRRC.jsp',
// body: {uuid: ''},
// }).then(res => {
// getDate();
// setVisible(false)
// });
// };
});
}),
},
])
};
const [dateInfo, setDateInfo] = useState({});
const openInfo = (item) => {
setDateInfo(item)
setDateInfo(item);
setVisible(true)
};
const monthChange = day => {
setSelectedDays(day);
getDate(day);
getRange(day)
};
const daySelect = day => {
setSelectedDays(day);
getDate(day);
};
console.log(modifiers)
return (
<Document title="待办">
<WingBlank>
......@@ -131,20 +175,22 @@ const DateCalendar = (props) => {
localeUtils={localeUtils}
modifiers={modifiers}
selectedDays={selectedDays}
onDayClick={(day) => setSelectedDays(day)}
onDayClick={daySelect}
onMonthChange={monthChange}
/>
</div>
<WhiteSpace/>
<div className="date-todo-card">
{data.map((item, index) => (
<div key={index} className="date-todo-item" onClick={(item) => openInfo(item)}>
<div>出差携带物资</div>
{loading ? <Skeleton/> : data.length > 0 && data.map((item, index) => (
<div key={index} className="date-todo-item" onClick={() => openInfo(item)}>
<div>{item.SUBJECT}</div>
<div>
<p>8:00</p>
<p>8:30</p>
<p>{item.TIME.split('-')[0]}</p>
<p>{item.TIME.split('-')[1]}</p>
</div>
</div>
))}
{}
</div>
<Modal
className="date-modal"
......@@ -182,10 +228,13 @@ const DateCalendar = (props) => {
onClose={() => setVisible(false)}
>
<List className="date-info">
<InputItem disabled={true} extra={dateInfo.subject}>标题</InputItem>
<InputItem disabled={true} extra={dateInfo.starttime}>开始日期</InputItem>
<InputItem disabled={true} extra={dateInfo.endtime}>结束日期</InputItem>
<InputItem disabled={true} extra={dateInfo.SUBJECT}>标题</InputItem>
<InputItem disabled={true} extra={dateInfo.TIME && moment(selectedDays).format("YYYY-MM-DD") + ' ' + dateInfo.TIME.split('-')[0]}>开始日期</InputItem>
<InputItem disabled={true} extra={dateInfo.TIME && moment(selectedDays).format("YYYY-MM-DD") + ' ' + dateInfo.TIME.split('-')[1]}>结束日期</InputItem>
</List>
<div className="modal-form-footer-right">
<Button className="date-button" inline type="warning" onClick={dateDelete}>删除日程</Button>
</div>
</Modal>
<div className="event-footer">
<div className="event-footer-button" onClick={() => setEditVisible(true)}>添加日程</div>
......
import React from 'react';
import React, {useEffect, useState} from 'react';
import {WingBlank, List, InputItem, TextareaItem, WhiteSpace} from 'antd-mobile'
import Document from 'react-document-title'
import '../index.less'
import axiosRequest from "../../../utils/request";
const Send = (props) => {
const [data, setData] = useState({})
useEffect(() => {
const {uuid} = props.match.params;
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/jspmail/mailGetMail',
body: {uuid},
}).then(res => {
setData(res)
});
}, [])
return (
<Document title="内部邮局">
<WingBlank>
<WhiteSpace/>
<List>
<InputItem value={`1111`}>主题</InputItem>
<InputItem value={`1111`}>收件人</InputItem>
<List className="date-info">
<InputItem diasbled={true} value={data.mailInfo && data.mailInfo.TITLE}>主题</InputItem>
<InputItem diasbled={true} value={data.mailInfo && JSON.parse(data.mailInfo.RECIPIENT).fzxs_mail_sender_groups}>收件人</InputItem>
<TextareaItem
disabled={true}
title="内容"
value={'11111111111111111111111111111111'}
value={data.clob}
rows={4}
/>
</List>
......
......@@ -92,7 +92,7 @@ const Mail = (props) => {
data.length > 0 ? data.map((item, index) => (
<div key={index}>
<WhiteSpace/>
<MailCard key={index} data={item} />
<MailCard key={index} data={item} onClick={(uuid) => props.history.push(`/blank/mail-info/${uuid}`)}/>
</div>
)) : <Empty/>
))}
......
......@@ -8,6 +8,9 @@
border-bottom: 1px solid rgba(239, 239, 239, 1);
background: #ffffff;
}
.date-todo-card{
margin-bottom: 60px;
}
.date-todo-card > .date-todo-item:first-child{
border-radius: 7px 7px 0 0;
}
......@@ -116,14 +119,16 @@
.DayPicker-NavButton{
position: static;
margin-top: 20px;
margin-left: 30px;
}
.DayPicker-NavButton--next{
margin-left: 265px;
margin-left: 205px;
}
.DayPicker-Caption > div{
text-align: center;
font-size: 20px;
margin-top: -23px;
margin: -23px auto 0;
width: 200px;
}
.DayPicker-Month{
margin-top: -10px;
......@@ -156,5 +161,25 @@
.am-list-item.am-input-disabled .am-input-label{
color: #000000;
}
.am-textarea-disabled .am-textarea-label{
color: #000000;
}
.am-textarea-control textarea:disabled{
color: #000000;
}
}
}
.modal-form-footer-right{
padding: 14px;
display: flex;
justify-content: flex-end;
align-items: center;
:global{
.am-button{
width: 102px;
height: 40px;
line-height: 40px;
}
}
}
......@@ -43,7 +43,7 @@ const ReactRouter = () => {
<Route path="/blank/addressList" component={AddressBook}/>
<Route path="/blank/date" component={Date}/>
<Route path="/blank/mail" component={Mail}/>
<Route path="/blank/mail-info" component={MainInfo}/>
<Route path="/blank/mail-info/:uuid" component={MainInfo}/>
<Route path="/blank/mail-send" component={MainSend}/>
<Route path="/blank/people/:attachId" component={People}/>
<Route path="/blank/application/:id/:uuid/:FLOWTBID" component={Application}/>
......
......@@ -70,9 +70,6 @@ export const createAPI = (baseURL) => {
}
localStorage.setItem("token", response.data.token);
}
if (response && response.data && response.data.userPwd) {
localStorage.setItem("upaccount", response.data.userPwd);
}
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