无人机管理后台前端(已迁走)
xiebin
2025-04-20 786fb5b1d3326bae09525db46668594d5e66736c
事件工单跳转
1 files modified
12 ■■■■■ changed files
src/views/tickets/ticket.vue 12 ●●●●● patch | view | raw | blame | history
src/views/tickets/ticket.vue
@@ -545,7 +545,6 @@
        algorithm: [], // 关联算法改为数组
        location: [],  // 将存储为[经度, 纬度, 地址]格式
        address: '',
        content: '',
        photos: [],
        content: '', // 新增字段,用于存储后端返回的 content
      },
@@ -605,12 +604,14 @@
      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();
@@ -622,6 +623,9 @@
    this.fetchTableData();
  },
  computed: {
    firstRowData() {
      return this.tableData.length > 0 ? this.tableData[0] : null;
    },
    availableHandlers() {
      return this.form.department ? (this.departmentUsers[this.form.department] || []) : [];
    },
@@ -977,6 +981,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 || "获取数据失败");
@@ -1248,6 +1257,7 @@
    },
    async handleViewDetail(row) {
      // 先设置workType,直接从row读取
      this.workType = row.work_type !== undefined ? Number(row.work_type) : 0;