<template>
  <!-- 交易账号通用详情-->
  <Des :list="desList"></Des>
</template>

<script lang="ts">
import { defineComponent, PropType, watchEffect } from 'vue';
import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
import { Des, handleDesList } from '@/common/components/commonDes';

export default defineComponent({
    name: 'business-comom-detail',
    components: {
        Des,
    },
    props: {
        selectedData: {
            type: Object as PropType<ErmcpLoginUser>,
            default: {},
        },
    },
    setup(props) {
        const { desList, getDesList } = handleDesList();
        watchEffect(() => {
            if (props.selectedData) {
                const data = props.selectedData;
                getDesList([
                    { label: '账户权限', value: data.rolename },
                    { label: '账户名称', value: data.loginname },
                    { label: '登录账号', value: data.logincode },
                    { label: '手机号码', value: data.mobile },
                ]);
            }
        });
        return {
            desList,
        };
    },
});
</script>

<style lang="less">
</style>;
