Commit 177d9e10 authored by Lwd's avatar Lwd

aaaa

parent e52eb3db
......@@ -12,11 +12,11 @@
</div>
</div>
<div *ngFor="let it of pageArr; let i = index" style="padding: 0.5vw; width: 20%;">
<div *ngFor="let it of pageArr; let i = index" style="padding: 0.5vw; width: 40%;">
<div class="border" style="display: flex; align-items: center;">
<div class="item-box" style="width:30%">
<div style="width: 20%; padding-left: 20px">
<div style="width: 20%; padding-left: 10px">
<h5 style="padding-left: 15px; margin: auto"> 页-{{i+1}}: </h5>
<div style="display: flex; justify-items: center; align-items: center; height: 40px;">
......@@ -31,7 +31,12 @@
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>
add
</button>
<button style="margin: auto;margin-right: 20px" nz-button nzType="primary"
(click)="onCopyData(i)">
<span>复制本页</span>
</button>
</div>
</div>
</div>
</div>
......@@ -83,7 +88,7 @@
<div style="float: left;width: 100%;">
<div *ngIf="it['type']=='Image'">
<app-upload-image-with-preview style="width: 100%;" [picUrl]="it['groupPic']"
(imageUploaded)="onImageUploadSuccessByItem($event, it, 'image_url')">
(imageUploaded)="onImageUploadSuccessByItem($event, it)">
</app-upload-image-with-preview>
</div>
......
......@@ -231,6 +231,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
groupLabel: '',
groupPic: '',
group_audio_url: '',
type: '',
ske_json: '',
tex_json: '',
......@@ -262,6 +263,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
onCopyData(index) {
this.item.contentObj.pageArr.push(JSON.parse(JSON.stringify(this.item.contentObj.pageArr[index])));
this.save();
setTimeout(() => {
window.scrollTo(0, document.body.scrollHeight);
}, 1)
}
save() {
(<any>window).courseware.setData(this.item, null, this.KEY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment