Commit ecacbce6b9ae8475fdd54441ab2cf5bdd85ee1b0
Merge branch 'fix/DEFECT-1304' into 'main_dev'
fix: DEFECT-1304 修复流量计组件可显示设备名称 See merge request yunteng/thingskit-front!628
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>; |
@@ -53,6 +54,7 @@ | @@ -53,6 +54,7 @@ | ||
53 | 54 | ||
54 | <template> | 55 | <template> |
55 | <main class="w-full h-full flex flex-col justify-center items-center relative"> | 56 | <main class="w-full h-full flex flex-col justify-center items-center relative"> |
57 | + <DeviceName :config="config" /> | ||
56 | <svg class="flowmeter-thermometer" viewBox="0 0 200 250" xmlns="http://www.w3.org/2000/svg"> | 58 | <svg class="flowmeter-thermometer" viewBox="0 0 200 250" xmlns="http://www.w3.org/2000/svg"> |
57 | <defs> | 59 | <defs> |
58 | <radialGradient id="thermometerdiv_meter_2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> | 60 | <radialGradient id="thermometerdiv_meter_2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> |