Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
h5-communicate
frontend
Commits
db448486
Commit
db448486
authored
Jun 11, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
442c94cc
Pipeline
#15297
passed with stages
in 56 seconds
Changes
22
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
139 additions
and
85 deletions
+139
-85
workspace.xml
.idea/workspace.xml
+0
-0
idt-menu-ico-01.png
public/img/icon/idt-menu-ico-01.png
+0
-0
idt-menu-ico-02.png
public/img/icon/idt-menu-ico-02.png
+0
-0
idt-menu-ico-04.png
public/img/icon/idt-menu-ico-04.png
+0
-0
idt-menu-ico-16.png
public/img/icon/idt-menu-ico-16.png
+0
-0
idt-menu-ico-17.png
public/img/icon/idt-menu-ico-17.png
+0
-0
idt-menu-ico-28.png
public/img/icon/idt-menu-ico-28.png
+0
-0
idt-menu-ico-37.png
public/img/icon/idt-menu-ico-37.png
+0
-0
idt-menu-ico-48.png
public/img/icon/idt-menu-ico-48.png
+0
-0
idt-menu-ico-61.png
public/img/icon/idt-menu-ico-61.png
+0
-0
idt-menu-ico-63.png
public/img/icon/idt-menu-ico-63.png
+0
-0
index.jsx
src/components/Loading/index.jsx
+16
-0
index.less
src/components/Loading/index.less
+38
-0
index.jsx
src/components/LogCard/index.jsx
+1
-1
index.jsx
src/components/Skeleton/index.jsx
+1
-1
CardItem.jsx
src/components/WorkCard/CardItem.jsx
+2
-1
Backlog.jsx
src/pages/Backlog/Backlog.jsx
+7
-7
Communicate.jsx
src/pages/Communicate/Communicate.jsx
+8
-11
Process.jsx
src/pages/EventProcessing/Process.jsx
+19
-20
Notice.jsx
src/pages/Notice/Notice.jsx
+19
-28
Work.jsx
src/pages/Work/Work.jsx
+22
-12
instance.js
src/utils/instance.js
+6
-4
No files found.
.idea/workspace.xml
View file @
db448486
This diff is collapsed.
Click to expand it.
public/img/icon/idt-menu-ico-01.png
0 → 100644
View file @
db448486
36.8 KB
public/img/icon/idt-menu-ico-02.png
0 → 100644
View file @
db448486
30.6 KB
public/img/icon/idt-menu-ico-04.png
0 → 100644
View file @
db448486
48.6 KB
public/img/icon/idt-menu-ico-16.png
0 → 100644
View file @
db448486
25.5 KB
public/img/icon/idt-menu-ico-17.png
0 → 100644
View file @
db448486
33.2 KB
public/img/icon/idt-menu-ico-28.png
0 → 100644
View file @
db448486
25.1 KB
public/img/icon/idt-menu-ico-37.png
0 → 100644
View file @
db448486
24.3 KB
public/img/icon/idt-menu-ico-48.png
0 → 100644
View file @
db448486
34.7 KB
public/img/icon/idt-menu-ico-61.png
0 → 100644
View file @
db448486
24.5 KB
public/img/icon/idt-menu-ico-63.png
0 → 100644
View file @
db448486
24.8 KB
src/components/Loading/index.jsx
0 → 100644
View file @
db448486
import
React
from
'react'
;
import
'./index.less'
const
Index
=
()
=>
{
return
(
<
div
className=
"loading"
>
<
span
/>
<
span
/>
<
span
/>
<
span
/>
<
span
/>
</
div
>
);
};
export
default
Index
;
src/components/Loading/index.less
0 → 100644
View file @
db448486
.loading{
width: 100%;
height: 20px;
margin: 9px auto;
display: flex;
justify-content: center;
}
.loading span{
display: inline-block;
width: 8px;
height: 100%;
border-radius: 4px;
background: rgba(35,35,35,0.13);
-webkit-animation: load 1s ease infinite;
}
@-webkit-keyframes load{
0%,100%{
height: 20px;
background: rgba(35,35,35,0.13);
}
50%{
height: 40px;
margin: -15px 0;
background: rgba(35,35,35,0.1);
}
}
.loading span:nth-child(2){
-webkit-animation-delay:0.2s;
}
.loading span:nth-child(3){
-webkit-animation-delay:0.4s;
}
.loading span:nth-child(4){
-webkit-animation-delay:0.6s;
}
.loading span:nth-child(5){
-webkit-animation-delay:0.8s;
}
src/components/LogCard/index.jsx
View file @
db448486
...
...
@@ -21,7 +21,7 @@ const Index = (props) => {
<
img
alt=
""
className=
"todo-read-png"
src=
{
props
.
data
&&
props
.
data
.
read
?
'/img/read.png'
:
'/img/unread.png'
}
src=
{
props
.
data
&&
props
.
data
.
FLAG
===
'D'
?
'/img/read.png'
:
'/img/unread.png'
}
/>
</
span
>
</
div
>
...
...
src/components/Skeleton/index.jsx
View file @
db448486
import
React
from
'react'
;
import
ContentLoader
,
{
Facebook
}
from
'react-content-loader'
import
ContentLoader
from
'react-content-loader'
import
'./index.less'
const
Index
=
()
=>
{
...
...
src/components/WorkCard/CardItem.jsx
View file @
db448486
...
...
@@ -32,7 +32,8 @@ const CardItem = (props) => {
)
}
<
img
src=
{
data
.
icon
}
className=
"card-content-img-svg"
alt=
""
/>
<
img
src=
{
data
.
icon
?
`/img/icon/${data.icon}.png`
:
"/img/add-work.png"
}
className=
"card-content-img-svg"
alt=
""
/>
</
div
>
<
div
className=
"card-content-title"
>
{
data
.
text
}
...
...
src/pages/Backlog/Backlog.jsx
View file @
db448486
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
WhiteSpace
,
WingBlank
,
ActivityIndicator
}
from
'antd-mobile'
import
{
WhiteSpace
,
WingBlank
}
from
'antd-mobile'
import
TodoCard
from
'../../components/LogCard'
import
TopSearch
from
'../../components/TopSearch'
;
import
Skeleton
from
'../../components/Skeleton'
import
Loading
from
'../../components/Loading'
import
axiosRequest
from
'../../utils/request'
;
import
Document
from
'react-document-title'
import
Empty
from
'../Empty'
...
...
@@ -11,7 +12,6 @@ import './index.less'
const
Backlog
=
(
props
)
=>
{
const
[
start
,
setStart
]
=
useState
(
true
);
const
[
end
,
setEnd
]
=
useState
(
true
)
const
[
endT
,
setEndT
]
=
useState
(
false
);
useEffect
(()
=>
{
//回到顶部
...
...
@@ -26,9 +26,10 @@ const Backlog = (props) => {
const
checkLog
=
(
OPERATEID
,
UUID
)
=>
{
props
.
history
.
push
(
`/blank/info/
${
OPERATEID
}
/
${
UUID
}
`
)
};
const
getData
=
()
=>
{
const
getData
=
(
scroll
)
=>
{
const
pageMap
=
{
searchWord
,
nowPage
:
current
+
1
,
pageSize
:
10
};
setLoading
(
true
);
scroll
&&
current
>
0
&&
window
.
scrollTo
(
0
,
document
.
body
.
scrollHeight
);
axiosRequest
({
method
:
'post'
,
url
:
'/idtAppServiceV6/oApp/getUnDone'
,
...
...
@@ -49,8 +50,7 @@ const Backlog = (props) => {
let
clientHeight
=
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
;
let
scrollHeight
=
document
.
documentElement
.
scrollHeight
||
document
.
body
.
scrollHeight
;
if
(
scrollHeight
>
clientHeight
&&
scrollTop
+
clientHeight
===
scrollHeight
)
{
current
>
0
&&
window
.
scrollTo
(
0
,
document
.
body
.
scrollHeight
);
getData
()
getData
(
true
)
}
}
useEffect
(()
=>
{
...
...
@@ -64,7 +64,6 @@ const Backlog = (props) => {
};
useEffect
(()
=>
{
setStart
(
true
);
setEndT
(
false
)
setData
([])
!
start
&&
getData
()
},
[
searchWord
]);
...
...
@@ -88,7 +87,8 @@ const Backlog = (props) => {
<
WhiteSpace
/>
{
loading
&&
(
<
div
className=
"pos-line content-loading"
>
<
ActivityIndicator
/>
<
Loading
/>
<
WhiteSpace
/>
<
WhiteSpace
/>
</
div
>
)
}
...
...
src/pages/Communicate/Communicate.jsx
View file @
db448486
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
WhiteSpace
}
from
'antd-mobile'
import
AddressUser
from
'../../components/AddressList/AddressUser'
;
import
axiosRequest
from
'../../utils/request'
;
import
{
ActivityIndicator
}
from
"antd-mobile"
;
import
Skeleton
from
'../../components/Skeleton'
import
Document
from
'react-document-title'
import
Empty
from
'../Empty'
...
...
@@ -33,18 +34,14 @@ const Communicate = (props) => {
return
(
<
Document
title=
"通讯录"
>
<
div
>
<
ActivityIndicator
toast
text=
"加载中..."
animating=
{
loading
}
/>
<
div
className=
'breadBox'
>
{
title
.
length
>
0
?
title
[
0
].
depts
:
''
}
</
div
>
<
div
className=
'adMainBox'
>
{
!
start
&&
(
data
.
length
>
0
?
<
AddressUser
data=
{
data
}
/>
:
<
Empty
/>)
}
{
title
&&
title
.
length
>
0
?
title
[
0
].
depts
:
''
}
</
div
>
{
loading
?
<
div
><
WhiteSpace
/><
Skeleton
/></
div
>
:
(
<
div
className=
'adMainBox'
>
{
data
&&
!
start
&&
(
data
.
length
>
0
?
<
AddressUser
data=
{
data
}
/>
:
<
Empty
/>)
}
</
div
>
)
}
</
div
>
</
Document
>
...
...
src/pages/EventProcessing/Process.jsx
View file @
db448486
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
Document
from
'react-document-title'
import
{
WingBlank
,
WhiteSpace
,
ActionSheet
,
ActivityIndicator
}
from
'antd-mobile'
import
{
WingBlank
,
WhiteSpace
,
ActionSheet
}
from
'antd-mobile'
import
axiosRequest
from
'../../utils/request'
;
import
TopTabs
from
'../../components/BlankTabs'
//
import Skeleton from '../../components/Skeleton'
import
Skeleton
from
'../../components/Skeleton'
import
Basic
from
'./Basic'
import
Adjunct
from
'./Adjunct'
import
Flow
from
'./Flow'
;
...
...
@@ -41,12 +41,14 @@ const Process = (props) => {
},
[]);
//获取basic数据
const
[
basic
,
setBasic
]
=
useState
([]);
const
[
basicLoading
,
setBasicLoading
]
=
useState
(
false
)
const
getBasic
=
uuid
=>
{
axiosRequest
({
method
:
'post'
,
url
:
`/idtAppServiceV6/oApp/getData`
,
body
:
{
uuid
,
tableId
,
templateId
}
}).
then
(
res
=>
{
setBasicLoading
(
true
)
const
result
=
[...
basic
];
result
.
map
(
item
=>
{
item
.
content
=
res
[
item
.
title
]
...
...
@@ -57,24 +59,27 @@ const Process = (props) => {
}
//获取Flow数据
const
[
flowData
,
setFlowData
]
=
useState
([]);
const
[
flowLoading
,
setFlowLoading
]
=
useState
(
false
)
const
getFlow
=
uuid
=>
{
axiosRequest
({
method
:
'post'
,
url
:
`/idtAppServiceV6/oApp/getFlowList`
,
body
:
{
uuid
,
tableId
}
}).
then
(
res
=>
{
setFlowLoading
(
true
)
setFlowData
(
res
)
});
};
const
[
adjunctData
,
setAdjunctData
]
=
useState
([]);
const
[
adjunctLoading
,
setAdjunctLoading
]
=
useState
(
false
)
const
getAdjunct
=
uuid
=>
{
axiosRequest
({
method
:
'post'
,
url
:
`/idtAppServiceV6/oApp/getFiles`
,
body
:
{
uuid
,
fieldName
:
'fj'
,
tableId
}
}).
then
(
res
=>
{
setAdjunctLoading
(
true
)
setAdjunctData
(
res
)
});
};
...
...
@@ -97,8 +102,6 @@ const Process = (props) => {
getButton
()
},
[
nodeId
]);
const
[
loading
,
setLoading
]
=
useState
(
false
);
//提交按钮状态
const
[
disabled
,
setDisabled
]
=
useState
(
true
);
//提交按钮文字
...
...
@@ -109,11 +112,12 @@ const Process = (props) => {
setFootStatus
(
true
)
};
useEffect
(()
=>
{
setLoading
(
false
);
const
option
=
document
.
getElementsByClassName
(
"option-text"
)[
0
]
option
.
addEventListener
(
'focus'
,
optionBlur
,
true
);
return
()
=>
option
.
removeEventListener
(
'focus'
,
optionBlur
,
true
);
},
[]);
const
option
=
document
.
getElementsByClassName
(
"option-text"
)[
0
];
if
(
option
)
{
option
.
addEventListener
(
'focus'
,
optionBlur
,
true
);
return
()
=>
option
.
removeEventListener
(
'focus'
,
optionBlur
,
true
);
}
},
[
basic
]);
const
[
blyj
,
setBlyj
]
=
useState
()
const
optionChange
=
val
=>
{
...
...
@@ -216,30 +220,25 @@ const Process = (props) => {
return
()
=>
window
.
removeEventListener
(
'scroll'
,
handleScroll
,
true
);
},
[]);
return
(
<
Document
title=
"待办详情"
>
<
div
>
<
ActivityIndicator
toast
text=
"加载中..."
animating=
{
loading
}
/>
<
TopTabs
page=
{
current
}
onClick=
{
tabClick
}
/>
<
div
id=
"event"
>
<
WingBlank
>
<
div
id=
"event-basic"
/>
<
WhiteSpace
/>
<
Basic
data=
{
basic
}
/>
{
basicLoading
?
<
Basic
data=
{
basic
}
/>
:
<
Skeleton
/>
}
<
div
id=
"event-adjunct"
/>
<
WhiteSpace
/>
<
Adjunct
data=
{
adjunctData
}
/>
{
adjunctLoading
?
<
Adjunct
data=
{
adjunctData
}
/>
:
<
Skeleton
/>
}
<
div
id=
"event-flow"
/>
<
WhiteSpace
/>
<
Flow
data=
{
flowData
}
/>
{
flowLoading
?
<
Flow
data=
{
flowData
}
/>
:
<
Skeleton
/>
}
<
div
id=
"event-option"
/>
<
WhiteSpace
/>
<
Option
onChange=
{
optionChange
}
/>
{
basicLoading
?
<
Option
onChange=
{
optionChange
}
/>
:
<
Skeleton
/>
}
</
WingBlank
>
</
div
>
<
div
className=
"event-footer"
>
...
...
src/pages/Notice/Notice.jsx
View file @
db448486
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
ActivityIndicator
,
Toast
,
WhiteSpace
,
WingBlank
}
from
'antd-mobile'
import
{
WhiteSpace
,
WingBlank
}
from
'antd-mobile'
import
TodoCard
from
'../../components/LogCard'
import
TopNotice
from
'../../components/NoticeTab'
import
axiosRequest
from
'../../utils/request'
;
import
Skeleton
from
'../../components/Skeleton'
import
Document
from
'react-document-title'
import
Empty
from
'../Empty'
// import useDebounce from '../../useHooks/useDebounce'
import
Loading
from
"../../components/Loading"
;
const
Notice
=
(
props
)
=>
{
const
[
start
,
setStart
]
=
useState
(
true
);
const
[
end
,
setEnd
]
=
useState
(
true
)
const
[
endT
,
setEndT
]
=
useState
(
false
);
const
[
current
,
setCurrent
]
=
useState
(
0
);
const
[
searchWord
,
setSearchWord
]
=
useState
();
...
...
@@ -20,9 +19,10 @@ const Notice = (props) => {
const
[
data
,
setData
]
=
useState
([]);
const
getData
=
()
=>
{
const
getData
=
(
scroll
)
=>
{
const
pageMap
=
{
searchWord
,
nowPage
:
current
+
1
,
pageSize
:
10
,
FLAG
:
tab
};
setLoading
(
true
);
scroll
&&
current
>
0
&&
window
.
scrollTo
(
0
,
document
.
body
.
scrollHeight
)
axiosRequest
({
method
:
'post'
,
url
:
'/idtAppServiceV6/oApp/getUnDone'
,
...
...
@@ -31,6 +31,8 @@ const Notice = (props) => {
setStart
(
false
);
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
);
setData
(
result
);
setLoading
(
false
);
...
...
@@ -44,8 +46,7 @@ const Notice = (props) => {
let
scrollHeight
=
document
.
documentElement
.
scrollHeight
||
document
.
body
.
scrollHeight
;
if
(
scrollHeight
>
clientHeight
&&
scrollTop
+
clientHeight
===
scrollHeight
)
{
current
>
0
&&
window
.
scrollTo
(
0
,
document
.
body
.
scrollHeight
)
getData
()
getData
(
true
)
}
}
useEffect
(()
=>
{
...
...
@@ -64,27 +65,17 @@ const Notice = (props) => {
//tab已读未读切换
const
[
tab
,
setTab
]
=
useState
(
'N'
);
// const tabData = () => {
// const pageMap ={searchWord, nowPage: current + 1, pageSize: 10, FLAG: tab};
// setLoading(true);
// axiosRequest({
// method: 'post',
// url: '/idtAppServiceV6/oApp/getUnDone',
// body: pageMap,
// }).then(res => {
// setLoading(false);
// let result = start && res.rows ? [].concat(res.rows) : [];
// res.rows && res.rows.length >= 10 ? setCurrent(current + 1) : setEndT(true);
// setData(result);
// });
// };
const
tabChange
=
val
=>
{
setCurrent
(
0
)
setCurrent
(
0
);
setData
([]);
setTab
(
val
);
setEnd
(
true
)
};
const
tabSearch
=
val
=>
{
setCurrent
(
0
)
setCurrent
(
0
);
setData
([])
setSearchWord
(
val
)
setEnd
(
true
)
}
useEffect
(()
=>
{
//回到顶部
...
...
@@ -93,12 +84,11 @@ const Notice = (props) => {
},
[])
useEffect
(()
=>
{
setStart
(
true
);
setEndT
(
false
)
setData
([])
setCurrent
(
0
)
getData
()
getData
(
false
,
[])
},
[
searchWord
,
tab
]);
console
.
log
(
current
)
console
.
log
(
data
.
length
)
return
(
<
Document
title=
"通知"
>
<
WingBlank
>
...
...
@@ -116,7 +106,8 @@ const Notice = (props) => {
<
WhiteSpace
/>
{
loading
&&
(
<
div
className=
"pos-line content-loading"
>
<
ActivityIndicator
/>
<
Loading
/>
<
WhiteSpace
/>
<
WhiteSpace
/>
</
div
>
)
}
...
...
src/pages/Work/Work.jsx
View file @
db448486
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
WhiteSpace
,
WingBlank
}
from
"antd-mobile"
;
import
axiosRequest
from
'../../utils/request'
;
//
import axiosRequest from '../../utils/request';
import
TopSearch
from
'../../components/TopSearch'
import
WorkCard
from
'../../components/WorkCard'
;
import
Skeleton
from
'../../components/Skeleton'
...
...
@@ -19,17 +19,27 @@ const Work = (props) => {
},
[]);
const
loadOperates
=
()
=>
{
setLoading
(
true
)
axiosRequest
({
method
:
'post'
,
url
:
'/idtAppServiceV6/oApp/getAllOperate'
,
}).
then
(
res
=>
{
setLoading
(
false
);
setStart
(
false
)
const
result
=
res
?
res
.
map
(
item
=>
({
icon
:
''
,
text
:
item
.
nodeName
}))
:
[]
setOperates
(
result
);
setData
(
result
)
});
setLoading
(
true
);
setTimeout
(()
=>
{
setLoading
(
false
)
},
1000
)
const
res
=
localStorage
.
getItem
(
"menu"
);
setStart
(
false
);
const
result
=
JSON
.
parse
(
res
)
setOperates
(
result
);
setData
(
result
);
// let ss = []
// JSON.parse(res).map(item => ss.push(item.text));
// let a = new Set(ss)
// console.log([...a].join(','))
// axiosRequest({
// method: 'post',
// url: '/idtAppServiceV6/oApp/getAllOperate',
// }).then(res => {
// setLoading(false);
//
// });
}
const
commonEdit
=
()
=>
{
...
...
src/utils/instance.js
View file @
db448486
...
...
@@ -30,9 +30,9 @@ let defaultHeaders = {
export
const
createAPI
=
(
baseURL
)
=>
{
return
(
conf
=
{})
=>
{
let
opts
=
conf
.
opts
||
{};
let
body
=
conf
.
body
||
{};
//
let body = conf.body || {};
let
urlParams
=
''
;
console
.
log
(
conf
)
//
console.log(conf)
let
headers
=
{
...
defaultHeaders
,
...
opts
.
headers
};
if
(
conf
.
opts
)
{
...
...
@@ -52,7 +52,7 @@ export const createAPI = (baseURL) => {
// console.log(response)
if
(
!
response
||
!
response
.
data
)
{
response
.
code
===
'idt-core-50
5
'
&&
(
window
.
location
.
href
=
'/login'
)
response
.
code
===
'idt-core-50
0
'
&&
(
window
.
location
.
href
=
'/login'
)
console
.
log
(
'response出错, 无返回数据!'
,
response
);
return
false
;
};
if
(
response
.
data
&&
response
.
data
.
errorMessage
)
{
...
...
@@ -67,7 +67,9 @@ export const createAPI = (baseURL) => {
localStorage
.
setItem
(
"token"
,
response
.
data
.
token
);
}
if
(
response
&&
response
.
data
&&
response
.
data
.
leftOperateBar
)
{
localStorage
.
setItem
(
"menu"
,
JSON
.
stringify
(
response
.
data
.
leftOperateBar
));
const
result
=
response
.
data
.
leftOperateBar
.
filter
(
item
=>
item
.
nodeName
===
'公共分组'
);
const
menu
=
result
.
length
>
0
&&
result
[
0
].
children
?
result
[
0
].
children
.
map
(
item
=>
({
icon
:
item
.
imgType
,
text
:
item
.
nodeName
}))
:
[];
result
.
length
>
0
&&
localStorage
.
setItem
(
"menu"
,
JSON
.
stringify
(
menu
));
}
if
(
response
.
data
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment