commit 8bc20069d2fbaf608d05e8e0e2e1a3d92d066cc5 Author: 常旭 <2868304641@qq.com> Date: Sat Jul 5 15:04:22 2025 +0800 fix: 工作台页面 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7e3649a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..8336e93 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,8 @@ +/lambda/ +/scripts +/config +.history +public +dist +.umi +mock \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..b882c20 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,8 @@ +module.exports = { + extends: [require.resolve('@umijs/fabric/dist/eslint')], + globals: { + ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true, + page: true, + REACT_APP_ENV: true, + }, +}; diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7fd9f58 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +**/node_modules +# roadhog-api-doc ignore +/src/utils/request-temp.js +_roadhog-api-doc + +# production +/dist +/.vscode + +# misc +.DS_Store +npm-debug.log* +yarn-error.log + +/coverage +.idea +yarn.lock +package-lock.json +*bak +.vscode + +# visual studio code +.history +*.log +functions/* +.temp/** + +# umi +.umi +.umi-production + +# screenshot +screenshot +.firebase +.eslintcache + +build diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d17efb4 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,23 @@ +**/*.svg +package.json +.umi +.umi-production +/dist +.dockerignore +.DS_Store +.eslintignore +*.png +*.toml +docker +.editorconfig +Dockerfile* +.gitignore +.prettierignore +LICENSE +.eslintcache +*.lock +yarn-error.log +.history +CNAME +/build +/public \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..7b597d7 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,5 @@ +const fabric = require('@umijs/fabric'); + +module.exports = { + ...fabric.prettier, +}; diff --git a/.stylelintrc.js b/.stylelintrc.js new file mode 100644 index 0000000..c203078 --- /dev/null +++ b/.stylelintrc.js @@ -0,0 +1,5 @@ +const fabric = require('@umijs/fabric'); + +module.exports = { + ...fabric.stylelint, +}; diff --git a/README.md b/README.md new file mode 100644 index 0000000..4c89a72 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# Ant Design Pro + +This project is initialized with [Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use. + +## Environment Prepare + +Install `node_modules`: + +```bash +npm install +``` + +or + +```bash +yarn +``` + +## Provided Scripts + +Ant Design Pro provides some useful script to help you quick start and build with web project, code style check and test. + +Scripts provided in `package.json`. It's safe to modify or add additional script: + +### Start project + +```bash +npm start +``` + +### Build project + +```bash +npm run build +``` + +### Check code style + +```bash +npm run lint +``` + +You can also use script to auto fix some lint error: + +```bash +npm run lint:fix +``` + +### Test code + +```bash +npm test +``` + +## More + +You can view full document on our [official website](https://pro.ant.design). And welcome any feedback in our [github](https://github.com/ant-design/ant-design-pro). diff --git a/config/config.dev.js b/config/config.dev.js new file mode 100644 index 0000000..0caa2b7 --- /dev/null +++ b/config/config.dev.js @@ -0,0 +1,18 @@ +// https://umijs.org/config/ +import { defineConfig } from 'umi'; + +export default defineConfig({ + plugins: [ + // https://github.com/zthxxx/react-dev-inspector + 'react-dev-inspector/plugins/umi/react-inspector', + ], + // https://github.com/zthxxx/react-dev-inspector#inspector-loader-props + inspectorConfig: { + exclude: [], + babelPlugins: [], + babelOptions: {}, + }, + + + +}); diff --git a/config/config.js b/config/config.js new file mode 100644 index 0000000..86acf97 --- /dev/null +++ b/config/config.js @@ -0,0 +1,49 @@ +// https://umijs.org/config/ +import { defineConfig } from 'umi'; +import defaultSettings from './defaultSettings'; +import proxy from './proxy'; +import routes from './routes'; + +const { REACT_APP_ENV } = process.env; + +export default defineConfig({ + hash: true, + antd: {}, + dva: { + hmr: true, + }, + history: { + type: 'browser', + }, + locale: { + // default zh-CN + default: 'zh-CN', + antd: true, + // default true, when it is true, will use `navigator.language` overwrite default + baseNavigator: true, + }, + dynamicImport: { + loading: '@/components/PageLoading/index', + }, + targets: { + ie: 11, + }, + // umi routes: https://umijs.org/docs/routing + routes, + // Theme for antd: https://ant.design/docs/react/customize-theme-cn + theme: { + 'primary-color': defaultSettings.primaryColor, + }, + base: '/superintend/', + publicPath: '/superintend/', + title: false, + ignoreMomentLocale: true, + proxy: proxy[REACT_APP_ENV || 'dev'], + manifest: { + basePath: '/', + }, + esbuild: {}, + define: { + + } +}); diff --git a/config/defaultSettings.js b/config/defaultSettings.js new file mode 100644 index 0000000..693c1b2 --- /dev/null +++ b/config/defaultSettings.js @@ -0,0 +1,16 @@ +const proSettings = { + "navTheme": "light", + "primaryColor": "#1890ff", + "layout": "side", + // "contentWidth": "Fluid", + "fixedHeader": false, + "fixSiderbar": false, + "pwa": false, + "iconfontUrl": "", + "menu": { + "locale": false + }, + "footerRender": false, + "menuHeaderRender": false +}; +export default proSettings; diff --git a/config/proxy.js b/config/proxy.js new file mode 100644 index 0000000..9a8bd35 --- /dev/null +++ b/config/proxy.js @@ -0,0 +1,36 @@ +/** + * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置 + * The agent cannot take effect in the production environment + * so there is no configuration of the production environment + * For details, please see + * https://pro.ant.design/docs/deploy + */ +export default { + dev: { + '/api/': { + target: 'https://preview.pro.ant.design', + changeOrigin: true, + pathRewrite: { + '^': '', + }, + }, + }, + test: { + '/api/': { + target: 'https://preview.pro.ant.design', + changeOrigin: true, + pathRewrite: { + '^': '', + }, + }, + }, + pre: { + '/api/': { + target: 'your pre url', + changeOrigin: true, + pathRewrite: { + '^': '', + }, + }, + }, +}; diff --git a/config/routes.js b/config/routes.js new file mode 100644 index 0000000..937cdb2 --- /dev/null +++ b/config/routes.js @@ -0,0 +1,147 @@ +// 注释:hideInMenu参数控制菜单隐藏 +export default [ + { + path: '/', + component: '../layouts/BlankLayout', + routes: [ + // { + // path: '/user', + // component: '../layouts/UserLayout', + // routes: [ + // { + // name: 'login', + // path: '/user/login', + // component: './User/login', + // }, + // ], + // }, + { + path: '/', + component: '../layouts/SecurityLayout', + routes: [ + { + path: '/resultdata', + component: './ResultData', + }, + { + path:"/GZT", + component:"./GZT" + }, + { + path: '/', + component: '../layouts/BasicLayout', + // authority: ['admin', 'user'], + routes: [ + { + path: '/', + redirect: '/doingcases', + }, + { + name: '在办事项', + path: '/doingcases', + icon: 'BarsOutlined', + component: './DoingCases', + }, + { + name: '已办事项', + path: '/donecases', + icon: 'AuditOutlined', + component: './DoneCases', + }, + { + name: '进度查询', + path: '/progresssearch', + icon: 'ProfileOutlined', + component: './ProgressSearch', + }, + { + name: '问题处理单查询', + path: '/problemhandlingsearch', + icon: 'ScheduleOutlined', + hideInMenu: false, // 控制菜单隐藏 + component: './ProblemHandlingSearch', + }, + // { + // name: '督察专项', + // path: '/superviseitem', + // icon: 'ProjectOutlined', + // component: './SuperviseItem', + // }, + { + name: '督察专项', + path: '/superviseitem', + icon: 'ProjectOutlined', + routes: [ + { + name: '专项审批', + path: '/superviseitem/approve', + icon: 'AuditOutlined', + authority: ['bu'], + component: './SuperviseItem/ApproveItem', + }, + { + name: '专项签收', + path: '/superviseitem/check', + icon: 'AuditOutlined', + component: './SuperviseItem/CheckItem', + }, + ], + }, + { + name: '模型审批', + path: '/modelapprove', + icon: 'SnippetsOutlined', + routes: [ + { + name: '模型分享', + path: '/modelapprove/share', + icon: 'AuditOutlined', + component: './ModelApprove/Share', + }, + { + name: '省级上报', + path: '/modelapprove/report', + icon: 'AuditOutlined', + component: './ModelApprove/Report', + authority: ['bu', 'sheng'], + }, + { + name: '市级上报', + path: '/modelapprove/reportshi', + icon: 'AuditOutlined', + component: './ModelApprove/Report', + authority: ['sheng', 'shi'], + }, + ], + }, + { + name: '系统配置', + path: '/systemmanage', + icon: 'SettingOutlined', + authority: ['gly'], + routes: [ + { + name: '层级联动', + path: '/systemmanage/levelmanage', + icon: 'AuditOutlined', + component: './SystemManage/LevelManage', + }, + ], + }, + { + component: './404', + }, + ], + }, + { + component: './404', + }, + ], + + }, + ], + }, + { + component: './404', + }, +]; diff --git a/distribute.tar b/distribute.tar new file mode 100644 index 0000000..f49d625 Binary files /dev/null and b/distribute.tar differ diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..4c4eeaf --- /dev/null +++ b/jest.config.js @@ -0,0 +1,9 @@ +module.exports = { + testURL: 'http://localhost:8000', + testEnvironment: './tests/PuppeteerEnvironment', + verbose: false, + globals: { + ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: false, + localStorage: null, + }, +}; diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..f87334d --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/mock/listTableList.js b/mock/listTableList.js new file mode 100644 index 0000000..b15c2d2 --- /dev/null +++ b/mock/listTableList.js @@ -0,0 +1,178 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { parse } from 'url'; + +// mock tableListDataSource +const genList = (current, pageSize) => { + const tableListDataSource = []; + + for (let i = 0; i < pageSize; i += 1) { + const index = (current - 1) * 10 + i; + tableListDataSource.push({ + key: index, + disabled: i % 6 === 0, + href: 'https://ant.design', + avatar: [ + 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', + 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png', + ][i % 2], + name: `TradeCode ${index}`, + owner: '曲丽丽', + desc: '这是一段描述', + callNo: Math.floor(Math.random() * 1000), + status: Math.floor(Math.random() * 10) % 4, + updatedAt: new Date(), + createdAt: new Date(), + progress: Math.ceil(Math.random() * 100), + }); + } + + tableListDataSource.reverse(); + return tableListDataSource; +}; + +let tableListDataSource = genList(1, 100); + +function getRule(req, res, u) { + let realUrl = u; + + if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') { + realUrl = req.url; + } + + const { current = 1, pageSize = 10 } = req.query; + const params = parse(realUrl, true).query; + let dataSource = [...tableListDataSource].slice((current - 1) * pageSize, current * pageSize); + const sorter = JSON.parse(params.sorter); + + if (sorter) { + dataSource = dataSource.sort((prev, next) => { + let sortNumber = 0; + Object.keys(sorter).forEach(key => { + if (sorter[key] === 'descend') { + if (prev[key] - next[key] > 0) { + sortNumber += -1; + } else { + sortNumber += 1; + } + + return; + } + + if (prev[key] - next[key] > 0) { + sortNumber += 1; + } else { + sortNumber += -1; + } + }); + return sortNumber; + }); + } + + if (params.filter) { + const filter = JSON.parse(params.filter); + + if (Object.keys(filter).length > 0) { + dataSource = dataSource.filter(item => + Object.keys(filter).some(key => { + if (!filter[key]) { + return true; + } + + if (filter[key].includes(`${item[key]}`)) { + return true; + } + + return false; + }), + ); + } + } + + if (params.name) { + dataSource = dataSource.filter(data => data.name.includes(params.name || '')); + } + + const result = { + data: dataSource, + total: tableListDataSource.length, + success: true, + pageSize, + current: parseInt(`${params.currentPage}`, 10) || 1, + }; + return res.json(result); +} + +function postRule(req, res, u, b) { + let realUrl = u; + + if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') { + realUrl = req.url; + } + + const body = (b && b.body) || req.body; + const { method, name, desc, key } = body; + + switch (method) { + /* eslint no-case-declarations:0 */ + case 'delete': + tableListDataSource = tableListDataSource.filter(item => key.indexOf(item.key) === -1); + break; + + case 'post': + (() => { + const i = Math.ceil(Math.random() * 10000); + const newRule = { + key: tableListDataSource.length, + href: 'https://ant.design', + avatar: [ + 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', + 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png', + ][i % 2], + name, + owner: '曲丽丽', + desc, + callNo: Math.floor(Math.random() * 1000), + status: Math.floor(Math.random() * 10) % 2, + updatedAt: new Date(), + createdAt: new Date(), + progress: Math.ceil(Math.random() * 100), + }; + tableListDataSource.unshift(newRule); + return res.json(newRule); + })(); + + return; + + case 'update': + (() => { + let newRule = {}; + tableListDataSource = tableListDataSource.map(item => { + if (item.key === key) { + newRule = { ...item, desc, name }; + return { ...item, desc, name }; + } + + return item; + }); + return res.json(newRule); + })(); + + return; + + default: + break; + } + + const result = { + list: tableListDataSource, + pagination: { + total: tableListDataSource.length, + }, + }; + res.json(result); +} + +export default { + 'GET /api/rule': getRule, + 'POST /api/rule': postRule, +}; diff --git a/mock/notices.js b/mock/notices.js new file mode 100644 index 0000000..5fa5fca --- /dev/null +++ b/mock/notices.js @@ -0,0 +1,103 @@ +const getNotices = (req, res) => { + res.json([ + { + id: '000000001', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', + title: '你收到了 14 份新周报', + datetime: '2017-08-09', + type: 'notification', + }, + { + id: '000000002', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png', + title: '你推荐的 曲妮妮 已通过第三轮面试', + datetime: '2017-08-08', + type: 'notification', + }, + { + id: '000000003', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png', + title: '这种模板可以区分多种通知类型', + datetime: '2017-08-07', + read: true, + type: 'notification', + }, + { + id: '000000004', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + datetime: '2017-08-07', + type: 'notification', + }, + { + id: '000000005', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', + title: '内容不要超过两行字,超出时自动截断', + datetime: '2017-08-07', + type: 'notification', + }, + { + id: '000000006', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', + title: '曲丽丽 评论了你', + description: '描述信息描述信息描述信息', + datetime: '2017-08-07', + type: 'message', + clickClose: true, + }, + { + id: '000000007', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', + title: '朱偏右 回复了你', + description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像', + datetime: '2017-08-07', + type: 'message', + clickClose: true, + }, + { + id: '000000008', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', + title: '标题', + description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像', + datetime: '2017-08-07', + type: 'message', + clickClose: true, + }, + { + id: '000000009', + title: '任务名称', + description: '任务需要在 2017-01-12 20:00 前启动', + extra: '未开始', + status: 'todo', + type: 'event', + }, + { + id: '000000010', + title: '第三方紧急代码变更', + description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务', + extra: '马上到期', + status: 'urgent', + type: 'event', + }, + { + id: '000000011', + title: '信息安全考试', + description: '指派竹尔于 2017-01-09 前完成更新并发布', + extra: '已耗时 8 天', + status: 'doing', + type: 'event', + }, + { + id: '000000012', + title: 'ABCD 版本发布', + description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务', + extra: '进行中', + status: 'processing', + type: 'event', + }, + ]); +}; + +export default { + 'GET /api/notices': getNotices, +}; diff --git a/mock/problem.js b/mock/problem.js new file mode 100644 index 0000000..5e94841 --- /dev/null +++ b/mock/problem.js @@ -0,0 +1,92 @@ +const getProblemList = (req, res) => { + res.json({ + total: 1, + resCode: 0, + data: [ + { + DCWTLXDM: "01010100", + DCWTMC_BT: "督办单测试", + JWDCFSDM: "101", + OPEN_DATE: "2018/9/28 15:31:32", + OrgNo: "650000000000", + TIMEOUT_DATE: "2018/9/28 15:31:54", + WTSJASJ_ASJFSKSSJ: "2018-09-28 15:31:28", + WTSJDW_GAJGJGDM: "650000000000", + WTSJDW_GAJGMC: "新疆维吾尔自治区公安厅", + XXDJDW_GAJGJGDM: "650000000000", + XXDJDW_GAJGMC: "新疆维吾尔自治区公安厅", + XXDJRY_GMSFHM: "430124198602200038", + XXDJRY_XM: "管理", + ZYCD_PDBZ: 0, + JJCD_PDBZ_NAME: "否", + WTSJASJ_ASJFSKSSJ_VIEW: "2018-09-28 15:31:28", + ZYCD_PDBZ_NAME: "否", + ZJMC: "测试一下督察问题证据信息证据名称", + JYQK: "没有什么可以写的", + GMSFHM: "430124198602200038", + UName: "管理", + OrgNo: "650000000000", + GAJGMC: "新疆维吾尔自治区公安厅", + wtsjrItem: [{ + WTSJR_GMSFHM: " 4310************11", + WTSJR_XM: "张三", + WTSJR_XBDM: "1", + WTSJR_CSRQ: " 19870101", + WTSJR_JH: " 10019", + WTSJR_JXYWZJBDM: "", + WTSJR_ZZMMDM: "", + WTSJR_GBZWDM: " 430000000000", + WTSJR_GAJGJGDM: " 430000000000", + WTSJR_LXDH: "" + }, { + WTSJR_GMSFHM: " 4310************25", + WTSJR_XM: "张红强", + WTSJR_XBDM: "1", + WTSJR_CSRQ: " 19000101", + WTSJR_JH: " 10008", + WTSJR_JXYWZJBDM: "", + WTSJR_ZZMMDM: "", + WTSJR_GBZWDM: " 431000000000", + WTSJR_GAJGJGDM: " 431000000000", + WTSJR_LXDH: "" + }], + evidenceItem: { + head: [{ + fieldName: "KeyWord", + fieldAlias: "关键字" + }, { + fieldName: "StartTime", + fieldAlias: "开始时间" + }, { + fieldName: "EndTime", + fieldAlias: "结束时间" + }, { + fieldName: "FileName", + fieldAlias: "文件名称" + }, { + fieldName: "FilePosition", + fieldAlias: "文件路径" + } + ], + data: [{ + KeyWord: "关键字1", + StartTime: "2018-10-2 17:28:36", + EndTime: "2018-10-2 17:28:42", + FileName: "文件名1", + FilePosition: "http://www.baidu.com" + }, { + KeyWord: "关键字2", + StartTime: "2018-10-2 17:28:46", + EndTime: "2018-10-2 17:28:50", + FileName: "文件名2", + FilePosition: "http://www.baidu.com" + }] + } + } + ] + }); +}; + +export default { + 'POST /Api/Dispose/BTDisposeList': getProblemList, +}; diff --git a/mock/route.js b/mock/route.js new file mode 100644 index 0000000..a6deca8 --- /dev/null +++ b/mock/route.js @@ -0,0 +1,7 @@ +export default { + '/api/auth_routes': { + '/form/advanced-form': { + authority: ['admin', 'user'], + }, + }, +}; diff --git a/mock/user.js b/mock/user.js new file mode 100644 index 0000000..320ae12 --- /dev/null +++ b/mock/user.js @@ -0,0 +1,166 @@ +const waitTime = (time = 100) => + new Promise(resolve => { + setTimeout(() => { + resolve(true); + }, time); + }); + +async function getFakeCaptcha(req, res) { + await waitTime(2000); + return res.json('captcha-xxx'); +} // 代码中会兼容本地 service mock 以及部署站点的静态数据 + +export default { + // 支持值为 Object 和 Array + 'GET /api/currentUser': { + name: 'Serati Ma', + avatar: 'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png', + userid: '00000001', + email: 'antdesign@alipay.com', + signature: '海纳百川,有容乃大', + title: '交互专家', + group: '蚂蚁集团-某某某事业群-某某平台部-某某技术部-UED', + tags: [ + { + key: '0', + label: '很有想法的', + }, + { + key: '1', + label: '专注设计', + }, + { + key: '2', + label: '辣~', + }, + { + key: '3', + label: '大长腿', + }, + { + key: '4', + label: '川妹子', + }, + { + key: '5', + label: '海纳百川', + }, + ], + notifyCount: 12, + unreadCount: 11, + country: 'China', + geographic: { + province: { + label: '浙江省', + key: '330000', + }, + city: { + label: '杭州市', + key: '330100', + }, + }, + address: '西湖区工专路 77 号', + phone: '0752-268888888', + }, + // GET POST 可省略 + 'GET /api/users': [ + { + key: '1', + name: 'John Brown', + age: 32, + address: 'New York No. 1 Lake Park', + }, + { + key: '2', + name: 'Jim Green', + age: 42, + address: 'London No. 1 Lake Park', + }, + { + key: '3', + name: 'Joe Black', + age: 32, + address: 'Sidney No. 1 Lake Park', + }, + ], + 'POST /api/login/account': async (req, res) => { + const { password, userName, type } = req.body; + await waitTime(2000); + + if (password === 'ant.design' && userName === 'admin') { + res.send({ + status: 'ok', + type, + currentAuthority: 'admin', + }); + return; + } + + if (password === 'ant.design' && userName === 'user') { + res.send({ + status: 'ok', + type, + currentAuthority: 'user', + }); + return; + } + + if (type === 'mobile') { + res.send({ + status: 'ok', + type, + currentAuthority: 'admin', + }); + return; + } + + res.send({ + status: 'error', + type, + currentAuthority: 'guest', + }); + }, + 'POST /api/register': (req, res) => { + res.send({ + status: 'ok', + currentAuthority: 'user', + }); + }, + 'GET /api/500': (req, res) => { + res.status(500).send({ + timestamp: 1513932555104, + status: 500, + error: 'error', + message: 'error', + path: '/base/category/list', + }); + }, + 'GET /api/404': (req, res) => { + res.status(404).send({ + timestamp: 1513932643431, + status: 404, + error: 'Not Found', + message: 'No message available', + path: '/base/category/list/2121212', + }); + }, + 'GET /api/403': (req, res) => { + res.status(403).send({ + timestamp: 1513932555104, + status: 403, + error: 'Unauthorized', + message: 'Unauthorized', + path: '/base/category/list', + }); + }, + 'GET /api/401': (req, res) => { + res.status(401).send({ + timestamp: 1513932555104, + status: 401, + error: 'Unauthorized', + message: 'Unauthorized', + path: '/base/category/list', + }); + }, + 'GET /api/login/captcha': getFakeCaptcha, +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..8f77a5b --- /dev/null +++ b/package.json @@ -0,0 +1,106 @@ +{ + "name": "ant-design-pro", + "version": "4.5.0", + "private": true, + "description": "An out-of-box UI solution for enterprise applications", + "scripts": { + "analyze": "cross-env ANALYZE=1 umi build", + "build": "umi build", + "build:sheng": "cross-env PRO=sheng umi build", + "deploy": "npm run site && npm run gh-pages", + "dev": "npm run start:dev", + "fetch:blocks": "pro fetch-blocks && npm run prettier", + "gh-pages": "gh-pages -d dist", + "i18n-remove": "pro i18n-remove --locale=zh-CN --write", + "postinstall": "umi g tmp", + "lint": "umi g tmp && npm run lint:js && npm run lint:style && npm run lint:prettier", + "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ", + "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style", + "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src", + "lint:prettier": "prettier --check \"src/**/*\" --end-of-line auto", + "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less", + "prettier": "prettier -c --write \"src/**/*\"", + "start": "cross-env UMI_ENV=dev a=1 umi dev", + "start:dev": "cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev umi dev", + "start:no-mock": "cross-env MOCK=none UMI_ENV=dev umi dev", + "start:no-ui": "cross-env UMI_UI=none UMI_ENV=dev umi dev", + "start:pre": "cross-env REACT_APP_ENV=pre UMI_ENV=dev umi dev", + "start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev umi dev", + "pretest": "node ./tests/beforeTest", + "test": "umi test", + "test:all": "node ./tests/run-tests.js", + "test:component": "umi test ./src/components", + "tsc": "tsc --noEmit" + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 10" + ], + "dependencies": { + "@ant-design/icons": "^4.0.0", + "@ant-design/pro-descriptions": "^1.2.0", + "@ant-design/pro-form": "^1.3.0", + "@ant-design/pro-layout": "^6.9.0", + "@ant-design/pro-table": "^2.17.0", + "@umijs/route-utils": "^1.0.33", + "antd": "^4.10.0", + "classnames": "^2.2.6", + "lodash": "^4.17.11", + "moment": "^2.25.3", + "omit.js": "^2.0.2", + "qs": "^6.9.0", + "react": "^17.0.0", + "react-dev-inspector": "^1.1.1", + "react-dom": "^17.0.0", + "react-helmet-async": "^1.0.4", + "umi": "^3.2.14", + "umi-request": "^1.0.8" + }, + "devDependencies": { + "@ant-design/pro-cli": "^1.0.28", + "@types/classnames": "^2.2.7", + "@types/express": "^4.17.0", + "@types/history": "^4.7.2", + "@types/jest": "^26.0.0", + "@types/lodash": "^4.14.144", + "@types/qs": "^6.5.3", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", + "@types/react-helmet": "^6.1.0", + "@umijs/fabric": "^2.5.1", + "@umijs/plugin-blocks": "^2.0.5", + "@umijs/plugin-esbuild": "^1.0.1", + "@umijs/preset-ant-design-pro": "^1.2.0", + "@umijs/preset-react": "^1.4.8", + "@umijs/yorkie": "^2.0.3", + "carlo": "^0.9.46", + "chalk": "^4.0.0", + "cross-env": "^7.0.0", + "cross-port-killer": "^1.1.1", + "detect-installer": "^1.0.1", + "enzyme": "^3.11.0", + "eslint": "^7.1.0", + "express": "^4.17.1", + "gh-pages": "^3.0.0", + "jsdom-global": "^3.0.2", + "lint-staged": "^10.0.0", + "mockjs": "^1.0.1-beta3", + "prettier": "^2.0.1", + "puppeteer-core": "^5.0.0", + "stylelint": "^13.0.0", + "typescript": "^4.0.3", + "uuid": "^8.3.2", + "uuidv4": "^6.2.13" + }, + "engines": { + "node": ">=10.0.0" + }, + "checkFiles": [ + "src/**/*.js*", + "src/**/*.ts*", + "src/**/*.less", + "config/**/*.js*", + "scripts/**/*.js" + ] +} diff --git a/public/CNAME b/public/CNAME new file mode 100644 index 0000000..30c2d4d --- /dev/null +++ b/public/CNAME @@ -0,0 +1 @@ +preview.pro.ant.design \ No newline at end of file diff --git a/public/config.json b/public/config.json new file mode 100644 index 0000000..0b52a9b --- /dev/null +++ b/public/config.json @@ -0,0 +1,7 @@ +{ + "resCode": 0, + "msg": "成功", + "data": { + "moduleResultCycleCount": 10 + } +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e2e9325 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/home_bg.png b/public/home_bg.png new file mode 100644 index 0000000..7c92a4b Binary files /dev/null and b/public/home_bg.png differ diff --git a/public/icons/icon-128x128.png b/public/icons/icon-128x128.png new file mode 100644 index 0000000..48d0e23 Binary files /dev/null and b/public/icons/icon-128x128.png differ diff --git a/public/icons/icon-192x192.png b/public/icons/icon-192x192.png new file mode 100644 index 0000000..938e9b5 Binary files /dev/null and b/public/icons/icon-192x192.png differ diff --git a/public/icons/icon-512x512.png b/public/icons/icon-512x512.png new file mode 100644 index 0000000..21fc108 Binary files /dev/null and b/public/icons/icon-512x512.png differ diff --git a/public/pro_icon.svg b/public/pro_icon.svg new file mode 100644 index 0000000..e075b78 --- /dev/null +++ b/public/pro_icon.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/public/routes.json b/public/routes.json new file mode 100644 index 0000000..41df206 --- /dev/null +++ b/public/routes.json @@ -0,0 +1,58 @@ +{ + "resCode": 0, + "msg": "成功", + "data": { + "/doingcases": { + "name": "在办事项", + "show": true + }, + "/donecases": { + "name": "已办事项", + "show": true + }, + "/progresssearch": { + "name": "进度查询", + "show": true + }, + "/problemhandlingsearch": { + "name": "问题处理单查询", + "show": false + }, + "/superviseitem": { + "name": "督察专项", + "show": true + }, + "/superviseitem/approve": { + "name": "专项审批", + "show": true + }, + "/superviseitem/check": { + "name": "专项签收", + "show": true + }, + "/modelapprove": { + "name": "模型审批", + "show": true + }, + "/modelapprove/share": { + "name": "模型分享", + "show": true + }, + "/modelapprove/report": { + "name": "省级上报", + "show": true + }, + "/modelapprove/reportshi": { + "name": "市级上报", + "show": true + }, + "/systemmanage": { + "name": "系统配置", + "show": true + }, + "/systemmanage/levelmanage": { + "name": "层级联动", + "show": true + } + } +} diff --git a/public/servers.json b/public/servers.json new file mode 100644 index 0000000..56491b8 --- /dev/null +++ b/public/servers.json @@ -0,0 +1,7 @@ +{ + "API_URL": "http://localhost:8080/api/v4", + "SYS_MAN_URL": "http://localhost:8080/api", + "LOGIN_URL": "http://localhost:8080", + "PARENT_URL": "http://localhost:8080", + "moduleFactory": "http://localhost:8080/api/v4/sys/self" +} diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 0000000..239bf69 --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1 @@ +Group 28 Copy 5Created with Sketch. \ No newline at end of file diff --git a/src/components/AJCZ/README.md b/src/components/AJCZ/README.md new file mode 100644 index 0000000..e45e685 --- /dev/null +++ b/src/components/AJCZ/README.md @@ -0,0 +1 @@ +案件处置 (办结申请) diff --git a/src/components/AJCZ/index.jsx b/src/components/AJCZ/index.jsx new file mode 100644 index 0000000..965b587 --- /dev/null +++ b/src/components/AJCZ/index.jsx @@ -0,0 +1,320 @@ +import React, { useEffect, useState } from 'react'; +import { Card, Input, Select, Form, Button, Radio, Spin, message } from 'antd'; +import { connect } from 'umi'; + +import UploadBtn from '../UploadBtn'; +import SPLS from '../SPLS'; + +import CZMX from '../CZMX'; +import { ALLSPFS, CSQK, UserLevel } from '@/utils/constants'; +import { getDicsName } from '@/utils/utils'; +import styles from './index.less'; + +/** + * 请求数据为空显示保存按钮,可输入 + * 请求数据不为空为编辑按钮,点击后可编辑,可发布 + * 少一个添加处置信息弹窗 + * + * + */ + +const layout = { + labelCol: { span: 4 }, + wrapperCol: { span: 18 }, +}; + + +const tailLayout = { + wrapperCol: { offset: 10, span: 10 }, +}; +const { Option } = Select; +const { TextArea } = Input; + +const AJBJ = (props) => { + const { id, sysToken, loading, hideModal, fetchDictCZLX, onlyRead, global, user } = props; + const [form] = Form.useForm(); + const [czInfo, setCzInfo] = useState(null); + const [CZLX, setCZLX] = useState([]); + + const [btns, setBtns] = useState(null); // 办结方式权限:上级领导审批,本级领导审批,直接办理 + const [sjldspr, setSjldspr] = useState([]); // 上级领导审批人 + + const getBjldSpr = () => { + props.fetchSprList(); + } + + const getSjldspr = () => { + // 省级服务:在办》部级下发tab下 办结 申请和审批 上级领导审批人列表接口 需要判断当前登陆人是否是省级 省级继续走gatway 市级、县级走不加gatway + if (sysToken === 'bu' ) { + // && (user.departmentOrgLevel === UserLevel.City.value || user.departmentOrgLevel === UserLevel.Town.value) + props.fetchUperSprList({ params: user?.departmentCode ?? '', sysToken: user.departmentOrgLevel === UserLevel.Province.value ? 'bu' :'sheng' }).then(data => { + setSjldspr(data); + }) + } else { + props.fetchUperSprList({ params: user?.departmentCode ?? '', sysToken }).then(data => { + setSjldspr(data); + }); + } + + } + + const getBtns = () => { + props.fetchBjBtns({ params: id, sysToken }).then(data => { + setBtns(data); + if (data?.bjldsp) getBjldSpr(); + if (data?.sjldsp) getSjldspr(); + }); + } + + useEffect(() => { + getBtns(); + fetchDictCZLX(sysToken).then((res) => { + if (res && res.resCode === 0) { + setCZLX(res.data); + } + }); + + if (onlyRead) props.fetchCzInfo({ params: id, sysToken }).then((data) => setCzInfo(data)); + + return () => { + // cleanup + }; + }, []); + + + const saveBj = (params) => { + props.fetchSaveBJSQ({ params, sysToken }).then(data => { + if (data.resCode === 0) { + message.success('操作成功'); + props.hideModal(true); + } else { + message.error(data.resMsg); + } + + }); + } + + const onFinish = (values) => { // 原来的两个tab合成一个 原来是表单两个接口,现在调用两次 + const czParmas = { + pfId: id, + cljg: values.cljg, + ssqk: values.ssqk, + ssqkMc: values.ssqkMc, + }; + const bjParmas = { + pfId: id, + bjyj: values.bjyj, + wj: values.wj, + xjSpr: values.xjSpr, + xjSprMc: values.xjSprMc, + spFs: values.spFs, + }; + + if (values.spFs === ALLSPFS.sjldsp.value) { // 上级领导审批 多带两个参数 + bjParmas.sjDw = values.sjDw; + bjParmas.sjDwMc = values.sjDwMc; + } + + props.fetchSaveCz({ params: czParmas, sysToken }).then((data) => { + if (data.resCode === 0) { + saveBj(bjParmas); + } else { + message.error(data.resMsg); + } + }); + }; + + const renderBtns = (ops) => { + return Object.keys(ALLSPFS).map(key => { + if (ops?.[key] === true) { + return {ALLSPFS[key].name} + } + }) + } + + return ( + + + { + onlyRead ? + + + {getDicsName(CSQK,czInfo?.ssqk)} + + + {czInfo?.cljg} + + + : +
+ + + + + +