无人机管理后台前端(已迁走)
shuishen
2025-05-07 1409b62c964de1adc12fe4c96fc22ea3e506dd1d
事件工单:复核状态栏显示处理
1 files modified
24 ■■■■ changed files
src/views/tickets/ticket.vue 24 ●●●● patch | view | raw | blame | history
src/views/tickets/ticket.vue
@@ -60,6 +60,10 @@
            <template #keyData="{ row }">
              <span>{{ row.address }}</span>
            </template>
            <template #isReview="{ row }">
              <span>{{ showIsReviewText(row) }}</span>
            </template>
          </avue-crud>
        </div>
      </el-tab-pane>
@@ -544,7 +548,7 @@
          // { label: "序号", prop: "id", width: 70 },
          { label: "工单编号", prop: "orderNumber", width: 120, overHidden: true, tooltip: true },
          { label: "工单名称", prop: "orderName", width: 150, overHidden: true, tooltip: true },
          { label: "所属单位", prop: "department", width: 100, overHidden: true, tooltip: true },
          { label: "所属单位", prop: "department", overHidden: true, tooltip: true },
          { label: "发起时间", prop: "startTime", width: 160 },
          { label: "关联算法", prop: "aiType", width: 150, overHidden: true, tooltip: true },
          { label: "工单类型", prop: "type", width: 130, overHidden: true, tooltip: true },
@@ -558,12 +562,11 @@
          { label: "创建人", prop: "creator", width: 100 },
          { label: "处理人", prop: "handler", width: 100 },
          {
            slot: true,
            hide: false,
            label: "复核状态",
            prop: "isReview",
            width: 90,
            formatter: (row) => {
              return row.isReview === 1 ? '是' : '否'
            }
          },
          { label: "工单状态", prop: "status", slot: true, width: 90 },
@@ -822,6 +825,14 @@
      // 其它tab直接用接口返回的stepInfos
      return this.stepInfos.map(step => String(step.status))
    },
    showIsReviewText () {
      return (row) => {
        if (['4', '5'].includes(row.status)) return row.isReview === 1 ? '是' : '否'
        return '/'
      }
    }
  },
  methods: {
    async loadAMapScripts() {
@@ -1251,6 +1262,11 @@
    handleTabChange(tab) {
      this.activeTab = tab.props?.name || tab.name
      const isReview = this.findObject(this.option.column, 'isReview')
      // 根据条件切换显隐
      isReview.hide = !['all', 'completed', 'myTickets'].includes(this.activeTab)
      this.handleReset()
      this.page.currentPage = 1
      this.fetchTableData()