forked from drone/command-center-dashboard

chenyao
2025-03-31 295eb3cc87aaa5176d64a4ef985cdad0bfefae9a
src/views/Home/components/HomeLeft/OverviewNext.vue
@@ -32,16 +32,17 @@
          <img width="13" height="15" src="@/assets/images/home/homeLeft/table-icon.png" alt="" />
          {{ item.name }}
        </div>
        <div class="status">{{ item.status }}</div>
        <div class="status" @click="signMachineNestClick">{{ item.status }}</div>
      </div>
    </div>
  </div>
</template>
<script setup>
import { pxToRem } from '@/utils/rem';
import { Search } from '@element-plus/icons-vue';
import CommonTitle from '@/components/CommonTitle.vue';
import { getDeviceInfoNum } from '@/api/home/machineNest.js'
import { useStore } from 'vuex';
const searchText = ref('')
const list = ref([
  { name: '执行中', value: 89, color: '#FFA768' },
  { name: '在线', value: 100, color: '#8EFFAC' },
@@ -56,9 +57,28 @@
  { name: '小兰工业园3号', status: '预计执行' },
]);
// 获取机巢列表
const getList = () => {
  getDeviceInfoNum().then((res) => {
    console.log(res);
  });
}
const store = useStore();
// 单个机巢详情
const signMachineNestClick = () => {
  store.commit('setSingleUavHome', {
    id: '123'
  });
}
const detailsFun = () => {
  console.log('details');
};
onMounted(() => {
  getList();
});
</script>
<style scoped lang="scss">
.overview-next {
@@ -75,6 +95,7 @@
  );
  border-radius: 0px 0px 0px 0px;
  opacity: 0.85;
  margin-bottom: 10px;
  .next-num {
    width: 358px;
    height: 92px;
@@ -163,6 +184,7 @@
      }
      .status {
        color: #6fc3ff;
        cursor: pointer;
      }
      .atcive {
        color: #04f020;