فهرست منبع

上传控件答案关联

zhouna 5 سال پیش
والد
کامیت
c907ae6825
3فایلهای تغییر یافته به همراه32 افزوده شده و 16 حذف شده
  1. 13 1
      src/common/PushSymptom.vue
  2. 12 8
      src/components/MainPage.vue
  3. 7 7
      src/components/Preview.vue

+ 13 - 1
src/common/PushSymptom.vue

@@ -75,7 +75,19 @@
         api.getPush(param).then((res) => {
           const result = res.data;
           if (result.code == 0&&result.data) {
-            this.symptoms = result.data.symptom;
+            const syms = result.data.symptom;
+            const none={
+              conceptId: 0,
+              name: "没有了",
+              tagName: "没有了",
+              libType: 1,
+              id: 0,
+              type: 1,
+              description: "",
+              hasExplain: 0,
+              explains: null,
+            };
+            this.symptoms = [none,...syms];
             //this.getSymptomLisCom(result)
           }else{
             //this.getSymptomLisCom()

+ 12 - 8
src/components/MainPage.vue

@@ -218,19 +218,23 @@ export default {
       let moduleName = this.listMap[this.activeTab];
       let tmpArr = JSON.parse(JSON.stringify(this[moduleName]));
       tmpArr[num-1].content = contentResult.valp;
-      /*if(this.symptomResult.id===999999&&contentResult.indexOf("没有")!==-1){   //datas中show要处理
-        this[moduleName] = JSON.parse(JSON.stringify(this.$store.state.diagnose.datas));
-      }else{*/
-        this[moduleName] = tmpArr;
-      this.$store.commit('setText', { type: this.moduleKeys[this.activeTab], text: contentResult.val,textP: contentResult.valp,idx:contentResult.idx,flag:contentResult.flag });
-      /*}*/
+      //选没有可上传报告,则上传控件不显示
+      const noUpload = this.symptomResult.id===999999&&contentResult.valp.indexOf("没有")!==-1;
+      if(noUpload){
+        tmpArr.splice(num,1);
+      }
+
+      this[moduleName] = tmpArr;
+      //上传的图片及是否有可上传***答案不显示在预览所以不记录到state.diagnose.text中
+      if(this.symptomResult.id!==999999&&this.symptomResult.controlType!=4){
+        this.$store.commit('setText', { type: this.moduleKeys[this.activeTab], text: contentResult.val,textP: contentResult.valp,idx:contentResult.idx,flag:contentResult.flag });
+      }
       console.log(this.$store.state);   //最后一题答完
-      if(+num===this[moduleName].length){
+      if(+num===this[moduleName].length||(noUpload&&+num===this[moduleName].length+1)){
         if(this.activeTab>1){         //模块配置待修改
           this.showPreview=true;
           return;
         }
-        //this.$store.commit('setText', { type: this.moduleKeys[this.activeTab], text: contentResult.val,textP: contentResult.valp, pId: tmpNowItem.questionId,idx:'' });
         const state = this.$store.state;
         this.activeTab++;   //进入下一个阶段问题
         this.num = 0;

+ 7 - 7
src/components/Preview.vue

@@ -162,13 +162,13 @@ export default {
       banText:"",     //伴**
       mainTextP:"",      //患者于**前**出现
       banTextP:"",     //伴**
+      symLast:"",     //除主诉伴随剩余的症状详情内容
       submit: false,
       showType: 'fail',
       imgList:[],
       tmpNum:0,
       moduleCP:moduleCP,
       showDoc:false,
-      trimDots:trimDots,
       time:''
     }
   },
@@ -273,8 +273,8 @@ export default {
       const timeTextp = times?"于"+timesp+"前"+reasonp+"出现":reasonp+"出现";
       this.mainText = call+timeText+symChoose[0].name;
       this.mainTextP = call+timeTextp+symChoose[0].name;
-      this.banText = bans.text===""?"":"伴"+bans.text;
-      this.banTextP = bans.text===""?"":"伴"+bans.textP;
+      this.banText = bans.text==="没有了"?"":"伴"+bans.text;
+      this.banTextP = bans.text==="没有了"?"":"伴"+bans.textP;
     },
     saveAllDate() {
       const {pathInfo,symptom,diagnose,others,addContent} = this
@@ -287,8 +287,8 @@ export default {
           let tmpArr = [this.mainText];
           let tmpStr = this.banText;
           let symText = tmpSymptom.text;
-          for(let j = 1;j < symText.length-1;j++){
-            if(+symText[j].flag!==1&&+symText[j].flag!==2){   //诱因和时间
+          for(let j = 1;j < symText.length-1;j++){console.log(symText[j].text,typeof(symText[j].text)!=='object')
+            if(+symText[j].flag!==1&&+symText[j].flag!==2&&typeof(symText[j].text)!=='object'){   //诱因和时间已拼不重复添加,上传的图片不拼单独显示
               tmpArr.push(symText[j].text);
             }
           }
@@ -442,10 +442,10 @@ export default {
       padding: .1rem .3rem;
       overflow: hidden;
     }
-    li.imgLis {
+    /*li.imgLis {
       padding-right: 0;
       padding-left: 0;
-    }
+    }*/
     h4 {
       color: #colors[quest];
       font-size: .32rem;