From a4f102defd2c7918617717f3307b6a3ef63859ff Mon Sep 17 00:00:00 2001 From: Mr Ke <kelq@hugeinfo.com.cn> Date: Fri, 29 May 2020 18:03:17 +0800 Subject: [PATCH] 绩效总览 (列表、详情)、绩效指标 (配置) --- src/module/login/login.jsx | 2 src/components/oa/merits/meritsDispose/index.jsx | 219 +++++++++ src/components/oa/merits/meritsOverview/index.scss | 14 src/index.css | 7 src/module/oa/merits/meritsExamine.jsx | 33 + src/components/oa/merits/meritsDispose/index.scss | 20 src/routeDom/oaRouteDom.jsx | 10 src/api/httpurl.js | 2 src/module/oa/merits/meritsOverview.jsx | 33 + src/components/oa/merits/meritsExamine/index.jsx | 92 +++ src/index.js | 28 + report.20200529.103416.21856.0.001.json | 483 ++++++++++++++++++++ src/api/request.js | 7 src/components/oa/merits/meritsOverview/index.jsx | 104 ++++ src/menu/index.js | 2 src/components/common/TableView/index.jsx | 56 + src/components/oa/logManage/browseLog/index.jsx | 1 src/components/oa/merits/meritsExamine/index.scss | 14 src/module/oa/merits/meritsDispose.jsx | 34 + src/components/common/SearchFormView/index.jsx | 55 + src/components/oa/merits/meritsDetail/index.jsx | 145 ++++++ src/components/common/HeadView/index.jsx | 1 src/menu/menu.oa.js | 4 src/components/oa/merits/meritsDetail/index.scss | 17 src/module/oa/merits/meritsDetail.jsx | 33 + 25 files changed, 1,369 insertions(+), 47 deletions(-) diff --git a/report.20200529.103416.21856.0.001.json b/report.20200529.103416.21856.0.001.json new file mode 100644 index 0000000..20e60b9 --- /dev/null +++ b/report.20200529.103416.21856.0.001.json @@ -0,0 +1,483 @@ + +{ + "header": { + "event": "Allocation failed - JavaScript heap out of memory", + "trigger": "FatalError", + "filename": "report.20200529.103416.21856.0.001.json", + "dumpEventTime": "2020-05-29T10:34:16Z", + "dumpEventTimeStamp": "1590719656961", + "processId": 21856, + "cwd": "E:\\HugeInfo_Code\\oa", + "commandLine": [ + "node", + "E:\\HugeInfo_Code\\oa\\node_modules\\_react-app-rewired@2.1.5@react-app-rewired\\scripts\\start.js" + ], + "nodejsVersion": "v12.2.0", + "wordSize": 64, + "arch": "x64", + "platform": "win32", + "componentVersions": { + "node": "12.2.0", + "v8": "7.4.288.21-node.17", + "uv": "1.28.0", + "zlib": "1.2.11", + "brotli": "1.0.7", + "ares": "1.15.0", + "modules": "72", + "nghttp2": "1.38.0", + "napi": "4", + "llhttp": "1.1.3", + "http_parser": "2.8.0", + "openssl": "1.1.1b", + "cldr": "35.1", + "icu": "64.2", + "tz": "2019a", + "unicode": "12.1" + }, + "release": { + "name": "node", + "headersUrl": "https://nodejs.org/download/release/v12.2.0/node-v12.2.0-headers.tar.gz", + "sourceUrl": "https://nodejs.org/download/release/v12.2.0/node-v12.2.0.tar.gz", + "libUrl": "https://nodejs.org/download/release/v12.2.0/win-x64/node.lib" + }, + "osName": "Windows_NT", + "osRelease": "10.0.18363", + "osVersion": "Windows 10 Home China", + "osMachine": "x86_64", + "host": "LAPTOP-RI7D261L" + }, + "javascriptStack": { + "message": "No stack.", + "stack": [ + "Unavailable." + ] + }, + "nativeStack": [ + { + "pc": "0x00007ff7c8ef4e09", + "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+9161" + }, + { + "pc": "0x00007ff7c8ef8764", + "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+23844" + }, + { + "pc": "0x00007ff7c8ef7785", + "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+19781" + }, + { + "pc": "0x00007ff7c8fdf9ab", + "symbol": "uv_loop_fork+47931" + }, + { + "pc": "0x00007ff7c93171fe", + "symbol": "v8::internal::Parser::ReportMessageAt+206" + }, + { + "pc": "0x00007ff7c92eb27a", + "symbol": "v8::internal::wasm::StreamingDecoder::NotifyCompilationEnded+666" + }, + { + "pc": "0x00007ff7c93816bc", + "symbol": "v8::internal::Heap::CreateFillerObjectAt+2972" + }, + { + "pc": "0x00007ff7c938942f", + "symbol": "v8::internal::LocalEmbedderHeapTracer::NotifyV8MarkingWorklistWasEmpty+5375" + }, + { + "pc": "0x00007ff7c937faa3", + "symbol": "v8::internal::Heap::CollectGarbage+1235" + }, + { + "pc": "0x00007ff7c937e1a4", + "symbol": "v8::internal::GCTracer::AddScopeSample+1316" + }, + { + "pc": "0x00007ff7c93bedd3", + "symbol": "v8::internal::Factory::NewFillerObject+67" + }, + { + "pc": "0x00007ff7c96e57d6", + "symbol": "v8::internal::OptimizingCompileDispatcher::Unblock+116966" + }, + { + "pc": "0x00007ff7c9b80366", + "symbol": "v8::internal::NativesCollection<0>::GetScriptsSource+660214" + } + ], + "javascriptHeap": { + "totalMemory": 2156130304, + "totalCommittedMemory": 2156130304, + "usedMemory": 1876224704, + "availableMemory": 76994904, + "memoryLimit": 2197815296, + "heapSpaces": { + "read_only_space": { + "memorySize": 524288, + "committedMemory": 524288, + "capacity": 523976, + "used": 31712, + "available": 492264 + }, + "new_space": { + "memorySize": 33554432, + "committedMemory": 33554432, + "capacity": 16767232, + "used": 762392, + "available": 16004840 + }, + "old_space": { + "memorySize": 1971970048, + "committedMemory": 1971970048, + "capacity": 1732711024, + "used": 1730665448, + "available": 2045576 + }, + "code_space": { + "memorySize": 3833856, + "committedMemory": 3833856, + "capacity": 3244960, + "used": 3244960, + "available": 0 + }, + "map_space": { + "memorySize": 7868416, + "committedMemory": 7868416, + "capacity": 3334400, + "used": 3334400, + "available": 0 + }, + "large_object_space": { + "memorySize": 137756672, + "committedMemory": 137756672, + "capacity": 137635488, + "used": 137635488, + "available": 0 + }, + "code_large_object_space": { + "memorySize": 622592, + "committedMemory": 622592, + "capacity": 550304, + "used": 550304, + "available": 0 + }, + "new_large_object_space": { + "memorySize": 0, + "committedMemory": 0, + "capacity": 16767232, + "used": 0, + "available": 16767232 + } + } + }, + "resourceUsage": { + "userCpuSeconds": 474.046, + "kernelCpuSeconds": 220.39, + "cpuConsumptionPercent": 13.2299, + "maxRss": 2717171712, + "pageFaults": { + "IORequired": 4563168, + "IONotRequired": 0 + }, + "fsActivity": { + "reads": 13095, + "writes": 577 + } + }, + "libuv": [ + ], + "environmentVariables": { + "=C:": "C:\\", + "ALLUSERSPROFILE": "C:\\ProgramData", + "APPDATA": "C:\\Users\\Mr Ke\\AppData\\Roaming", + "AUTHORINFO": "\"Ke Liqin <545800322@qq.com>\"", + "BABEL_ENV": "development", + "CLASSPATH": ".;C:\\Program Files\\Java\\jdk1.8.0_131\\lib;C:\\Program Files\\Java\\jdk1.8.0_131\\lib\\tools.jar", + "COLORTERM": "truecolor", + "CommonProgramFiles": "C:\\Program Files\\Common Files", + "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files", + "CommonProgramW6432": "C:\\Program Files\\Common Files", + "COMPUTERNAME": "LAPTOP-RI7D261L", + "ComSpec": "C:\\WINDOWS\\system32\\cmd.exe", + "configsetroot": "C:\\WINDOWS\\ConfigSetRoot", + "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData", + "FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer", + "FPS_BROWSER_USER_PROFILE_STRING": "Default", + "GIT_ASKPASS": "d:\\Program Files\\Microsoft VS Code\\resources\\app\\extensions\\git\\dist\\askpass.sh", + "HOME": "C:\\Users\\Mr Ke", + "HOMEDRIVE": "C:", + "HOMEPATH": "\\Users\\Mr Ke", + "INIT_CWD": "E:\\HugeInfo_Code\\oa", + "JAVA_HOME": "C:\\Program Files\\Java\\jdk1.8.0_131", + "LANG": "zh_CN.UTF-8", + "LOCALAPPDATA": "C:\\Users\\Mr Ke\\AppData\\Local", + "LOGONSERVER": "\\\\LAPTOP-RI7D261L", + "NODE": "C:\\Program Files\\nodejs\\node.exe", + "NODE_ENV": "development", + "NODE_EXE": "C:\\Program Files\\nodejs\\\\node.exe", + "NODE_PATH": "", + "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\":[\"start\"],\"original\":[\"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\\Mr Ke\\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_disturl": "https://npm.taobao.org/dist", + "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\\Mr Ke\\AppData\\Roaming\\npm\\etc\\npmrc", + "npm_config_globalignorefile": "C:\\Users\\Mr Ke\\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\\Mr Ke\\.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.npm.taobao.org/", + "npm_config_node_gyp": "C:\\Users\\Mr Ke\\AppData\\Roaming\\nvm\\v12.2.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js", + "npm_config_node_options": "", + "npm_config_node_version": "12.2.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\\Mr Ke\\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.npm.taobao.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\\MRKE~1\\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\\Mr Ke\\.npmrc", + "npm_config_user_agent": "npm/6.9.0 node/v12.2.0 win32 x64", + "npm_config_version": "", + "npm_config_versions": "", + "npm_config_viewer": "browser", + "npm_execpath": "C:\\Users\\Mr Ke\\AppData\\Roaming\\nvm\\v12.2.0\\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": "77a2a090ff1b9d1b03795d696954a28ba0e0871f", + "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\\Mr Ke\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js", + "NUMBER_OF_PROCESSORS": "8", + "NVM_HOME": "C:\\Users\\Mr Ke\\AppData\\Roaming\\nvm", + "NVM_SYMLINK": "C:\\Program Files\\nodejs", + "OneDrive": "C:\\Users\\Mr Ke\\OneDrive", + "OS": "Windows_NT", + "Path": "C:\\Users\\Mr Ke\\AppData\\Roaming\\nvm\\v12.2.0\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;E:\\HugeInfo_Code\\oa\\node_modules\\.bin;C:\\ProgramData\\Oracle\\Java\\javapath;D:\\Program Files\\Git\\cmd;C:\\Windows\\System32;C:\\Program Files (x86)\\Common Files\\Thunder Network\\KanKan\\Codecs;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;\"C:\\Program Files\\Java\\jdk1.8.0_131\\bin;C:\\Program Files\\Java\\jdk1.8.0_131\\jre\\bin\";C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;D:\\Program Files\\Yarn\\bin\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Users\\Mr Ke\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\Users\\Mr Ke\\AppData\\Local\\Programs\\Python\\Python37\\Scripts\\;C:\\Users\\Mr Ke\\AppData\\Local\\Programs\\Python\\Python37\\;C:\\Users\\Mr Ke\\AppData\\Local\\Microsoft\\WindowsApps;D:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\Mr Ke\\AppData\\Local\\BypassRuntm;C:\\Users\\Mr Ke\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Mr Ke\\AppData\\Local\\Yarn\\bin;C:\\Users\\Mr Ke\\AppData\\Roaming\\npm;C:\\Users\\Mr Ke\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs", + "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JSE;.WSF;.WSH;.MSC;.CPL", + "PROCESSOR_ARCHITECTURE": "AMD64", + "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel", + "PROCESSOR_LEVEL": "6", + "PROCESSOR_REVISION": "9e0a", + "ProgramData": "C:\\ProgramData", + "ProgramFiles": "C:\\Program Files", + "ProgramFiles(x86)": "C:\\Program Files (x86)", + "ProgramW6432": "C:\\Program Files", + "PROMPT": "$P$G", + "PSModulePath": "C:\\Users\\Mr Ke\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules", + "PUBLIC": "C:\\Users\\Public", + "REACT_APP_CODER": "liuwh", + "REACT_APP_EMAIL": "", + "SESSIONNAME": "Console", + "SystemDrive": "C:", + "SystemRoot": "C:\\WINDOWS", + "TEMP": "C:\\Users\\MRKE~1\\AppData\\Local\\Temp", + "TERM_PROGRAM": "vscode", + "TERM_PROGRAM_VERSION": "1.45.1", + "TMP": "C:\\Users\\MRKE~1\\AppData\\Local\\Temp", + "USERDOMAIN": "LAPTOP-RI7D261L", + "USERDOMAIN_ROAMINGPROFILE": "LAPTOP-RI7D261L", + "USERNAME": "Mr Ke", + "USERPROFILE": "C:\\Users\\Mr Ke", + "VSCODE_GIT_ASKPASS_MAIN": "d:\\Program Files\\Microsoft VS Code\\resources\\app\\extensions\\git\\dist\\askpass-main.js", + "VSCODE_GIT_ASKPASS_NODE": "D:\\Program Files\\Microsoft VS Code\\Code.exe", + "VSCODE_GIT_IPC_HANDLE": "\\\\.\\pipe\\vscode-git-0f14f4766a-sock", + "WEBPACK_DEV_SERVER": "true", + "windir": "C:\\WINDOWS" + }, + "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\\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\\gdi32full.dll", + "C:\\WINDOWS\\SYSTEM32\\dbghelp.dll", + "C:\\WINDOWS\\System32\\msvcp_win.dll", + "C:\\WINDOWS\\System32\\ucrtbase.dll", + "C:\\WINDOWS\\System32\\PSAPI.DLL", + "C:\\WINDOWS\\System32\\CRYPT32.dll", + "C:\\WINDOWS\\System32\\MSASN1.dll", + "C:\\WINDOWS\\SYSTEM32\\USERENV.dll", + "C:\\WINDOWS\\SYSTEM32\\IPHLPAPI.DLL", + "C:\\WINDOWS\\System32\\bcrypt.dll", + "C:\\WINDOWS\\System32\\profapi.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\\uxtheme.dll", + "C:\\WINDOWS\\System32\\combase.dll", + "C:\\WINDOWS\\system32\\mswsock.dll", + "C:\\WINDOWS\\System32\\kernel.appcore.dll", + "C:\\WINDOWS\\SYSTEM32\\CRYPTBASE.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", + "\\\\?\\E:\\HugeInfo_Code\\oa\\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/api/httpurl.js b/src/api/httpurl.js index 2db8601..6c15c9e 100644 --- a/src/api/httpurl.js +++ b/src/api/httpurl.js @@ -1,5 +1,5 @@ //内网测试地址 -let StagingUrl = 'http://192.168.0.12:9072'; +let StagingUrl = 'http://192.168.3.12:9072'; // let StagingUrl = "http://120.79.193.119:9072"; // let StagingUrl = "http://120.79.193.119:9075"; diff --git a/src/api/request.js b/src/api/request.js index 5d6752d..10f16d4 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -3,7 +3,9 @@ import { message } from 'antd'; import { NetworkState, BASE_URL, MockUrl } from './httpurl'; +import { createHashHistory } from 'history'; const CODE_SUCCESS = '200'; +const history = createHashHistory(); let recognitionParams = [].reduce((p, n) => { if (eval(n)) { @@ -64,8 +66,7 @@ code == '10003' ) { // token失效重新返回登录页面 - // this.props.history.push({ pathname: '/login' }); - window.location.href = window.location.origin + '#/login'; + history.push('/login'); } else { message.warning(msg); return false; @@ -73,6 +74,6 @@ }) .catch((err) => { console.log(err); - window.location.href = window.location.origin + '#/login'; + // history.push('/login'); }); } diff --git a/src/components/common/HeadView/index.jsx b/src/components/common/HeadView/index.jsx index 9927dd1..b69749f 100644 --- a/src/components/common/HeadView/index.jsx +++ b/src/components/common/HeadView/index.jsx @@ -24,6 +24,7 @@ // 清空用户相关信息 window.localStorage.setItem('menu', ''); window.localStorage.setItem('token', ''); + window.localStorage.setItem('role', ''); message.success('退出成功!'); fun({ role: '' }); window.location.href = window.location.origin + '/#/login'; diff --git a/src/components/common/SearchFormView/index.jsx b/src/components/common/SearchFormView/index.jsx index bbc7bc1..c709027 100644 --- a/src/components/common/SearchFormView/index.jsx +++ b/src/components/common/SearchFormView/index.jsx @@ -9,7 +9,7 @@ import { Row, Col, Form, Input, Button, Select, DatePicker, Divider, Card } from 'antd'; import moment from 'moment'; -const { RangePicker } = DatePicker; +const { RangePicker, MonthPicker } = DatePicker; import './index.scss'; // data参数:数据模板 @@ -106,8 +106,16 @@ }); }; + //月份选择器 + monthPickerChange = (name, m, d) => { + this.props.setFormData({ + ...this.props.formData, + [name]: d + }) + } + render() { - const { formData = {}, data = [], children, width = "25%" } = this.props; + const { formData = {}, data = [], children, width = "25%", showReset = true } = this.props; let size = 'default'; return ( @@ -128,13 +136,13 @@ style={{ width: '100%' }} placeholder={item.name} value={formData[item.key]} - allowClear + // allowClear onChange={this.handleSelectChange(item.key)}> {item.list && item.list.map(item => ( <Select.Option - value={item.id} - key={item.id}> + value={item.value} + key={item.value}> {item.name} </Select.Option> ))} @@ -201,6 +209,22 @@ /> </Form.Item> ); + case 'monthPicker': + return ( + <Form.Item label={item.label}> + <MonthPicker + style={{ width: '100%' }} + size={size} + placeholder={item.name} + onChange={(date, dateString) => { + console.log(date, dateString); + this.monthPickerChange(item.key, date, dateString); + }} + value={formData[item.key] ? moment(formData[item.key], 'YYYY-MM') : undefined} + /> + </Form.Item> + + ) // case 'br': // return ( // <Col span={24} style={{ marginBottom: '10px' }} /> @@ -223,15 +247,18 @@ 查询 </Button> </Col> - <Col> - <Button - size={size} - onClick={() => { - this.onClick('reset'); - }}> - 重置 - </Button> - </Col> + { + showReset ? + <Col> + <Button + size={size} + onClick={() => { + this.onClick('reset'); + }}> + 重置 + </Button> + </Col> : null + } { children && <Col> diff --git a/src/components/common/TableView/index.jsx b/src/components/common/TableView/index.jsx index 41d88c8..3522f21 100644 --- a/src/components/common/TableView/index.jsx +++ b/src/components/common/TableView/index.jsx @@ -25,7 +25,7 @@ } componentDidMount() { - let { page, size } = this.props.formData; + let { page = 1, size } = this.props.formData; this.loadData(page, size); } @@ -43,18 +43,31 @@ size } }).then(res => { - if (res) { - res.content = res.content.map(({ ...a }, idx) => ({ - ...a, - index: idx + 1 + 10 * (page - 1), - key: idx, - })); - } - this.setState({ - tableData: res ? res.content : [], - loading: false, - totalElements: res ? res.totalElements : 0, - }); + if (res && res) + if (res) { + if (res.content) { + res.content = res.content.map(({ ...a }, idx) => ({ + ...a, + index: idx + 1 + 10 * (page - 1), + key: idx, + })); + this.setState({ + tableData: res ? res.content : [], + loading: false, + totalElements: res ? res.totalElements : 0, + }); + } else { + res = res.map(({ ...a }, idx) => ({ + ...a, + index: idx + 1 + 10 * (page - 1), + key: idx, + })); + this.setState({ + tableData: res, + loading: false, + }) + } + } }); }; @@ -84,9 +97,18 @@ return originalElement; }; + onSetDataSource = ({ index, data }, callBack) => { + console.log(index, data); + let { tableData } = this.state; + tableData[index] = data; + this.setState({ + tableData + }) + } + render() { - const { columns, rowSelection } = this.props; - const { page, size } = this.props.formData; + const { columns, rowSelection, showPagination = true } = this.props; + const { page, size, } = this.props.formData; return ( <div className="table-view-main"> <Table @@ -96,7 +118,7 @@ dataSource={this.state.tableData} loading={{ spinning: this.state.loading }} columns={columns} - pagination={{ + pagination={showPagination ? { pageSize: Number(size), onChange: this.pageChange, total: this.state.totalElements, @@ -107,7 +129,7 @@ showQuickJumper: true, defaultCurrent: 1, current: Number(page), - }} /> + } : false} /> </div> ) } diff --git a/src/components/oa/logManage/browseLog/index.jsx b/src/components/oa/logManage/browseLog/index.jsx index d7c38c3..4f8351a 100644 --- a/src/components/oa/logManage/browseLog/index.jsx +++ b/src/components/oa/logManage/browseLog/index.jsx @@ -70,7 +70,6 @@ ]; } - fontNumber(date) { const length = date.length if (length > 16) { diff --git a/src/components/oa/merits/meritsDetail/index.jsx b/src/components/oa/merits/meritsDetail/index.jsx new file mode 100644 index 0000000..210cf34 --- /dev/null +++ b/src/components/oa/merits/meritsDetail/index.jsx @@ -0,0 +1,145 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 10:38:14 AM + * doc comment for the file goes here + */ + +/** 绩效详情 */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import TableView from '../../../common/TableView'; +import { Row, Col, Button, InputNumber, message } from 'antd'; +import { createHashHistory } from 'history'; +import './index.scss'; +const history = createHashHistory(); +import fetch from '../../../../api/request'; + + +export default class MeritsDetail extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + formData: { + __key: Date.now(), + ...this.props.match.params + }, + + }; + } + + componentDidMount() { } + + setFormData = data => { + console.log('form', data); + this.setState({ + formData: data, + }); + } + + // 保存操作 + onSave = (item) => { + console.log('item', item); + let { id , meritsGrade} = item; + fetch({ + url: `api/merits/assess/modifyGrade`, + params: { + id, + meritsGrade + } + }).then( res=> { + if(res) { + message.success('保存成功'); + this.setState({ + formData: { + ...this.state.formData, + __key: Date.now() + } + }) + } + }) + + } + + renderColumns = () => { + return [ + { title: '编号', dataIndex: 'id', width: '3%' }, + { title: '评分项目', dataIndex: 'scoreItems', width: '6%' }, + { title: '评分目标', dataIndex: 'scoreTarget', width: '10%' }, + { + title: '定义与标准', dataIndex: 'standard', width: '25%', render: (cur, item) => { + return <div dangerouslySetInnerHTML={{ + __html: cur.replace(/\n/g, "<br/>") + }}></div> + } + }, + { + title: '系统取数指标', dataIndex: 'systemStandard', width: '10%', render: (cur, item) => { + return <div dangerouslySetInnerHTML={{ + __html: cur.replace(/\n/g, "<br/>") + }}></div> + } + }, + { title: '数据来源', dataIndex: 'dataSources', width: '8%' }, + { title: '取值范围', dataIndex: 'valueRange', width: '5%' }, + { + title: '计算方式', dataIndex: 'countMethod', width: '8%', render: (cur, item) => { + return <div dangerouslySetInnerHTML={{ + __html: cur.replace(/\n/g, "<br/>") + }}></div> + } + }, + { + title: '权重(%)', dataIndex: 'weight', width: '6%' + }, + { + title: '配分(分)', dataIndex: 'allotment', width: '6%' + }, + { + title: '考评得分(分)', dataIndex: 'meritsGrade', width: '6%', render: (cur, item, index) => { + return <InputNumber size="small" min={0} + max={100} formatter={cur => `${cur}分`} parser={value => value.replace('分', '')} value={cur || 0} onChange={(value) => { + item['meritsGrade'] = value; + this.refs['table-view'].onSetDataSource({ index, data: item }) + }} /> + } + }, + { + title: '操作', dataIndex: 'operation', width: '10%', render: (cur, item) => { + return <a onClick={() => { this.onSave(item) }}>保存</a> + } + } + + ]; + } + + onBack = () => { + history.goBack(); + } + + render() { + const { formData } = this.state; + + let tableParams = { + url: `api/merits/assess/findMeritsDetail`, + formData, + key: formData.__key, + columns: this.renderColumns(), + extraFromData: {}, + setFormData: this.setFormData, + showPagination: false + } + + return ( + <div className="merits-detail-main"> + <h2>2020年4月绩效评分表(初级研发工程师)</h2> + <TableView {...tableParams} ref="table-view" /> + <Row className="margin-top"> + <Col> + <Button onClick={this.onBack}>返回</Button> + </Col> + </Row> + </div> + ) + } +} diff --git a/src/components/oa/merits/meritsDetail/index.scss b/src/components/oa/merits/meritsDetail/index.scss new file mode 100644 index 0000000..9c192c6 --- /dev/null +++ b/src/components/oa/merits/meritsDetail/index.scss @@ -0,0 +1,17 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 10:38:14 AM + * doc comment for the file goes here + */ + +/** Happy Coding */ +.merits-detail { + &-main { + background: #fff; + margin: 20px; + padding: 20px; + & .ant-table-tbody { + font-size: 12px !important; + } + } +} diff --git a/src/components/oa/merits/meritsDispose/index.jsx b/src/components/oa/merits/meritsDispose/index.jsx new file mode 100644 index 0000000..847687e --- /dev/null +++ b/src/components/oa/merits/meritsDispose/index.jsx @@ -0,0 +1,219 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 11:49:58 AM + * doc comment for the file goes here + */ + +/** 绩效指标 */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import { Input, Row, InputNumber, Tag, Popconfirm, Divider, message } from 'antd'; +import TableView from '../../../common/TableView'; +import SearchFormView from '../../../common/SearchFormView'; +import fetch from '../../../../api/request' + +import './index.scss'; + +export default class MeritsDispose extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + formData: { + __key: Date.now(), + }, + selectData: null,//岗位下拉 + }; + } + + componentWillMount() { } + + componentDidMount() { + + fetch({ + url: `api/merits/index/queryMeritsPost`, + }).then(res => { + console.log('res', res); + if (res) { + this.setState({ + selectData: res.map(({ name, id }) => ({ name, value: id })), + formData: { + ...this.state.formData, + meritsPostId: res[0].id + } + }) + } + }) + } + + setFormData = data => { + console.log('form', data); + this.setState({ + formData: data, + }); + } + + // 启用/禁用功能 + openCloseIndex = (item) => { + let { selectData } = this.state; + let { validStatus, meritsPostRelationId, meritsPostId, id } = item; + fetch({ + url: `api/merits/index/openCloseIndex/${!validStatus}`, + method: 'POST', + data: { + ...item, + id: meritsPostRelationId, + validStatus: !validStatus ? 1 : 2, + meritsIndexId: id, + meritsPostName: selectData.find(({ value }) => value == meritsPostId).name + } + }).then(res => { + console.log('res', res); + if (res) { + message.success(validStatus ? '禁用成功' : '启用成功'); + this.setState({ + formData: { + ...this.state.formData, + __key: Date.now() + } + }) + } + }) + } + + // 保存处于启用状态的的设置值 + saveOpenIndex = (item) => { + let { selectData } = this.state; + + let { validStatus, meritsPostRelationId, meritsPostId, id } = item; + fetch({ + url: `api/merits/index/openCloseIndex/${validStatus}`, + method: 'POST', + data: { + ...item, + id: meritsPostRelationId, + validStatus: validStatus ? 1 : 2, + meritsIndexId: id, + meritsPostName: selectData.find(({ value }) => value == meritsPostId).name + } + }).then(res => { + console.log('res', res); + if (res) { + message.success('保存成功'); + this.setState({ + formData: { + ...this.state.formData, + __key: Date.now() + } + }) + } + }) + } + + renderColumns = () => { + return [ + { title: '编号', dataIndex: 'id', width: '3%' }, + { title: '评分项目', dataIndex: 'scoreItems', width: '6%' }, + { title: '评分目标', dataIndex: 'scoreTarget', width: '10%' }, + { + title: '定义与标准', dataIndex: 'standard', width: '25%', render: (cur, item) => { + return <div dangerouslySetInnerHTML={{ + __html: cur.replace(/\n/g, "<br/>") + }}></div> + } + }, + { + title: '系统取数指标', dataIndex: 'systemStandard', width: '10%', render: (cur, item) => { + return <div dangerouslySetInnerHTML={{ + __html: cur.replace(/\n/g, "<br/>") + }}></div> + } + }, + { title: '数据来源', dataIndex: 'dataSources', width: '8%' }, + { title: '取值范围', dataIndex: 'valueRange', width: '5%' }, + { + title: '计算方式', dataIndex: 'countMethod', width: '8%', render: (cur, item) => { + return <div dangerouslySetInnerHTML={{ + __html: cur.replace(/\n/g, "<br/>") + }}></div> + } + }, + { + title: '权重(%)', dataIndex: 'weight', width: '6%', render: (cur, item, index) => { + return <InputNumber size="small" min={0} disabled={item.validStatus ? false : true} + max={100} formatter={cur => `${cur}%`} parser={value => value.replace('%', '')} value={cur || 0} onChange={(value) => { + item['weight'] = value; + this.refs['table-view'].onSetDataSource({ index, data: item }) + }} /> + } + }, + { + title: '配分(分)', dataIndex: 'allotment', width: '6%', render: (cur, item, index) => { + return <InputNumber size="small" min={0} disabled={item.validStatus ? false : true} + max={100} formatter={cur => `${cur}分`} parser={value => value.replace('分', '')} value={cur || 0} onChange={(value) => { + item['allotment'] = value; + this.refs['table-view'].onSetDataSource({ index, data: item }) + }} /> + } + }, + { + title: '操作', dataIndex: 'operation', width: '10%', render: (cur, item) => { + return <Row> + {/* 有效状态 */} + + {item.validStatus && <Popconfirm placement="topRight" title={'您确定要禁用吗?'} onConfirm={() => { + this.openCloseIndex(item); + }} okText="是" cancelText="否"> + <Tag>禁用</Tag> + </Popconfirm>} + {!item.validStatus && <Popconfirm placement="topRight" title={'您确定要启用吗?'} onConfirm={() => { + this.openCloseIndex(item); + }} okText="是" cancelText="否"> + <Tag color="#58bc58">启用</Tag> + </Popconfirm>} + + {/* 待启用状态--保存功能 */} + {item.validStatus && <React.Fragment> + <Divider type="vertical" /> + <a onClick={() => { + this.saveOpenIndex(item) + }}>保存</a> + </React.Fragment>} + + </Row> + } + }, + ]; + } + + render() { + const { formData, selectData } = this.state; + let tableParams = { + url: `api/merits/index/queryMeritsIndex`, + formData, + key: formData.__key, + columns: this.renderColumns(), + extraFromData: {}, + setFormData: this.setFormData, + showPagination: false, + } + + return ( + <div className="merits-dispose-main"> + { + selectData && + <React.Fragment> + <SearchFormView + formData={formData} + setFormData={this.setFormData} + showReset={false} + data={[ + { type: 'select', name: '岗位', label: '岗位', key: 'meritsPostId', list: selectData, }, + ]} /> + <TableView {...tableParams} ref={'table-view'} /> + </React.Fragment> + } + </div> + ) + } +} diff --git a/src/components/oa/merits/meritsDispose/index.scss b/src/components/oa/merits/meritsDispose/index.scss new file mode 100644 index 0000000..abc3b10 --- /dev/null +++ b/src/components/oa/merits/meritsDispose/index.scss @@ -0,0 +1,20 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 11:49:58 AM + * doc comment for the file goes here + */ + +/** Happy Coding */ +.merits-dispose { + &-main { + background: #fff; + margin: 20px; + padding: 20px; + & .ant-table-tbody { + font-size: 12px !important; + } + & .ant-tag { + cursor: pointer; + } + } +} diff --git a/src/components/oa/merits/meritsExamine/index.jsx b/src/components/oa/merits/meritsExamine/index.jsx new file mode 100644 index 0000000..09e234c --- /dev/null +++ b/src/components/oa/merits/meritsExamine/index.jsx @@ -0,0 +1,92 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 2:34:37 PM + * doc comment for the file goes here + */ + +/** Happy Coding */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import { Input } from 'antd'; +import TableView from '../../../common/TableView'; +import SearchFormView from '../../../common/SearchFormView'; +import './index.scss'; + + +export default class MeritsExamine extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + formData: { + __key: Date.now(), + page: 1, + size: 10, + keyWord: '' + }, + }; + } + + componentWillMount() { } + + componentDidMount() { } + + setFormData = data => { + console.log('form', data); + this.setState({ + formData: data, + }); + } + + renderColumns = () => { + return [ + { title: '序号', dataIndex: 'index' }, + { title: '评分项目', dataIndex: 'name' }, + { title: '评分目标', dataIndex: 'bumen' }, + { title: '定义与标准', dataIndex: 'gangwei' }, + { title: '系统取数指标', dataIndex: 'month' }, + { title: '数据来源', dataIndex: 'renwu' }, + { title: '取值范围', dataIndex: 'quexian' }, + { title: '计算方式', dataIndex: 'score' }, + { + title: '权重', dataIndex: 'quanzhogn', width: '10%', render: (cur, item, index) => { + return <Input size="small" onChange={() => { + console.log(this.refs); + this.refs['table-view'].onSetDataSource({ index, data: item }) + }} /> + } + }, + { + title: '配分', dataIndex: 'peifen', width: '10%', render: (cur, item) => { + return <Input size="small" /> + } + }, + { + title: '操作', dataIndex: 'operation', render: (cur, item, ) => { + return null + } + }, + ]; + } + + render() { + const { formData } = this.state; + let tableParams = { + url: `api/log/queryLog`, + formData, + key: formData.__key, + columns: this.renderColumns(), + extraFromData: { + logType: '1', + }, + setFormData: this.setFormData, + showPagination: false, + } + + return ( + <div className="merits-examine-main"> + <TableView {...tableParams} ref={'table-view'} /> + </div> + ) + } +} diff --git a/src/components/oa/merits/meritsExamine/index.scss b/src/components/oa/merits/meritsExamine/index.scss new file mode 100644 index 0000000..a56e308 --- /dev/null +++ b/src/components/oa/merits/meritsExamine/index.scss @@ -0,0 +1,14 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 2:34:37 PM + * doc comment for the file goes here + */ + +/** Happy Coding */ +.merits-examine { + &-main { + background: #fff; + margin: 20px; + padding: 20px; + } +} diff --git a/src/components/oa/merits/meritsOverview/index.jsx b/src/components/oa/merits/meritsOverview/index.jsx new file mode 100644 index 0000000..20bd6b4 --- /dev/null +++ b/src/components/oa/merits/meritsOverview/index.jsx @@ -0,0 +1,104 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 9:55:19 AM + * doc comment for the file goes here + */ + +/** 绩效总览 */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import { Row, Col, Divider } from 'antd'; +import TableView from '../../../common/TableView'; +import SearchFormView from '../../../common/SearchFormView'; +import { createHashHistory } from 'history'; +import fetch from '../../../../api/request'; +import './index.scss'; + +const history = createHashHistory(); + +export default class MeritsOverview extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + formData: { + __key: Date.now(), + page: 1, + size: 10, + keyWord: '' + }, + }; + } + + componentDidMount() { + + + } + + setFormData = data => { + console.log('form', data); + this.setState({ + formData: data, + }); + } + + linkDetail = (item) => { + let { userId, countMonth } = item; + history.push(`/merits/meritsOverview/meritsDetail/${userId}/${countMonth}`) + } + + renderColumns = () => { + return [ + { title: '序号', dataIndex: 'index' }, + { title: '姓名', dataIndex: 'userName' }, + { title: '部门', dataIndex: 'userDeptName' }, + { title: '岗位', dataIndex: 'meritsPostName' }, + { title: '考评月份', dataIndex: 'countMonth' }, + { title: '总任务数', dataIndex: 'taskNumber' }, + { title: '总缺陷数', dataIndex: 'defectNumber' }, + { title: '考评得分(分)', dataIndex: 'meritsGrade' }, + { + title: '操作', dataIndex: 'operation', render: (cur, item) => { + return <Row> + <a onClick={() => this.linkDetail(item)}>详情</a> + </Row> + } + }, + ]; + } + + + + render() { + const { formData } = this.state; + + let tableParams = { + url: `api/merits/assess/queryMerits`, + formData, + key: formData.__key, + columns: this.renderColumns(), + extraFromData: {}, + setFormData: this.setFormData + } + return ( + <div className="merits-overview-main"> + <SearchFormView + formData={formData} + setFormData={this.setFormData} + data={[ + { type: 'select', name: '部门', label: '部门', key: 'bumen', list: [{ name: '1', value: '部门1' }, { name: '2', value: '部门2' }], }, + { type: 'select', name: '岗位', label: '岗位', key: 'gangwei', list: [{ name: '1', value: '岗位1' }, { name: '2', value: '岗位2' }], }, + { type: 'input', name: '姓名', label: '姓名', key: 'name' }, + { + type: 'monthPicker', + label: '考评月份', + name: '考评月份', + key: 'kpyf', + }, + ]} /> + <TableView {...tableParams} /> + </div> + ) + } +} + diff --git a/src/components/oa/merits/meritsOverview/index.scss b/src/components/oa/merits/meritsOverview/index.scss new file mode 100644 index 0000000..8d34cda --- /dev/null +++ b/src/components/oa/merits/meritsOverview/index.scss @@ -0,0 +1,14 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 9:55:19 AM + * doc comment for the file goes here + */ + +/** Happy Coding */ +.merits-overview { + &-main { + background: #fff; + margin: 20px; + padding: 20px; + } +} diff --git a/src/index.css b/src/index.css index 07d27b8..f7df747 100644 --- a/src/index.css +++ b/src/index.css @@ -54,6 +54,9 @@ margin: 20px 0 !important; } +.margin-top{ + margin-top: 20px; +} .margin-bottom{ margin-bottom: 20px; } @@ -64,10 +67,6 @@ .ant-divider-horizontal{ margin: 20px 0 !important; -} - -.margin-bottom{ - margin-bottom: 20px; } .ant-card-head-title{ diff --git a/src/index.js b/src/index.js index 642bba7..167584b 100644 --- a/src/index.js +++ b/src/index.js @@ -22,6 +22,7 @@ // oa路由映射 import OaRouteDom from './routeDom/oaRouteDom'; import UserRouteDom from './routeDom/userRouteDom'; +import { oaMenus, userMenus } from './menu'; export const Context = React.createContext(); @@ -42,9 +43,12 @@ componentDidMount() { let pathname = history.location.pathname; + console.log(history, pathname); let menusListByRole = window.localStorage.getItem('menusListByRole') ? JSON.parse(window.localStorage.getItem('menusListByRole')) : []; + + // let menuMap = { oa: { menus: oaMenus }, user: { menus: userMenus } }; let role = Object.keys(menusListByRole) .reduce((p, n) => { @@ -73,6 +77,18 @@ role, }, }); + + if (!role && menusListByRole.length == 0) { + history.push('/login'); + } + if (!role && window.localStorage.getItem('role')) { + this.setState({ + context: { + ...this.state.context, + role: window.localStorage.getItem('role'), + }, + }); + } } setContext = (data) => { @@ -83,6 +99,7 @@ ...data, }, //更新context }); + window.localStorage.setItem('role', data.role || ''); }; render() { @@ -109,9 +126,14 @@ </Switch> <Layout> <Content> - <Route path="/login" component={()=>( <Login setContext={this.setContext}/>)} /> - {context.role == 'oa' && <OaRouteDom />} - {context.role == 'user' && <UserRouteDom />} + <Switch> + <Route + path="/login" + component={() => <Login setContext={this.setContext} />} + /> + {context.role == 'oa' && <OaRouteDom />} + {context.role == 'user' && <UserRouteDom />} + </Switch> </Content> </Layout> </Layout> diff --git a/src/menu/index.js b/src/menu/index.js index 452d5ae..a0dd13b 100644 --- a/src/menu/index.js +++ b/src/menu/index.js @@ -1,3 +1,3 @@ export { default as oaMenus } from './menu.oa'; export { default as userMenus } from './menu.user'; -export { default as getMenuListByPermission } from './menu.permission'; \ No newline at end of file +export { default as getMenuListByPermission } from './menu.permission'; diff --git a/src/menu/menu.oa.js b/src/menu/menu.oa.js index 6838ce9..0fcf654 100644 --- a/src/menu/menu.oa.js +++ b/src/menu/menu.oa.js @@ -175,12 +175,12 @@ }, { key: '/merits/meritsDispose', - name: '参数配置', + name: '绩效指标', path: '/merits/meritsDispose', permKey: '/merits/meritsDispose', children: [], parentKey: 'merits', - }, + } ], }, ]; diff --git a/src/module/login/login.jsx b/src/module/login/login.jsx index 591d4c7..c8b24b2 100644 --- a/src/module/login/login.jsx +++ b/src/module/login/login.jsx @@ -27,7 +27,7 @@ }; } componentWillMount() { - document.title = '恒巨信息OA-用户登录' + document.title = '恒巨信息OA-用户登录'; } handleSubmit = e => { diff --git a/src/module/oa/merits/meritsDetail.jsx b/src/module/oa/merits/meritsDetail.jsx new file mode 100644 index 0000000..75da704 --- /dev/null +++ b/src/module/oa/merits/meritsDetail.jsx @@ -0,0 +1,33 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 10:36:57 AM + * doc comment for the file goes here + */ + +/** 绩效详情 */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import MeritsDetailPage from '../../../components/oa/merits/meritsDetail'; + +export default class MeritsDetail extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + }; + } + + componentWillMount() { } + + componentDidMount() { } + + componentDidShow() { } + + render() { + return ( + <div className="merits-detail-page-main"> + <MeritsDetailPage {...this.props} /> + </div> + ) + } +} diff --git a/src/module/oa/merits/meritsDispose.jsx b/src/module/oa/merits/meritsDispose.jsx new file mode 100644 index 0000000..91e60c4 --- /dev/null +++ b/src/module/oa/merits/meritsDispose.jsx @@ -0,0 +1,34 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 11:49:16 AM + * doc comment for the file goes here + */ + +/** 绩效指标 */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import MeritsDisposePage from '../../../components/oa/merits/meritsDispose'; + +export default class MeritsDispose extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + }; + } + + componentWillMount() { } + + componentDidMount() { } + + componentDidShow() { } + + render() { + return ( + <div className="merits-dispose-page-main"> + <MeritsDisposePage /> + </div> + ) + } +} + diff --git a/src/module/oa/merits/meritsExamine.jsx b/src/module/oa/merits/meritsExamine.jsx new file mode 100644 index 0000000..eb7aa11 --- /dev/null +++ b/src/module/oa/merits/meritsExamine.jsx @@ -0,0 +1,33 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 2:33:47 PM + * doc comment for the file goes here + */ + +/** 绩效考核 */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import MeritsExaminePage from '../../../components/oa/merits/meritsExamine'; + +export default class MeritsExamine extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + }; + } + + componentWillMount() { } + + componentDidMount() { } + + componentDidShow() { } + + render() { + return ( + <div className="merits-examine-page-main"> + <MeritsExaminePage /> + </div> + ) + } +} diff --git a/src/module/oa/merits/meritsOverview.jsx b/src/module/oa/merits/meritsOverview.jsx new file mode 100644 index 0000000..5ce3c22 --- /dev/null +++ b/src/module/oa/merits/meritsOverview.jsx @@ -0,0 +1,33 @@ +/* eslint-disable */ +/**liuwh + * 5/29/2020, 9:58:58 AM + * doc comment for the file goes here + */ + +/** Happy Coding */ +import React, { ReactNode, ReactEventHandler, Component } from 'react'; +import MeritsOverviewPage from '../../../components/oa/merits/meritsOverview';//绩效总览 + +export default class MeritsOverview extends Component { + constructor(props) { + super(props); + this.config = { + }; + this.state = { + }; + } + + componentWillMount() { } + + componentDidMount() { } + + componentDidShow() { } + + render() { + return ( + <div className="merits-overview-page-main"> + <MeritsOverviewPage /> + </div> + ) + } +} diff --git a/src/routeDom/oaRouteDom.jsx b/src/routeDom/oaRouteDom.jsx index 2d3a957..eff360c 100644 --- a/src/routeDom/oaRouteDom.jsx +++ b/src/routeDom/oaRouteDom.jsx @@ -20,6 +20,10 @@ import Rawler from '../module/oa/logManage/Rawler'; //爬虫词条管理 import Information from '../module/oa/personal/information'; //个人信息 import UserManage from '../components/oa/basicConfig/UserManage'; //用户管理 +import MeritsOverview from '../module/oa/merits/meritsOverview';//绩效管理--绩效总览 +import MeritsDetail from '../module/oa/merits/meritsDetail';//绩效管理--绩效详情 +import MeritsDispose from '../module/oa/merits/meritsDispose';//绩效管理--绩效指标 +import MeritsExamine from '../module/oa/merits/meritsExamine';//绩效管理--绩效考核 export default function OaRouteDom({ }) { return (<Switch> @@ -33,6 +37,12 @@ <Route path="/logManage/operLog" component={OperLog} /> <Route path="/logManage/rawler" component={Rawler} /> <Route path="/personal/information" component={Information} /> + <Route path="/merits/meritsOverview/meritsDetail/:userId/:meritsMonth" component={MeritsDetail} /> + <Route path="/merits/meritsOverview" component={MeritsOverview} /> + <Route path="/merits/meritsDispose" component={MeritsDispose} /> + <Route path="/merits/meritsExamine" component={MeritsExamine} /> + + {/* <Route path="/" component={Workbench} /> */} <Redirect from="/" to="/index" component={Workbench} /> </Switch> -- Gitblit v1.8.0