Commit eb9171f649b9b1a1ded3f613d8b04b2008a92ca7
Merge branch 'perf/data-view' into 'main_dev'
perf: 优化大屏公有私有颜色标记&&删除无用代码 See merge request yunteng/thingskit-front!1104
Showing
7 changed files
with
2 additions
and
150 deletions
@@ -153,7 +153,7 @@ | @@ -153,7 +153,7 @@ | ||
153 | <template #renderItem="{ item }: BasicCardListRenderItem<BigScreenCenterItemsModel>"> | 153 | <template #renderItem="{ item }: BasicCardListRenderItem<BigScreenCenterItemsModel>"> |
154 | <Card | 154 | <Card |
155 | :style="{ | 155 | :style="{ |
156 | - '--viewType': item.viewType === ViewType.PUBLIC_VIEW ? '#1890ff' : '#faad14', | 156 | + '--viewType': item.viewType === ViewType.PUBLIC_VIEW ? '#faad14' : '#1890ff', |
157 | }" | 157 | }" |
158 | class="card-container" | 158 | class="card-container" |
159 | > | 159 | > |
1 | -import { ReceiveTsSubCmdsGroupMessageType } from '../index.type'; | 1 | +import { ReceiveTsSubCmdsGroupMessageType } from './socket/useSocket.type'; |
2 | 2 | ||
3 | export const useReceiveMessage = () => { | 3 | export const useReceiveMessage = () => { |
4 | const forEachGroupMessage = ( | 4 | const forEachGroupMessage = ( |
src/views/visual/packages/template/config.ts
deleted
100644 → 0
1 | -import cloneDeep from 'lodash-es/cloneDeep'; | ||
2 | -import { ComponentConfig } from '.'; | ||
3 | -import { | ||
4 | - ConfigType, | ||
5 | - CreateComponentType, | ||
6 | - PublicComponentOptions, | ||
7 | - PublicPresetOptions, | ||
8 | -} from '/@/views/visual/packages/index.type'; | ||
9 | -import { PublicConfigClass, componentInitConfig } from '/@/views/visual/packages/publicConfig'; | ||
10 | -import { ComponentConfigFieldEnum } from '/@/views/visual/packages/enum'; | ||
11 | - | ||
12 | -export const option: PublicPresetOptions = { | ||
13 | - [ComponentConfigFieldEnum.FONT_COLOR]: '#', | ||
14 | - [ComponentConfigFieldEnum.SHOW_DEVICE_NAME]: false, | ||
15 | -}; | ||
16 | - | ||
17 | -export default class Config extends PublicConfigClass implements CreateComponentType { | ||
18 | - public key: string = ComponentConfig.key; | ||
19 | - | ||
20 | - public attr = { ...componentInitConfig }; | ||
21 | - | ||
22 | - public componentConfig: ConfigType = cloneDeep(ComponentConfig); | ||
23 | - | ||
24 | - public persetOption = cloneDeep(option); | ||
25 | - | ||
26 | - public option: PublicComponentOptions; | ||
27 | - | ||
28 | - constructor(option: PublicComponentOptions) { | ||
29 | - super(); | ||
30 | - this.option = { ...option }; | ||
31 | - } | ||
32 | -} |
src/views/visual/packages/template/config.vue
deleted
100644 → 0
1 | -<script lang="ts" setup> | ||
2 | - import { ComponentConfigFieldEnum } from '/@/views/visual/packages/enum'; | ||
3 | - import { useForm, BasicForm } from '/@/components/Form'; | ||
4 | - import { PublicFormInstaceType } from '/@/views/visual/dataSourceBindPanel/index.type'; | ||
5 | - | ||
6 | - const [register, { getFieldsValue, setFieldsValue, resetFields }] = useForm({ | ||
7 | - schemas: [ | ||
8 | - { | ||
9 | - field: ComponentConfigFieldEnum.FONT_COLOR, | ||
10 | - label: '数值字体颜色', | ||
11 | - component: 'ColorPicker', | ||
12 | - changeEvent: 'update:value', | ||
13 | - componentProps: { | ||
14 | - defaultValue: '#FD7347', | ||
15 | - }, | ||
16 | - }, | ||
17 | - { | ||
18 | - field: ComponentConfigFieldEnum.SHOW_DEVICE_NAME, | ||
19 | - label: '显示设备名称', | ||
20 | - component: 'Checkbox', | ||
21 | - }, | ||
22 | - ], | ||
23 | - showActionButtonGroup: false, | ||
24 | - labelWidth: 120, | ||
25 | - baseColProps: { | ||
26 | - span: 12, | ||
27 | - }, | ||
28 | - }); | ||
29 | - | ||
30 | - const getFormValues = () => { | ||
31 | - return getFieldsValue(); | ||
32 | - }; | ||
33 | - | ||
34 | - const setFormValues = (data: Recordable) => { | ||
35 | - return setFieldsValue(data); | ||
36 | - }; | ||
37 | - | ||
38 | - defineExpose({ | ||
39 | - getFormValues, | ||
40 | - setFormValues, | ||
41 | - resetFormValues: resetFields, | ||
42 | - } as PublicFormInstaceType); | ||
43 | -</script> | ||
44 | - | ||
45 | -<template> | ||
46 | - <BasicForm @register="register" /> | ||
47 | -</template> |
src/views/visual/packages/template/datasource.vue
deleted
100644 → 0
1 | -<script lang="ts" setup> | ||
2 | - import { CreateComponentType } from '/@/views/visual/packages/index.type'; | ||
3 | - import { BasicForm, useForm } from '/@/components/Form'; | ||
4 | - import { | ||
5 | - PublicComponentValueType, | ||
6 | - PublicFormInstaceType, | ||
7 | - } from '/@/views/visual/dataSourceBindPanel/index.type'; | ||
8 | - import { commonDataSourceSchemas } from '../config/common.config'; | ||
9 | - | ||
10 | - defineProps<{ | ||
11 | - values: PublicComponentValueType; | ||
12 | - componentConfig: CreateComponentType; | ||
13 | - }>(); | ||
14 | - | ||
15 | - const [register, { getFieldsValue, setFieldsValue, validate, resetFields }] = useForm({ | ||
16 | - labelWidth: 0, | ||
17 | - showActionButtonGroup: false, | ||
18 | - layout: 'horizontal', | ||
19 | - labelCol: { span: 0 }, | ||
20 | - schemas: commonDataSourceSchemas(), | ||
21 | - }); | ||
22 | - | ||
23 | - const getFormValues = () => { | ||
24 | - return getFieldsValue(); | ||
25 | - }; | ||
26 | - | ||
27 | - const setFormValues = (record: Recordable) => { | ||
28 | - return setFieldsValue(record); | ||
29 | - }; | ||
30 | - | ||
31 | - defineExpose({ | ||
32 | - getFormValues, | ||
33 | - setFormValues, | ||
34 | - validate, | ||
35 | - resetFormValues: resetFields, | ||
36 | - } as PublicFormInstaceType); | ||
37 | -</script> | ||
38 | - | ||
39 | -<template> | ||
40 | - <BasicForm @register="register" /> | ||
41 | -</template> |
src/views/visual/packages/template/index.ts
deleted
100644 → 0
1 | -import { useComponentKeys } from '/@/views/visual/packages/hook/useComponentKeys'; | ||
2 | -import { ConfigType, PackagesCategoryEnum } from '/@/views/visual/packages/index.type'; | ||
3 | - | ||
4 | -const componentKeys = useComponentKeys('componentKeys'); | ||
5 | - | ||
6 | -export const ComponentConfig: ConfigType = { | ||
7 | - ...componentKeys, | ||
8 | - title: '组件名', | ||
9 | - package: PackagesCategoryEnum.TEXT, | ||
10 | -}; |
src/views/visual/packages/template/index.vue
deleted
100644 → 0
1 | -<script lang="ts" setup> | ||
2 | - import { ComponentPropsConfigType } from '/@/views/visual/packages/index.type'; | ||
3 | - import { option } from './config'; | ||
4 | - import { useDataFetch } from '../hook/socket/useSocket'; | ||
5 | - import { DataFetchUpdateFn } from '../hook/socket/useSocket.type'; | ||
6 | - | ||
7 | - const props = defineProps<{ | ||
8 | - config: ComponentPropsConfigType<typeof option>; | ||
9 | - }>(); | ||
10 | - | ||
11 | - const updateFn: DataFetchUpdateFn = (_message) => {}; | ||
12 | - | ||
13 | - useDataFetch(props, updateFn); | ||
14 | -</script> | ||
15 | - | ||
16 | -<template> | ||
17 | - <main class="w-full h-full flex flex-col justify-center items-center"> </main> | ||
18 | -</template> |