luolei 5 rokov pred
rodič
commit
abdb73edd7
3 zmenil súbory, kde vykonal 80 pridanie a 62 odobranie
  1. 1 1
      build/webpack.dev.conf.js
  2. 1 1
      package.json
  3. 78 60
      src/components/Others.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.106',
+    host: '192.168.1.103',
     port: PORT || config.dev.port,
     open: config.dev.autoOpenBrowser,
     overlay: config.dev.errorOverlay

+ 1 - 1
package.json

@@ -12,7 +12,7 @@
   "dependencies": {
     "axios": "^0.18.0",
     "babel-polyfill": "^6.26.0",
-    "better-scroll": "^1.13.2",
+    "better-scroll": "^1.15.2",
     "fastclick": "^1.0.6",
     "jquery": "^3.4.1",
     "less": "^3.8.1",

+ 78 - 60
src/components/Others.vue

@@ -1,67 +1,70 @@
 <template>
-  <div class="other-wrap">
-    <div v-for="(it,i) in dtoList" 
-        v-if="dtoList"
-        :key="it.id"
-        class="label">
-        <p class="quest">{{i + 1 +'.' + (it.description||it.name)}}</p>
-        <img class="questionImg" :src="it.url.replace('{imageUrlPrefix}',imgUrl)" v-if="it.url">
-        <!-- <Label v-if="it.controlType==0" -->
-        <Label v-if="it.controlType==0"
+  <div class="other-wrap wrapper">
+    <div class="content">
+      <div v-for="(it,i) in dtoList" 
+          v-if="dtoList"
+          :key="it.id"
+          class="label">
+          <p class="quest">{{i + 1 +'.' + (it.description||it.name)}}</p>
+          <img class="questionImg" :src="it.url.replace('{imageUrlPrefix}',imgUrl)" v-if="it.url">
+          <!-- <Label v-if="it.controlType==0" -->
+          <Label v-if="it.controlType==0"
+                :item="it"
+                :ppId="it.id" 
+                :moduleType="datas.type" 
+                @setDetail="setDetail"/>
+          <!-- 输入框 -->
+          <Input v-if="it.controlType==6 || it.controlType==7"
               :item="it"
-              :ppId="it.id" 
-              :moduleType="datas.type" 
-              @setDetail="setDetail"/>
-        <!-- 输入框 -->
-        <Input v-if="it.controlType==6 || it.controlType==7"
-            :item="it"
-            :key="it.id"
-            @updata="updataData($event,it.id)"/>
-        <!-- 文本域 -->
-        <ComTextArea v-if="it.controlType == 5"
-            :item="it"
-            @updata="updataData($event,it.id)"/>
-        <Radio v-if="it.controlType==1" 
-            :item="it"
-            :key="it.id"
-            @updata="updataData($event,it.id)"/>
-        <CheckBox v-if="it.controlType==2" 
-            :item="it"
-            :key="it.id"
-            @updata="updataData($event,it.id)"/>
-        <!-- 多行输入 存值和回读事件未处理 -->
-        <!-- <template
-            v-if="it.controlType == 3"
-            v-for="(part,index) in it.questionDetailList"
-          >
-            <MultiLineInput
+              :key="it.id"
+              @updata="updataData($event,it.id)"/>
+          <!-- 文本域 -->
+          <ComTextArea v-if="it.controlType == 5"
+              :item="it"
+              @updata="updataData($event,it.id)"/>
+          <Radio v-if="it.controlType==1" 
+              :item="it"
+              :key="it.id"
+              @updata="updataData($event,it.id)"/>
+          <CheckBox v-if="it.controlType==2" 
+              :item="it"
+              :key="it.id"
+              @updata="updataData($event,it.id)"/>
+          <!-- 多行输入 存值和回读事件未处理 -->
+          <!-- <template
               v-if="it.controlType == 3"
-              :msg="part.name"
-              :part="part"
-              @updata="updataData($event,index,it)"
-            ></MultiLineInput>
-        </template> -->
-    </div>
-    <div class="result" v-if="checkText.length>0">
-      <p class="title">{{datas.name}}</p>
-      <p>{{getText()}}</p>
-    </div>
-    <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>
-    <div class="detail" v-if="show">
-      <DetailBox @close="closeDetal" 
-              :data="labelDetail" 
-              :moduleType="datas.type"
-              :ppId="ppId"
-              v-if="labelDetail.questionMapping&&labelDetail.questionMapping.length>0"
-              @pComplete="complete"/>
+              v-for="(part,index) in it.questionDetailList"
+            >
+              <MultiLineInput
+                v-if="it.controlType == 3"
+                :msg="part.name"
+                :part="part"
+                @updata="updataData($event,index,it)"
+              ></MultiLineInput>
+          </template> -->
+      </div>
+      <div class="result" v-if="checkText.length>0">
+        <p class="title">{{datas.name}}</p>
+        <p>{{getText()}}</p>
+      </div>
     </div>
+    
+      <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>
+      <div class="detail" v-if="show">
+        <DetailBox @close="closeDetal" 
+                :data="labelDetail" 
+                :moduleType="datas.type"
+                :ppId="ppId"
+                v-if="labelDetail.questionMapping&&labelDetail.questionMapping.length>0"
+                @pComplete="complete"/>
+      </div>
   </div>
 </template>
 <script type="text/javascript">
@@ -75,6 +78,7 @@
   import Radio from '../common/Radio.vue';
   import CheckBox from '../common/CheckBox.vue';
   import MultiLineInput from '../common/MultiLineInput.vue';
+  import BScroll from 'better-scroll';
   export default {
     name:'Others',
     data(){
@@ -89,10 +93,18 @@
         ppId:null,
         show:false,
         imgUrl:imageUrlPrefix,
+        scroll:null
       }
     },
     props:['datas','preName','nextName','modluesLen'],
     created(){},
+    mounted(){
+      let scroll = new BScroll('.wrapper',{
+          scrollY: false,
+          click: true
+      })
+      this.scroll = scroll
+    },
     methods:{
       beBack(){
         this.$emit('back');
@@ -108,6 +120,9 @@
         this.labelDetail = obj.detail;
         this.ppId = obj.ppId;
         this.show = true;
+        let tmpSc = this.scroll
+        tmpSc.scrollY = false
+        this.scroll = tmpSc
       },
       complete(){
         this.show = false;
@@ -167,6 +182,9 @@
 @import '../less/base.less';
   .other-wrap{
     font-size: .3rem;
+    position: fixed;
+    height: 100%;
+    width: 100%;
     .quest{
       color: #000;
       margin-bottom: .36rem;