Commit 7a966a16e7206d6520bc42302d2ab70e1edacdd0
Merge branch 'ww' into 'main'
perf: page style See merge request huang/yun-teng-iot-front!434
Showing
4 changed files
with
9 additions
and
8 deletions
1 | 1 | import { RadioRecord } from '../../../views/visual/board/detail/config/util'; |
2 | 2 | import { DeviceTypeEnum } from '../../device/model/deviceModel'; |
3 | 3 | import { DataType } from '../../device/model/modelOfMatterModel'; |
4 | +import { DataTypeEnum } from '/@/components/Form/src/externalCompns/components/StructForm/config'; | |
4 | 5 | |
5 | 6 | export interface AddDataBoardParams { |
6 | 7 | name: string; |
... | ... | @@ -152,7 +153,7 @@ export interface ComponentInfoDetail { |
152 | 153 | |
153 | 154 | export interface DeviceAttributeParams { |
154 | 155 | deviceProfileId: string; |
155 | - dataType?: DataType; | |
156 | + dataType?: DataTypeEnum; | |
156 | 157 | } |
157 | 158 | |
158 | 159 | export interface DeviceAttributeRecord { | ... | ... |
... | ... | @@ -188,11 +188,6 @@ |
188 | 188 | dataSource.value = props.record.record.dataSource.map((item) => { |
189 | 189 | const id = buildUUID(); |
190 | 190 | |
191 | - dataSource.value.push({ | |
192 | - id, | |
193 | - ...item, | |
194 | - }); | |
195 | - | |
196 | 191 | nextTick(() => { |
197 | 192 | (dataSourceEl[id] as FormActionType).setFieldsValue(item); |
198 | 193 | (dataSourceEl[id] as FormActionType).clearValidate(); |
... | ... | @@ -297,7 +292,7 @@ |
297 | 292 | |
298 | 293 | <section ref="formListEl"> |
299 | 294 | <div v-for="item in dataSource" :data-id="item.id" :key="item.id" class="flex bg-light-50"> |
300 | - <div class="w-24 text-right flex right justify-end"> 选择设备 </div> | |
295 | + <div class="w-24 text-right flex justify-end"> 选择设备 </div> | |
301 | 296 | <div class="pl-2 flex-auto"> |
302 | 297 | <component |
303 | 298 | :frontId="$props.frontId" | ... | ... |
... | ... | @@ -8,6 +8,7 @@ import { getDeviceProfile } from '/@/api/alarm/position'; |
8 | 8 | import { getModelServices } from '/@/api/device/modelOfMatter'; |
9 | 9 | import { findDictItemByCode } from '/@/api/system/dict'; |
10 | 10 | import { DeviceTypeEnum } from '/@/api/device/model/deviceModel'; |
11 | +import { DataTypeEnum } from '/@/components/Form/src/externalCompns/components/StructForm/config'; | |
11 | 12 | |
12 | 13 | export enum BasicConfigField { |
13 | 14 | NAME = 'name', |
... | ... | @@ -263,7 +264,7 @@ export const dataSourceSchema = (frontId?: FrontComponent): FormSchema[] => { |
263 | 264 | if (deviceProfileId) { |
264 | 265 | return await getDeviceAttribute({ |
265 | 266 | deviceProfileId, |
266 | - dataType: isControlComponent(frontId!) ? 'BOOL' : undefined, | |
267 | + dataType: isControlComponent(frontId!) ? DataTypeEnum.IS_BOOL : undefined, | |
267 | 268 | }); |
268 | 269 | } |
269 | 270 | } catch (error) {} | ... | ... |