|  | @@ -5,7 +5,7 @@
 | 
	
		
			
				|  |  |        <div>
 | 
	
		
			
				|  |  |          <van-notice-bar
 | 
	
		
			
				|  |  |            ref="NoticeBar"
 | 
	
		
			
				|  |  | -          v-if="lists.length > 0"
 | 
	
		
			
				|  |  | +          v-if="showBar && lists.length > 0"
 | 
	
		
			
				|  |  |            mode="closeable"
 | 
	
		
			
				|  |  |            :speed="50"
 | 
	
		
			
				|  |  |            :text="itemInfo.alarmTitle"
 | 
	
	
		
			
				|  | @@ -13,10 +13,14 @@
 | 
	
		
			
				|  |  |            background="#f5f5f5"
 | 
	
		
			
				|  |  |            :scrollable="true"
 | 
	
		
			
				|  |  |            @click="clickHandler(itemInfo)"
 | 
	
		
			
				|  |  | +          @close.stop="closeNotice"
 | 
	
		
			
				|  |  |            left-icon="bulb-o">
 | 
	
		
			
				|  |  | -<!--            <span v-if="itemInfo" :style="{color:color,textShadow:'0 0 1px #666'}">-->
 | 
	
		
			
				|  |  | -<!--             {{itemInfo.alarmTitle}}-->
 | 
	
		
			
				|  |  | -<!--            </span>-->
 | 
	
		
			
				|  |  | +          <template #default>
 | 
	
		
			
				|  |  | +            <span v-if="itemInfo" :style="{color:color}">
 | 
	
		
			
				|  |  | +             {{itemInfo.alarmTitle}}
 | 
	
		
			
				|  |  | +            </span>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  <!--          <van-swipe-->
 | 
	
		
			
				|  |  |  <!--            @change="changeColor"-->
 | 
	
		
			
				|  |  |  <!--            vertical-->
 | 
	
	
		
			
				|  | @@ -50,7 +54,6 @@
 | 
	
		
			
				|  |  |  <script >
 | 
	
		
			
				|  |  |  import { mapGetters } from 'vuex'
 | 
	
		
			
				|  |  |  import { getTheAreaWeather } from '@/api/public'
 | 
	
		
			
				|  |  | -import request from "@/utils/request";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    props:{
 | 
	
		
			
				|  |  |      showNotice:{
 | 
	
	
		
			
				|  | @@ -66,20 +69,26 @@ export default {
 | 
	
		
			
				|  |  |        active: this.defaultActive,
 | 
	
		
			
				|  |  |        color: '#ecf9ff',
 | 
	
		
			
				|  |  |        background: null,
 | 
	
		
			
				|  |  | -      noticeIcon:require('@/assets/img/icon/error.png'),
 | 
	
		
			
				|  |  | +      //noticeIcon:require('@/assets/img/icon/error.png'),
 | 
	
		
			
				|  |  |        itemInfo: null,
 | 
	
		
			
				|  |  | -      timer:8000,
 | 
	
		
			
				|  |  | +      timer:10000,
 | 
	
		
			
				|  |  |        timeOut:null,
 | 
	
		
			
				|  |  |        index:0,
 | 
	
		
			
				|  |  | +      showBar:true,
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    mounted() {
 | 
	
		
			
				|  |  | -    this.getList();
 | 
	
		
			
				|  |  | +    setTimeout(()=>{
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  | +    },1000)
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    computed: {
 | 
	
		
			
				|  |  |      ...mapGetters(['orgId']),
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +    closeNotice(){
 | 
	
		
			
				|  |  | +      this.showBar = false;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      //获取天气数据
 | 
	
		
			
				|  |  |      getList() {
 | 
	
		
			
				|  |  |        if(!this.orgId)return [];
 | 
	
	
		
			
				|  | @@ -168,7 +177,7 @@ export default {
 | 
	
		
			
				|  |  |            //this.color = '#fff';
 | 
	
		
			
				|  |  |            break;
 | 
	
		
			
				|  |  |          case '黄色':
 | 
	
		
			
				|  |  | -          this.color = '#FBEE20';
 | 
	
		
			
				|  |  | +          this.color = '#c4b403';
 | 
	
		
			
				|  |  |            this.background = '#f5f5f5';
 | 
	
		
			
				|  |  |            //this.background = 'rgba(251,238,32,0.8)';
 | 
	
		
			
				|  |  |            //this.color = '#fdb0b1';
 | 
	
	
		
			
				|  | @@ -208,11 +217,17 @@ export default {
 | 
	
		
			
				|  |  |    height: 30px;
 | 
	
		
			
				|  |  |    line-height: 30px;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -.van-swipe-item{
 | 
	
		
			
				|  |  | -  -text-shadow: 0 0 2px #333;
 | 
	
		
			
				|  |  | +//.van-swipe-item{
 | 
	
		
			
				|  |  | +//  -text-shadow: 0 0 2px #333;
 | 
	
		
			
				|  |  | +//}
 | 
	
		
			
				|  |  | +//.van-notice-bar__content{
 | 
	
		
			
				|  |  | +//  -text-shadow: 0 0 2px #333;
 | 
	
		
			
				|  |  | +//}
 | 
	
		
			
				|  |  | +.van-notice-bar__left-icon{
 | 
	
		
			
				|  |  | +  font-size: 40px;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -.van-notice-bar__content{
 | 
	
		
			
				|  |  | -  text-shadow: 0 0 2px #333;
 | 
	
		
			
				|  |  | +.van-notice-bar__right-icon{
 | 
	
		
			
				|  |  | +  color:#ccc;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  </style>
 | 
	
		
			
				|  |  |  
 |