Commit 86f47acbcde2c81b2be768539937274150eace32
1 parent
93106bcf
fix: DEFECT-1002 query device profile not with device type field
Showing
2 changed files
with
10 additions
and
2 deletions
... | ... | @@ -90,6 +90,13 @@ export const deviceProfile = () => { |
90 | 90 | }); |
91 | 91 | }; |
92 | 92 | |
93 | +export const queryDeviceProfileBy = (params: Recordable) => { | |
94 | + return defHttp.get<DeviceRecord[]>({ | |
95 | + url: DeviceManagerApi.DEVICE_PROFILE_URL_ME, | |
96 | + params, | |
97 | + }); | |
98 | +}; | |
99 | + | |
93 | 100 | // 创建或编辑设备 |
94 | 101 | export const createOrEditDevice = (data) => { |
95 | 102 | return defHttp.post({ | ... | ... |
... | ... | @@ -9,7 +9,7 @@ import { scheduleOptions } from './formatData'; |
9 | 9 | import { copyTransFun } from '/@/utils/fnUtils'; |
10 | 10 | import { numberAndNonegativeRule } from '/@/utils/rules'; |
11 | 11 | import { findDictItemByCode } from '/@/api/system/dict'; |
12 | -import { deviceProfile } from '/@/api/device/deviceManager'; | |
12 | +import { deviceProfile, queryDeviceProfileBy } from '/@/api/device/deviceManager'; | |
13 | 13 | import { getModelServices } from '/@/api/device/modelOfMatter'; |
14 | 14 | import { ModelOfMatterParams } from '/@/api/device/model/modelOfMatterModel'; |
15 | 15 | import useCommonFun from '../hooks/useCommonFun'; |
... | ... | @@ -237,8 +237,9 @@ export const trigger_condition_schema: FormSchema[] = [ |
237 | 237 | componentProps: ({ formActionType, formModel }) => { |
238 | 238 | const { updateSchema, setFieldsValue } = formActionType; |
239 | 239 | const deviceType = formModel['deviceType']; |
240 | + | |
240 | 241 | return { |
241 | - api: deviceProfile, | |
242 | + api: queryDeviceProfileBy, | |
242 | 243 | params: { |
243 | 244 | deviceType, |
244 | 245 | }, | ... | ... |