无人机管理后台前端(已迁走)
chenyao
2025-07-21 cc6ed9d9f2aa4d07e5f900843779a094e7a4dbab
feat:优化任务管理搜索操作
3 files modified
61 ■■■■ changed files
src/views/job/components/SearchBox.vue 41 ●●●●● patch | view | raw | blame | history
src/views/job/components/TaskAlgorithmBusiness.vue 9 ●●●●● patch | view | raw | blame | history
src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue 11 ●●●●● patch | view | raw | blame | history
src/views/job/components/SearchBox.vue
@@ -57,9 +57,21 @@
            </div>
          </div>
        </el-form-item>
        <div class="more" v-if="isExpand" @click="toggleExpand">收起</div>
        <div class="more" v-else @click="toggleExpand">更多</div>
        <div class="search-btn" :style="{ bottom: isExpand ? '5px' : '-3px' }">
          <div class="btn clear" @click="handleReset">
            <img src="@/assets/images/task/clear.png" />重置
          </div>
          <div class="btn search" @click="handleSearch">
            <img src="@/assets/images/task/search.png" />搜索
          </div>
          <!-- <div class="btn add" @click="addTask"><img src="@/assets/images/task/add.png"/>新增</div> -->
        </div>
        <el-form-item label="任务算法:" v-if="isExpand" class="taskAlgorithm">
          <TaskAlgorithmBusiness
            :setWidth="222"
          ref="algorithmRef"
            :setWidth="160"
            :showAlgorithm="true"
            @algorithmChange="algorithmChange"
          />
@@ -108,17 +120,6 @@
            <el-option label="临时任务" :value="0" />
          </el-select>
        </el-form-item>
        <div class="more" v-if="isExpand" @click="toggleExpand">收起</div>
        <div class="more" v-else @click="toggleExpand">更多</div>
        <div class="search-btn" :style="{ bottom: isExpand ? '5px' : '-3px' }">
          <div class="btn search" @click="handleSearch">
            <img src="@/assets/images/task/search.png" />搜索
          </div>
          <div class="btn clear" @click="handleReset">
            <img src="@/assets/images/task/clear.png" />清空
          </div>
          <!-- <div class="btn add" @click="addTask"><img src="@/assets/images/task/add.png"/>新增</div> -->
        </div>
      </div>
    </el-form>
  </div>
@@ -136,6 +137,8 @@
const store = useStore();
const userAreaCode = computed(() => store.getters.userInfo.detail.areaCode);
const selectedAreaCode = computed(() => store.state.user.selectedAreaCode);
const algorithmRef = ref(null)
const isExpand = ref(false);
const toggleExpand = () => {
  isExpand.value = !isExpand.value;
@@ -282,6 +285,8 @@
  searchForm.date_enum = 'TODAY';
  searchForm.area_code = userAreaCode.value;
  checked.value = 'today';
  signDevice_sn.value = ''
    algorithmRef.value?.clear()
  handleNodeClick({ id: userAreaCode.value });
  handleSearch();
};
@@ -360,7 +365,7 @@
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 12px; // 设置行间距和列间距
    gap: 20px 15px; // 设置行间距和列间距
    .more {
      cursor: pointer;
@@ -369,16 +374,17 @@
      color: #1c5cff;
      line-height: 32px;
      font-size: 16px;
      margin: 0 28px;
    }
    .search-btn {
      position: absolute;
      right: 0;
      // position: absolute;
      // right: 0;
      display: flex;
      justify-content: space-between;
      cursor: pointer;
      font-size: 14px;
      font-size: 14px;
      .btn {
        width: 80px;
        height: 32px;
@@ -387,6 +393,7 @@
        display: flex;
        justify-content: center;
        align-items: center;
        // margin-left: px;
        img {
          width: 14px;
          height: 14px;
src/views/job/components/TaskAlgorithmBusiness.vue
@@ -77,6 +77,15 @@
    emit('businessChange', value)
}
const clear = () => {
    ai_types.value = [] // 清空算法选择
    handleAlgorithmChange(ai_types.value)
}
defineExpose({
    clear,
})
onMounted(() => {
    requestDictionary()
})
src/views/job/components/TaskIntermediateContent/TaskIntermediateContent.vue
@@ -17,6 +17,7 @@
                <el-table-column prop="ai_type_str" label="关联算法" show-overflow-tooltip align="center" />
                <el-table-column label="任务状态" align="center">
                    <template #default="scope">
                        <div class="base_f_c_c">
                        <span :style="{
                            color:
                                scope.row.status === 1
@@ -33,6 +34,16 @@
                        }">
                            {{ scope.row.status ? getStatusText(scope.row.status) : '' }}
                        </span>
                        <el-tooltip
                                class="item"
                                effect="dark"
                                :content="scope.row.reason"
                                placement="top"
                                popper-class="reasonNotFly ztzf-tooltip-box1"
                            >
                                <el-icon v-if="scope.row.status === 5 && scope.row.reason" color="#FF4848"><QuestionFilled /></el-icon>
                            </el-tooltip>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column prop="is_circle_job" label="任务类型" align="center">