罗广辉
2025-10-23 6d009f08368f93713c1ebeca6acde4163042faa4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!-- 工单详情 - 包含待审核、待处理、处理中、已完成 -->
<template>
    <div class="workDetailContainer">
         <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
    </div>
</template>
 
<script setup>
        import {getWebViewUrl} from "@/utils/index.js";
    import { onLoad } from '@dcloudio/uni-app';
    import { useUserStore } from '@/store/index.js'
    const userStore = useUserStore()
    const userInfo = userStore.userInfo
    const sWebViewRef = ref(null);
    const viewUrl = ref('')
    onLoad( (options) => {
        const eventNum= options.eventNum;    
        viewUrl.value = getWebViewUrl('/workDetail', {eventNum:eventNum})    
    });
    
    function onPostMessage(data) {
        
      if (data.type === 'workback'){
        
        uni.switchTab({
          url: '/pages/work/index'
        });
      }else if(data.type === 'jumpMapNav'){
           uni.navigateTo({
            url:`/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`
          });
      }
    }
 
</script>
 
<style lang="scss" scoped>
    .workDetailContainer {
        padding: 0 10px;
width: 100%;
    height: 100%;
    background: url('/src/static/images/user/allBg.svg') no-repeat center center;
    background-size: cover;
        
 
    }
</style>