Переглянути джерело

有无组件flag=3不显示,详情数据存到本地

luolei 5 роки тому
батько
коміт
498aa44159
3 змінених файлів з 6 додано та 7 видалено
  1. 2 2
      config/index.js
  2. 1 1
      src/components/Detail.vue
  3. 3 4
      src/components/Symptom.vue

+ 2 - 2
config/index.js

@@ -4,8 +4,8 @@
 
 const path = require('path')
 // const proxy_path = 'http://192.168.2.236:80';
-const proxy_path = 'http://192.168.2.236:5050';
-// const proxy_path = 'http://192.168.2.241:5050';
+// const proxy_path = 'http://192.168.2.236:5050';
+const proxy_path = 'http://192.168.2.241:5050';
 
 module.exports = {
   dev: {

+ 1 - 1
src/components/Detail.vue

@@ -26,7 +26,7 @@
                 :detail="1"
                 @updata="updataData"/>
           <radioSelect                
-                v-if="item.controlType==8" 
+                v-if="item.controlType==8&&item.flag!=3" 
                 :item="item"
                 :slide="!!item.slide"
                 :detail="1"

+ 3 - 4
src/components/Symptom.vue

@@ -121,8 +121,7 @@ export default {
       start:{},
       end:{},
       slide:false,
-      slideTxt:'展开',
-      staticSymp:[]
+      slideTxt:'展开'
     }
   },
   created() {
@@ -273,7 +272,7 @@ export default {
             if (mapping && mapping.length > 0) {
               for(let i = 0;i < mapping.length;i++){
                 if(mapping[i].flag == 3){
-                  this.staticSymp = mapping[i].questionDetailList
+                  localStorage.setItem("staticSymp",JSON.stringify(mapping[i].questionDetailList))
                 }
               }
               this.$store.commit('setDetail',{detail:result.data,ppId:null,moduleType:moduleCP['symp'],sign:1,idx:this.chooseSymp.length})
@@ -332,7 +331,7 @@ export default {
         if (result.code == 0) {
           let symp = result.data.symptom;
           let symped = JSON.parse(JSON.stringify(this.chooseSymp));//已选症状
-          let sympStic = JSON.parse(JSON.stringify(this.staticSymp));//首次有无症状
+          let sympStic = JSON.parse(localStorage.getItem('staticSymp'));//首次有无症状
           let sympAll = sympStic.concat(symp);
           var obj = {};
           sympAll = sympAll.reduce(function(item, next) {