<template>
    <div class='low-voltage-cabinet-detail'>
        <!-- 顶部条 -->
        <van-nav-bar :title='drawernum' left-arrow @click-left='backPage'></van-nav-bar>
        <div class='info-container'>
            <div class='info'>
                <div class='label'>出线规格:</div>
                <div class='value'>{{outspec}}</div>
            </div>
            <div class='info'>
                <div class='label'>楼 层:</div>
                <div class='value'>{{floor}}</div>
            </div>
            <div class='info'>
                <div class='label'>电井编号:</div>
                <div class='value'>{{wellnum}}</div>
            </div>
            <div class='info'>
                <div class='label'>电箱编号:</div>
                <div class='value'>{{boxnum}}</div>
            </div>
            <div class='info'>
                <div class='label'>供电容量:</div>
                <div class='value'>{{capacitynum}} kw</div>
            </div>
            <div class='info'>
                <div class='label'>控制回路:</div>
                <div class='value'>{{control}}</div>
            </div>
        </div>
    </div>
</template>
<script>
/**
 * 配电室低压柜及出线明细
 */
import Vue from 'vue'
import { NavBar } from 'vant'
Vue.use(NavBar)

export default {
    name: 'LowVoltageCabinetDetail',
    props: {},
    components: {},
    data() {
        return {
            control: '',
            drawernum: '',
            floor: '',
            glsms_proimgupid: '',
            outspec: '',
        }
    },
    computed: {},
    created() {
        // control: "步行街分区2中庭用电"
        // drawernum: "1-5AA-2"
        // floor: "1F"
        // glsms_proimgupid: 37206
        // outspec: "4*150+1*70"
        let { control, drawernum, floor, glsms_proimgupid, outspec, wellnum, boxnum, capacitynum } = this.$route.params
        let arr = ['control', 'drawernum', 'floor', 'glsms_proimgupid', 'outspec', 'wellnum', 'boxnum', 'capacitynum']
        arr.map((item) => {
            console.log(item)
            this[item] = eval(item) || '-'
        })
        console.log(this.$route.params)
    },
    beforeMount() {},
    mounted() {},
    methods: {
        backPage() {
            this.$router.go(-1)
        },
    },
}
</script>
<style lang='less' scoped>
.low-voltage-cabinet-detail {
    width: 100%;
    height: 100%;
    background-color: #f5f6f7;
    // 返回箭头修改
    /deep/ .van-nav-bar .van-icon {
        color: #000;
    }
    .info-container {
        padding: 15px;
        .info {
            display: flex;
            height: 20px;
            font-size: 14px;
            font-weight: 400;
            line-height: 20px;
        }
        .label {
            color: #666;
            // width: 60px;
            // text-align: justify;
            // text-align-last: justify;
        }
        .value {
            color: #333;
            margin-left: 10px;
            flex: 1;
        }
    }
}
</style>