feat:菜单可配置
This commit is contained in:
104
pages/device/deviceBusUseRecord/detail.vue
Normal file
104
pages/device/deviceBusUseRecord/detail.vue
Normal file
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<up-popup :show="visible" mode="right" closeable @close="handleClose" @open="handleOpen">
|
||||
<uni-section titleFontSize="20px" type="line" title="设备使用记录"> </uni-section>
|
||||
<scroll-view scroll-y="true" class="content">
|
||||
<up-row>
|
||||
<up-col span="6"
|
||||
>开始使用人:
|
||||
<text class="value">{{ detailInfo.userName }}</text>
|
||||
</up-col>
|
||||
<up-col span="6"
|
||||
>开始时间:
|
||||
<text class="value">{{ detailInfo.useTimeStart }}</text>
|
||||
</up-col>
|
||||
</up-row>
|
||||
<up-row>
|
||||
<up-col span="6"
|
||||
>结束使用人:
|
||||
<text class="value">{{ detailInfo.userNameEnd }}</text>
|
||||
</up-col>
|
||||
<up-col span="6"
|
||||
>结束时间:
|
||||
<text class="value">{{ detailInfo.useTimeEnd }}</text>
|
||||
</up-col>
|
||||
</up-row>
|
||||
<up-row>
|
||||
<up-col span="4"
|
||||
>使用前状态:
|
||||
<text class="value">{{ detailInfo.stateBefore }}</text>
|
||||
</up-col>
|
||||
<up-col span="4"
|
||||
>使用后状态:
|
||||
<text class="value">{{ detailInfo.stateAfter }}</text>
|
||||
</up-col>
|
||||
<up-col span="4"
|
||||
>温度(℃):
|
||||
<text class="value">{{ detailInfo.temperature }}</text>
|
||||
</up-col>
|
||||
</up-row>
|
||||
<up-row>
|
||||
<up-col span="4"
|
||||
>湿度(%RH):
|
||||
<text class="value">{{ detailInfo.humidity }}</text>
|
||||
</up-col>
|
||||
<up-col span="6"
|
||||
>样品类别/个数/任务:
|
||||
<text class="value">{{ detailInfo.useRemark }}</text>
|
||||
</up-col>
|
||||
</up-row>
|
||||
</scroll-view>
|
||||
</up-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, watch, computed } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
checkInfo: {
|
||||
type: Object
|
||||
}
|
||||
})
|
||||
const visible = ref(props.show)
|
||||
// 监听外部传入的show属性变化
|
||||
watch(
|
||||
() => props.show,
|
||||
newVal => {
|
||||
visible.value = newVal
|
||||
}
|
||||
)
|
||||
let detailInfo = ref({})
|
||||
|
||||
const emit = defineEmits(['close', 'open'])
|
||||
function handleClose() {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
function handleOpen() {
|
||||
detailInfo.value = props.checkInfo
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
font-size: 18px;
|
||||
height: 80vh;
|
||||
width: 80vw;
|
||||
padding: 10px 20px;
|
||||
.u-row {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
:deep(.uicon-close) {
|
||||
font-size: 22px !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user