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
c0781567
Commit
c0781567
authored
Jul 03, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
d1b256f2
Pipeline
#15890
passed with stages
in 1 minute and 1 second
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
15 deletions
+72
-15
BlobItem.jsx
src/components/Adjunct/BlobItem.jsx
+22
-0
Application.jsx
src/pages/EventProcessing/UnCommon/Application.jsx
+2
-2
Info.jsx
src/pages/UnCommon/Mail/Info.jsx
+19
-4
Send.jsx
src/pages/UnCommon/Mail/Send.jsx
+9
-6
fileRequest.js
src/utils/fileRequest.js
+18
-0
instance.js
src/utils/instance.js
+2
-3
No files found.
src/components/Adjunct/BlobItem.jsx
0 → 100644
View file @
c0781567
import
React
from
'react'
;
import
'./index.less'
const
MailA
=
(
props
)
=>
{
const
{
data
}
=
props
;
const
imgExt
=
[
"png"
,
"jpg"
,
"jpeg"
,
"bmp"
,
"gif"
];
const
type
=
data
.
FILENAME
&&
data
.
FILENAME
.
split
(
'.'
)[
1
];
return
(
<
div
>
<
div
className=
{
`adjunct-card ${imgExt.indexOf(type) > -1 ? 'adjunct-pdf' : 'adjunct-word'}`
}
>
<
div
className=
"adjunct-title"
>
<
img
alt=
""
src=
{
imgExt
.
indexOf
(
type
)
>
-
1
?
'/img/test/pdf.png'
:
'/img/test/word.png'
}
className=
"adjunct-img"
/>
<
div
className=
"adjunct-content"
>
<
p
className=
"adjunct-title-1"
>
{
data
.
FILENAME
}
</
p
>
</
div
>
</
div
>
</
div
>
</
div
>
);
};
export
default
MailA
;
src/pages/EventProcessing/UnCommon/Application.jsx
View file @
c0781567
...
@@ -171,8 +171,8 @@ const Process = (props) => {
...
@@ -171,8 +171,8 @@ const Process = (props) => {
//tab切换
//tab切换
const
tabClick
=
(
name
)
=>
{
const
tabClick
=
(
name
)
=>
{
setCurrent
(
name
)
setCurrent
(
name
)
name
===
'option'
&&
document
.
getElementsByClassName
(
"option-text"
)[
0
].
focus
();
flow
&&
name
===
'option'
&&
document
.
getElementsByClassName
(
"option-text"
)[
0
].
focus
();
name
===
'option'
&&
optionBlur
()
flow
&&
name
===
'option'
&&
optionBlur
()
const
top
=
document
.
getElementById
(
`event-
${
name
}
`
).
offsetTop
-
document
.
getElementById
(
`event-basic`
).
offsetTop
;
const
top
=
document
.
getElementById
(
`event-
${
name
}
`
).
offsetTop
-
document
.
getElementById
(
`event-basic`
).
offsetTop
;
window
.
scrollTo
(
0
,
top
);
window
.
scrollTo
(
0
,
top
);
};
};
...
...
src/pages/UnCommon/Mail/Info.jsx
View file @
c0781567
...
@@ -3,34 +3,49 @@ import {WingBlank, List, InputItem, TextareaItem, WhiteSpace} from 'antd-mobile'
...
@@ -3,34 +3,49 @@ import {WingBlank, List, InputItem, TextareaItem, WhiteSpace} from 'antd-mobile'
import
Document
from
'react-document-title'
import
Document
from
'react-document-title'
import
'../index.less'
import
'../index.less'
import
axiosRequest
from
"../../../utils/request"
;
import
axiosRequest
from
"../../../utils/request"
;
import
BlobItem
from
'../../../components/Adjunct/BlobItem'
import
Skeleton
from
'../../../components/Skeleton'
const
Send
=
(
props
)
=>
{
const
Send
=
(
props
)
=>
{
const
[
data
,
setData
]
=
useState
({})
const
[
data
,
setData
]
=
useState
({});
const
[
loading
,
setLoading
]
=
useState
(
false
);
useEffect
(()
=>
{
useEffect
(()
=>
{
setLoading
(
true
);
const
{
uuid
}
=
props
.
match
.
params
;
const
{
uuid
}
=
props
.
match
.
params
;
axiosRequest
({
axiosRequest
({
method
:
'post'
,
method
:
'post'
,
url
:
'/idtAppServiceV6/jspmail/mailGetMail'
,
url
:
'/idtAppServiceV6/jspmail/mailGetMail'
,
body
:
{
uuid
},
body
:
{
uuid
},
}).
then
(
res
=>
{
}).
then
(
res
=>
{
setLoading
(
false
);
setData
(
res
)
setData
(
res
)
});
});
},
[])
},
[])
;
return
(
return
(
<
Document
title=
"内部邮局"
>
<
Document
title=
"内部邮局"
>
<
WingBlank
>
<
WingBlank
>
<
WhiteSpace
/>
<
WhiteSpace
/>
{
loading
?
<
Skeleton
/>
:
(
<
List
className=
"date-info"
>
<
List
className=
"date-info"
>
<
InputItem
dias
bled=
{
true
}
value=
{
data
.
mailInfo
&&
data
.
mailInfo
.
TITLE
}
>
主题
</
InputItem
>
<
InputItem
disa
bled=
{
true
}
value=
{
data
.
mailInfo
&&
data
.
mailInfo
.
TITLE
}
>
主题
</
InputItem
>
<
InputItem
dias
bled=
{
true
}
value=
{
data
.
mailInfo
&&
JSON
.
parse
(
data
.
mailInfo
.
RECIPIENT
).
fzxs_mail_sender_groups
}
>
收件人
</
InputItem
>
<
InputItem
disa
bled=
{
true
}
value=
{
data
.
mailInfo
&&
JSON
.
parse
(
data
.
mailInfo
.
RECIPIENT
).
fzxs_mail_sender_groups
}
>
收件人
</
InputItem
>
<
TextareaItem
<
TextareaItem
disabled=
{
true
}
disabled=
{
true
}
title=
"内容"
title=
"内容"
value=
{
data
.
clob
}
value=
{
data
.
clob
}
rows=
{
4
}
rows=
{
4
}
/>
/>
<
div
className=
"am-textarea-label upload-title"
>
附件:
</
div
>
<
WingBlank
>
{
data
.
blobList
&&
data
.
blobList
.
length
>
0
&&
data
.
blobList
.
map
((
item
,
index
)
=>
(
<
BlobItem
key=
{
index
}
data=
{
item
}
/>
))
}
</
WingBlank
>
<
WhiteSpace
/>
</
List
>
</
List
>
)
}
</
WingBlank
>
</
WingBlank
>
</
Document
>
</
Document
>
);
);
...
...
src/pages/UnCommon/Mail/Send.jsx
View file @
c0781567
...
@@ -2,7 +2,7 @@ import React, {useState} from 'react';
...
@@ -2,7 +2,7 @@ import React, {useState} from 'react';
import
{
WingBlank
,
List
,
InputItem
,
TextareaItem
,
WhiteSpace
,
Toast
}
from
'antd-mobile'
import
{
WingBlank
,
List
,
InputItem
,
TextareaItem
,
WhiteSpace
,
Toast
}
from
'antd-mobile'
import
Document
from
'react-document-title'
;
import
Document
from
'react-document-title'
;
import
'../index.less'
;
import
'../index.less'
;
import
axiosRequest
from
'../../../utils/r
equest'
;
import
fileRequest
from
'../../../utils/fileR
equest'
;
import
Upload
from
'rc-upload'
;
import
Upload
from
'rc-upload'
;
import
MailA
from
'../../../components/Adjunct/MailA'
import
MailA
from
'../../../components/Adjunct/MailA'
...
@@ -25,15 +25,18 @@ const Send = (props) => {
...
@@ -25,15 +25,18 @@ const Send = (props) => {
formData
.
append
(
'blob'
,
file
);
formData
.
append
(
'blob'
,
file
);
});
});
if
(
!
error
)
{
if
(
!
error
)
{
axios
Request
({
file
Request
({
method
:
'post'
,
method
:
'post'
,
url
:
'/idtAppServiceV6/jspmail/sendMail'
,
url
:
'/idtAppServiceV6/jspmail/sendMail'
,
body
:
{
jsonParam
:
JSON
.
stringify
(
jsonParam
)},
body
:
{
jsonParam
:
JSON
.
stringify
(
jsonParam
)},
payload
:
formData
}).
then
(
res
=>
{
}).
then
(
res
=>
{
Toast
.
success
(
'发送成功'
);
Toast
.
success
(
'发送成功'
);
props
.
history
.
push
(
'/blank/mail'
);
props
.
history
.
push
(
'/blank/mail'
);
setLoading
(
true
)
setLoading
(
true
)
});
});
}
else
{
Toast
.
fail
(
'请输入完整的主题、收件人、内容'
)
}
}
});
});
};
};
...
@@ -43,7 +46,7 @@ const Send = (props) => {
...
@@ -43,7 +46,7 @@ const Send = (props) => {
multiple
:
true
,
multiple
:
true
,
beforeUpload
(
file
)
{
beforeUpload
(
file
)
{
const
newUpload
=
[...
upload
,
file
];
const
newUpload
=
[...
upload
,
file
];
setUpload
(
newUpload
)
setUpload
(
newUpload
)
;
return
false
return
false
}
}
};
};
...
@@ -60,17 +63,17 @@ const Send = (props) => {
...
@@ -60,17 +63,17 @@ const Send = (props) => {
<
form
>
<
form
>
<
List
>
<
List
>
<
InputItem
<
InputItem
{
...
getFieldProps
('
_mail_title_text
')}
{
...
getFieldProps
('
_mail_title_text
'
,
{
rules
:
[{
required
:
true
,
message
:
'请输入主题'}]}
)}
placeholder=
"请输入主题"
placeholder=
"请输入主题"
>
主题
</
InputItem
>
>
主题
</
InputItem
>
<
InputItem
<
InputItem
{
...
getFieldProps
('
_mail_sjr_text
')}
{
...
getFieldProps
('
_mail_sjr_text
'
,
{
rules
:
[{
required
:
true
,
message
:
'请输入收件人'}]}
)}
placeholder=
"请输入收件人"
placeholder=
"请输入收件人"
>
收件人
</
InputItem
>
>
收件人
</
InputItem
>
<
TextareaItem
<
TextareaItem
title=
"内容"
title=
"内容"
placeholder=
"请输内容"
placeholder=
"请输内容"
{
...
getFieldProps
('
_mail_editor_text
')}
{
...
getFieldProps
('
_mail_editor_text
'
,
{
rules
:
[{
required
:
true
,
message
:
'请输内容'}]}
)}
rows=
{
4
}
rows=
{
4
}
/>
/>
<
div
className=
"am-textarea-label upload-title"
>
附件:
</
div
>
<
div
className=
"am-textarea-label upload-title"
>
附件:
</
div
>
...
...
src/utils/fileRequest.js
0 → 100644
View file @
c0781567
import
{
createAPI
}
from
'./instance'
;
// export const apiUrl = 'http://124.93.101.8:9988/dgbg/';
export
const
apiUrl
=
'/'
;
const
instance
=
createAPI
(
apiUrl
);
async
function
fileRequest
(
option
=
{})
{
const
res
=
await
instance
({
method
:
option
.
method
||
'post'
,
url
:
option
.
url
,
opts
:
option
.
body
||
null
,
payload
:
option
.
payload
});
return
res
;
}
export
default
fileRequest
;
src/utils/instance.js
View file @
c0781567
...
@@ -30,9 +30,8 @@ let defaultHeaders = {
...
@@ -30,9 +30,8 @@ let defaultHeaders = {
export
const
createAPI
=
(
baseURL
)
=>
{
export
const
createAPI
=
(
baseURL
)
=>
{
return
(
conf
=
{})
=>
{
return
(
conf
=
{})
=>
{
let
opts
=
conf
.
opts
||
{};
let
opts
=
conf
.
opts
||
{};
// let body = conf.body || {};
let
urlParams
=
''
;
let
urlParams
=
''
;
// console.log(conf)
console
.
log
(
conf
);
let
headers
=
{
...
defaultHeaders
,
...
opts
.
headers
};
let
headers
=
{
...
defaultHeaders
,
...
opts
.
headers
};
if
(
conf
.
opts
)
{
if
(
conf
.
opts
)
{
...
@@ -45,7 +44,7 @@ export const createAPI = (baseURL) => {
...
@@ -45,7 +44,7 @@ export const createAPI = (baseURL) => {
url
:
conf
.
url
+
urlParams
,
url
:
conf
.
url
+
urlParams
,
baseURL
:
baseURL
,
baseURL
:
baseURL
,
method
:
conf
.
method
,
method
:
conf
.
method
,
// data: body
,
data
:
conf
.
payload
||
null
,
headers
,
headers
,
}))
}))
.
then
(
function
(
response
)
{
.
then
(
function
(
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