无人机管理后台前端(已迁走)
chenyao
2025-09-13 8d39492624712fde2ea220bc3ecafb33cdbe9c1b
src/views/algorithmMange/algorithmMange.vue
@@ -2,7 +2,9 @@
  <div class="algorithmMange">
    <div class="search-box">
      <el-form :model="params" inline>
        <el-form-item label="算法名称:">
       <div style="display: flex;justify-content: space-between;">
        <div>
          <el-form-item label="算法名称:">
          <el-input v-model="params.algName" placeholder="请输入算法名称" clearable />
        </el-form-item>
        <el-form-item label="算法类型:">
@@ -10,10 +12,15 @@
            <el-option v-for="item in sfTypes" :key="item.id" :label="item.dictValue" :value="item.dictKey" ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="getList">搜索</el-button>
          <el-button @click="cancelSearch">取消</el-button>
        </el-form-item>
        </div>
        <div>
          <el-form-item  class="btns">
            <el-button type="primary" @click="getList">搜索</el-button>
            <el-button @click="cancelSearch">清空</el-button>
          </el-form-item>
        </div>
       </div>
      </el-form>
    </div>
    <div class="mange-table">
@@ -34,12 +41,12 @@
            <el-tooltip placement="bottom" effect="light" content="AI识别率高于最高准确率时会生成待处理状态的事件">
              <el-icon><QuestionFilled /></el-icon>
            </el-tooltip>
            <span>最低准确率</span>
            <span>最高准确率</span>
          </template>
        </el-table-column>
        <el-table-column prop="event_type" label="事件生成类型" show-overflow-tooltip align="center">
          <template #default="scope">
            {{ scope.row.event_type === 0 ? '常规类' : '紧急类' }}
            {{ scope.row.event_type == 0 ? '常规类' : '紧急类' }}
          </template>
        </el-table-column>
            <el-table-column prop="remark" label="算法描述" show-overflow-tooltip />
@@ -76,7 +83,7 @@
        </tr>
        <tr>
          <td class="label">事件生成类型</td>
          <td class="value">{{ rowView.event_type === 0 ? '常规类' : '紧急类' }}</td>
          <td class="value">{{ rowView.event_type == 0 ? '常规类' : '紧急类' }}</td>
          <td class="label">算法描述</td>
          <td class="value">{{ rowView.remark }}</td>
        </tr>
@@ -121,6 +128,7 @@
<script setup>
import { getAlgorithmManageList, algorithmManageEdit } from '@/api/algorithmMange/algorithmMange';
import { getDictionaryByCode } from '@/api/system/dictbiz';
import { ElMessage } from 'element-plus';
const total = ref(0)
const params = ref({
@@ -195,6 +203,7 @@
    algName: '',
    algTypeCode: '',
  }
  params.value.current = 1
  getList()
}
@@ -218,11 +227,22 @@
  editParams.value = { ...row }
}
function handleSizeChange(val) {
  params.value.size = val
  getList()
}
function handleCurrentChange(val) {
  params.value.current = val
  getList()
}
async function submit(formValidate) {
  if (!formValidate) return
  await formValidate.validate((valid, fields) => {
    if (valid) {
      algorithmManageEdit(editParams.value).then(res => {
        ElMessage.success('保存成功')
        isShowEditView.value = false
        getList()
      })
@@ -248,6 +268,16 @@
    flex-direction: column;
    .search-box {
      height: 40px;
      .btns {
        display: flex;
        justify-content: end;
      }
    }
    :deep(.el-input) {
      .el-input__wrapper {
        width: 200px;
      }
    }
    // 表格
@@ -268,7 +298,7 @@
    }
    :deep(.ztzf-select){
      .el-select__selection {
        min-width: 200px;
        width: 200px;
      }
    }
  }