123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- import { LineIconData } from "@/core/components/line-icon";
- export type IconItem = {
- wall?: boolean;
- icon: string;
- name: string;
- color?: string;
- parse?: {
- key?: string;
- fill?: string;
- stroke?: string;
- type?: LineIconData["type"];
- height?: number;
- width?: number;
- };
- };
- export type IconGroup = {
- name: string;
- children: {
- name: string;
- children: IconItem[];
- }[];
- };
- const traceIcons = [
- { icon: "zhiwen_o", name: "手印" },
- { icon: "zuozuji_o", name: "脚印" },
- { icon: "youzuji_o", name: "脚印" },
- { icon: "xieyin_o", name: "鞋印" },
- { icon: "chelunhenji_o", name: "车轮印" },
- { icon: "dantou_o", name: "弹头" },
- { icon: "danke_o", name: "弹壳" },
- { icon: "shouqiang_o", name: "手枪" },
- { icon: "buqiang_o", name: "步枪" },
- {
- icon: "xuepo_o",
- name: "血泊",
- color: "#DD2C2C",
- parse: { fill: "#DD2C2C", stroke: undefined },
- },
- {
- icon: "xueji_o",
- name: "血迹",
- color: "#DD2C2C",
- parse: { fill: "#DD2C2C", stroke: undefined },
- },
- { parse: { key: "trace" }, icon: "shitiz_o", name: "尸体正面" },
- { parse: { key: "trace" }, icon: "shitib_o", name: "尸体背面" },
- { parse: { key: "trace" }, icon: "shitifuhao_o", name: "尸体" },
- { parse: { key: "trace" }, icon: "handprint", name: "手印痕迹" },
- { parse: { key: "trace" }, icon: "footprint", name: "足迹痕迹" },
- {
- parse: { key: "trace" },
- icon: "wrenchAndScrewdriver",
- name: "工具痕迹",
- },
- { parse: { key: "trace" }, icon: "video", name: "视听物证" },
- { parse: { key: "trace" }, icon: "virus", name: "生物物证" },
- { parse: { key: "trace" }, icon: "cartridge", name: "枪弹痕迹" },
- { parse: { key: "trace" }, icon: "poison", name: "毒化物证" },
- {
- parse: { key: "trace" },
- icon: "physics_and_chemistry",
- name: "理化物证",
- },
- { parse: { key: "trace" }, icon: "folder_close", name: "文捡物证" },
- { parse: { key: "trace" }, icon: "check", name: "特殊物证" },
- {
- parse: { key: "trace" },
- icon: "case_other",
- name: "其他物证",
- },
- { parse: { key: "trace" }, icon: "electronic", name: "电子物证" },
- { parse: { key: "trace" }, icon: "cube", name: "提取物品" },
- { parse: { key: "trace" }, icon: "corpse", name: "尸体" },
- ];
- export const iconGroups: IconGroup[] = [
- {
- name: "常用名称",
- children: [
- {
- name: "门",
- children: [
- {
- wall: true,
- icon: "men_l",
- name: "开门",
- parse: { type: "align-bottom" },
- },
- // {
- // wall: true,
- // icon: "men",
- // name: "右开门",
- // parse: { type: "align-bottom" },
- // },
- {
- wall: true,
- icon: "shuangkaimen",
- name: "双开门",
- parse: { type: "align-bottom" },
- },
- {
- wall: true,
- icon: "yimen",
- name: "移门",
- parse: { type: "full" },
- },
- { wall: true, icon: "yakou", name: "哑口", parse: { type: "full" } },
- ],
- },
- {
- name: "窗",
- children: [
- { wall: true, icon: "chuang", name: "窗", parse: { type: "full" } },
- {
- wall: true,
- icon: "piaochuang",
- name: "飘窗",
- parse: { type: "align-bottom-fix", width: 180, height: 70 },
- },
- {
- wall: true,
- icon: "luodichuang",
- name: "落地窗",
- parse: { type: "full" },
- },
- ],
- },
- {
- name: "构件",
- children: [
- { icon: "zhuzi", name: "柱子" },
- { icon: "yandao", name: "烟道" },
- { icon: "loudao", name: "楼道" },
- ],
- },
- ],
- },
- {
- name: "家具",
- children: [
- {
- name: "客餐厅",
- children: [
- { icon: "TV", name: "电视柜" },
- { icon: "CombinationSofa", name: "组合沙发" },
- { icon: "ThreeSofa", name: "三人沙发" },
- { icon: "SingleSofa", name: "单人沙发" },
- { icon: "Chair", name: "椅子" },
- { icon: "TeaTable", name: "茶几" },
- { icon: "Carpet", name: "地毯" },
- { icon: "Plant", name: "植物" },
- { icon: "DiningTable", name: "餐桌" },
- ],
- },
- {
- name: "卧室",
- children: [
- { icon: "DoubleBed", name: "双人床" },
- { icon: "SingleBed", name: "单人床" },
- { icon: "Wardrobe", name: "衣柜" },
- { icon: "Dresser", name: "梳妆台" },
- { icon: "BedsideCupboard", name: "床头柜" },
- { icon: "Pillow", name: "抱枕" },
- ],
- },
- {
- name: "厨卫",
- children: [
- { icon: "GasStove", name: "燃气灶" },
- { icon: "Cupboard", name: "橱柜" },
- { icon: "Bathtub", name: "浴缸" },
- { icon: "Closestool", name: "马桶" },
- { icon: "Washstand", name: "洗漱台" },
- ],
- },
- {
- name: "其他",
- children: [
- { icon: "Desk", name: "书桌" },
- { icon: "BalconyChair", name: "阳台椅" },
- { icon: "Elevator", name: "电梯" },
- ],
- },
- ],
- },
- {
- name: "痕迹物证",
- children: [
- {
- name: "",
- children: traceIcons,
- },
- ],
- },
- ];
- 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: "men_l",
- 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",
- };
- export const traceIconMap: Record<string, string> = {};
- for (const icon of traceIcons) {
- traceIconMap[icon.icon + ".png"] = icon.icon;
- const ndx = icon.icon.lastIndexOf("_o");
- if (~ndx) {
- const name = icon.icon.substring(0, ndx);
- traceIconMap[name + ".png"] = icon.icon;
- }
- }
- console.log(traceIconMap);
|