ZhangXianQiang
2024-05-24 aa05304d221b1883d746e686f390d6f3fba598a7
src/views/home/data-view/index.vue
@@ -8,6 +8,23 @@
    <el-card class="map-wrapper">
      <el-row>
        <el-col :span="5">
          <div class="select-container">
            <div class="select-label">
              数据源
            </div>
            <el-select v-model="selectOption" placeholder="请选择">
              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :offset="17" :span="2">
          <el-button type="primary" @click="toScreen">可视化大屏</el-button>
        </el-col>
      </el-row>
      <el-row :gutter="40" class="data-plane" style="height: 100%;">
        <el-col :xs='24' :md="24" :sm="24" :lg="6" :xl="6" style="height: 100%;">
          <data-icon :activeData="activeData"></data-icon>
@@ -45,8 +62,8 @@
        { id: 1, type: '工单数', num: 523, },
        { id: 2, type: '恢复数', num: 50, },
        { id: 3, type: '待恢复数', num: 523, },
        { id: 4, type: '产生违约事项数', num: 123, },
        { id: 5, type: '产生违约责任书', num: 512323, },
        { id: 4, type: '超期未处理数', num: 123, },
        { id: 5, type: '超期责任数', num: 512323, },
      ],
      iconList: [
        { icon: 'el-icon-tickets', color: '#7868d9' },
@@ -105,7 +122,22 @@
          "data5": 95
        }
      ],
      activeData: {name: '自贡市', data1: 0, data2: 0, data3: 0, data4: 0, data5:0}
      activeData: { name: '自贡市', data1: 0, data2: 0, data3: 0, data4: 0, data5: 0 },
      options: [
        {
          value: 1,
          label: '省厅数据'
        },
        {
          value: 2,
          label: '市局数据'
        },
        {
          value: 3,
          label: '公安部数据'
        },
      ],
      selectOption: 1
    }
  },
  methods: {
@@ -126,6 +158,12 @@
      });
      data.name = '自贡市';
      this.activeData = data;
    },
    toScreen() {
      this.$router.push({
        path: '/screen'
      })
    }
  },
  created() {
@@ -160,6 +198,16 @@
  aspect-ratio: 6/2;
}
.select-container {
  display: flex;
  align-items: center;
  .select-label {
    color: #666;
    margin-right: 20px;
    font-size: 16px;
  }
}
@media screen and (min-width: 1200px) {
  .el-col-md-6 {
    width: 20%;