File tree 9 files changed +308
-22
lines changed
9 files changed +308
-22
lines changed Original file line number Diff line number Diff line change 45
45
},
46
46
"dependencies" : {
47
47
"@element-plus/icons-vue" : " ^2.3.1" ,
48
+ "@fullcalendar/core" : " ^6.1.15" ,
49
+ "@fullcalendar/daygrid" : " ^6.1.15" ,
50
+ "@fullcalendar/interaction" : " ^6.1.15" ,
51
+ "@fullcalendar/vue3" : " ^6.1.15" ,
48
52
"@howbizarre/vue-month-calendar" : " ^1.4.5" ,
49
53
"@vueuse/core" : " ^10.11.0" ,
50
54
"@wangeditor/editor" : " ^5.1.23" ,
51
55
"@wangeditor/editor-for-vue" : " 5.1.10" ,
52
56
"animate.css" : " ^4.1.1" ,
53
57
"axios" : " ^1.7.2" ,
54
58
"color" : " ^4.2.3" ,
59
+ "date-fns" : " ^3.6.0" ,
55
60
"echarts" : " ^5.5.1" ,
56
61
"element-plus" : " ^2.7.6" ,
57
62
"exceljs" : " ^4.4.0" ,
Original file line number Diff line number Diff line change 1
1
import request from "@/utils/request" ;
2
2
import { ChartHouseDataVO , ChartHouseDataList } from "./model" ;
3
+ import { format } from "date-fns" ;
3
4
4
5
class HouseAPI {
5
6
/**
6
7
* 获取房源数据
7
8
*
8
9
* @param dataType
9
10
*/
10
- static getHouseData ( dataType : number ) {
11
+ static getHouseData ( dataType : number , dataDate : Date ) {
11
12
return request < any , ChartHouseDataVO > ( {
12
- url : "/house/" + dataType ,
13
+ url : "/house/" + format ( dataDate , "yyyy-MM-dd" ) + "/" + dataType ,
13
14
method : "get" ,
14
15
} ) ;
15
16
}
Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ const chartComponent = (item: string) => {
40
40
return defineAsyncComponent (() => import (` ../components/${item }.vue ` ));
41
41
};
42
42
43
- async function handleQuery(dataType : number ) {
43
+ async function handleQuery(dataType : number , dataDate : Date ) {
44
44
loading .value = true ;
45
- await HouseAPI .getHouseData (dataType )
45
+ await HouseAPI .getHouseData (dataType , dataDate )
46
46
.then ((data ) => {
47
47
chartHousedataList .value = data as ChartHouseDataVO ;
48
48
})
@@ -52,7 +52,7 @@ async function handleQuery(dataType: number) {
52
52
}
53
53
54
54
onMounted (() => {
55
- handleQuery (1 );
55
+ handleQuery (1 , new Date () );
56
56
});
57
57
</script >
58
58
Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ const chartComponent = (item: string) => {
40
40
return defineAsyncComponent (() => import (` ../components/${item }.vue ` ));
41
41
};
42
42
43
- async function handleQuery(dataType : number ) {
43
+ async function handleQuery(dataType : number , dataDate : Date ) {
44
44
loading .value = true ;
45
- await HouseAPI .getHouseData (dataType )
45
+ await HouseAPI .getHouseData (dataType , dataDate )
46
46
.then ((data ) => {
47
47
chartHousedataList .value = data as ChartHouseDataVO ;
48
48
})
@@ -52,7 +52,7 @@ async function handleQuery(dataType: number) {
52
52
}
53
53
54
54
onMounted (() => {
55
- handleQuery (0 );
55
+ handleQuery (0 , new Date () );
56
56
});
57
57
</script >
58
58
Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ const chartComponent = (item: string) => {
40
40
return defineAsyncComponent (() => import (` ../components/${item }.vue ` ));
41
41
};
42
42
43
- async function handleQuery(dataType : number ) {
43
+ async function handleQuery(dataType : number , dataDate : Date ) {
44
44
loading .value = true ;
45
- await HouseAPI .getHouseData (dataType )
45
+ await HouseAPI .getHouseData (dataType , dataDate )
46
46
.then ((data ) => {
47
47
chartHousedataList .value = data as ChartHouseDataVO ;
48
48
})
@@ -52,7 +52,7 @@ async function handleQuery(dataType: number) {
52
52
}
53
53
54
54
onMounted (() => {
55
- handleQuery (3 );
55
+ handleQuery (3 , new Date () );
56
56
});
57
57
</script >
58
58
Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ const chartComponent = (item: string) => {
40
40
return defineAsyncComponent (() => import (` ../components/${item }.vue ` ));
41
41
};
42
42
43
- async function handleQuery(dataType : number ) {
43
+ async function handleQuery(dataType : number , dataDate : Date ) {
44
44
loading .value = true ;
45
- await HouseAPI .getHouseData (dataType )
45
+ await HouseAPI .getHouseData (dataType , dataDate )
46
46
.then ((data ) => {
47
47
chartHousedataList .value = data as ChartHouseDataVO ;
48
48
})
@@ -52,7 +52,7 @@ async function handleQuery(dataType: number) {
52
52
}
53
53
54
54
onMounted (() => {
55
- handleQuery (6 );
55
+ handleQuery (6 , new Date () );
56
56
});
57
57
</script >
58
58
You can’t perform that action at this time.
0 commit comments