|
@@ -4,9 +4,14 @@
|
|
|
<ul class="addPart">
|
|
|
<li v-for="(item,idx) in dataTrd">
|
|
|
<p class="question">{{idx+1 + '. ' +item.name}}</p>
|
|
|
+ <Radio v-if="item.controlType==1"
|
|
|
+ :item="item"
|
|
|
+ :key="item.id"
|
|
|
+ @updata="updataData"/>
|
|
|
<ComTextArea
|
|
|
v-if="item.controlType == 5"
|
|
|
:item="item"
|
|
|
+ @updata="updataData"
|
|
|
@changeAreaVal="changeAreaVal($event,idx)"
|
|
|
></ComTextArea>
|
|
|
<Input v-if="item.controlType==6 || item.controlType==7"
|
|
@@ -20,8 +25,10 @@
|
|
|
>
|
|
|
<MultiLineInput
|
|
|
v-if="item.controlType == 3"
|
|
|
- @changeMultipVal="changeMultipVal($event,idx)"
|
|
|
:msg="part.name"
|
|
|
+ :part="part"
|
|
|
+ @updata="updataData($event,index,item)"
|
|
|
+ @changeMultipVal="changeMultipVal($event,idx)"
|
|
|
></MultiLineInput>
|
|
|
</template>
|
|
|
</li>
|
|
@@ -42,6 +49,7 @@
|
|
|
import ComTextArea from '../common/ComTextArea.vue';
|
|
|
import MultiLineInput from '../common/MultiLineInput.vue';
|
|
|
import Input from '../common/Input.vue';
|
|
|
+import Radio from '../common/Radio.vue';
|
|
|
|
|
|
export default {
|
|
|
name: 'AddContent',
|
|
@@ -54,7 +62,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.dataTrd = this.allMoudles && this.allMoudles.moduleDetailDTOList
|
|
|
+ // this.dataTrd = this.allMoudles && this.allMoudles.moduleDetailDTOList
|
|
|
+ this.dataTrd = this.allMoudles && this.allMoudles.moduleDetailDTOList[0].questionMapping[1].questionMapping
|
|
|
},
|
|
|
methods: {
|
|
|
back() {
|
|
@@ -65,25 +74,43 @@ export default {
|
|
|
this.val = value
|
|
|
},
|
|
|
changeMultipVal(value, idx) {
|
|
|
- console.log(value, idx)
|
|
|
+ // console.log(value, idx)
|
|
|
},
|
|
|
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)
|
|
|
- // }
|
|
|
- // }
|
|
|
+ setDetail(obj){
|
|
|
+ this.labelDetail = obj.detail;
|
|
|
+ this.ppId = obj.ppId;
|
|
|
+ this.show = true;
|
|
|
+ },
|
|
|
+ updateOrig(){
|
|
|
+ let origin = this.$store.state.diagnose.origin;
|
|
|
+ // this.dtoList = origin;console.log("更新:",origin)
|
|
|
+ },
|
|
|
+ updataData(data,idx,item){
|
|
|
+ let mapping = this.dataTrd;
|
|
|
+ if(data.controlType == 3){
|
|
|
+ let tmpLis = item.questionDetailList
|
|
|
+ tmpLis.splice(idx,1,data)
|
|
|
+ // this.$store.commit('setDatas',{data:this.checkDatas,pId:this.checkDatas.id,type:this.type,ppId:this.ppId});
|
|
|
+ // this.$store.commit('setText',{text:msg,pId:this.checkDatas.id,type:this.type,flag:true});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for(let i in mapping){
|
|
|
+ if(mapping[i].id==data.id){
|
|
|
+ mapping.splice(i,1,data)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$store.commit('setDataAll',data);
|
|
|
+ console.log(this.allMoudles)
|
|
|
},
|
|
|
},
|
|
|
components: {
|
|
|
ComTextArea,
|
|
|
MultiLineInput,
|
|
|
Input,
|
|
|
+ Radio,
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -91,6 +118,7 @@ export default {
|
|
|
@import "../less/base.less";
|
|
|
.symp-wrap {
|
|
|
font-size: 0.3rem;
|
|
|
+ padding-right: .3rem;
|
|
|
h3 {
|
|
|
color: #000;
|
|
|
margin-bottom: 0.36rem;
|
|
@@ -118,4 +146,7 @@ export default {
|
|
|
text-align: justify;
|
|
|
line-height: .48rem /* 48/100 */;
|
|
|
}
|
|
|
+.label{
|
|
|
+ .label;
|
|
|
+}
|
|
|
</style>
|