From ee635de6fc758c044db0761faa003d0db1e82563 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 07 八月 2023 20:32:35 +0800 Subject: [PATCH] Merge branch 'develop' --- src/views/systemproc/proc/index.jsx | 4 src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx | 156 +++ src/views/basedesign/updateFormTab/index.jsx | 10 src/menu/viewnodes/index.jsx | 2 src/tabviews/custom/popview/index.jsx | 31 src/templates/modalconfig/index.jsx | 4 src/views/systemfunc/index.jsx | 5 src/templates/sharecomponent/tablecomponent/index.jsx | 2 src/views/design/sidemenu/index.jsx | 4 src/tabviews/commontable/index.jsx | 5 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 2 src/menu/datasource/verifycard/index.jsx | 2 src/tabviews/custom/components/module/voucher/resetAttach/index.scss | 1 src/views/design/sidemenu/editsecmenu/index.jsx | 6 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx | 21 src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx | 21 src/mob/searchconfig/searchdragelement/card.jsx | 21 src/menu/components/search/main-search/dragsearch/card.jsx | 12 src/mob/modulesource/index.jsx | 2 src/templates/subtableconfig/index.jsx | 16 src/components/mkIcon/index.jsx | 2 src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss | 79 + src/tabviews/custom/components/chart/antv-X6/index.jsx | 314 +++++ src/views/systemproc/proc/index.scss | 9 src/menu/components/share/actioncomponent/actionform/index.jsx | 4 src/tabviews/custom/index.jsx | 31 src/views/systemproc/index.jsx | 2 src/templates/zshare/customscript/index.jsx | 2 src/tabviews/treepage/index.jsx | 5 src/views/design/header/index.jsx | 10 src/views/printTemplate/index.jsx | 2 src/tabviews/zshare/topSearch/index.jsx | 7 src/templates/comtableconfig/index.jsx | 32 src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx | 2 src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 78 src/views/basedesign/index.jsx | 6 src/views/tabledesign/index.jsx | 12 src/pc/modulesource/index.jsx | 2 src/api/index.js | 21 src/tabviews/subtable/index.jsx | 5 src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx | 107 ++ src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx | 2 src/views/pcdesign/index.jsx | 33 src/tabviews/zshare/topSearch/mkRadio/index.jsx | 77 + src/tabviews/zshare/topSearch/mkRadio/index.scss | 0 src/utils/utils-datamanage.js | 30 src/menu/picturecontroller/index.jsx | 4 src/menu/components/table/edit-table/columns/tableIn/index.jsx | 2 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx | 2 src/tabviews/zshare/normalTable/index.jsx | 2 src/components/thawmenu/index.jsx | 4 src/templates/comtableconfig/updatetable/index.jsx | 10 src/views/design/header/editfirstmenu/index.jsx | 6 src/views/menudesign/homeform/index.jsx | 2 src/templates/treepageconfig/index.jsx | 17 src/views/menudesign/menuform/index.jsx | 2 public/options.json | 12 src/menu/components/share/searchcomponent/dragsearch/card.jsx | 2 src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx | 24 src/tabviews/basetable/index.jsx | 5 src/menu/tablenodes/index.jsx | 2 src/views/billprint/index.jsx | 14 src/tabviews/subtabtable/index.jsx | 5 src/tabviews/zshare/actionList/normalbutton/index.jsx | 5 src/views/design/sidemenu/editthdmenu/index.jsx | 6 src/views/mobdesign/index.jsx | 32 src/views/menudesign/index.jsx | 26 src/templates/zshare/createinterface/index.jsx | 2 src/tabviews/custom/components/module/voucher/resetAttach/addAttach/index.jsx | 2 src/views/appmanage/index.jsx | 5 src/views/design/header/versions/index.jsx | 2 src/views/imdesign/index.jsx | 15 src/views/design/sidemenu/thdmenuplus/index.jsx | 8 src/menu/modulesource/index.jsx | 2 src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 8 src/components/tabview/index.jsx | 67 src/views/design/index.jsx | 20 src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx | 2 src/menu/components/share/sourcecomponent/inputform/index.jsx | 2 src/components/header/index.jsx | 4 src/menu/transfer/index.jsx | 2 src/pc/quotecomponent/index.jsx | 2 src/tabviews/zshare/topSearch/mkSelect/index.jsx | 2 src/views/rolemanage/index.jsx | 8 src/views/tabledesign/menuform/index.jsx | 2 src/tabviews/custom/components/share/normalTable/index.jsx | 2 src/utils/utils.js | 17 src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx | 72 + src/index.js | 19 src/menu/components/share/usercomponent/index.jsx | 2 src/templates/zshare/createfunc/index.jsx | 8 src/templates/treepageconfig/updatetable/index.jsx | 10 src/templates/zshare/formconfig.jsx | 5 src/templates/zshare/verifycard/index.jsx | 2 src/tabviews/custom/components/module/voucher/resetAttach/index.jsx | 4 src/pc/createview/index.jsx | 6 src/tabviews/zshare/actionList/printbutton/index.jsx | 3 src/store/options.js | 11 /dev/null | 605 ------------ src/templates/sharecomponent/actioncomponent/index.jsx | 515 ---------- src/tabviews/zshare/topSearch/advanceform/index.jsx | 9 src/utils/option.js | 2 102 files changed, 1,149 insertions(+), 1,683 deletions(-) diff --git a/public/options.json b/public/options.json index df576bd..f031142 100644 --- a/public/options.json +++ b/public/options.json @@ -1,16 +1,16 @@ { - "appId": "201912040924165801464FF1788654BC5AC73", - "appkey": "20191106103859640976D6E924E464D029CF0", + "appId": "202108312122504607B107A83F55B40C98CCF", + "appkey": "20210831212235413F287EC3BF489424496C8", "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", "systemType": "", "externalDatabase": "", "lineColor": "", "filter": "false", - "defaultApp": "mk", + "defaultApp": "mkindustry", "defaultLang": "zh-CN", "WXAppID": "", "WXminiAppID": "", - "WXNotice": "true", + "WXNotice": "false", "nginx": "true", "debugger": false, "licenseKey": "", @@ -18,6 +18,6 @@ "transfer": "false", "keepPassword": "true", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], - "host": "http://qingqiumarket.cn", - "service": "MKWMS/" + "host": "http://demo.mk9h.cn", + "service": "erp_new/" } \ No newline at end of file diff --git a/report.20230625.164948.17280.0.001.json b/report.20230625.164948.17280.0.001.json deleted file mode 100644 index c8baabc..0000000 --- a/report.20230625.164948.17280.0.001.json +++ /dev/null @@ -1,605 +0,0 @@ - -{ - "header": { - "event": "Allocation failed - JavaScript heap out of memory", - "trigger": "FatalError", - "filename": "report.20230625.164948.17280.0.001.json", - "dumpEventTime": "2023-06-25T16:49:48Z", - "dumpEventTimeStamp": "1687682988567", - "processId": 17280, - "cwd": "E:\\project\\pc-plat", - "commandLine": [ - "node", - "scripts/start.js" - ], - "nodejsVersion": "v12.4.0", - "wordSize": 64, - "arch": "x64", - "platform": "win32", - "componentVersions": { - "node": "12.4.0", - "v8": "7.4.288.27-node.18", - "uv": "1.29.1", - "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.4.0/node-v12.4.0-headers.tar.gz", - "sourceUrl": "https://nodejs.org/download/release/v12.4.0/node-v12.4.0.tar.gz", - "libUrl": "https://nodejs.org/download/release/v12.4.0/win-x64/node.lib" - }, - "osName": "Windows_NT", - "osRelease": "10.0.19045", - "osVersion": "Windows 10 Pro", - "osMachine": "x86_64", - "host": "LAPTOP-67RFI4SB" - }, - "javascriptStack": { - "message": "No stack.", - "stack": [ - "Unavailable." - ] - }, - "nativeStack": [ - { - "pc": "0x00007ff66f1e64a9", - "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+9161" - }, - { - "pc": "0x00007ff66f1e9d94", - "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+23732" - }, - { - "pc": "0x00007ff66f1e8db8", - "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+19672" - }, - { - "pc": "0x00007ff66f2d256b", - "symbol": "uv_loop_fork+48251" - }, - { - "pc": "0x00007ff66f60a56e", - "symbol": "v8::internal::Parser::ReportMessageAt+206" - }, - { - "pc": "0x00007ff66f5de5ea", - "symbol": "v8::internal::wasm::StreamingDecoder::Fail+666" - }, - { - "pc": "0x00007ff66f674a3c", - "symbol": "v8::internal::Heap::CreateFillerObjectAt+2972" - }, - { - "pc": "0x00007ff66f67c7af", - "symbol": "v8::internal::LocalEmbedderHeapTracer::NotifyV8MarkingWorklistWasEmpty+5375" - }, - { - "pc": "0x00007ff66f672e23", - "symbol": "v8::internal::Heap::CollectGarbage+1235" - }, - { - "pc": "0x00007ff66f671524", - "symbol": "v8::internal::GCTracer::AddScopeSample+1316" - }, - { - "pc": "0x00007ff66f6b2153", - "symbol": "v8::internal::Factory::NewFillerObject+67" - }, - { - "pc": "0x00007ff66f9d8cc6", - "symbol": "v8::internal::OptimizingCompileDispatcher::Unblock+116966" - }, - { - "pc": "0x00007ff66fe74196", - "symbol": "v8::internal::NativesCollection<0>::GetScriptsSource+662454" - } - ], - "javascriptHeap": { - "totalMemory": 2171875328, - "totalCommittedMemory": 2171875328, - "usedMemory": 1820032688, - "availableMemory": 58851592, - "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": 5485640, - "available": 11281592 - }, - "old_space": { - "memorySize": 1845616640, - "committedMemory": 1845616640, - "capacity": 1531953792, - "used": 1527583256, - "available": 4370536 - }, - "code_space": { - "memorySize": 3833856, - "committedMemory": 3833856, - "capacity": 3405952, - "used": 3405952, - "available": 0 - }, - "map_space": { - "memorySize": 10489856, - "committedMemory": 10489856, - "capacity": 6226400, - "used": 6226400, - "available": 0 - }, - "large_object_space": { - "memorySize": 277233664, - "committedMemory": 277233664, - "capacity": 276749424, - "used": 276749424, - "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": 1725.56, - "kernelCpuSeconds": 105.796, - "cpuConsumptionPercent": 6.63343, - "maxRss": 2244743168, - "pageFaults": { - "IORequired": 8971633, - "IONotRequired": 0 - }, - "fsActivity": { - "reads": 31233, - "writes": 89 - } - }, - "libuv": [ - ], - "environmentVariables": { - "=C:": "C:\\", - "=E:": "E:\\project\\pc-plat", - "ALLUSERSPROFILE": "C:\\ProgramData", - "ANDROID_SDK_HOME": "D:\\Program Files (x86)\\Android\\android-sdk", - "APPDATA": "C:\\Users\\king\\AppData\\Roaming", - "BABEL_ENV": "development", - "CHROME_CRASHPAD_PIPE_NAME": "\\\\.\\pipe\\crashpad_3112_MPXUUELTKOUORVVL", - "CLASSPATH": ".;C:\\Program Files\\Java\\jdk-13.0.1\\lib\\dt.jar;C:\\Program Files\\Java\\jdk-13.0.1\\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-67RFI4SB", - "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\\king", - "HOMEDRIVE": "C:", - "HOMEPATH": "\\Users\\king", - "INIT_CWD": "E:\\project\\pc-plat", - "JAVA_HOME": "C:\\Program Files\\Java\\jdk-13.0.1", - "LANG": "zh_CN.UTF-8", - "LOCALAPPDATA": "C:\\Users\\king\\AppData\\Local", - "LOGONSERVER": "\\\\LAPTOP-67RFI4SB", - "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\":[\"run\",\"dev\"],\"original\":[\"run\",\"dev\"]}", - "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\\king\\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:\\Program Files\\nodejs\\etc\\npmrc", - "npm_config_globalignorefile": "C:\\Program Files\\nodejs\\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\\king\\.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:\\Users\\king\\AppData\\Roaming\\nvm\\v12.4.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js", - "npm_config_node_options": "", - "npm_config_node_version": "12.4.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:\\Program Files\\nodejs", - "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\\king\\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\\king\\.npmrc", - "npm_config_user_agent": "npm/6.9.0 node/v12.4.0 win32 x64", - "npm_config_version": "", - "npm_config_versions": "", - "npm_config_viewer": "browser", - "npm_execpath": "C:\\Users\\king\\AppData\\Roaming\\nvm\\v12.4.0\\node_modules\\npm\\bin\\npm-cli.js", - "npm_lifecycle_event": "dev", - "npm_lifecycle_script=set PORT": "3001 && node scripts/start.js", - "npm_node_execpath": "C:\\Program Files\\nodejs\\node.exe", - "npm_package_babel_plugins_0_0": "import", - "npm_package_babel_plugins_0_1_libraryName": "antd", - "npm_package_babel_plugins_0_1_style": "css", - "npm_package_babel_plugins_0_2": "pc", - "npm_package_babel_plugins_1_0": "import", - "npm_package_babel_plugins_1_1_libraryName": "antd-mobile", - "npm_package_babel_plugins_1_1_style": "css", - "npm_package_babel_plugins_1_2": "mobile", - "npm_package_babel_presets_0": "react-app", - "npm_package_browserslist_development_0": "last 1 chrome version", - "npm_package_browserslist_development_1": "last 1 firefox version", - "npm_package_browserslist_development_2": "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.20", - "npm_package_dependencies_antd_mobile": "^5.14.2", - "npm_package_dependencies_axios": "^0.19.0", - "npm_package_dependencies_babel_eslint": "10.0.2", - "npm_package_dependencies_babel_jest": "^24.8.0", - "npm_package_dependencies_babel_loader": "8.0.6", - "npm_package_dependencies_babel_plugin_import": "^1.11.0", - "npm_package_dependencies_babel_plugin_named_asset_import": "^0.3.3", - "npm_package_dependencies_babel_preset_react_app": "9.0.0", - "npm_package_dependencies_braft_editor": "^2.3.9", - "npm_package_dependencies_braft_extensions": "^0.1.1", - "npm_package_dependencies_browserslist": "^4.13.0", - "npm_package_dependencies_camelcase": "^5.2.0", - "npm_package_dependencies_case_sensitive_paths_webpack_plugin": "2.2.0", - "npm_package_dependencies_codemirror": "^5.52.2", - "npm_package_dependencies_crypto_js": "^4.1.1", - "npm_package_dependencies_css_loader": "2.1.1", - "npm_package_dependencies_dotenv": "6.2.0", - "npm_package_dependencies_dotenv_expand": "4.2.0", - "npm_package_dependencies_dragact": "^0.2.12", - "npm_package_dependencies_echarts": "^5.2.1", - "npm_package_dependencies_echarts_for_react": "^2.0.15-beta.1", - "npm_package_dependencies_eslint": "^6.1.0", - "npm_package_dependencies_eslint_config_react_app": "^5.0.1", - "npm_package_dependencies_eslint_loader": "2.2.1", - "npm_package_dependencies_eslint_plugin_flowtype": "3.13.0", - "npm_package_dependencies_eslint_plugin_import": "2.18.2", - "npm_package_dependencies_eslint_plugin_jsx_a11y": "6.2.3", - "npm_package_dependencies_eslint_plugin_react": "7.14.3", - "npm_package_dependencies_eslint_plugin_react_hooks": "^1.6.1", - "npm_package_dependencies_exceljs": "^4.2.1", - "npm_package_dependencies_file_loader": "3.0.1", - "npm_package_dependencies_file_saver": "^2.0.5", - "npm_package_dependencies_fs_extra": "7.0.1", - "npm_package_dependencies_html2canvas": "^1.0.0-rc.7", - "npm_package_dependencies_html_webpack_plugin": "4.0.0-beta.5", - "npm_package_dependencies_http_proxy_middleware": "^0.20.0", - "npm_package_dependencies_identity_obj_proxy": "3.0.0", - "npm_package_dependencies_immutability_helper": "^3.0.1", - "npm_package_dependencies_immutable": "^4.0.0-rc.12", - "npm_package_dependencies_insert_css": "^2.0.0", - "npm_package_dependencies_is_wsl": "^1.1.0", - "npm_package_dependencies_jest": "24.8.0", - "npm_package_dependencies_jest_environment_jsdom_fourteen": "0.1.0", - "npm_package_dependencies_jest_resolve": "24.8.0", - "npm_package_dependencies_jest_watch_typeahead": "0.3.1", - "npm_package_dependencies_jsbarcode": "^3.11.3", - "npm_package_dependencies_jspdf": "^2.5.1", - "npm_package_dependencies_jssha": "^3.2.0", - "npm_package_dependencies_jszip": "^3.10.0", - "npm_package_dependencies_js_table2excel": "^1.0.3", - "npm_package_dependencies_md5": "^2.2.1", - "npm_package_dependencies_mini_css_extract_plugin": "0.5.0", - "npm_package_dependencies_moment": "^2.24.0", - "npm_package_dependencies_node_sass": "^4.12.0", - "npm_package_dependencies_optimize_css_assets_webpack_plugin": "5.0.3", - "npm_package_dependencies_pnp_webpack_plugin": "1.5.0", - "npm_package_dependencies_postcss_flexbugs_fixes": "4.1.0", - "npm_package_dependencies_postcss_loader": "3.0.0", - "npm_package_dependencies_postcss_normalize": "7.0.1", - "npm_package_dependencies_postcss_preset_env": "6.7.0", - "npm_package_dependencies_postcss_safe_parser": "4.0.1", - "npm_package_dependencies_prop_types": "^15.7.2", - "npm_package_dependencies_qrcode_react": "^1.0.0", - "npm_package_dependencies_rc_form": "^2.4.11", - "npm_package_dependencies_react": "^16.9.0", - "npm_package_dependencies_react_app_polyfill": "^1.0.2", - "npm_package_dependencies_react_codemirror2": "^7.1.0", - "npm_package_dependencies_react_color": "^2.18.1", - "npm_package_dependencies_react_dev_utils": "^9.0.3", - "npm_package_dependencies_react_dnd": "^9.4.0", - "npm_package_dependencies_react_dnd_html5_backend": "^9.4.0", - "npm_package_dependencies_react_dom": "^16.9.0", - "npm_package_dependencies_react_highlight_words": "^0.16.0", - "npm_package_dependencies_react_native": "^0.63.2", - "npm_package_dependencies_react_redux": "^7.1.1", - "npm_package_dependencies_react_router_dom": "^5.0.1", - "npm_package_dependencies_redux": "^4.0.4", - "npm_package_dependencies_redux_thunk": "^2.3.0", - "npm_package_dependencies_resolve": "1.12.0", - "npm_package_dependencies_resolve_url_loader": "3.1.0", - "npm_package_dependencies_sass_loader": "7.2.0", - "npm_package_dependencies_semver": "6.3.0", - "npm_package_dependencies_sheetjs_style": "^0.15.8", - "npm_package_dependencies_spark_md5": "^3.0.1", - "npm_package_dependencies_sql_formatter": "^11.0.2", - "npm_package_dependencies_style_loader": "1.0.0", - "npm_package_dependencies_terser_webpack_plugin": "1.4.1", - "npm_package_dependencies_ts_pnp": "1.1.2", - "npm_package_dependencies_url_loader": "2.1.0", - "npm_package_dependencies_video_react": "^0.14.1", - "npm_package_dependencies_webpack": "4.39.1", - "npm_package_dependencies_webpack_dev_server": "3.2.1", - "npm_package_dependencies_webpack_manifest_plugin": "2.0.4", - "npm_package_dependencies_workbox_webpack_plugin": "4.3.1", - "npm_package_dependencies_x2js": "^3.4.3", - "npm_package_dependencies_xlsx": "^0.15.5", - "npm_package_dependencies__antv_data_set": "^0.11.4", - "npm_package_dependencies__antv_g2": "^4.1.34", - "npm_package_dependencies__antv_g6": "^4.6.4", - "npm_package_dependencies__antv_util": "^2.0.17", - "npm_package_dependencies__antv_x6": "^2.11.1", - "npm_package_dependencies__antv_x6_plugin_clipboard": "^2.1.6", - "npm_package_dependencies__antv_x6_plugin_dnd": "^2.0.5", - "npm_package_dependencies__antv_x6_plugin_history": "^2.2.3", - "npm_package_dependencies__antv_x6_plugin_keyboard": "^2.2.1", - "npm_package_dependencies__antv_x6_plugin_scroller": "^2.0.9", - "npm_package_dependencies__antv_x6_plugin_selection": "^2.1.7", - "npm_package_dependencies__antv_x6_plugin_snapline": "^2.1.7", - "npm_package_dependencies__antv_x6_plugin_stencil": "^2.0.3", - "npm_package_dependencies__antv_x6_plugin_transform": "^2.1.7", - "npm_package_dependencies__antv_xflow": "^1.0.50", - "npm_package_dependencies__ant_design_icons": "^4.6.2", - "npm_package_dependencies__babel_core": "7.5.5", - "npm_package_dependencies__svgr_webpack": "4.3.2", - "npm_package_dependencies__typescript_eslint_eslint_plugin": "1.13.0", - "npm_package_dependencies__typescript_eslint_parser": "1.13.0", - "npm_package_dependencies__uiw_react_codemirror": "^2.2.1", - "npm_package_description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).", - "npm_package_devDependencies_typescript": "^4.0.2", - "npm_package_eslintConfig_extends": "react-app", - "npm_package_gitHead": "e095ca8ea64467afaff040cf4102b3eb54f37350", - "npm_package_homepage": "http://.", - "npm_package_jest_collectCoverageFrom_0": "src/**/*.{js,jsx,ts,tsx}", - "npm_package_jest_collectCoverageFrom_1": "!src/**/*.d.ts", - "npm_package_jest_moduleFileExtensions_0": "web.js", - "npm_package_jest_moduleFileExtensions_1": "js", - "npm_package_jest_moduleFileExtensions_2": "web.ts", - "npm_package_jest_moduleFileExtensions_3": "ts", - "npm_package_jest_moduleFileExtensions_4": "web.tsx", - "npm_package_jest_moduleFileExtensions_5": "tsx", - "npm_package_jest_moduleFileExtensions_6": "json", - "npm_package_jest_moduleFileExtensions_7": "web.jsx", - "npm_package_jest_moduleFileExtensions_8": "jsx", - "npm_package_jest_moduleFileExtensions_9": "node", - "npm_package_jest_moduleNameMapper__react_native_web_": "react-native-web", - "npm_package_jest_moduleNameMapper______module___css_sass_scss__": "identity-obj-proxy", - "npm_package_jest_roots_0": "<rootDir>/src", - "npm_package_jest_setupFiles_0": "react-app-polyfill/jsdom", - "npm_package_jest_testEnvironment": "jest-environment-jsdom-fourteen", - "npm_package_jest_testMatch_0": "<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}", - "npm_package_jest_testMatch_1": "<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}", - "npm_package_jest_transformIgnorePatterns_0": "[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$", - "npm_package_jest_transformIgnorePatterns_1": "^.+\\.module\\.(css|sass|scss)$", - "npm_package_jest_transform______css_": "<rootDir>/config/jest/cssTransform.js", - "npm_package_jest_transform_______js_jsx_ts_tsx__": "<rootDir>/node_modules/babel-jest", - "npm_package_jest_transform__________js_jsx_ts_tsx_css_json___": "<rootDir>/config/jest/fileTransform.js", - "npm_package_jest_watchPlugins_0": "jest-watch-typeahead/filename", - "npm_package_jest_watchPlugins_1": "jest-watch-typeahead/testname", - "npm_package_name": "pc-plat", - "npm_package_private": "true", - "npm_package_readmeFilename": "README.md", - "npm_package_scripts_build": "node scripts/build.js", - "npm_package_scripts_dev=set PORT": "3001 && node scripts/start.js", - "npm_package_scripts_test": "node scripts/test.js", - "npm_package_version": "0.1.0", - "NPM_PREFIX_NPM_CLI_JS": "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js", - "NUMBER_OF_PROCESSORS": "8", - "NVM_HOME": "C:\\Users\\king\\AppData\\Roaming\\nvm", - "NVM_SYMLINK": "C:\\Program Files\\nodejs", - "OneDrive": "C:\\Users\\king\\OneDrive", - "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined", - "OS": "Windows_NT", - "Path": "C:\\Users\\king\\AppData\\Roaming\\nvm\\v12.4.0\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;E:\\project\\pc-plat\\node_modules\\.bin;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;D:\\Program Files\\Git\\cmd;D:\\Program Files\\Microsoft VS Code\\bin;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\VSShell\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\DTS\\Binn\\;C:\\Program Files\\TortoiseGit\\bin;D:\\Program Files\\mysql\\bin;C:\\Program Files\\Java\\jdk-13.0.1\\bin;C:\\Program Files\\Java\\jdk-13.0.1\\jre\\bin;D:\\Program Files\\Redis;D:\\Program Files (x86)\\Yarn\\bin\\;\";% ANDROID_SDK_HOME%\\platform-tools\";\";C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\\";D:\\Program Files (x86)\\Tencent\\寰俊web寮�鍙戣�呭伐鍏穃\dll;C:\\Users\\king\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\Python37\\Scripts\\;C:\\Python37\\;C:\\Users\\king\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\king\\AppData\\Local\\Yarn\\bin;C:\\Users\\king\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs", - "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL", - "PORT": "3001 ", - "PROCESSOR_ARCHITECTURE": "AMD64", - "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 142 Stepping 10, GenuineIntel", - "PROCESSOR_LEVEL": "6", - "PROCESSOR_REVISION": "8e0a", - "ProgramData": "C:\\ProgramData", - "ProgramFiles": "C:\\Program Files", - "ProgramFiles(x86)": "C:\\Program Files (x86)", - "ProgramW6432": "C:\\Program Files", - "PROMPT": "$P$G", - "PSModulePath": "C:\\Users\\king\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules", - "PUBLIC": "C:\\Users\\Public", - "SESSIONNAME": "Console", - "SystemDrive": "C:", - "SystemRoot": "C:\\WINDOWS", - "TEMP": "C:\\Users\\king\\AppData\\Local\\Temp", - "TERM_PROGRAM": "vscode", - "TERM_PROGRAM_VERSION": "1.52.1", - "TMP": "C:\\Users\\king\\AppData\\Local\\Temp", - "USERDOMAIN": "LAPTOP-67RFI4SB", - "USERDOMAIN_ROAMINGPROFILE": "LAPTOP-67RFI4SB", - "USERNAME": "king", - "USERPROFILE": "C:\\Users\\king", - "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-98b274b1e6-sock", - "windir": "C:\\WINDOWS", - "__PSLockDownPolicy": "0" - }, - "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\\msvcp_win.dll", - "C:\\WINDOWS\\System32\\ucrtbase.dll", - "C:\\WINDOWS\\SYSTEM32\\dbghelp.dll", - "C:\\WINDOWS\\System32\\PSAPI.DLL", - "C:\\WINDOWS\\System32\\CRYPT32.dll", - "C:\\WINDOWS\\System32\\bcrypt.dll", - "C:\\WINDOWS\\SYSTEM32\\IPHLPAPI.DLL", - "C:\\WINDOWS\\SYSTEM32\\USERENV.dll", - "C:\\WINDOWS\\SYSTEM32\\WINMM.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\\bcryptprimitives.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\\wshbth.dll", - "C:\\WINDOWS\\system32\\NLAapi.dll", - "C:\\WINDOWS\\System32\\winrnr.dll", - "C:\\Windows\\System32\\rasadhlp.dll", - "C:\\WINDOWS\\System32\\fwpuclnt.dll", - "\\\\?\\E:\\project\\pc-plat\\node_modules\\node-sass\\vendor\\win32-x64-72\\binding.node" - ] -} \ No newline at end of file diff --git a/src/api/index.js b/src/api/index.js index c30b55b..b8c6aba 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -463,10 +463,10 @@ */ getCloudConfig (param) { param.lang = param.lang || sessionStorage.getItem('lang') || '' - param.appkey = window.GLOB.appkey || '' + param.appkey = param.appkey || window.GLOB.appkey || '' param.SessionUid = localStorage.getItem('SessionUid') || '' - param.userid = sessionStorage.getItem('CloudUserID') || '' - param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' + param.userid = param.userid || sessionStorage.getItem('CloudUserID') || '' + param.LoginUID = param.LoginUID || sessionStorage.getItem('CloudLoginUID') || '' param = this.encryptParam(param) @@ -517,7 +517,7 @@ param.appkey = param.appkey || window.GLOB.appkey let url = '/webapi/dostars' - if (sessionStorage.getItem('isEditState') === 'true' && options.cloudServiceApi) { // 缂栬緫鐘舵�侊紝涓斿瓨鍦ㄤ簯绔湴鍧� + if (window.GLOB.mkHS && options.cloudServiceApi) { // HS涓嬶紝涓斿瓨鍦ㄤ簯绔湴鍧� url = options.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' @@ -549,7 +549,7 @@ param.appkey = param.appkey || window.GLOB.appkey || '' let url = '/webapi/dostars' - if (sessionStorage.getItem('isEditState') === 'true') { // 缂栬緫鐘舵�侊紝鍗曠偣鐧诲綍鏈嶅姟鍣ㄤ负浜戠 + if (window.GLOB.mkHS) { // HS涓嬶紝鍗曠偣鐧诲綍鏈嶅姟鍣ㄤ负浜戠 if (options.cloudServiceApi) { // 瀛樺湪浜戠鍦板潃鏃讹紝浣跨敤浜戠绯荤粺鍙傛暟 url = options.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' @@ -838,14 +838,9 @@ return new Promise(resolve => this.visitOuterSystem(param, resolve)) } - if (['sPC_Get_TableData', 'sPC_Get_TableData_debug', 'sPC_TableData_InUpDe', 'sPC_TableData_InUpDe_debug', 'sPC_Get_structured_data'].includes(param.func)) { - if (sessionStorage.getItem('isEditState') === 'true') { - param.username = sessionStorage.getItem('CloudUserName') || '' - param.fullname = sessionStorage.getItem('CloudFullName') || '' - } else { - param.username = sessionStorage.getItem('User_Name') || '' - param.fullname = sessionStorage.getItem('Full_Name') || '' - } + if (['sPC_TableData_InUpDe', 'sPC_TableData_InUpDe_debug'].includes(param.func)) { + param.username = sessionStorage.getItem('User_Name') || '' + param.fullname = sessionStorage.getItem('Full_Name') || '' } let login = false diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 6157a99..5fac2c3 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -314,8 +314,6 @@ loginVisible: true }) } else { - sessionStorage.setItem('isEditState', 'true') - this.props.modifyMainMenu(null) this.props.history.replace('/design') @@ -355,8 +353,6 @@ sessionStorage.setItem('CloudAvatar', res.icon) sessionStorage.setItem('cloudDataM', res.dataM ? 'true' : '') sessionStorage.setItem('cloudRole_id', res.role_id || '') - - sessionStorage.setItem('isEditState', 'true') let _url = window.location.href.split('#')[0] + 'cloud' if (param.remember) { diff --git a/src/components/mkIcon/index.jsx b/src/components/mkIcon/index.jsx index 105f627..529f3a4 100644 --- a/src/components/mkIcon/index.jsx +++ b/src/components/mkIcon/index.jsx @@ -65,7 +65,7 @@ } getIcons = () => { - Api.getSystemConfig({ func: 's_get_icons' }).then(res => { + Api.getCloudConfig({ func: 's_get_icons' }).then(res => { if (!res.status) { notification.warning({ top: 92, diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx index 1c79abe..1d2e3da 100644 --- a/src/components/tabview/index.jsx +++ b/src/components/tabview/index.jsx @@ -31,8 +31,37 @@ state = { activeId: '', - tabviews: null, // 鏍囩闆� + tabviews: [], iFrameHeight: 0, + } + + UNSAFE_componentWillMount () { + if (!window.GLOB.mkHS) { + this.setState({ + activeId: 'home_page_id', + tabviews: [{ + MenuID: 'home_page_id', + MenuName: '棣栭〉', + type: 'Home' + }] + }) + } + } + + componentDidMount () { + MKEmitter.addListener('modifyTabs', this.modifyTabs) + MKEmitter.addListener('closeTabView', this.closeTabView) + } + + /** + * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊 + */ + componentWillUnmount () { + this.setState = () => { + return + } + MKEmitter.removeListener('modifyTabs', this.modifyTabs) + MKEmitter.removeListener('closeTabView', this.closeTabView) } // 鍏抽棴tab椤碉紝閲嶆柊閫夋嫨鏄剧ず椤� @@ -213,47 +242,13 @@ } } - UNSAFE_componentWillMount () { - if (sessionStorage.getItem('isEditState') !== 'true') { - this.setState({ - activeId: 'home_page_id', - tabviews: [{ - MenuID: 'home_page_id', - MenuName: '棣栭〉', - type: 'Home' - }] - }) - } else { - this.setState({ - activeId: '', - tabviews: [] - }) - } - } - - componentDidMount () { - MKEmitter.addListener('modifyTabs', this.modifyTabs) - MKEmitter.addListener('closeTabView', this.closeTabView) - } - - /** - * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊 - */ - componentWillUnmount () { - this.setState = () => { - return - } - MKEmitter.removeListener('modifyTabs', this.modifyTabs) - MKEmitter.removeListener('closeTabView', this.closeTabView) - } - render () { const { tabviews, activeId } = this.state return ( <section id="mk-tabgroup-wrap" className={'mk-tabview-wrap' + (this.props.collapse ? ' collapsed' : '')}> <div className="content-header"> - {tabviews && tabviews.length > 0 && + {tabviews.length > 0 && <Tabs activeKey={activeId}> {tabviews.map(view => { return ( diff --git a/src/components/thawmenu/index.jsx b/src/components/thawmenu/index.jsx index dbf1672..6a5eaa7 100644 --- a/src/components/thawmenu/index.jsx +++ b/src/components/thawmenu/index.jsx @@ -28,7 +28,7 @@ loading: false }) - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_FrozenMenu', ParentID: this.props.ParentId, TYPE: +this.props.Type @@ -72,7 +72,7 @@ }) let defers = targetKeys.map(item => { return new Promise((resolve) => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_MainMenu_ReDel', MenuID: item }).then(res => { diff --git a/src/index.js b/src/index.js index e9c4830..af0d183 100644 --- a/src/index.js +++ b/src/index.js @@ -10,19 +10,6 @@ import '@/assets/css/action.scss' import '@/assets/css/viewstyle.scss' -if (window.location.href.indexOf('#/design') > -1) { // 缂栬緫椤甸潰鍒锋柊鏃讹紝璺宠浆鑷充富椤� - window.location.replace(window.location.href.replace(/design/ig, 'main')) -} - -options.sysType = window.atob(options.sysType.replace('$mk', '')) -options.caId = window.atob(options.caId.replace('$mk', '')) -options.cakey = window.atob(options.cakey.replace('$mk', '')) -options.cdomain = window.atob(options.cdomain.replace('$mk', '')) - -if (options.cdomain && options.sysType !== 'cloud') { - options.cloudServiceApi = options.cdomain + '/webapi/dostars' -} - if (!localStorage.getItem('SessionUid')) { localStorage.setItem('SessionUid', (() => { let uuid = [] @@ -43,8 +30,6 @@ ) } -sessionStorage.removeItem('isEditState') - fetch('../options.json') .then(response => response.json()) .catch(() => { @@ -60,6 +45,10 @@ } } + if (options.cdomain && options.sysType !== 'cloud') { + options.cloudServiceApi = options.cdomain + '/webapi/dostars' + } + let GLOB = {} GLOB.appId = config.appId || '' GLOB.lineColor = config.lineColor || '' diff --git a/src/menu/components/search/main-search/dragsearch/card.jsx b/src/menu/components/search/main-search/dragsearch/card.jsx index 666ac3f..f439493 100644 --- a/src/menu/components/search/main-search/dragsearch/card.jsx +++ b/src/menu/components/search/main-search/dragsearch/card.jsx @@ -1,6 +1,6 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Select, DatePicker, Input, Popover, Form, Switch, Checkbox } from 'antd' +import { Select, Radio, DatePicker, Input, Popover, Form, Switch, Checkbox } from 'antd' import { CopyOutlined, EditOutlined, CloseOutlined } from '@ant-design/icons' import moment from 'moment' @@ -55,6 +55,8 @@ _defaultValue = [moment().startOf('week'), moment().endOf('week')] } else if (card.initval === 'month') { _defaultValue = [moment().startOf('month'), moment().endOf('month')] + } else if (card.initval === 'lastMonth') { + _defaultValue = [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')] } else if (card.initval) { try { let _initval = JSON.parse(card.initval) @@ -111,6 +113,14 @@ formItem = <CheckCard config={card} /> } else if (card.type === 'switch') { formItem = (<Switch checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''} style={{marginTop: '8px'}} checked={card.initval === card.openVal}/>) + } else if (card.type === 'radio') { + let options = card.options + if (options.length === 0) { + options = [{Value: '1', Text: '閫夐」1'}, {Value: '2', Text: '閫夐」2'}] + } + formItem = (<Radio.Group value={card.initval} style={{lineHeight: '36px'}}> + {options.map((item, i) => (<Radio key={i} value={item.Value}> {item.Text} </Radio>))} + </Radio.Group>) } else if (card.type === 'check') { formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> } diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 260dedd..bcba0e8 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -800,6 +800,10 @@ { pattern: formRule.func.pattern, message: formRule.func.message }, { max: formRule.func.max, message: formRule.func.maxMessage } ) + } else if (item.key === 'outerBlacklist') { + rules.push( + { max: 512, message: '鏈�澶�512涓瓧绗�' } + ) } else if (item.key === 'output') { if (this.record.intertype === 'system' || ((this.record.intertype === 'outer' || this.record.intertype === 'custom') && this.record.callbackType === 'script')) { rules = [{ diff --git a/src/menu/components/share/searchcomponent/dragsearch/card.jsx b/src/menu/components/share/searchcomponent/dragsearch/card.jsx index 7c6754f..07df0ae 100644 --- a/src/menu/components/share/searchcomponent/dragsearch/card.jsx +++ b/src/menu/components/share/searchcomponent/dragsearch/card.jsx @@ -54,6 +54,8 @@ _defaultValue = [moment().startOf('week'), moment().endOf('week')] } else if (card.initval === 'month') { _defaultValue = [moment().startOf('month'), moment().endOf('month')] + } else if (card.initval === 'lastMonth') { + _defaultValue = [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')] } else if (card.initval) { try { let _initval = JSON.parse(card.initval) diff --git a/src/menu/components/share/sourcecomponent/inputform/index.jsx b/src/menu/components/share/sourcecomponent/inputform/index.jsx index 7652431..b1a4249 100644 --- a/src/menu/components/share/sourcecomponent/inputform/index.jsx +++ b/src/menu/components/share/sourcecomponent/inputform/index.jsx @@ -124,7 +124,7 @@ res.id = Utils.getuuid() } - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_url_db_adduptdel', id: res.id, PageIndex: 0, // 0 浠h〃鍏ㄩ儴 diff --git a/src/menu/components/share/usercomponent/index.jsx b/src/menu/components/share/usercomponent/index.jsx index 8862fa6..d3cec9a 100644 --- a/src/menu/components/share/usercomponent/index.jsx +++ b/src/menu/components/share/usercomponent/index.jsx @@ -152,7 +152,7 @@ Api.fileuploadbase64(param).then(result => { if (result.status) { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_custom_components_adduptdel', c_id: config.uuid, images: Utils.getcloudurl(result.Images), diff --git a/src/menu/components/table/edit-table/columns/tableIn/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/index.jsx index 8d5c18e..032381a 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/index.jsx @@ -237,7 +237,7 @@ _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(_sParam).then(res => { + Api.getCloudConfig(_sParam).then(res => { if (res.status) { let _scripts = res.data.map(item => { return { diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx index 2fe9dae..6b07e67 100644 --- a/src/menu/datasource/verifycard/index.jsx +++ b/src/menu/datasource/verifycard/index.jsx @@ -244,7 +244,7 @@ _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(_sParam).then(res => { + Api.getCloudConfig(_sParam).then(res => { if (res.status) { let _scripts = res.data.map(item => { return { diff --git a/src/menu/modulesource/index.jsx b/src/menu/modulesource/index.jsx index 2233f75..e990025 100644 --- a/src/menu/modulesource/index.jsx +++ b/src/menu/modulesource/index.jsx @@ -50,7 +50,7 @@ content: '', onOk() { return new Promise(resolve => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_custom_components_adduptdel', c_id: item.uuid, images: '', diff --git a/src/menu/picturecontroller/index.jsx b/src/menu/picturecontroller/index.jsx index e51d89f..164b0a0 100644 --- a/src/menu/picturecontroller/index.jsx +++ b/src/menu/picturecontroller/index.jsx @@ -100,7 +100,7 @@ res.id = Utils.getuuid() } - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_url_db_adduptdel', id: res.id, PageIndex: 0, // 0 浠h〃鍏ㄩ儴 @@ -154,7 +154,7 @@ content: '', onOk() { return new Promise((resolve) => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_url_db_adduptdel', id: item.id, PageIndex: 0, // 0 浠h〃鍏ㄩ儴 diff --git a/src/menu/tablenodes/index.jsx b/src/menu/tablenodes/index.jsx index e903da7..26fb797 100644 --- a/src/menu/tablenodes/index.jsx +++ b/src/menu/tablenodes/index.jsx @@ -122,7 +122,7 @@ MenuID: config.uuid } - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, diff --git a/src/menu/transfer/index.jsx b/src/menu/transfer/index.jsx index 15e956a..04223ca 100644 --- a/src/menu/transfer/index.jsx +++ b/src/menu/transfer/index.jsx @@ -246,7 +246,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { _resolve() if (!res.status) { Modal.warning({ diff --git a/src/menu/viewnodes/index.jsx b/src/menu/viewnodes/index.jsx index ec0fd77..d69598b 100644 --- a/src/menu/viewnodes/index.jsx +++ b/src/menu/viewnodes/index.jsx @@ -36,7 +36,7 @@ par_menuid: MenuId } - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, diff --git a/src/mob/modulesource/index.jsx b/src/mob/modulesource/index.jsx index debf9c8..69b9bac 100644 --- a/src/mob/modulesource/index.jsx +++ b/src/mob/modulesource/index.jsx @@ -56,7 +56,7 @@ content: '', onOk() { return new Promise(resolve => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_custom_components_adduptdel', c_id: item.uuid, images: '', diff --git a/src/mob/searchconfig/searchdragelement/card.jsx b/src/mob/searchconfig/searchdragelement/card.jsx index 13080ed..1a469a8 100644 --- a/src/mob/searchconfig/searchdragelement/card.jsx +++ b/src/mob/searchconfig/searchdragelement/card.jsx @@ -91,27 +91,6 @@ </div> </div> </div>) - // } else if (card.type === 'daterange') { - // let value = '璇烽�夋嫨' - // if (card.initval === 'week') { - // value = [moment().startOf('week').format('YYYY-MM-DD'), moment().endOf('week').format('YYYY-MM-DD')].join(' ~ ') - // } else if (card.initval === 'month') { - // value = [moment().startOf('month').format('YYYY-MM-DD'), moment().endOf('month').format('YYYY-MM-DD')].join(' ~ ') - // } else if (card.initval) { - // try { - // let _initval = JSON.parse(card.initval) - // value = [moment().subtract(_initval[0], 'days').format('YYYY-MM-DD'), moment().subtract(_initval[1], 'days').format('YYYY-MM-DD')].join(' ~ ') - // } catch (e) { - // value = '璇烽�夋嫨' - // } - // } - // formItem = (<div className="am-list-item"> - // <div className="am-list-line"> - // {card.labelShow !== 'false' ? <div className="am-input-label">{card.label}</div> : null} - // <div className="am-input-control">{value}</div> - // <div className="am-list-extra"><RightOutlined /></div> - // </div> - // </div>) } else if (card.type === 'checkcard') { formItem = (<div className="am-list-item check-card"> <div className="am-list-line"> diff --git a/src/pc/createview/index.jsx b/src/pc/createview/index.jsx index be5bdec..856e54c 100644 --- a/src/pc/createview/index.jsx +++ b/src/pc/createview/index.jsx @@ -97,7 +97,7 @@ if (!res.copymenuId) { param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config))) - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -120,7 +120,7 @@ this.props.resetmenu() }) } else { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', TypeCharOne: sessionStorage.getItem('kei_no'), typename: sessionStorage.getItem('typename') || 'pc', @@ -179,7 +179,7 @@ param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config))) - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, diff --git a/src/pc/modulesource/index.jsx b/src/pc/modulesource/index.jsx index f84cdd7..619d3ae 100644 --- a/src/pc/modulesource/index.jsx +++ b/src/pc/modulesource/index.jsx @@ -48,7 +48,7 @@ content: '', onOk() { return new Promise(resolve => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_custom_components_adduptdel', c_id: item.uuid, images: '', diff --git a/src/pc/quotecomponent/index.jsx b/src/pc/quotecomponent/index.jsx index 11a7a0e..271fc60 100644 --- a/src/pc/quotecomponent/index.jsx +++ b/src/pc/quotecomponent/index.jsx @@ -45,7 +45,7 @@ return } - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', TypeCharOne: sessionStorage.getItem('kei_no'), typename: sessionStorage.getItem('typename') || 'pc', diff --git a/src/store/options.js b/src/store/options.js index f3492e0..3dc04f2 100644 --- a/src/store/options.js +++ b/src/store/options.js @@ -2,14 +2,13 @@ * @description 绯荤粺淇℃伅 * 1銆亂un ( Y2xv$mkdWQ= ) 銆� dandian ( U1$mkNP ) 銆� yewu ( bG9j$mkYWw= ) * 2銆亀indow.btoa('') 鍩熷悕 涓嶅甫 / - * 3銆乥aoshide old ( aHR0cDovL2Nsb3VkLnBv$mkc2l0ZWNncm91cC5jb206ODA4MA== ) - * 4銆乸ositecgroup ( aHR0cHM6Ly9jbG91ZC5$mkwb3NpdGVjZ3JvdXAuY29t ) + * 3銆乸ositecgroup ( aHR0cHM6Ly9jbG91ZC5$mkwb3NpdGVjZ3JvdXAuY29t ) */ export default { - sysType: 'bG9j$mkYWw=', - caId: 'MjAyMDAxMTYxMjMzMzU1MDd$mkGQzkyMzI1Rjk4MDY0QUNGQjQ2Mg==', - cakey: 'MjAyMDAxMTYxMjQwMDQ2NDM$mk2N0QzODE2MjExNUI0MTc4OTVDMQ==', - cdomain: 'aHR0cHM6Ly9jbG91$mkZC5tazloLmNu' + sysType: window.atob('bG9j$mkYWw='.replace('$mk', '')), + caId: window.atob('MjAyMDAxMTYxMjMzMzU1MDd$mkGQzkyMzI1Rjk4MDY0QUNGQjQ2Mg=='.replace('$mk', '')), + cakey: window.atob('MjAyMDAxMTYxMjQwMDQ2NDM$mk2N0QzODE2MjExNUI0MTc4OTVDMQ=='.replace('$mk', '')), + cdomain: window.atob('aHR0cHM6Ly9jbG91$mkZC5tazloLmNu'.replace('$mk', '')) } /** diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx index cb0262b..c2422f3 100644 --- a/src/tabviews/basetable/index.jsx +++ b/src/tabviews/basetable/index.jsx @@ -127,11 +127,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, { reg: /@fullName@/ig, value: `'${fullName}'` } diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index 362273d..793193c 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -264,11 +264,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, { reg: /@fullName@/ig, value: `'${fullName}'` } diff --git a/src/tabviews/custom/components/chart/antv-X6/index.jsx b/src/tabviews/custom/components/chart/antv-X6/index.jsx index 71aed16..87c4c48 100644 --- a/src/tabviews/custom/components/chart/antv-X6/index.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Spin, Tooltip, message, Modal, notification } from 'antd' +import { Spin, Tooltip, message, Modal, notification, Switch } from 'antd' import { UndoOutlined, RedoOutlined, VerticalAlignTopOutlined, VerticalAlignBottomOutlined, SaveOutlined, ZoomInOutlined, ZoomOutOutlined, OneToOneOutlined, QuestionCircleOutlined, ClearOutlined } from '@ant-design/icons' import { Graph, Shape } from '@antv/x6' import { Stencil } from '@antv/x6-plugin-stencil' @@ -139,7 +139,7 @@ { inherit: 'rect', width: 66, - height: 36, + height: 40, attrs: { body: { strokeWidth: 1, @@ -169,7 +169,7 @@ { inherit: 'polygon', width: 66, - height: 36, + height: 40, attrs: { body: { strokeWidth: 1, @@ -199,7 +199,7 @@ { inherit: 'polygon', width: 66, - height: 36, + height: 40, attrs: { body: { strokeWidth: 1, @@ -226,8 +226,8 @@ 'mk-circle', { inherit: 'circle', - width: 36, - height: 36, + width: 40, + height: 40, attrs: { body: { strokeWidth: 1, @@ -257,7 +257,7 @@ { inherit: 'ellipse', width: 66, - height: 36, + height: 40, attrs: { body: { strokeWidth: 1, @@ -286,8 +286,8 @@ 'mk-star', { inherit: 'polygon', - width: 36, - height: 36, + width: 40, + height: 40, points: '100,10 40,198 190,78 10,78 160,198', attrs: { body: { @@ -319,7 +319,7 @@ { inherit: 'text-block', width: 66, - height: 36, + height: 40, text: '鏂囨湰鍩�', attrs: { body: { @@ -385,7 +385,8 @@ editing: false, node: null, loading: false, - rolelist: [] + status: 0, + orgs: [] } selectNode = null @@ -423,7 +424,7 @@ this.loadData() if (_config.plot.function === 'edit') { - this.getrolelist() + this.getorganizations() } }) } @@ -468,8 +469,8 @@ } } - getrolelist = () => { - Api.getSystemConfig({func: 's_get_rolelist', OrderCol: 'RoleID desc', PageIndex: 1, PageSize: 1000}).then(res => { + getorganizations = () => { + Api.genericInterface({func: 's_get_organizations_v1'}).then(res => { if (!res.status) { notification.error({ top: 92, @@ -479,7 +480,101 @@ return } - this.setState({rolelist: res.data || []}) + let orgs = [] + res.organizations && res.organizations.forEach(com => { + let _com = { + key: com.OrgCode, + title: com.OrgName, + shortName: com.ShortName, + checkable: false, + disabled: true, + children: [] + } + + com.departments.forEach(dep => { + let _dep = { + key: dep.co_pro_code, + title: dep.co_pro_name, + checkable: false, + disabled: true, + children: [] + } + + dep.jobs.forEach(job => { + let _job = { + key: job.jobcode, + title: job.jobname, + checkable: false, + disabled: true, + children: [] + } + + job.work_group.forEach(group => { + if (group.work_group === 'normal') { + group.workers.forEach(work => { + let _work = { + key: work.worker_id, + title: work.workername, + email: work.email || '', + images: work.images || '', + mob: work.mob || '', + sex: work.sex || '', + work_grade: work.work_grade || '', + worker_id: work.worker_id || '', + workercode: work.workercode || '', + workername: work.workername || '', + } + + _job.children.push(_work) + }) + } else { + let _group = { + key: group.work_group, + title: group.work_group, + checkable: false, + disabled: true, + children: [] + } + + group.workers.forEach(work => { + let _work = { + key: work.worker_id, + title: work.workername, + email: work.email || '', + images: work.images || '', + mob: work.mob || '', + sex: work.sex || '', + work_grade: work.work_grade || '', + worker_id: work.worker_id || '', + workercode: work.workercode || '', + workername: work.workername || '', + } + + _group.children.push(_work) + }) + + if (_group.children.length > 0) { + _job.children.push(_group) + } + } + }) + + if (_job.children.length > 0) { + _dep.children.push(_job) + } + }) + + if (_dep.children.length > 0) { + _com.children.push(_dep) + } + }) + + if (_com.children.length > 0) { + orgs.push(_com) + } + }) + + this.setState({orgs: orgs}) }) } @@ -518,6 +613,7 @@ this.handleData() this.setState({ + status: item.status || 0, loading: false }) @@ -795,7 +891,8 @@ groups: [ { title: '閫氱敤鑺傜偣', - name: 'group1' + name: 'group1', + graphHeight: 240 }, { title: '鑷畾涔�', @@ -895,52 +992,121 @@ const r1 = graph.createNode({ shape: 'mk-rect', - label: '寮�濮�', + mknode: 'start', + mkdata: {status: 0, statusName: '寮�濮�'}, attrs: { body: { rx: 20, - ry: 26 + ry: 26, + fill: '#52c41a', + stroke: '#52c41a' + }, + text: { + fill: '#ffffff', + text: '寮�濮�' } } }) const r2 = graph.createNode({ shape: 'mk-rect', - label: '杩囩▼' + attrs: { + body: { + rx: 20, + ry: 26, + fill: '#e6f4ff', + stroke: '#1890ff' + }, + text: { + text: '杩囩▼' + } + } }) const r3 = graph.createNode({ shape: 'mk-rect', attrs: { body: { rx: 6, - ry: 6 + ry: 6, + fill: '#fff7e6', + stroke: '#fa8c16' + }, + text: { + text: '鍙�夎繃绋�' } - }, - label: '鍙�夎繃绋�' + } }) const r4 = graph.createNode({ + shape: 'mk-rect', + attrs: { + body: { + rx: 0, + ry: 0, + fill: '#fff7e6', + stroke: '#fa8c16' + }, + text: { + text: '鑺傜偣' + } + } + }) + const r5 = graph.createNode({ shape: 'mk-polygon', attrs: { body: { - refPoints: '0,10 10,0 20,10 10,20' + refPoints: '0,10 10,0 20,10 10,20', + fill: '#f9f0ff', + stroke: '#722ed1' + }, + text: { + text: '鍐崇瓥' } - }, - label: '鍐崇瓥' + } }) - const r5 = graph.createNode({ + const r6 = graph.createNode({ shape: 'mk-paral', attrs: { body: { - refPoints: '10,0 40,0 30,20 0,20' + refPoints: '10,0 40,0 30,20 0,20', + fill: '#e6fffb', + stroke: '#13c2c2' + }, + text: { + text: '鏁版嵁' } - }, - label: '鏁版嵁' + } }) - const r6 = graph.createNode({ + const r7 = graph.createNode({ shape: 'mk-circle', - label: '杩炴帴' + attrs: { + body: { + fill: '#e6f4ff', + stroke: '#1890ff' + }, + text: { + text: '杩炴帴' + } + } + }) + + const r8 = graph.createNode({ + shape: 'mk-rect', + mknode: 'end', + mkdata: {status: '', statusName: '缁撴潫'}, + attrs: { + body: { + rx: 20, + ry: 26, + fill: '#fa8c16', + stroke: '#fa8c16' + }, + text: { + fill: '#ffffff', + text: '缁撴潫' + } + } }) - stencil.load([r1, r2, r3, r4, r5, r6], 'group1') + stencil.load([r1, r2, r3, r4, r5, r6, r7, r8], 'group1') const p1 = graph.createNode({ shape: 'mk-ellipse', @@ -1351,7 +1517,7 @@ } save = () => { - const { BID } = this.state + const { BID, plot, status } = this.state if (!BID) { Modal.error({ @@ -1360,16 +1526,28 @@ return } + let nodes = this.mkGraph.toJSON() + let _status = status + + if (plot.subtype === 'xflow' && status === 10) { + let start_num = nodes.cells.filter(cell => cell.mknode === 'start').length + let end_num = nodes.cells.filter(cell => cell.mknode === 'end').length + + if (start_num !== 1 || end_num !== 1) { + _status = 0 + } + } + this.setState({ loading: true }) - let nodes = this.mkGraph.toJSON() this.mkGraph.toPNG((dataUri) => { let param = { func: 's_works_flow_param_upt_v6', long_param: window.btoa(window.encodeURIComponent(JSON.stringify(nodes))), flow_image: dataUri, + status: status, ID: BID, BID: '' } @@ -1381,17 +1559,20 @@ message: '淇濆瓨鎴愬姛锛�', duration: 2 }) + this.setState({ + loading: false, + status: _status + }) } else { notification.error({ top: 92, message: res.message, duration: 10 }) + this.setState({ + loading: false + }) } - - this.setState({ - loading: false - }) }) }, {padding: 20}) } @@ -1590,6 +1771,8 @@ } else { this.selectNode.attr('line/strokeDasharray', 0) } + } else if (key === 'mkdata') { + this.selectNode.prop('mkdata', value) } } else if (node.shape === 'lane') { if (key === 'title') { @@ -1638,8 +1821,8 @@ this.selectNode.attr('text/fontSize', value) } else if (key === 'fontFill') { this.selectNode.attr('text/fill', value) - } else if (key === 'mksign') { - this.selectNode.prop('mksign', value) + } else if (key === 'mkdata') { + this.selectNode.prop('mkdata', value) } } } @@ -1721,6 +1904,48 @@ } } + changeStatus = () => { + const { plot, status } = this.state + + let _status = status === 10 ? 0 : 10 + + if (plot.subtype === 'xflow' && _status === 10) { + let nodes = this.mkGraph.toJSON() + let start_num = nodes.cells.filter(cell => cell.mknode === 'start').length + let end_num = nodes.cells.filter(cell => cell.mknode === 'end').length + + if (start_num === 0) { + notification.warning({ + top: 92, + message: '璇锋坊鍔犲紑濮嬭妭鐐癸紒', + duration: 2 + }) + } else if (start_num > 1) { + notification.warning({ + top: 92, + message: '寮�濮嬭妭鐐逛笉鍙坊鍔犲涓紒', + duration: 2 + }) + } else if (end_num === 0) { + notification.warning({ + top: 92, + message: '璇锋坊鍔犵粨鏉熻妭鐐癸紒', + duration: 2 + }) + } else if (end_num > 1) { + notification.warning({ + top: 92, + message: '缁撴潫鑺傜偣涓嶅彲娣诲姞澶氫釜锛�', + duration: 2 + }) + } else { + this.setState({status: _status}) + } + } else { + this.setState({status: _status}) + } + } + resetlane = (id, x, offset) => { let nodes = this.mkGraph.getNodes() @@ -1736,7 +1961,7 @@ } render() { - const { loading, config, node, rolelist } = this.state + const { loading, config, node, orgs, status } = this.state let style = {...config.style} @@ -1803,8 +2028,11 @@ </Tooltip> </div> <div className="right-tool"> + <Tooltip title="鍚敤/鍋滅敤"> + <Switch size="small" style={{marginRight: '10px'}} checked={status === 10} onChange={this.changeStatus} /> + </Tooltip> <Tooltip title="淇濆瓨"> - <SaveOutlined onClick={this.save}/> + <SaveOutlined style={{marginRight: '10px'}} onClick={this.save}/> </Tooltip> </div> </div> @@ -1813,7 +2041,7 @@ <div id={config.uuid + 'container'} className="mk-container"></div> <div className="mk-node-edit"> <div className="header">璁剧疆</div> - {!node ? <div className="empty">鏈�変腑</div> : <NodeUpdate node={node} rolelist={rolelist} onChange={this.changeProps}/>} + {!node ? <div className="empty">鏈�変腑</div> : <NodeUpdate node={node} orgs={orgs} onChange={this.changeProps}/>} </div> </div> </div> diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx index d279a75..722012a 100644 --- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx @@ -1,10 +1,11 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Form, Row, Col, Input, Select, Radio, InputNumber } from 'antd' +import { Form, Row, Col, Input, Select, Radio, InputNumber, Modal } from 'antd' +import { FormOutlined } from '@ant-design/icons' import ColorSketch from '@/mob/colorsketch' - +import NodeForm from './nodeform' import './index.scss' const { TextArea } = Input @@ -12,15 +13,19 @@ class NodeUpdate extends Component { static propTpyes = { node: PropTypes.object, - rolelist: PropTypes.array + orgs: PropTypes.array } state = { - formlist: null + formlist: null, + mknode: null, + mkdata: null } UNSAFE_componentWillMount () { this.setState({ + mknode: this.props.node, + mkdata: this.props.node.mkdata || '', formlist: this.getFormList(this.props.node) }) } @@ -31,6 +36,8 @@ formlist: null }, () => { this.setState({ + mknode: nextProps.node, + mkdata: nextProps.node.mkdata || '', formlist: this.getFormList(nextProps.node) }) }) @@ -127,6 +134,10 @@ field: 'fontFill', label: '棰滆壊', initval: font.fill || '#000000' + }, + { + type: 'other', + label: '鑷畾涔変俊鎭�' } ] } else if (node.shape === 'lane') { @@ -350,22 +361,9 @@ initval: fontFill }, { - type: 'title', + type: 'other', label: '鑷畾涔変俊鎭�' - }, - { - type: 'text', - field: 'mksign', - label: '鏍囪', - initval: node.mksign || '' - }, - { - type: 'select', - field: 'mkroleid', - label: '瑙掕壊', - initval: node.mkroleid || '', - options: this.props.rolelist.map(item => ({value: item.RoleID, text: item.RoleName})) - }, + } ] } } @@ -386,8 +384,15 @@ this.props.onChange(value, key) } + confirm = () => { + this.nodeRef.handleConfirm().then(res => { + this.setState({visible: false, mkdata: res}) + this.props.onChange(res, 'mkdata') + }) + } + getFields() { - const { formlist } = this.state + const { formlist, mkdata, mknode } = this.state const fields = [] if (!formlist) return @@ -462,17 +467,44 @@ </Form.Item> </Col> ) + } else if (item.type === 'other') { + fields.push( + <Col span={24} key={index}> + <span className="split-line">{item.label}锛�<FormOutlined onClick={() => {this.setState({visible: true})}}/></span> + {mkdata ? <div className="mk-data"> + <div>鐘舵�侊細{mkdata.status}<span style={{float: 'right'}}>{mkdata.statusName}</span></div> + {mknode.shape !== 'edge' && !mknode.mknode ? <div>鏍囪锛歿mkdata.sign || ''}</div> : null} + {mkdata.roleId ? <div>瑙掕壊锛歿mkdata.roleName || ''}</div> : null} + {mkdata.depId ? <div>閮ㄩ棬锛歿mkdata.depName || ''}</div> : null} + <div>澶囨敞锛歿mkdata.remark || ''}</div> + </div> : null} + </Col> + ) } }) return fields } render() { + const { visible, mkdata, mknode } = this.state + return ( <div className="node-edit-form-wrap"> <Form className="node-edit-form"> <Row>{this.getFields()}</Row> </Form> + <Modal + title="鑺傜偣缂栬緫" + visible={visible} + closable={false} + maskClosable={false} + width={1000} + onOk={this.confirm} + onCancel={() => this.setState({visible: false})} + destroyOnClose + > + <NodeForm node={mknode} data={mkdata} orgs={this.props.orgs} handleSubmit={() => this.confirm()} wrappedComponentRef={(inst) => this.nodeRef = inst}/> + </Modal> </div> ) } diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss index 68f75dc..b9da954 100644 --- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss @@ -8,6 +8,13 @@ padding-bottom: 2px; font-size: 13px; } + .mk-data { + font-size: 13px; + padding: 0 12px; + >div { + padding-bottom: 2px; + } + } textarea.ant-input { padding: 0px 4px; border-radius: 0px; @@ -100,4 +107,76 @@ border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.07); background: rgba(0, 0, 0, 0); +} + +.normal-node-form { + >.ant-row >.ant-col-24 { + .ant-form-item-label { + width: 16%; + } + .ant-form-item-control-wrapper { + width: 84%; + } + } + .member-input { + display: inline-block; + width: 100%; + height: 32px; + padding: 4px 11px; + color: rgba(0, 0, 0, 0.65); + font-size: 14px; + line-height: 1.5; + background-color: #fff; + background-image: none; + border: 1px solid #d9d9d9; + border-radius: 4px; + + .anticon-form { + float: right; + margin-top: 3px; + } + } +} +.member-transfer { + .ant-transfer-list:first-child { + width: 60%; + } + .ant-transfer-list:last-child { + width: 40%; + } + .ant-transfer-list-header { + .ant-transfer-list-header-selected { + span:not(.ant-transfer-list-header-title) { + display: none; + } + .ant-transfer-list-header-title { + position: unset; + } + } + } +} + +.member-modal { + .ant-modal { + top: 50px; + } + .ant-modal-body { + min-height: 150px; + max-height: calc(100vh - 200px); + overflow-y: auto; + } + .ant-modal-body::-webkit-scrollbar { + width: 7px; + } + .ant-modal-body::-webkit-scrollbar-thumb { + border-radius: 5px; + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); + background: rgba(0, 0, 0, 0.13); + } + .ant-modal-body::-webkit-scrollbar-track { + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); + border-radius: 3px; + border: 1px solid rgba(0, 0, 0, 0.07); + background: rgba(0, 0, 0, 0); + } } \ No newline at end of file diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx new file mode 100644 index 0000000..4602e47 --- /dev/null +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx @@ -0,0 +1,107 @@ +import React, {Component} from 'react' +import PropTypes from 'prop-types' +import { Modal, Transfer, Tree } from 'antd' +import { FormOutlined } from '@ant-design/icons' + +const { TreeNode } = Tree + +const isChecked = (selectedKeys, eventKey) => { + return selectedKeys.indexOf(eventKey) !== -1 +} + +const generateTree = (treeNodes = [], checkedKeys = []) => { + return treeNodes.map(({ children, ...props }) => ( + <TreeNode {...props} disabled={checkedKeys.includes(props.key)} key={props.key}> + {generateTree(children, checkedKeys)} + </TreeNode> + )) +} + +const TreeTransfer = ({ dataSource, targetKeys, ...restProps }) => { + const transferDataSource = [] + function flatten(list = []) { + list.forEach(item => { + transferDataSource.push(item) + flatten(item.children) + }) + } + flatten(dataSource) + + return ( + <Transfer + {...restProps} + targetKeys={targetKeys} + dataSource={transferDataSource} + className="member-transfer" + titles={['鍏ㄩ儴浜哄憳', '宸查��']} + render={item => item.title} + showSelectAll={false} + > + {({ direction, onItemSelect, selectedKeys }) => { + if (direction === 'left') { + const checkedKeys = [...selectedKeys, ...targetKeys] + return ( + <Tree + blockNode + checkable + checkStrictly + defaultExpandAll + checkedKeys={checkedKeys} + onCheck={(_, { node: { props: { eventKey } } }) => { + onItemSelect(eventKey, !isChecked(checkedKeys, eventKey)) + }} + onSelect={(_, { node: { props: { eventKey } } }) => { + onItemSelect(eventKey, !isChecked(checkedKeys, eventKey)) + }} + > + {generateTree(dataSource, targetKeys)} + </Tree> + ) + } + }} + </Transfer> + ) +} + +class MemberForm extends Component { + static propTpyes = { + node: PropTypes.any, + data: PropTypes.any, + orgs: PropTypes.array + } + + state = { + visible: false, + targetKeys: ['sifuweoifuweifuo'] + } + + onChange = targetKeys => { + this.setState({ targetKeys }) + } + + render() { + const { orgs } = this.props + const { visible, targetKeys } = this.state + + return ( + <> + <div className="member-input">0浜�<FormOutlined onClick={() => this.setState({visible: true})} /></div> + <Modal + wrapClassName="member-modal" + title="閫夋嫨浜哄憳" + visible={visible} + closable={false} + maskClosable={false} + width={1000} + onOk={this.confirm} + onCancel={() => this.setState({visible: false})} + destroyOnClose + > + <TreeTransfer dataSource={orgs} targetKeys={targetKeys} onChange={this.onChange} /> + </Modal> + </> + ) + } +} + +export default MemberForm \ No newline at end of file diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx new file mode 100644 index 0000000..a47936b --- /dev/null +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx @@ -0,0 +1,156 @@ +import React, {Component} from 'react' +import PropTypes from 'prop-types' +import { Form, Row, Col, Input, Radio, Tooltip, InputNumber } from 'antd' +import { QuestionCircleOutlined } from '@ant-design/icons' + +import MemberForm from './memberform' +const { TextArea } = Input + +class NodeForm extends Component { + static propTpyes = { + node: PropTypes.any, + data: PropTypes.any, + orgs: PropTypes.array + } + + state = {} + + handleConfirm = () => { + return new Promise((resolve, reject) => { + this.props.form.validateFieldsAndScroll((err, values) => { + if (!err) { + resolve(values) + } else { + reject(err) + } + }) + }) + } + + render() { + const { node, orgs } = this.props + const { getFieldDecorator } = this.props.form + const formItemLayout = { + labelCol: { + xs: { span: 24 }, + sm: { span: 8 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + } + } + let data = this.props.data || {} + let nodetype = node.shape !== 'edge' ? 'node' : 'edge' + if (node.mknode === 'start') { + nodetype = 'start' + } else if (node.mknode === 'end') { + nodetype = 'end' + } + + return ( + <Form {...formItemLayout} className="normal-node-form"> + <Row gutter={24}> + <Col span={12}> + <Form.Item label="鐘舵�佸��"> + {getFieldDecorator('status', { + initialValue: data.status === undefined ? 0 : data.status, + rules: [ + { + required: true, + message: '璇疯緭鍏ョ姸鎬佸��!' + } + ] + })( + <InputNumber precision={0}/> + )} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label="鐘舵�佸悕"> + {getFieldDecorator('statusName', { + initialValue: data.statusName || '' + })( + <Input placeholder="" autoComplete="off"/> + )} + </Form.Item> + </Col> + {nodetype === 'node' ? <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鏍囪灏嗕綔涓鸿妭鐐笽D"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏍囪 + </Tooltip> + }> + {getFieldDecorator('sign', { + initialValue: data.sign || '' + })( + <Input placeholder="" autoComplete="off"/> + )} + </Form.Item> + </Col> : null} + {nodetype === 'node' ? <Col span={12}> + <Form.Item label="瀹℃壒浜�"> + {getFieldDecorator('approver', { + initialValue: data.approver || 'member' + })( + <Radio.Group> + <Radio value="member">鎸囧畾鎴愬憳</Radio> + <Radio value="departmentManager">閮ㄩ棬涓荤</Radio> + <Radio value="directManager">鐩村睘涓荤</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} + {nodetype === 'node' ? <Col span={12}> + <Form.Item label="瀹℃壒鏂瑰紡"> + {getFieldDecorator('approvalMethod', { + initialValue: data.approvalMethod || 'countersign' + })( + <Radio.Group> + <Radio value="countersign">浼氱</Radio> + <Radio value="orsign">鎴栫</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} + <Col span={12}> + <Form.Item label="浜哄憳"> + {getFieldDecorator('roleId', { + initialValue: data.roleId || '', + rules: [ + { + required: true, + message: '璇烽�夋嫨浜哄憳!' + } + ] + })( + <MemberForm orgs={orgs}/> + )} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label="鎶勯��"> + {getFieldDecorator('depId', { + initialValue: data.depId || '' + })( + <MemberForm orgs={orgs}/> + )} + </Form.Item> + </Col> + <Col span={24}> + <Form.Item label="澶囨敞"> + {getFieldDecorator('remark', { + initialValue: data.remark || '' + })( + <TextArea rows={2}/> + )} + </Form.Item> + </Col> + </Row> + </Form> + ) + } +} + +export default Form.create()(NodeForm) \ No newline at end of file diff --git a/src/tabviews/custom/components/module/voucher/resetAttach/addAttach/index.jsx b/src/tabviews/custom/components/module/voucher/resetAttach/addAttach/index.jsx index a47a6e2..2f1954d 100644 --- a/src/tabviews/custom/components/module/voucher/resetAttach/addAttach/index.jsx +++ b/src/tabviews/custom/components/module/voucher/resetAttach/addAttach/index.jsx @@ -60,7 +60,7 @@ <Col span={12}> <Form.Item label="鏂囦欢澶�"> {getFieldDecorator('data_code', { - initialValue: '', + initialValue: files[0] ? files[0].data_code : '', rules: [ { required: true, diff --git a/src/tabviews/custom/components/module/voucher/resetAttach/index.jsx b/src/tabviews/custom/components/module/voucher/resetAttach/index.jsx index fcbcb81..cbf864d 100644 --- a/src/tabviews/custom/components/module/voucher/resetAttach/index.jsx +++ b/src/tabviews/custom/components/module/voucher/resetAttach/index.jsx @@ -255,8 +255,8 @@ return <div className="attach-item" key={item.id}> <img src={item.icon} alt=""/> <div className="attach-msg"> - <div>{item.attachments_title}</div> - <div>{item.data_name ? item.data_name + ' / ' : ''}{item.attachments_url}</div> + {/* <div>{item.attachments_title}</div> */} + <div>{item.data_name ? item.data_name + ' / ' : ''}{item.attachments_title}</div> </div> <div> <DeleteOutlined onClick={() => this.deleteFile(item.id)}/> diff --git a/src/tabviews/custom/components/module/voucher/resetAttach/index.scss b/src/tabviews/custom/components/module/voucher/resetAttach/index.scss index 94b8bcf..de3273a 100644 --- a/src/tabviews/custom/components/module/voucher/resetAttach/index.scss +++ b/src/tabviews/custom/components/module/voucher/resetAttach/index.scss @@ -34,6 +34,7 @@ flex: 1; width: calc(100% - 95px); padding: 5px 0px; + line-height: 45px; div { color: #000000; overflow: hidden; diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index b286f49..d27e52b 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -445,7 +445,7 @@ let rowspans = [] let orderfields = {} - if (window.GLOB.dataFormat && !window.GLOB.mkHS) { + if (window.GLOB.dataFormat) { _format = true if (window.GLOB.memberLevel >= 30) { diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 136d9d5..99dabc0 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -168,11 +168,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, { reg: /@fullName@/ig, value: `'${fullName}'` } @@ -443,16 +438,22 @@ let _searchId = searchId - tab.components.forEach(cell => { - if (cell.type !== 'search') return - _searchId = cell.uuid - window.GLOB.SearchBox.set(cell.uuid, cell.$searches) - if (cell.$s_req) { - window.GLOB.SearchBox.set(cell.uuid + 'required', true) - } - }) + if (tab.components.findIndex(cell => cell.type === 'search') > -1) { + _searchId = tab.uuid + } tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, time, MenuName, _searchId, tab.uuid) + + if (_searchId === tab.uuid) { + tab.components.forEach(cell => { + if (cell.type !== 'search') return + window.GLOB.SearchBox.set(_searchId, cell.$searches) + if (cell.$s_req) { + window.GLOB.SearchBox.set(_searchId + 'required', true) + } + }) + } + return tab }) @@ -498,9 +499,7 @@ } // 鎼滅储鏉′欢鍒濆鍖� - if (item.type === 'search' && item.search.length === 0) { - return false - } else if (item.search) { + if (item.search) { Utils.initSearchVal(item) item.$searches = Utils.initMainSearch(item.search) diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index 260b28f..8e0d448 100644 --- a/src/tabviews/custom/popview/index.jsx +++ b/src/tabviews/custom/popview/index.jsx @@ -111,11 +111,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, { reg: /@fullName@/ig, value: `'${fullName}'` } @@ -271,16 +266,22 @@ let _searchId = searchId - tab.components.forEach(cell => { - if (cell.type !== 'search') return - _searchId = cell.uuid - window.GLOB.SearchBox.set(cell.uuid, cell.$searches) - if (cell.$s_req) { - window.GLOB.SearchBox.set(cell.uuid + 'required', true) - } - }) + if (tab.components.findIndex(cell => cell.type === 'search') > -1) { + _searchId = tab.uuid + } tab.components = this.filterComponent(tab.components, roleId, balMap, urlparam, Tab, _searchId, tab.uuid) + + if (_searchId === tab.uuid) { + tab.components.forEach(cell => { + if (cell.type !== 'search') return + window.GLOB.SearchBox.set(_searchId, cell.$searches) + if (cell.$s_req) { + window.GLOB.SearchBox.set(_searchId + 'required', true) + } + }) + } + return tab }) @@ -313,9 +314,7 @@ } // 鎼滅储鏉′欢鍒濆鍖� - if (item.type === 'search' && item.search.length === 0) { - return false - } else if (item.search) { + if (item.search) { Utils.initSearchVal(item) item.$searches = Utils.initMainSearch(item.search) diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index d23475a..b1652cf 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -303,11 +303,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, { reg: /@fullName@/ig, value: `'${fullName}'` } diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index 50fe403..8e47675 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -258,11 +258,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, { reg: /@fullName@/ig, value: `'${fullName}'` } diff --git a/src/tabviews/treepage/index.jsx b/src/tabviews/treepage/index.jsx index d21411c..05e053c 100644 --- a/src/tabviews/treepage/index.jsx +++ b/src/tabviews/treepage/index.jsx @@ -175,11 +175,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, { reg: /@fullName@/ig, value: `'${fullName}'` } diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 9dd06cc..e18f480 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -913,7 +913,7 @@ /** * @description 鑾峰彇榛樿瀛樺偍杩囩▼璇锋眰鍙傛暟 */ - getExcelDefaultParam = (arr_field, orderBy, search, pagination = false, pageIndex = 1, pageSize = 100) => { + getExcelDefaultParam = (arr_field, orderBy, search, pagination = false, pageIndex = 1, pageSize = 9999) => { const { setting, btn, selectedData, BID } = this.props let defaultSql = setting.execute || setting.default || 'true' @@ -949,8 +949,8 @@ } } + let custompage = /@pageSize@/i.test(_dataresource + customScript) let _search = Utils.joinMainSearchkey(search) - _search = _search ? 'where ' + _search : '' let param = { @@ -988,44 +988,37 @@ let district = sessionStorage.getItem('district') || '' let address = sessionStorage.getItem('address') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } + let allSearch = Utils.getAllSearchOptions(search) + let regoptions = allSearch.map(item => { + return { + reg: new RegExp('@' + item.key + '@', 'ig'), + value: `'${item.value}'` + } + }) - let regoptions = null - if (queryType === 'statistics' || param.custom_script) { - let allSearch = Utils.getAllSearchOptions(search) + regoptions.push({ + reg: new RegExp('@userName@', 'ig'), + value: userName + }, { + reg: new RegExp('@fullName@', 'ig'), + value: fullName + }, { + reg: new RegExp('@orderBy@', 'ig'), + value: orderBy || '' + }, { + reg: new RegExp('@pageSize@', 'ig'), + value: pageSize + }, { + reg: new RegExp('@pageIndex@', 'ig'), + value: pageIndex + }) - regoptions = allSearch.map(item => { - return { - reg: new RegExp('@' + item.key + '@', 'ig'), - value: `'${item.value}'` - } - }) - - regoptions.push({ - reg: new RegExp('@userName@', 'ig'), - value: userName - }, { - reg: new RegExp('@fullName@', 'ig'), - value: fullName - }, { - reg: new RegExp('@orderBy@', 'ig'), - value: orderBy || '' - }, { - reg: new RegExp('@pageSize@', 'ig'), - value: pageSize - }, { - reg: new RegExp('@pageIndex@', 'ig'), - value: pageIndex - }) - } + regoptions.forEach(item => { + _dataresource = _dataresource.replace(item.reg, item.value) + param.custom_script = param.custom_script.replace(item.reg, item.value) + }) if (queryType === 'statistics') { // 缁熻鏁版嵁婧愶紝鍐呭鏇挎崲 - regoptions.forEach(item => { - _dataresource = _dataresource.replace(item.reg, item.value) - }) _search = '' } @@ -1041,19 +1034,18 @@ let LText = '' - if (defaultSql !== 'false' && !pagination) { - LText = ` select ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows ` + if (custompage) { + LText = `/*system_query*/select ${arr_field} from ${_dataresource} ${_search} ` + } else if (defaultSql !== 'false' && !pagination) { + LText = `/*system_query*/select ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows ` } else if (defaultSql !== 'false') { - LText = ` select top ${pageSize} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows ` + LText = `/*system_query*/select top ${pageSize} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows ` } if (param.custom_script) { param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${param.custom_script} ` - regoptions.forEach(item => { - param.custom_script = param.custom_script.replace(item.reg, item.value) - }) if (LText) { LText += ` @@ -1100,6 +1092,8 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) param.DateCount = '' + param.username = userName + param.fullname = fullName if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 26625f1..63c9d84 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -979,11 +979,6 @@ let district = sessionStorage.getItem('district') || '' let address = sessionStorage.getItem('address') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - // 鍒濆鍖栧嚟璇佸強鐢ㄦ埛淇℃伅瀛楁 _sql += ` /* 鍑瘉鍙婄敤鎴蜂俊鎭垵濮嬪寲璧嬪�� */ diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index fbbaa99..28aa16d 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -1164,6 +1164,9 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) + param.username = userName + param.fullname = fullName + if (window.GLOB.probation) { param.s_debug_type = 'Y' } diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx index ea0c51a..300e98e 100644 --- a/src/tabviews/zshare/normalTable/index.jsx +++ b/src/tabviews/zshare/normalTable/index.jsx @@ -111,7 +111,7 @@ _columns.push(cell) }) } else { - if (window.GLOB.dataFormat && !window.GLOB.mkHS) { + if (window.GLOB.dataFormat) { _format = true if (window.GLOB.memberLevel >= 30) { diff --git a/src/tabviews/zshare/topSearch/advanceform/index.jsx b/src/tabviews/zshare/topSearch/advanceform/index.jsx index b8b3023..cb8a239 100644 --- a/src/tabviews/zshare/topSearch/advanceform/index.jsx +++ b/src/tabviews/zshare/topSearch/advanceform/index.jsx @@ -8,6 +8,9 @@ const MKCheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkCheckCard')) const MKSelect = asyncComponent(() => import('../mkSelect')) +const MKCheck = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkCheck')) +const MKSwitch = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkSwitch')) +const MKRadio = asyncComponent(() => import('../mkRadio')) const MKDatePicker = asyncComponent(() => import('../mkDatePicker')) class AdvanceSearch extends Component { @@ -48,6 +51,12 @@ content = (<MKDatePicker config={item}/>) } else if (item.type === 'checkcard') { content = <MKCheckCard config={item}/> + } else if (item.type === 'radio') { + content = <MKRadio config={item} onChange={(val) => this.recordChange(val, false, item)} /> + } else if (item.type === 'check') { + content = <MKCheck config={item}/> + } else if (item.type === 'switch') { + content = <MKSwitch config={item}/> } if (content) { diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index c5f3537..7dfc5b2 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -19,6 +19,7 @@ const MKCheckCard = asyncComponent(() => import('./mkCheckCard')) const MKCheck = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkCheck')) const MKSwitch = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkSwitch')) +const MKRadio = asyncComponent(() => import('./mkRadio')) const MKSelect = asyncComponent(() => import('./mkSelect')) const DateGroup = asyncComponent(() => import('./dategroup')) const MKDatePicker = asyncComponent(() => import('./mkDatePicker')) @@ -137,7 +138,7 @@ record[item.field] = item.initval } - if (['select', 'link', 'multiselect', 'checkcard'].includes(item.type)) { + if (['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(item.type)) { item.options = item.options || [] item.options = item.options.filter(op => !op.Hide) if (item.setAll === 'true' && ['select', 'link'].includes(item.type)) { @@ -415,7 +416,7 @@ resetSearch = (result) => { let _searchlist = fromJS(this.state.searchlist).toJS().map(item => { - if (['select', 'link', 'multiselect', 'checkcard'].includes(item.type) && result[item.field] && result[item.field].length > 0) { + if (['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(item.type) && result[item.field] && result[item.field].length > 0) { let options = [] let map = new Map() let all = false @@ -549,6 +550,8 @@ content = <DateGroup position={index} config={item} onChange={(val, type) => this.dateGroupChange(val, type, item)} /> } else if (item.type === 'checkcard') { content = <MKCheckCard config={item} onChange={(val) => this.cardChange(val, item)} /> + } else if (item.type === 'radio') { + content = <MKRadio config={item} onChange={(val) => this.recordChange(val, false, item)} /> } else if (item.type === 'check') { content = <MKCheck config={item} onChange={(val) => this.recordChange(val, false, item)} /> } else if (item.type === 'switch') { diff --git a/src/tabviews/zshare/topSearch/mkRadio/index.jsx b/src/tabviews/zshare/topSearch/mkRadio/index.jsx new file mode 100644 index 0000000..dd5b7e6 --- /dev/null +++ b/src/tabviews/zshare/topSearch/mkRadio/index.jsx @@ -0,0 +1,77 @@ +import React, {Component} from 'react' +import PropTypes from 'prop-types' +import { is, fromJS } from 'immutable' +import { Radio } from 'antd' + +class MKRadio extends Component { + static propTpyes = { + config: PropTypes.object, + onChange: PropTypes.func + } + + state = { + value: '', + config: null, + options: [] + } + + UNSAFE_componentWillMount () { + const { config } = this.props + let value = config.initval + + if (value) { + let option = null + option= config.oriOptions[0] + if (typeof(value) === 'string' && option && typeof(option.value) === 'number') { + value = +value + if (isNaN(value)) { + value = config.initval + } + } + } + + this.setState({ + config: fromJS(config).toJS(), + options: fromJS(config.options).toJS(), + value, + }) + } + + shouldComponentUpdate (nextProps, nextState) { + return !is(fromJS(this.state), fromJS(nextState)) + } + + UNSAFE_componentWillReceiveProps (nextProps) { + const { config } = this.state + + if (!is(fromJS(config.oriOptions), fromJS(nextProps.config.oriOptions))) { + this.setState({ + config: fromJS(nextProps.config).toJS(), + options: fromJS(nextProps.config.options).toJS() + }) + } + } + + componentWillUnmount () { + this.setState = () => { + return + } + } + + onChange = (val) => { + this.props.onChange(val) + this.setState({value: val}) + } + + render() { + const { value, options } = this.state + + return ( + <Radio.Group value={value} onChange={(e) => this.onChange(e.target.value)}> + {options.map(option => <Radio key={option.key} value={option.Value}>{option.Text}</Radio>)} + </Radio.Group> + ) + } +} + +export default MKRadio \ No newline at end of file diff --git a/src/tabviews/zshare/topSearch/mkRadio/index.scss b/src/tabviews/zshare/topSearch/mkRadio/index.scss new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/tabviews/zshare/topSearch/mkRadio/index.scss diff --git a/src/tabviews/zshare/topSearch/mkSelect/index.jsx b/src/tabviews/zshare/topSearch/mkSelect/index.jsx index a090007..be6c57b 100644 --- a/src/tabviews/zshare/topSearch/mkSelect/index.jsx +++ b/src/tabviews/zshare/topSearch/mkSelect/index.jsx @@ -84,7 +84,7 @@ const { config } = this.state if (config.type === 'multiselect') { - this.props.onChange(val.join(',')) + this.props.onChange(val.join(','), true) } else { config.linkFields && config.linkFields.forEach((m, i) => { setTimeout(() => { diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index 44a0274..7c55fb4 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -210,7 +210,7 @@ loading: type, tabviews: [] }) - Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => { if (res.status) { this.setState({ loading: false, @@ -498,7 +498,7 @@ } return new Promise(resolve => { - Api.getSystemConfig(_param).then(response => { + Api.getCloudConfig(_param).then(response => { resolve(response) }) }) @@ -552,8 +552,7 @@ } }).then(resp => { if (resp === false) return - let localParam = fromJS(param).toJS() - Api.getSystemConfig(param).then(response => { + Api.getCloudConfig(param).then(response => { if (response.status) { this.setState({ config: _config, @@ -561,15 +560,7 @@ originMenu: fromJS(_config).toJS() }) - localParam.func = 'sPC_TrdMenu_AddUpt_For_Local' - delete localParam.LongParam - delete localParam.PageParam - delete localParam.Template - delete localParam.Sort - delete localParam.EasyCode - delete localParam.open_edition - - this.submitAction(btnParam, localParam) + this.submitAction(btnParam) } else { this.setState({ menuloading: false, @@ -589,12 +580,12 @@ /** * @description 淇濆瓨鎴栦慨鏀硅彍鍗曟寜閽泦 */ - submitAction = (btnParam, localParam) => { + submitAction = (btnParam) => { const { config } = this.state new Promise(resolve => { if (btnParam.LText) { - Api.getSystemConfig(btnParam).then(result => { + Api.getCloudConfig(btnParam).then(result => { if (result.status) { this.setState({ // 淇濆瓨鎴愬姛鍚庢竻绌哄鍒跺垪琛� copyActions: [] @@ -635,7 +626,7 @@ oriActions.forEach(action => { if (!action.prebtn || !action.prebtn.uuid) return - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: action.prebtn.uuid }).then(result => { @@ -663,7 +654,7 @@ PageParam: JSON.stringify({Template: _temp}), LongParam: result.LongParam } - Api.getSystemConfig(param).then(() => {}) + Api.getCloudConfig(param).then(() => {}) } }) }) @@ -685,7 +676,6 @@ }) } this.props.reloadmenu() - Api.genericInterface(localParam) } else { this.setState({ menuloading: false, @@ -804,7 +794,7 @@ loading: true }) - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: uuid }).then(res => { @@ -964,7 +954,7 @@ func: 'sPC_MainMenu_Del', MenuID: item } - Api.getSystemConfig(_param) + Api.getCloudConfig(_param) }) this.props.handleView() } @@ -1027,7 +1017,7 @@ MenuID: menu.MenuID } - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { let _config = '' if (res.LongParam) { diff --git a/src/templates/comtableconfig/updatetable/index.jsx b/src/templates/comtableconfig/updatetable/index.jsx index eb1cc76..3ce78d5 100644 --- a/src/templates/comtableconfig/updatetable/index.jsx +++ b/src/templates/comtableconfig/updatetable/index.jsx @@ -150,7 +150,7 @@ let defers = _tbs.map((item, i) => { return new Promise((resolve) => { setTimeout(() => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.linkTab }).then(res => { @@ -232,7 +232,7 @@ let defers = popActions.map((item, i) => { return new Promise((resolve) => { setTimeout(() => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.linkTab }).then(res => { @@ -412,7 +412,7 @@ let defers = formActions.map((item, i) => { return new Promise((resolve) => { setTimeout(() => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.origin }).then(res => { @@ -749,7 +749,7 @@ let save = false new Promise(resolve => { - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { resolve(res) }) }).then(res => { // 鍒犻櫎鍘熻彍鍗� @@ -760,7 +760,7 @@ if (this.delButtons.length === 0) return res - return Api.getSystemConfig({ + return Api.getCloudConfig({ func: 'sPC_MainMenu_Del', up_type: 'Y', MenuID: this.delButtons.join(',') diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index 631db62..0ce29b4 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -508,7 +508,7 @@ }) } - Api.getSystemConfig(param).then(response => { + Api.getCloudConfig(param).then(response => { if (response.status) { this.setState({ openEdition: response.open_edition || '', @@ -655,7 +655,7 @@ MenuID: editAction.uuid } - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { let _config = '' if (res.LongParam) { diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx index b871c62..8f66baa 100644 --- a/src/templates/sharecomponent/actioncomponent/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/index.jsx @@ -5,14 +5,11 @@ import moment from 'moment' import Api from '@/api' -import Utils, { FuncUtils } from '@/utils/utils.js' +import Utils from '@/utils/utils.js' import { getActionForm } from '@/templates/zshare/formconfig' import asyncSpinComponent from '@/utils/asyncSpinComponent' import ActionForm from './actionform' -import CreateFunc from '@/templates/zshare/createfunc' -import CreateInterface from '@/templates/zshare/createinterface' -import { updateForm } from '@/utils/utils-update.js' import DragElement from './dragaction' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -101,7 +98,7 @@ param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { let temps = res.data.map(temp => { return { @@ -219,8 +216,7 @@ * 4銆佷笅鎷夎彍鍗曟暟鎹簮璇硶楠岃瘉 */ handleSubmit = () => { - const { config, menu } = this.props - const { card } = this.state + const { config } = this.props let _actionlist = fromJS(this.state.actionlist).toJS() this.actionFormRef.handleConfirm().then(btn => { @@ -248,373 +244,34 @@ return } - this.setState({ - copying: true - }) - let copyActionId = '' // 鎸夐挳涓哄鍒舵椂锛岃褰曞綋鍓嶆寜閽殑Id锛岃彍鍗曞彇娑堜繚瀛樻椂锛屽垹闄ゅ鍒舵寜閽厤缃俊鎭� - /** - * @description 鎸夐挳淇濆瓨鏍¢獙 - * 1銆佹鏌ユ寜閽槸鍚︿负琛ㄥ崟鎴栬〃鍗曟爣绛鹃〉锛屽鍓嶅悗涓�鑷达紝鍒欏鍒跺叾鍐呭 - * 2銆佹鏌ユ寜閽槸鍚︿负鏍囩椤碉紝濡傚墠鍚庝竴鑷达紝鍒欏鍒舵爣绛鹃〉 - */ - new Promise(resolve => { - if ( - !card.originCard || - (btn.OpenType !== card.originCard.OpenType) || - (btn.OpenType === 'tab' && btn.tabTemplate !== 'FormTab') || - (btn.OpenType === 'funcbutton' && btn.execMode !== 'pop') - ) { // 鎸夐挳涓嶆槸澶嶅埗锛屾垨鎸夐挳鍓嶅悗绫诲瀷涓嶄竴鑷存椂锛岀洿鎺ヤ繚瀛� - resolve('save') - } else if (btn.OpenType === 'pop' || btn.OpenType === 'tab' || btn.execMode === 'pop') { - resolve('subconf') - } else if (btn.OpenType === 'popview') { - resolve('subtab') - } else { - resolve('save') - } - }).then(result => { // 鏌ヨ鍘熸寜閽厤缃俊鎭� - if (result === 'save' || result === 'subtab') return result + // 鍒ゆ柇鏄惁瀛樺湪鎿嶄綔鍒� + let _hasGridbtn = _actionlist.filter(act => act.position === 'grid').length > 0 + let _gridBtn = config.gridBtn ? fromJS(config.gridBtn).toJS() : null - return Api.getSystemConfig({ - func: 'sPC_Get_LongParam', - MenuID: card.originCard.uuid, - appkey: card.originCard.appkey || '' - }) - }).then(result => { // 澶嶅埗鎸夐挳閰嶇疆淇℃伅锛屼繚瀛樿嚦鏂版坊鍔犳寜閽� - if (result === 'save' || result === 'subtab') return result - - if (result.status && result.LongParam) { - let _LongParam = '' - - // 瑙f瀽閰嶇疆 - if (result.LongParam) { - try { - _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) - } catch (e) { - console.warn('Parse Failure') - _LongParam = '' - } - } - - if (!_LongParam) return 'save' - - let _temp = '' // 閰嶇疆淇℃伅绫诲瀷 - - // 淇敼妯℃�佹鏍囬鍚嶇О - if ((btn.OpenType === 'pop' || btn.execMode === 'pop') && _LongParam.type === 'Modal') { - try { - _LongParam.setting.title = btn.label - _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_LongParam))) - _temp = 'Modal' - } catch (e) { - console.warn('Stringify Failure') - _temp = '' - } - } else if (btn.OpenType === 'tab' && _LongParam.type === 'FormTab') { - try { - _LongParam.action = _LongParam.action.map(_btn => { - _btn.uuid = Utils.getuuid() - - return _btn - }) - _LongParam.tabgroups.forEach(_groupId => { - _LongParam[_groupId] = _LongParam[_groupId].map(_tab => { - _tab.uuid = Utils.getuuid() - - return _tab - }) - }) - _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_LongParam))) - _temp = 'FormTab' - } catch (e) { - console.warn('Stringify Failure') - _temp = '' - } - } - - if (!_temp) return 'save' - - let param = { - func: 'sPC_ButtonParam_AddUpt', - ParentID: menu.MenuID, - MenuID: btn.uuid, - MenuNo: menu.MenuNo, - Template: _temp, - MenuName: btn.label, - PageParam: JSON.stringify({Template: _temp}), - LongParam: _LongParam - } - - return Api.getSystemConfig(param) - } else { - if (!result.status) { - notification.warning({ - top: 92, - message: result.message, - duration: 5 - }) - } - return 'save' - } - }).then(result => { - if (result === 'save' || result === 'subtab') return result - - if (!result.status) { - notification.warning({ - top: 92, - message: result.message, - duration: 5 - }) - } else { - copyActionId = btn.uuid - } - - return 'save' - }).then(result => { // 鏌ヨ鍘熸寜閽叧鑱旀爣绛句俊鎭� - if (result === 'save') return result - - return Api.getSystemConfig({ - func: 'sPC_Get_LongParam', - MenuID: card.originCard.linkTab, - appkey: card.originCard.appkey || '' - }) - }).then(result => { // 鏍囩澶嶅埗 - if (result === 'save') return result - - let _LongParam = '' // 鏍囩閰嶇疆淇℃伅 - - if (!result.status) { - notification.warning({ - top: 92, - message: result.message, - duration: 5 - }) - } else if (result.LongParam) { - // 瑙f瀽鏍囩閰嶇疆 - try { - _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) - } catch (e) { - console.warn('Parse Failure') - _LongParam = '' - } - } - - if (!_LongParam) { - return 'save' - } else { - copyActionId = btn.linkTab - - return new Promise(resolve => { - this.copytab(btn, _LongParam, resolve) - }) - } - }).then(() => { - // 鍒ゆ柇鏄惁瀛樺湪鎿嶄綔鍒� - let _hasGridbtn = _actionlist.filter(act => act.position === 'grid').length > 0 - let _gridBtn = config.gridBtn ? fromJS(config.gridBtn).toJS() : null - - if (_gridBtn) { - _gridBtn.display = _hasGridbtn - } else { - _gridBtn = { - display: _hasGridbtn, - Align: 'center', - IsSort: 'false', - uuid: Utils.getuuid(), - label: '鎿嶄綔', - type: 'action', - style: 'button', - show: 'horizontal', - Width: 120 - } - } - - this.setState({ - actionlist: _actionlist, - copying: false, - visible: false - }, () => { - this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn}, copyActionId) - }) - }) - }) - } - - /** - * @description 鏍囩澶嶅埗 - * 1銆佷繚瀛樻寜閽叧鑱旂殑鏂版爣绛� - * 2銆佷繚瀛樻爣绛炬寜閽俊鎭� - * 3銆佷繚瀛樻柊鏍囩涓寜閽殑瀛愰厤缃俊鎭� - */ - copytab = (btn, _tab, _resolve) => { - let _LongParam = '' - - _tab.uuid = btn.linkTab - _tab.tabName = _tab.tabName + moment().format('YYYY-MM-DD HH:mm:ss') - _tab.tabNo = _tab.tabNo + moment().format('YYYY-MM-DD HH:mm:ss') - - let param = { - func: 'sPC_Tab_AddUpt', - MenuID: _tab.uuid, - MenuNo: _tab.tabNo, - Template: _tab.Template, - MenuName: _tab.tabName, - Remark: _tab.Remark, - PageParam: JSON.stringify({Template: _tab.Template}), - Sort: 0 - } - - let _oriActions = [] - - let btnParam = { - func: 'sPC_Button_AddUpt', - Type: 40, - ParentID: _tab.uuid, - MenuNo: _tab.tabNo, - Template: _tab.Template, - PageParam: '', - LongParam: '', - LText: '' - } - - try { - let _linkchange = {} - btnParam.LText = [] - - _tab.action = _tab.action.map((item, index) => { - let uuid = Utils.getuuid() - - if (item.OpenType === 'pop' || item.execMode === 'pop') { - _oriActions.push({ - prebtn: JSON.parse(JSON.stringify(item)), - curuuid: uuid, - Template: 'Modal' - }) - } else if (item.OpenType === 'popview') { - _linkchange[item.linkTab] = Utils.getuuid() - - item.linkTab = _linkchange[item.linkTab] - } - - item.uuid = uuid - - btnParam.LText.push(`select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`) - - return item - }) - - if (_tab.funcs && _tab.funcs.length > 0) { - _tab.funcs = _tab.funcs.map(item => { - if (item.type === 'tab') { - item.linkTab = _linkchange[item.linkTab] - item.menuNo = '' - item.subfuncs = [] - } - - return item - }) - } - - btnParam.LText = btnParam.LText.join(' union all ') - btnParam.LText = Utils.formatOptions(btnParam.LText) - btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp) - - _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_tab))) - } catch (e) { - console.warn('Stringify Failure') - _LongParam = '' - _resolve('save') - return - } - - param.LongParam = _LongParam - - new Promise(resolve => { - Api.getSystemConfig(param).then(response => { - if (response.status) { - resolve(true) - } else { - notification.warning({ - top: 92, - message: response.message, - duration: 5 - }) - resolve(false) - } - }) - }).then(result => { - if (!result) return result - if (!btnParam.LText) return true - - return Api.getSystemConfig(btnParam) - }).then(result => { - if (result === false || result === true) return result - - if (result.status) { - return true + if (_gridBtn) { + _gridBtn.display = _hasGridbtn } else { - notification.warning({ - top: 92, - message: result.message, - duration: 5 - }) - return false + _gridBtn = { + display: _hasGridbtn, + Align: 'center', + IsSort: 'false', + uuid: Utils.getuuid(), + label: '鎿嶄綔', + type: 'action', + style: 'button', + show: 'horizontal', + Width: 120 + } } - }).then(result => { - if (!result) return result - if (_oriActions.length === 0) return true - let deffers = _oriActions.map(item => { - return new Promise(resolve => { - Api.getSystemConfig({ - func: 'sPC_Get_LongParam', - MenuID: item.prebtn.uuid - }).then(response => { - if (!response.status || !response.LongParam) { - resolve(response) - } else { - let _param = { - func: 'sPC_ButtonParam_AddUpt', - ParentID: _tab.uuid, - MenuID: item.curuuid, - MenuNo: _tab.tabNo, - Template: item.Template, - MenuName: item.prebtn.label, - PageParam: JSON.stringify({Template: item.Template}), - LongParam: response.LongParam - } - Api.getSystemConfig(_param).then(resp => { - resolve(resp) - }) - } - }) - }) + this.setState({ + actionlist: _actionlist, + visible: false + }, () => { + this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn}, copyActionId) }) - - return Promise.all(deffers) - }).then(result => { - let error = '' - - if (typeof(result) === 'object') { - result.forEach(resul => { - if (!resul.status && !error) { - error = resul - } - }) - } - - if (error) { - notification.warning({ - top: 92, - message: error.message, - duration: 5 - }) - } - - _resolve('save') }) } @@ -705,126 +362,6 @@ } /** - * @description 鍒涘缓鎸夐挳瀛樺偍杩囩▼ - */ - creatFunc = () => { - const { menu } = this.props - let _config = fromJS(this.props.config).toJS() - - this.actionFormRef.handleConfirm().then(res => { - let btn = res // 鎸夐挳淇℃伅 - let newLText = '' // 鍒涘缓瀛樺偍杩囩▼sql - let DelText = '' // 鍒犻櫎瀛樺偍杩囩▼sql - - // 鍒涘缓瀛樺偍杩囩▼锛屽繀椤诲~鍐欏唴閮ㄥ嚱鏁板悕 - if (btn.intertype !== 'inner') { - notification.warning({ - top: 92, - message: '浣跨敤鍐呴儴鍑芥暟鏃讹紝鎵嶅彲浠ュ垱寤哄瓨鍌ㄨ繃绋嬶紒', - duration: 5 - }) - return - } - - new Promise(resolve => { - // 寮圭獥锛堣〃鍗曪級绫绘寜閽紝鍏堣幏鍙栨寜閽厤缃俊鎭紝濡傛灉灏氭湭閰嶇疆鎸夐挳鍒欎細鎶ラ敊骞剁粓姝€�� - // 鑾峰彇淇℃伅鍚庣敓鎴愬垹闄ゅ拰鍒涘缓瀛樺偍杩囩▼鐨勮鍙� - if (btn.OpenType === 'pop') { - Api.getSystemConfig({ - func: 'sPC_Get_LongParam', - MenuID: btn.uuid - }).then(res => { - let _LongParam = '' - if (res.status && res.LongParam) { - try { - _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) - } catch (e) { - console.warn('Parse Failure') - _LongParam = '' - } - } - - if (_LongParam) { - _LongParam = updateForm(_LongParam) - - let _param = { - funcName: btn.innerFunc, - name: _config.setting.tableName || '', - fields: _LongParam.fields, - menuNo: menu.MenuNo - } - newLText = Utils.formatOptions(FuncUtils.getfunc(_param, btn, menu, _config)) - DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc)) - resolve(true) - } else { - notification.warning({ - top: 92, - message: '寮圭獥锛堣〃鍗曪級鎸夐挳锛岃鍏堥厤缃〃鍗曚俊鎭紒', - duration: 5 - }) - resolve(false) - } - }) - } else if (btn.OpenType === 'excelIn') { - if (btn.verify && btn.verify.sheet && btn.verify.columns && btn.verify.columns.length > 0) { - let _param = { - funcName: btn.innerFunc, - menuNo: menu.MenuNo - } - newLText = Utils.formatOptions(FuncUtils.getexcelInfunc(_param, btn, menu)) - DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc)) - resolve(true) - } else { - notification.warning({ - top: 92, - message: '璇峰畬鍠勫鍏xcel楠岃瘉淇℃伅锛�', - duration: 5 - }) - resolve(false) - } - } else if (btn.OpenType === 'excelOut') { - newLText = Utils.formatOptions(FuncUtils.getTableFunc(btn.innerFunc, menu, _config)) // 鍒涘缓瀛樺偍杩囩▼sql - DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc)) - - resolve(true) - } else { - let _param = { - funcName: btn.innerFunc, - name: _config.setting.tableName || '', - fields: '', - menuNo: menu.MenuNo - } - newLText = Utils.formatOptions(FuncUtils.getfunc(_param, btn, menu, _config)) - DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc)) - resolve(true) - } - }).then(res => { - if (!res) return - - this.refs.btnCreatFunc.exec(btn.innerFunc, newLText, DelText) - }) - }) - } - - /** - * @description 鍒涘缓鎸夐挳鎺ュ彛锛堝啓鍏ワ級 - */ - btnCreatInterface = () => { - const { config, type, menu } = this.props - - this.actionFormRef.handleConfirm().then(result => { - let _menu = { - type: type, - MenuID: menu.MenuID, - menuName: menu.MenuName, - menuNo: menu.MenuNo - } - - this.refs.btnCreatInterface.triggerInInterface(result, config, _menu) - }) - } - - /** * @description 鎸夐挳鍙屽嚮瑙﹀彂瀛愰厤缃� */ btnDoubleClick = (el) => { @@ -893,7 +430,7 @@ render() { const { config } = this.props - const { actionlist, visible, card, copying, profVisible, record } = this.state + const { actionlist, visible, card, copying, profVisible } = this.state return ( <div className="model-table-action-list" style={config.charts && config.charts.length > 1 ? {paddingTop: 25} : null}> @@ -915,8 +452,6 @@ maskClosable={false} onCancel={this.editModalCancel} footer={[ - record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null, - record && record.intertype === 'inner' ? <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null, <Button key="cancel" onClick={this.editModalCancel}>鍙栨秷</Button>, <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>纭畾</Button> ]} diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index 32de2fd..2ec586a 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -325,7 +325,7 @@ _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(_sParam).then(res => { + Api.getCloudConfig(_sParam).then(res => { if (res.status) { let _scripts = res.data.map(item => { return { diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx index 2c8eaf4..436dd7e 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx @@ -61,7 +61,7 @@ _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(_sParam).then(res => { + Api.getCloudConfig(_sParam).then(res => { if (res.status) { let _scripts = res.data.map(item => { return { diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx index bd4d39b..9a443b9 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx @@ -60,8 +60,7 @@ let _regoptions = regoptions.map(item => { return { reg: new RegExp('@' + item.key + '@', 'ig'), - value: `'0'`, - type: item.type || '' + value: `'0'` } }) @@ -82,22 +81,13 @@ value: 1 }) - if (verify.queryType === 'statistics' && _dataresource) { - _regoptions.forEach(item => { - _dataresource = _dataresource.replace(item.reg, item.value) - }) - _search = '' - } else if (_dataresource) { - _regoptions.forEach(item => { - if (item.type !== 'url') return - _dataresource = _dataresource.replace(item.reg, item.value) - }) - } + _regoptions.forEach(item => { + _dataresource = _dataresource.replace(item.reg, item.value) + _customScript = _customScript.replace(item.reg, item.value) + }) - if (_customScript) { - _regoptions.forEach(item => { - _customScript = _customScript.replace(item.reg, item.value) - }) + if (verify.queryType === 'statistics' && _dataresource) { + _search = '' } // 鏁版嵁婧愬鐞�, 瀛樺湪鏄剧ず鍒楁椂 diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx index 90ff096..2cb282d 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx @@ -297,7 +297,7 @@ param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { let temps = res.data.map(temp => { return { diff --git a/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx b/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx index f65bb50..b5bd01f 100644 --- a/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx +++ b/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx @@ -55,6 +55,8 @@ _defaultValue = [moment().startOf('week'), moment().endOf('week')] } else if (card.initval === 'month') { _defaultValue = [moment().startOf('month'), moment().endOf('month')] + } else if (card.initval === 'lastMonth') { + _defaultValue = [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')] } else if (card.initval) { try { let _initval = JSON.parse(card.initval) diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index 41a27a1..3d14095 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -84,6 +84,7 @@ {value: '[3, 0]', label: '杩戜笁澶�'}, {value: '[7, 0]', label: '杩戜竷澶�'}, {value: '[30, 0]', label: '杩�30澶�'}, + {value: '[90, 0]', label: '杩�90澶�'}, {value: '[7, -7]', label: '鍓嶅悗涓冨ぉ'}, {value: '[30, -30]', label: '鍓嶅悗30澶�'}, {value: '[90, -90]', label: '鍓嶅悗90澶�'}, @@ -98,6 +99,7 @@ const searchTypeOptions = { text: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'inputType', 'advanced', 'query', 'labelwidth'], select: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown', 'query', 'labelwidth'], + radio: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'query', 'labelwidth'], multiselect: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query', 'labelwidth'], link: ['label', 'field', 'resourceType', 'initval', 'type', 'linkField', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown', 'query', 'labelwidth'], date: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query', 'precision', 'labelwidth'], @@ -179,7 +181,7 @@ let reRequired = {} let reLabel = {} - if (['multiselect', 'select', 'link'].includes(type)) { + if (['multiselect', 'select', 'link', 'radio'].includes(type)) { reRequired.linkField = true if (this.record.resourceType === '0') { // 鑷畾涔夎祫婧� shows.push('options') @@ -318,7 +320,7 @@ uuid: key }] } - } else if (['multiselect', 'select', 'link'].includes(value)) { + } else if (['multiselect', 'select', 'link', 'radio'].includes(value)) { if (!this.record.options[0].Text && this.record.fields.length > 0) { let field = this.record.fields[0].field @@ -618,7 +620,7 @@ if (!err) { values.uuid = this.props.card.uuid // 涓嬫媺鑿滃崟鎴栬仈鍔ㄨ彍鍗� - if (['multiselect', 'select', 'link'].includes(values.type)) { + if (['multiselect', 'select', 'link', 'radio'].includes(values.type)) { if (values.resourceType === '0') { values.options = values.options || [] values.dataSource = '' diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx index 29f51db..a86f41a 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx @@ -2,9 +2,7 @@ import PropTypes from 'prop-types' import { Form, Row, Col, Input, Radio, Tooltip, notification, Select, InputNumber } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' -import moment from 'moment' -import Api from '@/api' import { formRule } from '@/utils/option.js' import Utils from '@/utils/utils.js' import asyncComponent from '@/utils/asyncComponent' @@ -72,7 +70,6 @@ } handleConfirm = () => { - const { setting } = this.props // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� return new Promise((resolve, reject) => { this.props.form.validateFieldsAndScroll((err, values) => { @@ -140,24 +137,6 @@ reject() return } - } - - // 鏁版嵁婧愪繚瀛� - if ( - values.interType === 'system' && values.default !== 'false' && - /[^\s]+\s+[^\s]+/ig.test(values.dataresource) && setting.dataresource !== values.dataresource - ) { - let param = { - func: 's_DataSrc_Save', - LText: values.dataresource, - MenuID: this.props.menu.MenuID - } - - param.LText = Utils.formatOptions(param.LText) - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) - - Api.genericInterface(param) } resolve(values) diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx index fbfb050..e34235a 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx @@ -173,7 +173,7 @@ _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(_sParam).then(res => { + Api.getCloudConfig(_sParam).then(res => { if (res.status) { let _scripts = res.data.map(item => { return { diff --git a/src/templates/sharecomponent/tablecomponent/index.jsx b/src/templates/sharecomponent/tablecomponent/index.jsx index 15954e3..76ca891 100644 --- a/src/templates/sharecomponent/tablecomponent/index.jsx +++ b/src/templates/sharecomponent/tablecomponent/index.jsx @@ -194,7 +194,7 @@ let _config = {...config, tables: _tables} - Api.getSystemConfig({func: 'sPC_Get_FieldName', TBName: value}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_FieldName', TBName: value}).then(res => { if (res.status) { let tabmsg = { tableName: _table.TbName, diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx index 0a21e7d..6ac9645 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx @@ -2,9 +2,7 @@ import PropTypes from 'prop-types' import { Form, Row, Col, Input, Radio, Tooltip, notification, InputNumber } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' -import moment from 'moment' -import Api from '@/api' import { formRule } from '@/utils/option.js' import Utils from '@/utils/utils.js' import CodeMirror from '@/templates/zshare/codemirror' @@ -61,7 +59,6 @@ } handleConfirm = () => { - const { setting } = this.props // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� return new Promise((resolve, reject) => { this.props.form.validateFieldsAndScroll((err, values) => { @@ -129,24 +126,6 @@ reject() return } - } - - // 鏁版嵁婧愪繚瀛� - if ( - values.interType === 'system' && values.default !== 'false' && - /[^\s]+\s+[^\s]+/ig.test(values.dataresource) && setting.dataresource !== values.dataresource - ) { - let param = { - func: 's_DataSrc_Save', - LText: values.dataresource, - MenuID: this.props.menu.MenuID - } - - param.LText = Utils.formatOptions(param.LText) - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) - - Api.genericInterface(param) } resolve(values) diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx index 19bfb12..3459581 100644 --- a/src/templates/subtableconfig/index.jsx +++ b/src/templates/subtableconfig/index.jsx @@ -185,7 +185,7 @@ loading: type, tabviews: [] }) - Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => { if (res.status) { let _tabviews = [] res.UserTemp.forEach(temp => { @@ -273,7 +273,7 @@ func: 'sPC_MainMenu_Del', MenuID: item } - Api.getSystemConfig(_param) + Api.getCloudConfig(_param) }) this.props.handleView(param) @@ -438,7 +438,7 @@ } return new Promise(resolve => { - Api.getSystemConfig(_param).then(response => { + Api.getCloudConfig(_param).then(response => { resolve(response) }) }) @@ -493,7 +493,7 @@ }).then(resp => { if (resp === false) return - Api.getSystemConfig(param).then(response => { + Api.getCloudConfig(param).then(response => { if (response.status) { this.setState({ openEdition: response.open_edition || '', @@ -551,7 +551,7 @@ if (oriActions.length === 0) return oriActions.forEach(action => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: action.prebtn ? action.prebtn.uuid : '' }).then(result => { @@ -578,7 +578,7 @@ PageParam: JSON.stringify({Template: _LongParam.type}), LongParam: result.LongParam } - Api.getSystemConfig(param).then(() => {}) + Api.getCloudConfig(param).then(() => {}) } } }) @@ -675,7 +675,7 @@ loading: true }) - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: btn.OpenType === 'popview' ? btn.linkTab : btn.uuid }).then(res => { @@ -863,7 +863,7 @@ MenuID: config.uuid } - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { let _config = '' if (res.LongParam) { diff --git a/src/templates/treepageconfig/index.jsx b/src/templates/treepageconfig/index.jsx index 2847f1f..318adf1 100644 --- a/src/templates/treepageconfig/index.jsx +++ b/src/templates/treepageconfig/index.jsx @@ -177,7 +177,7 @@ loading: type, tabviews: [] }) - Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => { if (res.status) { this.setState({ loading: false, @@ -367,7 +367,7 @@ } return new Promise(resolve => { - Api.getSystemConfig(_param).then(response => { + Api.getCloudConfig(_param).then(response => { resolve(response) }) }) @@ -403,16 +403,8 @@ } }).then(resp => { if (resp === false) return - let localParam = fromJS(param).toJS() - localParam.func = 'sPC_TrdMenu_AddUpt_For_Local' - delete localParam.LongParam - delete localParam.PageParam - delete localParam.Template - delete localParam.Sort - delete localParam.EasyCode - delete localParam.open_edition - Api.getSystemConfig(param).then(response => { + Api.getCloudConfig(param).then(response => { if (response.status) { this.setState({ config: _config, @@ -429,7 +421,6 @@ }) this.props.reloadmenu() - Api.genericInterface(localParam) if (this.state.closeVisible) { this.props.handleView() @@ -543,7 +534,7 @@ loading: true }) - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.linkTab }).then(res => { diff --git a/src/templates/treepageconfig/updatetable/index.jsx b/src/templates/treepageconfig/updatetable/index.jsx index 5dc8c61..231a7c6 100644 --- a/src/templates/treepageconfig/updatetable/index.jsx +++ b/src/templates/treepageconfig/updatetable/index.jsx @@ -210,7 +210,7 @@ let defers = _tbs.map((item, i) => { return new Promise((resolve) => { setTimeout(() => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.linkTab }).then(res => { @@ -291,7 +291,7 @@ let defers = popActions.map((item, i) => { return new Promise((resolve) => { setTimeout(() => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.linkTab }).then(res => { @@ -471,7 +471,7 @@ let defers = formActions.map((item, i) => { return new Promise((resolve) => { setTimeout(() => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.origin }).then(res => { @@ -793,7 +793,7 @@ let save = false new Promise(resolve => { - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { resolve(res) }) }).then(res => { // 鍒犻櫎鍘熻彍鍗� @@ -804,7 +804,7 @@ if (this.delButtons.length === 0) return res - return Api.getSystemConfig({ + return Api.getCloudConfig({ func: 'sPC_MainMenu_Del', up_type: 'Y', MenuID: this.delButtons.join(',') diff --git a/src/templates/zshare/createfunc/index.jsx b/src/templates/zshare/createfunc/index.jsx index daa034f..6fca05b 100644 --- a/src/templates/zshare/createfunc/index.jsx +++ b/src/templates/zshare/createfunc/index.jsx @@ -31,7 +31,7 @@ new Promise(resolve => { // 鑾峰彇浜戠瀛樺偍杩囩▼淇℃伅 - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_TVP', TVPName: innerFunc }).then(result => { @@ -83,7 +83,7 @@ return 'drop' } else if (!localfunc || (cloudText === localfunc)) { // 鏈湴瀛樺偍杩囩▼涓嶅瓨鍦紝鎴栦簯绔拰鏈湴瀛樺偍杩囩▼涓�鑷存椂锛屽皢鏂扮殑瀛樺偍杩囩▼鏇存柊鑷充簯绔� - return Api.getSystemConfig({ + return Api.getCloudConfig({ func: 'sPC_TVP_InUp', TVPName: innerFunc, TVPText: newLText, @@ -91,14 +91,14 @@ }) } else { return new Promise(resolve => { - Api.getSystemConfig({ // 娣诲姞鐜版湁鐨勬湰鍦板瓨鍌ㄨ繃绋嬭嚦浜戠 + Api.getCloudConfig({ // 娣诲姞鐜版湁鐨勬湰鍦板瓨鍌ㄨ繃绋嬭嚦浜戠 func: 'sPC_TVP_InUp', TVPName: innerFunc, TVPText: localfunc, TypeName: 'P' }).then(result => { if (result.status) { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_TVP_InUp', // 娣诲姞鏈�鏂扮殑瀛樺偍杩囩▼鑷充簯绔� TVPName: innerFunc, TVPText: newLText, diff --git a/src/templates/zshare/createinterface/index.jsx b/src/templates/zshare/createinterface/index.jsx index ab76039..6dd56df 100644 --- a/src/templates/zshare/createinterface/index.jsx +++ b/src/templates/zshare/createinterface/index.jsx @@ -406,7 +406,7 @@ new Promise(resolve => { if (btn.OpenType === 'pop') { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: btn.uuid }).then(result => { diff --git a/src/templates/zshare/customscript/index.jsx b/src/templates/zshare/customscript/index.jsx index 2cc6298..662e012 100644 --- a/src/templates/zshare/customscript/index.jsx +++ b/src/templates/zshare/customscript/index.jsx @@ -142,7 +142,7 @@ _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(_sParam).then(res => { + Api.getCloudConfig(_sParam).then(res => { if (res.status) { let _scripts = res.data.map(item => { let _item = { diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 5460629..ee46093 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -359,6 +359,9 @@ value: 'switch', text: '寮�鍏�' }, { + value: 'radio', + text: '鍗曢�夋' + }, { value: 'check', text: '鍕鹃�夋' }] @@ -367,7 +370,7 @@ if (card.focus) { if (['text', 'multiselect'].includes(card.type)) { card.match = 'like' - } else if (['select', 'link', 'checkcard'].includes(card.type)) { + } else if (['select', 'link', 'checkcard', 'radio'].includes(card.type)) { card.match = '=' } else if (card.type === 'date') { card.match = '>=' diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index ade0e92..f138596 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -632,7 +632,7 @@ _fields = card.modal.fields || [] resolve(_fields) } else if (card.OpenType === 'pop') { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: card.uuid }).then(res => { diff --git a/src/utils/option.js b/src/utils/option.js index f001d84..f876513 100644 --- a/src/utils/option.js +++ b/src/utils/option.js @@ -146,6 +146,7 @@ {value: '[3, 0]', text: '杩戜笁澶�'}, {value: '[7, 0]', text: '杩戜竷澶�'}, {value: '[30, 0]', text: '杩�30澶�'}, + {value: '[90, 0]', text: '杩�90澶�'}, {value: '[7, -7]', text: '鍓嶅悗涓冨ぉ'}, {value: '[30, -30]', text: '鍓嶅悗30澶�'}, {value: '[90, -90]', text: '鍓嶅悗90澶�'}, @@ -155,6 +156,7 @@ {value: '[-2, -2]', text: '鍚庡ぉ'}, {value: 'week', text: '鏈懆'}, {value: 'month', text: '鏈湀'}, + {value: 'lastMonth', text: '涓婃湀'}, ], datetime: [ {value: '', text: '绌�'}, diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index 6550fe8..3a20c12 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -125,11 +125,6 @@ let district = sessionStorage.getItem('district') || '' let address = sessionStorage.getItem('address') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - let _dataresource = setting.dataresource let _customScript = '' @@ -286,6 +281,9 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) + param.username = userName + param.fullname = fullName + if (window.GLOB.probation) { param.s_debug_type = 'Y' } @@ -315,10 +313,6 @@ arr_field: statFields.map(col => col.field).join(','), default_sql: setting.execute ? 'true' : 'false' } - - // if (setting.transaction === 'true') { - // param.func = 'sPC_Get_TableData_try' - // } let _dataresource = setting.dataresource let _customScript = '' @@ -333,11 +327,6 @@ let city = sessionStorage.getItem('city') || '' let district = sessionStorage.getItem('district') || '' let address = sessionStorage.getItem('address') || '' - - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } if (setting.customScript) { _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) @@ -433,6 +422,9 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) + param.username = userName + param.fullname = fullName + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -504,11 +496,7 @@ let city = sessionStorage.getItem('city') || '' let district = sessionStorage.getItem('district') || '' let address = sessionStorage.getItem('address') || '' - - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } + _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' ${_customScript} @@ -584,7 +572,9 @@ func: 'sPC_Get_structured_data', LText: _LText.join(' union all '), LText_field: LText_field.join(' union all '), - BID: BID + BID: BID, + username: sessionStorage.getItem('User_Name') || '', + fullName: sessionStorage.getItem('Full_Name') || '' } if (config.MenuName) { diff --git a/src/utils/utils.js b/src/utils/utils.js index 967ae7e..07320a8 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -335,6 +335,8 @@ item.initval = [moment().startOf('week').format(format), moment().endOf('week').format(format)].join(',') } else if (item.initval === 'month') { item.initval = [moment().startOf('month').format(format), moment().endOf('month').format(format)].join(',') + } else if (item.initval === 'lastMonth') { + item.initval = [moment().subtract(1, 'months').startOf('month').format(format), moment().subtract(1, 'months').endOf('month').format(format)].join(',') } else if (item.initval) { try { let _initval = JSON.parse(item.initval) @@ -896,11 +898,6 @@ let address = sessionStorage.getItem('address') || '' let _sheet = item.sheet - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - if (window.GLOB.externalDatabase !== null) { _sheet = _sheet.replace(/@db@/ig, window.GLOB.externalDatabase) } @@ -1205,11 +1202,6 @@ let _sheet = btn.sheet let BID = data[0].$$BID || '' - - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } if (window.GLOB.externalDatabase !== null) { _sheet = _sheet.replace(/@db@/ig, window.GLOB.externalDatabase) @@ -1597,11 +1589,6 @@ let city = sessionStorage.getItem('city') || '' let district = sessionStorage.getItem('district') || '' let address = sessionStorage.getItem('address') || '' - - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } // 鍒濆鍖栧嚟璇佸強鐢ㄦ埛淇℃伅瀛楁 _sql += ` diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx index 2433125..75206ec 100644 --- a/src/views/appmanage/index.jsx +++ b/src/views/appmanage/index.jsx @@ -23,8 +23,6 @@ const ScriptForm = asyncComponent(() => import('./scriptform')) const SubMutilForm = asyncComponent(() => import('./submutilform')) -sessionStorage.setItem('isEditState', 'true') - const skinStyle = { bg_black_style_blue: {name: '钃濊壊', color: '#1890ff'}, bg_black_style_red: {name: '绾㈣壊', color: '#f5222d'}, @@ -120,7 +118,6 @@ } if (!sessionStorage.getItem('UserID')) { - sessionStorage.removeItem('isEditState') this.props.history.replace('/login') return } @@ -585,7 +582,7 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { let msgs = [] if (!res.status) { notification.warning({ diff --git a/src/views/basedesign/index.jsx b/src/views/basedesign/index.jsx index 5a25185..da66e53 100644 --- a/src/views/basedesign/index.jsx +++ b/src/views/basedesign/index.jsx @@ -19,7 +19,6 @@ const UpdateFormTab = asyncLoadComponent(() => import('./updateFormTab')) document.body.className = '' -sessionStorage.setItem('isEditState', 'true') class BaseDesign extends Component { state = { @@ -48,7 +47,6 @@ } if (!sessionStorage.getItem('UserID')) { - sessionStorage.removeItem('isEditState') this.props.history.replace('/login') return } @@ -94,7 +92,7 @@ loading: true }) - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { editMenu.open_edition = res.open_edition || '' editMenu.LongParam = '' @@ -114,7 +112,7 @@ MenuID: editMenu.PageParam.copyMenuId } - Api.getSystemConfig(_param).then(res => { + Api.getCloudConfig(_param).then(res => { if (res.status) { if (res.LongParam) { let _LongParam = '' diff --git a/src/views/basedesign/updateFormTab/index.jsx b/src/views/basedesign/updateFormTab/index.jsx index c7ad6d8..bd06654 100644 --- a/src/views/basedesign/updateFormTab/index.jsx +++ b/src/views/basedesign/updateFormTab/index.jsx @@ -313,7 +313,7 @@ let defers = _tbs.map((item, i) => { return new Promise((resolve) => { setTimeout(() => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.linkTab }).then(res => { @@ -393,7 +393,7 @@ let defers = popActions.map((item, i) => { return new Promise((resolve) => { setTimeout(() => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.linkTab }).then(res => { @@ -573,7 +573,7 @@ let defers = formActions.map((item, i) => { return new Promise((resolve) => { setTimeout(() => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: item.origin }).then(res => { @@ -885,11 +885,11 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { _resolve() if (res.status) { // if (this.delButtons.length > 0) { - // Api.getSystemConfig({ + // Api.getCloudConfig({ // func: 'sPC_MainMenu_Del', // up_type: 'Y', // MenuID: this.delButtons.join(',') diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx index 023cfb2..3321ff8 100644 --- a/src/views/billprint/index.jsx +++ b/src/views/billprint/index.jsx @@ -281,11 +281,6 @@ let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } - let regs = [ { reg: /@userName@/ig, value: `'${userName}'` }, { reg: /@fullName@/ig, value: `'${fullName}'` } @@ -631,11 +626,6 @@ let city = sessionStorage.getItem('city') || '' let district = sessionStorage.getItem('district') || '' let address = sessionStorage.getItem('address') || '' - - if (sessionStorage.getItem('isEditState') === 'true') { - userName = sessionStorage.getItem('CloudUserName') || '' - fullName = sessionStorage.getItem('CloudFullName') || '' - } let LText = params.map((item, index) => { let _sql = item.sql @@ -658,7 +648,9 @@ func: 'sPC_Get_structured_data', LText: LText.join(' union all '), LText_field: LText_field.join(' union all '), - BID: BID || '' + BID: BID || '', + username: userName, + fullName: fullName } param.LText = Utils.formatOptions(param.LText) diff --git a/src/views/design/header/editfirstmenu/index.jsx b/src/views/design/header/editfirstmenu/index.jsx index 45a5b8d..06dc1e7 100644 --- a/src/views/design/header/editfirstmenu/index.jsx +++ b/src/views/design/header/editfirstmenu/index.jsx @@ -60,7 +60,7 @@ this.setState({ loading: true }) - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { this.setState({ loading: false, @@ -101,7 +101,7 @@ func: 'sPC_MainMenu_Del', MenuID: item.MenuID } - return Api.getSystemConfig(param).then(res => { + return Api.getCloudConfig(param).then(res => { if (res.status) { _this.props.reload() } else { @@ -139,7 +139,7 @@ title: '纭璋冩暣鑿滃崟椤哄簭鍚楋紵', content: '', onOk() { - return Api.getSystemConfig(param).then(res => { + return Api.getCloudConfig(param).then(res => { if (res.status) { that.setState({ change: false }) that.props.reload() diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx index 2155478..75f8381 100644 --- a/src/views/design/header/index.jsx +++ b/src/views/design/header/index.jsx @@ -69,7 +69,7 @@ debug: 'Y' } - let result = await Api.getSystemConfig(_param) + let result = await Api.getCloudConfig(_param) // 鐧诲綍瓒呮椂 if (!result) return @@ -189,6 +189,7 @@ } changeEditState = () => { + sessionStorage.removeItem('isEditState') this.props.history.replace('/main') window.location.reload() } @@ -214,7 +215,7 @@ this.setState({ loading: true }) - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { this.setState({ loading: false, @@ -319,7 +320,7 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { let msgs = [] if (!res.status) { notification.warning({ @@ -336,7 +337,6 @@ } UNSAFE_componentWillMount () { - sessionStorage.setItem('isEditState', 'true') document.body.className = '' // 缁勪欢鍔犺浇鏃讹紝鑾峰彇鑿滃崟鏁版嵁 @@ -357,7 +357,7 @@ if (window.GLOB.systemType !== 'production') { setTimeout(() => { - Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { if (res.status) { let _permFuncField = [] let _sysRoles = [] diff --git a/src/views/design/header/versions/index.jsx b/src/views/design/header/versions/index.jsx index 806b3ac..5d36f6e 100644 --- a/src/views/design/header/versions/index.jsx +++ b/src/views/design/header/versions/index.jsx @@ -28,7 +28,7 @@ func: 's_get_sversions_sys', } - Api.getSystemConfig(_param).then(result => { + Api.getCloudConfig(_param).then(result => { if (!result.status) { notification.warning({ top: 92, diff --git a/src/views/design/index.jsx b/src/views/design/index.jsx index 5cd309f..4417706 100644 --- a/src/views/design/index.jsx +++ b/src/views/design/index.jsx @@ -1,4 +1,5 @@ import React, {Component} from 'react' +import { withRouter } from 'react-router-dom' import { ConfigProvider } from 'antd' import enUS from 'antd/es/locale/en_US' import zhCN from 'antd/es/locale/zh_CN' @@ -14,11 +15,18 @@ class Design extends Component { componentDidMount() { - window.debugger = false - window.GLOB.breakpoint = false - window.GLOB.designView = true - sessionStorage.removeItem('breakpoint') - setGLOBFuncs() + if (sessionStorage.getItem('isEditState') === 'true') { + sessionStorage.removeItem('isEditState') + this.props.history.replace('/main') + window.location.reload() + } else { + sessionStorage.setItem('isEditState', 'true') + window.debugger = false + window.GLOB.breakpoint = false + window.GLOB.designView = true + sessionStorage.removeItem('breakpoint') + setGLOBFuncs() + } } render () { @@ -33,4 +41,4 @@ } } -export default Design \ No newline at end of file +export default withRouter(Design) \ No newline at end of file diff --git a/src/views/design/sidemenu/editsecmenu/index.jsx b/src/views/design/sidemenu/editsecmenu/index.jsx index 57e0cff..c630d72 100644 --- a/src/views/design/sidemenu/editsecmenu/index.jsx +++ b/src/views/design/sidemenu/editsecmenu/index.jsx @@ -58,7 +58,7 @@ func: 'sPC_MainMenu_Del', MenuID: menu.card.MenuID } - return Api.getSystemConfig(param).then(res => { + return Api.getCloudConfig(param).then(res => { if (res.status) { MKEmitter.emit('mkUpdateMenuList') } else { @@ -124,7 +124,7 @@ title: '纭璋冩暣鑿滃崟椤哄簭鍚楋紵', content: '', onOk() { - return Api.getSystemConfig(param).then(res => { + return Api.getCloudConfig(param).then(res => { if (res.status) { that.setState({ change: false }) MKEmitter.emit('mkUpdateMenuList') @@ -169,7 +169,7 @@ this.setState({ loading: true }) - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { this.setState({ loading: false, diff --git a/src/views/design/sidemenu/editthdmenu/index.jsx b/src/views/design/sidemenu/editthdmenu/index.jsx index 2a4c64b..28e78e7 100644 --- a/src/views/design/sidemenu/editthdmenu/index.jsx +++ b/src/views/design/sidemenu/editthdmenu/index.jsx @@ -80,7 +80,7 @@ func: 'sPC_MainMenu_Del', MenuID: menu.card.MenuID } - return Api.getSystemConfig(param).then(res => { + return Api.getCloudConfig(param).then(res => { if (res.status) { MKEmitter.emit('mkUpdateMenuList') } else { @@ -155,7 +155,7 @@ title: '纭璋冩暣鑿滃崟椤哄簭鍚楋紵', content: '', onOk() { - return Api.getSystemConfig(param).then(res => { + return Api.getCloudConfig(param).then(res => { if (res.status) { that.setState({ change: false }) MKEmitter.emit('mkUpdateMenuList') @@ -224,7 +224,7 @@ confirmLoading: true }) - Api.getSystemConfig(param).then(response => { + Api.getCloudConfig(param).then(response => { if (response.status) { this.setState({ confirmLoading: false, diff --git a/src/views/design/sidemenu/index.jsx b/src/views/design/sidemenu/index.jsx index 597ee0f..5874b6d 100644 --- a/src/views/design/sidemenu/index.jsx +++ b/src/views/design/sidemenu/index.jsx @@ -202,7 +202,7 @@ this.setState({ loading: true }) - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { this.setState({ loading: false, @@ -262,7 +262,7 @@ loading: true }) - Api.getSystemConfig(param).then(response => { + Api.getCloudConfig(param).then(response => { if (response.status) { this.setState({ loading: false, diff --git a/src/views/design/sidemenu/thdmenuplus/index.jsx b/src/views/design/sidemenu/thdmenuplus/index.jsx index ad47ac4..7131595 100644 --- a/src/views/design/sidemenu/thdmenuplus/index.jsx +++ b/src/views/design/sidemenu/thdmenuplus/index.jsx @@ -57,7 +57,7 @@ CustomPage: customImg } - Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'menu'}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'menu'}).then(res => { let _templates = [] res.UserTemp.forEach(temp => { @@ -189,7 +189,7 @@ if ((sysMenu.Template === 'CustomPage' || sysMenu.Template === 'BaseTable') && sysMenu.copyId) { this.copyMenu(param, sysMenu.copyId) } else { - Api.getSystemConfig(param).then(response => { + Api.getCloudConfig(param).then(response => { if (response.status) { this.setState({ loading: false, @@ -214,7 +214,7 @@ } copyMenu = (param, MenuId) => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', MenuID: MenuId }).then(result => { @@ -250,7 +250,7 @@ param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config))) } - Api.getSystemConfig(param).then(response => { + Api.getCloudConfig(param).then(response => { if (response.status) { this.setState({ loading: false, diff --git a/src/views/imdesign/index.jsx b/src/views/imdesign/index.jsx index 47ab0c1..a250188 100644 --- a/src/views/imdesign/index.jsx +++ b/src/views/imdesign/index.jsx @@ -26,7 +26,6 @@ const StyleController = asyncComponent(() => import('@/menu/stylecontroller')) const NormalForm = asyncComponent(() => import('@/components/normalform')) -sessionStorage.setItem('isEditState', 'true') sessionStorage.setItem('appType', 'mob') // 搴旂敤绫诲瀷 document.body.className = '' window.GLOB.CacheIndependent = new Map() @@ -163,7 +162,7 @@ } getAppMessage = (MenuID) => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_get_keyids', bid: sessionStorage.getItem('appId') }).then(res => { @@ -199,19 +198,19 @@ } deffers = [new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'image'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'image'}).then(res => { resolve(res.data) }) }, 500) }), new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'video'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'video'}).then(res => { resolve(res.data) }) }, 1000) }), new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'color'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'color'}).then(res => { resolve(res.data) }) }, 1500) @@ -272,7 +271,7 @@ MenuID: MenuId } - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -337,7 +336,7 @@ _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) - Api.getSystemConfig(_param).then(res => { + Api.getCloudConfig(_param).then(res => { if (!res.status) { notification.warning({ top: 92, @@ -411,7 +410,7 @@ param.secretkey = Utils.encrypt('', param.timestamp) param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config))) - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (!res.status) { notification.warning({ top: 92, diff --git a/src/views/menudesign/homeform/index.jsx b/src/views/menudesign/homeform/index.jsx index a758095..434b693 100644 --- a/src/views/menudesign/homeform/index.jsx +++ b/src/views/menudesign/homeform/index.jsx @@ -24,7 +24,7 @@ } getMenus = () => { - Api.getSystemConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { + Api.getCloudConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { if (result.status) { let thdMenuList = [] let menulist = result.fst_menu.map(fst => { diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index 1a52162..1fb51dc 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -48,7 +48,6 @@ const StyleCombControlButton = asyncComponent(() => import('@/menu/stylecombcontrolbutton')) const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) -sessionStorage.setItem('isEditState', 'true') sessionStorage.setItem('appType', '') // 搴旂敤绫诲瀷 document.body.className = '' @@ -81,7 +80,6 @@ } if (!sessionStorage.getItem('UserID')) { - sessionStorage.removeItem('isEditState') sessionStorage.removeItem('appType') this.props.history.replace('/login') return @@ -263,7 +261,7 @@ param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { let temps = res.data.map(temp => { return { @@ -296,19 +294,19 @@ } deffers = [new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'image'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'image'}).then(res => { resolve(res.data) }) }, 500) }), new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'video'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'video'}).then(res => { resolve(res.data) }) }, 1000) }), new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'color'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'color'}).then(res => { resolve(res.data) }) }, 1500) @@ -322,7 +320,7 @@ } updateCustomComponent = () => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_get_custom_components', typename: '', typecharone: '' @@ -438,7 +436,7 @@ MenuID: MenuId } - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (result.status) { let config = null @@ -664,7 +662,7 @@ } setTimeout(() => { - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { let _config = null try { _config = res.LongParam ? JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) : null @@ -975,7 +973,7 @@ Api.fileuploadbase64(param).then(result => { if (result.status) { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_PrintTemplateMSub', ID: config.uuid, Images: Utils.getcloudurl(result.Images), @@ -995,7 +993,7 @@ }).then(res => { // 椤甸潰淇濆瓨 if (!res || !res.status) return res - return Api.getSystemConfig(param) + return Api.getCloudConfig(param) }).then(res => { // 鎸夐挳鍒犻櫎 if (!res || !res.status) return res @@ -1018,7 +1016,7 @@ func: 'sPC_MainMenu_Del', MenuID: this.state.delButtons.join(',') } - return Api.getSystemConfig(_param) + return Api.getCloudConfig(_param) } }, this.netError).then(res => { // 椤甸潰鎸夐挳鍏崇郴淇濆瓨 if (!res || !res.status) return res @@ -1028,7 +1026,7 @@ }) if (MenuType !== 'billPrint') { - return Api.getSystemConfig(btnParam) + return Api.getCloudConfig(btnParam) } else { return { status: true @@ -1076,7 +1074,7 @@ getRoleFields = () => { if (sessionStorage.getItem('sysRoles')) return - Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { if (res.status) { let _permFuncField = [] let _sysRoles = [] diff --git a/src/views/menudesign/menuform/index.jsx b/src/views/menudesign/menuform/index.jsx index cf45cd9..e6fa3c9 100644 --- a/src/views/menudesign/menuform/index.jsx +++ b/src/views/menudesign/menuform/index.jsx @@ -77,7 +77,7 @@ getMenus = () => { const { MenuId, config } = this.props - Api.getSystemConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { + Api.getCloudConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { if (result.status) { let thdMenu = null let thdMenuList = [] diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 7c8d241..b27f0a3 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -48,7 +48,6 @@ const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) const PopView = asyncComponent(() => import('./popview')) -sessionStorage.setItem('isEditState', 'true') sessionStorage.setItem('editMenuType', 'menu') // 缂栬緫鑿滃崟绫诲瀷 sessionStorage.setItem('appType', 'mob') // 搴旂敤绫诲瀷 document.body.className = '' @@ -89,7 +88,6 @@ } if (!sessionStorage.getItem('UserID')) { - sessionStorage.removeItem('isEditState') sessionStorage.removeItem('editMenuType') sessionStorage.removeItem('appType') this.props.history.replace('/login') @@ -408,7 +406,7 @@ } getAppMessage = (MenuID) => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_get_keyids', bid: sessionStorage.getItem('appId') }).then(res => { @@ -458,7 +456,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -489,19 +487,19 @@ } deffers = [new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'image'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'image'}).then(res => { resolve(res.data) }) }, 500) }), new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'video'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'video'}).then(res => { resolve(res.data) }) }, 1000) }), new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'color'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'color'}).then(res => { resolve(res.data) }) }, 1500) @@ -562,7 +560,7 @@ MenuID: MenuId } - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -748,7 +746,7 @@ _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) - Api.getSystemConfig(_param).then(res => { + Api.getCloudConfig(_param).then(res => { if (!res.status) { notification.warning({ top: 92, @@ -794,7 +792,7 @@ MenuID: urlParam.copyMenuId } - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -907,7 +905,7 @@ } jointComponents = (config, navItem) => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', TypeCharOne: sessionStorage.getItem('kei_no'), typename: sessionStorage.getItem('typename'), @@ -1637,7 +1635,7 @@ _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') _param.secretkey = Utils.encrypt('', _param.timestamp) - Api.getSystemConfig(_param).then(res => { + Api.getCloudConfig(_param).then(res => { if (res.status) { NavBar.open_edition = res.open_edition || '' window.GLOB.CacheIndependent.set(NavBar.uuid, fromJS(NavBar).toJS()) @@ -1682,7 +1680,7 @@ kparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') kparam.secretkey = Utils.encrypt('', kparam.timestamp) - Api.getSystemConfig(kparam).then(result => { + Api.getCloudConfig(kparam).then(result => { if (result.status) { sessionStorage.setItem('appViewList', viewList) } @@ -1701,7 +1699,7 @@ }).then(res => { // 椤甸潰淇濆瓨 if (!res || !res.status) return res - return Api.getSystemConfig(param) + return Api.getCloudConfig(param) }).then(res => { this.setState({ menuloading: false @@ -1754,7 +1752,7 @@ getRoleFields = () => { if (sessionStorage.getItem('sysRoles')) return - Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { if (res.status) { let _permFuncField = [] let _sysRoles = [] @@ -2000,7 +1998,7 @@ title: '纭畾璁剧疆鏈〉闈负棣栭〉鍚楋紵', content: '', onOk() { - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -2061,7 +2059,7 @@ title: '纭畾璁剧疆鏈〉闈负鐧诲綍椤靛悧锛�', content: hasLogin ? '' : '褰撳墠椤甸潰灏氭湭娣诲姞鐧诲綍缁勪欢銆�', onOk() { - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index a8dcca3..3e034d3 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -48,8 +48,6 @@ const StyleCombControlButton = asyncComponent(() => import('@/menu/stylecombcontrolbutton')) const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) -sessionStorage.setItem('isEditState', 'true') - sessionStorage.setItem('appType', 'pc') // 搴旂敤绫诲瀷 sessionStorage.setItem('typename', 'pc') document.body.className = '' @@ -84,7 +82,6 @@ } if (!sessionStorage.getItem('UserID')) { - sessionStorage.removeItem('isEditState') sessionStorage.removeItem('appType') this.props.history.replace('/login') return @@ -262,7 +259,7 @@ } getAppMessage = (MenuID) => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_get_keyids', bid: sessionStorage.getItem('appId') }).then(res => { @@ -312,7 +309,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -343,19 +340,19 @@ } deffers = [new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'image'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'image'}).then(res => { resolve(res.data) }) }, 500) }), new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'video'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'video'}).then(res => { resolve(res.data) }) }, 1000) }), new Promise(resolve => { setTimeout(() => { - Api.getSystemConfig({...param, typecharone: 'color'}).then(res => { + Api.getCloudConfig({...param, typecharone: 'color'}).then(res => { resolve(res.data) }) }, 1500) @@ -532,7 +529,7 @@ MenuID: MenuId } - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -679,7 +676,7 @@ _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) - Api.getSystemConfig(_param).then(res => { + Api.getCloudConfig(_param).then(res => { if (!res.status) { notification.warning({ top: 92, @@ -718,7 +715,7 @@ MenuID: urlParam.copyMenuId } - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -804,7 +801,7 @@ } jointComponents = (config, navItem) => { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_Get_LongParam', TypeCharOne: sessionStorage.getItem('kei_no'), typename: 'pc', @@ -1355,7 +1352,7 @@ _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') _param.secretkey = Utils.encrypt('', _param.timestamp) - Api.getSystemConfig(_param).then(res => { + Api.getCloudConfig(_param).then(res => { if (res.status) { NavBar.open_edition = res.open_edition || '' window.GLOB.CacheIndependent.set(NavBar.uuid, fromJS(NavBar).toJS()) @@ -1400,7 +1397,7 @@ kparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') kparam.secretkey = Utils.encrypt('', kparam.timestamp) - Api.getSystemConfig(kparam).then(result => { + Api.getCloudConfig(kparam).then(result => { if (result.status) { sessionStorage.setItem('appViewList', viewList) } @@ -1419,7 +1416,7 @@ }).then(res => { // 椤甸潰淇濆瓨 if (!res || !res.status) return res - return Api.getSystemConfig(param) + return Api.getCloudConfig(param) }).then(res => { this.setState({ menuloading: false @@ -1471,7 +1468,7 @@ getRoleFields = () => { if (sessionStorage.getItem('sysRoles') || sessionStorage.getItem('permFuncField')) return - Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { if (res.status) { let _permFuncField = [] let _sysRoles = [] @@ -1655,7 +1652,7 @@ title: '纭畾璁剧疆鏈〉闈负棣栭〉鍚楋紵', content: '', onOk() { - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -1716,7 +1713,7 @@ title: '纭畾璁剧疆鏈〉闈负鐧诲綍椤靛悧锛�', content: hasLogin ? '' : '褰撳墠椤甸潰灏氭湭娣诲姞鐧诲綍缁勪欢銆�', onOk() { - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (!result.status) { notification.warning({ top: 92, diff --git a/src/views/printTemplate/index.jsx b/src/views/printTemplate/index.jsx index a477433..1a5a5f9 100644 --- a/src/views/printTemplate/index.jsx +++ b/src/views/printTemplate/index.jsx @@ -455,7 +455,7 @@ let deffers = tables.map(name => { return new Promise(resolve => { - Api.getSystemConfig({func: 'sPC_Get_FieldName', TBName: name}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_FieldName', TBName: name}).then(res => { resolve(res) }) }) diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx index 5c5a369..ce7203b 100644 --- a/src/views/rolemanage/index.jsx +++ b/src/views/rolemanage/index.jsx @@ -19,8 +19,6 @@ const Header = asyncComponent(() => import('./header')) const TransferForm = asyncComponent(() => import('@/templates/zshare/basetransferform')) -sessionStorage.setItem('isEditState', 'true') - class RoleManage extends Component { state = { app: null, @@ -95,7 +93,7 @@ getAppViewList = () => { const { app } = this.state - Api.getSystemConfig({ + Api.getCloudConfig({ func: 's_get_keyids', bid: app.ID }).then(result => { @@ -482,7 +480,7 @@ confirmLoading: true }) - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_MainMenu_ReDel', MenuID: targetKeys.join(','), TypeCharOne: app.kei_no, @@ -549,7 +547,7 @@ }) if (app.typename === 'pc' && list.length > 0) { - Api.getSystemConfig({ + Api.getCloudConfig({ func: 'sPC_MainMenu_ReDel', MenuID: list.join(','), TypeCharOne: app.kei_no, diff --git a/src/views/systemfunc/index.jsx b/src/views/systemfunc/index.jsx index 6910e9b..1c71550 100644 --- a/src/views/systemfunc/index.jsx +++ b/src/views/systemfunc/index.jsx @@ -15,8 +15,11 @@ UNSAFE_componentWillMount() { sessionStorage.setItem('role_id', sessionStorage.getItem('cloudRole_id')) sessionStorage.setItem('dataM', sessionStorage.getItem('cloudDataM')) + sessionStorage.setItem('User_Name', sessionStorage.getItem('CloudUserName')) + sessionStorage.setItem('Full_Name', sessionStorage.getItem('CloudFullName')) + document.body.className = 'mk-blue-black' - sessionStorage.setItem('isEditState', 'true') + window.GLOB.dataFormat = false // 鍘婚櫎姘村嵃 window.GLOB.mkHS = true // HS涓嬩笉鍙紑鍚柇鐐硅皟璇� diff --git a/src/views/systemproc/index.jsx b/src/views/systemproc/index.jsx index 7aab3b5..6d48c4c 100644 --- a/src/views/systemproc/index.jsx +++ b/src/views/systemproc/index.jsx @@ -2,8 +2,6 @@ import { ConfigProvider } from 'antd' import zhCN from 'antd/es/locale/zh_CN' -// import Api from '@/api' -// import Utils from '@/utils/utils.js' import Header from '../systemfunc/header' import Proc from './proc' import './index.scss' diff --git a/src/views/systemproc/proc/index.jsx b/src/views/systemproc/proc/index.jsx index f5156bb..d9be6a9 100644 --- a/src/views/systemproc/proc/index.jsx +++ b/src/views/systemproc/proc/index.jsx @@ -24,6 +24,9 @@ } componentDidMount () { + sessionStorage.setItem('User_Name', sessionStorage.getItem('CloudUserName')) + sessionStorage.setItem('Full_Name', sessionStorage.getItem('CloudFullName')) + if (sessionStorage.getItem('permFuncField')) { this.setState({permFuncs: JSON.parse(sessionStorage.getItem('permFuncField'))}) } else { @@ -159,7 +162,6 @@ dropParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') dropParam.secretkey = Utils.encrypt(dropParam.LText, dropParam.timestamp) dropParam.open_key = Utils.encryptOpenKey(dropParam.secretkey, dropParam.timestamp) - let createParam = { func: 'sPC_TableData_InUpDe', diff --git a/src/views/systemproc/proc/index.scss b/src/views/systemproc/proc/index.scss index e0a327c..ac98dcd 100644 --- a/src/views/systemproc/proc/index.scss +++ b/src/views/systemproc/proc/index.scss @@ -113,6 +113,15 @@ .code-mirror-wrap .anticon-font-size { position: absolute; } + + .anticon-swap { + position: absolute; + z-index: 11; + left: auto; + right: 10px; + top: auto; + bottom: 20px; + } } .mk-create-func { diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx index 759be21..1865fdf 100644 --- a/src/views/tabledesign/index.jsx +++ b/src/views/tabledesign/index.jsx @@ -42,7 +42,6 @@ const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) const PasteBaseTable = asyncComponent(() => import('@/menu/components/share/pastebasetable')) -sessionStorage.setItem('isEditState', 'true') sessionStorage.setItem('appType', '') // 搴旂敤绫诲瀷 document.body.className = '' @@ -71,7 +70,6 @@ } if (!sessionStorage.getItem('UserID')) { - sessionStorage.removeItem('isEditState') sessionStorage.removeItem('appType') this.props.history.replace('/login') return @@ -218,7 +216,7 @@ param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { if (res.status) { let temps = res.data.map(temp => { return { @@ -390,7 +388,7 @@ MenuID: MenuId } - Api.getSystemConfig(param).then(result => { + Api.getCloudConfig(param).then(result => { if (result.status) { let config = null @@ -666,7 +664,7 @@ btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp) new Promise(resolve => { - Api.getSystemConfig(param).then(res => { + Api.getCloudConfig(param).then(res => { resolve(res) }, this.netError) }).then(res => { @@ -680,7 +678,7 @@ oriConfig: fromJS(config).toJS(), }) - return Api.getSystemConfig(btnParam) + return Api.getCloudConfig(btnParam) }).then(res => { this.setState({ menuloading: false @@ -722,7 +720,7 @@ getRoleFields = () => { if (sessionStorage.getItem('sysRoles')) return - Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { + Api.getCloudConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { if (res.status) { let _permFuncField = [] let _sysRoles = [] diff --git a/src/views/tabledesign/menuform/index.jsx b/src/views/tabledesign/menuform/index.jsx index 06fedc7..beeda49 100644 --- a/src/views/tabledesign/menuform/index.jsx +++ b/src/views/tabledesign/menuform/index.jsx @@ -76,7 +76,7 @@ getMenus = () => { const { MenuId, config } = this.props - Api.getSystemConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { + Api.getCloudConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { if (result.status) { let thdMenu = null let thdMenuList = [] -- Gitblit v1.8.0