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

debug

parent 50fb69ec
Pipeline #15864 passed with stages
in 57 seconds
...@@ -8,11 +8,11 @@ const ChildAddress = props => { ...@@ -8,11 +8,11 @@ const ChildAddress = props => {
{data && data.length > 0 && data.map((item, index) => ( {data && data.length > 0 && data.map((item, index) => (
<div className="address-item" key={index}> <div className="address-item" key={index}>
<div> <div>
{item.XM || ''} {item.XM || item.xm || ''}
</div> </div>
<div className="address-user"> <div className="address-user">
<img alt="" className='smallIco mr-5' src='/img/tel.png' /> <img alt="" className='smallIco mr-5' src='/img/tel.png' />
<a className="address-phone" href={item.YDDH ? `tel:${item.YDDH}` : null}>{item.YDDH || '无'}</a> <a className="address-phone" href={(item.YDDH || item.yddh) ? `tel:${item.YDDH}` : null}>{item.YDDH || item.yddh || '无'}</a>
</div> </div>
</div> </div>
))} ))}
......
...@@ -3,7 +3,7 @@ import './index.less' ...@@ -3,7 +3,7 @@ import './index.less'
const ParentAddress = (props) => { const ParentAddress = (props) => {
const {data, onClick} = props; const {data, onClick} = props;
console.log(data) // console.log(data)
return ( return (
<div className="address-box"> <div className="address-box">
{data && data.length > 0 && data.map((item, index) => ( {data && data.length > 0 && data.map((item, index) => (
......
...@@ -14,7 +14,7 @@ const MailA = (props) => { ...@@ -14,7 +14,7 @@ const MailA = (props) => {
onDelete(data.uid); onDelete(data.uid);
visibleChange(false) visibleChange(false)
}; };
console.log(data.type.indexOf('image') > -1) // console.log(data.type.indexOf('image') > -1)
return ( return (
<div> <div>
......
...@@ -17,7 +17,7 @@ const NewPage = (props) => { ...@@ -17,7 +17,7 @@ const NewPage = (props) => {
useEffect(() => { useEffect(() => {
setLoading(true); setLoading(true);
console.log(HASUSER) // console.log(HASUSER)
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: HASUSER === 'true' ? `/idtAppServiceV6/oApp/getDeptUserList?deptId=${pId}` :`/idtAppServiceV6/oApp/getChildDeptList?pId=${pId}`, url: HASUSER === 'true' ? `/idtAppServiceV6/oApp/getDeptUserList?deptId=${pId}` :`/idtAppServiceV6/oApp/getChildDeptList?pId=${pId}`,
......
...@@ -38,9 +38,10 @@ const Process = (props) => { ...@@ -38,9 +38,10 @@ const Process = (props) => {
mobileSign: 1 mobileSign: 1
} }
}).then(res => { }).then(res => {
const keys = res.elementList ? Object.keys(res.elementList) : []; // console.log(res.elementList && res.elementList.length > 0)
console.log(keys); // const keys = res.elementList ? Object.keys(res.elementList) : [];
setBasic(res.elementList ? res.elementList.map(item => ({title: item.showName})) : []); // console.log(keys);
setBasic(res.elementList && res.elementList.length > 0 ? res.elementList.map(item => ({title: item.showName})) : []);
setTableId(res.table && res.table.tableId); setTableId(res.table && res.table.tableId);
setTemplateId(res.property && res.property.templateId); setTemplateId(res.property && res.property.templateId);
setNodeId(res.property && res.property.curNodeId); setNodeId(res.property && res.property.curNodeId);
......
...@@ -39,8 +39,8 @@ const Process = (props) => { ...@@ -39,8 +39,8 @@ const Process = (props) => {
mobileSign: 1 mobileSign: 1
} }
}).then(res => { }).then(res => {
const keys = res.elementList ? Object.keys(res.elementList) : []; // const keys = res.elementList ? Object.keys(res.elementList) : [];
console.log(keys); // console.log(keys);
setBasic(res.elementList ? res.elementList.map(item => ({title: item.showName})) : []); setBasic(res.elementList ? res.elementList.map(item => ({title: item.showName})) : []);
setTableId(res.table && res.table.tableId); setTableId(res.table && res.table.tableId);
setTemplateId(res.property && res.property.templateId); setTemplateId(res.property && res.property.templateId);
......
...@@ -39,7 +39,7 @@ const Process = (props) => { ...@@ -39,7 +39,7 @@ const Process = (props) => {
} }
}).then(res => { }).then(res => {
const keys = res.elementList ? Object.keys(res.elementList) : []; const keys = res.elementList ? Object.keys(res.elementList) : [];
console.log(keys); // console.log(keys);
setBasic(res.elementList ? res.elementList.map(item => ({title: item.showName})) : []); setBasic(res.elementList ? res.elementList.map(item => ({title: item.showName})) : []);
setTableId(res.table && res.table.tableId); setTableId(res.table && res.table.tableId);
setTemplateId(res.property && res.property.templateId); setTemplateId(res.property && res.property.templateId);
......
...@@ -26,16 +26,22 @@ const AddressBook = (props) => { ...@@ -26,16 +26,22 @@ const AddressBook = (props) => {
}, []); }, []);
// const [userLoading, setUserLoading] = useState(false) // const [userLoading, setUserLoading] = useState(false)
const treeClick = (DEPTID) => { const treeClick = (mc) => {
const newData = [...data]; const newData = [...data];
const index = newData.findIndex(item => item.DEPTID === DEPTID); const index = newData.findIndex(item => item.mc === mc);
const checked = newData[index].checked ? newData[index] : false; const checked = newData[index].checked ? newData[index] : false;
newData[index] = {...newData[index], loading: true, children: [], checked: !checked}; newData[index] = {...newData[index], checked: !checked};
setData(newData); setData(newData);
}; };
const getPeople = () => {
let length = 0;
data.length > 0 && data.map(item => length += item.children && item.children.length > 0 ? item.children.length : 0);
return length
};
return ( return (
<Document title="参加人数"> <Document title="参加人数">
<div> <div>
<div className="people-num">参加人数({getPeople()}</div>
<div className='adMainBox meet-box'> <div className='adMainBox meet-box'>
{loading ? <Skeleton/> : (<Meet data={data} onClick={treeClick}/>)} {loading ? <Skeleton/> : (<Meet data={data} onClick={treeClick}/>)}
</div> </div>
......
...@@ -8,8 +8,8 @@ const Index = (props) => { ...@@ -8,8 +8,8 @@ const Index = (props) => {
<div className="address-box"> <div className="address-box">
{data && data.length > 0 && data.map((item, index) => ( {data && data.length > 0 && data.map((item, index) => (
<div key={index} className="good-item"> <div key={index} className="good-item">
<div className="address-item address-title" onClick={() => onClick(item.BGYPMC)}> <div className="address-item address-title" onClick={() => onClick(item.mc)}>
{item.BGYPMC || ''} {item.mc || ''}
<img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/> <img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/>
</div> </div>
{ item.checked && item.children.length > 0 && ( { item.checked && item.children.length > 0 && (
......
...@@ -173,3 +173,11 @@ ...@@ -173,3 +173,11 @@
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
.people-num{
display: flex;
justify-content: center;
align-items: center;
height: 45px;
background: white;
font-size: 17px;
}
...@@ -88,7 +88,7 @@ const Notice = (props) => { ...@@ -88,7 +88,7 @@ const Notice = (props) => {
}, [searchWord, tab]); }, [searchWord, tab]);
console.log(data.length) // console.log(data.length)
return ( return (
<Document title="通知"> <Document title="通知">
<WingBlank> <WingBlank>
......
...@@ -14,17 +14,18 @@ const DateCalendar = (props) => { ...@@ -14,17 +14,18 @@ const DateCalendar = (props) => {
useEffect(() => { useEffect(() => {
getDate() getDate()
}, []); }, []);
const [data, setData] = useState([])
const getDate = () => { const getDate = () => {
const upaccount = localStorage.getItem('upaccount');
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: '/idtAppServiceV6/application/interfaces/getMyRc.jsp', url: '/idtAppServiceV6/application/interfaces/getMyRc.jsp',
body: {upaccount: 1}, body: {upaccount},
}).then(res => { }).then(res => {
console.log(res) setData(res);
}); });
} }
const data = [{}, {}];
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const [editVisible, setEditVisible] = useState(false); const [editVisible, setEditVisible] = useState(false);
...@@ -36,7 +37,7 @@ const DateCalendar = (props) => { ...@@ -36,7 +37,7 @@ const DateCalendar = (props) => {
const values = props.form.getFieldsValue(); const values = props.form.getFieldsValue();
values.starttime = moment(values.starttime).format("YYYY-MM-DD HH:mm:ss"); 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.endtime = moment(values.endtime).format("YYYY-MM-DD HH:mm:ss");
values.upaccount = 1; values.upaccount = localStorage.getItem('upaccount');
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: '/idtAppServiceV6/application/interfaces/addCalendar.jsp', url: '/idtAppServiceV6/application/interfaces/addCalendar.jsp',
...@@ -102,7 +103,20 @@ const DateCalendar = (props) => { ...@@ -102,7 +103,20 @@ const DateCalendar = (props) => {
// }); // });
// }; // };
const openInfo = () => { // 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)
setVisible(true) setVisible(true)
}; };
...@@ -123,7 +137,7 @@ const DateCalendar = (props) => { ...@@ -123,7 +137,7 @@ const DateCalendar = (props) => {
<WhiteSpace/> <WhiteSpace/>
<div className="date-todo-card"> <div className="date-todo-card">
{data.map((item, index) => ( {data.map((item, index) => (
<div key={index} className="date-todo-item" onClick={() => openInfo()}> <div key={index} className="date-todo-item" onClick={(item) => openInfo(item)}>
<div>出差携带物资</div> <div>出差携带物资</div>
<div> <div>
<p>8:00</p> <p>8:00</p>
...@@ -167,10 +181,10 @@ const DateCalendar = (props) => { ...@@ -167,10 +181,10 @@ const DateCalendar = (props) => {
transparent transparent
onClose={() => setVisible(false)} onClose={() => setVisible(false)}
> >
<List> <List className="date-info">
<InputItem extra={`1111`}>标题</InputItem> <InputItem disabled={true} extra={dateInfo.subject}>标题</InputItem>
<InputItem extra={`1111`}>开始日期</InputItem> <InputItem disabled={true} extra={dateInfo.starttime}>开始日期</InputItem>
<InputItem extra={`1111`}>结束日期</InputItem> <InputItem disabled={true} extra={dateInfo.endtime}>结束日期</InputItem>
</List> </List>
</Modal> </Modal>
<div className="event-footer"> <div className="event-footer">
......
...@@ -18,7 +18,7 @@ const Mail = (props) => { ...@@ -18,7 +18,7 @@ const Mail = (props) => {
const [current, setCurrent] = useState(0); const [current, setCurrent] = useState(0);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
console.log(loading) // console.log(loading)
const [data, setData] = useState([]); const [data, setData] = useState([]);
......
...@@ -151,3 +151,10 @@ ...@@ -151,3 +151,10 @@
z-index: 10; z-index: 10;
//visibility: hidden; //visibility: hidden;
} }
.date-info{
:global{
.am-list-item.am-input-disabled .am-input-label{
color: #000000;
}
}
}
...@@ -40,6 +40,7 @@ export const createAPI = (baseURL) => { ...@@ -40,6 +40,7 @@ export const createAPI = (baseURL) => {
urlParams += qs.stringify(conf.opts) urlParams += qs.stringify(conf.opts)
} }
return instance(Object.assign({}, { return instance(Object.assign({}, {
url: conf.url + urlParams, url: conf.url + urlParams,
baseURL: baseURL, baseURL: baseURL,
...@@ -54,7 +55,7 @@ export const createAPI = (baseURL) => { ...@@ -54,7 +55,7 @@ export const createAPI = (baseURL) => {
if (!response || !(response.data || response.tree)) { if (!response || !(response.data || response.tree)) {
// response.status === 'failure' && (window.location.href = '/login') // response.status === 'failure' && (window.location.href = '/login')
response.message === '票据已经失效' && (window.location.href = '/login') response.code === 'idt-jwt-500' && (window.location.href = '/login')
console.log('response出错, 无返回数据!', response); console.log('response出错, 无返回数据!', response);
// return false; // return false;
}; };
...@@ -69,6 +70,9 @@ export const createAPI = (baseURL) => { ...@@ -69,6 +70,9 @@ export const createAPI = (baseURL) => {
} }
localStorage.setItem("token", response.data.token); 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) { if (response && response.data && response.data.leftOperateBar) {
localStorage.removeItem("menu"); localStorage.removeItem("menu");
const menu = response.data.leftOperateBar.map(item => ({ icon: item.imgType, text: item.nodeName, id: item.id, children: item.children })) 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