luolei %!s(int64=5) %!d(string=hai) anos
pai
achega
79d7c94366
Modificáronse 3 ficheiros con 11 adicións e 6 borrados
  1. 1 0
      src/components/DetailBox.vue
  2. 5 6
      src/components/Symptom.vue
  3. 5 0
      src/store.js

+ 1 - 0
src/components/DetailBox.vue

@@ -103,6 +103,7 @@
       complete(){//有选中内容才可以点完成#1919
         if(this.checkF){
           this.$refs.detail.saveData();
+          this.$store.commit('setSearchShow', false);
           // this.$emit("pComplete");
           // this.$store.commit('setDetail',{detail:{}})
         }

+ 5 - 6
src/components/Symptom.vue

@@ -54,7 +54,7 @@
       @cancel="cancelDel"
     />
     <Search
-      v-if="searchShow"
+      v-if="this.$store.state.searchShow"
       @search="search"
       @showDetil="showDetil"
       :age="age"
@@ -74,7 +74,7 @@ export default {
   name: 'Symptom',
   props:['modluesLen','nameStr'],
   data() {
-    let { datas, pathInfo } = this.$store.state;
+    let { datas, pathInfo,searchShow } = this.$store.state;
     const { choose, text } = this.$store.state.symptom;
     return {
       age: pathInfo.patientAge,
@@ -90,7 +90,7 @@ export default {
       delText: "是否删除该信息?<br/>(已填内容将清除)",
       delIndex: null,
       showToast: false,
-      searchShow: false,//显示搜索界面
+      searchShow: searchShow,//显示搜索界面
       tmpItem:{},//检索的症状
       isSearch:false,
       scroll:null,
@@ -122,7 +122,7 @@ export default {
       console.log(val)
     },
     search(flg) {
-      this.searchShow = flg
+      this.$store.commit('setSearchShow', flg);
     },
 
     getSympList() {
@@ -148,7 +148,6 @@ export default {
       }else{
         this.$emit('next');
       }
-
     },
     showDetil(item,flg) {
       this.tmpItem=item
@@ -178,7 +177,7 @@ export default {
               this.chooseSymp.push(item);
             } else { 
               this.chooseSymp.push(item);
-              this.searchShow = false
+              this.$store.commit('setSearchShow', false);
             }
           }
         })

+ 5 - 0
src/store.js

@@ -5,6 +5,7 @@ Vue.use(Vuex);
 
 const store = new Vuex.Store({
   state:{
+    searchShow:false,
     pathInfo:{}, //患者信息-后续提交要用
     sysConfig:[], //系统配置项
     allMoudles:[], //模板
@@ -74,6 +75,10 @@ const store = new Vuex.Store({
         state.detailShow = true;
       }
     },
+    setSearchShow(state,flg){//搜索显示与否
+      console.log(flg)
+      state.searchShow = flg;
+    },
     setDataAll(state,param){
       let res = state.allMoudles
       for(let i = 0;i<res.length;i++){