无人机管理后台前端(已迁走)
rain
2025-04-20 1f54fe124157c4c24ccac92c995eb37b7afe24b7
Merge branch 'master' of http://139.196.74.78:10010/r/drone/drone-web-manage
5 files modified
40 ■■■■ changed files
src/App.vue 3 ●●●● patch | view | raw | blame | history
src/main.js 8 ●●●● patch | view | raw | blame | history
src/page/index/index.vue 11 ●●●●● patch | view | raw | blame | history
src/permission.js 2 ●●● patch | view | raw | blame | history
src/views/tickets/ticket.vue 16 ●●●●● patch | view | raw | blame | history
src/App.vue
@@ -2,8 +2,7 @@
  <router-view />
</template>
<script>
export default {};
<script setup>
</script>
<style>
src/main.js
@@ -4,9 +4,9 @@
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-04-10 12:19:47
 * @FilePath: \drone-web-manage\src\main.js
 * @Description:
 *
 * Copyright (c) 2025 by shuishen, All Rights Reserved.
 * @Description:
 *
 * Copyright (c) 2025 by shuishen, All Rights Reserved.
 */
import { createApp } from 'vue'
import website from './config/website'
@@ -39,7 +39,6 @@
import 'styles/common.scss'
// 业务组件
import tenantPackage from './views/system/tenantpackage.vue'
// 地图依赖
import mapContainer from './components/map-container/mapContainer.vue'
@@ -58,6 +57,7 @@
    // 设置用户信息,把大屏用户信息保存到localStorage
    let obj = {}
    obj = localStorage.getItem("bs_userInfo")
    obj = obj ? obj : localStorage.getItem("saber-userInfo")
    if (obj instanceof Object) {
        obj = obj.content
    } else {
src/page/index/index.vue
@@ -75,7 +75,16 @@
    openMenu(item = {}) {
      this.$store.dispatch('GetMenu', item.id).then(data => {
        if (data.length !== 0) {
          this.$router.$avueRouter.formatRoutes(data, true);
          this.$router.$avueRouter.formatRoutes(data, true)
          // 获取url里面的redirect
          const redirect = decodeURIComponent(this.$route.query.redirect || '');
          if (redirect){
            console.log('redirect',redirect);
            const [path, queryString] = redirect.split('?');
            const query = queryString ? Object.fromEntries(new URLSearchParams(queryString)) : {};
            this.$router.push({ path,query})
          }
        }
        //当点击顶部菜单后默认打开第一个菜单
        /*if (!this.validatenull(item)) {
src/permission.js
@@ -4,7 +4,7 @@
 * @LastEditors: GuLiMmo 2820890765@qq.com
 * @LastEditTime: 2024-08-29 14:10:56
 * @FilePath: /drone-web-manage/src/permission.js
 * @Description:
 * @Description:
 * Copyright (c) 2024 by GuLiMmo, All Rights Reserved.
 */
import router from './router/';
src/views/tickets/ticket.vue
@@ -546,7 +546,6 @@
        algorithm: [], // 关联算法改为数组
        location: [],  // 将存储为[经度, 纬度, 地址]格式
        address: '',
        content: '',
        photos: [],
        content: '', // 新增字段,用于存储后端返回的 content
      },
@@ -606,9 +605,15 @@
      reviewDialogVisible: false, // 新增:审核对话框可见性
      currentReviewImage: '', // 新增:当前审核图片
      currentImageIndex: 1, // 新增:当前图片索引
      isShowInfo: false,
    };
  },
  created() {
    let orderNumber = new URLSearchParams(window.location.search).get('orderNumber');
    if (orderNumber) {
      this.filters.keyword = orderNumber;
      this.isShowInfo = true;
    }
    this.loadAMapScripts();
    this.fetchDropdownData();
    this.fetchTabCounts(); // 新增:初始化时获取 tab 数据
@@ -619,6 +624,9 @@
    this.fetchTableData();
  },
  computed: {
    firstRowData() {
      return this.tableData.length > 0 ? this.tableData[0] : null;
    },
    availableHandlers() {
      return this.form.department ? (this.departmentUsers[this.form.department] || []) : [];
    },
@@ -974,6 +982,11 @@
        // 更新总数显示
        this.page.total = total || 0;
        // 是否弹出详情页
        if (this.isShowInfo) {
          this.handleViewDetail(this.firstRowData)
          this.isShowInfo = false; // 生效一次
        }
        await this.fetchTabCounts();
      } catch (error) {
        this.$message.error(error.message || "获取数据失败");
@@ -1245,6 +1258,7 @@
    },
    async handleViewDetail(row) {
      // 先设置workType,直接从row读取
      this.workType = row.work_type !== undefined ? Number(row.work_type) : 0;