forked from drone/command-center-dashboard

罗广辉
2025-04-07 da2a4e58ecc7c5da0a3ec726708a16c21e7f60e3
src/views/TaskManage/SearchBox.vue
@@ -21,6 +21,7 @@
          <el-form-item>
            <el-button type="primary" @click="handleSearch">查询</el-button>
            <el-button @click="handleReset">重置</el-button>
            <el-button @click="addTask">新增任务</el-button>
            <el-button type="text" @click="toggleExpand">
              {{ isExpand ? '收起' : '展开' }}
              <el-icon class="el-icon--right">
@@ -126,6 +127,12 @@
  handleSearch();
};
// 新增任务
const addTask = () => {
  // 跳转新增任务页面
  window.open('/#/task/add');
};
let taskAlgorithm = ref([]);
let taskBusiness = ref([]);
@@ -156,27 +163,6 @@
// 机巢
let machineData = ref([]);
// 处理部门数据为树形结构
const handleDeptData = (data) => {
  deptTreeData.value = []; // 初始化数组
  data.forEach(item => {
    let treeNode = {
      id: item.area_code,
      name: item.area_name,
      children: []
    };
    // 处理设备子节点
    if (item.devices && item.devices.length > 0) {
      item.devices.forEach(device => {
        treeNode.children.push({
          id: device.device_sn,
          name: device.nickname
        });
      });
    }
    deptTreeData.value.push(treeNode);
  });
};
// 部门下得机巢
const requestDockInfo = () => {
  getDockInfo().then((res) => {
@@ -211,7 +197,7 @@
  width: calc(100% - 400px - 400px - 100px);
  height: 60px;
  background: rgba(31, 62, 122, 0.95);
  padding: 10px 20px;
  // padding: 10px 20px;
  transition: all 0.3s;
  &.is-expand {
    height: auto;