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

debug

parent 50fb69ec
Pipeline #15864 passed with stages
in 57 seconds
......@@ -8,11 +8,11 @@ const ChildAddress = props => {
{data && data.length > 0 && data.map((item, index) => (
<div className="address-item" key={index}>
<div>
{item.XM || ''}
{item.XM || item.xm || ''}
</div>
<div className="address-user">
<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>
))}
......
......@@ -3,7 +3,7 @@ import './index.less'
const ParentAddress = (props) => {
const {data, onClick} = props;
console.log(data)
// console.log(data)
return (
<div className="address-box">
{data && data.length > 0 && data.map((item, index) => (
......
......@@ -14,7 +14,7 @@ const MailA = (props) => {
onDelete(data.uid);
visibleChange(false)
};
console.log(data.type.indexOf('image') > -1)
// console.log(data.type.indexOf('image') > -1)
return (
<div>
......
......@@ -17,7 +17,7 @@ const NewPage = (props) => {
useEffect(() => {
setLoading(true);
console.log(HASUSER)
// console.log(HASUSER)
axiosRequest({
method: 'post',
url: HASUSER === 'true' ? `/idtAppServiceV6/oApp/getDeptUserList?deptId=${pId}` :`/idtAppServiceV6/oApp/getChildDeptList?pId=${pId}`,
......
......@@ -38,9 +38,10 @@ const Process = (props) => {
mobileSign: 1
}
}).then(res => {
const keys = res.elementList ? Object.keys(res.elementList) : [];
console.log(keys);
setBasic(res.elementList ? res.elementList.map(item => ({title: item.showName})) : []);
// console.log(res.elementList && res.elementList.length > 0)
// const keys = res.elementList ? Object.keys(res.elementList) : [];
// console.log(keys);
setBasic(res.elementList && res.elementList.length > 0 ? res.elementList.map(item => ({title: item.showName})) : []);
setTableId(res.table && res.table.tableId);
setTemplateId(res.property && res.property.templateId);
setNodeId(res.property && res.property.curNodeId);
......
......@@ -39,8 +39,8 @@ const Process = (props) => {
mobileSign: 1
}
}).then(res => {
const keys = res.elementList ? Object.keys(res.elementList) : [];
console.log(keys);
// const keys = res.elementList ? Object.keys(res.elementList) : [];
// console.log(keys);
setBasic(res.elementList ? res.elementList.map(item => ({title: item.showName})) : []);
setTableId(res.table && res.table.tableId);
setTemplateId(res.property && res.property.templateId);
......
......@@ -39,7 +39,7 @@ const Process = (props) => {
}
}).then(res => {
const keys = res.elementList ? Object.keys(res.elementList) : [];
console.log(keys);
// console.log(keys);
setBasic(res.elementList ? res.elementList.map(item => ({title: item.showName})) : []);
setTableId(res.table && res.table.tableId);
setTemplateId(res.property && res.property.templateId);
......
......@@ -26,16 +26,22 @@ const AddressBook = (props) => {
}, []);
// const [userLoading, setUserLoading] = useState(false)
const treeClick = (DEPTID) => {
const treeClick = (mc) => {
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;
newData[index] = {...newData[index], loading: true, children: [], checked: !checked};
newData[index] = {...newData[index], checked: !checked};
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 (
<Document title="参加人数">
<div>
<div className="people-num">参加人数({getPeople()}</div>
<div className='adMainBox meet-box'>
{loading ? <Skeleton/> : (<Meet data={data} onClick={treeClick}/>)}
</div>
......
......@@ -8,8 +8,8 @@ const Index = (props) => {
<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 || ''}
<div className="address-item address-title" onClick={() => onClick(item.mc)}>
{item.mc || ''}
<img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/>
</div>
{ item.checked && item.children.length > 0 && (
......
......@@ -173,3 +173,11 @@
font-size: 16px;
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) => {
}, [searchWord, tab]);
console.log(data.length)
// console.log(data.length)
return (
<Document title="通知">
<WingBlank>
......
......@@ -14,17 +14,18 @@ const DateCalendar = (props) => {
useEffect(() => {
getDate()
}, []);
const [data, setData] = useState([])
const getDate = () => {
const upaccount = localStorage.getItem('upaccount');
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/getMyRc.jsp',
body: {upaccount: 1},
body: {upaccount},
}).then(res => {
console.log(res)
setData(res);
});
}
const data = [{}, {}];
const [visible, setVisible] = useState(false);
const [editVisible, setEditVisible] = useState(false);
......@@ -36,7 +37,7 @@ 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 = 1;
values.upaccount = localStorage.getItem('upaccount');
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/application/interfaces/addCalendar.jsp',
......@@ -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)
};
......@@ -123,7 +137,7 @@ const DateCalendar = (props) => {
<WhiteSpace/>
<div className="date-todo-card">
{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>
<p>8:00</p>
......@@ -167,10 +181,10 @@ const DateCalendar = (props) => {
transparent
onClose={() => setVisible(false)}
>
<List>
<InputItem extra={`1111`}>标题</InputItem>
<InputItem extra={`1111`}>开始日期</InputItem>
<InputItem extra={`1111`}>结束日期</InputItem>
<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>
</List>
</Modal>
<div className="event-footer">
......
......@@ -18,7 +18,7 @@ const Mail = (props) => {
const [current, setCurrent] = useState(0);
const [loading, setLoading] = useState(false);
console.log(loading)
// console.log(loading)
const [data, setData] = useState([]);
......
......@@ -151,3 +151,10 @@
z-index: 10;
//visibility: hidden;
}
.date-info{
:global{
.am-list-item.am-input-disabled .am-input-label{
color: #000000;
}
}
}
......@@ -40,6 +40,7 @@ export const createAPI = (baseURL) => {
urlParams += qs.stringify(conf.opts)
}
return instance(Object.assign({}, {
url: conf.url + urlParams,
baseURL: baseURL,
......@@ -54,7 +55,7 @@ export const createAPI = (baseURL) => {
if (!response || !(response.data || response.tree)) {
// 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);
// return false;
};
......@@ -69,6 +70,9 @@ 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