feat:菜单可配置
This commit is contained in:
89
pages/device/stop/detail.vue
Normal file
89
pages/device/stop/detail.vue
Normal file
@@ -0,0 +1,89 @@
|
||||
<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="12"
|
||||
>停用日期:
|
||||
<text class="value">{{ detailInfo.stopDate }}</text>
|
||||
</up-col>
|
||||
</up-row>
|
||||
<up-row>
|
||||
<up-col span="12"
|
||||
>借用原因:
|
||||
<text class="value">{{ detailInfo.stopReason }}</text>
|
||||
</up-col>
|
||||
</up-row>
|
||||
<up-row>
|
||||
<up-col span="12"
|
||||
>备注:
|
||||
<text class="value">{{ detailInfo.remark }}</text>
|
||||
</up-col>
|
||||
</up-row>
|
||||
<wf-comment :commentWf="commentWf" />
|
||||
</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')
|
||||
}
|
||||
let commentWf = ref([])
|
||||
function handleOpen() {
|
||||
detailInfo.value = props.checkInfo
|
||||
if (props.checkInfo.commentJson) {
|
||||
try {
|
||||
commentWf.value = JSON.parse(props.checkInfo.commentJson)
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: '解析数据错误',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
font-size: 18px;
|
||||
height: 80vh;
|
||||
width: 75vw;
|
||||
padding: 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