diff --git a/generate-menu-excel.js b/generate-menu-excel.js index 1e97c56..8c92029 100644 --- a/generate-menu-excel.js +++ b/generate-menu-excel.js @@ -688,6 +688,51 @@ const menuData = [ hideInMenu: false, parentRoute: '/system', }, + + // 一级菜单 - 知识库 + { + level: 1, + name: '知识库', + permissionCode: 'Knowledge', + route: '/kb', + component: null, + icon: 'icon-book', + order: 8, + hideInMenu: false, + }, + { + level: 2, + name: '培训手册', + permissionCode: 'Knowledge.Training', + route: '/kb/training', + component: 'views/kb/training/index', + icon: 'icon-book', + order: 0, + hideInMenu: false, + parentRoute: '/kb', + }, + { + level: 2, + name: '分类管理', + permissionCode: 'Knowledge.Category', + route: '/kb/category', + component: 'views/kb/category/index', + icon: null, + order: 1, + hideInMenu: false, + parentRoute: '/kb', + }, + { + level: 2, + name: '文章管理', + permissionCode: 'Knowledge.Article', + route: '/kb/article', + component: 'views/kb/article/index', + icon: null, + order: 2, + hideInMenu: false, + parentRoute: '/kb', + }, ]; // 生成 CSV 内容(UTF-8 BOM 以便 Excel 正确识别中文) diff --git a/index.html b/index.html index 3f1593d..430eeb1 100644 --- a/index.html +++ b/index.html @@ -55,6 +55,8 @@ } var isH5 = isH5Path; + var isAdminH5 = + path === '/h5/admin' || path.indexOf('/h5/admin/') === 0; var isEn = false; var pageBg = '#f0f3f4'; try { @@ -75,11 +77,16 @@ root.style.setProperty('--ai-bg', pageBg); root.style.setProperty('--ai-canvas', pageBg); try { - document.title = isH5 + /* 运营端 /h5/admin 勿复用客户中心标题,避免浏览器顶栏串文案 */ + document.title = isAdminH5 ? isEn - ? 'IDE Customer Center' - : 'IDE客户中心' - : 'IDE I Faster & Simpler'; + ? 'IDE Ops Center' + : 'IDE运营中心' + : isH5 + ? isEn + ? 'IDE Customer Center' + : 'IDE客户中心' + : 'IDE I Faster & Simpler'; } catch (e2) {} if (path === '/login') { var plane = document.createElement('link'); diff --git a/package.json b/package.json index 236349f..49ebd27 100644 --- a/package.json +++ b/package.json @@ -48,11 +48,10 @@ "@codemirror/state": "^6.5.4", "@codemirror/theme-one-dark": "^6.1.3", "@codemirror/view": "^6.39.17", - "@fontsource/zcool-qingke-huangyou": "^5.3.0", - "@glass-sdk/liquid-glass": "~0.0.2", "@handsontable/vue3": "^16.2.0", "@types/lodash-es": "^4.17.12", "@vueuse/core": "^9.3.0", + "@zxing/browser": "^0.2.1", "axios": "^0.24.0", "codemirror": "^6.0.2", "dayjs": "^1.11.5", @@ -68,7 +67,6 @@ "mermaid": "^11.16.0", "mitt": "^3.0.0", "nprogress": "^0.2.0", - "ogl": "^1.0.11", "pinia": "^2.0.23", "qrcode": "^1.5.4", "query-string": "^8.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ca5495..9130bea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,12 +36,6 @@ importers: '@codemirror/view': specifier: ^6.39.17 version: 6.39.17 - '@fontsource/zcool-qingke-huangyou': - specifier: ^5.3.0 - version: 5.3.0 - '@glass-sdk/liquid-glass': - specifier: ~0.0.2 - version: 0.0.2(react-dom@19.3.1(react@19.3.1))(react@19.3.1) '@handsontable/vue3': specifier: ^16.2.0 version: 16.2.0(handsontable@16.2.0)(vue@3.5.18(typescript@4.9.5)) @@ -51,6 +45,9 @@ importers: '@vueuse/core': specifier: ^9.3.0 version: 9.13.0(vue@3.5.18(typescript@4.9.5)) + '@zxing/browser': + specifier: ^0.2.1 + version: 0.2.1(@zxing/library@0.23.0) axios: specifier: ^0.24.0 version: 0.24.0 @@ -96,9 +93,6 @@ importers: nprogress: specifier: ^0.2.0 version: 0.2.0 - ogl: - specifier: ^1.0.11 - version: 1.0.11 pinia: specifier: ^2.0.23 version: 2.3.1(typescript@4.9.5)(vue@3.5.18(typescript@4.9.5)) @@ -446,9 +440,6 @@ packages: resolution: {integrity: sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==} engines: {node: '>=6.9.0'} - '@babel/runtime@8.1.0': - resolution: {integrity: sha512-MQye/pU7gzXerMzlhScFNH1u4Je6rR8cqJWSgAfD+rIwbbtwG8tVDegoI7sWfcXkfVRW09G7vk2vjxGIuKFfwg==} - '@babel/template@7.27.2': resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} engines: {node: '>=6.9.0'} @@ -461,33 +452,6 @@ packages: resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} engines: {node: '>=6.9.0'} - '@base-ui/react@1.9.0': - resolution: {integrity: sha512-S8CSYosASBKtpL8SWUfS78rFElfLijiCgA7oHOK22jCJ95FULsYyKwBNFOgudt0RA+/7yNc7F81bOvQnRgbBiQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - '@date-fns/tz': ^1.2.0 - '@types/react': ^17 || ^18 || ^19 - date-fns: ^4.0.0 - react: ^17 || ^18 || ^19 - react-dom: ^17 || ^18 || ^19 - peerDependenciesMeta: - '@date-fns/tz': - optional: true - '@types/react': - optional: true - date-fns: - optional: true - - '@base-ui/utils@0.5.0': - resolution: {integrity: sha512-dYGGcEttjkYiMoa5nHm8vLaJ2UcuTWxo3BFAwOYXeRg/q7UVVvA6cacEIXEs3FgBfK1CGtW1ptElqs7wsx+t9A==} - peerDependencies: - '@types/react': ^17 || ^18 || ^19 - react: ^17 || ^18 || ^19 - react-dom: ^17 || ^18 || ^19 - peerDependenciesMeta: - '@types/react': - optional: true - '@braintree/sanitize-url@7.1.2': resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==} @@ -962,36 +926,12 @@ packages: '@floating-ui/core@1.7.4': resolution: {integrity: sha512-C3HlIdsBxszvm5McXlB8PeOEWfBhcGBTZGkGlWc2U0KFY5IwG5OQEuQ8rq52DZmcHDlPLd+YFBK+cZcytwIFWg==} - '@floating-ui/core@1.8.0': - resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==} - '@floating-ui/dom@1.7.5': resolution: {integrity: sha512-N0bD2kIPInNHUHehXhMke1rBGs1dwqvC9O9KYMyyjK7iXt7GAhnro7UlcuYcGdS/yYOlq0MAVgrow8IbWJwyqg==} - '@floating-ui/dom@1.8.0': - resolution: {integrity: sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==} - - '@floating-ui/react-dom@2.1.9': - resolution: {integrity: sha512-JDjEFGCpImxDCA7JJKviA0M9+RtmJdj0m/NVU5IMgBK+AmZouAQQ7/+2GLH0GXXY0YMw9oXPB8hKdbPYg5QLYg==} - peerDependencies: - react: '>=16.8.0' - react-dom: '>=16.8.0' - '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} - '@floating-ui/utils@0.2.12': - resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==} - - '@fontsource/zcool-qingke-huangyou@5.3.0': - resolution: {integrity: sha512-6/ld8x/knq1NjDQxLSyg9pDnBPOmtWDb30ZTFk+n8OxfkBoUvPAxh3aV/6+UFGmA5CekJfcgpUwd2/x/weLvSQ==} - - '@glass-sdk/liquid-glass@0.0.2': - resolution: {integrity: sha512-bDVDBXj6Cw++U0k9fcrSPEexnVnj/S4BjxF1t7NVQqW8La1gSVtxzPl9dG2VQxKs7Ik9kWR8Zi32JzyggI5Seg==} - peerDependencies: - react: '>=19.0.0' - react-dom: '>=19.0.0' - '@handsontable/pikaday@1.0.0': resolution: {integrity: sha512-1VN6N38t5/DcjJ7y7XUYrDx1LuzvvzlrFdBdMG90Qo1xc8+LXHqbWbsTEm5Ec5gXTEbDEO53vUT35R+2COmOyg==} @@ -1081,24 +1021,12 @@ packages: '@lezer/xml@1.0.6': resolution: {integrity: sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==} - '@lisse/core@0.7.3': - resolution: {integrity: sha512-WJWGskrOInlIs+DqK1CfAHNIjWBJ8t4AtM1cPn5RZfu2OmQumBdNGAhFuaIg+tgpibqP17GSwEiMq/fT+NCoIw==} - engines: {node: '>=18'} - '@marijn/find-cluster-break@1.0.2': resolution: {integrity: sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==} '@mermaid-js/parser@1.2.0': resolution: {integrity: sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==} - '@modelcontextprotocol/core@2.0.0': - resolution: {integrity: sha512-pJCEwGG7Lfr/+PQp9ZTwKXNeO5wzbfKL7H3MYpCorM4oFBoQrdjnBgEoqG+RjhsvS1FKrDbKux+M1HhlnGWqcA==} - engines: {node: '>=20'} - - '@modelcontextprotocol/server@2.0.0': - resolution: {integrity: sha512-YhHWdHfpFMQfd0prsEnxKeS3Qz3ytIGmsS0sth4KDjnacIT7hxk6hXHkJ9KysxlkvTM+WZAtQbbcUhdoP4Hvtw==} - engines: {node: '>=20'} - '@mrmlnc/readdir-enhanced@2.2.1': resolution: {integrity: sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==} engines: {node: '>=4'} @@ -1907,26 +1835,6 @@ packages: '@upsetjs/venn.js@2.0.0': resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==} - '@vgpu/adapter-mock@0.5.0': - resolution: {integrity: sha512-YtgXOFn1qI+8oTJenG2wWbQPA28V0CfE5UJs5Xqbt6qyR/xaZ5LHH2XWTwFcjnqn2b1xQCyTatJCMyyOdweUnw==} - - '@vgpu/adapter-node@0.5.0': - resolution: {integrity: sha512-lgzqFcLDejwRgwlaNStzkwLNU9b4aN2OoPpWqT1UyPmK521BSw2OIQKzAuDIkzNlREla6KNC12G6bthhOzZKzw==} - - '@vgpu/core@0.5.0': - resolution: {integrity: sha512-z80DHRHViv6+FKKkPzggEtT1ZZs/WCKRQbzJuwYdA135DZaSbCMoRK4anhM+I/nOHuDpf7H3xjkwE6rfolWZUw==} - - '@vgpu/wgsl-std@0.5.0': - resolution: {integrity: sha512-NjMyJxwy4evFNCSqFQy4EqAbZ7iU+NUyJYyG9tLUhbdDLzBmfZlk1S3PyRZ9olBFFfEiVW2JNVw10maPKLEs1A==} - - '@vgpu/wgsl@0.5.0': - resolution: {integrity: sha512-PDlDJem7J28C9bk+vPy2kYZEoW8+nYIx2oN4nu7/WF2V7ETx32BtmWcawwMbhiu/CVsobFafML0h0eqLRBNa3Q==} - peerDependencies: - '@vgpu/adapter-node': '>=0.1.6 <1.0.0 || ^0.5.0-rc.0' - peerDependenciesMeta: - '@vgpu/adapter-node': - optional: true - '@vitejs/plugin-vue-jsx@2.1.1': resolution: {integrity: sha512-JgDhxstQlwnHBvZ1BSnU5mbmyQ14/t5JhREc6YH5kWyu2QdAAOsLF6xgHoIWarj8tddaiwFrNzLbWJPudpXKYA==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2033,9 +1941,6 @@ packages: '@vueuse/shared@9.13.0': resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==} - '@webgpu/types@0.1.74': - resolution: {integrity: sha512-lgiI4hbuLcI9unnm2cL/tvCaQU45dp0xcLWJh5uB/9MBGvIA4F8XIk7nSiBeg+K4xWGYwgZKn80LmERI5CxoTA==} - '@wtto00/html2canvas@1.4.3': resolution: {integrity: sha512-jwsb+xL8N+gjrSNABSaFdxmWtE4c7RNFjP20lo1G7gs63Qqo1phhxVBTzxc/apDVh6LgXsU2l5bwKtXd9uz65w==} engines: {node: '>=8.0.0'} @@ -2043,6 +1948,18 @@ packages: '@zumer/snapdom@2.0.2': resolution: {integrity: sha512-W6quT4lMcPu8Q9O/Q6witSfc6/+xuY8C8yDoHug/+o7zYKCNE/e0I3//XsWDkyq9C0mDE0TAWF/8bwCR7x3gHQ==} + '@zxing/browser@0.2.1': + resolution: {integrity: sha512-92pVfVDUXbc15xu9vIEmhNyqIEASMEkDF92CwT6T+7sg2EHXJRktH9CQKoQSXe51UtbNsj+Fm09H/JBWHMs/Sw==} + peerDependencies: + '@zxing/library': ^0.23.0 + + '@zxing/library@0.23.0': + resolution: {integrity: sha512-6fkkoFwP8CHxl6ugnPsj74PLJgX2iRv5zczGAyt5OBzQgxFhuhF0NCEc4t4OvSr8xAv2MRLlI0Iu9ZGDZQ2urA==} + engines: {node: '>= 24.0.0'} + + '@zxing/text-encoding@0.9.0': + resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==} + JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true @@ -5277,9 +5194,6 @@ packages: ofetch@1.4.1: resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} - ogl@1.0.11: - resolution: {integrity: sha512-kUpC154AFfxi16pmZUK4jk3J+8zxwTWGPo03EoYA8QPbzikHoaC82n6pNTbd+oEaJonaE8aPWBlX7ad9zrqLsA==} - once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -5558,10 +5472,6 @@ packages: resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} engines: {node: '>=0.10.0'} - pixelmatch@7.2.0: - resolution: {integrity: sha512-xhcb4yHu9sM/G7foGzoLtXYcC0zHEaOXXjRKhGup0fw78Nf2Tkiapv4EQyMzrbcmQPsllAI7DbFY2UT7PlI9Pg==} - hasBin: true - pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -5572,10 +5482,6 @@ packages: resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} engines: {node: '>=10.13.0'} - pngjs@7.0.0: - resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==} - engines: {node: '>=14.19.0'} - pngquant-bin@6.0.1: resolution: {integrity: sha512-Q3PUyolfktf+hYio6wsg3SanQzEU/v8aICg/WpzxXcuCMRb7H2Q81okfpcEztbMvw25ILjd3a87doj2N9kvbpQ==} engines: {node: '>=10'} @@ -5776,15 +5682,6 @@ packages: raf@3.4.1: resolution: {integrity: sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==} - react-dom@19.3.1: - resolution: {integrity: sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==} - peerDependencies: - react: ^19.3.1 - - react@19.3.1: - resolution: {integrity: sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==} - engines: {node: '>=0.10.0'} - read-pkg-up@1.0.1: resolution: {integrity: sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==} engines: {node: '>=0.10.0'} @@ -5897,9 +5794,6 @@ packages: require-main-filename@2.0.0: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - reselect@5.3.0: - resolution: {integrity: sha512-XGoLeRAVzUTcJ1qkxPQhDJyIZ5d6zzZD9nT7AEZOaaU9UbWclhycElmhO+VD5bFeLuzhPBaOV2oXC8uG35ZSpg==} - reserved-words@0.1.2: resolution: {integrity: sha512-0S5SrIUJ9LfpbVl4Yzij6VipUdafHrOTzvmfazSw/jeZrZtQK303OPZW+obtkaw7jQlTQppy0UvZWm9872PbRw==} @@ -6153,9 +6047,6 @@ packages: sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} - scheduler@0.28.0: - resolution: {integrity: sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==} - screenfull@5.2.0: resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==} engines: {node: '>=0.10.0'} @@ -6800,6 +6691,10 @@ packages: trough@1.0.5: resolution: {integrity: sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==} + ts-custom-error@3.3.1: + resolution: {integrity: sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==} + engines: {node: '>=14.0.0'} + ts-dedent@2.3.0: resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==} engines: {node: '>=6.10'} @@ -7031,11 +6926,6 @@ packages: resolution: {integrity: sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==} engines: {node: '>= 4'} - use-sync-external-store@1.7.0: - resolution: {integrity: sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - use@3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} engines: {node: '>=0.10.0'} @@ -7083,15 +6973,6 @@ packages: resolution: {integrity: sha512-KoJRp8V2EsmeW2pg33CVEOEfGDTmcVLL0wk0fOQJjgXfAunciPylOueKovuzlbWSrTQap1UzgNn8xr5zbBsnPA==} engines: {node: '>=18.18.0'} - vgpu@0.5.0: - resolution: {integrity: sha512-isQfMHRTysYFfT8UWTzqQI/ROw2L7lVkj7xoUJlvIF6FjYxBNS/YNG7qp3tZ7ZvZZ3uwYjso+geQv/bEq5Hl3w==} - hasBin: true - peerDependencies: - three: '>=0.180.0 <0.200.0' - peerDependenciesMeta: - three: - optional: true - vite-plugin-compression@0.5.1: resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==} peerDependencies: @@ -7278,18 +7159,12 @@ packages: w3c-keyname@2.2.8: resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} - webgpu@0.4.0: - resolution: {integrity: sha512-F5pimn3Aoi0zWjuRdiVs5TnrUwSzD2lESBohsIUsqyitWkGRQlXU2fhV6ycXlQTa1bvAf3sjqiUpBEpmSQ5ptA==} - webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} webpack-virtual-modules@0.6.2: resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} - wgpu-matrix@3.4.2: - resolution: {integrity: sha512-IfZFbG7olEYBD76VCZy2TzqM57GKy3LT++AZh37tMHPPByO6R2h61zXGBZFNPi2IzxNivNi8y5dvze5PjaczjA==} - whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} @@ -7457,9 +7332,6 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - zod@4.6.7: - resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} - zrender@5.6.1: resolution: {integrity: sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==} @@ -7652,8 +7524,6 @@ snapshots: '@babel/runtime@7.28.6': {} - '@babel/runtime@8.1.0': {} - '@babel/template@7.27.2': dependencies: '@babel/code-frame': 7.27.1 @@ -7677,25 +7547,6 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 - '@base-ui/react@1.9.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@babel/runtime': 8.1.0 - '@base-ui/utils': 0.5.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - '@floating-ui/react-dom': 2.1.9(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - '@floating-ui/utils': 0.2.12 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - use-sync-external-store: 1.7.0(react@19.3.1) - - '@base-ui/utils@0.5.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@babel/runtime': 8.1.0 - '@floating-ui/utils': 0.2.12 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - reselect: 5.3.0 - use-sync-external-store: 1.7.0(react@19.3.1) - '@braintree/sanitize-url@7.1.2': {} '@bufbuild/protobuf@2.10.1': {} @@ -8111,46 +7962,13 @@ snapshots: dependencies: '@floating-ui/utils': 0.2.10 - '@floating-ui/core@1.8.0': - dependencies: - '@floating-ui/utils': 0.2.12 - '@floating-ui/dom@1.7.5': dependencies: '@floating-ui/core': 1.7.4 '@floating-ui/utils': 0.2.10 - '@floating-ui/dom@1.8.0': - dependencies: - '@floating-ui/core': 1.8.0 - '@floating-ui/utils': 0.2.12 - - '@floating-ui/react-dom@2.1.9(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@floating-ui/dom': 1.8.0 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - '@floating-ui/utils@0.2.10': {} - '@floating-ui/utils@0.2.12': {} - - '@fontsource/zcool-qingke-huangyou@5.3.0': {} - - '@glass-sdk/liquid-glass@0.0.2(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@base-ui/react': 1.9.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - '@lisse/core': 0.7.3 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - vgpu: 0.5.0 - transitivePeerDependencies: - - '@date-fns/tz' - - '@types/react' - - date-fns - - supports-color - - three - '@handsontable/pikaday@1.0.0': {} '@handsontable/vue3@16.2.0(handsontable@16.2.0)(vue@3.5.18(typescript@4.9.5))': @@ -8265,23 +8083,12 @@ snapshots: '@lezer/highlight': 1.2.3 '@lezer/lr': 1.4.8 - '@lisse/core@0.7.3': {} - '@marijn/find-cluster-break@1.0.2': {} '@mermaid-js/parser@1.2.0': dependencies: '@chevrotain/types': 11.1.2 - '@modelcontextprotocol/core@2.0.0': - dependencies: - zod: 4.6.7 - - '@modelcontextprotocol/server@2.0.0': - dependencies: - '@modelcontextprotocol/core': 2.0.0 - zod: 4.6.7 - '@mrmlnc/readdir-enhanced@2.2.1': dependencies: call-me-maybe: 1.0.2 @@ -9105,33 +8912,6 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - '@vgpu/adapter-mock@0.5.0(@vgpu/adapter-node@0.5.0)': - dependencies: - '@vgpu/core': 0.5.0(@vgpu/adapter-node@0.5.0) - transitivePeerDependencies: - - '@vgpu/adapter-node' - - '@vgpu/adapter-node@0.5.0': - dependencies: - '@vgpu/core': 0.5.0(@vgpu/adapter-node@0.5.0) - webgpu: 0.4.0 - transitivePeerDependencies: - - supports-color - - '@vgpu/core@0.5.0(@vgpu/adapter-node@0.5.0)': - dependencies: - '@vgpu/wgsl': 0.5.0(@vgpu/adapter-node@0.5.0) - transitivePeerDependencies: - - '@vgpu/adapter-node' - - '@vgpu/wgsl-std@0.5.0': {} - - '@vgpu/wgsl@0.5.0(@vgpu/adapter-node@0.5.0)': - dependencies: - '@vgpu/wgsl-std': 0.5.0 - optionalDependencies: - '@vgpu/adapter-node': 0.5.0 - '@vitejs/plugin-vue-jsx@2.1.1(vite@6.3.5(@types/node@20.5.1)(jiti@1.21.7)(less@4.4.0)(sass-embedded@1.93.3)(sass@1.93.3)(sugarss@2.0.0)(tsx@4.20.3))(vue@3.5.18(typescript@4.9.5))': dependencies: '@babel/core': 7.28.0 @@ -9315,8 +9095,6 @@ snapshots: - '@vue/composition-api' - vue - '@webgpu/types@0.1.74': {} - '@wtto00/html2canvas@1.4.3': dependencies: css-line-break: 2.1.0 @@ -9324,6 +9102,21 @@ snapshots: '@zumer/snapdom@2.0.2': {} + '@zxing/browser@0.2.1(@zxing/library@0.23.0)': + dependencies: + '@zxing/library': 0.23.0 + optionalDependencies: + '@zxing/text-encoding': 0.9.0 + + '@zxing/library@0.23.0': + dependencies: + ts-custom-error: 3.3.1 + optionalDependencies: + '@zxing/text-encoding': 0.9.0 + + '@zxing/text-encoding@0.9.0': + optional: true + JSONStream@1.3.5: dependencies: jsonparse: 1.3.1 @@ -12918,8 +12711,6 @@ snapshots: node-fetch-native: 1.6.6 ufo: 1.6.1 - ogl@1.0.11: {} - once@1.4.0: dependencies: wrappy: 1.0.2 @@ -13158,10 +12949,6 @@ snapshots: pinkie@2.0.4: {} - pixelmatch@7.2.0: - dependencies: - pngjs: 7.0.0 - pkg-types@1.3.1: dependencies: confbox: 0.1.8 @@ -13176,8 +12963,6 @@ snapshots: pngjs@5.0.0: {} - pngjs@7.0.0: {} - pngquant-bin@6.0.1: dependencies: bin-build: 3.0.0 @@ -13362,13 +13147,6 @@ snapshots: dependencies: performance-now: 2.1.0 - react-dom@19.3.1(react@19.3.1): - dependencies: - react: 19.3.1 - scheduler: 0.28.0 - - react@19.3.1: {} - read-pkg-up@1.0.1: dependencies: find-up: 1.1.2 @@ -13533,8 +13311,6 @@ snapshots: require-main-filename@2.0.0: {} - reselect@5.3.0: {} - reserved-words@0.1.2: {} resize-detector@0.3.0: {} @@ -13777,8 +13553,6 @@ snapshots: sax@1.4.1: optional: true - scheduler@0.28.0: {} - screenfull@5.2.0: {} scroll-into-view-if-needed@2.2.31: @@ -14544,6 +14318,8 @@ snapshots: trough@1.0.5: {} + ts-custom-error@3.3.1: {} + ts-dedent@2.3.0: {} ts-node@10.9.2(@types/node@20.5.1)(typescript@4.9.5): @@ -14854,10 +14630,6 @@ snapshots: url-to-options@1.0.1: {} - use-sync-external-store@1.7.0(react@19.3.1): - dependencies: - react: 19.3.1 - use@3.1.1: {} util-deprecate@1.0.2: {} @@ -14928,22 +14700,6 @@ snapshots: - typescript - utf-8-validate - vgpu@0.5.0: - dependencies: - '@modelcontextprotocol/server': 2.0.0 - '@vgpu/adapter-mock': 0.5.0(@vgpu/adapter-node@0.5.0) - '@vgpu/adapter-node': 0.5.0 - '@vgpu/core': 0.5.0(@vgpu/adapter-node@0.5.0) - '@vgpu/wgsl': 0.5.0(@vgpu/adapter-node@0.5.0) - '@vgpu/wgsl-std': 0.5.0 - '@webgpu/types': 0.1.74 - pixelmatch: 7.2.0 - pngjs: 7.0.0 - wgpu-matrix: 3.4.2 - zod: 4.6.7 - transitivePeerDependencies: - - supports-color - vite-plugin-compression@0.5.1(vite@6.3.5(@types/node@20.5.1)(jiti@1.21.7)(less@4.4.0)(sass-embedded@1.93.3)(sass@1.93.3)(sugarss@2.0.0)(tsx@4.20.3)): dependencies: chalk: 4.1.2 @@ -15157,19 +14913,10 @@ snapshots: w3c-keyname@2.2.8: {} - webgpu@0.4.0: - dependencies: - '@webgpu/types': 0.1.74 - debug: 4.4.1 - transitivePeerDependencies: - - supports-color - webidl-conversions@3.0.1: {} webpack-virtual-modules@0.6.2: {} - wgpu-matrix@3.4.2: {} - whatwg-url@5.0.0: dependencies: tr46: 0.0.3 @@ -15349,8 +15096,6 @@ snapshots: yocto-queue@0.1.0: {} - zod@4.6.7: {} - zrender@5.6.1: dependencies: tslib: 2.3.0 diff --git a/src/App.vue b/src/App.vue index 075f1e1..429b380 100644 --- a/src/App.vue +++ b/src/App.vue @@ -31,17 +31,32 @@ import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn'; import useLocale from '@/hooks/locale'; import { isLoginRouteName } from '@/utils/login-portal'; - import { consumePageFlip } from '@/utils/page-transition-flag'; + import { + consumePageFlip, + PORTAL_IRIS_ACTIVE_CLASS, + PORTAL_IRIS_SETTLED_CLASS, + shouldPortalIris, + } from '@/utils/page-transition-flag'; import GlobalSetting from '@/components/global-setting/index.vue'; const route = useRoute(); const router = useRouter(); - /** '' | 'oms-iris' — 中心虹膜散开(官网→登录 / 登录互切) */ + /** '' | 'oms-iris' — 中心展开(官网→登录 / 登录互切) */ const portalTransition = ref(''); const isPageIris = computed(() => portalTransition.value === 'oms-iris'); - const IRIS_MS = 1000; - const IRIS_EASE = 'cubic-bezier(0.22, 1, 0.36, 1)'; + /** + * 圆半径用百分比时,约 71% 就盖住视口四角。 + * 收到 80% 为止,整段时间都在铺画面,不再扩到 150% 后空转。 + * 曲线前段就有位移、后段轻轻收住,避免猛地撑开或开头发呆。 + */ + const IRIS_MS = 920; + const IRIS_EASE = 'cubic-bezier(0.33, 0.5, 0.22, 1)'; + /** 新页图片解码最多等这么久,超时也开动画,避免点击发僵 */ + const IRIS_READY_CAP_MS = 160; + const IRIS_AT = '50% 50%'; + /** 约 71% 盖住四角,收到 80% 留一点余量 */ + const IRIS_END = '80%'; function clearPortalTransition() { portalTransition.value = ''; @@ -58,89 +73,144 @@ node.style.position = 'absolute'; node.style.inset = '0'; node.style.width = '100%'; + node.style.height = '100%'; node.style.minHeight = '100%'; node.style.zIndex = String(z); - node.style.willChange = 'clip-path, opacity, filter'; + node.style.overflow = 'hidden'; } function clearSheetStyles(node: HTMLElement) { node.style.position = ''; node.style.inset = ''; node.style.width = ''; + node.style.height = ''; node.style.minHeight = ''; node.style.zIndex = ''; + node.style.overflow = ''; node.style.willChange = ''; node.style.transform = ''; node.style.filter = ''; node.style.opacity = ''; node.style.clipPath = ''; + node.style.pointerEvents = ''; node.style.removeProperty('-webkit-clip-path'); } - /** - * 中心虹膜:旧页留底层轻压暗;新页 clip-path 从中心向外展开。 - */ - function playIrisLeave(node: HTMLElement, done: () => void) { - prepareSheet(node, 1); - const anim = node.animate( - [ - { opacity: 1, filter: 'brightness(1)', offset: 0 }, - { opacity: 0.92, filter: 'brightness(0.94)', offset: 0.45 }, - { opacity: 0.82, filter: 'brightness(0.88)', offset: 1 }, - ], - { - duration: IRIS_MS, - easing: IRIS_EASE, - fill: 'forwards', - }, - ); + /** 旧页卸掉之后再调;新页铺满前不能提前放 */ + let releaseIrisLeave: (() => void) | null = null; - anim.finished - .catch(() => undefined) - .finally(() => { - done(); - }); + function markIrisSettled() { + const root = document.documentElement; + root.classList.add(PORTAL_IRIS_SETTLED_CLASS); + root.classList.remove(PORTAL_IRIS_ACTIVE_CLASS); } - function playIrisEnter(node: HTMLElement, done: () => void) { - prepareSheet(node, 4); - node.style.clipPath = 'circle(0% at 50% 50%)'; - node.style.setProperty('-webkit-clip-path', 'circle(0% at 50% 50%)'); - - const anim = node.animate( - [ - { - clipPath: 'circle(0% at 50% 50%)', - opacity: 1, - filter: 'brightness(0.98)', - offset: 0, - }, - { - clipPath: 'circle(42% at 50% 50%)', - opacity: 1, - filter: 'brightness(1)', - offset: 0.42, - }, - { - clipPath: 'circle(150% at 50% 50%)', - opacity: 1, - filter: 'brightness(1)', - offset: 1, - }, - ], - { - duration: IRIS_MS, - easing: IRIS_EASE, - fill: 'forwards', - }, + /** + * 等新页完成一次完整绘制,再开裁剪。 + * 若边裁边解码大图,每一帧都要重绘,圆就会一卡一卡地长。 + */ + function whenIncomingReady(node: HTMLElement) { + const pending = [...node.querySelectorAll('img')].filter((img) => !img.complete); + const decoded = Promise.all( + pending.map((img) => + typeof img.decode === 'function' + ? img.decode().catch(() => undefined) + : Promise.resolve(), + ), ); - - anim.finished - .catch(() => undefined) - .finally(() => { - clearSheetStyles(node); - done(); + const cap = new Promise((resolve) => { + window.setTimeout(resolve, IRIS_READY_CAP_MS); + }); + const frames = new Promise((resolve) => { + requestAnimationFrame(() => { + requestAnimationFrame(() => resolve()); }); + }); + return Promise.all([frames, Promise.race([decoded, cap])]).then(() => undefined); + } + + /** + * 旧页只作一张静止底图。亮度滤镜会让整页每一帧都重采样,是掉帧的主要来源。 + */ + function playIrisLeave(node: HTMLElement, done: () => void) { + prepareSheet(node, 2); + node.classList.add('portal-iris-frozen'); + node.style.transform = 'translateZ(0)'; + node.style.pointerEvents = 'none'; + try { + node.getAnimations({ subtree: true }).forEach((anim) => anim.pause()); + } catch { + /* 旧环境没有 getAnimations 时,样式冻结仍然生效 */ + } + + let released = false; + const release = () => { + if (released) return; + released = true; + if (releaseIrisLeave === release) releaseIrisLeave = null; + done(); + }; + releaseIrisLeave = release; + window.setTimeout(release, IRIS_MS + IRIS_READY_CAP_MS + 480); + } + + async function playIrisEnter(node: HTMLElement, done: () => void) { + prepareSheet(node, 1); + node.style.willChange = 'clip-path'; + node.style.pointerEvents = 'none'; + node.style.clipPath = 'none'; + node.style.setProperty('-webkit-clip-path', 'none'); + + let finished = false; + let anim: Animation | null = null; + const finish = () => { + if (finished) return; + finished = true; + // 先去掉内联裁剪再 cancel,避免 fill 被取消后回到 circle(0%) + node.style.clipPath = ''; + node.style.removeProperty('-webkit-clip-path'); + anim?.cancel(); + clearSheetStyles(node); + done(); + releaseIrisLeave?.(); + markIrisSettled(); + }; + + try { + await whenIncomingReady(node); + } catch { + /* 解码失败也继续展开 */ + } + + if (!node.isConnected) { + finish(); + return; + } + + const at = IRIS_AT; + const end = IRIS_END; + // 先收到 0 再抬到上层,避免动画首帧还没写上时整页闪一下 + node.style.clipPath = `circle(0% at ${at})`; + node.style.setProperty('-webkit-clip-path', `circle(0% at ${at})`); + node.style.zIndex = '3'; + try { + anim = node.animate( + [ + { clipPath: `circle(0% at ${at})` }, + { clipPath: `circle(${end} at ${at})` }, + ], + { + duration: IRIS_MS, + easing: IRIS_EASE, + fill: 'forwards', + }, + ); + } catch { + finish(); + return; + } + + anim.finished.catch(() => undefined).finally(finish); } function onPortalLeave(el: Element, done: () => void) { @@ -182,26 +252,15 @@ return true; }); - function isPcLoginRouteName(name: unknown) { - return name === 'login' || name === 'adminLogin'; - } - router.beforeEach((to, from) => { - const armed = consumePageFlip(); - const siteToLogin = - from.name === 'siteRoot' && - (to.name === 'login' || to.name === 'H5Login') && - to.query.from === 'official-site'; - const loginPortalSwitch = - isPcLoginRouteName(from.name) && - isPcLoginRouteName(to.name) && - from.name !== to.name; - const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; - - if ((armed || siteToLogin || loginPortalSwitch) && !reduceMotion) { - portalTransition.value = 'oms-iris'; + const iris = shouldPortalIris(to, from); + consumePageFlip(); + portalTransition.value = iris ? 'oms-iris' : ''; + const root = document.documentElement; + if (iris) { + root.classList.add(PORTAL_IRIS_ACTIVE_CLASS); } else { - portalTransition.value = ''; + root.classList.remove(PORTAL_IRIS_ACTIVE_CLASS, PORTAL_IRIS_SETTLED_CLASS); } }); @@ -269,7 +328,33 @@ html body .main-menu .menu-text { overflow: hidden; min-height: 100vh; min-height: 100dvh; - /* 与登录页灰底一致,避免虹膜展开时露黑缝 */ + /* 与登录页灰底一致,避免展开时露黑缝 */ background: var(--app-page-bg, #f0f3f4); } + +/* 旧页:停掉无限动画和额外合成层,让底图在展开期间保持同一张纹理 */ +.portal-iris-frozen, +.portal-iris-frozen * { + animation-play-state: paused !important; + transition: none !important; + will-change: auto !important; +} + +/* 新页:展开期间不要再叠模糊和入场动画,否则裁剪每一帧都要重绘 */ +html.portal-iris-active .login-split, +html.portal-iris-active .login-pane { + will-change: auto !important; +} + +html.portal-iris-active .login-container, +html.portal-iris-active .login-container * { + backdrop-filter: none !important; + -webkit-backdrop-filter: none !important; +} + +html.portal-iris-active .login-hero__principle, +html.portal-iris-settled .login-hero__principle { + animation: none !important; + opacity: 1 !important; +} diff --git a/src/api/channel/salesProduct.ts b/src/api/channel/salesProduct.ts index 84a5863..7d5db84 100644 --- a/src/api/channel/salesProduct.ts +++ b/src/api/channel/salesProduct.ts @@ -214,18 +214,44 @@ export async function getSalesProductPublishSyncStatus(params: { OnlinePublishTime?: string | null pendingContentHash?: string | null onlineContentHash?: string | null + approvalRequired?: boolean + ApprovalRequired?: boolean + approvalPending?: boolean + ApprovalPending?: boolean + approvalFailed?: boolean + ApprovalFailed?: boolean + approvalInstanceId?: number | null + ApprovalInstanceId?: number | null + approvalInstanceNo?: string | null + ApprovalInstanceNo?: string | null + approvalStatusName?: string | null + ApprovalStatusName?: string | null + approvalComment?: string | null + ApprovalComment?: string | null }>(res.data) } +export type SalesProductPublishResult = { + decision?: string + Decision?: string + approvalInstanceId?: number + ApprovalInstanceId?: number + approvalInstanceNo?: string + ApprovalInstanceNo?: string + message?: string + Message?: string +} + export async function publishSalesProduct(body: { salesProductId: number | string operatorType: string description?: string /** 价格发布必填:AI 风险分析报告原文 */ aiAnalysisReport?: string -}) { +}): Promise { const res = await axiosInstance.post(omsUrl('/channel/sales-product/publish'), body) assertBusinessOk(res.data) + return unwrapData(res.data) } export async function rollbackSalesProductPublish(body: { diff --git a/src/api/customer/index.ts b/src/api/customer/index.ts index 6cd2dd8..0a981bf 100644 --- a/src/api/customer/index.ts +++ b/src/api/customer/index.ts @@ -59,6 +59,8 @@ export interface CustomerListParams { salesman?: string customerService?: string agentId?: number + /** 监控 KPI 下钻:total / newToday / online / inactive7d */ + monitorScope?: 'total' | 'newToday' | 'online' | 'inactive7d' | string sortField?: string sortOrder?: string } diff --git a/src/api/operation/shipContainer.ts b/src/api/operation/shipContainer.ts new file mode 100644 index 0000000..65d0a0e --- /dev/null +++ b/src/api/operation/shipContainer.ts @@ -0,0 +1,204 @@ +import { axiosInstance } from '@/api/rbac' +import { assertBusinessOk, omsUrl, unwrapData } from '@/api/oms/common' + +function post(path: string, body?: unknown): Promise { + return axiosInstance.post(omsUrl(path), body).then((res) => { + assertBusinessOk(res.data) + return unwrapData(res.data) as T + }) +} + +function get(path: string, params?: Record): Promise { + return axiosInstance.get(omsUrl(path), { params }).then((res) => { + assertBusinessOk(res.data) + return unwrapData(res.data) as T + }) +} + +export type ShipBagItem = { + id: number + orderId: number + waybillNo: string + orderStatus?: string + orderStatusName?: string + consigneeCountry?: string +} + +export type ShipBag = { + id: number + bagNo: string + bagType: string + status: string + statusName?: string + warehouseId?: number + destinationCountry?: string + destinationPort?: string + channelCode?: string + length?: number + width?: number + height?: number + weight?: number + parcelCount: number + sealTime?: string + shipTime?: string + masterId?: number + remark?: string + createTime?: string + items?: ShipBagItem[] +} + +export type ShipMasterItem = { + id: number + itemType: string + bagId?: number + bagNo?: string + orderId?: number + waybillNo?: string +} + +export type ShipMaster = { + id: number + masterNo: string + externalMawb?: string + status: string + statusName?: string + warehouseId?: number + destinationCountry?: string + destinationPort?: string + flightOrVoyage?: string + length?: number + width?: number + height?: number + weight?: number + bagCount: number + parcelCount: number + sealTime?: string + handTime?: string + remark?: string + createTime?: string + items?: ShipMasterItem[] +} + +export type ShipBagMetaInput = { + bagNo: string + destinationCountry?: string + destinationPort?: string + channelCode?: string + length?: number | null + width?: number | null + height?: number | null + weight?: number | null + remark?: string +} + +export type ShipMasterMetaInput = { + masterNo: string + destinationCountry?: string + destinationPort?: string + flightOrVoyage?: string + length?: number | null + width?: number | null + height?: number | null + weight?: number | null + remark?: string +} + +export type ShipPageResult = { items: T[]; total: number } + +export const createShipBag = (body: { + bagType?: string + warehouseId?: number + destinationCountry?: string + channelCode?: string + remark?: string +}) => post('/operation/bag/create', body) + +export const addParcelToBag = (bagNo: string, waybillNo: string) => + post('/operation/bag/add-parcel', { bagNo, waybillNo }) + +export const removeParcelFromBag = (bagNo: string, waybillNo: string) => + post('/operation/bag/remove-parcel', { bagNo, waybillNo }) + +export const sealShipBag = (bagNo: string) => post('/operation/bag/seal', { bagNo }) + +export const voidShipBag = (bagNo: string) => post('/operation/bag/void', { bagNo }) + +export const updateShipBagMeta = (body: ShipBagMetaInput) => + post('/operation/bag/update-meta', body) + +export const getShipBag = (bagNo: string) => get('/operation/bag/get', { bagNo }) + +export const pageShipBags = (body: { + pageIndex?: number + pageSize?: number + keyword?: string + status?: string + warehouseId?: number +}) => post>('/operation/bag/page', body) + +export type ShipPrintLabelItem = { + bagNo?: string + masterNo?: string + printUrl: string +} + +export type ShipPrintLabelsResult = { + templateName?: string + items: ShipPrintLabelItem[] +} + +/** POST /operation/bag/print-labels */ +export const printShipBagLabels = (body: { bagNos: string[]; labelTemplateId?: number }) => + post('/operation/bag/print-labels', body) + +export const outboundByBag = (bagNo: string, warehouseId?: number) => + post<{ bagNo: string; successCount: number; waybillNos: string[] }>( + '/operation/outbound/bag-create', + { bagNo, warehouseId }, + ) + +export const createShipMaster = (body: { + warehouseId?: number + destinationCountry?: string + flightOrVoyage?: string + externalMawb?: string + remark?: string +}) => post('/operation/master/create', body) + +export const addBagToMaster = (masterNo: string, bagNo: string) => + post('/operation/master/add-bag', { masterNo, bagNo }) + +export const addParcelToMaster = (masterNo: string, waybillNo: string) => + post('/operation/master/add-parcel', { masterNo, waybillNo }) + +export const removeMasterItem = (masterNo: string, itemId: number) => + post('/operation/master/remove-item', { masterNo, itemId }) + +export const sealShipMaster = (masterNo: string) => + post('/operation/master/seal', { masterNo }) + +export const bindMasterMawb = (masterNo: string, externalMawb: string, flightOrVoyage?: string) => + post('/operation/master/bind-mawb', { masterNo, externalMawb, flightOrVoyage }) + +export const updateShipMasterMeta = (body: ShipMasterMetaInput) => + post('/operation/master/update-meta', body) + +export const handOverMaster = (masterNo: string) => + post('/operation/master/hand-over', { masterNo }) + +export const getShipMaster = (masterNo: string) => + get('/operation/master/get', { masterNo }) + +export const pageShipMasters = (body: { + pageIndex?: number + pageSize?: number + keyword?: string + status?: string + warehouseId?: number +}) => post>('/operation/master/page', body) + +/** POST /operation/master/print-labels */ +export const printShipMasterLabels = (body: { + masterNos: string[] + labelTemplateId?: number +}) => post('/operation/master/print-labels', body) diff --git a/src/api/system/approval.ts b/src/api/system/approval.ts new file mode 100644 index 0000000..7931018 --- /dev/null +++ b/src/api/system/approval.ts @@ -0,0 +1,322 @@ +import { axiosInstance } from '@/api/rbac' +import { + assertBusinessOk, + extractOmsRequestError, + omsUrl, + parseListPayload, + unwrapData, +} from '@/api/oms/common' + +export interface ApprovalDefinitionDto { + id: number + operationCode: string + operationName: string + isEnabled: boolean + conditionFormula?: string | null + approverType: string + approverIds: string[] + forbidSelfApprove: boolean + remark?: string | null + createTime?: string + updateTime?: string +} + +export interface ApprovalCatalogItem { + code: string + name: string + module: string + supportsCondition: boolean + conditionHint: string +} + +export interface ApprovalInstanceDto { + id: number + instanceNo: string + operationCode: string + bizKey: string + title: string + status: number + statusName: string + applicantUserId: number + applicantUserGuid: string + applicantUserName?: string | null + payloadJson?: string | null + summaryJson?: string | null + definitionSnapshot?: string | null + currentTaskId?: number | null + createTime?: string + completedTime?: string | null + executedTime?: string | null + executeMessage?: string | null + concurrencyStamp?: string | null + canApprove?: boolean + canWithdraw?: boolean + events?: ApprovalEventDto[] +} + +export interface ApprovalEventDto { + id: number + eventType: string + fromStatus?: number | null + toStatus?: number | null + operatorUserName?: string | null + message?: string | null + createTime?: string +} + +function pickString(row: Record, ...keys: string[]) { + for (const key of keys) { + const value = row[key] + if (value != null && String(value).trim()) return String(value).trim() + } + return '' +} + +function pickBool(row: Record, ...keys: string[]) { + for (const key of keys) { + const value = row[key] + if (typeof value === 'boolean') return value + if (value === 1 || value === '1' || value === 'true') return true + if (value === 0 || value === '0' || value === 'false') return false + } + return false +} + +function pickNumber(row: Record, ...keys: string[]) { + for (const key of keys) { + const value = row[key] + if (typeof value === 'number' && Number.isFinite(value)) return value + const n = Number(value) + if (Number.isFinite(n)) return n + } + return 0 +} + +function pickIds(row: Record): string[] { + const raw = row.approverIds ?? row.ApproverIds + if (Array.isArray(raw)) return raw.map((x) => String(x).trim()).filter(Boolean) + if (typeof raw === 'string') { + return raw.split(/[,;,\s]+/).map((x) => x.trim()).filter(Boolean) + } + return [] +} + +export function mapDefinitionRow(row: Record): ApprovalDefinitionDto { + return { + id: pickNumber(row, 'id', 'Id'), + operationCode: pickString(row, 'operationCode', 'OperationCode'), + operationName: pickString(row, 'operationName', 'OperationName'), + isEnabled: pickBool(row, 'isEnabled', 'IsEnabled'), + conditionFormula: pickString(row, 'conditionFormula', 'ConditionFormula') || null, + approverType: pickString(row, 'approverType', 'ApproverType') || 'User', + approverIds: pickIds(row), + forbidSelfApprove: pickBool(row, 'forbidSelfApprove', 'ForbidSelfApprove'), + remark: pickString(row, 'remark', 'Remark') || null, + createTime: pickString(row, 'createTime', 'CreateTime') || undefined, + updateTime: pickString(row, 'updateTime', 'UpdateTime') || undefined, + } +} + +export function mapInstanceRow(row: Record): ApprovalInstanceDto { + const eventsRaw = (row.events ?? row.Events) as Record[] | undefined + return { + id: pickNumber(row, 'id', 'Id'), + instanceNo: pickString(row, 'instanceNo', 'InstanceNo'), + operationCode: pickString(row, 'operationCode', 'OperationCode'), + bizKey: pickString(row, 'bizKey', 'BizKey'), + title: pickString(row, 'title', 'Title'), + status: pickNumber(row, 'status', 'Status'), + statusName: pickString(row, 'statusName', 'StatusName'), + applicantUserId: pickNumber(row, 'applicantUserId', 'ApplicantUserId'), + applicantUserGuid: pickString(row, 'applicantUserGuid', 'ApplicantUserGuid'), + applicantUserName: pickString(row, 'applicantUserName', 'ApplicantUserName') || null, + payloadJson: pickString(row, 'payloadJson', 'PayloadJson') || null, + summaryJson: pickString(row, 'summaryJson', 'SummaryJson') || null, + definitionSnapshot: pickString(row, 'definitionSnapshot', 'DefinitionSnapshot') || null, + currentTaskId: pickNumber(row, 'currentTaskId', 'CurrentTaskId') || null, + createTime: pickString(row, 'createTime', 'CreateTime') || undefined, + completedTime: pickString(row, 'completedTime', 'CompletedTime') || null, + executedTime: pickString(row, 'executedTime', 'ExecutedTime') || null, + executeMessage: pickString(row, 'executeMessage', 'ExecuteMessage') || null, + concurrencyStamp: pickString(row, 'concurrencyStamp', 'ConcurrencyStamp') || null, + canApprove: pickBool(row, 'canApprove', 'CanApprove'), + canWithdraw: pickBool(row, 'canWithdraw', 'CanWithdraw'), + events: Array.isArray(eventsRaw) + ? eventsRaw.map((e) => ({ + id: pickNumber(e, 'id', 'Id'), + eventType: pickString(e, 'eventType', 'EventType'), + fromStatus: pickNumber(e, 'fromStatus', 'FromStatus') || null, + toStatus: pickNumber(e, 'toStatus', 'ToStatus') || null, + operatorUserName: pickString(e, 'operatorUserName', 'OperatorUserName') || null, + message: pickString(e, 'message', 'Message') || null, + createTime: pickString(e, 'createTime', 'CreateTime') || undefined, + })) + : [], + } +} + +export async function getApprovalDefinitionList(params: { + page?: number + pageSize?: number + keyword?: string + isEnabled?: boolean | null +}) { + const res = await axiosInstance.get(omsUrl('/system/approval/definition/list'), { params }) + const { items, total } = parseListPayload(res.data) + return { + items: (items || []).map((row) => mapDefinitionRow(row as Record)), + total, + } +} + +export async function getApprovalCatalog() { + const res = await axiosInstance.get(omsUrl('/system/approval/operation-catalog')) + const payload = unwrapData[] | null>(res.data) + if (!Array.isArray(payload)) return [] as ApprovalCatalogItem[] + return payload.map((row) => ({ + code: pickString(row, 'code', 'Code'), + name: pickString(row, 'name', 'Name'), + module: pickString(row, 'module', 'Module'), + supportsCondition: pickBool(row, 'supportsCondition', 'SupportsCondition'), + conditionHint: pickString(row, 'conditionHint', 'ConditionHint'), + })) +} + +export async function saveApprovalDefinition(body: { + id?: number + operationCode: string + isEnabled: boolean + conditionFormula?: string | null + approverType: string + approverIds: string[] + forbidSelfApprove: boolean + remark?: string | null +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/definition/save'), body) + assertBusinessOk(res.data) + return mapDefinitionRow((unwrapData(res.data) || {}) as Record) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function enableApprovalDefinition(id: number, isEnabled: boolean) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/definition/enable'), { id, isEnabled }) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function deleteApprovalDefinition(id: number) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/definition/delete'), { id }) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function getApprovalMyTodo(params: { + page?: number + pageSize?: number + keyword?: string +}) { + const res = await axiosInstance.get(omsUrl('/system/approval/engine/my-todo'), { params }) + const { items, total } = parseListPayload(res.data) + return { + items: (items || []).map((row) => mapInstanceRow(row as Record)), + total, + } +} + +export async function getApprovalMySubmitted(params: { + page?: number + pageSize?: number + keyword?: string + status?: number | null +}) { + const res = await axiosInstance.get(omsUrl('/system/approval/engine/my-submitted'), { params }) + const { items, total } = parseListPayload(res.data) + return { + items: (items || []).map((row) => mapInstanceRow(row as Record)), + total, + } +} + +export async function getApprovalDetail(id: number) { + const res = await axiosInstance.get(omsUrl('/system/approval/engine/detail'), { params: { id } }) + return mapInstanceRow((unwrapData(res.data) || {}) as Record) +} + +export async function approveApproval(body: { + instanceId: number + comment?: string + concurrencyStamp?: string | null +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/engine/approve'), body) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function rejectApproval(body: { + instanceId: number + comment: string + concurrencyStamp?: string | null +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/engine/reject'), body) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function withdrawApproval(body: { + instanceId: number + comment?: string + concurrencyStamp?: string | null +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/engine/withdraw'), body) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +/** 终审后业务执行失败 / 历史空跑:重试 Handler(落发布、入账等) */ +export async function retryApprovalExecute(id: number) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/engine/retry-execute'), { id }) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function simulateApprovalSubmit(body: { + operationCode?: string + bizKey?: string + title?: string + payload?: unknown + summary?: unknown +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/engine/simulate-submit'), body) + assertBusinessOk(res.data) + return unwrapData(res.data) as { + decision?: string + instanceId?: number + instanceNo?: string + message?: string + } + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} diff --git a/src/api/system/otherConfig.ts b/src/api/system/otherConfig.ts index 16cd138..41b8161 100644 --- a/src/api/system/otherConfig.ts +++ b/src/api/system/otherConfig.ts @@ -52,6 +52,30 @@ export async function deleteSystemOtherConfig(id: number | string) { assertBusinessOk(res.data) } +export type PaymentReceiveQrChannel = 'alipay' | 'wechat' + +export interface PaymentReceiveQrDto { + alipayUrl?: string + wechatUrl?: string +} + +/** 获取充值收款码(支付宝 / 微信)可访问地址 */ +export async function getPaymentReceiveQr() { + const res = await axiosInstance.get(omsUrl('/system/other-config/payment-qr')) + return unwrapData(res.data) +} + +/** 上传并替换充值收款码图片 */ +export async function uploadPaymentReceiveQr(channel: PaymentReceiveQrChannel, file: File) { + const form = new FormData() + form.append('channel', channel) + form.append('file', file) + const res = await axiosInstance.post(omsUrl('/system/other-config/payment-qr/upload'), form, { + headers: { 'Content-Type': 'multipart/form-data' }, + }) + return unwrapData(res.data) +} + /** 轨迹服务默认配置编码 */ export const TRACK_SERVICE_CONFIG_CODE = 'track_service' diff --git a/src/components.d.ts b/src/components.d.ts index a07ad97..f8bb9d3 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,6 +12,7 @@ declare module 'vue' { AgentSideRail: typeof import('./components/agent-side-rail/index.vue')['default'] AiAdvisorShell: typeof import('./components/NanaAssistant/AiAdvisorShell.vue')['default'] ApiTest: typeof import('./components/ApiTest/index.vue')['default'] + ApprovalDetailDrawer: typeof import('./components/ApprovalDetailDrawer/index.vue')['default'] BasicLayoutLeftRight: typeof import('./components/BasicLayoutLeftRight/index.vue')['default'] Block: typeof import('./components/global-setting/block.vue')['default'] Cascader: typeof import('./components/CascaderPro/Cascader.vue')['default'] @@ -30,6 +31,7 @@ declare module 'vue' { FormWrapper: typeof import('./components/global-setting/form-wrapper.vue')['default'] GlobalSetting: typeof import('./components/global-setting/index.vue')['default'] GuideAudienceTabs: typeof import('./components/GuideAudienceTabs/index.vue')['default'] + H5ScanInput: typeof import('./components/h5/H5ScanInput.vue')['default'] HandsontablePro: typeof import('./components/HandsontablePro/index.vue')['default'] HeaderFilterPopover: typeof import('./components/HandsontablePro/HeaderFilterPopover.vue')['default'] InterfaceDetail: typeof import('./components/InterfaceDetail/index.vue')['default'] diff --git a/src/components/ApprovalDetailDrawer/index.vue b/src/components/ApprovalDetailDrawer/index.vue new file mode 100644 index 0000000..2cc45e4 --- /dev/null +++ b/src/components/ApprovalDetailDrawer/index.vue @@ -0,0 +1,1060 @@ + + + + + diff --git a/src/components/NanaAssistant/AiAdvisorShell.vue b/src/components/NanaAssistant/AiAdvisorShell.vue index 0d2fd5a..73dfda9 100644 --- a/src/components/NanaAssistant/AiAdvisorShell.vue +++ b/src/components/NanaAssistant/AiAdvisorShell.vue @@ -239,10 +239,19 @@ + + +
+
+ +
+
+
+ + + + diff --git a/src/views/h5/admin-center/customers/index.vue b/src/views/h5/admin-center/customers/index.vue new file mode 100644 index 0000000..25b1cf7 --- /dev/null +++ b/src/views/h5/admin-center/customers/index.vue @@ -0,0 +1,497 @@ + + + + + diff --git a/src/views/h5/admin-center/layout.vue b/src/views/h5/admin-center/layout.vue index 7bbe933..0c35dcd 100644 --- a/src/views/h5/admin-center/layout.vue +++ b/src/views/h5/admin-center/layout.vue @@ -13,7 +13,8 @@ > - + + @@ -28,12 +29,14 @@ import { hideWeChatBrowserNav } from '@/utils/device'; import { H5_ORDER_GROUPS, sumStatusCounts } from '@/constants/h5OrderStatus'; import LoginLangToggle from '@/views/login/components/LoginLangToggle.vue'; import AppTabBar from './components/AppTabBar.vue'; +import H5OpsHubSheet from './components/H5OpsHubSheet.vue'; defineOptions({ name: 'H5AdminCenterLayout' }); const { t, locale } = useI18n(); const route = useRoute(); const orderBadge = ref(0); +const opsHubVisible = ref(false); let idlePreloadHandle: number | null = null; let badgeTimer: ReturnType | null = null; @@ -45,6 +48,10 @@ const headerTitle = computed(() => { return t(key); }); +function syncDocumentTitle() { + document.title = t('h5Admin.documentTitle'); +} + async function refreshOrderBadge() { if (!isLogin()) { orderBadge.value = 0; @@ -68,6 +75,7 @@ function scheduleBadgeRefresh() { onMounted(() => { hideWeChatBrowserNav(); + syncDocumentTitle(); if (isLogin()) { const run = () => void ensureFullLocaleMessages(locale.value); if (typeof window !== 'undefined' && 'requestIdleCallback' in window) { @@ -83,6 +91,10 @@ onMounted(() => { } }); +watch(locale, () => { + syncDocumentTitle(); +}); + onBeforeUnmount(() => { if (badgeTimer) clearTimeout(badgeTimer); if (idlePreloadHandle != null) { diff --git a/src/views/h5/admin-center/locale/en-US.ts b/src/views/h5/admin-center/locale/en-US.ts index 5eb5f91..43d25a6 100644 --- a/src/views/h5/admin-center/locale/en-US.ts +++ b/src/views/h5/admin-center/locale/en-US.ts @@ -1,5 +1,6 @@ export default { 'h5Admin.center.title': 'Ops Center', + 'h5Admin.documentTitle': 'IDE Ops Center', 'h5Admin.tab.workplace': 'Home', 'h5Admin.tab.monitor': 'Monitor', 'h5Admin.tab.orders': 'Shipments', @@ -31,6 +32,7 @@ export default { 'h5Admin.me.emptyRole': 'No roles', 'h5Admin.me.emptyOrg': 'No organization', 'h5Admin.me.emptyEmail': 'Not set', + 'h5Admin.me.changePassword': 'Change password', 'h5Admin.recharge.title': 'Recharge review', 'h5Admin.recharge.subtitle': 'Approve customer top-ups', @@ -41,12 +43,15 @@ export default { 'h5Admin.recharge.loadMore': 'Load more', 'h5Admin.recharge.loadFailed': 'Failed to load', 'h5Admin.recharge.tab.pending': 'Pending', + 'h5Admin.recharge.tab.pendingApproval': 'Pending approval', 'h5Admin.recharge.tab.all': 'All', 'h5Admin.recharge.tab.success': 'Approved', 'h5Admin.recharge.tab.failed': 'Rejected', 'h5Admin.recharge.customer': 'Customer', 'h5Admin.recharge.serialNo': 'Serial No.', 'h5Admin.recharge.time': 'Time', + 'h5Admin.recharge.approvalNo': 'Approval No.', + 'h5Admin.recharge.approvalTip': 'In approval flow — handle it in PC Approval Inbox', 'h5Admin.recharge.remark': 'Remark', 'h5Admin.recharge.viewImage': 'Screenshot', 'h5Admin.recharge.approve': 'Approve', @@ -144,4 +149,45 @@ export default { 'h5Admin.monitor.vsYesterday': 'vs yesterday', 'h5Admin.monitor.vsLastWeek': 'vs last week', 'h5Admin.monitor.vsLastMonth': 'vs last month', + + 'h5Admin.customers.title': 'Customers', + 'h5Admin.customers.refresh': 'Refresh', + 'h5Admin.customers.search': 'Search', + 'h5Admin.customers.searchPh': 'Code / name / phone', + 'h5Admin.customers.empty': 'No customers', + 'h5Admin.customers.loadMore': 'Load more', + 'h5Admin.customers.code': 'Code', + 'h5Admin.customers.phone': 'Phone', + 'h5Admin.customers.createTime': 'Registered', + 'h5Admin.customers.lastLogin': 'Last login', + 'h5Admin.customers.onlineBadge': 'Online', + 'h5Admin.customers.hint.total': 'All active customers', + 'h5Admin.customers.hint.newToday': 'Registered today', + 'h5Admin.customers.hint.online': 'Logged in within 30 minutes', + 'h5Admin.customers.hint.inactive7d': 'No login for 7+ days', + + 'h5Admin.ops.fab': 'Ops', + 'h5Admin.ops.hubTitle': 'Warehouse ops', + 'h5Admin.ops.hubHint': 'Arrival, inbound, outbound, and pick', + 'h5Admin.ops.noPermission': 'No ops permission', + 'h5Admin.ops.parcelArrival': 'Parcel arrival', + 'h5Admin.ops.parcelArrivalDesc': 'Scan domestic tracking to arrive', + 'h5Admin.ops.inbound': 'Inbound scan', + 'h5Admin.ops.inboundDesc': 'Scan waybill and enter dimensions', + 'h5Admin.ops.outbound': 'Outbound scan', + 'h5Admin.ops.outboundDesc': 'Scan waybill and verify weight', + 'h5Admin.ops.fulfillPack': 'Fulfill pick', + 'h5Admin.ops.fulfillPackDesc': 'Locate order and confirm pack', + 'h5Admin.ops.scanGunHint': 'Scan into the field with a gun, or tap the scan icon for camera', + 'h5Admin.ops.cameraSheetTitle': 'Camera scan', + 'h5Admin.ops.cameraSheetHint': 'Aim at the barcode; it fills and closes on success', + 'h5Admin.ops.cameraClose': 'Close', + 'h5Admin.ops.torchOn': 'Torch on', + 'h5Admin.ops.torchOff': 'Torch off', + 'h5Admin.ops.recentRecords': 'Recent', + 'h5Admin.ops.emptyRecent': 'No records', + 'h5Admin.ops.lookup': 'Lookup', + 'h5Admin.ops.refresh': 'Refresh', + 'h5Admin.ops.fulfillQueue': 'Pick queue', + 'h5Admin.ops.switchWarehouse': 'Switch warehouse', }; diff --git a/src/views/h5/admin-center/locale/zh-CN.ts b/src/views/h5/admin-center/locale/zh-CN.ts index 77d105c..99f9952 100644 --- a/src/views/h5/admin-center/locale/zh-CN.ts +++ b/src/views/h5/admin-center/locale/zh-CN.ts @@ -1,5 +1,6 @@ export default { 'h5Admin.center.title': '运营中心', + 'h5Admin.documentTitle': 'IDE运营中心', 'h5Admin.tab.workplace': '工作台', 'h5Admin.tab.monitor': '监控', 'h5Admin.tab.orders': '运单', @@ -31,6 +32,7 @@ export default { 'h5Admin.me.emptyRole': '暂无角色', 'h5Admin.me.emptyOrg': '未分配组织', 'h5Admin.me.emptyEmail': '未填写', + 'h5Admin.me.changePassword': '修改密码', 'h5Admin.recharge.title': '充值审核', 'h5Admin.recharge.subtitle': '审核客户充值申请', @@ -41,12 +43,15 @@ export default { 'h5Admin.recharge.loadMore': '加载更多', 'h5Admin.recharge.loadFailed': '加载失败', 'h5Admin.recharge.tab.pending': '待审核', + 'h5Admin.recharge.tab.pendingApproval': '待审批', 'h5Admin.recharge.tab.all': '全部', 'h5Admin.recharge.tab.success': '已通过', 'h5Admin.recharge.tab.failed': '已驳回', 'h5Admin.recharge.customer': '客户', 'h5Admin.recharge.serialNo': '流水号', 'h5Admin.recharge.time': '时间', + 'h5Admin.recharge.approvalNo': '审批号', + 'h5Admin.recharge.approvalTip': '已进入审批流,请到 PC「审批待办」处理', 'h5Admin.recharge.remark': '备注', 'h5Admin.recharge.viewImage': '查看截图', 'h5Admin.recharge.approve': '通过', @@ -144,4 +149,45 @@ export default { 'h5Admin.monitor.vsYesterday': '较昨日', 'h5Admin.monitor.vsLastWeek': '较上周', 'h5Admin.monitor.vsLastMonth': '较上月', + + 'h5Admin.customers.title': '客户列表', + 'h5Admin.customers.refresh': '刷新', + 'h5Admin.customers.search': '搜索', + 'h5Admin.customers.searchPh': '编号 / 名称 / 手机', + 'h5Admin.customers.empty': '暂无客户', + 'h5Admin.customers.loadMore': '加载更多', + 'h5Admin.customers.code': '编号', + 'h5Admin.customers.phone': '手机', + 'h5Admin.customers.createTime': '注册', + 'h5Admin.customers.lastLogin': '最近登录', + 'h5Admin.customers.onlineBadge': '在线', + 'h5Admin.customers.hint.total': '全部正常客户', + 'h5Admin.customers.hint.newToday': '今日新注册客户', + 'h5Admin.customers.hint.online': '近 30 分钟有登录', + 'h5Admin.customers.hint.inactive7d': '超过 7 天未登录', + + 'h5Admin.ops.fab': '操作', + 'h5Admin.ops.hubTitle': '仓操入口', + 'h5Admin.ops.hubHint': '扫码到仓、入库、出库与代发拣货', + 'h5Admin.ops.noPermission': '暂无操作权限', + 'h5Admin.ops.parcelArrival': '快递到仓', + 'h5Admin.ops.parcelArrivalDesc': '扫国内快递单确认到仓', + 'h5Admin.ops.inbound': '入库扫描', + 'h5Admin.ops.inboundDesc': '扫运单入库并录入材积', + 'h5Admin.ops.outbound': '出库扫描', + 'h5Admin.ops.outboundDesc': '扫运单出库并核对重量', + 'h5Admin.ops.fulfillPack': '代发拣货', + 'h5Admin.ops.fulfillPackDesc': '扫码定位并确认打包', + 'h5Admin.ops.scanGunHint': '扫码枪对准输入框即可;无枪时点右侧扫码图标开摄像头', + 'h5Admin.ops.cameraSheetTitle': '摄像头扫码', + 'h5Admin.ops.cameraSheetHint': '对准条码,识别成功后自动填入并关闭', + 'h5Admin.ops.cameraClose': '关闭', + 'h5Admin.ops.torchOn': '开灯', + 'h5Admin.ops.torchOff': '关灯', + 'h5Admin.ops.recentRecords': '最近记录', + 'h5Admin.ops.emptyRecent': '暂无记录', + 'h5Admin.ops.lookup': '查询', + 'h5Admin.ops.refresh': '刷新', + 'h5Admin.ops.fulfillQueue': '待拣货队列', + 'h5Admin.ops.switchWarehouse': '切换仓库', }; diff --git a/src/views/h5/admin-center/login/index.vue b/src/views/h5/admin-center/login/index.vue index c0fa9c6..3647cef 100644 --- a/src/views/h5/admin-center/login/index.vue +++ b/src/views/h5/admin-center/login/index.vue @@ -68,7 +68,7 @@ import { OmsLoginType } from '@/api/rbac'; import { isLogin, setToken } from '@/utils/auth'; import { applyRbacUserToUserStore } from '@/utils/enter-system'; import { ensureFullLocaleMessages } from '@/locale'; -import { useRbacUserStore } from '@/store/modules/rbac-user'; +import { loginErrorForUser, useRbacUserStore } from '@/store/modules/rbac-user'; import { ADMIN_H5_HOME_PATH, isAdminH5Path } from '@/utils/login-portal'; import logoImg from '@/assets/logo2.png'; import LoginLangToggle from '@/views/login/components/LoginLangToggle.vue'; @@ -144,13 +144,14 @@ async function handleSubmit() { Message.success(t('h5Admin.login.success')); await finishLogin(); } catch (e: any) { - errorBox.value = e?.message || t('h5Admin.login.failed'); + errorBox.value = loginErrorForUser(e?.message || '') || t('h5Admin.login.failed'); } finally { loading.value = false; } } onMounted(() => { + document.title = t('h5Admin.documentTitle'); if (isLogin() && rbacUserStore.loginPortalType === OmsLoginType.User) { router.replace(resolveRedirectPath()); } diff --git a/src/views/h5/admin-center/me/index.vue b/src/views/h5/admin-center/me/index.vue index 342fecc..b30a878 100644 --- a/src/views/h5/admin-center/me/index.vue +++ b/src/views/h5/admin-center/me/index.vue @@ -25,16 +25,22 @@ {{ t('h5Admin.me.email') }} {{ email }} + + + + + + + diff --git a/src/views/h5/admin-center/ops/fulfill-pack.vue b/src/views/h5/admin-center/ops/fulfill-pack.vue new file mode 100644 index 0000000..eca4d82 --- /dev/null +++ b/src/views/h5/admin-center/ops/fulfill-pack.vue @@ -0,0 +1,309 @@ + + + + + diff --git a/src/views/h5/admin-center/ops/inbound.vue b/src/views/h5/admin-center/ops/inbound.vue new file mode 100644 index 0000000..9b699c2 --- /dev/null +++ b/src/views/h5/admin-center/ops/inbound.vue @@ -0,0 +1,285 @@ + + + + + diff --git a/src/views/h5/admin-center/ops/ops-shared.less b/src/views/h5/admin-center/ops/ops-shared.less new file mode 100644 index 0000000..e7aa9ef --- /dev/null +++ b/src/views/h5/admin-center/ops/ops-shared.less @@ -0,0 +1,181 @@ +.h5-ops { + padding: 10px 16px 28px; + box-sizing: border-box; +} + +.h5-ops__scan-row { + display: flex; + align-items: center; + gap: 8px; + margin-bottom: 10px; + + > :first-child { + flex: 1; + min-width: 0; + } +} + +.h5-ops__primary { + flex: 0 0 auto; + height: 44px; + padding: 0 14px; + border: none; + border-radius: 12px; + background: var(--app-primary-color, #1d7281); + color: #fff; + font-size: 13px; + white-space: nowrap; + cursor: pointer; + + &:disabled { + opacity: 0.55; + } +} + +.h5-ops__feedback { + margin: 0 0 12px; + padding: 10px 12px; + border-radius: 10px; + font-size: 13px; + line-height: 1.4; + + &.is-success { + background: rgba(0, 180, 42, 0.1); + color: #00b42a; + } + + &.is-error { + background: rgba(245, 63, 63, 0.1); + color: #f53f3f; + } + + &.is-warning { + background: rgba(255, 125, 0, 0.12); + color: #ff7d00; + } +} + +.h5-ops__panel { + margin-bottom: 14px; + padding: 14px; + border-radius: 14px; + background: #fff; + box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); +} + +.h5-ops__waybill { + margin: 0 0 6px; + font-size: 16px; + font-weight: 700; + color: var(--h5-text, #1d2129); + word-break: break-all; +} + +.h5-ops__meta { + margin: 0 0 12px; + font-size: 12px; + color: var(--h5-text-3, #86909c); + line-height: 1.5; +} + +.h5-ops__metrics { + display: grid; + gap: 10px; +} + +.h5-ops__field { + display: grid; + gap: 6px; + + label { + font-size: 12px; + color: var(--h5-text-2, #4e5969); + } + + input { + height: 36px; + padding: 0 10px; + border: none; + border-radius: 10px; + background: var(--h5-well-bg, #f0f3f4); + font-size: 14px; + outline: none; + } +} + +.h5-ops__dims { + display: grid; + grid-template-columns: 1fr auto 1fr auto 1fr; + gap: 6px; + align-items: center; + + span { + color: var(--h5-text-3, #86909c); + } +} + +.h5-ops__recent { + h2 { + margin: 0 0 10px; + font-size: 15px; + color: var(--h5-text, #1d2129); + } +} + +.h5-ops__empty { + margin: 0; + padding: 18px 0; + text-align: center; + font-size: 13px; + color: var(--h5-text-3, #86909c); +} + +.h5-ops__card { + display: grid; + gap: 4px; + margin-bottom: 8px; + padding: 12px; + border-radius: 12px; + background: #fff; + box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); + + strong { + font-size: 14px; + color: var(--h5-text, #1d2129); + word-break: break-all; + } + + span, + em { + font-size: 12px; + color: var(--h5-text-3, #86909c); + font-style: normal; + } + + &.is-active { + outline: 2px solid color-mix(in srgb, var(--app-primary-color) 45%, transparent); + } +} + +.h5-ops__queue-head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; + margin-bottom: 10px; + + h2 { + margin: 0; + } + + button { + height: 28px; + padding: 0 10px; + border: none; + border-radius: 8px; + background: var(--h5-well-bg, #f0f3f4); + color: var(--h5-text-2, #4e5969); + font-size: 12px; + cursor: pointer; + } +} diff --git a/src/views/h5/admin-center/ops/outbound.vue b/src/views/h5/admin-center/ops/outbound.vue new file mode 100644 index 0000000..667b8ea --- /dev/null +++ b/src/views/h5/admin-center/ops/outbound.vue @@ -0,0 +1,275 @@ + + + + + diff --git a/src/views/h5/admin-center/ops/parcel-arrival.vue b/src/views/h5/admin-center/ops/parcel-arrival.vue new file mode 100644 index 0000000..3d3998e --- /dev/null +++ b/src/views/h5/admin-center/ops/parcel-arrival.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/views/h5/admin-center/recharge/index.vue b/src/views/h5/admin-center/recharge/index.vue index 5768546..6919091 100644 --- a/src/views/h5/admin-center/recharge/index.vue +++ b/src/views/h5/admin-center/recharge/index.vue @@ -67,8 +67,8 @@
¥{{ formatAmount(row.payAmount) }} - - {{ statusLabel(row.payStatus) }} + + {{ statusLabel(row.payStatus, row.approvalPending) }}
@@ -90,6 +90,10 @@ {{ t('h5Admin.recharge.time') }} {{ formatTime(row.payTime) }}

+

+ {{ t('h5Admin.recharge.approvalNo') }} + {{ row.approvalInstanceNo }} +

{{ t('h5Admin.recharge.remark') }} {{ row.remarks }} @@ -105,7 +109,10 @@ > {{ t('h5Admin.recharge.viewImage') }} -