<template>
|
<div class="workDetailContainer">
|
<div class="detailTop">
|
<div class="image-container">
|
<van-swipe class="detailSwipe" :autoplay="3000" indicator-color="#4C85FF">
|
<van-swipe-item v-for="(img, index) in getImageList" :key="index">
|
<van-image class="detailImage" :src="img" fit="cover" width="100%" height="235px"
|
@click="openPreview(index)" preview-visible="false" />
|
</van-swipe-item>
|
</van-swipe>
|
</div>
|
</div>
|
<!-- 工单内容 -->
|
<div class="worderContainer">
|
<div class="workOrderContent">
|
<div class="workOrderTitle">工单内容</div>
|
<div class="workOrderContainer">
|
<div class="orderRow">
|
<div class="rowTitle">工单编号</div>
|
<div>{{ workDetailData.eventNum }}</div>
|
</div>
|
<div class="orderRow">
|
<div class="rowTitle">工单处置人</div>
|
<div>{{ workDetailData.disposeUserName }}</div>
|
</div>
|
<div class="orderRow">
|
<div class="rowTitle">处置部门</div>
|
<div>{{ workDetailData.disposeDeptName }}</div>
|
</div>
|
<div class="orderRow">
|
<div class="rowTitle">拍摄时间</div>
|
<div>{{ workDetailData.shootTime }}</div>
|
</div>
|
<div class="orderRow">
|
<div class="rowTitle">分发人员</div>
|
<div>{{ workDetailData.distributeUserName }}</div>
|
</div>
|
<div class="orderRow">
|
<div class="rowTitle">分发部门</div>
|
<div>{{ workDetailData.distributeDeptName }}</div>
|
</div>
|
|
<div class="orderRow">
|
<div class="rowTitle">分发时间</div>
|
<div>{{ workDetailData.distributeTime }}</div>
|
</div>
|
<div class="orderRow">
|
<div class="rowTitle">工单位置</div>
|
<div class="rowAddress" @click="jumpMap(workDetailData)">{{ workDetailData.eventLocation }}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script setup>
|
import { showToast, showNotify, showImagePreview } from 'vant'
|
import { getShowImg, getSmallImg } from '@/utils/util'
|
import { useRoute } from 'vue-router'
|
|
const route = useRoute()
|
|
const workDetailData = ref({})
|
|
// 预览图片
|
const getImageList = computed(() => {
|
const imageArr = []
|
const detail = workDetailData.value
|
if (detail.eventImageUrl) {
|
const smallUrl = getSmallImg(detail.eventImageUrl)
|
imageArr.push(smallUrl)
|
}
|
return imageArr
|
})
|
const openPreview = index => {
|
const detail = workDetailData.value
|
const showUrl = getShowImg(detail.eventImageUrl)
|
showImagePreview({
|
images: [showUrl],
|
startPosition: 0,
|
})
|
}
|
// 跳转地图
|
const jumpMap = item => {
|
console.log('item',item);
|
const transmitData = { data: { type: 'jumpMapNav', eventNum: item } }
|
uni.postMessage(transmitData)
|
}
|
|
onMounted(async () => {
|
workDetailData.value = JSON.parse(route.query.workDetailData)
|
})
|
</script>
|
<style lang="scss" scoped>
|
.workDetailContainer {
|
.detailTop {
|
.image-container {
|
position: relative;
|
width: 100%;
|
// height: 205px;
|
|
.detailImage {
|
width: 100%;
|
height: 100%;
|
display: block;
|
object-fit: cover;
|
}
|
}
|
}
|
|
.worderContainer {
|
padding: 0 12px;
|
padding-bottom: 2px;
|
background: #f6f6f6;
|
}
|
|
.workOrderContent {
|
margin-top: 15px;
|
background-color: #fff;
|
border-radius: 6px;
|
padding: 10px;
|
margin-bottom: 17px;
|
|
.workOrderTitle {
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: bold;
|
font-size: 16px;
|
color: #222324;
|
}
|
|
.workOrderContainer {
|
.orderRow {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
min-height: 48px;
|
border-bottom: 1px solid #f5f5f5;
|
color: #7b7b7b;
|
}
|
|
.rowCard {
|
margin-top: 10px;
|
|
min-height: 48px;
|
border-bottom: 1px solid #f5f5f5;
|
color: #7b7b7b;
|
}
|
|
.guanlian {
|
display: flex;
|
}
|
|
.rowTitle {
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: 400;
|
font-size: 15px;
|
color: #222324;
|
white-space: nowrap;
|
|
span {
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: 400;
|
font-size: 10px;
|
color: #3a3a3a;
|
}
|
}
|
|
.addressBox {
|
display: flex;
|
align-items: center;
|
overflow: hidden;
|
}
|
|
.rowAddress {
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: 400;
|
font-size: 14px;
|
color: #1d6fe9;
|
text-decoration: underline;
|
text-align: right;
|
padding-top: 1px;
|
padding-left: 5px;
|
padding-right: 2px;
|
}
|
:deep(.custom-field) {
|
padding: 0 !important;
|
padding-left: 10px !important;
|
}
|
|
:deep(.custom-field .van-field__control) {
|
padding: 0 !important;
|
}
|
|
}
|
}
|
|
}
|
</style>
|