|
@@ -1,30 +1,46 @@
|
|
|
-export const iconGroups = [
|
|
|
+type IconItem = {
|
|
|
+ wall?: boolean;
|
|
|
+ icon: string;
|
|
|
+ name: string;
|
|
|
+ color?: string
|
|
|
+ parse?: { fill?: string; stroke?: string };
|
|
|
+};
|
|
|
+type IconGroup = {
|
|
|
+ name: string,
|
|
|
+ children: {
|
|
|
+ name: string,
|
|
|
+ children: IconItem[]
|
|
|
+ }[]
|
|
|
+}
|
|
|
+
|
|
|
+export const iconGroups: IconGroup[] = [
|
|
|
{
|
|
|
name: "常用名称",
|
|
|
children: [
|
|
|
{
|
|
|
name: "门",
|
|
|
children: [
|
|
|
- { wall: true, icon: "cad-men", name: "门" },
|
|
|
- { wall: true, icon: "cad-shuangkaimen", name: "双开门" },
|
|
|
- { wall: true, icon: "cad-yimen", name: "移门" },
|
|
|
- { wall: true, icon: "cad-yakou", name: "哑口" },
|
|
|
+ { wall: true, icon: "men_l", name: "门" },
|
|
|
+ { wall: true, icon: "men", name: "门" },
|
|
|
+ { wall: true, icon: "shuangkaimen", name: "双开门" },
|
|
|
+ { wall: true, icon: "yimen", name: "移门" },
|
|
|
+ { wall: true, icon: "yakou", name: "哑口" },
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
name: "窗",
|
|
|
children: [
|
|
|
- { wall: true, icon: "cad-chuang", name: "窗" },
|
|
|
- { wall: true, icon: "cad-piaochuang", name: "飘窗" },
|
|
|
- { wall: true, icon: "cad-luodichuang", name: "落地窗" },
|
|
|
+ { wall: true, icon: "chuang", name: "窗" },
|
|
|
+ { wall: true, icon: "piaochuang", name: "飘窗" },
|
|
|
+ { wall: true, icon: "luodichuang", name: "落地窗" },
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
name: "构件",
|
|
|
children: [
|
|
|
- { icon: "cad-zhuzi", name: "柱子" },
|
|
|
- { icon: "cad-yandao", name: "烟道" },
|
|
|
- { icon: "cad-loudao", name: "楼道" },
|
|
|
+ { icon: "zhuzi", name: "柱子" },
|
|
|
+ { icon: "yandao", name: "烟道" },
|
|
|
+ { icon: "loudao", name: "楼道" },
|
|
|
],
|
|
|
},
|
|
|
],
|
|
@@ -112,13 +128,42 @@ export const iconGroups = [
|
|
|
],
|
|
|
},
|
|
|
];
|
|
|
+
|
|
|
+export const getIconItem = (icon: string) => {
|
|
|
+ for (const group of iconGroups) {
|
|
|
+ for (const itemGroup of group.children) {
|
|
|
+ for (const item of itemGroup.children) {
|
|
|
+ if (item.icon === icon) {
|
|
|
+ return item;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
export const aiIconMap = {
|
|
|
- SingleDoor: "cad-men",
|
|
|
- DoubleDoor: "cad-shuangkaimen",
|
|
|
- SlideDoor: "cad-yimen",
|
|
|
- Pass: "cad-yakou",
|
|
|
- SingleWindow: "cad-chuang",
|
|
|
- BayWindow: "cad-piaochuang",
|
|
|
- FrenchWindow: "cad-luodichuang",
|
|
|
+ SingleDoor: "men",
|
|
|
+ DoubleDoor: "shuangkaimen",
|
|
|
+ SlideDoor: "yimen",
|
|
|
+ Pass: "yakou",
|
|
|
+ SingleWindow: "chuang",
|
|
|
+ BayWindow: "piaochuang",
|
|
|
+ FrenchWindow: "luodichuang",
|
|
|
Chair: "Chair",
|
|
|
};
|
|
|
+export const styleIconMap = {
|
|
|
+ "style-4": "zhiwen_o",
|
|
|
+ "style-5": "youzuji_o",
|
|
|
+ "style-6": "zuozuji_o",
|
|
|
+ "style-7": "xieyin_o",
|
|
|
+ "style-8": "xuepo_o",
|
|
|
+ "style-9": "xueji_o",
|
|
|
+ "style-10": "shitiz_o",
|
|
|
+ "style-11": "shitib_o",
|
|
|
+ "style-12": "shitifuhao_o",
|
|
|
+ "style-13": "buqiang_o",
|
|
|
+ "style-14": "shouqiang_o",
|
|
|
+ "style-15": "dantou_o",
|
|
|
+ "style-16": "danke_o",
|
|
|
+ "style-17": "chelunhenji_o",
|
|
|
+};
|