Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gk-online-teacher
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
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
huanglu
gk-online-teacher
Commits
3977b8ff
Commit
3977b8ff
authored
Dec 16, 2020
by
刘阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改问题
parent
cbd42274
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
index.vue
src/views/answer-screen/index.vue
+17
-10
No files found.
src/views/answer-screen/index.vue
View file @
3977b8ff
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
ref=
"draw"
ref=
"draw"
:points=
"paints[currentIndex]"
:points=
"paints[currentIndex]"
:paintType=
"paintType"
:paintType=
"paintType"
:drawType=
"drawType"
class=
"draw-board"
class=
"draw-board"
/>
/>
<div
class=
"tools-wrap"
>
<div
class=
"tools-wrap"
>
...
@@ -19,15 +20,15 @@
...
@@ -19,15 +20,15 @@
<el-button
@
click=
"sendAnswer"
<el-button
@
click=
"sendAnswer"
type=
"primary"
type=
"primary"
class=
"itm"
class=
"itm"
:disabled=
"
disabled
"
>
提交
:disabled=
"
false
"
>
提交
</el-button>
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"questionType === 0"
>
<div
>
<div
class=
"ans-wrap"
>
<div
v-if=
"questionType === 3"
class=
"ans-wrap"
>
<el-button
<el-button
v-for=
"itm in Answers"
v-for=
"itm in Answers"
:disabled=
"disable
d
"
:disabled=
"disable"
@
click=
"chooseAnswer(itm.value)"
@
click=
"chooseAnswer(itm.value)"
:key=
"itm.value"
:key=
"itm.value"
type=
"primary"
type=
"primary"
...
@@ -37,7 +38,7 @@
...
@@ -37,7 +38,7 @@
</el-button>
</el-button>
</div>
</div>
</div>
</div>
<el-button
v-if=
"questionType ===
0
"
<el-button
v-if=
"questionType ===
3
"
type=
"primary"
type=
"primary"
@
click=
"sendAnswer"
@
click=
"sendAnswer"
:disabled=
"disabled"
:disabled=
"disabled"
...
@@ -80,7 +81,8 @@ export default {
...
@@ -80,7 +81,8 @@ export default {
currentIndex
:
''
,
currentIndex
:
''
,
questionType
:
-
1
,
questionType
:
-
1
,
paintTypes
,
paintTypes
,
getMsg
:
{}
getMsg
:
{},
drawType
:
'mouse'
};
};
},
},
methods
:
{
methods
:
{
...
@@ -98,7 +100,7 @@ export default {
...
@@ -98,7 +100,7 @@ export default {
},
},
sendAnswer
()
{
sendAnswer
()
{
let
msg
=
''
let
msg
=
''
if
(
this
.
questionType
===
0
)
{
if
(
this
.
questionType
===
3
)
{
msg
=
this
.
currentAns
msg
=
this
.
currentAns
}
else
if
(
this
.
questionType
===
1
||
this
.
questionType
===
2
)
{
}
else
if
(
this
.
questionType
===
1
||
this
.
questionType
===
2
)
{
msg
=
this
.
$refs
.
draw
.
getImg
()
msg
=
this
.
$refs
.
draw
.
getImg
()
...
@@ -107,10 +109,11 @@ export default {
...
@@ -107,10 +109,11 @@ export default {
}
}
socket
.
sendGroupMsg
(
socket
.
sendGroupMsg
(
{
{
type
:
'answer'
,
payload
:
{
payload
:
{
type
:
this
.
questionType
,
type
:
this
.
questionType
,
answer
:
msg
,
answer
:
msg
,
username
:
this
.
$route
.
query
.
username
||
''
}
}
},
},
(
data
)
=>
{
(
data
)
=>
{
...
@@ -126,8 +129,10 @@ export default {
...
@@ -126,8 +129,10 @@ export default {
// "payload":{"type":0,"title":"选择题"}}]
// "payload":{"type":0,"title":"选择题"}}]
if
(
msg
&&
msg
.
from
&&
msg
.
from
.
indexOf
(
'teacher'
)
>
-
1
&&
msg
.
payload
.
type
>
-
1
)
{
if
(
msg
&&
msg
.
from
&&
msg
.
from
.
indexOf
(
'teacher'
)
>
-
1
&&
msg
.
payload
.
type
>
-
1
)
{
this
.
questionType
=
msg
.
payload
.
type
this
.
questionType
=
msg
.
payload
.
type
if
(
this
.
questionType
===
3
)
{
this
.
disabled
=
false
}
}
}
console
.
log
(
'msg'
,
this
.
questionType
);
}
}
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
@@ -136,6 +141,8 @@ export default {
...
@@ -136,6 +141,8 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
paintType
=
'pencil'
;
this
.
paintType
=
'pencil'
;
this
.
drawType
=
'mouse'
navigator
.
userAgent
.
toLowerCase
();
socket
.
onMsg
(
this
.
dealMsg
);
socket
.
onMsg
(
this
.
dealMsg
);
document
.
body
.
addEventListener
(
'touchmove'
,
(
e
)
=>
{
document
.
body
.
addEventListener
(
'touchmove'
,
(
e
)
=>
{
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -181,7 +188,7 @@ export default {
...
@@ -181,7 +188,7 @@ export default {
margin
:
10px
30px
;
margin
:
10px
30px
;
}
}
.ans-itm-select
{
.ans-itm-select
{
background-color
:
rgb
(
18
,
72
,
134
);
background-color
:
rgb
(
29
,
126
,
236
);
}
}
}
}
.ans-commit
{
.ans-commit
{
...
...
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