diff --git a/hx-ai-intelligent/src/api/index.ts b/hx-ai-intelligent/src/api/index.ts index 9f32029..fa25e6e 100644 --- a/hx-ai-intelligent/src/api/index.ts +++ b/hx-ai-intelligent/src/api/index.ts @@ -45,19 +45,9 @@ export const dict = async ({ export const getAllEnum = async ({ api = `${BASE_URL}/operation/enum/getAllEnum`, params = {}, - keyField = 'dicKey', - transform = (res: any) => res, }: dictHttpConfig) => { - const dictMap = JSON.parse(sessionStorage.getItem('dictMap') || '{}') as Object; - const key = get(params, keyField) as keyof typeof dictMap; - - if (!dictMap.hasOwnProperty(key)) { - const res = await http.post(api, params); - const options = get(transform(res), `data.${key}`); - dictMap[key] = options; - sessionStorage.setItem('dictMap', JSON.stringify(dictMap)); - } - return Promise.resolve({ data: { data: get(dictMap, key) } }); + const res = await http.post(api, params); + return Promise.resolve(res); }; @@ -67,17 +57,7 @@ export const getAllEnum = async ({ export const getEnum = async ({ api = `${BASE_URL}/operation/enum/getEnum`, params = {}, - keyField = 'dicKey', - transform = (res: any) => res, }: dictHttpConfig) => { - const dictMap = JSON.parse(sessionStorage.getItem('dictMap') || '{}') as Object; - const key = get(params, keyField) as keyof typeof dictMap; - - if (!dictMap.hasOwnProperty(key)) { - const res = await http.post(api, params); - const options = get(transform(res), `data.${key}`); - dictMap[key] = options; - sessionStorage.setItem('dictMap', JSON.stringify(dictMap)); - } - return Promise.resolve({ data: { data: get(dictMap, key) } }); + const res = await http.post(api, params); + return Promise.resolve(res); }; \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue index 4101051..cf3de9a 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue @@ -49,7 +49,12 @@ :maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }"> - + @@ -83,6 +88,7 @@ import { // 初始化 ======================================================= onMounted(() => { + // 获得分区与线路的结构 http.get(lightingManage.getArea, { projectId: 'HLlmTZp8' }).then(res => { const data = res.data floorData.value = data diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue index 3882694..c0fb56b 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue @@ -81,9 +81,10 @@
-
@@ -212,7 +213,6 @@