<template>
    <view >
        <!-- subpages/searchResult/pages/resiInfo/resiInfo.wxml -->
        <!-- 基本信息 -->
        <view class="card" v-if="form.baseInfoDto.idNum">
            <view class="top">
                <view class="left" >
                    <view class="name">
                        <view style="display: flex">
                            <image
                                style="width: 40rpx; height: 40rpx; margin-right: 16rpx"
                                v-if="form.baseInfoDto.gender == '1' && form.baseInfoDto.age > 18 && form.baseInfoDto.age < 60"
                                src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/1e21790833b04e9abe61e2a8f40446cb.png"
                                mode=""
                            />
                            <image
                                style="width: 40rpx; height: 40rpx; margin-right: 16rpx"
                                v-if="form.baseInfoDto.gender == '1' && form.baseInfoDto.age < 18"
                                src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/62c2b6a1ce834f8dae081b562b2579b9.png"
                                mode=""
                            />
                            <image
                                style="width: 40rpx; height: 40rpx; margin-right: 16rpx"
                                v-if="form.baseInfoDto.gender == '1' && form.baseInfoDto.age >= 60"
                                src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/bd586a4e7d0f4b3aa68c79067dfe1428.png"
                                mode=""
                            />
                            <image
                                style="width: 40rpx; height: 40rpx; margin-right: 16rpx"
                                v-if="form.baseInfoDto.gender == '2' && form.baseInfoDto.age > 18 && form.baseInfoDto.age < 60"
                                src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/3b44e3495dcd4d96a3c07baad1bd7c5e.png"
                                mode=""
                            />
                            <image
                                style="width: 40rpx; height: 40rpx; margin-right: 16rpx"
                                v-if="form.baseInfoDto.gender == '2' && form.baseInfoDto.age < 18"
                                src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/0c38251bba644a6b8e4a925aea74c9a7.png"
                                mode=""
                            />
                            <image
                                style="width: 40rpx; height: 40rpx; margin-right: 16rpx"
                                v-if="form.baseInfoDto.gender == '2' && form.baseInfoDto.age >= 60"
                                src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/2465ff7633a94413bf4ed2aa778c2765.png"
                                mode=""
                            />
                            <image
                                style="width: 40rpx; height: 40rpx; margin-right: 16rpx"
                                v-if="form.baseInfoDto.gender == '0'"
                                src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/1e21790833b04e9abe61e2a8f40446cb.png"
                                mode=""
                            />
                        </view>
                        <view style="font-size: 32rpx; margin-right: 35rpx">{{ form.baseInfoDto.name }}</view>
                        <view style="font-size: 28rpx; color: #999999">信息完整度：</view>
                        <view style="color: #04b8ad">{{ form.integrityData.score }}</view>
                    </view>
                    <view class="tags">
                        <view
                            :class="
                                'tag ' +
                                (itemC === '党员'
                                    ? 'hong'
                                    : itemC === '群众'
                                    ? 'lan'
                                    : itemC === '共青团员'
                                    ? 'ju'
                                    : itemC === '残疾人员'
                                    ? 'qing'
                                    : itemC === '慢病'
                                    ? 'zi'
                                    : itemC === '死亡'
                                    ? '灰'
                                    : itemC === '老年人'
                                    ? 'lan'
                                    : itemC === '低保人员'
                                    ? 'lv'
                                    : itemC === '退役军人'
                                    ? 'hong'
                                    : itemC === '保障房人员'
                                    ? 'huang'
                                    : itemC === '育龄妇女'
                                    ? 'fen'
                                    : itemC === '特扶人员'
                                    ? 'zi'
                                    : itemC === '安置帮教'
                                    ? 'zi'
                                    : itemC === '吸毒人员'
                                    ? 'hong'
                                    : itemC === '社区矫正'
                                    ? 'qing'
                                    : itemC === '不良青少年'
                                    ? 'huang'
                                    : itemC === '肇事肇祸精神病'
                                    ? 'zi'
                                    : itemC === '邪教人员'
                                    ? 'ju'
                                    : itemC === '统战人员'
                                    ? 'lv'
                                    : itemC === '信访人员'
                                    ? 'hong'
                                    : itemC === '志愿者'
                                    ? 'hong'
                                    : itemC === '楼长'
                                    ? 'lan'
                                    : itemC === '单元长'
                                    ? 'qing'
                                    : itemC === '公益岗'
                                    ? 'fen'
                                    : itemC === '大病'
                                    ? 'hong'
                                    : 'lan') +
                                '  '
                            "
                            v-for="(itemC, index) in form.baseInfoDto.categoryInfo.categoryNames"
                            :key="index"
                        >
                            {{ itemC }}
                        </view>
                    </view>
                </view>
                <view class="right">
                    <view class="jm-btn" @tap="toAddResi">编辑</view>
                </view>
            </view>
            <!-- <view class="form">
        <view class="form_label">地址：</view>
        <view class="form_value"><text>{{form
        .resideInfoDtos[0].agencyName}}</text>{{form.resideInfoDtos[0].homeName}}</view>
    </view> -->
            <view class="form">
                <view class="form_label">创建时间：</view>
                <view class="form_value">{{ form.baseInfoDto.createdTime }}</view>
            </view>
            <view class="form">
                <view class="form_label">最近更新时间：</view>
                <view class="form_value">{{ form.baseInfoDto.updatedTime }}</view>
            </view>
            <view class="tabs">
                <view
                    :class="'tab_item ' + (activeType === index ? 'border_bto' : '')"
                    @tap="handelClickTab"
                    :data-item="item"
                    :data-index="index"
                    v-if="item.filledQty != 0"
                    v-for="(item, index) in tabList"
                    :key="index"
                >
                    {{ item.name }}

                    <text :style="'color:' + (item.filledQty !== item.totalQty ? '#f27225' : '#1ebfb5')" v-if="item.filledQty || item.id == 'ext'">
                        （{{ item.filledQty }}/{{ item.totalQty }}）
                    </text>
                </view>
            </view>
        </view>

        <view class="card">
            <view class="title">基础信息</view>
            <view class="info">
                <view class="item">
                    <text class="must">*</text>
                    <view class="label">国籍：</view>
                    <view class="value">{{ form.baseInfoDto&&form.baseInfoDto.nationalityName?form.baseInfoDto.nationalityName:'--' }}</view>
                </view>
                <view class="item">
                    <text class="must">*</text>
                    <view class="label">证件类型：</view>
                    <view class="value">{{ filterLabel(idTypeList,form.baseInfoDto.idType) }}</view>
                </view>
                <view class="item">
                    <text class="must">*</text>
                    <view class="label">证件号：</view>
                    <view class="value">{{ form.baseInfoDto&&form.baseInfoDto.idNum?form.baseInfoDto.idNum:'--' }}</view>
                </view>
                <view class="item">
                    <text class="must">*</text>
                    <view class="label">联系电话：</view>
                    <view class="value">{{ form.baseInfoDto&&form.baseInfoDto.mobile?form.baseInfoDto.mobile:'--'  }}</view>
                </view>
                <view class="item">
                    <view class="label">文化程度：</view>
                    <view class="value">{{ form.eduInfoDto&&form.eduInfoDto.cultureLevelName?form.eduInfoDto.cultureLevelName:'--'  }}</view>
                </view>

                <view class="item">
                    <view class="label">性别：</view>
                    <view class="value">{{ form.baseInfoDto&&form.baseInfoDto.genderName?form.baseInfoDto.genderName:'--' }}</view>
                </view>
                <view class="item">
                    <view class="label">出生日期：</view>
                    <view class="value">{{ form.baseInfoDto.birthday || '--' }}</view>
                </view>
                <view class="item">
                    <view class="label">民族：</view>
                    <view class="value">{{ form.baseInfoDto.nationName || '--' }}</view>
                </view>
                <view class="item">
                    <view class="label">婚姻状况：</view>
                    <view class="value">{{ marriageName || '--' }}</view>
                </view>
                <view class="item">
                    <view class="label">籍贯：</view>
                    <view class="value">{{ form.baseInfoDto.nativePlace || '--' }}</view>
                </view>
            </view>
        </view>

        <view class="card" id="reside">
            <view class="title">居住信息</view>
            <view class="info" style="margin-top: 20rpx" v-for="(item, index) in form.resideInfoDtos" :key="index">
                <view class="item">
                    <text class="must">*</text>
                    <view class="label">所属网格：</view>
                    <view class="value">{{ item.gridName || '--' }}</view>
                </view>

                <view class="item">
                    <text class="must">*</text>
                    <view class="label">所属房屋：</view>
                    <view class="value">{{ item.agencyName }}{{ item.homeName }}</view>
                </view>

                <view class="item">
                    <view class="label">人房关系：</view>
                    <view class="value">{{ item.resiHouseRel != null ? (item.resiHouseRel === 0 ? '自住' : item.resiHouseRel === 1 ? '租住' : '--') : '--' }}</view>
                </view>

                <view class="item">
                    <view class="label">人户状况：</view>
                    <view class="value" v-if="item.householdSituation && dicts.householdSituationArr">
                        <block v-for="(selectItem, index1) in dicts.householdSituationArr" :key="index1">
                            <block v-if="selectItem.value === item.householdSituation">
                                {{ selectItem.label }}
                            </block>
                        </block>
                    </view>
                    <view v-else>--</view>
                </view>

                <view class="item">
                    <view class="label">户籍所在地：</view>
                    <view class="value">{{ item.placeOfDomicile ? item.placeOfDomicile : '--' }}</view>
                </view>

                <view class="item">
                    <view class="label">与户主关系：</view>
                    <view class="value" >{{ filterLabel(dicts.houseHolderRelArr,item.houseHolderRel)}}</view>
                </view>
            </view>
        </view>

        <view class="card" id="ext">
            <view class="title">拓展信息</view>
            <view class="info">
                <view class="item">
                    <view class="label">宗教信仰：</view>
                    <view class="value">{{ form.religionDto && form.religionDto.religion ? form.religionDto.religion : '--' }}</view>
                </view>
                <view class="item">
                    <view class="label">就业状态：</view>
                    <view class="value" >{{ filterLabel(dicts.careerStatusArr,form.workInfoDto?form.workInfoDto.careerStatus:null)}}</view>
                </view>
                <view class="item" v-if="form.workInfoDto && form.workInfoDto.careerStatus >= 1 && form.workInfoDto.careerStatus <= 5">
                    <view class="label">工作单位：</view>
                    <view class="value">{{ form.workInfoDto ? (form.workInfoDto.workUnit ? form.workInfoDto.workUnit : '--') : '--' }}</view>
                </view>
                <view class="item" v-if="form.unemployedDto &&form.workInfoDto &&(form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6)">
                    <view class="label">原工作单位：</view>
                    <view class="value">{{ form.unemployedDto ? (form.unemployedDto.originWorkUnit ? form.unemployedDto.originWorkUnit : '--') : '--' }}</view>
                </view>
                <view class="item" v-if="form.workInfoDto && form.workInfoDto  && form.workInfoDto.careerStatus >= 1 && form.workInfoDto.careerStatus <= 5">
                    <view class="label">职业：</view>
                    <view class="value">{{ form.workInfoDto ? (form.workInfoDto.occupation ? form.workInfoDto.occupation : '--') : '--' }}</view>
                </view>
                <view class="item" v-if="form.unemployedDto &&form.workInfoDto  && (form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6)">
                    <view class="label">失业时间：</view>
                    <view class="value">{{ form.unemployedDto ? (form.unemployedDto.unemploymentTime ? form.unemployedDto.unemploymentTime : '--') : '--' }}</view>
                </view>
                <view class="item" v-if="form.economyDto &&form.workInfoDto  && form.workInfoDto.careerStatus >= 1 && form.workInfoDto.careerStatus <= 5">
                    <view class="label">月收入：</view>
                    <view class="value">{{ form.economyDto ? (form.economyDto.monthIncome ? form.economyDto.monthIncome : '--') : '--' }}</view>
                </view>
                <view class="item" v-if="form.unemployedDto &&form.workInfoDto  && (form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6)">
                    <view class="label">失业证号：</view>
                    <view class="value">{{ form.unemployedDto ? (form.unemployedDto.unemploymentNum ? form.unemployedDto.unemploymentNum : '--') : '--' }}</view>
                </view>
                <view class="item" v-if="form.unemployedDto &&form.workInfoDto  && (form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6)">
                    <view class="label">失业原因：</view>
                    <view class="value">{{ form.unemployedDto ? (form.unemployedDto.unemploymentReason ? form.unemployedDto.unemploymentReason : '--') : '--' }}</view>
                </view>
                <view class="item" v-if="form.unemployedDto &&form.workInfoDto  && (form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6)">
                    <view class="label">失业原因：</view>
                    <view class="value">{{ form.unemployedDto ? (form.unemployedDto.employmentNum ? form.unemployedDto.employmentNum : '--') : '--' }}</view>
                </view>
                <view class="item" v-if="form.unemployedDto &&form.workInfoDto  && (form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6)">
                    <view class="label">技术特长：</view>
                    <view class="value">{{ form.unemployedDto ? (form.unemployedDto.specialSkill ? form.unemployedDto.specialSkill : '--') : '--' }}</view>
                </view>
                <view class="item" v-if="form.unemployedDto &&form.workInfoDto  && (form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6)">
                    <view class="label">是否领取失业金：</view>
                    <view class="value">
                        {{
                            form.unemployedDto.unempCompensationFlag != null
                                ? form.unemployedDto.unempCompensationFlag === 0
                                    ? '否'
                                    : form.unemployedDto.unempCompensationFlag === 1
                                    ? '是'
                                    : '--'
                                : '--'
                        }}
                    </view>
                </view>
                <view class="item" v-if="form.unemployedDto && form.workInfoDto  &&  (form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6)">
                    <view class="label">是否就业困难对象：</view>
                    <view class="value">
                        {{
                            form.unemployedDto.employmentHardFlag != null
                                ? form.unemployedDto.employmentHardFlag === 0
                                    ? '否'
                                    : form.unemployedDto.employmentHardFlag === 1
                                    ? '是'
                                    : '--'
                                : '--'
                        }}
                    </view>
                </view>
                <view class="item" v-if="form.workInfoDto && form.workInfoDto  && (form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6)">
                    <view class="label">劳动就业愿望：</view>
                    <view class="value">{{ form.workInfoDto ? (form.workInfoDto.employmentWish ? form.workInfoDto.employmentWish : '--') : '--' }}</view>
                </view>
                <view class="item">
                    <view class="label">有无赡养人：</view>
                    <view class="value">
                        {{ form.familyInfoDto && form.familyInfoDto.elderlyFlag == 1 ? '有' : form.familyInfoDto && form.familyInfoDto.elderlyFlag == 0 ? '无' : '--' }}
                    </view>
                </view>
            </view>
        </view>

        <view class="card" :id="item.scrollId" v-for="(item, index) in expandList" :key="index">
            <view class="title">{{ item.title }}</view>

            <view class="info" v-for="(itemC, indexC) in item.children" :key="indexC">
                <view class="item">
                    <view class="label">{{ itemC.label }}：</view>
                    <view class="value">{{ itemC.value || '--' }}</view>
                </view>
            </view>
        </view>
        <view class="card" id="graph1">
            <view class="title">
                <text>人员图谱</text>
            </view>
            <resi-graph :resiId="resiId" @clickGraphNode="clickGraphNode" ></resi-graph>
        </view>
        <view class="card" id="business">
            <view class="title">
                <text>业务记录</text>
            </view>
            <BusinessRecord v-if="ywVisible" :ywData="ywData" />
        </view>

        <view class="card" id="update">
            <view class="title">
                <text>更新记录</text>
            </view>
            <view style="margin-top: 32rpx; padidng: 0 12rpx">
                <view class="logsBox" v-for="(item, index) in logs" :key="item.changeTime">
                    <view :class="'item-dian ' + (index != 0 ? 'item-dian1' : '')">
                        <view class="neidian"></view>
                    </view>

                    <view class="logs-top">
                        <view class="logs-top-title">{{ item.typeName }}-{{ item.operatorName }}</view>
                        <view class="logs-top-time">{{ item.changeTime }}</view>
                    </view>

                    <view class="logs-content">
                        <view class="logs-content-left">
                            <view>
                                <text class="logs-content-title">变更信息：</text>
                                <text class="logs-content-txt">{{ item.fieldName }}</text>
                            </view>
                            <view>
                                <text class="logs-content-title">变更后：</text>
                                <text class="logs-content-txt">{{ item.beforeChangeName }}</text>
                            </view>
                            <view>
                                <text class="logs-content-title">备注：</text>
                                <text class="logs-content-txt">{{ item.remark || '--' }}</text>
                            </view>
                        </view>
                        <view class="logs-content-right">
                            <view>
                                <text class="logs-content-title">变更前：</text>
                                <text class="logs-content-txt">{{ item.afterChangeName }}</text>
                            </view>
                            <view>
                                <text class="logs-content-title">操作人：</text>
                                <text class="logs-content-txt">{{ item.operatorName }}</text>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
            <!-- <no-data :isShow="logs.length === 0" v-if="logs.length === 0"></no-data> -->
        </view>
        <!-- 走访打卡 -->
        <!-- <view class="card ">
    <view class="flex-sb">
        <view class="title">走访打卡</view>
        <view class="view" bind:tap="gotopage" data-url="/subpages/searchResult/pages/checkLog/checkLog?resiId={{resiId}}">打卡记录</view>
    </view>
    <view class="punch {{animationClass}}" bind:tap="handlePunch">
        <view class="{{animationClass}}" style="font-size: 36rpx;">打卡</view>
        <view class="{{animationClass}}" style="font-family:PingFang-SC-Regular;font-size: 28rpx;opacity: 0.72;">{{currentTime}}</view>
    </view>
    <view class="address">当前位置：{{addressContent}}</view>
    <view class="address" style="margin-top: 0;" wx:if="{{lastLog.clockInTime}}">最近打卡时间：{{lastLog.clockInTime}}</view>
</view> -->

        <view class="bto_btn">
            <view class="btn" @tap="toEvent">上报诉求</view>
            <view class="btn" @tap="toWebview" v-if="agencyLevel !== 'street'">满意度调查</view>
            <view class="btn blue" @tap="handelTopunchCard">走访打卡</view>
        </view>
        <van-dialog
            use-slot
            title="密码验证"
            :show="checkPassword"
            show-cancel-button
            @close="onClosePassword"
            @confirm="onConfirmassword"
            custom-class="dialog"
            confirm-button-color="#3974f6"
        >
            <view>
                <input type="text" @input="bindPassword" @blur="bindPassword" :value="password" placeholder="请输入密码" password />
            </view>
        </van-dialog>
    </view>
</template>

<script>
import resiGraph from './component/graph/graph';
import BusinessRecord from '../../../businessRecord/businessRecord';
// subpages/searchResult/pages/resiInfo/resiInfo.js

import api from '../../../../utils/api';
import { getComplainList, getShengList, getShequList, getshijianList, getxuqiuList, getfuwuList, getMultiLogList } from '../../../../utils/businessRecords.js';
var http = require('../../../../utils/request.js');
const QQMapWX = require('../../../../utils/qqmap-wx-jssdk');
const app = getApp();
var timerId = null;
export default {
    components: {
        resiGraph,
        BusinessRecord
    },
    data() {
        return {
            checkPassword: false,

            form: {
                baseInfoDto: {
                    name: '',
                    idNum: '',
                    mobile: ''
                }
            },

            resiId: '',
            punchFlag: null,
            currentTime: '',
            address: '',
            longitude: '',
            latitude: '',
            agencyLevel: '',
            recentTime: '',
            lastLog: {},
            tabList: [],

            originalExpandList: [
                {
                    id: 'healthDto',
                    title: '残疾信息',
                    scrollId: 'disability',
                    children: [
                        {
                            label: '残疾类别',
                            itemType: 'select1',
                            formName: 'disabilityCategoryCode',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'disability_category_code'
                            },
                            opction: []
                        },
                        {
                            label: '残疾等级',
                            itemType: 'select1',
                            formName: 'disabilityLevel',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'disability_level'
                            },
                            opction: []
                        },
                        {
                            label: '残疾证号',
                            itemType: 'input1',
                            formName: 'disabilityNum'
                        },
                        {
                            label: '残疾说明',
                            itemType: 'input1',
                            formName: 'disabilityDesc'
                        },
                        {
                            label: '监护人',
                            itemType: 'radio1',
                            formName: 'guardianFlag',
                            opction: [
                                {
                                    label: '有',
                                    formName: '',
                                    value: 1
                                },
                                {
                                    label: '无',
                                    formName: '',
                                    value: 0
                                }
                            ]
                        },
                        {
                            label: '监护人姓名',
                            itemType: 'input1',
                            formName: 'guardianName'
                        },
                        {
                            label: '监护人联系电话',
                            itemType: 'input1',
                            formName: 'guardianMobile'
                        },
                        {
                            label: '技能特长',
                            itemType: 'radio1',
                            formName: 'specialSkillFlag',
                            opction: [
                                {
                                    label: '有',
                                    formName: '',
                                    value: 1
                                },
                                {
                                    label: '无',
                                    formName: '',
                                    value: 0
                                }
                            ]
                        },
                        {
                            label: '劳动能力',
                            itemType: 'radio1',
                            formName: 'workCapacityFlag',
                            opction: [
                                {
                                    label: '有',
                                    formName: '',
                                    value: 1
                                },
                                {
                                    label: '无',
                                    formName: '',
                                    value: 0
                                }
                            ]
                        }
                    ]
                },
                {
                    id: 'seriousIllnessDto',
                    title: '大病信息',
                    scrollId: 'serious_illness',
                    children: [
                        {
                            label: '所患大病',
                            itemType: 'checkbox',
                            formName: 'illnessCodes',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'illness_code'
                            },
                            opction: []
                        }
                    ]
                },
                {
                    id: 'chronicDiseaseDto',
                    title: '慢病信息',
                    scrollId: 'chronic_disease',
                    children: [
                        {
                            label: '所患慢病',
                            itemType: 'checkbox',
                            formName: 'chronicDiseaseCodes',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'chronic_disease_code'
                            },
                            opction: []
                        }
                    ]
                },
                {
                    id: 'deathDto',
                    title: '死亡信息',
                    scrollId: 'death',
                    children: [
                        {
                            label: '死亡时间',
                            itemType: 'datepicker1',
                            formName: 'deathTime'
                        }
                    ]
                },
                {
                    id: 'oldPeopleDto',
                    title: '老年人信息',
                    scrollId: 'old_people',
                    children: [
                        {
                            label: '老年人分类',
                            itemType: 'checkbox',
                            multiple: true,
                            formName: 'oldPeopleCategories',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'oldPeople_categories'
                            }
                        },
                        {
                            label: '居住情况',
                            itemType: 'select1',
                            formName: 'resideSituation',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'reside_situation'
                            }
                        },
                        {
                            label: '高龄补助',
                            itemType: 'inputNum',
                            formName: 'oldSubsidy'
                        }
                    ]
                },
                {
                    id: 'subsistenceAllowanceDto',
                    title: '低保信息',
                    scrollId: 'subsistence_allowance',
                    children: [
                        {
                            label: '低保类别',
                            itemType: 'select1',
                            formName: 'category',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'subsistence_allowance_category'
                            }
                        },
                        {
                            label: '低保享受原因',
                            itemType: 'checkbox',
                            formName: 'reasons',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'subsistence_allowance_reasons'
                            },
                            opction: []
                        }
                    ]
                },
                {
                    id: 'parymemberInfoDto',
                    title: '党员信息',
                    scrollId: 'party_member',
                    children: [
                        {
                            label: '入党时间',
                            itemType: 'datepicker1',
                            formName: 'joinTime',
                            opction: []
                        },
                        {
                            label: '转正时间',
                            itemType: 'datepicker1',
                            formName: 'positiveTime',
                            opction: []
                        },
                        {
                            label: '所属党组织',
                            itemType: 'cascader1',
                            formName: 'partyOrgId',
                            opction: []
                        },
                        {
                            label: '流动党员',
                            itemType: 'radio1',
                            formName: 'flowFlag',
                            opction: [
                                {
                                    label: '是',
                                    value: 1
                                },
                                {
                                    label: '否',
                                    value: 0
                                }
                            ]
                        },
                        {
                            label: '流动党员活动证号',
                            itemType: 'input1',
                            formName: 'flowActNum'
                        },
                        {
                            label: '职务',
                            itemType: 'select1',
                            formName: 'partyJob',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'party_job'
                            },
                            opction: []
                        },
                        {
                            label: '工作职责',
                            itemType: 'input1',
                            formName: 'duty'
                        },
                        {
                            label: '是否退休',
                            itemType: 'radio1',
                            formName: 'retiredFlag',
                            opction: [
                                {
                                    label: '是',
                                    value: 1
                                },
                                {
                                    label: '否',
                                    value: 0
                                }
                            ]
                        },
                        {
                            label: '党员中心户',
                            itemType: 'radio1',
                            formName: 'centerFlag',
                            opction: [
                                {
                                    label: '是',
                                    value: 1
                                },
                                {
                                    label: '否',
                                    value: 0
                                }
                            ]
                        },
                        {
                            label: '免学习',
                            itemType: 'radio1',
                            formName: 'studyNotNeed',
                            opction: [
                                {
                                    label: '是',
                                    value: 1
                                },
                                {
                                    label: '否',
                                    value: 0
                                }
                            ]
                        },
                        {
                            label: '入党时所在党支部',
                            itemType: 'input1',
                            formName: 'joinBranchName'
                        },
                        {
                            label: '组织关系转入社区时间',
                            itemType: 'datepicker1',
                            formName: 'joinCommunityTime',
                            opction: []
                        }
                    ]
                },
                {
                    id: 'ensureHouseDto',
                    title: '保障房信息',
                    scrollId: 'ensure_house',
                    children: [
                        {
                            label: '所在社区',
                            itemType: 'input1',
                            formName: 'liveCommunity'
                        },
                        {
                            label: '住房性质',
                            itemType: 'select1',
                            formName: 'housingNature',
                            opctionUrl: 'sys/dict/data/house',
                            opctionParams: {
                                formCode: 'resi_base_info'
                            },
                            opction: []
                        }
                    ]
                },
                {
                    id: 'veteranDto',
                    title: '退役军人信息',
                    scrollId: 'veteran',
                    children: [
                        {
                            label: '入伍时间',
                            itemType: 'datepicker1',
                            formName: 'joinArmyTime',
                            opction: []
                        },
                        {
                            label: '退伍时间',
                            itemType: 'datepicker1',
                            formName: 'leaveArmyTime',
                            opction: []
                        },
                        {
                            label: '服役单位',
                            itemType: 'input1',
                            formName: 'serviceUnit'
                        },
                        {
                            label: '接收单位',
                            itemType: 'input1',
                            formName: 'receiveUnit'
                        },
                        {
                            label: '待安置补助金',
                            itemType: 'inputNum',
                            formName: 'settlementAmount',
                            opction: []
                        },
                        {
                            label: '培训状况',
                            itemType: 'input1',
                            formName: 'trainDesc'
                        },
                        {
                            label: '现就业情况',
                            itemType: 'input1',
                            formName: 'employmentSituation'
                        },
                        {
                            label: '是否办理公益性岗位',
                            itemType: 'radio1',
                            formName: 'pubWelfareJobFlag',
                            opction: [
                                {
                                    label: '是',
                                    value: 1
                                },
                                {
                                    label: '否',
                                    value: 0
                                }
                            ]
                        }
                    ]
                },
                {
                    id: 'unitedFrontDto',
                    title: '统战人员信息',
                    scrollId: 'united_front',
                    children: [
                        {
                            label: '统战类型',
                            itemType: 'input1',
                            formName: 'unitedFrontType'
                        }
                    ]
                },
                {
                    id: 'volunteerDto',
                    title: '志愿者信息',
                    children: [
                        {
                            label: '志愿者类别',
                            itemType: 'checkbox',
                            formName: 'volunteerCategory',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'VOLUNTEER_CATEGORY'
                            },
                            opction: []
                        }
                    ]
                },
                {
                    id: 'specialSupportDto',
                    title: '特扶人员信息',
                    scrollId: 'special_support',
                    children: [
                        {
                            //0
                            label: '特扶类别',
                            itemType: 'select1',
                            formName: 'specialSupportType',
                            opction: [
                                {
                                    value: '1',
                                    label: '失独'
                                },
                                {
                                    value: '2',
                                    label: '伤残'
                                }
                            ]
                        },
                        {
                            //1
                            label: '子女姓名',
                            itemType: 'input1',
                            formName: 'childName',
                            opction: []
                        },
                        {
                            //2
                            label: '子女性别',
                            itemType: 'select1',
                            formName: 'childGender',
                            opction: [
                                {
                                    value: '1',
                                    label: '男'
                                },
                                {
                                    value: '2',
                                    label: '女'
                                }
                            ]
                        },
                        {
                            label: '子女死亡日期',
                            itemType: 'datepicker1',
                            formName: 'childDeathDate',
                            opction: []
                        },
                        {
                            label: '子女伤残类别',
                            itemType: 'select1',
                            formName: 'childDisabilityCategoryCode',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'disability_category_code'
                            },
                            opction: []
                        },
                        {
                            label: '子女伤残等级',
                            itemType: 'select1',
                            formName: 'childDisabilityLevel',
                            opctionUrl: 'sys/dict/data/dictlist',
                            opctionParams: {
                                dictType: 'disability_level'
                            },
                            opction: []
                        }
                    ]
                }
            ],

            expandList: [],
            activeType: 0,
            tagList: [],

            idTypeList: [
                {
                    label: '其他',
                    value: 0
                },
                {
                    label: '身份证',
                    value: 1
                },
                {
                    label: '护照',
                    value: 2
                },
                {
                    label: '港澳通行证',
                    value: 3
                },
                {
                    label: '军人证',
                    value: 4
                },
                {
                    label: '台胞证',
                    value: 5
                }
            ],

            dicts: {
                careerStatusArr: [],
                marriageArr: [],
                householdSituationArr: [],
                houseHolderRelArr: []
            },

            password: '',

            ywData: {
                12345: [],
                provinceSurvey: [],
                selfSurvey: [],
                event: [],
                need: [],
                serve: [],
                punchRecord: []
            },

            marriageName: '',
            animationClass: '',
            data: '',
            ywVisible: false,
            logs: '',
            addressContent: ''
        };
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: async function (options) {
        await this.getDicts();
        if (options.resiId) {
            this.setData({
                resiId: options.resiId,
                'form.baseInfoDto.name': options.name,
                'form.baseInfoDto.idNum': options.idNum,
                'form.baseInfoDto.mobile': options.mobile
            });
            await this.getResiInfo();
            this.getChangeRecordsById();
            this.getTabData();
        }
        this.setData({
            agencyLevel: app.globalData.user.level
        });
        // this.getLastLogs()
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {
        if (timerId) {
            clearInterval(timerId);
            timerId = null;
        }
    },
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {},
	computed:{
		 filterLabel() {
		     return function(arr,key){
             console.log(arr,key,'seeee');
             let str = ''
                if(key){
                   str =  arr[key].label
                }else{
                    str = '--'
                }
		      	return str
		      }
		    }
	},
    methods: {
        getDicts: async function () {
            try {
                const requests = [
                    http.post('sys/dict/data/dictlist', {
                        dictType: 'career_status'
                    }),
                    http.post('sys/dict/data/dictlist', {
                        dictType: 'marriage'
                    }),
                    http.post('sys/dict/data/dictlist', {
                        dictType: 'household_situation'
                    }),
                    http.post('sys/dict/data/relationship', {
                        formCode: 'resi_base_info'
                    })
                ];
                const dictKeys = ['careerStatusArr', 'marriageArr', 'householdSituationArr', 'houseHolderRelArr']; // 对应的键名

                const results = await Promise.all(requests);
                results.forEach((result, index) => {
                    if (result.code === 0) {
                        this.setData({
                            [`dicts.${dictKeys[index]}`]: [...result.data]
                        });
                    } else {
                        console.log(`获取${dictKeys[index]}失败: ${result.data.msg}`);
                    }
                });
            } catch (error) {
                console.log('CatchClause', error);
                console.log('CatchClause', error);
                console.log('获取字典失败: ', error);
            }
        },

        getResiInfo: async function () {
            try {
                let res = await api.getResiInfo(this.resiId);
                console.log(res);
                let marriageName = '--';
                if (res.data.residentCategoryStr) {
                    res.data.baseInfoDto.categoryInfo.categoryNames = res.data.residentCategoryStr.split(',');
                }
                // if (res.data.familyInfoDto && res.data.familyInfoDto.marriage) {
                //     marriageName = this.dicts.marriageArr.filter((item) => item.value == res.data.familyInfoDto.marriage)[0].label;
                // }
                // 处理tab
                this.setData({
                    form: res.data,
                    marriageName: marriageName
                });
				
                await this.updateTabList(res.data.integrityData.integrityQtyMap);
            } catch (err) {
                console.log('CatchClause', err);
                console.log('CatchClause', err);
                console.log(err);
            }
        },

        updateTabList: async function (value) {
            const nameMap = {
                reside: '居住信息',
                ext: '拓展信息',
                united_front: '统战人员信息',
                party_member: '党员信息',
                death: '死亡信息',
                disability: '残疾信息',
                subsistence_allowance: '低保信息',
                serious_illness: '大病信息',
                veteran: '退役军人信息',
                special_support: '特扶人员信息',
                old_people: '老年人信息',
                ensure_house: '保障房信息',
                chronic_disease: '慢病信息',
                base: '基本信息',
                graph1: '关系图谱',
                update: '更新记录',
                business: '业务记录'
            };
            let list = Object.entries(value)
                .map(([key, value]) => ({
                    name: nameMap[key],
                    id: key,
                    filledQty: value.filledQty,
                    totalQty: value.totalQty
                }))
                .reverse();
            list.push(
                {
                    name: '关系图谱',
                    id: 'graph1'
                },
                {
                    name: '业务记录',
                    id: 'business'
                },
                {
                    name: '更新记录',
                    id: 'update'
                }
            );
            this.setData({
                tabList: list
            });
            let arr = this.tabList.filter((item) => item.filledQty > 0 || item.name == '拓展信息' || item.name == '居住信息' || item.name == '基本信息');
            let arrs = [];
            arrs = this.originalExpandList.filter((itemA) => {
                return arr.some((itemB) => itemB.name === itemA.title);
            });
            await Promise.all(
                arrs.map(async (item) => {
                    await Promise.all(
                        item.children.map(async (child) => {
                            const key = child.formName;
                            if (this.form[item.id].hasOwnProperty(key)) {
                                child.value = await this.getDictName(
                                    child.opctionUrl,
                                    child.opctionParams,
                                    this.form[item.id][key == 'partyOrgId' ? 'branchId' : key],
                                    child.itemType,
                                    child.opction
                                );
                            }
                        })
                    );
                })
            );
            this.setData({
                expandList: arrs
            });
        },

        clickGraphNode(parm) {
            if (parm.detail.data.type === 0) {
                this.setData({
                    resiId: parm.detail.data.id
                });
                this.getResiInfo();
            } else {
                uni.navigateTo({
                    url: `/subpages/house/pages/housePortrait/housePortrait?resiId=${parm.detail.data.id}`
                });
            }
        },

        getDictName: async function (url, params, value, itemType, opction) {
            try {
                if (url) {
                    const { data } = await http.post(url, params);
                    if (itemType == 'checkbox') {
                        const matchedLabels = value
                            .map((item) => {
                                const matchedItems = data.filter((obj) => obj.value === item);
                                if (matchedItems.length > 0) {
                                    return matchedItems.map((matchedItem) => matchedItem.label).join(',');
                                } else {
                                    return '';
                                }
                            })
                            .join('，');
                        return matchedLabels ? matchedLabels : '--';
                    } else if (itemType == 'select1') {
                        const matchedItem = data.find((item) => item.value === value);
                        return matchedItem ? matchedItem.label : '--';
                    }
                } else {
                    if (itemType == 'radio1') {
                        const matchedItem = opction.find((item) => item.value === value);
                        return matchedItem ? matchedItem.label : '--';
                    } else if (itemType == 'input1' || itemType == 'datepicker1' || itemType == 'cascader1') {
                        return value ? value : '--';
                    }
                }
            } catch (error) {
                console.log('CatchClause', error);
                console.log('CatchClause', error);
                console.log(error);
            }
        },

        handlePunch() {
            this.setData({
                // punchFlag:!this.data.punchFlag,
                animationClass: 'animate'
            });
            setTimeout(() => {
                this.setData({
                    animationClass: ''
                });
                this.clockRecords();
            }, 1500);
        },

        clockRecords() {
            let currentDate = new Date().toISOString().split('T')[0]; // 会得到形如 "2023-09-27" 的日期
            let obj = {
                resiId: this.resiId,
                clockTime: currentDate + ' ' + this.currentTime,
                clockAddress: this.address,
                longitude: this.longitude,
                latitude: this.latitude
            };
            api.clockRecords(obj)
                .then((res) => {
                    uni.showToast({
                        // title: this.data.punchFlag?'打卡成功':'更新成功',
                        title: '打卡成功',
                        icon: 'none'
                    });
                })
                .catch((err) => {
                    console.log(err);
                });
        },

        // 获取业务记录
        async getTabData() {
            let params1 = {
                residList: [this.resiId],
                eventType: '3'
            };
            await getComplainList(params1).then((res) => {
                this.ywData['12345'] = res.data.list.map((item) => {
                    return {
                        ...item,
                        categorycode: item.categorycode || '--',
                        eventcontent: item.eventcontent || '--'
                    };
                });
                this.setData({
                    data: this.ywData
                });
            });
            let params = {
                residList: [this.resiId]
            };
            await getShengList(params).then((res) => {
                if (res.data && res.data.length > 0) {
                    let renamedArray = [];
                    res.data.forEach((item) => {
                        let renamedItem = {
                            categorycode: item.scope || '--',
                            eventcontent: item.problemDesc || '--'
                        };
                        renamedArray.push(renamedItem);
                    });
                    this.ywData['provinceSurvey'] = renamedArray;
                    this.setData({
                        ywData: this.ywData
                    });
                } else {
                    this.ywData['provinceSurvey'] = [];
                    this.setData({
                        ywData: this.ywData
                    });
                }
            });
            await getShequList(params).then((res) => {
                if (res.data && res.data.length > 0) {
                    let renamedArray = [];
                    res.data.forEach((item) => {
                        let renamedItem = {
                            categorycode: item.scope || '--',
                            eventcontent: item.problemDesc || '--'
                        };
                        renamedArray.push(renamedItem);
                    });
                    this.ywData['selfSurvey'] = renamedArray;
                    this.setData({
                        ywData: this.ywData
                    });
                } else {
                    this.ywData['selfSurvey'] = [];
                    this.setData({
                        ywData: this.ywData
                    });
                }
            });
            await getshijianList(params).then((res) => {
                if (res.data && res.data.length > 0) {
                    let renamedArray = [];
                    res.data.forEach((item) => {
                        let renamedItem = {
                            categorycode: item.categorycode || '--',
                            eventcontent: item.eventcontent || '--'
                        };
                        renamedArray.push(renamedItem);
                    });
                    this.ywData['event'] = renamedArray;
                    this.setData({
                        ywData: this.ywData
                    });
                } else {
                    this.ywData['event'] = [];
                    this.setData({
                        ywData: this.ywData
                    });
                }
            });
            await getxuqiuList(params).then((res) => {
                if (res.data && res.data.length > 0) {
                    let renamedArray = [];
                    res.data.forEach((item) => {
                        let renamedItem = {
                            categorycode: item.parentName || '--',
                            eventcontent: item.content || '--'
                        };
                        renamedArray.push(renamedItem);
                    });
                    this.ywData['need'] = renamedArray;
                    this.setData({
                        ywData: this.ywData
                    });
                } else {
                    this.ywData['need'] = [];
                    this.setData({
                        ywData: this.ywData
                    });
                }
            });
            await getfuwuList(params).then((res) => {
                if (res.data && res.data.length > 0) {
                    let renamedArray = [];
                    res.data.forEach((item) => {
                        let renamedItem = {
                            categorycode: item.serviceCategoryKey || '--',
                            eventcontent: item.serviceName || '--'
                        };
                        renamedArray.push(renamedItem);
                    });
                    this.ywData['serve'] = renamedArray;
                    this.setData({
                        ywData: this.ywData
                    });
                } else {
                    this.ywData['serve'] = [];
                    this.setData({
                        ywData: this.ywData
                    });
                }
            });
            const params2 = {
                resiIdList: [this.resiId],
                pageNo: 1,
                pageSize: 1000
            };
            await getMultiLogList(params2).then((res) => {
                if (res.data && res.data.length > 0) {
                    let arr = [];
                    res.data.forEach((item) => {
                        item.list.forEach((item1) => {
                            arr.push(item1);
                        });
                    });
                    this.ywData['punchRecord'] = arr;
                    this.setData({
                        ywData: this.ywData
                    });
                } else {
                    this.ywData['punchRecord'] = [];
                    this.setData({
                        ywData: this.ywData
                    });
                }
            });
            this.setData({
                ywVisible: true
            });
        },

        // 获取更新记录
        getChangeRecordsById() {
            api.getChangeRecordsById(this.resiId)
                .then((res) => {
                    console.log(res);
                    this.setData({
                        logs: res.data
                    });
                })
                .catch((err) => {
                    console.log(err);
                });
        },

        toAddResi() {
            api.isUpdater(this.resiId).then((res) => {
                if (res.data) {
                    this.onConfirmassword();
                } else {
                    this.setData({
                        checkPassword: true
                    });
                }
            });
        },

        bindPassword(e) {
            this.setData({
                password: e.detail.value
            });
        },

        onClosePassword() {
            this.setData({
                checkPassword: false
            });
        },

        onConfirmassword() {
            let parm = {
                password: this.password
            };
            api.getResiUserInfo(this.resiId, parm)
                .then((res) => {
                    if (res.code === 0) {
                        uni.navigateTo({
                            url: `/subpages/addResi/pages/addResi/addResi?type=edit&resiId=${this.resiId}&name=${res.data.name}&mobile=${res.data.mobile}&idNum=${res.data.idNum}`
                        });
                        this.setData({
                            password: null
                        });
                    } else {
                        this.setData({
                            password: null
                        });
                        this.showToast(res.msg);
                    }
                })
                .catch((err) => {
                    console.log(err);
                });
        },

        toWebview() {
            if (app.globalData.questionnaireUrl) {
                uni.navigateTo({
                    url: '/pages/webview/webview?url=' + app.globalData.questionnaireUrl
                });
            } else {
                uni.showToast({
                    icon: 'none',
                    title: '未创建满意度调查问卷'
                });
            }
        },

        toEvent() {
            let obj = {
                resiId: this.resiId,
                resiMobile: this.form.baseInfoDto.mobile,
                resiName: this.form.baseInfoDto.name
            };
            uni.setStorageSync('resiDetail', obj);
            uni.navigateTo({
                url: '/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck'
            });
        },

        reverseLocation() {
            const _this = this;
            this.qqMapWX.reverseGeocoder({
                success(res) {
                    _this.setData({
                        addressContent: res.result.address,
                        address: res.result.address,
                        longitude: res.result.location.lng,
                        latitude: res.result.location.lat
                    });
                },
                fail(err) {
                    console.debug(err);
                }
            });
        },

        gotopage(e) {
            uni.navigateTo({
                url: e.currentTarget.dataset.url
            });
        },

        // getLastLogs() {
        //     api.getLastLog({
        //         resiId: this.data.resiId
        //     }).then(res => {
        //         this.setData({
        //             lastLog: res.data
        //         })
        //     })
        // },
        goResidentPortrait2() {
            uni.navigateTo({
                url: '/subpages/statistics/pages/residentPortrait2/residentPortrait?id=' + this.resiId
            });
        },

        handelTopunchCard() {
            uni.navigateTo({
                url: '/subpages/searchResult/pages/punchCard/punchCard?resiId=' + this.resiId
            });
        },

        handelClickTab(e) {
            uni.pageScrollTo({
                selector: `#${e.currentTarget.dataset.item.id}`,
                duration: 300
            });
            this.setData({
                activeType: e.currentTarget.dataset.index
            });
        }
    }
};
</script>
<style scoped>
/* subpages/searchResult/pages/resiInfo/resiInfo.wxss */
/**index.wxss**/
page {
    background-color: #f7f7f7;
    height: auto;
    overflow-y: scroll;
    padding: 0 20rpx 160rpx;
    box-sizing: border-box;
}

.form {
    display: flex;
    margin-top: 20rpx;
}

.form .form_label {
    font-size: 30rpx;
    color: #999999;
}

.form .form_value {
    color: #333333;
    text-align: left;
    font-weight: 500;
    flex: 1;
}

.card {
    background-color: #fff;
    border-radius: 20rpx;
    display: flex;
    flex-direction: column;
    margin-top: 20rpx;
    padding: 30rpx 30rpx 40rpx;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.card .title {
    position: relative;
    font-size: 34rpx;
    font-weight: 600;
}

.card .title::after {
    position: absolute;
    left: -30rpx;
    top: 8rpx;
    content: ' ';
    width: 10rpx;
    height: 28rpx;
    background-color: #3a80e7;
}

.info {
    margin-top: 6rpx;
}

.info .item {
    display: flex;
    margin-top: 28rpx;
    position: relative;
}

.info .item .label {
    width: fit-content;
    color: #999999;
}

.info .item .value {
    flex: 1;
    overflow-x: hidden;
}
.must {
    font-size: 32rpx;
    font-weight: 500;
    color: #ff2a00;
    position: absolute;
    left: -18rpx;
    top: 49rpx;
    transform: translateY(-50rpx);
}
.punch {
    width: 260rpx;
    height: 260rpx;
    background: linear-gradient(180deg, #5e9fff, #3a80e7);
    box-shadow: 0rpx 4rpx 35rpx 0rpx rgba(61, 139, 248, 0.48);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin: 50rpx auto 0;
}

.address {
    color: #666666;
    font-size: 28rpx;
    margin: 0 auto;
    margin: 40rpx auto 30rpx;
}

@keyframes rotateAnimation {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(180deg);
    }
}

.animate {
    animation: rotateAnimation 2s forwards;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
    height: 76rpx;
    border-radius: 39rpx;
    margin: 30rpx 0;
    border-radius: 76rpx;
    border: 1rpx solid #999999;
    width: 226rpx;
    text-align: center;
}

.blue {
    background-color: #3974f6;
    color: #fff;
    border-color: #3974f6;
}

.flex-sb {
    display: flex;
    justify-content: space-between;
}

.view {
    color: #999;
    font-size: 24rpx;
}

.jm-btn {
    position: absolute;
    top: 30rpx;
    right: 20rpx;
    width: fit-content;
    height: 56rpx;
    padding: 0 20rpx;
    box-sizing: border-box;
    line-height: 56rpx;
    background: #3974f6;
    border-radius: 28rpx;
    color: #fff;
    text-align: center;
    font-size: 28rpx;
}

.tabs {
    display: flex;
    justify-content: start;
    flex-wrap: wrap;
    border-top: 1px solid #eaeaea;
    margin-top: 30rpx;
}

.tabs .tab_item {
    display: flex;
    margin-right: 20rpx;
    padding-bottom: 10rpx;
    width: auto;
    margin-top: 20rpx;
    justify-content: center;
}

.tabs .tab_item .num {
    font-weight: 400;
    font-size: 36rpx;
}

.tabs .tab_item .name {
    font-size: 26rpx;
    padding-bottom: 6rpx;
    box-sizing: border-box;
    color: #666666;
}

.top {
    display: flex;
    align-items: center;
}

.top .left {
    flex: 1;
}

.top .right {
    width: 130rpx;
}

.top .left .name {
    display: flex;
}

.top .left .tags {
    display: flex;
    flex-grow: 0;
    justify-content: start;
    max-width: 645rpx;
    overflow-x: scroll;
    margin-top: 20rpx;
    box-sizing: border-box;
}
.top .left .tags::-webkit-scrollbar {
    display: none;
}
.top .left .tags .tag {
    border-radius: 4rpx;
    margin-right: 6rpx;
    white-space: nowrap;
    padding: 7rpx 8rpx;
    width: auto;
    box-sizing: border-box;
    font-weight: 500;
    font-size: 24rpx;
}
.hong {
    color: #ff3c3c;
    background-color: #ffe3e3;
}
.lan {
    color: #4f94ff;
    background-color: #e6f0ff;
}
.ju {
    color: #fe840d;
    background-color: #ffeedd;
}
.qing {
    color: #04b8ad;
    background-color: #dcf5f3;
}
.zi {
    color: #b462e8;
    background-color: #f4e9fc;
}
.hui {
    color: #959495;
    background-color: #f1f1f1;
}
.lv {
    color: #52ba74;
    background-color: #e7f5ec;
}
.fen {
    color: #ff688f;
    background-color: #ffeaef;
}
.huang {
    color: #fcac00;
    background-color: #fff3db;
}
.border_bto {
    color: #3974f6 !important;
    border-bottom: solid 6rpx #3974f6;
}

.bto_btn {
    position: fixed;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    left: 0;
    right: 0;
    padding: 0 20rpx;
    box-sizing: border-box;
    background: #fff;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
}
.dialog {
    padding: 0 20rpx;
    box-sizing: border-box;
}
.logsBox {
    border-left: 3rpx solid #dadee5;
    margin-left: -18rpx;
    padding-left: 12rpx;
}

.logs-top {
    display: flex;
    justify-content: space-between;
    position: relative;
    top: -32rpx;
    padding-left: 12rpx;
}

.logs-top-title {
    height: 31rpx;
    font-weight: 300;
    font-size: 32rpx;
    color: #333333;
    line-height: 41rpx;
}

.logs-top-time {
    height: 20rpx;
    font-weight: 300;
    font-size: 26rpx;
    color: #bdbdbd;
    line-height: 40rpx;
}

.logs-content {
    position: relative;
    top: -24rpx;
    padding-top: 12rpx;
    padding-bottom: 24rpx;
    display: flex;
    justify-content: space-between;
    font-family: PingFang SC;
    font-weight: 500;
    font-size: 30rpx;
    color: #999999;
    line-height: 52rpx;
}

.logs-content-left {
    width: 48%;
}

.logs-content-right {
    width: 48%;
}

.logs-content-txt {
    color: #333333;
    font-weight: 300;
    font-size: 28rpx;
}

.item-dian {
    position: relative;
    left: -28rpx;
    width: 32rpx;
    height: 32rpx;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 50%;
    border: 1px solid #3a80e7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.neidian {
    width: 18rpx;
    height: 18rpx;
    background: #3a80e7;
    border-radius: 50%;
}
</style>
