<template>
  <view>
	<view v-if="datalist.length>0">
		<!-- 我的提案 -->
		<block v-if="type==1">
			<view class="caselist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.reservatId)">
				<view class="tit overtwo">关于拓展市校合作，助推高质量发展的建议</view>
				<view class="ftxt">
					<text>提案类别</text>
					<view>社会建设类/教育事业</view>
				</view>
				<view class="ftxt">
					<text>提交时间</text>
					<view>2024-02-22 14:12:38</view>
				</view>
				<view class="ftxt">
					<text>提案状态</text>
					<view class="co0b">审核中</view>
				</view>
				<view class="casebtn flexc">
					<view class="ftit">办理状态<text>待反馈</text></view>
					<view class="btn btn2">反馈意见</view>
				</view>
			</view>
		</block>
		<!-- 联名提案 -->
		<block v-if="type==2">
			<view class="caselist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.reservatId)">
				<view class="tit overtwo">关于拓展市校合作，助推高质量发展的建议</view>
				<view class="flex">
					<view class="ftxt w50">
						<text>提案者</text>
						<view>何潇潇</view>
					</view>
					<view class="ftxt w50">
						<text>案号</text>
						<view>222</view>
					</view>
				</view>
				<view class="ftxt">
					<text>提案类别</text>
					<view>社会建设类/教育事业</view>
				</view>
				<view class="ftxt">
					<text>提交时间</text>
					<view>2024-02-22 14:12:38</view>
				</view>
				<view class="ftxt">
					<text>联名状态</text>
					<view class="co0b">办理中</view>
				</view>
				<view class="casebtn flexc">
					<view class="lftit">您的联名提案未反馈</view>
					<!-- <view class="lftit">您的联名提案已反馈，查看<text class="lfdet">反馈详情</text></view> -->
					<view class="btn  btn1">反对</view>
					<view class="btn btn2">同意</view>
					<view class="btn btn3">已同意</view>
				</view>
			</view>
		</block>
		<!-- 推荐优秀 -->
		<block v-if="type==3">
			<view class="caselist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.reservatId)">
				<view class="tit overtwo">关于拓展市校合作，助推高质量发展的建议</view>
				<view class="flex">
					<view class="ftxt w50">
						<text>提案者</text>
						<view>何潇潇</view>
					</view>
					<view class="ftxt w50">
						<text>案号</text>
						<view>222</view>
					</view>
				</view>
				<view class="ftxt">
					<text>推荐截止</text>
					<view>2024-02-22</view>
				</view>
				<view class="casebtn flexc">
					<view class="lftit">该提案暂未推荐为优秀</view>
					<!-- <view class="lftit">该提案已推荐为优秀，查看<text class="lfdet">推荐理由</text></view> -->
					<!-- <view class="btn btn2"><image :src="zanimg" class="zanimg"></image>推荐优秀</view> -->
					<view class="btn btn3" @click="getTuiFn('tjyx')"><image :src="nzanimg" class="zanimg"></image>推荐优秀</view>
				</view>
			</view>
		</block>
		<!-- 推荐重点 -->
		<block v-if="type==4">
			<view class="caselist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.reservatId)">
				<view class="tit overtwo">关于拓展市校合作，助推高质量发展的建议</view>
				<view class="flex">
					<view class="ftxt w50">
						<text>提案者</text>
						<view>何潇潇</view>
					</view>
					<view class="ftxt w50">
						<text>案号</text>
						<view>222</view>
					</view>
				</view>
				<view class="ftxt">
					<text>推荐截止</text>
					<view>2024-02-22</view>
				</view>
				<view class="casebtn flexc">
					<view class="lftit">该提案暂未推荐为重点</view>
					<!-- <view class="lftit">该提案已推荐为重点，查看<text class="lfdet">推荐理由</text></view> -->
					<view class="btn btn2"><image :src="start" class="staimg"></image>推荐重点</view>
					<!-- <view class="btn btn3"><image :src="nstart" class="staimg"></image>推荐重点</view> -->
				</view>
			</view>
		</block>
		<!-- 公开提案 -->
		<block v-if="type==5">
			<view class="caselist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.reservatId)">
				<view class="tit overtwo">关于拓展市校合作，助推高质量发展的建议</view>
				<view class="ftxt">
					<text>案号</text>
					<view>222</view>
				</view>
				<view class="ftxt">
					<text>提案类别</text>
					<view>社会建设类/教育事业</view>
				</view>
				<view class="ftxt">
					<text>提交时间</text>
					<view>2024-02-22 14:12:38</view>
				</view>
				<view class="ftxt">
					<text>办理状态</text>
					<view class="co0b">审核中</view>
				</view>
			</view>
		</block>
		<!-- 办理质量评议 -->
		<block v-if="type==6">
			<view class="caselist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.reservatId)">
				<view class="tit overtwo">关于拓展市校合作，助推高质量发展的建议</view>
				<view class="ftxt">
					<text>案号</text>
					<view>222</view>
				</view>
				<view class="ftxt">
					<text>承办单位</text>
					<view>市教育局</view>
				</view>
				<view class="casebtn flexc">
					<view class="lftit">该提案暂未进行质量评议</view>
					<!-- <view class="lftit">该提案已评议，查看<text class="lfdet">评议详情</text></view> -->
					<view class="btn btn2" @click="getTuiFn('zlpy')"><image :src="flower" class="staimg"></image>质量评议</view>
					<!-- <view class="btn btn3"><image :src="nflower" class="staimg"></image>已评议</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{
			start:require("@/work/static/images/start.png"),
			nstart:require("@/work/static/images/nstart.png"),
			zanimg:require("@/work/static/images/zanico.png"),
			nzanimg:require("@/work/static/images/nzanico.png"),
			flower:require("@/work/static/images/flower.png"),
			nflower:require("@/work/static/images/nflower.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>
.caselist{background: #FFFFFF;border-radius: 30rpx;margin-top: 24rpx;padding: 38rpx 24rpx 8rpx;
	.tit{font-weight: bold;font-size: 32rpx;color: #222327;margin-bottom: 42rpx;}
	.ftxt{display: flex;align-items: flex-start;margin-bottom: 32rpx;
		text{font-weight: bold;font-size: 26rpx;color: #CACACA;flex: 0 0 auto;min-width: 104rpx;text-align-last: justify;}
		view{flex: 1;color: #343434;font-size: 26rpx;margin-left: 20rpx;line-height: 34rpx;}
	}
	.casebtn{padding: 24rpx 0;border-top: 2rpx solid #E6E6E6;
		.ftit{font-weight: bold;font-size: 26rpx;color: #CACACA;flex: 1;
			text{color: $com-cd3;margin-left: 20rpx;font-weight:500;min-width: 104rpx;text-align-last: justify;}
		}
		.lftit{font-weight: 500;font-size: 26rpx;color: #666666;flex:1;
			.lfdet{color: $com-cd3;text-decoration: underline;}
		}
		.zanimg{width: 22rpx;height: 20rpx;margin-right: 14rpx;}
		.staimg{width: 24rpx;height: 24rpx;margin-right: 14rpx;}
		.btn{min-width: 118rpx;height: 52rpx;border-radius: 26rpx;font-weight: bold;flex: 0 0 auto;display: flex;align-items: center;
font-size: 26rpx;margin-left: 26rpx;line-height: 52rpx;text-align: center;padding: 0 32rpx;box-sizing: border-box;
		&.btn1{background: #FFEDED;color: #FF4141;}
		&.btn2{background: #E4EEFF;color: #1D64E2;}
		&.btn3{background: #ECECEC;color: #666666;}
		
		}
	}
}

</style>
