<template>
    <div class="basic-info-detail">
        <div class="basic-info-title">
            <img src="@/assets/enterpriseLibrary/basic-info.png" alt="基本信息">
            <span>基本信息</span>
        </div>

        <div class="detail-content">
            <!-- 营业执照 -->
            <div class="detail-item">
                <div class="item-label">营业执照</div>
                <div class="item-value">
                    <el-image :src="url" :preview-src-list="srcList" class="license-image">
                    </el-image>
                </div>
            </div>

            <!-- 企业名称 -->
            <div class="detail-item">
                <div class="item-label">企业名称</div>
                <div class="item-value">{{ enterpriseName || '中讯科技股份有限公司' }}</div>
            </div>

            <!-- 统一社会信用代码 -->
            <div class="detail-item">
                <div class="item-label">统一社会信用代码</div>
                <div class="item-value">{{ enterpriseCode || '12345678901313132390' }}</div>
            </div>

            <!-- 注册资本 -->
            <div class="detail-item">
                <div class="item-label">注册资本</div>
                <div class="item-value">{{ registeredCapital || '11000.00' }}</div>
            </div>

            <!-- 营业期限 -->
            <div class="detail-item">
                <div class="item-label">营业期限</div>
                <div class="item-value">{{ businessTerm || '2015/01/01-2035/01/01' }}</div>
            </div>

            <!-- 住所 -->
            <div class="detail-item">
                <div class="item-label">住所</div>
                <div class="item-value">{{ residence || '安徽省合肥市蜀山区望江西路100号' }}</div>
            </div>

            <!-- 经营范围 -->
            <div class="detail-item">
                <div class="item-label">经营范围</div>
                <div class="item-value">{{ businessScope || '软件开发、技术服务、电子商务' }}</div>
            </div>
        </div>
        <el-dialog title="营业执照" :visible.sync="showPhoto" width="60%" append-to-body>
            <view-photo :images="images" />
        </el-dialog>
    </div>
</template>

<script>
import basicInfo from '@/assets/enterpriseLibrary/basic-info.png'
export default {
    name: 'BasicInfoDetail',
    components: {
    },
    data() {
        return {
            name: '',
            url: basicInfo,
            srcList: [basicInfo],
            enterpriseName: '',
            enterpriseCode: '',
            registeredCapital: '',
            businessTerm: '',
            residence: '',
            businessScope: '',
            fileList: [],
            showPhoto: false
        }
    },
    methods: {
        openPhoto() {
            this.showPhoto = true
        }
    },
}
</script>

<style scoped lang="scss">
.basic-info-title {
    display: flex;
    align-items: center;
    margin: 10px 0;

    span {
        margin: 0 5px;
        font-size: 20px;
    }
}

.detail-content {
    .detail-item {
        margin-bottom: 16px;

        .item-label {
            color: #424242;
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 8px;
        }

        .item-value {
            color: #424242;
            font-size: 16px;
            line-height: 1.5;

            .license-image {
                max-width: 200px;
                max-height: 120px;
                border-radius: 6px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
                object-fit: cover;
                cursor: pointer;
            }
        }
    }
}
</style>