shuishen
2025-10-20 a5025a9428f7bf41b665d773123dd94244518ee4
Merge branch 'master' of http://139.196.74.78:10010/r/drone/drone-app
8 files modified
1 files added
140 ■■■■ changed files
src/pages/inspectionTask/index.vue 11 ●●●●● patch | view | raw | blame | history
src/pages/login/index.vue 4 ●●●● patch | view | raw | blame | history
src/pages/work/index.vue 17 ●●●● patch | view | raw | blame | history
src/static/images/tabbar/add-task.svg 10 ●●●●● patch | view | raw | blame | history
src/subPackages/taskDetail/addTask/index.vue 18 ●●●●● patch | view | raw | blame | history
src/subPackages/taskDetail/execution/index.vue 12 ●●●● patch | view | raw | blame | history
src/subPackages/workDetail/addWork/index.vue 33 ●●●● patch | view | raw | blame | history
src/subPackages/workDetail/index.vue 18 ●●●● patch | view | raw | blame | history
src/subPackages/workDetail/mapWork/index.vue 17 ●●●● patch | view | raw | blame | history
src/pages/inspectionTask/index.vue
@@ -1,11 +1,12 @@
<!-- 巡检任务 -->
<template>
  <WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage"/>
  <WebViewPlus v-if="isApp" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
</template>
<script setup>
import { getWebViewUrl } from "@/utils/index.js";
import WebViewPlus from "@/components/WebViewPlus.vue";
import {onHide, onShow} from "@dcloudio/uni-app";
const viewUrl = getWebViewUrl('/inspectionTask')
@@ -22,6 +23,14 @@
    }
  }
}
const isApp = ref(false)
onShow(() => {
  isApp.value = true
});
onHide(() => {
  isApp.value = false
});
</script>
<style scoped lang="scss">
src/pages/login/index.vue
@@ -29,8 +29,8 @@
import { HOME_PATH, LOGIN_PATH, removeQueryString } from "@/router";
const userStore = useUserStore();
const loginForm = ref({
  username: "shuishen",
  password: "Dashabi....",
  username: "cpz3",
  password: "cpz3@2025",
});
const inputStyle = computed(() => {
  const style = {};
src/pages/work/index.vue
@@ -1,6 +1,6 @@
<template>
    <view class="flex flex-col eventTickets">
         <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" />
         <WebViewPlus v-if="isApp" ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
        
    </view>
@@ -11,7 +11,20 @@
import WebViewPlus from "@/components/WebViewPlus.vue";
const sWebViewRef = ref(null);
const viewUrl = getWebViewUrl('/work', {})
function onPostMessage(data) {
  uni.navigateTo({
    url: `/subPackages/workDetail/index?eventNum=${data.eventNum}`
  });
}
    const isApp = ref(false)
    onShow(() => {
      isApp.value = true
    });
    onHide(() => {
      isApp.value = false
    });
</script>
<style scoped lang="scss">
src/static/images/tabbar/add-task.svg
New file
@@ -0,0 +1,10 @@
<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1321316217">
<g id="&#229;&#155;&#190;&#230;&#160;&#135;">
<circle id="bg" cx="28" cy="28" r="25.5" fill="#1D6FE9" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<g id="Frame">
<path id="Vector" d="M29.051 17.3062C29.1972 17.3062 29.3373 17.3642 29.4407 17.4675C29.544 17.5709 29.6021 17.711 29.6021 17.8572V26.6735H38.4184C38.5645 26.6735 38.7047 26.7316 38.808 26.8349C38.9114 26.9382 38.9694 27.0784 38.9694 27.2245V28.3266C38.9694 28.4727 38.9114 28.6129 38.808 28.7162C38.7047 28.8195 38.5645 28.8776 38.4184 28.8776H29.6021V37.6939C29.6021 37.84 29.544 37.9802 29.4407 38.0835C29.3373 38.1869 29.1972 38.2449 29.051 38.2449H27.949C27.8029 38.2449 27.6627 38.1869 27.5594 38.0835C27.456 37.9802 27.398 37.84 27.398 37.6939V28.8776H18.5817C18.4355 28.8776 18.2954 28.8195 18.192 28.7162C18.0887 28.6129 18.0306 28.4727 18.0306 28.3266V27.2245C18.0306 27.0784 18.0887 26.9382 18.192 26.8349C18.2954 26.7316 18.4355 26.6735 18.5817 26.6735H27.398V17.8572C27.398 17.711 27.456 17.5709 27.5594 17.4675C27.6627 17.3642 27.8029 17.3062 27.949 17.3062H29.051Z" fill="white" stroke="white" stroke-width="0.4"/>
</g>
</g>
</svg>
src/subPackages/taskDetail/addTask/index.vue
@@ -1,14 +1,30 @@
<!-- 新建任务 -->
<template>
  <WebViewPlus :src="`${viewUrl}`"/>
  <WebViewPlus v-if="isApp" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
</template>
<script setup>
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getWebViewUrl} from "@/utils/index.js";
import {onHide, onShow} from "@dcloudio/uni-app";
const viewUrl = ref(getWebViewUrl('/addTask'))
function onPostMessage(data) {
  if (data.type === 'submitSuccess'){
    uni.switchTab({
      url: '/pages/inspectionTask/index'
    });
  }
}
const isApp = ref(false)
onShow(() => {
  isApp.value = true
});
onHide(() => {
  isApp.value = false
});
</script>
<style lang="scss" scoped></style>
src/subPackages/taskDetail/execution/index.vue
@@ -1,10 +1,10 @@
<!-- 已执行 -->
<template>
  <WebViewPlus :src="`${viewUrl}`"/>
  <WebViewPlus v-if="isApp" :src="`${viewUrl}`"/>
</template>
<script setup>
import {onLoad} from "@dcloudio/uni-app";
import {onHide, onLoad, onShow} from "@dcloudio/uni-app";
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getWebViewUrl} from "@/utils/index.js";
@@ -19,6 +19,14 @@
//     });
//   }
// }
const isApp = ref(false)
onShow(() => {
  isApp.value = true
});
onHide(() => {
  isApp.value = false
});
</script>
<style lang="scss" scoped></style>
src/subPackages/workDetail/addWork/index.vue
@@ -1,8 +1,33 @@
<!-- 新建工单 -->
<template>
  <view> 基础 </view>
    <view >
         <WebViewPlus @webMessage="onPostMessage" v-if="isApp" ref="sWebViewRef" :src="`${viewUrl}`" />
    </view>
</template>
<script setup></script>
<script setup>
import {getWebViewUrl} from "@/utils/index.js";
import WebViewPlus from "@/components/WebViewPlus.vue";
const sWebViewRef = ref(null);
const viewUrl = getWebViewUrl('/addWork')
function onPostMessage(data) {
  if (data.type === 'submitSuccess'){
    uni.switchTab({
      url: '/pages/work/index'
    });
  }
}
const isApp = ref(false)
onShow(() => {
  isApp.value = true
});
<style lang="scss" scoped></style>
onHide(() => {
  isApp.value = false
});
</script>
<style scoped lang="scss">
</style>
src/subPackages/workDetail/index.vue
@@ -1,21 +1,21 @@
<!-- 工单详情 - 包含待审核、待处理、处理中、已完成 -->
<template>
    <div class="workDetailContainer">
         <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
         <WebViewPlus v-if="isApp" 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(`http://192.168.1.157:5173/drone-app-web-view/#/webViewWrapper/workDetail?params=${JSON.stringify(userStore?.userInfo)}`);
    const viewUrl = ref('')
    onLoad( (options) => {
        const eventNum= options.eventNum;
        viewUrl.value =`http://192.168.1.157:5173/drone-app-web-view/#/webViewWrapper/workDetail?params=${JSON.stringify(userStore?.userInfo)}&eventNum=${eventNum}`
        const eventNum= options.eventNum;
        viewUrl.value = getWebViewUrl('/workDetail', {eventNum:eventNum})
    });
    
    function onPostMessage(data) {
@@ -26,6 +26,14 @@
        });
      }
    }
    const isApp = ref(false)
    onShow(() => {
      isApp.value = true
    });
    onHide(() => {
      isApp.value = false
    });
</script>
<style lang="scss" scoped>
src/subPackages/workDetail/mapWork/index.vue
@@ -1,8 +1,21 @@
<!-- 地图展示 -->
<template>
  <view> 基础 </view>
  <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
</template>
<script setup></script>
<script setup>
    import {getWebViewUrl} from "@/utils/index.js";
    import { onLoad } from '@dcloudio/uni-app';
    const sWebViewRef = ref(null);
    const viewUrl = ref('')
    onLoad( (options) => {
        const currentItem = options.currentItem
    viewUrl.value = getWebViewUrl('/mapWork', {currentItem:currentItem})
    });
</script>
<style lang="scss" scoped></style>