Commit d2f3d3d4 authored by 李维's avatar 李维

dev commit

parent 53952614
......@@ -73,7 +73,7 @@
<nz-form-control [nzSpan]="20">
<div *ngFor="let oneRow of grid; let x = index" class="clearfix">
<div *ngFor="let oneGrid of oneRow; let y = index" style="float: left; padding: 2px;">
<input style="width: 38px" (focus)="selectContent($event)" class="inputBlock" [maxLength]="1" type="text" nz-input [(ngModel)]="oneGrid.text" (blur)="handeGridChange($event, oneGrid, x, y)" >
<input style="width: 38px" (focus)="selectContent($event)" class="inputBlock" [class]="{current: oneGrid.index.indexOf(currentSet)!=-1}" [maxLength]="1" type="text" nz-input [(ngModel)]="oneGrid.text" (blur)="handeGridChange($event, oneGrid, x, y)" >
</div>
</div>
</nz-form-control>
......
......@@ -105,4 +105,53 @@
cursor: pointer;
color: transparent;
text-shadow: 0 0 0 #000;
&.current {
background-color: #1890ff;
color: #FFF;
}
&.index-1 {
background-color: #702ff4;
}
&.index-2 {
background-color: #702ff4;
}
&.index-3 {
background-color: #702ff4;
}
&.index-4 {
background-color: #702ff4;
}
&.index-5 {
background-color: #702ff4;
}
&.index-6 {
background-color: #702ff4;
}
&.index-7 {
background-color: #702ff4;
}
&.index-8 {
background-color: #702ff4;
}
&.index-9 {
background-color: #702ff4;
}
&.index-10 {
background-color: #702ff4;
}
&.index-11 {
background-color: #702ff4;
}
&.index-12 {
background-color: #702ff4;
}
&.index-13 {
background-color: #702ff4;
}
&.index-14 {
background-color: #702ff4;
}
&.index-15 {
background-color: #702ff4;
}
}
......@@ -240,12 +240,21 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
}
getDisplayClass(oneGird) {
let obj = {}
if(oneGird.index.indexOf(this.currentSet) != -1) {
obj[`index-${this.currentSet+1}`] = true
}
return obj;
}
handleCurrentIndexChange() {
}
addItem() {
this.dataArray.push({ image_url: "", audio_url: "", text: "", uuid: uuidv4(), direction: "left" })
this.dataArray.push({ image_url: "", audio_url: "", direction: "Across", text: "", uuid: uuidv4()})
this.currentSet = this.dataArray.length-1;
this.saveItem();
}
......
......@@ -1495,7 +1495,7 @@ export class PlayComponent implements OnInit, OnDestroy {
// 切换题目,主要是变蓝/变红输入框
switchQuestion(fromIndex, toIndex) {
this.g_cartoon.pauseAudio("sm_switch")
this.g_cartoon.playAudio("sm_switch")
if(toIndex.toString().indexOf("-") != -1) {
let indexArr = toIndex.split("-")
fromIndex = indexArr[0]
......
......@@ -30,9 +30,8 @@ export const demoData = {
"dataKey": "DataKey_JM04_3",
"title": {
"NO": "C",
"mainText": "Word cross",
"mainTextAudio_url": "",
"text": "eeeeeeeeee"
"mainText": "Listen, circle and write.",
"mainTextAudio_url": ""
},
"size": {
"wh": "12*12"
......@@ -42,629 +41,692 @@ export const demoData = {
"image_url": "",
"audio_url": "",
"text": "running water flowing on the Earth",
"uuid": "17960004-90fd-40bb-aae3-38f390a3928c",
"uuid": "9803c50c-3638-4a6a-a4f8-719bdeaacede",
"direction": "Across"
},
{
"image_url": "",
"audio_url": "",
"text": "a fish whose head look like those of a horse",
"uuid": "5ed5f385-02a5-4e78-980a-5abc95b88a6d",
"uuid": "eb899386-5dae-4942-84eb-da59b2846eee",
"direction": "Across"
},
{
"image_url": "",
"audio_url": "",
"text": "smart and possessing sound knowledge",
"uuid": "e139ea06-a99d-4330-8558-42810d9c78a5",
"uuid": "5a0e2328-b9e7-4b62-b4dc-a98bd37ee51b",
"direction": "Across"
},
{
"image_url": "",
"audio_url": "",
"text": "a star-shaped sea animal",
"uuid": "7409afc7-c811-4182-9ec5-694d05020a40",
"uuid": "c5b5ae3e-682f-4a09-88f1-65cb31750091",
"direction": "Down"
}
],
"grid": [
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": 0,
"index": [
0,
3
],
"text": "s"
},
{
"index": 0,
"index": [
0
],
"text": "t"
},
{
"index": 0,
"index": [
0
],
"text": "r"
},
{
"index": 0,
"index": [
0
],
"text": "e"
},
{
"index": 0,
"index": [
0
],
"text": "a"
},
{
"index": 0,
"index": [
0
],
"text": "m"
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": 3,
"index": [
3
],
"text": "t"
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": 3,
"index": [
3
],
"text": "o"
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": 3,
"index": [
3
],
"text": "r"
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": 3,
"index": [
3
],
"text": "f"
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": 2,
"index": [
2
],
"text": "i"
},
{
"index": 2,
"index": [
2
],
"text": "n"
},
{
"index": 2,
"index": [
2
],
"text": "t"
},
{
"index": 2,
"index": [
2
],
"text": "e"
},
{
"index": 2,
"index": [
2
],
"text": "l"
},
{
"index": 2,
"index": [
2
],
"text": "l"
},
{
"index": 2,
"index": [
2,
3
],
"text": "i"
},
{
"index": 2,
"index": [
2
],
"text": "g"
},
{
"index": 2,
"index": [
2
],
"text": "e"
},
{
"index": 2,
"index": [
2
],
"text": "n"
},
{
"index": 2,
"index": [
2
],
"text": "t"
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": 3,
"index": [
3
],
"text": "s"
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": 1,
"index": [],
"text": ""
},
{
"index": [
1
],
"text": "s"
},
{
"index": 1,
"index": [
1
],
"text": "e"
},
{
"index": 1,
"index": [
1
],
"text": "a"
},
{
"index": 1,
"index": [
1,
3
],
"text": "h"
},
{
"index": 1,
"index": [
1
],
"text": "o"
},
{
"index": 1,
"text": "u"
},
{
"index": 1,
"index": [
1
],
"text": "r"
},
{
"index": 1,
"index": [
1
],
"text": "s"
},
{
"index": 1,
"index": [
1
],
"text": "e"
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
}
],
[
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
},
{
"index": -1,
"index": [],
"text": ""
}
]
......
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