bw/src/views/bim/bimHome/components/DeviceInfo.vue

73 lines
2.0 KiB
Vue

<template>
<div class="buildDiv">
<TopDiv title="资产信息"></TopDiv>
<dv-border-box-10 backgroundColor="#00174b" :color="['#3cbfdf', '#3cbfdf']">
<div>
<span class="name">资产名称</span>
<span class="text">{{ deviceInfo && deviceInfo.name }}</span>
</div>
<div>
<span class="name">资产类型</span>
<span class="text">{{ deviceInfo && deviceInfo.type }}</span>
</div>
<div>
<span class="name">资产状态</span>
<span class="text">{{ deviceInfo && deviceInfo.status }}</span>
</div>
<div>
<span class="name">资产位置</span>
<span class="text">{{ deviceInfo && deviceInfo.location }}</span>
</div>
<div>
<span class="name">所属厂区</span>
<span class="text">{{ deviceInfo && deviceInfo.belong }}</span>
</div>
<div>
<span class="name">过保截至日期</span>
<span class="text">{{ deviceInfo && deviceInfo.date }}</span>
</div>
</dv-border-box-10>
</div>
</template>
<script setup>
import TopDiv from "./TopDiv.vue";
import bimStore from '@/store/modules/bim';
const data = reactive({
deviceInfo: {}
});
const { deviceInfo } = toRefs(data);
watch(() => bimStore().activateDevice.info, value => deviceInfo.value = value);
</script>
<style lang='scss' scoped>
.buildDiv {
position: absolute;
top: 10px;
right: 10px;
width: 360px;
height: 340px;
display: flex;
flex-direction: column;
align-items: center;
color: #3cbfdf;
:deep(.border-box-content) {
padding: 10px;
>div {
line-height: 48px;
display: flex;
justify-content: space-between;
}
.name {
width: 40%;
}
.text {
width: 59%;
color: #fff;
}
}
}</style>