فهرست منبع

Merge branch 'new' of http://192.168.2.236:10080/zhouna/preliminary into new

luolei 5 سال پیش
والد
کامیت
6fd0ea4cfc
5فایلهای تغییر یافته به همراه21 افزوده شده و 9 حذف شده
  1. 1 1
      build/webpack.dev.conf.js
  2. 1 1
      src/common/Toast.vue
  3. 11 2
      src/components/Detail.vue
  4. 5 2
      src/components/DetailBox.vue
  5. 3 3
      src/components/Symptom.vue

+ 1 - 1
build/webpack.dev.conf.js

@@ -34,7 +34,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
     compress: true,
     // host: HOST || config.dev.host,
     // host: '192.168.3.6',
-    host: '192.168.1.104',
+    host: '192.168.1.106',
     port: PORT || config.dev.port,
     open: config.dev.autoOpenBrowser,
     overlay: config.dev.errorOverlay

+ 1 - 1
src/common/Toast.vue

@@ -56,7 +56,7 @@ import $ from 'jquery';
         color:#000;
         text-align: center;
         height: 1.25rem;
-        overflow-y: auto;
+        // overflow-y: auto;
         padding-top: .2rem;
         font-size: .3rem;
       }

+ 11 - 2
src/components/Detail.vue

@@ -173,9 +173,13 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
       },
       clearData(){//清空
         const datas = this.checkDatas.questionMapping;
+        let reqFlag = false;//必填项标识
         for(let i in datas){
           datas[i].value = "";
           datas[i].valueP = "";
+          if(datas[i].required==1){
+            reqFlag = true;
+          }
           let detaiList = datas[i].questionDetailList;
           if(detaiList.length>0){
             for(let k in detaiList){
@@ -193,8 +197,13 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
         if(this.checkDatas.select ==1){return}
         let msg = this.checkDatas.name;
         let msgP = (this.checkDatas.description||this.checkDatas.name);
-        // 没有点过完成直接选择然后清空,外层不会处于选中状态,故添加{select:1}
-        this.$store.commit('setDatas',{data:Object.assign({},this.checkDatas,{select:1}),pId:this.checkDatas.id,type:this.data.moduleType,ppId:this.data.ppId});
+        // 没有点过完成直接选择然后清空,外层不会处于选中状态,故没有必填项时添加{select:1}
+        if(reqFlag){
+          this.$store.commit('setDatas',{data:this.checkDatas,pId:this.checkDatas.id,type:this.data.moduleType,ppId:this.data.ppId});
+        }else{
+          this.$store.commit('setDatas',{data:Object.assign({},this.checkDatas,{select:1}),pId:this.checkDatas.id,type:this.data.moduleType,ppId:this.data.ppId});
+        }
+        
         this.$store.commit('setText',{text:msg,textP:msgP,pId:this.checkDatas.id,type:this.data.moduleType,flag:true,order:this.data.order,arrFlag:true,index:this.data.index});
       },
       check(){// 校验是否有已填项

+ 5 - 2
src/components/DetailBox.vue

@@ -77,12 +77,15 @@
       },
       close(){
         // 有必填项但没值则将choose移除 8-19
+        // 没点过完成,点关闭时校验是否有必填项--有直接移除
         const type = this.data.moduleType;
-        if(type == moduleCP['symp']){//只处理主诉症状
+        const select = this.privateData.select;
+        if(type == moduleCP['symp'] && !select){//只处理主诉症状
           const list = this.privateData.questionMapping;
           if(list){
             for(let i in list){
-              if(list[i].required==1 && !list[i].value){
+              // if(list[i].required==1 && !list[i].value){
+              if(list[i].required==1){
                 this.$store.commit('delChoose', {id: this.privateData.id })
                 this.$store.commit('delText', { type: moduleCP['symp'], pId: this.privateData.id })
               }

+ 3 - 3
src/components/Symptom.vue

@@ -103,7 +103,7 @@ export default {
       tmpItem:{},//检索的症状
       isSearch:false,
       scroll:null,
-      quesText:"请问您有哪些不适?",
+      quesText:"请问您这次哪里最不舒服?",
       startTime:'',
       timer:null,
       showExp:false,
@@ -277,7 +277,7 @@ export default {
         // this.$router.push("/")
         // this.$router.replace({path:'/'})
         // 停留在当前页 8-19
-        this.quesText = "请问您有哪些不适?";
+        this.quesText = "请问您这次哪里最不舒服?";
         this.getSympList();
       }
       this.cancelDel();
@@ -312,7 +312,7 @@ export default {
           this.quesText = "请问您还有其他不适吗?";
         }else{
           this.getSympList();
-          this.quesText = "请问您有哪些不适?";
+          this.quesText = "请问您这次哪里最不舒服?";
         } 
       },
       deep:true