Commit ecacbce6b9ae8475fdd54441ab2cf5bdd85ee1b0

Authored by xp.Huang
2 parents 654802b0 104beb45

Merge branch 'fix/DEFECT-1304' into 'main_dev'

fix: DEFECT-1304 修复流量计组件可显示设备名称

See merge request yunteng/thingskit-front!628
... ... @@ -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>;
... ... @@ -53,6 +54,7 @@
53 54
54 55 <template>
55 56 <main class="w-full h-full flex flex-col justify-center items-center relative">
  57 + <DeviceName :config="config" />
56 58 <svg class="flowmeter-thermometer" viewBox="0 0 200 250" xmlns="http://www.w3.org/2000/svg">
57 59 <defs>
58 60 <radialGradient id="thermometerdiv_meter_2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
... ...