1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* 学校管理
* $Id: school_list.inc,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @access public
* @package manager.templates
*/
global $school_list;
global $school_count;
global $school_title;
?>
<div id="classSetting">
<div class="list_title">
学校管理
</div>
<br/>
<form id="search_form" action="school_list.php" method="post">
学校名称:<input type="text" value="<?=$school_title?>" name="school_title" class="el-input__inner input_200"/><br/>
<el-button type="primary" @click="search()" class="edit_btn">检索</el-button>
</form>
<br />
<div class="result_list">
<el-table :data="tableData" border>
<el-table-column prop="id" label="编号" ></el-table-column>
<el-table-column prop="title" label="学校名称" width=""></el-table-column>
<el-table-column prop="type" label="学校类型" width=""></el-table-column>
<el-table-column prop="address" 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 ($school_count > 0) {
?>
<!--page begin-->
<?
require_once("page_common.inc");
?>
<!--page end-->
<?
}
?>
<script type="text/javascript">
var list=[];
<?
foreach ($school_list as $school_mst) {
?>
var data={
id:<?=$school_mst->id ?>,
type:'<?=SchoolType::getTitleById($school_mst->school_type)?>',
address:'<?=$school_mst->address?>',
title:'<?=$school_mst->title ?>'
};
list.push(data);
<?
}
?>
new Vue({
el:'#classSetting',
data:{
tableData: list
},
methods:{
handleChange(row) {
console.log(row);
window.location.href='school_edit_input.php?id='+row.id;
},
search(){
$("#search_form").submit();
}
}
})
</script>