<template>
	<view class="page">
		<view class="head-search">
			<u-search bg-color="#fff" placeholder="请输入关键词" v-model="query.keyword" :show-action="false" @search="search"></u-search>
			<u-button type="success" @click="search">搜索</u-button>
		</view>
		<view class="screen-list">
			<view class="list" @click="show = true">
				<text>问卷类型</text>
				<image  :src="$imgUrl('/down.png')"></image>
				<u-select v-model="show" :list="areList" @confirm="(v) => {queryChange('type', v)}"></u-select>
			</view>
			<view class="list" @click="setList(1)">
				<text>最新发布</text>
				<image :src="$imgUrl('/down.png')"></image>
			</view>
		</view>
		
		<view class="list-scorll">
			<view class='listbox' v-for="(item,index) in tableData">
				 <view class="img">
					 <image :src="$imgUrl('/img/2.jpg')"></image>
				 </view>
				 <view class="info">
					 <view class="title" >这里有标题这里有标题这里有...</view>
					 <view class="info-item">填写时间：<span>{{item.tTime}}分钟</span></view>
					 <view class="info-item">截止时间：<span>{{item.jTime}}</span></view>
					 <view class="info-item">问卷类型：<span>{{item.leiXing}}</span></view>
				 </view>
			</view>
		</view>
		<view style="height: 120rpx;"></view>
		<view class="page-footer">
			<u-button type="success" @click="createWen">创建问卷</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				areList: [
					{value: '武侯区', label: '武侯区'},
					{value: '锦江区', label: '锦江区'},
					{value: '青羊区', label: '青羊区'},
					{value: '金牛区', label: '金牛区'},
					{value: '双流区', label: '双流区'},
					{value: '郫都区', label: '郫都区'},
					{value: '龙泉驿区', label: '龙泉驿区'},
					{value: '温江区', label: '温江区'},
				], // 区域列表
				query: {
					type: '',
					keyword: '',
				},
				tableData:[
					{	
						Image:'',
						title:'对于物业管理服务，您满意度如何？',
						tTime:'15',
						jTime:'2024-10-10',
						leiXing:'物业满意度'
				},
				{		
						Image:'',
						title:'您是否认为公共设施设备维护及时有效？',
						tTime:'10',
						jTime:'2024-10-9',
						leiXing:'安保服务'
				}
				]
			};
		},
		methods:{
			queryChange(key, val) {
				this.query[`${key}`] = val[0].value;
				this.search();
			},
			search() {},
			createWen(){
				uni.navigateTo({
					url: '/pages/createQuestionnaire/createQuestionnaire'
				})
			}
		}
	}
</script>

<style scoped lang="scss">
@import 'questionnaire.scss';
</style>
