diff --git a/src/hooks/commonDataComponents/data.json b/src/hooks/commonDataComponents/data.json
new file mode 100644
index 00000000..a28d4ee7
--- /dev/null
+++ b/src/hooks/commonDataComponents/data.json
@@ -0,0 +1,40 @@
+{
+ "dimensions": ["product", "data1", "data2"],
+ "source": [
+ {
+ "product": "Mon",
+ "data1": 120,
+ "data2": 130
+ },
+ {
+ "product": "Tue",
+ "data1": 200,
+ "data2": 130
+ },
+ {
+ "product": "Wed",
+ "data1": 150,
+ "data2": 312
+ },
+ {
+ "product": "Thu",
+ "data1": 80,
+ "data2": 268
+ },
+ {
+ "product": "Fri",
+ "data1": 70,
+ "data2": 155
+ },
+ {
+ "product": "Sat",
+ "data1": 110,
+ "data2": 117
+ },
+ {
+ "product": "Sun",
+ "data1": 130,
+ "data2": 160
+ }
+ ]
+}
diff --git a/src/hooks/commonDataComponents/singleData.json b/src/hooks/commonDataComponents/singleData.json
new file mode 100644
index 00000000..9d2f36c9
--- /dev/null
+++ b/src/hooks/commonDataComponents/singleData.json
@@ -0,0 +1,7 @@
+{
+ "name": "",
+ "status": null,
+ "time": "",
+ "unit": "",
+ "value": 0
+}
\ No newline at end of file
diff --git a/src/hooks/commonDataComponents/useEnergyUseHistoryRes.ts b/src/hooks/commonDataComponents/useEnergyUseHistoryRes.ts
index 7019006d..e3706e4b 100644
--- a/src/hooks/commonDataComponents/useEnergyUseHistoryRes.ts
+++ b/src/hooks/commonDataComponents/useEnergyUseHistoryRes.ts
@@ -3,10 +3,16 @@ import { publicInterface } from "@/api/path";
import { DateTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
import { commonDataType, EnergyUseHistoryType } from '@/store/modules/chartEditStore/chartEditStore.d'
import { CreateComponentType } from '@/packages/index.d'
+import { ResultErrcode } from '@/enums/httpEnum'
+import dataJson from './data.json'
export const handleEnergyUseHistory = (targetComponent: CreateComponentType) => {
let { strategy_ids, dateType, enable } = (targetComponent.commonData as commonDataType).energyUseHistory as EnergyUseHistoryType
- if(!enable) return
+ if(!enable) return {
+ errcode: ResultErrcode.SUCCESS,
+ data: { ...dataJson },
+ errmsg: ''
+ }
let start_time: string = '', end_time: string = '', duration: number = 0
const formatter = 'yyyy-MM-DD HH:mm:ss'
if(dateType === DateTypeEnum.DAY) {
diff --git a/src/hooks/commonDataComponents/usePointHistoryRes.ts b/src/hooks/commonDataComponents/usePointHistoryRes.ts
index 8b57bc36..54a314a0 100644
--- a/src/hooks/commonDataComponents/usePointHistoryRes.ts
+++ b/src/hooks/commonDataComponents/usePointHistoryRes.ts
@@ -3,10 +3,16 @@ import { publicInterface } from "@/api/path";
import { DateTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
import { commonDataType, PointHistoryType } from '@/store/modules/chartEditStore/chartEditStore.d'
import { CreateComponentType } from '@/packages/index.d'
+import { ResultErrcode } from "@/enums/httpEnum";
+import dataJson from "./data.json";
export const handlePointHistory = (targetComponent: CreateComponentType) => {
let { methods, dems_device_points_uid, dateType, enable } = (targetComponent.commonData as commonDataType).pointHistory as PointHistoryType
- if(!enable) return
+ if(!enable) return {
+ errcode: ResultErrcode.SUCCESS,
+ data: { ...dataJson },
+ errmsg: ''
+ }
let start_time: string = '', end_time: string = '', duration: number = 0
const formatter = 'yyyy-MM-DD HH:mm:ss'
if(dateType === DateTypeEnum.DAY) {
diff --git a/src/hooks/commonDataComponents/usePointRealTimeRes.ts b/src/hooks/commonDataComponents/usePointRealTimeRes.ts
index f805dc69..7287dc80 100644
--- a/src/hooks/commonDataComponents/usePointRealTimeRes.ts
+++ b/src/hooks/commonDataComponents/usePointRealTimeRes.ts
@@ -1,10 +1,16 @@
import { publicInterface } from "@/api/path";
import { commonDataType, PointRealTimeType } from '@/store/modules/chartEditStore/chartEditStore.d'
import { CreateComponentType } from '@/packages/index.d'
+import { ResultErrcode } from "@/enums/httpEnum";
+import dataJson from "./data.json";
export const handlePointRealTime = (targetComponent: CreateComponentType) => {
let { enable, point_uid, limit, with_device_name, space_complete_name_prefix } = (targetComponent.commonData as commonDataType).pointRealTime as PointRealTimeType
- if(!enable) return
+ if(!enable) return {
+ errcode: ResultErrcode.SUCCESS,
+ data: { ...dataJson },
+ errmsg: ''
+ }
const query = {
point_uid,
diff --git a/src/hooks/commonDataComponents/useRecordValueHistoryRes.ts b/src/hooks/commonDataComponents/useRecordValueHistoryRes.ts
index d2aa9f17..a2fe0116 100644
--- a/src/hooks/commonDataComponents/useRecordValueHistoryRes.ts
+++ b/src/hooks/commonDataComponents/useRecordValueHistoryRes.ts
@@ -3,10 +3,16 @@ import { publicInterface } from "@/api/path";
import { DateTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
import { commonDataType, RecordValueHistoryType } from '@/store/modules/chartEditStore/chartEditStore.d'
import { CreateComponentType } from '@/packages/index.d'
+import { ResultErrcode } from "@/enums/httpEnum";
+import dataJson from "./data.json";
export const handleRecordValueHistory = (targetComponent: CreateComponentType) => {
let { policy, strategy_ids, dateType, enable } = (targetComponent.commonData as commonDataType).recordValueHistory as RecordValueHistoryType
- if(!enable) return
+ if(!enable) return {
+ errcode: ResultErrcode.SUCCESS,
+ data: { ...dataJson },
+ errmsg: ''
+ }
let start_time: string = '', end_time: string = '', duration: number = 0
const formatter = 'yyyy-MM-DD HH:mm:ss'
if(dateType === DateTypeEnum.DAY) {
diff --git a/src/hooks/commonDataComponents/useSinglePointRes.ts b/src/hooks/commonDataComponents/useSinglePointRes.ts
index 844fb49d..83b839dc 100644
--- a/src/hooks/commonDataComponents/useSinglePointRes.ts
+++ b/src/hooks/commonDataComponents/useSinglePointRes.ts
@@ -1,10 +1,16 @@
import { publicInterface } from "@/api/path";
import { commonDataType, SinglePointType } from '@/store/modules/chartEditStore/chartEditStore.d'
import { CreateComponentType } from '@/packages/index.d'
+import { ResultErrcode } from "@/enums/httpEnum";
+import singleDataJson from './singleData.json'
export const handleSinglePoint = (targetComponent: CreateComponentType) => {
let { enable, pointId } = (targetComponent.commonData as commonDataType).singlePoint as SinglePointType
- if(!enable) return
+ if(!enable) return {
+ errcode: ResultErrcode.SUCCESS,
+ data: { ...singleDataJson },
+ errmsg: ''
+ }
return publicInterface('/dcim/system/custom_large_screen', 'get_point_value', pointId)
}
diff --git a/src/packages/components/CustomComponents/AlarmDiagram/RealTimeEvent/index.vue b/src/packages/components/CustomComponents/AlarmDiagram/RealTimeEvent/index.vue
index 28b9ee4b..fef11c29 100644
--- a/src/packages/components/CustomComponents/AlarmDiagram/RealTimeEvent/index.vue
+++ b/src/packages/components/CustomComponents/AlarmDiagram/RealTimeEvent/index.vue
@@ -21,9 +21,9 @@