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
59ab0dbd
Commit
59ab0dbd
authored
Dec 23, 2020
by
甘瑞文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学生
parent
2fdc170a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
47 deletions
+46
-47
.eslintignore
.eslintignore
+2
-1
index.vue
src/views/answer-screen/cmps/drawing-board/index.vue
+3
-4
index.vue
src/views/answer-screen/cmps/locker/index.vue
+0
-1
index.vue
src/views/answer-screen/cmps/quick-response/index.vue
+16
-17
index.vue
src/views/answer-screen/cmps/select-question/index.vue
+15
-16
index.vue
src/views/answer-screen/index.vue
+10
-8
No files found.
.eslintignore
View file @
59ab0dbd
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
/config/
/config/
/dist
/dist
/node_modules/
/node_modules/
/*.js
/*.js
\ No newline at end of file
src/views/answer-screen/cmps/drawing-board/index.vue
View file @
59ab0dbd
...
@@ -46,10 +46,9 @@ export default {
...
@@ -46,10 +46,9 @@ export default {
GeekDrawBoard
GeekDrawBoard
},
},
props
:
{
props
:
{
// 检测类型 + 其他验证
// 检测类型 + 其他验证
eventId
:
{
eventId
:
{
type
:
String
,
type
:
String
,
default
:
0
,
required
:
true
required
:
true
}
}
},
},
...
@@ -72,13 +71,13 @@ export default {
...
@@ -72,13 +71,13 @@ export default {
this
.
paintType
=
title
;
this
.
paintType
=
title
;
},
},
handleSubmit
()
{
handleSubmit
()
{
le
t
msg
=
this
.
$refs
.
draw
.
getImg
()
cons
t
msg
=
this
.
$refs
.
draw
.
getImg
()
this
.
submitting
=
true
this
.
submitting
=
true
socket
.
sendGroupMsg
(
socket
.
sendGroupMsg
(
{
{
type
:
'answer'
,
type
:
'answer'
,
payload
:
{
payload
:
{
type
:
1
,
//简答题1 选择题3 抢答2
type
:
1
,
//
简答题1 选择题3 抢答2
answer
:
msg
,
answer
:
msg
,
eventId
:
this
.
eventId
,
eventId
:
this
.
eventId
,
username
:
this
.
$route
.
query
.
username
||
''
username
:
this
.
$route
.
query
.
username
||
''
...
...
src/views/answer-screen/cmps/locker/index.vue
View file @
59ab0dbd
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'locker'
,
name
:
'locker'
,
data
()
{
data
()
{
...
...
src/views/answer-screen/cmps/quick-response/index.vue
View file @
59ab0dbd
...
@@ -36,8 +36,8 @@ export default {
...
@@ -36,8 +36,8 @@ export default {
};
};
},
},
computed
:
{
computed
:
{
countingText
:
function
()
{
countingText
()
{
return
this
.
counttimes
>
4
?
"Ready~"
:
(
this
.
counttimes
>
3
?
"Go!"
:
this
.
counttimes
)
return
this
.
counttimes
>
4
?
'Ready~'
:
(
this
.
counttimes
>
3
?
'Go!'
:
this
.
counttimes
)
}
}
},
},
methods
:
{
methods
:
{
...
@@ -45,22 +45,21 @@ export default {
...
@@ -45,22 +45,21 @@ export default {
console
.
log
(
'===handleSubmit==='
);
console
.
log
(
'===handleSubmit==='
);
this
.
submitting
=
true
this
.
submitting
=
true
socket
.
sendGroupMsg
({
socket
.
sendGroupMsg
({
type
:
'answer'
,
type
:
'answer'
,
payload
:
{
payload
:
{
type
:
1
,
type
:
1
,
answer
:
''
,
answer
:
''
,
eventId
:
this
.
eventId
,
eventId
:
this
.
eventId
,
username
:
this
.
$route
.
query
.
username
||
''
username
:
this
.
$route
.
query
.
username
||
''
}
},
(
data
)
=>
{
this
.
stage
=
'submitted'
console
.
log
(
'回执'
,
data
);
}
}
);
},
(
data
)
=>
{
this
.
stage
=
'submitted'
console
.
log
(
'回执'
,
data
);
});
},
},
startCountdown
()
{
startCountdown
()
{
if
(
this
.
intervalId
)
{
if
(
this
.
intervalId
)
{
clearInterval
(
this
.
intervalId
)
clearInterval
(
this
.
intervalId
)
}
}
this
.
intervalId
=
0
this
.
intervalId
=
0
...
@@ -69,8 +68,8 @@ export default {
...
@@ -69,8 +68,8 @@ export default {
this
.
intervalId
=
setInterval
(
this
.
countdown
,
1000
)
this
.
intervalId
=
setInterval
(
this
.
countdown
,
1000
)
},
},
countdown
()
{
countdown
()
{
if
(
this
.
counttimes
<=
1
)
{
if
(
this
.
counttimes
<=
1
)
{
if
(
this
.
intervalId
)
{
if
(
this
.
intervalId
)
{
clearInterval
(
this
.
intervalId
)
clearInterval
(
this
.
intervalId
)
}
}
this
.
stage
=
'racing'
this
.
stage
=
'racing'
...
...
src/views/answer-screen/cmps/select-question/index.vue
View file @
59ab0dbd
...
@@ -61,30 +61,29 @@ export default {
...
@@ -61,30 +61,29 @@ export default {
// }
// }
// return 'active'
// return 'active'
// },
// },
countingText
:
function
()
{
countingText
()
{
return
this
.
counttimes
>
4
?
"Ready"
:
(
this
.
counttimes
>
3
?
"Go!"
:
this
.
counttimes
)
return
this
.
counttimes
>
4
?
'Ready'
:
(
this
.
counttimes
>
3
?
'Go!'
:
this
.
counttimes
)
}
}
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
console
.
log
(
'===handleSelect==='
);
console
.
log
(
'===handleSelect==='
);
console
.
log
(
'answer: '
+
this
.
answer
)
console
.
log
(
`answer:
${
this
.
answer
}
`
)
this
.
submitting
=
true
this
.
submitting
=
true
socket
.
sendGroupMsg
({
socket
.
sendGroupMsg
({
type
:
'answer'
,
type
:
'answer'
,
payload
:
{
payload
:
{
type
:
1
,
type
:
1
,
answer
:
this
.
answer
,
answer
:
this
.
answer
,
eventId
:
this
.
eventId
,
eventId
:
this
.
eventId
,
username
:
this
.
$route
.
query
.
username
||
''
username
:
this
.
$route
.
query
.
username
||
''
}
},
(
data
)
=>
{
this
.
stage
=
'submitted'
this
.
submitting
=
false
console
.
log
(
'回执'
,
data
)
}
}
);
},
(
data
)
=>
{
this
.
stage
=
'submitted'
this
.
submitting
=
false
console
.
log
(
'回执'
,
data
)
});
},
},
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
...
src/views/answer-screen/index.vue
View file @
59ab0dbd
<
template
>
<
template
>
<div
class=
"board-container"
>
<div
class=
"board-container"
>
<quick-response
eventId=
"1234
"
v-if=
"this.currentComponment === 'quick-response'"
/>
<quick-response
:eventId=
"eventId
"
v-if=
"this.currentComponment === 'quick-response'"
/>
<locker
eventId=
"1234
"
v-if=
"this.currentComponment === 'locker'"
/>
<locker
:eventId=
"eventId
"
v-if=
"this.currentComponment === 'locker'"
/>
<select-question
eventId=
"1234
"
v-if=
"this.currentComponment === 'select-question'"
/>
<select-question
:eventId=
"eventId
"
v-if=
"this.currentComponment === 'select-question'"
/>
<drawing-board
eventId=
"1234
"
v-if=
"this.currentComponment === 'drawing-board'"
/>
<drawing-board
:eventId=
"eventId
"
v-if=
"this.currentComponment === 'drawing-board'"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -15,6 +15,7 @@ import Locker from './cmps/locker';
...
@@ -15,6 +15,7 @@ import Locker from './cmps/locker';
import
QuickResponse
from
'./cmps/quick-response'
;
import
QuickResponse
from
'./cmps/quick-response'
;
import
SelectQuestion
from
'./cmps/select-question'
;
import
SelectQuestion
from
'./cmps/select-question'
;
import
DrawingBoard
from
'./cmps/drawing-board'
;
import
DrawingBoard
from
'./cmps/drawing-board'
;
export
default
{
export
default
{
name
:
'vd'
,
name
:
'vd'
,
components
:
{
components
:
{
...
@@ -25,7 +26,8 @@ export default {
...
@@ -25,7 +26,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
currentComponment
:
'locker'
currentComponment
:
'locker'
,
eventId
:
0
};
};
},
},
methods
:
{
methods
:
{
...
@@ -54,14 +56,14 @@ export default {
...
@@ -54,14 +56,14 @@ export default {
},
},
onMsg
(
msg
)
{
onMsg
(
msg
)
{
console
.
log
(
'msg'
,
msg
);
console
.
log
(
'msg'
,
msg
);
if
(
!
msg
||
!
msg
.
from
||
!
msg
.
from
.
indexOf
(
'teacher'
)
||
!
msg
.
payload
)
{
if
(
!
msg
||
!
msg
.
from
||
!
msg
.
from
.
indexOf
(
'teacher'
)
||
!
msg
.
payload
)
{
return
return
}
}
if
(
!
msg
.
payload
.
eventId
||
msg
.
payload
.
type
<
0
||
!
msg
.
payload
.
questionType
)
{
if
(
!
msg
.
payload
.
eventId
||
msg
.
payload
.
type
<
0
||
!
msg
.
payload
.
questionType
)
{
return
return
}
}
this
.
eventId
=
msg
.
payload
.
eventId
;
this
.
eventId
=
msg
.
payload
.
eventId
;
const
questionType
=
msg
.
payload
.
questionType
;
const
{
questionType
}
=
msg
.
payload
;
if
(
questionType
===
3
)
{
if
(
questionType
===
3
)
{
this
.
currentComponment
=
'select-question'
this
.
currentComponment
=
'select-question'
}
else
if
(
questionType
===
1
)
{
}
else
if
(
questionType
===
1
)
{
...
...
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