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
ce489afc
Commit
ce489afc
authored
Jul 20, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
64e1bcfb
Pipeline
#16373
passed with stages
in 1 minute and 8 seconds
Changes
8
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
177 additions
and
44 deletions
+177
-44
Process.jsx
src/pages/EventProcessing/Process.jsx
+29
-6
Adjunct.jsx
src/pages/EventProcessing/commponents/Adjunct.jsx
+4
-14
AddGood.jsx
src/pages/Work/components/AddGood.jsx
+25
-17
Goods.jsx
src/pages/Work/components/Goods.jsx
+0
-0
Meet.jsx
src/pages/Work/components/Meet.jsx
+6
-0
Normal.jsx
src/pages/Work/components/Normal.jsx
+69
-5
index.less
src/pages/Work/components/index.less
+42
-0
instance.js
src/utils/instance.js
+2
-2
No files found.
src/pages/EventProcessing/Process.jsx
View file @
ce489afc
...
...
@@ -129,10 +129,10 @@ const Process = (props) => {
}
},
[
basic
]);
// const [blyj, setBlyj] = useState();
// console.log(blyj)
const
[
blyj
,
setBlyj
]
=
useState
();
const
optionChange
=
val
=>
{
// setBlyj(val)
setBlyj
(
val
);
optionBlur
()
setDisabled
(
!
(
val
!=
null
&&
val
!==
''
))
};
...
...
@@ -145,6 +145,16 @@ const Process = (props) => {
window
.
scrollTo
(
0
,
document
.
body
.
scrollHeight
);
optionBlur
()
};
const
download
=
(
uuid
,
callback
)
=>
{
const
developer
=
localStorage
.
getItem
(
'developer'
);
axiosRequest
({
method
:
'post'
,
url
:
`/idtAppServiceV6/oApp/downloadLargeFile`
,
body
:
{
uuid
,
tableId
,
templateId
,
developer
}
}).
then
(
res
=>
{
callback
&&
callback
()
});
}
//tab切换
const
tabClick
=
(
name
)
=>
{
...
...
@@ -165,7 +175,21 @@ const Process = (props) => {
};
};
const
blyjSubmit
=
()
=>
{
axiosRequest
({
method
:
'post'
,
url
:
`/idtAppServiceV6/oApp/save`
,
body
:
{
tableId
,
dealInfo
:
JSON
.
stringify
({
BLYJ
:
blyj
,
flowTbId
}),
params
:
JSON
.
stringify
({
UUID
:
uuid
})}
}).
then
(
res
=>
{
console
.
log
(
res
)
});
}
const
showActionSheet
=
()
=>
{
blyjSubmit
()
const
BUTTON
=
[];
button
.
map
(
item
=>
BUTTON
.
push
(
item
.
button
));
const
BUTTONS
=
BUTTON
.
concat
([
'取消'
]);
...
...
@@ -176,8 +200,7 @@ const Process = (props) => {
wrapProps
,
},
(
buttonIndex
)
=>
{
buttonIndex
<
BUTTONS
.
length
-
1
&&
subUrl
(
buttonIndex
)
// console.log(buttonIndex)
buttonIndex
>
-
1
&&
(
buttonIndex
<
BUTTONS
.
length
-
1
)
&&
subUrl
(
buttonIndex
)
});
};
const
subUrl
=
key
=>
{
...
...
@@ -242,7 +265,7 @@ const Process = (props) => {
{
resultLoading
?
<
Basic
data=
{
basic
}
attachId=
{
uuid
}
{
...
props
}
/>
:
<
Skeleton
/>
}
<
div
id=
"event-adjunct"
/>
<
WhiteSpace
/>
{
resultLoading
?
<
Adjunct
d
ata=
{
adjunctData
}
/>
:
<
Skeleton
/>
}
{
resultLoading
?
<
Adjunct
d
ownload=
{
download
}
data=
{
adjunctData
}
tableId=
{
tableId
}
/>
:
<
Skeleton
/>
}
<
div
id=
"event-flow"
/>
<
WhiteSpace
/>
{
resultLoading
?
<
Flow
data=
{
flowData
}
/>
:
<
Skeleton
/>
}
...
...
src/pages/EventProcessing/commponents/Adjunct.jsx
View file @
ce489afc
import
React
from
'react'
;
import
List
from
'../../../components/List'
import
AdjunctList
from
'../../../components/Adjunct'
import
axiosRequest
from
"../../../utils/request"
;
const
Adjunct
=
(
props
)
=>
{
const
{
data
}
=
props
;
const
{
data
,
download
}
=
props
;
// const downlaod = (src) => {
// const iframe = document.createElement('iframe');
// iframe.style.display = 'none';
// iframe.src = "javascript: '<script>location.href=\"" + src + "\"<\/script>'";
// document.getElementsByTagName('body')[0].appendChild(iframe);
// }
const
download
=
(
uuid
)
=>
{
axiosRequest
({
method
:
'post'
,
url
:
'/idtAppServiceV6/oApp/downloadLargeFile'
,
body
:
{
uuid
},
}).
then
(
res
=>
{
})
const
downloadFile
=
(
uuid
)
=>
{
download
(
uuid
,)
}
const
listData
=
[
{
title
:
'附件'
,
line
:
data
.
length
>
0
,
content
:
<
div
>
{
data
.
length
>
0
?
data
.
map
((
item
,
index
)
=>
(
<
AdjunctList
key=
{
index
}
data=
{
item
}
onClick=
{
()
=>
download
(
item
.
UUID
)
}
/>
<
AdjunctList
key=
{
index
}
data=
{
item
}
onClick=
{
()
=>
download
File
(
item
.
UUID
)
}
/>
))
:
'无'
}
</
div
>
},
...
...
src/pages/Work/components/AddGood.jsx
View file @
ce489afc
import
React
from
'react'
;
import
{
createForm
}
from
'rc-form'
;
import
{
List
,
Picker
,
InputItem
,
Button
,
Modal
,
TextareaItem
}
from
"antd-mobile"
;
import
{
List
,
Picker
,
InputItem
,
Button
,
Modal
,
DatePicker
}
from
"antd-mobile"
;
import
'./index.less'
const
Send
=
(
props
)
=>
{
const
{
visible
,
onClose
,
addGoods
}
=
props
;
const
{
visible
,
onClose
,
addGoods
,
columns
}
=
props
;
const
{
getFieldProps
,
resetFields
}
=
props
.
form
;
const
district
=
[
{
label
:
'111'
,
value
:
'111'
}
];
const
handleClose
=
()
=>
{
resetFields
();
onClose
()
...
...
@@ -23,7 +19,13 @@ const Send = (props) => {
}
});
}
};
const
getMode
=
val
=>
{
const
date
=
/^
(\w{4})
-
(\w{2})
-
(\w{2})
$/
;
const
time
=
/^
(\w{2})
:
(\w{2})
:
(\w{2})
$/
;
return
date
.
test
(
val
)
?
'date'
:
(
time
.
test
(
val
)
?
'time'
:
'datetime'
)
};
return
(
<
div
>
...
...
@@ -36,17 +38,23 @@ const Send = (props) => {
>
<
form
>
<
List
className=
"goods-form"
>
<
InputItem
{
...
getFieldProps
('
name
')}
>
领取人
</
InputItem
>
<
Picker
data=
{
district
}
cols=
{
1
}
{
...
getFieldProps
('
ggf1
')}
>
<
List
.
Item
arrow=
"horizontal"
>
品名
</
List
.
Item
>
{
columns
&&
columns
.
length
>
0
&&
columns
.
map
((
item
,
index
)
=>
{
if
(
item
.
type
===
'DATE'
)
{
return
(
<
DatePicker
key=
{
index
}
mode=
{
getMode
(
item
.
dateType
)
}
className=
"send-date-style"
{
...
getFieldProps
(
item
.
label
)}
>
<
List
.
Item
arrow=
"horizontal"
>
{
item
.
label
}
</
List
.
Item
>
</
DatePicker
>
)
}
else
if
(
item
.
data
)
{
return
(
<
Picker
key=
{
index
}
data=
{
item
.
data
}
cols=
{
1
}
{
...
getFieldProps
(
item
.
label
)}
>
<
List
.
Item
arrow=
"horizontal"
>
{
item
.
label
}
</
List
.
Item
>
</
Picker
>
<
InputItem
{
...
getFieldProps
('
amount
')}
placeholder=
{
`(库存剩余:${0})`
}
>
申请数量
</
InputItem
>
<
TextareaItem
title=
"内容"
placeholder=
"请输入内容"
{
...
getFieldProps
('
_mail_editor_text
')}
rows=
{
4
}
/>
)
}
else
{
return
<
InputItem
key=
{
index
}
{
...
getFieldProps
(
item
.
label
)}
>
{
item
.
label
}
</
InputItem
>
}
})
}
</
List
>
</
form
>
...
...
src/pages/Work/components/Goods.jsx
View file @
ce489afc
This diff is collapsed.
Click to expand it.
src/pages/Work/components/Meet.jsx
View file @
ce489afc
...
...
@@ -9,6 +9,7 @@ import moment from 'moment'
import
fileRequest
from
"../../../utils/fileRequest"
;
import
MeetInfo
from
'./MeetInfo'
import
PeopleInfo
from
'./PeopleInfo'
import
Skeleton
from
'../../../components/Skeleton'
const
Send
=
(
props
)
=>
{
const
{
name
}
=
props
.
match
.
params
;
...
...
@@ -108,6 +109,7 @@ const Send = (props) => {
const
[
formData
,
setFormData
]
=
useState
([]);
const
[
submitData
,
setSubmitData
]
=
useState
({});
const
[
loading2
,
setLoading2
]
=
useState
(
false
)
useEffect
(()
=>
{
const
menuParams
=
localStorage
.
getItem
(
'menu'
);
const
menu
=
JSON
.
parse
(
menuParams
);
...
...
@@ -117,6 +119,7 @@ const Send = (props) => {
url
:
`/idtAppServiceV6/oApp/dispatcher`
,
body
:
{
operateId
:
menu
[
menuIndex
].
children
[
0
].
id
,
formType
:
'form'
}
}).
then
(
res
=>
{
setLoading2
(
true
);
const
dataSource
=
res
.
elementList
.
map
((
item
,
index
)
=>
{
const
group
=
{};
group
.
type
=
item
.
colType
;
...
...
@@ -166,6 +169,7 @@ const Send = (props) => {
peopleData=
{
sP
}
onSelect=
{
setSP
}
/>
{
loading2
?
(
<
form
>
<
List
className=
"send-content"
>
{
formData
.
length
>
0
&&
(
...
...
@@ -240,6 +244,8 @@ const Send = (props) => {
)
}
</
form
>
)
:
<
Skeleton
/>
}
</
div
>
);
};
...
...
src/pages/Work/components/Normal.jsx
View file @
ce489afc
...
...
@@ -10,11 +10,13 @@ import fileRequest from "../../../utils/fileRequest";
import
MeetInfo
from
'./MeetInfo'
import
PeopleInfo
from
'./PeopleInfo'
import
AddGood
from
"./AddGood"
;
import
Skeleton
from
'../../../components/Skeleton'
const
alert
=
Modal
.
alert
;
const
Item
=
Checkbox
.
CheckboxItem
;
const
AgreeItem
=
Checkbox
.
AgreeItem
;
const
Send
=
(
props
)
=>
{
const
{
name
}
=
props
.
match
.
params
;
const
{
getFieldProps
}
=
props
.
form
;
...
...
@@ -33,6 +35,8 @@ const Send = (props) => {
return
null
;
});
name
===
'会议申请'
&&
(
values
[
'会议地点'
]
=
HYSDD
);
// name === '收文管理' && (values['文号'] = HYSDD);
// name === '发文管理' && (values['编号'] = HYSDD);
setLoading
(
true
);
axiosRequest
({
method
:
'post'
,
...
...
@@ -119,15 +123,20 @@ const Send = (props) => {
const
[
formData
,
setFormData
]
=
useState
([]);
const
[
submitData
,
setSubmitData
]
=
useState
({});
const
[
numberData
,
setNumberData
]
=
useState
([]);
const
[
numberList
,
setNumberList
]
=
useState
([]);
const
[
loading2
,
setLoading2
]
=
useState
(
false
);
useEffect
(()
=>
{
const
menuParams
=
localStorage
.
getItem
(
'menu'
);
const
menu
=
JSON
.
parse
(
menuParams
);
const
menuIndex
=
menu
.
findIndex
(
item
=>
item
.
text
===
name
);
menuIndex
>
-
1
&&
menu
[
menuIndex
].
children
.
length
>
0
&&
axiosRequest
({
method
:
'post'
,
url
:
`/idtAppServiceV6/oApp/dispatcher`
,
body
:
{
operateId
:
menu
[
menuIndex
].
children
[
0
].
id
,
formType
:
'form'
}
}).
then
(
res
=>
{
setLoading2
(
true
)
const
dataSource
=
res
.
elementList
.
map
((
item
,
index
)
=>
{
const
group
=
{};
group
.
type
=
item
.
colType
;
...
...
@@ -136,7 +145,12 @@ const Send = (props) => {
item
.
dict
&&
item
.
dict
.
data
&&
item
.
dict
.
data
.
length
>
0
&&
(
group
.
data
=
item
.
dict
.
data
.
map
(
item
=>
({
label
:
item
.
DISP_VALUE
,
value
:
item
.
REAL_VALUE
})));
return
group
;
});
setSubmitData
(
res
.
property
)
const
numberIndex
=
dataSource
.
findIndex
(
item
=>
name
===
'收文管理'
?
(
item
.
label
===
'来文机关或部门'
)
:
(
item
.
label
===
'发文机关代字'
)
);
const
list
=
numberIndex
>
-
1
&&
(
dataSource
[
numberIndex
].
data
.
map
(
item
=>
({
label
:
item
.
label
,
value
:
item
.
label
,})));
setNumberData
(
list
||
[]);
setSubmitData
(
res
.
property
);
setFormData
(
dataSource
)
});
},
[]);
...
...
@@ -199,6 +213,26 @@ const Send = (props) => {
newGoods
[
index
].
checked
=
!
newGoods
[
index
].
checked
;
setGoods
(
newGoods
)
};
const
checkTitle
=
()
=>
{
fileRequest
({
method
:
'post'
,
url
:
'/idtAppServiceV6/control/getList'
,
body
:
{
script
:
'oa_fwgl_jyFwwhbh'
,
args
:
JSON
.
stringify
([
numberList
[
0
],
numberList
[
1
]]),
keys
:
JSON
.
stringify
([
numberList
[
2
]])
}
}).
then
((
res
)
=>
{
Toast
.
success
(
'校验成功'
);
});
};
const
saveNumber
=
(
number1
,
number2
,
number3
)
=>
{
const
result
=
[...
numberList
];
number1
&&
(
result
[
0
]
=
number1
);
number2
&&
(
result
[
1
]
=
number2
);
number3
&&
(
result
[
2
]
=
number3
);
setNumberList
(
result
)
};
return
(
<
div
>
...
...
@@ -216,6 +250,7 @@ const Send = (props) => {
onClose=
{
()
=>
setVisible
(
false
)
}
addGoods=
{
addGoods
}
/>
{
loading2
?
(
<
form
>
<
List
className=
"send-content"
>
{
formData
.
length
>
0
&&
(
...
...
@@ -235,22 +270,49 @@ const Send = (props) => {
)
}
else
if
(
item
.
label
===
'会议地点'
)
{
return
(
<
List
.
Item
className=
"auto-flex"
extra=
{
<
List
.
Item
key=
{
index
}
className=
"auto-flex"
extra=
{
<
div
className=
"pos-aline"
>
<
div
className=
"meet-select-btn"
onClick=
{
getPlace
}
>
选择会议地点
</
div
>
<
div
id=
"room-number"
className=
"ml-40 room-num"
>
{
HYSDD
}
</
div
>
<
div
className=
"ml-40 room-num"
>
{
HYSDD
}
</
div
>
</
div
>
}
>
会议地点
</
List
.
Item
>
)
}
else
if
(
item
.
label
===
'参会人员'
)
{
return
(
<
List
.
Item
className=
"auto-flex"
extra=
{
<
List
.
Item
key=
{
index
}
className=
"auto-flex"
extra=
{
<
div
>
<
div
className=
"meet-select-btn"
onClick=
{
getPerson
}
>
选择参会人员
</
div
>
</
div
>
}
>
参会人员
</
List
.
Item
>
)
}
else
{
}
else
if
(
name
===
'收文管理'
&&
item
.
label
.
indexOf
(
'文号'
)
>
-
1
)
{
return
(
<
List
.
Item
key=
{
index
}
className=
"line-number"
>
文号
<
div
className=
"pos-aline"
>
<
Picker
value=
{
[
numberList
[
0
]]
}
data=
{
numberData
}
cols=
{
1
}
onChange=
{
val
=>
saveNumber
(
val
[
0
])
}
>
<
List
.
Item
className=
"room-num-2"
/>
</
Picker
>
<
div
className=
"pos-aline"
>
[
<
input
className=
"room-num-2"
onChange=
{
(
val
)
=>
saveNumber
(
null
,
val
.
target
.
value
)
}
/>
]
</
div
>
<
input
className=
"room-num-2"
onChange=
{
(
val
)
=>
saveNumber
(
null
,
null
,
val
.
target
.
value
)
}
/>
号
<
Button
className=
"org-btn"
size=
"small"
onClick=
{
checkTitle
}
>
校验
</
Button
>
</
div
>
</
List
.
Item
>
)
}
else
if
(
name
===
'发文管理'
&&
item
.
label
.
indexOf
(
'编号'
)
>
-
1
)
{
return
(
<
List
.
Item
key=
{
index
}
>
编号
<
div
className=
"pos-aline"
>
<
Picker
value=
{
[
numberList
[
0
]]
}
data=
{
numberData
}
cols=
{
1
}
onChange=
{
val
=>
saveNumber
(
val
[
0
])
}
>
<
List
.
Item
className=
"room-num-2"
/>
</
Picker
>
<
div
className=
"pos-aline"
>
[
<
input
className=
"room-num-2"
onChange=
{
(
val
)
=>
saveNumber
(
null
,
val
.
target
.
value
)
}
/>
]
</
div
>
<
input
className=
"room-num-2"
onChange=
{
(
val
)
=>
saveNumber
(
null
,
null
,
val
.
target
.
value
)
}
/>
号
</
div
>
</
List
.
Item
>
)
}
else
{
return
<
InputItem
key=
{
index
}
{
...
getFieldProps
(
item
.
label
)}
>
{
item
.
label
}
</
InputItem
>
}
})
}
...
...
@@ -323,6 +385,8 @@ const Send = (props) => {
)
}
</
form
>
)
:
(<
Skeleton
/>)
}
</
div
>
);
};
...
...
src/pages/Work/components/index.less
View file @
ce489afc
...
...
@@ -129,6 +129,17 @@
.ml-40{
margin-left: 30px;
}
.room-num-2{
width: 60px;
height: 29px;
border:0 solid rgba(38, 104, 255, 0.2);
border-radius:6px;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 249, 249, 1);
text-align: center;
}
.room-num{
width: 60px;
height: 29px;
...
...
@@ -152,3 +163,34 @@
.footer-button.btn-disabled{
background: rgba(151, 151, 151, 1) !important;
}
.room-num-2 .am-list-extra, .room-num-2 .am-list-line{
min-width: 80px !important;
text-align: center !important;
padding: 0 !important;
height: 29px !important;
line-height: 29px !important;
}
.room-num-2 .am-list-line:after{
display: none !important;
}
.room-num-2.am-list-item{
min-width: 80px !important;
height: 29px !important;
line-height: 29px !important;
min-height: 29px !important;
}
.am-list-item.room-num-2.am-list-item-middle{
min-width: 80px !important;
padding: 0 !important;
}
.line-number .am-list-content{
display: flex;
flex-direction: column !important;
justify-content: flex-start !important;
align-items: flex-start;
}
.org-btn{
margin-left: 20px;
background: rgba(239, 154, 54, 1);
color: #ffffff;
}
src/utils/instance.js
View file @
ce489afc
...
...
@@ -50,12 +50,11 @@ export const createAPI = (baseURL) => {
.
then
(
function
(
response
)
{
response
=
response
.
data
||
response
.
tree
;
// console.log(!response || !(response.data || response.tree))
if
(
!
response
||
!
(
response
.
data
||
response
.
tree
))
{
// response.status === 'failure' && (window.location.href = '/login')
response
.
code
===
'idt-jwt-500'
&&
(
window
.
location
.
href
=
'/login'
)
console
.
log
(
'response出错, 无返回数据!'
,
response
);
Toast
.
fail
(
response
.
message
)
// return false;
};
if
(
response
.
data
&&
response
.
data
.
errorMessage
)
{
...
...
@@ -83,6 +82,7 @@ export const createAPI = (baseURL) => {
}
else
{
return
false
;
}
})
.
catch
(
error
=>
{
if
(
error
.
response
)
{
...
...
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