feat:设备管理
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
<up-row class="flex-wrap pt10 pl10" style="background-color: #f5f7fa">
|
||||
<up-col class="mb8" :span="gridCol" v-for="(item, index) in detailSchema">
|
||||
<view style="color: #666"
|
||||
><span style="color: #333">{{ item.label }}:</span>{{ detailInfo[item.value] }}</view
|
||||
><span style="color: #333">{{ item.label }}:</span>{{ deviceInfo[item.value] }}</view
|
||||
>
|
||||
</up-col>
|
||||
</up-row>
|
||||
<view class="pt5">
|
||||
<view class="p10">
|
||||
<up-row>
|
||||
<up-col span="6">
|
||||
<view
|
||||
@@ -19,10 +19,10 @@
|
||||
{{ detailInfo.checkUserName }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="pt5"
|
||||
<view class="pt10"
|
||||
>维护保养日期:
|
||||
<text style="color: #666">
|
||||
{{ detailInfo.checkDate }}
|
||||
{{ nx.$helper.formateToDateTime(detailInfo.checkDate) }}
|
||||
</text>
|
||||
</view>
|
||||
</up-col>
|
||||
@@ -73,8 +73,9 @@
|
||||
import { ref, reactive, onMounted, watch, computed } from 'vue'
|
||||
import { useGridCol } from '@/nx/hooks/useGridCol'
|
||||
import dailyCheckApi from '@/nx/api/dailyCheck'
|
||||
import { getDeviceBusInfoById } from '@/nx/api/deviceInfo'
|
||||
import { getImgBaseUrl } from '@/defaultBaseUrl'
|
||||
|
||||
import nx from '@/nx'
|
||||
const { gridCol } = useGridCol([700], [6, 4])
|
||||
const props = defineProps({
|
||||
show: {
|
||||
@@ -113,12 +114,18 @@ async function getDetailInfo(id) {
|
||||
const res = await dailyCheckApi.queryById(id)
|
||||
detailInfo.value = res
|
||||
}
|
||||
const deviceInfo = ref({})
|
||||
async function getDeviceInfo(id) {
|
||||
const res = await getDeviceBusInfoById(id)
|
||||
deviceInfo.value = res
|
||||
}
|
||||
const emit = defineEmits(['close', 'open'])
|
||||
function handleClose() {
|
||||
emit('close')
|
||||
}
|
||||
function handleOpen() {
|
||||
getDetailInfo(props.checkInfo.id)
|
||||
getDeviceInfo(props.checkInfo.deviceId)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -139,4 +146,7 @@ function handleOpen() {
|
||||
:deep(.uicon-close) {
|
||||
font-size: 22px !important;
|
||||
}
|
||||
:deep(.u-popup__content__close--top-right) {
|
||||
top: 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user