| | |
| | | <TableLayout :permissions="['business:empower:query']"> |
| | | <!-- 搜索表单 --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="姓名手机号" prop="startTime"> |
| | | <el-input v-model="searchForm.startTime" placeholder="请输入姓名/手机号" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="姓名手机号" prop="keyWords"> |
| | | <el-input v-model="searchForm.keyWords" placeholder="请输入姓名/手机号" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="下发状态" prop="sendStatus"> |
| | | <el-select v-model="searchForm.sendStatus" placeholder="请选择"> |
| | | <el-select v-model="searchForm.sendStatus" placeholder="请选择" @keypress.enter.native="search"> |
| | | <el-option label="待下发" value="0"></el-option> |
| | | <el-option label="已下发" value="1"></el-option> |
| | | <el-option label="已取消" value="2"></el-option> |
| | | <el-option label="下发成功" value="2"></el-option> |
| | | <el-option label="已取消" value="3"></el-option> |
| | | <el-option label="下发失败" value="4"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="公司" prop="sendStatus"> |
| | | <el-select v-model="searchForm.sendStatus" placeholder="请选择公司"> |
| | | <el-form-item label="公司" prop="companyId"> |
| | | <el-select v-model="searchForm.companyId" placeholder="请选择公司" @keypress.enter.native="search"> |
| | | <el-option label="待下发" value="0"></el-option> |
| | | <el-option label="已下发" value="1"></el-option> |
| | | <el-option label="已取消" value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="下发起始时间" prop="startTime"> |
| | | <el-input v-model="searchForm.startTime" placeholder="请输入门禁有效期开始" @keypress.enter.native="search"></el-input> |
| | | <el-date-picker |
| | | @change="seleTime" |
| | | v-model="time" |
| | | @keypress.enter.native="search" |
| | | type="datetimerange" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-radio-group v-model="searchForm.eventType" size="small"> |
| | | <el-radio-button label="当天"></el-radio-button> |
| | | <el-radio-button label="近7天"></el-radio-button> |
| | | <el-radio-button label="近30天"></el-radio-button> |
| | | <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 type="primary" :loading="isWorking.export" v-permissions="['business:member:exportExcel']" @click="exportExcel">导出</el-button>--> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:empower:create', 'business:empower:delete']"> |
| | | <li><el-button type="primary" v-permissions="['business:empower:create']">导出</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:empower:create']">立即下发</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:empower:create']">取消下发</el-button></li> |
| | | <!-- <li><el-button type="primary" v-permissions="['business:empower:create']">立即下发</el-button></li>--> |
| | | <!-- <li><el-button type="primary" v-permissions="['business:empower:create']">取消下发</el-button></li>--> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | 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: 'Empower', |
| | | extends: BaseTable, |
| | |
| | | return { |
| | | // 搜索 |
| | | searchForm: { |
| | | keyWords: '', |
| | | companyId: '', |
| | | startTime: '', |
| | | endTime: '', |
| | | sendStatus: '' |
| | | } |
| | | sendStatus: '', |
| | | radio: null |
| | | }, |
| | | time: [] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | changeRadio (e) { |
| | | if (e === '0') { |
| | | this.searchForm.startTime = timeForMat(1)[0] |
| | | this.searchForm.endTime = timeForMat(1)[1] |
| | | this.time = timeForMat(1) |
| | | } else if (e === '1') { |
| | | this.searchForm.startTime = timeForMat(7)[0] |
| | | this.searchForm.endTime = timeForMat(7)[1] |
| | | this.time = timeForMat(7) |
| | | } else if (e === '2') { |
| | | this.searchForm.startTime = timeForMat(30)[0] |
| | | this.searchForm.endTime = timeForMat(30)[1] |
| | | this.time = timeForMat(30) |
| | | } |
| | | this.search() |
| | | }, |
| | | seleTime (e) { |
| | | this.searchForm.startTime = e[0] |
| | | this.searchForm.endTime = e[1] |
| | | this.searchForm.radio = null |
| | | this.search() |
| | | }, |
| | | reset () { |
| | | this.$refs.searchForm.resetFields() |
| | | this.searchForm.startTime = '' |
| | | this.searchForm.endTime = '' |
| | | this.time = [] |
| | | this.searchForm.radio = null |
| | | this.search() |
| | | } |
| | | } |
| | | } |
| | | </script> |