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
8b58f3d1
Commit
8b58f3d1
authored
Jul 22, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
6b7d7290
Pipeline
#16384
passed with stages
in 1 minute and 5 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
94 additions
and
64 deletions
+94
-64
Process.jsx
src/pages/EventProcessing/Process.jsx
+1
-1
User.jsx
src/pages/User/User.jsx
+46
-39
index.less
src/pages/User/index.less
+14
-0
Goods.jsx
src/pages/Work/components/Goods.jsx
+2
-2
Meet.jsx
src/pages/Work/components/Meet.jsx
+6
-6
Normal.jsx
src/pages/Work/components/Normal.jsx
+4
-3
PeopleInfo.jsx
src/pages/Work/components/PeopleInfo.jsx
+19
-11
instance.js
src/utils/instance.js
+2
-2
No files found.
src/pages/EventProcessing/Process.jsx
View file @
8b58f3d1
...
@@ -150,7 +150,7 @@ const Process = (props) => {
...
@@ -150,7 +150,7 @@ const Process = (props) => {
const
developer
=
localStorage
.
getItem
(
'developer'
);
const
developer
=
localStorage
.
getItem
(
'developer'
);
downloadFile
({
downloadFile
({
method
:
'post'
,
method
:
'post'
,
url
:
`/idtAppServiceV6/oApp/downloadLargeFile`
,
url
:
`/idtAppServiceV6/oApp/downloadLargeFile
Forword
`
,
body
:
{
uuid
,
tableId
,
developer
},
body
:
{
uuid
,
tableId
,
developer
},
}).
then
(
res
=>
{
}).
then
(
res
=>
{
var
downloadElement
=
document
.
createElement
(
'a'
);
var
downloadElement
=
document
.
createElement
(
'a'
);
...
...
src/pages/User/User.jsx
View file @
8b58f3d1
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
WingBlank
,
List
,
InputItem
,
TextareaItem
,
WhiteSpace
,
Toast
,
DatePicker
,
Picker
}
from
'antd-mobile'
import
{
WingBlank
,
List
,
InputItem
,
ImagePicker
,
WhiteSpace
,
Toast
,
DatePicker
,
Picker
}
from
'antd-mobile'
import
Document
from
'react-document-title'
;
import
Document
from
'react-document-title'
;
import
'../index.less'
;
import
'./index.less'
;
import
moment
from
'moment'
import
fileRequest
from
'../../utils/fileRequest'
;
import
fileRequest
from
'../../utils/fileRequest'
;
import
Upload
from
'rc-upload'
;
import
{
createForm
}
from
'rc-form'
;
import
{
createForm
}
from
'rc-form'
;
...
@@ -12,58 +11,66 @@ import { createForm } from 'rc-form';
...
@@ -12,58 +11,66 @@ import { createForm } from 'rc-form';
const
Send
=
(
props
)
=>
{
const
Send
=
(
props
)
=>
{
const
{
getFieldProps
}
=
props
.
form
;
const
{
getFieldProps
}
=
props
.
form
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
uploadPng
=
()
=>
{
const
formData
=
new
FormData
();
upload
.
length
>
0
&&
formData
.
append
(
'file'
,
upload
[
0
].
file
);
fileRequest
({
method
:
'post'
,
url
:
'/idtAppServiceV6/oApp/uploadPhoto'
,
payload
:
formData
}).
then
(
res
=>
{
});
};
const
onSubmit
=
()
=>
{
const
onSubmit
=
()
=>
{
props
.
form
.
validateFields
({
force
:
true
},
(
error
)
=>
{
props
.
form
.
validateFields
({
force
:
true
},
(
error
)
=>
{
const
values
=
props
.
form
.
getFieldsValue
();
const
values
=
props
.
form
.
getFieldsValue
();
const
jsonParam
=
{...
values
,
_mail_option
:
'send'
,
_mail_has_blob
:
upload
.
length
>
0
};
setLoading
(
true
);
values
.
gzrq
=
moment
(
values
.
gzrq
).
format
(
"YYYY-MM-DD"
);
const
formData
=
new
FormData
();
values
.
csrq
=
moment
(
values
.
csrq
).
format
(
"YYYY-MM-DD"
);
upload
.
length
>
0
&&
upload
.
forEach
(
file
=>
{
formData
.
append
(
'blob'
,
file
);
});
if
(
!
error
)
{
if
(
!
error
)
{
uploadPng
();
fileRequest
({
fileRequest
({
method
:
'post'
,
method
:
'post'
,
url
:
'/idtAppServiceV6/jspmail/sendMail'
,
url
:
'/idtAppServiceV6/oApp/changeUserInfo'
,
body
:
{
jsonParam
:
JSON
.
stringify
(
jsonParam
)},
body
:
{...
values
},
payload
:
formData
}).
then
(
res
=>
{
}).
then
(
res
=>
{
Toast
.
success
(
'发送成功'
);
Toast
.
success
(
'发送成功'
);
props
.
history
.
push
(
'/blank/mail'
);
props
.
history
.
push
(
'/blank/mail'
);
setLoading
(
true
)
});
});
}
else
{
}
else
{
Toast
.
fail
(
'请输入完整的主题、收件人、内容'
)
Toast
.
fail
(
'请输入完整的主题、收件人、内容'
)
}
}
});
});
};
};
const
[
upload
,
setUpload
]
=
useState
([]);
const
[
upload
,
setUpload
]
=
useState
([]);
const
uploaderProps
=
{
const
uploadChange
=
(
files
,
type
,
index
)
=>
{
multiple
:
true
,
console
.
log
(
files
,
type
,
index
)
beforeUpload
(
file
)
{
setUpload
(
files
)
const
newUpload
=
[...
upload
,
file
];
}
setUpload
(
newUpload
);
return
false
const
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
));
}
};
const
uploadDelete
=
uid
=>
{
const
newData
=
[...
upload
];
const
Index
=
newData
.
findIndex
(
item
=>
item
.
uid
===
uid
);
Index
>
-
1
&&
newData
.
splice
(
Index
,
1
);
setUpload
(
newData
)
};
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
return
(
return
(
<
Document
title=
"内部邮局"
>
<
Document
title=
"内部邮局"
>
<
WingBlank
>
<
WingBlank
>
<
WhiteSpace
/>
<
WhiteSpace
/>
<
form
>
<
form
>
<
List
>
<
List
>
<
div
className=
"user-img"
>
头像设置
<
ImagePicker
length=
{
1
}
files=
{
upload
}
onChange=
{
uploadChange
}
selectable=
{
upload
.
length
<
1
}
/>
</
div
>
{
/*<WingBlank>*/
}
{
/*<WingBlank>*/
}
{
/*{upload.length > 0 && upload.map((item, index) => (*/
}
{
/*{upload.length > 0 && upload.map((item, index) => (*/
}
{
/*<div>1111</div>*/
}
{
/*<div>1111</div>*/
}
...
@@ -73,21 +80,21 @@ const Send = (props) => {
...
@@ -73,21 +80,21 @@ const Send = (props) => {
{
/*<a className="auto-upload">上传附件 +</a>*/
}
{
/*<a className="auto-upload">上传附件 +</a>*/
}
{
/*</Upload>*/
}
{
/*</Upload>*/
}
<
InputItem
disabled=
{
true
}
value=
"11111"
>
姓名
</
InputItem
>
<
InputItem
disabled=
{
true
}
value=
{
userInfo
.
userealname
}
>
姓名
</
InputItem
>
<
InputItem
disabled=
{
true
}
value=
"11111"
>
账号
</
InputItem
>
<
InputItem
disabled=
{
true
}
value=
{
userInfo
.
useName
}
>
账号
</
InputItem
>
<
Picker
data=
{
[{
label
:
'男'
,
value
:
'男'
},
{
label
:
'女'
,
value
:
'女'
}]
}
cols=
{
1
}
{
...
getFieldProps
('
xb
')}
>
<
Picker
data=
{
[{
label
:
'男'
,
value
:
'男'
},
{
label
:
'女'
,
value
:
'女'
}]
}
cols=
{
1
}
{
...
getFieldProps
('
xb
'
,
{
initialValue
:
userInfo
.
xb
}
)}
>
<
List
.
Item
arrow=
"horizontal"
>
性别
</
List
.
Item
>
<
List
.
Item
arrow=
"horizontal"
>
性别
</
List
.
Item
>
</
Picker
>
</
Picker
>
<
DatePicker
mode=
"date"
className=
"send-date-style"
{
...
getFieldProps
('
gzrq
')}
>
<
DatePicker
mode=
"date"
className=
"send-date-style"
{
...
getFieldProps
('
gzrq
'
,
{
initialValue
:
new
Date
(
userInfo
.
gzrq
)}
)}
>
<
List
.
Item
arrow=
"horizontal"
>
工作日期
</
List
.
Item
>
<
List
.
Item
arrow=
"horizontal"
>
工作日期
</
List
.
Item
>
</
DatePicker
>
</
DatePicker
>
<
DatePicker
mode=
"date"
className=
"send-date-style"
{
...
getFieldProps
('
csrq
')}
onChange=
{
val
=>
console
.
log
(
val
)
}
>
<
DatePicker
mode=
"date"
className=
"send-date-style"
{
...
getFieldProps
('
csrq
'
,
{
initialValue
:
new
Date
(
userInfo
.
csrq
)}
)}
onChange=
{
val
=>
console
.
log
(
val
)
}
>
<
List
.
Item
arrow=
"horizontal"
>
出生日期
</
List
.
Item
>
<
List
.
Item
arrow=
"horizontal"
>
出生日期
</
List
.
Item
>
</
DatePicker
>
</
DatePicker
>
<
InputItem
{
...
getFieldProps
('
gzdh
')}
>
工作电话
</
InputItem
>
<
InputItem
{
...
getFieldProps
('
gzdh
'
,
{
initialValue
:
userInfo
.
gzdh
}
)}
>
工作电话
</
InputItem
>
<
InputItem
{
...
getFieldProps
('
yddh
')}
>
手机号码
</
InputItem
>
<
InputItem
{
...
getFieldProps
('
yddh
'
,
{
initialValue
:
userInfo
.
yddh
}
)}
>
手机号码
</
InputItem
>
<
InputItem
{
...
getFieldProps
('
sjxh
')}
>
手机小号
</
InputItem
>
<
InputItem
{
...
getFieldProps
('
sjxh
'
,
{
initialValue
:
userInfo
.
sjxh
}
)}
>
手机小号
</
InputItem
>
<
InputItem
{
...
getFieldProps
('
email
')}
>
邮箱地址
</
InputItem
>
<
InputItem
{
...
getFieldProps
('
email
'
,
{
initialValue
:
userInfo
.
email
}
)}
>
邮箱地址
</
InputItem
>
</
List
>
</
List
>
</
form
>
</
form
>
<
div
className=
"event-footer"
>
<
div
className=
"event-footer"
>
...
...
src/pages/User/index.less
0 → 100644
View file @
8b58f3d1
.user-img{
display: flex;
justify-content: flex-start;
align-items: center;
border-bottom: 1px solid rgba(239, 239, 239, 1);
font-size: 17px;
padding: 0 15px;
height: 100px;
}
.am-image-picker{
margin-left: 20px;
width: 100px;
height: 100px;
}
src/pages/Work/components/Goods.jsx
View file @
8b58f3d1
...
@@ -106,11 +106,11 @@ const Send = (props) => {
...
@@ -106,11 +106,11 @@ const Send = (props) => {
const
uploadFile
=
(
upload
,
name
,
attachId
)
=>
{
const
uploadFile
=
(
upload
,
name
,
attachId
)
=>
{
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
upload
.
length
>
0
&&
upload
.
forEach
(
file
=>
{
upload
.
length
>
0
&&
upload
.
forEach
(
file
=>
{
formData
.
append
(
'
blob
'
,
file
);
formData
.
append
(
'
file
'
,
file
);
});
});
upload
.
length
>
0
&&
fileRequest
({
upload
.
length
>
0
&&
fileRequest
({
method
:
'post'
,
method
:
'post'
,
url
:
'/idtAppServiceV6/oApp/balanceUploadFile'
,
url
:
'/idtAppServiceV6/oApp/balanceUploadFile
Adapt
'
,
body
:
{
body
:
{
tableId
:
submitData
.
tableId
,
tableId
:
submitData
.
tableId
,
ATTACH_ID
:
attachId
,
ATTACH_ID
:
attachId
,
...
...
src/pages/Work/components/Meet.jsx
View file @
8b58f3d1
...
@@ -42,9 +42,9 @@ const Send = (props) => {
...
@@ -42,9 +42,9 @@ const Send = (props) => {
}).
then
(
res
=>
{
}).
then
(
res
=>
{
res
.
uuid
&&
setUUID
(
res
.
uuid
);
res
.
uuid
&&
setUUID
(
res
.
uuid
);
});
});
UUID
&&
upload
.
length
>
0
&&
upload2
.
length
>
0
&&
new
Promise
((
resolve
=>
{
UUID
&&
new
Promise
((
resolve
=>
{
uploadFile
(
upload
,
'zw'
,
UUID
);
upload
.
length
>
0
&&
upload
File
(
upload
,
'zw'
,
UUID
);
uploadFile
(
upload2
,
'fj'
,
UUID
);
upload
2
.
length
>
0
&&
upload
File
(
upload2
,
'fj'
,
UUID
);
resolve
()
resolve
()
})).
then
(()
=>
{
})).
then
(()
=>
{
Toast
.
success
(
'新增成功'
);
Toast
.
success
(
'新增成功'
);
...
@@ -88,11 +88,11 @@ const Send = (props) => {
...
@@ -88,11 +88,11 @@ const Send = (props) => {
const
uploadFile
=
(
upload
,
name
,
attachId
)
=>
{
const
uploadFile
=
(
upload
,
name
,
attachId
)
=>
{
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
upload
.
length
>
0
&&
upload
.
forEach
(
file
=>
{
upload
.
length
>
0
&&
upload
.
forEach
(
file
=>
{
formData
.
append
(
'
blob
'
,
file
);
formData
.
append
(
'
file
'
,
file
);
});
});
upload
.
length
>
0
&&
fileRequest
({
upload
.
length
>
0
&&
fileRequest
({
method
:
'post'
,
method
:
'post'
,
url
:
'/idtAppServiceV6/oApp/balanceUploadFile'
,
url
:
'/idtAppServiceV6/oApp/balanceUploadFile
Adapt
'
,
body
:
{
body
:
{
tableId
:
submitData
.
tableId
,
tableId
:
submitData
.
tableId
,
ATTACH_ID
:
attachId
,
ATTACH_ID
:
attachId
,
...
@@ -239,7 +239,7 @@ const Send = (props) => {
...
@@ -239,7 +239,7 @@ const Send = (props) => {
{
formData
.
length
>
0
&&
(
{
formData
.
length
>
0
&&
(
<
div
className=
"event-footer"
>
<
div
className=
"event-footer"
>
{
/*<Button type="primary">保存</Button>*/
}
{
/*<Button type="primary">保存</Button>*/
}
<
div
className=
{
`footer-button ${sP.length > 0 ? '' : 'btn-disabled'}`
}
onClick=
{
sP
.
length
===
0
?
onSubmit
:
null
}
>
保存
</
div
>
<
div
className=
{
`footer-button ${sP.length > 0 ? '' : 'btn-disabled'}`
}
onClick=
{
sP
.
length
>
0
?
onSubmit
:
null
}
>
保存
</
div
>
</
div
>
</
div
>
)
}
)
}
...
...
src/pages/Work/components/Normal.jsx
View file @
8b58f3d1
...
@@ -54,8 +54,9 @@ const Send = (props) => {
...
@@ -54,8 +54,9 @@ const Send = (props) => {
res
.
uuid
&&
uploadFile
(
upload
,
'zw'
,
res
.
uuid
);
res
.
uuid
&&
uploadFile
(
upload
,
'zw'
,
res
.
uuid
);
res
.
uuid
&&
uploadFile
(
upload2
,
'fj'
,
res
.
uuid
);
res
.
uuid
&&
uploadFile
(
upload2
,
'fj'
,
res
.
uuid
);
resolve
()
resolve
()
})).
then
((
res
)
=>
{
})).
then
(()
=>
{
if
(
name
!==
'办公用品采购'
)
{
if
(
name
!==
'办公用品采购'
)
{
console
.
log
(
res
)
res
&&
res
.
uuid
&&
Toast
.
success
(
'新增成功'
);
res
&&
res
.
uuid
&&
Toast
.
success
(
'新增成功'
);
res
&&
res
.
uuid
&&
props
.
history
.
goBack
()
res
&&
res
.
uuid
&&
props
.
history
.
goBack
()
}
else
{
}
else
{
...
@@ -102,11 +103,11 @@ const Send = (props) => {
...
@@ -102,11 +103,11 @@ const Send = (props) => {
const
uploadFile
=
(
upload
,
name
,
attachId
)
=>
{
const
uploadFile
=
(
upload
,
name
,
attachId
)
=>
{
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
upload
.
length
>
0
&&
upload
.
forEach
(
file
=>
{
upload
.
length
>
0
&&
upload
.
forEach
(
file
=>
{
formData
.
append
(
'
blob
'
,
file
);
formData
.
append
(
'
file
'
,
file
);
});
});
upload
.
length
>
0
&&
fileRequest
({
upload
.
length
>
0
&&
fileRequest
({
method
:
'post'
,
method
:
'post'
,
url
:
'/idtAppServiceV6/oApp/balanceUploadFile'
,
url
:
'/idtAppServiceV6/oApp/balanceUploadFile
Adapt
'
,
body
:
{
body
:
{
tableId
:
submitData
.
tableId
,
tableId
:
submitData
.
tableId
,
ATTACH_ID
:
attachId
,
ATTACH_ID
:
attachId
,
...
...
src/pages/Work/components/PeopleInfo.jsx
View file @
8b58f3d1
...
@@ -38,17 +38,25 @@ const Send = (props) => {
...
@@ -38,17 +38,25 @@ const Send = (props) => {
onClose
(
false
)
onClose
(
false
)
};
};
const
peopleSubmit
=
(
data
)
=>
{
const
peopleSubmit
=
(
data
)
=>
{
console
.
log
(
data
)
const
developer
=
localStorage
.
getItem
(
'developer'
);
// axiosRequest({
const
newData
=
data
.
map
(
item
=>
{
// method: 'post',
delete
item
.
checked
;
// url: '/idtAppServiceV6/exclude/control/getList',
delete
item
.
LEVEL
;
// body: {
delete
item
.
BH
;
// script: 'hysqTreeAll',
item
.
ATTACH_ID
=
UUID
;
// args: JSON.stringify(['47c2c4f9235aa97f01235aa97f7c0000']),
return
item
// },
});
// }).then((res) => {
axiosRequest
({
//
method
:
'post'
,
// })
url
:
'/idtAppServiceV6/saveChRyInfo.jsp'
,
body
:
{
ATTACH_ID
:
UUID
,
paramsList
:
JSON
.
stringify
(
newData
),
developer
},
}).
then
((
res
)
=>
{
})
}
}
return
(
return
(
...
...
src/utils/instance.js
View file @
8b58f3d1
...
@@ -67,8 +67,8 @@ export const createAPI = (baseURL) => {
...
@@ -67,8 +67,8 @@ export const createAPI = (baseURL) => {
userealname
:
response
.
data
.
userealname
,
userealname
:
response
.
data
.
userealname
,
useName
:
response
.
data
.
userName
,
useName
:
response
.
data
.
userName
,
xb
:
response
.
data
.
xb
,
xb
:
response
.
data
.
xb
,
gzrq
:
new
Date
(
response
.
data
.
gzrq
)
,
gzrq
:
response
.
data
.
gzrq
,
csrq
:
new
Date
(
response
.
data
.
csrq
)
,
csrq
:
response
.
data
.
csrq
,
gzdh
:
response
.
data
.
gzdh
,
gzdh
:
response
.
data
.
gzdh
,
yddh
:
response
.
data
.
yddh
,
yddh
:
response
.
data
.
yddh
,
sjxh
:
response
.
data
.
sjxh
,
sjxh
:
response
.
data
.
sjxh
,
...
...
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