提交
This commit is contained in:
57
src/views/statistic/placeStudent/components/SearchForm.vue
Normal file
57
src/views/statistic/placeStudent/components/SearchForm.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="searchForm" :model="searchForm" inline>
|
||||
<el-form-item label="场地">
|
||||
<el-select v-model="searchForm.placeId" filterable placeholder="请选择" clearable size="mini">
|
||||
<el-option v-for="(dict, index) in placeOptions" :key="index" :label="dict.name" :value="dict.placeId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="月份" prop="month">
|
||||
<el-date-picker v-model="searchForm.month" type="month" placeholder="选择月" value-format="yyyy-MM" format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DMRadio from '@/components/DMRadio';
|
||||
const date = new Date();
|
||||
const month = date.getFullYear() + "-" + (date.getMonth() + 1);
|
||||
export default {
|
||||
components: {
|
||||
DMRadio
|
||||
},
|
||||
props: {
|
||||
placeOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
placeId: undefined,
|
||||
month: month
|
||||
},
|
||||
dateRange: []
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
resetQuery() {
|
||||
this.searchForm = {
|
||||
placeId: undefined,
|
||||
month: undefined
|
||||
};
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user