|
@@ -9,7 +9,7 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="统计日期" :label-col="{span:6}" name="reportDate">
|
|
|
- <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']"
|
|
|
+ <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']" v-model:value="reportDate"
|
|
|
@change="onRangeChange"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -78,9 +78,10 @@
|
|
|
import {computed, onMounted, reactive, ref} from "vue";
|
|
|
import {getSystemApplyCount} from "@/api/statistics";
|
|
|
import type {FormInstance, TableColumnType} from "ant-design-vue";
|
|
|
-import dayjs from "dayjs";
|
|
|
+import dayjs, {type Dayjs} from "dayjs";
|
|
|
import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
|
|
|
|
|
|
+type RangeValue = [Dayjs, Dayjs];
|
|
|
const formRef = ref<FormInstance>();
|
|
|
|
|
|
const originalColumns: TableColumnType[] = [
|
|
@@ -135,7 +136,7 @@ const searchParams = reactive({
|
|
|
})
|
|
|
// 表格加载
|
|
|
const tableLoading = ref(false);
|
|
|
-// const reportDate = ref();
|
|
|
+const reportDate = ref<RangeValue>();
|
|
|
// 导出Excel查询参数
|
|
|
const exportSearchParams = computed(() => {
|
|
|
return JSON.parse(JSON.stringify(searchParams));
|
|
@@ -155,11 +156,16 @@ function loadData() {
|
|
|
const onRangeChange = (dateString: [string, string]) => {
|
|
|
searchParams.startDate = dateString != null ? dayjs(dateString[0]).format("YYYY-MM-DD") : "";
|
|
|
searchParams.endDate = dateString != null ? dayjs(dateString[1]).format("YYYY-MM-DD") : "";
|
|
|
+ loadData();
|
|
|
};
|
|
|
|
|
|
// 查询表单
|
|
|
function onReset() {
|
|
|
+ Object.keys(searchParams).forEach(key => {
|
|
|
+ searchParams[key] = "";
|
|
|
+ })
|
|
|
formRef.value?.resetFields();
|
|
|
+ reportDate.value = undefined;
|
|
|
loadData()
|
|
|
}
|
|
|
|