Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ET26
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
ET26
Commits
d8312f21
Commit
d8312f21
authored
Oct 24, 2021
by
LWD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
11a99175
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9941 additions
and
20 deletions
+9941
-20
Course.ts
form/src/app/form/Course.ts
+1
-1
form.component.html
form/src/app/form/form.component.html
+11
-12
form.component.ts
form/src/app/form/form.component.ts
+7
-7
yarn.lock
form/yarn.lock
+9922
-0
No files found.
form/src/app/form/Course.ts
View file @
d8312f21
form/src/app/form/form.component.html
View file @
d8312f21
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
</div>
</div>
</div>
</div>
<nz-form-control
[
nzSpan
]="
18
"
>
<nz-form-control
[
nzSpan
]="
18
"
>
<span>
标题声音:
</span>
<span>
标题声音:
</span>
<app-audio-recorder
[
audioUrl
]="
item
.
audio_url
"
<app-audio-recorder
[
audioUrl
]="
item
.
audio_url
"
...
@@ -15,17 +16,15 @@
...
@@ -15,17 +16,15 @@
</app-audio-recorder>
</app-audio-recorder>
</nz-form-control>
</nz-form-control>
<nz-divider
nzText=
"类别"
nzOrientation=
"left"
></nz-divider>
<nz-divider
nzText=
"类别"
nzOrientation=
"left"
></nz-divider>
<!-- <div nz-row>
<nz-form-item>
<button
style=
"margin: 10px;"
nz-button
nzType=
"danger"
(
click
)="
addSheepfold
()"
>
<nz-form-label [nzSpan]="6" nzFor="add-btn" nzNoColon=true>龙巢</nz-form-label>
<span>
添加
</span>
<nz-form-control [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='6'>
<button nz-button nzType="dashed" class="add-btn" id="add-btn"
[disabled]="item.sheepfoldArr.length==2" (click)="addSheepfold()">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>添加
</button>
</button>
</nz-form-control>
</nz-form-item>
<button
style=
"margin: 10px;"
nz-button
nzType=
"danger"
(
click
)="
delSheepfold
(
item
.
sheepfoldArr
.
length-1
)"
>
</div> -->
<span>
删除
</span>
</button>
<div
nz-row
>
<div
nz-row
>
<div
*
ngFor=
"let data of item.sheepfoldArr;let i = index"
style=
"margin: 2vw;"
>
<div
*
ngFor=
"let data of item.sheepfoldArr;let i = index"
style=
"margin: 2vw;"
>
<div
nz-col
[
nzXs
]='
24
'
[
nzSm
]='
12
'
[
nzMd
]='
12
'
[
nzLg
]='
9
'
>
<div
nz-col
[
nzXs
]='
24
'
[
nzSm
]='
12
'
[
nzMd
]='
12
'
[
nzLg
]='
9
'
>
...
@@ -57,7 +56,7 @@
...
@@ -57,7 +56,7 @@
<div
nz-row
>
<div
nz-row
>
<div
*
ngFor=
"let data of item.sheepArr;let i = index"
style=
"margin: 1vw;"
>
<div
*
ngFor=
"let data of item.sheepArr;let i = index"
style=
"margin: 1vw;"
>
<div
nz-col
[
nzXs
]='
24
'
[
nzSm
]='
12
'
[
nzMd
]='
12
'
[
nzLg
]='
8
'
>
<div
nz-col
[
nzXs
]='
24
'
[
nzSm
]='
12
'
[
nzMd
]='
12
'
[
nzLg
]='
8
'
>
<nz-card
nzTitle=
"选项-{{i + 1}}"
[
nzExtra
]="
extraTemplate1
"
style=
"height:
40
0px; margin: 1vw;"
>
<nz-card
nzTitle=
"选项-{{i + 1}}"
[
nzExtra
]="
extraTemplate1
"
style=
"height:
55
0px; margin: 1vw;"
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
>
类别
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
>
类别
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
...
...
form/src/app/form/form.component.ts
View file @
d8312f21
...
@@ -11,7 +11,7 @@ import { Sheepfold, Sheep, Course } from './Course';
...
@@ -11,7 +11,7 @@ import { Sheepfold, Sheep, Course } from './Course';
export
class
FormComponent
implements
OnInit
,
OnChanges
,
OnDestroy
{
export
class
FormComponent
implements
OnInit
,
OnChanges
,
OnDestroy
{
// 储存数据用
// 储存数据用
saveKey
=
"
LST07
"
;
saveKey
=
"
ET26
"
;
// 储存对象
// 储存对象
item
;
item
;
...
@@ -46,20 +46,17 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -46,20 +46,17 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ngOnDestroy
()
{
ngOnDestroy
()
{
}
}
init
()
{
init
()
{
if
(
!
this
.
item
)
{
if
(
!
this
.
item
)
{
this
.
item
=
new
Course
();
this
.
item
=
new
Course
();
}
}
if
(
this
.
item
&&
(
this
.
item
.
sheepfoldArr
.
length
<
1
))
{
if
(
this
.
item
&&
(
this
.
item
.
sheepfoldArr
.
length
<
1
))
{
for
(
var
i
=
0
;
i
<
2
;
i
++
)
{
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
this
.
addSheepfold
();
this
.
addSheepfold
();
}
}
}
}
}
}
/**
/**
* 储存图片数据
* 储存图片数据
* @param e
* @param e
...
@@ -80,8 +77,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -80,8 +77,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
save
();
this
.
save
();
}
}
/**
/**
* 储存数据
* 储存数据
*/
*/
...
@@ -114,6 +109,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -114,6 +109,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
}
addSheepfold
()
{
addSheepfold
()
{
if
(
this
.
item
.
sheepfoldArr
.
length
>=
6
)
{
return
}
let
sheepfold
=
new
Sheepfold
();
let
sheepfold
=
new
Sheepfold
();
sheepfold
.
id
=
this
.
randomChar
();
sheepfold
.
id
=
this
.
randomChar
();
...
@@ -124,6 +123,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -124,6 +123,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
}
delSheepfold
(
index
)
{
delSheepfold
(
index
)
{
if
(
index
<
3
)
return
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
this
.
item
.
sheepfoldArr
.
splice
(
index
,
1
);
this
.
item
.
sheepfoldArr
.
splice
(
index
,
1
);
this
.
save
();
this
.
save
();
...
...
form/yarn.lock
0 → 100644
View file @
d8312f21
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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