You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.5 KiB
Vue

19 hours ago
<!--
* @Author: chris
* @Date: 2025-08-18 09:27:23
* @LastEditors: chris
* @LastEditTime: 2025-08-18 17:18:54
-->
<script setup>
const props = defineProps({
params: {
type: Object,
default: () => ({
deviceId: null,
dateRange: []
})
}
})
const emits = defineEmits(['update:params'])
const queryRef = ref()
const queryParams = reactive({...props.params});
const pestOpts = ref([])
watch(() => queryParams, (newVal) => {
emits('update:params', newVal)
})
watch(() => props.params, (newVal) => {
Object.assign(queryParams, newVal)
})
function resetQuery() {
emits('reset')
}
function handleQuery() {
emits('query')
}
function exportData() {
emits('export')
}
</script>
<template>
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
<el-form-item label="创建时间">
<el-date-picker
style="width: 240px"
v-model="queryParams.dateRange"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
<el-button type="warning" icon="Download" @click="exportData"></el-button>
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
</template>
<style lang="scss" scoped>
</style>