Parcourir la source

完善出入管理bug

凉纪 il y a 1 an
Parent
commit
6aee8abb50

+ 2 - 2
src/views/menu/visitCheck/detail.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="intro-add">
-    <nav-bar :go="go"></nav-bar>
+    <nav-bar></nav-bar>
     <div class="page-container">
       <!--   基本信息   -->
       <div class="card">
@@ -25,7 +25,7 @@
                 <div class="file-box">
                   <p class="van-ellipsis" v-for="(v, i) in visitInfo.letterFile"
                      :key="v.url"
-                     @click="previewFile(v.url)">{{v.name}}</p>
+                     @click="previewFile(v)">{{v.name}}</p>
                 </div>
               </template>
             </van-cell>

+ 17 - 11
src/views/menu/visitRecord/add.vue

@@ -42,18 +42,15 @@
             </div>
             <van-cell title="单位" :value="selectedUser.companyName"></van-cell>
             <van-cell title="出入事由" :value="selectedUser.reasons"></van-cell>
-            <div class="upload-box" v-if="selectedUser.letterFile && selectedUser.letterFile.length > 0">
-              <span>介绍信</span>
-              <van-cell >
-                <div
-                  class="nfc-img van-hairline--surround"
-                  v-for="(v, i) in selectedUser.letterFile"
-                  :key="v.url"
-                  @click="preView(v.imgPath)">
-                  <img :src="imgUrl(v.imgPath)" alt="" />
+            <van-cell title="介绍信"  v-if="selectedUser.letterFile && selectedUser.letterFile.length > 0">
+              <template #right-icon>
+                <div class="file-box">
+                  <p class="van-ellipsis" v-for="(v, i) in selectedUser.letterFile"
+                     :key="v.url"
+                     @click="previewFile(v)">{{v.name}}</p>
                 </div>
-              </van-cell>
-            </div>
+              </template>
+            </van-cell>
             <van-cell title="出入类型" :value="getDictLabel(selectedUser.type,'out_in_type')"></van-cell>
             <van-field
               v-model="formData.accompanyingPerson"
@@ -158,6 +155,9 @@ export default {
     getItemInfo(item){
       this.selectedUser = item;
     },
+    previewFile(file){
+      this.openFilePreview(file);
+    },
     getUserList(){
       let data = {
         orgId:this.orgId,
@@ -296,6 +296,12 @@ export default {
     }
   }
 }
+.file-box{
+  width: 70%;
+  display: flex;
+  justify-content: flex-end;
+  color:#008cd6;
+}
 .big-btn-box{
   padding: 20px;
 }

+ 1 - 1
src/views/menu/visitRecord/detail.vue

@@ -30,7 +30,7 @@
                 <div class="file-box">
                   <p class="van-ellipsis" v-for="(v, i) in selectedUser.letterFile"
                      :key="v.url"
-                     @click="previewFile(v.url)">{{v.name}}</p>
+                     @click="previewFile(v)">{{v.name}}</p>
                 </div>
               </template>
             </van-cell>