From cd9cbc46c0774c01674be435bcc86d4a03ada687 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 27 二月 2024 14:18:13 +0800
Subject: [PATCH] 整理

---
 admin/src/components/business/OperaVisitsDesWindow.vue |   65 ++++++++++++++++++++++++++++----
 1 files changed, 56 insertions(+), 9 deletions(-)

diff --git a/admin/src/components/business/OperaVisitsDesWindow.vue b/admin/src/components/business/OperaVisitsDesWindow.vue
index 9cf9b28..2e8bf42 100644
--- a/admin/src/components/business/OperaVisitsDesWindow.vue
+++ b/admin/src/components/business/OperaVisitsDesWindow.vue
@@ -14,22 +14,25 @@
                     <div class="list_item_val_item">鎷滆鏃堕棿锛歿{info.starttime}} 鑷� {{info.endtime}}</div>
                     <div class="list_item_val_item">鎷滆浜嬬敱锛歿{info.reason}}</div>
                     <div class="list_item_val_item">鐢宠浜哄憳锛歿{info.name}} {{info.companyName}}</div>
-                    <div class="list_item_val_item">鐢宠闂ㄧ锛歿{info.deviceList ? info.deviceList.map(item => item.name).join(',') : ''}}</div>
+                    <div class="list_item_val_item">鐢宠闂ㄧ锛歿{info.deviceRoleList ? info.deviceRoleList.map(item => item.name).join(' | ') : ''}}</div>
                     <div class="list_item_val_item">鍒涘缓鏃堕棿锛歿{info.createDate}}</div>
                 </div>
             </div>
             <div class="list_item">
                 <div class="list_item_label">璁垮淇℃伅</div>
-                <div class="list_item_info" v-if="info">闅忚杞﹁締锛歿{info.carNos}}</div>
                 <div class="list_item_table" v-if="info">
                     <el-table
-                        :data="info.lwWithUserList ? info.lwWithUserList : []"
+                        :data="info.withUserList ? info.withUserList : []"
                         border
                         :header-cell-style="{background: '#dcdde2', color: 'rgb(51, 51, 51)'}"
                         style="width: 100%">
                         <el-table-column
-                            prop="name"
+                            width="150"
                             label="濮撳悕">
+                            <template slot-scope="{row}">
+                                <span>{{row.name}}</span>
+                                <span style="border-radius: 5px; padding: 2px 5px; box-sizing: border-box; border: 1px solid #0d68ff; color: #0d68ff; margin-left: 5px;" v-if="info.memberId === row.memberId">鐢宠浜�</span>
+                            </template>
                         </el-table-column>
                         <el-table-column
                             label="鎬у埆">
@@ -41,8 +44,12 @@
                         <el-table-column
                             prop="birthday"
                             label="骞撮緞">
+                            <template slot-scope="{row}">
+                                <span>{{getAge(row.birthday)}}</span>
+                            </template>
                         </el-table-column>
                         <el-table-column
+                            width="150"
                             prop="phone"
                             label="鎵嬫満鍙�">
                         </el-table-column>
@@ -55,20 +62,43 @@
                             </template>
                         </el-table-column>
                         <el-table-column
-                            prop="idcardNo"
+                            width="160"
+                            prop="idcardDecode"
                             label="韬唤璇佸彿鐮�">
                         </el-table-column>
                         <el-table-column
+                            width="150"
                             prop="companyName"
                             label="鍏徃">
                         </el-table-column>
                         <el-table-column
-                            prop="faceImg"
-                            label="浜鸿劯鐓х墖">
+                            width="150"
+                            prop="carNos"
+                            label="闅忚杞﹁締">
                         </el-table-column>
                         <el-table-column
-                            prop="imgurl"
+                            width="150"
+                            label="浜鸿劯鐓х墖">
+                            <template slot-scope="{row}">
+                                <el-image
+                                    v-if="row.faceImg"
+                                    style="width: 100px; height: 100px"
+                                    :src="info.prefixUrl + row.faceImg"
+                                    :preview-src-list="[info.prefixUrl + row.faceImg]">
+                                </el-image>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            width="150"
                             label="鍋ュ悍璇�">
+                            <template slot-scope="{row}">
+                                <el-image
+                                    v-if="row.imgurl"
+                                    style="width: 100px; height: 100px"
+                                    :src="info.prefixUrl + row.imgurl"
+                                    :preview-src-list="[info.prefixUrl + row.imgurl]">
+                                </el-image>
+                            </template>
                         </el-table-column>
                     </el-table>
                 </div>
@@ -106,6 +136,19 @@
     }
   },
   methods: {
+    getAge (val) {
+      if (!val) return ''
+      const currentYear = new Date().getFullYear() // 褰撳墠鐨勫勾浠�
+      const calculationYear = new Date(val).getFullYear() // 璁$畻鐨勫勾浠�
+      const wholeTime = currentYear + val.substring(4) // 鍛ㄥ瞾鏃堕棿
+      const calculationAge = currentYear - calculationYear // 鎸夌収骞翠唤璁$畻鐨勫勾榫�
+      // 鍒ゆ柇鏄惁杩囦簡鐢熸棩
+      if (new Date().getTime() > new Date(wholeTime).getTime()) {
+        return calculationAge
+      } else {
+        return calculationAge - 1
+      }
+    },
     open (title, id) {
       this.title = title
       this.visible = true
@@ -118,7 +161,11 @@
   }
 }
 </script>
-
+<style>
+    .el-image-viewer__wrapper {
+        z-index: 3000 !important;
+    }
+</style>
 <style lang="scss" scoped>
     .list {
         width: 100%;

--
Gitblit v1.9.3