Commit 67893533 authored by 黄奎's avatar 黄奎

页面修改

parent 5f036a51
...@@ -227,7 +227,6 @@ ...@@ -227,7 +227,6 @@
UploadLocalSystem(JSON.stringify(fileParams), files.file, res => { UploadLocalSystem(JSON.stringify(fileParams), files.file, res => {
if (res.Code == 1) { if (res.Code == 1) {
this.questionData = res.Data; this.questionData = res.Data;
console.log("this.questionData", this.questionData);
} }
}) })
}, },
......
<style> <style>
.singleQuestion{ .singleQuestion {
width:100%; width: 100%;
} }
</style> </style>
<!--单选题--> <!--单选题-->
<template> <template>
...@@ -58,15 +59,13 @@ ...@@ -58,15 +59,13 @@
initialFrameHeight: 90, initialFrameHeight: 90,
}, },
optionTitleList: [], optionTitleList: [],
commonIndex:-1, commonIndex: -1,
}; };
}, },
created() { created() {
this.initConfig(); this.initConfig();
}, },
mounted(){ mounted() {},
},
methods: { methods: {
initConfig() { initConfig() {
this.optionTitleList = getOptionList(); this.optionTitleList = getOptionList();
...@@ -82,7 +81,7 @@ ...@@ -82,7 +81,7 @@
cancel: "取消", cancel: "取消",
}).onOk(() => { }).onOk(() => {
this.data.splice(index, 1); this.data.splice(index, 1);
this.commonIndex=-1; this.commonIndex = -1;
this.calcOptionTitle(); this.calcOptionTitle();
}).onCancel(() => { }).onCancel(() => {
...@@ -111,7 +110,11 @@ ...@@ -111,7 +110,11 @@
calcOptionTitle() { calcOptionTitle() {
if (this.data && this.data.length > 0) { if (this.data && this.data.length > 0) {
this.data.forEach((item, index) => { this.data.forEach((item, index) => {
item.Name = this.optionTitleList[index]; if (this.setOption.QuestionTypeKey == "single-number") {
item.Name = index + 1;
} else {
item.Name = this.optionTitleList[index];
}
}) })
} }
}, },
...@@ -126,11 +129,11 @@ ...@@ -126,11 +129,11 @@
}) })
} }
item.IsAnswer = true; item.IsAnswer = true;
this.setOption.Answer=item.Name; this.setOption.Answer = item.Name;
}, },
//点击切换输入 //点击切换输入
changeEdit(index){ changeEdit(index) {
this.commonIndex=index; this.commonIndex = index;
} }
}, },
mounted() { mounted() {
......
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