You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.4 KiB
56 lines
1.4 KiB
2 years ago
|
<template>
|
||
|
<div>
|
||
|
<el-form ref="searchForm" :model="searchForm" inline>
|
||
|
<el-form-item label="区域" prop="area">
|
||
|
<el-select v-model="searchForm.area" filterable placeholder="请选择" clearable size="mini">
|
||
|
<el-option v-for="(dict, index) in areaOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" />
|
||
|
</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: {
|
||
|
areaOptions: {
|
||
|
type: Array,
|
||
|
default: []
|
||
|
}
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
searchForm: {
|
||
|
area: undefined,
|
||
|
month: month
|
||
|
},
|
||
|
}
|
||
|
|
||
|
},
|
||
|
created() {
|
||
|
},
|
||
|
methods: {
|
||
|
resetQuery() {
|
||
|
this.searchForm = {
|
||
|
placeId: undefined,
|
||
|
month: undefined
|
||
|
};
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
</script>
|
||
|
|