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'
const Index = (props) => {
const data = props.data;
console.log(data)
return (
<div className="address-box">
{data && data.length > 0 && data.map((item, index) => item.title && (
<div key={index}>
<div className="address-item">
1111111111
</div>
{item.children.map((child, index2) => (
<div className="address-item" key={index2}>
{data && data.length > 0 && data.map((item, index) => item.XM && (
<div className="address-item" key={index}>
<div>
<img alt="" src="" className=""/>
{child.title || '11'}
</div>
<div>
<img alt="" className='smallIco mr-5' src='/img/tel.png' />13488876526
{item.XM || ''}
</div>
<div className="address-user">
<img alt="" className='smallIco mr-5' src='/img/tel.png' />
{item.YDDH || '无'}
</div>
))}
</div>
))}
......
......@@ -2,16 +2,15 @@ import React from 'react';
import './index.less'
const Index = (props) => {
const {data} = props;
const {data, onCLick} = props;
return (
<div className="address-box">
{data && data.length > 0 && data.map((item, index) => item.title && (
<div className="address-item">
{item.title || '11'}
{data && data.length > 0 && data.map((item, index) => item.NAME && (
<div key={index} onClick={() => onCLick(item.DEPTID)}>
{item.NAME || ''}
<img src="/img/rarrow.png" alt="" className='icon18'/>
</div>
))}
</div>
);
};
......
......@@ -11,3 +11,7 @@
.address-box > .address-item:last-child{
border-radius: 0 0 6px 6px;
}
.sub-checkbox{
display: flex;
justify-content: space-between;
}
......@@ -12,7 +12,7 @@ const Index = (props) => {
text: addStatus ? '完成添加' :'添加常用', icon: addStatus ? '/img/finish-work.png' : '/img/add-work.png', iconAdd: true
} : {};
const empty = data.length % 3;
empty === 0 && result.push(emptyIcon, {}, {});
// empty === 0 && result.push(emptyIcon, {}, {});
empty === 1 && result.push(emptyIcon, {});
empty === 2 && result.push(emptyIcon);
setCard(result)
......
......@@ -4,7 +4,8 @@ import './index.less'
import axiosRequest from '../utils/request';
const Footer = (props) => {
const [current, setCurrent] = useState()
const [current, setCurrent] = useState();
const [badge, setBadge] = useState()
useEffect(() => {
const keysArray = props.location.pathname.replace(`${props.match.path}/`, '').split("/");
keysArray.length > 0 && setCurrent(keysArray[0]);
......@@ -13,9 +14,9 @@ const Footer = (props) => {
const getData = () => {
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/getWaitDealList',
url: '/idtAppServiceV6//oApp/getUnDone',
}).then(res => {
console.log(res)
setBadge(res.total)
});
}
const tabClick = (key, path) => {
......@@ -23,7 +24,7 @@ const Footer = (props) => {
props.history.push(path)
};
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: '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'}
......
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) => {
const [data, setData] = useState([]);
const checkLog = (TABLEID) => {
props.history.push(`/blank/info/example/${TABLEID}`)
const checkLog = (OPERATEID) => {
props.history.push(`/blank/info/${OPERATEID}`)
};
const getData = () => {
const pageMap ={searchWord, nowPage: current, pageSize: 10};
......@@ -23,6 +23,7 @@ const Backlog = (props) => {
method: 'post',
url: '/idtAppServiceV6/oApp/getUnDone',
}).then(res => {
console.log(res)
setLoading(false);
let result = res.rows ? data.concat(res.rows) : data;
setData(result);
......@@ -54,6 +55,7 @@ const Backlog = (props) => {
element.scrollTo(0, 0)
}, [])
console.log(loading)
return (
<WingBlank>
<ActivityIndicator
......@@ -67,7 +69,7 @@ const Backlog = (props) => {
data.map((item, index) => (
<div key={index}>
<WhiteSpace/>
<TodoCard data={item} onClick={() => checkLog(item.TABLEID)}/>
<TodoCard data={item} onClick={() => checkLog(item.OPERATEID)}/>
</div>
))
......
import React, {useState, useEffect} from 'react';
import AddressList from '../../components/AddressList';
import AddressUser from '../../components/AddressList/AddressUser';
import axiosRequest from '../../utils/request';
import {ActivityIndicator} from "antd-mobile";
import './index.less'
const AddressBook = (props) => {
const [loading, setLoading] = useState(false);
const [data, setData] = useState([]);
const [type, setType] = useState('basic')
// const [type, setType] = useState('basic')
// const {id} = props.match.params;
......@@ -21,15 +21,15 @@ const AddressBook = (props) => {
url: '/idtAppServiceV6/oApp/getDeptTree',
}).then(res => {
setLoading(false);
setData()
setData(res)
});
};
useEffect(() => {
getData()
}, []);
const treeClick = () => {
const treeClick = (val) => {
props.history.push(`/bord/address/${val}`)
};
return (
<div>
......@@ -38,15 +38,8 @@ const AddressBook = (props) => {
text="加载中..."
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'>
<AddressUser data={data} onCLick={}/>
<AddressList data={data} onCLick={treeClick}/>
</div>
</div>
......
......@@ -7,25 +7,22 @@ import {ActivityIndicator} from "antd-mobile";
const Communicate = (props) => {
const [loading, setLoading] = useState(false);
const [data, setData] = useState([]);
// const [type, setType] = useState('basic')
const [title, setTitle] = useState([])
// const {id} = props.match.params;
// console.log(id, ss);
const getData = () => {
const getData = (id) => {
setLoading(true);
console.log(data)
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getSearchAddressBook',
url: `/idtAppServiceV6/oApp/getSearchAddressBook?deptId=${id}`,
}).then(res => {
setLoading(false);
setData()
setData(res.userList)
setTitle(res.deptList)
});
};
useEffect(() => {
getData()
const {id} = props.match.params;
getData(id)
}, []);
......@@ -37,14 +34,15 @@ const Communicate = (props) => {
animating={loading}
/>
<div className='breadBox'>
<span className='currentLink'>科技创新委员会</span>
<span className='symbol'>&gt;</span>
<span>组织架构</span>
<span className='symbol'>&gt;</span>
<span>办公厅</span>
{title.length > 0 ? title[0].depts : ''}
{/*<span className='currentLink'>科技创新委员会</span>*/}
{/*<span className='symbol'>&gt;</span>*/}
{/*<span>组织架构</span>*/}
{/*<span className='symbol'>&gt;</span>*/}
{/*<span>办公厅</span>*/}
</div>
<div className='adMainBox'>
<AddressUser data={[{title: '1', children: [{}, {}, {}]}, {title: 2, children: [{}, {}, {}]}, {title: 3, children: [{}, {}, {}]}]}/>
<AddressUser data={data}/>
</div>
</div>
......
import React, {useEffect, useState} from 'react';
import React from 'react';
import List from '../../components/List'
import AdjunctList from '../../components/Adjunct'
import axiosRequest from '../../utils/request';
const da222 = Array.from(new Array(7)).map((_val, i) => ({
id: `name${i}`,
......@@ -9,17 +8,8 @@ const da222 = Array.from(new Array(7)).map((_val, i) => ({
}));
const Adjunct = (props) => {
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 [data, setData] = useState([])
const listData = [
{title: '开始时间', content: '文电科'},
{title: '结束时间', content: '3'},
......
import React, {useState, useEffect} from 'react';
import React from 'react';
import './index.less'
import List from '../../components/List'
import axiosRequest from '../../utils/request';
// import axiosRequest from '../../utils/request';
const Basic = (props) => {
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)
setData([])
});
}, [])
const {data} = props
......
import React, {useEffect, useState} from 'react';
import React, {useEffect} from 'react';
import StepCard from '../../components/StepCard'
import axiosRequest from '../../utils/request';
// import axiosRequest from '../../utils/request';
const Flow = (props) => {
const [data, setData] = useState([])
const {data} = props
// 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)
setData([])
});
// const {tableId} = props;
// axiosRequest({
// method: 'post',
// url: `/dgbg/MobileGetFlowsByTabId.view?userName=2012012099&clientFlag=123456&tableId=${tableId}`,
// }).then(res => {
// console.log(res)
// setData([])
// });
}, []);
return (
<div>
......
import React, { useEffect} from 'react';
import {Modal} from 'antd-mobile'
import './index.less';
import axiosRequest from '../../utils/request';
// import axiosRequest from '../../utils/request';
const operation = Modal.operation;
......@@ -16,12 +16,12 @@ const Option = (props) => {
input[0].value = val
};
useEffect(() => {
axiosRequest({
method: 'post',
url: '/dgbg/mobileGetListOptionKey.view?userName=2012012099&clientFlag=123456',
}).then(res => {
console.log(res)
});
// axiosRequest({
// method: 'post',
// url: '/dgbg/mobileGetListOptionKey.view?userName=2012012099&clientFlag=123456',
// }).then(res => {
// console.log(res)
// });
}, [])
return (
<div>
......
import React, {useState, useEffect} from 'react';
import {WingBlank, WhiteSpace, ActionSheet, ActivityIndicator} from 'antd-mobile'
// import axiosRequest from '../../utils/request';
import axiosRequest from '../../utils/request';
import './index.less'
import TopTabs from '../../components/BlankTabs'
import Basic from './Basic'
......@@ -8,10 +8,22 @@ import Adjunct from './Adjunct'
import Flow from './Flow';
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 [tableId, setTableId] = useState()
// const [tableId, setTableId] = useState()
//提交按钮状态
const [disabled, setDisabled] = useState(true)
......@@ -23,8 +35,6 @@ const Pro = (props) => {
setFootStatus(true)
};
useEffect(() => {
setTableId();
console.log(tableId)
setLoading(false);
const option = document.getElementsByClassName("option-text")[0]
option.addEventListener('focus', optionBlur, true);
......@@ -73,18 +83,14 @@ const Pro = (props) => {
wrapProps,
},
(buttonIndex) => {
buttonIndex > 1 && props.history.push(`/blank/submit/1`)
buttonIndex < 2 && subUrl(buttonIndex)
console.log(buttonIndex)
});
};
// const processEnd = () => {
// axiosRequest({
// method: 'post',
// url: `/dgbg/MobileGetFlowsByTabId.view?userName=2012012099&clientFlag=123456&tableId=${tableId}`,
// }).then(res => {
// console.log(res)
// });
// }
const subUrl = key => {
const url = key === 0 ? 2 : 10
props.history.push(`/blank/submit/${url}`)
}
const handleScroll = () => {
const adjunct = document.getElementById("event-adjunct").offsetTop;
......@@ -123,13 +129,13 @@ const Pro = (props) => {
<WingBlank>
<div id="event-basic"/>
<WhiteSpace/>
<Basic/>
<Basic data={[]}/>
<div id="event-adjunct"/>
<WhiteSpace/>
<Adjunct/>
<Adjunct data={[]}/>
<div id="event-flow"/>
<WhiteSpace/>
<Flow/>
<Flow data={[]}/>
<div id="event-option"/>
<WhiteSpace/>
<Option onChange={optionChange}/>
......@@ -149,4 +155,4 @@ const Pro = (props) => {
);
};
export default Pro;
export default Process;
import React, {Component} from 'react';
import AddressList from '../../components/AddressList'
import {WingBlank, WhiteSpace} from "antd-mobile";
import React, {useEffect, useState} from 'react';
import {WingBlank, WhiteSpace, ActivityIndicator} 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 (
<div>
111
<WhiteSpace/>
<WingBlank>
<AddressList data={[]}/>
</WingBlank>
<div className='breadBox'>
{title.length > 0 ? title[0].depts : ''}
{/*<span className='currentLink'>科技创新委员会</span>*/}
{/*<span className='symbol'>&gt;</span>*/}
{/*<span>组织架构</span>*/}
{/*<span className='symbol'>&gt;</span>*/}
{/*<span>办公厅</span>*/}
</div>
<div className='adMainBox'>
<AddressCheckbox data={data}/>
</div>
</div>
);
}
}
};
export default SubmitDetail;
......@@ -94,3 +94,8 @@
height: 15px;
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) => {
setLoading(true)
axiosRequest({
method: 'post',
url: '/dgbg/mobileGetWaitDealList.view?userName=2012012099&clientFlag=123456',
url: '/idtAppServiceV6/oApp/getUnDone',
}).then(res => {
setLoading(false);
let result = res.rows ?data.concat(res.rows) : data
setData(result)
setCurrent(current + 1)
let result = res.rows ? data.concat(res.rows) : data;
setData(result);
setCurrent(current + 1);
});
};
......
......@@ -21,7 +21,7 @@ const Work = (props) => {
url: '/idtAppServiceV6/oApp/getAllOperate',
}).then(res => {
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);
setData(result)
});
......
......@@ -8,7 +8,7 @@ import Work from './pages/Work/Work'
import WorkDetail from './pages/Work/WorkDetail'
import Notice from './pages/Notice/Notice'
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 SubmitDetail from './pages/EventProcessing/SubmitDetail'
......@@ -28,16 +28,16 @@ const ReactRouter = () => {
<CommonLayout>
<Route path="/bord/backlog" component={Backlog} />
<Route path="/bord/work" component={Work}/>
<Route path="/bord/addressList/:id" component={Communicate}/>
<Route path="/bord/addressList" component={AddressList}/>
<Route path="/bord/address/:id" component={Communicate}/>
<Route path="/bord/addressList" component={AddressBook}/>
<Route path="/bord/notice" component={Notice}/>
</CommonLayout>
}/>
<Route path="/blank" component={() =>
<BlankLayout>
<Route path="/blank/work/:id" component={WorkDetail}/>
<Route path="/blank/submit/:id" component={SubmitDetail}/>
<Route path="/blank/info/:name/:id" component={Process}/>
<Route path="/blank/submit/:type" component={SubmitDetail}/>
<Route path="/blank/info/:id" component={Process}/>
</BlankLayout>
}/>
<Route component={NoFound}/>
......
......@@ -57,9 +57,9 @@ export const createAPI = (baseURL) => {
// 保存到本地
if (response && response.data && response.data.token) {
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) {
......
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