// 服务器名 import { readFileAndParse } from '../util' import { FILENAME } from '../../consts' export interface DicServerName { // id readonly id: number; // 小区名 readonly sname: string; // 大区id readonly groupId: number; // 大区名 readonly groupName: string; } export const dicServerName = new Map(); export function loadServerName() { dicServerName.clear(); let arr = readFileAndParse(FILENAME.DIC_SERVER_NAME); arr.forEach(o => { dicServerName.set(o.id, o); }); arr = undefined; }