2023-09-06 10:56:10 +08:00
|
|
|
<template>
|
|
|
|
|
<uni-card
|
|
|
|
|
:title="device.equipmentName"
|
|
|
|
|
:sub-title="device.mac"
|
2023-11-02 13:40:48 +08:00
|
|
|
:extra="device.isPrimaryUser == 1 ? '主设备' : '分享设备'"
|
2023-09-06 10:56:10 +08:00
|
|
|
padding="0"
|
|
|
|
|
@click="jump(device)"
|
|
|
|
|
:thumbnail="deviceIcon(device.runStatus)"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:title>
|
|
|
|
|
<slot name="title"></slot>
|
|
|
|
|
</template>
|
|
|
|
|
<view class="device-body">
|
|
|
|
|
<view class="device-body-item">
|
|
|
|
|
<text>工程名称</text>
|
|
|
|
|
<text>{{ device.engineeringName }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="device-body-item mt6">
|
|
|
|
|
<text>项目名称</text>
|
|
|
|
|
<text>{{ device.projectName }}</text>
|
|
|
|
|
</view>
|
2023-09-18 15:55:34 +08:00
|
|
|
<view class="device-body-item mt6" v-if="device.process == 2 || device.process == 3">
|
2023-10-27 16:09:09 +08:00
|
|
|
<text>调试阶段</text>
|
2023-09-18 15:55:34 +08:00
|
|
|
<text>{{ device.process == 2 ? '功能调试' : '出厂调试' }}</text>
|
|
|
|
|
</view>
|
2023-09-06 10:56:10 +08:00
|
|
|
</view>
|
|
|
|
|
</uni-card>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {}
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
device: {
|
|
|
|
|
type: Object,
|
2023-09-18 15:55:34 +08:00
|
|
|
default: () => {},
|
|
|
|
|
},
|
2023-09-06 10:56:10 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
deviceIcon(e) {
|
|
|
|
|
let str = ''
|
|
|
|
|
switch (e) {
|
|
|
|
|
case 1:
|
|
|
|
|
str = '/static/device_bad.png'
|
|
|
|
|
break
|
|
|
|
|
case 2:
|
2023-11-03 16:33:16 +08:00
|
|
|
str = '/static/device_success.png'
|
2023-09-06 10:56:10 +08:00
|
|
|
break
|
|
|
|
|
default:
|
2023-11-03 16:33:16 +08:00
|
|
|
str = '/static/device_success.png'
|
2023-09-06 10:56:10 +08:00
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
return str
|
|
|
|
|
},
|
|
|
|
|
jump() {
|
2024-09-02 09:50:59 +08:00
|
|
|
console.log(12321,this.device);
|
2023-09-06 10:56:10 +08:00
|
|
|
uni.navigateTo({
|
2023-09-18 15:55:34 +08:00
|
|
|
url:
|
|
|
|
|
'/pages/device/APF/detail?id=' +
|
|
|
|
|
this.device.equipmentId +
|
|
|
|
|
'&isPrimaryUser=' +
|
|
|
|
|
this.device.isPrimaryUser +
|
|
|
|
|
'&process=' +
|
2024-09-02 09:50:59 +08:00
|
|
|
this.device.process + '&ndid=' + this.device.ndid,
|
2023-09-06 10:56:10 +08:00
|
|
|
})
|
|
|
|
|
},
|
2023-09-18 15:55:34 +08:00
|
|
|
},
|
2023-09-06 10:56:10 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
2023-09-18 15:55:34 +08:00
|
|
|
<style lang="scss">
|
2023-09-06 10:56:10 +08:00
|
|
|
.device-body {
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
|
|
|
|
|
.device-body-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-18 15:55:34 +08:00
|
|
|
</style>
|