From c94ab906c0813896d05106ffb1731e9149429c96 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Mon, 3 Nov 2025 08:38:38 +0800 Subject: [PATCH] init --- .editorconfig | 13 + .gitignore | 14 + .vscode/settings.json | 47 + README.md | 75 ++ blessed_by_buddha.js | 66 + eslint.config.js | 48 + jjb.babel.js | 23 + jjb.config.js | 77 ++ jsconfig.json | 9 + package.json | 47 + public/index.html | 54 + src/api/global/index.js | 11 + src/components/LeftTree/index.js | 147 +++ src/components/index.js | 1 + src/enumerate/constant/index.js | 5 + src/enumerate/context/index.js | 8 + src/enumerate/namespace/index.js | 7 + src/main.js | 47 + .../Enterprise/CorpInfo/Info/index.js | 75 ++ .../Enterprise/CorpInfo/Update/index.js | 242 ++++ .../Container/Enterprise/CorpInfo/index.js | 9 + .../IndustryQualification/Add/index.js | 31 + .../IndustryQualification/List/index.js | 52 + .../Enterprise/IndustryQualification/index.js | 9 + .../Enterprise/OrganizationStructure/index.js | 147 +++ .../Container/Enterprise/Position/index.js | 161 +++ .../Container/Enterprise/User/Add/index.js | 298 +++++ .../Container/Enterprise/User/List/index.js | 154 +++ .../User/components/Scheduling/index.js | 122 ++ src/pages/Container/Enterprise/User/index.js | 9 + src/pages/Container/Enterprise/index.js | 9 + src/pages/Container/Entry/index.js | 31 + .../CorpInfo/components/Qualification.js | 155 +++ .../Container/Stakeholder/CorpInfo/index.js | 93 ++ .../Container/Stakeholder/Department/index.js | 145 +++ .../SecurityPersonnelInfo/index.js | 49 + .../SpecialOperationPersonnel/index.js | 51 + .../Container/Stakeholder/User/Add/index.js | 272 ++++ .../Container/Stakeholder/User/List/index.js | 112 ++ .../Container/Stakeholder/User/View/index.js | 1126 +++++++++++++++++ src/pages/Container/Stakeholder/User/index.js | 9 + src/pages/Container/Stakeholder/index.js | 9 + src/pages/Container/Supervision/index.js | 9 + src/pages/Container/index.js | 101 ++ src/pages/index.js | 8 + webstorm.config.js | 16 + 46 files changed, 4203 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 README.md create mode 100644 blessed_by_buddha.js create mode 100644 eslint.config.js create mode 100644 jjb.babel.js create mode 100644 jjb.config.js create mode 100644 jsconfig.json create mode 100644 package.json create mode 100644 public/index.html create mode 100644 src/api/global/index.js create mode 100644 src/components/LeftTree/index.js create mode 100644 src/components/index.js create mode 100644 src/enumerate/constant/index.js create mode 100644 src/enumerate/context/index.js create mode 100644 src/enumerate/namespace/index.js create mode 100644 src/main.js create mode 100644 src/pages/Container/Enterprise/CorpInfo/Info/index.js create mode 100644 src/pages/Container/Enterprise/CorpInfo/Update/index.js create mode 100644 src/pages/Container/Enterprise/CorpInfo/index.js create mode 100644 src/pages/Container/Enterprise/IndustryQualification/Add/index.js create mode 100644 src/pages/Container/Enterprise/IndustryQualification/List/index.js create mode 100644 src/pages/Container/Enterprise/IndustryQualification/index.js create mode 100644 src/pages/Container/Enterprise/OrganizationStructure/index.js create mode 100644 src/pages/Container/Enterprise/Position/index.js create mode 100644 src/pages/Container/Enterprise/User/Add/index.js create mode 100644 src/pages/Container/Enterprise/User/List/index.js create mode 100644 src/pages/Container/Enterprise/User/components/Scheduling/index.js create mode 100644 src/pages/Container/Enterprise/User/index.js create mode 100644 src/pages/Container/Enterprise/index.js create mode 100644 src/pages/Container/Entry/index.js create mode 100644 src/pages/Container/Stakeholder/CorpInfo/components/Qualification.js create mode 100644 src/pages/Container/Stakeholder/CorpInfo/index.js create mode 100644 src/pages/Container/Stakeholder/Department/index.js create mode 100644 src/pages/Container/Stakeholder/SecurityPersonnelInfo/index.js create mode 100644 src/pages/Container/Stakeholder/SpecialOperationPersonnel/index.js create mode 100644 src/pages/Container/Stakeholder/User/Add/index.js create mode 100644 src/pages/Container/Stakeholder/User/List/index.js create mode 100644 src/pages/Container/Stakeholder/User/View/index.js create mode 100644 src/pages/Container/Stakeholder/User/index.js create mode 100644 src/pages/Container/Stakeholder/index.js create mode 100644 src/pages/Container/Supervision/index.js create mode 100644 src/pages/Container/index.js create mode 100644 src/pages/index.js create mode 100644 webstorm.config.js diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..271822f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b840685 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules + +# production +/dist +/demo + +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.idea +yarn.lock \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..96ed201 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,47 @@ +{ + "prettier.enable": false, + "editor.formatOnSave": false, + + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + + "eslint.rules.customizations": [ + { "rule": "style/*", "severity": "off", "fixable": true }, + { "rule": "format/*", "severity": "off", "fixable": true }, + { "rule": "*-indent", "severity": "off", "fixable": true }, + { "rule": "*-spacing", "severity": "off", "fixable": true }, + { "rule": "*-spaces", "severity": "off", "fixable": true }, + { "rule": "*-order", "severity": "off", "fixable": true }, + { "rule": "*-dangle", "severity": "off", "fixable": true }, + { "rule": "*-newline", "severity": "off", "fixable": true }, + { "rule": "*quotes", "severity": "off", "fixable": true }, + { "rule": "*semi", "severity": "off", "fixable": true } + ], + + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "json5", + "jsonc", + "yaml", + "toml", + "xml", + "gql", + "graphql", + "astro", + "svelte", + "css", + "less", + "scss", + "pcss", + "postcss" + ] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..a3da031 --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ +# 微应用模板说明文档 + +## 在线文档 + +https://www.yuque.com/buhangjiecheshen-ymbtb/qc0093/gxdun1dphetcurko + + +## 安装依赖 +项目依赖可通过 **yarn** 或 **npm** 进行安装: + +```bash +# 使用 yarn +yarn + +# 或使用 npm +npm i +``` + +## 开发服务&打包应用 + +```bash +# 启动开发服务 +yarn serve: +# 或 +npm run serve: + +# 开发环境打包 +yarn build: +# 或 +npm run build: +``` + +## 路由配置&路由访问&自动化路由 +所有页面必须放在`src/pages/container`目录下,启动访问页面请在浏览器地址栏输入`//container/<你的路由页面文件名称>` +解释: +1. 所有页面组件命名为`index.js`或`index.jsx`,必须放在一个首字母大写的文件中。 +2. `container`为固定路径访问格式 +3. ``为应用的唯一标识符,也是应用路由的`basename`,在底座中用于区分其他应用。可在根目录 `jjb.config.js` 文件的 `appIdentifier` 节点中进行修改。 +4. 自动化路由将根据`pages/container`中的路由页面文件自动生成路由树。 +5. `id`匹配路由,文件夹命名`_id` + +## 应用接口环境配置 +应用接口环境相关配置在根目录 `jjb.config.js` 文件的 `environment` 节点中进行定义。 + +## 应用开发服务配置 +应用开发服务相关配置在根目录 `jjb.config.js` 文件的 `server` 节点中进行定义。 + +## Babel 配置 +应用的 `Babel` 配置在根目录 `jjb.babel.js` 文件中进行管理。 + +## 目录说明 + +1. `src/api/` 配置各个 store 模块的接口数据。 +2. `src/components/` 全局公共组件。 +3. `src/enumerate/` 全局各种枚举配置。 +4. `src/pages/` 页面文件目录。 +5. `src/main.js` 应用的入口文件。 + +## 核心依赖 +1. `@cqsjjb/jjb-common-decorator` + 1. 公共装饰器库,内部包含: + 1. 按钮权限处理 + 2. antd/Table 控制 + 3. 文本重命名处理 + 4. 具体使用方式可参考各个模块的 `d.ts`。 +2. `@cqsjjb/jjb-common-lib` + 1. 公共工具库,具体 API 使用请查看 `d.ts` +3. `@cqsjjb/jjb-dva-runtime` + 1. 核心运行时,基于 `dvajs` 实现。 + 1. 应用核心依赖模块 + 2. 应用的自动化路由 + 3. `store` 模块接口数据处理 + 4. 均基于此依赖实现,具体使用方式请查看 `d.ts`。 +4. `@cqsjjb/jjb-react-admin-component` + 1. 公共组件库,具体组件使用方式请查看 `d.ts`。 diff --git a/blessed_by_buddha.js b/blessed_by_buddha.js new file mode 100644 index 0000000..340fa53 --- /dev/null +++ b/blessed_by_buddha.js @@ -0,0 +1,66 @@ +/* + _ooOoo_ + o8888888o + 88" . "88 + (| -_- |) + O\ = /O + ____/`---'\____ + . ' \\| |// `. + / \\||| : |||// \ + / _||||| -:- |||||- \ + | | \\\ - /// | | + | \_| ''\---/'' | | + \ .-\__ `-` ___/-. / + ___`. .' /--.--\ `. . __ + ."" '< `.___\_<|>_/___.' >'"". + | | : `- \`.;`\ _ /`;.`/ - ` : | | + \ \ `-. \_ __\ /__ _/ .-` / / + ======`-.____`-.___\_____/___.-`____.-'====== + `=---=' + + ............................................. + 佛祖保佑 永无BUG + 佛曰: + 写字楼里写字间,写字间里程序员; + 程序人员写程序,又拿程序换酒钱。 + 酒醒只在网上坐,酒醉还来网下眠; + 酒醉酒醒日复日,网上网下年复年。 + 但愿老死电脑间,不愿鞠躬老板前; + 奔驰宝马贵者趣,公交自行程序员。 + 别人笑我忒疯癫,我笑自己命太贱; + 不见满街漂亮妹,哪个归得程序员? + */ + +const blessedByBuddha + = "%c _ooOoo_\n" + + " o8888888o\n" + + " 88\" . \"88\n" + + " (| -_- |)\n" + + " O\\ = /O\n" + + " ____/`---'\\____\n" + + " . ' \\\\| |// `.\n" + + " / \\\\||| : |||// \\\n" + + " / _||||| -:- |||||- \\\n" + + " | | \\\\\\ - /// | |\n" + + " | \\_| ''\\---/'' | |\n" + + " \\ .-\\__ `-` ___/-. /\n" + + " ___`. .' /--.--\\ `. . __\n" + + " .\"\" '< `.___\\_<|>_/___.' >'\"\".\n" + + " | | : `- \\`.;`\\ _ /`;.`/ - ` : | |\n" + + " \\ \\ `-. \\_ __\\ /__ _/ .-` / /\n" + + " ======`-.____`-.___\\_____/___.-`____.-'======\n" + + " `=---='\n" + + "\n" + + "%c .............................................\n" + + " 佛祖保佑 永无BUG\n" + + "\n" + + "%c 佛曰:\n" + + " 写字楼里写字间,写字间里程序员;\n" + + " 程序人员写程序,又拿程序换酒钱。\n" + + " 酒醒只在网上坐,酒醉还来网下眠;\n" + + " 酒醉酒醒日复日,网上网下年复年。\n" + + " 但愿老死电脑间,不愿鞠躬老板前;\n" + + " 奔驰宝马贵者趣,公交自行程序员。\n" + + " 别人笑我忒疯癫,我笑自己命太贱;\n" + + " 不见满街漂亮妹,哪个归得程序员?"; +console.log(blessedByBuddha, "color:#ffd700", "color:red", "color:#1e80ff"); diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..06fcf00 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,48 @@ +import antfu from "@antfu/eslint-config"; + +export default antfu({ + formatters: { + html: false, + css: true, + }, + test: false, + typescript: true, + react: true, + vue: false, + markdown: false, + stylistic: { + semi: true, + quotes: "double", + }, + overrides: { + react: { + "react/no-comment-textnodes": "off", + "react-hooks-extra/no-unnecessary-use-prefix": "off", + "react-hooks-extra/prefer-use-state-lazy-initialization": "off", + "react-hooks/exhaustive-deps": "off", + }, + javascript: { + "no-console": process.env.NODE_ENV === "production" ? "error" : "warn", + "no-debugger": process.env.NODE_ENV === "production" ? "error" : "warn", + "no-alert": process.env.NODE_ENV === "production" ? "error" : "warn", + "no-restricted-syntax": [ + "error", + { + selector: "VariableDeclarator[id.name='pd']", + message: "不允许使用 pd,请改用有语义化的变量名", + }, + { + selector: "ObjectExpression > Property[key.name='pd']", + message: "不允许使用 pd,请改用有语义化的变量名", + }, + ], + "no-unused-vars": ["error", { varsIgnorePattern: "^React$" }], + }, + }, + rules: { + "antfu/top-level-function": "off", + "node/prefer-global/process": "off", + "dot-notation": "off", + "linebreak-style": ["off", "windows"], + }, +}); diff --git a/jjb.babel.js b/jjb.babel.js new file mode 100644 index 0000000..e58cbef --- /dev/null +++ b/jjb.babel.js @@ -0,0 +1,23 @@ +module.exports = { + compact: false, + // 插件 + plugins: [ + [ + "@babel/plugin-proposal-decorators", + { + legacy: true, + }, + ], + ], + // 预设 + presets: [ + ["@babel/preset-env", { + targets: { + browsers: ["ie >= 10"], + }, + }], + ["@babel/preset-react", { + runtime: "automatic", + }], + ], +}; diff --git a/jjb.config.js b/jjb.config.js new file mode 100644 index 0000000..6c9c6d1 --- /dev/null +++ b/jjb.config.js @@ -0,0 +1,77 @@ +module.exports = { + // 应用后端git地址,部署上线需要 + javaGit: "", + // 应用后端仓库名称,部署上线需要 + javaGitName: "", + // 环境配置 + environment: { + development: { + // 应用后端分支名称,部署上线需要 + javaGitBranch: "", + // 接口服务地址 + API_HOST: "开发环境后端地址", + }, + production: { + // 应用后端分支名称,部署上线需要 + javaGitBranch: "", + // 接口服务地址 + API_HOST: "", + }, + }, + // 应用唯一标识符 + appIdentifier: "basic_info", + // 应用上下文注入全局变量 + contextInject: { + // 应用Key + appKey: "", + fileUrl: "附件地址", + }, + // public/index.html注入全局变量 + windowInject: { + // 应用标题 + title: "微应用模板", + // 注入css链接集合 + links: [], + element: { + root: { + // 挂载DOM元素ID + id: "root", + }, + }, + // 注入js链接集合 + scripts: [ + "https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr", + ], + }, + // 开发服务 + server: { + // 监听端口号 + port: "8080", + // 服务地址 + host: "127.0.0.1", + // 是否自动打开浏览器 + open: true, + }, + // 框架 + framework: { + // ant-design + antd: { + // 全局antd-class-name前缀 + "ant-prefix": "micro-temp", + // 全局字体 + "fontFamily": "PingFangSC-Regular", + // 全局主题色 + "colorPrimary": "#1677ff", + // 全局圆角 + "borderRadius": 2, + }, + }, + // webpack + webpackConfig: { + // 单页面插件 + htmlWebpackPluginOption: { + // 自动注入编译后的文件到public/index.html中 + inject: true, + }, + }, +}; diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..4cf89dc --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "baseUrl": "src", + "paths": { + "~/*": ["*"] + } + }, + "include": ["src"] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..4f2fbd9 --- /dev/null +++ b/package.json @@ -0,0 +1,47 @@ +{ + "name": "micro-app", + "version": "2.0.0", + "description": "建教帮微应用模板", + "author": "JJB", + "license": "MIT", + "main": "index.js", + "scripts": { + "serve": "node node_modules/@cqsjjb/scripts/webpack.dev.server.js", + "build": "node node_modules/@cqsjjb/scripts/webpack.build.js", + "push": "jjb-cmd push java production", + "clean-cache": "rimraf node_modules/.cache/webpack", + "serve:development": "cross-env NODE_ENV=development npm run serve", + "serve:production": "cross-env NODE_ENV=production npm run serve", + "build:development": "cross-env NODE_ENV=development npm run build", + "build:production": "cross-env NODE_ENV=production npm run build", + "code-optimization": "node node_modules/@cqsjjb/scripts/code-optimization.js", + "lint": "eslint --ext .js,.jsx,.tsx --fix src" + }, + "dependencies": { + "@ant-design/icons": "latest", + "@ant-design/pro-components": "^2.8.10", + "@cqsjjb/jjb-common-decorator": "latest", + "@cqsjjb/jjb-common-lib": "latest", + "@cqsjjb/jjb-dva-runtime": "latest", + "@cqsjjb/jjb-react-admin-component": "latest", + "ahooks": "^3.9.5", + "antd": "latest", + "dayjs": "^1.11.7", + "lodash-es": "^4.17.21", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "zy-react-library": "latest" + }, + "devDependencies": { + "@antfu/eslint-config": "^5.4.1", + "@babel/plugin-proposal-decorators": "^7.19.3", + "@cqsjjb/scripts": "latest", + "@eslint-react/eslint-plugin": "^2.2.2", + "cross-env": "^7.0.3", + "eslint": "^9.37.0", + "eslint-plugin-format": "^1.0.2", + "eslint-plugin-react-hooks": "^7.0.0", + "eslint-plugin-react-refresh": "^0.4.23", + "typescript": "^5.9.3" + } +} diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..caf0d15 --- /dev/null +++ b/public/index.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + <% for (const item of $links) { %> + + <% } %> + -- + + + <% for (const item of $scripts) { %> + + <% } %> + + + + + + <% const { root } = $element; %> +
+ + diff --git a/src/api/global/index.js b/src/api/global/index.js new file mode 100644 index 0000000..ba35796 --- /dev/null +++ b/src/api/global/index.js @@ -0,0 +1,11 @@ +export {}; + +// export const riskList = declareRequest( +// "loading", +// "Post > @/xxx", +// "dataSource: [] | res.data || [] & total: 0 | res.totalCount || 0 & pageIndex: 1 | res.pageIndex || 1 & pageSize: 10 | res.pageSize || 10", +// ); +// export const riskDelete = declareRequest( +// "loading", +// "Delete > @/xxx/{id}", +// ); diff --git a/src/components/LeftTree/index.js b/src/components/LeftTree/index.js new file mode 100644 index 0000000..717683c --- /dev/null +++ b/src/components/LeftTree/index.js @@ -0,0 +1,147 @@ +import { Input, Tree } from "antd"; +import { useEffect, useState } from "react"; + +const { Search } = Input; + +const LeftTree = (props) => { + const { + onClick, + expandedKeys: externalExpandedKeys, + } = props; + + const [treeData, setTreeData] = useState([]); + const [expandedKeys, setExpandedKeys] = useState([]); + const [searchValue, setSearchValue] = useState(""); + const [autoExpandParent, setAutoExpandParent] = useState(true); + + const getData = () => { + setTreeData([ + { + title: "parent 1", + key: "0-0", + children: [ + { + title: "parent 1-0", + key: "0-0-0", + children: [ + { + title: "leaf", + key: "0-0-0-0", + }, + { + title: "leaf", + key: "0-0-0-1", + }, + ], + }, + { + title: "parent 1-1", + key: "0-0-1", + }, + ], + }, + ]); + }; + + useEffect(() => { + getData(); + }, []); + + useEffect(() => { + setExpandedKeys(externalExpandedKeys); + }, [externalExpandedKeys]); + + // 展开所有包含匹配项的父节点 + const getAllExpandedKeys = (data, searchValue, keys = []) => { + data.forEach((node) => { + if (node.children) { + if (node.title.includes(searchValue) + || node.children.some(child => child.title.includes(searchValue))) { + keys.push(node.key); + } + getAllExpandedKeys(node.children, searchValue, keys); + } + }); + return keys; + }; + + const onExpand = (newExpandedKeys) => { + setExpandedKeys(newExpandedKeys); + setAutoExpandParent(false); + }; + + const onFilterTreeData = (value) => { + setSearchValue(value); + setAutoExpandParent(true); + + if (!value) { + setExpandedKeys([]); + return; + } + + const expandedKeys = getAllExpandedKeys(treeData, value); + + setExpandedKeys(expandedKeys); + }; + + const onSearch = (value) => { + if (value === searchValue) + return; + onFilterTreeData(value); + }; + + // 渲染带高亮的标题 + const renderTitle = (title) => { + if (!searchValue) + return title; + + const index = title.indexOf(searchValue); + if (index === -1) + return title; + + const beforeStr = title.substring(0, index); + const afterStr = title.substring(index + searchValue.length); + + return ( + + {beforeStr} + {searchValue} + {afterStr} + + ); + }; + + // 递归处理树节点标题显示 + const processTreeData = (data) => { + return data.map(node => ({ + ...node, + title: renderTitle(node.title), + children: node.children ? processTreeData(node.children) : undefined, + })); + }; + + const processedTreeData = processTreeData(treeData); + + const onSelect = (selectedKeys, event) => { + onClick?.(selectedKeys, event); + }; + + return ( +
+ + +
+ ); +}; + +export default LeftTree; diff --git a/src/components/index.js b/src/components/index.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/components/index.js @@ -0,0 +1 @@ +export {}; diff --git a/src/enumerate/constant/index.js b/src/enumerate/constant/index.js new file mode 100644 index 0000000..f077757 --- /dev/null +++ b/src/enumerate/constant/index.js @@ -0,0 +1,5 @@ +/** + * 全局常量定义 + */ + +export {}; diff --git a/src/enumerate/context/index.js b/src/enumerate/context/index.js new file mode 100644 index 0000000..2b11e05 --- /dev/null +++ b/src/enumerate/context/index.js @@ -0,0 +1,8 @@ +/** + * 全局上下文定义 + */ + +import React from "react"; + +// 获取antd全局静态方法 +export const InjectContext = React.createContext({}); diff --git a/src/enumerate/namespace/index.js b/src/enumerate/namespace/index.js new file mode 100644 index 0000000..b392d90 --- /dev/null +++ b/src/enumerate/namespace/index.js @@ -0,0 +1,7 @@ +/** + * 全局数据状态管理模块定义 + */ + +import { defineNamespace } from "@cqsjjb/jjb-dva-runtime"; + +export const NS_GLOBAL = defineNamespace("global"); diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..c1cdccb --- /dev/null +++ b/src/main.js @@ -0,0 +1,47 @@ +import { setJJBCommonAntdMessage } from "@cqsjjb/jjb-common-lib"; +import { setup } from "@cqsjjb/jjb-dva-runtime"; +import { message } from "antd"; +import dayjs from "dayjs"; +import "dayjs/locale/zh-cn"; +import "../blessed_by_buddha"; + +require("antd/dist/reset.css"); + +dayjs.locale("zh-cn"); +setJJBCommonAntdMessage(message); + +const app = setup(); + +// 非底座环境运行 +if (!window.__POWERED_BY_QIANKUN__) { + // 云组件默认依赖 + window.__coreLib = {}; + window.__coreLib.React = require("react"); + window.__coreLib.ReactDOM = require("react-dom"); + window.__coreLib.jjbCommonLib = require("@cqsjjb/jjb-common-lib"); +} + +/** + * @description 挂载 + * @param props {{ setGlobalState: ({ rendered: boolean }) => void }} + * @returns {Promise<*>} '' + */ +export const mount = async (props) => { + // 云组件默认依赖 + window.__coreLib.React = require("react"); + window.__coreLib.ReactDOM = require("react-dom"); + window.__coreLib.jjbCommonLib = require("@cqsjjb/jjb-common-lib"); + app.mount(props); +}; + +/** + * @description 卸载 + * @param props {object} + * @returns {Promise<*>} '' + */ +export const unmount = async props => app.unmount(props); +/** + * @description 启动 + * @param props + */ +export const bootstrap = async props => app.bootstrap(props); diff --git a/src/pages/Container/Enterprise/CorpInfo/Info/index.js b/src/pages/Container/Enterprise/CorpInfo/Info/index.js new file mode 100644 index 0000000..10d337c --- /dev/null +++ b/src/pages/Container/Enterprise/CorpInfo/Info/index.js @@ -0,0 +1,75 @@ +import { Button, Descriptions, Divider } from "antd"; + +function Info(props) { + return ( +
+ 基本信息 + + 企业相关属性 + +
+ +
+
+ ); +} + +export default Info; diff --git a/src/pages/Container/Enterprise/CorpInfo/Update/index.js b/src/pages/Container/Enterprise/CorpInfo/Update/index.js new file mode 100644 index 0000000..97d2f03 --- /dev/null +++ b/src/pages/Container/Enterprise/CorpInfo/Update/index.js @@ -0,0 +1,242 @@ +import { Form } from "antd"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import Map from "zy-react-library/components/Map"; +import Upload from "zy-react-library/components/Upload"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import { PHONE, POSTAL_CODE, UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular"; + +const PRESENCE_OR_ABSENCE_ENUM = [ + { id: "1", name: "有" }, + { id: "0", name: "无" }, +]; +const WHETHER_ENUM = [ + { id: "1", name: "是" }, + { id: "0", name: "否" }, +]; + +function Update() { + const [form] = Form.useForm(); + const onSubmit = (values) => { + console.log(values); + }; + return ( + <> + +
+ { + form.setFieldValue("FOUR_IMAGES", undefined); + }, + }, + }, + { + label: "四色图", + name: "FOUR_IMAGES", + required: false, + span: 24, + dependencies: ["FOURTYPE"], + hidden: formValues => !(formValues.FOURTYPE === "1"), + render: ({ value, onChange }) => , + }, + { + label: "营业执照", + name: "BUS_IMAGES", + span: 24, + render: ({ value, onChange }) => , + }, + { label: "企业相关属性", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, + { + label: "有无职业卫生信息", + name: "WHETHER_HYGIENE", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: PRESENCE_OR_ABSENCE_ENUM, + }, + { + label: "有无重大污染源", + name: "WHETHER_HAZARDS", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: PRESENCE_OR_ABSENCE_ENUM, + }, + { + label: "是否有稀缺大型应急物资或设施", + name: "WHETHER_SCARCE", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + label: "是否涉及危化品", + name: "WHETHER_CHEMICALS", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + label: "有无特种设备", + name: "WHETHER_SPECIALEQUIPMENT", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: PRESENCE_OR_ABSENCE_ENUM, + }, + { + label: "有无特种作业人员", + name: "WHETHER_SPECIALPEOPLE", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: PRESENCE_OR_ABSENCE_ENUM, + }, + { + label: "是否涉及煤气", + name: "WHETHER_COALGAS", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + label: "是否属于消防重点单位", + name: "WHETHER_FIRE", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + label: "是否在受限空间作业", + name: "WHETHER_CONFINED", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + label: "是否存在涉爆粉尘作业", + name: "WHETHER_POWDER", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + label: "是否涉及防雷防静电", + name: "WHETHER_LIGHTNING", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + label: "是否持有放射源", + name: "WHETHER_ACTINOGEN", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + label: "是否涉及液氨制冷", + name: "WHETHER_LIQUIDAMMONIA", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + label: "是否涉及危化品管道", + name: "WHETHER_PIPELINE", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + ]} + /> +
+ + ); +} + +export default Update; diff --git a/src/pages/Container/Enterprise/CorpInfo/index.js b/src/pages/Container/Enterprise/CorpInfo/index.js new file mode 100644 index 0000000..9dbc17d --- /dev/null +++ b/src/pages/Container/Enterprise/CorpInfo/index.js @@ -0,0 +1,9 @@ +function CorpInfo(props) { + return ( +
+ {props.children} +
+ ); +} + +export default CorpInfo; diff --git a/src/pages/Container/Enterprise/IndustryQualification/Add/index.js b/src/pages/Container/Enterprise/IndustryQualification/Add/index.js new file mode 100644 index 0000000..a7c7231 --- /dev/null +++ b/src/pages/Container/Enterprise/IndustryQualification/Add/index.js @@ -0,0 +1,31 @@ +import { tools } from "@cqsjjb/jjb-common-lib"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import Upload from "zy-react-library/components/Upload"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; + +const { query } = tools.router; + +function Add() { + const onSubmit = (values) => { + console.log(values); + }; + return ( + <> + + }, + ]} + /> + + ); +} + +export default Add; diff --git a/src/pages/Container/Enterprise/IndustryQualification/List/index.js b/src/pages/Container/Enterprise/IndustryQualification/List/index.js new file mode 100644 index 0000000..80228d3 --- /dev/null +++ b/src/pages/Container/Enterprise/IndustryQualification/List/index.js @@ -0,0 +1,52 @@ +import { Button, Form, message, Modal, Space } from "antd"; +import Search from "zy-react-library/components/Search"; +import Table from "zy-react-library/components/Table"; +import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(() => {}, { form }); + const onDelete = (id) => { + Modal.confirm({ + title: "提示", + content: "确定删除吗?", + onOk: () => { + message.success("删除成功"); + getData(); + }, + }); + }; + return ( +
+ + ( + + )} + columns={[ + { title: "证书名称", dataIndex: "name" }, + { title: "证书有效期", dataIndex: "name" }, + { title: "证书编号", dataIndex: "name" }, + { title: "照片", dataIndex: "name", render: () => () }, + { title: "操作", width: 200, render: (_, record) => ( + + + + + ) }, + ]} + {...tableProps} + /> + + ); +} + +export default List; diff --git a/src/pages/Container/Enterprise/IndustryQualification/index.js b/src/pages/Container/Enterprise/IndustryQualification/index.js new file mode 100644 index 0000000..2115e4e --- /dev/null +++ b/src/pages/Container/Enterprise/IndustryQualification/index.js @@ -0,0 +1,9 @@ +function IndustryQualification(props) { + return ( +
+ {props.children} +
+ ); +} + +export default IndustryQualification; diff --git a/src/pages/Container/Enterprise/OrganizationStructure/index.js b/src/pages/Container/Enterprise/OrganizationStructure/index.js new file mode 100644 index 0000000..d57e5a0 --- /dev/null +++ b/src/pages/Container/Enterprise/OrganizationStructure/index.js @@ -0,0 +1,147 @@ +import { Button, Form, message, Modal, Space, Tag } from "antd"; +import { useEffect, useState } from "react"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import Search from "zy-react-library/components/Search"; +import Table from "zy-react-library/components/Table"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import { PHONE } from "zy-react-library/regular"; +import LeftTree from "~/components/LeftTree"; + +const DEPARTMENT_LEVEL_ENUM = [ + { id: "departmentLevel0001", name: "分公司" }, + { id: "departmentLevel0002", name: "科/厂队" }, + { id: "departmentLevel0003", name: "班组" }, +]; +function OrganizationStructure() { + const [addModalOpen, setAddModalOpen] = useState(false); + const [currentId, setCurrentId] = useState(""); + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(() => {}, { form }); + const onDelete = (id) => { + Modal.confirm({ + title: "提示", + content: "确定删除吗?", + onOk: () => { + message.success("删除成功"); + getData(); + }, + }); + }; + return ( +
+
+ +
+ +
( + <> + + + + )} + columns={[ + { title: "名称", dataIndex: "name" }, + { title: "部门级别", dataIndex: "name" }, + { title: "主管领导", dataIndex: "name" }, + { + title: "操作", + width: 200, + render: (_, record) => ( + + + + + ), + }, + ]} + {...tableProps} + /> + + + { + setAddModalOpen(false); + setCurrentId(""); + }} + getData={getData} + /> + + ); +} + +function AddModalComponent(props) { + const [form] = Form.useForm(); + useEffect(() => { + if (props.currentId) { + console.log(props.currentId); + } + }, [props.currentId]); + const onCancel = () => { + form.resetFields(); + props.onCancel(); + }; + const onSubmit = async (values) => { + console.log(values); + onCancel(); + props.getData(); + }; + return ( + + (111) }, + { name: "name", label: "名称" }, + { name: "name", label: "部门级别", render: FORM_ITEM_RENDER_ENUM.SELECT, items: DEPARTMENT_LEVEL_ENUM }, + { name: "name", label: "安全监管部门", required: false, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ id: "0", name: "是" }, { id: "2", name: "否" }], tip: "安全监管部门负责人在“安委会办公室副主任核实”菜单处理重大较大隐患" }, + { name: "name", label: "部门负责人", required: false, render: FORM_ITEM_RENDER_ENUM.SELECT, items: [{ id: "1-10人", name: "1-10人" }] }, + { name: "name", label: "部门负责人手机号", required: false, rules: [{ pattern: PHONE, message: "请输入正确的手机号" }] }, + { name: "name", label: "排序", render: FORM_ITEM_RENDER_ENUM.NUMBER }, + ]} + /> + + ); +} + +const AddModal = AddModalComponent; +export default OrganizationStructure; diff --git a/src/pages/Container/Enterprise/Position/index.js b/src/pages/Container/Enterprise/Position/index.js new file mode 100644 index 0000000..b3b4b32 --- /dev/null +++ b/src/pages/Container/Enterprise/Position/index.js @@ -0,0 +1,161 @@ +import { Button, Form, message, Modal, Space, Tag } from "antd"; +import { useEffect, useState } from "react"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import Search from "zy-react-library/components/Search"; +import Table from "zy-react-library/components/Table"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import LeftTree from "~/components/LeftTree"; + +function Position() { + const [addModalOpen, setAddModalOpen] = useState(false); + const [currentId, setCurrentId] = useState(""); + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(() => { + }, { form }); + const onDelete = (id) => { + Modal.confirm({ + title: "提示", + content: "确定删除吗?", + onOk: () => { + message.success("删除成功"); + getData(); + }, + }); + }; + return ( +
+
+ +
+ +
( + <> + + + + )} + columns={[ + { title: "部门名称", dataIndex: "name" }, + { title: "岗位名称", dataIndex: "name" }, + { title: "状态", dataIndex: "name", width: 100 }, + { + title: "操作", + width: 200, + render: (_, record) => ( + + + + + ), + }, + ]} + {...tableProps} + /> + + + { + setAddModalOpen(false); + setCurrentId(""); + }} + getData={getData} + /> + + ); +} + +function AddModalComponent(props) { + const [form] = Form.useForm(); + useEffect(() => { + if (props.currentId) { + console.log(props.currentId); + } + }, [props.currentId]); + const onCancel = () => { + form.resetFields(); + props.onCancel(); + }; + const onSubmit = async (values) => { + console.log(values); + onCancel(); + props.getData(); + }; + return ( + + (111) }, + { name: "name", label: "岗位名称" }, + { name: "name", label: "岗位职责" }, + { + name: "name", + label: "状态", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: [{ id: "0", name: "启用" }, { id: "1", name: "禁用" }], + }, + { + name: "regPost", + label: "是否监管岗位", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: [{ id: "1", name: "是" }, { id: "2", name: "否" }], + componentProps: { + onChange: () => { + form.setFieldValue("name", undefined); + }, + }, + }, + { + name: "name", + label: "数据权限", + dependencies: ["regPost"], + hidden: formValues => !(formValues.regPost === "1"), + }, + ]} + /> + + ); +} + +const AddModal = AddModalComponent; +export default Position; diff --git a/src/pages/Container/Enterprise/User/Add/index.js b/src/pages/Container/Enterprise/User/Add/index.js new file mode 100644 index 0000000..17ce1fc --- /dev/null +++ b/src/pages/Container/Enterprise/User/Add/index.js @@ -0,0 +1,298 @@ +import { tools } from "@cqsjjb/jjb-common-lib"; +import { Button, Col, Form, Row, Select, Switch } from "antd"; +import { useState } from "react"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import SelectCreate from "zy-react-library/components/SelectCreate"; +import Upload from "zy-react-library/components/Upload"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import { ID_NUMBER } from "zy-react-library/regular"; +import Scheduling from "~/pages/Container/Enterprise/User/components/Scheduling"; + +const { query } = tools.router; +const WHETHER_ENUM = [ + { id: "1", name: "是" }, + { id: "0", name: "否" }, +]; + +function Add() { + const [form] = Form.useForm(); + const [schedulingOpen, setSchedulingOpen] = useState(false); + const onSubmit = (values) => { + console.log(values); + }; + return ( + <> + +
+ formValues.facePermissions === "1", + rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }], + }, + { + name: "nation", + label: "民族", + required: false, + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: [{ name: "一级部门", id: "1" }], + }, + { + name: "sex", + label: "性别", + required: false, + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: [{ name: "一级部门", id: "1" }], + }, + { + name: "inHrUser", + label: "是否对接人资系统", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + componentProps: { disabled: true }, + }, + { + name: "isHazardconfirmer", + label: "是否为隐患确认人", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + name: "facePermissions", + label: "是否具备人脸权限", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + name: "mkmjVehicleReviewer", + label: "是否为口门门禁车辆审核人", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + name: "isAccessauditor", + label: "是否为临时访客审核人", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + name: "faceFile", + label: "上传人脸照片", + span: 24, + dependencies: ["facePermissions"], + required: formValues => formValues.facePermissions === "1", + render: ({ value, onChange }) => ( + +
* 图像格式:JPG、JPEG、PNG
+
* 图像大小:不超过4M。
+
* 照片大小: 推荐 500*500
+
* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图
+
* 人脸需双眼睁开、表情自然、露额,头发不要遮挡
+
+ )} + /> + ), + }, + { name: "sort", label: "部门排序", required: false, render: FORM_ITEM_RENDER_ENUM.NUMBER }, + { name: "email", label: "邮箱", required: false, rules: [{ type: "email", message: "请输入正确的邮箱" }] }, + { + name: "scheduling", + label: "排班", + span: 24, + customizeRender: true, + render: () => ( + <> + +
+ + + + + + +
+ + +
+
+ + + + ), + }, + { name: "bz", label: "备注", span: 24, required: false, render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, + { + name: "isStudent", + label: "是否在线学习人员", + span: 24, + required: false, + render: Switch, + componentProps: { + onChange: () => { + form.setFieldValue("politicalOutlook", undefined); + form.setFieldValue("dateOfBirth", undefined); + form.setFieldValue("incumbency", undefined); + form.setFieldValue("duties", undefined); + form.setFieldValue("title", undefined); + form.setFieldValue("typeOfWork", undefined); + form.setFieldValue("entryDate", undefined); + form.setFieldValue("workingDate", undefined); + form.setFieldValue("userCerFile", undefined); + }, + }, + }, + { + name: "politicalOutlook", + label: "政治面貌", + dependencies: ["isStudent"], + hidden: formValues => !formValues.isStudent, + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: [{ name: "一级部门", id: "1" }], + }, + { + name: "dateOfBirth", + label: "出生年月", + dependencies: ["isStudent"], + hidden: formValues => !formValues.isStudent, + render: FORM_ITEM_RENDER_ENUM.DATE, + }, + { + name: "incumbency", + label: "在职情况", + dependencies: ["isStudent"], + hidden: formValues => !formValues.isStudent, + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: [{ name: "一级部门", id: "1" }], + }, + { + name: "duties", + label: "职务", + dependencies: ["isStudent"], + hidden: formValues => !formValues.isStudent, + render: () => ( + { + console.log(option); + }} + /> + ), + }, + { + name: "title", + label: "职称", + dependencies: ["isStudent"], + hidden: formValues => !formValues.isStudent, + render: () => ( + { + console.log(option); + }} + /> + ), + }, + { + name: "typeOfWork", + label: "工种", + dependencies: ["isStudent"], + hidden: formValues => !formValues.isStudent, + render: () => ( + { + console.log(option); + }} + /> + ), + }, + { + name: "entryDate", + label: "入职日期", + dependencies: ["isStudent"], + hidden: formValues => !formValues.isStudent, + render: FORM_ITEM_RENDER_ENUM.DATE, + }, + { + name: "workingDate", + label: "参加工作日期", + dependencies: ["isStudent"], + hidden: formValues => !formValues.isStudent, + render: FORM_ITEM_RENDER_ENUM.DATE, + }, + { + name: "userCerFile", + label: "证书信息", + span: 24, + required: false, + dependencies: ["isStudent"], + hidden: formValues => !formValues.isStudent, + render: ({ value, onChange }) => , + }, + ]} + /> + + setSchedulingOpen(false)} /> + + ); +} + +export default Add; diff --git a/src/pages/Container/Enterprise/User/List/index.js b/src/pages/Container/Enterprise/User/List/index.js new file mode 100644 index 0000000..8582383 --- /dev/null +++ b/src/pages/Container/Enterprise/User/List/index.js @@ -0,0 +1,154 @@ +import { Button, Form, message, Modal, Space } from "antd"; +import { useState } from "react"; +import ImportFile from "zy-react-library/components/ImportFile"; +import Search from "zy-react-library/components/Search"; +import Table from "zy-react-library/components/Table"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import LeftTree from "~/components/LeftTree"; +import Scheduling from "~/pages/Container/Enterprise/User/components/Scheduling"; + +function List(props) { + const [importOpen, setImportOpen] = useState(false); + const [schedulingOpen, setSchedulingOpen] = useState(false); + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(() => {}, { form }); + const onDelete = (id) => { + Modal.confirm({ + title: "提示", + content: "确定删除吗?", + onOk: () => { + message.success("删除成功"); + getData(); + }, + }); + }; + const onExportExcel = () => { + Modal.confirm({ + title: "提示", + content: "确定要导出到excel吗?", + onOk: () => { + + }, + }); + }; + const onResetPassword = () => { + Modal.confirm({ + title: "提示", + content: "确定要重置密码为Aa@123456789吗?", + onOk: () => { + message.success("重置密码成功"); + }, + }); + }; + const onUnlock = (id) => { + message.success("解锁成功"); + }; + const onImportFileConfirm = (values) => { + console.log(values); + message.success("导入成功"); + }; + return ( +
+
+ +
+ +
( + <> + + + + + )} + columns={[ + { title: "用户名", dataIndex: "name" }, + { title: "姓名", dataIndex: "name" }, + { title: "部门", dataIndex: "name" }, + { title: "岗位", dataIndex: "name" }, + { title: "排班类型", dataIndex: "name" }, + { + title: "操作", + width: 300, + render: (_, record) => ( + + + + + + + + ), + }, + ]} + {...tableProps} + /> + + + { setImportOpen(false); }} + /> + setSchedulingOpen(false)} /> + + ); +} + +export default List; diff --git a/src/pages/Container/Enterprise/User/components/Scheduling/index.js b/src/pages/Container/Enterprise/User/components/Scheduling/index.js new file mode 100644 index 0000000..47cbf55 --- /dev/null +++ b/src/pages/Container/Enterprise/User/components/Scheduling/index.js @@ -0,0 +1,122 @@ +import { DoubleLeftOutlined, DoubleRightOutlined, LeftOutlined, RightOutlined } from "@ant-design/icons"; +import { Button, Calendar, Modal } from "antd"; +import dayjs from "dayjs"; +import { useEffect, useState } from "react"; + +function Scheduling(props) { + const [workDateList, setWorkDateList] = useState([]); + useEffect(() => { + setWorkDateList([ + { DATE: "2025-10-01", STATE: "2" }, + { DATE: "2025-10-02", STATE: "1" }, + { DATE: "2025-10-03", STATE: "1" }, + { DATE: "2025-10-04", STATE: "2" }, + { DATE: "2025-10-05", STATE: "1" }, + { DATE: "2025-10-06", STATE: "1" }, + { DATE: "2025-10-07", STATE: "2" }, + { DATE: "2025-10-08", STATE: "1" }, + { DATE: "2025-10-09", STATE: "1" }, + { DATE: "2025-10-10", STATE: "2" }, + { DATE: "2025-10-11", STATE: "1" }, + { DATE: "2025-10-12", STATE: "1" }, + { DATE: "2025-10-13", STATE: "2" }, + { DATE: "2025-10-14", STATE: "1" }, + { DATE: "2025-10-15", STATE: "1" }, + { DATE: "2025-10-16", STATE: "2" }, + { DATE: "2025-10-17", STATE: "1" }, + { DATE: "2025-10-18", STATE: "1" }, + { DATE: "2025-10-19", STATE: "2" }, + { DATE: "2025-10-20", STATE: "1" }, + { DATE: "2025-10-21", STATE: "1" }, + { DATE: "2025-10-22", STATE: "2" }, + { DATE: "2025-10-23", STATE: "1" }, + { DATE: "2025-10-24", STATE: "1" }, + { DATE: "2025-10-25", STATE: "2" }, + { DATE: "2025-10-26", STATE: "1" }, + { DATE: "2025-10-27", STATE: "1" }, + { DATE: "2025-10-28", STATE: "2" }, + { DATE: "2025-10-29", STATE: "1" }, + { DATE: "2025-10-30", STATE: "1" }, + { DATE: "2025-10-31", STATE: "2" }, + ]); + }, []); + const cellRender = (current) => { + return ( + workDateList.map((item) => { + if (item.DATE === dayjs(current).format("YYYY-MM-DD")) { + return ( + + {item.STATE === "1" + ? 上班 + : item.STATE === "2" + ? 休班 + : null} + + ); + } + return null; + }) + ); + }; + const headerRender = ({ value, onChange }) => { + const year = value.year(); + const month = value.month() + 1; + + const onNextYear = () => { + const nextValue = value.add(1, "year"); + onChange(nextValue); + }; + + const onPrevYear = () => { + const prevValue = value.subtract(1, "year"); + onChange(prevValue); + }; + + const onNextMonth = () => { + const nextValue = value.add(1, "month"); + onChange(nextValue); + }; + + const onPrevMonth = () => { + const prevValue = value.subtract(1, "month"); + onChange(prevValue); + }; + + return ( +
+
+ + +
+
+ {year} + 年 + {month} + 月 +
+
+ + +
+
+ ); + }; + + return ( + + 关闭 + , + ]} + > + + + ); +} + +export default Scheduling; diff --git a/src/pages/Container/Enterprise/User/index.js b/src/pages/Container/Enterprise/User/index.js new file mode 100644 index 0000000..e30c0f4 --- /dev/null +++ b/src/pages/Container/Enterprise/User/index.js @@ -0,0 +1,9 @@ +function User(props) { + return ( +
+ {props.children} +
+ ); +} + +export default User; diff --git a/src/pages/Container/Enterprise/index.js b/src/pages/Container/Enterprise/index.js new file mode 100644 index 0000000..917368a --- /dev/null +++ b/src/pages/Container/Enterprise/index.js @@ -0,0 +1,9 @@ +function Enterprise(props) { + return ( +
+ {props.children} +
+ ); +} + +export default Enterprise; diff --git a/src/pages/Container/Entry/index.js b/src/pages/Container/Entry/index.js new file mode 100644 index 0000000..c51ecfd --- /dev/null +++ b/src/pages/Container/Entry/index.js @@ -0,0 +1,31 @@ +import { ImportCore } from "@cqsjjb/jjb-common-decorator/module"; +import React from "react"; + +export default class Entry extends React.Component { + state = { + Component: undefined, + }; + + componentDidMount() { + if (process.env.app.appKey) { + ImportCore({ + name: "$", + from: "https://cdn.cqjjb.cn/jcloud/use/plugin/b31c9840a57f11ef91cf7f3cabbb7484/latest", + }).then((res) => { + if (res.status) { + this.setState({ Component: res.module?.default }); + } + }); + } + } + + render() { + const { Component } = this.state; + return (Component && process.env.app.appKey) && ( + + ); + } +} diff --git a/src/pages/Container/Stakeholder/CorpInfo/components/Qualification.js b/src/pages/Container/Stakeholder/CorpInfo/components/Qualification.js new file mode 100644 index 0000000..0843ffd --- /dev/null +++ b/src/pages/Container/Stakeholder/CorpInfo/components/Qualification.js @@ -0,0 +1,155 @@ +import { Button, Form, Image, message, Modal, Space } from "antd"; +import { useEffect, useState } from "react"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import Table from "zy-react-library/components/Table"; +import Upload from "zy-react-library/components/Upload"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; + +function Qualification() { + const [addModalOpen, setAddModalOpen] = useState(false); + const [currentId, setCurrentId] = useState(""); + const [previewSrc, setPreviewSrc] = useState(""); + const [previewOpen, setPreviewOpen] = useState(false); + const { tableProps, getData } = useTable(() => {}); + const onDelete = (id) => { + Modal.confirm({ + title: "提示", + content: "确定删除吗?", + onOk: () => { + message.success("删除成功"); + getData(); + }, + }); + }; + return ( +
+
( + + )} + columns={[ + { title: "资质正式名称", dataIndex: "name" }, + { title: "证书有限期", dataIndex: "name" }, + { title: "证书编号", dataIndex: "name" }, + { + title: "操作", + width: 200, + render: (_, record) => ( + + + + + + ), + }, + ]} + {...tableProps} + /> + { + setAddModalOpen(false); + setCurrentId(""); + }} + getData={getData} + /> + { + setPreviewOpen(false); + setPreviewSrc(""); + }} + /> + + ); +} + +function AddModalComponent(props) { + const [form] = Form.useForm(); + useEffect(() => { + if (props.currentId) { + console.log(props.currentId); + } + }, [props.currentId]); + const onCancel = () => { + form.resetFields(); + props.onCancel(); + }; + const onSubmit = async (values) => { + console.log(values); + onCancel(); + props.getData(); + }; + return ( + + }, + ]} + /> + + ); +} +function PreviewModalComponent(props) { + return ( + + 关闭 + , + ]} + > +
+ +
+
+ ); +} + +const AddModal = AddModalComponent; +const PreviewModal = PreviewModalComponent; +export default Qualification; diff --git a/src/pages/Container/Stakeholder/CorpInfo/index.js b/src/pages/Container/Stakeholder/CorpInfo/index.js new file mode 100644 index 0000000..520befa --- /dev/null +++ b/src/pages/Container/Stakeholder/CorpInfo/index.js @@ -0,0 +1,93 @@ +import { Button, Modal, QRCode } from "antd"; +import { useState } from "react"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import Map from "zy-react-library/components/Map"; +import Upload from "zy-react-library/components/Upload"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import { PHONE, UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular"; +import Qualification from "./components/Qualification"; + +const xgfStateMap = { + 0: "未填报", + 1: "待审核", + 2: "已审核", + 3: 已打回, + 4: "已填报", +}; +function CorpInfo() { + const [corpInfoQrCodeOpen, setCorpInfoQrCodeOpen] = useState(false); + const onSubmit = (values) => { + console.log(values); + }; + return ( + <> +
+ xgfStateMap[formValues?.xgfState] || "未填报" }, + { name: "managerDepIds", label: "股份监管部门", required: false }, + { name: "mainDepIds", label: "股份主管部门", required: false }, + { name: "competentDepIds", label: "基层单位监管部门", required: false }, + { name: "superviseDepIds", label: "基层单位主管部门", required: false }, + { name: "corpTypIds", label: "集团单位", required: false, render: FORM_ITEM_RENDER_ENUM.SELECT, items: [{ name: "集团单位1", id: "1" }] }, + { name: "holderName", label: "开户人", required: false }, + { name: "code", label: "统一社会信用代码", rules: [{ pattern: UNIFIED_SOCIAL_CREDIT_CODE, message: "请输入正确的统一社会信用代码" }] }, + { name: "companyAreas", label: "属地" }, + { name: "industryNames", label: "所属行业" }, + { name: "ecoType", label: "经济类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [{ name: "集团单位1", id: "1" }] }, + { name: "map", customizeRender: true, render: () => , span: 24 }, + { name: "address", label: "单位经营地址" }, + { name: "scale", label: "企业规模", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [{ name: "集团单位1", id: "1" }] }, + { name: "lrName", label: "法人姓名" }, + { name: "lrPhone", label: "联系电话", rules: [{ pattern: PHONE, message: "请输入正确的手机号码" }] }, + { name: "contacts", label: "主要负责人" }, + { name: "contactsPhone", label: "主要负责人联系电话", rules: [{ pattern: PHONE, message: "请输入正确的手机号码" }] }, + { name: "createDate", label: "成立日期", render: FORM_ITEM_RENDER_ENUM.DATE }, + { name: "employees", label: "职工人数(人)", render: FORM_ITEM_RENDER_ENUM.NUMBER }, + { name: "totalassets", label: "资产总额(万元)", render: FORM_ITEM_RENDER_ENUM.NUMBER }, + { name: "regcapital", label: "注册资金(万元)", render: FORM_ITEM_RENDER_ENUM.NUMBER }, + { name: "employmentForm", label: "用工形式", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [{ name: "集团单位1", id: "1" }] }, + { name: "selectForms", label: "选取形式", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [{ name: "集团单位1", id: "1" }] }, + { name: "businessLicense", label: "营业执照", required: false, render: ({ value, onChange }) => }, + { name: "businessLicenseDate", label: "营业执照有效期", render: FORM_ITEM_RENDER_ENUM.DATE }, + { name: "qrCode", label: "企业二维码", required: false, hidden: formValues => !(formValues.xgfState !== 2), render: () => ( + + ) }, + { label: "单位资质信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, + { name: "qualification", customizeRender: true, span: 24, render: Qualification }, + ]} + /> +
+ setCorpInfoQrCodeOpen(false)} /> + + ); +} + +const CorpInfoQrCode = (props) => { + return ( + + 关闭 + , + ]} + > + + + ); +}; + +export default CorpInfo; diff --git a/src/pages/Container/Stakeholder/Department/index.js b/src/pages/Container/Stakeholder/Department/index.js new file mode 100644 index 0000000..b1623f9 --- /dev/null +++ b/src/pages/Container/Stakeholder/Department/index.js @@ -0,0 +1,145 @@ +import { Button, Form, message, Modal, Space, Tag } from "antd"; +import { useEffect, useState } from "react"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import Search from "zy-react-library/components/Search"; +import Table from "zy-react-library/components/Table"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import { PHONE } from "zy-react-library/regular"; +import LeftTree from "~/components/LeftTree"; + +const DEPARTMENT_LEVEL_ENUM = [ + { id: "1", name: "公司级" }, + { id: "2", name: "部门级" }, + { id: "3", name: "小组级" }, +]; +function Department() { + const [addModalOpen, setAddModalOpen] = useState(false); + const [currentId, setCurrentId] = useState(""); + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(() => {}, { form }); + const onDelete = (id) => { + Modal.confirm({ + title: "提示", + content: "确定删除吗?", + onOk: () => { + message.success("删除成功"); + getData(); + }, + }); + }; + return ( +
+
+ +
+ +
( + <> + + + + )} + columns={[ + { title: "部门名称", dataIndex: "name" }, + { title: "部门级别", dataIndex: "name" }, + { title: "主管领导", dataIndex: "name" }, + { + title: "操作", + width: 200, + render: (_, record) => ( + + + + + ), + }, + ]} + {...tableProps} + /> + + + { + setAddModalOpen(false); + setCurrentId(""); + }} + getData={getData} + /> + + ); +} + +function AddModalComponent(props) { + const [form] = Form.useForm(); + useEffect(() => { + if (props.currentId) { + console.log(props.currentId); + } + }, [props.currentId]); + const onCancel = () => { + form.resetFields(); + props.onCancel(); + }; + const onSubmit = async (values) => { + console.log(values); + onCancel(); + props.getData(); + }; + return ( + + (111) }, + { name: "name", label: "部门级别", render: FORM_ITEM_RENDER_ENUM.SELECT, items: DEPARTMENT_LEVEL_ENUM }, + { name: "name", label: "部门负责人", required: false }, + { name: "name", label: "部门负责人手机号", required: false, rules: [{ pattern: PHONE, message: "请输入正确的手机号" }] }, + { name: "name", label: "排序", render: FORM_ITEM_RENDER_ENUM.NUMBER }, + ]} + /> + + ); +} + +const AddModal = AddModalComponent; +export default Department; diff --git a/src/pages/Container/Stakeholder/SecurityPersonnelInfo/index.js b/src/pages/Container/Stakeholder/SecurityPersonnelInfo/index.js new file mode 100644 index 0000000..a5effa2 --- /dev/null +++ b/src/pages/Container/Stakeholder/SecurityPersonnelInfo/index.js @@ -0,0 +1,49 @@ +import { Form } from "antd"; +import Search from "zy-react-library/components/Search"; +import Table from "zy-react-library/components/Table"; +import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import { PERSONNEL_TYPE_ENUM } from "~/pages/Container/Stakeholder/User/List"; + +function SpecialOperationPersonnel() { + const [form] = Form.useForm(); + const { tableProps } = useTable(() => {}, { form }); + + return ( +
+ +
}, + ]} + {...tableProps} + /> + + ); +} + +export default SpecialOperationPersonnel; diff --git a/src/pages/Container/Stakeholder/SpecialOperationPersonnel/index.js b/src/pages/Container/Stakeholder/SpecialOperationPersonnel/index.js new file mode 100644 index 0000000..2355eff --- /dev/null +++ b/src/pages/Container/Stakeholder/SpecialOperationPersonnel/index.js @@ -0,0 +1,51 @@ +import { Form } from "antd"; +import Search from "zy-react-library/components/Search"; +import Table from "zy-react-library/components/Table"; +import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import { PERSONNEL_TYPE_ENUM } from "~/pages/Container/Stakeholder/User/List"; + +function SpecialOperationPersonnel() { + const [form] = Form.useForm(); + const { tableProps } = useTable(() => {}, { form }); + + return ( +
+ +
}, + ]} + {...tableProps} + /> + + ); +} + +export default SpecialOperationPersonnel; diff --git a/src/pages/Container/Stakeholder/User/Add/index.js b/src/pages/Container/Stakeholder/User/Add/index.js new file mode 100644 index 0000000..0f48219 --- /dev/null +++ b/src/pages/Container/Stakeholder/User/Add/index.js @@ -0,0 +1,272 @@ +import { tools } from "@cqsjjb/jjb-common-lib"; +import { Alert, Form } from "antd"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import Upload from "zy-react-library/components/Upload"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import { ID_NUMBER } from "zy-react-library/regular"; + +const { query } = tools.router; +export const WHETHER_ENUM = [ + { name: "是", id: "1" }, + { name: "否", id: "0" }, +]; +export const SEX_ENUM = [ + { name: "男", id: "0" }, + { name: "女", id: "1" }, +]; +export const MARITAL_STATUS_ENUM = [ + { name: "已婚", id: "1" }, + { name: "未婚", id: "0" }, +]; +function Add() { + const [form] = Form.useForm(); + const onSubmit = (values) => { + console.log(values); + }; + return ( + <> + +
+ ( + +
* 图像格式:JPG、JPEG、PNG
+
* 图像大小:不超过4M。
+
* 照片大小: 推荐 500*500
+
* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图
+
* 人脸需双眼睁开、表情自然、露额,头发不要遮挡
+
+ )} + /> + ), + }, + { name: "name", label: "姓名" }, + { name: "username", label: "用户名", componentProps: { disabled: query.id } }, + { name: "departmentId", label: "部门" }, + { name: "email", label: "电子邮箱", required: false, rules: [{ type: "email", message: "请输入正确的邮箱" }] }, + { name: "cardId", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] }, + { + name: "userCardFile", + label: "身份证照片", + render: ({ value, onChange }) => ( + +
温馨提示:用户要上传身份证正反面(身份证照片数量是2张), 才能进行人员培训
+ + )} + /> + ), + }, + { + name: "nationality", + label: "民族", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: [{ name: "一级部门", id: "1" }], + }, + { + name: "sex", + label: "性别", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: SEX_ENUM, + componentProps: { disabled: true }, + }, + { name: "dateOfBirth", label: "出生年月", render: FORM_ITEM_RENDER_ENUM.DATE }, + { name: "age", label: "年龄", render: FORM_ITEM_RENDER_ENUM.NUMBER }, + { name: "hklocal", label: "户口所在地" }, + { name: "address", label: "现住址" }, + { + name: "degreeOfEducation", + label: "文化程度", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: [{ name: "一级部门", id: "1" }], + }, + { + name: "maritalstatus", + label: "婚姻状况", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: MARITAL_STATUS_ENUM, + }, + { + name: "politicalStatus", + label: "政治面貌", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: [{ name: "一级部门", id: "1" }], + componentProps: { + onChange: () => { + form.setFieldValue("politicalTime", undefined); + }, + }, + }, + { + name: "politicalTime", + label: "入党时间", + render: FORM_ITEM_RENDER_ENUM.DATE, + dependencies: ["politicalStatus"], + hidden: formValues => !(formValues.politicalStatus === "zhonggongdangyuan"), + }, + { name: "postId", label: "岗位名称(工种)" }, + { + name: "isSocial", + label: "是否缴纳社保", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + componentProps: { + onChange: () => { + form.setFieldValue("socialNumber", undefined); + form.setFieldValue("socSecurity", undefined); + }, + }, + }, + { + name: "socialNumber", + label: "社会保障号码", + dependencies: ["isSocial"], + hidden: formValues => !(formValues.isSocial === "1"), + }, + { + name: "socSecurity", + label: "社保卡照片", + render: ({ value, onChange }) => , + dependencies: ["isSocial"], + hidden: formValues => !(formValues.isSocial === "1"), + }, + { + name: "isBf", + label: "是否缴纳保险", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + name: "isSignLabor", + label: "是否签订劳动合同", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + componentProps: { + onChange: () => { + form.setFieldValue("contract", undefined); + }, + }, + }, + { + name: "contract", + label: "合同图片", + render: ({ value, onChange }) => , + dependencies: ["isSignLabor"], + hidden: formValues => !(formValues.isSignLabor === "1"), + }, + { + name: "ispay", + label: "是否缴纳商业保险", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + componentProps: { + onChange: () => { + form.setFieldValue("ispayNumber", undefined); + form.setFieldValue("insurance", undefined); + }, + }, + }, + { + name: "ispayNumber", + label: "商业保险单号", + dependencies: ["ispay"], + hidden: formValues => !(formValues.ispay === "1"), + }, + { + name: "insurance", + label: "保险图片", + render: ({ value, onChange }) => , + dependencies: ["ispay"], + hidden: formValues => !(formValues.ispay === "1"), + }, + { + name: "isInjuriesPay", + label: "是否按期缴纳工伤保险", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + componentProps: { + onChange: () => { + form.setFieldValue("isInjuriesPayTime", undefined); + form.setFieldValue("empInsurance", undefined); + }, + }, + }, + { + name: "isInjuriesPayTime", + label: "工伤保险有效期", + dependencies: ["isInjuriesPay"], + render: FORM_ITEM_RENDER_ENUM.DATE, + hidden: formValues => !(formValues.isInjuriesPay === "1"), + }, + { + name: "empInsurance", + label: "工伤保险凭证", + render: ({ value, onChange }) => , + dependencies: ["isInjuriesPay"], + hidden: formValues => !(formValues.isInjuriesPay === "1"), + }, + { + name: "isLevelThree", + label: "是否参加三级安全培训", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + componentProps: { + onChange: () => { + form.setFieldValue("threeLevel", undefined); + }, + }, + }, + { + name: "threeLevel", + label: "三级安全培训照片", + render: ({ value, onChange }) => , + dependencies: ["isLevelThree"], + hidden: formValues => !(formValues.isLevelThree === "1"), + }, + { + name: "isflow", + label: "是否流动人员", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + }, + { + name: "IS_SPECIAL_JOB", + label: "是否特殊工种", + required: false, + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: WHETHER_ENUM, + componentProps: { disabled: true }, + }, + { + name: "alert", + span: 24, + customizeRender: true, + render: () => (), + }, + ]} + /> + + + ); +} + +export default Add; diff --git a/src/pages/Container/Stakeholder/User/List/index.js b/src/pages/Container/Stakeholder/User/List/index.js new file mode 100644 index 0000000..ce0e867 --- /dev/null +++ b/src/pages/Container/Stakeholder/User/List/index.js @@ -0,0 +1,112 @@ +import { Button, Form, message, Modal } from "antd"; +import { useState } from "react"; +import AddIcon from "zy-react-library/components/Icon/AddIcon"; +import ImportIcon from "zy-react-library/components/Icon/ImportIcon"; +import ImportFile from "zy-react-library/components/ImportFile"; +import Search from "zy-react-library/components/Search"; +import Table from "zy-react-library/components/Table"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import LeftTree from "~/components/LeftTree"; + +export const PERSONNEL_TYPE_ENUM = [ + { id: "0", name: "非流动人员" }, + { id: "1", name: "流动人员" }, +]; +function List(props) { + const [importOpen, setImportOpen] = useState(false); + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(() => {}, { form }); + + const onImportFileConfirm = (values) => { + console.log(values); + message.success("导入成功"); + }; + const onResignation = (id) => { + Modal.confirm({ + title: "提示", + content: "确定离职吗?", + onOk: () => { + message.success("离职成功"); + getData(); + }, + }); + }; + const onResetPassword = (id) => { + Modal.confirm({ + title: "提示", + content: "是否重置密码为Bb@123456789?", + onOk: () => { + message.success("重置密码成功"); + getData(); + }, + }); + }; + + return ( +
+
+ +
+ +
( + <> + + + + )} + columns={[ + { title: "用户名", dataIndex: "name" }, + { title: "姓名", dataIndex: "name" }, + { title: "部门", dataIndex: "name" }, + { title: "人员类型", dataIndex: "name" }, + { title: "培训状态", dataIndex: "name" }, + { title: "基础信息填报状态", dataIndex: "name" }, + { + title: "操作", + width: 300, + render: (_, record) => ( + <> + + + + + + ), + }, + ]} + {...tableProps} + dataSource={[{}]} + /> + + + { setImportOpen(false); }} + /> + + ); +} +export default List; diff --git a/src/pages/Container/Stakeholder/User/View/index.js b/src/pages/Container/Stakeholder/User/View/index.js new file mode 100644 index 0000000..83647f3 --- /dev/null +++ b/src/pages/Container/Stakeholder/User/View/index.js @@ -0,0 +1,1126 @@ +import { Alert, Button, Descriptions, Divider, Steps } from "antd"; +import { useState } from "react"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import PreviewImg from "zy-react-library/components/PreviewImg"; +import Table from "zy-react-library/components/Table"; +import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg"; +import useDownloadFile from "zy-react-library/hooks/useDownloadFile"; +import { getLabelName } from "zy-react-library/utils"; +import { MARITAL_STATUS_ENUM, SEX_ENUM, WHETHER_ENUM } from "../Add"; + +function View() { + const { downloadFile } = useDownloadFile(); + const [info] = useState({ + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + selectUserId: null, + username: "13058604112", + password: "16758a08251b174145edfb6188bcb5dd51a827f1", + name: "0513-1", + roleId: "fhadminzhuche", + rolesName: null, + lastLogin: null, + ip: null, + status: 0, + bz: "注册用户", + sex: null, + skin: "pcoded-navbar navbar-image-3,navbar pcoded-header navbar-expand-lg navbar-light header-dark,", + email: null, + number: null, + phone: "13058604112", + roleIds: null, + departmentId: "dd5ab430a9f442a0be64c61a9645b904", + departmentName: null, + departmentNameAll: null, + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + funIds: null, + appid: null, + postId: "jhsdGsdghbs", + postName: "jhsdGsdghbs", + ismain: "0", + errorCount: 0, + sort: null, + learnercategory: null, + useravatarprefix: null, + useravatarurl: null, + shiftdutyone: null, + shiftdutytwo: null, + duration: null, + workstatus: null, + workperiod: null, + isRecorder: null, + personnelType: null, + personnelTypeName: null, + isHazardconfirmer: null, + isAccessauditor: null, + isOnlinelearning: null, + personType: null, + jcr: null, + pushCid: null, + empno: null, + cfdStatus: null, + cardno: null, + userIdCard: null, + isPolice: null, + userIdentity: null, + baseimgpath: null, + backendaddr: null, + mkmjcard: null, + ispush: "1", + userType: "3", + inHrUser: "0", + isDelete: 0, + creator: null, + createTime: "2025-04-20 14:41:54", + operat: "87ef258559e6430aa837e0f38062e250", + operatTime: "2025-08-29 11:05:09", + mkmjVehicleReviewer: null, + userIds: null, + departSort: null, + corpinfoName: null, + classCount: null, + completeCount: null, + studystate: null, + corpInfoStatus: null, + busImgList: null, + faceFile: null, + facePermissions: null, + job: null, + jobLevel: null, + jobLevelName: null, + nation: null, + nationName: null, + basicinfoId: null, + precinctId: null, + roleName: null, + isassess: null, + mkmjPermissions: "1", + inMkmjBlacklist: null, + disableMkmj: null, + employCorpName: null, + validityPeriodStart: null, + validityPeriodEnd: null, + classNo: null, + employCorpId: null, + xgfUserId: "5d8dcfbcd27741c79efaa6ca31941b9e", + loginUser: null, + isFlow: "0", + isFlowName: null, + trainStatus: null, + trainStatusName: null, + basicState: null, + basicStateName: null, + userPhoto: null, + userPhotoInfo: [ + { + imgfilesId: "4a7197ac1f844466a592f5ac54bb7071", + filepath: "/uploadFiles/file/xgf/920fa607d47c431b9142912801d10047.jpg", + }, + ], + userCard: null, + userCardInfo: [ + { + imgfilesId: "4a3a9d1cca0b463290afbe2da7f86fcd", + filepath: "/uploadFiles/file/xgf/887b696c5593413f9c108111ef111c1f.jpg", + }, + { + imgfilesId: "70972a9e21e3448d9dbfffae02f442ba", + filepath: "/uploadFiles/file/xgf/51588b4531a449b58ace522928c75166.png", + }, + ], + socSecurity: null, + socSecurityInfo: [ + { + imgfilesId: "c733ce9c56e746c99814503dbd09992e", + filepath: "/uploadFiles/file/xgf/082c6408413648879f53bd02f5c6059b.png", + }, + { + imgfilesId: "efaa255ef2e64da7920e2b4415a0e250", + filepath: "/uploadFiles/file/xgf/dde0abbe4c494111bc1e7533bda76178.png", + }, + ], + contract: null, + contractInfo: [], + insurance: null, + insuranceInfo: [], + empInsurance: null, + empInsuranceInfo: [], + threeLevel: null, + threeLevelInfo: [], + deleteFileIds: null, + emp: { + employmentApplyManagementId: "50b9c363d6584072a7a14b1ef6fc3468", + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + relevantUnitName: "测试相关方", + startDate: "2025-04-20 14:43:50", + endDate: null, + leaveReason: null, + applyTime: null, + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + creator: "5d8dcfbcd27741c79efaa6ca31941b9e", + createtime: "2025-04-20 14:43:51", + operator: "87ef258559e6430aa837e0f38062e250", + operatetime: "2025-08-11 18:20:32", + isdelete: "0", + auditState: "2", + departState: "0", + reviewState: "", + departmentId: "dd5ab430a9f442a0be64c61a9645b904", + remarks: null, + auditRemarks: null, + auditTime: null, + auditPerson: null, + corpStartDate: "2025-04-20", + postId: "jhsdGsdghbs", + entryDate: null, + isSignLabor: "0", + isInjuriesPay: "0", + socialNumber: "462218514G0CB1PQ55", + ispay: "0", + isLevelThree: "0", + isSafetyTell: "0", + isBodyAdapt: "0", + isSpecialJob: "0", + isflow: "0", + isSocial: "1", + socialType: null, + isBf: "0", + }, + userDetails: { + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + name: "0513-1", + phone: "13058604112", + creattime: "2025-08-11 18:20:31", + departState: "0", + isdelete: "0", + personWorkType: null, + personWorkTypeName: null, + age: "21", + hklocal: "11112", + address: "1111", + degreeOfEducation: "dxbk", + degreeOfEducationName: "大学本科", + corpStartDate: null, + postId: "jhsdGsdghbs", + postName: "jhsdGsdghbs", + workSign: null, + joinedDate: null, + workDate: null, + photo: "/uploadFiles/file/xgf/920fa607d47c431b9142912801d10047.jpg", + dateOfBirth: "2004-06-07", + ispay: "0", + ispayNumber: "", + isSafetyTell: "0", + isSafetyTime: null, + isInjuriesPay: "0", + isSignLabor: "0", + sex: "0", + entryDate: null, + nationality: "mz", + nationalityName: "满族", + maritalstatus: "0", + politicalTime: null, + politicalStatus: "zgybdy01", + politicalStatusName: "中共预备党员", + isInjuriesPayTime: "", + isLevelThree: "0", + isBodyAdapt: "0", + isSpecialJob: null, + belongToCorp: "dd5ab430a9f442a0be64c61a9645b904", + belongToCorpName: "测试相关方", + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + managerDepartmentId: null, + managerDepartmentName: null, + competentDepartmentId: null, + competentDepartmentName: null, + mainDepartmentId: null, + mainDepartmentName: null, + cardId: "130726200406079838", + departmentId: "dd5ab430a9f442a0be64c61a9645b904", + departmentName: "测试相关方", + isSocial: "1", + isBf: "0", + socialNumber: "462218514G0CB1PQ55", + zzname: null, + annex: "/uploadFiles/file/xgf/94212aec9b66433ca3b665a68251d8b5.zip", + attorney: null, + commitmentLetter: null, + }, + trainingRec: [ + { + classInfoId: "7a3ab8fabd8a4b51a8e2ed1d081b19b3", + createTime: "2025-05-19 00:00:00", + creator: "1", + operateTime: "2025-05-19 00:00:00", + operator: "1", + isdelete: "0", + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "65a5b863a20a4f85b43dc63dc0bd9308", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-15 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "0515-1222", + openingTime: "2025-05-15 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "a14252d3baed49f3b694d51f8a01a543", + createTime: "2025-06-01 00:00:00", + creator: "1", + operateTime: "2025-06-01 00:00:00", + operator: "1", + isdelete: "0", + corpinfoId: "13cf0f4ec77e4d98ae8cdd9c3386ae0c", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "3bbc4df4bcef4de698fea4c6fdc963ea", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-15 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "666666", + openingTime: "2025-05-15 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "be1a01e7bbde4c6cacbc0a7bd437687e", + createTime: "2025-05-18 00:00:00", + creator: "1", + operateTime: "2025-05-18 00:00:00", + operator: "1", + isdelete: "0", + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "1", + classMessageId: "0e46e74fce7d4b038a5409633750722c", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-15 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "0515-111", + openingTime: "2025-05-15 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "0ba29ef2449d4c35a74fa20f15840f63", + createTime: "2025-05-17 19:00:00", + creator: "1", + operateTime: "2025-05-17 19:00:00", + operator: "1", + isdelete: "0", + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "8b03ba6329ff4807abdf758e3ed8e53b", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-14 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "0514-111", + openingTime: "2025-05-14 00:00:00", + place: "d7d30999957a46d6a647fe8e168fb960", + placeName: "铁运开站小教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "28800a073d8e4afb945aeb61b364d093", + createTime: "2025-06-01 00:00:00", + creator: "1", + operateTime: "2025-06-01 00:00:00", + operator: "1", + isdelete: "0", + corpinfoId: "13cf0f4ec77e4d98ae8cdd9c3386ae0c", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "0dd69622dc5e4e27a142f9a07f7b4a9a", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-14 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "123", + openingTime: "2025-05-14 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "75bafd4545484f739d03c5b1228e187a", + createTime: "2025-06-01 00:00:01", + creator: "1", + operateTime: "2025-06-01 00:00:01", + operator: "1", + isdelete: "0", + corpinfoId: "13cf0f4ec77e4d98ae8cdd9c3386ae0c", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "de07771f21344c7e9e8b40ed26a221b8", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-14 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "0514-1", + openingTime: "2025-05-14 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "8a85c80f40774b1a8a11b97b06328f40", + createTime: "2025-05-16 00:00:00", + creator: "1", + operateTime: "2025-05-16 00:00:00", + operator: "1", + isdelete: "0", + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "53c1f413ad564dadb3139346be548a7d", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-14 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "12121", + openingTime: "2025-05-14 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "9a6cf3a55ae2497e9ac7fddca29395af", + createTime: "2025-06-01 00:00:01", + creator: "1", + operateTime: "2025-06-01 00:00:01", + operator: "1", + isdelete: "0", + corpinfoId: "13cf0f4ec77e4d98ae8cdd9c3386ae0c", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "f18561c4f3304de2abb3abf3447c1f42", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-14 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "888888", + openingTime: "2025-05-14 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "c0b73248951647fdacbc0135435c35b6", + createTime: "2025-05-16 00:00:00", + creator: "1", + operateTime: "2025-05-16 00:00:00", + operator: "1", + isdelete: "0", + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "1f60ce32b7824c7c8f528dfec2f486f6", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-14 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "新建班级", + openingTime: "2025-05-14 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "8c0bd01a749a4ab9a9debbb502e2fc8b", + createTime: "2025-05-17 00:00:00", + creator: "1", + operateTime: "2025-05-17 00:00:00", + operator: "1", + isdelete: "0", + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "2902e676235441f9b0a9b0b04e2323c4", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-13 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "测试测试", + openingTime: "2025-05-13 00:00:00", + place: "", + placeName: null, + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "c5b2fb9938584f9eb31a8695c6b17b1f", + createTime: "2025-06-01 00:00:00", + creator: "1", + operateTime: "2025-06-01 00:00:00", + operator: "1", + isdelete: "0", + corpinfoId: "13cf0f4ec77e4d98ae8cdd9c3386ae0c", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "23dbed8a477c45f790739ff6c739a010", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250515/a394731af5cf4fab8183fa7663a1e491.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-13 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "0513-1", + openingTime: "2025-05-13 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + { + classInfoId: "ce21960b2c304134af6e96a26cff1f70", + createTime: "2025-05-14 18:50:00", + creator: "1", + operateTime: "2025-05-14 18:50:00", + operator: "1", + isdelete: "0", + corpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + userId: "5d8dcfbcd27741c79efaa6ca31941b9e", + status: "0", + classMessageId: "61ab001c98d54c5e8db53de675445523", + username: "13058604112", + name: "0513-1", + sex: "0", + cardId: "130726200406079838", + belongToCorpName: "测试相关方", + departmentName: "测试相关方", + photo: "/uploadFiles/file/education/face/20250514/c3e85138dea843578204357528f1611b.jpeg", + phone: "13058604112", + personWorkType: null, + certificate: null, + classNo: null, + trainUsersId: null, + validityPeriodStart: "2025-05-12 00:00:00", + validityPeriodEnd: "2025-05-14", + className: "测试一个教育培训", + openingTime: "2025-05-12 00:00:00", + place: "3725a5aa60da407e87b7931e311da192", + placeName: "教育培训中心(东山校区)阶梯教室", + postName: null, + deptName: "测试相关方", + }, + ], + special: [], + flows: [ + { + flowId: "fd58bf5ad97847419f8de769639947f5", + type: "1", + creator: null, + creatorName: null, + creatorTime: "2025-05-13 14:30:18", + validFlag: "1", + foreignKey: "5d8dcfbcd27741c79efaa6ca31941b9e", + isdelete: "0", + endFlag: "1", + details: [ + { + flowDetailId: "33ec9909844b482fbcdb8c6cc1e8a9db", + flowId: "fd58bf5ad97847419f8de769639947f5", + stepFlag: "0", + stepName: "相关方提交人员信息到发包单位", + sort: 0, + parentId: "0", + approverId: "87ef258559e6430aa837e0f38062e250", + approverName: "测试相关方", + approverOpinion: null, + approverCorpinfoId: "dd5ab430a9f442a0be64c61a9645b904", + approverCorpinfoName: "测试相关方", + approverTime: "2025-05-13 14:30:18", + passFlag: "1", + endFlag: "0", + isdelete: "0", + foreignKey: null, + appointAnnex: "/uploadFiles/file/xgf/94212aec9b66433ca3b665a68251d8b5.zip", + appointAnnexName: null, + }, + { + flowDetailId: "b6e4612892b14a73b8aa4324c69c85d3", + flowId: "fd58bf5ad97847419f8de769639947f5", + stepFlag: "0", + stepName: null, + sort: 1, + parentId: "33ec9909844b482fbcdb8c6cc1e8a9db", + approverId: "94407a4e15ec46b5974b128e124fa661", + approverName: "齐津铖", + approverOpinion: "", + approverCorpinfoId: "13cf0f4ec77e4d98ae8cdd9c3386ae0c", + approverCorpinfoName: "卓云企业", + approverTime: "2025-05-13 14:38:39", + passFlag: "1", + endFlag: "0", + isdelete: "0", + foreignKey: null, + appointAnnex: null, + appointAnnexName: null, + }, + { + flowDetailId: "1ef915958e5e4eba872c55588524b168", + flowId: "fd58bf5ad97847419f8de769639947f5", + stepFlag: "1", + stepName: null, + sort: 2, + parentId: "b6e4612892b14a73b8aa4324c69c85d3", + approverId: "94407a4e15ec46b5974b128e124fa661", + approverName: "齐津铖", + approverOpinion: "", + approverCorpinfoId: "13cf0f4ec77e4d98ae8cdd9c3386ae0c", + approverCorpinfoName: "卓云企业", + approverTime: "2025-05-13 14:39:43", + passFlag: "1", + endFlag: "1", + isdelete: "0", + foreignKey: null, + appointAnnex: null, + appointAnnexName: null, + }, + ], + }, + ], + lastFlow: { + flowsId: "5d8dcfbcd27741c79efaa6ca31941b9e", + foreignKeyId: "5d8dcfbcd27741c79efaa6ca31941b9e", + foreignKeyName: "sys_user=>user_id", + flowsStep: 1, + flowsType: "0", + isDelete: "0", + appointZeroCorpId: "13cf0f4ec77e4d98ae8cdd9c3386ae0c", + appointZeroCorpType: null, + appointZeroCorpName: "卓云企业", + appointZeroDepartmentId: "16579f1de79743198884a56350c113cc", + appointZeroDepartmentName: "分公司级测试部门", + appointZeroUserId: "94407a4e15ec46b5974b128e124fa661", + appointZeroUserName: "齐津铖", + appointZeroStatus: "1", + appointZeroOpinion: "", + appointZeroTime: "2025-05-13 14:38:39", + appointOneCorpId: "13cf0f4ec77e4d98ae8cdd9c3386ae0c", + appointOneCorpName: "卓云企业", + appointOneCorpType: "0", + appointOneDepartmentId: "16579f1de79743198884a56350c113cc", + appointOneDepartmentName: "", + appointOneUserId: "94407a4e15ec46b5974b128e124fa661", + appointOneUserName: "齐津铖", + appointOneStatus: "1", + appointOneOpinion: "", + appointOneTime: "2025-05-13 14:39:42", + appointTwoCorpId: null, + appointTwoCorpName: null, + appointTwoCorpType: null, + appointTwoDepartmentId: null, + appointTwoDepartmentName: null, + appointTwoUserId: null, + appointTwoUserName: null, + appointTwoStatus: null, + appointTwoOpinion: null, + appointTwoTime: null, + appointThreeCorpId: null, + appointThreeCorpName: null, + appointThreeCorpType: null, + appointThreeDepartmentId: null, + appointThreeDepartmentName: null, + appointThreeUserId: null, + appointThreeUserName: null, + appointThreeStatus: null, + appointThreeOpinion: null, + appointThreeTime: null, + appointFourCorpId: null, + appointFourCorpName: null, + appointFourCorpType: null, + appointFourDepartmentId: null, + appointFourDepartmentName: null, + appointFourUserId: null, + appointFourUserName: null, + appointFourStatus: null, + appointFourOpinion: null, + appointFiveCorpId: null, + appointFiveCorpName: null, + appointFiveCorpType: null, + appointFiveDepartmentId: null, + appointFiveDepartmentName: null, + appointFiveUserId: null, + appointFiveUserName: null, + appointFiveStatus: null, + appointFiveOpinion: null, + appointSixCorpId: null, + appointSixCorpName: null, + appointSixCorpType: null, + appointSixDepartmentId: null, + appointSixDepartmentName: null, + appointSixUserId: null, + appointSixUserName: null, + appointSixStatus: null, + appointSixOpinion: null, + appointSevenCorpId: null, + appointSevenCorpName: null, + appointSevenCorpType: null, + appointSevenDepartmentId: null, + appointSevenDepartmentName: null, + appointSevenUserId: null, + appointSevenUserName: null, + appointSevenStatus: null, + appointSevenOpinion: null, + sendType: "1", + checkStatus: "2", + checkStatusName: "审核结束", + }, + powerFlag: null, + entrustFlag: null, + lastStepFlag: null, + checkStep: null, + flowsStep: null, + flowsType: null, + attorney: null, + appointZeroUserId: null, + appointZeroCorpName: "卓云企业", + appointZeroTime: null, + appointOneUserId: null, + appointOneCorpName: "卓云企业", + appointOneTime: null, + appointTwoUserId: null, + appointTwoCorpName: null, + appointTwoTime: null, + appointThreeUserId: null, + appointThreeCorpName: null, + appointThreeTime: null, + appointFourUserId: null, + appointFourCorpName: null, + appointFiveUserId: null, + appointFiveCorpName: null, + appointSixUserId: null, + appointSixCorpName: null, + appointSevenUserId: null, + appointSevenCorpName: null, + appointTime: "2025-05-13 14:39:42", + cardId: null, + belongToCorp: "dd5ab430a9f442a0be64c61a9645b904", + belongToCorpName: "测试相关方", + degreeOfEducation: null, + isSocial: null, + isInjuriesPay: null, + ispay: null, + isBf: null, + age: null, + unValidFlag: "1", + unValidInfo: "合格证有效期", + checkStatus: null, + classStatus: null, + }); + const [selectedStep, setSelectedStep] = useState(null); + + return ( + <> + +
+ 人员信息 + 0 ? : "暂无信息" }, + { label: "姓名", children: info.name }, + { label: "性别", children: getLabelName({ status: info.sex, list: SEX_ENUM }) }, + { label: "出生年月", children: info.dateOfBirth }, + { label: "年龄", children: info.age }, + { label: "身份证照片", children: info.userCardFile?.length > 0 ? : "暂无信息" }, + { label: "手机号", children: info.phone }, + { label: "身份证", children: info.cardId }, + { label: "民族", children: info.nationalityName || "暂无信息" }, + { label: "婚姻状况", children: getLabelName({ status: info.maritalstatus, list: MARITAL_STATUS_ENUM }) }, + { label: "政治面貌", children: info.politicalStatusName }, + ...(info.politicalStatusName === "中共党员" ? [{ label: "入党时间", children: info.politicalTime }] : []), + { label: "户口所在地", children: info.hklocal || "暂无信息" }, + { label: "现住址", children: info.address || "暂无信息" }, + { label: "联系电话", children: info.phone }, + { label: "文化程度", children: info.degreeOfEducationName }, + { label: "岗位名称(工种)", children: info.postId }, + { label: "是否缴纳社保", children: getLabelName({ status: info.isSocial, list: WHETHER_ENUM }) }, + ...(info.isSocial === "1" + ? [ + { label: "社会保障号码", children: info.socialNumber }, + { label: "社保卡照片", children: info.socSecurity?.length > 0 ? : "暂无信息" }, + ] + : []), + { label: "是否按期缴纳工伤保险", children: getLabelName({ status: info.isInjuriesPay, list: WHETHER_ENUM }) }, + ...(info.isInjuriesPay === "1" + ? [ + { label: "工伤保险有效期", children: info.isInjuriesPayTime }, + { label: "工伤保险凭证", children: info.empInsurance?.length > 0 ? : "暂无信息" }, + ] + : []), + { label: "是否缴纳商业保险", children: getLabelName({ status: info.ispay, list: WHETHER_ENUM }) }, + ...(info.ispay === "1" + ? [ + { label: "商业保险单号", children: info.ispayNumber }, + { label: "商业保险附件", children: info.insurance?.length > 0 ? : "暂无信息" }, + ] + : []), + { label: "是否签订劳动合同", children: getLabelName({ status: info.isSignLabor, list: WHETHER_ENUM }) }, + ...(info.isSignLabor === "1" + ? [ + { label: "劳动合同附件", children: info.contract?.length > 0 ? : "暂无信息" }, + ] + : []), + { label: "是否参加三级安全培训", children: getLabelName({ status: info.isLevelThree, list: WHETHER_ENUM }) }, + ...(info.isLevelThree === "1" + ? [ + { label: "三级安全培训照片", children: info.threeLevel?.length > 0 ? : "暂无信息" }, + ] + : []), + { label: "是否缴纳保险", children: getLabelName({ status: info.isBf, list: WHETHER_ENUM }) }, + { label: "是否特殊工种", children: getLabelName({ status: info.isSpecialJob, list: WHETHER_ENUM }) }, + { label: "是否流动人员", children: getLabelName({ status: info.isflow, list: WHETHER_ENUM }) }, + ]} + /> + 培训记录 +
+ 特证信息 +
() }, + { title: "作业类别", dataIndex: "specialTypeName" }, + { title: "操作项目", dataIndex: "operationTypeName" }, + { title: "证书名称", dataIndex: "certificate" }, + { title: "发证机关", dataIndex: "issuingAuthority" }, + { title: "证书类型", dataIndex: "cerTypeName" }, + { title: "有效期", dataIndex: "time" }, + ]} + pagination={false} + dataSource={info.special} + disabledResizer={true} + /> + 信息审核信息 + + + 审核操作历史记录 +
setSelectedStep(null), + expandedRowRender: record => ( + <> +
+ ({ + key: item.flowDetailId, + title: `${item.approverCorpinfoName}/${item.approverName && item.approverName !== "" ? item.approverName : "推送"}`, + description: ( +
+
+ {(item.stepName + ? item.stepName + : item.passFlag === "1" + ? "通过" + : `不通过/${item.approverOpinion}`)} +
+
+ ( + {item.approverTime} + ) +
+
+ ), + status: "process", + onClick: () => setSelectedStep(item), + })) || []} + /> +
+ + {selectedStep && ( + downloadFile({ url: selectedStep.appointAnnex })} + > + 下载 + + ), + }, + ]} + /> + )} + + ), + }} + pagination={false} + dataSource={info.flows} + disabledResizer={true} + /> + + + ); +} + +export default View; diff --git a/src/pages/Container/Stakeholder/User/index.js b/src/pages/Container/Stakeholder/User/index.js new file mode 100644 index 0000000..e30c0f4 --- /dev/null +++ b/src/pages/Container/Stakeholder/User/index.js @@ -0,0 +1,9 @@ +function User(props) { + return ( +
+ {props.children} +
+ ); +} + +export default User; diff --git a/src/pages/Container/Stakeholder/index.js b/src/pages/Container/Stakeholder/index.js new file mode 100644 index 0000000..6b1a507 --- /dev/null +++ b/src/pages/Container/Stakeholder/index.js @@ -0,0 +1,9 @@ +function Stakeholder(props) { + return ( +
+ {props.children} +
+ ); +} + +export default Stakeholder; diff --git a/src/pages/Container/Supervision/index.js b/src/pages/Container/Supervision/index.js new file mode 100644 index 0000000..eda14bf --- /dev/null +++ b/src/pages/Container/Supervision/index.js @@ -0,0 +1,9 @@ +function Supervision(props) { + return ( +
+ {props.children} +
+ ); +} + +export default Supervision; diff --git a/src/pages/Container/index.js b/src/pages/Container/index.js new file mode 100644 index 0000000..c26d322 --- /dev/null +++ b/src/pages/Container/index.js @@ -0,0 +1,101 @@ +import { ImportCore } from "@cqsjjb/jjb-common-decorator/module"; +import { theme as antdTheme, App, ConfigProvider } from "antd"; +import language from "antd/locale/zh_CN"; +import React from "react"; + +import { InjectContext } from "~/enumerate/context"; + +export default class Container extends React.Component { + state = window?.base?.themeConfig || { + algorithm: window.process.env.app.antd.algorithm, + borderRadius: window.process.env.app.antd.borderRadius, + colorPrimary: window.process.env.app.antd.colorPrimary, + }; + + get token() { + const { + colorPrimary, + borderRadius, + } = this.state; + return { + fontFamily: window.process.env.app.antd.fontFamily, + colorPrimary, + borderRadius, + }; + } + + get algorithm() { + return antdTheme[this.state.algorithm]; + } + + componentDidMount() { + if (window.__IN_BASE__) { + // eslint-disable-next-line react-web-api/no-leaked-event-listener + window.base.addEventListener("EVENT_THEME_CONTROL", (e) => { + const config = e.data; + this.setState({ [config.field]: config.value }); + }); + } + } + + render() { + return ( + + + + + + ); + } +} + +function AppMiddle(props) { + return ( + + {process.env.NODE_ENV === "development" + ? props.children + : ( + + {props.children} + + )} + + ); +} + +class Interceptor extends React.Component { + state = { + Component: undefined, + }; + + componentDidMount() { + if (process.env.app.appKey) { + ImportCore({ + name: "$", + from: "https://cdn.cqjjb.cn/jcloud/use/plugin/b31c9840a57f11ef91cf7f3cabbb7484/latest", + }).then(async (res) => { + if (res.status) { + this.setState({ Component: res.module?.PageCover }); + } + }); + } + } + + render() { + const { Component } = this.state; + return (Component && process.env.app.appKey && process.env.NODE_ENV === "development") + ? ( + + {this.props.children} + + ) + : this.props.children; + } +} diff --git a/src/pages/index.js b/src/pages/index.js new file mode 100644 index 0000000..64c36bb --- /dev/null +++ b/src/pages/index.js @@ -0,0 +1,8 @@ +export default function () { + return ( +

+ 底座微应用模板,技术文档: + https://www.yuque.com/buhangjiecheshen-ymbtb/qc0093/gxdun1dphetcurko +

+ ); +} diff --git a/webstorm.config.js b/webstorm.config.js new file mode 100644 index 0000000..ca262cd --- /dev/null +++ b/webstorm.config.js @@ -0,0 +1,16 @@ +"use strict"; +const path = require("node:path"); + +function resolve(dir) { + return path.join(__dirname, ".", dir); +} + +module.exports = { + context: path.resolve(__dirname, "./"), + resolve: { + extensions: [".js"], + alias: { + "~": resolve("src/"), + }, + }, +};