Showing
1 changed file
with
4 additions
and
3 deletions
@@ -65,7 +65,8 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | @@ -65,7 +65,8 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | ||
65 | const builtInVariable = ref<BuiltInVariableRecord>() | 65 | const builtInVariable = ref<BuiltInVariableRecord>() |
66 | 66 | ||
67 | const params = reactive<Recordable & { [key in BuiltInVariable]?: any }>({ | 67 | const params = reactive<Recordable & { [key in BuiltInVariable]?: any }>({ |
68 | - [BuiltInVariable.SELECT_TIME_AGGREGATION]: {} | 68 | + [BuiltInVariable.SELECT_TIME_AGGREGATION]: {}, |
69 | + [BuiltInVariable.ATTR_NAME]: [] | ||
69 | }) | 70 | }) |
70 | 71 | ||
71 | const optionsSet = reactive<Recordable>({}) | 72 | const optionsSet = reactive<Recordable>({}) |
@@ -112,7 +113,6 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | @@ -112,7 +113,6 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | ||
112 | if( !organizationId) return | 113 | if( !organizationId) return |
113 | if (!validIsExist(BuiltInVariable.ORGANIZATION_ID)) return | 114 | if (!validIsExist(BuiltInVariable.ORGANIZATION_ID)) return |
114 | optionsSet[BuiltInVariable.ORGANIZATION_ID] = await getOrgList({organizationId}) | 115 | optionsSet[BuiltInVariable.ORGANIZATION_ID] = await getOrgList({organizationId}) |
115 | - console.log(optionsSet[BuiltInVariable.ORGANIZATION_ID]) | ||
116 | } | 116 | } |
117 | 117 | ||
118 | const getDeviceProfileOption = async () => { | 118 | const getDeviceProfileOption = async () => { |
@@ -167,7 +167,6 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | @@ -167,7 +167,6 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | ||
167 | } | 167 | } |
168 | Reflect.deleteProperty(value, BuiltInVariable.SELECT_TIME_AGGREGATION) | 168 | Reflect.deleteProperty(value, BuiltInVariable.SELECT_TIME_AGGREGATION) |
169 | } | 169 | } |
170 | - | ||
171 | return value | 170 | return value |
172 | }) | 171 | }) |
173 | 172 | ||
@@ -235,6 +234,7 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | @@ -235,6 +234,7 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | ||
235 | const attrNameList = unref(optionsSet[BuiltInVariable.KEYS]) | 234 | const attrNameList = unref(optionsSet[BuiltInVariable.KEYS]) |
236 | 235 | ||
237 | params[BuiltInVariable.ATTR_NAME] = value.map((item:any) => attrNameList.find((temp:any)=>temp.identifier==item).name) | 236 | params[BuiltInVariable.ATTR_NAME] = value.map((item:any) => attrNameList.find((temp:any)=>temp.identifier==item).name) |
237 | + | ||
238 | } | 238 | } |
239 | } | 239 | } |
240 | }) | 240 | }) |
@@ -439,6 +439,7 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | @@ -439,6 +439,7 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { | ||
439 | for (const temp of splitKeys) { | 439 | for (const temp of splitKeys) { |
440 | params[temp] = Params[temp] | 440 | params[temp] = Params[temp] |
441 | } | 441 | } |
442 | + params[BuiltInVariable.ATTR_NAME] = Params[BuiltInVariable.ATTR_NAME] | ||
442 | } | 443 | } |
443 | } | 444 | } |
444 | 445 |