From 2c4cfb7ed1ece6c3b80f7d551a267e9367ddb12b Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 05 一月 2024 10:31:31 +0800
Subject: [PATCH] 整理
---
admin/src/components/business/OperaVisitsDesWindow.vue | 48 +++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/admin/src/components/business/OperaVisitsDesWindow.vue b/admin/src/components/business/OperaVisitsDesWindow.vue
index 9cf9b28..6170e27 100644
--- a/admin/src/components/business/OperaVisitsDesWindow.vue
+++ b/admin/src/components/business/OperaVisitsDesWindow.vue
@@ -23,7 +23,7 @@
<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%">
@@ -41,8 +41,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,7 +59,8 @@
</template>
</el-table-column>
<el-table-column
- prop="idcardNo"
+ width="160"
+ prop="idcardDecode"
label="韬唤璇佸彿鐮�">
</el-table-column>
<el-table-column
@@ -63,12 +68,28 @@
label="鍏徃">
</el-table-column>
<el-table-column
- prop="faceImg"
+ 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
- prop="imgurl"
+ 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 +127,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 +152,11 @@
}
}
</script>
-
+<style>
+ .el-image-viewer__wrapper {
+ z-index: 3000 !important;
+ }
+</style>
<style lang="scss" scoped>
.list {
width: 100%;
--
Gitblit v1.9.3