| | |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-radio-group |
| | | v-model="searchForm.radio" |
| | | size="small" |
| | | @input="changeRadio" |
| | | > |
| | | <el-radio-button label="0">当天</el-radio-button> |
| | | <el-radio-button label="1">近7天</el-radio-button> |
| | | <el-radio-button label="2">近30天</el-radio-button> |
| | | </el-radio-group> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { timeForMat } from '@/utils/util' |
| | | export default { |
| | | name: 'Retention', |
| | | extends: BaseTable, |
| | |
| | | type: '', |
| | | keyWords: '', |
| | | startTime: '', |
| | | endTime: '' |
| | | endTime: '', |
| | | radio: 0 |
| | | }, |
| | | time: [] |
| | | } |
| | |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.changeRadio('0') |
| | | }, |
| | | methods: { |
| | | changeRadio (e) { |
| | | if (e === '0') { |
| | | this.searchForm.startTime = timeForMat(0)[0] |
| | | this.searchForm.endTime = timeForMat(0)[1] |
| | | this.time = timeForMat(0) |
| | | } else if (e === '1') { |
| | | this.searchForm.startTime = timeForMat(6)[0] |
| | | this.searchForm.endTime = timeForMat(6)[1] |
| | | this.time = timeForMat(6) |
| | | } else if (e === '2') { |
| | | this.searchForm.startTime = timeForMat(29)[0] |
| | | this.searchForm.endTime = timeForMat(29)[1] |
| | | this.time = timeForMat(29) |
| | | } |
| | | this.search() |
| | | }, |
| | | reset() { |
| | | this.$refs.searchForm.resetFields() |
| | | this.searchForm.startTime = '' |
| | | this.searchForm.radio = '0' |
| | | this.searchForm.endTime = '' |
| | | this.time = [] |
| | | this.search() |
| | |
| | | seleTime(e) { |
| | | this.searchForm.startTime = e[0] |
| | | this.searchForm.endTime = e[1] |
| | | this.searchForm.radio = null |
| | | } |
| | | } |
| | | } |