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