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
6045c471
Commit
6045c471
authored
Nov 01, 2021
by
Asjoker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问卷管理-详情细化
parent
fc4f35e3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
327 additions
and
209 deletions
+327
-209
QuestionnaireCtrl.java
src/main/java/com/tiptimes/ctrl/QuestionnaireCtrl.java
+1
-1
questionnaire_information.jsp
...n/webapp/WEB-INF/page/space/questionnaire_information.jsp
+226
-207
questionnaire_Information.js
src/main/webapp/res/js/space/questionnaire_Information.js
+100
-1
No files found.
src/main/java/com/tiptimes/ctrl/QuestionnaireCtrl.java
View file @
6045c471
...
@@ -172,7 +172,7 @@ public class QuestionnaireCtrl {
...
@@ -172,7 +172,7 @@ public class QuestionnaireCtrl {
*/
*/
@RequestMapping
({
"/selectRecordList"
})
@RequestMapping
({
"/selectRecordList"
})
@ResponseBody
@ResponseBody
public
Map
<
String
,
Object
>
selectRecordList
(
@RequestBody
Record
record
){
public
Map
<
String
,
Object
>
selectRecordList
(
Record
record
){
List
<
Record
>
recordList
=
this
.
questionnaireService
.
selectRecordList
(
record
);
List
<
Record
>
recordList
=
this
.
questionnaireService
.
selectRecordList
(
record
);
Map
<
String
,
Object
>
map
=
new
HashMap
();
Map
<
String
,
Object
>
map
=
new
HashMap
();
Map
<
String
,
Object
>
data
=
new
HashMap
();
Map
<
String
,
Object
>
data
=
new
HashMap
();
...
...
src/main/webapp/WEB-INF/page/space/questionnaire_information.jsp
View file @
6045c471
This diff is collapsed.
Click to expand it.
src/main/webapp/res/js/space/questionnaire_Information.js
View file @
6045c471
...
@@ -243,8 +243,104 @@ function getMaterialInformationExercise(){
...
@@ -243,8 +243,104 @@ function getMaterialInformationExercise(){
});
});
}
}
// function totalTest(){
// $(document).ready(function () {
// $('input[name*="option_"]').each(function () {
// if ($(this).val()) {
// var opid = $(this).attr('name').replace('option_', '')
// console.log('options_id:', opid)
// if ($(this.parentNode).parent("tr").prevAll().length + 1) {
// if ($(this.parentNode).parent("tr").prevAll().length > 0){
// console.log('group:', $(this.parentNode).parent("tr").prevAll().length + 1)
// } else {
// console.log('group:', 1)
// }
// }
// console.log('value', $(this).val())
// }
// });
// });
// }
function
saveQuestionnaire
(){
var
data
=
[];
$
(
document
).
ready
(
function
()
{
$
(
'input[name*="option_"]'
).
each
(
function
()
{
if
(
$
(
this
).
val
())
{
var
tempObj
=
{};
tempObj
[
'optionsId'
]
=
$
(
this
).
attr
(
'name'
).
replace
(
'option_'
,
''
);
if
(
$
(
this
.
parentNode
).
parent
(
"tr"
).
prevAll
().
length
+
1
)
{
if
(
$
(
this
.
parentNode
).
parent
(
"tr"
).
prevAll
().
length
>
0
){
tempObj
[
'group'
]
=
$
(
this
.
parentNode
).
parent
(
"tr"
).
prevAll
().
length
+
1
;
}
else
{
tempObj
[
'group'
]
=
1
;
}
}
tempObj
[
'value'
]
=
$
(
this
).
val
();
data
.
push
(
tempObj
)
}
});
});
$
(
document
).
ready
(
function
()
{
$
(
'select[name*="option_"]'
).
each
(
function
()
{
if
(
$
(
this
).
val
())
{
var
tempObj
=
{};
tempObj
[
'optionsId'
]
=
$
(
this
).
attr
(
'name'
).
replace
(
'option_'
,
''
);
if
(
$
(
this
.
parentNode
).
parent
(
"tr"
).
prevAll
().
length
+
1
)
{
if
(
$
(
this
.
parentNode
).
parent
(
"tr"
).
prevAll
().
length
>
0
){
tempObj
[
'group'
]
=
$
(
this
.
parentNode
).
parent
(
"tr"
).
prevAll
().
length
+
1
;
}
else
{
tempObj
[
'group'
]
=
1
;
}
}
tempObj
[
'value'
]
=
$
(
this
).
val
();
data
.
push
(
tempObj
);
}
});
});
if
(
$
(
'input:radio[name=last_two]:checked'
).
val
())
{
var
tempObj1
=
{};
tempObj1
[
'optionsId'
]
=
97
;
tempObj1
[
'group'
]
=
1
;
tempObj1
[
'value'
]
=
$
(
'input:radio[name=last_two]:checked'
).
val
();
data
.
push
(
tempObj1
);
}
if
(
$
(
'input:radio[name=last_one]:checked'
).
val
())
{
var
tempObj2
=
{};
tempObj2
[
'optionsId'
]
=
98
;
tempObj2
[
'group'
]
=
1
;
tempObj2
[
'value'
]
=
$
(
'input:radio[name=last_one]:checked'
).
val
();
data
.
push
(
tempObj2
);
}
console
.
log
(
sessionStorage
.
getItem
(
'realId'
),
'!!!!!!!!!!!!!!'
)
var
param
=
{
id
:
1
,
type
:
0
,
answersList
:
data
};
$
.
ajax
({
type
:
"POST"
,
url
:
webroot
+
"questionnaire/save"
,
data
:
JSON
.
stringify
(
param
),
async
:
false
,
contentType
:
'application/json;charset=UTF-8'
,
success
:
function
(
result
)
{
}
});
}
function
submitQuestionnaire
()
{
}
function
testListApi
()
{
function
testListApi
()
{
var
url
=
webroot
+
"questionnaire/selectRecordList
?questionnaireUuid=1
"
;
var
url
=
webroot
+
"questionnaire/selectRecordList"
;
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
oTable
=
$
(
'#hidden-table-info'
).
dataTable
(
{
oTable
=
$
(
'#hidden-table-info'
).
dataTable
(
{
...
@@ -271,6 +367,9 @@ function testListApi() {
...
@@ -271,6 +367,9 @@ function testListApi() {
"ajax"
:
{
//ajax方式向后台发送请求
"ajax"
:
{
//ajax方式向后台发送请求
"type"
:
"POST"
,
"type"
:
"POST"
,
"url"
:
url
,
"url"
:
url
,
"data"
:
function
(
d
){
d
.
questionnaireUuid
=
1
},
"dataType"
:
"json"
,
"dataType"
:
"json"
,
"dataSrc"
:
"data.recordList"
"dataSrc"
:
"data.recordList"
},
},
...
...
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