Commit 859e624b authored by 熊成伟's avatar 熊成伟

debug

parent 922bdc3c
Pipeline #15518 passed with stages
in 57 seconds
......@@ -8,7 +8,7 @@ const ParentAddress = (props) => {
<div className="address-box">
{data && data.length > 0 && data.map((item, index) => (
<div key={index}>
<div onClick={() => onClick(item.ID, item.HASUSER)} className="address-item address-title">
<div onClick={() => onClick(item.ID, item.HASUSER, item.NAME)} className="address-item address-title">
{item.NAME || ''}
<img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/>
</div>
......
import React from 'react';
// import moment from 'moment'
import './index.less'
const Index = (props) => {
const {data} = props
return (
<div className="todo-card" onClick={props.onClick}>
<div className="todo-title pos-aline">
<div className="pos-aline">
<div className="todo-tag pos-aline">
{props.name}
</div>
<p>{data.BT}</p>
</div>
<span>
<img
alt=""
className="todo-read-png"
src={props.data && props.data.FLAG === 'D' ? '/img/read.png' : '/img/unread.png'}
/>
</span>
</div>
<div className="todo-content">
<p>当前状态:{data.BLLX}</p>
<p style={{marginTop: 15}}>发送人员:{data.FROMUSER_ALIASED}</p>
</div>
<div className="todo-footer">
<div>
<p className="pos-aline"><img alt="" src="/img/time.png" className="footer-mes-img"/>更新时间:{data.JZRQ}</p>
<p className="pos-aline footer-mes-sec"><img alt="" src="/img/time-2.png" className="footer-mes-img"/>发起时间:{data.SWRQ}</p>
</div>
{props.data && props.data.JJCD !=='无' && (
<img
alt=""
className="todo-footer-img"
src={props.data && props.data.JJCD ==='紧急' ? '/img/serious.png' : '/img/urgency.png'}
/>
)}
</div>
</div>
);
};
export default Index;
import React, {useState} from 'react';
import {Tabs, Icon} from 'antd-mobile'
import './index.less'
const Index = (props) => {
const {tabChange} = props;
const [status, setStatus] = useState(false);
const topSearch = () => {
const input = document.getElementsByClassName("top-single-search");
let inputValue = input[0].value;
setStatus(inputValue != null && inputValue !== '')
};
const enterPress = (e) => {
const input = document.getElementsByClassName("top-single-search");
if (e.keyCode === 13) {
props.onSearch(input[0].value);
}
}
const clear = () => {
setStatus(false)
const input = document.getElementsByClassName("top-single-search");
input[0].value = null;
input[0].focus();
props.onSearch('');
}
return (
<div className="pos-line">
<div className="search-notice-box">
<Icon type="search" size="xs" className="search-svg"/>
<input onChange={topSearch} onKeyDown={enterPress} className="top-single-search" placeholder="请输入关键字搜索" />
{status && (
<Icon type="cross-circle-o" color="rgba(35, 35, 35, 0.3)" size="xxs" className="clear-svg" onClick={clear}/>
)}
</div>
<div className="search-tab">
<Tabs
renderTabBar={props => <Tabs.DefaultTabBar {...props} page={3} />}
tabs={props.tabs}
initialPage={'1'}
onChange={(tab, index) => tabChange(tab.sub)}
/>
</div>
</div>
);
};
export default Index;
......@@ -10,7 +10,7 @@ const CardItem = (props) => {
}, [addStatus])
const contentCLick = () => {
!status && !data.iconAdd && data.text && workUrl(`/blank/work/${data.type}`)
!status && !data.iconAdd && data.text && workUrl(`/blank/work/${data.id}/${data.text}`)
data.iconAdd && addCommon()
};
const iconClick = () => {
......
......@@ -22,8 +22,8 @@ const AddressBook = (props) => {
});
}, []);
const moveParent = (pId, HASUSER) => {
props.history.push(`/bord/address/${pId}/${HASUSER}`)
const moveParent = (pId, HASUSER, parent) => {
props.history.push(`/bord/address/${pId}/${HASUSER}/${parent}`)
}
return (
......
......@@ -6,13 +6,14 @@ import axiosRequest from '../../utils/request';
import Skeleton from '../../components/Skeleton'
import './index.less'
import Empty from '../Empty'
import {WhiteSpace} from "antd-mobile";
const NewPage = (props) => {
const [loading, setLoading] = useState(false);
const [data, setData] = useState([]);
const {pId, HASUSER} = props.match.params;
const {pId, HASUSER, parent} = props.match.params;
useEffect(() => {
setLoading(true);
......@@ -27,13 +28,25 @@ const NewPage = (props) => {
}, [pId]);
const moveParent = (pId, HASUSER) => {
props.history.push(`/bord/address/${pId}/${HASUSER}`)
const moveParent = (pId, HASUSER, name) => {
const next = parent + ',' + name;
props.history.push(`/bord/address/${pId}/${HASUSER}/${next}`)
};
const [title, setTitle] = useState([]);
useEffect(() => {
setTitle(parent.split(','))
}, [parent])
return (
<Document title="通讯录">
<div>
<div className="communicate-title">
{title.map((item, index) => (
<span key={index} className={index === 0 ? 'title-common title-select' : 'title-common'}>{item} {index !== title.length -1 && '>'}</span>
))}
</div>
<WhiteSpace/>
<div className='adMainBox'>
{loading ? <Skeleton/> : ( data.length > 0 ? (
HASUSER === 'true' ? <ChildAddress data={data}/> :<ParentAddress data={data} onClick={moveParent}/>
......
......@@ -64,3 +64,15 @@
margin-bottom: -4px;
}
}
.title-select{
color: @primary;
}
.title-common{
margin-right: 5px;
}
.communicate-title{
padding: 10px 15px;
font-size: 13px;
background: #ffffff;
}
......@@ -17,11 +17,9 @@ const Process = (props) => {
const [templateId, setTemplateId] = useState();
const [tableId, setTableId] = useState();
const [nodeId, setNodeId] = useState();
const [operateId, setOperateId] = useState();
// const [operateId, setOperateId] = useState();
const [flowTbId, setFlowTbId] = useState();
console.log(operateId)
//回到顶部
useEffect(() => {
window.scrollTo(0, 0)
......@@ -32,14 +30,21 @@ const Process = (props) => {
setFlowTbId(FLOWTBID);
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/dispatcher?operateId=${id}&formType=form`,
url: `/idtAppServiceV6/oApp/dispatcher`,
body: {
operateId: id,
formType: 'form',
uuid,
mobileSign: 1
}
}).then(res => {
const keys = res.elementList ? Object.keys(res.elementList) : []
setBasic(res.elementList ? keys.map(item => ({title: item})) : [])
const keys = res.elementList ? Object.keys(res.elementList) : [];
console.log(keys);
setBasic(res.elementList ? keys.map(item => ({title: item})) : []);
setTableId(res.table && res.table.tableId);
setTemplateId(res.property && res.property.templateId);
setNodeId(res.property && res.property.curNodeId);
setOperateId(res.property && res.property.operateId);
// setOperateId(res.property && res.property.operateId);
});
}, []);
......@@ -123,10 +128,10 @@ const Process = (props) => {
}
}, [basic]);
const [blyj, setBlyj] = useState();
console.log(blyj)
// const [blyj, setBlyj] = useState();
// console.log(blyj)
const optionChange = val => {
setBlyj(val)
// setBlyj(val)
setDisabled(!(val != null && val !== ''))
};
......@@ -171,7 +176,7 @@ const Process = (props) => {
},
(buttonIndex) => {
buttonIndex < BUTTONS.length - 1 && subUrl(buttonIndex)
console.log(buttonIndex)
// console.log(buttonIndex)
});
};
const subUrl = key => {
......@@ -206,18 +211,13 @@ const Process = (props) => {
const top = document.documentElement.scrollTop || document.body.scrollTop;
let clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
let scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
console.log(top)
if (top >= basic && top < adjunct) {
console.log('basic');
setCurrent('basic')
}else if (top >= adjunct - basic && top < flow) {
console.log('adjunct');
setCurrent('adjunct')
}else if (top >= flow - basic && top < option) {
console.log('flow');
setCurrent('flow')
}else if (top >= option - basic) {
console.log('option');
setCurrent('option')
}
if (top + clientHeight === scrollHeight) {
......
......@@ -54,8 +54,8 @@ const Notice = (props) => {
return () => window.removeEventListener('touchend', handleScroll, true);
}, [data]);
const checkLog = (OPERATEID, UUID) => {
props.history.push(`/blank/info/${OPERATEID}/${UUID}`)
const checkLog = (OPERATEID, UUID, FLOWTBID) => {
props.history.push(`/blank/info/${OPERATEID}/${UUID}/${FLOWTBID}`)
};
//回到顶部
......@@ -98,7 +98,7 @@ const Notice = (props) => {
data.length > 0 ? data.map((item, index) => (
<div key={index}>
<WhiteSpace/>
<TodoCard data={item} onClick={() => checkLog(item.OPERATEID, item.UUID)}/>
<TodoCard data={item} onClick={() => checkLog(item.OPERATEID, item.UUID, item.FLOWTBID)}/>
</div>
)) : <Empty/>
......
......@@ -66,7 +66,7 @@ const Work = (props) => {
// };
const workUrl = (url) => {
// props.history.push(url)
props.history.push(url)
}
return (
......
import React, {useEffect, useState} from 'react';
import {WhiteSpace, WingBlank} from 'antd-mobile'
import TodoCard from '../../components/LogCard'
import TopNotice from '../../components/NoticeTab'
import TodoCard from '../../components/LogCard/WorkCard'
import TopNotice from '../../components/NoticeTab/AutoTab'
import axiosRequest from '../../utils/request';
import Skeleton from '../../components/Skeleton'
import Document from 'react-document-title'
......@@ -9,6 +9,7 @@ import Empty from '../Empty'
import Loading from "../../components/Loading";
const Notice = (props) => {
const {type, name} = props.match.params;
const [start, setStart] = useState(true);
const [end, setEnd] = useState(true)
......@@ -20,21 +21,19 @@ const Notice = (props) => {
const [data, setData] = useState([]);
const getData = (scroll) => {
const {type} = props.match.params
const pageMap ={searchWord, nowPage: current + 1, pageSize: 10, FLAG: tab, bllx: type};
const pageMap ={searchWord, page: current + 1, rows: 10, operateId: tab};
setLoading(true);
scroll && current > 0 && window.scrollTo(0, document.body.scrollHeight)
axiosRequest({
tab && axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getUnDone',
url: '/idtAppServiceV6/oApp/getGridDataList',
body: pageMap,
}).then(res => {
setStart(false);
setEnd(res.rows && res.rows.length >= 10)
setEnd(res.rows && res.rows.length >= 10);
let result = end && res.rows ? data.concat(res.rows) : data;
console.log('end', end, 'result',result, 'res', res)
res.rows && res.rows.length >= 10 && setCurrent(1);
res.rows && res.rows.length >= 10 && setCurrent(current + 1);
current > 0 && res.rows && res.rows.length === 0 && setCurrent(current - 1);
setData(result);
setLoading(false);
});
......@@ -56,8 +55,8 @@ const Notice = (props) => {
return () => window.removeEventListener('touchend', handleScroll, true);
}, [data]);
const checkLog = (OPERATEID, UUID) => {
props.history.push(`/blank/info/${OPERATEID}/${UUID}`)
const checkLog = (OPERATEID, UUID, FLOWTBID) => {
props.history.push(`/blank/info/${OPERATEID}/${UUID}/${FLOWTBID}`)
};
//回到顶部
......@@ -66,7 +65,7 @@ const Notice = (props) => {
}, []);
//tab已读未读切换
const [tab, setTab] = useState('N');
const [tab, setTab] = useState();
const tabChange = val => {
setCurrent(0);
setData([]);
......@@ -80,7 +79,6 @@ const Notice = (props) => {
setEnd(true)
}
useEffect(() => {
//回到顶部
window.scrollTo(0, 0)
getData()
}, [])
......@@ -89,18 +87,24 @@ const Notice = (props) => {
getData(false, [])
}, [searchWord, tab]);
console.log(data.length)
const [tabData, setTabData] = useState([])
useEffect(() => {
const menu = JSON.parse(localStorage.getItem("menu"));
const index = menu.findIndex(item => item.id === type);
const menuG = menu[index].children.map(item => ({title: item.nodeName, sub: item.id}))
setTabData(menuG);
setTab(menu[0].id)
}, []);
return (
<Document title="通知">
<WingBlank>
<WhiteSpace/>
<TopNotice onSearch={tabSearch} tabChange={tabChange}/>
<TopNotice tabs={tabData} onSearch={tabSearch} tabChange={tabChange}/>
{ start ? <div> <WhiteSpace/><Skeleton/><WhiteSpace/><Skeleton/><WhiteSpace/><Skeleton/></div> : ( !start && (
data.length > 0 ? data.map((item, index) => (
<div key={index}>
<WhiteSpace/>
<TodoCard data={item} onClick={() => checkLog(item.OPERATEID, item.UUID)}/>
<TodoCard name={name} data={item} onClick={() => checkLog(tab, item.UUID, item.FLOWTBID)}/>
</div>
)) : <Empty/>
......
......@@ -28,14 +28,14 @@ const ReactRouter = () => {
<Route path="/bord/backlog" component={Backlog}/>
<Route path="/bord/work" component={Work}/>
<Route path="/bord/addressList" component={NewAddress}/>
<Route path="/bord/address/:pId/:HASUSER" component={NewPage}/>
<Route path="/bord/address/:pId/:HASUSER/:parent" component={NewPage}/>
{/*<Route path="/bord/addressList" component={AddressBook}/>*/}
<Route path="/bord/notice" component={Notice}/>
</CommonLayout>
}/>
<Route path="/blank" component={() =>
<BlankLayout>
<Route path="/blank/work/:type" component={WorkDetail}/>
<Route path="/blank/work/:type/:name" component={WorkDetail}/>
<Route path="/blank/submit/:flowNodeId/:uuid/:flowTbId" component={SubmitDetail}/>
<Route path="/blank/info/:id/:uuid/:FLOWTBID" component={Process}/>
</BlankLayout>
......
......@@ -71,7 +71,7 @@ export const createAPI = (baseURL) => {
}
if (response && response.data && response.data.leftOperateBar) {
localStorage.removeItem("menu");
const menu = response.data.leftOperateBar.map(item => ({ icon: item.imgType, text: item.nodeName, type: item.type }))
const menu = response.data.leftOperateBar.map(item => ({ icon: item.imgType, text: item.nodeName, id: item.id, children: item.children }))
menu.length > 0 && localStorage.setItem("menu", JSON.stringify(menu));
}
......
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