|
|
@@ -9,12 +9,17 @@
|
|
|
class="detail"
|
|
|
v-if="checkJson.detail"
|
|
|
v-html="checkJson.detail"
|
|
|
- style="color: #00000099;margin-top: 5px;"
|
|
|
+ style="color: rgba(0, 0, 0,0.6);margin-top: 5px;font-size: 16px;"
|
|
|
></div>
|
|
|
|
|
|
<div class="choices">
|
|
|
- <el-input-number :controls="false" v-model="checkJson.answer2" :precision="numberTypePrecision" :placeholder="numberTypePlaceholder[checkJson.type]"></el-input-number>
|
|
|
- <span v-if="checkJson.type=='4'">%</span>
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
+ v-model="checkJson.answer2"
|
|
|
+ :precision="numberTypePrecision"
|
|
|
+ :placeholder="numberTypePlaceholder[checkJson.type]"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-if="checkJson.type == '4'">%</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -45,15 +50,15 @@ export default {
|
|
|
},
|
|
|
userid: this.$route.query.userid,
|
|
|
checkJson: {
|
|
|
- title:"",
|
|
|
- detail:""
|
|
|
- },
|
|
|
- numberTypePlaceholder:{
|
|
|
- "1":"请输入整数",
|
|
|
- "2":"请输入数字并保留一位小数",
|
|
|
- "3":"请输入数字并保留两位小数",
|
|
|
- "4":"请输入百分比"
|
|
|
- },
|
|
|
+ title: '',
|
|
|
+ detail: ''
|
|
|
+ },
|
|
|
+ numberTypePlaceholder: {
|
|
|
+ '1': '请输入整数',
|
|
|
+ '2': '请输入数字并保留一位小数',
|
|
|
+ '3': '请输入数字并保留两位小数',
|
|
|
+ '4': '请输入百分比'
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -64,16 +69,16 @@ export default {
|
|
|
deep: true
|
|
|
}
|
|
|
},
|
|
|
- computed:{
|
|
|
- numberTypePrecision(){
|
|
|
- let _result = 0;
|
|
|
- if(this.checkJson.type=='1'){
|
|
|
+ computed: {
|
|
|
+ numberTypePrecision() {
|
|
|
+ let _result = 0
|
|
|
+ if (this.checkJson.type == '1') {
|
|
|
_result = 0
|
|
|
- }else if(this.checkJson.type=='2'){
|
|
|
+ } else if (this.checkJson.type == '2') {
|
|
|
_result = 1
|
|
|
- }else if(this.checkJson.type=='3'){
|
|
|
+ } else if (this.checkJson.type == '3') {
|
|
|
_result = 2
|
|
|
- }else if(this.checkJson.type=='4'){
|
|
|
+ } else if (this.checkJson.type == '4') {
|
|
|
_result = 0
|
|
|
}
|
|
|
|
|
|
@@ -83,7 +88,7 @@ export default {
|
|
|
methods: {
|
|
|
depthCopy(s) {
|
|
|
return JSON.parse(JSON.stringify(s))
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
|
|
|
@@ -126,7 +131,7 @@ export default {
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
-.choices>span{
|
|
|
+.choices > span {
|
|
|
font-size: 20px;
|
|
|
}
|
|
|
|