<!--包装组件-->
<template>
	<view class="device-detail">
		<view class="list-style">
			<view class="ljh_box nopad">
				<view class="tit_ljh uni-flex">
					<text class="mini-type-style" :class="statusStyle(itemdetail.status) ">
						{{ statusColor(itemdetail.status)}}
					</text>
					<text class="font_xl text_black text_bold">{{ itemdetail.code }}</text>
				</view>
				<view class="ljh_left">
					<view class="font_xs text_lightblue">{{itemdetail.name}}</view>
					<view class="font_xs text_lightblue">{{itemdetail.desc2}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getItemTypeStyle,
		getItemStatusDesc
	} from '@/common/basic.js';
	export default {
		name: "comItem",
		data() {
			return {

			};
		},
		// 此处定义传入的数据
		props: {
			itemdetail: {
				type: Object,
				value: null
			}
		},
		methods:{
			statusStyle: function(val) {
				return getItemTypeStyle(val);
			},
			statusColor: function(val) {
				return getItemStatusDesc(val);
			},
		}
	}
</script>

<style>
</style>
