You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.8 KiB
73 lines
1.8 KiB
2 years ago
|
<template>
|
||
|
<div v-if="crud.props.searchToggle">
|
||
|
<el-input
|
||
|
v-model="query.blurry"
|
||
|
clearable
|
||
|
size="small"
|
||
|
placeholder="请输入你要搜索的内容"
|
||
|
style="width: 200px;"
|
||
|
class="filter-item"
|
||
|
/>
|
||
|
<!--
|
||
|
<date-range-picker v-model="query.createTime" class="date-item" />
|
||
|
-->
|
||
|
|
||
|
<el-date-picker
|
||
|
v-model="query.createTime"
|
||
|
type="datetimerange"
|
||
|
:picker-options="pickerOptions"
|
||
|
range-separator="至"
|
||
|
start-placeholder="开始日期"
|
||
|
end-placeholder="结束日期"
|
||
|
align="right"
|
||
|
/>
|
||
|
<rrOperation/>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import { header } from '@crud/crud'
|
||
|
import rrOperation from '@crud/RR.operation'
|
||
|
|
||
|
export default {
|
||
|
components: { rrOperation },
|
||
|
mixins: [header()],
|
||
|
|
||
|
data() {
|
||
|
return {
|
||
|
pickerOptions: {
|
||
|
shortcuts: [{
|
||
|
text: '最近一周',
|
||
|
onClick(picker) {
|
||
|
const end = new Date()
|
||
|
const start = new Date()
|
||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||
|
picker.$emit('pick', [start, end])
|
||
|
}
|
||
|
}, {
|
||
|
text: '最近一个月',
|
||
|
onClick(picker) {
|
||
|
const end = new Date()
|
||
|
const start = new Date()
|
||
|
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])
|
||
|
}
|
||
|
}]
|
||
|
},
|
||
|
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
|
||
|
value2: ''
|
||
|
}
|
||
|
},
|
||
|
created() {
|
||
|
}
|
||
|
}
|
||
|
</script>
|