Ver código fonte

检索判断

Luolei 5 anos atrás
pai
commit
0e6e0d96bd

+ 0 - 5
config/index.js

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

+ 0 - 4
package.json

@@ -5,11 +5,7 @@
   "author": "Luolei <16657115156@163.com>",
   "author": "Luolei <16657115156@163.com>",
   "private": true,
   "private": true,
   "scripts": {
   "scripts": {
-<<<<<<< HEAD
-    "dev": "webpack-dev-server --inline --hot --progress --config build/webpack.dev.conf.js",
-=======
     "dev": "webpack-dev-server --inline --hot --config build/webpack.dev.conf.js",
     "dev": "webpack-dev-server --inline --hot --config build/webpack.dev.conf.js",
->>>>>>> dev
     "start": "npm run dev",
     "start": "npm run dev",
     "build": "node build/build.js"
     "build": "node build/build.js"
   },
   },

+ 21 - 4
src/components/AddContent.vue

@@ -5,10 +5,15 @@
         <li v-for="(item,idx) in dataTrd">
         <li v-for="(item,idx) in dataTrd">
           <p class="question">{{idx+1 + '. ' +item.name}}</p>
           <p class="question">{{idx+1 + '. ' +item.name}}</p>
           <ComTextArea
           <ComTextArea
-            v-if="item.controlType == 6"
+            v-if="item.controlType == 5"
             :item="item"
             :item="item"
             @changeAreaVal="changeAreaVal($event,idx)"
             @changeAreaVal="changeAreaVal($event,idx)"
           ></ComTextArea>
           ></ComTextArea>
+          <Input v-if="item.controlType==6 || item.controlType==7"
+            :item="item"
+            :key="item.id"
+            :uFlag="uFlag"
+            @updata="updataData"/>
           <template
           <template
             v-if="item.controlType == 3"
             v-if="item.controlType == 3"
             v-for="(part,index) in item.questionDetailList"
             v-for="(part,index) in item.questionDetailList"
@@ -36,6 +41,7 @@
 <script type="text/javascript">
 <script type="text/javascript">
 import ComTextArea from '../common/ComTextArea.vue';
 import ComTextArea from '../common/ComTextArea.vue';
 import MultiLineInput from '../common/MultiLineInput.vue';
 import MultiLineInput from '../common/MultiLineInput.vue';
+import Input from '../common/Input.vue';
 
 
 export default {
 export default {
   name: 'AddContent',
   name: 'AddContent',
@@ -43,6 +49,7 @@ export default {
   data() {
   data() {
     return {
     return {
       dataTrd: [],
       dataTrd: [],
+      uFlag:false,  //输入框触发更新
       val: ''
       val: ''
     }
     }
   },
   },
@@ -62,11 +69,21 @@ export default {
     },
     },
     next(){
     next(){
       this.$emit('next','preview')
       this.$emit('next','preview')
-    }
+    },
+    updataData(data){
+      // const origMapping = this.datas.questionMapping;
+      // let mapping = this.checkDatas.questionMapping;
+      // for(let i in origMapping){
+      //   if(origMapping[i].id==data.id){
+      //     mapping.splice(i,1,data)
+      //   }
+      // }
+    },
   },
   },
   components: {
   components: {
     ComTextArea,
     ComTextArea,
     MultiLineInput,
     MultiLineInput,
+    Input,
   }
   }
 }
 }
 </script>
 </script>
@@ -83,10 +100,10 @@ export default {
   padding-bottom: 0.2rem;
   padding-bottom: 0.2rem;
   .addPart {
   .addPart {
     li {
     li {
-      margin-bottom: 0.5rem /* 50/100 */;
+      margin-bottom: 0.1rem;
     }
     }
     .question {
     .question {
-      margin-bottom: 0.3rem /* 30/100 */;
+      margin-bottom: 0.2rem;
       font-weight: bold;
       font-weight: bold;
     }
     }
   }
   }

+ 3 - 2
src/components/Search.vue

@@ -64,8 +64,8 @@ export default {
   },
   },
   methods: {
   methods: {
     showDetil(item) {
     showDetil(item) {
-      this.$emit('showDetil', item)
-      this.$emit('search', false)
+      this.$emit('showDetil', item,true)
+      // this.$emit('search', false)
     },
     },
     search() {
     search() {
       this.$emit('search', false)
       this.$emit('search', false)
@@ -99,6 +99,7 @@ export default {
   width: 100%;
   width: 100%;
   top: 0;
   top: 0;
   left: 0;
   left: 0;
+  z-index: 55;
   background-color: #ededed;
   background-color: #ededed;
 }
 }
 .searchTop {
 .searchTop {

+ 14 - 3
src/components/Symptom.vue

@@ -95,8 +95,10 @@ export default {
       delText: "是否删除该信息?<br/> (已填内容将清除)",
       delText: "是否删除该信息?<br/> (已填内容将清除)",
       delIndex: null,
       delIndex: null,
       showToast: false,
       showToast: false,
-      finished: false,   //是否填写了明细
+      finished: false,//是否填写了明细
       searchShow: false,//显示搜索界面
       searchShow: false,//显示搜索界面
+      tmpItem:{},//检索的症状
+      isSearch:false
     }
     }
   },
   },
   created() {
   created() {
@@ -137,8 +139,13 @@ export default {
       this.$store.commit('setChoose', { choose: this.chooseSymp, type: "1" });
       this.$store.commit('setChoose', { choose: this.chooseSymp, type: "1" });
 
 
     },
     },
-    showDetil(item) {
-      this.chooseSymp.push(item);
+    showDetil(item,flg) {
+      if(!flg){
+        this.chooseSymp.push(item);
+      }else{
+        this.tmpItem=item
+        this.isSearch=flg
+      }
       this.questId = item.questionId || item.id || item.conceptId;
       this.questId = item.questionId || item.id || item.conceptId;
       const id = item.questionId || item.id; //常见症状questionId,推送id,两者均有可能没有
       const id = item.questionId || item.id; //常见症状questionId,推送id,两者均有可能没有
       //将选中的name存到store中的text
       //将选中的name存到store中的text
@@ -225,6 +232,10 @@ export default {
       this.delText = "是否删除该信息?<br/> (已填内容将清除)";
       this.delText = "是否删除该信息?<br/> (已填内容将清除)";
     },
     },
     complete() {//明细填写完成
     complete() {//明细填写完成
+      if(this.isSearch){
+        this.chooseSymp.push(this.tmpItem);
+        this.searchShow = false
+      }
       this.checkText = this.$store.state.symptom.text;
       this.checkText = this.$store.state.symptom.text;
       this.show = false;
       this.show = false;
       this.questId = null;
       this.questId = null;