Browse Source

Squashed commit of the following:

commit e9eeb458968371f579c6b61c7693438b99d18443
Merge: ada4e4e 1248f0c
Author: Luolei <16657115156@163.com>
Date:   Mon Jul 22 15:49:52 2019 +0800

    Merge branch 'dev' into byll

commit ada4e4e7216614e111914fc4a787609722b665cf
Author: Luolei <16657115156@163.com>
Date:   Mon Jul 22 15:39:22 2019 +0800

    模块配置

commit 1fe1910a2a54e5ece7a2b3ea8162cd9c7827059b
Merge: 7ef08db 3a8f52d
Author: Luolei <16657115156@163.com>
Date:   Thu Jul 18 16:39:19 2019 +0800

    Merge branch 'dev' into byll

commit 7ef08db55a456528a93b2ca8bb204b67a83daa80
Author: Luolei <16657115156@163.com>
Date:   Thu Jul 18 16:38:09 2019 +0800

    图片上传数据结构修改
liucf 5 years ago
parent
commit
b1680dd16c

+ 1 - 1
src/common/MultiLineInput.vue

@@ -3,7 +3,7 @@
     <span class="prefix" v-if="content.prefix">{{content.prefix}}</span>
     <div class="sticP" :style="{paddingRight:content.suffix?'1rem':'0'}">
         <div class="iptWrap">
-          <input class="contentVal" :type="content.type" :placeholder="content.placeholder" v-model.number="txt" @input="changeVal" @blur="blur" @click="handleClick">
+          <input class="contentVal" :type="content.type" :placeholder="content.placeholder" pattern="\d*" v-model.number="txt" @input="changeVal" @blur="blur" @click="handleClick">
         </div>
     </div>
     <span class="suffix" v-if="content.suffix">{{content.suffix}}</span>

+ 0 - 271
src/components/AddContent.vue

@@ -65,277 +65,6 @@ export default {
   },
   mounted() {
     this.dataTrd = this.allMoudles && this.allMoudles.moduleDetailDTOList
-    // this.dataTrd = [{
-    //   "id": 2,
-    //   "name": "请问您胸痛的部位在哪里?(可多选)",
-    //   "tagName": "胸痛-疼痛部位",
-    //   "type": 1,
-    //   "controlType": 2,
-    //   "itemType": 1,
-    //   "tagType": 1,
-    //   "labelPrefix": "",
-    //   "labelSuffix": "",
-    //   "url": "{imageUrlPrefix}/group1/M01/00/04/wKgC7F0CCWiAQWClAADJ_AlXG1M535.jpg",
-    //   "description": "",
-    //   "exclusionType": 0,
-    //   "questionDetailList": [{
-    //     "id": 1,
-    //     "name": "部位1",
-    //     "description": "部位1简述",
-    //     "questionId": 2,
-    //     "orderNo": 1,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 2,
-    //     "name": "部位2",
-    //     "description": "部位2简述",
-    //     "questionId": 2,
-    //     "orderNo": 2,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 3,
-    //     "name": "部位3",
-    //     "description": "",
-    //     "questionId": 2,
-    //     "orderNo": 3,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 4,
-    //     "name": "部位4",
-    //     "description": "",
-    //     "questionId": 2,
-    //     "orderNo": 4,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }],
-    //   "questionMapping": [],
-    //   "remark": null
-    // }, {
-    //   "id": 4,
-    //   "name": "请问您本次疼痛发作的持续时间如何",
-    //   "tagName": "胸痛-持续时间",
-    //   "type": 1,
-    //   "controlType": 1,
-    //   "itemType": 1,
-    //   "tagType": 1,
-    //   "labelPrefix": "",
-    //   "labelSuffix": "",
-    //   "url": "",
-    //   "description": "",
-    //   "exclusionType": 0,
-    //   "questionDetailList": [{
-    //     "id": 9,
-    //     "name": "呈阵发性疼痛",
-    //     "description": "",
-    //     "questionId": 4,
-    //     "orderNo": 1,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 10,
-    //     "name": "呈持续性疼痛,已持续${input_时间}",
-    //     "description": "",
-    //     "questionId": 4,
-    //     "orderNo": 2,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 11,
-    //     "name": "呈一过性疼痛,只痛了一次就不痛了",
-    //     "description": "",
-    //     "questionId": 4,
-    //     "orderNo": 3,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }],
-    //   "questionMapping": [],
-    //   "remark": null
-    // }, {
-    //   "id": 5,
-    //   "name": "请问您是否有能缓解疼痛的方法",
-    //   "tagName": "胸痛-缓解方法",
-    //   "type": 1,
-    //   "controlType": 2,
-    //   "itemType": 1,
-    //   "tagType": 1,
-    //   "labelPrefix": "",
-    //   "labelSuffix": "",
-    //   "url": "",
-    //   "description": "",
-    //   "exclusionType": 0,
-    //   "questionDetailList": [{
-    //     "id": 12,
-    //     "name": "休息后可自行缓解",
-    //     "description": "",
-    //     "questionId": 5,
-    //     "orderNo": 1,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 13,
-    //     "name": "服用硝酸甘油后可缓解",
-    //     "description": "",
-    //     "questionId": 5,
-    //     "orderNo": 2,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 14,
-    //     "name": "其他可缓解方法:${input_}",
-    //     "description": "",
-    //     "questionId": 5,
-    //     "orderNo": 3,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }],
-    //   "questionMapping": [],
-    //   "remark": null
-    // }, {
-    //   "id": 7,
-    //   "name": "请问您咳嗽有多长时间了?",
-    //   "tagName": "胸痛-时间",
-    //   "type": 1,
-    //   "controlType": 6,
-    //   "itemType": 1,
-    //   "tagType": 1,
-    //   "labelPrefix": "",
-    //   "labelSuffix": "",
-    //   "url": "",
-    //   "description": "",
-    //   "exclusionType": 0,
-    //   "questionDetailList": [],
-    //   "questionMapping": [],
-    //   "remark": null
-    // }, {
-    //   "id": 8,
-    //   "name": "请问您什么情况下感觉咳嗽加重?(可多选)",
-    //   "tagName": "胸痛-咳嗽加重",
-    //   "type": 1,
-    //   "controlType": 2,
-    //   "itemType": 1,
-    //   "tagType": 1,
-    //   "labelPrefix": "",
-    //   "labelSuffix": "",
-    //   "url": "",
-    //   "description": "",
-    //   "exclusionType": 0,
-    //   "questionDetailList": [{
-    //     "id": 18,
-    //     "name": "晚上",
-    //     "description": "",
-    //     "questionId": 8,
-    //     "orderNo": 1,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 19,
-    //     "name": "白天",
-    //     "description": "",
-    //     "questionId": 8,
-    //     "orderNo": 2,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 20,
-    //     "name": "晨起",
-    //     "description": "",
-    //     "questionId": 8,
-    //     "orderNo": 3,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 21,
-    //     "name": "活动",
-    //     "description": "",
-    //     "questionId": 8,
-    //     "orderNo": 4,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 22,
-    //     "name": "不清楚",
-    //     "description": "",
-    //     "questionId": 8,
-    //     "orderNo": 5,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 23,
-    //     "name": "以上都不是:${input_}",
-    //     "description": "",
-    //     "questionId": 8,
-    //     "orderNo": 6,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }],
-    //   "questionMapping": [],
-    //   "remark": null
-    // },{
-    //   "id": 35,
-    //   "name": "请填写您现在的生命体征情况",
-    //   "tagName": "生命体征",
-    //   "type": 52,
-    //   "controlType": 3,
-    //   "itemType": 1,
-    //   "tagType": 1,
-    //   "labelPrefix": "",
-    //   "labelSuffix": "",
-    //   "url": "",
-    //   "description": "",
-    //   "exclusionType": null,
-    //   "questionDetailList": [{
-    //     "id": 28,
-    //     "name": "血压:${number_收缩压/舒张压}mmHg",
-    //     "description": "",
-    //     "questionId": 35,
-    //     "orderNo": 1,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }, {
-    //     "id": 29,
-    //     "name": "脉搏:${number_} 次/分",
-    //     "description": "",
-    //     "questionId": 35,
-    //     "orderNo": 2,
-    //     "exclusion": 0,
-    //     "remark": null
-    //   }],
-    //   "questionMapping": [],
-    //   "remark": null,
-    //   "prefix": "",
-    //   "suffix": "",
-    //   "moduleId": 4,
-    //   "questionId": 35,
-    //   "flag": "",
-    //   "relationModule": null,
-    //   "relationModuleName": null
-    // },{
-    //   "id": 34,
-    //   "name": "如有其他补充内容请继续输入",
-    //   "tagName": "补充内容",
-    //   "type": 52,
-    //   "controlType": 5,
-    //   "itemType": 1,
-    //   "tagType": 1,
-    //   "labelPrefix": "",
-    //   "labelSuffix": "",
-    //   "url": "",
-    //   "description": "",
-    //   "exclusionType": null,
-    //   "questionDetailList": [],
-    //   "questionMapping": [],
-    //   "remark": null,
-    //   "prefix": "",
-    //   "suffix": "",
-    //   "moduleId": 4,
-    //   "questionId": 34,
-    //   "flag": "",
-    //   "relationModule": null,
-    //   "relationModuleName": null
-    // }]
   },
   methods: {
     back() {

+ 15 - 3
src/components/DiagTreat.vue

@@ -32,7 +32,12 @@
       <!-- <p v-for="(v,i) in checkText">{{v.text}}</p> -->
       <p>{{getText()}}</p>
     </div>
-    <div class="foot">
+
+    <div class="foot" v-if="modluesLen==2">
+      <span class="back" @click="beBack">{{'返回'+ preName}}</span>
+      <span class="next" @click="toNext">{{'预览'}}</span>
+    </div>
+    <div class="foot" v-else>
       <span class="back" @click="beBack">{{'返回'+ preName}}</span>
       <span class="next" @click="toNext">{{'进入'+ nextName}}</span>
     </div>
@@ -65,13 +70,17 @@
         ppId:null
       }
     },
-    props:['datas','preName','nextName'],
+    props:['datas','preName','nextName','modluesLen'],
     methods:{
       beBack(){
         this.$emit('back');
       },
       toNext(){
-        this.$emit('next');
+        if(this.modluesLen==2){
+          this.$emit('next','preview')
+        }else{
+          this.$emit('next');
+        }
       },
       setDetail(obj){
         this.labelDetail = obj.detail;
@@ -161,4 +170,7 @@
     z-index: 66;
   }
   
+.footer{
+  .footer;
+}
 </style>

+ 11 - 3
src/components/Others.vue

@@ -24,7 +24,11 @@
       <p class="title">其他病史</p>
       <p>{{getText()}}</p>
     </div>
-    <div class="foot">
+    <div class="foot" v-if="modluesLen==3&&!nextName||modluesLen==2">
+      <span class="back" @click="beBack">{{'返回'+ preName}}</span>
+      <span class="next" @click="toNext">{{'预览'}}</span>
+    </div>
+    <div class="foot" v-else>
       <span class="back" @click="beBack">{{'返回'+ preName}}</span>
       <span class="next" @click="toNext">{{'进入'+ nextName}}</span>
     </div>
@@ -59,14 +63,18 @@
         show:false,
       }
     },
-    props:['datas','preName','nextName'],
+    props:['datas','preName','nextName','modluesLen'],
     created(){},
     methods:{
       beBack(){
         this.$emit('back');
       },
       toNext(){
-        this.$emit('next');
+        if(this.modluesLen==2&&!this.nextName){
+          this.$emit('next','preview')
+        }else{
+          this.$emit('next');
+        }
       },
       setDetail(obj){
         this.labelDetail = obj.detail;

+ 4 - 1
src/components/PathInfo.vue

@@ -68,7 +68,8 @@
           "3":'您已完成过一次预问诊,是否再次录入',
           "4":'您已完成过一次儿童体质辨识,是否再次录入',
           "6":'您已完成过一次预问诊和儿童体质辨识,是否再次录入',
-        }
+        },
+        isReady:false
       }
     },
     created(){
@@ -125,6 +126,7 @@
         })
       },
       getAll(){
+        this.isReady=false
         const param = {
           'age':this.pathInfo.patientAge,
           'relationId':this.pathInfo.selfDeptId,
@@ -136,6 +138,7 @@
           if(result.code==0){
             const datas = result.data;
             this.$store.commit('saveAll',datas)
+            this.isReady=true
           }
         })
       },

+ 27 - 4
src/components/Preview.vue

@@ -23,7 +23,7 @@
             <span v-for="(item,idx) in symptom.choose" :key="item.name+idx">{{item.name+(idx == symptom.choose.length-1?'':'、')}}</span>
           </p>
         </li>
-        <li v-if="diagnose.text.length>0">
+        <li v-if="diagnose.text.length>0||symptom.choose.length>0">
           <h4><i :style="{'background': '#3D69D9'}"></i> 现病史:</h4>
           <p>
             <span v-for="(item,idx) in symptom.text" :key="item.text+idx">{{item.text+(idx == symptom.choose.length-1?'。':';')}}</span>
@@ -91,9 +91,9 @@ export default {
       showType: 'fail',
       imgList:[],
       show:false,//提交等待的动画loading
+      tmpNum:0
     }
   },
-
   methods: {
     showSubmit(flg) {
       this.submit = flg
@@ -104,13 +104,31 @@ export default {
     saveAllImage() {
       let formData = new FormData();
       let imgList = this.diagnose.imgFile;
+      // let tmpNum = this.tmpNum;
+      // var dateBegin = new Date();//获取当前时间
       if (imgList.length > 0) {//有图片先上传图片
         this.show = true
         for (let i = 0; i < imgList.length; i++) {
           let pageFile = imgList[i].file
           formData.append('upfiles', imgList[i].file);
+          // formData.append('upfile', imgList[i].file);
           formData.append('type', imgList[i].type);
+          // api.uploadImageThum(formData).then((res)=>{
+          //   console.log(res)
+          //   let result = res.data;
+          //   if (result.code == 0) {
+          //     this.tmpNum = ++tmpNum
+          //     if(this.tmpNum == imgList.length){
+          //       var dateEnd = new Date();//获取当前时间
+          //       var dateDiff = dateEnd.getTime() - dateBegin.getTime();//时间差的毫秒数
+          //       var dayDiff = dateDiff / 1000;//计算出秒数
+          //       this.show = false
+          //       alert('图片上传完成:'+dayDiff+'s')
+          //     }
+          //   }
+          // })
         }
+        // return
         api.uploadImageThums(formData).then((res) => {//获取图片
           console.log(res.data)
           let result = res.data;
@@ -129,6 +147,11 @@ export default {
               reportList.push(obg)
             }
             this.imgList = reportList
+                // var dateEnd = new Date();//获取当前时间
+                // var dateDiff = dateEnd.getTime() - dateBegin.getTime();//时间差的毫秒数
+                // var dayDiff = dateDiff / 1000;//计算出秒数
+                // this.show = false
+                // alert('图片上传完成:'+dayDiff+'s')
             this.saveAllDate()
           } else {//提交失败提示
             this.show=false
@@ -188,7 +211,7 @@ export default {
         "hospitalDeptCode": pathInfo.hospitalDeptCode,//医院科室编码
         "hospitalDeptId": pathInfo.hospitalDeptId,//科室id
         "hospitalDeptName": pathInfo.hospitalDeptName,//科室name
-        "inquiryCode": '1',//就诊序列号,目前没有先写死
+        "inquiryCode": pathInfo.recordId,//就诊序列号,目前是门诊号
         "patientBirthday": pathInfo.birthday+':00',//患者出生日期,格式为:2018-11-28 17:25:30
         "patientCode": pathInfo.patientCode,//患者编号
         "patientId": pathInfo.patientId,//患者id
@@ -200,7 +223,7 @@ export default {
         "reportList": this.imgList,
         // "type": 0//病历分类(1:门诊,2:住院)
       }
-      console.log(params)
+      // console.log(params)
       api.saveInquiry(params).then((res) => {
         console.log(res)
         if (res.data.code == 0) {

+ 12 - 2
src/components/Symptom.vue

@@ -37,9 +37,14 @@
       <p class="title">症状情况</p>
       <p v-for="(value,index) in checkText">{{value.text}}</p>
     </div>
-    <div :class="['footer',{'nofoot':chooseSymp.length==0}]"
+    <div v-if="modluesLen>1"
+      :class="['footer',{'nofoot':chooseSymp.length==0}]"
       @click="toNext"
     >下一步</div>
+    <div v-if="modluesLen==1"
+      :class="['footer',{'nofoot':chooseSymp.length==0}]"
+      @click="toNext"
+    >预览</div>
     <div
       class="detail"
       v-if="show"
@@ -76,6 +81,7 @@ import Toast from '../common/Toast.vue';
 import Search from './Search.vue';
 export default {
   name: 'Symptom',
+  props:['modluesLen'],
   data() {
     let { datas, pathInfo } = this.$store.state;
     const { choose, text } = this.$store.state.symptom;
@@ -131,9 +137,13 @@ export default {
     toNext() {
       // 把1切换成完成图标,且2高亮--判断有几个模块显示,1个--提交预览;1个以上--下一步
       if (this.chooseSymp.length == 0) { return }
-      this.$emit('next');
       // 把症状情况的数据存起-已选
       this.$store.commit('setChoose', { choose: this.chooseSymp, type: "1" });
+      if(this.modluesLen==1){
+        this.$emit('next','preview')
+      }else{
+        this.$emit('next');
+      }
 
     },
     showDetil(item,flg) {

+ 97 - 48
src/components/TabPage.vue

@@ -5,7 +5,7 @@
       <p v-for="(it,index) in modlues"
         :style="{'width':1/modlues.length*100+'%'}"
         :key="it.id">
-        <span :class="{current:index==parseInt(flag)-1,comp:finish[it.type]}"
+        <span :class="{current:index==number,comp:finish[it.type]}"
           v-if="type[it.type]==1">
           <!-- <i>{{it.type}}</i> -->
           <i>{{index+1}}</i>
@@ -16,38 +16,42 @@
     <!-- 内容 -->
     <div class="content">
       <template v-for="(item,idx) in modlues">
-        
+        <Symptom
+          v-if="flag==1&&item.type==1&&moduleShow"
+          @next="toNext"
+          :modluesLen="modluesLen"
+        />
+      
+        <DiagTreat
+          v-if="flag==2&&item.type==2&&moduleShow"
+          :datas="item"
+          :preName="modlues[0]&&modlues[0].name"
+          :modluesLen="modluesLen"
+          :nextName="modlues[2]&&modlues[2].name"
+          @next="toNext"
+          @back="beBack"
+        />
+        <Others
+          v-if="flag==3&&item.type==3&&moduleShow"
+          :modluesLen="modluesLen"
+          :datas="item"
+          :preName="modlues[idx-1]&&modlues[idx-1].name"
+          :nextName="modlues[idx+1]&&modlues[idx+1].name"
+          @next="toNext"
+          @back="beBack"
+        />
+        <AddContent
+          v-show="flag == 4&&item.type==4&&moduleShow"
+          :modluesLen="modluesLen"
+          :allMoudles="item"
+          :preName="modlues[idx-1]&&modlues[idx-1].name"
+          @toggleModule="toggleModule"
+          @next="toNext"
+          @back="beBack"
+        />
       </template>
-      <Symptom
-        v-if="flag==1&&moduleShow"
-        @next="toNext"
-      />
-      <DiagTreat
-        v-if="flag==2&&moduleShow"
-        :datas="modlues[1]"
-        :preName="modlues[0]&&modlues[0].name"
-        :nextName="modlues[2]&&modlues[2].name"
-        @next="toNext"
-        @back="beBack"
-      />
-      <Others
-        v-if="flag==3&&moduleShow"
-        :datas="modlues[2]"
-        :preName="modlues[1]&&modlues[1].name"
-        :nextName="modlues[3]&&modlues[3].name"
-        @next="toNext"
-        @back="beBack"
-      />
-      <AddContent
-        v-show="flag == 4&&moduleShow"
-        :allMoudles="modlues[3]"
-        :preName="modlues[2]&&modlues[2].name"
-        @toggleModule="toggleModule"
-        @next="toNext"
-        @back="beBack"
-      />
       <Preview v-show="!moduleShow" 
-        :preName="modlues[3]&&modlues[3].name"
+        :preName="getPreviewName()"
         @back="beBack" 
       />
     </div>
@@ -66,24 +70,25 @@ export default {
     let sysConfig = this.$store.state.sysConfig;
     let tmpAllMoudles = this.$store.state.allMoudles;
     let allMoudles = moduleConfig(sysConfig,tmpAllMoudles);
-    
     return {
       config: sysConfig,
-      modlues: allMoudles,
+      modlues: allMoudles.data,
+      modluesLen: allMoudles.len,
       type: {
         "1": sysConfig.length > 0 && sysConfig.filter(item => item.code == "symptoms_show")[0].value,
         "2": sysConfig.length > 0 && sysConfig.filter(item => item.code == "diagnosis_show")[0].value,
         "3": sysConfig.length > 0 && sysConfig.filter(item => item.code == "omhistory_show")[0].value,
         "4": sysConfig.length > 0 && sysConfig.filter(item => item.code == "replenish_show")[0].value,
       },
-      flag: 1,
+      flag: allMoudles.order,
       moduleShow:true,
       finish:{ //标识已填
         "1":true,
         "2":false,
         "3":false,
         "4":false
-      }
+      },
+      number:0
     }
   },
   created() {
@@ -92,32 +97,76 @@ export default {
     }
   },
   methods: {
+    getPreviewName(){
+      let len = this.modluesLen,tmpModule = this.modlues;
+      let preName = '';
+      if(len == 1){
+        preName=tmpModule[0].name
+      }else if(len == 2){
+        preName=tmpModule[1].name
+      }else if(len == 3){
+        preName=tmpModule[2].name
+      }else if(len == 4){
+        preName=tmpModule[3].name
+      }
+      return preName
+    },
+    getNames(type){
+      let len = this.modluesLen,tmpModule = this.modlues;
+      let nextName = '';
+      if(len == 1){
+        preName=tmpModule[0].name
+      }else if(len == 2){
+        preName=tmpModule[1].name
+      }else if(len == 3){
+        preName=tmpModule[2].name
+      }else if(len == 4){
+        preName=tmpModule[3].name
+      }
+      return preName
+    },
     toNext(preview) {
       if(preview === 'preview'){
         this.moduleShow=false
         return
       }
-      let flag = parseInt(this.flag);
-      this.finish[flag] = true;
-      this.flag = ++flag;
+      let flag = parseInt(this.flag),num=this.number;
+      // this.finish[flag] = true;
+      this.number = ++num;
       
-      // if (this.modlues[flag]) {
-      //   const type = this.modlues[flag].type;
-      //   this.flag = type;
-      //   this.finish[type] = true;
-      // }
+      for(let j in this.finish){
+        if(j <= flag){
+          this.finish[j] = true
+        }
+      }
+      for(let i = 0;i < this.modlues.length;i++){
+        let part = this.modlues[i];
+        if(part.type == flag){
+          if(i < (this.modlues.length-1)){
+            this.flag = this.modlues[i+1].type
+          }
+        }
+      }
     },
     beBack(preview) {
       if(preview === 'preview'){
         this.moduleShow=true
         return
       }
-      let flag = parseInt(this.flag);
-      this.flag = --flag;
+      let flag = parseInt(this.flag),num=this.number;
+      this.number = --num;
 
-      // if (this.modlues[flag - 1]) {
-      //   this.flag = this.modlues[flag - 1].type;
-      // }
+      for(let j in this.finish){
+        if(j <= flag){
+          this.finish[j] = true
+        }
+      }
+      for(let i = 0;i < this.modlues.length;i++){
+        let part = this.modlues[i];
+        if(part.type == flag){
+          this.flag = this.modlues[i-1].type
+        }
+      }
     },
     toggleModule(flg){
       this.moduleShow = flg

+ 3 - 3
src/utils/api.js

@@ -9,7 +9,7 @@ const urls = {
   getById:'/api/prec/questionInfo/getById',//常标签详情
   push:'/api/prec/push/pushInner',//症状推送
   saveInquiry:'/api/prec/inquiryInfo/saveInquiry',//保存问诊记录
-  uploadImage:'/api/prec/file/uploadImage',//单个文件上传同时生成缩略图
+  uploadImageThum:'/api/prec/file/uploadImageThum',//单个文件上传同时生成缩略图
   uploadImageThums:'/api/prec/file/uploadImageThums',//多个文件上传同时生成缩略图
   getTagInfos:'/api/prec/retrieval/getTagInfos',//检索
   // uploadImageThums:'http://192.168.3.1:8849/file/uploadImageThums',//多个文件上传同时生成缩略图
@@ -40,8 +40,8 @@ export default {
   uploadImageThums(param){
     return axios.post(urls.uploadImageThums,param)
   },
-  uploadImage(param){
-    return axios.post(urls.uploadImage,param)
+  uploadImageThum(param){
+    return axios.post(urls.uploadImageThum,param)
   },
   getTagInfos(param){
     return axios.post(urls.getTagInfos,param)

+ 6 - 2
src/utils/tools.js

@@ -76,9 +76,13 @@ const moduleConfig = (config,modules) => {
       }
     }
   }
-  // console.log(activeModule)
-  return activeModule
+  return {
+    data:activeModule,
+    len:activeModule.length||0,
+    order:activeModule.length>0?activeModule[0].type:''
+  }
 }
+
 // 替换输入框占位符
 const patt = /\$\{[^\]]+\}/g;