<template>
    <view style="padding-top: 50rpx">
        <view class="mx3 my2 p3 bg-color-white" style="border-radius: 16rpx">
            <equipment-line title="使用区域" :content="infoData.useAreaName" />
            <equipment-line title="使用公司" :content="infoData.useCompanyName" />
            <equipment-line title="使用项目部" :content="infoData.useProjectName" />
            <equipment-line title="使用部门" :content="infoData.useDeptName" />
            <equipment-line title="使用班组" :content="infoData.useGroupName" />
            <equipment-line title="当前部门" :content="infoData.saveDeptName" />
            <equipment-line title="使用人" :content="infoData.saveUserName" />
            <equipment-line title="总行驶里程" :content="infoData.totalMiles + ''" />
            <equipment-line title="总行驶小时" :content="infoData.totalHours + ''" />
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            detailId: '',
            infoData: {}
        };
    },
    onLoad(options) {
        this.detailId = options.detailId;
        this.initData();
    },
    methods: {
        initData() {
            this.$Http
                .fetchSbInfo({
                    id: this.detailId
                })
                .then((res) => {
                    console.log(res);
                    this.infoData = res.data;
                });
            this.statusMap = this.$DictCache.getLabelByValueMapByType(
                this.$DictCache.TYPE.SB_INFO_STATUS
            );
        }
    }
};
</script>

<style lang="less">
page {
  background-color: #f4f4f4;
}
</style>
