commit d33c9cc7d3403895f8dcacdfa459cafa18243bfe Author: linxd <544554903@qq.com> Date: Mon Jun 16 09:25:19 2025 +0800 Initial commit diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8e90ca6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +**/node_modules +/src/utils/request-temp.js + +# production +/.vscode + +# misc +.DS_Store +npm-debug.log* +yarn-error.log + +/coverage +.idea +yarn.lock +package-lock.json +*bak +.vscode + +# visual studio code +.history +*.log + +functions/mock +.temp/** + +# umi +.umi +.umi-production + +# screenshot +screenshot +.firebase \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7e3649a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..16116a2 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +/lambda/ +/scripts +/config +.history \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..56160f6 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,20 @@ +module.exports = { + extends: [require.resolve('@umijs/fabric/dist/eslint')], + globals: { + ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true, + page: true, + REACT_APP_ENV: true, + //商城2.0跳转地址 + REACT_APP_MALL_V2_URL: false, + //各系统跳转参数 + REACT_APP_CLIENT_KEY: true, + // REACT_APP_CLIENT_SECRET: true, + //密码加密参数 + REACT_APP_PASSWORD_CIPHERMODE: true, + REACT_APP_PASSWORD_PUBLICKEY: true, + //当前环境 + START_ENV: true, + //询价查看报价跳转地址 + REACT_APP_XUNJIA_REDIRECT: true, + }, +}; diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7fd9f58 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +**/node_modules +# roadhog-api-doc ignore +/src/utils/request-temp.js +_roadhog-api-doc + +# production +/dist +/.vscode + +# misc +.DS_Store +npm-debug.log* +yarn-error.log + +/coverage +.idea +yarn.lock +package-lock.json +*bak +.vscode + +# visual studio code +.history +*.log +functions/* +.temp/** + +# umi +.umi +.umi-production + +# screenshot +screenshot +.firebase +.eslintcache + +build diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..32d8e64 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,6 @@ +ports: + - port: 8000 + onOpen: open-preview +tasks: + - init: npm install + command: npm start diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d17efb4 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,23 @@ +**/*.svg +package.json +.umi +.umi-production +/dist +.dockerignore +.DS_Store +.eslintignore +*.png +*.toml +docker +.editorconfig +Dockerfile* +.gitignore +.prettierignore +LICENSE +.eslintcache +*.lock +yarn-error.log +.history +CNAME +/build +/public \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..7b597d7 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,5 @@ +const fabric = require('@umijs/fabric'); + +module.exports = { + ...fabric.prettier, +}; diff --git a/.stylelintrc.js b/.stylelintrc.js new file mode 100644 index 0000000..c203078 --- /dev/null +++ b/.stylelintrc.js @@ -0,0 +1,5 @@ +const fabric = require('@umijs/fabric'); + +module.exports = { + ...fabric.stylelint, +}; diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2b4571c --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at afc163@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c17ba2f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Alipay.inc + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..3c30244 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,87 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript +name: ant design pro + +trigger: + - master + +jobs: + - job: lintAndBuild + + pool: + vmImage: 'Ubuntu-16.04' + + steps: + - checkout: self + clean: false + - script: npm install + displayName: install + - script: npm run lint + displayName: lint + - script: npm run tsc + displayName: tsc + - script: npm run build + env: + PROGRESS: none + displayName: build + + - job: test + pool: + vmImage: 'Ubuntu-16.04' + + container: + image: circleci/node:latest-browsers + options: '-u root' + + steps: + - script: npm install + displayName: install + - script: npm run test:all + env: + PROGRESS: none + UMI_UI: none + displayName: test + + - job: Windows + pool: + vmImage: 'windows-latest' + steps: + - task: NodeTool@0 + inputs: + versionSpec: '12.x' + - script: npm install + displayName: install + - script: npm run lint + displayName: lint + - script: npm run tsc + displayName: tsc + - script: npm run test:all + env: + PROGRESS: none + UMI_UI: none + displayName: test + - script: npm run build + env: + PROGRESS: none + displayName: build + + - job: MacOS + pool: + vmImage: 'macOS-latest' + steps: + - task: NodeTool@0 + inputs: + versionSpec: '12.x' + - script: npm install + displayName: install + - script: npm run lint + displayName: lint + - script: npm run tsc + displayName: tsc + - script: npm run + env: + PROGRESS: none + UMI_UI: none + displayName: build diff --git a/config/config.UAT.ts b/config/config.UAT.ts new file mode 100644 index 0000000..a022290 --- /dev/null +++ b/config/config.UAT.ts @@ -0,0 +1,45 @@ +import { defineConfig } from 'umi'; +import proxy from './proxy'; +export default defineConfig({ + proxy: proxy['UAT'], + define:{ + //商城2.0跳转地址 + REACT_APP_MALL_V2_URL:'http://111.198.162.67/zglt/index_hzf.jsp?id=dev', + + //各系统跳转参数 + REACT_APP_CLIENT_KEY : 'KgPEkttG', + // REACT_APP_CLIENT_SECRET :'ae5bdb183c502355d2055b3de73300aa73cbfdf3', + + //密码加密参数 + REACT_APP_PASSWORD_CIPHERMODE:'1', + REACT_APP_PASSWORD_PUBLICKEY:'0428D625CEEB71CE823BD7D78DFEE7B122F2DA5C4D21E32253AD684D0FE21810394A799639C0CDFBFEB535A1DFD6A366A637E582CE0B1466A5FE7858841135DE6B', + + //当前环境 + START_ENV:'UAT', + + //询价查看报价跳转地址 + // REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8280/provider_uat', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', + + // //智慧客服ws地址 + // REACT_APP_CUSTOMERSERVICE_WS_REDIRECT: 'ws://10.242.31.158:18022/api/api/biz-customer-service', + + //智慧客服用户中心地址 + REACT_APP_CUSTOMERSERVICE_USERCENTER: 'http://10.242.31.158:18022/auth/oauth/authorize?response_type=code', + + //智慧客服client_id + REACT_APP_CUSTOMERSERVICE_CLIENT_ID: 'COsHJydx', + + //智慧客服地址 + REACT_APP_CUSTOMERSERVICE_REDIRECT: 'http://10.242.31.158:8632', + + // //智慧客服文档中心查看图片地址 + // REACT_APP_CUSTOMERSERVICE_DOC_REDIRECT: 'http://cos.gz-tst.cos.tg.unicom.local/349553515466:mall/', + + // //智慧客服加密公钥私钥ciphercode + // REACT_APP_CUSTOMERSERVICE_PUBLICKEY : '0428D625CEEB71CE823BD7D78DFEE7B122F2DA5C4D21E32253AD684D0FE21810394A799639C0CDFBFEB535A1DFD6A366A637E582CE0B1466A5FE7858841135DE6B', + // REACT_APP_CUSTOMERSERVICE_PRIVATEKEY : '4F7144028D4DCF88FA50F0E2B3FFDDCF63BBE17D1700537DCE037687D3AA3DA7', + // REACT_APP_CUSTOMERSERVICE_CIPHERCODE : 1, + }, +}); diff --git a/config/config.dev.ts b/config/config.dev.ts new file mode 100644 index 0000000..d7f0893 --- /dev/null +++ b/config/config.dev.ts @@ -0,0 +1,45 @@ +import { defineConfig } from 'umi'; +import proxy from './proxy'; +export default defineConfig({ + proxy: proxy['dev'], + define: { + //商城2.0跳转地址 + REACT_APP_MALL_V2_URL: 'http://111.198.162.67/zglt/index_hzf.jsp?id=dev', + + //各系统跳转参数 + REACT_APP_CLIENT_KEY: 'KgPEkttG', + // REACT_APP_CLIENT_SECRET: 'ae5bdb183c502355d2055b3de73300aa73cbfdf3', + + //密码加密参数 + REACT_APP_PASSWORD_CIPHERMODE: '1', + REACT_APP_PASSWORD_PUBLICKEY: '0428D625CEEB71CE823BD7D78DFEE7B122F2DA5C4D21E32253AD684D0FE21810394A799639C0CDFBFEB535A1DFD6A366A637E582CE0B1466A5FE7858841135DE6B', + + //当前环境 + START_ENV: 'DEV', + + //询价查看报价跳转地址 + // REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider_dev', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', + + //智慧客服用户中心地址 + REACT_APP_CUSTOMERSERVICE_USERCENTER: 'http://10.242.31.158:8100/auth/oauth/authorize?response_type=code', + + //智慧客服client_id + REACT_APP_CUSTOMERSERVICE_CLIENT_ID: 'COsHJydx', + + //智慧客服地址 + REACT_APP_CUSTOMERSERVICE_REDIRECT: 'http://10.242.31.158:8632', + + // //智慧客服ws地址 + // REACT_APP_CUSTOMERSERVICE_WS_REDIRECT: 'ws://10.242.37.148:18022/api/api/biz-customer-service', + + // //智慧客服文档中心查看图片地址 + // REACT_APP_CUSTOMERSERVICE_DOC_REDIRECT: 'http://cos.gz-tst.cos.tg.unicom.local/349553515466:mall/', + + // //智慧客服加密公钥私钥ciphercode + // REACT_APP_CUSTOMERSERVICE_PUBLICKEY : '0428D625CEEB71CE823BD7D78DFEE7B122F2DA5C4D21E32253AD684D0FE21810394A799639C0CDFBFEB535A1DFD6A366A637E582CE0B1466A5FE7858841135DE6B', + // REACT_APP_CUSTOMERSERVICE_PRIVATEKEY : '4F7144028D4DCF88FA50F0E2B3FFDDCF63BBE17D1700537DCE037687D3AA3DA7', + // REACT_APP_CUSTOMERSERVICE_CIPHERCODE : 1, + }, +}); diff --git a/config/config.prod.ts b/config/config.prod.ts new file mode 100644 index 0000000..61ff507 --- /dev/null +++ b/config/config.prod.ts @@ -0,0 +1,43 @@ +import { defineConfig } from 'umi'; +import proxy from './proxy'; +export default defineConfig({ + proxy: proxy['prod'], + define:{ + //商城2.0跳转地址 + REACT_APP_MALL_V2_URL:'http://111.198.162.67/zglt/index_hzf.jsp?id=dev', + + //各系统跳转参数 + REACT_APP_CLIENT_KEY : 'KgPEkttG', + // REACT_APP_CLIENT_SECRET :'ae5bdb183c502355d2055b3de73300aa73cbfdf3', + + //密码加密参数 + REACT_APP_PASSWORD_CIPHERMODE:'1', + REACT_APP_PASSWORD_PUBLICKEY:'04819CF427F9150FEEBD91E8D2346F203FC47312D212022A967D8372EA30B9581CCEEFCE2670BDDAF2E8DA1620EA73948126078ED9FF9773AA3A94EE6C80035A18', + + //当前环境 + START_ENV:'PROD', + + //询价查看报价跳转地址 + // REACT_APP_XUNJIA_REDIRECT: 'https://60.10.26.178/provider', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', + //智慧客服用户中心地址 + REACT_APP_CUSTOMERSERVICE_USERCENTER: 'https://uscm.chinaunicom.cn:18023/auth/oauth/authorize?response_type=code', + + //智慧客服client_id + REACT_APP_CUSTOMERSERVICE_CLIENT_ID: 'COsHJydx', + + //智慧客服地址 + REACT_APP_CUSTOMERSERVICE_REDIRECT: 'https://uscm.chinaunicom.cn:18011', + // //智慧客服ws地址 + // REACT_APP_CUSTOMERSERVICE_WS_REDIRECT: 'ws://uscm.unicom.local:18022/api/api/biz-customer-service', + + // //智慧客服文档中心查看图片地址 + // REACT_APP_CUSTOMERSERVICE_DOC_REDIRECT: 'http://cos.xx-pbc.cos.tg.unicom.local/349553515466:mall/', + + // //智慧客服加密公钥私钥ciphercode + // REACT_APP_CUSTOMERSERVICE_PUBLICKEY : '0428D625CEEB71CE823BD7D78DFEE7B122F2DA5C4D21E32253AD684D0FE21810394A799639C0CDFBFEB535A1DFD6A366A637E582CE0B1466A5FE7858841135DE6B', + // REACT_APP_CUSTOMERSERVICE_PRIVATEKEY : '4F7144028D4DCF88FA50F0E2B3FFDDCF63BBE17D1700537DCE037687D3AA3DA7', + // REACT_APP_CUSTOMERSERVICE_CIPHERCODE : 1, + }, +}); diff --git a/config/config.sim.ts b/config/config.sim.ts new file mode 100644 index 0000000..43156ec --- /dev/null +++ b/config/config.sim.ts @@ -0,0 +1,43 @@ +import { defineConfig } from 'umi'; +import proxy from './proxy'; +export default defineConfig({ + proxy: proxy['sim'], + define: { + //商城2.0跳转地址 + REACT_APP_MALL_V2_URL: 'http://111.198.162.67/zglt/index_hzf.jsp?id=dev', + + //各系统跳转参数 + REACT_APP_CLIENT_KEY: 'KgPEkttG', + // REACT_APP_CLIENT_SECRET: 'ae5bdb183c502355d2055b3de73300aa73cbfdf3', + + //密码加密参数 + REACT_APP_PASSWORD_CIPHERMODE: '1', + REACT_APP_PASSWORD_PUBLICKEY: '0428D625CEEB71CE823BD7D78DFEE7B122F2DA5C4D21E32253AD684D0FE21810394A799639C0CDFBFEB535A1DFD6A366A637E582CE0B1466A5FE7858841135DE6B', + + //当前环境 + START_ENV: 'sim', + + //询价查看报价跳转地址 + // REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', + //智慧客服用户中心地址 + REACT_APP_CUSTOMERSERVICE_USERCENTER: 'http://10.242.31.158:8100/auth/oauth/authorize?response_type=code', + + //智慧客服client_id + REACT_APP_CUSTOMERSERVICE_CLIENT_ID: 'COsHJydx', + + //智慧客服地址 + REACT_APP_CUSTOMERSERVICE_REDIRECT: 'http://10.242.31.158:8632', + // //智慧客服ws地址 + // REACT_APP_CUSTOMERSERVICE_WS_REDIRECT: 'ws://10.242.31.54:18022/api/api/biz-customer-service', + + // //智慧客服文档中心查看图片地址 + // REACT_APP_CUSTOMERSERVICE_DOC_REDIRECT: 'http://cos.xx-pbc.cos.tg.unicom.local/349553515466:mall/', + + // //智慧客服加密公钥私钥ciphercode + // REACT_APP_CUSTOMERSERVICE_PUBLICKEY : '0428D625CEEB71CE823BD7D78DFEE7B122F2DA5C4D21E32253AD684D0FE21810394A799639C0CDFBFEB535A1DFD6A366A637E582CE0B1466A5FE7858841135DE6B', + // REACT_APP_CUSTOMERSERVICE_PRIVATEKEY : '4F7144028D4DCF88FA50F0E2B3FFDDCF63BBE17D1700537DCE037687D3AA3DA7', + // REACT_APP_CUSTOMERSERVICE_CIPHERCODE : 1, + }, +}); diff --git a/config/config.ts b/config/config.ts new file mode 100644 index 0000000..c3955ff --- /dev/null +++ b/config/config.ts @@ -0,0 +1,38 @@ +import { defineConfig } from 'umi'; +import defaultSettings from './defaultSettings'; +// import proxy from './proxy'; +import PageRoutes from './router.config' +const { REACT_APP_ENV } = process.env; +export default defineConfig({ + hash: true, + antd: {}, + dva: { + hmr: true, + }, + locale: { + default: 'zh-CN', + antd: true, + // default true, when it is true, will use `navigator.language` overwrite default + baseNavigator: true, + }, + //全局加载样式 + // dynamicImport: { + // loading: '@/components/PageLoading/index', + // }, + targets: { + ie: 11, + }, + // umi routes: https://umijs.org/docs/routing + routes: PageRoutes, + // Theme for antd: https://ant.design/docs/react/customize-theme-cn + theme: { + // ...darkTheme, + 'primary-color': defaultSettings.primaryColor, + }, + // @ts-ignore + title: false, + ignoreMomentLocale: true, + manifest: { + basePath: '/', + }, +}); diff --git a/config/defaultSettings.ts b/config/defaultSettings.ts new file mode 100644 index 0000000..d281703 --- /dev/null +++ b/config/defaultSettings.ts @@ -0,0 +1,25 @@ +import { Settings as ProSettings } from '@ant-design/pro-layout'; + +type DefaultSettings = ProSettings & { + pwa: boolean; +}; + +const proSettings: DefaultSettings = { + navTheme: 'light', + primaryColor: '#b30000', + layout: 'side', + contentWidth: 'Fluid', + fixedHeader: false, + fixSiderbar: true, + colorWeak: false, + menu: { + locale: true, + }, + title: '招投标系统', + pwa: false, + iconfontUrl: '', +}; + +export type { DefaultSettings }; + +export default proSettings; diff --git a/config/proxy.ts b/config/proxy.ts new file mode 100644 index 0000000..15913ac --- /dev/null +++ b/config/proxy.ts @@ -0,0 +1,98 @@ +export default { + dev: { + // '/api/wfap/v1/audit/bill/find/by/procid': { + // target: 'http://10.242.37.148:8891/',//审批单 dev环境自动审批,暂时用不到 + // changeOrigin: true, + // pathRewrite: { '^': '' }, + // }, + '/api/*': { + // target: 'http://10.242.37.148:18022',//连接天宫的ng + target: 'http://localhost:3000',//连接天宫的ng + changeOrigin: true, + pathRewrite: { '^': '' }, + }, + }, + UAT: { + '/api/core-service-ebtp-userinfo': { + target: 'http://localhost:18023', + changeOrigin: true, + pathRewrite: { '/api/core-service-ebtp-userinfo': '' }, + }, + '/api/biz-service-ebtp-bid': { + target: 'http://localhost:18003', + changeOrigin: true, + pathRewrite: { 'biz-service-ebtp-bid': '' }, + }, + '/api/biz-service-ebtp-extend': { + target: 'http://localhost:18018', + changeOrigin: true, + pathRewrite: { '/api/biz-service-ebtp-extend': '' }, + }, + '/api/biz-service-ebtp-project': { + target: 'http://localhost:18012', + changeOrigin: true, + pathRewrite: { '/api/biz-service-ebtp-project': '' }, + }, + '/api/sys-manager-ebtp-project': { + target: 'http://localhost:18030', + changeOrigin: true, + pathRewrite: { '/api/sys-manager-ebtp-project': '' }, + }, + '/api/biz-service-ebtp-rsms': { + target: 'http://localhost:18014', + changeOrigin: true, + pathRewrite: { '/api/biz-service-ebtp-rsms': '' }, + }, + '/api/biz-service-ebtp-agency': { + target: 'http://localhost:18099', + changeOrigin: true, + pathRewrite: { '/api/biz-service-ebtp-agency': '' }, + }, + '/api/biz-supplier-manage': { + target: 'http://localhost:18096', + changeOrigin: true, + pathRewrite: { '/api/biz-supplier-manage': '' }, + } + + // '/api/wfap/v1/audit/bill/find/by/procid': { + // target: 'http://10.242.31.158:8891/',//审批单 uat环境自动审批,暂时用不到 + // changeOrigin: true, + // pathRewrite: { '^': '' }, + // }, + // '/living/api/*': { + // // target: 'https://ai.cubigdata.cn:5001',//连接天宫的ng + // target: 'http://localhost:3000',//连接天宫的ng + // changeOrigin: true, + // pathRewrite: { '/living/api': '' }, + // }, + // '/api/*': { + // target: 'http://10.242.31.158:18022',//连接天宫的ng + // changeOrigin: true, + // pathRewrite: { '^': '' }, + // }, + // '/doc/v1.0/*': { + // target: 'http://10.242.31.158:8806',//连接天宫的ng + // changeOrigin: true, + // pathRewrite: { '^': '' }, + // }, + }, + sim: { + // '/api/wfap/v1/audit/bill/find/by/procid': { + // target: 'http://10.242.31.158:8891/',//审批单 uat环境自动审批,暂时用不到 + // changeOrigin: true, + // pathRewrite: { '^': '' }, + // }, + '/api/*': { + target: 'http://10.242.31.54:18022',//连接天宫的ng + changeOrigin: true, + pathRewrite: { '^': '' }, + }, + }, + prod: { + '/api/*': { + target: 'http://uscm.unicom.local:18022',//连接天宫的ng + changeOrigin: true, + pathRewrite: { '^': '' }, + }, + } +}; diff --git a/config/router.config.ts b/config/router.config.ts new file mode 100644 index 0000000..8dd2a76 --- /dev/null +++ b/config/router.config.ts @@ -0,0 +1,122 @@ +import menuaZhaoBiao from './ZhaoBiao/router_menubProject.config'; +import transfer from './router_transfer'; +import home from './HomePage/router_home'; +import juryRoom from './JuryRoom/router_menuJury.config'; +import approvalForm from './router_approval_form'; +import partyMemberTopic from './router_partyMemberTopic'; +import highQualityOperation from './router_highQualityOperation'; +import { elecBidEvaluation, monitor, monitorScreen } from './router_elecEvaluation'; +export default [ + //========================================================================登陆 + ...transfer,//跳转、登陆 + { + path: '/userformal', + // component: '../layouts/UserLayout', + routes: [ + { + name: 'login', + path: '/userformal/login', + component: './userformal/login', + }, + ], + }, + { + path: '/loading', + routes: [ + { + path: '/loading', + component: './Loading', + }, + ], + }, + //日历组件暂时用 + // { + // path: '/Calendar', + // component: './MainPage/ProjectManager/components/CalendarForm', + // }, + //视频播放-视频播放列表(暂时用) + { + path: '/ElecEvaluation/Monitor/videoplay', + component: './ElecEvaluation/Monitor/RoomDetail/videoplay', + }, + //富文本组件 + // { + // path: '/editor', + // component: './MainPage/ProjectManager/components/WangEditor', + // }, + //401错误页 + { + exact: true, + path: '/401', + component: './401', + }, + { + exact: true, + path: '/404', + component: './404', + }, + //==========================================================================菜单路由 + { + path: '/', + component: '../layouts/SecurityLayout', + routes: [ + { + path: '/', + component: '../layouts/BasicLayout', + //authority: ['ebtp-expert'], + routes: [ + {//专家登陆地址 + path: '/', + redirect: '/userexpert/login', + }, + ...home,//各角色主页 + ...menuaZhaoBiao,//项目菜单所有路由 + ...elecBidEvaluation,//电子评标室-监控大屏 + {//问卷调查 + name: 'Questionnaire', + icon: 'UnorderedListOutlined', + path: '/Questionnaire', + routes: [ + {//问卷调查 + name: 'QuestionList', + path: '/Questionnaire/questionList', + component: './Questionnaire/questionList' + }, + {//问卷调查新增 + name: 'questionAdd', + path: '/Questionnaire/questionAdd', + component: './Questionnaire/questionAdd' + }, + {//问卷统计 + name: 'QuestionStatistics', + path: '/Questionnaire/questionStatistics', + component: './Questionnaire/questionStatistics' + }, + ], + }, + {//我的工作台 + name: 'workbench', + icon: 'DesktopOutlined', + //authority: ['ebtp-expert'], + path: '/workbench', + routes: [ + { name: 'commonFiles', path: '/workbench/files', component: './workbench/files/components/FilesList' },//共享文档下载-所有角色 + { name: 'commonFilesManage', path: '/workbench/filesManage', component: './workbench/filesManage/components/filesManage' },//共享文档管理-系统管理员 + ] + }, + { name: 'systemMessage', path: '/SystemMessage/message', component: './SystemMessage/message' },//系统消息-所有角色 + { + component: './404', + }, + ], + }, + { + component: './404', + }, + ], + }, + { + component: './404', + }, + +]; diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..4c4eeaf --- /dev/null +++ b/jest.config.js @@ -0,0 +1,9 @@ +module.exports = { + testURL: 'http://localhost:8000', + testEnvironment: './tests/PuppeteerEnvironment', + verbose: false, + globals: { + ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: false, + localStorage: null, + }, +}; diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..f87334d --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/mock/listTableList.ts b/mock/listTableList.ts new file mode 100644 index 0000000..179890a --- /dev/null +++ b/mock/listTableList.ts @@ -0,0 +1,172 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { Request, Response } from 'express'; +import { parse } from 'url'; +import { TableListItem, TableListParams } from '@/pages/ListTableList/data'; + +// mock tableListDataSource +const genList = (current: number, pageSize: number) => { + const tableListDataSource: TableListItem[] = []; + + for (let i = 0; i < pageSize; i += 1) { + const index = (current - 1) * 10 + i; + tableListDataSource.push({ + key: index, + disabled: i % 6 === 0, + href: 'https://ant.design', + avatar: [ + 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', + 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png', + ][i % 2], + name: `TradeCode ${index}`, + owner: '曲丽丽', + desc: '这是一段描述', + callNo: Math.floor(Math.random() * 1000), + status: Math.floor(Math.random() * 10) % 4, + updatedAt: new Date(), + createdAt: new Date(), + progress: Math.ceil(Math.random() * 100), + }); + } + tableListDataSource.reverse(); + return tableListDataSource; +}; + +let tableListDataSource = genList(1, 100); + +function getRule(req: Request, res: Response, u: string) { + let realUrl = u; + if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') { + realUrl = req.url; + } + const { current = 1, pageSize = 10 } = req.query; + const params = (parse(realUrl, true).query as unknown) as TableListParams; + + let dataSource = [...tableListDataSource].slice( + ((current as number) - 1) * (pageSize as number), + (current as number) * (pageSize as number), + ); + const sorter = JSON.parse(params.sorter as any); + if (sorter) { + dataSource = dataSource.sort((prev, next) => { + let sortNumber = 0; + Object.keys(sorter).forEach((key) => { + if (sorter[key] === 'descend') { + if (prev[key] - next[key] > 0) { + sortNumber += -1; + } else { + sortNumber += 1; + } + return; + } + if (prev[key] - next[key] > 0) { + sortNumber += 1; + } else { + sortNumber += -1; + } + }); + return sortNumber; + }); + } + if (params.filter) { + const filter = JSON.parse(params.filter as any) as { + [key: string]: string[]; + }; + if (Object.keys(filter).length > 0) { + dataSource = dataSource.filter((item) => { + return Object.keys(filter).some((key) => { + if (!filter[key]) { + return true; + } + if (filter[key].includes(`${item[key]}`)) { + return true; + } + return false; + }); + }); + } + } + + if (params.name) { + dataSource = dataSource.filter((data) => data.name.includes(params.name || '')); + } + const result = { + data: dataSource, + total: tableListDataSource.length, + success: true, + pageSize, + current: parseInt(`${params.currentPage}`, 10) || 1, + }; + + return res.json(result); +} + +function postRule(req: Request, res: Response, u: string, b: Request) { + + let realUrl = u; + if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') { + realUrl = req.url; + } + + const body = (b && b.body) || req.body; + const { method, name, desc, key } = body; + + switch (method) { + /* eslint no-case-declarations:0 */ + case 'delete': + tableListDataSource = tableListDataSource.filter((item) => key.indexOf(item.key) === -1); + break; + case 'post': + (() => { + const i = Math.ceil(Math.random() * 10000); + const newRule = { + key: tableListDataSource.length, + href: 'https://ant.design', + avatar: [ + 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', + 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png', + ][i % 2], + name, + owner: '曲丽丽', + desc, + callNo: Math.floor(Math.random() * 1000), + status: Math.floor(Math.random() * 10) % 2, + updatedAt: new Date(), + createdAt: new Date(), + progress: Math.ceil(Math.random() * 100), + }; + tableListDataSource.unshift(newRule); + return res.json(newRule); + })(); + return; + + case 'update': + (() => { + let newRule = {}; + tableListDataSource = tableListDataSource.map((item) => { + if (item.key === key) { + newRule = { ...item, desc, name }; + return { ...item, desc, name }; + } + return item; + }); + return res.json(newRule); + })(); + return; + default: + break; + } + + const result = { + list: tableListDataSource, + pagination: { + total: tableListDataSource.length, + }, + }; + + res.json(result); +} + +export default { + 'GET /api/rule': getRule, + 'POST /api/rule': postRule, +}; diff --git a/mock/newList.ts b/mock/newList.ts new file mode 100644 index 0000000..cd23e8b --- /dev/null +++ b/mock/newList.ts @@ -0,0 +1,131 @@ + +import { Request, Response } from 'express'; +//获取日历数据 +const getCalendarList = (req:Request ,res: Response) => { + const body = req.body; + const { year,month } = body; + const getData = (month1: any,year1: any) => { + if(year1 == 2021 || year1 == '2021') { + let data: any + switch (month1) { + case 1: + data = { + '2021-01-01': {number: 2, message: ['10:00','13:40']}, + '2021-01-07': {number: 3, message: ['11:00','13:40','13:40']}, + '2021-01-08': {number: 1, message: ['13:00']}, + '2021-01-14': {number: 2, message: ['12:10','13:40']}, + '2021-01-25': {number: 3, message: ['10:30','13:40','13:40']}, + } + break; + case 2: + data = { + '2021-02-06': {number: 1, message: ['10:00','13:40']}, + '2021-02-12': {number: 5, message: ['10:00','13:40','10:00','13:40','10:00']}, + } + break; + case 3: + data = { + '2021-03-09': {number: 6, message: ['10:00','13:40','10:00','13:40','10:00','13:40']}, + '2021-03-15': {number: 1, message: ['10:00','13:40']}, + '2021-03-21': {number: 4, message: ['10:00','13:40','10:00','13:40']}, + '2021-03-22': {number: 2, message: ['10:00','13:40']}, + '2021-03-30': {number: 3, message: ['10:00','13:40','13:40']}, + } + break; + case 4: + data = { + '2021-04-01': {number: 2, message: ['10:00','13:40']}, + '2021-04-07': {number: 2, message: ['10:00','13:40']}, + '2021-04-08': {number: 2, message: ['10:00','13:40']}, + '2021-04-14': {number: 2, message: ['10:00','13:40']}, + '2021-04-19': {number: 2, message: ['10:00','13:40']}, + } + break; + case 5: + data = { + '2021-05-03': {number: 2, message: ['10:00','13:40']}, + '2021-05-09': {number: 2, message: ['10:00','13:40']}, + '2021-05-18': {number: 2, message: ['10:00','13:40']}, + '2021-05-22': {number: 2, message: ['10:00','13:40']}, + } + break; + case 6: + data = { + '2021-06-01': {number: 2, message: ['10:00','13:40']}, + '2021-06-07': {number: 2, message: ['10:00','13:40']}, + '2021-06-09': {number: 2, message: ['10:00','13:40']}, + '2021-06-14': {number: 2, message: ['10:00','13:40']}, + '2021-06-21': {number: 2, message: ['10:00','13:40']}, + } + break; + case 7: + data = { + '2021-07-08': {number: 2, message: ['10:00','13:40']}, + '2021-07-09': {number: 2, message: ['10:00','13:40']}, + '2021-07-10': {number: 2, message: ['10:00','13:40']}, + '2021-07-14': {number: 2, message: ['10:00','13:40']}, + '2021-07-24': {number: 2, message: ['10:00','13:40']}, + } + break; + case 8: + data = { + '2021-08-12': {number: 2, message: ['10:00','13:40']}, + '2021-08-13': {number: 2, message: ['10:00','13:40']}, + '2021-08-14': {number: 2, message: ['10:00','13:40']}, + '2021-08-19': {number: 2, message: ['10:00','13:40']}, + } + break; + case 9: + data = { + '2021-09-11': {number: 2, message: ['10:00','13:40']}, + '2021-09-17': {number: 2, message: ['10:00','13:40']}, + '2021-09-18': {number: 2, message: ['10:00','13:40']}, + } + break; + case 10: + data = { + '2021-10-02': {number: 2, message: ['10:00','13:40']}, + '2021-10-10': {number: 2, message: ['10:00','13:40']}, + } + break; + case 11: + data = { + '2021-11-12': {number: 2, message: ['10:00','13:40']}, + '2021-11-13': {number: 2, message: ['10:00','13:40']}, + '2021-11-14': {number: 2, message: ['10:00','13:40']}, + '2021-11-15': {number: 2, message: ['10:00','13:40']}, + '2021-11-16': {number: 2, message: ['10:00','13:40']}, + } + break; + case 12: + data = { + '2021-12-07': {number: 2, message: ['10:00','13:40']}, + '2021-12-08': {number: 2, message: ['10:00','13:40']}, + '2021-12-14': {number: 2, message: ['10:00','13:40']}, + } + break; + default: + } + return data + } + } + (() => { + const newRule = { + code: 200, + data: { + ...getData(year,month-1), + ...getData(year,month), + ...getData(year,month+1) + }, + message: "success", + success: true + } + + return res.json(newRule); + })(); + return; +} + +export default { + 'POST /api/calendar': getCalendarList, +} \ No newline at end of file diff --git a/mock/notices.ts b/mock/notices.ts new file mode 100644 index 0000000..b9e3bf2 --- /dev/null +++ b/mock/notices.ts @@ -0,0 +1,105 @@ +import { Request, Response } from 'express'; + +const getNotices = (req: Request, res: Response) => { + res.json([ + { + id: '000000001', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', + title: '你收到了 14 份新周报', + datetime: '2017-08-09', + type: 'notification', + }, + { + id: '000000002', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png', + title: '你推荐的 曲妮妮 已通过第三轮面试', + datetime: '2017-08-08', + type: 'notification', + }, + { + id: '000000003', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png', + title: '这种模板可以区分多种通知类型', + datetime: '2017-08-07', + read: true, + type: 'notification', + }, + { + id: '000000004', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + datetime: '2017-08-07', + type: 'notification', + }, + { + id: '000000005', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', + title: '内容不要超过两行字,超出时自动截断', + datetime: '2017-08-07', + type: 'notification', + }, + { + id: '000000006', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', + title: '曲丽丽 评论了你', + description: '描述信息描述信息描述信息', + datetime: '2017-08-07', + type: 'message', + clickClose: true, + }, + { + id: '000000007', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', + title: '朱偏右 回复了你', + description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像', + datetime: '2017-08-07', + type: 'message', + clickClose: true, + }, + { + id: '000000008', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', + title: '标题', + description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像', + datetime: '2017-08-07', + type: 'message', + clickClose: true, + }, + { + id: '000000009', + title: '任务名称', + description: '任务需要在 2017-01-12 20:00 前启动', + extra: '未开始', + status: 'todo', + type: 'event', + }, + { + id: '000000010', + title: '第三方紧急代码变更', + description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务', + extra: '马上到期', + status: 'urgent', + type: 'event', + }, + { + id: '000000011', + title: '信息安全考试', + description: '指派竹尔于 2017-01-09 前完成更新并发布', + extra: '已耗时 8 天', + status: 'doing', + type: 'event', + }, + { + id: '000000012', + title: 'ABCD 版本发布', + description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务', + extra: '进行中', + status: 'processing', + type: 'event', + }, + ]); +}; + +export default { + 'GET /api/notices': getNotices, +}; diff --git a/mock/profileBasicMock.ts b/mock/profileBasicMock.ts new file mode 100644 index 0000000..b52499a --- /dev/null +++ b/mock/profileBasicMock.ts @@ -0,0 +1,86 @@ +const basicGoods = [ + { + id: '1234561', + name: '矿泉水 550ml', + barcode: '12421432143214321', + price: '2.00', + num: '1', + amount: '2.00', + }, + { + id: '1234562', + name: '凉茶 300ml', + barcode: '12421432143214322', + price: '3.00', + num: '2', + amount: '6.00', + }, + { + id: '1234563', + name: '好吃的薯片', + barcode: '12421432143214323', + price: '7.00', + num: '4', + amount: '28.00', + }, + { + id: '1234564', + name: '特别好吃的蛋卷', + barcode: '12421432143214324', + price: '8.50', + num: '3', + amount: '25.50', + }, +]; + +const basicProgress = [ + { + key: '1', + time: '2017-10-01 14:10', + rate: '联系客户', + status: 'processing', + operator: '取货员 ID1234', + cost: '5mins', + }, + { + key: '2', + time: '2017-10-01 14:05', + rate: '取货员出发', + status: 'success', + operator: '取货员 ID1234', + cost: '1h', + }, + { + key: '3', + time: '2017-10-01 13:05', + rate: '取货员接单', + status: 'success', + operator: '取货员 ID1234', + cost: '5mins', + }, + { + key: '4', + time: '2017-10-01 13:00', + rate: '申请审批通过', + status: 'success', + operator: '系统', + cost: '1h', + }, + { + key: '5', + time: '2017-10-01 12:00', + rate: '发起退货申请', + status: 'success', + operator: '用户', + cost: '5mins', + }, +]; + +const getProfileBasicData = { + basicGoods, + basicProgress, +}; + +export default { + 'GET /api/profile/basic': getProfileBasicData, +}; diff --git a/mock/route.ts b/mock/route.ts new file mode 100644 index 0000000..418d10f --- /dev/null +++ b/mock/route.ts @@ -0,0 +1,5 @@ +export default { + '/api/auth_routes': { + '/form/advanced-form': { authority: ['admin', 'user'] }, + }, +}; diff --git a/mock/user.ts b/mock/user.ts new file mode 100644 index 0000000..0a7f305 --- /dev/null +++ b/mock/user.ts @@ -0,0 +1,154 @@ +import { Request, Response } from 'express'; + +function getFakeCaptcha(req: Request, res: Response) { + return res.json('captcha-xxx'); +} +// 代码中会兼容本地 service mock 以及部署站点的静态数据 +export default { + // 支持值为 Object 和 Array + 'GET /api/currentUser': { + name: 'Serati Ma', + avatar: 'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png', + userid: '00000001', + email: 'antdesign@alipay.com', + signature: '海纳百川,有容乃大', + title: '交互专家', + group: '蚂蚁集团-某某某事业群-某某平台部-某某技术部-UED', + tags: [ + { + key: '0', + label: '很有想法的', + }, + { + key: '1', + label: '专注设计', + }, + { + key: '2', + label: '辣~', + }, + { + key: '3', + label: '大长腿', + }, + { + key: '4', + label: '川妹子', + }, + { + key: '5', + label: '海纳百川', + }, + ], + notifyCount: 12, + unreadCount: 11, + country: 'China', + geographic: { + province: { + label: '浙江省', + key: '330000', + }, + city: { + label: '杭州市', + key: '330100', + }, + }, + address: '西湖区工专路 77 号', + phone: '0752-268888888', + }, + // GET POST 可省略 + 'GET /api/users': [ + { + key: '1', + name: 'John Brown', + age: 32, + address: 'New York No. 1 Lake Park', + }, + { + key: '2', + name: 'Jim Green', + age: 42, + address: 'London No. 1 Lake Park', + }, + { + key: '3', + name: 'Joe Black', + age: 32, + address: 'Sidney No. 1 Lake Park', + }, + ], + 'POST /api/login/account': (req: Request, res: Response) => { + const { password, userName, type } = req.body; + if (password === 'ant.design' && userName === 'admin') { + res.send({ + status: 'ok', + type, + currentAuthority: 'admin', + }); + return; + } + if (password === 'ant.design' && userName === 'user') { + res.send({ + status: 'ok', + type, + currentAuthority: 'user', + }); + return; + } + if (type === 'mobile') { + res.send({ + status: 'ok', + type, + currentAuthority: 'admin', + }); + return; + } + + res.send({ + status: 'error', + type, + currentAuthority: 'guest', + }); + }, + 'POST /api/register': (req: Request, res: Response) => { + res.send({ status: 'ok', currentAuthority: 'user' }); + }, + 'GET /api/500': (req: Request, res: Response) => { + res.status(500).send({ + timestamp: 1513932555104, + status: 500, + error: 'error', + message: 'error', + path: '/base/category/list', + }); + }, + 'GET /api/404': (req: Request, res: Response) => { + res.status(404).send({ + timestamp: 1513932643431, + status: 404, + error: 'Not Found', + message: 'No message available', + path: '/base/category/list/2121212', + }); + }, + 'GET /api/403': (req: Request, res: Response) => { + res.status(403).send({ + timestamp: 1513932555104, + status: 403, + error: 'Unauthorized', + message: 'Unauthorized', + path: '/base/category/list', + }); + }, + 'GET /api/401': (req: Request, res: Response) => { + res.status(401).send({ + timestamp: 1513932555104, + status: 401, + error: 'Unauthorized', + message: 'Unauthorized', + path: '/base/category/list', + }); + }, + + 'GET /api/login/captcha': getFakeCaptcha, +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..9353ae1 --- /dev/null +++ b/package.json @@ -0,0 +1,175 @@ +{ + "name": "ant-design-pro", + "version": "4.2.1", + "private": true, + "description": "An out-of-box UI solution for enterprise applications", + "scripts": { + "start-dev": "cross-env UMI_UI=none UMI_ENV=dev LOGIN_PATH=ebtp-frontend umi dev --port=3000", + "start-UAT": "cross-env NODE_OPTIONS=--openssl-legacy-provider UMI_UI=none UMI_ENV=UAT LOGIN_PATH=ebtp-frontend umi dev --port=3000", + "start-sim": "cross-env UMI_UI=none UMI_ENV=sim LOGIN_PATH=ebtp-frontend umi dev --port=3000", + "start-prod": "cross-env UMI_UI=none UMI_ENV=prod LOGIN_PATH=prod/ebtp-frontend umi dev --port=3000", + "build-dev": "cross-env UMI_ENV=dev LOGIN_PATH=ebtp-frontend umi build", + "build-UAT": "cross-env UMI_ENV=UAT LOGIN_PATH=ebtp-frontend umi build", + "build-sim": "cross-env UMI_ENV=sim LOGIN_PATH=ebtp-frontend umi build", + "build-prod": "cross-env UMI_ENV=prod LOGIN_PATH=prod/ebtp-frontend umi build", + "analyze": "cross-env ANALYZE=1 umi build", + "build": "umi build", + "deploy": "npm run site && npm run gh-pages", + "dev": "npm run start:dev", + "docker-hub:build": "docker build -f Dockerfile.hub -t ant-design-pro ./", + "docker-prod:build": "docker-compose -f ./docker/docker-compose.yml build", + "docker-prod:dev": "docker-compose -f ./docker/docker-compose.yml up", + "docker:build": "docker-compose -f ./docker/docker-compose.dev.yml build", + "docker:dev": "docker-compose -f ./docker/docker-compose.dev.yml up", + "docker:push": "npm run docker-hub:build && npm run docker:tag && docker push antdesign/ant-design-pro", + "docker:tag": "docker tag ant-design-pro antdesign/ant-design-pro", + "fetch:blocks": "pro fetch-blocks && npm run prettier", + "gh-pages": "gh-pages -d dist", + "i18n-remove": "pro i18n-remove --locale=zh-CN --write", + "postinstall": "umi g tmp", + "lint": "umi g tmp && npm run lint:js && npm run lint:style && npm run lint:prettier", + "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ", + "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style", + "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src", + "lint:prettier": "prettier --check \"src/**/*\" --end-of-line auto", + "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less", + "prettier": "prettier -c --write \"src/**/*\"", + "site": "npm run fetch:blocks && npm run build", + "start:dev": "cross-env REACT_APP_ENV=dev MOCK=none umi dev", + "start:no-mock": "cross-env MOCK=none umi dev", + "start:no-ui": "cross-env UMI_UI=none umi dev", + "start:pre": "cross-env REACT_APP_ENV=pre umi dev", + "start:test": "cross-env REACT_APP_ENV=test MOCK=none umi dev", + "pretest": "node ./tests/beforeTest", + "test": "umi test", + "test:all": "node ./tests/run-tests.js", + "test:component": "umi test ./src/components", + "tsc": "tsc --noEmit" + }, + "lint-staged": { + "**/*.less": "stylelint --syntax less", + "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js", + "**/*.{js,jsx,tsx,ts,less,md,json}": [ + "prettier --write" + ] + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 10" + ], + "dependencies": { + "@ant-design/icons": "4.6.2", + "@ant-design/pro-card": "1.11.8", + "@ant-design/pro-descriptions": "1.7.0", + "@ant-design/pro-layout": "6.16.2", + "@ant-design/pro-list": "1.6.0", + "@ant-design/pro-table": "2.34.0", + "@material-ui/core": "4.11.3", + "@types/react-cookies": "0.1.0", + "@umijs/route-utils": "1.0.37", + "antd": "4.15.1", + "array-move": "3.0.1", + "axios": "0.21.1", + "classnames": "2.3.1", + "dva": "2.4.1", + "echarts": "^5.2.2", + "echarts-for-react": "^3.0.2", + "lodash": "4.17.21", + "moment": "^2.29.4", + "omit.js": "2.0.2", + "prop-types": "15.7.2", + "qs": "6.10.1", + "react": "16.14.0", + "react-axios": "2.0.5", + "react-cookies": "0.1.1", + "react-dom": "16.14.0", + "react-fast-marquee": "1.3.2", + "react-helmet-async": "^1.0.9", + "react-player": "^2.12.0", + "react-signature-canvas": "^1.0.3", + "react-sortable-hoc": "^1.11.0", + "sm-crypto": "0.2.5", + "umi": "^3.4.8", + "umi-request": "^1.3.5", + "use-merge-value": "1.0.2", + "wangeditor": "4.7.5" + }, + "devDependencies": { + "@ant-design/pro-cli": "^1.0.18", + "@types/classnames": "^2.2.7", + "@types/express": "^4.17.0", + "@types/history": "^4.7.2", + "@types/jest": "^26.0.0", + "@types/lodash": "^4.14.144", + "@types/qs": "^6.5.3", + "@types/react": "^16.9.17", + "@types/react-dom": "^16.8.4", + "@types/react-helmet": "^6.1.0", + "@types/react-signature-canvas": "^1.0.2", + "@umijs/fabric": "^2.2.0", + "@umijs/plugin-blocks": "^2.0.5", + "@umijs/preset-ant-design-pro": "^1.2.0", + "@umijs/preset-react": "^1.4.8", + "@umijs/preset-ui": "^2.0.9", + "@umijs/yorkie": "^2.0.3", + "carlo": "^0.9.46", + "chalk": "^4.0.0", + "cross-env": "^7.0.3", + "cross-port-killer": "^1.1.1", + "detect-installer": "^1.0.1", + "enzyme": "^3.11.0", + "eslint": "^7.1.0", + "express": "^4.17.1", + "gh-pages": "^3.0.0", + "jsdom-global": "^3.0.2", + "lint-staged": "^10.0.0", + "mockjs": "^1.0.1-beta3", + "prettier": "^2.0.1", + "pro-download": "1.0.1", + "puppeteer-core": "^5.0.0", + "react-iframe": "^1.8.0", + "react-pdf-js": "^4.0.1", + "stylelint": "^13.0.0", + "typescript": "^3.9.7" + }, + "engines": { + "node": ">=10.0.0" + }, + "checkFiles": [ + "src/**/*.js*", + "src/**/*.ts*", + "src/**/*.less", + "config/**/*.js*", + "scripts/**/*.js" + ], + "create-umi": { + "ignoreScript": [ + "docker*", + "functions*", + "site", + "generateMock" + ], + "ignoreDependencies": [ + "netlify*", + "serverless" + ], + "ignore": [ + ".dockerignore", + ".git", + ".github", + ".gitpod.yml", + "CODE_OF_CONDUCT.md", + "Dockerfile", + "Dockerfile.*", + "lambda", + "LICENSE", + "netlify.toml", + "README.*.md", + "azure-pipelines.yml", + "docker", + "CNAME", + "create-umi" + ] + } +} diff --git a/public/CNAME b/public/CNAME new file mode 100644 index 0000000..30c2d4d --- /dev/null +++ b/public/CNAME @@ -0,0 +1 @@ +preview.pro.ant.design \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..29f0ff4 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/home_bg.png b/public/home_bg.png new file mode 100644 index 0000000..7c92a4b Binary files /dev/null and b/public/home_bg.png differ diff --git a/public/icons/icon-128x128.png b/public/icons/icon-128x128.png new file mode 100644 index 0000000..48d0e23 Binary files /dev/null and b/public/icons/icon-128x128.png differ diff --git a/public/icons/icon-192x192.png b/public/icons/icon-192x192.png new file mode 100644 index 0000000..938e9b5 Binary files /dev/null and b/public/icons/icon-192x192.png differ diff --git a/public/icons/icon-512x512.png b/public/icons/icon-512x512.png new file mode 100644 index 0000000..21fc108 Binary files /dev/null and b/public/icons/icon-512x512.png differ diff --git a/public/information-release/ebtp/background.jpg b/public/information-release/ebtp/background.jpg new file mode 100644 index 0000000..844ff96 Binary files /dev/null and b/public/information-release/ebtp/background.jpg differ diff --git a/public/information-release/ebtp/ebtp-release-jl-screen.html b/public/information-release/ebtp/ebtp-release-jl-screen.html new file mode 100644 index 0000000..0e6d868 --- /dev/null +++ b/public/information-release/ebtp/ebtp-release-jl-screen.html @@ -0,0 +1,209 @@ + + + +
+ + + +
+ 会议名称:——
+ 会议事项:——
+ 会议时间:——
+ 预约人员:——
+ 联系方式:——
+