From f9e9df1e43014e67580ad03dc86854a55673403d Mon Sep 17 00:00:00 2001 From: liuwh <hugeinfo123> Date: Thu, 30 Apr 2020 17:38:23 +0800 Subject: [PATCH] 爬虫词条管理 --- src/components/common/MenuView/index.jsx | 4 src/components/page/logManage/Rawler/index.scss | 14 src/components/page/logManage/browseLog/index.jsx | 41 + src/index.js | 3 src/components/page/logManage/Rawler/index.jsx | 240 +++++++++++++ report.20200430.142209.12268.0.001.json | 638 +++++++++++++++++++++++++++++++++++ src/menu/menu.data.js | 8 src/pages/login/login.scss | 10 src/components/page/logManage/operLog/index.jsx | 34 + src/pages/login/login.jsx | 6 src/pages/logManage/Rawler.jsx | 34 + 11 files changed, 1,008 insertions(+), 24 deletions(-) diff --git a/report.20200430.142209.12268.0.001.json b/report.20200430.142209.12268.0.001.json new file mode 100644 index 0000000..f28c926 --- /dev/null +++ b/report.20200430.142209.12268.0.001.json @@ -0,0 +1,638 @@ + +{ + "header": { + "reportVersion": 1, + "event": "Allocation failed - JavaScript heap out of memory", + "trigger": "FatalError", + "filename": "report.20200430.142209.12268.0.001.json", + "dumpEventTime": "2020-04-30T14:22:09Z", + "dumpEventTimeStamp": "1588227729407", + "processId": 12268, + "cwd": "C:\\Users\\31208\\Desktop\\OA系统\\hugeOA", + "commandLine": [ + "node", + "C:\\Users\\31208\\Desktop\\OA系统\\hugeOA\\node_modules\\_react-app-rewired@2.1.5@react-app-rewired\\scripts\\start.js" + ], + "nodejsVersion": "v12.16.1", + "wordSize": 64, + "arch": "x64", + "platform": "win32", + "componentVersions": { + "node": "12.16.1", + "v8": "7.8.279.23-node.31", + "uv": "1.34.0", + "zlib": "1.2.11", + "brotli": "1.0.7", + "ares": "1.15.0", + "modules": "72", + "nghttp2": "1.40.0", + "napi": "5", + "llhttp": "2.0.4", + "http_parser": "2.9.3", + "openssl": "1.1.1d", + "cldr": "35.1", + "icu": "64.2", + "tz": "2019c", + "unicode": "12.1" + }, + "release": { + "name": "node", + "lts": "Erbium", + "headersUrl": "https://nodejs.org/download/release/v12.16.1/node-v12.16.1-headers.tar.gz", + "sourceUrl": "https://nodejs.org/download/release/v12.16.1/node-v12.16.1.tar.gz", + "libUrl": "https://nodejs.org/download/release/v12.16.1/win-x64/node.lib" + }, + "osName": "Windows_NT", + "osRelease": "10.0.18362", + "osVersion": "Windows 10 Home China", + "osMachine": "x86_64", + "cpus": [ + { + "model": "Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz", + "speed": 1800, + "user": 9048078, + "nice": 0, + "sys": 13516265, + "idle": 183495984, + "irq": 5877468 + }, + { + "model": "Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz", + "speed": 1800, + "user": 4246593, + "nice": 0, + "sys": 3249671, + "idle": 198563437, + "irq": 297359 + }, + { + "model": "Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz", + "speed": 1800, + "user": 15028234, + "nice": 0, + "sys": 6677046, + "idle": 184354421, + "irq": 125187 + }, + { + "model": "Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz", + "speed": 1800, + "user": 5804343, + "nice": 0, + "sys": 2473093, + "idle": 197782265, + "irq": 50890 + }, + { + "model": "Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz", + "speed": 1800, + "user": 12651687, + "nice": 0, + "sys": 5315218, + "idle": 188092796, + "irq": 107531 + }, + { + "model": "Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz", + "speed": 1800, + "user": 5635984, + "nice": 0, + "sys": 3603453, + "idle": 196820265, + "irq": 54156 + }, + { + "model": "Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz", + "speed": 1800, + "user": 9591375, + "nice": 0, + "sys": 5498265, + "idle": 190970062, + "irq": 94703 + }, + { + "model": "Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz", + "speed": 1800, + "user": 7499328, + "nice": 0, + "sys": 4336812, + "idle": 194223546, + "irq": 52875 + } + ], + "networkInterfaces": [ + { + "name": "WLAN", + "internal": false, + "mac": "10:63:c8:6c:42:5d", + "address": "fe80::f097:53c0:9f1e:8049", + "netmask": "ffff:ffff:ffff:ffff::", + "family": "IPv6", + "scopeid": 17 + }, + { + "name": "WLAN", + "internal": false, + "mac": "10:63:c8:6c:42:5d", + "address": "192.168.0.119", + "netmask": "255.255.255.0", + "family": "IPv4" + }, + { + "name": "Loopback Pseudo-Interface 1", + "internal": true, + "mac": "00:00:00:00:00:00", + "address": "::1", + "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "family": "IPv6", + "scopeid": 0 + }, + { + "name": "Loopback Pseudo-Interface 1", + "internal": true, + "mac": "00:00:00:00:00:00", + "address": "127.0.0.1", + "netmask": "255.0.0.0", + "family": "IPv4" + } + ], + "host": "LAPTOP-F2POFSFG" + }, + "javascriptStack": { + "message": "No stack.", + "stack": [ + "Unavailable." + ] + }, + "nativeStack": [ + { + "pc": "0x00007ff7117619f9", + "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+10873" + }, + { + "pc": "0x00007ff711765e1c", + "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+28316" + }, + { + "pc": "0x00007ff711764dd8", + "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+24152" + }, + { + "pc": "0x00007ff7118634cb", + "symbol": "v8::base::CPU::has_sse+38363" + }, + { + "pc": "0x00007ff712079f4e", + "symbol": "v8::Isolate::ReportExternalAllocationLimitReached+94" + }, + { + "pc": "0x00007ff712062021", + "symbol": "v8::SharedArrayBuffer::Externalize+833" + }, + { + "pc": "0x00007ff711f2e57c", + "symbol": "v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436" + }, + { + "pc": "0x00007ff711f397d0", + "symbol": "v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312" + }, + { + "pc": "0x00007ff711f362f4", + "symbol": "v8::internal::Heap::PageFlagsAreConsistent+3204" + }, + { + "pc": "0x00007ff711f2bb13", + "symbol": "v8::internal::Heap::CollectGarbage+1283" + }, + { + "pc": "0x00007ff711f2a184", + "symbol": "v8::internal::Heap::AddRetainedMap+2452" + }, + { + "pc": "0x00007ff711f51e1f", + "symbol": "v8::internal::Factory::NewRawTwoByteString+95" + }, + { + "pc": "0x00007ff711f49c23", + "symbol": "v8::internal::Factory::NewConsString+755" + }, + { + "pc": "0x00007ff711c74cd5", + "symbol": "v8::internal::StubCache::value_reference+6053" + }, + { + "pc": "0x00007ff7124c4ddd", + "symbol": "v8::internal::SetupIsolateDelegate::SetupHeap+546637" + }, + { + "pc": "0x00007ff7124c603c", + "symbol": "v8::internal::SetupIsolateDelegate::SetupHeap+551340" + }, + { + "pc": "0x00000202f4b33289", + "symbol": "" + } + ], + "javascriptHeap": { + "totalMemory": 2165256192, + "totalCommittedMemory": 2165256192, + "usedMemory": 1996833296, + "availableMemory": 101749672, + "memoryLimit": 2197815296, + "heapSpaces": { + "read_only_space": { + "memorySize": 262144, + "committedMemory": 262144, + "capacity": 32808, + "used": 32808, + "available": 0 + }, + "new_space": { + "memorySize": 33554432, + "committedMemory": 33554432, + "capacity": 16759296, + "used": 2713248, + "available": 14046048 + }, + "old_space": { + "memorySize": 2033074176, + "committedMemory": 2033074176, + "capacity": 1941080144, + "used": 1902694920, + "available": 38385224 + }, + "code_space": { + "memorySize": 2527232, + "committedMemory": 2527232, + "capacity": 2233920, + "used": 2233920, + "available": 0 + }, + "map_space": { + "memorySize": 9703424, + "committedMemory": 9703424, + "capacity": 3228080, + "used": 3228080, + "available": 0 + }, + "large_object_space": { + "memorySize": 85512192, + "committedMemory": 85512192, + "capacity": 85386032, + "used": 85386032, + "available": 0 + }, + "code_large_object_space": { + "memorySize": 622592, + "committedMemory": 622592, + "capacity": 544288, + "used": 544288, + "available": 0 + }, + "new_large_object_space": { + "memorySize": 0, + "committedMemory": 0, + "capacity": 16759296, + "used": 0, + "available": 16759296 + } + } + }, + "resourceUsage": { + "userCpuSeconds": 206.171, + "kernelCpuSeconds": 196.609, + "cpuConsumptionPercent": 294, + "maxRss": 2815991808, + "pageFaults": { + "IORequired": 1457834, + "IONotRequired": 0 + }, + "fsActivity": { + "reads": 9772, + "writes": 79 + } + }, + "libuv": [ + ], + "environmentVariables": { + "ACLOCAL_PATH": "C:\\Program Files\\Git\\mingw64\\share\\aclocal;C:\\Program Files\\Git\\usr\\share\\aclocal", + "ALLUSERSPROFILE": "C:\\ProgramData", + "APPDATA": "C:\\Users\\31208\\AppData\\Roaming", + "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true", + "BABEL_ENV": "development", + "COLORTERM": "truecolor", + "CommonProgramFiles": "C:\\Program Files\\Common Files", + "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files", + "CommonProgramW6432": "C:\\Program Files\\Common Files", + "COMPUTERNAME": "LAPTOP-F2POFSFG", + "ComSpec": "C:\\windows\\system32\\cmd.exe", + "CONFIG_SITE": "C:/Program Files/Git/mingw64/etc/config.site", + "DISPLAY": "needs-to-be-defined", + "dp0": "C:\\Users\\31208\\Desktop\\OA系统\\hugeOA\\node_modules\\.bin\\", + "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData", + "EXEPATH": "C:\\Program Files\\Git", + "HOME": "C:\\Users\\31208", + "HOMEDRIVE": "C:", + "HOMEPATH": "\\Users\\31208", + "HOSTNAME": "LAPTOP-F2POFSFG", + "INFOPATH": "C:\\Program Files\\Git\\usr\\local\\info;C:\\Program Files\\Git\\usr\\share\\info;C:\\Program Files\\Git\\usr\\info;C:\\Program Files\\Git\\share\\info", + "INIT_CWD": "C:\\Users\\31208\\Desktop\\OA系统\\hugeOA\\src", + "IOJS_ORG_MIRROR": "https://npm.taobao.org/mirrors/iojs", + "LANG": "zh_CN.UTF-8", + "LOCALAPPDATA": "C:\\Users\\31208\\AppData\\Local", + "LOGONSERVER": "\\\\LAPTOP-F2POFSFG", + "MANPATH": "C:\\Program Files\\Git\\mingw64\\local\\man;C:\\Program Files\\Git\\mingw64\\share\\man;C:\\Program Files\\Git\\usr\\local\\man;C:\\Program Files\\Git\\usr\\share\\man;C:\\Program Files\\Git\\usr\\man;C:\\Program Files\\Git\\share\\man", + "MINGW_CHOST": "x86_64-w64-mingw32", + "MINGW_PACKAGE_PREFIX": "mingw-w64-x86_64", + "MINGW_PREFIX": "C:/Program Files/Git/mingw64", + "MSYSTEM": "MINGW64", + "MSYSTEM_CARCH": "x86_64", + "MSYSTEM_CHOST": "x86_64-w64-mingw32", + "MSYSTEM_PREFIX": "C:/Program Files/Git/mingw64", + "NODE": "C:\\Program Files\\nodejs\\node.exe", + "NODEJS_ORG_MIRROR": "https://npm.taobao.org/mirrors/node", + "NODE_ENV": "development", + "NODE_EXE": "C:\\Program Files\\nodejs\\\\node.exe", + "NODE_PATH": "", + "NODIST_IOJS_MIRROR": "https://npm.taobao.org/mirrors/iojs", + "NODIST_NODE_MIRROR": "https://npm.taobao.org/mirrors/node", + "NPM_CLI_JS": "C:\\Program Files\\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\",\"start\"],\"original\":[\"run\",\"start\"]}", + "npm_config_audit": "true", + "npm_config_audit_level": "low", + "npm_config_auth_type": "legacy", + "npm_config_before": "", + "npm_config_bin_links": "true", + "npm_config_browser": "", + "npm_config_ca": "", + "npm_config_cache": "C:\\Users\\31208\\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_format_package_lock": "true", + "npm_config_fund": "true", + "npm_config_git": "git", + "npm_config_git_tag_version": "true", + "npm_config_global": "", + "npm_config_globalconfig": "C:\\Users\\31208\\AppData\\Roaming\\npm\\etc\\npmrc", + "npm_config_globalignorefile": "C:\\Users\\31208\\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\\31208\\.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": "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js", + "npm_config_node_options": "", + "npm_config_node_version": "12.16.1", + "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\\31208\\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\\31208\\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\\31208\\.npmrc", + "npm_config_user_agent": "npm/6.13.4 node/v12.16.1 win32 x64", + "npm_config_version": "", + "npm_config_versions": "", + "npm_config_viewer": "browser", + "npm_execpath": "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js", + "npm_lifecycle_event": "start", + "npm_lifecycle_script": "react-app-rewired start", + "npm_node_execpath": "C:\\Program Files\\nodejs\\node.exe", + "npm_package_browserslist_development_0": "ie 8", + "npm_package_browserslist_development_1": "last 1 chrome version", + "npm_package_browserslist_development_2": "last 1 firefox version", + "npm_package_browserslist_development_3": "last 1 safari version", + "npm_package_browserslist_production_0": ">0.2%", + "npm_package_browserslist_production_1": "not dead", + "npm_package_browserslist_production_2": "not op_mini all", + "npm_package_dependencies_antd": "^3.26.11", + "npm_package_dependencies_axios": "^0.19.2", + "npm_package_dependencies_braft_editor": "^2.3.9", + "npm_package_dependencies_mocker_api": "^1.9.0", + "npm_package_dependencies_node_sass": "^4.13.1", + "npm_package_dependencies_react": "^16.12.0", + "npm_package_dependencies_react_app_polyfill": "^1.0.6", + "npm_package_dependencies_react_dom": "^16.12.0", + "npm_package_dependencies_react_router_dom": "^5.1.2", + "npm_package_dependencies_react_scripts": "3.4.0", + "npm_package_dependencies_sass_loader": "^8.0.2", + "npm_package_dependencies_wangeditor": "^3.1.1", + "npm_package_dependencies__testing_library_jest_dom": "^4.2.4", + "npm_package_dependencies__testing_library_react": "^9.3.2", + "npm_package_dependencies__testing_library_user_event": "^7.1.2", + "npm_package_description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).", + "npm_package_devDependencies_babel_plugin_import": "^1.13.0", + "npm_package_devDependencies_customize_cra": "^0.9.1", + "npm_package_devDependencies_es6_promise": "^4.2.8", + "npm_package_devDependencies_less": "^3.11.1", + "npm_package_devDependencies_less_loader": "^5.0.0", + "npm_package_devDependencies_mockjs": "^1.0.1-beta3", + "npm_package_devDependencies_moment": "^2.24.0", + "npm_package_devDependencies_react_app_rewired": "^2.1.5", + "npm_package_devDependencies__babel_plugin_proposal_class_properties": "^7.8.3", + "npm_package_eslintConfig_extends": "react-app", + "npm_package_gitHead": "2ea56ed08b58386f0612635101b1acd51cd4a44c", + "npm_package_homepage": "http://.", + "npm_package_name": "my-app", + "npm_package_private": "true", + "npm_package_readmeFilename": "README.md", + "npm_package_scripts_build": "react-app-rewired build", + "npm_package_scripts_eject": "react-app-rewired eject", + "npm_package_scripts_mock": "mocker ./mock", + "npm_package_scripts_page": "node .pjcode/page", + "npm_package_scripts_start": "react-app-rewired start", + "npm_package_scripts_test": "react-app-rewired test", + "npm_package_scripts_view": "node .pjcode/view", + "npm_package_version": "0.1.0", + "NPM_PREFIX_NPM_CLI_JS": "C:\\Users\\31208\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js", + "NUMBER_OF_PROCESSORS": "8", + "NVMW_IOJS_ORG_MIRROR": "https://npm.taobao.org/mirrors/iojs", + "NVMW_NODEJS_ORG_MIRROR": "https://npm.taobao.org/mirrors/node", + "NVMW_NPM_MIRROR": "https://npm.taobao.org/mirrors/npm", + "NVM_IOJS_ORG_MIRROR": "https://npm.taobao.org/mirrors/iojs", + "NVM_NODEJS_ORG_MIRROR": "https://npm.taobao.org/mirrors/node", + "OneDrive": "C:\\Users\\31208\\OneDrive", + "OneDriveConsumer": "C:\\Users\\31208\\OneDrive", + "ORIGINAL_PATH": "C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Users\\31208\\bin;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0;C:\\windows\\System32\\OpenSSH;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\Git\\cmd;C:\\Program Files\\nodejs;C:\\Users\\31208\\AppData\\Local\\Microsoft\\WindowsApps;D:\\Microsoft VS Code\\bin;C:\\Users\\31208\\AppData\\Roaming\\npm", + "ORIGINAL_TEMP": "C:/Users/31208/AppData/Local/Temp", + "ORIGINAL_TMP": "C:/Users/31208/AppData/Local/Temp", + "OS": "Windows_NT", + "Path": "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;C:\\Users\\31208\\Desktop\\OA系统\\hugeOA\\node_modules\\.bin;C:\\Users\\31208\\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\local\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Users\\31208\\bin;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0;C:\\windows\\System32\\OpenSSH;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\Git\\cmd;C:\\Program Files\\nodejs;C:\\Users\\31208\\AppData\\Local\\Microsoft\\WindowsApps;D:\\Microsoft VS Code\\bin;C:\\Users\\31208\\AppData\\Roaming\\npm;C:\\Program Files\\Git\\usr\\bin\\vendor_perl;C:\\Program Files\\Git\\usr\\bin\\core_perl", + "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JSE;.WSF;.WSH;.MSC;.CPL", + "PKG_CONFIG_PATH": "C:\\Program Files\\Git\\mingw64\\lib\\pkgconfig;C:\\Program Files\\Git\\mingw64\\share\\pkgconfig", + "PLINK_PROTOCOL": "ssh", + "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": "$P$G", + "PSModulePath": "C:\\Users\\31208\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules", + "PUBLIC": "C:\\Users\\Public", + "PWD": "C:/Users/31208/Desktop/OA系统/hugeOA", + "REACT_APP_CODER": "liuwh", + "REACT_APP_EMAIL": "", + "SESSIONNAME": "Console", + "SHELL": "C:\\Program Files\\Git\\usr\\bin\\bash.exe", + "SHLVL": "2", + "SSH_ASKPASS": "C:/Program Files/Git/mingw64/libexec/git-core/git-gui--askpass", + "SystemDrive": "C:", + "SystemRoot": "C:\\windows", + "TEMP": "C:\\Users\\31208\\AppData\\Local\\Temp", + "TERM": "xterm", + "TERM_PROGRAM": "vscode", + "TERM_PROGRAM_VERSION": "1.44.2", + "TMP": "C:\\Users\\31208\\AppData\\Local\\Temp", + "TMPDIR": "C:\\Users\\31208\\AppData\\Local\\Temp", + "USERDOMAIN": "LAPTOP-F2POFSFG", + "USERDOMAIN_ROAMINGPROFILE": "LAPTOP-F2POFSFG", + "USERNAME": "31208", + "USERPROFILE": "C:\\Users\\31208", + "WEBPACK_DEV_SERVER": "true", + "windir": "C:\\windows", + "_": "D:/Microsoft VS Code/Code.exe", + "_prog": "node" + }, + "sharedObjects": [ + "C:\\Program Files\\nodejs\\node.exe", + "C:\\windows\\SYSTEM32\\ntdll.dll", + "C:\\windows\\System32\\KERNEL32.DLL", + "C:\\windows\\System32\\KERNELBASE.dll", + "C:\\windows\\System32\\WS2_32.dll", + "C:\\windows\\System32\\RPCRT4.dll", + "C:\\windows\\SYSTEM32\\dbghelp.dll", + "C:\\windows\\System32\\PSAPI.DLL", + "C:\\windows\\System32\\ADVAPI32.dll", + "C:\\windows\\System32\\ucrtbase.dll", + "C:\\windows\\System32\\msvcrt.dll", + "C:\\windows\\System32\\sechost.dll", + "C:\\windows\\SYSTEM32\\USERENV.dll", + "C:\\windows\\SYSTEM32\\IPHLPAPI.DLL", + "C:\\windows\\System32\\USER32.dll", + "C:\\windows\\System32\\profapi.dll", + "C:\\windows\\System32\\win32u.dll", + "C:\\windows\\System32\\GDI32.dll", + "C:\\windows\\System32\\gdi32full.dll", + "C:\\windows\\System32\\msvcp_win.dll", + "C:\\windows\\System32\\CRYPT32.dll", + "C:\\windows\\System32\\MSASN1.dll", + "C:\\windows\\System32\\bcrypt.dll", + "C:\\windows\\SYSTEM32\\WINMM.dll", + "C:\\windows\\SYSTEM32\\WINMMBASE.dll", + "C:\\windows\\System32\\cfgmgr32.dll", + "C:\\windows\\System32\\bcryptPrimitives.dll", + "C:\\windows\\System32\\IMM32.DLL", + "C:\\windows\\System32\\powrprof.dll", + "C:\\windows\\System32\\UMPDC.dll", + "C:\\windows\\SYSTEM32\\CRYPTBASE.DLL", + "C:\\windows\\system32\\uxtheme.dll", + "C:\\windows\\System32\\combase.dll", + "C:\\windows\\system32\\mswsock.dll", + "C:\\windows\\System32\\kernel.appcore.dll", + "C:\\windows\\System32\\NSI.dll", + "C:\\windows\\SYSTEM32\\dhcpcsvc6.DLL", + "C:\\windows\\SYSTEM32\\dhcpcsvc.DLL", + "C:\\windows\\SYSTEM32\\DNSAPI.dll", + "C:\\windows\\system32\\napinsp.dll", + "C:\\windows\\system32\\pnrpnsp.dll", + "C:\\windows\\System32\\winrnr.dll", + "C:\\windows\\system32\\NLAapi.dll", + "C:\\windows\\system32\\wshbth.dll", + "C:\\Windows\\System32\\rasadhlp.dll", + "C:\\windows\\System32\\fwpuclnt.dll", + "\\\\?\\C:\\Users\\31208\\Desktop\\OA系统\\hugeOA\\node_modules\\_node-sass@4.13.1@node-sass\\vendor\\win32-x64-72\\binding.node" + ] +} \ No newline at end of file diff --git a/src/components/common/MenuView/index.jsx b/src/components/common/MenuView/index.jsx index 19202f3..77c8892 100644 --- a/src/components/common/MenuView/index.jsx +++ b/src/components/common/MenuView/index.jsx @@ -25,9 +25,9 @@ if (name) { const index = name.indexOf(' - '); if (index > -1) { - document.title = `${name.substr(index)}`; + document.title = `恒巨信息OA-${name.substr(index)}`; } else { - document.title = `${name}`; + document.title = `恒巨信息OA-${name}`; } } else { document.title = `恒巨信息`; diff --git a/src/components/page/logManage/Rawler/index.jsx b/src/components/page/logManage/Rawler/index.jsx new file mode 100644 index 0000000..edaf1f8 --- /dev/null +++ b/src/components/page/logManage/Rawler/index.jsx @@ -0,0 +1,240 @@ +/* eslint-disable */ +/**liuwh + * 4/30/2020, 2:39:21 PM + * doc comment for the file goes here + */ + +/** 爬虫词条管理 */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import { Badge, Button, Divider, Popconfirm, Modal, Row, Col, Input, message } from 'antd'; +import TableView from '../../../common/TableView'; +import SearchFormView from '../../../common/SearchFormView'; +import './index.scss'; +import moment from 'moment'; +import './index.scss'; +import fetch from '../../../../api/request'; + +export default class Rawler extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + formData: { + __key: Date.now(), + page: 1, + size: 10, + }, + visible: false, + btnLoading: false, + data: {} + }; + } + + componentDidMount() { } + + onAdd = () => { + this.setState({ + visible: true + }) + } + + + setFormData = data => { + console.log('form', data); + this.setState({ + formData: data, + }); + } + + renderColumns = () => { + return [ + { title: '序号', dataIndex: 'index' }, + { title: '关键词', dataIndex: 'keyword' }, + { + title: '创建时间', dataIndex: 'createTime', render: (cur, item) => { + return cur ? moment(cur).format("YYYY-MM-DD HH:mm") : "" + } + }, + { + title: '操作', + key: 'operation', + render: (text, record) => { + return ( + <React.Fragment> + <a onClick={() => this.linkDetail(record)}>修改</a> + <Divider type="vertical" /> + <Popconfirm title="确定删除吗?" onConfirm={() => this.handleDelete(record.id, 0)}> + <a>删除</a> + </Popconfirm> + <Divider type="vertical" /> + { + record.status == '1' ? + <Popconfirm title="确定停用吗?" onConfirm={() => this.handleDelete(record.id, '99')}> + <a>停用</a> + </Popconfirm> : + <Popconfirm title="确定启用吗?" onConfirm={() => this.handleDelete(record.id, '1')}> + <a style={{ color: 'gray' }}>启用</a> + </Popconfirm> + } + + </React.Fragment> + ); + }, + }, + + ]; + } + + //修改 + linkDetail = record => { + this.setState({ + data: record, + visible: true + }) + } + + onCancel = () => { + this.setState({ + visible: false + }) + } + + onSave = () => { + let _this = this; + const { data } = _this.state; + _this.setState({ + btnLoading: true + }) + fetch({ + url: `api/param/saveSpiderParam`, + method: 'POST', + data: { + ...data + } + }).then(res => { + console.log(res) + _this.setState({ + btnLoading: false, + }); + message.success("更新成功!"); + _this.setState({ + formData: { + ..._this.state.formData, + __key: Date.now(), + }, + visible: false, + data: {} + }) + }) + } + + //停用或者启用关键词 + handleDelete = (id, status) => { + const that = this; + if (status == 0) { + fetch({ + url: `api/param/deleteParam`, + params: { + id + } + }).then(res => { + that.setState({ + formData: { + ...that.state.formData, + __key: Date.now(), + }, + }) + }) + + } else { + fetch({ + url: `api/param/deleteOrStartParam`, + params: { + id, + status + } + }).then(res => { + that.setState({ + formData: { + ...that.state.formData, + __key: Date.now(), + }, + }) + }) + } + } + + inputChange = ({ target: { value, name } }) => { + this.setState(({ data }) => ({ + data: { + ...data, + [name]: value + } + })) + } + + render() { + const { formData, visible, data, btnLoading } = this.state; + let tableParams = { + url: `api/param/queryParam`, + formData, + key: formData.__key, + columns: this.renderColumns(), + extraFromData: { + logType: '2', + }, + setFormData: this.setFormData + } + const formItemLayout = { + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + }; + return ( + <div className="rawler-main"> + <Button type="primary" danger onClick={this.onAdd} >新增关键词</Button> + <Divider /> + <TableView {...tableParams} /> + <Modal + destroyOnClose + title="新增关键词" + visible={visible} + footer={null} + onCancel={this.onCancel}> + <Row + type="flex" + gutter={20} + style={{ margin: '20px 0 0 20px', alignItems: 'center ' }}> + <Col> + 关键词: + </Col> + <Col style={{ flex: '1' }}> + <Input value={data.keyword || ''} name='keyword' onChange={this.inputChange} placeholder="请输入关键词" /> + </Col> + </Row> + <Row + type="flex" + gutter={20} + justify="end" + style={{ marginTop: '20px' }}> + <Col> + <Button onClick={this.onCancel}>取消</Button> + </Col> + <Col> + <Button type="primary" htmlType="submit" onClick={this.onSave} loading={btnLoading}> + 确定 + </Button> + </Col> + </Row> + + </Modal> + </div> + ) + } +} diff --git a/src/components/page/logManage/Rawler/index.scss b/src/components/page/logManage/Rawler/index.scss new file mode 100644 index 0000000..ef4070c --- /dev/null +++ b/src/components/page/logManage/Rawler/index.scss @@ -0,0 +1,14 @@ +/* eslint-disable */ +/**liuwh + * 4/30/2020, 2:39:21 PM + * doc comment for the file goes here + */ + +/** Happy Coding */ +.rawler { + &-main { + background: #fff; + margin: 20px; + padding: 20px; + } +} diff --git a/src/components/page/logManage/browseLog/index.jsx b/src/components/page/logManage/browseLog/index.jsx index f556d93..d7c38c3 100644 --- a/src/components/page/logManage/browseLog/index.jsx +++ b/src/components/page/logManage/browseLog/index.jsx @@ -6,7 +6,7 @@ /** 浏览日志 */ import React, { ReactNode, ReactEventHandler, Component } from 'react'; -import { Badge } from 'antd'; +import { Badge, Tooltip } from 'antd'; import TableView from '../../../common/TableView'; import SearchFormView from '../../../common/SearchFormView'; import './index.scss'; @@ -41,26 +41,51 @@ { title: '序号', dataIndex: 'index' }, { title: '浏览者', dataIndex: 'userName' }, { title: '浏览模块', dataIndex: 'moduleName' }, - { title: '浏览功能', dataIndex: 'functionName' }, - { title: '浏览描述', dataIndex: 'operDesc' }, + { + title: '浏览功能', dataIndex: 'functionName', + render: (cur, item) => { + return <Tooltip title={cur}><span>{this.fontNumber(cur||'')}</span></Tooltip> + } + }, + { + title: '浏览描述', dataIndex: 'operDesc', + render: (cur, item) => { + return <Tooltip title={cur}><span>{this.fontNumber(cur||'')}</span></Tooltip> + } + }, { title: '浏览日期', dataIndex: 'createTime', render: (cur, item) => { - return cur ? moment(cur).format("YYYY-MM-DD HH:mm") : "" + return cur ? moment(cur).format("YYYY-MM-DD HH:mm:ss") : "" } }, { title: 'IP地址', dataIndex: 'operIp' }, { title: '访问终端', dataIndex: 'operTerminal' }, { title: '访问浏览器', dataIndex: 'operBrowser' }, - { title: '状态', dataIndex: 'operStatus', render: (cur, item)=> { - return this.operStatus(cur) - }} + { + title: '状态', dataIndex: 'operStatus', render: (cur, item) => { + return cur == '1' ? <Badge count={'成功'} style={{ backgroundColor: '#52c41a' }} /> : <Badge count={'失败'} /> + + } + } ]; + } + + + fontNumber(date) { + const length = date.length + if (length > 16) { + var str = '' + str = date.substring(0, 16) + '......' + return str + } else { + return date + } } operStatus = (status) => { switch (status) { case '1': - return <Badge count={'成功'} style={{ backgroundColor: '#52c41a' }}/> + return <Badge count={'成功'} style={{ backgroundColor: '#52c41a' }} /> case '99': return <Badge count={'失败'} /> } diff --git a/src/components/page/logManage/operLog/index.jsx b/src/components/page/logManage/operLog/index.jsx index 0018315..8b18db2 100644 --- a/src/components/page/logManage/operLog/index.jsx +++ b/src/components/page/logManage/operLog/index.jsx @@ -6,7 +6,7 @@ /** 操作日志 */ import React, { ReactNode, ReactEventHandler, Component } from 'react'; -import { Badge } from 'antd'; +import { Badge, Tooltip } from 'antd'; import TableView from '../../../common/TableView'; import SearchFormView from '../../../common/SearchFormView'; import './index.scss'; @@ -43,11 +43,22 @@ { title: '序号', dataIndex: 'index' }, { title: '操作者', dataIndex: 'userName' }, { title: '操作模块', dataIndex: 'moduleName' }, - { title: '操作功能', dataIndex: 'functionName' }, - { title: '操作描述', dataIndex: 'operDesc' }, + { + title: '操作功能', + dataIndex: 'functionName', + render: (cur, item) => { + return <Tooltip title={cur}><span>{this.fontNumber(cur || '')}</span></Tooltip> + } + }, + { + title: '操作描述', dataIndex: 'operDesc', + render: (cur, item) => { + return <Tooltip title={cur}><span>{this.fontNumber(cur || '')}</span></Tooltip> + } + }, { title: '操作日期', dataIndex: 'createTime', render: (cur, item) => { - return cur ? moment(cur).format("YYYY-MM-DD HH:mm") : "" + return cur ? moment(cur).format("YYYY-MM-DD HH:mm:ss") : "" } }, { title: 'IP地址', dataIndex: 'operIp' }, @@ -55,16 +66,27 @@ { title: '访问浏览器', dataIndex: 'operBrowser' }, { title: '状态', dataIndex: 'operStatus', render: (cur, item) => { - return this.operStatus(cur) + return cur == '1' ? <Badge count={'成功'} style={{ backgroundColor: '#52c41a' }} /> : <Badge count={'失败'} /> } } ]; } + fontNumber(date) { + const length = date.length + if (length > 16) { + var str = '' + str = date.substring(0, 16) + '......' + return str + } else { + return date + } + } + operStatus = (status) => { switch (status) { case '1': - return <Badge count={'成功'} style={{ backgroundColor: '#52c41a' }}/> + return <Badge count={'成功'} style={{ backgroundColor: '#52c41a' }} /> case '99': return <Badge count={'失败'} /> } diff --git a/src/index.js b/src/index.js index 5f3f604..e9f3628 100644 --- a/src/index.js +++ b/src/index.js @@ -28,6 +28,7 @@ import DocumentDetail from './pages/document/DocumentDetail';//文档详情 import BrowseLog from './pages/logManage/browseLog';//浏览日志 import OperLog from './pages/logManage/operLog';//操作日志 +import Rawler from './pages/logManage/Rawler';//爬虫词条管理 import Information from './pages/personal/information';//个人信息 const { Content } = Layout; @@ -64,6 +65,8 @@ <Route path="/logManage/browseLog" component={BrowseLog} /> {/* 操作日志 */} <Route path="/logManage/operLog" component={OperLog} /> + {/* 爬虫词条管理 */} + <Route path="/logManage/rawler" component={Rawler} /> {/* 个人信息 */} <Route path="/personal/information" component={Information} /> diff --git a/src/menu/menu.data.js b/src/menu/menu.data.js index f8afa87..13aef07 100644 --- a/src/menu/menu.data.js +++ b/src/menu/menu.data.js @@ -96,6 +96,14 @@ parentKey: '/logManage', children: [], }, + { + key: '/logManage/rawler', + name: "爬虫词条管理", + path: "/logManage/rawler", + permKey: '/logManage/rawler', + parentKey: '/logManage', + children: [], + }, ], }, { diff --git a/src/pages/logManage/Rawler.jsx b/src/pages/logManage/Rawler.jsx new file mode 100644 index 0000000..4f26819 --- /dev/null +++ b/src/pages/logManage/Rawler.jsx @@ -0,0 +1,34 @@ +/* eslint-disable */ +/**liuwh + * 4/30/2020, 2:37:29 PM + * doc comment for the file goes here + */ + +/** 爬虫词条管理 */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import RawlerPage from '../../components/page/logManage/Rawler' + + +export default class Rawler extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + }; + } + + componentWillMount() { } + + componentDidMount() { } + + componentDidShow() { } + + render() { + return ( + <div className="rawler-main"> + <RawlerPage /> + </div> + ) + } +} diff --git a/src/pages/login/login.jsx b/src/pages/login/login.jsx index b5b4827..3d77cf0 100644 --- a/src/pages/login/login.jsx +++ b/src/pages/login/login.jsx @@ -24,7 +24,7 @@ }; } componentWillMount() { - document.title = '用户登录' + document.title = '恒巨信息OA-用户登录' } handleSubmit = e => { @@ -90,7 +90,7 @@ rules: [{ required: true, message: '请输入账号!' }], })( <Input - style={{ width: '32vh', height: '5vh', margin: '12px' }} + style={{ width: '300px', height: '48px', margin: '12px' }} prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} placeholder="请输入账号" />, @@ -102,7 +102,7 @@ initialValue: 'admin' })( <Input - style={{ width: '32vh', height: '5vh', margin: '12px' }} + style={{ width: '300px', height: '48px', margin: '12px' }} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} type="password" placeholder="请输入密码" diff --git a/src/pages/login/login.scss b/src/pages/login/login.scss index 8d27685..e1b6744 100644 --- a/src/pages/login/login.scss +++ b/src/pages/login/login.scss @@ -12,8 +12,8 @@ float: right; } .login-main .login-form-button { - width: 32vh; - height: 5vh; + width: 300px; + height: 48px; } .login-div-top-img { @@ -58,11 +58,11 @@ } .login-div-content-div{ - width: 40.8vh; + width: 382px; background: #fff; - height: 44.8vh; + height: 420px; position: absolute; - right: 19vh; + right: 108px; border-radius: 8px; margin-top: 10vh; } -- Gitblit v1.8.0