161 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Vue
		
	
	
	
			
		
		
	
	
			161 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Vue
		
	
	
	
<template>
 | 
						|
  <div class="alarm-overview">
 | 
						|
    <peak-secondary-title :title="title">
 | 
						|
      <template>
 | 
						|
        <div class="right-tab">
 | 
						|
          <div class="tab-type" v-for="item of tabDataList" :class="activeDateTab === item.value? 'active-tab':''"
 | 
						|
               @click="tabDateChange(item.value)">
 | 
						|
            {{ item.name }}
 | 
						|
          </div>
 | 
						|
        </div>
 | 
						|
      </template>
 | 
						|
    </peak-secondary-title>
 | 
						|
    <div class="_tab">
 | 
						|
      <div class="tab-item" v-for="item of tabList" :class="item.value === activeTab?'active-tab':''"
 | 
						|
           @click="tabChange(item.value)">{{ item.label }}
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
    <div class="alarm-data">
 | 
						|
      <div class="alarm-total" v-if="activeTab === 1">
 | 
						|
        <peak-warning-statistics/>
 | 
						|
      </div>
 | 
						|
      <div class="alarm-details" v-if="activeTab === 2">
 | 
						|
        <peak-latest-warning/>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
  </div>
 | 
						|
</template>
 | 
						|
 | 
						|
<script>
 | 
						|
import PeakSecondaryTitle from "@/components/peak-coal-monitoring/PeakSecondaryTitle";
 | 
						|
import PeakLatestWarning from "@/components/peak-coal-monitoring/PeakLatestWarning";
 | 
						|
import PeakWarningStatistics from "@/components/peak-coal-monitoring/PeakWarningStatistics";
 | 
						|
 | 
						|
export default {
 | 
						|
  name: "AlarmOverview",
 | 
						|
  components: {PeakWarningStatistics, PeakLatestWarning, PeakSecondaryTitle},
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      title: '智能预警概况',
 | 
						|
      tabList: [
 | 
						|
        {
 | 
						|
          label: '智能预警统计',
 | 
						|
          value: 1
 | 
						|
        },
 | 
						|
        {
 | 
						|
          label: '智能预警详情',
 | 
						|
          value: 2
 | 
						|
        }
 | 
						|
      ],
 | 
						|
      activeTab: 1,
 | 
						|
      tabDataList: [
 | 
						|
        {
 | 
						|
          name: '全部',
 | 
						|
          value: '0'
 | 
						|
        },
 | 
						|
        {
 | 
						|
          name: '待审批',
 | 
						|
          value: '1'
 | 
						|
        },
 | 
						|
        {
 | 
						|
          name: '带研判',
 | 
						|
          value: '2'
 | 
						|
        },
 | 
						|
        {
 | 
						|
          name: '已归档',
 | 
						|
          value: '3'
 | 
						|
        }
 | 
						|
      ],
 | 
						|
      activeDateTab:'0',
 | 
						|
    }
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    tabChange(val) {
 | 
						|
      this.activeTab = val
 | 
						|
    },
 | 
						|
    tabDateChange(val) {
 | 
						|
      this.activeDateTab = val
 | 
						|
    },
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 | 
						|
 | 
						|
<style scoped lang="less">
 | 
						|
@import "../../assets/styles/mixin";
 | 
						|
 | 
						|
.alarm-overview {
 | 
						|
  height: 100%;
 | 
						|
  width: 100%;
 | 
						|
  .flex-column;
 | 
						|
 | 
						|
  ._tab {
 | 
						|
    margin-top: 10px;
 | 
						|
    width: 100%;
 | 
						|
    height: 30px;
 | 
						|
    .flex-row;
 | 
						|
 | 
						|
    .tab-item {
 | 
						|
      width: 50%;
 | 
						|
      height: 100%;
 | 
						|
      font-family: MicrosoftYaHei-Bold;
 | 
						|
      font-size: 14px;
 | 
						|
      color: #FFFFFF;
 | 
						|
      letter-spacing: 0;
 | 
						|
      text-align: center;
 | 
						|
      text-shadow: 0 2px 2px rgba(0, 0, 0, 0.50);
 | 
						|
      font-weight: 700;
 | 
						|
      cursor: pointer;
 | 
						|
    }
 | 
						|
 | 
						|
    .active-tab {
 | 
						|
      background: url("~/assets/peakCoalMonitoring/common/tab-active-bg.png") no-repeat;
 | 
						|
      background-size: 100% 100%;
 | 
						|
    }
 | 
						|
  }
 | 
						|
 | 
						|
  .alarm-data {
 | 
						|
    flex: 1;
 | 
						|
    height: 0;
 | 
						|
 | 
						|
    .alarm-total {
 | 
						|
      height: 100%;
 | 
						|
      padding-top: 20px;
 | 
						|
    }
 | 
						|
 | 
						|
    .alarm-details {
 | 
						|
      height: 100%;
 | 
						|
    }
 | 
						|
  }
 | 
						|
 | 
						|
  .right-tab {
 | 
						|
    height: 100%;
 | 
						|
    .flex-row;
 | 
						|
    justify-content: space-between;
 | 
						|
    width: 249px;
 | 
						|
 | 
						|
    .tab-type {
 | 
						|
      margin-bottom: 15px;
 | 
						|
      width: 57px;
 | 
						|
      height: 30px;
 | 
						|
      .bg("~/assets/peakCoalImages/left/pollutant-type-default-bg.png");
 | 
						|
      font-family: MicrosoftYaHei;
 | 
						|
      font-size: 14px;
 | 
						|
      color: rgba(216, 240, 255, 0.50);
 | 
						|
      letter-spacing: 0;
 | 
						|
      text-align: center;
 | 
						|
      line-height: 30px;
 | 
						|
      text-shadow: 0 0 11px #0091FF;
 | 
						|
      font-weight: 400;
 | 
						|
      cursor: pointer;
 | 
						|
    }
 | 
						|
 | 
						|
    .active-tab {
 | 
						|
      .bg("~/assets/peakCoalImages/left/pollutant-type-active-bg.png");
 | 
						|
      color: #D8F0FF;
 | 
						|
      text-shadow: 0 0 33px #0091FF;
 | 
						|
      font-weight: 400;
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</style>
 |