Browse Source

保存预览

Luolei 5 years ago
parent
commit
63952d0a2c

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

@@ -33,7 +33,8 @@ const devWebpackConfig = merge(baseWebpackConfig, {
     contentBase: false, // since we use CopyWebpackPlugin.
     compress: true,
     // host: HOST || config.dev.host,
-    host: '192.168.3.6',
+    // host: '192.168.3.6'/,
+    host: '192.168.3.126',
     port: PORT || config.dev.port,
     open: config.dev.autoOpenBrowser,
     overlay: config.dev.errorOverlay

+ 0 - 2
config/index.js

@@ -20,8 +20,6 @@ module.exports = {
     },
 
     // Various Dev Server settings
-    host: 'localhost', // can be overwritten by process.env.HOST
-    // host: '192.168.3.126', // can be overwritten by process.env.HOST
     port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: true,
     errorOverlay: true,

+ 35 - 0
src/common/Loading.vue

@@ -0,0 +1,35 @@
+<template>
+  <div class="loading" v-if="show">
+    <div class="loadingModal"></div>
+    <img src="../images/loading.gif" alt="">
+  </div>
+</template>
+<script>
+export default {
+  data(){
+    return {
+      show:true
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+@import "../less/base.less";
+.loading {
+  .loadingModal{
+    .mask;
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    left: 0;
+    top: 0;
+  }
+  img {
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+  }
+}
+</style>
+

+ 1 - 1
src/common/MultiLineInput.vue

@@ -56,7 +56,7 @@ export default {
     blur(){
       const newData = Object.assign({},this.part,{value:this.txt,controlType:3});
       this.$emit("updata",newData);
-      this.$emit('handleInp',this.txt)
+      this.$emit('handleInp',this.txt);
     }
   }
 }

+ 2 - 1
src/common/Submit.vue

@@ -40,6 +40,7 @@ export default {
   // },
   methods: {
     goStart() {
+      this.$store.commit('initAllData')
       this.$router.push("/")
     }
   }
@@ -60,7 +61,7 @@ export default {
   height: 7rem;
   background: #fff;
   z-index: 999;
-  position: absolute;
+  position: fixed;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);

+ 280 - 3
src/components/AddContent.vue

@@ -8,6 +8,10 @@
             :item="item"
             :key="item.id"
             @updata="updataData"/>
+          <CheckBox v-if="item.controlType==2" 
+            :item="item"
+            :key="item.id"
+            @updata="updataData"/>
           <ComTextArea
             v-if="item.controlType == 5"
             :item="item"
@@ -50,6 +54,7 @@ import ComTextArea from '../common/ComTextArea.vue';
 import MultiLineInput from '../common/MultiLineInput.vue';
 import Input from '../common/Input.vue';
 import Radio from '../common/Radio.vue';
+import CheckBox from '../common/CheckBox.vue';
 
 export default {
   name: 'AddContent',
@@ -63,7 +68,277 @@ export default {
   },
   mounted() {
     this.dataTrd = this.allMoudles && this.allMoudles.moduleDetailDTOList
-    // this.dataTrd = this.allMoudles && this.allMoudles.moduleDetailDTOList[0].questionMapping[1].questionMapping
+    // 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() {
@@ -77,6 +352,7 @@ export default {
       // console.log(value, idx)
     },
     next(){
+      this.$store.commit('setText',{data:this.dataTrd,type:4});
       this.$emit('next','preview')
     },
     setDetail(obj){
@@ -90,9 +366,10 @@ export default {
     },
     updataData(data,idx,item){
       let mapping = this.dataTrd;
-      if(data.controlType == 3){
+      if(data.controlType == 3){//多行输入,多了一层需单独处理
         let tmpLis = item.questionDetailList
         tmpLis.splice(idx,1,data)
+        console.log(this.dataTrd,7878)
         // this.$store.commit('setDatas',{data:this.checkDatas,pId:this.checkDatas.id,type:this.type,ppId:this.ppId});
         // this.$store.commit('setText',{text:msg,pId:this.checkDatas.id,type:this.type,flag:true});
         return;
@@ -103,7 +380,6 @@ export default {
         }
       }
       this.$store.commit('setDataAll',data);
-      console.log(this.allMoudles)
     },
   },
   components: {
@@ -111,6 +387,7 @@ export default {
     MultiLineInput,
     Input,
     Radio,
+    CheckBox
   }
 }
 </script>

+ 163 - 46
src/components/Preview.vue

@@ -16,7 +16,39 @@
       <p>采集时间:{{pathInfo.systemTime}}</p>
     </div>
     <div class="personMsg">
-      主诉
+      <ul class="previewParts">
+        <li v-if="symptom.choose.length>0">
+          <h4><i :style="{'background': '#FF9A9A'}"></i> 主诉:</h4>
+          <p>
+            <span v-for="(item,idx) in symptom.choose" :key="item.name">{{item.name+(idx == symptom.choose.length-1?'':'、')}}</span>
+          </p>
+        </li>
+        <li v-if="diagnose.text.length>0">
+          <h4><i :style="{'background': '#3D69D9'}"></i> 现病史:</h4>
+          <p>
+            <span v-for="(item,idx) in symptom.text" :key="item.text">{{item.text+(idx == symptom.choose.length-1?'。':';')}}</span>
+          </p>
+          <p>
+            <span v-for="(item,idx) in diagnose.text" :key="item.text">{{item.text+(idx == diagnose.text.length-1?'。':';')}}</span>
+          </p>
+        </li>
+        <li v-if="others.text.length>0">
+          <h4><i></i> 其他史:</h4>
+          <p>
+            <span v-for="(item,idx) in others.text" :key="item.text">{{item.text+(idx == others.text.length-1?'。':';')}}</span>
+          </p>
+        </li>
+        <li v-if="addContent.txt">
+          <h4><i></i> 补充内容:</h4>
+          <p>{{addContent.txt}}</p>
+        </li>
+        <li v-if="JSON.stringify(diagnose.imgSrc) !='{}'">
+          <h4><i></i> 最近一次治疗报告:</h4>
+          <div v-for="(value,key) in diagnose.imgSrc" class="imgView">
+            <img :src="value" alt="">
+          </div>
+        </li>
+      </ul>
     </div>
     <div class="foot">
       <span
@@ -33,22 +65,32 @@
       :showType="showType"
       @showSubmit="showSubmit"
     ></Submit>
+    <Loading v-if="show"></Loading>
   </div>
 </template>
 <script>
 import api from '@utils/api.js';
 import Submit from '../common/Submit';
+import Loading from '../common/Loading';
 export default {
   props: ['preName'],
   data() {
     const { pathInfo, originDatas } = this.$store.state;
+    let symptomDate = this.$store.state.symptom;
     let diagnoseDate = this.$store.state.diagnose;
+    let othersDate = this.$store.state.others;
+    let addContentDate = this.$store.state.addContent;
     return {
       msg: '预览',
       pathInfo: pathInfo,
+      symptom: symptomDate,
       diagnose: diagnoseDate,
+      others: othersDate,
+      addContent: addContentDate,
       submit: false,
       showType: 'fail',
+      imgList:[],
+      show:false,//提交等待的动画loading
     }
   },
 
@@ -62,18 +104,34 @@ export default {
     saveAllImage() {
       let formData = new FormData();
       let imgList = this.diagnose.imgFile;
-      if (imgList.length > 0) {
+      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('type', i + 1);
+          formData.append('type', imgList[i].type);
         }
         api.uploadImageThums(formData).then((res) => {//获取图片
           console.log(res)
-          if (res.data.length > 0) {
-            this.showType = 'success'
-            this.submit = true
-          } else {
+          let result = res.data;
+          if (result.length > 0) {//图片提交成功再保存数据
+            // this.showType = 'success'
+            // this.submit = true
+            let reportList = []
+            for(let i = 0;i < result.length;i++){
+              let obg = {}
+              obg.narrowImage = result[i].thumbnail.url
+              obg.narrowName = result[i].thumbnail.original
+              obg.originalImage = result[i].source.url
+              obg.originalName = result[i].source.original
+              obg.orderNum = i+1
+              obg.type = result[i].source.type
+              reportList.push(obg)
+            }
+            this.imgList = reportList
+            this.saveAllDate()
+          } else {//提交失败提示
+            this.show=false
             this.showType = 'fail'
             this.submit = true
             let timer = setTimeout(() => {
@@ -83,53 +141,74 @@ export default {
           }
         })
         return;
-      } else {
-
+      } else {//没有图片直接保存数据
+        this.show = true
+        this.saveAllDate()
       }
     },
+    getStr(arr,flg){
+      let tmpStr = '',obg={};
+      for(let i = 0;i<arr.length;i++){
+        tmpStr+=arr[i].text+';'
+      }
+      obg.content=tmpStr
+      obg.contentValue=tmpStr
+      obg.type=flg
+      return obg;
+    },
     saveAllDate() {
+      const {pathInfo,symptom,diagnose,others,addContent} = this
+      let detailList = []
+      if(symptom.text.length>0){
+        detailList.push(this.getStr(symptom.text,1))
+      }
+      if(diagnose.text.length>0){
+        detailList.push(this.getStr(diagnose.text,2))
+      }
+      if(others.text.length>0){
+        let obg = {}
+        detailList.push(this.getStr(others.text,3))
+      }
+      if(addContent.txt){
+        let obg = {}
+        obg.content=addContent.txt
+        obg.contentValue=addContent.txt
+        obg.type=4
+        detailList.push(obg)
+      }
       let params = {
         "dataJson": "1",
-        "detailList": [
-          {
-            "content": "string",
-            "contentValue": "string",
-            "type": 0
-          }
-        ],
-        "doctorCode": "string",//医生编码
-        "doctorId": 0,//医生id
-        "doctorName": "string",//医生name
-        "hospitalCode": "string",//医院编码
-        "hospitalDeptCode": "string",//医院科室编码
-        "hospitalDeptId": 0,//科室id
-        "hospitalDeptName": "string",//科室name
-        "hospitalId": 0,//医院id
-        "hospitalName": "string",//医院名称
-        "inquiryCode": "string",//就诊序列号
-        "patientBirthday": "2019-07-11T07:27:28.981Z",//患者出生日期,格式为:2018-11-28 17:25:30
-        "patientCode": "string",//患者编号
-        "patientId": 0,//患者id
-        "patientIdNo": "string",//患者证件号码(病历号)
-        "patientName": "string",//患者姓名
-        "patientPhone": "string",//患者联系电话(非)
-        "patientSex": 0,//患者性别:1男2女(非)
-        "regVisitedState": 0,//就诊状态(0待接诊,1接诊中,2完成接诊)(非)
-        "reportList": [
-          {
-            "narrowImage": "string",//缩略图
-            "orderNum": 0,//图片排序号
-            "originalImage": "string"//原图
-          }
-        ],
-        "type": 0//病历分类(1:门诊,2:住院)
+        "detailList": detailList,
+        "hospitalId": pathInfo.hospitalId,//医院id
+        "hospitalName": pathInfo.hospitalName,//医院名称
+        "hospitalCode": pathInfo.hospitalCode,//医院编码
+        "doctorId": pathInfo.doctorId,//医生id
+        "doctorCode": pathInfo.doctorCode,//医生编码
+        "doctorName": pathInfo.doctorName,//医生name
+        "hospitalDeptCode": pathInfo.hospitalDeptCode,//医院科室编码
+        "hospitalDeptId": pathInfo.hospitalDeptId,//科室id
+        "hospitalDeptName": pathInfo.hospitalDeptName,//科室name
+        "inquiryCode": '1',//就诊序列号,目前没有先写死
+        "patientBirthday": pathInfo.birthday+':00',//患者出生日期,格式为:2018-11-28 17:25:30
+        "patientCode": pathInfo.patientCode,//患者编号
+        "patientId": pathInfo.patientId,//患者id
+        "patientIdNo": pathInfo.patientIdNo,//患者证件号码(病历号)
+        "patientName": pathInfo.patientName,//患者姓名
+        // "patientPhone": pathInfo,//患者联系电话(非)
+        "patientSex": pathInfo.patientSex=='男'?1:2,//患者性别:1男2女(非)
+        // "regVisitedState": pathInfo,//就诊状态(0待接诊,1接诊中,2完成接诊)(非)
+        "reportList": this.imgList,
+        // "type": 0//病历分类(1:门诊,2:住院)
       }
-      api.saveInquiry(params).then((res) => {//获取图片
+      console.log(params)
+      api.saveInquiry(params).then((res) => {
         console.log(res)
-        if (res.data.length > 0) {
+        if (res.data.code == 0) {
+          this.show=false
           this.showType = 'success'
           this.submit = true
         } else {
+          this.show=false
           this.showType = 'fail'
           this.submit = true
           let timer = setTimeout(() => {
@@ -141,7 +220,8 @@ export default {
     }
   },
   components: {
-    Submit
+    Submit,
+    Loading,
   }
 }
 </script>
@@ -159,7 +239,17 @@ export default {
   top: 0;
   left: 0;
   box-sizing: border-box;
-  padding: 0.3rem 0.4rem;
+  padding: 0.3rem 0.4rem 1rem .4rem;
+  overflow: auto;
+}
+.imgView {
+  width: 2.44rem;
+  height: 3.25rem;
+  float: left;
+  margin: .3rem .2rem 0 0;
+  img {
+    width: 100%;
+  }
 }
 .personMsg {
   padding: 0.3rem 0.4rem;
@@ -167,6 +257,33 @@ export default {
   background-color: #fff;
   border-radius: 0.16rem;
   margin-bottom: 0.38rem;
+  .previewParts {
+    li {
+      padding: .1rem .3rem;
+      overflow: hidden;
+    }
+    h4 {
+      color: #000;
+      font-size: .32rem;
+      font-weight: bold;
+      position: relative;
+      i {
+        width: .16rem;
+        height: .16rem;
+        border-radius: 50%;
+        background: #767676;
+        display: inline-block;
+        position: absolute;
+        top: .15rem;
+        left: -0.3rem;
+      }
+    }
+    p {
+      font-size: .28rem;
+      color: #424242;
+      margin: .2rem 0;
+    }
+  }
   .baseMsg {
     font-size: 0.32rem;
     color: #000000;

+ 0 - 1
src/components/TabPage.vue

@@ -93,7 +93,6 @@ export default {
       if (this.modlues[flag]) {
         const type = this.modlues[flag].type;
         this.flag = type;
-        // this.flag = 4;
         this.finish[type] = true;
       }
     },

BIN
src/images/loading.gif


+ 36 - 9
src/store.js

@@ -1,6 +1,6 @@
 import Vue from 'vue';
 import Vuex from 'vuex';
-import {deepClone} from '@utils/tools.js'
+import {deepClone,getAllStr} from '@utils/tools.js'
 Vue.use(Vuex);
 
 const store = new Vuex.Store({
@@ -17,33 +17,58 @@ const store = new Vuex.Store({
       choose:[],
       origin:{},
       datas:{},
-      text:[]
+      text:[],
     },
     diagnose:{ //诊疗
       origin:[], //模板数据
       datas:{},
       text:[],
       imgFile:[],
-      imgSrc:{}
+      imgSrc:{},
     },
     others:{ //其他情况
       origin:[], //模板数据
       datas:{},
       text:[],
       imgFile:[],
-      imgSrc:{}
+      imgSrc:{},
     },
     addContent:{
-      origin:{},
-      text:[],
+      origin:[],
+      txt:'',
     }
   },
   mutations:{
+    initAllData(state){
+      state.symptom={ //症状情况
+        choose:[],
+        origin:{},
+        datas:{},
+        text:[],
+      }
+      state.diagnose={ //诊疗
+        origin:[], //模板数据
+        datas:{},
+        text:[],
+        imgFile:[],
+        imgSrc:{},
+      }
+      state.others={ //其他情况
+        origin:[], //模板数据
+        datas:{},
+        text:[],
+        imgFile:[],
+        imgSrc:{},
+      }
+      state.addContent={
+        origin:[],
+        txt:'',
+      }
+    },
     setDataAll(state,data){
       let res = state.allMoudles
       res[1].moduleDetailDTOList[0].questionMapping[1].questionMapping = data
       state.allMoudles = res
-      console.log(data,res,5555555)
     },
     savePathInfo(state,param){
       state.pathInfo = param;
@@ -164,7 +189,7 @@ const store = new Vuex.Store({
             text.push(param);
           }else{
             text.push(param);
-          }   
+          }
           break;
         case 2: //诊疗情况
           let diaText = state.diagnose.text;
@@ -199,7 +224,9 @@ const store = new Vuex.Store({
           }
           break;
         case 4:
-
+          let addText = state.addContent.txt
+          state.addContent.origin = param.data
+          state.addContent.txt = getAllStr(param)
           break;
         default:
           break;

+ 26 - 2
src/utils/tools.js

@@ -38,9 +38,33 @@ const getModelExpStr = (str) =>{
   return result
 }
 
+const getAllStr = (allData) =>{//获取界面数据,拼接字符串
+  let allStr = '',data = allData.data;
+  for(let i = 0;i < data.length;i++){
+    if(data[i].controlType != 3&&data[i].value){
+        allStr += (data[i].value).replace('{','').replace('}','')+';'
+    }
+    if(data[i].controlType == 3){//多列选择
+      let tmpStr = '';
+      for(let j = 0;j < data[i].questionDetailList.length;j++){
+        let tmpName = data[i].questionDetailList[j]
+        if(tmpName&&tmpName.value){
+          let obj = getModelExpStr(tmpName.name)
+          tmpStr+=obj.prefix+tmpName.value+obj.suffix+(j ==(data[i].questionDetailList.length-1)?';':',')
+        }
+      }
+      allStr+=tmpStr
+    }
+  }
+  return allStr;
+}
+
 module.exports =  {
   imageUrlPrefix,
   getUrlArgObject,
   deepClone,
-  getModelExpStr
-}
+  getModelExpStr,
+  getAllStr
+}
+
+