tangjie 2026-07-09 16:54:59 +08:00
parent 93c72d1951
commit 5bb72ed95a
9 changed files with 327 additions and 176 deletions

9
.gitignore vendored
View File

@ -4,11 +4,18 @@
/node_modules
# production
/prototype
/dist
/demo
/.trae/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
yarn.lock
/openspec/
/.codebuddy/
/.idea/
/.playwright-cli/
/.vscode/
/.workbuddy/

View File

@ -9,8 +9,8 @@ module.exports = {
// 应用后端分支名称,部署上线需要
javaGitBranch: "<branch-name>",
// 接口服务地址(注册/填报开放接口需对接网关,本地后端可通过 sessionStorage.API_HOST 覆盖)
API_HOST: "https://gbs-gateway.qhdsafety.com",
// API_HOST: "http://127.0.0.1",
//API_HOST: "https://gbs-gateway.qhdsafety.com",
API_HOST: "http://192.168.0.152",
},
production: {
// 应用后端分支名称,部署上线需要

View File

@ -76,7 +76,7 @@ importers:
version: 16.0.8(@rspack/core@1.7.12)(sass@1.101.0)(webpack@5.108.4(postcss@8.5.16))
zy-react-library:
specifier: ^2.0.13
version: 2.0.13(@types/react@19.2.17)(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.15)(slate@0.72.8)(snabbdom@3.6.4))(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react-router@5.3.4(react@18.3.1))
version: 2.0.14(@types/react@19.2.17)(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.15)(slate@0.72.8)(snabbdom@3.6.4))(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react-router@5.3.4(react@18.3.1))
devDependencies:
'@antfu/eslint-config':
specifier: ^5.4.1
@ -868,6 +868,9 @@ packages:
resolution: {integrity: sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==}
engines: {node: '>=6.9.0'}
'@babel/runtime@8.0.0':
resolution: {integrity: sha512-sL6cvO2IfkSu/iU+zs2S/w01B7A8V7suXSIKEN4hPFFdZoiPGxrj5pAG0lCaqLWiEIrjKzdznIWuaLcxPR53qw==}
'@babel/template@7.29.7':
resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==}
engines: {node: '>=6.9.0'}
@ -1253,50 +1256,50 @@ packages:
peerDependencies:
tslib: '2'
'@jsonjoy.com/fs-core@4.63.0':
resolution: {integrity: sha512-sYl1G4mU/Ayy5pPu8Rp22h+DFRwvYLUYvKgPxmaoc8SsQJN/LsLUT9L7eGvSVDDZ77+xih8yVUYr8Gz4irvhcw==}
'@jsonjoy.com/fs-core@4.64.0':
resolution: {integrity: sha512-zs2TAq7Six5jgMuoMNjpspAvOP3mhtgq/k1UyQodEzCtQi/N83y2/y+zcvnZSGp/Rxq96DBN+bValOBQAyn/ew==}
engines: {node: '>=10.0'}
peerDependencies:
tslib: '2'
'@jsonjoy.com/fs-fsa@4.63.0':
resolution: {integrity: sha512-Mapa4H9o0tFX+MUaqRvCxracqjDUqMsHv12NYDH4Jcw+cfmwUQfuHTgGCm6p8dChk88eL7mhYbL3vvElH0W2xA==}
'@jsonjoy.com/fs-fsa@4.64.0':
resolution: {integrity: sha512-nMWOVbkLFyEgmXZih3wyvxA9XpgyyqyfrINMHvEFqhi7uqfRl7c9ERJt6yX7vgMPrB9Uo+OJO+Spa0cFzPD01w==}
engines: {node: '>=10.0'}
peerDependencies:
tslib: '2'
'@jsonjoy.com/fs-node-builtins@4.63.0':
resolution: {integrity: sha512-8vJl70rxZHMyEkhJk5PGaTjyHv1xzp0+neza2FLieU4oD9dP9Z8ddCUQQACxbQtfAMp5P1dyV2QkPwBHRZu1kQ==}
'@jsonjoy.com/fs-node-builtins@4.64.0':
resolution: {integrity: sha512-/o7WRFhUWaM/fOrslwLZGnzn4RmRILykn+lAL+mNObqqRNw+CQSiij6hpCeZ+C7buhdoVo7go/OYqzaSUfDYmA==}
engines: {node: '>=10.0'}
peerDependencies:
tslib: '2'
'@jsonjoy.com/fs-node-to-fsa@4.63.0':
resolution: {integrity: sha512-UDzueqB8eRfYiYx7pmzXp/BjWX3ScvMGW0Lu+IJcP7HYIokTiUJJhqfMrnL8c7/lhzf6WDQQ6plUsCVitF/xYg==}
'@jsonjoy.com/fs-node-to-fsa@4.64.0':
resolution: {integrity: sha512-WDD9WVs0hb7UAEKTgZW2f66WDrbj7gIIWwpP3spbLyXa0rghtUaFTB8L4gdR3ZCWwiKIsj38/CNijpVmpnuPUw==}
engines: {node: '>=10.0'}
peerDependencies:
tslib: '2'
'@jsonjoy.com/fs-node-utils@4.63.0':
resolution: {integrity: sha512-e+DTkdbZEObGxfFt0lwzI3KEMQbYvDmh+iMzJLRXUPlggK3ru2LnzBEDBaCJuZT00k146zrKaCnobusFptb7EQ==}
'@jsonjoy.com/fs-node-utils@4.64.0':
resolution: {integrity: sha512-k5Indsx9hWW9xSF7Y6oSKKwtCUNhzZxadub3owhIlitc+iMRVlPPdX2duTKQWBL3qNWpXya8jykgaaWpheeS4w==}
engines: {node: '>=10.0'}
peerDependencies:
tslib: '2'
'@jsonjoy.com/fs-node@4.63.0':
resolution: {integrity: sha512-y4/0oO1BEGXmM2TtYuJzgI2RRJE1JTZP/BlpDC0jQtUR0Jxx/zk//HlltW58iu+LXrr+zX/ndDrhuwN0HVJbGQ==}
'@jsonjoy.com/fs-node@4.64.0':
resolution: {integrity: sha512-dO+NNkODbUli4uV42bcNrrLvq5rE7SNpdZ5TNd0dtbLsAaNK3MDiIC9lUi+brboGoIjW6vd2fB1qao60nrk5xA==}
engines: {node: '>=10.0'}
peerDependencies:
tslib: '2'
'@jsonjoy.com/fs-print@4.63.0':
resolution: {integrity: sha512-IXGphCx99u965jFpA9JfFVO6svnwJISq8IyR4VkDTAmU6xxY6rSsxusJ9orpXrIGt3Rzwte5HUAYLJgjixVW6Q==}
'@jsonjoy.com/fs-print@4.64.0':
resolution: {integrity: sha512-PHZFccchvkhWrwPWHjmVAhbC3vSHCtyZvlZfJJ3ho2bnzl450hXri6/8e6pbkWdH+SkmLXNml0sV8e5HDAfxKw==}
engines: {node: '>=10.0'}
peerDependencies:
tslib: '2'
'@jsonjoy.com/fs-snapshot@4.63.0':
resolution: {integrity: sha512-8vMWlrp32sJersU7Zf+gRumbk81KfbfFuInfsk1nKL0g4nlK1Vhg3TXzhKMy8XnrCAZyToDRuYUuDq9P+L8tAA==}
'@jsonjoy.com/fs-snapshot@4.64.0':
resolution: {integrity: sha512-oM7UDeL83q6NBzzsfKAsYKXKVXlykKFqqOLh4xZZKAzzROTlInkPbc6LTDGThEOnPiFiUzA7tYziHG9xavd76Q==}
engines: {node: '>=10.0'}
peerDependencies:
tslib: '2'
@ -1390,30 +1393,35 @@ packages:
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@napi-rs/canvas-linux-arm64-musl@0.1.100':
resolution: {integrity: sha512-K3mDW66N+xT2/V439u1alFANiBUjdEx2gLiNYnCmUsva5jZMxWTjafBYwTzYK+EMFMHrUoabuU+T1BIP5CgbYQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
libc: [musl]
'@napi-rs/canvas-linux-riscv64-gnu@0.1.100':
resolution: {integrity: sha512-mooqUBTIsccZpnoQC4NgrC1v6C1vof39etLNMnBwCY+p0gajWJvAHLGQ6g/gGyS5YrpDW+GefSN4+Cvcr08UWw==}
engines: {node: '>= 10'}
cpu: [riscv64]
os: [linux]
libc: [glibc]
'@napi-rs/canvas-linux-x64-gnu@0.1.100':
resolution: {integrity: sha512-1eCvkDCazm7FFhsT7DfGOdSaHgZVK3bt/dSBl5EWHOWmnz+I7j8tPseJqqD81NF+MH21jKUK4wQSDjN0mdhnTg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
libc: [glibc]
'@napi-rs/canvas-linux-x64-musl@0.1.100':
resolution: {integrity: sha512-20arT6lnI19S68qNlii73TSEDbECNgzMz2EpldC1V3mZFuRkeujXkcebRk0LRJe9SEUAooYiLokfMViY8IX7yA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
libc: [musl]
'@napi-rs/canvas-win32-arm64-msvc@0.1.100':
resolution: {integrity: sha512-DZFFT1wIAg37LJw37yhMRFfjATd3vTQzjZ1Yki8u2vhO6Hi5VE6BVaGQ1aaDu7xb4iMErz+9EOwjpS7xcxFeBw==}
@ -1481,48 +1489,56 @@ packages:
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@oxfmt/binding-linux-arm64-musl@0.35.0':
resolution: {integrity: sha512-5Okqi+uhYFxwKz8hcnUftNNwdm8BCkf6GSCbcz9xJxYMm87k1E4p7PEmAAbhLTk7cjSdDre6TDL0pDzNX+Y22Q==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [linux]
libc: [musl]
'@oxfmt/binding-linux-ppc64-gnu@0.35.0':
resolution: {integrity: sha512-9k66pbZQXM/lBJWys3Xbc5yhl4JexyfqkEf/tvtq8976VIJnLAAL3M127xHA3ifYSqxdVHfVGTg84eiBHCGcNw==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [ppc64]
os: [linux]
libc: [glibc]
'@oxfmt/binding-linux-riscv64-gnu@0.35.0':
resolution: {integrity: sha512-aUcY9ofKPtjO52idT6t0SAQvEF6ctjzUQa1lLp7GDsRpSBvuTrBQGeq0rYKz3gN8dMIQ7mtMdGD9tT4LhR8jAQ==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [riscv64]
os: [linux]
libc: [glibc]
'@oxfmt/binding-linux-riscv64-musl@0.35.0':
resolution: {integrity: sha512-C6yhY5Hvc2sGM+mCPek9ZLe5xRUOC/BvhAt2qIWFAeXMn4il04EYIjl3DsWiJr0xDMTJhvMOmD55xTRPlNp39w==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [riscv64]
os: [linux]
libc: [musl]
'@oxfmt/binding-linux-s390x-gnu@0.35.0':
resolution: {integrity: sha512-RG2hlvOMK4OMZpO3mt8MpxLQ0AAezlFqhn5mI/g5YrVbPFyoCv9a34AAvbSJS501ocOxlFIRcKEuw5hFvddf9g==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [s390x]
os: [linux]
libc: [glibc]
'@oxfmt/binding-linux-x64-gnu@0.35.0':
resolution: {integrity: sha512-wzmh90Pwvqj9xOKHJjkQYBpydRkaXG77ZvDz+iFDRRQpnqIEqGm5gmim2s6vnZIkDGsvKCuTdtxm0GFmBjM1+w==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [linux]
libc: [glibc]
'@oxfmt/binding-linux-x64-musl@0.35.0':
resolution: {integrity: sha512-+HCqYCJPCUy5I+b2cf+gUVaApfgtoQT3HdnSg/l7NIcLHOhKstlYaGyrFZLmUpQt4WkFbpGKZZayG6zjRU0KFA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [linux]
libc: [musl]
'@oxfmt/binding-openharmony-arm64@0.35.0':
resolution: {integrity: sha512-kFYmWfR9YL78XyO5ws+1dsxNvZoD973qfVMNFOS4e9bcHXGF7DvGC2tY5UDFwyMCeB33t3sDIuGONKggnVNSJA==}
@ -1577,36 +1593,42 @@ packages:
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-arm-musl@2.5.6':
resolution: {integrity: sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==}
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
libc: [musl]
'@parcel/watcher-linux-arm64-glibc@2.5.6':
resolution: {integrity: sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-arm64-musl@2.5.6':
resolution: {integrity: sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
libc: [musl]
'@parcel/watcher-linux-x64-glibc@2.5.6':
resolution: {integrity: sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-x64-musl@2.5.6':
resolution: {integrity: sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
libc: [musl]
'@parcel/watcher-win32-arm64@2.5.6':
resolution: {integrity: sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==}
@ -1911,8 +1933,8 @@ packages:
react: '>=18.0.0'
react-dom: '>=18.0.0'
'@rc-component/virtual-list@1.2.0':
resolution: {integrity: sha512-iavRm1Jo4GDbASQwdGa7jFyk93RvSOo9xHyBT4QL1pgFJj/Fdf1G+3RErH7/7BmAMvx2AkF62mjGYxDbXsK9TQ==}
'@rc-component/virtual-list@1.3.0':
resolution: {integrity: sha512-raR3WccVAhHH5LlinFE0X8dCd9x6MKNX2scmWA6WNaDIfY+giHHxlnynmkQm/FutLkZad2B5zw2WfLRER0mIUQ==}
engines: {node: '>=8.x'}
peerDependencies:
react: '>=18.0.0'
@ -1932,21 +1954,25 @@ packages:
resolution: {integrity: sha512-C8owWG+yvo7X0oVLIXetkoJhIFBP1LYNcAQqtgLmJnQLQDklGuP83dKC+zISGQWpjawHfZ1ER96vLgoTrxKZdw==}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@rspack/binding-linux-arm64-musl@1.7.12':
resolution: {integrity: sha512-i51WWI64aRpsfSki6rN0aepPqXkVfS+vZM7+4bWDcmnhUmdMvhIPcYg0QRk3DtyJnu33jqNLM0WHY78k00NyfA==}
cpu: [arm64]
os: [linux]
libc: [musl]
'@rspack/binding-linux-x64-gnu@1.7.12':
resolution: {integrity: sha512-MSos0FuPEefqo9V92ULd5hggKG29EkSNg1zDcypy0OkpsKh5pfjVxTLYFXgTcVyFoUQQbdG8zFBzYbwmJ8V4ew==}
cpu: [x64]
os: [linux]
libc: [glibc]
'@rspack/binding-linux-x64-musl@1.7.12':
resolution: {integrity: sha512-JcAMVKXOnjfpC3coWjCFPWD3Yl8RBw6a+IXQQ8mfRlHaHMIiOv8IfZqx15XRxMUn49CtP7Z0Na8iiAg2aKrcfw==}
cpu: [x64]
os: [linux]
libc: [musl]
'@rspack/binding-wasm32-wasi@1.7.12':
resolution: {integrity: sha512-n+ZqP6ZMc0nhOgvadg5VhEs9ojtbES80AcWeFnmGkbzIszvGSO63GKNiRkXtjJ9KFuRzytbbmsCqkUVH+Tywxg==}
@ -2237,8 +2263,8 @@ packages:
peerDependencies:
'@uppy/core': ^2.3.3
'@vitest/eslint-plugin@1.6.21':
resolution: {integrity: sha512-5nu7QuW5Dg9v4I9t9ZiU1Hh91BoG0x3lOzOWYTsr1bqpIqcHYzFSQ052LvZwGtEm7Trh+Mr2heYEmZ4LkDjfaA==}
'@vitest/eslint-plugin@1.6.22':
resolution: {integrity: sha512-SDHPcido/3V5NdQh1rmOIMTHSixtjUBdV3a/8aE/A3Iwx/EZtVuLRC+e0g1uenh4Yd1fjps0JIN5HUNmhdIpQQ==}
engines: {node: '>=18'}
peerDependencies:
'@typescript-eslint/eslint-plugin': '*'
@ -3800,7 +3826,7 @@ packages:
glob@7.2.3:
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
deprecated: Glob versions prior to v9 are no longer supported
global@4.4.0:
resolution: {integrity: sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==}
@ -4413,8 +4439,8 @@ packages:
resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
engines: {node: '>= 0.6'}
memfs@4.63.0:
resolution: {integrity: sha512-97I4O8q0y8Gq/mNp3bTvCZjY6ojMVN3z0z7LaGnIYOPH6dKeLp/eYBC7uAK2m6Pnw4i56YlsZYXn2pSdmdrIlg==}
memfs@4.64.0:
resolution: {integrity: sha512-Kw72fgY7Wn+sD8KmtNWSafl1dz0UvAsE/PHs3YVfLiaZuA3HxNm9sRLqAu0ATiBGJvME1PxZXbBZPv5GycDeAw==}
peerDependencies:
tslib: '2'
@ -4995,8 +5021,13 @@ packages:
resolution: {integrity: sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==}
engines: {node: ^10 || ^12 || >=14}
preact@10.29.6:
resolution: {integrity: sha512-/UzLXnc1jrAS2uHi89XsSECqXVHYzV1VUL1L3esxrmPRmDvKFWtmbabE2a4QQ5a3bLgBivubRCEOt4GGmncPBQ==}
preact@10.29.7:
resolution: {integrity: sha512-DCHYrK/B10yUD3ZjLfhZ3WIE/9Vf9VFUODcRE2dRomTYDpJk6z6L9wecSfhfE6M9ZTHUdyQkoC46arIDhEV84Q==}
peerDependencies:
preact-render-to-string: '>=5'
peerDependenciesMeta:
preact-render-to-string:
optional: true
prelude-ls@1.2.1:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
@ -5680,8 +5711,8 @@ packages:
resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==}
engines: {node: '>=6'}
terser@5.48.0:
resolution: {integrity: sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q==}
terser@5.49.0:
resolution: {integrity: sha512-SNiDnXyHSrxVcIOtVbULzcTmniUiwcV7Nwdyj1twVubeTmbjoa8p69KKDpfkdoOavuM4/GRm1+ykI8qqnavHoA==}
engines: {node: '>=10'}
hasBin: true
@ -5890,7 +5921,6 @@ packages:
uuid@8.3.2:
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
hasBin: true
value-equal@1.0.1:
@ -6080,8 +6110,8 @@ packages:
zwitch@2.0.4:
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
zy-react-library@2.0.13:
resolution: {integrity: sha512-+i9760YAzpiUWkKNLdBmRAyOaPs4nax/exa1nqdggz0zKDHCy6pjDwc1TG3B6RNc7wat8YHKAdr2Iqf1W8cuxw==}
zy-react-library@2.0.14:
resolution: {integrity: sha512-5e7shmMxp6ZdLf+fAF4a2gMsZyWqLIzXrCxHhbtwI1lrPa7fjTIf/B84zJH0lwpVUiXmyLcq+XTwry5xHq5gNQ==}
engines: {node: '>=18.0.0'}
snapshots:
@ -6399,7 +6429,7 @@ snapshots:
'@stylistic/eslint-plugin': 5.10.0(eslint@9.39.4)
'@typescript-eslint/eslint-plugin': 8.63.0(@typescript-eslint/parser@8.63.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/parser': 8.63.0(eslint@9.39.4)(typescript@5.9.3)
'@vitest/eslint-plugin': 1.6.21(@typescript-eslint/eslint-plugin@8.63.0(@typescript-eslint/parser@8.63.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)
'@vitest/eslint-plugin': 1.6.22(@typescript-eslint/eslint-plugin@8.63.0(@typescript-eslint/parser@8.63.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)
ansis: 4.3.1
cac: 6.7.14
eslint: 9.39.4
@ -7176,6 +7206,8 @@ snapshots:
'@babel/runtime@7.29.7': {}
'@babel/runtime@8.0.0': {}
'@babel/template@7.29.7':
dependencies:
'@babel/code-frame': 7.29.7
@ -7329,6 +7361,7 @@ snapshots:
- '@ant-design/icons'
- antd
- css-to-react-native
- preact-render-to-string
- prop-types
- rc-field-form
- react
@ -7790,58 +7823,59 @@ snapshots:
dependencies:
tslib: 2.8.1
'@jsonjoy.com/fs-core@4.63.0(tslib@2.8.1)':
'@jsonjoy.com/fs-core@4.64.0(tslib@2.8.1)':
dependencies:
'@jsonjoy.com/fs-node-builtins': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1)
thingies: 2.6.0(tslib@2.8.1)
tslib: 2.8.1
'@jsonjoy.com/fs-fsa@4.63.0(tslib@2.8.1)':
'@jsonjoy.com/fs-fsa@4.64.0(tslib@2.8.1)':
dependencies:
'@jsonjoy.com/fs-core': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-core': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1)
thingies: 2.6.0(tslib@2.8.1)
tslib: 2.8.1
'@jsonjoy.com/fs-node-builtins@4.63.0(tslib@2.8.1)':
'@jsonjoy.com/fs-node-builtins@4.64.0(tslib@2.8.1)':
dependencies:
tslib: 2.8.1
'@jsonjoy.com/fs-node-to-fsa@4.63.0(tslib@2.8.1)':
'@jsonjoy.com/fs-node-to-fsa@4.64.0(tslib@2.8.1)':
dependencies:
'@jsonjoy.com/fs-fsa': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-fsa': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1)
tslib: 2.8.1
'@jsonjoy.com/fs-node-utils@4.63.0(tslib@2.8.1)':
'@jsonjoy.com/fs-node-utils@4.64.0(tslib@2.8.1)':
dependencies:
'@jsonjoy.com/fs-node-builtins': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1)
glob-to-regex.js: 1.2.0(tslib@2.8.1)
tslib: 2.8.1
'@jsonjoy.com/fs-node@4.63.0(tslib@2.8.1)':
'@jsonjoy.com/fs-node@4.64.0(tslib@2.8.1)':
dependencies:
'@jsonjoy.com/fs-core': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-print': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-snapshot': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-core': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-print': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-snapshot': 4.64.0(tslib@2.8.1)
glob-to-regex.js: 1.2.0(tslib@2.8.1)
thingies: 2.6.0(tslib@2.8.1)
tslib: 2.8.1
'@jsonjoy.com/fs-print@4.63.0(tslib@2.8.1)':
'@jsonjoy.com/fs-print@4.64.0(tslib@2.8.1)':
dependencies:
'@jsonjoy.com/fs-node-utils': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1)
tree-dump: 1.1.0(tslib@2.8.1)
tslib: 2.8.1
'@jsonjoy.com/fs-snapshot@4.63.0(tslib@2.8.1)':
'@jsonjoy.com/fs-snapshot@4.64.0(tslib@2.8.1)':
dependencies:
'@jsonjoy.com/buffers': 17.67.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/json-pack': 17.67.0(tslib@2.8.1)
'@jsonjoy.com/util': 17.67.0(tslib@2.8.1)
tslib: 2.8.1
@ -8325,7 +8359,7 @@ snapshots:
'@rc-component/overflow': 1.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/trigger': 3.9.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/util': 1.11.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/virtual-list': 1.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/virtual-list': 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
clsx: 2.1.1
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
@ -8356,7 +8390,7 @@ snapshots:
'@rc-component/context': 2.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/resize-observer': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/util': 1.11.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/virtual-list': 1.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/virtual-list': 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
clsx: 2.1.1
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
@ -8402,7 +8436,7 @@ snapshots:
dependencies:
'@rc-component/motion': 1.3.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/util': 1.11.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/virtual-list': 1.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/virtual-list': 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
clsx: 2.1.1
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
@ -8431,9 +8465,9 @@ snapshots:
react-dom: 18.3.1(react@18.3.1)
react-is: 18.3.1
'@rc-component/virtual-list@1.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
'@rc-component/virtual-list@1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
dependencies:
'@babel/runtime': 7.29.7
'@babel/runtime': 8.0.0
'@rc-component/resize-observer': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@rc-component/util': 1.11.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
clsx: 2.1.1
@ -8860,7 +8894,9 @@ snapshots:
mime-match: 1.0.2
namespace-emitter: 2.0.1
nanoid: 3.3.15
preact: 10.29.6
preact: 10.29.7
transitivePeerDependencies:
- preact-render-to-string
'@uppy/store-default@2.1.1': {}
@ -8875,7 +8911,7 @@ snapshots:
'@uppy/utils': 4.1.3
nanoid: 3.3.15
'@vitest/eslint-plugin@1.6.21(@typescript-eslint/eslint-plugin@8.63.0(@typescript-eslint/parser@8.63.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)':
'@vitest/eslint-plugin@1.6.22(@typescript-eslint/eslint-plugin@8.63.0(@typescript-eslint/parser@8.63.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)':
dependencies:
'@typescript-eslint/scope-manager': 8.63.0
'@typescript-eslint/utils': 8.63.0(eslint@9.39.4)(typescript@5.9.3)
@ -8980,6 +9016,8 @@ snapshots:
nanoid: 5.1.16
slate: 0.82.1
snabbdom: 3.6.4
transitivePeerDependencies:
- preact-render-to-string
'@wangeditor-next/list-module@1.1.58(@wangeditor-next/core@1.7.51(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.82.1)(snabbdom@3.6.4))(dom7@4.0.6)(slate@0.82.1)(snabbdom@3.6.4)':
dependencies:
@ -9090,6 +9128,8 @@ snapshots:
nanoid: 3.3.15
slate: 0.72.8
snabbdom: 3.6.4
transitivePeerDependencies:
- preact-render-to-string
'@wangeditor/list-module@1.0.5(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.15)(slate@0.72.8)(snabbdom@3.6.4))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.4)':
dependencies:
@ -10862,7 +10902,7 @@ snapshots:
he: 1.2.0
param-case: 3.0.4
relateurl: 0.2.7
terser: 5.48.0
terser: 5.49.0
html-void-elements@2.0.1: {}
@ -11416,16 +11456,16 @@ snapshots:
media-typer@0.3.0: {}
memfs@4.63.0(tslib@2.8.1):
memfs@4.64.0(tslib@2.8.1):
dependencies:
'@jsonjoy.com/fs-core': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-fsa': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-to-fsa': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-print': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-snapshot': 4.63.0(tslib@2.8.1)
'@jsonjoy.com/fs-core': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-fsa': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-to-fsa': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-print': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/fs-snapshot': 4.64.0(tslib@2.8.1)
'@jsonjoy.com/json-pack': 1.21.0(tslib@2.8.1)
'@jsonjoy.com/util': 1.9.0(tslib@2.8.1)
glob-to-regex.js: 1.2.0(tslib@2.8.1)
@ -11695,7 +11735,7 @@ snapshots:
'@jridgewell/trace-mapping': 0.3.31
jest-worker: 27.5.1
schema-utils: 4.3.3
terser: 5.48.0
terser: 5.49.0
webpack: 5.108.4(postcss@8.5.16)
optionalDependencies:
postcss: 8.5.16
@ -12057,7 +12097,7 @@ snapshots:
picocolors: 1.1.1
source-map-js: 1.2.1
preact@10.29.6: {}
preact@10.29.7: {}
prelude-ls@1.2.1: {}
@ -12766,7 +12806,7 @@ snapshots:
inherits: 2.0.4
readable-stream: 3.6.2
terser@5.48.0:
terser@5.49.0:
dependencies:
'@jridgewell/source-map': 0.3.11
acorn: 8.17.0
@ -13007,7 +13047,7 @@ snapshots:
webpack-dev-middleware@7.4.5(tslib@2.8.1)(webpack@5.108.4(postcss@8.5.16)):
dependencies:
colorette: 2.0.20
memfs: 4.63.0(tslib@2.8.1)
memfs: 4.64.0(tslib@2.8.1)
mime-types: 3.0.2
on-finished: 2.4.1
range-parser: 1.3.0
@ -13176,7 +13216,7 @@ snapshots:
zwitch@2.0.4: {}
zy-react-library@2.0.13(@types/react@19.2.17)(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.15)(slate@0.72.8)(snabbdom@3.6.4))(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react-router@5.3.4(react@18.3.1)):
zy-react-library@2.0.14(@types/react@19.2.17)(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.15)(slate@0.72.8)(snabbdom@3.6.4))(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react-router@5.3.4(react@18.3.1)):
dependencies:
'@ahooksjs/use-url-state': 3.5.1(react-dom@18.3.1(react@18.3.1))(react-router@5.3.4(react@18.3.1))(react@18.3.1)
'@ant-design/icons': 6.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
@ -13204,6 +13244,7 @@ snapshots:
- debug
- luxon
- moment
- preact-render-to-string
- prop-types
- react-dom
- react-router

View File

@ -23,3 +23,8 @@ export const syncUserToGBS = declareRequest(
"syncUserToGBSLoading",
"Get > /safetyEval/images/account/syncUserToGBS"
);
export const orgInfoGet = declareRequest(
"syncUserToGBSLoading",
"Post > @/safetyEval/images/org-info/getByAccount"
);

View File

@ -47,7 +47,7 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
listType="picture-card"
maxCount={maxCount}
accept={accept}
action={`${window.process.env.app.API_HOST}/safetyEval/file/upload`}
action={`${window.process.env.app.API_HOST}/safetyEval/images/upload`}
onPreview={(file) => {
if (isImage(file.url || file.thumbUrl)) {
setPreviewImage(file.url || file.thumbUrl);

View File

@ -33,16 +33,16 @@ export const FILING_TYPE_OPTIONS = [
/** 监管端已备案机构 - 备案类型搜索 */
export const REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS = [
{ label: "全部", value: "" },
{ label: "审核备案", value: "1" },
{ label: "确认备案", value: "2" },
];
/** 监管端已备案机构 - 备案状态搜索1=已备案2=未备案) */
export const REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS = [
{ label: "全部", value: "" },
{ label: "已备案", value: "1" },
{ label: "未备案", value: "2" },
{ label: "已备案", value: 1 },
{ label: "未备案", value: 2 },
];
/** 备案状态(机构信息) */

View File

@ -5,10 +5,9 @@ import {
SafetyCertificateOutlined,
} from "@ant-design/icons";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Form, Input, message } from "antd";
import { Button, Form, Input, message, Modal } from "antd";
import React, { useState } from "react";
import { NS_REGISTER } from "~/enumerate/namespace";
import { safeApiCall } from "~/utils/handleApiResponse";
import loginbg from "~/enumerate/img/loginbg.jpg";
import logo from "~/enumerate/img/logo.png";
@ -36,11 +35,8 @@ function Register(props) {
setSending(true);
try {
await safeApiCall(
() => sendMessageAction({ mobile: phone }),
{
defaultError: "验证码发送失败,请稍后重试",
onSuccess: () => {
const res = await sendMessageAction({ mobile: phone });
if (res.success) {
message.success("验证码已发送");
setCountdown(60);
const timer = setInterval(() => {
@ -52,9 +48,7 @@ function Register(props) {
return prev - 1;
});
}, 1000);
},
},
);
}
} finally {
setSending(false);
}
@ -68,27 +62,36 @@ function Register(props) {
verificationCode: values.verifyCode,
type: 1,
};
await safeApiCall(
() => registerAction(payload),
{
defaultError: "注册失败,请稍后重试",
onSuccess: (res) => {
const res = await registerAction(payload);
if (res.success) {
if (!res?.data?.id) {
message.error("注册成功但缺少用户标识,请联系管理员");
return;
}
if (res.data?.syncGbs === 2) {
handleLogin();
}
message.success("操作成功");
form.resetFields();
props.history.push(
`RegisterMore?account=${encodeURIComponent(values.account)}&registerUserId=${encodeURIComponent(res.data.id)}`,
);
},
},
);
}
};
const handleLogin = () => {
message.success("即将跳转到登录页面,请稍候...");
setTimeout(() => {
window.location.href =
"https://gbs-gateway.qhdsafety.com/login/client/ZQAQPJ";
}, 2000);
};
return (
<div className="register-page" style={{ backgroundImage: `url(${loginbg})` }}>
<div
className="register-page"
style={{ backgroundImage: `url(${loginbg})` }}
>
<div className="register-top-bar">
<div className="register-top-logo">
<img src={logo} alt="logo" />
@ -190,7 +193,7 @@ function Register(props) {
<Button
className="register-submit-btn"
loading={registerLoading}
onClick={() => window.location.href = "https://gbs-gateway.qhdsafety.com/login/client/ZQAQPJ"}
onClick={handleLogin}
>
去登录
</Button>

View File

@ -1,4 +1,4 @@
import React, { useEffect, useMemo, useState } from "react";
import React, { useEffect, useState } from "react";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import dayjs from "dayjs";
import {
@ -15,11 +15,11 @@ import {
InputNumber,
DatePicker,
Space,
Modal,
} from "antd";
import { NS_REGISTER } from "~/enumerate/namespace";
import AttachmentUpload from "~/components/AttachmentUpload";
import { resolveRegisterQueryParams } from "~/utils/resolveRegisterQueryParams";
import { safeApiCall } from "~/utils/handleApiResponse";
import { tools } from "@cqsjjb/jjb-common-lib";
import headerImage from "~/enumerate/img/header.png";
import auditLookImage from "~/enumerate/img/auditLook.png";
@ -27,29 +27,52 @@ import auditBkImage from "~/enumerate/img/audit.png";
import successIcon from "~/enumerate/img/successIcon.png";
import {
creditCodeRule,
latitudeRule,
longitudeRule,
nonNegativeIntegerRule,
phoneRule,
positiveNumberRule,
urlRule,
normalizeUrl,
} from "~/utils/validators";
import {
QUALIFICATION_INDUSTRY_OPTIONS,
CHONGQING_DISTRICTS,
ENTERPRISE_SCALE_OPTIONS,
ENTERPRISE_STATUS_OPTIONS,
FILING_RECORD_STATUS_OPTIONS,
FILING_TYPE_OPTIONS,
REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS,
REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS,
} from "~/enumerate/enterpriseOptions";
import "./index.less";
const { router } = tools;
const RegisterMore = (props) => {
const queryParams = useMemo(() => resolveRegisterQueryParams(), []);
const { orgInfoSave, register, syncUserToGBS } = props;
const [current, setCurrent] = useState(0);
const [form] = Form.useForm();
const { registerLoading, syncUserToGBSLoading } = register;
const hasRegisterContext = Boolean(queryParams.account && queryParams.registerUserId);
const hasRegisterContext = Boolean(
router.query?.account && router.query?.registerUserId,
);
const loadDetail = async () => {
const res = await props.orgInfoGet({
data: router.query?.account,
});
if (res?.data) {
form.setFieldsValue({
...res.data,
productionDate: res.data.productionDate
? dayjs(res.data.productionDate)
: undefined,
attachmentUrls: res.data.attachmentUrls
? JSON.parse(res.data.attachmentUrls)
: null,
});
}
};
useEffect(() => {
loadDetail();
}, []);
const handleSave = async (type) => {
if (!hasRegisterContext) {
@ -60,37 +83,38 @@ const RegisterMore = (props) => {
const formValues = await form.validateFields();
const values = {
...formValues,
registerUserId: queryParams.registerUserId,
registerUserId: router.query?.registerUserId,
productionDate: formValues.productionDate
? dayjs(formValues.productionDate).format("YYYY-MM-DD")
: undefined,
attachmentUrls: formValues.attachmentUrls
? JSON.stringify(formValues.attachmentUrls)
: null,
infoDisclosureUrl: formValues.infoDisclosureUrl
? normalizeUrl(formValues.infoDisclosureUrl)
: undefined,
authStatusCode: type === "draft" ? 0 : 1,
authStatusName: type === "draft" ? "草稿" : "已提交",
};
await safeApiCall(
() => orgInfoSave(values),
{
defaultError: "机构信息保存失败,请稍后重试",
onSuccess: async () => {
await safeApiCall(
() => syncUserToGBS({
account: queryParams.account,
registerUserId: queryParams.registerUserId,
}),
{
defaultError: "用户信息同步失败,请稍后重试",
onSuccess: () => {
const res1 = await orgInfoSave(values);
if (res1.success) {
const res2 = await syncUserToGBS({
account: router.query?.account,
registerUserId: router.query?.registerUserId,
});
if (res2.success) {
message.success("保存成功");
setCurrent(1);
},
},
);
},
},
);
}
}
};
const handleLogin = () => {
message.success("即将跳转到登录页面,请稍候...");
setTimeout(() => {
window.location.href =
"https://gbs-gateway.qhdsafety.com/login/client/ZQAQPJ";
}, 2000);
};
useEffect(() => {
@ -99,6 +123,9 @@ const RegisterMore = (props) => {
setCurrent(2);
}, 3000);
}
if (current === 2) {
handleLogin();
}
}, [current]);
return (
@ -143,9 +170,14 @@ const RegisterMore = (props) => {
style={{ marginBottom: 24 }}
/>
)}
<Form form={form} labelCol={{ span: 10 }} disabled={!hasRegisterContext}>
<Form
form={form}
labelCol={{ span: 10 }}
disabled={!hasRegisterContext}
>
<Row gutter={[16, 16]}>
<Col span={12}>
<Form.Item noStyle name='id' />
<Form.Item
name="unitName"
label="生产经营单位名称"
@ -186,7 +218,7 @@ const RegisterMore = (props) => {
rules={[{ required: true, message: "请选择属地" }]}
>
<Select
options={QUALIFICATION_INDUSTRY_OPTIONS}
options={CHONGQING_DISTRICTS}
placeholder="请选择属地"
allowClear
/>
@ -210,7 +242,27 @@ const RegisterMore = (props) => {
<Form.Item
name="longitude"
label="所在地坐标经度"
rules={[longitudeRule(false)]}
dependencies={["latitude"]}
rules={[
{
validator(_, value) {
const latitude = form.getFieldValue("latitude");
if (
value !== undefined &&
value !== null &&
value !== "" &&
(latitude === undefined ||
latitude === null ||
latitude === "")
) {
return Promise.reject(
new Error("填写经度后,纬度必填"),
);
}
return Promise.resolve();
},
},
]}
>
<InputNumber
style={{ width: "100%" }}
@ -225,7 +277,27 @@ const RegisterMore = (props) => {
<Form.Item
name="latitude"
label="所在地坐标纬度"
rules={[latitudeRule(false)]}
dependencies={["longitude"]}
rules={[
{
validator(_, value) {
const longitude = form.getFieldValue("longitude");
if (
value !== undefined &&
value !== null &&
value !== "" &&
(longitude === undefined ||
longitude === null ||
longitude === "")
) {
return Promise.reject(
new Error("填写纬度后,经度必填"),
);
}
return Promise.resolve();
},
},
]}
>
<InputNumber
style={{ width: "100%" }}
@ -323,11 +395,7 @@ const RegisterMore = (props) => {
/>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="safetyDeputyManager" label="主管安全副总">
<Input placeholder="请输入主管安全副总" allowClear />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item
name="safetyDeputyPhone"
@ -441,22 +509,33 @@ const RegisterMore = (props) => {
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="filingTypeName" label="备案类型">
<Form.Item name="filingTypeCode" label="备案类型">
<Select
options={FILING_TYPE_OPTIONS}
options={REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS}
placeholder="请选择备案类型"
allowClear
onChange={(value, option) => {
form.setFieldValue("filingTypeName", option?.label);
}}
/>
</Form.Item>
<Form.Item name="filingTypeName" noStyle />
</Col>
<Col span={12}>
<Form.Item name="filingRecordStatusName" label="备案状态">
<Form.Item name="filingRecordStatusCode" label="备案状态">
<Select
options={FILING_RECORD_STATUS_OPTIONS}
options={REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS}
placeholder="请选择备案状态"
allowClear
onChange={(value, option) => {
form.setFieldValue(
"filingRecordStatusName",
option?.label || "",
);
}}
/>
</Form.Item>
<Form.Item name="filingRecordStatusName" noStyle />
</Col>
<Col span={12}>
<AttachmentUpload name="attachmentUrls" label="上传附件" />

View File

@ -84,18 +84,30 @@ export function mobileRule(label = "账号", required = true) {
},
};
}
/** URL 补全协议后校验 */
export function normalizeUrl(value) {
const trimmed = String(value).trim();
if (!trimmed) {
return "";
}
return /^https?:\/\//i.test(trimmed) ? trimmed : `https://${trimmed}`;
}
export function longitudeRule(required = false) {
return {
required,
validateTrigger: "onChange",
validator: (_, value) => {
if (value === undefined || value === null || value === "") {
if (isEmptyValue(value)) {
return required ? Promise.reject(new Error("请输入经度")) : Promise.resolve();
}
const num = Number(value);
if (Number.isNaN(num) || num < -180 || num > 180) {
return Promise.reject(new Error("经度格式不正确(-180 ~ 180"));
}
if (hasTooManyDecimals(value)) {
return Promise.reject(new Error("经度最多保留6位小数"));
}
return Promise.resolve();
},
};
@ -104,14 +116,18 @@ export function longitudeRule(required = false) {
export function latitudeRule(required = false) {
return {
required,
validateTrigger: "onChange",
validator: (_, value) => {
if (value === undefined || value === null || value === "") {
if (isEmptyValue(value)) {
return required ? Promise.reject(new Error("请输入纬度")) : Promise.resolve();
}
const num = Number(value);
if (Number.isNaN(num) || num < -90 || num > 90) {
return Promise.reject(new Error("纬度格式不正确(-90 ~ 90"));
}
if (hasTooManyDecimals(value)) {
return Promise.reject(new Error("纬度最多保留6位小数"));
}
return Promise.resolve();
},
};