<!-- Description: h5-运维详情 Author: 李亚光 Date: 2025-01-03 --> <script lang="ts" setup name="H5OperationDetail"> import { showToast } from 'vant' import showPosition from '@/views/mobile/info/components/showPosition.vue' // 基本信息 const detailInfo = ref({ devcode: '24102708', devTypeName: '燃气智能监测终端', repairType: '新装', tagNumber: 'N57C114', position: '示范区联络线中压A闸9', address: '百环花园调压站南侧', repairDate: '2024-11-30', repairPerson: '张三', repairContent: '更换电池以及维护保养', deptName: '第一分公司/运维一所', lon: '116.4159851074', lat: '39.9000473022', }) // 查看位置 const locationRef = ref() const viewLocation = () => { if (!detailInfo.value.lon || !detailInfo.value.lat) { showToast('该位置缺少坐标信息'); return } locationRef.value.initDialog([detailInfo.value.lon, detailInfo.value.lat]) } </script> <template> <div class="info-container"> <!-- 位置弹窗 --> <show-position ref="locationRef" /> <!-- 基本信息 --> <div id="base-info" class="search-info"> <div class="cell"> <div class="title">运维类型</div> <div class="value">{{ detailInfo.repairType }}</div> </div> <div class="cell"> <div class="title">设备编号</div> <div class="value">{{ detailInfo.devcode }}</div> </div> <div class="cell"> <div class="title">安装位置</div> <div class="value">{{ detailInfo.tagNumber }}</div> </div> <div class="cell"> <div class="title">位置名称</div> <div class="value">{{ detailInfo.position }}</div> </div> <div class="cell"> <div class="title">详细位置</div> <div class="value" @click="viewLocation">{{ detailInfo.address }} <span class="location"></span> </div> </div> <div class="cell"> <div class="title">运维日期</div> <div class="value">{{ detailInfo.repairDate }}</div> </div> <div class="cell"> <div class="title">运维人员</div> <div class="value">{{ detailInfo.repairPerson }}</div> </div> <div class="cell"> <div class="title">运维内容</div> <div class="value">{{ detailInfo.repairContent }}</div> </div> </div> </div> </template> <style lang="scss" scoped> .info-container { width: 100%; height: calc(100vh - 40px); overflow: hidden; color: #444; .search-info { background-color: #fff; width: 96%; margin: 0 auto; margin-top: 1vh; border-radius: 6px; padding: 4px; padding-top: 0.8rem; padding-bottom: 0.8rem; padding-left: 0.8rem; font-size: 1.1rem; .cell { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; padding-right: 14px; align-items: center; .value { color: #888; width: 80%; text-align: right; font-size: 1rem; vertical-align: middle; // display: flex; // flex-direction: column; // justify-content: center; display: flex; align-items: center; justify-content: flex-end; .location { display: inline-block; width: 22px; height: 22px; background: url('@/assets/icons/icon-location.svg') no-repeat center center / cover; vertical-align: middle; margin-left: 8px; } } .title { width: 20%; white-space: nowrap; font-weight: 500; } // .title, // .value { // white-space: nowrap; // overflow: hidden; // text-overflow: ellipsis; // } } } .search-result { background-color: #fff; width: 96%; margin: 0 auto; margin-top: 1vh; border-radius: 6px; padding: 4px; padding-left: 0.6rem; .title { display: flex; font-size: 1.1rem; .symbol { width: 4px; height: 22px; background-color: #0d76d4; border-radius: 4px; margin-right: 8px; } } .top-border { border-top: 1px solid #e4e7ed; // margin-top: 8px; } .result-item { .cell { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; padding-right: 18px; align-items: center; .value { color: #888; width: 80%; text-align: right; font-size: 1rem; vertical-align: middle; // display: flex; // flex-direction: column; // justify-content: center; display: flex; align-items: center; justify-content: flex-end; } .title { width: 20%; white-space: nowrap; } } } } } </style>