Commit 1ccd7e46 authored by limingzhe's avatar limingzhe

feat: 表单增加分数模式

parent 6016b4c9
...@@ -76,6 +76,13 @@ ...@@ -76,6 +76,13 @@
<div class="model-content"> <div class="model-content">
<div style="padding: 10px;background-color: #fff;"> <div style="padding: 10px;background-color: #fff;">
<div style="margin: 30px; display: flex; align-items: center; ">
<h3>分数反馈</h3>
<label style="margin-left: 10px; margin-bottom: 5px;" nz-checkbox [(ngModel)]="item.isShowScore" (ngModelChange)="checkboxChange($event, item, 'isShowScore')"></label>
</div>
<div style="margin: 30px; display: flex; align-items: center;"> <div style="margin: 30px; display: flex; align-items: center;">
<h3>标题音频: </h3> <h3>标题音频: </h3>
<div style="margin-left: 10px;"> <div style="margin-left: 10px;">
......
...@@ -15,6 +15,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O ...@@ -15,6 +15,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
title: "", title: "",
audio_url: '', audio_url: '',
questions: [], questions: [],
isShowScore: false,
}; };
isVisible = false; isVisible = false;
deleteTitle = "是否删除题目"; deleteTitle = "是否删除题目";
...@@ -38,6 +39,8 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O ...@@ -38,6 +39,8 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
if (this.item.questions.length == 0) { if (this.item.questions.length == 0) {
this.addquestion(); this.addquestion();
} }
} }
removeoption(i, j) { removeoption(i, j) {
...@@ -90,4 +93,13 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O ...@@ -90,4 +93,13 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
ngChange() { ngChange() {
this.save(); this.save();
} }
checkboxChange(e, it, key) {
console.log('e: ', e);
it[key] = e;
this.save();
}
} }
\ No newline at end of file
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