MrShi
2023-12-27 d71fde29b661900f67bfe5f8edc81626d910082f
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%;