shuishen
2025-10-22 6e26102f3fbc3302d68754b6864963eb5cba88a5
Merge branch 'master' of http://139.196.74.78:10010/r/drone/drone-app
7 files modified
94 ■■■■ changed files
src/App.vue 7 ●●●●● patch | view | raw | blame | history
src/pages.json 37 ●●●● patch | view | raw | blame | history
src/pages/inspectionTask/index.vue 7 ●●●● patch | view | raw | blame | history
src/pages/map/index.vue 14 ●●●● patch | view | raw | blame | history
src/pages/user/index.vue 4 ●●●● patch | view | raw | blame | history
src/pages/work/index.vue 6 ●●●● patch | view | raw | blame | history
src/subPackages/taskDetail/addTask/index.vue 19 ●●●● patch | view | raw | blame | history
src/App.vue
@@ -38,4 +38,11 @@
/* 每个页面公共css */
@import "uview-plus/index.scss";
@import "@/static/styles/common.scss";
.uni-tabbar__item:nth-child(4) {
  .uni-tabbar__bd {
    .uni-tabbar__icon {
      width: 60px !important;
    }
  }
}
</style>
src/pages.json
@@ -152,43 +152,40 @@
    }
  ],
  "tabBar": {
    "color": "#1b233b",
    "selectedColor": "#21d59d",
    "color": "#8c8c8c",
    "selectedColor": "#1D6FE9",
    "borderStyle": "black",
    "backgroundColor": "#ffffff",
    "list": [
      {
        "iconPath": "static/images/tabbar/icon_home.png",
        "selectedIconPath": "static/images/tabbar/icon_home_selected.png",
        "iconPath": "static/images/tabbar/icon_home.svg",
        "selectedIconPath": "static/images/tabbar/icon_home_selected.svg",
        "pagePath": "pages/map/index",
        "text": "地图"
      },
      {
        "iconPath": "static/images/tabbar/icon_list.png",
        "selectedIconPath": "static/images/tabbar/icon_list_selected.png",
        "iconPath": "static/images/tabbar/icon_list.svg",
        "selectedIconPath": "static/images/tabbar/icon_list_selected.svg",
        "pagePath": "pages/inspectionTask/index",
        "text": "巡检任务"
        "text": "任务"
      },
      {
        "iconPath": "static/images/tabbar/add-task.svg",
        "selectedIconPath": "static/images/tabbar/add-task.svg",
        "pagePath": "subPackages/taskDetail/addTask/index",
        "text": "新建",
        "visible": true,
        "style": {
          "width": "600",
          "height": "600"
        }
        "pagePath": "subPackages/taskDetail/addTask/index"
      },
      {
        "iconPath": "static/images/tabbar/icon_home.png",
        "selectedIconPath": "static/images/tabbar/icon_home_selected.png",
        "iconPath": "static/images/tabbar/mainLogo.png",
        "visible": "true"
      },
      {
        "iconPath": "static/images/tabbar/icon_order.svg",
        "selectedIconPath": "static/images/tabbar/icon_order_selected.svg",
        "pagePath": "pages/work/index",
        "text": "事件工单"
        "text": "工单"
      },
      {
        "iconPath": "static/images/tabbar/icon_me.png",
        "selectedIconPath": "static/images/tabbar/icon_me_selected.png",
        "iconPath": "static/images/tabbar/icon_me.svg",
        "selectedIconPath": "static/images/tabbar/icon_me_selected.svg",
        "pagePath": "pages/user/index",
        "text": "我的"
      }
src/pages/inspectionTask/index.vue
@@ -7,6 +7,7 @@
import { getWebViewUrl } from "@/utils/index.js";
import WebViewPlus from "@/components/WebViewPlus.vue";
import {onHide, onShow} from "@dcloudio/uni-app";
import {errorFactory} from "sass-loader/dist/utils.js";
const viewUrl = getWebViewUrl('/inspectionTask')
@@ -28,10 +29,14 @@
  isApp.value = true
  uni.setTabBarItem({
    index: 2, // Tab 的索引(从0开始)
    text: '新建任务',
    // text: '新建任务',
    visible: true,
    "pagePath": "subPackages/taskDetail/addTask/index"
  });
  uni.setTabBarItem({
    index: 3, // Tab
    visible: false,
  });
});
onHide(() => {
src/pages/map/index.vue
@@ -25,12 +25,14 @@
    uni.navigateTo({
      url: "/subPackages/qrCode/index",
    });
  }else if(data.type === "jumpAddWork"){//新建工单
  } else if(data.type === "jumpAddWork"){//新建任务
    console.log(data.rowItem, '9999')
    const encodedData = encodeURIComponent(JSON.stringify(data.rowItem))
    uni.setStorageSync('webview_params', encodedData)
      uni.switchTab({
        url: "/subPackages/taskDetail/addTask/index",
        url: `/subPackages/taskDetail/addTask/index`,
      });
  }
  else if(data.type === 'jumpMapNav'){  //事件导航
  } else if(data.type === 'jumpMapNav'){  //事件导航
           uni.navigateTo({
            url:`/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`
          });
@@ -46,6 +48,10 @@
    index: 2, // Tab 的索引(从0开始)
    visible: false,
  })
  uni.setTabBarItem({
    index: 3, // Tab
    visible: true,
  });
})
</script>
src/pages/user/index.vue
@@ -63,6 +63,10 @@
      index: 2, // Tab 的索引(从0开始)
      visible: false,
    })
    uni.setTabBarItem({
      index: 3, // Tab
      visible: true,
    });
  })
  // window.addEventListener('message', (event) => {
  //   console.log('message')
src/pages/work/index.vue
@@ -28,10 +28,14 @@
    onShow(() => {
    uni.setTabBarItem({
      index: 2, // Tab 的索引(从0开始)
      text: '新建工单',
      // text: '新建工单',
      visible: true,
      "pagePath": "subPackages/workDetail/addWork/index"
    });
    uni.setTabBarItem({
      index: 3, // Tab
      visible: false,
    });
      isApp.value = true
    });
src/subPackages/taskDetail/addTask/index.vue
@@ -7,9 +7,12 @@
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getWebViewUrl} from "@/utils/index.js";
import {onHide, onShow} from "@dcloudio/uni-app";
import {onHide, onLoad, onShow} from "@dcloudio/uni-app";
const viewUrl = ref(getWebViewUrl('/addTask'))
// const viewUrl = ref(getWebViewUrl('/addTask'))
const sWebViewRef = ref(null);
const viewUrl = ref('')
function onPostMessage(data) {
  if (data.type === 'submitSuccess'){
    uni.switchTab({
@@ -17,9 +20,21 @@
    });
  }
}
// onLoad( (options) => {
//   console.log(options, '8888')
//   const sns = options.device_sn
//
// });
const isApp = ref(false)
onShow(() => {
  isApp.value = true
  let params = {}
  const encodedData = uni.getStorageSync('webview_params')
  params = JSON.parse(decodeURIComponent(encodedData))
console.log(params, '6666')
  viewUrl.value = getWebViewUrl('/addTask', params)
});
onHide(() => {