|
@ -1,5 +1,5 @@ |
|
|
import type { Liquid } from "@/services/liquid/liquidManage"; |
|
|
import type { Liquid } from "@/services/liquid/liquidManage"; |
|
|
import type { ConfigItem, Container } from "@/services/sysConfig/sysConfig"; |
|
|
|
|
|
|
|
|
import type { ConfigItem, ConfigSubItem, Container } from "@/services/sysConfig/sysConfig"; |
|
|
import { defineStore } from "pinia"; |
|
|
import { defineStore } from "pinia"; |
|
|
import { computed, ref } from "vue"; |
|
|
import { computed, ref } from "vue"; |
|
|
import * as R from "ramda"; |
|
|
import * as R from "ramda"; |
|
@ -55,6 +55,17 @@ export const useSettingStore = defineStore("setting", () => { |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const heatAreaHardwareIdMap = computed(() => { |
|
|
|
|
|
const heatAreas = (configs.value || []).find(c => c.code === "heat_area")?.children || []; |
|
|
|
|
|
return R.reduce<ConfigSubItem, { [p: string]: ConfigSubItem }>( |
|
|
|
|
|
(acc, curr) => { |
|
|
|
|
|
acc[curr.hardwareId] = curr; |
|
|
|
|
|
return acc; |
|
|
|
|
|
}, |
|
|
|
|
|
{}, |
|
|
|
|
|
heatAreas |
|
|
|
|
|
); |
|
|
|
|
|
}); |
|
|
const actionAreaConfig = computed(() => { |
|
|
const actionAreaConfig = computed(() => { |
|
|
if (!configs.value) return { valueObj: { x: 0, y: 0, z: 0 } }; |
|
|
if (!configs.value) return { valueObj: { x: 0, y: 0, z: 0 } }; |
|
|
const c = configs.value.find(c => c.code === "solution_area")?.children[0]; |
|
|
const c = configs.value.find(c => c.code === "solution_area")?.children[0]; |
|
@ -90,6 +101,7 @@ export const useSettingStore = defineStore("setting", () => { |
|
|
heatContainerWithLiquid, |
|
|
heatContainerWithLiquid, |
|
|
heatContainers, |
|
|
heatContainers, |
|
|
availableLiquids, |
|
|
availableLiquids, |
|
|
|
|
|
heatAreaHardwareIdMap, |
|
|
setLiquidList, |
|
|
setLiquidList, |
|
|
setContainerConf, |
|
|
setContainerConf, |
|
|
setConfigs, |
|
|
setConfigs, |
|
|