|
@@ -5,10 +5,15 @@
|
|
|
<li v-for="(item,idx) in dataTrd">
|
|
|
<p class="question">{{idx+1 + '. ' +item.name}}</p>
|
|
|
<ComTextArea
|
|
|
- v-if="item.controlType == 6"
|
|
|
+ v-if="item.controlType == 5"
|
|
|
:item="item"
|
|
|
@changeAreaVal="changeAreaVal($event,idx)"
|
|
|
></ComTextArea>
|
|
|
+ <Input v-if="item.controlType==6 || item.controlType==7"
|
|
|
+ :item="item"
|
|
|
+ :key="item.id"
|
|
|
+ :uFlag="uFlag"
|
|
|
+ @updata="updataData"/>
|
|
|
<template
|
|
|
v-if="item.controlType == 3"
|
|
|
v-for="(part,index) in item.questionDetailList"
|
|
@@ -36,6 +41,7 @@
|
|
|
<script type="text/javascript">
|
|
|
import ComTextArea from '../common/ComTextArea.vue';
|
|
|
import MultiLineInput from '../common/MultiLineInput.vue';
|
|
|
+import Input from '../common/Input.vue';
|
|
|
|
|
|
export default {
|
|
|
name: 'AddContent',
|
|
@@ -43,6 +49,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
dataTrd: [],
|
|
|
+ uFlag:false, //输入框触发更新
|
|
|
val: ''
|
|
|
}
|
|
|
},
|
|
@@ -62,11 +69,21 @@ export default {
|
|
|
},
|
|
|
next(){
|
|
|
this.$emit('next','preview')
|
|
|
- }
|
|
|
+ },
|
|
|
+ updataData(data){
|
|
|
+ // const origMapping = this.datas.questionMapping;
|
|
|
+ // let mapping = this.checkDatas.questionMapping;
|
|
|
+ // for(let i in origMapping){
|
|
|
+ // if(origMapping[i].id==data.id){
|
|
|
+ // mapping.splice(i,1,data)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ },
|
|
|
},
|
|
|
components: {
|
|
|
ComTextArea,
|
|
|
MultiLineInput,
|
|
|
+ Input,
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -83,10 +100,10 @@ export default {
|
|
|
padding-bottom: 0.2rem;
|
|
|
.addPart {
|
|
|
li {
|
|
|
- margin-bottom: 0.5rem /* 50/100 */;
|
|
|
+ margin-bottom: 0.1rem;
|
|
|
}
|
|
|
.question {
|
|
|
- margin-bottom: 0.3rem /* 30/100 */;
|
|
|
+ margin-bottom: 0.2rem;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
}
|