<?php
/**
 * 活动审核
 * $Id: event_examine.inc,v 1.1 2020/01/03 11:18:46  Exp $
 * @author lixq
 * @access public
 * @package manager.templates
 */

?>
<div id="classSetting">
	<div class="list_title">
		活动审核
	</div>
	<br/>
	<form id="search_form" action="event_examine.php" method="post">
		发布者:<input type="text" value="<?=$author?>" name="author" class="el-input__inner input_100 m-l"/>&nbsp;&nbsp;
		发布时间:<el-date-picker  v-model="start_time" name="start_time" class="m-l"type="datetime" align="right"  ></el-date-picker> — 
		<el-date-picker  v-model="finish_time" name="finish_time" type="datetime"  align="right"  ></el-date-picker>
		<el-button type="primary" @click="search()" class="edit_btn search_btn">检索</el-button>
		<el-button type="primary" @click="clear()" class="edit_btn search_btn">清空条件</el-button>
	</form>
	<br />
  <div style="background-color:#E6E3E3;height:1px;"></div>
  <br />
  <div class="result_list">
  	<el-table :data="tableData"  border>
  		<el-table-column  prop="title" label="活动标题" width=""></el-table-column>
  		<el-table-column  prop="author" label="发布者" width=""></el-table-column>
  		<el-table-column  prop="leader_contact" label="联系方式" width=""></el-table-column>
  		<el-table-column  prop="registration_date" label="发布时间" width=""></el-table-column>
  		<el-table-column  prop="start_time" label="开始时间" width=""></el-table-column>
  		<el-table-column  prop="finish_time" label="结束时间" width=""></el-table-column>
			<el-table-column  label="操作"  width="100">
			<template slot-scope="scope"  >
				<el-button @click="handleChange(scope.row)" type="text" size="small">审查批阅</el-button>
			</template>
			
  			</el-table-column>
  	</el-table>
  </div>
</div>
<?
if ($volunteer_event_count > 0) {
?>
<!--page begin-->
<?
require_once("page_common.inc");
?>
<!--page end-->
<?
}
?>
<script type="text/javascript">
	var list=[];
	<?
	foreach ($volunteer_event_list as $tmp) {
	?>
		var data={
		    id:<?=$tmp->id ?>,
		    registration_date:'<?=$tmp->registration_date?>',
		    title:'<?=$tmp->title?>',
		    leader_contact:'<?=$tmp->leader_contact?>',
		    start_time:'<?=$tmp->start_time?>',
		    finish_time:'<?=$tmp->finish_time?>',
		    author:'<?=$tmp->author?>'
				    
		};
		list.push(data);
	<?
	}
	?>

	new Vue({
		el:'#classSetting',
		data:{
			tableData: list,
			start_time:'<?=$start_time?>',
			finish_time:'<?=$finish_time?>'
		},
		methods:{
			handleChange(row) {
		  	window.location.href='event_examine_input.php?id='+row.id;
		  },
		  clear(){
		    $("input[name='author']").val("");
    	  this.start_time = "";
    	  this.finish_time = "";
			},
		  search(){
				$("#search_form").submit();
			}
		}
		 
	})
</script>