Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
platform
Project
Project
Details
Activity
Releases
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
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王琮
platform
Commits
3ccbcf48
Commit
3ccbcf48
authored
Dec 07, 2021
by
Asjoker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加自动保存功能
parent
bbf1c36c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
7 deletions
+36
-7
questionnaire_information.jsp
...bapp/WEB-INF/page/education/questionnaire_information.jsp
+2
-1
questionnaire_information.jsp
...n/webapp/WEB-INF/page/space/questionnaire_information.jsp
+1
-0
questionnaire_Information.js
...main/webapp/res/js/education/questionnaire_Information.js
+16
-2
questionnaire_Information.js
src/main/webapp/res/js/space/questionnaire_Information.js
+17
-4
No files found.
src/main/webapp/WEB-INF/page/education/questionnaire_information.jsp
View file @
3ccbcf48
...
@@ -284,7 +284,7 @@
...
@@ -284,7 +284,7 @@
</div>
</div>
<div
style=
"margin: 30px 0 0;display: inline-block"
>
<div
style=
"margin: 30px 0 0;display: inline-block"
>
<label>
备注
</label>
<label>
备注
</label>
<textarea
name=
"question_
6
"
cols=
"30"
rows=
"3"
></textarea>
<textarea
name=
"question_
5
"
cols=
"30"
rows=
"3"
></textarea>
</div>
</div>
</div>
</div>
...
@@ -1355,6 +1355,7 @@
...
@@ -1355,6 +1355,7 @@
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/bootstrap.min.js?v=3.3.6"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/bootstrap.min.js?v=3.3.6"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/plugins/sweetalert/sweetalert.min.js"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/plugins/sweetalert/sweetalert.min.js"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/plugins/layer/layer.min.js"
></script>
<!-- 自定义js -->
<!-- 自定义js -->
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/content.js?v=1.0.0"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/content.js?v=1.0.0"
></script>
<!-- Prettyfile -->
<!-- Prettyfile -->
...
...
src/main/webapp/WEB-INF/page/space/questionnaire_information.jsp
View file @
3ccbcf48
...
@@ -1570,6 +1570,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
...
@@ -1570,6 +1570,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/bootstrap.min.js?v=3.3.6"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/bootstrap.min.js?v=3.3.6"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/plugins/sweetalert/sweetalert.min.js"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/plugins/sweetalert/sweetalert.min.js"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/plugins/layer/layer.min.js"
></script>
<!-- 自定义js -->
<!-- 自定义js -->
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/content.js?v=1.0.0"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/content.js?v=1.0.0"
></script>
<!-- Prettyfile -->
<!-- Prettyfile -->
...
...
src/main/webapp/res/js/education/questionnaire_Information.js
View file @
3ccbcf48
...
@@ -11,6 +11,9 @@ $(function () {
...
@@ -11,6 +11,9 @@ $(function () {
StatusCheck
();
StatusCheck
();
})
})
// 实现10分钟1次自动保存
var
ocarina
=
self
.
setInterval
(
"timeCircleSave()"
,
600000
);
var
processStatus
=
0
var
processStatus
=
0
recordId
recordId
var
oTable
;
var
oTable
;
...
@@ -481,7 +484,7 @@ function previews(url) {
...
@@ -481,7 +484,7 @@ function previews(url) {
window
.
open
(
`
${
window
.
location
.
origin
}${
url
}
`
)
window
.
open
(
`
${
window
.
location
.
origin
}${
url
}
`
)
}
}
function
saveQuestionnaire
(){
function
saveQuestionnaire
(
isAuto
){
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
var
rejectReason
=
''
var
rejectReason
=
''
$
(
'textarea[name*="question_"]'
).
each
(
function
()
{
$
(
'textarea[name*="question_"]'
).
each
(
function
()
{
...
@@ -510,11 +513,22 @@ function saveQuestionnaire(){
...
@@ -510,11 +513,22 @@ function saveQuestionnaire(){
async
:
false
,
async
:
false
,
contentType
:
'application/json;charset=UTF-8'
,
contentType
:
'application/json;charset=UTF-8'
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
swal
(
"成功!"
,
'暂存成功'
,
"success"
);
if
(
result
.
result
==
true
){
if
(
isAuto
===
1
)
{
layer
.
msg
(
'已自动暂存'
);
}
else
{
swal
(
"成功!"
,
'暂存成功'
,
"success"
);
}
}
}
}
});
});
}
}
// 定时自动暂存
function
timeCircleSave
()
{
saveQuestionnaire
(
1
);
}
function
passQuestionnaire
(){
function
passQuestionnaire
(){
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'textarea[name*="question_"]'
).
each
(
function
()
{
$
(
'textarea[name*="question_"]'
).
each
(
function
()
{
...
...
src/main/webapp/res/js/space/questionnaire_Information.js
View file @
3ccbcf48
...
@@ -17,6 +17,8 @@ $(function () {
...
@@ -17,6 +17,8 @@ $(function () {
StatusCheck
();
StatusCheck
();
})
})
var
ocarina
=
self
.
setInterval
(
"timeCircleSave()"
,
600000
);
var
oTable
;
var
oTable
;
var
processStatus
=
0
var
processStatus
=
0
// 问卷状态自检
// 问卷状态自检
...
@@ -655,7 +657,7 @@ function getSaveData() {
...
@@ -655,7 +657,7 @@ function getSaveData() {
});
});
}
}
function
saveQuestionnaire
(
type
){
function
saveQuestionnaire
(
type
,
isAuto
){
var
writePeople
=
''
var
writePeople
=
''
var
phoneNumber
=
''
var
phoneNumber
=
''
formData
=
[];
formData
=
[];
...
@@ -767,10 +769,16 @@ function saveQuestionnaire(type){
...
@@ -767,10 +769,16 @@ function saveQuestionnaire(type){
contentType
:
'application/json;charset=UTF-8'
,
contentType
:
'application/json;charset=UTF-8'
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
if
(
result
.
result
==
true
){
if
(
result
.
result
==
true
){
if
(
type
===
0
){
if
(
isAuto
===
1
)
{
swal
(
"成功!"
,
"暂存成功!"
,
"success"
);
if
(
type
===
0
){
layer
.
msg
(
'已自动暂存'
);
}
}
else
{
}
else
{
swal
(
"成功!"
,
"上报成功!"
,
"success"
);
if
(
type
===
0
){
swal
(
"成功!"
,
"暂存成功!"
,
"success"
);
}
else
{
swal
(
"成功!"
,
"上报成功!"
,
"success"
);
}
}
}
}
else
{
}
else
{
swal
(
"失败!"
,
result
.
msg
,
"error"
);
swal
(
"失败!"
,
result
.
msg
,
"error"
);
...
@@ -779,6 +787,11 @@ function saveQuestionnaire(type){
...
@@ -779,6 +787,11 @@ function saveQuestionnaire(type){
});
});
}
}
// 定时自动暂存
function
timeCircleSave
()
{
saveQuestionnaire
(
0
,
1
);
}
function
submitQuestionnaire
()
{
function
submitQuestionnaire
()
{
toValidate
();
toValidate
();
...
...
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