| | |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | v-model="validTime" |
| | | type="datetimerange" |
| | | type="daterange" |
| | | :default-time="['00:00:00','23:59:59']" |
| | | :picker-options="pickerOptions" |
| | | range-separator="-" |
| | |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search" style="padding-top: 10px;margin-left: 20px" > |
| | | <span>OCR识别:</span> |
| | | <el-select v-model="listQuery.filter.isOcr" placeholder="请选择" style="width:100px"> |
| | | <el-option label="是" key="1" :value="1"></el-option> |
| | | <el-option label="否" key="0" :value="0"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | |
| | | parententerprisename:'', |
| | | directioncode:'', |
| | | isNeedUploadPhoto:'', |
| | | isOcr: null, |
| | | province:'', |
| | | city:'', |
| | | district:'', |
| | |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }, { |
| | | text: '最近三个月', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }] |
| | | }, |
| | | } |
| | |
| | | uploadDialog |
| | | }, |
| | | created() { |
| | | console.log('Component created:', this.$options.name); |
| | | this.initValidTime() |
| | | this.getPersonProductList() |
| | | this.getProvince() |
| | |
| | | |
| | | async exportToExcel(){ |
| | | this.reClickTip = true |
| | | if( this.validTime !== null ){ |
| | | this.listQuery.filter.starttime = this.validTime[0] |
| | | this.listQuery.filter.endtime = this.validTime[1] |
| | | }else{ |
| | | this.listQuery.filter.starttime = '' |
| | | this.listQuery.filter.endtime = '' |
| | | } |
| | | let res = await exportPerson(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.reClickTip = false |
| | |
| | | parententerprisename:'', |
| | | directioncode:'', |
| | | isNeedUploadPhoto:'', |
| | | isOcr: null, |
| | | province:'', |
| | | city:'', |
| | | district:'', |
| | |
| | | nation:'' |
| | | }, |
| | | } |
| | | this.validTime = ['', ''] |
| | | this.initValidTime() |
| | | this.getPersonProductList() |
| | | }, |
| | | |
| | | searchProductSearch(){ |
| | | this.listQuery.pageIndex = 1 |
| | | const date1 = new Date(this.validTime[0]); |
| | | const date2 = new Date(this.validTime[1]); |
| | | const differenceInMs = Math.abs(date2 - date1); |
| | | const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24) |
| | | if(differenceInDays > 32){ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '时间跨度超过一个月的,请联系管理员查询数据' |
| | | }) |
| | | return |
| | | } |
| | | this.getPersonProductList() |
| | | }, |
| | | |
| | |
| | | this.getPersonProductList() |
| | | }, |
| | | initValidTime(){ |
| | | const start = new Date(); |
| | | const end = new Date(); |
| | | start.setTime(end.getTime() - 3600 * 1000 * 24 * 0); |
| | | this.validTime[0] = [start.getFullYear(), start.getMonth() + 1, start.getDate()].join("-") + " 00:00:00" ; |
| | | this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate()].join("-") +" 23:59:59"; |
| | | const end = new Date(); |
| | | this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00"; |
| | | this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59"; |
| | | }, |
| | | async getProvince(){ |
| | | let res = await getProvinceListData() |