From 1fc035f1b3ca9088b792ab2c71e175e7e4d9d1a1 Mon Sep 17 00:00:00 2001 From: huanghao1412 Date: Mon, 15 Jul 2024 12:52:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=8C=89=E9=92=AE=20=E5=A2=9E=E5=8A=A0=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 +- .../images/chart/customponents/JumpBtn.png | Bin 0 -> 1429 bytes .../images/chart/customponents/Position.png | Bin 0 -> 2957 bytes src/assets/images/common/告警定位.svg | 43 ++++ src/assets/images/common/普通定位.svg | 43 ++++ .../CustomComponents/JumpBtn/config.ts | 26 +++ .../CustomComponents/JumpBtn/config.vue | 23 +++ .../CustomComponents/JumpBtn/configData.vue | 27 +++ .../CustomComponents/JumpBtn/index.ts | 16 ++ .../CustomComponents/JumpBtn/index.vue | 185 ++++++++++++++++++ .../CustomComponents/Position/config.ts | 25 +++ .../CustomComponents/Position/config.vue | 23 +++ .../CustomComponents/Position/configData.vue | 22 +++ .../CustomComponents/Position/index.ts | 16 ++ .../CustomComponents/Position/index.vue | 129 ++++++++++++ .../CustomComponents/index.ts | 4 + vite.config.ts | 4 + 17 files changed, 588 insertions(+), 2 deletions(-) create mode 100644 src/assets/images/chart/customponents/JumpBtn.png create mode 100644 src/assets/images/chart/customponents/Position.png create mode 100644 src/assets/images/common/告警定位.svg create mode 100644 src/assets/images/common/普通定位.svg create mode 100644 src/packages/components/CustomComponents/CustomComponents/JumpBtn/config.ts create mode 100644 src/packages/components/CustomComponents/CustomComponents/JumpBtn/config.vue create mode 100644 src/packages/components/CustomComponents/CustomComponents/JumpBtn/configData.vue create mode 100644 src/packages/components/CustomComponents/CustomComponents/JumpBtn/index.ts create mode 100644 src/packages/components/CustomComponents/CustomComponents/JumpBtn/index.vue create mode 100644 src/packages/components/CustomComponents/CustomComponents/Position/config.ts create mode 100644 src/packages/components/CustomComponents/CustomComponents/Position/config.vue create mode 100644 src/packages/components/CustomComponents/CustomComponents/Position/configData.vue create mode 100644 src/packages/components/CustomComponents/CustomComponents/Position/index.ts create mode 100644 src/packages/components/CustomComponents/CustomComponents/Position/index.vue diff --git a/.env b/.env index fd20c63d..d1b3d4e2 100644 --- a/.env +++ b/.env @@ -3,9 +3,9 @@ VITE_DEV_PORT = '8080' # development path # VITE_DEV_PATH = 'http://192.168.0.34:11887' -VITE_DEV_PATH = 'http://192.168.0.34:8102' +VITE_DEV_PATH = 'http://114.115.222.135:9008/' # VITE_DEV_PATH = 'http://192.168.0.120:3001' -VITE_DEV_TOKEN = 'dd23c593-c823-4eb3-86d0-54ec77c99880' +VITE_DEV_TOKEN = 'e5982f26-54bb-45d8-827a-02bbb42a2eae' # production path VITE_PRO_PATH = 'http://192.168.0.235:8177' diff --git a/src/assets/images/chart/customponents/JumpBtn.png b/src/assets/images/chart/customponents/JumpBtn.png new file mode 100644 index 0000000000000000000000000000000000000000..68ea68d8a56b633e7973cbeb9d94704e2d362f1e GIT binary patch literal 1429 zcmb`HeK^wz0LOnOnaRB5?Gn?P3?<^I=h&girrCD0>`X*iB6-QeJdC`gk(cJ2mk7(K zNuJV$yiAAaa@)C%8k=P0{e9YmIQQTEeb4>z`F@}0`~CmJBH}$XAp0Ny0BB$_XwpuH z@8AUn?PUL|zS>TyMPYnn007$k4@!krP@|nuo9_N2-8=FkJuc`f4e*W#jS7mP)BFtt z5&%%K#G+lv@n!QRB7zY`H#0fJ;i#dF!$q|)eJ-|?=LzF^p4p&2NREBaLvah?rDR=< znwA_f7T6}1&35(2n`_J)*P1B`l!PTQs=`{kxJGgNhQu7vw-?~jk`6#&T5z4oSfgu3c>#4r{Vz6I z`M0})7)5uU3q*Gp_NJSfmMPgCY?f~NK=%hW=#ZCgIs~x9BBI$4B$()q@hU}JxxK0G zM#IGY9DHyAKkofp`(@*{GakJ<+JV879Qx!!rO^6IPv2s56gk7ASO1%=>LZbS=x0pz6Fk$MbaL7nE z7-8rch~T6DTV`*A^0}}Wu9Q+6iJuiVoqKkRvAv$)F@dO)WL> zxDOkVCK2-{<&LEQKQXExu-@tO)Yk94{CY}A?V==Ln8{duJu|$pynV+L2~D1#$! zC-f&@Tb&+6LN-)$w?3TwBU@povsh9Q+*EwV4CR~b>$fQzA~ASc);={MSuL=RuN+ZC z8nw^k)AV`ktUWEnBg#|sr=pp|f}$>)PNMO(q5~H;&^3J3+M&1A1ayMt-98bcarBY^ z_em)WoWlJgDj{_YhBX}a0SW6I_kBS&KemDGenFIN_c+;}WYycy8uic$cU6owG=M0;C7rv{^dcv;TSp(|<&KB5|Y{ ztQ=_xo1cTt8<+Lt4ZsP@9l|~?>Q4sz)WQeR#ORwGNxa|nFo!0iJ4fX%ddM75d9dBM zJ6^lg}y2_vRe;iie>0;k2T9I?Qu=iSMiaB%efD2L{Ge8g9jup&bX*VGw1LsWSweo z%EDcFO3!6m0)oLzU23yRz2&$pb=+OunXjuu3=7Y~2tlm#FF93Y$WQhFT3Yt;@F1Yo zJu*>gnE^lc*cb1hLaM?Z24 GO#K^*W|%bq literal 0 HcmV?d00001 diff --git a/src/assets/images/chart/customponents/Position.png b/src/assets/images/chart/customponents/Position.png new file mode 100644 index 0000000000000000000000000000000000000000..0f6c71da6306d61e41c732251c3538b659d32e65 GIT binary patch literal 2957 zcmbVO`8U*!7yeihvV>kCJ6W=231hFuGIkm}GbH<(8GDu&h1X6ZOu~4_k_cnMh*FHg zWG&0kkUjf4#`5+43*URrz4zRE?hns%&%Nh7sg~x3tjv7O006K;jKJ0x+4sVo7-=u! zHIHP%MPdpzazFq8+voqBCSQi_#zm6@sc(;b5afvrcMI_V9t8RXyCIMsF4qT10B}VV z0=^54C|NId3gYk0k0*j`#tvVKc&YIJlM8{M^+`r@ef9^R6rQ1kQ-w}A7cTp&{yZuB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-kJyyYP5=x4Fsgvf zmk_VT2K2bWZGWb&>s7X^$|ML;q(hI;@9rTI0}hd%#}(l3b~Cc*F%~! z?}W^`YfWUD`DSxDr2N@Dy)PQiY%`f&L3L{@-BIKysRy&)6Ik4$?`{ zJzK+hVdttj}}BJlEuhPS&&hkLZ_DKG|hz zaO1<=<-58hv%=n^LgC`?qMY>fM&2s%!y0!ahBT}j<;L{hHGVJK@zi=u5S(61_9NjZ z<64)MyE_DhEnWJw7?RGag^yMFo{++qv|0t$jGE$$p>#m2sUaU|tEf_t-7;HKXxThB z@QaVkB|1=xIih1>{Aw&IL+xHg#vkc9dPdvso5j_c%~=}2Ylg2nt3Uz-YlHhJDzI`C z3)k0(<@~~qh_#g3jGf(@w36`YX;a8hGDz^hsWI%GGi_mm=CIoMTq9;<*LR9kKj{!9 pR{eEen4OBBsyzSoe`?L`&h9}jbN*6GK=jSQZ|}J#{142mxuO67 literal 0 HcmV?d00001 diff --git a/src/assets/images/common/告警定位.svg b/src/assets/images/common/告警定位.svg new file mode 100644 index 00000000..693b7779 --- /dev/null +++ b/src/assets/images/common/告警定位.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/common/普通定位.svg b/src/assets/images/common/普通定位.svg new file mode 100644 index 00000000..70ad1a55 --- /dev/null +++ b/src/assets/images/common/普通定位.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/packages/components/CustomComponents/CustomComponents/JumpBtn/config.ts b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/config.ts new file mode 100644 index 00000000..93182ba2 --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/config.ts @@ -0,0 +1,26 @@ +import { PublicConfigClass } from '@/packages/public' +import { CreateComponentType } from '@/packages/index.d' +import { JumpBtnConfig } from './index' +import cloneDeep from 'lodash/cloneDeep' +// import logo from '@/assets/logo.png' + +export const option = {} +export const customData = { + label: '1号楼', + id: null, + id1: null, + showInterval: true, +} + +export default class Config extends PublicConfigClass implements CreateComponentType { + constructor() { + super(); + this.attr.w = 100 + this.attr.h = 40 + this.request.requestInterval = 15 + } + public key = JumpBtnConfig.key + public chartConfig = cloneDeep(JumpBtnConfig) + public option = cloneDeep(option) + public customData = cloneDeep(customData) +} diff --git a/src/packages/components/CustomComponents/CustomComponents/JumpBtn/config.vue b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/config.vue new file mode 100644 index 00000000..ccedcbe7 --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/config.vue @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/src/packages/components/CustomComponents/CustomComponents/JumpBtn/configData.vue b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/configData.vue new file mode 100644 index 00000000..d500a337 --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/configData.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/packages/components/CustomComponents/CustomComponents/JumpBtn/index.ts b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/index.ts new file mode 100644 index 00000000..7899fdd2 --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/index.ts @@ -0,0 +1,16 @@ +import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d' +import { ChatCategoryEnum, ChatCategoryEnumName } from '@/packages/components/CustomComponents/index.d' + +export const JumpBtnConfig: ConfigType = { + key: 'JumpBtn', + chartKey: 'VJumpBtn', + conKey: 'VCJumpBtn', + // VCD开头 + conDataKey: 'VCDJumpBtn', + title: '跳转按钮', + category: ChatCategoryEnum.CUSTOMCOMPONENTS, + categoryName: ChatCategoryEnumName.CUSTOMCOMPONENTS, + package: PackagesCategoryEnum.CUSTOMCOMPONENTS, + chartFrame: ChartFrameEnum.COMMON, + image: 'JumpBtn.png' +} diff --git a/src/packages/components/CustomComponents/CustomComponents/JumpBtn/index.vue b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/index.vue new file mode 100644 index 00000000..0d8c2ee4 --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/JumpBtn/index.vue @@ -0,0 +1,185 @@ + + + + + \ No newline at end of file diff --git a/src/packages/components/CustomComponents/CustomComponents/Position/config.ts b/src/packages/components/CustomComponents/CustomComponents/Position/config.ts new file mode 100644 index 00000000..ad96112a --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/Position/config.ts @@ -0,0 +1,25 @@ +import { PublicConfigClass } from '@/packages/public' +import { CreateComponentType } from '@/packages/index.d' +import { PositionConfig } from './index' +import cloneDeep from 'lodash/cloneDeep' +// import logo from '@/assets/logo.png' + +export const option = {} +export const customData = { + label: '数据中心', + id: null, + showInterval: true, +} + +export default class Config extends PublicConfigClass implements CreateComponentType { + constructor() { + super(); + this.attr.w = 100 + this.attr.h = 100 + this.request.requestInterval = 15 + } + public key = PositionConfig.key + public chartConfig = cloneDeep(PositionConfig) + public option = cloneDeep(option) + public customData = cloneDeep(customData) +} diff --git a/src/packages/components/CustomComponents/CustomComponents/Position/config.vue b/src/packages/components/CustomComponents/CustomComponents/Position/config.vue new file mode 100644 index 00000000..ccedcbe7 --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/Position/config.vue @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/src/packages/components/CustomComponents/CustomComponents/Position/configData.vue b/src/packages/components/CustomComponents/CustomComponents/Position/configData.vue new file mode 100644 index 00000000..4b7b1970 --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/Position/configData.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/src/packages/components/CustomComponents/CustomComponents/Position/index.ts b/src/packages/components/CustomComponents/CustomComponents/Position/index.ts new file mode 100644 index 00000000..ddcc34df --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/Position/index.ts @@ -0,0 +1,16 @@ +import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d' +import { ChatCategoryEnum, ChatCategoryEnumName } from '@/packages/components/CustomComponents/index.d' + +export const PositionConfig: ConfigType = { + key: 'Position', + chartKey: 'VPosition', + conKey: 'VCPosition', + // VCD开头 + conDataKey: 'VCDPosition', + title: '告警定位', + category: ChatCategoryEnum.CUSTOMCOMPONENTS, + categoryName: ChatCategoryEnumName.CUSTOMCOMPONENTS, + package: PackagesCategoryEnum.CUSTOMCOMPONENTS, + chartFrame: ChartFrameEnum.COMMON, + image: 'Position.png' +} diff --git a/src/packages/components/CustomComponents/CustomComponents/Position/index.vue b/src/packages/components/CustomComponents/CustomComponents/Position/index.vue new file mode 100644 index 00000000..3cbe7052 --- /dev/null +++ b/src/packages/components/CustomComponents/CustomComponents/Position/index.vue @@ -0,0 +1,129 @@ + + + + + \ No newline at end of file diff --git a/src/packages/components/CustomComponents/CustomComponents/index.ts b/src/packages/components/CustomComponents/CustomComponents/index.ts index f3396076..1701fcc0 100644 --- a/src/packages/components/CustomComponents/CustomComponents/index.ts +++ b/src/packages/components/CustomComponents/CustomComponents/index.ts @@ -16,6 +16,8 @@ import { PowerCapacityConfig } from './PowerCapacity' import { ElectricityConsumptionConfig } from './ElectricityConsumption' import { DeviceRunningStateConfig } from './DeviceRunningState' import { TemperatureTop10Config } from './TemperatureTop10' +import { PositionConfig } from './Position' +import { JumpBtnConfig } from './JumpBtn' export default [ // Theme1Config, @@ -36,4 +38,6 @@ export default [ ElectricityConsumptionConfig, DeviceRunningStateConfig, TemperatureTop10Config, + PositionConfig, + JumpBtnConfig, ] diff --git a/vite.config.ts b/vite.config.ts index 1e5aac66..1be37600 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -25,6 +25,10 @@ export default ({ mode } : { mode:any }) => defineConfig({ find: '@', replacement: pathResolve('src') }, + { + find: '~@', + replacement: pathResolve('src') + }, { find: 'vue-i18n', replacement: 'vue-i18n/dist/vue-i18n.cjs.js' //解决i8n警告