Commit 9135c6076010fee6749f5155a2a3c0c9e5ed10aa

Authored by qiang.tian
1 parent 35fda44a

refactor: remove submodule

1 -[submodule "libs"]  
2 - path = libs  
3 - url = http://gitlab.qgutech.com/framework/qx-apaas-fe.git  
4 - branch = feature/libs  
1 import { defineConfig } from 'umi'; 1 import { defineConfig } from 'umi';
2 2
3 export default defineConfig({ 3 export default defineConfig({
  4 + runtimePublicPath: true,
4 devServer: { 5 devServer: {
5 port: 5200, 6 port: 5200,
6 - },  
7 - define: {  
8 - 'process.env.site': 'http://qx-test.qgutech.com',  
9 - // 'process.env.apiUrl': 'http://192.168.181.107/qgyun-api',  
10 - // 'process.env.apiUrl': 'http://192.168.1.180/qx-api',  
11 - 'process.env.apiUrl': 'http://test.qixiaocloud.com/qx-api',  
12 - // 'process.env.apiUrl': 'https://uat.qgutech.com/qx-api',  
13 - 'process.env.wf.appCode': 'wf',  
14 - 'process.env.wf.funCode': 'ew57e',  
15 - 'process.env.openUrl': '/open',  
16 - }, 7 + }
17 }); 8 });
1 import { defineConfig } from 'umi'; 1 import { defineConfig } from 'umi';
2 -import path from 'path';  
3 import pkg from './package.json'; 2 import pkg from './package.json';
4 import routes from './src/routes'; 3 import routes from './src/routes';
5 4
6 export default defineConfig({ 5 export default defineConfig({
  6 + esbuild: {},
7 mountElementId: pkg.name, 7 mountElementId: pkg.name,
8 webpack5: { 8 webpack5: {
9 lazyCompilation: {}, 9 lazyCompilation: {},
10 }, 10 },
  11 + runtimePublicPath: false,
11 nodeModulesTransform: { 12 nodeModulesTransform: {
12 type: 'none', 13 type: 'none',
13 }, 14 },
14 - routes,  
15 - alias: {  
16 - '@/src': 'src', 15 + history: {
  16 + type: 'hash'
  17 + },
  18 + hash: true,
  19 + title: false,
  20 + lessLoader: {
  21 + globalVars: {
  22 + theme: 'true;@import "~@/variable.less"',
  23 + }
  24 + },
  25 + antd: {
  26 + config: {
  27 + }
  28 + },
  29 + theme: {
  30 + 'root-entry-name': 'variable'
17 }, 31 },
  32 + routes,
18 fastRefresh: {}, 33 fastRefresh: {},
19 qiankun: { 34 qiankun: {
20 slave: {}, 35 slave: {},
21 }, 36 },
22 - chainWebpack(memo, { env, webpack, createCSSRule }) {  
23 - // 设置 alias  
24 - memo.resolve.alias.set('@', path.resolve(__dirname, './libs/src'));  
25 - memo.resolve.alias.set('@@', path.resolve(__dirname, './src/.umi'));  
26 - memo.resolve.alias.set('@/src', path.resolve(__dirname, './src'));  
27 - },  
28 - define: {  
29 - 'process.env.site': '',  
30 - 'process.env.apiUrl': '/qx-api',  
31 - 'process.env.wf.appCode': 'wf',  
32 - 'process.env.wf.funCode': 'ew57e',  
33 - 'process.env.openUrl': '/open',  
34 - },  
35 }); 37 });
libs @ bd36990a
1 -Subproject commit bd36990a5c6bfae9b9f0f72c03a4b657be1ad3dd  
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 "scripts": { 4 "scripts": {
5 "start": "umi dev", 5 "start": "umi dev",
6 "build": "umi build", 6 "build": "umi build",
7 - "postinstall": "umi generate tmp", 7 + "postinstall": "umi generate tmp && git submodule update --remote",
8 "prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'", 8 "prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
9 "test": "umi-test", 9 "test": "umi-test",
10 "test:coverage": "umi-test --coverage", 10 "test:coverage": "umi-test --coverage",
@@ -73,6 +73,7 @@ @@ -73,6 +73,7 @@
73 "@umijs/plugin-qiankun": "^2.41.0", 73 "@umijs/plugin-qiankun": "^2.41.0",
74 "@umijs/preset-react": "1.x", 74 "@umijs/preset-react": "1.x",
75 "@umijs/test": "^3.5.35", 75 "@umijs/test": "^3.5.35",
  76 + "@umijs/plugin-esbuild": "^1.4.2",
76 "eslint": "^7.1.0", 77 "eslint": "^7.1.0",
77 "eslint-plugin-react": "^7.31.10", 78 "eslint-plugin-react": "^7.31.10",
78 "husky": "^8.0.2", 79 "husky": "^8.0.2",
@@ -21,6 +21,7 @@ specifiers: @@ -21,6 +21,7 @@ specifiers:
21 '@types/react-grid-layout': ^1.3.2 21 '@types/react-grid-layout': ^1.3.2
22 '@typescript-eslint/eslint-plugin': ^5.43.0 22 '@typescript-eslint/eslint-plugin': ^5.43.0
23 '@typescript-eslint/parser': ^5.43.0 23 '@typescript-eslint/parser': ^5.43.0
  24 + '@umijs/plugin-esbuild': ^1.4.2
24 '@umijs/plugin-qiankun': ^2.41.0 25 '@umijs/plugin-qiankun': ^2.41.0
25 '@umijs/preset-react': 1.x 26 '@umijs/preset-react': 1.x
26 '@umijs/test': ^3.5.35 27 '@umijs/test': ^3.5.35
@@ -102,6 +103,7 @@ devDependencies: @@ -102,6 +103,7 @@ devDependencies:
102 '@types/react-grid-layout': registry.npmmirror.com/@types/react-grid-layout/1.3.2 103 '@types/react-grid-layout': registry.npmmirror.com/@types/react-grid-layout/1.3.2
103 '@typescript-eslint/eslint-plugin': registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.43.0_nyvtogynqlwtf2idoqyimls6fu 104 '@typescript-eslint/eslint-plugin': registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.43.0_nyvtogynqlwtf2idoqyimls6fu
104 '@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.43.0_77fvizpdb3y4icyeo2mf4eo7em 105 '@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.43.0_77fvizpdb3y4icyeo2mf4eo7em
  106 + '@umijs/plugin-esbuild': registry.npmmirror.com/@umijs/plugin-esbuild/1.4.2_umi@3.5.35
105 '@umijs/plugin-qiankun': registry.npmmirror.com/@umijs/plugin-qiankun/2.41.0_r3ll3t3tykgnhww2qhhvabl2oq 107 '@umijs/plugin-qiankun': registry.npmmirror.com/@umijs/plugin-qiankun/2.41.0_r3ll3t3tykgnhww2qhhvabl2oq
106 '@umijs/preset-react': registry.npmmirror.com/@umijs/preset-react/1.8.31_rd3h76hc3esx7zhjhdppb2dxt4 108 '@umijs/preset-react': registry.npmmirror.com/@umijs/preset-react/1.8.31_rd3h76hc3esx7zhjhdppb2dxt4
107 '@umijs/test': registry.npmmirror.com/@umijs/test/3.5.35 109 '@umijs/test': registry.npmmirror.com/@umijs/test/3.5.35
@@ -2070,6 +2072,20 @@ packages: @@ -2070,6 +2072,20 @@ packages:
2070 - redbox-react 2072 - redbox-react
2071 dev: true 2073 dev: true
2072 2074
  2075 + registry.npmmirror.com/@umijs/plugin-esbuild/1.4.2_umi@3.5.35:
  2076 + resolution: {integrity: sha512-K/0nZ1wNFg11xF3zx5E8jQQkY4d6SDNNhB16Ngp77i5ZUexWyfiRC+StN0KpYOAIorajNTMxHRnthRFV3dZbPA==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/@umijs/plugin-esbuild/-/plugin-esbuild-1.4.2.tgz}
  2077 + id: registry.npmmirror.com/@umijs/plugin-esbuild/1.4.2
  2078 + name: '@umijs/plugin-esbuild'
  2079 + version: 1.4.2
  2080 + peerDependencies:
  2081 + umi: 3.x
  2082 + dependencies:
  2083 + esbuild-loader: registry.npmmirror.com/esbuild-loader/2.9.2
  2084 + umi: registry.npmmirror.com/umi/3.5.35
  2085 + transitivePeerDependencies:
  2086 + - webpack
  2087 + dev: true
  2088 +
2073 registry.npmmirror.com/@umijs/plugin-helmet/1.1.3_react@16.14.0+umi@3.5.35: 2089 registry.npmmirror.com/@umijs/plugin-helmet/1.1.3_react@16.14.0+umi@3.5.35:
2074 resolution: {integrity: sha512-X4GRFlvOb8DxMDm1vExfpWOvxl6bp0oZz114DyhwnMSriJ8RcHAigTjtVJHYxJpKv7P6KayN3n13J4w/XZGWMg==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/@umijs/plugin-helmet/-/plugin-helmet-1.1.3.tgz} 2090 resolution: {integrity: sha512-X4GRFlvOb8DxMDm1vExfpWOvxl6bp0oZz114DyhwnMSriJ8RcHAigTjtVJHYxJpKv7P6KayN3n13J4w/XZGWMg==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/@umijs/plugin-helmet/-/plugin-helmet-1.1.3.tgz}
2075 id: registry.npmmirror.com/@umijs/plugin-helmet/1.1.3 2091 id: registry.npmmirror.com/@umijs/plugin-helmet/1.1.3
@@ -4354,6 +4370,21 @@ packages: @@ -4354,6 +4370,21 @@ packages:
4354 name: es5-imcompatible-versions 4370 name: es5-imcompatible-versions
4355 version: 0.1.77 4371 version: 0.1.77
4356 4372
  4373 + registry.npmmirror.com/esbuild-loader/2.9.2:
  4374 + resolution: {integrity: sha512-HpF+r/ES2aC40VDOIFsP8OIOM2y2vj8LyLwJ4G8DCMOi8Kov68TwCtxiMMTuSuxR/xKDu/ykgVyCEgps6BXpYw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/esbuild-loader/-/esbuild-loader-2.9.2.tgz}
  4375 + name: esbuild-loader
  4376 + version: 2.9.2
  4377 + peerDependencies:
  4378 + webpack: ^4.40.0 || ^5.0.0
  4379 + dependencies:
  4380 + esbuild: registry.npmmirror.com/esbuild/0.8.57
  4381 + joycon: registry.npmmirror.com/joycon/2.2.5
  4382 + json5: registry.npmmirror.com/json5/2.2.1
  4383 + loader-utils: registry.npmmirror.com/loader-utils/2.0.4
  4384 + type-fest: registry.npmmirror.com/type-fest/0.20.2
  4385 + webpack-sources: registry.npmmirror.com/webpack-sources/2.3.1
  4386 + dev: true
  4387 +
4357 registry.npmmirror.com/esbuild/0.12.15: 4388 registry.npmmirror.com/esbuild/0.12.15:
4358 resolution: {integrity: sha512-72V4JNd2+48eOVCXx49xoSWHgC3/cCy96e7mbXKY+WOWghN00cCmlGnwVLRhRHorvv0dgCyuMYBZlM2xDM5OQw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/esbuild/-/esbuild-0.12.15.tgz} 4389 resolution: {integrity: sha512-72V4JNd2+48eOVCXx49xoSWHgC3/cCy96e7mbXKY+WOWghN00cCmlGnwVLRhRHorvv0dgCyuMYBZlM2xDM5OQw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/esbuild/-/esbuild-0.12.15.tgz}
4359 name: esbuild 4390 name: esbuild
@@ -4361,6 +4392,14 @@ packages: @@ -4361,6 +4392,14 @@ packages:
4361 hasBin: true 4392 hasBin: true
4362 requiresBuild: true 4393 requiresBuild: true
4363 4394
  4395 + registry.npmmirror.com/esbuild/0.8.57:
  4396 + resolution: {integrity: sha512-j02SFrUwFTRUqiY0Kjplwjm1psuzO1d6AjaXKuOR9hrY0HuPsT6sV42B6myW34h1q4CRy+Y3g4RU/cGJeI/nNA==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/esbuild/-/esbuild-0.8.57.tgz}
  4397 + name: esbuild
  4398 + version: 0.8.57
  4399 + hasBin: true
  4400 + requiresBuild: true
  4401 + dev: true
  4402 +
4364 registry.npmmirror.com/escalade/3.1.1: 4403 registry.npmmirror.com/escalade/3.1.1:
4365 resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/escalade/-/escalade-3.1.1.tgz} 4404 resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/escalade/-/escalade-3.1.1.tgz}
4366 name: escalade 4405 name: escalade
@@ -6544,6 +6583,13 @@ packages: @@ -6544,6 +6583,13 @@ packages:
6544 - utf-8-validate 6583 - utf-8-validate
6545 dev: true 6584 dev: true
6546 6585
  6586 + registry.npmmirror.com/joycon/2.2.5:
  6587 + resolution: {integrity: sha512-YqvUxoOcVPnCp0VU1/56f+iKSdvIRJYPznH22BdXV3xMk75SFXhWeJkZ8C9XxUWt1b5x2X1SxuFygW1U0FmkEQ==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/joycon/-/joycon-2.2.5.tgz}
  6588 + name: joycon
  6589 + version: 2.2.5
  6590 + engines: {node: '>=6'}
  6591 + dev: true
  6592 +
6547 registry.npmmirror.com/jquery-mousewheel/3.1.13: 6593 registry.npmmirror.com/jquery-mousewheel/3.1.13:
6548 resolution: {integrity: sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz} 6594 resolution: {integrity: sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz}
6549 name: jquery-mousewheel 6595 name: jquery-mousewheel
@@ -6825,6 +6871,17 @@ packages: @@ -6825,6 +6871,17 @@ packages:
6825 emojis-list: registry.npmmirror.com/emojis-list/3.0.0 6871 emojis-list: registry.npmmirror.com/emojis-list/3.0.0
6826 json5: registry.npmmirror.com/json5/1.0.1 6872 json5: registry.npmmirror.com/json5/1.0.1
6827 6873
  6874 + registry.npmmirror.com/loader-utils/2.0.4:
  6875 + resolution: {integrity: sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz}
  6876 + name: loader-utils
  6877 + version: 2.0.4
  6878 + engines: {node: '>=8.9.0'}
  6879 + dependencies:
  6880 + big.js: registry.npmmirror.com/big.js/5.2.2
  6881 + emojis-list: registry.npmmirror.com/emojis-list/3.0.0
  6882 + json5: registry.npmmirror.com/json5/2.2.1
  6883 + dev: true
  6884 +
6828 registry.npmmirror.com/locate-path/5.0.0: 6885 registry.npmmirror.com/locate-path/5.0.0:
6829 resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz} 6886 resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz}
6830 name: locate-path 6887 name: locate-path
@@ -10308,6 +10365,12 @@ packages: @@ -10308,6 +10365,12 @@ packages:
10308 dependencies: 10365 dependencies:
10309 is-plain-obj: registry.npmmirror.com/is-plain-obj/1.1.0 10366 is-plain-obj: registry.npmmirror.com/is-plain-obj/1.1.0
10310 10367
  10368 + registry.npmmirror.com/source-list-map/2.0.1:
  10369 + resolution: {integrity: sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/source-list-map/-/source-list-map-2.0.1.tgz}
  10370 + name: source-list-map
  10371 + version: 2.0.1
  10372 + dev: true
  10373 +
10311 registry.npmmirror.com/source-map-resolve/0.5.3: 10374 registry.npmmirror.com/source-map-resolve/0.5.3:
10312 resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz} 10375 resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz}
10313 name: source-map-resolve 10376 name: source-map-resolve
@@ -11271,6 +11334,16 @@ packages: @@ -11271,6 +11334,16 @@ packages:
11271 deepmerge: registry.npmmirror.com/deepmerge/1.5.2 11334 deepmerge: registry.npmmirror.com/deepmerge/1.5.2
11272 javascript-stringify: registry.npmmirror.com/javascript-stringify/2.1.0 11335 javascript-stringify: registry.npmmirror.com/javascript-stringify/2.1.0
11273 11336
  11337 + registry.npmmirror.com/webpack-sources/2.3.1:
  11338 + resolution: {integrity: sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/webpack-sources/-/webpack-sources-2.3.1.tgz}
  11339 + name: webpack-sources
  11340 + version: 2.3.1
  11341 + engines: {node: '>=10.13.0'}
  11342 + dependencies:
  11343 + source-list-map: registry.npmmirror.com/source-list-map/2.0.1
  11344 + source-map: registry.npmmirror.com/source-map/0.6.1
  11345 + dev: true
  11346 +
11274 registry.npmmirror.com/whatwg-encoding/1.0.5: 11347 registry.npmmirror.com/whatwg-encoding/1.0.5:
11275 resolution: {integrity: sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz} 11348 resolution: {integrity: sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==, registry: http://registry.npm.qgutech.com/, tarball: https://registry.npmmirror.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz}
11276 name: whatwg-encoding 11349 name: whatwg-encoding
@@ -2,7 +2,6 @@ import Exception from './exception/view'; @@ -2,7 +2,6 @@ import Exception from './exception/view';
2 import Exception404 from './exception/404'; 2 import Exception404 from './exception/404';
3 import Exception403 from './exception/403'; 3 import Exception403 from './exception/403';
4 import Exception500 from './exception/500'; 4 import Exception500 from './exception/500';
5 -import HeaderDropDown from './header-dropdown';  
6 5
7 -export { Exception, Exception404, Exception403, Exception500, HeaderDropDown }; 6 +export { Exception, Exception404, Exception403, Exception500 };
8 export * from './view-render'; 7 export * from './view-render';
1 -// import { QIXIAO_TOKEN } from '@/libs/token';  
2 -import { SYSTEM_WIDGETS } from '@/packages/qx-form-generator/src/utils/common';  
3 -import QxIcon from '@/packages/qx-icon';  
4 -import { RelMoreModal, RelSingleModal } from '@/pages/app-view/form';  
5 -import { EllipsisOutlined, SearchOutlined } from '@ant-design/icons';  
6 import { QxSearch, QxTable } from '@qx/view-render'; 1 import { QxSearch, QxTable } from '@qx/view-render';
7 -import type { QxTableCellAPISchema } from '@qx/view-render/dist/table';  
8 -import {  
9 - Button,  
10 - Dropdown,  
11 - Empty,  
12 - Input,  
13 - Menu,  
14 - message,  
15 - Popover,  
16 - Tooltip,  
17 - Tree,  
18 -} from 'antd';  
19 import _ from 'lodash'; 2 import _ from 'lodash';
20 -import { customAlphabet } from 'nanoid';  
21 -import React, { useCallback, useEffect, useRef, useState } from 'react';  
22 -import { QxButton } from '@qx/view-render';  
23 -import './index.less';  
24 -  
25 export * from '@qx/view-render'; 3 export * from '@qx/view-render';
26 -  
27 -/*TODO 待细化*/  
28 -interface QxRuntimeTableProps {  
29 - appCode?: string;  
30 - funCode?: string;  
31 - viewCode?: string;  
32 - tableRef?: any;  
33 - tableLoading?: boolean;  
34 - dataSource: any[];  
35 - onClickBtn?: (code: any, data: any) => void;  
36 - total?: number;  
37 - searchApi?: any;  
38 - onSelect?: () => void;  
39 - onSelectAll?: () => void;  
40 - selectKeys?: string[];  
41 - mode?: any;  
42 - max?: number;  
43 - sort?: any[];  
44 - onChange?: (pagination: any, filters: any, sorter: any) => void;  
45 - [propName: string]: any;  
46 - bodyHeight?: number;  
47 -}  
48 -  
49 -const QxRuntimeTable: React.FC<QxRuntimeTableProps> = (props) => {  
50 - const {  
51 - appCode,  
52 - funCode,  
53 - viewCode,  
54 - tableRef,  
55 - tableLoading,  
56 - dataSource,  
57 - onChange = () => {},  
58 - onClickBtn = () => {},  
59 - total,  
60 - searchApi,  
61 - ...otherProps  
62 - } = props;  
63 -  
64 - const [rowData, setRowData] = useState<any>();  
65 - const [cellSchema, setCellSchema] = useState<any>();  
66 - const [clickInfo, setClickInfo] = useState<any>();  
67 - const [random, setRandom] = useState<string>(); //随机数  
68 -  
69 - const relMoreModalRef = useRef({  
70 - open: (values: any) => {  
71 - console.log(values);  
72 - },  
73 - close: () => {},  
74 - });  
75 -  
76 - const relSingleModalRef = useRef({  
77 - open: (values: any) => {  
78 - console.log(values);  
79 - },  
80 - close: () => {},  
81 - });  
82 -  
83 - function getId() {  
84 - return customAlphabet('abcdefghijklmnopqistuvwxyz', 6)();  
85 - }  
86 -  
87 - const handleCellClick = (  
88 - record: any,  
89 - schemaData: QxTableCellAPISchema,  
90 - info?: any,  
91 - ) => {  
92 - // console.log(record,schemaData,info)  
93 - setRowData(record); //点击行的数据  
94 - setCellSchema(schemaData); //列的schema  
95 - setClickInfo(info || ''); // 点击标签的data_title id  
96 - setRandom(getId());  
97 - };  
98 -  
99 - useEffect(() => {  
100 - if (cellSchema?.link) {  
101 - //详情链接 标题、描述  
102 - onClickBtn({ code: 'VIEW' }, rowData);  
103 - } else {  
104 - //1、关联记录以标签显示的时候,直接弹出该条数据详情  
105 - //2、关联记录以表格显示的时候,弹出关联记录表格  
106 - if (cellSchema?.widget === 'relSelector') {  
107 - if (  
108 - cellSchema?.mode === 'TABLE' &&  
109 - (rowData[cellSchema?.dataIndex] || []).length  
110 - ) {  
111 - //关联记录 表格形式  
112 - relMoreModalRef.current.open({  
113 - appCode: appCode,  
114 - funCode: funCode,  
115 - viewCode: viewCode,  
116 - fieldName: cellSchema?.dataIndex,  
117 - dataId: rowData?.id, //当前行的id  
118 - idArr: rowData[cellSchema?.dataIndex], //当前行 用户所点击列的关联记录id数组  
119 - modalTitle: cellSchema?.title,  
120 - widget: cellSchema?.widget, //关联表的标识  
121 - });  
122 - } else {  
123 - //关联记录 标签形式  
124 - // const info = dataSource.filter((o: any) => o.id === rowData?.id)[0][  
125 - // cellSchema?.dataIndex + '_info_'  
126 - // ];  
127 - relSingleModalRef.current.open({  
128 - // 后端数据结构调整 这里去掉了relAppCode和relFuncode 改为在获取详情schema时返回  
129 - // appCode: cellSchema.relAppCode,  
130 - // funCode: cellSchema.relFunCode,  
131 - params: { appCode, funCode, fieldName: cellSchema?.dataIndex },  
132 - fieldName: cellSchema?.dataIndex,  
133 - dataId: rowData?.id, //当前行的id  
134 - relFormId: clickInfo?.id, //表的id  
135 - modalTitle: clickInfo?.data_title, //表名  
136 - });  
137 - }  
138 - } else if (  
139 - cellSchema?.widget === 'subform' &&  
140 - cellSchema?.type === 'TABLE'  
141 - ) {  
142 - //子表  
143 - relMoreModalRef.current.open({  
144 - appCode: appCode,  
145 - funCode: funCode,  
146 - viewCode: viewCode,  
147 - fieldName: cellSchema?.dataIndex,  
148 - dataId: rowData?.id, //当前行的id  
149 - modalTitle: cellSchema?.title,  
150 - widget: cellSchema?.widget, //子表的标识  
151 - });  
152 - }  
153 - }  
154 - }, [rowData, cellSchema, random]);  
155 -  
156 - return (  
157 - <>  
158 - <QxTable  
159 - cRef={tableRef}  
160 - {...otherProps}  
161 - loading={tableLoading}  
162 - dataSource={dataSource}  
163 - onClickBtn={onClickBtn}  
164 - onCellClick={handleCellClick}  
165 - onChange={onChange}  
166 - onSelect={props.onSelect}  
167 - onSelectAll={props.onSelectAll}  
168 - selectKeys={props.selectKeys}  
169 - total={total}  
170 - mode={props.mode}  
171 - max={props.max}  
172 - sort={props?.sort}  
173 - onPage={props?.onPage}  
174 - // QIXIAO_TOKEN={QIXIAO_TOKEN}  
175 - />  
176 - <RelMoreModal cRef={relMoreModalRef} />  
177 - <RelSingleModal cRef={relSingleModalRef} />  
178 - </>  
179 - );  
180 -};  
181 -  
182 -interface QxRuntimeTreeProps {  
183 - appCode?: string;  
184 - funCode?: string;  
185 - viewCode?: string;  
186 - tableLoading?: boolean;  
187 - dataSource: any;  
188 - onClickBtn: (code: object, data: any) => {};  
189 - searchApi: any;  
190 - onSelect?: () => {};  
191 - onChange?: (pagination: any, filters: any, sorter: any) => void;  
192 - [propName: string]: any;  
193 - treeSchema: any;  
194 - onTreeDrop: (nodeId: string, parent: string, next: string) => void;  
195 -}  
196 -  
197 -const QxRuntimeTree: React.FC<QxRuntimeTreeProps> = (props) => {  
198 - const { treeSchema, dataSource, onClickBtn, onTreeDrop } = props;  
199 -  
200 - const [expandedKeys, setExpandedKeys] = useState<any[]>([]); //默认展开的节点  
201 - const [keyword, setKeyword] = useState<string>('');  
202 - const [treeData, setTreeData] = useState<any[]>([]);  
203 - const [data, setData] = useState<any>([]);  
204 -  
205 - // 拖拽节点 相关代码  
206 - // 根据parentNodeId得到parentNodeType  
207 - const parentNode = (parentNodeData: any, parentNodeId: string) => {  
208 - for (let i = 0; i < parentNodeData.length; i++) {  
209 - if (parentNodeId == parentNodeData[i].code) {  
210 - return parentNodeData[i].type;  
211 - }  
212 - if (parentNodeData[i].children) {  
213 - const res: any = parentNode(parentNodeData[i].children, parentNodeId);  
214 - if (res) {  
215 - return res;  
216 - }  
217 - }  
218 - }  
219 - };  
220 - const handleDrop = (val: any) => {  
221 - const { node, dragNode, dropToGap } = val;  
222 - const dragNodeId = dragNode.code;  
223 - let nextNodeId = node.__next;  
224 - let parentNodeId = node.__pId ? node.__pId : '*';  
225 - if (!dropToGap) {  
226 - parentNodeId = node.code ? node.code : '*';  
227 - nextNodeId = (node.children[0] && node.children[0].code) || null;  
228 - }  
229 - const parentNodeType = parentNode(dataSource, parentNodeId); // 根据parentNodeId得到parentNodeType  
230 - if (parentNodeType === 'PAGE') {  
231 - message.warning('不能移动至页面下');  
232 - return;  
233 - }  
234 - if (parentNodeId === '*' || dragNodeId === nextNodeId) {  
235 - return;  
236 - }  
237 - onTreeDrop(dragNodeId, parentNodeId, nextNodeId);  
238 - };  
239 -  
240 - let codeArr: any = [];  
241 -  
242 - /**  
243 - * 获取需要展开的节点  
244 - * @param arr nodesData  
245 - * @param expandLevel 需要展开的级别默认二级  
246 - * @param pId  
247 - */  
248 - const loopTreeNode = (nodesData: any[], expandLevel: number) => {  
249 - let nextExpendLevel = expandLevel;  
250 - // if (expandLevel > 0) {  
251 - nextExpendLevel -= 1;  
252 - // }  
253 - // @ts-ignore  
254 - nodesData.forEach((item, index) => {  
255 - if (nextExpendLevel >= 0) {  
256 - codeArr.push(item.code);  
257 - }  
258 - item.key = item.code;  
259 - item.__next = nodesData[index + 1] ? nodesData[index + 1].code : null;  
260 -  
261 - if (!item.children) {  
262 - item.isLeaf = true;  
263 - } else {  
264 - loopTreeNode(item.children, nextExpendLevel);  
265 - }  
266 - });  
267 - };  
268 - const getExpandedArr = (nodesData: any[]) => {  
269 - nodesData.forEach((item) => {  
270 - codeArr.push(item.code);  
271 - if (item.children) {  
272 - getExpandedArr(item.children);  
273 - }  
274 - });  
275 - };  
276 -  
277 - const generateTreeData = useCallback(  
278 - (_data: any[], _keywords?: string): any[] => {  
279 - const _treeNode: any[] = [];  
280 - _data.map((item) => {  
281 - if (typeof item.visible === 'boolean' && !item.visible) {  
282 - return;  
283 - }  
284 - const _item: any = {  
285 - ...item,  
286 - children: [],  
287 - };  
288 - if (item.children) {  
289 - _item.children = generateTreeData(item.children, _keywords);  
290 - }  
291 - _treeNode.push(_item);  
292 - });  
293 - return _treeNode;  
294 - },  
295 - [],  
296 - );  
297 -  
298 - const filter = (word: string) => {  
299 - setKeyword(word);  
300 - const traverse = function (node: any) {  
301 - const childNodes = node.children || [];  
302 - node.visible = node.name.indexOf(word) > -1;  
303 -  
304 - childNodes.forEach((child: any) => {  
305 - child.visible = child.name.indexOf(word) > -1;  
306 - traverse(child);  
307 - });  
308 -  
309 - if (!node.visible && childNodes.length) {  
310 - node.visible = childNodes.some((child: any) => child.visible);  
311 - }  
312 - };  
313 - if (data) {  
314 - const _data = _.cloneDeep(data);  
315 - if (word != '') {  
316 - // @ts-ignore  
317 - _data.forEach((item) => {  
318 - traverse(item);  
319 - });  
320 - }  
321 - setTreeData(generateTreeData(_data, word));  
322 - }  
323 - };  
324 - // 搜索框事件  
325 - const handleChange = (e: { type: string; target: { value: string } }) => {  
326 - const keywordText = e.target.value.replace(/(^\s*)|(\s*$)/g, '');  
327 -  
328 - if (e.type === 'click' && e.target.value === '' && keyword !== '') {  
329 - // 清空  
330 - setData(dataSource);  
331 - setTreeData(dataSource);  
332 - } else {  
333 - if (keywordText) {  
334 - filter(keywordText);  
335 - } else {  
336 - setData(dataSource);  
337 - setTreeData(dataSource);  
338 - }  
339 - }  
340 - };  
341 - const handleSearch = (e: React.KeyboardEvent<HTMLInputElement>) => {  
342 - // @ts-ignore  
343 - const keywordText = e.target.value.replace(/(^\s*)|(\s*$)/g, '');  
344 - if (keywordText) {  
345 - filter(keywordText);  
346 - } else {  
347 - setData(dataSource);  
348 - setTreeData(dataSource);  
349 - }  
350 - };  
351 -  
352 - useEffect(() => {  
353 - if (!dataSource || !treeSchema || !dataSource.length) {  
354 - return;  
355 - }  
356 - setData(dataSource);  
357 - setTreeData(dataSource);  
358 - const config = treeSchema?.tree || {};  
359 - if (!config?.expandLevel && config?.expandLevel === 0) {  
360 - codeArr = [];  
361 - getExpandedArr(dataSource || []);  
362 - setExpandedKeys(codeArr);  
363 - } else {  
364 - codeArr = [];  
365 - loopTreeNode(dataSource || [], config?.expandLevel);  
366 - setExpandedKeys(codeArr);  
367 - }  
368 - }, [dataSource, treeSchema]);  
369 -  
370 - const getBtnDom = (val: any, filterData: any, schema: any) => {  
371 - if (!filterData?.extract?.[val.flag]) {  
372 - return null;  
373 - }  
374 - let icon = val.icon;  
375 - let name = val.name;  
376 - if (schema?.tree?.style === 'text') {  
377 - icon = '';  
378 - }  
379 - if (icon && (schema?.tree?.style === 'icon' || !schema?.tree?.style)) {  
380 - name = '';  
381 - }  
382 - let btnElem;  
383 - if (val.name.length > 4) {  
384 - btnElem = (  
385 - <QxButton  
386 - key={val.code}  
387 - color={val.color}  
388 - icon={icon}  
389 - type={'link'}  
390 - size={'small'}  
391 - disabled={val.disabled}  
392 - tooltip={val.tooltip || (name && val.name)}  
393 - onClick={() => {  
394 - onClickBtn({ code: val.code, ...val }, filterData);  
395 - }}  
396 - >  
397 - {name ? name.substring(0, 4) + '...' : name}  
398 - </QxButton>  
399 - );  
400 - } else {  
401 - btnElem = (  
402 - <QxButton  
403 - key={val.code}  
404 - color={val.color}  
405 - icon={icon}  
406 - type={'link'}  
407 - size={'small'}  
408 - disabled={val.disabled}  
409 - tooltip={val.tooltip}  
410 - onClick={() => {  
411 - onClickBtn({ code: val.code, ...val }, filterData);  
412 - }}  
413 - >  
414 - {name}  
415 - </QxButton>  
416 - );  
417 - }  
418 -  
419 - if (schema?.tree?.style === 'icon' || !schema?.tree?.style) {  
420 - return (  
421 - <Tooltip key={val.code} title={val.name}>  
422 - {btnElem}  
423 - </Tooltip>  
424 - );  
425 - } else {  
426 - return btnElem;  
427 - }  
428 - };  
429 -  
430 - // 渲染节点  
431 - const renderTitle = (nodeData: any) => {  
432 - const btnList = (  
433 - treeSchema?.tree?.action?.renderData?.buttons || []  
434 - ).filter((item: any) => {  
435 - if (!!nodeData?.extract?.[item.flag]) {  
436 - return item;  
437 - }  
438 - });  
439 - // 超过 6 个则放入更多操作  
440 - const MAX = 6;  
441 - const isOverMax = btnList?.length > MAX + 1;  
442 - const isEqualMax = btnList?.length === MAX + 1;  
443 -  
444 - return (  
445 - <>  
446 - {nodeData?.level > 1 && (  
447 - <QxIcon  
448 - type={'icon-pailie'}  
449 - style={{  
450 - fontSize: 18,  
451 - color: '#999',  
452 - marginRight: '8px',  
453 - }}  
454 - />  
455 - )}  
456 - {nodeData.name && nodeData.name.length > 30 ? (  
457 - <Tooltip key={nodeData.code} title={nodeData.name}>  
458 - <span>{nodeData.name.substring(0, 30) + '...'}</span>  
459 - </Tooltip>  
460 - ) : (  
461 - <span>{nodeData.name}</span>  
462 - )}  
463 - <div className={'qx-tree-btn-list'}>  
464 - {_.take(btnList, isEqualMax ? MAX + 1 : MAX).map((val: any) => {  
465 - return getBtnDom(val, nodeData, treeSchema);  
466 - })}  
467 - {isOverMax && (  
468 - <Dropdown  
469 - overlayClassName="qx-tree-drop-down"  
470 - placement="bottomRight"  
471 - overlay={  
472 - <Menu>  
473 - {_.drop(btnList, MAX).map((val: any) => {  
474 - return (  
475 - <Menu.Item key={val.code}>  
476 - {getBtnDom(val, nodeData, treeSchema)}  
477 - </Menu.Item>  
478 - );  
479 - })}  
480 - </Menu>  
481 - }  
482 - getPopupContainer={(trigger: any) => trigger.parentNode}  
483 - >  
484 - <Button className={'qx-tree-drop-down-btn'} type="text">  
485 - <EllipsisOutlined />  
486 - </Button>  
487 - </Dropdown>  
488 - )}  
489 - </div>  
490 - </>  
491 - );  
492 - };  
493 -  
494 - return (  
495 - <div  
496 - className={'qx-tree-list'}  
497 - style={{ padding: '20px', backgroundColor: '#fff' }}  
498 - >  
499 - {data && data.length > 0 && treeSchema?.tree?.searchSwitch && (  
500 - <Input  
501 - className={'qx-selector-sub-search'}  
502 - style={{  
503 - borderBottom: '1px solid #f0f0f0',  
504 - }}  
505 - placeholder={'请输入关键字,按回车键搜索'}  
506 - allowClear  
507 - prefix={<SearchOutlined style={{ marginTop: '4px' }} />}  
508 - onChange={(e) => {  
509 - handleChange(e);  
510 - }}  
511 - onPressEnter={(e) => {  
512 - handleSearch(e);  
513 - }}  
514 - />  
515 - )}  
516 - <>  
517 - {treeData && treeData.length > 0 ? (  
518 - <Tree  
519 - treeData={treeData}  
520 - fieldNames={{  
521 - title: 'name',  
522 - key: 'code',  
523 - children: 'children',  
524 - }}  
525 - titleRender={(nodeData) => renderTitle(nodeData)}  
526 - blockNode={true}  
527 - onDrop={handleDrop}  
528 - draggable={  
529 - treeSchema?.tree?.dragSwitch  
530 - ? {  
531 - nodeDraggable: (node: any) => {  
532 - if (node.pid === '*') {  
533 - return false;  
534 - }  
535 - return true;  
536 - },  
537 - }  
538 - : false  
539 - }  
540 - selectable  
541 - defaultExpandedKeys={expandedKeys}  
542 - expandedKeys={expandedKeys}  
543 - checkStrictly={true}  
544 - // @ts-ignore  
545 - onExpand={(keys) => setExpandedKeys(keys)}  
546 - />  
547 - ) : (  
548 - <Empty  
549 - className={'qx-tree-list__empty'}  
550 - image={Empty.PRESENTED_IMAGE_SIMPLE}  
551 - />  
552 - )}  
553 - </>  
554 - </div>  
555 - );  
556 -}; 4 +import './index.less';
557 5
558 const QxSearchForm = (props: any) => { 6 const QxSearchForm = (props: any) => {
  7 + const SYSTEM_WIDGETS = qx.getModuleData()?.systemWidgets;
559 const widgets = { ...SYSTEM_WIDGETS, ...(props.widgets || {}) }; 8 const widgets = { ...SYSTEM_WIDGETS, ...(props.widgets || {}) };
560 return <QxSearch {...props} widgets={widgets} />; 9 return <QxSearch {...props} widgets={widgets} />;
561 }; 10 };
562 11
563 -// 快捷查询 功能相关代码  
564 -interface QxQuickSearchTabsProps {  
565 - list: any[];  
566 - tabActiveCode: string | undefined;  
567 - onChange: (value: any) => void;  
568 -}  
569 -  
570 -// scroll状态  
571 -export enum SCROLL {  
572 - start,  
573 - middle,  
574 - end,  
575 -}  
576 -  
577 -const QxQuickSearchTabs: React.FC<QxQuickSearchTabsProps> = (props: any) => {  
578 - const { list, tabActiveCode, onChange } = props;  
579 - const [tabsIcon, setTabsIcon] = useState<boolean>(false);  
580 - const [scroll, setScroll] = useState<SCROLL>(SCROLL.start);  
581 -  
582 - /* useEffect(() => {  
583 - if (!list || !list.length) {  
584 - return;  
585 - }  
586 - onChange(list[0].code);  
587 - }, [list]);*/  
588 -  
589 - const getQuickSearchScroll = () => {  
590 - const tabsDom: any = document?.getElementById('quickSearchTabs');  
591 - if (tabsDom?.offsetWidth - tabsDom?.scrollWidth < 0) {  
592 - setTabsIcon(true);  
593 - const translate = tabsDom.style?.transform;  
594 - const translateNum = translate.split('(').pop().split('p').shift();  
595 - if (Number(translateNum) == 0) {  
596 - setScroll(SCROLL.start);  
597 - } else if (Math.abs(Number(translateNum)) > 0) {  
598 - if (  
599 - Math.abs(Number(translateNum)) ==  
600 - Math.abs(tabsDom?.offsetWidth - tabsDom?.scrollWidth)  
601 - ) {  
602 - setScroll(SCROLL.end);  
603 - } else {  
604 - setScroll(SCROLL.middle);  
605 - }  
606 - }  
607 - } else {  
608 - setTabsIcon(false);  
609 - }  
610 - };  
611 -  
612 - const handleClick = (changedCode: any, index: number, e: any) => {  
613 - const tabItemLeft = e.currentTarget.offsetLeft - 20;  
614 - const tabItemWidth = e.currentTarget.clientWidth;  
615 - const tabsDom: any = document?.getElementById('quickSearchTabs');  
616 - const translate = tabsDom.style?.transform;  
617 - const translateNum = Math.abs(  
618 - Number(translate.split('(').pop().split('p').shift() || 0),  
619 - );  
620 - let widget =  
621 - translateNum + tabsDom.clientWidth - (tabItemLeft + tabItemWidth);  
622 - if (widget > 0) {  
623 - if (translateNum === 0) {  
624 - tabsDom.style.cssText = 'transform: translate(0px,0px);';  
625 - } else {  
626 - widget = index > 0 ? tabItemLeft + 20 : tabItemLeft;  
627 - if (translateNum > tabItemLeft) {  
628 - tabsDom.style.cssText =  
629 - 'transform: translate(' + -widget + 'px,0px);';  
630 - }  
631 - }  
632 - } else if (widget < 0) {  
633 - widget = translateNum + Math.abs(widget);  
634 - tabsDom.style.cssText = 'transform: translate(' + -widget + 'px,0px);';  
635 - }  
636 -  
637 - if (changedCode === tabActiveCode) return;  
638 - onChange(changedCode);  
639 - };  
640 -  
641 - const scrollPrev = () => {  
642 - const tabsDom: any = document?.getElementById('quickSearchTabs');  
643 - const translate = tabsDom.style?.transform;  
644 - const translateNum = Math.abs(  
645 - Number(translate.split('(').pop().split('p').shift() || 0),  
646 - );  
647 - let widget = translateNum - tabsDom?.offsetWidth;  
648 - if (widget < 0) {  
649 - widget = 0;  
650 - setScroll(SCROLL.start);  
651 - } else {  
652 - setScroll(SCROLL.middle);  
653 - }  
654 - tabsDom.style.cssText = 'transform: translate(' + -widget + 'px,0px);';  
655 - };  
656 -  
657 - const scrollNext = () => {  
658 - const tabsDom: any = document?.getElementById('quickSearchTabs');  
659 - const translate = tabsDom.style?.transform;  
660 - const translateNum = Math.abs(  
661 - Number(translate.split('(').pop().split('p').shift() || 0),  
662 - );  
663 - let widget = translateNum + tabsDom?.offsetWidth;  
664 - if (widget > Math.abs(tabsDom?.offsetWidth - tabsDom?.scrollWidth)) {  
665 - widget = Math.abs(tabsDom?.offsetWidth - tabsDom?.scrollWidth);  
666 - setScroll(SCROLL.end);  
667 - } else {  
668 - setScroll(SCROLL.middle);  
669 - }  
670 - tabsDom.style.cssText = 'transform: translate(' + -widget + 'px,0px);';  
671 - };  
672 -  
673 - useEffect(() => {  
674 - getQuickSearchScroll();  
675 - });  
676 -  
677 - useEffect(() => {  
678 - if (!tabActiveCode) {  
679 - return;  
680 - }  
681 - const idx = list.findIndex((val: any) => val.code === tabActiveCode);  
682 - const tabsDom: any = document?.getElementById('quickSearchTabs');  
683 - if (idx === 0) {  
684 - tabsDom.style.cssText = 'transform: translate(0px,0px);';  
685 - }  
686 - }, [tabActiveCode]);  
687 -  
688 - return (  
689 - <div  
690 - className={'qx-view-quick-search-container'}  
691 - style={{  
692 - padding: tabsIcon ? '0 20px' : 0,  
693 - }}  
694 - >  
695 - {tabsIcon && (  
696 - <Button  
697 - className={'left-button'}  
698 - type="text"  
699 - icon={  
700 - <QxIcon type={'icon-tag-left-translate'} style={{ fontSize: 10 }} />  
701 - }  
702 - disabled={scroll == SCROLL.start}  
703 - onClick={scrollPrev}  
704 - />  
705 - )}  
706 - <div id="quickSearchTabs" className="qx-view-quick-search">  
707 - {list.map((pane: any, index: number) =>  
708 - pane.title && pane.title.length > 6 ? (  
709 - <Popover key={pane.code} content={pane.title} title={null}>  
710 - <div  
711 - key={pane.code}  
712 - className={`qx-view-quick-search__item ${  
713 - tabActiveCode === pane.code ? 'selected' : null  
714 - }`}  
715 - onClick={(e) => handleClick(pane.code, index, e)}  
716 - >  
717 - {pane.title.substring(0, 5) + '...'}  
718 - </div>  
719 - </Popover>  
720 - ) : (  
721 - <div  
722 - key={pane.code}  
723 - className={`qx-view-quick-search__item ${  
724 - tabActiveCode === pane.code ? 'selected' : null  
725 - }`}  
726 - onClick={(e) => handleClick(pane.code, index, e)}  
727 - >  
728 - {pane.title}  
729 - </div>  
730 - ),  
731 - )}  
732 - </div>  
733 - {tabsIcon && (  
734 - <Button  
735 - className={'right-button'}  
736 - type="text"  
737 - icon={  
738 - <QxIcon  
739 - type={'icon-tag-right-translate'}  
740 - style={{ fontSize: 10 }}  
741 - />  
742 - }  
743 - disabled={scroll == SCROLL.end}  
744 - onClick={scrollNext}  
745 - />  
746 - )}  
747 - </div>  
748 - );  
749 -};  
750 -  
751 -export { QxSearchForm, QxRuntimeTable, QxRuntimeTree, QxQuickSearchTabs }; 12 +export { QxSearchForm };
1 import React, { memo } from 'react'; 1 import React, { memo } from 'react';
2 import { Space } from 'antd'; 2 import { Space } from 'antd';
3 -import { QxSearchForm, QxTable, QxToolbar } from '@/src/components/view-render'; 3 +import { QxSearchForm, QxTable, QxToolbar } from '@/components/view-render';
4 import { useRequest } from 'ahooks'; 4 import { useRequest } from 'ahooks';
5 import { getData } from './services'; 5 import { getData } from './services';
6 import data from './data.json'; 6 import data from './data.json';
1 -import request from '@/src/utils/request'; 1 +import request from '@/utils/request';
2 2
3 export function getData() { 3 export function getData() {
4 return request.get(`http://yapi.qgutech.com/mock/547/mock-api/page`); 4 return request.get(`http://yapi.qgutech.com/mock/547/mock-api/page`);
5 } 5 }
6 -  
1 export default [ 1 export default [
2 { 2 {
3 path: '/view', 3 path: '/view',
4 - component: '@/src/pages/app-view', 4 + component: '@/pages/app-view',
5 layout: true, 5 layout: true,
6 - }  
7 -] 6 + },
  7 +];
  1 +@import '~antd/lib/style/themes/variable.less';
  2 +
  3 +@html-selector: html;
@@ -11,11 +11,9 @@ @@ -11,11 +11,9 @@
11 "baseUrl": "./", 11 "baseUrl": "./",
12 "strict": true, 12 "strict": true,
13 "paths": { 13 "paths": {
14 - "@/*": ["libs/src/*"],  
15 - "@libs/*": ["libs/src/*"],  
16 - "@/src/*": ["src/*"],  
17 - "@@/*": ["src/.umi/*"]  
18 - }, 14 + "@/*": ["./src/*"],
  15 + "@@/*": ["./src/.umi/*"]
  16 + }
19 "allowSyntheticDefaultImports": true 17 "allowSyntheticDefaultImports": true
20 }, 18 },
21 "include": [ 19 "include": [