diff --git a/src/assets/images/chart/tables/TableList1.png b/src/assets/images/chart/tables/TableList1.png new file mode 100644 index 00000000..202fc96a Binary files /dev/null and b/src/assets/images/chart/tables/TableList1.png differ diff --git a/src/assets/images/icons/snow.png b/src/assets/images/icons/snow.png new file mode 100644 index 00000000..37b994d3 Binary files /dev/null and b/src/assets/images/icons/snow.png differ diff --git a/src/packages/components/Decorates/Borders/BorderCustom2/config.ts b/src/packages/components/Decorates/Borders/BorderCustom2/config.ts new file mode 100644 index 00000000..c5ed0a32 --- /dev/null +++ b/src/packages/components/Decorates/Borders/BorderCustom2/config.ts @@ -0,0 +1,27 @@ +import { PublicConfigClass } from '@/packages/public' +import { CreateComponentType } from '@/packages/index.d' +import { BorderCustom2Config } from './index' +import cloneDeep from 'lodash/cloneDeep' +// import logo from '@/assets/logo.png' +import { CurrentSourceEnum } from '@/store/modules/chartEditStore/chartEditStore.d' + +export const option = { + // // 图片路径 + // dataset: '', + // // 适应方式 + // fit: 'contain', + // // 圆角 + // borderRadius: 0 + dataset: {status: 0} +} + +export default class Config extends PublicConfigClass implements CreateComponentType +{ + constructor() { + super(); + this.commonData.currentSource = CurrentSourceEnum.SINGLEPOINT + } + public key = BorderCustom2Config.key + public chartConfig = cloneDeep(BorderCustom2Config) + public option = cloneDeep(option) +} diff --git a/src/packages/components/Decorates/Borders/BorderCustom2/config.vue b/src/packages/components/Decorates/Borders/BorderCustom2/config.vue new file mode 100644 index 00000000..8f424483 --- /dev/null +++ b/src/packages/components/Decorates/Borders/BorderCustom2/config.vue @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/src/packages/components/Decorates/Borders/BorderCustom2/index.ts b/src/packages/components/Decorates/Borders/BorderCustom2/index.ts new file mode 100644 index 00000000..083f639a --- /dev/null +++ b/src/packages/components/Decorates/Borders/BorderCustom2/index.ts @@ -0,0 +1,15 @@ +import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d' +import { ChatCategoryEnum, ChatCategoryEnumName } from '@/packages/components/Decorates/index.d' + +export const BorderCustom2Config: ConfigType = { + key: 'BorderCustom2', + chartKey: 'VBorderCustom2', + conKey: 'VCBorderCustom2', + // conDataKey: 'VCDBorderCustom2', + title: '边框-自定义2', + category: ChatCategoryEnum.BORDER, + categoryName: ChatCategoryEnumName.BORDER, + package: PackagesCategoryEnum.DECORATES, + chartFrame: ChartFrameEnum.COMMON, + image: 'BorderCustom1.png' +} diff --git a/src/packages/components/Decorates/Borders/BorderCustom2/index.vue b/src/packages/components/Decorates/Borders/BorderCustom2/index.vue new file mode 100644 index 00000000..9cee7a43 --- /dev/null +++ b/src/packages/components/Decorates/Borders/BorderCustom2/index.vue @@ -0,0 +1,52 @@ + + + + + \ No newline at end of file diff --git a/src/packages/components/Decorates/Borders/index.ts b/src/packages/components/Decorates/Borders/index.ts index 059f4ae2..e96b2cac 100644 --- a/src/packages/components/Decorates/Borders/index.ts +++ b/src/packages/components/Decorates/Borders/index.ts @@ -1,4 +1,5 @@ import { BorderCustom1Config } from './BorderCustom1/index'; +import { BorderCustom2Config } from './BorderCustom2/index'; import { Border01Config } from './Border01/index' import { Border02Config } from './Border02/index' import { Border03Config } from './Border03/index' @@ -15,6 +16,7 @@ import { Border13Config } from './Border13/index' export default [ BorderCustom1Config, + BorderCustom2Config, Border01Config, Border02Config, Border03Config, diff --git a/src/packages/components/Informations/Texts/TextCommon/config.ts b/src/packages/components/Informations/Texts/TextCommon/config.ts index 224c2a88..75c3be95 100644 --- a/src/packages/components/Informations/Texts/TextCommon/config.ts +++ b/src/packages/components/Informations/Texts/TextCommon/config.ts @@ -29,6 +29,7 @@ export const option = { linkHead: 'http://', dataset: '我是文本', showUnit: false, + showStatusColor: false, fontSize: 20, fontColor: '#ffffff', paddingX: 10, diff --git a/src/packages/components/Informations/Texts/TextCommon/config.vue b/src/packages/components/Informations/Texts/TextCommon/config.vue index a322585f..c7b57729 100644 --- a/src/packages/components/Informations/Texts/TextCommon/config.vue +++ b/src/packages/components/Informations/Texts/TextCommon/config.vue @@ -35,6 +35,12 @@ + + + + 展示状态颜色,将覆盖原颜色 + + diff --git a/src/packages/components/Informations/Texts/TextCommon/index.vue b/src/packages/components/Informations/Texts/TextCommon/index.vue index eb0928df..95fcb53e 100644 --- a/src/packages/components/Informations/Texts/TextCommon/index.vue +++ b/src/packages/components/Informations/Texts/TextCommon/index.vue @@ -2,7 +2,7 @@
@@ -25,6 +25,27 @@ import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore import { option as configOption } from './config' import { useChartCommonData } from '@/hooks' import { resultType } from '@/store/modules/chartEditStore/chartEditStore.d' +import {useOriginStore} from "@/store/modules/originStore/originStore"; + +const originStore = useOriginStore() +const node_status = originStore?.getOriginStore?.user?.systemConstant?.node_status + +const computeColor = (status: number | undefined) => { + type ItemType = { + value: string, + remark: string, + label: string + } + if(node_status.length && typeof status === 'number') { + return node_status.find((_: ItemType) => _.value == status.toString()) + } + else { + return { + remark: '#aaaaaa', + label: '无' + } + } +} const props = defineProps({ chartConfig: { @@ -52,15 +73,17 @@ const { const option = shallowReactive({ dataset: configOption.dataset, - showUnit: configOption.showUnit + showUnit: configOption.showUnit, + showStatusColor: configOption.showStatusColor }) // 手动更新 watch( - [() => props.chartConfig.option.dataset, () => props.chartConfig.option.showUnit], - ([newData, newShowUnit]: [any, boolean]) => { + [() => props.chartConfig.option.dataset, () => props.chartConfig.option.showUnit, () => props.chartConfig.option.showStatusColor], + ([newData, newShowUnit, showStatusColor]: [any, boolean, boolean]) => { option.dataset = newData option.showUnit = newShowUnit + option.showStatusColor = showStatusColor }, { immediate: true, @@ -71,6 +94,7 @@ watch( const dataEnable = ref() const dataValue = ref() const dataUnit = ref() +const dataStatus = ref() watch( () => props.chartConfig.commonData, newData => { @@ -79,6 +103,7 @@ watch( dataEnable.value = data.enable dataValue.value = data.result.value dataUnit.value = data.result.unit + dataStatus.value = data.result.status } catch (error) { console.log(error) } diff --git a/src/packages/components/Tables/Tables/TableList1/config.ts b/src/packages/components/Tables/Tables/TableList1/config.ts new file mode 100644 index 00000000..e71c8558 --- /dev/null +++ b/src/packages/components/Tables/Tables/TableList1/config.ts @@ -0,0 +1,33 @@ +import { PublicConfigClass } from '@/packages/public' +import { CreateComponentType } from '@/packages/index.d' +import { TableList1Config } from './index' +import cloneDeep from 'lodash/cloneDeep' +// import logo from '@/assets/logo.png' + +export const option = { + // // 图片路径 + // dataset: '', + // // 适应方式 + // fit: 'contain', + // // 圆角 + // borderRadius: 0 + dataset: { + "dimensions": [], + "source": [] + }, + timeout: 3000 +} + +export default class Config extends PublicConfigClass implements CreateComponentType +{ + constructor() { + super(); + this.request.requestInterval = 15 + } + public key = TableList1Config.key + public chartConfig = cloneDeep(TableList1Config) + public option = cloneDeep(option) + // public customData = cloneDeep({ + // showInterval: true, + // }) +} diff --git a/src/packages/components/Tables/Tables/TableList1/config.vue b/src/packages/components/Tables/Tables/TableList1/config.vue new file mode 100644 index 00000000..481c7f92 --- /dev/null +++ b/src/packages/components/Tables/Tables/TableList1/config.vue @@ -0,0 +1,33 @@ + + + + + \ No newline at end of file diff --git a/src/packages/components/Tables/Tables/TableList1/index.ts b/src/packages/components/Tables/Tables/TableList1/index.ts new file mode 100644 index 00000000..635ef052 --- /dev/null +++ b/src/packages/components/Tables/Tables/TableList1/index.ts @@ -0,0 +1,17 @@ +import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d' +import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d' + + +export const TableList1Config: ConfigType = { + key: 'TableList1', + chartKey: 'VTableList1', + conKey: 'VCTableList1', + // // VCD开头 + // conDataKey: 'VCDTableList1', + title: '列表', + category: ChatCategoryEnum.TABLE, + categoryName: ChatCategoryEnumName.TABLE, + package: PackagesCategoryEnum.TABLES, + chartFrame: ChartFrameEnum.COMMON, + image: 'TableList1.png' +} diff --git a/src/packages/components/Tables/Tables/TableList1/index.vue b/src/packages/components/Tables/Tables/TableList1/index.vue new file mode 100644 index 00000000..e805b4b4 --- /dev/null +++ b/src/packages/components/Tables/Tables/TableList1/index.vue @@ -0,0 +1,164 @@ + + + + + \ No newline at end of file diff --git a/src/packages/components/Tables/Tables/index.ts b/src/packages/components/Tables/Tables/index.ts index fb58af5c..fc829ff3 100644 --- a/src/packages/components/Tables/Tables/index.ts +++ b/src/packages/components/Tables/Tables/index.ts @@ -1,5 +1,6 @@ import { TableListConfig } from './TableList' import { TableScrollBoardConfig } from './TableScrollBoard' import { TablesBasicConfig } from "./TablesBasic/index"; +import { TableList1Config } from './TableList1' -export default [TableScrollBoardConfig, TablesBasicConfig] +export default [TableScrollBoardConfig, TablesBasicConfig, TableList1Config] diff --git a/src/views/chart/ContentConfigurations/components/ChartDataV2/index.vue b/src/views/chart/ContentConfigurations/components/ChartDataV2/index.vue index 9e4a0c46..b45c0e07 100644 --- a/src/views/chart/ContentConfigurations/components/ChartDataV2/index.vue +++ b/src/views/chart/ContentConfigurations/components/ChartDataV2/index.vue @@ -81,6 +81,8 @@ import { TextCommonConfig } from "@/packages/components/Informations/Texts/TextC import { TextGradientConfig } from "@/packages/components/Informations/Texts/TextGradient/index"; import { WaterPoloConfig } from "@/packages/components/Charts/Mores/WaterPolo/index"; import { DashboardConfig } from '@/packages/components/CustomComponents/CustomComponents/Dashboard/index' +import { BorderCustom2Config } from '@/packages/components/Decorates/Borders/BorderCustom2/index' + // const ChartDataStatic = loadAsyncComponent(() => import('./components/ChartDataStatic/index.vue')) const { targetData } = useTargetData() as { targetData: Ref } @@ -106,6 +108,7 @@ const IsCommonSingle = computed(() => { TextGradientConfig, WaterPoloConfig, DashboardConfig, + BorderCustom2Config, ] const { package:packageStr, category, key } = targetData.value.chartConfig const flag = singleCharArr.some(_ => {