|
@@ -11,24 +11,25 @@
|
|
<Label v-if="it.controlType==0"
|
|
<Label v-if="it.controlType==0"
|
|
:item="it"
|
|
:item="it"
|
|
:ppId="it.id"
|
|
:ppId="it.id"
|
|
|
|
+ :order="i"
|
|
:moduleType="datas.type"/>
|
|
:moduleType="datas.type"/>
|
|
<!-- 输入框 -->
|
|
<!-- 输入框 -->
|
|
<Input v-if="it.controlType==6 || it.controlType==7"
|
|
<Input v-if="it.controlType==6 || it.controlType==7"
|
|
:item="it"
|
|
:item="it"
|
|
:key="it.id"
|
|
:key="it.id"
|
|
- @updata="updataData($event,it.id)"/>
|
|
|
|
|
|
+ @updata="updataData($event,it.id,i)"/>
|
|
<!-- 文本域 -->
|
|
<!-- 文本域 -->
|
|
<ComTextArea v-if="it.controlType == 5"
|
|
<ComTextArea v-if="it.controlType == 5"
|
|
:item="it"
|
|
:item="it"
|
|
- @updata="updataData($event,it.id)"/>
|
|
|
|
|
|
+ @updata="updataData($event,it.id,i)"/>
|
|
<Radio v-if="it.controlType==1"
|
|
<Radio v-if="it.controlType==1"
|
|
:item="it"
|
|
:item="it"
|
|
:key="it.id"
|
|
:key="it.id"
|
|
- @updata="updataData($event,it.id)"/>
|
|
|
|
|
|
+ @updata="updataData($event,it.id,i)"/>
|
|
<CheckBox v-if="it.controlType==2"
|
|
<CheckBox v-if="it.controlType==2"
|
|
:item="it"
|
|
:item="it"
|
|
:key="it.id"
|
|
:key="it.id"
|
|
- @updata="updataData($event,it.id)"/>
|
|
|
|
|
|
+ @updata="updataData($event,it.id,i)"/>
|
|
<!-- 多行输入-->
|
|
<!-- 多行输入-->
|
|
<template
|
|
<template
|
|
v-if="it.controlType == 3"
|
|
v-if="it.controlType == 3"
|
|
@@ -37,11 +38,12 @@
|
|
<MultiLineInput
|
|
<MultiLineInput
|
|
:msg="part.name"
|
|
:msg="part.name"
|
|
:part="part"
|
|
:part="part"
|
|
- @updata="updataData($event,it.id,index)"
|
|
|
|
|
|
+ @updata="updataData($event,it.id,i,index)"
|
|
></MultiLineInput>
|
|
></MultiLineInput>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
- <div class="result" v-if="checkText.length>0">
|
|
|
|
|
|
+ <!-- <div class="result" v-if="checkText.length>0"> -->
|
|
|
|
+ <div class="result" v-if="getText()">
|
|
<p class="title">{{datas.name}}</p>
|
|
<p class="title">{{datas.name}}</p>
|
|
<p>{{getText()}}</p>
|
|
<p>{{getText()}}</p>
|
|
</div>
|
|
</div>
|
|
@@ -108,23 +110,34 @@
|
|
this.$emit('next');
|
|
this.$emit('next');
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- updataData(data,id,index){//输入框存值
|
|
|
|
|
|
+ updataData(data,id,order,index){//输入框存值
|
|
let list = this.dtoList;
|
|
let list = this.dtoList;
|
|
|
|
+ let value = "";
|
|
|
|
+ let valueP = "";
|
|
for(let i in list){
|
|
for(let i in list){
|
|
// if(list[i].id==data.id){
|
|
// if(list[i].id==data.id){
|
|
if(list[i].id==id){
|
|
if(list[i].id==id){
|
|
if(list[i].controlType == 3){//多行输入
|
|
if(list[i].controlType == 3){//多行输入
|
|
let detailList = list[i].questionDetailList;
|
|
let detailList = list[i].questionDetailList;
|
|
detailList.splice(index,1,data);
|
|
detailList.splice(index,1,data);
|
|
|
|
+ let temVal = "";
|
|
|
|
+ for(let k in detailList){
|
|
|
|
+ if(detailList[k].value){
|
|
|
|
+ temVal += detailList[k].value + ','
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ value = valueP = temVal?temVal.substring(0,temVal.length-1):'';
|
|
}else{
|
|
}else{
|
|
- list.splice(i,1,data)
|
|
|
|
- }
|
|
|
|
|
|
+ list.splice(i,1,data);
|
|
|
|
+ value = data.value;
|
|
|
|
+ valueP = data.valueP;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// this.$store.commit('setOrigin',{type:'3',data:data,pId:data.id});
|
|
// this.$store.commit('setOrigin',{type:'3',data:data,pId:data.id});
|
|
this.$store.commit('setDatas',{type:moduleCP['other'],data:data,pId:data.id,ppId:id});
|
|
this.$store.commit('setDatas',{type:moduleCP['other'],data:data,pId:data.id,ppId:id});
|
|
- this.$store.commit('setText',{type:moduleCP['other'],text:data.value.replace(patt,'').replace(/\#\{/g,'').replace(/\}/g,''),textP:data.valueP.replace(patt,'').replace(/\#\{/g,'').replace(/\}/g,''),pId:data.id,flag:true});
|
|
|
|
|
|
+ this.$store.commit('setText',{type:moduleCP['other'],text:value.replace(patt,'').replace(/\#\{/g,'').replace(/\}/g,''),textP:valueP.replace(patt,'').replace(/\#\{/g,'').replace(/\}/g,''),pId:data.id,flag:true,order:order});
|
|
|
|
|
|
this.$nextTick(()=>{
|
|
this.$nextTick(()=>{
|
|
this.scroll.refresh()
|
|
this.scroll.refresh()
|
|
@@ -134,10 +147,17 @@
|
|
let textArr = this.checkText;
|
|
let textArr = this.checkText;
|
|
let msg = "";
|
|
let msg = "";
|
|
for(let k in textArr){
|
|
for(let k in textArr){
|
|
- if(textArr[k].textP){
|
|
|
|
|
|
+ if(textArr[k] && Array.isArray(textArr[k])){
|
|
|
|
+ let temp = textArr[k];
|
|
|
|
+ for(let j in temp){
|
|
|
|
+ if(temp[j] && temp[j].textP){
|
|
|
|
+ msg += temp[j].textP + ';'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else if(textArr[k]&&textArr[k].textP){
|
|
msg += textArr[k].textP + ';'
|
|
msg += textArr[k].textP + ';'
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return trimDots(msg);
|
|
return trimDots(msg);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -151,14 +171,19 @@
|
|
CheckBox,
|
|
CheckBox,
|
|
MultiLineInput
|
|
MultiLineInput
|
|
},
|
|
},
|
|
- /*watch:{
|
|
|
|
- dtoList:{
|
|
|
|
- handler(newVal,oldVal){
|
|
|
|
- console.log("其他史数据更新:",newVal,this.$store.state.others.text)
|
|
|
|
|
|
+ computed:{
|
|
|
|
+ getItem(){
|
|
|
|
+ return this.$store.state.others.text;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ watch:{
|
|
|
|
+ getItem:{
|
|
|
|
+ handler(value){
|
|
|
|
+ this.checkText = value;
|
|
},
|
|
},
|
|
deep:true
|
|
deep:true
|
|
}
|
|
}
|
|
- },*/
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|