Showing
6 changed files
with
19 additions
and
0 deletions
@@ -13,6 +13,7 @@ export const option: PublicPresetOptions = { | @@ -13,6 +13,7 @@ export const option: PublicPresetOptions = { | ||
13 | [ComponentConfigFieldEnum.SHOW_DEVICE_NAME]: false, | 13 | [ComponentConfigFieldEnum.SHOW_DEVICE_NAME]: false, |
14 | [ComponentConfigFieldEnum.UNIT]: 'm', | 14 | [ComponentConfigFieldEnum.UNIT]: 'm', |
15 | [ComponentConfigFieldEnum.FONT_COLOR]: '#fff', | 15 | [ComponentConfigFieldEnum.FONT_COLOR]: '#fff', |
16 | + [ComponentConfigFieldEnum.SHOW_DEVICE_NAME]: false, | ||
16 | [ComponentConfigFieldEnum.FLOWMETER_CONFIG]: { | 17 | [ComponentConfigFieldEnum.FLOWMETER_CONFIG]: { |
17 | [ComponentConfigFieldEnum.BACKGROUND_COLOR]: '#8badcb', | 18 | [ComponentConfigFieldEnum.BACKGROUND_COLOR]: '#8badcb', |
18 | [ComponentConfigFieldEnum.WAVE_FIRST]: '#4579e2', | 19 | [ComponentConfigFieldEnum.WAVE_FIRST]: '#4579e2', |
@@ -49,6 +49,12 @@ | @@ -49,6 +49,12 @@ | ||
49 | component: 'Input', | 49 | component: 'Input', |
50 | defaultValue: option.unit, | 50 | defaultValue: option.unit, |
51 | }, | 51 | }, |
52 | + { | ||
53 | + field: ComponentConfigFieldEnum.SHOW_DEVICE_NAME, | ||
54 | + label: '显示设备名称', | ||
55 | + component: 'Checkbox', | ||
56 | + defaultValue: option.showDeviceName, | ||
57 | + }, | ||
52 | ], | 58 | ], |
53 | showActionButtonGroup: false, | 59 | showActionButtonGroup: false, |
54 | labelWidth: 120, | 60 | labelWidth: 120, |
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | import { computed } from 'vue'; | 5 | import { computed } from 'vue'; |
6 | import { ref } from 'vue'; | 6 | import { ref } from 'vue'; |
7 | import { unref } from 'vue'; | 7 | import { unref } from 'vue'; |
8 | + import { DeviceName } from '/@/views/visual/commonComponents/DeviceName'; | ||
8 | 9 | ||
9 | const props = defineProps<{ | 10 | const props = defineProps<{ |
10 | config: ComponentPropsConfigType<typeof option>; | 11 | config: ComponentPropsConfigType<typeof option>; |
@@ -70,6 +71,7 @@ | @@ -70,6 +71,7 @@ | ||
70 | 71 | ||
71 | <template> | 72 | <template> |
72 | <main class="w-full h-full flex flex-col justify-center items-center relative"> | 73 | <main class="w-full h-full flex flex-col justify-center items-center relative"> |
74 | + <DeviceName :config="config" /> | ||
73 | <svg | 75 | <svg |
74 | class="waves-rect" | 76 | class="waves-rect" |
75 | viewBox="0 0 100 100" | 77 | viewBox="0 0 100 100" |
@@ -49,6 +49,12 @@ | @@ -49,6 +49,12 @@ | ||
49 | component: 'Input', | 49 | component: 'Input', |
50 | defaultValue: option.unit, | 50 | defaultValue: option.unit, |
51 | }, | 51 | }, |
52 | + { | ||
53 | + field: ComponentConfigFieldEnum.SHOW_DEVICE_NAME, | ||
54 | + label: '显示设备名称', | ||
55 | + component: 'Checkbox', | ||
56 | + defaultValue: option.showDeviceName, | ||
57 | + }, | ||
52 | ], | 58 | ], |
53 | showActionButtonGroup: false, | 59 | showActionButtonGroup: false, |
54 | labelWidth: 120, | 60 | labelWidth: 120, |
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | import { computed } from 'vue'; | 5 | import { computed } from 'vue'; |
6 | import { ref } from 'vue'; | 6 | import { ref } from 'vue'; |
7 | import { unref } from 'vue'; | 7 | import { unref } from 'vue'; |
8 | + import { DeviceName } from '/@/views/visual/commonComponents/DeviceName'; | ||
8 | 9 | ||
9 | const props = defineProps<{ | 10 | const props = defineProps<{ |
10 | config: ComponentPropsConfigType<typeof option>; | 11 | config: ComponentPropsConfigType<typeof option>; |
@@ -60,6 +61,7 @@ | @@ -60,6 +61,7 @@ | ||
60 | 61 | ||
61 | <template> | 62 | <template> |
62 | <main class="w-full h-full flex flex-col justify-center items-center relative"> | 63 | <main class="w-full h-full flex flex-col justify-center items-center relative"> |
64 | + <DeviceName :config="config" /> | ||
63 | <svg | 65 | <svg |
64 | class="waves-rect" | 66 | class="waves-rect" |
65 | viewBox="0 0 100 100" | 67 | viewBox="0 0 100 100" |
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | import { ref } from 'vue'; | 5 | import { ref } from 'vue'; |
6 | import { computed } from 'vue'; | 6 | import { computed } from 'vue'; |
7 | import { unref } from 'vue'; | 7 | import { unref } from 'vue'; |
8 | + import { DeviceName } from '/@/views/visual/commonComponents/DeviceName'; | ||
8 | 9 | ||
9 | const props = defineProps<{ | 10 | const props = defineProps<{ |
10 | config: ComponentPropsConfigType<typeof option>; | 11 | config: ComponentPropsConfigType<typeof option>; |
@@ -43,6 +44,7 @@ | @@ -43,6 +44,7 @@ | ||
43 | 44 | ||
44 | <template> | 45 | <template> |
45 | <main class="w-full h-full flex flex-col justify-center items-center relative"> | 46 | <main class="w-full h-full flex flex-col justify-center items-center relative"> |
47 | + <DeviceName :config="config" /> | ||
46 | <svg class="flowmeter-thermometer" viewBox="0 0 200 250" xmlns="http://www.w3.org/2000/svg"> | 48 | <svg class="flowmeter-thermometer" viewBox="0 0 200 250" xmlns="http://www.w3.org/2000/svg"> |
47 | <defs> | 49 | <defs> |
48 | <radialGradient id="thermometerdiv_meter_2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> | 50 | <radialGradient id="thermometerdiv_meter_2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> |