| | |
| | | <!-- 巡检任务 --> |
| | | <template> |
| | | <web-view ref="sWebViewRef" :src="`${viewUrl}`" /> |
| | | <WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage"/> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { useUserStore } from "@/store/index.js"; |
| | | import { getWebViewUrl } from "@/utils/index.js"; |
| | | import WebViewPlus from "@/components/WebViewPlus.vue"; |
| | | |
| | | const sWebViewRef = ref(null); |
| | | const userStore = useUserStore(); |
| | | const viewUrl = `http://192.168.1.15:5174/drone-app-web-view/#/webViewWrapper/inspectionTask?params=${JSON.stringify(userStore?.userInfo)}`; |
| | | const viewUrl = getWebViewUrl('/inspectionTask') |
| | | |
| | | function onPostMessage(data) { |
| | | if (data.type === 'taskDetails'){ |
| | | if ([1,2].includes(data.rowItem.status)){ |
| | | uni.navigateTo({ |
| | | url: '/pages/inspectionTask/TaskDetails/TaskDetails' |
| | | }); |
| | | }else{ |
| | | uni.navigateTo({ |
| | | url: '/subPackages/taskDetail/execution/index' |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | |
| | | </style> |
| | | |
| | | |
| | | <!--<template>--> |
| | | <!-- <WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage"/>--> |
| | | <!--</template>--> |
| | | |
| | | <!--<script setup>--> |
| | | <!--import {useUserStore} from "@/store/index.js";--> |
| | | <!--import WebViewPlus from "@/components/WebViewPlus.vue";--> |
| | | |
| | | <!--const userStore = useUserStore();--> |
| | | <!--const viewUrl = `http://192.168.1.15:5174/drone-app-web-view/#/appTaskDetails?params=${JSON.stringify(userStore?.userInfo)}`;--> |
| | | <!--function onPostMessage(data) {--> |
| | | <!-- console.log(data)--> |
| | | <!--}--> |
| | | <!--</script>--> |
| | | <!--<style scoped lang="scss">--> |
| | | |
| | | <!--</style>--> |