|
@@ -4,11 +4,12 @@
|
|
|
v-if="dtoList"
|
|
|
:key="it.id">
|
|
|
<div class="label" v-if="it.controlType==0">
|
|
|
- <p class="quest">{{it.name}}</p>
|
|
|
- <span v-for="(item,indx) in it.questionMapping" class="symp" @click="handleClick(item,indx,i)">
|
|
|
- {{item.name}}
|
|
|
- <i v-if="item.select==1" @click="deletSymp(item,indx)"><img src="../images/delete.png" alt=""></i>
|
|
|
- </span>
|
|
|
+ <Label :item="it"
|
|
|
+ :indx="i"
|
|
|
+ :ppId="it.id"
|
|
|
+ :moduleType="datas.type"
|
|
|
+ @setDetail="setDetail"
|
|
|
+ @updateOrig="updateOrig"/>
|
|
|
</div>
|
|
|
<UploadImg v-if="it.controlType==4"
|
|
|
:item="it"
|
|
@@ -16,46 +17,53 @@
|
|
|
:imgList="imgs"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div class="result">
|
|
|
+ <div class="result" v-if="checkText.length>0">
|
|
|
<p class="title">治疗情况</p>
|
|
|
- <p>经典款了估计的结果</p>
|
|
|
+ <p v-for="(v,i) in checkText">{{v.text}}</p>
|
|
|
</div>
|
|
|
<div class="foot">
|
|
|
<span class="back" @click="beBack">{{'返回'+ preName}}</span>
|
|
|
<span class="next" @click="toNext">{{'进入'+ nextName}}</span>
|
|
|
</div>
|
|
|
- <!-- <div class="detail" v-if="show">
|
|
|
+ <div class="detail" v-if="show">
|
|
|
<DetailBox @close="closeDetal"
|
|
|
:data="labelDetail"
|
|
|
+ :moduleType="datas.type"
|
|
|
+ :ppId="ppId"
|
|
|
v-if="labelDetail.questionMapping&&labelDetail.questionMapping.length>0"
|
|
|
@pComplete="complete"/>
|
|
|
</div>
|
|
|
- <Toast :message="delText"
|
|
|
+ <!-- <Toast :message="delText"
|
|
|
:show="showToast"
|
|
|
@comfirn="comfirnDel"
|
|
|
@cancel="cancelDel"/> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
<script type="text/javascript">
|
|
|
- import UploadImg from '../common/UploadImg.vue'
|
|
|
+ import UploadImg from '../common/UploadImg.vue';
|
|
|
+ import Label from '../common/Label.vue';
|
|
|
+ import DetailBox from './DetailBox.vue';
|
|
|
+ import Toast from '../common/Toast.vue';
|
|
|
export default {
|
|
|
name:'DiagTreat',
|
|
|
data(){
|
|
|
+ let {origin,text} = this.$store.state.diagnose;console.log("诊疗:",origin)
|
|
|
return{
|
|
|
msg:"诊疗情况",
|
|
|
- chooseSymp:[{name:'未治疗'}],
|
|
|
imgs:this.$store.state.diagnose.imgSrc,
|
|
|
- dtoList:[], //选项
|
|
|
- details:[], //明细
|
|
|
- chooseTxt:{} //选中的文字
|
|
|
+ dtoList:origin, //模板数据
|
|
|
+ labelDetail:{}, //标签明细
|
|
|
+ checkText:text, //选中的文字
|
|
|
+ show:false,
|
|
|
+ ppId:null
|
|
|
}
|
|
|
},
|
|
|
props:['datas','preName','nextName'],
|
|
|
created(){
|
|
|
- let dataArr = this.datas&&this.datas.moduleDetailDTOList;
|
|
|
+ /*let dataArr = this.datas&&this.datas.moduleDetailDTOList;
|
|
|
if(dataArr){
|
|
|
this.dtoList = JSON.parse(JSON.stringify(dataArr));
|
|
|
- }
|
|
|
+ }*/
|
|
|
},
|
|
|
methods:{
|
|
|
beBack(){
|
|
@@ -63,26 +71,38 @@
|
|
|
},
|
|
|
toNext(){
|
|
|
this.$emit('next');
|
|
|
+ // console.log("模板数据:",this.datas,"诊疗数据:",this.dtoList)
|
|
|
+ },
|
|
|
+ setDetail(obj){
|
|
|
+ this.labelDetail = obj.detail;
|
|
|
+ this.ppId = obj.ppId;
|
|
|
+ this.show = true;
|
|
|
+ },
|
|
|
+ complete(){
|
|
|
+ this.show = false;
|
|
|
+ this.labelDetail = {};
|
|
|
+ this.ppId = null;
|
|
|
+ // 处理明细选中的值
|
|
|
},
|
|
|
- handleClick(item,index,pIndex){
|
|
|
- // 存值到store并实现及时更新
|
|
|
- let value = item.name;
|
|
|
- let currMapping = JSON.parse(JSON.stringify(this.dtoList[pIndex].questionMapping));
|
|
|
- currMapping[index].select = 1
|
|
|
- this.dtoList[pIndex] = Object.assign({},this.dtoList[pIndex],{questionMapping:currMapping},{value:value})
|
|
|
- console.log(222,this.dtoList[pIndex],currMapping)
|
|
|
+ closeDetal(){
|
|
|
+ this.show = false;
|
|
|
+ this.labelDetail = {};
|
|
|
+ this.ppId = null;
|
|
|
},
|
|
|
- deletSymp(item,index){
|
|
|
- console.log(456,item)
|
|
|
+ updateOrig(){
|
|
|
+ let origin = this.$store.state.diagnose.origin;
|
|
|
+ // this.dtoList = origin;console.log("更新:",origin)
|
|
|
}
|
|
|
},
|
|
|
components:{
|
|
|
- UploadImg
|
|
|
+ UploadImg,
|
|
|
+ Label,
|
|
|
+ DetailBox
|
|
|
},
|
|
|
watch:{
|
|
|
dtoList:{
|
|
|
handler(newVal,oldVal){
|
|
|
- console.log("诊疗数据更新:",newVal,oldVal);
|
|
|
+ // console.log("诊疗数据更新:",newVal,oldVal);
|
|
|
},
|
|
|
deep:true
|
|
|
}
|
|
@@ -100,11 +120,11 @@
|
|
|
}
|
|
|
.label{
|
|
|
.label;
|
|
|
- img{
|
|
|
+ /* img{
|
|
|
width:.56rem;
|
|
|
height: .74rem;
|
|
|
vertical-align: top;
|
|
|
- }
|
|
|
+ } */
|
|
|
}
|
|
|
.result{
|
|
|
.title{
|
|
@@ -119,14 +139,13 @@
|
|
|
line-height: .44rem;
|
|
|
}
|
|
|
}
|
|
|
- .choose{
|
|
|
- color:#fff;
|
|
|
- background: linear-gradient(-270deg, #4F4FFF, #4F8BFF);
|
|
|
- box-shadow: 0 .08rem .16rem 0 rgba(79,129,255,0.40);
|
|
|
- }
|
|
|
}
|
|
|
.foot{
|
|
|
.dbfooter;
|
|
|
}
|
|
|
+ .detail{
|
|
|
+ .mask;
|
|
|
+ z-index: 66;
|
|
|
+ }
|
|
|
|
|
|
</style>
|