Compare commits
No commits in common. "aiops_dev" and "master" have entirely different histories.
51
README.md
51
README.md
|
@ -1,45 +1,24 @@
|
|||
# 博云 CMP Web 前端项目
|
||||
# vue3.0-tpl
|
||||
|
||||
## 环境准备
|
||||
|
||||
- Node.js 16+
|
||||
- pnpm 7+
|
||||
|
||||
## 快速开始
|
||||
|
||||
1. 配置私有 NPM 源
|
||||
|
||||
```bash
|
||||
# 设置 registry
|
||||
npm config set registry http://223.112.233.194:13011/repository/bocloud-npm/
|
||||
npm config set _auth Ym9jbG91ZDpjbXBAdjU4Nw==
|
||||
|
||||
# npm 相关配置
|
||||
npm config set auto-install-peers=true
|
||||
npm config set strict-peer-dependencies=false
|
||||
npm config set shamefully-hoist=true
|
||||
npm config set always-auth true
|
||||
## Project setup
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
|
||||
2. 安装依赖
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
yarn serve
|
||||
```
|
||||
|
||||
3. 本地开发
|
||||
|
||||
```bash
|
||||
pnpm run serve # 推荐:使用 vue-cli-service
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
|
||||
4. 项目构建
|
||||
|
||||
```bash
|
||||
pnpm run build
|
||||
### Lints and fixes files
|
||||
```
|
||||
yarn lint
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 不推荐使用 vite 进行开发,存在兼容性问题
|
||||
- 建议使用 vue-cli-service serve 进行本地开发
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
|
|
|
@ -26,7 +26,6 @@ declare module 'vue' {
|
|||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
||||
ATextarea: typeof import('ant-design-vue/es')['Textarea']
|
||||
ATooltip: typeof import('ant-design-vue/es')['Tooltip']
|
||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
Empty: typeof import('./src/components/empty/Empty.vue')['default']
|
||||
ImageCropper: typeof import('./src/components/image-cropper/index.vue')['default']
|
||||
|
|
107
pnpm-lock.yaml
107
pnpm-lock.yaml
|
@ -1,4 +1,4 @@
|
|||
lockfileVersion: 5.4
|
||||
lockfileVersion: 5.3
|
||||
|
||||
specifiers:
|
||||
'@ant-design/icons-vue': ^6.0.1
|
||||
|
@ -76,8 +76,8 @@ devDependencies:
|
|||
'@types/qs': 6.9.7
|
||||
'@vitejs/plugin-vue': 2.2.0_vite@2.8.3+vue@3.2.31
|
||||
'@vitejs/plugin-vue-jsx': 1.3.7
|
||||
'@vue/eslint-config-prettier': 7.0.0_o3yyxvqqntu2psyhklvnrymevm
|
||||
'@vue/eslint-config-typescript': 10.0.0_zuiazj2lrq6pwzfmxm77tf3wjm
|
||||
'@vue/eslint-config-prettier': 7.0.0_eslint@8.9.0+prettier@2.5.1
|
||||
'@vue/eslint-config-typescript': 10.0.0_cd100ca74b8c3cfb64acbb3ff997764b
|
||||
'@vue/tsconfig': 0.1.3_@types+node@16.11.25
|
||||
eslint: 8.9.0
|
||||
eslint-plugin-vue: 8.4.1_eslint@8.9.0
|
||||
|
@ -315,6 +315,7 @@ packages:
|
|||
/@babel/helper-validator-identifier/7.16.7:
|
||||
resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dev: true
|
||||
|
||||
/@babel/helper-validator-option/7.16.7:
|
||||
resolution: {integrity: sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==}
|
||||
|
@ -345,8 +346,6 @@ packages:
|
|||
resolution: {integrity: sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/types': 7.17.0
|
||||
|
||||
/@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.17.5:
|
||||
resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
|
||||
|
@ -430,6 +429,7 @@ packages:
|
|||
dependencies:
|
||||
'@babel/helper-validator-identifier': 7.16.7
|
||||
to-fast-properties: 2.0.0
|
||||
dev: true
|
||||
|
||||
/@commitlint/cli/11.0.0:
|
||||
resolution: {integrity: sha512-YWZWg1DuqqO5Zjh7vUOeSX76vm0FFyz4y0cpGMFhrhvUi5unc4IVfCXZ6337R9zxuBtmveiRuuhQqnRRer+13g==}
|
||||
|
@ -691,10 +691,8 @@ packages:
|
|||
zen-observable:
|
||||
optional: true
|
||||
dependencies:
|
||||
any-observable: 0.3.0_rxjs@6.6.7
|
||||
any-observable: 0.3.0
|
||||
rxjs: 6.6.7
|
||||
transitivePeerDependencies:
|
||||
- zenObservable
|
||||
dev: true
|
||||
|
||||
/@simonwep/pickr/1.8.2:
|
||||
|
@ -760,7 +758,7 @@ packages:
|
|||
resolution: {integrity: sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==}
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/eslint-plugin/5.12.0_yrt47g5utmuvsqpihtshtjlyw4:
|
||||
/@typescript-eslint/eslint-plugin/5.12.0_c467cf9bb49b295941e83ce479a578b7:
|
||||
resolution: {integrity: sha512-fwCMkDimwHVeIOKeBHiZhRUfJXU8n6xW1FL9diDxAyGAFvKcH4csy0v7twivOQdQdA0KC8TDr7GGRd3L4Lv0rQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
|
@ -771,10 +769,10 @@ packages:
|
|||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.12.0_fhzmdq77bspfhxkfuzq4fbrdsy
|
||||
'@typescript-eslint/parser': 5.12.0_eslint@8.9.0+typescript@4.5.5
|
||||
'@typescript-eslint/scope-manager': 5.12.0
|
||||
'@typescript-eslint/type-utils': 5.12.0_fhzmdq77bspfhxkfuzq4fbrdsy
|
||||
'@typescript-eslint/utils': 5.12.0_fhzmdq77bspfhxkfuzq4fbrdsy
|
||||
'@typescript-eslint/type-utils': 5.12.0_eslint@8.9.0+typescript@4.5.5
|
||||
'@typescript-eslint/utils': 5.12.0_eslint@8.9.0+typescript@4.5.5
|
||||
debug: 4.3.3
|
||||
eslint: 8.9.0
|
||||
functional-red-black-tree: 1.0.1
|
||||
|
@ -787,7 +785,7 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/parser/5.12.0_fhzmdq77bspfhxkfuzq4fbrdsy:
|
||||
/@typescript-eslint/parser/5.12.0_eslint@8.9.0+typescript@4.5.5:
|
||||
resolution: {integrity: sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
|
@ -815,7 +813,7 @@ packages:
|
|||
'@typescript-eslint/visitor-keys': 5.12.0
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/type-utils/5.12.0_fhzmdq77bspfhxkfuzq4fbrdsy:
|
||||
/@typescript-eslint/type-utils/5.12.0_eslint@8.9.0+typescript@4.5.5:
|
||||
resolution: {integrity: sha512-9j9rli3zEBV+ae7rlbBOotJcI6zfc6SHFMdKI9M3Nc0sy458LJ79Os+TPWeBBL96J9/e36rdJOfCuyRSgFAA0Q==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
|
@ -825,7 +823,7 @@ packages:
|
|||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/utils': 5.12.0_fhzmdq77bspfhxkfuzq4fbrdsy
|
||||
'@typescript-eslint/utils': 5.12.0_eslint@8.9.0+typescript@4.5.5
|
||||
debug: 4.3.3
|
||||
eslint: 8.9.0
|
||||
tsutils: 3.21.0_typescript@4.5.5
|
||||
|
@ -860,7 +858,7 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/utils/5.12.0_fhzmdq77bspfhxkfuzq4fbrdsy:
|
||||
/@typescript-eslint/utils/5.12.0_eslint@8.9.0+typescript@4.5.5:
|
||||
resolution: {integrity: sha512-k4J2WovnMPGI4PzKgDtQdNrCnmBHpMUFy21qjX2CoPdoBcSBIMvVBr9P2YDP8jOqZOeK3ThOL6VO/sy6jtnvzw==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
|
@ -1021,18 +1019,20 @@ packages:
|
|||
magic-string: 0.25.7
|
||||
postcss: 8.4.6
|
||||
source-map: 0.6.1
|
||||
dev: false
|
||||
|
||||
/@vue/compiler-ssr/3.2.31:
|
||||
resolution: {integrity: sha512-mjN0rqig+A8TVDnsGPYJM5dpbjlXeHUm2oZHZwGyMYiGT/F4fhJf/cXy8QpjnLQK4Y9Et4GWzHn9PS8AHUnSkw==}
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.2.31
|
||||
'@vue/shared': 3.2.31
|
||||
dev: false
|
||||
|
||||
/@vue/devtools-api/6.0.12:
|
||||
resolution: {integrity: sha512-iO/4FIezHKXhiDBdKySCvJVh8/mZPxHpiQrTy+PXVqJZgpTPTdHy4q8GXulaY+UKEagdkBb0onxNQZ0LNiqVhw==}
|
||||
dev: false
|
||||
|
||||
/@vue/eslint-config-prettier/7.0.0_o3yyxvqqntu2psyhklvnrymevm:
|
||||
/@vue/eslint-config-prettier/7.0.0_eslint@8.9.0+prettier@2.5.1:
|
||||
resolution: {integrity: sha512-/CTc6ML3Wta1tCe1gUeO0EYnVXfo3nJXsIhZ8WJr3sov+cGASr6yuiibJTL6lmIBm7GobopToOuB3B6AWyV0Iw==}
|
||||
peerDependencies:
|
||||
eslint: '>= 7.28.0'
|
||||
|
@ -1040,29 +1040,25 @@ packages:
|
|||
dependencies:
|
||||
eslint: 8.9.0
|
||||
eslint-config-prettier: 8.3.0_eslint@8.9.0
|
||||
eslint-plugin-prettier: 4.0.0_a62cezdlw5ot3n4rmiou7w6jsi
|
||||
eslint-plugin-prettier: 4.0.0_07b422646bb75d3db791621d4fdbc992
|
||||
prettier: 2.5.1
|
||||
dev: true
|
||||
|
||||
/@vue/eslint-config-typescript/10.0.0_zuiazj2lrq6pwzfmxm77tf3wjm:
|
||||
/@vue/eslint-config-typescript/10.0.0_cd100ca74b8c3cfb64acbb3ff997764b:
|
||||
resolution: {integrity: sha512-F94cL8ug3FaYXlCfU5/wiGjk1qeadmoBpRGAOBq+qre3Smdupa59dd6ZJrsfRODpsMPyTG7330juMDsUvpZ3Rw==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^6.2.0 || ^7.0.0 || ^8.0.0
|
||||
eslint-plugin-vue: ^8.0.1
|
||||
typescript: '*'
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 5.12.0_yrt47g5utmuvsqpihtshtjlyw4
|
||||
'@typescript-eslint/parser': 5.12.0_fhzmdq77bspfhxkfuzq4fbrdsy
|
||||
'@typescript-eslint/eslint-plugin': 5.12.0_c467cf9bb49b295941e83ce479a578b7
|
||||
'@typescript-eslint/parser': 5.12.0_eslint@8.9.0+typescript@4.5.5
|
||||
eslint: 8.9.0
|
||||
eslint-plugin-vue: 8.4.1_eslint@8.9.0
|
||||
typescript: 4.5.5
|
||||
vue-eslint-parser: 8.2.0_eslint@8.9.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/@vue/reactivity-transform/3.2.31:
|
||||
|
@ -1073,6 +1069,7 @@ packages:
|
|||
'@vue/shared': 3.2.31
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.25.7
|
||||
dev: false
|
||||
|
||||
/@vue/reactivity/3.2.31:
|
||||
resolution: {integrity: sha512-HVr0l211gbhpEKYr2hYe7hRsV91uIVGFYNHj73njbARVGHQvIojkImKMaZNDdoDZOIkMsBc9a1sMqR+WZwfSCw==}
|
||||
|
@ -1084,6 +1081,7 @@ packages:
|
|||
dependencies:
|
||||
'@vue/reactivity': 3.2.31
|
||||
'@vue/shared': 3.2.31
|
||||
dev: false
|
||||
|
||||
/@vue/runtime-dom/3.2.31:
|
||||
resolution: {integrity: sha512-N+o0sICVLScUjfLG7u9u5XCjvmsexAiPt17GNnaWHJUfsKed5e85/A3SWgKxzlxx2SW/Hw7RQxzxbXez9PtY3g==}
|
||||
|
@ -1091,6 +1089,7 @@ packages:
|
|||
'@vue/runtime-core': 3.2.31
|
||||
'@vue/shared': 3.2.31
|
||||
csstype: 2.6.19
|
||||
dev: false
|
||||
|
||||
/@vue/server-renderer/3.2.31_vue@3.2.31:
|
||||
resolution: {integrity: sha512-8CN3Zj2HyR2LQQBHZ61HexF5NReqngLT3oahyiVRfSSvak+oAvVmu8iNLSu6XR77Ili2AOpnAt1y8ywjjqtmkg==}
|
||||
|
@ -1100,6 +1099,7 @@ packages:
|
|||
'@vue/compiler-ssr': 3.2.31
|
||||
'@vue/shared': 3.2.31
|
||||
vue: 3.2.31
|
||||
dev: false
|
||||
|
||||
/@vue/shared/3.2.31:
|
||||
resolution: {integrity: sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==}
|
||||
|
@ -1247,19 +1247,9 @@ packages:
|
|||
warning: 4.0.3
|
||||
dev: false
|
||||
|
||||
/any-observable/0.3.0_rxjs@6.6.7:
|
||||
/any-observable/0.3.0:
|
||||
resolution: {integrity: sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==}
|
||||
engines: {node: '>=6'}
|
||||
peerDependencies:
|
||||
rxjs: '*'
|
||||
zenObservable: '*'
|
||||
peerDependenciesMeta:
|
||||
rxjs:
|
||||
optional: true
|
||||
zenObservable:
|
||||
optional: true
|
||||
dependencies:
|
||||
rxjs: 6.6.7
|
||||
dev: true
|
||||
|
||||
/anymatch/3.1.2:
|
||||
|
@ -1432,8 +1422,6 @@ packages:
|
|||
snapdragon-node: 2.1.1
|
||||
split-string: 3.1.0
|
||||
to-regex: 3.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/braces/3.0.2:
|
||||
|
@ -1765,8 +1753,8 @@ packages:
|
|||
engines: {node: '>=10'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
JSONStream: 1.3.5
|
||||
is-text-path: 1.0.1
|
||||
JSONStream: 1.3.5
|
||||
lodash: 4.17.21
|
||||
meow: 8.1.2
|
||||
split2: 3.2.2
|
||||
|
@ -1879,6 +1867,7 @@ packages:
|
|||
|
||||
/csstype/2.6.19:
|
||||
resolution: {integrity: sha512-ZVxXaNy28/k3kJg0Fou5MiYpp88j7H9hLZp8PDC3jV0WFjfH5E9xHb56L0W59cPbKbcHXeP4qyT8PrHp8t6LcQ==}
|
||||
dev: false
|
||||
|
||||
/dargs/7.0.0:
|
||||
resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==}
|
||||
|
@ -1895,22 +1884,12 @@ packages:
|
|||
|
||||
/debug/2.6.9:
|
||||
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.0.0
|
||||
dev: true
|
||||
|
||||
/debug/3.2.7:
|
||||
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
dev: true
|
||||
|
@ -2395,7 +2374,7 @@ packages:
|
|||
eslint: 8.9.0
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-prettier/4.0.0_a62cezdlw5ot3n4rmiou7w6jsi:
|
||||
/eslint-plugin-prettier/4.0.0_07b422646bb75d3db791621d4fdbc992:
|
||||
resolution: {integrity: sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
peerDependencies:
|
||||
|
@ -2583,8 +2562,6 @@ packages:
|
|||
regex-not: 1.0.2
|
||||
snapdragon: 0.8.2
|
||||
to-regex: 3.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/extend-shallow/2.0.1:
|
||||
|
@ -2614,8 +2591,6 @@ packages:
|
|||
regex-not: 1.0.2
|
||||
snapdragon: 0.8.2
|
||||
to-regex: 3.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/fast-deep-equal/3.1.3:
|
||||
|
@ -3543,8 +3518,6 @@ packages:
|
|||
mime: 1.6.0
|
||||
needle: 2.9.1
|
||||
source-map: 0.6.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/levn/0.4.1:
|
||||
|
@ -3590,7 +3563,6 @@ packages:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- zen-observable
|
||||
- zenObservable
|
||||
dev: true
|
||||
|
||||
/listr-silent-renderer/1.1.1:
|
||||
|
@ -3640,7 +3612,6 @@ packages:
|
|||
rxjs: 6.6.7
|
||||
transitivePeerDependencies:
|
||||
- zen-observable
|
||||
- zenObservable
|
||||
dev: true
|
||||
|
||||
/loader-utils/1.4.0:
|
||||
|
@ -3831,8 +3802,6 @@ packages:
|
|||
regex-not: 1.0.2
|
||||
snapdragon: 0.8.2
|
||||
to-regex: 3.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/micromatch/3.1.10:
|
||||
|
@ -3852,8 +3821,6 @@ packages:
|
|||
regex-not: 1.0.2
|
||||
snapdragon: 0.8.2
|
||||
to-regex: 3.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/micromatch/4.0.4:
|
||||
|
@ -3949,8 +3916,6 @@ packages:
|
|||
regex-not: 1.0.2
|
||||
snapdragon: 0.8.2
|
||||
to-regex: 3.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/nanopop/2.1.0:
|
||||
|
@ -3970,8 +3935,6 @@ packages:
|
|||
debug: 3.2.7
|
||||
iconv-lite: 0.4.24
|
||||
sax: 1.2.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -4944,8 +4907,6 @@ packages:
|
|||
source-map: 0.5.7
|
||||
source-map-resolve: 0.5.3
|
||||
use: 3.1.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/source-map-js/1.0.2:
|
||||
|
@ -5162,8 +5123,6 @@ packages:
|
|||
deepmerge: 1.3.2
|
||||
mitt: 1.1.2
|
||||
svg-baker: 1.7.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/svg-baker/1.7.0:
|
||||
|
@ -5182,8 +5141,6 @@ packages:
|
|||
posthtml-svg-mode: 1.0.3
|
||||
query-string: 4.3.4
|
||||
traverse: 0.6.6
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/svg-sprite-loader/6.0.11:
|
||||
|
@ -5198,8 +5155,6 @@ packages:
|
|||
svg-baker: 1.7.0
|
||||
svg-baker-runtime: 1.4.7
|
||||
url-slug: 2.0.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/svg-tags/1.0.0:
|
||||
|
@ -5255,6 +5210,7 @@ packages:
|
|||
/to-fast-properties/2.0.0:
|
||||
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
|
||||
engines: {node: '>=4'}
|
||||
dev: true
|
||||
|
||||
/to-object-path/0.3.0:
|
||||
resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==}
|
||||
|
@ -5741,6 +5697,7 @@ packages:
|
|||
'@vue/runtime-dom': 3.2.31
|
||||
'@vue/server-renderer': 3.2.31_vue@3.2.31
|
||||
'@vue/shared': 3.2.31
|
||||
dev: false
|
||||
|
||||
/vuex/4.0.2_vue@3.2.31:
|
||||
resolution: {integrity: sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/** * Created by HaijunZhang on 2019/12/18. */
|
||||
<template>
|
||||
<a-layout-header class="common-header" :style="style" v-if="$route.name !== 'Designer'">
|
||||
<a-layout-header class="common-header" :style="style">
|
||||
<div class="header-logo">
|
||||
<img :src="pageConfigs.headerLogo" alt="" class="pull-left" />
|
||||
</div>
|
||||
<Divider class="split-line" type="vertical"></Divider>
|
||||
<router-link to="/cop-web/task/history/list">
|
||||
<router-link to="/sms-web/resource_dashboard">
|
||||
<HomeOutlined class="home-icon" />
|
||||
</router-link>
|
||||
<HeaderMenu :page-configs="pageConfigs"></HeaderMenu>
|
||||
|
@ -26,7 +26,7 @@ export default defineComponent({
|
|||
RightContent,
|
||||
Divider,
|
||||
HeaderMenu,
|
||||
HomeOutlined
|
||||
HomeOutlined,
|
||||
},
|
||||
setup() {
|
||||
const store = useStore()
|
||||
|
@ -34,14 +34,14 @@ export default defineComponent({
|
|||
const style = computed(() => {
|
||||
return {
|
||||
backgroundColor: pageConfigs.value.headerBgColour,
|
||||
color: pageConfigs.value.headerFontColour
|
||||
color: pageConfigs.value.headerFontColour,
|
||||
}
|
||||
})
|
||||
return {
|
||||
pageConfigs,
|
||||
style
|
||||
style,
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ export default {
|
|||
}
|
||||
// 是否隐藏
|
||||
const isShow = () => {
|
||||
return !['/sms-web/resource_dashboard', '/screen/list', '/redirect', '/report/designer'].includes(route.path)
|
||||
return !['/sms-web/resource_dashboard', '/screen/list', '/redirect'].includes(route.path)
|
||||
}
|
||||
const getFixTags = (routes) => {
|
||||
const tags = []
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<a-layout class="app-wrapper" :class="[{ hideSidebar: isCollapsed }, { 'font-big': isFontBig }, { 'expire-top': expire }]" @click="setTime">
|
||||
<SystemTip />
|
||||
<Header :match-path="matchPath" v-if="isNotIframeChild"></Header>
|
||||
<TagsView v-if="addRoutes && isNotIframeChild"></TagsView>
|
||||
<Header :match-path="matchPath"></Header>
|
||||
<TagsView v-if="addRoutes"></TagsView>
|
||||
<a-layout style="overflow: hidden">
|
||||
<Sidebar v-if="showSidebar && isNotIframeChild" @toggleCollapsed="toggleCollapsed" :isCollapsed="isCollapsed" :menuData="menuData" :isLimitLevel="true" :matchPath="matchPath" :basePath="basePath"></Sidebar>
|
||||
<Sidebar v-if="showSidebar" @toggleCollapsed="toggleCollapsed" :isCollapsed="isCollapsed" :menuData="menuData" :isLimitLevel="true" :matchPath="matchPath" :basePath="basePath"></Sidebar>
|
||||
<a-layout class="main-container">
|
||||
<ThirdMenu :menuData="thirdMenuData" v-if="thirdMenuData.children && isNotIframeChild"></ThirdMenu>
|
||||
<ThirdMenu :menuData="thirdMenuData" v-if="thirdMenuData.children"></ThirdMenu>
|
||||
<a-layout-content class="main-body">
|
||||
<el-scrollbar class="custom-scrollbar" style="flex: 1">
|
||||
<transition enter-active-class="fadeInUp" mode="out-in">
|
||||
|
@ -42,9 +42,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
matchPath: '',
|
||||
// 被嵌入
|
||||
isNotIframeChild: window.top === window.self
|
||||
matchPath: ''
|
||||
}
|
||||
},
|
||||
setup() {
|
||||
|
|
|
@ -5,6 +5,7 @@ import '@/permission'
|
|||
import App from '@/App.vue'
|
||||
import 'virtual:svg-icons-register'
|
||||
import startApp from '@/core/register'
|
||||
|
||||
const application = createApp(App)
|
||||
application.use(store).use(router).mount('#master-container')
|
||||
startApp()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
import { getToken, setToken, removeToken } from 'utils/auth'
|
||||
import { getToken, setToken } from 'utils/auth'
|
||||
import { getQuery } from 'utils'
|
||||
import { isEmpty, assign } from 'lodash-es'
|
||||
|
||||
|
@ -17,10 +17,6 @@ router.beforeEach(async (to, from, next) => {
|
|||
if (isEmpty(history.state.current)) {
|
||||
assign(history.state, { current: from.fullPath })
|
||||
}
|
||||
if (to.path === '/sso') {
|
||||
// 进入 sso 页面默认就是没有登录
|
||||
removeToken()
|
||||
}
|
||||
if (getToken()) {
|
||||
// 判断用户是否处于登录状态
|
||||
if (to.path === '/login') {
|
||||
|
|
|
@ -25,14 +25,18 @@ const routes: RouteRecordRaw[] = [
|
|||
{
|
||||
path: '/',
|
||||
component: () => import('@/layouts/home.vue'),
|
||||
redirect: '/cop-web/task/history/list',
|
||||
redirect: '/sms-web/resource_dashboard',
|
||||
meta: {
|
||||
title: '主页'
|
||||
},
|
||||
name: 'Home',
|
||||
children: [
|
||||
{
|
||||
path: '/cop-web/task/history/list',
|
||||
path: '/sms-web/resource_dashboard',
|
||||
meta: {
|
||||
noTag: true,
|
||||
hiddenSide: true
|
||||
},
|
||||
component: BlankView
|
||||
},
|
||||
{
|
||||
|
|
|
@ -7,16 +7,6 @@ import { wrapperParams } from 'utils'
|
|||
export function login(params) {
|
||||
return request.post('/sms/v1/users/login', params)
|
||||
}
|
||||
/**
|
||||
* IDP登录 返回数据结构和 login 接口一致
|
||||
* @param ticket 票据
|
||||
* @returns 用户信息
|
||||
*/
|
||||
export const idpLogin = (ticket) => {
|
||||
// token 作为 url query 拼接
|
||||
return request.post(`/sms/v1/login/idp?token=${ticket}`)
|
||||
}
|
||||
|
||||
export function getTokenInfo(params) {
|
||||
return request.post('/sms/v1/sso/token/info', params)
|
||||
}
|
||||
|
@ -31,12 +21,12 @@ export function logout() {
|
|||
}
|
||||
export function getConfig(params) {
|
||||
return request.get('/sms/v1/logo', {
|
||||
params: wrapperParams(params)
|
||||
params: wrapperParams(params),
|
||||
})
|
||||
}
|
||||
export function getDict(data) {
|
||||
return request.get('/dict/children', {
|
||||
params: wrapperParams(data)
|
||||
params: wrapperParams(data),
|
||||
})
|
||||
}
|
||||
export function getSysconf() {
|
||||
|
@ -58,7 +48,7 @@ export function getPortal(params) {
|
|||
}
|
||||
export function getServiceQuota(tenantId, data) {
|
||||
return request.get(`/cos/v1/tenants/${tenantId}/quotas`, {
|
||||
params: wrapperParams(data)
|
||||
params: wrapperParams(data),
|
||||
})
|
||||
}
|
||||
export function replaceToken(params) {
|
||||
|
@ -79,7 +69,7 @@ export function getSystemTreeConfigs(params) {
|
|||
// 更新系统配置信息
|
||||
export function updateSystemConfigs(params) {
|
||||
return request.put('/sms/v1/system-configs', params, {
|
||||
headers: { 'Content-Type': 'multipart/form-data', BsmAjaxHeader: true, options: { noSeri: true } }
|
||||
headers: { 'Content-Type': 'multipart/form-data', BsmAjaxHeader: true, options: { noSeri: true } },
|
||||
})
|
||||
}
|
||||
// 测试连接
|
||||
|
|
|
@ -10,7 +10,7 @@ const state = {
|
|||
isCollapsed: false,
|
||||
sideMenuData: [],
|
||||
pageConfig: {},
|
||||
systemConfig: JSON.parse(localStorage.getItem('systemConfig')) || {},
|
||||
systemConfig: {},
|
||||
userData: null,
|
||||
operateTime: '',
|
||||
basePath: '',
|
||||
|
@ -66,10 +66,6 @@ const mutations = {
|
|||
state.pageConfig = data
|
||||
},
|
||||
SETTING_SYSTEM_CONFIG(state, data) {
|
||||
// 为什么不用 csc 的方式 管理端父传子是异步方式 可能导致表格列渲染完成后接口还没返回
|
||||
data.projectConfigLabel = data.projectConfigLabel || '项目'
|
||||
data.serviceConfigLabel = data.serviceConfigLabel || '业务'
|
||||
localStorage.setItem('systemConfig', JSON.stringify(data))
|
||||
state.systemConfig = data
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +102,7 @@ const actions = {
|
|||
}
|
||||
},
|
||||
async GetSystemConfigs({ commit }) {
|
||||
const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime,serviceConfigLabel,projectConfigLabel' })
|
||||
const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime' })
|
||||
if (data.success) {
|
||||
commit('SETTING_SYSTEM_CONFIG', data.data)
|
||||
}
|
||||
|
|
|
@ -167,9 +167,7 @@ const actions = {
|
|||
// 重置标签信息
|
||||
dispatch('tagsView/delAllViews', null, { root: true })
|
||||
removeToken()
|
||||
// 正常云管环境
|
||||
const isNotIframeChild = window.top === window.self
|
||||
if (redirectToLogin && isNotIframeChild) window.location.href = '/login'
|
||||
if (redirectToLogin) window.location.href = '/login'
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
|
|
|
@ -5,15 +5,13 @@ import Cookies from 'js-cookie'
|
|||
import { tokenKey } from '@/config'
|
||||
|
||||
export function getToken() {
|
||||
return Cookies.get(tokenKey) || localStorage.getItem(tokenKey) || ''
|
||||
return Cookies.get(tokenKey)
|
||||
}
|
||||
|
||||
export function setToken(token = '') {
|
||||
localStorage.setItem(tokenKey, token)
|
||||
export function setToken(token) {
|
||||
return Cookies.set(tokenKey, token)
|
||||
}
|
||||
|
||||
export function removeToken() {
|
||||
localStorage.removeItem(tokenKey)
|
||||
return Cookies.remove(tokenKey)
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ export default {
|
|||
localStorage.removeItem('cmcLoginData')
|
||||
}
|
||||
const { redirect } = route.query
|
||||
const path = redirect ? redirect.split('/#')[1] : '/cop-web/task/history/list'
|
||||
const path = redirect ? redirect.split('/#')[1] : '/sms-web/resource_dashboard'
|
||||
router.replace(path)
|
||||
localStorage.removeItem('lockData')
|
||||
}
|
||||
|
|
|
@ -1,40 +1,15 @@
|
|||
<template>
|
||||
<el-empty v-if="isError" :description="description" />
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { setToken } from 'utils/auth'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { idpLogin } from 'services/index'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const isError = ref(false)
|
||||
const description = ref('')
|
||||
const init = async () => {
|
||||
// sso?ticket=11&redirect=/cop-web/host-resource/vm
|
||||
const { token, ticket, redirect = '/home' } = route.query
|
||||
console.log(route.query)
|
||||
const path = decodeURIComponent(redirect as string)
|
||||
if (token) {
|
||||
setToken(token as string)
|
||||
router.replace(path)
|
||||
} else if (ticket) {
|
||||
const res = await idpLogin(ticket).catch((err) => {
|
||||
description.value = err.message
|
||||
isError.value = true
|
||||
return err
|
||||
})
|
||||
if (!res.success) {
|
||||
isError.value = true
|
||||
return
|
||||
}
|
||||
const userInfo = res.data
|
||||
const { token } = userInfo
|
||||
setToken(token)
|
||||
router.replace(path)
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
const { token, redirect = '/home' } = route.query
|
||||
setToken(token)
|
||||
router.push(redirect as string)
|
||||
</script>
|
||||
|
|
|
@ -12,7 +12,7 @@ function resolve(dir: string) {
|
|||
}
|
||||
|
||||
const httpType = 'https://'
|
||||
const proxyUrl = '10.10.33.214:60006' // AI_OPS
|
||||
const proxyUrl = 'develop.cmp56.com:60006/' // 代理地址设置
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
|
|
Loading…
Reference in New Issue