-
-
+
+
+
-
总市电负载
-
(kWh)
-
0
+
{{item.label}}
+
{{item.unit}}
+
{{item.value}}
@@ -33,6 +34,9 @@ import {graphic} from "echarts";
import {cloneDeep} from 'lodash'
import moment from "moment"
import VCircle from './VCircle.vue'
+import Svg from './Svg.vue'
+import {selectTimeOptions} from "@/views/chart/ContentConfigurations/components/ChartData/index.d";
+import {RequestHttpIntervalEnum} from "@/enums/httpEnum";
const props = defineProps({
chartConfig: {
@@ -41,6 +45,8 @@ const props = defineProps({
}
})
Object.assign(props.chartConfig.attr, { w: 380, h: 250 })
+Object.assign(props.chartConfig.request, { requestInterval: 15, requestIntervalUnit: RequestHttpIntervalEnum.SECOND })
+
const { w, h } = toRefs(props.chartConfig.attr)
const { dataset, fit, borderRadius } = toRefs(props.chartConfig.option)
@@ -58,6 +64,424 @@ const value = reactive([
{label: '上月PUE', value: '0.000'},
])
+const option1 = {
+ title: [],
+ grid: {
+ top: '0%',
+ bottom: '0%',
+ left: '5%',
+ right: '5%',
+ containLabel: true
+ },
+ angleAxis: {
+ max: 100,
+ // clockwise: false, // 逆时针
+ // 隐藏刻度线
+ axisLine: {
+ show: false
+ },
+ axisTick: {
+ show: false
+ },
+ axisLabel: {
+ show: false
+ },
+ splitLine: {
+ show: false
+ }
+ },
+ radiusAxis: {
+ type: 'category',
+ // 隐藏刻度线
+ axisLine: {
+ show: false
+ },
+ axisTick: {
+ show: false
+ },
+ axisLabel: {
+ show: false
+ },
+ splitLine: {
+ show: false
+ }
+ },
+ polar: {
+ center: ['50%', '50%'],
+ radius: '150%' // 图形大小
+ },
+ series: [{
+ type: 'bar',
+ data: [{
+ value: 100,
+ itemStyle: {
+ normal: {
+ color: '#4396fd'
+ // color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
+ // offset: 0,
+ // color: '#aaf14f'
+ // }, {
+ // offset: 1,
+ // color: '#0acfa1'
+ // }])
+ }
+ }
+ }],
+ coordinateSystem: 'polar',
+ roundCap: true,
+ barWidth: 2,
+ barGap: '-100%', // 两环重叠
+ z: 2
+ },
+ { // 灰色环
+ type: 'bar',
+ data: [{
+ value: 100,
+ itemStyle: {
+ color: '#000',
+ shadowColor: 'rgba(0, 0, 0, 0.2)',
+ shadowBlur: 5,
+ shadowOffsetY: 2
+ }
+ }],
+ coordinateSystem: 'polar',
+ roundCap: true,
+ barWidth: 2,
+ barGap: '-100%', // 两环重叠
+ z: 1
+ }]
+}
+const option2 = {
+ title: [
+ {
+ show: true,
+ text: '0',
+ subText: '%',
+ x: '45%',
+ y: '25%',
+ textAlign: 'center',
+ textStyle: {
+ color: '#00ffff',
+ fontSize: 10
+ }
+ },
+ {
+ text: '%',
+ left: '46%',
+ top: '52%',
+ textAlign: 'center',
+ textStyle: {
+ color: '#999',
+ fontSize: 8
+ }
+ }
+ ],
+ grid: {
+ top: '0%',
+ bottom: '0%',
+ left: '5%',
+ right: '5%',
+ containLabel: true
+ },
+ angleAxis: {
+ max: 100,
+ // clockwise: false, // 逆时针
+ // 隐藏刻度线
+ axisLine: {
+ show: false
+ },
+ axisTick: {
+ show: false
+ },
+ axisLabel: {
+ show: false
+ },
+ splitLine: {
+ show: false
+ }
+ },
+ radiusAxis: {
+ type: 'category',
+ // 隐藏刻度线
+ axisLine: {
+ show: false
+ },
+ axisTick: {
+ show: false
+ },
+ axisLabel: {
+ show: false
+ },
+ splitLine: {
+ show: false
+ }
+ },
+ polar: {
+ center: ['50%', '50%'],
+ radius: '150%' // 图形大小
+ },
+ series: [{
+ type: 'bar',
+ data: [{
+ value: 0,
+ itemStyle: {
+ normal: {
+ color: '#00ffff'
+ // color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
+ // offset: 0,
+ // color: '#aaf14f'
+ // }, {
+ // offset: 1,
+ // color: '#0acfa1'
+ // }])
+ }
+ }
+ }],
+ coordinateSystem: 'polar',
+ roundCap: true,
+ barWidth: 2,
+ barGap: '-100%', // 两环重叠
+ z: 2
+ },
+ { // 灰色环
+ type: 'bar',
+ data: [{
+ value: 100,
+ itemStyle: {
+ color: '#000',
+ shadowColor: 'rgba(0, 0, 0, 0.2)',
+ shadowBlur: 5,
+ shadowOffsetY: 2
+ }
+ }],
+ coordinateSystem: 'polar',
+ roundCap: true,
+ barWidth: 2,
+ barGap: '-100%', // 两环重叠
+ z: 1
+ }]
+}
+const option3 = {
+ title: [
+ {
+ show: true,
+ text: '0',
+ subText: '%',
+ x: '45%',
+ y: '25%',
+ textAlign: 'center',
+ textStyle: {
+ color: '#f7c916',
+ fontSize: 10
+ }
+ },
+ {
+ text: '%',
+ left: '46%',
+ top: '52%',
+ textAlign: 'center',
+ textStyle: {
+ color: '#999',
+ fontSize: 8
+ }
+ }
+ ],
+ grid: {
+ top: '0%',
+ bottom: '0%',
+ left: '5%',
+ right: '5%',
+ containLabel: true
+ },
+ angleAxis: {
+ max: 100,
+ // clockwise: false, // 逆时针
+ // 隐藏刻度线
+ axisLine: {
+ show: false
+ },
+ axisTick: {
+ show: false
+ },
+ axisLabel: {
+ show: false
+ },
+ splitLine: {
+ show: false
+ }
+ },
+ radiusAxis: {
+ type: 'category',
+ // 隐藏刻度线
+ axisLine: {
+ show: false
+ },
+ axisTick: {
+ show: false
+ },
+ axisLabel: {
+ show: false
+ },
+ splitLine: {
+ show: false
+ }
+ },
+ polar: {
+ center: ['50%', '50%'],
+ radius: '150%' // 图形大小
+ },
+ series: [{
+ type: 'bar',
+ data: [{
+ value: 0,
+ itemStyle: {
+ normal: {
+ color: '#f7c916'
+ // color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
+ // offset: 0,
+ // color: '#aaf14f'
+ // }, {
+ // offset: 1,
+ // color: '#0acfa1'
+ // }])
+ }
+ }
+ }],
+ coordinateSystem: 'polar',
+ roundCap: true,
+ barWidth: 2,
+ barGap: '-100%', // 两环重叠
+ z: 2
+ },
+ { // 灰色环
+ type: 'bar',
+ data: [{
+ value: 100,
+ itemStyle: {
+ color: '#000',
+ shadowColor: 'rgba(0, 0, 0, 0.2)',
+ shadowBlur: 5,
+ shadowOffsetY: 2
+ }
+ }],
+ coordinateSystem: 'polar',
+ roundCap: true,
+ barWidth: 2,
+ barGap: '-100%', // 两环重叠
+ z: 1
+ }]
+}
+const rightArr = reactive([
+ { label: '总市电负载', value: 0, unit: '(kWh)', option: option1 },
+ { label: 'IT用电负载', value: 0, unit: '(kWh)', option: option2 },
+ { label: '其他负载', value: 0, unit: '(kWh)', option: option3 },
+])
+const getData = () => {
+ // 实时pue、总市电负载、IT用电负载和其他用电负载
+ const firstParams = {
+ duration: 2, // 2,查询日报;3,查询月报
+ start_time: moment().subtract(1, 'd').format('YYYY-MM-DD HH:00:00'),
+ end_time: moment().format('YYYY-MM-DD HH:00:00'),
+ strategy_ids: [props.chartConfig.customData!.id_1, props.chartConfig.customData!.id_2, props.chartConfig.customData!.id_3, props.chartConfig.customData!.id_4]
+ }
+ publicInterface('/dynamic_report/err', 'err', firstParams).then((res:any) => {
+ if(res) res = res.data
+ if (res && res.charts.length) {
+ // 实时pue
+ if (res.charts[1].series) {
+ const pueData = res.charts[1].series[0].data || [0, 0]
+ value[0].value = pueData[pueData.length - 1] ? pueData[pueData.length - 1] : pueData[pueData.length - 2]
+ if (value[0].value) {
+ value[0].value = Number(value[0].value).toFixed(3)
+ } else {
+ value[0].value = '0.000'
+ }
+ }
+ // 总市电负载、IT用电负载和其他用电负载
+ if (res.charts[0].series) {
+ // const totalData = res.charts[0].series[0].data || [0, 0]
+ const totalData = res.charts[0].series.find((item: any) => item.strategy_id === firstParams.strategy_ids[1]).data || [0, 0]
+ const itData = res.charts[0].series.find((item: any) => item.strategy_id === firstParams.strategy_ids[2]).data || [0, 0]
+ const otherData = res.charts[0].series.find((item: any) => item.strategy_id === firstParams.strategy_ids[3]).data || [0, 0]
+ rightArr[0].value = totalData[totalData.length - 1] ? totalData[totalData.length - 1] : totalData[totalData.length - 2]
+ rightArr[1].value = itData[itData.length - 1] ? itData[itData.length - 1] : itData[itData.length - 2]
+ rightArr[2].value = otherData[otherData.length - 1] ? otherData[otherData.length - 1] : otherData[otherData.length - 2]
+ }
+ // 图表
+ const one_IT_percent = parseFloat(rightArr[0].value.toString()) === 0 ? 0 : (parseFloat(rightArr[1].value.toString()) / parseFloat(rightArr[0].value.toString()) * 100).toFixed(2)
+ const one_other_percent = parseFloat(rightArr[0].value.toString()) === 0 ? 0 : (100 - Number(one_IT_percent)).toFixed(2)
+ rightArr[1].option.series[0].data[0].value = Number(one_IT_percent)
+ rightArr[1].option.title[0].text = one_IT_percent.toString()
+ rightArr[2].option.series[0].data[0].value = Number(one_other_percent)
+ rightArr[2].option.title[0].text = one_other_percent.toString()
+ }
+ })
+ // 昨日pue
+ const secondParams = {
+ duration: 3,
+ start_time: moment().subtract(1, 'days').startOf('day').format('yyyy-MM-DD HH:mm:ss'),
+ end_time: moment().startOf('day').format('yyyy-MM-DD HH:mm:ss'),
+ strategy_ids: [props.chartConfig.customData!.id_1]
+ }
+ publicInterface('/dynamic_report/err', 'err', secondParams).then((res: any) => {
+ res = res.data
+ if (res) {
+ if (res.tables.data.length && res.tables.data[0]['field0']) {
+ value[1].value = res.tables.data[0]['field0'].toFixed(3)
+ } else {
+ value[1].value = '0.000'
+ }
+ }
+ })
+ // 上周pue、上月pue
+ const thirdParams = {
+ strategy_ids: [props.chartConfig.customData!.id_1]
+ }
+ publicInterface('/dynamic_report/err', 'pue_dashboard', thirdParams).then((res: any) => {
+ res = res.data
+ if (res && res.length) {
+ if (res[0] && res[0].week_avg_pue) {
+ value[2].value = Number(res[0].week_avg_pue).toFixed(3)
+ } else {
+ value[2].value = '0.000'
+ }
+ if (res[0] && res[0].month_avg_pue) {
+ value[3].value = Number(res[0].month_avg_pue).toFixed(3)
+ } else {
+ value[3].value = '0.000'
+ }
+ }
+ })
+}
+let timer:unknown
+
+watch(() => [props.chartConfig.request.requestInterval, props.chartConfig.request.requestIntervalUnit].join('&&'), v => {
+ if(!isPreview()) return
+ if(props.chartConfig.request.requestInterval) {
+ if(timer) clearInterval(timer as number)
+ const obj = selectTimeOptions.find(_ => _.value === props.chartConfig.request.requestIntervalUnit) || {unit: 0}
+ const unit = obj.unit
+ const number = unit * props.chartConfig.request.requestInterval
+ timer = setInterval(() => {
+ getData()
+ }, number)
+ }
+})
+
+onMounted(() => {
+ getData()
+ if(!isPreview()) return
+ const obj = selectTimeOptions.find(_ => _.value === props.chartConfig.request.requestIntervalUnit) || {unit: 0}
+ const unit = obj.unit
+ const number = unit * props.chartConfig.request.requestInterval!
+ timer = setInterval(() => {
+ getData()
+ }, number)
+})
+onUnmounted(() => {
+ if(timer) clearInterval(timer as number)
+})
+
// const option = shallowReactive({
// dataset: ''
// })
@@ -68,9 +492,9 @@ const value = reactive([
diff --git a/src/packages/components/CustomComponents/CustomComponents/DeviceAlarmOverview/index.ts b/src/packages/components/CustomComponents/CustomComponents/DeviceAlarmOverview/index.ts
index 7a51c028..e3290a89 100644
--- a/src/packages/components/CustomComponents/CustomComponents/DeviceAlarmOverview/index.ts
+++ b/src/packages/components/CustomComponents/CustomComponents/DeviceAlarmOverview/index.ts
@@ -5,6 +5,7 @@ export const DeviceAlarmOverviewConfig: ConfigType = {
key: 'DeviceAlarmOverview',
chartKey: 'VDeviceAlarmOverview',
conKey: 'VCDeviceAlarmOverview',
+ conDataKey: 'VCDDeviceAlarmOverview',
title: '当前设备告警概况',
category: ChatCategoryEnum.CUSTOMCOMPONENTS,
categoryName: ChatCategoryEnumName.CUSTOMCOMPONENTS,
diff --git a/src/packages/components/CustomComponents/CustomComponents/DeviceAlarmOverview/index.vue b/src/packages/components/CustomComponents/CustomComponents/DeviceAlarmOverview/index.vue
index d4fbbe5d..3d61a791 100644
--- a/src/packages/components/CustomComponents/CustomComponents/DeviceAlarmOverview/index.vue
+++ b/src/packages/components/CustomComponents/CustomComponents/DeviceAlarmOverview/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -42,6 +42,9 @@ import { BareMetalServer as BareMetalServerIcon } from '@vicons/carbon'
import { SteeringWheel as SteeringWheelIcon } from '@vicons/tabler'
import { publicInterface } from '@/api/path/business.api'
import BorderBox from '../components/BorderBox.vue'
+import {selectTimeOptions} from "@/views/chart/ContentConfigurations/components/ChartData/index.d";
+import {RequestHttpIntervalEnum} from "@/enums/httpEnum";
+import {isPreview} from "@/utils";
const props = defineProps({
chartConfig: {
@@ -50,6 +53,8 @@ const props = defineProps({
}
})
Object.assign(props.chartConfig.attr, { w: 380, h: 250 })
+Object.assign(props.chartConfig.request, { requestInterval: 15, requestIntervalUnit: RequestHttpIntervalEnum.SECOND })
+
const { w, h } = toRefs(props.chartConfig.attr)
const { dataset, fit, borderRadius } = toRefs(props.chartConfig.option)
@@ -96,11 +101,27 @@ const getData = () => {
}
let timer:unknown
+watch(() => [props.chartConfig.request.requestInterval, props.chartConfig.request.requestIntervalUnit].join('&&'), v => {
+ if(!isPreview()) return
+ if(props.chartConfig.request.requestInterval) {
+ if(timer) clearInterval(timer as number)
+ const obj = selectTimeOptions.find(_ => _.value === props.chartConfig.request.requestIntervalUnit) || {unit: 0}
+ const unit = obj.unit
+ const number = unit * props.chartConfig.request.requestInterval
+ timer = setInterval(() => {
+ getData()
+ }, number)
+ }
+})
onMounted(() => {
getData()
+ if(!isPreview()) return
+ const obj = selectTimeOptions.find(_ => _.value === props.chartConfig.request.requestIntervalUnit) || {unit: 0}
+ const unit = obj.unit
+ const number = unit * props.chartConfig.request.requestInterval!
timer = setInterval(() => {
getData()
- }, 15000)
+ }, number)
})
onUnmounted(() => {
clearInterval(timer as number)
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/Svg.vue b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/Svg.vue
new file mode 100644
index 00000000..2b797fe4
--- /dev/null
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/Svg.vue
@@ -0,0 +1,518 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/config.ts b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/config.ts
new file mode 100644
index 00000000..b2e2a00f
--- /dev/null
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/config.ts
@@ -0,0 +1,25 @@
+import { PublicConfigClass } from '@/packages/public'
+import { CreateComponentType } from '@/packages/index.d'
+import { RealTimeAlarmStatisticsConfig } from './index'
+import cloneDeep from 'lodash/cloneDeep'
+// import background from '@/assets/customComponents/theme1/backgrond.jpg'
+
+export const option = {
+ // 图片路径
+ dataset: '',
+ // 适应方式
+ fit: 'contain',
+ // 圆角
+ borderRadius: 0
+}
+
+export default class Config extends PublicConfigClass implements CreateComponentType
+{
+ public key = RealTimeAlarmStatisticsConfig.key
+ public chartConfig = cloneDeep(RealTimeAlarmStatisticsConfig)
+ public option = cloneDeep(option)
+ public customData = cloneDeep({
+ title: '实时告警统计',
+ showInterval: true,
+ })
+}
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/config.vue b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/config.vue
new file mode 100644
index 00000000..d1759a1d
--- /dev/null
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/config.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/configData.vue b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/configData.vue
new file mode 100644
index 00000000..2c83af5e
--- /dev/null
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/configData.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/index.ts b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/index.ts
new file mode 100644
index 00000000..d41b306d
--- /dev/null
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/index.ts
@@ -0,0 +1,18 @@
+import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d'
+import { ChatCategoryEnum,ChatCategoryEnumName } from '@/packages/components/CUSTOMCOMPONENTS/index.d'
+
+export const RealTimeAlarmStatisticsConfig: ConfigType = {
+ key: 'RealTimeAlarmStatistics',
+ chartKey: 'VRealTimeAlarmStatistics',
+ conKey: 'VCRealTimeAlarmStatistics',
+ conDataKey: 'VCDRealTimeAlarmStatistics',
+ title: '实时告警统计',
+ // category: ChatCategoryEnum.THEMES,
+ // categoryName: ChatCategoryEnumName.THEMES,
+ // package: PackagesCategoryEnum.THEMESANDLAYOUTS,
+ category: ChatCategoryEnum.CUSTOMCOMPONENTS,
+ categoryName: ChatCategoryEnumName.CUSTOMCOMPONENTS,
+ package: PackagesCategoryEnum.CUSTOMCOMPONENTS,
+ chartFrame: ChartFrameEnum.COMMON,
+ image: 'RealTimeAlarmStatistics.png'
+}
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/index.vue b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/index.vue
new file mode 100644
index 00000000..8b58f06e
--- /dev/null
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeAlarmStatistics/index.vue
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/config.ts b/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/config.ts
index 3219dad7..09d702bd 100644
--- a/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/config.ts
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/config.ts
@@ -18,4 +18,8 @@ export default class Config extends PublicConfigClass implements CreateComponent
public key = RealTimeTrafficConfig.key
public chartConfig = cloneDeep(RealTimeTrafficConfig)
public option = cloneDeep(option)
+ public customData = cloneDeep({
+ title: '采集流量实时监测',
+ showInterval: true,
+ })
}
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/configData.vue b/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/configData.vue
new file mode 100644
index 00000000..2c83af5e
--- /dev/null
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/configData.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/index.ts b/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/index.ts
index 543f9779..fef205c2 100644
--- a/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/index.ts
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/index.ts
@@ -5,6 +5,8 @@ export const RealTimeTrafficConfig: ConfigType = {
key: 'RealTimeTraffic',
chartKey: 'VRealTimeTraffic',
conKey: 'VCRealTimeTraffic',
+ // VCD开头
+ conDataKey: 'VCDRealTimeTraffic',
title: '采集流量实时监测',
category: ChatCategoryEnum.CUSTOMCOMPONENTS,
categoryName: ChatCategoryEnumName.CUSTOMCOMPONENTS,
diff --git a/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/index.vue b/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/index.vue
index 1c6562ad..d2804ef9 100644
--- a/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/index.vue
+++ b/src/packages/components/CustomComponents/CustomComponents/RealTimeTraffic/index.vue
@@ -1,6 +1,6 @@
-
+
{
})
}
let timer:unknown
+watch(() => [props.chartConfig.request.requestInterval, props.chartConfig.request.requestIntervalUnit].join('&&'), v => {
+ if(!isPreview()) return
+ if(props.chartConfig.request.requestInterval) {
+ if(timer) clearInterval(timer as number)
+ const obj = selectTimeOptions.find(_ => _.value === props.chartConfig.request.requestIntervalUnit) || {unit: 0}
+ const unit = obj.unit
+ const number = unit * props.chartConfig.request.requestInterval
+ timer = setInterval(() => {
+ getData()
+ }, number)
+ }
+})
onMounted(() => {
nextTick(() => {
getData()
})
+ if(!isPreview()) return
+ const obj = selectTimeOptions.find(_ => _.value === props.chartConfig.request.requestIntervalUnit) || {unit: 0}
+ const unit = obj.unit
+ const number = unit * props.chartConfig.request.requestInterval!
timer = setInterval(() => {
nextTick(() => {
getData()
})
- }, 15000)
+ }, number)
})
onUnmounted(() => {
clearInterval(timer as number)
diff --git a/src/packages/components/CustomComponents/CustomComponents/Theme1/config.ts b/src/packages/components/CustomComponents/CustomComponents/Theme1/config.ts
index 45f575ee..a4b86aaa 100644
--- a/src/packages/components/CustomComponents/CustomComponents/Theme1/config.ts
+++ b/src/packages/components/CustomComponents/CustomComponents/Theme1/config.ts
@@ -18,4 +18,7 @@ export default class Config extends PublicConfigClass implements CreateComponent
public key = Theme1Config.key
public chartConfig = cloneDeep(Theme1Config)
public option = cloneDeep(option)
+ public customData = cloneDeep({
+ title: '中国建设银行广东省分行中心机房监控系统',
+ })
}
diff --git a/src/packages/components/CustomComponents/CustomComponents/Theme1/configData.vue b/src/packages/components/CustomComponents/CustomComponents/Theme1/configData.vue
new file mode 100644
index 00000000..2c83af5e
--- /dev/null
+++ b/src/packages/components/CustomComponents/CustomComponents/Theme1/configData.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/packages/components/CustomComponents/CustomComponents/Theme1/index.ts b/src/packages/components/CustomComponents/CustomComponents/Theme1/index.ts
index 377b9b23..2e52528a 100644
--- a/src/packages/components/CustomComponents/CustomComponents/Theme1/index.ts
+++ b/src/packages/components/CustomComponents/CustomComponents/Theme1/index.ts
@@ -5,6 +5,7 @@ export const Theme1Config: ConfigType = {
key: 'Theme1',
chartKey: 'VTheme1',
conKey: 'VCTheme1',
+ conDataKey: 'VCDTheme1',
title: '背景1',
// category: ChatCategoryEnum.THEMES,
// categoryName: ChatCategoryEnumName.THEMES,
diff --git a/src/packages/components/CustomComponents/CustomComponents/Theme1/index.vue b/src/packages/components/CustomComponents/CustomComponents/Theme1/index.vue
index 4d45eab1..9b11e80e 100644
--- a/src/packages/components/CustomComponents/CustomComponents/Theme1/index.vue
+++ b/src/packages/components/CustomComponents/CustomComponents/Theme1/index.vue
@@ -23,7 +23,7 @@
-
+
@@ -90,6 +90,7 @@
+ {{props.chartConfig.customData.title}}
{
+ if(!isPreview()) return
timer = setInterval(() => {
date.value = moment().format('yyyy-MM-DD')
time.value = moment().format('HH:mm:ss ') + weeks[Number(moment().format('e'))]
diff --git a/src/packages/components/CustomComponents/CustomComponents/components/BorderBox.vue b/src/packages/components/CustomComponents/CustomComponents/components/BorderBox.vue
index 78fdd41b..ad7458c9 100644
--- a/src/packages/components/CustomComponents/CustomComponents/components/BorderBox.vue
+++ b/src/packages/components/CustomComponents/CustomComponents/components/BorderBox.vue
@@ -10,7 +10,9 @@