Commit 432f807b authored by 熊成伟's avatar 熊成伟

debug

parent 4508ae30
Pipeline #15217 failed with stages
in 29 seconds
This diff is collapsed.
import React from 'react';
import {Checkbox} from 'antd-mobile'
import './index.less'
const Item = Checkbox.CheckboxItem
const Index = (props) => {
const data = props.data;
return (
<div className="address-box">
{data && data.length > 0 && data.map((item, index) => item.XM && (
<Item key={item.GZDH} className="sub-checkbox" onChange={val => console.log(val)}>
<div>
<img alt="" src="" className=""/>
{item.XM || ''}
</div>
<div className="address-user">
<img alt="" className='smallIco mr-5' src='/img/tel.png' />
{item.YDDH || '无'}
</div>
{/*<div className="address-item" key={index}>*/}
{/**/}
{/*</div>*/}
</Item>
))}
</div>
);
};
export default Index;
...@@ -3,25 +3,19 @@ import './index.less' ...@@ -3,25 +3,19 @@ import './index.less'
const Index = (props) => { const Index = (props) => {
const data = props.data; const data = props.data;
console.log(data)
return ( return (
<div className="address-box"> <div className="address-box">
{data && data.length > 0 && data.map((item, index) => item.title && ( {data && data.length > 0 && data.map((item, index) => item.XM && (
<div key={index}> <div className="address-item" key={index}>
<div className="address-item">
1111111111
</div>
{item.children.map((child, index2) => (
<div className="address-item" key={index2}>
<div> <div>
<img alt="" src="" className=""/> <img alt="" src="" className=""/>
{child.title || '11'} {item.XM || ''}
</div>
<div>
<img alt="" className='smallIco mr-5' src='/img/tel.png' />13488876526
</div> </div>
<div className="address-user">
<img alt="" className='smallIco mr-5' src='/img/tel.png' />
{item.YDDH || '无'}
</div> </div>
))}
</div> </div>
))} ))}
......
...@@ -2,16 +2,15 @@ import React from 'react'; ...@@ -2,16 +2,15 @@ import React from 'react';
import './index.less' import './index.less'
const Index = (props) => { const Index = (props) => {
const {data} = props; const {data, onCLick} = props;
return ( return (
<div className="address-box"> <div className="address-box">
{data && data.length > 0 && data.map((item, index) => item.title && ( {data && data.length > 0 && data.map((item, index) => item.NAME && (
<div className="address-item"> <div key={index} onClick={() => onCLick(item.DEPTID)}>
{item.title || '11'} {item.NAME || ''}
<img src="/img/rarrow.png" alt="" className='icon18'/> <img src="/img/rarrow.png" alt="" className='icon18'/>
</div> </div>
))} ))}
</div> </div>
); );
}; };
......
...@@ -11,3 +11,7 @@ ...@@ -11,3 +11,7 @@
.address-box > .address-item:last-child{ .address-box > .address-item:last-child{
border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px;
} }
.sub-checkbox{
display: flex;
justify-content: space-between;
}
...@@ -12,7 +12,7 @@ const Index = (props) => { ...@@ -12,7 +12,7 @@ const Index = (props) => {
text: addStatus ? '完成添加' :'添加常用', icon: addStatus ? '/img/finish-work.png' : '/img/add-work.png', iconAdd: true text: addStatus ? '完成添加' :'添加常用', icon: addStatus ? '/img/finish-work.png' : '/img/add-work.png', iconAdd: true
} : {}; } : {};
const empty = data.length % 3; const empty = data.length % 3;
empty === 0 && result.push(emptyIcon, {}, {}); // empty === 0 && result.push(emptyIcon, {}, {});
empty === 1 && result.push(emptyIcon, {}); empty === 1 && result.push(emptyIcon, {});
empty === 2 && result.push(emptyIcon); empty === 2 && result.push(emptyIcon);
setCard(result) setCard(result)
......
...@@ -4,7 +4,8 @@ import './index.less' ...@@ -4,7 +4,8 @@ import './index.less'
import axiosRequest from '../utils/request'; import axiosRequest from '../utils/request';
const Footer = (props) => { const Footer = (props) => {
const [current, setCurrent] = useState() const [current, setCurrent] = useState();
const [badge, setBadge] = useState()
useEffect(() => { useEffect(() => {
const keysArray = props.location.pathname.replace(`${props.match.path}/`, '').split("/"); const keysArray = props.location.pathname.replace(`${props.match.path}/`, '').split("/");
keysArray.length > 0 && setCurrent(keysArray[0]); keysArray.length > 0 && setCurrent(keysArray[0]);
...@@ -13,9 +14,9 @@ const Footer = (props) => { ...@@ -13,9 +14,9 @@ const Footer = (props) => {
const getData = () => { const getData = () => {
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: '/idtAppServiceV6/getWaitDealList', url: '/idtAppServiceV6//oApp/getUnDone',
}).then(res => { }).then(res => {
console.log(res) setBadge(res.total)
}); });
} }
const tabClick = (key, path) => { const tabClick = (key, path) => {
...@@ -23,7 +24,7 @@ const Footer = (props) => { ...@@ -23,7 +24,7 @@ const Footer = (props) => {
props.history.push(path) props.history.push(path)
}; };
const tabItem = [ const tabItem = [
{title: '待办', key: 'backlog', icon: '/img/footer-backlog.png', selectedIcon: '/img/footer-backlog-s.png', badge: '', onPress: '/bord/backlog'}, {title: '待办', key: 'backlog', icon: '/img/footer-backlog.png', selectedIcon: '/img/footer-backlog-s.png', badge: badge, onPress: '/bord/backlog'},
{title: '工作', key: 'work', icon: '/img/footer-work.png', selectedIcon: '/img/footer-work-s.png', badge: '', onPress: '/bord/work'}, {title: '工作', key: 'work', icon: '/img/footer-work.png', selectedIcon: '/img/footer-work-s.png', badge: '', onPress: '/bord/work'},
{title: '通讯录', key: 'addressList', icon: '/img/footer-communicate.png', selectedIcon: '/img/footer-communicate-s.png', badge: '', onPress: '/bord/addressList'}, {title: '通讯录', key: 'addressList', icon: '/img/footer-communicate.png', selectedIcon: '/img/footer-communicate-s.png', badge: '', onPress: '/bord/addressList'},
{title: '通知', key: 'notice', icon: '/img/footer-notice.png', selectedIcon: '/img/footer-notice-s.png', badge: '', onPress: '/bord/notice'} {title: '通知', key: 'notice', icon: '/img/footer-notice.png', selectedIcon: '/img/footer-notice-s.png', badge: '', onPress: '/bord/notice'}
......
import React, {Component} from 'react';
import './index.less';
class AddressList extends Component {
state = {
}
render() {
const partList = [{
name:'办公厅',
id:1,
},{
name:'组织部',
id:2
}];
return (
<div>
<div className='breadBox'>
<span className='currentLink'>科技创新委员会</span><span className='symbol'>&gt;</span><span>组织架构</span><span className='symbol'>&gt;</span><span>办公厅</span>
</div>
<div className='adMainBox'>
<div className='adListBox'>
<ul className='partList'>
{partList && partList.map(item => {
return <li onClick = { () => {this.props.history.push(`/bord/communicate/${item.id}`)}}>
<p className="item">{item.name}</p>
<p className="item"><img src="/img/rarrow.png" alt="" className='icon18'/></p>
</li>
})}
</ul>
</div>
</div>
</div>
);
}
}
export default AddressList;
@import '../../variable.less';
.breadBox{
padding:15px 20px;
font-size: 14px;
background-color: #fff;
line-height: 1.5;
}
.currentLink{
color:@primary;
}
.adMainBox{
padding:10px 18px;
}
.adListBox{
padding:15px;
background-color: #fff;
border:0px solid rgba(0, 0, 0, 0.1);
border-radius:5px;
}
.adListBox{
li{
margin-bottom:10px ;
border-bottom: 1px solid @grayLight;
&:last-child{
padding-top: 0;
border-bottom: none;
}
}
.titleBar{
font-size: 16px;
padding-top: 0;
}
.adContent{
padding:15px 0;
}
}
.peopleList{
display: flex;
justify-content: space-between;
line-height: 1.5;
align-items:center;
padding:10px 0;
}
.peopleList .subItem{
flex:1;
font-size: 14px;
}
.peopleList > p:last-child{
text-align: right;
}
.partList{
li{
&:extend(.peopleList);
border-bottom: 1px solid @grayLight;
margin-bottom: 0;
line-height: 1.5;
padding:15px 5px !important;
}
p:nth-child(1){
font-size: 14px;
}
.icon18{
margin-bottom: -4px;
}
}
\ No newline at end of file
...@@ -12,8 +12,8 @@ const Backlog = (props) => { ...@@ -12,8 +12,8 @@ const Backlog = (props) => {
const [data, setData] = useState([]); const [data, setData] = useState([]);
const checkLog = (TABLEID) => { const checkLog = (OPERATEID) => {
props.history.push(`/blank/info/example/${TABLEID}`) props.history.push(`/blank/info/${OPERATEID}`)
}; };
const getData = () => { const getData = () => {
const pageMap ={searchWord, nowPage: current, pageSize: 10}; const pageMap ={searchWord, nowPage: current, pageSize: 10};
...@@ -23,6 +23,7 @@ const Backlog = (props) => { ...@@ -23,6 +23,7 @@ const Backlog = (props) => {
method: 'post', method: 'post',
url: '/idtAppServiceV6/oApp/getUnDone', url: '/idtAppServiceV6/oApp/getUnDone',
}).then(res => { }).then(res => {
console.log(res)
setLoading(false); setLoading(false);
let result = res.rows ? data.concat(res.rows) : data; let result = res.rows ? data.concat(res.rows) : data;
setData(result); setData(result);
...@@ -54,6 +55,7 @@ const Backlog = (props) => { ...@@ -54,6 +55,7 @@ const Backlog = (props) => {
element.scrollTo(0, 0) element.scrollTo(0, 0)
}, []) }, [])
console.log(loading)
return ( return (
<WingBlank> <WingBlank>
<ActivityIndicator <ActivityIndicator
...@@ -67,7 +69,7 @@ const Backlog = (props) => { ...@@ -67,7 +69,7 @@ const Backlog = (props) => {
data.map((item, index) => ( data.map((item, index) => (
<div key={index}> <div key={index}>
<WhiteSpace/> <WhiteSpace/>
<TodoCard data={item} onClick={() => checkLog(item.TABLEID)}/> <TodoCard data={item} onClick={() => checkLog(item.OPERATEID)}/>
</div> </div>
)) ))
......
import React, {useState, useEffect} from 'react'; import React, {useState, useEffect} from 'react';
import AddressList from '../../components/AddressList'; import AddressList from '../../components/AddressList';
import AddressUser from '../../components/AddressList/AddressUser';
import axiosRequest from '../../utils/request'; import axiosRequest from '../../utils/request';
import {ActivityIndicator} from "antd-mobile"; import {ActivityIndicator} from "antd-mobile";
import './index.less'
const AddressBook = (props) => { const AddressBook = (props) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [data, setData] = useState([]); const [data, setData] = useState([]);
const [type, setType] = useState('basic') // const [type, setType] = useState('basic')
// const {id} = props.match.params; // const {id} = props.match.params;
...@@ -21,15 +21,15 @@ const AddressBook = (props) => { ...@@ -21,15 +21,15 @@ const AddressBook = (props) => {
url: '/idtAppServiceV6/oApp/getDeptTree', url: '/idtAppServiceV6/oApp/getDeptTree',
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
setData() setData(res)
}); });
}; };
useEffect(() => { useEffect(() => {
getData() getData()
}, []); }, []);
const treeClick = () => { const treeClick = (val) => {
props.history.push(`/bord/address/${val}`)
}; };
return ( return (
<div> <div>
...@@ -38,15 +38,8 @@ const AddressBook = (props) => { ...@@ -38,15 +38,8 @@ const AddressBook = (props) => {
text="加载中..." text="加载中..."
animating={loading} animating={loading}
/> />
<div className='breadBox'>
<span className='currentLink'>科技创新委员会</span>
<span className='symbol'>&gt;</span>
<span>组织架构</span>
<span className='symbol'>&gt;</span>
<span>办公厅</span>
</div>
<div className='adMainBox'> <div className='adMainBox'>
<AddressUser data={data} onCLick={}/> <AddressList data={data} onCLick={treeClick}/>
</div> </div>
</div> </div>
......
...@@ -7,25 +7,22 @@ import {ActivityIndicator} from "antd-mobile"; ...@@ -7,25 +7,22 @@ import {ActivityIndicator} from "antd-mobile";
const Communicate = (props) => { const Communicate = (props) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [data, setData] = useState([]); const [data, setData] = useState([]);
// const [type, setType] = useState('basic') const [title, setTitle] = useState([])
// const {id} = props.match.params; const getData = (id) => {
// console.log(id, ss);
const getData = () => {
setLoading(true); setLoading(true);
console.log(data)
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: '/idtAppServiceV6/oApp/getSearchAddressBook', url: `/idtAppServiceV6/oApp/getSearchAddressBook?deptId=${id}`,
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
setData() setData(res.userList)
setTitle(res.deptList)
}); });
}; };
useEffect(() => { useEffect(() => {
getData() const {id} = props.match.params;
getData(id)
}, []); }, []);
...@@ -37,14 +34,15 @@ const Communicate = (props) => { ...@@ -37,14 +34,15 @@ const Communicate = (props) => {
animating={loading} animating={loading}
/> />
<div className='breadBox'> <div className='breadBox'>
<span className='currentLink'>科技创新委员会</span> {title.length > 0 ? title[0].depts : ''}
<span className='symbol'>&gt;</span> {/*<span className='currentLink'>科技创新委员会</span>*/}
<span>组织架构</span> {/*<span className='symbol'>&gt;</span>*/}
<span className='symbol'>&gt;</span> {/*<span>组织架构</span>*/}
<span>办公厅</span> {/*<span className='symbol'>&gt;</span>*/}
{/*<span>办公厅</span>*/}
</div> </div>
<div className='adMainBox'> <div className='adMainBox'>
<AddressUser data={[{title: '1', children: [{}, {}, {}]}, {title: 2, children: [{}, {}, {}]}, {title: 3, children: [{}, {}, {}]}]}/> <AddressUser data={data}/>
</div> </div>
</div> </div>
......
import React, {useEffect, useState} from 'react'; import React from 'react';
import List from '../../components/List' import List from '../../components/List'
import AdjunctList from '../../components/Adjunct' import AdjunctList from '../../components/Adjunct'
import axiosRequest from '../../utils/request';
const da222 = Array.from(new Array(7)).map((_val, i) => ({ const da222 = Array.from(new Array(7)).map((_val, i) => ({
id: `name${i}`, id: `name${i}`,
...@@ -9,17 +8,8 @@ const da222 = Array.from(new Array(7)).map((_val, i) => ({ ...@@ -9,17 +8,8 @@ const da222 = Array.from(new Array(7)).map((_val, i) => ({
})); }));
const Adjunct = (props) => { const Adjunct = (props) => {
const [data, setData] = useState([]) // const [data, setData] = useState([])
useEffect(() => {
const {tableId} = props;
axiosRequest({
method: 'post',
url: `/dgbg/MobileGetFlowsByTabId.view?userName=2012012099&clientFlag=123456&tableId=${tableId}`,
}).then(res => {
console.log(res, data)
setData([])
});
}, []);
const listData = [ const listData = [
{title: '开始时间', content: '文电科'}, {title: '开始时间', content: '文电科'},
{title: '结束时间', content: '3'}, {title: '结束时间', content: '3'},
......
import React, {useState, useEffect} from 'react'; import React from 'react';
import './index.less' import './index.less'
import List from '../../components/List' import List from '../../components/List'
import axiosRequest from '../../utils/request'; // import axiosRequest from '../../utils/request';
const Basic = (props) => { const Basic = (props) => {
const [data, setData] = useState([]); const {data} = props
useEffect(() => {
const {tableId} = props;
axiosRequest({
method: 'post',
url: `/dgbg/MobileGetFlowsByTabId.view?userName=2012012099&clientFlag=123456&tableId=${tableId}`,
}).then(res => {
console.log(res)
setData([])
});
}, [])
......
import React, {useEffect, useState} from 'react'; import React, {useEffect} from 'react';
import StepCard from '../../components/StepCard' import StepCard from '../../components/StepCard'
import axiosRequest from '../../utils/request'; // import axiosRequest from '../../utils/request';
const Flow = (props) => { const Flow = (props) => {
const [data, setData] = useState([]) const {data} = props
// const [data, setData] = useState([])
useEffect(() => { useEffect(() => {
const {tableId} = props; // const {tableId} = props;
axiosRequest({ // axiosRequest({
method: 'post', // method: 'post',
url: `/dgbg/MobileGetFlowsByTabId.view?userName=2012012099&clientFlag=123456&tableId=${tableId}`, // url: `/dgbg/MobileGetFlowsByTabId.view?userName=2012012099&clientFlag=123456&tableId=${tableId}`,
}).then(res => { // }).then(res => {
console.log(res) // console.log(res)
setData([]) // setData([])
}); // });
}, []); }, []);
return ( return (
<div> <div>
......
import React, { useEffect} from 'react'; import React, { useEffect} from 'react';
import {Modal} from 'antd-mobile' import {Modal} from 'antd-mobile'
import './index.less'; import './index.less';
import axiosRequest from '../../utils/request'; // import axiosRequest from '../../utils/request';
const operation = Modal.operation; const operation = Modal.operation;
...@@ -16,12 +16,12 @@ const Option = (props) => { ...@@ -16,12 +16,12 @@ const Option = (props) => {
input[0].value = val input[0].value = val
}; };
useEffect(() => { useEffect(() => {
axiosRequest({ // axiosRequest({
method: 'post', // method: 'post',
url: '/dgbg/mobileGetListOptionKey.view?userName=2012012099&clientFlag=123456', // url: '/dgbg/mobileGetListOptionKey.view?userName=2012012099&clientFlag=123456',
}).then(res => { // }).then(res => {
console.log(res) // console.log(res)
}); // });
}, []) }, [])
return ( return (
<div> <div>
......
import React, {useState, useEffect} from 'react'; import React, {useState, useEffect} from 'react';
import {WingBlank, WhiteSpace, ActionSheet, ActivityIndicator} from 'antd-mobile' import {WingBlank, WhiteSpace, ActionSheet, ActivityIndicator} from 'antd-mobile'
// import axiosRequest from '../../utils/request'; import axiosRequest from '../../utils/request';
import './index.less' import './index.less'
import TopTabs from '../../components/BlankTabs' import TopTabs from '../../components/BlankTabs'
import Basic from './Basic' import Basic from './Basic'
...@@ -8,10 +8,22 @@ import Adjunct from './Adjunct' ...@@ -8,10 +8,22 @@ import Adjunct from './Adjunct'
import Flow from './Flow'; import Flow from './Flow';
import Option from './Option'; import Option from './Option';
const Pro = (props) => { const Process = (props) => {
useEffect(() => {
const {id} = props.match.params
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/dispatcher?operateId=${id}`,
}).then(res => {
console.log(res)
});
}, [])
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [tableId, setTableId] = useState() // const [tableId, setTableId] = useState()
//提交按钮状态 //提交按钮状态
const [disabled, setDisabled] = useState(true) const [disabled, setDisabled] = useState(true)
...@@ -23,8 +35,6 @@ const Pro = (props) => { ...@@ -23,8 +35,6 @@ const Pro = (props) => {
setFootStatus(true) setFootStatus(true)
}; };
useEffect(() => { useEffect(() => {
setTableId();
console.log(tableId)
setLoading(false); setLoading(false);
const option = document.getElementsByClassName("option-text")[0] const option = document.getElementsByClassName("option-text")[0]
option.addEventListener('focus', optionBlur, true); option.addEventListener('focus', optionBlur, true);
...@@ -73,18 +83,14 @@ const Pro = (props) => { ...@@ -73,18 +83,14 @@ const Pro = (props) => {
wrapProps, wrapProps,
}, },
(buttonIndex) => { (buttonIndex) => {
buttonIndex > 1 && props.history.push(`/blank/submit/1`) buttonIndex < 2 && subUrl(buttonIndex)
console.log(buttonIndex) console.log(buttonIndex)
}); });
}; };
// const processEnd = () => { const subUrl = key => {
// axiosRequest({ const url = key === 0 ? 2 : 10
// method: 'post', props.history.push(`/blank/submit/${url}`)
// url: `/dgbg/MobileGetFlowsByTabId.view?userName=2012012099&clientFlag=123456&tableId=${tableId}`, }
// }).then(res => {
// console.log(res)
// });
// }
const handleScroll = () => { const handleScroll = () => {
const adjunct = document.getElementById("event-adjunct").offsetTop; const adjunct = document.getElementById("event-adjunct").offsetTop;
...@@ -123,13 +129,13 @@ const Pro = (props) => { ...@@ -123,13 +129,13 @@ const Pro = (props) => {
<WingBlank> <WingBlank>
<div id="event-basic"/> <div id="event-basic"/>
<WhiteSpace/> <WhiteSpace/>
<Basic/> <Basic data={[]}/>
<div id="event-adjunct"/> <div id="event-adjunct"/>
<WhiteSpace/> <WhiteSpace/>
<Adjunct/> <Adjunct data={[]}/>
<div id="event-flow"/> <div id="event-flow"/>
<WhiteSpace/> <WhiteSpace/>
<Flow/> <Flow data={[]}/>
<div id="event-option"/> <div id="event-option"/>
<WhiteSpace/> <WhiteSpace/>
<Option onChange={optionChange}/> <Option onChange={optionChange}/>
...@@ -149,4 +155,4 @@ const Pro = (props) => { ...@@ -149,4 +155,4 @@ const Pro = (props) => {
); );
}; };
export default Pro; export default Process;
import React, {Component} from 'react'; import React, {useEffect, useState} from 'react';
import AddressList from '../../components/AddressList' import {WingBlank, WhiteSpace, ActivityIndicator} from "antd-mobile";
import {WingBlank, WhiteSpace} from "antd-mobile"; import axiosRequest from '../../utils/request';
import AddressCheckbox from '../../components/AddressList/AddressCheckbox';
const SubmitDetail = (props) => {
const [data, setData] = useState([]);
const [title, setTitle] = useState([])
useEffect(() => {
// const {type} = props.match.params
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getSearchAddressBook?deptId=47c2c44d41ba15fa0141ba8b7cad0006'
// url: `/idtAppServiceV6/oApp/getLeaders?mobileUse=true&nType=${type}`,
}).then(res => {
setData(res.userList)
setTitle(res.deptList)
});
}, [])
class SubmitDetail extends Component {
render() {
return ( return (
<div> <div>
111 <div className='breadBox'>
<WhiteSpace/> {title.length > 0 ? title[0].depts : ''}
<WingBlank> {/*<span className='currentLink'>科技创新委员会</span>*/}
<AddressList data={[]}/> {/*<span className='symbol'>&gt;</span>*/}
</WingBlank> {/*<span>组织架构</span>*/}
{/*<span className='symbol'>&gt;</span>*/}
{/*<span>办公厅</span>*/}
</div>
<div className='adMainBox'>
<AddressCheckbox data={data}/>
</div>
</div> </div>
); );
} };
}
export default SubmitDetail; export default SubmitDetail;
...@@ -94,3 +94,8 @@ ...@@ -94,3 +94,8 @@
height: 15px; height: 15px;
margin-right: 5px; margin-right: 5px;
} }
.am-list-item .am-list-line .am-list-content{
display: flex;
justify-content: space-between;
font-size: 14px;
}
...@@ -16,12 +16,12 @@ const Notice = (props) => { ...@@ -16,12 +16,12 @@ const Notice = (props) => {
setLoading(true) setLoading(true)
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: '/dgbg/mobileGetWaitDealList.view?userName=2012012099&clientFlag=123456', url: '/idtAppServiceV6/oApp/getUnDone',
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
let result = res.rows ?data.concat(res.rows) : data let result = res.rows ? data.concat(res.rows) : data;
setData(result) setData(result);
setCurrent(current + 1) setCurrent(current + 1);
}); });
}; };
......
...@@ -21,7 +21,7 @@ const Work = (props) => { ...@@ -21,7 +21,7 @@ const Work = (props) => {
url: '/idtAppServiceV6/oApp/getAllOperate', url: '/idtAppServiceV6/oApp/getAllOperate',
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
const result = res.operate ? res.operate.map(item => ({ icon: '', text: item.NODENAME })) : [] const result = res ? res.map(item => ({ icon: '', text: item.nodeName })) : []
setOperates(result); setOperates(result);
setData(result) setData(result)
}); });
......
...@@ -8,7 +8,7 @@ import Work from './pages/Work/Work' ...@@ -8,7 +8,7 @@ import Work from './pages/Work/Work'
import WorkDetail from './pages/Work/WorkDetail' import WorkDetail from './pages/Work/WorkDetail'
import Notice from './pages/Notice/Notice' import Notice from './pages/Notice/Notice'
import Communicate from './pages/Communicate/Communicate'; import Communicate from './pages/Communicate/Communicate';
import AddressList from './pages/AddressList/AddressList'; import AddressBook from './pages/Communicate/AddressBook';
import Process from './pages/EventProcessing/Process' import Process from './pages/EventProcessing/Process'
import SubmitDetail from './pages/EventProcessing/SubmitDetail' import SubmitDetail from './pages/EventProcessing/SubmitDetail'
...@@ -28,16 +28,16 @@ const ReactRouter = () => { ...@@ -28,16 +28,16 @@ const ReactRouter = () => {
<CommonLayout> <CommonLayout>
<Route path="/bord/backlog" component={Backlog} /> <Route path="/bord/backlog" component={Backlog} />
<Route path="/bord/work" component={Work}/> <Route path="/bord/work" component={Work}/>
<Route path="/bord/addressList/:id" component={Communicate}/> <Route path="/bord/address/:id" component={Communicate}/>
<Route path="/bord/addressList" component={AddressList}/> <Route path="/bord/addressList" component={AddressBook}/>
<Route path="/bord/notice" component={Notice}/> <Route path="/bord/notice" component={Notice}/>
</CommonLayout> </CommonLayout>
}/> }/>
<Route path="/blank" component={() => <Route path="/blank" component={() =>
<BlankLayout> <BlankLayout>
<Route path="/blank/work/:id" component={WorkDetail}/> <Route path="/blank/work/:id" component={WorkDetail}/>
<Route path="/blank/submit/:id" component={SubmitDetail}/> <Route path="/blank/submit/:type" component={SubmitDetail}/>
<Route path="/blank/info/:name/:id" component={Process}/> <Route path="/blank/info/:id" component={Process}/>
</BlankLayout> </BlankLayout>
}/> }/>
<Route component={NoFound}/> <Route component={NoFound}/>
......
...@@ -57,9 +57,9 @@ export const createAPI = (baseURL) => { ...@@ -57,9 +57,9 @@ export const createAPI = (baseURL) => {
// 保存到本地 // 保存到本地
if (response && response.data && response.data.token) { if (response && response.data && response.data.token) {
defaultHeaders = { defaultHeaders = {
token: response.data.access_token, token: response.data.token,
} }
localStorage.setItem("token", response.data.access_token); localStorage.setItem("token", response.data.token);
} }
if (response.data) { if (response.data) {
......
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