Commit 1caac495 authored by 熊成伟's avatar 熊成伟

debug

parent ba62a90d
Pipeline #15264 passed with stages
in 55 seconds
This diff is collapsed.
public/img/test/test-2.png

26.1 KB | W: | H:

public/img/test/test-2.png

25.1 KB | W: | H:

public/img/test/test-2.png
public/img/test/test-2.png
public/img/test/test-2.png
public/img/test/test-2.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -8,17 +8,24 @@ const Index = (props) => { ...@@ -8,17 +8,24 @@ const Index = (props) => {
return ( return (
<div className="address-box"> <div className="address-box">
<List> <List>
{data && data.length > 0 && data.map((item, index) => item.XM && ( {data && data.length > 0 && data.map((item, index) => (
<Item key={item.XM} className="sub-checkbox" onChange={(val) => setName(item.XM, val.target.checked)}> <div>
<div> <div className="sub-title">
<img alt="" src="" className=""/> {item.DEPTNAME}
{item.XM || ''} </div>
</div> {item.childrenUser && item.childrenUser.map((child, index) => (
<div className="address-user"> <Item key={child.XM} className="sub-checkbox" onChange={(val) => setName(child.XM, val.target.checked)}>
<img alt="" className='smallIco mr-5' src='/img/tel.png' /> <div>
{item.YDDH || '无'} <img alt="" src="" className=""/>
</div> {child.XM || ''}
</Item> </div>
<div className="address-user">
<img alt="" className='smallIco mr-5' src='/img/tel.png' />
{child.YDDH || '无'}
</div>
</Item>
))}
</div>
))} ))}
</List> </List>
......
...@@ -19,3 +19,7 @@ ...@@ -19,3 +19,7 @@
.address-phone{ .address-phone{
color: rgba(0, 0, 0, 1) !important; color: rgba(0, 0, 0, 1) !important;
} }
.sub-title{
padding: 10px;
border-bottom: 1px solid rgba(239, 239, 239, 1);
}
...@@ -16,16 +16,16 @@ class Index extends PureComponent { ...@@ -16,16 +16,16 @@ class Index extends PureComponent {
this.visibleChange(false) this.visibleChange(false)
} }
render() { render() {
const {type} = this.props; const {type, data} = this.props;
const {visible} = this.state const {visible} = this.state
return ( return (
<div className={`adjunct-card ${type ? 'adjunct-word' : 'adjunct-pdf'}`}> <div className={`adjunct-card ${type ? 'adjunct-word' : 'adjunct-pdf'}`}>
<div className="adjunct-title"> <div className="adjunct-title">
<img alt="" src={type ? '/img/test/test-2.png' : '/img/test/test.png'} className="adjunct-img"/> <img alt="" src={type ? '/img/test/test-2.png' : '/img/test/test.png'} className="adjunct-img"/>
<div> <div className="adjunct-content">
<p className="adjunct-title-1">武汉考察注意政策</p> <p className="adjunct-title-1">{data.FILENAME}</p>
<p className="adjunct-title-2">科技创新委员会</p> <p className="adjunct-title-2">{data.DEPTNAME}</p>
</div> </div>
</div> </div>
<Popover <Popover
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
.adjunct-title{ .adjunct-title{
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center;
} }
.adjunct-img{ .adjunct-img{
width: 33px; width: 33px;
...@@ -32,3 +33,7 @@ ...@@ -32,3 +33,7 @@
font-size:11px; font-size:11px;
color:rgba(152,152,152,1); color:rgba(152,152,152,1);
} }
.adjunct-content{
flex: 1;
//width: 240px;
}
...@@ -4,16 +4,13 @@ import './index.less' ...@@ -4,16 +4,13 @@ import './index.less'
const Index = (props) => { const Index = (props) => {
return ( return (
<div className="auto-list-card"> <div className="auto-list-card">
{props.title && ( {props.listData && props.listData.map((item, index) => (
<div className="auto-list-item auto-list-item-title">{props.title}</div>
)}
{props.listData.map((item, index) => (
<div key={index} className={`auto-list-item ${item.line ? 'auto-list-item-line-feed' : 'auto-list-item-line'}`}> <div key={index} className={`auto-list-item ${item.line ? 'auto-list-item-line-feed' : 'auto-list-item-line'}`}>
<div className="auto-list-title"> <div className="auto-list-title">
{item.title} {item.title}
</div> </div>
<div className="auto-list-content"> <div className="auto-list-content">
{item.content} {item.content || ''}
</div> </div>
</div> </div>
))} ))}
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
padding: 5px 15px; padding: 5px 15px;
min-height: 43px; min-height: 43px;
background: #ffffff; background: #ffffff;
margin-bottom: 1px; border-bottom: 1px solid rgba(248, 248, 248, 1);
//margin-bottom: 1px !important;
} }
.auto-list-card > .auto-list-item:first-child{ .auto-list-card > .auto-list-item:first-child{
border-radius: 6px 6px 0 0; border-radius: 6px 6px 0 0;
...@@ -35,7 +36,7 @@ ...@@ -35,7 +36,7 @@
min-width: 100px; min-width: 100px;
} }
.auto-list-content{ .auto-list-content{
padding: 10px 18px; padding: 10px 0;
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
} }
import React from 'react'; import React from 'react';
import './index.less' import './index.less'
const data = [{}, {}, {}, {s: '1'}, {s: '111', result: '11111'}]
const Index = (props) => { const Index = (props) => {
const {data} = props
return ( return (
<div className="auto-step"> <div className="auto-step">
<ul className="auto-step-card"> <ul className="auto-step-card">
{ {
data.map((item, index) => ( data.map((item, index) => (
<li className="auto-step-item" key={index}> <li className="auto-step-item" key={index}>
<div className={`auto-step-item-title ${item.s ? 'step-current' : 'step-success'}`}> <div className={`auto-step-item-title ${index === data.length -1 ? 'step-current' : 'step-success'}`}>
<div className="auto-step-item-title-name">发起申请(拟稿)</div> <div className="auto-step-item-title-name">{item.FLOW_ALIASED}</div>
</div> </div>
<div className={`auto-step-content ${item.s ? '' : 'step-success'}`}> <div className={`auto-step-content ${item.s ? '' : 'step-success'}`}>
<div className="step-content-wrapper"> <div className="step-content-wrapper">
<div className="auto-step-content-flow"> <div className="auto-step-content-flow">
<div className="auto-step-content-head"> <div className="auto-step-content-head">
<img src="/img/test/test-2.png" alt="" className="step-content-head-img"/> <img src="/img/test/test-2.png" alt="" className="step-content-head-img"/>
<span>赵依安</span> <span>{item.FROMUSER_ALIASED}</span>
</div> </div>
<span>2020-04-09 08:44:36</span> <div className="pos-center">{item.SENDDATE}</div>
</div> </div>
{item.result && ( {item.result && (
<div className="auto-step-content-result"> <div className="auto-step-content-result">
......
...@@ -48,14 +48,14 @@ ...@@ -48,14 +48,14 @@
content: ''; content: '';
display: block; display: block;
width: 1px; width: 1px;
min-height: 90px; min-height: 80px;
background-color: rgba(34, 192, 100, 1); background-color: rgba(34, 192, 100, 1);
} }
.auto-step-content::before{ .auto-step-content::before{
content: ''; content: '';
display: block; display: block;
width: 1px; width: 1px;
min-height: 90px; min-height: 80px;
background-color: rgba(228, 228, 228, 1); background-color: rgba(228, 228, 228, 1);
} }
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
} }
.auto-step-content-head{ .auto-step-content-head{
display: flex; display: flex;
align-items: flex-start; align-items: center;
} }
.step-content-head-img{ .step-content-head-img{
width: 30px; width: 30px;
...@@ -92,4 +92,7 @@ ...@@ -92,4 +92,7 @@
padding: 0 15px; padding: 0 15px;
} }
.pos-center{
display: flex;
align-items: center;
}
import React, {useState, useEffect} from 'react'; import React, {useState, useEffect} from 'react';
import './index.less' import './index.less'
const CardItem = (props) => { const CardItem = (props) => {
const {data, addStatus, type, addCommon, iconAction, workUrl} = props; const {data, addStatus, type, addCommon, iconAction, workUrl} = props;
......
...@@ -11,8 +11,6 @@ body { ...@@ -11,8 +11,6 @@ body {
html, html,
body, body,
#root { #root {
position: fixed;
top: 0; left: 0;right: 0; bottom: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
margin: 0; margin: 0;
......
...@@ -6,21 +6,20 @@ import './index.less' ...@@ -6,21 +6,20 @@ import './index.less'
const CommonLayout = (props) => { const CommonLayout = (props) => {
const resize = (defaultH) => { const resize = (defaultH) => {
const scrollHeight = document.body.scrollHeight; const innerHeight = window.innerHeight;
const footer = document.getElementById("footer"); const footer = document.getElementById("footer");
const content = document.getElementById("common-content") const content = document.getElementById("common-content")
if (footer) { if (footer) {
if (defaultH > scrollHeight) { if (defaultH > innerHeight) {
footer.classList.remove('footer'); footer.classList.remove('footer');
footer.classList.add('footer-static') footer.classList.add('footer-static')
}else { }else {
footer.classList.add('footer') footer.classList.add('footer')
footer.classList.remove('footer-static'); footer.classList.remove('footer-static');
} }
} }
if (content) { if (content) {
if (defaultH > scrollHeight) { if (defaultH > innerHeight) {
content.classList.remove('common-layout-content'); content.classList.remove('common-layout-content');
content.classList.add('common-layout-content-static'); content.classList.add('common-layout-content-static');
}else { }else {
...@@ -33,17 +32,16 @@ const CommonLayout = (props) => { ...@@ -33,17 +32,16 @@ const CommonLayout = (props) => {
}; };
useEffect(() => { useEffect(() => {
const defaultH = document.body.scrollHeight; const defaultH = window.innerHeight;
window.addEventListener('resize', () => resize(defaultH)); window.addEventListener('resize', () => resize(defaultH));
return () => window.removeEventListener('resize', resize); return () => window.removeEventListener('resize', resize);
}, []) }, [])
return ( return (
<div> <div>
<div id="common-content" className="common-layout-content"> <div id="common-content" className="common-layout-content" >
<div> <div>
{props.children} {props.children}
</div> </div>
</div> </div>
<Footer {...props}/> <Footer {...props}/>
</div> </div>
......
.common-layout-content{ .common-layout-content{
position: fixed; padding-bottom: 10px;
top: 0;left: 0;right: 0;bottom: 50px; margin-bottom: 50px;
overflow: auto;
padding-bottom: 10px
} }
.common-layout-content-static{ .common-layout-content-static{
position: fixed; padding-bottom: 10px;
top: 0;left: 0;right: 0;bottom: 10px; margin-bottom: 10px;
overflow: auto;
} }
.footer-tab-icon{ .footer-tab-icon{
......
import React, {useState, useEffect} from 'react'; import React, {useState, useEffect} from 'react';
import {WhiteSpace, WingBlank, ActivityIndicator, Toast} from 'antd-mobile' import {WhiteSpace, WingBlank, ActivityIndicator} from 'antd-mobile'
import TodoCard from '../../components/LogCard' import TodoCard from '../../components/LogCard'
import TopSearch from '../../components/TopSearch'; import TopSearch from '../../components/TopSearch';
import axiosRequest from '../../utils/request'; import axiosRequest from '../../utils/request';
import Document from 'react-document-title' import Document from 'react-document-title'
import Empty from '../Empty' import Empty from '../Empty'
import useDebounce from '../../useHooks/useDebounce'
const Backlog = (props) => { const Backlog = (props) => {
const [start, setStart] = useState(true);
const [endT, setEndT] = useState(false);
const [t, setT] = useState(false)
useEffect(() => {
setT(true)
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getUnDone',
body: {nowPage: 1, pageSize: 10},
}).then(res => {
setT(false);
setStart(false)
let result = end && res.rows ? data.concat(res.rows) : data;
res.rows && res.rows.length >= 10 && setCurrent(1);
setEnd(res.rows && res.rows.length >= 10)
setData(result);
});
}, [])
const [current, setCurrent] = useState(0); const [current, setCurrent] = useState(0);
const [searchWord, setSearchWord] = useState() const [searchWord, setSearchWord] = useState();
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
...@@ -28,7 +46,7 @@ const Backlog = (props) => { ...@@ -28,7 +46,7 @@ const Backlog = (props) => {
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
let result = end && res.rows ? data.concat(res.rows) : data; let result = end && res.rows ? data.concat(res.rows) : data;
res.rows && res.rows.length >= 10 ? setCurrent(current + 1) : Toast.info('当前是最后一页', 1); res.rows && res.rows.length >= 10 ? setCurrent(current + 1) : setEndT(true);
setEnd(res.rows && res.rows.length >= 10) setEnd(res.rows && res.rows.length >= 10)
setData(result); setData(result);
}); });
...@@ -36,24 +54,24 @@ const Backlog = (props) => { ...@@ -36,24 +54,24 @@ const Backlog = (props) => {
//下拉加载 //下拉加载
const [end, setEnd] = useState(true); const [end, setEnd] = useState(true);
const handleScroll = useDebounce(() => { const handleScroll =() => {
const event = document.getElementById("common-content") let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
const top = event.scrollTop; let clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
const scrollHeight = event.scrollHeight; let scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
const clientHeight = event.clientHeight;
if (top + clientHeight === scrollHeight) { console.log(scrollTop, scrollHeight, clientHeight, scrollTop + clientHeight === scrollHeight)
if(scrollHeight > clientHeight && scrollTop + clientHeight === scrollHeight) {
getData() getData()
} }
}, 500) }
useEffect(() => { useEffect(() => {
window.addEventListener('scroll', handleScroll, true); window.addEventListener('touchmove', handleScroll, true);
return () => window.removeEventListener('scroll', handleScroll, true); return () => window.removeEventListener('touchmove', handleScroll, true);
}, [data]); }, [data]);
//回到顶部 //回到顶部
useEffect(() => { useEffect(() => {
const element = document.getElementById('common-content') window.scrollTo(0, 0)
element.scrollTo(0, 0)
}, []) }, [])
const wordSearch = val => { const wordSearch = val => {
...@@ -61,28 +79,40 @@ const Backlog = (props) => { ...@@ -61,28 +79,40 @@ const Backlog = (props) => {
getData() getData()
}; };
useEffect(() => { useEffect(() => {
getData() !start && getData()
}, [searchWord]); }, [searchWord]);
console.log(loading)
return ( return (
<Document title="待办"> <Document title="待办">
<WingBlank> <WingBlank>
<ActivityIndicator <ActivityIndicator
toast toast
text="加载中..." text="加载中..."
animating={loading} animating={t}
/> />
<WhiteSpace/> <WhiteSpace/>
<TopSearch onSearch={wordSearch}/> <TopSearch onSearch={wordSearch}/>
{ {
data.length > 0 ? data.map((item, index) => ( !start && (
<div key={index}> data.length > 0 ? data.map((item, index) => (
<WhiteSpace/> <div key={index}>
<TodoCard data={item} onClick={() => checkLog(item.OPERATEID, item.UUID)}/> <WhiteSpace/>
</div> <TodoCard data={item} onClick={() => checkLog(item.OPERATEID, item.UUID)}/>
</div>
)) : <Empty/>
)
)) : <Empty/>
} }
<WhiteSpace/>
{loading && endT && (
<div className="pos-line mb-10">
<ActivityIndicator/>
<WhiteSpace/>
</div>
)}
</WingBlank> </WingBlank>
</Document> </Document>
); );
......
...@@ -8,6 +8,7 @@ import Empty from '../Empty' ...@@ -8,6 +8,7 @@ import Empty from '../Empty'
const AddressBook = (props) => { const AddressBook = (props) => {
const [start, setStart] = useState(true);
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')
...@@ -22,6 +23,7 @@ const AddressBook = (props) => { ...@@ -22,6 +23,7 @@ const AddressBook = (props) => {
method: 'post', method: 'post',
url: '/idtAppServiceV6/oApp/getDeptTree', url: '/idtAppServiceV6/oApp/getDeptTree',
}).then(res => { }).then(res => {
setStart(false)
setLoading(false); setLoading(false);
setData(res) setData(res)
}); });
...@@ -42,9 +44,9 @@ const AddressBook = (props) => { ...@@ -42,9 +44,9 @@ const AddressBook = (props) => {
animating={loading} animating={loading}
/> />
<div className='adMainBox'> <div className='adMainBox'>
{data.length > 0 ? ( { !start && ( data.length > 0 ? (
<AddressList data={data} onCLick={treeClick}/> <AddressList data={data} onCLick={treeClick}/>
): <Empty/>} ): <Empty/>)}
</div> </div>
</div> </div>
......
...@@ -7,6 +7,7 @@ import Empty from '../Empty' ...@@ -7,6 +7,7 @@ import Empty from '../Empty'
const Communicate = (props) => { const Communicate = (props) => {
const [start, setStart] = useState(true);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [data, setData] = useState([]); const [data, setData] = useState([]);
const [title, setTitle] = useState([]) const [title, setTitle] = useState([])
...@@ -18,6 +19,7 @@ const Communicate = (props) => { ...@@ -18,6 +19,7 @@ const Communicate = (props) => {
url: `/idtAppServiceV6/oApp/getSearchAddressBook?deptId=${id}`, url: `/idtAppServiceV6/oApp/getSearchAddressBook?deptId=${id}`,
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
setStart(false)
setData(res.userList) setData(res.userList)
setTitle(res.deptList) setTitle(res.deptList)
}); });
...@@ -40,7 +42,7 @@ const Communicate = (props) => { ...@@ -40,7 +42,7 @@ const Communicate = (props) => {
{title.length > 0 ? title[0].depts : ''} {title.length > 0 ? title[0].depts : ''}
</div> </div>
<div className='adMainBox'> <div className='adMainBox'>
{data.length > 0 ? <AddressUser data={data}/> : <Empty/>} { !start && (data.length > 0 ? <AddressUser data={data}/> : <Empty/>)}
</div> </div>
</div> </div>
......
...@@ -2,34 +2,26 @@ import React from 'react'; ...@@ -2,34 +2,26 @@ import React from 'react';
import List from '../../components/List' import List from '../../components/List'
import AdjunctList from '../../components/Adjunct' import AdjunctList from '../../components/Adjunct'
const da222 = Array.from(new Array(7)).map((_val, i) => ({
id: `name${i}`,
text: `name${i}`,
}));
const Adjunct = (props) => { const Adjunct = (props) => {
// const [data, setData] = useState([]) const {data} = props
const listData = [ const listData = [
{title: '开始时间', content: '文电科'}, // {title: '开始时间', content: '文电科'},
{title: '结束时间', content: '3'}, // {title: '结束时间', content: '3'},
{title: '天数', content: ''}, // {title: '天数', content: ''},
{title: '乘坐交通工具', content: '武汉'}, // {title: '乘坐交通工具', content: '武汉'},
{title: '备注', line: true, content: '函数是也是对象,是一个属性的集合,所以函数下也有属性,也可以自定义属性。当我们创建一个函数时就默认会有一个prototype属性,这个属性是一个对象(属性的集合)。这个东西就是原型---通过调用构造函数而创建的那个对象实例的原型对象。prototype里也有个属性constructor,指向的是函数本身'}, {title: '附件', line: data.length > 0, content:
{title: '附件', line: true, content:
<div> <div>
{da222.map((item, index) => ( {data.length > 0 ? data.map((item, index) => (
<AdjunctList key={index} {...item}/> <AdjunctList key={index} data={item}/>
))} )) : '无'}
</div> </div>
}, },
] ]
return ( return (
<div> <div>
<List <List listData={listData}/>
listData={listData}
/>
</div> </div>
); );
}; };
......
import React 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';
const Basic = (props) => { const Basic = (props) => {
const {data} = props const {data} = props
const personImg = data.map((item, index) => (
<div key={index} className="basic-people-item">
<img className="work-people-img" alt="" src='/img/test/test.png'/>
<div>aaa</div>
</div>
))
const listData = [
{title: '单位(科室)', content: '文电科'},
{title: '人数', content: '3'},
{title: '人员', content: <div className="basic-people-content">{personImg}</div>},
{title: '目的地', content: '武汉'},
{title: '事由', content: '考察'},
];
return ( return (
<div> <div>
<List <List listData={data}/>
title={"6.1日,部门考察工作出差申请"}
listData={listData}
/>
</div> </div>
); );
}; };
......
import React, {useEffect} from 'react'; import React from 'react';
import StepCard from '../../components/StepCard' import StepCard from '../../components/StepCard'
// import axiosRequest from '../../utils/request';
const Flow = (props) => { const Flow = (props) => {
const {data} = props 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([])
// });
}, []);
return ( return (
<div> <div>
<StepCard data={data}/> <StepCard data={data}/>
......
...@@ -10,24 +10,85 @@ import Flow from './Flow'; ...@@ -10,24 +10,85 @@ import Flow from './Flow';
import Option from './Option'; import Option from './Option';
const Process = (props) => { const Process = (props) => {
const [templateId, setTemplateId] = useState();
const [tableId, setTableId] = useState();
const [nodeId, setNodeId] = useState();
useEffect(() => { useEffect(() => {
const {id} = props.match.params const {id} = props.match.params
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: `/idtAppServiceV6/oApp/dispatcher?operateId=${id}`, url: `/idtAppServiceV6/oApp/dispatcher?operateId=${id}&formType=form`,
}).then(res => { }).then(res => {
console.log(res) const keys = res.elementList ? Object.keys(res.elementList) : []
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)
}); });
}, []) }, []);
//获取basic数据
const [basic, setBasic] = useState([]);
const getBasic = uuid => {
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/getData`,
body: {uuid, tableId, templateId}
}).then(res => {
const result = [...basic];
result.map(item => {
item.content = res[item.title]
return null;
});
setBasic(result)
});
}
//获取Flow数据
const [flowData, setFlowData] = useState([]);
const getFlow = uuid => {
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/getFlowList`,
body: {uuid, tableId}
}).then(res => {
setFlowData(res)
});
};
const [loading, setLoading] = useState(false); const [adjunctData, setAdjunctData] = useState([]);
const getAdjunct= uuid => {
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/getFiles`,
body: {uuid, fieldName: 'fj', tableId}
}).then(res => {
setAdjunctData(res)
});
};
// const [button, setButton] = useState({})
const getButton= uuid => {
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/nextNodeList`,
body: {curNodeId: nodeId}
}).then(res => {
console.log(res)
// setAdjunctData(res)
});
};
useEffect(() => {
const {uuid} = props.match.params;
templateId && tableId && getBasic(uuid)
templateId && tableId && getFlow(uuid);
templateId && tableId && getAdjunct(uuid)
getButton()
}, [nodeId]);
// const [tableId, setTableId] = useState()
const [loading, setLoading] = useState(false);
//提交按钮状态 //提交按钮状态
const [disabled, setDisabled] = useState(true) const [disabled, setDisabled] = useState(true);
//提交按钮文字 //提交按钮文字
const [footButton, setFootButton] = useState('确认发送'); const [footButton, setFootButton] = useState('确认发送');
//聚焦 //聚焦
...@@ -84,7 +145,7 @@ const Process = (props) => { ...@@ -84,7 +145,7 @@ const Process = (props) => {
wrapProps, wrapProps,
}, },
(buttonIndex) => { (buttonIndex) => {
buttonIndex < 2 && subUrl(buttonIndex) buttonIndex < BUTTONS.length - 1 && subUrl(buttonIndex)
console.log(buttonIndex) console.log(buttonIndex)
}); });
}; };
...@@ -117,7 +178,12 @@ const Process = (props) => { ...@@ -117,7 +178,12 @@ const Process = (props) => {
useEffect(() => { useEffect(() => {
window.addEventListener('scroll', handleScroll, true); window.addEventListener('scroll', handleScroll, true);
return () => window.removeEventListener('scroll', handleScroll, true); return () => window.removeEventListener('scroll', handleScroll, true);
}, []) }, []);
//回到顶部
useEffect(() => {
window.scrollTo(0, 0)
}, []);
return ( return (
<Document title="待办详情"> <Document title="待办详情">
<div> <div>
...@@ -131,13 +197,13 @@ const Process = (props) => { ...@@ -131,13 +197,13 @@ const Process = (props) => {
<WingBlank> <WingBlank>
<div id="event-basic"/> <div id="event-basic"/>
<WhiteSpace/> <WhiteSpace/>
<Basic data={[]}/> <Basic data={basic}/>
<div id="event-adjunct"/> <div id="event-adjunct"/>
<WhiteSpace/> <WhiteSpace/>
<Adjunct data={[]}/> <Adjunct data={adjunctData}/>
<div id="event-flow"/> <div id="event-flow"/>
<WhiteSpace/> <WhiteSpace/>
<Flow data={[]}/> <Flow data={flowData}/>
<div id="event-option"/> <div id="event-option"/>
<WhiteSpace/> <WhiteSpace/>
<Option onChange={optionChange}/> <Option onChange={optionChange}/>
......
...@@ -5,17 +5,15 @@ import AddressCheckbox from '../../components/AddressList/AddressCheckbox'; ...@@ -5,17 +5,15 @@ import AddressCheckbox from '../../components/AddressList/AddressCheckbox';
const SubmitDetail = (props) => { const SubmitDetail = (props) => {
const [data, setData] = useState([]); const [data, setData] = useState([]);
const [title, setTitle] = useState([]); // const [title, setTitle] = useState([]);
const [disabled, setDisabled] = useState(true); const [disabled, setDisabled] = useState(true);
useEffect(() => { useEffect(() => {
// const {type} = props.match.params // const {type} = props.match.params
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: '/idtAppServiceV6/oApp/getSearchAddressBook?deptId=47c2c44d41ba15fa0141ba8b7cad0006' url: `/idtAppServiceV6/oApp/getLeaders?mobileUse=true&nType=1`,
// url: `/idtAppServiceV6/oApp/getLeaders?mobileUse=true&nType=${type}`,
}).then(res => { }).then(res => {
setData(res.userList) setData(res)
setTitle(res.deptList)
}); });
}, []); }, []);
...@@ -34,14 +32,6 @@ const SubmitDetail = (props) => { ...@@ -34,14 +32,6 @@ const SubmitDetail = (props) => {
} }
return ( return (
<div> <div>
<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'> <div className='adMainBox'>
<AddressCheckbox data={data} setName={checkName}/> <AddressCheckbox data={data} setName={checkName}/>
</div> </div>
......
@import '../../variable.less'; @import '../../variable.less';
#event{ #event{
position: fixed; margin-bottom: 50px;
top: 44px;
left: 0;right: 0; bottom: 50px;
overflow: auto;
padding-bottom: 340px; padding-bottom: 340px;
} }
.event-footer{ .event-footer{
...@@ -106,3 +103,7 @@ ...@@ -106,3 +103,7 @@
border-color: @primary !important; border-color: @primary !important;
background: @primary !important; background: @primary !important;
} }
.am-action-sheet-button-list-item .am-action-sheet-cancel-button{
color: red;
}
...@@ -5,16 +5,37 @@ import TopNotice from '../../components/NoticeTab' ...@@ -5,16 +5,37 @@ import TopNotice from '../../components/NoticeTab'
import axiosRequest from '../../utils/request'; import axiosRequest from '../../utils/request';
import Document from 'react-document-title' import Document from 'react-document-title'
import Empty from '../Empty' import Empty from '../Empty'
import useDebounce from '../../useHooks/useDebounce' // import useDebounce from '../../useHooks/useDebounce'
const Notice = (props) => { const Notice = (props) => {
const [loading, setLoading] = useState(false); const [start, setStart] = useState(true);
const [endT, setEndT] = useState(false);
const [t, setT] = useState(false)
useEffect(() => {
setT(true)
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getUnDone',
body: {nowPage: 1, pageSize: 10},
}).then(res => {
setT(false);
setStart(false)
let result = end && res.rows ? data.concat(res.rows) : data;
res.rows && res.rows.length >= 10 && setCurrent(1);
setEnd(res.rows && res.rows.length >= 10)
setData(result);
});
}, [])
const [current, setCurrent] = useState(0); const [current, setCurrent] = useState(0);
const [searchWord, setSearchWord] = useState() const [searchWord, setSearchWord] = useState();
const [loading, setLoading] = useState(false);
const [data, setData] = useState([]); const [data, setData] = useState([]);
const getData = () => { const getData = () => {
const pageMap ={searchWord, nowPage: current + 1, pageSize: 10, FLAG: tab}; const pageMap ={searchWord, nowPage: current + 1, pageSize: 10};
setLoading(true) setLoading(true)
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
...@@ -23,7 +44,7 @@ const Notice = (props) => { ...@@ -23,7 +44,7 @@ const Notice = (props) => {
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
let result = end && res.rows ? data.concat(res.rows) : data; let result = end && res.rows ? data.concat(res.rows) : data;
res.rows && res.rows.length >= 10 ? setCurrent(current + 1) : Toast.info('当前是最后一页', 1); res.rows && res.rows.length >= 10 ? setCurrent(current + 1) : setEndT(true);
setEnd(res.rows && res.rows.length >= 10) setEnd(res.rows && res.rows.length >= 10)
setData(result); setData(result);
}); });
...@@ -31,18 +52,18 @@ const Notice = (props) => { ...@@ -31,18 +52,18 @@ const Notice = (props) => {
//下拉加载 //下拉加载
const [end, setEnd] = useState(true) const [end, setEnd] = useState(true)
const handleScroll = useDebounce(() => { const handleScroll = () => {
const event = document.getElementById("common-content") let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
const top = event.scrollTop; let clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
const scrollHeight = event.scrollHeight; let scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
const clientHeight = event.clientHeight;
if (top + clientHeight === scrollHeight) { if(scrollHeight > clientHeight && scrollTop + clientHeight === scrollHeight) {
getData() getData()
} }
}, 500) }
useEffect(() => { useEffect(() => {
window.addEventListener('scroll', handleScroll, true); window.addEventListener('touchmove', handleScroll, true);
return () => window.removeEventListener('scroll', handleScroll, true); return () => window.removeEventListener('touchmove', handleScroll, true);
}, [data]); }, [data]);
const checkLog = () => { const checkLog = () => {
...@@ -51,8 +72,7 @@ const Notice = (props) => { ...@@ -51,8 +72,7 @@ const Notice = (props) => {
//回到顶部 //回到顶部
useEffect(() => { useEffect(() => {
const element = document.getElementById('common-content') window.scrollTo(0, 0)
element.scrollTo(0, 0)
}, []); }, []);
//tab已读未读切换 //tab已读未读切换
...@@ -86,19 +106,29 @@ const Notice = (props) => { ...@@ -86,19 +106,29 @@ const Notice = (props) => {
<ActivityIndicator <ActivityIndicator
toast toast
text="加载中..." text="加载中..."
animating={loading} animating={t}
/> />
<WhiteSpace/> <WhiteSpace/>
<TopNotice onSearch={setSearchWord} tabChange={tabChange}/> <TopNotice onSearch={setSearchWord} tabChange={tabChange}/>
{ {
data.length > 0 ? data.map((item, index) => ( !start && (
<div key={index}> data.length > 0 ? data.map((item, index) => (
<WhiteSpace/> <div key={index}>
<TodoCard data={item} onClick={checkLog}/> <WhiteSpace/>
</div> <TodoCard data={item} onClick={checkLog}/>
</div>
)) : <Empty/> )) : <Empty/>
)
} }
<WhiteSpace/>
{loading && endT && (
<div className="pos-line mb-10">
<ActivityIndicator/>
<WhiteSpace/>
</div>
)}
</WingBlank> </WingBlank>
</Document> </Document>
); );
......
...@@ -7,6 +7,7 @@ import Document from 'react-document-title' ...@@ -7,6 +7,7 @@ import Document from 'react-document-title'
import Empty from '../Empty' import Empty from '../Empty'
const Work = (props) => { const Work = (props) => {
const [start, setStart] = useState(true);
const [loading, setLoading] = useState(false) const [loading, setLoading] = useState(false)
const [addStatus, setAddStatus] = useState(false); const [addStatus, setAddStatus] = useState(false);
const [operates, setOperates] = useState([]); const [operates, setOperates] = useState([]);
...@@ -23,6 +24,7 @@ const Work = (props) => { ...@@ -23,6 +24,7 @@ const Work = (props) => {
url: '/idtAppServiceV6/oApp/getAllOperate', url: '/idtAppServiceV6/oApp/getAllOperate',
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
setStart(false)
const result = res ? res.map(item => ({ icon: '', text: item.nodeName })) : [] const result = res ? res.map(item => ({ icon: '', text: item.nodeName })) : []
setOperates(result); setOperates(result);
setData(result) setData(result)
...@@ -53,7 +55,7 @@ const Work = (props) => { ...@@ -53,7 +55,7 @@ const Work = (props) => {
// }; // };
const workUrl = (url) => { const workUrl = (url) => {
props.history.push(url) // props.history.push(url)
} }
return ( return (
...@@ -67,7 +69,7 @@ const Work = (props) => { ...@@ -67,7 +69,7 @@ const Work = (props) => {
<WhiteSpace/> <WhiteSpace/>
<TopSearch onSearch={ workSearch }/> <TopSearch onSearch={ workSearch }/>
<WhiteSpace/> <WhiteSpace/>
{data.length > 0 ? ( { !start && (data.length > 0 ? (
<WorkCard <WorkCard
title="工作详情" title="工作详情"
addCommon={ commonEdit } addCommon={ commonEdit }
...@@ -76,7 +78,7 @@ const Work = (props) => { ...@@ -76,7 +78,7 @@ const Work = (props) => {
workUrl={workUrl} workUrl={workUrl}
iconAction={ itemAdd } iconAction={ itemAdd }
/> />
) : <Empty/>} ) : <Empty/>)}
</WingBlank> </WingBlank>
</Document> </Document>
......
...@@ -8,9 +8,27 @@ import Empty from '../Empty' ...@@ -8,9 +8,27 @@ import Empty from '../Empty'
import useDebounce from '../../useHooks/useDebounce' import useDebounce from '../../useHooks/useDebounce'
const WorkDetail = (props) => { const WorkDetail = (props) => {
const [loading, setLoading] = useState(false); const [start, setStart] = useState(true);
useEffect(() => {
setLoading(true)
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/getUnDone',
body: {nowPage: 1, pageSize: 10},
}).then(res => {
setLoading(false);
setStart(false)
let result = end && res.rows ? data.concat(res.rows) : data;
res.rows && res.rows.length >= 10 && setCurrent(1);
setEnd(res.rows && res.rows.length >= 10)
setData(result);
});
}, [])
const [current, setCurrent] = useState(0); const [current, setCurrent] = useState(0);
const [searchWord, setSearchWord] = useState() const [searchWord, setSearchWord] = useState();
const [loading, setLoading] = useState(false);
const [data, setData] = useState([]); const [data, setData] = useState([]);
const getData = () => { const getData = () => {
...@@ -32,11 +50,11 @@ const WorkDetail = (props) => { ...@@ -32,11 +50,11 @@ const WorkDetail = (props) => {
//下拉加载 //下拉加载
const [end, setEnd] = useState(true) const [end, setEnd] = useState(true)
const handleScroll = useDebounce(() => { const handleScroll = useDebounce(() => {
const event = document.getElementById("work-content") let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
const top = event.scrollTop; let clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
const scrollHeight = event.scrollHeight; let scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
const clientHeight = event.clientHeight;
if (top + clientHeight === scrollHeight) { if(scrollHeight > clientHeight && scrollTop + clientHeight === scrollHeight) {
getData() getData()
} }
}, 500) }, 500)
...@@ -91,13 +109,16 @@ const WorkDetail = (props) => { ...@@ -91,13 +109,16 @@ const WorkDetail = (props) => {
<WhiteSpace/> <WhiteSpace/>
<TopNotice onSearch={setSearchWord} tabChange={tabChange}/> <TopNotice onSearch={setSearchWord} tabChange={tabChange}/>
{ {
data.length > 0 ? data.map((item, index) => ( !start && (
<div key={index}> data.length > 0 ? data.map((item, index) => (
<WhiteSpace/> <div key={index}>
<TodoCard data={item} onClick={checkLog}/> <WhiteSpace/>
</div> <TodoCard data={item} onClick={checkLog}/>
</div>
)) : <Empty/>
)
)) : <Empty/>
} }
</WingBlank> </WingBlank>
</div> </div>
......
...@@ -16,8 +16,6 @@ import Login from './pages/Login' ...@@ -16,8 +16,6 @@ import Login from './pages/Login'
import NoFound from './pages/NoFound' import NoFound from './pages/NoFound'
const ReactRouter = () => { const ReactRouter = () => {
return ( return (
<Router> <Router>
...@@ -37,7 +35,7 @@ const ReactRouter = () => { ...@@ -37,7 +35,7 @@ const ReactRouter = () => {
<BlankLayout> <BlankLayout>
<Route path="/blank/work/:id" component={WorkDetail}/> <Route path="/blank/work/:id" component={WorkDetail}/>
<Route path="/blank/submit/:type" component={SubmitDetail}/> <Route path="/blank/submit/:type" component={SubmitDetail}/>
<Route path="/blank/info/:id/:UUID" component={Process}/> <Route path="/blank/info/:id/:uuid" component={Process}/>
</BlankLayout> </BlankLayout>
}/> }/>
<Route component={NoFound}/> <Route component={NoFound}/>
......
...@@ -58,8 +58,12 @@ export const createAPI = (baseURL) => { ...@@ -58,8 +58,12 @@ export const createAPI = (baseURL) => {
}, conf.opts)) }, conf.opts))
.then(function (response) { .then(function (response) {
response = response.data; response = response.data;
console.log(response)
if (!response || !response.data) { console.log('response出错, 无返回数据!', response); return false; }; if (!response || !response.data) {
window.location.href = '/login'
console.log('response出错, 无返回数据!', response); return false;
};
if (response.data && response.data.errorMessage) { if (response.data && response.data.errorMessage) {
Toast.fail(response.data.errorMessage); Toast.fail(response.data.errorMessage);
return false; return false;
......
@primary: #0185FB; @primary: #0185FB;
@grayLight:rgba(0,0,0,0.12); @grayLight:rgba(0,0,0,0.12);
/* http://meyerweb.com/eric/tools/css/reset/ /* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126 v2.0 | 20110126
License: none (public domain) License: none (public domain)
*/ */
...@@ -14,8 +14,8 @@ b, u, i, center, ...@@ -14,8 +14,8 @@ b, u, i, center,
dl, dt, dd, ol, ul, li, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup, figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary, menu, nav, output, ruby, section, summary,
time, mark, audio, video { time, mark, audio, video {
margin: 0; margin: 0;
...@@ -26,7 +26,7 @@ time, mark, audio, video { ...@@ -26,7 +26,7 @@ time, mark, audio, video {
vertical-align: baseline; vertical-align: baseline;
} }
/* HTML5 display-role reset for older browsers */ /* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section { footer, header, hgroup, menu, nav, section {
display: block; display: block;
} }
...@@ -81,4 +81,4 @@ table { ...@@ -81,4 +81,4 @@ table {
.icon18{ .icon18{
width:18px; width:18px;
height: 18px; height: 18px;
} }
\ No newline at end of file
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