Commit 19f40b52aa423c349442a0ab1e60b57c2156b438

Authored by loveumiko
1 parent d3da2bfb

fix: 修改数据源类型和取值

... ... @@ -2,6 +2,7 @@ import type { NodeDataType } from '@/api/node/model'
2 2
3 3 export interface ProductAndDevice {
4 4 name: string
  5 + profileName?: string
5 6 profileId: string
6 7 deviceList: {
7 8 deviceId: string
... ...
... ... @@ -86,7 +86,13 @@ export interface NodeDataDataSourceJsonType {
86 86 chartOption?: ChartOptionType
87 87 videoOption?: VideoOptionType
88 88 alarmListOption?: AlarmListOptionType
89   -
  89 + deviceInfo?: {
  90 + code?: string
  91 + transportType?: string
  92 + deviceType?: string
  93 + deviceProfileId?: string
  94 + label?: string
  95 + }
90 96 circularFlowMeterOption?: FlowMeterOptionType// 圆形水球图数据暂定any
91 97 additional?: any// 圆形水球图颜色配置数据暂定any
92 98 rectFlowMeterOption?: FlowMeterOptionType// 方形水球图颜色配置数据暂定any
... ...
... ... @@ -25,9 +25,7 @@ export const formSchemas = (componentKey?: string): FormSchema[] => {
25 25 required: !!isTemplate,
26 26 componentProps: ({ formModel }) => {
27 27 return {
28   - options: (unref(contentDataStore.getProductAndDevice) || []).map((item: ProductAndDevice) => ({ label: item.name, value: item.profileId })),
29   - // labelField: 'name',
30   - // valueField: 'profileId',
  28 + options: (unref(contentDataStore.getProductAndDevice) || []).map((item: ProductAndDevice) => ({ label: item.profileName || item.name, value: item.profileId })),
31 29 placeholder: '请选择产品',
32 30 onSelect(value: string) {
33 31 formModel[ContentDataFieldsEnum.DEVICE_PROFILE_ID] = value
... ...