8 changed files with 1020 additions and 38 deletions
			
			
		@ -0,0 +1,580 @@ | 
				
			|||
 | 
				
			|||
{ | 
				
			|||
  "header": { | 
				
			|||
    "event": "Allocation failed - JavaScript heap out of memory", | 
				
			|||
    "trigger": "FatalError", | 
				
			|||
    "filename": "report.20221026.142822.38864.0.001.json", | 
				
			|||
    "dumpEventTime": "2022-10-26T14:28:22Z", | 
				
			|||
    "processId": 38864, | 
				
			|||
    "cwd": "D:\\Project\\Web\\epmet-oper-gov", | 
				
			|||
    "commandLine": [ | 
				
			|||
      "node", | 
				
			|||
      "D:\\Project\\Web\\epmet-oper-gov\\node_modules\\.bin\\\\..\\_@vue_cli-service@3.12.1@@vue\\cli-service\\bin\\vue-cli-service.js", | 
				
			|||
      "serve" | 
				
			|||
    ], | 
				
			|||
    "nodejsVersion": "v11.15.0", | 
				
			|||
    "wordSize": 64, | 
				
			|||
    "arch": "x64", | 
				
			|||
    "platform": "win32", | 
				
			|||
    "componentVersions": { | 
				
			|||
      "node": "11.15.0", | 
				
			|||
      "v8": "7.0.276.38-node.19", | 
				
			|||
      "uv": "1.27.0", | 
				
			|||
      "zlib": "1.2.11", | 
				
			|||
      "brotli": "1.0.7", | 
				
			|||
      "ares": "1.15.0", | 
				
			|||
      "modules": "67", | 
				
			|||
      "nghttp2": "1.37.0", | 
				
			|||
      "napi": "4", | 
				
			|||
      "llhttp": "1.1.1", | 
				
			|||
      "http_parser": "2.8.0", | 
				
			|||
      "openssl": "1.1.1b", | 
				
			|||
      "cldr": "34.0", | 
				
			|||
      "icu": "63.1", | 
				
			|||
      "tz": "2018e", | 
				
			|||
      "unicode": "11.0" | 
				
			|||
    }, | 
				
			|||
    "release": { | 
				
			|||
      "name": "node", | 
				
			|||
      "headersUrl": "https://nodejs.org/download/release/v11.15.0/node-v11.15.0-headers.tar.gz", | 
				
			|||
      "sourceUrl": "https://nodejs.org/download/release/v11.15.0/node-v11.15.0.tar.gz", | 
				
			|||
      "libUrl": "https://nodejs.org/download/release/v11.15.0/win-x64/node.lib" | 
				
			|||
    }, | 
				
			|||
    "osName": "Windows_NT", | 
				
			|||
    "osRelease": "10.0.22621", | 
				
			|||
    "osVersion": "Windows 10 Home China", | 
				
			|||
    "osMachine": "x86_64", | 
				
			|||
    "host": "DESKTOP-KD168PS" | 
				
			|||
  }, | 
				
			|||
  "javascriptStack": { | 
				
			|||
    "message": "No stack.", | 
				
			|||
    "stack": [ | 
				
			|||
      "Unavailable." | 
				
			|||
    ] | 
				
			|||
  }, | 
				
			|||
  "nativeStack": [ | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff793c6d24e", | 
				
			|||
      "symbol": "std::basic_ios<char,std::char_traits<char> >::fill+16366" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff793c6c0f9", | 
				
			|||
      "symbol": "std::basic_ios<char,std::char_traits<char> >::fill+11929" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff793c6b923", | 
				
			|||
      "symbol": "std::basic_ios<char,std::char_traits<char> >::fill+9923" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff793d5dc22", | 
				
			|||
      "symbol": "uv_loop_fork+89362" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff79418609e", | 
				
			|||
      "symbol": "v8::internal::FatalProcessOutOfMemory+798" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff794185fd7", | 
				
			|||
      "symbol": "v8::internal::FatalProcessOutOfMemory+599" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff794239a14", | 
				
			|||
      "symbol": "v8::internal::Heap::RootIsImmortalImmovable+14068" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff79422f822", | 
				
			|||
      "symbol": "v8::internal::Heap::CollectGarbage+7234" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff79422e038", | 
				
			|||
      "symbol": "v8::internal::Heap::CollectGarbage+1112" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff794237967", | 
				
			|||
      "symbol": "v8::internal::Heap::RootIsImmortalImmovable+5703" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff7942379e6", | 
				
			|||
      "symbol": "v8::internal::Heap::RootIsImmortalImmovable+5830" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff79436f8b1", | 
				
			|||
      "symbol": "v8::internal::Factory::NewFillerObject+49" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x00007ff794429786", | 
				
			|||
      "symbol": "v8::internal::StoreBuffer::StoreBufferOverflow+27190" | 
				
			|||
    }, | 
				
			|||
    { | 
				
			|||
      "pc": "0x0000020868150481", | 
				
			|||
      "symbol": "" | 
				
			|||
    } | 
				
			|||
  ], | 
				
			|||
  "javascriptHeap": { | 
				
			|||
    "totalMemory": 1475153920, | 
				
			|||
    "totalCommittedMemory": 1475153920, | 
				
			|||
    "usedMemory": 1325429824, | 
				
			|||
    "availableMemory": 52170184, | 
				
			|||
    "memoryLimit": 1526909922, | 
				
			|||
    "heapSpaces": { | 
				
			|||
      "read_only_space": { | 
				
			|||
        "memorySize": 524288, | 
				
			|||
        "committedMemory": 524288, | 
				
			|||
        "capacity": 515584, | 
				
			|||
        "used": 33520, | 
				
			|||
        "available": 482064 | 
				
			|||
      }, | 
				
			|||
      "new_space": { | 
				
			|||
        "memorySize": 2097152, | 
				
			|||
        "committedMemory": 2097152, | 
				
			|||
        "capacity": 1031168, | 
				
			|||
        "used": 19408, | 
				
			|||
        "available": 1011760 | 
				
			|||
      }, | 
				
			|||
      "old_space": { | 
				
			|||
        "memorySize": 1254297600, | 
				
			|||
        "committedMemory": 1254297600, | 
				
			|||
        "capacity": 1130026960, | 
				
			|||
        "used": 1128870728, | 
				
			|||
        "available": 1156232 | 
				
			|||
      }, | 
				
			|||
      "code_space": { | 
				
			|||
        "memorySize": 9437184, | 
				
			|||
        "committedMemory": 9437184, | 
				
			|||
        "capacity": 7747264, | 
				
			|||
        "used": 7747264, | 
				
			|||
        "available": 0 | 
				
			|||
      }, | 
				
			|||
      "map_space": { | 
				
			|||
        "memorySize": 24653824, | 
				
			|||
        "committedMemory": 24653824, | 
				
			|||
        "capacity": 6556000, | 
				
			|||
        "used": 6556000, | 
				
			|||
        "available": 0 | 
				
			|||
      }, | 
				
			|||
      "large_object_space": { | 
				
			|||
        "memorySize": 184143872, | 
				
			|||
        "committedMemory": 184143872, | 
				
			|||
        "capacity": 231723032, | 
				
			|||
        "used": 182202904, | 
				
			|||
        "available": 49520128 | 
				
			|||
      }, | 
				
			|||
      "new_large_object_space": { | 
				
			|||
        "memorySize": 0, | 
				
			|||
        "committedMemory": 0, | 
				
			|||
        "capacity": 0, | 
				
			|||
        "used": 0, | 
				
			|||
        "available": 0 | 
				
			|||
      } | 
				
			|||
    } | 
				
			|||
  }, | 
				
			|||
  "resourceUsage": { | 
				
			|||
    "userCpuSeconds": 540.296, | 
				
			|||
    "kernelCpuSeconds": 32.078, | 
				
			|||
    "cpuConsumptionPercent": 4.59775, | 
				
			|||
    "maxRss": 1920303104, | 
				
			|||
    "pageFaults": { | 
				
			|||
      "IORequired": 4598933, | 
				
			|||
      "IONotRequired": 0 | 
				
			|||
    }, | 
				
			|||
    "fsActivity": { | 
				
			|||
      "reads": 43082, | 
				
			|||
      "writes": 5808 | 
				
			|||
    } | 
				
			|||
  }, | 
				
			|||
  "libuv": [ | 
				
			|||
  ], | 
				
			|||
  "environmentVariables": { | 
				
			|||
    "=C:": "C:\\", | 
				
			|||
    "=D:": "D:\\Project\\Web\\epmet-oper-gov", | 
				
			|||
    "add_path": "D:\\APP\\cmder", | 
				
			|||
    "add_to_path": "D:\\APP\\cmder", | 
				
			|||
    "aliases": "D:\\APP\\cmder\\config\\user_aliases.cmd", | 
				
			|||
    "ALLUSERSPROFILE": "C:\\ProgramData", | 
				
			|||
    "ANSICON": "90x1000 (90x24)", | 
				
			|||
    "ANSICON_DEF": "7", | 
				
			|||
    "APPDATA": "C:\\Users\\lenovo\\AppData\\Roaming", | 
				
			|||
    "architecture_bits": "64", | 
				
			|||
    "BABEL_ENV": "development", | 
				
			|||
    "ccall": "call \"D:\\APP\\cmder\\vendor\\bin\\cexec.cmd\"", | 
				
			|||
    "cexec": "\"D:\\APP\\cmder\\vendor\\bin\\cexec.cmd\"", | 
				
			|||
    "clink_architecture": "x64", | 
				
			|||
    "CMDER_ALIASES": "1", | 
				
			|||
    "CMDER_CLINK": "1", | 
				
			|||
    "CMDER_CONFIGURED": "1", | 
				
			|||
    "CMDER_INIT_END": "10:41:53.98", | 
				
			|||
    "CMDER_INIT_START": "10:41:46.93", | 
				
			|||
    "CMDER_ROOT": "D:\\APP\\cmder", | 
				
			|||
    "CMDER_SHELL": "cmd", | 
				
			|||
    "CMDER_USER_FLAGS": " ", | 
				
			|||
    "COLUMNS": "90", | 
				
			|||
    "CommonProgramFiles": "C:\\Program Files\\Common Files", | 
				
			|||
    "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files", | 
				
			|||
    "CommonProgramW6432": "C:\\Program Files\\Common Files", | 
				
			|||
    "COMPUTERNAME": "DESKTOP-KD168PS", | 
				
			|||
    "ComSpec": "C:\\WINDOWS\\system32\\cmd.exe", | 
				
			|||
    "ConEmuANSI": "ON", | 
				
			|||
    "ConEmuAnsiLog": "", | 
				
			|||
    "ConEmuArgs": "/Icon \"D:\\APP\\cmder\\icons\\cmder.ico\" /Title Cmder /dir \"D:\\Project\\Web\\epmet-oper-gov\"", | 
				
			|||
    "ConEmuArgs2": "", | 
				
			|||
    "ConEmuBackHWND": "0x001009E8", | 
				
			|||
    "ConEmuBaseDir": "D:\\APP\\cmder\\vendor\\conemu-maximus5\\ConEmu", | 
				
			|||
    "ConEmuBaseDirShort": "D:\\APP\\cmder\\vendor\\conemu-maximus5\\ConEmu", | 
				
			|||
    "ConEmuBuild": "210912", | 
				
			|||
    "ConEmuCfgDir": "D:\\APP\\cmder\\vendor\\conemu-maximus5", | 
				
			|||
    "ConEmuConfig": "", | 
				
			|||
    "ConEmuDir": "D:\\APP\\cmder\\vendor\\conemu-maximus5", | 
				
			|||
    "ConEmuDrawHWND": "0x00080A82", | 
				
			|||
    "ConEmuDrive": "D:", | 
				
			|||
    "ConEmuHooks": "Enabled", | 
				
			|||
    "ConEmuHWND": "0x00380A8C", | 
				
			|||
    "ConEmuPalette": "Monokai", | 
				
			|||
    "ConEmuPID": "41292", | 
				
			|||
    "ConEmuServerPID": "33484", | 
				
			|||
    "ConEmuTask": "{cmd::Cmder}", | 
				
			|||
    "ConEmuWorkDir": "D:\\Project\\Web\\epmet-oper-gov", | 
				
			|||
    "ConEmuWorkDrive": "D:", | 
				
			|||
    "currenArgu": "/setpath", | 
				
			|||
    "debug_output": "0", | 
				
			|||
    "depth": "1", | 
				
			|||
    "dp0": "D:\\Project\\Web\\epmet-oper-gov\\node_modules\\.bin\\", | 
				
			|||
    "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData", | 
				
			|||
    "fast_init": "0", | 
				
			|||
    "feFlagName": " ", | 
				
			|||
    "feNot": "false", | 
				
			|||
    "find_query": "D:\\\\APP\\\\cmder", | 
				
			|||
    "found": "1", | 
				
			|||
    "git_executable": "D:\\APP\\Git\\cmd\\git.exe", | 
				
			|||
    "GIT_INSTALL_ROOT": "D:\\APP\\Git", | 
				
			|||
    "git_locale": "\"D:\\APP\\Git\\usr\\bin\\locale.exe\"", | 
				
			|||
    "GIT_VERSION_USER": "2.31.1.windows.1", | 
				
			|||
    "HOME": "C:\\Users\\lenovo", | 
				
			|||
    "HOMEDRIVE": "C:", | 
				
			|||
    "HOMEPATH": "\\Users\\lenovo", | 
				
			|||
    "INIT_CWD": "D:\\Project\\Web\\epmet-oper-gov", | 
				
			|||
    "LANG": "zh_CN.UTF-8", | 
				
			|||
    "lib_base": "call \"D:\\APP\\cmder\\vendor\\lib\\lib_base.cmd\"", | 
				
			|||
    "lib_console": "call \"D:\\APP\\cmder\\vendor\\lib\\lib_console.cmd\"", | 
				
			|||
    "lib_git": "call \"D:\\APP\\cmder\\vendor\\lib\\lib_git.cmd\"", | 
				
			|||
    "lib_path": "call \"D:\\APP\\cmder\\vendor\\lib\\lib_path.cmd\"", | 
				
			|||
    "lib_profile": "call \"D:\\APP\\cmder\\vendor\\lib\\lib_profile.cmd\"", | 
				
			|||
    "LINES": "24", | 
				
			|||
    "LOCALAPPDATA": "C:\\Users\\lenovo\\AppData\\Local", | 
				
			|||
    "LOGONSERVER": "\\\\DESKTOP-KD168PS", | 
				
			|||
    "max_depth": "1", | 
				
			|||
    "nix_tools": "1", | 
				
			|||
    "NODE": "D:\\APP\\nodejs\\node.exe", | 
				
			|||
    "NODE_ENV": "development", | 
				
			|||
    "NODE_EXE": "D:\\APP\\nodejs\\\\node.exe", | 
				
			|||
    "NPM_CLI_JS": "D:\\APP\\nodejs\\\\node_modules\\npm\\bin\\npm-cli.js", | 
				
			|||
    "npm_config_access": "", | 
				
			|||
    "npm_config_allow_same_version": "", | 
				
			|||
    "npm_config_also": "", | 
				
			|||
    "npm_config_always_auth": "", | 
				
			|||
    "npm_config_argv": "{\"remain\":[],\"cooked\":[\"run\",\"dev\"],\"original\":[\"run\",\"dev\"]}", | 
				
			|||
    "npm_config_audit": "true", | 
				
			|||
    "npm_config_audit_level": "low", | 
				
			|||
    "npm_config_auth_type": "legacy", | 
				
			|||
    "npm_config_bin_links": "true", | 
				
			|||
    "npm_config_browser": "", | 
				
			|||
    "npm_config_ca": "", | 
				
			|||
    "npm_config_cache": "C:\\Users\\lenovo\\AppData\\Roaming\\npm-cache", | 
				
			|||
    "npm_config_cache_lock_retries": "10", | 
				
			|||
    "npm_config_cache_lock_stale": "60000", | 
				
			|||
    "npm_config_cache_lock_wait": "10000", | 
				
			|||
    "npm_config_cache_max": "Infinity", | 
				
			|||
    "npm_config_cache_min": "10", | 
				
			|||
    "npm_config_cafile": "", | 
				
			|||
    "npm_config_cert": "", | 
				
			|||
    "npm_config_cidr": "", | 
				
			|||
    "npm_config_color": "true", | 
				
			|||
    "npm_config_commit_hooks": "true", | 
				
			|||
    "npm_config_depth": "Infinity", | 
				
			|||
    "npm_config_description": "true", | 
				
			|||
    "npm_config_dev": "", | 
				
			|||
    "npm_config_dry_run": "", | 
				
			|||
    "npm_config_editor": "notepad.exe", | 
				
			|||
    "npm_config_engine_strict": "", | 
				
			|||
    "npm_config_fetch_retries": "2", | 
				
			|||
    "npm_config_fetch_retry_factor": "10", | 
				
			|||
    "npm_config_fetch_retry_maxtimeout": "60000", | 
				
			|||
    "npm_config_fetch_retry_mintimeout": "10000", | 
				
			|||
    "npm_config_force": "", | 
				
			|||
    "npm_config_git": "git", | 
				
			|||
    "npm_config_git_tag_version": "true", | 
				
			|||
    "npm_config_global": "", | 
				
			|||
    "npm_config_globalconfig": "C:\\Users\\lenovo\\AppData\\Roaming\\npm\\etc\\npmrc", | 
				
			|||
    "npm_config_globalignorefile": "C:\\Users\\lenovo\\AppData\\Roaming\\npm\\etc\\npmignore", | 
				
			|||
    "npm_config_global_style": "", | 
				
			|||
    "npm_config_group": "", | 
				
			|||
    "npm_config_ham_it_up": "", | 
				
			|||
    "npm_config_heading": "npm", | 
				
			|||
    "npm_config_https_proxy": "", | 
				
			|||
    "npm_config_if_present": "", | 
				
			|||
    "npm_config_ignore_prepublish": "", | 
				
			|||
    "npm_config_ignore_scripts": "", | 
				
			|||
    "npm_config_init_author_email": "", | 
				
			|||
    "npm_config_init_author_name": "", | 
				
			|||
    "npm_config_init_author_url": "", | 
				
			|||
    "npm_config_init_license": "ISC", | 
				
			|||
    "npm_config_init_module": "C:\\Users\\lenovo\\.npm-init.js", | 
				
			|||
    "npm_config_init_version": "1.0.0", | 
				
			|||
    "npm_config_json": "", | 
				
			|||
    "npm_config_key": "", | 
				
			|||
    "npm_config_legacy_bundling": "", | 
				
			|||
    "npm_config_link": "", | 
				
			|||
    "npm_config_local_address": "", | 
				
			|||
    "npm_config_loglevel": "notice", | 
				
			|||
    "npm_config_logs_max": "10", | 
				
			|||
    "npm_config_long": "", | 
				
			|||
    "npm_config_maxsockets": "50", | 
				
			|||
    "npm_config_message": "%s", | 
				
			|||
    "npm_config_metrics_registry": "https://registry.npmjs.org/", | 
				
			|||
    "npm_config_node_gyp": "D:\\APP\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js", | 
				
			|||
    "npm_config_node_options": "", | 
				
			|||
    "npm_config_node_version": "11.15.0", | 
				
			|||
    "npm_config_noproxy": "", | 
				
			|||
    "npm_config_offline": "", | 
				
			|||
    "npm_config_onload_script": "", | 
				
			|||
    "npm_config_only": "", | 
				
			|||
    "npm_config_optional": "true", | 
				
			|||
    "npm_config_otp": "", | 
				
			|||
    "npm_config_package_lock": "true", | 
				
			|||
    "npm_config_package_lock_only": "", | 
				
			|||
    "npm_config_parseable": "", | 
				
			|||
    "npm_config_prefer_offline": "", | 
				
			|||
    "npm_config_prefer_online": "", | 
				
			|||
    "npm_config_prefix": "C:\\Users\\lenovo\\AppData\\Roaming\\npm", | 
				
			|||
    "npm_config_preid": "", | 
				
			|||
    "npm_config_production": "", | 
				
			|||
    "npm_config_progress": "true", | 
				
			|||
    "npm_config_proxy": "", | 
				
			|||
    "npm_config_read_only": "", | 
				
			|||
    "npm_config_rebuild_bundle": "true", | 
				
			|||
    "npm_config_registry": "https://registry.npmjs.org/", | 
				
			|||
    "npm_config_rollback": "true", | 
				
			|||
    "npm_config_save": "true", | 
				
			|||
    "npm_config_save_bundle": "", | 
				
			|||
    "npm_config_save_dev": "", | 
				
			|||
    "npm_config_save_exact": "", | 
				
			|||
    "npm_config_save_optional": "", | 
				
			|||
    "npm_config_save_prefix": "^", | 
				
			|||
    "npm_config_save_prod": "", | 
				
			|||
    "npm_config_scope": "", | 
				
			|||
    "npm_config_scripts_prepend_node_path": "warn-only", | 
				
			|||
    "npm_config_script_shell": "", | 
				
			|||
    "npm_config_searchexclude": "", | 
				
			|||
    "npm_config_searchlimit": "20", | 
				
			|||
    "npm_config_searchopts": "", | 
				
			|||
    "npm_config_searchstaleness": "900", | 
				
			|||
    "npm_config_send_metrics": "", | 
				
			|||
    "npm_config_shell": "C:\\WINDOWS\\system32\\cmd.exe", | 
				
			|||
    "npm_config_shrinkwrap": "true", | 
				
			|||
    "npm_config_sign_git_commit": "", | 
				
			|||
    "npm_config_sign_git_tag": "", | 
				
			|||
    "npm_config_sso_poll_frequency": "500", | 
				
			|||
    "npm_config_sso_type": "oauth", | 
				
			|||
    "npm_config_strict_ssl": "true", | 
				
			|||
    "npm_config_tag": "latest", | 
				
			|||
    "npm_config_tag_version_prefix": "v", | 
				
			|||
    "npm_config_timing": "", | 
				
			|||
    "npm_config_tmp": "C:\\Users\\lenovo\\AppData\\Local\\Temp", | 
				
			|||
    "npm_config_umask": "0000", | 
				
			|||
    "npm_config_unicode": "", | 
				
			|||
    "npm_config_unsafe_perm": "true", | 
				
			|||
    "npm_config_update_notifier": "true", | 
				
			|||
    "npm_config_usage": "", | 
				
			|||
    "npm_config_user": "", | 
				
			|||
    "npm_config_userconfig": "C:\\Users\\lenovo\\.npmrc", | 
				
			|||
    "npm_config_user_agent": "npm/6.7.0 node/v11.15.0 win32 x64", | 
				
			|||
    "npm_config_version": "", | 
				
			|||
    "npm_config_versions": "", | 
				
			|||
    "npm_config_viewer": "browser", | 
				
			|||
    "npm_execpath": "D:\\APP\\nodejs\\node_modules\\npm\\bin\\npm-cli.js", | 
				
			|||
    "npm_lifecycle_event": "dev", | 
				
			|||
    "npm_lifecycle_script": "vue-cli-service serve", | 
				
			|||
    "npm_node_execpath": "D:\\APP\\nodejs\\node.exe", | 
				
			|||
    "npm_package_browserslist_0": "> 1%", | 
				
			|||
    "npm_package_browserslist_1": "last 2 versions", | 
				
			|||
    "npm_package_browserslist_2=not ie <": " 10", | 
				
			|||
    "npm_package_dependencies_async_validator": "^4.2.5", | 
				
			|||
    "npm_package_dependencies_axios": "^0.19.0", | 
				
			|||
    "npm_package_dependencies_babel_eslint": "^8.0.1", | 
				
			|||
    "npm_package_dependencies_babel_plugin_component": "^1.1.1", | 
				
			|||
    "npm_package_dependencies_echarts": "^5.2.2", | 
				
			|||
    "npm_package_dependencies_echarts_gl": "^2.0.9", | 
				
			|||
    "npm_package_dependencies_element_theme": "^2.0.1", | 
				
			|||
    "npm_package_dependencies_element_ui": "^2.13.0", | 
				
			|||
    "npm_package_dependencies_file_saver": "^2.0.5", | 
				
			|||
    "npm_package_dependencies_gulp_autoprefixer": "^6.1.0", | 
				
			|||
    "npm_package_dependencies_gulp_clean_css": "^4.2.0", | 
				
			|||
    "npm_package_dependencies_gulp_load_plugins": "^2.0.0", | 
				
			|||
    "npm_package_dependencies_gulp_rename": "^1.4.0", | 
				
			|||
    "npm_package_dependencies_gulp_sass": "^4.0.2", | 
				
			|||
    "npm_package_dependencies_jsencrypt": "^3.0.3", | 
				
			|||
    "npm_package_dependencies_js_cookie": "^2.2.0", | 
				
			|||
    "npm_package_dependencies_lodash": "^4.17.15", | 
				
			|||
    "npm_package_dependencies_mint_ui": "^2.2.13", | 
				
			|||
    "npm_package_dependencies_node_sass": "^4.12.0", | 
				
			|||
    "npm_package_dependencies_ol": "^6.9.0", | 
				
			|||
    "npm_package_dependencies_portfinder": "^1.0.21", | 
				
			|||
    "npm_package_dependencies_qs": "^6.7.0", | 
				
			|||
    "npm_package_dependencies_quill": "^1.3.6", | 
				
			|||
    "npm_package_dependencies_screenfull": "^4.2.1", | 
				
			|||
    "npm_package_dependencies_sortablejs": "^1.12.0", | 
				
			|||
    "npm_package_dependencies_svg_sprite_loader": "^4.1.6", | 
				
			|||
    "npm_package_dependencies_throttle_debounce": "^3.0.1", | 
				
			|||
    "npm_package_dependencies_vue": "^2.6.11", | 
				
			|||
    "npm_package_dependencies_vuex": "^3.1.1", | 
				
			|||
    "npm_package_dependencies_vue_baidu_map": "^0.21.22", | 
				
			|||
    "npm_package_dependencies_vue_i18n": "^8.12.0", | 
				
			|||
    "npm_package_dependencies_vue_quill_editor": "^3.0.6", | 
				
			|||
    "npm_package_dependencies_vue_router": "^3.0.7", | 
				
			|||
    "npm_package_dependencies_v_distpicker": "^1.2.2", | 
				
			|||
    "npm_package_dependencies_xlsx": "^0.17.1", | 
				
			|||
    "npm_package_dependencies__antv_l7": "2.9.14", | 
				
			|||
    "npm_package_dependencies__antv_l7_draw": "3.0.5", | 
				
			|||
    "npm_package_dependencies__antv_l7_maps": "2.9.14", | 
				
			|||
    "npm_package_dependencies__riophae_vue_treeselect": "^0.4.0", | 
				
			|||
    "npm_package_dependencies__tinymce_tinymce_vue": "^3.2.8", | 
				
			|||
    "npm_package_description": "## Project setup ``` npm install ```", | 
				
			|||
    "npm_package_devDependencies_dai_js": "^0.0.12", | 
				
			|||
    "npm_package_devDependencies_element_theme_chalk": "^2.13.0", | 
				
			|||
    "npm_package_devDependencies_natives": "^1.1.6", | 
				
			|||
    "npm_package_devDependencies_ol": "^6.9.0", | 
				
			|||
    "npm_package_devDependencies_sass_loader": "^7.3.1", | 
				
			|||
    "npm_package_devDependencies_script_loader": "^0.7.2", | 
				
			|||
    "npm_package_devDependencies_tinymce": "5.8.2", | 
				
			|||
    "npm_package_devDependencies_vue_template_compiler": "^2.6.11", | 
				
			|||
    "npm_package_devDependencies__antv_f2": "^3.8.10-beta.1", | 
				
			|||
    "npm_package_devDependencies__tinymce_tinymce_vue": "3.2.8", | 
				
			|||
    "npm_package_devDependencies__vue_cli_plugin_babel": "^3.10.0", | 
				
			|||
    "npm_package_devDependencies__vue_cli_plugin_eslint": "^3.10.0", | 
				
			|||
    "npm_package_devDependencies__vue_cli_service": "^3.10.0", | 
				
			|||
    "npm_package_devDependencies__vue_eslint_config_standard": "^4.0.0", | 
				
			|||
    "npm_package_element_theme_browsers_0": "> 1%", | 
				
			|||
    "npm_package_element_theme_browsers_1": "last 2 versions", | 
				
			|||
    "npm_package_element_theme_browsers_2=not ie <": " 10", | 
				
			|||
    "npm_package_element_theme_config": "./src/element-ui/theme-variables.scss", | 
				
			|||
    "npm_package_element_theme_minimize": "true", | 
				
			|||
    "npm_package_element_theme_out": "./src/element-ui/theme", | 
				
			|||
    "npm_package_engines_node=>": " 8.11.1", | 
				
			|||
    "npm_package_engines_npm=>": " 5.6.0", | 
				
			|||
    "npm_package_eslintConfig_env_node": "true", | 
				
			|||
    "npm_package_eslintConfig_extends_0": "plugin:vue/essential", | 
				
			|||
    "npm_package_eslintConfig_extends_1": "@vue/standard", | 
				
			|||
    "npm_package_eslintConfig_parserOptions_parser": "babel-eslint", | 
				
			|||
    "npm_package_eslintConfig_root": "true", | 
				
			|||
    "npm_package_gitHead": "28c653677ab76d5cd430a42ccb76a3fb6afedccb", | 
				
			|||
    "npm_package_name": "epmet-oper-web", | 
				
			|||
    "npm_package_private": "true", | 
				
			|||
    "npm_package_readmeFilename": "README.md", | 
				
			|||
    "npm_package_scripts_build": "vue-cli-service build", | 
				
			|||
    "npm_package_scripts_build_prod": "vue-cli-service build --mode production", | 
				
			|||
    "npm_package_scripts_build_shibei_prod": "vue-cli-service build --mode shibei_production", | 
				
			|||
    "npm_package_scripts_build_sit": "vue-cli-service build --mode production.sit", | 
				
			|||
    "npm_package_scripts_build_uat": "vue-cli-service build --mode production.uat", | 
				
			|||
    "npm_package_scripts_dev": "vue-cli-service serve", | 
				
			|||
    "npm_package_scripts_et": "et", | 
				
			|||
    "npm_package_scripts_et_init": "et -i", | 
				
			|||
    "npm_package_scripts_et_list": "gulp themes", | 
				
			|||
    "npm_package_scripts_lint": "vue-cli-service lint", | 
				
			|||
    "npm_package_scripts_serve": "vue-cli-service serve", | 
				
			|||
    "npm_package_version": "2.0.0", | 
				
			|||
    "NPM_PREFIX_NPM_CLI_JS": "C:\\Users\\lenovo\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js", | 
				
			|||
    "NUMBER_OF_PROCESSORS": "8", | 
				
			|||
    "OLD_PATH": "D:\\APP\\cmder\\vendor\\conemu-maximus5\\ConEmu\\Scripts;D:\\APP\\cmder\\vendor\\conemu-maximus5;D:\\APP\\cmder\\vendor\\conemu-maximus5\\ConEmu;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;D:\\APP\\cmder;D:\\APP\\Git\\cmd;D:\\APP\\微信web开发者工具\\dll;D:\\APP\\nodejs\\;D:\\APP\\python\\Scripts\\;D:\\APP\\python\\;C:\\Users\\lenovo\\AppData\\Local\\Microsoft\\WindowsApps;D:\\APP\\Microsoft VS Code\\bin;C:\\Users\\lenovo\\AppData\\Roaming\\npm;D:\\APP\\Git\\mingw64\\bin;D:\\APP\\Git\\usr\\bin;D:\\APP\\cmder\\vendor\\bin", | 
				
			|||
    "OneDrive": "C:\\Users\\lenovo\\OneDrive", | 
				
			|||
    "OS": "Windows_NT", | 
				
			|||
    "Path": "D:\\APP\\nodejs\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;D:\\Project\\Web\\epmet-oper-gov\\node_modules\\.bin;D:\\APP\\cmder\\vendor\\conemu-maximus5\\ConEmu\\Scripts;D:\\APP\\cmder\\vendor\\conemu-maximus5;D:\\APP\\cmder\\vendor\\conemu-maximus5\\ConEmu;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;D:\\APP\\cmder;D:\\APP\\Git\\cmd;D:\\APP\\微信web开发者工具\\dll;D:\\APP\\nodejs\\;D:\\APP\\python\\Scripts\\;D:\\APP\\python\\;C:\\Users\\lenovo\\AppData\\Local\\Microsoft\\WindowsApps;D:\\APP\\Microsoft VS Code\\bin;C:\\Users\\lenovo\\AppData\\Roaming\\npm;D:\\APP\\Git\\mingw64\\bin;D:\\APP\\Git\\usr\\bin;D:\\APP\\cmder\\vendor\\bin", | 
				
			|||
    "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JSE;.WSF;.WSH;.MSC", | 
				
			|||
    "path_position": "append", | 
				
			|||
    "PLINK_PROTOCOL": "ssh", | 
				
			|||
    "position": "append", | 
				
			|||
    "print_debug": "if 0 gtr 0 call \"D:\\APP\\cmder\\vendor\\lib\\lib_console.cmd\" debug_output", | 
				
			|||
    "print_error": "call \"D:\\APP\\cmder\\vendor\\lib\\lib_console.cmd\" show_error", | 
				
			|||
    "print_verbose": "if 0 gtr 0 call \"D:\\APP\\cmder\\vendor\\lib\\lib_console.cmd\" verbose_output", | 
				
			|||
    "PROCESSOR_ARCHITECTURE": "AMD64", | 
				
			|||
    "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 142 Stepping 12, GenuineIntel", | 
				
			|||
    "PROCESSOR_LEVEL": "6", | 
				
			|||
    "PROCESSOR_REVISION": "8e0c", | 
				
			|||
    "ProgramData": "C:\\ProgramData", | 
				
			|||
    "ProgramFiles": "C:\\Program Files", | 
				
			|||
    "ProgramFiles(x86)": "C:\\Program Files (x86)", | 
				
			|||
    "ProgramW6432": "C:\\Program Files", | 
				
			|||
    "PROMPT": "C\bL\bI\bN\bK\b \b$P$G", | 
				
			|||
    "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules", | 
				
			|||
    "PUBLIC": "C:\\Users\\Public", | 
				
			|||
    "SESSIONNAME": "Console", | 
				
			|||
    "SVN_SSH": "D:\\\\APP\\\\Git\\\\bin\\\\ssh.exe", | 
				
			|||
    "SystemDrive": "C:", | 
				
			|||
    "SystemRoot": "C:\\WINDOWS", | 
				
			|||
    "TEMP": "C:\\Users\\lenovo\\AppData\\Local\\Temp", | 
				
			|||
    "TERM": "cygwin", | 
				
			|||
    "time_init": "0", | 
				
			|||
    "TMP": "C:\\Users\\lenovo\\AppData\\Local\\Temp", | 
				
			|||
    "USERDOMAIN": "DESKTOP-KD168PS", | 
				
			|||
    "USERDOMAIN_ROAMINGPROFILE": "DESKTOP-KD168PS", | 
				
			|||
    "USERNAME": "lenovo", | 
				
			|||
    "USERPROFILE": "C:\\Users\\lenovo", | 
				
			|||
    "user_aliases": "D:\\APP\\cmder\\config\\user_aliases.cmd", | 
				
			|||
    "USER_BUILD": "windows.1", | 
				
			|||
    "USER_MAJOR": "2", | 
				
			|||
    "USER_MINOR": "31", | 
				
			|||
    "USER_PATCH": "1", | 
				
			|||
    "verbose_output": "0", | 
				
			|||
    "VUE_APP_API_SERVER": "http://192.168.1.140/api", | 
				
			|||
    "VUE_APP_NODE_ENV": "dev", | 
				
			|||
    "VUE_APP_PUBLIC_PATH": "epmet-oper", | 
				
			|||
    "VUE_CLI_ENTRY_FILES": "[\"D:\\\\Project\\\\Web\\\\epmet-oper-gov\\\\src\\\\main.js\"]", | 
				
			|||
    "WEBPACK_DEV_SERVER": "true", | 
				
			|||
    "windir": "C:\\WINDOWS", | 
				
			|||
    "ZES_ENABLE_SYSMAN": "1", | 
				
			|||
    "_prog": "node" | 
				
			|||
  }, | 
				
			|||
  "sharedObjects": [ | 
				
			|||
    "D:\\APP\\nodejs\\node.exe", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\ntdll.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\KERNEL32.DLL", | 
				
			|||
    "C:\\WINDOWS\\System32\\KERNELBASE.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\PSAPI.DLL", | 
				
			|||
    "C:\\WINDOWS\\System32\\WS2_32.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\RPCRT4.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\ADVAPI32.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\msvcrt.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\sechost.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\USER32.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\win32u.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\GDI32.dll", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\dbghelp.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\gdi32full.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\ucrtbase.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\msvcp_win.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\combase.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\CRYPT32.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\OLEAUT32.dll", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\IPHLPAPI.DLL", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\USERENV.dll", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\bcrypt.dll", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\WINMM.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\IMM32.DLL", | 
				
			|||
    "D:\\APP\\cmder\\vendor\\conemu-maximus5\\ConEmu\\ConEmuHk64.dll", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\powrprof.dll", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\UMPDC.dll", | 
				
			|||
    "C:\\WINDOWS\\system32\\uxtheme.dll", | 
				
			|||
    "C:\\WINDOWS\\system32\\mswsock.dll", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\kernel.appcore.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\bcryptprimitives.dll", | 
				
			|||
    "C:\\WINDOWS\\system32\\napinsp.dll", | 
				
			|||
    "C:\\WINDOWS\\system32\\pnrpnsp.dll", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\DNSAPI.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\NSI.dll", | 
				
			|||
    "C:\\WINDOWS\\System32\\winrnr.dll", | 
				
			|||
    "C:\\WINDOWS\\system32\\wshbth.dll", | 
				
			|||
    "C:\\WINDOWS\\system32\\nlansp_c.dll", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\dhcpcsvc6.DLL", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\dhcpcsvc.DLL", | 
				
			|||
    "C:\\WINDOWS\\SYSTEM32\\CRYPTBASE.DLL", | 
				
			|||
    "\\\\?\\D:\\Project\\Web\\epmet-oper-gov\\node_modules\\_node-sass@4.14.1@node-sass\\vendor\\win32-x64-67\\binding.node" | 
				
			|||
  ] | 
				
			|||
} | 
				
			|||
| 
		 After Width: | Height: | Size: 1.6 KiB  | 
@ -0,0 +1,259 @@ | 
				
			|||
import nextTick from "dai-js/tools/nextTick"; | 
				
			|||
 | 
				
			|||
export const mapType = typeof window.TMap !== "undefined" ? "qq" : "td"; | 
				
			|||
 | 
				
			|||
export const QQMap = window.TMap; | 
				
			|||
export const TDMap = window.T; | 
				
			|||
 | 
				
			|||
export function searchNearby(map, keyword) { | 
				
			|||
  if (mapType == "qq") { | 
				
			|||
    return new Promise((reslove) => { | 
				
			|||
      const search = new QQMap.service.Search(map, { pageSize: 10 }); | 
				
			|||
      search | 
				
			|||
        .searchNearby({ | 
				
			|||
          keyword, | 
				
			|||
          radius: 1000, | 
				
			|||
          autoExtend: true, | 
				
			|||
          center: map.getCenter(), | 
				
			|||
        }) | 
				
			|||
        .then((result) => { | 
				
			|||
          let { data } = result; | 
				
			|||
          if (Array.isArray(data) && data.length > 0) { | 
				
			|||
            const { | 
				
			|||
              location: { lat, lng, address }, | 
				
			|||
            } = data[0]; | 
				
			|||
            reslove({ | 
				
			|||
              msg: "success", | 
				
			|||
              data: { | 
				
			|||
                lng, | 
				
			|||
                lat, | 
				
			|||
                address, | 
				
			|||
                resultList: data, | 
				
			|||
              }, | 
				
			|||
            }); | 
				
			|||
          } else { | 
				
			|||
            reslove({ | 
				
			|||
              msg: "failed", | 
				
			|||
              error: "未检索到相关位置坐标", | 
				
			|||
            }); | 
				
			|||
          } | 
				
			|||
        }) | 
				
			|||
        .catch((error) => { | 
				
			|||
          reslove({ | 
				
			|||
            msg: "failed", | 
				
			|||
            error, | 
				
			|||
          }); | 
				
			|||
        }); | 
				
			|||
    }); | 
				
			|||
  } else { | 
				
			|||
    return new Promise(async (reslove) => { | 
				
			|||
      const search = new TDMap.LocalSearch(map, { pageCapacity: 10 }); | 
				
			|||
      search.setQueryType(1); | 
				
			|||
      search.searchNearby(keyword, map.getCenter(), 1000000000); | 
				
			|||
 | 
				
			|||
      await nextTick(1000); | 
				
			|||
 | 
				
			|||
      const result = search.getResults(); | 
				
			|||
      const data = result ? result.getPois() : null; | 
				
			|||
 | 
				
			|||
      console.log("检索结果", data); | 
				
			|||
 | 
				
			|||
      if (Array.isArray(data) && data.length > 0) { | 
				
			|||
        const { lonlat, address, name } = data[0]; | 
				
			|||
        const lng = lonlat.split(" ")[0]; | 
				
			|||
        const lat = lonlat.split(" ")[1]; | 
				
			|||
        reslove({ | 
				
			|||
          msg: "success", | 
				
			|||
          data: { | 
				
			|||
            lng, | 
				
			|||
            lat, | 
				
			|||
            address: address + name, | 
				
			|||
            resultList: data, | 
				
			|||
          }, | 
				
			|||
        }); | 
				
			|||
      } else { | 
				
			|||
        reslove({ | 
				
			|||
          msg: "failed", | 
				
			|||
          error: "未检索到相关位置坐标", | 
				
			|||
        }); | 
				
			|||
      } | 
				
			|||
    }); | 
				
			|||
  } | 
				
			|||
} | 
				
			|||
 | 
				
			|||
// 封装了地图相关函数,兼容天地图、腾讯地图常用api
 | 
				
			|||
export default function init(ele, position, params) { | 
				
			|||
  this.mapType = mapType; | 
				
			|||
  this.map = null; | 
				
			|||
  this.marker = null; | 
				
			|||
  this.markers = null; | 
				
			|||
  this.getCenter = function () { | 
				
			|||
    return { | 
				
			|||
      lat: 0, | 
				
			|||
      lng: 0, | 
				
			|||
    }; | 
				
			|||
  }; | 
				
			|||
  this.setCenter = function (lat, lng) {}; | 
				
			|||
  this.setMarker = function (lat, lng, title) {}; | 
				
			|||
  this.getAddress = async function (lat, lng) {}; | 
				
			|||
  this.on = function (eventType, fn) {}; | 
				
			|||
 | 
				
			|||
  let { latitude, longitude } = position; | 
				
			|||
  if (!latitude || latitude == "" || latitude == "0") { | 
				
			|||
    latitude = 39.9088810666821; | 
				
			|||
    longitude = 116.39743841556731; | 
				
			|||
  } | 
				
			|||
 | 
				
			|||
  if (mapType == "qq") { | 
				
			|||
    let center = new QQMap.LatLng(latitude, longitude); | 
				
			|||
    this.map = new QQMap.Map(ele, { | 
				
			|||
      center, | 
				
			|||
      ...params, | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
    this.markers = new QQMap.MultiMarker({ | 
				
			|||
      map: this.map, | 
				
			|||
      geometries: [], | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
    this.getCenter = function () { | 
				
			|||
      const center = this.map.getCenter(); | 
				
			|||
      const lat = center.getLat(); | 
				
			|||
      const lng = center.getLng(); | 
				
			|||
      return { lat, lng }; | 
				
			|||
    }; | 
				
			|||
 | 
				
			|||
    this.setCenter = function (lat, lng) { | 
				
			|||
      this.map.setCenter(new QQMap.LatLng(lat, lng)); | 
				
			|||
    }; | 
				
			|||
 | 
				
			|||
    this.setMarker = function (lat, lng, title = "位置") { | 
				
			|||
      this.markers.setGeometries([]); | 
				
			|||
      this.markers.add([ | 
				
			|||
        { | 
				
			|||
          id: "4", | 
				
			|||
          styleId: "marker", | 
				
			|||
          position: new QQMap.LatLng(lat, lng), | 
				
			|||
          properties: { | 
				
			|||
            title, | 
				
			|||
          }, | 
				
			|||
        }, | 
				
			|||
      ]); | 
				
			|||
    }; | 
				
			|||
 | 
				
			|||
    this.geocoder = new QQMap.service.Geocoder(); // 新建一个正逆地址解析类
 | 
				
			|||
    this.getAddress = async function (lat, lng) { | 
				
			|||
      return new Promise((reslove) => { | 
				
			|||
        this.geocoder | 
				
			|||
          .getAddress({ location: new QQMap.LatLng(lat, lng) }) // 将给定的坐标位置转换为地址
 | 
				
			|||
          .then((result) => { | 
				
			|||
            reslove({ | 
				
			|||
              msg: "success", | 
				
			|||
              data: { | 
				
			|||
                address: result.result.address, | 
				
			|||
              }, | 
				
			|||
            }); | 
				
			|||
          }) | 
				
			|||
          .catch((error) => { | 
				
			|||
            reslove({ | 
				
			|||
              msg: "failed", | 
				
			|||
              error, | 
				
			|||
            }); | 
				
			|||
          }); | 
				
			|||
      }); | 
				
			|||
    }; | 
				
			|||
 | 
				
			|||
    this.on = function (eventType, fn) { | 
				
			|||
      if (eventType == "dragend") { | 
				
			|||
        this.map.on("moveend", (e) => { | 
				
			|||
          console.log("dragend", e); | 
				
			|||
          if (e && e.originalEvent) { | 
				
			|||
            fn(e); | 
				
			|||
          } | 
				
			|||
        }); | 
				
			|||
      } else { | 
				
			|||
        this.map.on(eventType, fn); | 
				
			|||
      } | 
				
			|||
    }; | 
				
			|||
  } else { | 
				
			|||
    if (typeof ele == "string") { | 
				
			|||
      ele = document.getElementById("app"); | 
				
			|||
    } | 
				
			|||
    let width = ele.offsetWidth; | 
				
			|||
    let height = ele.offsetHeight; | 
				
			|||
    if (height == 0) { | 
				
			|||
      ele.style.height = width * 0.5 + "px"; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    let center = new TDMap.LngLat(longitude, latitude); | 
				
			|||
    this.map = new TDMap.Map(ele, { | 
				
			|||
      center, | 
				
			|||
      ...params, | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
    this.getCenter = function () { | 
				
			|||
      const center = this.map.getCenter(); | 
				
			|||
      const lat = center.getLat(); | 
				
			|||
      const lng = center.getLng(); | 
				
			|||
      return { lat, lng }; | 
				
			|||
    }; | 
				
			|||
 | 
				
			|||
    this.setCenter = function (lat, lng) { | 
				
			|||
      this.map.panTo(new TDMap.LngLat(lng, lat)); | 
				
			|||
    }; | 
				
			|||
 | 
				
			|||
    this.setMarker = function (lat, lng, title = "位置") { | 
				
			|||
      let lnglat = new TDMap.LngLat(lng, lat); | 
				
			|||
      if (!this.marker) { | 
				
			|||
        this.marker = new TDMap.Marker(lnglat, { | 
				
			|||
          title, | 
				
			|||
        }); | 
				
			|||
        this.map.addOverLay(this.marker); | 
				
			|||
      } else { | 
				
			|||
        this.marker.setLngLat(lnglat); | 
				
			|||
      } | 
				
			|||
    }; | 
				
			|||
 | 
				
			|||
    this.geocoder = new TDMap.Geocoder(); // 新建一个正逆地址解析类
 | 
				
			|||
    this.getAddress = async function (lat, lng) { | 
				
			|||
      return new Promise((reslove) => { | 
				
			|||
        this.geocoder.getLocation(new TDMap.LngLat(lng, lat), (result) => { | 
				
			|||
          if (result) { | 
				
			|||
            console.log("this.geocoder.getLocation", result); | 
				
			|||
            let status = result.getStatus(); | 
				
			|||
            reslove({ | 
				
			|||
              msg: "success", | 
				
			|||
              data: { | 
				
			|||
                address: result.getAddress(), | 
				
			|||
              }, | 
				
			|||
            }); | 
				
			|||
          } else { | 
				
			|||
            reslove({ | 
				
			|||
              msg: "failed", | 
				
			|||
              error: "解析失败", | 
				
			|||
            }); | 
				
			|||
          } | 
				
			|||
        }); | 
				
			|||
      }); | 
				
			|||
    }; | 
				
			|||
 | 
				
			|||
    this.on = function (eventType, fn) { | 
				
			|||
      if (eventType == "dragend") { | 
				
			|||
        this.map.on("dragend", (e) => { | 
				
			|||
          console.log("dragend", e); | 
				
			|||
          fn(e); | 
				
			|||
        }); | 
				
			|||
      } else { | 
				
			|||
        this.map.on(eventType, fn); | 
				
			|||
      } | 
				
			|||
    }; | 
				
			|||
  } | 
				
			|||
 | 
				
			|||
  this.searchNearby = async function (keyword) { | 
				
			|||
    const ret = await searchNearby(this.map, keyword); | 
				
			|||
 | 
				
			|||
    return ret; | 
				
			|||
  }; | 
				
			|||
 | 
				
			|||
  return this; | 
				
			|||
} | 
				
			|||
@ -0,0 +1,4 @@ | 
				
			|||
export const baseUrl = "http://59.206.203.34/tileservice/SDPubMap"; | 
				
			|||
export default { | 
				
			|||
  vec: "http://59.206.203.34/tileservice/SDPubMap?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=sdvec&STYLE=default&TILEMATRIXSET=c&TILEMATRIX={z}&TILEROW={row}&TILECOL={col}&FORMAT=image%2Fpng", | 
				
			|||
}; | 
				
			|||
@ -0,0 +1,7 @@ | 
				
			|||
export const baseUrl = "http://t7.tianditu.com/DataServer"; | 
				
			|||
export default { | 
				
			|||
  vec_w: | 
				
			|||
    "http://t7.tianditu.com/DataServer?T=vec_w&tk=8a08c117ab9ee45d508686b01cc8d397&x={x}&y={y}&l={z}", | 
				
			|||
  cva_w: | 
				
			|||
    "http://t7.tianditu.com/DataServer?T=cva_w&tk=8a08c117ab9ee45d508686b01cc8d397&x={x}&y={y}&l={z}", | 
				
			|||
}; | 
				
			|||
					Loading…
					
					
				
		Reference in new issue