forked from drone/command-center-dashboard

chenyao
2025-03-28 55dc742fb4ee17be13ce57bc78cf3eee9ee90f9f
feat: 修改格式化样式
3 files modified
151 ■■■■■ changed files
src/views/Home/components/HomeLeft/HomeLeft.vue 12 ●●●●● patch | view | raw | blame | history
src/views/Home/components/HomeLeft/InspectionRaskDetails.vue 102 ●●●● patch | view | raw | blame | history
src/views/Home/components/HomeLeft/OverviewNext.vue 37 ●●●● patch | view | raw | blame | history
src/views/Home/components/HomeLeft/HomeLeft.vue
@@ -5,7 +5,7 @@
            <div class="time">2025.03.04 15:30:00</div>
            <div class="line"></div>
            <div class="weather">
                <img src="@/assets/images/tq.png" alt="">
        <img src="@/assets/images/tq.png" alt="" />
                <span class="tq">阴天</span>
                <span class="qk">适合飞行</span>
            </div>
@@ -20,15 +20,13 @@
<script setup>
import OverviewNext from './OverviewNext.vue';
import InspectionRaskDetails from './InspectionRaskDetails.vue';
</script>
<style scoped lang="scss">
.home-left {
    position: absolute;
    top: 88px;
    color: #E7F5FF;
  color: #e7f5ff;
    .time-weather {
        margin-left: 45px;
        width: 310px;
@@ -39,7 +37,7 @@
        justify-content: space-between;
        align-items: center;
        .line {
            border: 1px solid #FFFFFF;
      border: 1px solid #ffffff;
            height: 10px;
            opacity: 0.5;
        }
@@ -50,11 +48,11 @@
            }
            .tq {
                margin: 0 5px;
                color: #E7F5FF;
        color: #e7f5ff;
            }
            .qk {
                margin-left: 5px;
                color: #04F043;
        color: #04f043;
           }
        }
    }
src/views/Home/components/HomeLeft/InspectionRaskDetails.vue
@@ -1,6 +1,11 @@
<!-- 巡检任务详情 -->
<template>
    <common-title title="巡检任务情况" style="margin-left: 14px;" @details="detailsFun"></common-title>
  <common-title
    title="巡检任务情况"
    :style="{ marginLeft: pxToRem(14) }"
    @details="detailsFun"
    >
</common-title>
    <div class="inspection-rask-details">
        <div class="inspection-num">
            <div class="total">
@@ -21,6 +26,7 @@
<script setup>
import * as echarts from 'echarts';
import { pxToRem } from '@/utils/rem';
import CommonTitle from '@/components/CommonTitle.vue';
import CommonDateTime from '@/components/CommonDateTime.vue';
@@ -38,7 +44,6 @@
const chartRef = ref(null);
onMounted(() => {
    const chart = echarts.init(chartRef.value);
    const option = {
@@ -47,7 +52,7 @@
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
      containLabel: true,
        },
        tooltip: {
            trigger: 'axis',
@@ -55,59 +60,91 @@
            borderColor: '#0070FF',
            borderWidth: 1,
            textStyle: {
                color: '#fff'
        color: '#fff',
            },
            formatter: '{b}日: {c}次'
      formatter: '{b}日: {c}次',
        },
        xAxis: {
            type: 'category',
            data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
                   '11', '12', '13', '14', '15', '16', '17', '18', '19',
                   '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30'],
      data: [
        '1',
        '2',
        '3',
        '4',
        '5',
        '6',
        '7',
        '8',
        '9',
        '10',
        '11',
        '12',
        '13',
        '14',
        '15',
        '16',
        '17',
        '18',
        '19',
        '20',
        '21',
        '22',
        '23',
        '24',
        '25',
        '26',
        '27',
        '28',
        '29',
        '30',
      ],
            axisLine: {
                show: false  // 隐藏轴线
        show: false, // 隐藏轴线
            },
            axisTick: {
                show: true,
                length: 2,
                lineStyle: {
                    color: '#ffffff'
                }
          color: '#ffffff',
        },
            },
            axisLabel: {
                color: '#ffffff',
                margin: 8
            }
        margin: 8,
      },
        },
        yAxis: {
            type: 'value',
            axisLine: {
                lineStyle: {
                    color: '#ffffff'
                }
          color: '#ffffff',
        },
            },
            axisLabel: {
                color: '#ffffff'
        color: '#ffffff',
            },
            splitLine: {
                lineStyle: {
                    color: 'rgba(255, 255, 255, 0.1)'
                }
            }
          color: 'rgba(255, 255, 255, 0.1)',
        },
        series: [{
            data: [10, 15, 8, 20, 12, 18, 15, 22, 16, 19,
                   14, 17, 21, 13, 16, 18, 15, 20, 17, 22,
                   19, 16, 14, 18, 21, 15, 17, 20, 16, 18],
      },
    },
    series: [
      {
        data: [
          10, 15, 8, 20, 12, 18, 15, 22, 16, 19, 14, 17, 21, 13, 16, 18, 15, 20, 17, 22, 19, 16, 14,
          18, 21, 15, 17, 20, 16, 18,
        ],
            type: 'bar',
            barWidth: '60%',
            itemStyle: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                    { offset: 0, color: '#1EE7E7' },
                    { offset: 1, color: 'rgba(0, 112, 255, 0.1)' }
                ])
            }
        }]
            { offset: 1, color: 'rgba(0, 112, 255, 0.1)' },
          ]),
        },
      },
    ],
    };
    
    chart.setOption(option);
@@ -125,7 +162,12 @@
    padding: 16px 16px;
    width: 390px;
    height: 414px;
    background: linear-gradient( 270deg, rgba(31,62,122,0) 0%, rgba(31,62,122,0.35) 21%, #1F3E7A 100%);
  background: linear-gradient(
    270deg,
    rgba(31, 62, 122, 0) 0%,
    rgba(31, 62, 122, 0.35) 21%,
    #1f3e7a 100%
  );
    border-radius: 0px 0px 0px 0px;
    opacity: 0.85;
    .inspection-num {
@@ -139,7 +181,7 @@
            top: 44px;
            font-weight: 500;
            font-size: 14px;
            color: #FFFFFF;
      color: #ffffff;
            font-family: Source Han Sans CN, Source Han Sans CN;
            line-height: 19px;
            .value {
@@ -163,7 +205,7 @@
                font-family: Source Han Sans CN, Source Han Sans CN;
                font-weight: 400;
                font-size: 14px;
                color: #FFFFFF;
        color: #ffffff;
            }
            .value {
                font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
src/views/Home/components/HomeLeft/OverviewNext.vue
@@ -1,6 +1,6 @@
<!-- 机巢概况 -->
<template>
    <common-title style="margin-left: 14px;" @details="detailsFun"></common-title>
  <common-title :style="{ marginLeft: pxToRem(14) }" @details="detailsFun"></common-title>
    <div class="overview-next">
        <div class="next-num">
            <div class="total">
@@ -15,10 +15,7 @@
            </div>
        </div>
        <div class="search-box">
            <el-input
                v-model="searchText"
                placeholder="请输入搜索内容"
                class="input-with-select">
      <el-input v-model="searchText" placeholder="请输入搜索内容" class="input-with-select">
                <template #append>
                    <el-button :icon="Search" />
                </template>
@@ -31,8 +28,8 @@
            </div>
            <div class="table-item" v-for="item in tableList">
                <div class="name">
                    <img class="yjzx-img" width="10" height="10" src="@/assets/images/table-zx.png" alt="">
                    <img width="13" height="15"  src="@/assets/images/table-icon.png" alt="">
          <img class="yjzx-img" width="10" height="10" src="@/assets/images/table-zx.png" alt="" />
          <img width="13" height="15" src="@/assets/images/table-icon.png" alt="" />
                    {{item.name}}
                </div>
                <div class="status">{{ item.status }}</div>
@@ -41,6 +38,7 @@
    </div>
</template>
<script setup>
import { pxToRem } from '@/utils/rem';
import { Search } from '@element-plus/icons-vue';
import CommonTitle from '@/components/CommonTitle.vue';
@@ -69,13 +67,18 @@
    padding: 16px 16px;
    width: 390px;
    height: 414px;
    background: linear-gradient( 270deg, rgba(31,62,122,0) 0%, rgba(31,62,122,0.35) 21%, #1F3E7A 100%);
  background: linear-gradient(
    270deg,
    rgba(31, 62, 122, 0) 0%,
    rgba(31, 62, 122, 0.35) 21%,
    #1f3e7a 100%
  );
    border-radius: 0px 0px 0px 0px;
    opacity: 0.85;
    .next-num {
        width: 358px;
        height: 92px;
        background: url(@/assets/images/next-num.png) no-repeat center / 100% 100%;;
    background: url(@/assets/images/next-num.png) no-repeat center / 100% 100%;
        position: relative;
        .total {
            position: absolute;
@@ -83,7 +86,7 @@
            top: 28px;
            font-weight: 500;
            font-size: 14px;
            color: #FFFFFF;
      color: #ffffff;
            font-family: Source Han Sans CN, Source Han Sans CN;
            line-height: 19px;
            .value {
@@ -104,12 +107,11 @@
                font-family: Source Han Sans CN, Source Han Sans CN;
                font-weight: 400;
                font-size: 14px;
                color: #FFFFFF;
        color: #ffffff;
            }
            .value {
                font-weight: 400;
                font-size: 26px;
            }
        }
    }
@@ -119,14 +121,14 @@
        :deep(.el-input__wrapper) {
            background-color: rgba(0, 112, 255, 0.1);
            background: rgba(0,15,34,0.5);
            box-shadow: 0 0 0 1px #0070FF inset;
      box-shadow: 0 0 0 1px #0070ff inset;
        }
        :deep(.el-input-group__append) {
            background: rgba(0,112,255,0.38);
            .el-button {
                background-color: transparent;
                border: 1px solid #0070FF;
        border: 1px solid #0070ff;
                border-left: none;
                color: #fff;
            }
@@ -144,7 +146,8 @@
        margin: 16px;
        font-weight: 500;
        font-size: 16px;
        .table-header, .table-item {
    .table-header,
    .table-item {
            display: flex;
            justify-content: space-between;
            height: 36px;
@@ -159,10 +162,10 @@
                left: 10px;
            }
            .status {
                color: #6FC3FF;
        color: #6fc3ff;
            }
            .atcive {
                color: #04F020;
        color: #04f020;
            }
        }
    }