<template>
  <view>
	<view v-if="datalist.length>0">
		<!-- 消息通知 -->
		<block v-if="type==1">
			<!--  -->
			<view class="newslist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.zxNoticeId)">
				<view class="newsl">
					<image :src="ntyaimg" class="imga" ></image>
					<!-- <image :src="ntybimg" class="imgb" v-if="ite.type==1"></image>
					<image :src="ntycimg" class="imgc" v-if="ite.type==2"></image>
					<image :src="ntydimg" class="imgd" v-if="ite.type==3"></image> -->
				</view>
				<view class="newsr">
					<view class="flexc over mb8">
						<view class="tit over">{{ite.noticeTitle}}</view>
						<view class="time">{{ite.issuerTime}}</view>
					</view>
					<view class="txt overtwo"><rich-text :nodes="ite.noticeContent" v-if="ite.noticeContent"></rich-text></view>
					<!-- <view class="overtwo txt">{{ite.noticeContent}}</view> -->
				</view>
			</view>
		</block>
		<view class="shax" v-if="wtdt">{{wtdt}}</view>
	</view>
	<block v-else>
		<no-data></no-data>
	</block>
  </view>
</template>

<script>
	import { selectDictValue } from '@/utils/common.js';
	import noData from "@/components/nodata/nodata.vue"
  export default {
	props:{
		datalist: {
			type: Array,
			default () {
				return []
			}
		},
		wtdt:{
			type: String,
			default () {
				return ''
			}
		},
		type:{
			type: [String,Number],
			default () {
				return ''
			}
		},
	},
	components:{
		noData
	},
	data(){
		return{
			ntyaimg:require("@/work/static/images/ntya.png"),
			ntybimg:require("@/work/static/images/ntyb.png"),
			ntycimg:require("@/work/static/images/ntyc.png"),
			ntydimg:require("@/work/static/images/ntyd.png"),
		}
	},
	onLoad: function() {
	},
	methods:{
		getDetail(e){
			this.$emit('getDetail',e)
		},
		getTuiFn(txt){
			var obj={
				type:txt,
				id:1,
			}
			this.$emit('getTuiFn',obj)
		},
		typeFn(data){
			if(data){
				var newArr=[]
				var astr=data.split('-')
				astr.forEach(ite=>{
					var a=ite.substring(0,5);
					newArr.push(a)
				})
				return newArr.join('-')
			}else{
				return ''
			}
		},
	},
	
  }
</script>

<style lang="scss" scoped>
.newslist{padding: 0rpx 24rpx;display: flex;align-items: center;
	.newsl{width: 86rpx;height: 86rpx;margin-right:14rpx;flex: 0 0 auto;display: flex;align-items: center;justify-content: center;background: rgba(29, 100, 226, 0.1);border-radius: 50%;
		.imga{width: 36rpx;height: 32rpx;}
		.imgb{width: 30rpx;height: 30rpx;}
		.imgc{width: 32rpx;height: 32rpx;}
		.imgd{width: 26rpx;height: 32rpx;}
	}
	.newsr{border-bottom: 2rpx solid #C1C1C1;flex:1;overflow: hidden;padding: 36rpx 2rpx 32rpx 8rpx;
		.tit{font-weight: bold;font-size: 30rpx;color: #222327;flex: 1;}
		.time{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
		.txt{font-weight: 500;font-size: 24rpx;color: #A0A0A0;}
	}
}

</style>
