Showing
2 changed files
with
0 additions
and
76 deletions
src/views/visual/board/components/TextComponent/config.ts
deleted
100644 → 0
1 | -import { ComponentInfo, DataComponentRecord, DataSource } from '/@/api/dataBoard/model'; | ||
2 | -export interface TextComponentLayout { | ||
3 | - id: string; | ||
4 | - base?: boolean; | ||
5 | - showUpdate?: boolean; | ||
6 | - showIcon?: boolean; | ||
7 | - showUnit?: boolean; | ||
8 | -} | ||
9 | - | ||
10 | -export interface TextComponentValue { | ||
11 | - name: string; | ||
12 | - value: number; | ||
13 | - icon?: string; | ||
14 | - unit?: string; | ||
15 | - updateTime?: string; | ||
16 | - fontColor?: string; | ||
17 | - iconColor?: string; | ||
18 | - deviceName?: string; | ||
19 | -} | ||
20 | - | ||
21 | -type TextComponentDefault = TextComponentLayout; | ||
22 | - | ||
23 | -export const TextComponent1Config: TextComponentDefault = { | ||
24 | - id: 'text-component-1', | ||
25 | - base: true, | ||
26 | -}; | ||
27 | - | ||
28 | -export const TextComponent3Config: TextComponentDefault = { | ||
29 | - id: 'text-component-3', | ||
30 | - base: false, | ||
31 | - showUpdate: true, | ||
32 | -}; | ||
33 | -export const TextComponent4Config: TextComponentDefault = { | ||
34 | - id: 'text-component-4', | ||
35 | - base: false, | ||
36 | - showIcon: true, | ||
37 | - showUpdate: true, | ||
38 | - showUnit: true, | ||
39 | -}; | ||
40 | -export const TextComponent5Config: TextComponentDefault = { | ||
41 | - id: 'text-component-5', | ||
42 | - base: false, | ||
43 | - showIcon: true, | ||
44 | - showUnit: true, | ||
45 | -}; | ||
46 | - | ||
47 | -export const TextComponentDefaultConfig: Partial<ComponentInfo> = { | ||
48 | - fontColor: '#000', | ||
49 | - unit: '℃', | ||
50 | - iconColor: '#367BFF', | ||
51 | - icon: 'shuiwen', | ||
52 | -}; | ||
53 | - | ||
54 | -export const transformTextComponentConfig = ( | ||
55 | - config: TextComponentDefault, | ||
56 | - _record: DataComponentRecord, | ||
57 | - dataSourceRecord: DataSource | ||
58 | -) => { | ||
59 | - return { | ||
60 | - layout: { | ||
61 | - ...config, | ||
62 | - } as TextComponentLayout, | ||
63 | - value: { | ||
64 | - name: dataSourceRecord.attributeRename || dataSourceRecord.attribute, | ||
65 | - deviceName: dataSourceRecord.deviceRename || dataSourceRecord.deviceId, | ||
66 | - value: dataSourceRecord.componentInfo.value, | ||
67 | - icon: dataSourceRecord.componentInfo.icon, | ||
68 | - unit: dataSourceRecord.componentInfo.unit, | ||
69 | - updateTime: dataSourceRecord.componentInfo.updateTime, | ||
70 | - fontColor: dataSourceRecord.componentInfo.fontColor, | ||
71 | - iconColor: dataSourceRecord.componentInfo.iconColor, | ||
72 | - } as TextComponentValue, | ||
73 | - }; | ||
74 | -}; |
@@ -68,8 +68,6 @@ | @@ -68,8 +68,6 @@ | ||
68 | }; | 68 | }; |
69 | 69 | ||
70 | const instance = unref(basicVideoPlayEl)?.customInit((options) => { | 70 | const instance = unref(basicVideoPlayEl)?.customInit((options) => { |
71 | - withToken.value = true; | ||
72 | - | ||
73 | if (unref(withToken)) { | 71 | if (unref(withToken)) { |
74 | (options as any).flvjs.config.headers = { | 72 | (options as any).flvjs.config.headers = { |
75 | 'X-Authorization': `Bearer ${isShareMode() ? getShareJwtToken() : getJwtToken()}`, | 73 | 'X-Authorization': `Bearer ${isShareMode() ? getShareJwtToken() : getJwtToken()}`, |