无人机管理后台前端(已迁走)
张含笑
2025-05-09 5b33c40610d02e045ee2f926e34dc5b7ae25d4eb
src/views/wel/components/statistics.vue
@@ -9,7 +9,7 @@
        <img src="/src/assets/images/workbench/st2.png" alt="" />
      </div>
    </div>
    <div class="grid-container1" v-if="permission?.device_statistics_six">
    <div class="grid-container1">
      <div v-for="(item, index) in Object.keys(newtitleData)" :key="index" class="device-card">
        <div class="device-title">
          <img :src="test[item].img" :alt="newtitleData[item].name" />
@@ -29,30 +29,6 @@
            }"></span>
            <span class="label">{{ getStatusLabel(test[item]?.name, statusIndex) }}</span>
            <span class="count">{{ status }} {{ test[item]?.name === '无人机' ? '架' : '个' }}</span>
          </div>
        </div>
      </div>
    </div>
    <div class="grid-container" v-if="permission?.device_statistics_four">
      <div v-for="(item, index) in Object.keys(newtitleData)" :key="index" class="device-card">
        <div class="device-title">
          <img :src="test[item].img" :alt="newtitleData[item].name" />
          <div class="itemcenter">
            <div>{{ test[item]?.name || '--' }}</div>
            <span class="shu">{{ newtitleData[item].total_num }}</span>
            <span>个</span>
          </div>
          <div class="status-list">
            <div v-for="(status, statusIndex) in newtitleData[item].status_map" :key="statusIndex" class="status-item"
              :class="getStatusStyle(test[item]?.name, statusIndex)"
              :style="{ color: getStatusColor(test[item]?.name, statusIndex) }">
              <span class="indicator" :style="{
                backgroundColor: getStatusBackground(test[item]?.name, statusIndex),
                color: getStatusColor(test[item]?.name, statusIndex),
              }"></span>
              <span class="label">{{ getStatusLabel(test[item]?.name, statusIndex) }}</span>
              <span class="count">{{ status }} {{ test[item]?.name === '无人机' ? '架' : '个' }}</span>
            </div>
          </div>
        </div>
      </div>
@@ -222,6 +198,12 @@
}
const getStaticsList = () => {
  getStatics(userInfo.value.detail.areaCode,).then(res => {
  console.log(permission, 111)
    if (permission.value?.device_statistics_six) {
      newtitleData.value = res.data.data
      return
    }
    for (let key in res.data.data) {
      if (permission.value?.device_statistics_four && (key === 'flow_type_list' ||
        key === 'insure_list')) continue