Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DF-L220
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
DF-L220
Commits
66cc63e3
Commit
66cc63e3
authored
Mar 14, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善
parent
a7b02fb0
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
319 additions
and
78 deletions
+319
-78
form.component.html
src/app/form/form.component.html
+8
-0
form.component.ts
src/app/form/form.component.ts
+4
-3
play.component.ts
src/app/play/play.component.ts
+305
-74
resources.js
src/app/play/resources.js
+2
-1
wrong.mp3
src/assets/play/music/wrong.mp3
+0
-0
play.png
src/assets/play/play.png
+0
-0
playing.png
src/assets/play/playing.png
+0
-0
restart.png
src/assets/play/restart.png
+0
-0
No files found.
src/app/form/form.component.html
View file @
66cc63e3
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
<tr>
<tr>
<th>
序号
</th>
<th>
序号
</th>
<th>
备选答案
</th>
<th>
备选答案
</th>
<th>
备选答案(图片)
</th>
<th>
是否正确
</th>
<th>
是否正确
</th>
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
...
@@ -51,6 +52,13 @@
...
@@ -51,6 +52,13 @@
<tr
*
ngFor=
"let data of it.answers;let j = index"
>
<tr
*
ngFor=
"let data of it.answers;let j = index"
>
<td>
{{j+1}}
</td>
<td>
{{j+1}}
</td>
<td><input
type=
"text"
nz-input
placeholder=
"请录入备选答案"
[(
ngModel
)]="
data
.
val
"
(
blur
)="
save
()"
></td>
<td><input
type=
"text"
nz-input
placeholder=
"请录入备选答案"
[(
ngModel
)]="
data
.
val
"
(
blur
)="
save
()"
></td>
<td>
<app-upload-image-with-preview
style=
"width: 100%"
[
picUrl
]="
data
.
pic_url
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
data
,
'
pic_url
')"
></app-upload-image-with-preview>
</td>
<td>
<td>
<nz-select
[(
ngModel
)]="
data
.
correct
"
nzAllowClear
nzPlaceHolder=
"请选择"
(
ngModelChange
)="
save
()"
>
<nz-select
[(
ngModel
)]="
data
.
correct
"
nzAllowClear
nzPlaceHolder=
"请选择"
(
ngModelChange
)="
save
()"
>
<nz-option
nzValue=
"0"
nzLabel=
"否"
></nz-option>
<nz-option
nzValue=
"0"
nzLabel=
"否"
></nz-option>
...
...
src/app/form/form.component.ts
View file @
66cc63e3
...
@@ -62,9 +62,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -62,9 +62,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* 储存图片数据
* 储存图片数据
* @param e
* @param e
*/
*/
onImageUploadSuccess
(
e
,
key
)
{
onImageUploadSuccess
(
e
,
item
,
key
)
{
this
.
item
[
key
]
=
e
.
url
;
item
[
key
]
=
e
.
url
;
this
.
save
();
this
.
save
();
}
}
...
@@ -159,6 +159,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -159,6 +159,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
getDefaultAnswerItem
(){
getDefaultAnswerItem
(){
let
answer
=
{
let
answer
=
{
val
:
""
,
val
:
""
,
pic_url
:
""
,
correct
:
'
0
'
correct
:
'
0
'
}
}
...
...
src/app/play/play.component.ts
View file @
66cc63e3
This diff is collapsed.
Click to expand it.
src/app/play/resources.js
View file @
66cc63e3
...
@@ -23,7 +23,8 @@ const res = [
...
@@ -23,7 +23,8 @@ const res = [
[
'
play
'
,
"
assets/play/play.png
"
],
[
'
play
'
,
"
assets/play/play.png
"
],
[
'
playing
'
,
"
assets/play/playing.png
"
],
[
'
playing
'
,
"
assets/play/playing.png
"
],
[
'
start
'
,
"
assets/play/start.png
"
]
[
'
start
'
,
"
assets/play/start.png
"
],
[
'
restart
'
,
"
assets/play/restart.png
"
]
];
];
...
...
src/assets/play/music/wrong.mp3
View file @
66cc63e3
No preview for this file type
src/assets/play/play.png
View replaced file @
a7b02fb0
View file @
66cc63e3
17.2 KB
|
W:
|
H:
21.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/assets/play/playing.png
View replaced file @
a7b02fb0
View file @
66cc63e3
17.7 KB
|
W:
|
H:
22.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/assets/play/restart.png
0 → 100644
View file @
66cc63e3
32.1 KB
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