无人机管理后台前端(已迁走)
张含笑
2025-09-17 b738a53b3c45d6ba801859c7902f2ce12fab7cf6
src/views/tickets/orderLog.vue
@@ -54,7 +54,7 @@
              </div> -->
              <div class="search-bar-box-item">
                <el-select v-model="filters.status" placeholder="请选择工单状态" clearable>
                <el-select v-model="filters.status" placeholder="请选择工单状态" clearable :disabled="activeTab !== 'all'">
                  <el-option v-for="item in statuses" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </div>
@@ -92,7 +92,7 @@
          <!-- 表格部分 -->
          <avue-crud class="ztzf-public-general-avue-crud" :data="tableData" :option="option" v-model:page="page"
            ref="crud" :table-loading="loading" @current-change="currentChange" @refresh-change="refreshChange"
            @on-load="onLoad" @search-change="searchChange" @size-change="sizeChange" v-if="activeTab === tab.name">
            @on-load="onLoad" @search-change="searchChange" @size-change="sizeChange" @cell-click="handleCellClick" v-if="activeTab === tab.name">
            <template #menu-left>
              <el-button v-if="hasAddBtnPermission() && activeTab != 'WAIT_AUDIT'" type="primary" icon="el-icon-plus"
                @click="handleAdd">新建工单</el-button>
@@ -235,7 +235,7 @@
      <el-form :model="form" :rules="rules" ref="testform" label-width="100px">
        <div class="custom-steps-container">
          <!-- 标题行 -->
          <div class="steps-titles">
          <div class="steps-titles"  v-if="filters.status !== '0'">
            <div v-for="(record, index) in form.record_list" :class="{ active: record.user_id >= 0 }" :key="index"
              class="step-title">
              {{ record.status_str }}
@@ -243,13 +243,13 @@
          </div>
          <!-- Element Steps 组件 -->
          <el-steps :active="form.active" align-center class="custom-steps">
          <el-steps :active="form.active" align-center class="custom-steps"  v-if="filters.status !== '0'">
            <el-step v-for="(record, index) in form.record_list" :key="index">
              <template #description>
                <span class="step-description" style="position: relative; display: inline-block">
                  {{ record.user_name }}
                </span>
                <span class="step-timer ">
                <span class="step-timer">
                  {{ record.interval_time_str }}
                </span>
                <div class="step-description">
@@ -341,6 +341,7 @@
            <el-button type="danger"
              v-if="form.status == 0 || (form.status == 2 && userInfo.user_id == form.create_user)"
              @click="submitForm(1)">发布</el-button>
              <el-button type="primary" v-if="form.status == 0 || (form.status == 2 && userInfo.user_id == form.create_user)" @click="submitForm(0)">保存</el-button>
            <!-- <el-button type="primary" v-if="form.status == 0 || userInfo.user_id == form.create_user"
                            @click="submitForm(0)">保存</el-button> -->
@@ -359,7 +360,7 @@
      <el-form :model="form" ref="testform" label-width="100px">
        <div class="custom-steps-container">
          <!-- 标题行 -->
          <div class="steps-titles">
          <div class="steps-titles" v-if="filters.status !== '0'">
            <div v-for="(record, index) in form.record_list" :class="{ active: record.user_id >= 0 }" :key="index"
              class="step-title">
              {{ record.status_str }}
@@ -367,7 +368,7 @@
          </div>
          <!-- Element Steps 组件 -->
          <el-steps :active="form.active" align-center class="custom-steps">
          <el-steps :active="form.active" align-center class="custom-steps" v-if="filters.status !== '0'">
            <el-step v-for="(record, index) in form.record_list" :key="index">
              <template #description>
                <span class="step-description" style="position: relative; display: inline-block">
@@ -703,8 +704,8 @@
    ...mapGetters(['userInfo', 'permission']),
    filteredTabs () {
      // rejection_and_draft 权限控制“已驳回”和“草稿”tab
      console.log(this.permission, '权限信息')
      console.log(this.userInfo, '权限信息22')
      // console.log(this.permission, '权限信息')
      // console.log(this.userInfo, '权限信息22')
      const canShowRejectAndDraft = this.permission?.rejection_and_draft === true
      return this.tabs
        .map(tab => {
@@ -721,6 +722,29 @@
  },
  methods: {
    handleCellClick(row, column) {
      if (column.no === 1) {
        navigator.clipboard.writeText(row.job_info_num).then(() => {
          this.$message.success('复制工单编号成功')
        })
      } else if (column.no === 2) {
        navigator.clipboard.writeText(row.name).then(() => {
          this.$message.success('复制工单名称成功')
        })
      } else if (column.no === 4) {
        navigator.clipboard.writeText(row.dept_name).then(() => {
          this.$message.success('复制所属单位成功')
        })
      } else if (column.no === 8) {
        navigator.clipboard.writeText(row.wayline_name).then(() => {
          this.$message.success('复制关联航线成功')
        })
      } else if (column.no === 9) {
        navigator.clipboard.writeText(row.ai_type_str).then(() => {
          this.$message.success('复制关联算法成功')
        })
      }
    },
    disabledDate (time) {
      return time.getTime() < Date.now() - 8.64e7 // 86400000 = 24 * 60 * 60 * 1000
    },
@@ -929,6 +953,15 @@
    handleTabChange (tab) {
      this.activeTab = tab.props?.name || tab.name
      this.filters.status = ''
      if (tab.props?.name === 'WAIT_AUDIT') {
        this.filters.status = '1'
      } else if (tab.props?.name === 'REJECTED') {
        this.filters.status = '2'
      } else if (tab.props?.name === 'PASS') {
        this.filters.status = '3'
      } else if (tab.props?.name === 'DRAFT') {
        this.filters.status = '0'
      }
      this.page.currentPage = 1
      this.fetchTableData()
    },
@@ -1197,7 +1230,7 @@
      this.page.currentPage = 1
      this.onLoad(this.page, this.query)
      this.handleViewDetail()
      // this.handleViewDetail()
    },
    /**
     * 驳回
@@ -1355,7 +1388,7 @@
.custom-steps-container {
  width: 100%;
  margin: 20px 0;
  margin: 10px 0;
}
.steps-titles {
@@ -1380,7 +1413,7 @@
}
.custom-steps {
  margin-top: -20px;
  margin-top: -10px;
  /* 向上移动与标题重叠 */
}
@@ -1396,7 +1429,7 @@
.step-description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  line-height: 2.6;
}
.event-title-center {