Commit 7a966a16e7206d6520bc42302d2ab70e1edacdd0

Authored by xp.Huang
2 parents 5b271c79 c476dbfc

Merge branch 'ww' into 'main'

perf: page style

See merge request huang/yun-teng-iot-front!434
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 {
... ...
... ... @@ -276,4 +276,8 @@
276 276 .configuration-list:deep(.ant-list-pagination) {
277 277 height: 24px;
278 278 }
  279 +
  280 + .configuration-list:deep(.ant-list-empty-text) {
  281 + @apply w-full h-full flex justify-center items-center;
  282 + }
279 283 </style>
... ...
... ... @@ -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) {}
... ...