Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
6c372418
Commit
6c372418
authored
Mar 02, 2021
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多选题问题
parent
77012c0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
pages.json
take-order/pages.json
+12
-12
index.vue
take-order/pages/exam/index.vue
+16
-1
No files found.
take-order/pages.json
View file @
6c372418
...
...
@@ -6,12 +6,18 @@
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/settle/index"
,
"style"
:
{
"navigationBarTitleText"
:
"充电桩安装招募"
}
{
"path"
:
"pages/settle/index"
,
"style"
:
{
"navigationBarTitleText"
:
"充电桩安装招募"
}
},{
"path"
:
"pages/exam/start"
,
"style"
:
{
"navigationBarTitleText"
:
"考试"
}
},{
"path"
:
"pages/settle/base"
,
"style"
:
{
...
...
@@ -30,12 +36,6 @@
"navigationBarTitleText"
:
"入驻考试"
}
},{
"path"
:
"pages/exam/start"
,
"style"
:
{
"navigationBarTitleText"
:
"考试"
}
},{
"path"
:
"pages/index/index"
,
"style"
:
{
...
...
take-order/pages/exam/index.vue
View file @
6c372418
...
...
@@ -339,8 +339,9 @@
handleData
:
function
()
{
this
.
currentItem
.
answerList
.
forEach
(
item
=>
{
this
.
currentItem
.
answerList
.
forEach
(
(
item
,
index
)
=>
{
item
.
isSelect
=
false
this
.
$set
(
this
.
currentItem
.
answerList
,
index
,
item
)
})
},
...
...
@@ -366,6 +367,11 @@
itemClick
:
function
(
currentItem
,
ikey
)
{
this
.
isSelect
=
true
console
.
log
(
'选点点击--处理前--this.currentItem.answerList:'
)
console
.
log
(
this
.
currentItem
.
answerList
)
console
.
log
(
'选点点击--处理前--ikey:'
)
console
.
log
(
ikey
)
//answerType 题目类型,1单选,2多选,3简答,
...
...
@@ -375,14 +381,19 @@
if
(
this
.
currentItem
.
answerType
==
2
)
{
//多选
if
(
ikey
==
i
)
{
item
.
isSelect
=
!
item
.
isSelect
}
}
else
{
//单选/简答
if
(
ikey
==
i
)
{
item
.
isSelect
=
!
item
.
isSelect
}
else
{
item
.
isSelect
=
false
}
}
this
.
$set
(
this
.
currentItem
.
answerList
[
i
],
isSelect
,
item
.
isSelect
)
}
...
...
@@ -395,6 +406,10 @@
//有选答案
this
.
isSelect
=
isSelect
console
.
log
(
'选点点击--处理后--this.currentItem.answerList:'
)
console
.
log
(
this
.
currentItem
.
answerList
)
},
...
...
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