| | |
| | | <el-form-item label="" prop="phone"> |
| | | <el-input v-model="searchForm.phone" placeholder="请输入手机号/邮箱地址" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="" prop="type"> |
| | | <!-- <el-form-item label="" prop="type"> |
| | | <el-select v-model="searchForm.type" @keypress.enter.native="search" clearable placeholder="类型"> |
| | | <el-option label="短信" value="0"></el-option> |
| | | <el-option label="邮箱" value="1"></el-option> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="起始时间" prop="eventType"> |
| | | <el-date-picker @change="seleTime" v-model="time" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" |
| | | <!-- <el-date-picker @change="seleTime" v-model="time" 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-date-picker> --> |
| | | <el-date-picker type="datetime" v-model="searchForm.startTime" value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="请选择开始时间" @change="changeRadio" /> |
| | | <el-date-picker type="datetime" v-model="searchForm.endTime" value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="请选择结束时间" @change="changeRadio" /> |
| | | </el-form-item> |
| | | <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio"> |
| | | <el-radio-button label="0">当天</el-radio-button> |
| | |
| | | </el-form> |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe> |
| | | <el-table :height="tableHeightNew" v-loading="isWorking.search" :data="tableData.list" stripe> |
| | | <el-table-column prop="phone" label="手机号/邮箱" min-width="150px"> |
| | | <template slot-scope="{ row }"> |
| | | <span v-if="row.type == 0">{{ row.phone }}</span> |
| | | <span v-if="row.type == 1">{{ row.email }}</span> |
| | | </template> |
| | | <template slot-scope="{ row }"> |
| | | <span v-if="row.type == 0">{{ row.phone }}</span> |
| | | <span v-if="row.type == 1">{{ row.email }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="title" label="标题" min-width="100px"></el-table-column> |
| | | <el-table-column prop="content" label="内容" min-width="300px"></el-table-column> |
| | |
| | | methods: { |
| | | reset() { |
| | | this.$refs.searchForm.resetFields() |
| | | this.searchForm.radio = '' |
| | | // this.changeRadio('0') |
| | | this.searchForm = { |
| | | phone: '', |
| | | type: null, |
| | | objType: null, |
| | | startTime: '', |
| | | endTime: '', |
| | | radio: '0' |
| | | } |
| | | this.searchForm = {} |
| | | this.time = [] |
| | | this.search() |
| | | }, |
| | |
| | | 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) |
| | | } else { |
| | | this.searchForm.radio = '' |
| | | } |
| | | if (this.searchForm.startTime && this.searchForm.endTime && new Date(this.searchForm.startTime).getTime() > new Date(this.searchForm.endTime).getTime()) { |
| | | this.$message.error('开始时间不能大于结束时间') |
| | | this.searchForm.startTime = '' |
| | | return |
| | | } |
| | | this.search() |
| | | }, |