|
@@ -7,7 +7,8 @@
|
|
<!-- 内容区域 -->
|
|
<!-- 内容区域 -->
|
|
<section class="section">
|
|
<section class="section">
|
|
<!-- 左侧图层 -->
|
|
<!-- 左侧图层 -->
|
|
- <Overview ref='overview' class="overview" :testcaseId="testcaseId" :resultCount="resultPageCount" />
|
|
|
|
|
|
+ <Overview ref='overview' class="overview" :testcaseId="testcaseId" :resultCount="resultPageCount"
|
|
|
|
+ :questions="questions" />
|
|
<!-- 编辑区域 -->
|
|
<!-- 编辑区域 -->
|
|
<div class="container" id="h5editor">
|
|
<div class="container" id="h5editor">
|
|
<elab-canvas v-show="animatedNameGlobal!=''" :width="750" :height="1334"
|
|
<elab-canvas v-show="animatedNameGlobal!=''" :width="750" :height="1334"
|
|
@@ -310,7 +311,7 @@
|
|
font-family:MicrosoftYaHei;display:block;
|
|
font-family:MicrosoftYaHei;display:block;
|
|
color:rgba(51,51,51,1); margin-bottom:14px;
|
|
color:rgba(51,51,51,1); margin-bottom:14px;
|
|
line-height:19px;">默认状态</span>
|
|
line-height:19px;">默认状态</span>
|
|
- <div v-if="unSelectedButtom" :style="{ backgroundImage: 'url(' + buttonData.backgroundUnselectedImg + ')','width':'130px', 'height':'130px','background-repeat': 'no-repeat',
|
|
|
|
|
|
+ <div v-if="unSelectedButtom" :style="{ backgroundImage: 'url(' + buttonData.backgroundUnselectedImg + ')','width':'130px', 'height':'130px','background-repeat': 'no-repeat',
|
|
'background-position': 'center',
|
|
'background-position': 'center',
|
|
'background-size': 'contain'}"></div>
|
|
'background-size': 'contain'}"></div>
|
|
<label class="lable" v-else>
|
|
<label class="lable" v-else>
|
|
@@ -341,7 +342,7 @@
|
|
font-family:MicrosoftYaHei;display:block;
|
|
font-family:MicrosoftYaHei;display:block;
|
|
color:rgba(51,51,51,1);margin-bottom:14px;
|
|
color:rgba(51,51,51,1);margin-bottom:14px;
|
|
line-height:19px;">选中状态</span>
|
|
line-height:19px;">选中状态</span>
|
|
- <div v-if="selectedButtom" :style="{ backgroundImage: 'url(' + buttonData.backgroundSelectedImg + ')','width':'130px', 'height':'130px','background-repeat': 'no-repeat',
|
|
|
|
|
|
+ <div v-if="selectedButtom" :style="{ backgroundImage: 'url(' + buttonData.backgroundSelectedImg + ')','width':'130px', 'height':'130px','background-repeat': 'no-repeat',
|
|
'background-position': 'center',
|
|
'background-position': 'center',
|
|
'background-size': 'contain'}"></div>
|
|
'background-size': 'contain'}"></div>
|
|
<label class="lable" v-else>
|
|
<label class="lable" v-else>
|
|
@@ -352,7 +353,7 @@
|
|
align-items: center;
|
|
align-items: center;
|
|
height:100%;
|
|
height:100%;
|
|
border:1px dashed rgba(100,107,129,1);">
|
|
border:1px dashed rgba(100,107,129,1);">
|
|
-
|
|
|
|
|
|
+
|
|
<img style="width:16px;
|
|
<img style="width:16px;
|
|
height:16px;" src="../../assets/images/add-ele.png" />
|
|
height:16px;" src="../../assets/images/add-ele.png" />
|
|
<span style="font-size:12px;
|
|
<span style="font-size:12px;
|
|
@@ -364,7 +365,7 @@
|
|
</div>
|
|
</div>
|
|
<input style="display: none;" type="file" @change="upload($event, true)">
|
|
<input style="display: none;" type="file" @change="upload($event, true)">
|
|
</label>
|
|
</label>
|
|
-
|
|
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -408,6 +409,7 @@
|
|
return {
|
|
return {
|
|
itemId: null,
|
|
itemId: null,
|
|
testcaseId: null,
|
|
testcaseId: null,
|
|
|
|
+ questions: [],
|
|
panelState: 0,
|
|
panelState: 0,
|
|
canvasWidth: 750,
|
|
canvasWidth: 750,
|
|
canvasHeight: 504,
|
|
canvasHeight: 504,
|
|
@@ -454,7 +456,7 @@
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
buttonData: {},
|
|
buttonData: {},
|
|
unSelectedButtom: false,
|
|
unSelectedButtom: false,
|
|
- selectedButtom:false,
|
|
|
|
|
|
+ selectedButtom: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -531,6 +533,21 @@
|
|
this.$store.state.editor.editorTheme.animatedNameBackgroundGlobal || "";
|
|
this.$store.state.editor.editorTheme.animatedNameBackgroundGlobal || "";
|
|
this.title = this.$store.state.editor.editorTheme.title;
|
|
this.title = this.$store.state.editor.editorTheme.title;
|
|
this.gridTempField = this.$store.state.editor.gridTempField;
|
|
this.gridTempField = this.$store.state.editor.gridTempField;
|
|
|
|
+ var pages = this.$store.state.editor.editorTheme.pages || [];
|
|
|
|
+ console.log("每页数据", pages);
|
|
|
|
+ this.questions = [];
|
|
|
|
+ for (var i = 1; i < pages.length; i++) {
|
|
|
|
+ if (pages[i].questions) {
|
|
|
|
+ console.log("每页数据", pages[i].questions);
|
|
|
|
+ var result = pages[i].questions.map(function (a) {
|
|
|
|
+ return a.questionId;
|
|
|
|
+ });
|
|
|
|
+ this.questions.push(result);
|
|
|
|
+ } else {
|
|
|
|
+ this.questions.push([]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log("拼接数据", this.questions);
|
|
return this.$store.state.editor.editorPage;
|
|
return this.$store.state.editor.editorPage;
|
|
},
|
|
},
|
|
element() {
|
|
element() {
|
|
@@ -786,6 +803,7 @@
|
|
) {
|
|
) {
|
|
this.deleteElement();
|
|
this.deleteElement();
|
|
}
|
|
}
|
|
|
|
+
|
|
},
|
|
},
|
|
deleteElement() {
|
|
deleteElement() {
|
|
this.$store.dispatch("deleteSelectedElement");
|
|
this.$store.dispatch("deleteSelectedElement");
|
|
@@ -893,20 +911,20 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleClose(done) {
|
|
handleClose(done) {
|
|
- this.$confirm('确认关闭?')
|
|
|
|
|
|
+ this.$confirm("确认关闭?")
|
|
.then(_ => {
|
|
.then(_ => {
|
|
done();
|
|
done();
|
|
})
|
|
})
|
|
.catch(_ => { });
|
|
.catch(_ => { });
|
|
},
|
|
},
|
|
uploadSelectedPicOrUnSelectedPic() {
|
|
uploadSelectedPicOrUnSelectedPic() {
|
|
- this.dialogVisible = true
|
|
|
|
|
|
+ this.dialogVisible = true;
|
|
},
|
|
},
|
|
- closeUploadButton(){
|
|
|
|
|
|
+ closeUploadButton() {
|
|
this.buttonData = {};
|
|
this.buttonData = {};
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
this.selectedButtom = false;
|
|
this.selectedButtom = false;
|
|
- this.unSelectedButtom = false;
|
|
|
|
|
|
+ this.unSelectedButtom = false;
|
|
},
|
|
},
|
|
async upload(event, isSelected) {
|
|
async upload(event, isSelected) {
|
|
var that = this;
|
|
var that = this;
|
|
@@ -965,7 +983,6 @@
|
|
that.selectedButtom = false;
|
|
that.selectedButtom = false;
|
|
that.unSelectedButtom = false;
|
|
that.unSelectedButtom = false;
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
Overview,
|
|
Overview,
|