| | |
| | | <TableLayout :permissions="['business:ywpatrolscheme:query']"> |
| | | <!-- 搜索表单 --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="开始日期" prop="selDate"> |
| | | <el-date-picker type="daterange" v-model="searchForm.selDate" @change="changeSelDate" clearable value-format="yyyy-MM-dd" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="结束日期" prop="selDateSec"> |
| | | <el-date-picker type="daterange" v-model="searchForm.selDateSec" @change="changeSelDateSec" clearable value-format="yyyy-MM-dd" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="计划名称" prop="title"> |
| | | <el-input v-model="searchForm.title" placeholder="请输入计划名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="计划日期" prop="selDate"> |
| | | <el-date-picker type="daterange" v-model="searchForm.selDate" clearable value-format="yyyy-MM-dd" |
| | | @change="changeDate" /> |
| | | </el-form-item> |
| | | |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | |
| | | return { |
| | | // 搜索 |
| | | searchForm: { |
| | | title: '' |
| | | title: '', |
| | | selDate:[], |
| | | selDateSec:[] |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.search() |
| | | }) |
| | | }, |
| | | changeDate(e) { |
| | | if (e && e.length > 0) { |
| | | this.$set(this.searchForm, 'startDate', e[0]) |
| | | this.$set(this.searchForm, 'endDate', e[1]) |
| | | } else { |
| | | this.$set(this.searchForm, 'startDate', '') |
| | | this.$set(this.searchForm, 'endDate', '') |
| | | } |
| | | |
| | | }, |
| | | reset() { |
| | | this.searchForm = {} |
| | | this.search() |
| | |
| | | this.$refs.operaYwPatrolSchemeWindow.initData() |
| | | |
| | | }, |
| | | changeSelDate(e) { |
| | | if (e && e.length > 0) { |
| | | this.$set(this.searchForm, 'startDate', e[0] ) |
| | | this.$set(this.searchForm, 'endDate', e[1] ) |
| | | } else { |
| | | this.$set(this.searchForm, 'startDate', '') |
| | | this.$set(this.searchForm, 'endDate', '') |
| | | } |
| | | }, |
| | | changeSelDateSec(e) { |
| | | if (e && e.length > 0) { |
| | | this.$set(this.searchForm, 'startDateSec', e[0] ) |
| | | this.$set(this.searchForm, 'endDateSec', e[1] ) |
| | | } else { |
| | | this.$set(this.searchForm, 'startDateSec', '') |
| | | this.$set(this.searchForm, 'endDateSec', '') |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |