Commit bd46f449 authored by jiangqiuyu's avatar jiangqiuyu

Merge branch 'main' of https://gitlab.33.cn/guxukai/baas3-fe

parents 149289ca 97283f57
> 1% > 1%
last 2 versions last 2 years
not dead not dead
...@@ -25,4 +25,10 @@ module.exports = { ...@@ -25,4 +25,10 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': 'off' '@typescript-eslint/ban-types': 'off'
}, },
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
} }
.DS_Store .DS_Store
node_modules node_modules
/dist /dist
src/assets/font src/assets/font/font.*
tailwind.css tailwind.css
auto-imports.d.ts
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local
......
// Generated by 'unplugin-auto-import'
// We suggest you to commit this file into source control
declare global {
const ElAside: typeof import('element-plus/es')['ElAside']
const ElAvatar: typeof import('element-plus/es')['ElAvatar']
const ElBadge: typeof import('element-plus/es')['ElBadge']
const ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
const ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
const ElButton: typeof import('element-plus/es')['ElButton']
const ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
const ElContainer: typeof import('element-plus/es')['ElContainer']
const ElDropdown: typeof import('element-plus/es')['ElDropdown']
const ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
const ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
const ElForm: typeof import('element-plus/es')['ElForm']
const ElFormItem: typeof import('element-plus/es')['ElFormItem']
const ElHeader: typeof import('element-plus/es')['ElHeader']
const ElInput: typeof import('element-plus/es')['ElInput']
const ElLoadingDirective: typeof import('element-plus/es')['ElLoadingDirective']
const ElMain: typeof import('element-plus/es')['ElMain']
const ElMenu: typeof import('element-plus/es')['ElMenu']
const ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
const ElRow: typeof import('element-plus/es')['ElRow']
const ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
}
export {}
module.exports = {
serverPort: 8010,
qsArrayFormat: 'none',
mockPrefix: '/mock',
apiPrefix: '/root',
timeout: 30000,
appName: 'BAAS系统',
}
module.exports = isProduction => { const { merge } = require('lodash')
return { module.exports = merge(require('./basic.config'), {})
serverPort: 8010,
qsArrayFormat: 'none',
mockPrefix: '/mock',
apiPrefix: '/root',
timeout: 30000,
}
}
module.exports = () => { const { merge } = require('lodash')
return { module.exports = merge(require('./basic.config'), {})
serverPort: 8010,
qsArrayFormat: 'none',
mockPrefix: '/mock',
apiPrefix: '/root',
timeout: 30000,
}
}
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
"serve": "vue-cli-service serve --mode dev", "serve": "vue-cli-service serve --mode dev",
"build": "vue-cli-service build --mode prod", "build": "vue-cli-service build --mode prod",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"font": " icon-font-generator src/assets/icons/svg/*.svg -o src/assets/font --name font --prefix font",
"tailwind": "npx tailwindcss -i src/assets/css/tailwind.css -o ./tailwind.css --watch", "tailwind": "npx tailwindcss -i src/assets/css/tailwind.css -o ./tailwind.css --watch",
"prepare": "husky install" "prepare": "husky install"
}, },
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
"eslint-plugin-prettier": "^3.3.1", "eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^7.0.0", "eslint-plugin-vue": "^7.0.0",
"husky": "^7.0.0", "husky": "^7.0.0",
"icon-font-generator": "^2.1.11",
"image-webpack-loader": "^8.0.1", "image-webpack-loader": "^8.0.1",
"lint-staged": "^12.1.2", "lint-staged": "^12.1.2",
"lodash-webpack-plugin": "^0.11.6", "lodash-webpack-plugin": "^0.11.6",
...@@ -69,11 +71,12 @@ ...@@ -69,11 +71,12 @@
"sass": "^1.45.0", "sass": "^1.45.0",
"sass-loader": "^12.4.0", "sass-loader": "^12.4.0",
"svg-sprite-loader": "^6.0.11", "svg-sprite-loader": "^6.0.11",
"svgtofont": "^3.13.1",
"typescript": "^4.5.4", "typescript": "^4.5.4",
"typescript-json-serializer": "^3.4.4", "typescript-json-serializer": "^3.4.4",
"unplugin-vue-components": "^0.17.9", "unplugin-auto-import": "^0.5.5",
"webpack-bundle-analyzer": "^4.5.0" "unplugin-vue-components": "^0.17.11",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-shell-plugin-next": "^2.2.2"
}, },
"engines": { "engines": {
"node": ">=14" "node": ">=14"
......
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M16.52107,8.86833649 C16.52107,11.0003454 14.7927519,12.7286306 12.6607759,12.7286306 C10.5287999,12.7286306 8.80048176,11.0003454 8.80048176,8.86833649 C8.80048176,6.73639179 10.5287999,5.00804238 12.6607759,5.00804238 C14.7927519,5.00804238 16.52107,6.73639179 16.52107,8.86833649 Z M15.8469996,12.910708 C14.9472938,13.6211306 13.8321509,14.0153953 12.6607775,14.0153953 C11.4758274,14.0153953 10.3497811,13.6118988 9.44598882,12.8878353 C7.06373565,13.7620629 6.00000082,16.8181937 6.00000082,18.213465 L19.2536773,18.213465 C19.2536773,16.8301925 18.1817368,13.7958737 15.8469996,12.910708 Z"></path>
</svg>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M10.5854611,18.8723291 C11.0022801,19.1224292 11.335747,18.9557104 11.335747,18.4555101 L11.335747,12.619957 C11.335747,12.1197567 11.0022801,11.619571 10.5854611,11.3694708 L5.75027931,8.36832754 C5.33346037,8.2015941 4.99999349,8.36832754 4.99999349,8.78516113 L4.99999349,14.6207143 C4.99999349,15.1208999 5.33346037,15.6211003 5.75027931,15.8711858 L10.5854611,18.8723291 L10.5854611,18.8723291 Z M6.50056513,6.53430367 C6.08374619,6.78438917 6.08374619,7.11785605 6.50056513,7.36795621 L11.2523802,10.3690995 C11.6692138,10.619185 12.2527662,10.619185 12.6695852,10.4524516 L17.4214149,8.03487531 C17.8382339,7.78477515 17.8382339,7.45130827 17.4214149,7.20120811 L12.4195143,4.20006482 C12.0860474,3.94997932 11.4191283,3.94997932 11.0022947,4.20006482 L6.50057979,6.53430367 L6.50056513,6.53430367 Z M12.6695852,18.4554955 C12.6695852,18.9556958 13.003052,19.1224292 13.419871,18.8723291 L18.1717007,16.4547382 C18.5885197,16.2046526 18.9219866,15.7044523 18.9219866,15.2042667 L18.9219866,9.36872817 C18.9219866,8.86854251 18.5885197,8.70180907 18.1717007,8.95189457 L13.419871,11.3694708 C13.003052,11.619571 12.6695852,12.1197567 12.6695852,12.619957 L12.6695852,18.4555101 L12.6695852,18.4554955 Z"></path>
</svg>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M16.3715117,18.8986667 C15.233914,18.8967465 14.2325264,18.1481962 13.9086783,17.0576667 L10.031845,17.0576667 C9.70845258,18.1480146 8.70747212,18.8966152 7.57017834,18.8986667 C6.88677747,18.8971216 6.23199817,18.624079 5.74996449,18.1396384 C5.26793081,17.6551979 4.99815284,16.9990667 5.00000212,16.3156667 C5.00000212,14.89 6.14917834,13.735 7.57017834,13.735 C7.79767834,13.735 8.026345,13.7676667 8.24567834,13.8283333 L10.1730117,10.4286667 C9.67720132,9.94267726 9.39833636,9.27727099 9.39951166,8.583 C9.39951166,7.15616666 10.5510117,6 11.970845,6 C13.3906783,6 14.543345,7.155 14.543345,8.58183334 C14.543345,9.227 14.3030117,9.8465 13.8666783,10.3225 L15.859345,13.7875 C16.6177185,13.6348112 17.4045695,13.830867 18.0026411,14.3215344 C18.6007127,14.8122019 18.9467388,15.5455765 18.9451836,16.3191667 C18.9458244,17.7411315 17.794641,18.8949253 16.3726783,18.8975 L16.3715117,18.8986667 Z M12.6066783,11.082 C12.2392016,11.1781634 11.8547568,11.1901274 11.4820117,11.117 L9.49867834,14.6146667 C9.74601168,14.8958333 9.930345,15.2283333 10.035345,15.5876667 L13.906345,15.5876667 C14.0288207,15.170585 14.2543022,14.7910379 14.5620117,14.484 L12.6066783,11.082 Z"></path>
</svg>
\ No newline at end of file
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M16.6248248,16.7367614 L6.63398813,16.7367614 C5.1391954,16.7367614 4.01213252,15.5368462 4.01213252,13.945099 C4.01213252,12.5974721 4.81160648,11.5196347 5.98748991,11.2314121 C6.28384634,9.7885033 7.55245889,8.73112371 9.04513895,8.73112371 C9.48647817,8.73112371 9.92114483,8.8246451 10.3193501,9.00387093 C11.0700563,7.75957182 12.3987219,7.00108386 13.8688843,7.00108386 C16.1599291,7.00108386 18.0247933,8.87337761 18.0247933,11.1760598 C18.0247933,11.2935425 18.0198461,11.4110429 18.0103919,11.5260079 C18.8639329,12.0216431 19.4033005,12.9431596 19.4033005,13.9450813 C19.4033005,15.4847862 18.1571352,16.7367614 16.6248248,16.7367614 Z"></path>
</svg>
\ No newline at end of file
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M11.3205078,12.4320313 L8.38925781,12.4320313 C6.52714844,12.4320313 5.01503906,13.9359375 5.00546875,15.7994141 C5.00546875,17.5576172 6.43144531,18.9822622 8.18828125,18.9822622 C9.0796875,18.9863281 9.93554688,18.6363281 10.5685547,18.0074219 C11.2001953,17.3785156 11.5556641,16.5240234 11.5556641,15.6326172 L11.5556641,12.6330078 C11.5515625,12.5755859 11.5242188,12.5208984 11.4791016,12.4839844 C11.4353516,12.4457031 11.3779297,12.4279297 11.3205078,12.4320313 Z M12.6302734,11.5597656 L15.434375,11.5597656 C16.3777344,11.5597656 17.2828125,11.1837891 17.9472656,10.5152344 C18.6130859,9.84667969 18.9849609,8.94023438 18.9795517,7.996875 C18.9795517,6.34667969 17.6423828,5.00820313 15.9921875,5.00820313 C14.0220703,5.01914063 12.4292969,6.61875 12.4292969,8.59023438 L12.4292969,11.3191406 C12.4238281,11.3779297 12.4416016,11.4367188 12.4785156,11.4818359 C12.5167969,11.5269531 12.5714844,11.5542969 12.6302734,11.5597656 Z M15.8882813,12.4320313 L12.6302734,12.4320313 C12.5728516,12.4320313 12.5167969,12.4552734 12.4757813,12.4962891 C12.4347656,12.5373047 12.4115234,12.5933594 12.4115234,12.6507813 L12.4115234,15.9087891 C12.4210938,17.6027344 13.7923828,18.9740234 15.4863281,18.9835938 C17.4154297,18.9835938 18.9794922,17.4195313 18.9794922,15.4904297 C18.9603516,13.7951172 17.5822266,12.4320313 15.8882813,12.4320313 L15.8882813,12.4320313 Z M8.49863281,5.00820313 C6.56953125,5.00820313 5.00546875,6.57363281 5.00546875,8.50273438 C5.00546875,10.1912109 6.37402344,11.5597656 8.0625,11.5597656 L11.3246094,11.5597656 C11.3820313,11.5597656 11.4380859,11.5365234 11.4791016,11.4955078 C11.5201172,11.4544922 11.5433594,11.3984375 11.5433594,11.3410156 L11.5433594,8.06523438 C11.5419922,6.38222656 10.1816406,5.01640625 8.49863281,5.00820313 Z"></path>
</svg>
\ No newline at end of file
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M11.093804,15.7585235 C8.53702065,15.7585235 6.4314344,15.0065284 5.45384078,13.8785358 C5.15304274,14.2545333 5.00264373,14.7057304 5.00264373,15.0817279 C5.00264373,16.8113166 7.70982605,18.2401073 11.093804,18.2401073 C14.4777819,18.2401073 17.1849642,16.8113166 17.1849642,15.0817279 C17.1849642,14.6305309 17.0345652,14.2545333 16.7337671,13.8785358 C15.7561735,15.0065284 13.6505873,15.7585235 11.093804,15.7585235 Z M11.093804,12.2241466 C8.61222016,12.2241466 6.4314344,11.4721515 5.52904029,10.3441589 C5.15304275,10.7201564 5.00264373,11.1713535 5.00264373,11.6225505 C5.00264373,13.3521392 7.70982605,14.7809299 11.093804,14.7809299 C14.4777819,14.7809299 17.1849642,13.3521392 17.1849642,11.6225505 C17.1849642,11.1713535 17.0345652,10.7201564 16.6585676,10.3441589 C15.7561735,11.4721515 13.5753878,12.2241466 11.093804,12.2241466 L11.093804,12.2241466 Z M5.00264373,8.16337309 C5.00264373,9.8929618 7.70982605,11.3217525 11.093804,11.3217525 C14.4777819,11.3217525 17.1849642,9.89296179 17.1849642,8.16337309 C17.1849642,6.43378439 14.4777819,5.00499372 11.093804,5.00499372 C7.70982605,5.00499372 5.00264373,6.43378439 5.00264373,8.16337309 Z"></path>
</svg>
\ No newline at end of file
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M12.7856525,5.29451465 C12.3584042,4.90695751 11.706772,4.90695751 11.2795237,5.29451465 L5.18928141,11.0774479 C4.96232366,11.2859844 4.94574596,11.6384344 5.15212775,11.8673533 C5.35850954,12.0962721 5.71078713,12.1161806 5.94164659,11.9119719 L6.03848914,11.820024 L6.03848914,17.8557268 C6.03811794,18.1539803 6.15633861,18.4401453 6.3671047,18.6511737 C6.5778708,18.8622021 6.86388852,18.9807785 7.16214233,18.9807785 L10.432064,18.9807785 L10.432064,15.597932 C10.4317855,15.3878579 10.515066,15.1862975 10.6635454,15.037687 C10.8120247,14.8890764 11.0135115,14.805618 11.2235858,14.8057111 L12.7622285,14.8057111 C12.9723028,14.805618 13.1737895,14.8890764 13.3222689,15.037687 C13.4707483,15.1862975 13.5540287,15.3878579 13.5537502,15.597932 L13.5537502,18.9807785 L16.9012858,18.9807785 C17.1996002,18.9807785 17.4857078,18.8623359 17.6965495,18.6512974 C17.9073913,18.440259 18.0256599,18.1540409 18.0252886,17.8557268 L18.0252886,11.8937921 C18.2749116,12.1196415 18.6290687,12.1025105 18.8367382,11.8710673 C18.9366207,11.7604582 18.9884634,11.6146957 18.9808575,11.4658567 C18.9732516,11.3170178 18.9068205,11.1772992 18.7961832,11.0774479 L12.7856525,5.29486426 L12.7856525,5.29451465 Z"></path>
</svg>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M16.6666667,6 C17.7712362,6 18.6666667,6.8954305 18.6666667,8 L18.6666667,16 C18.6666667,17.1045695 17.7712362,18 16.6666667,18 L8,18 C6.8954305,18 6,17.1045695 6,16 L6,8 C6,6.8954305 6.8954305,6 8,6 L16.6666667,6 Z M17.22,11.512 L16.39,11.512 L15.7833333,10.028 L15.6853333,9.96533333 L14.9253333,9.95866666 L14.8246667,10.0206667 L13.26,13.816 L12.4666667,8.18 L12.376,8.09666667 L11.594,8 L11.4806667,8.062 L9.76066666,12.278 L8.836,11.5626667 L8.552,11.4626667 L7.43933333,11.4573333 L7.33333334,11.5533333 L7.33333334,12.3506667 L7.43933333,12.4466667 L8.34066667,12.4466667 L9.674,13.4686667 L9.77333333,13.4873333 L10.4046667,13.3153333 L10.474,13.2573333 L11.7226667,10.1946667 L12.508,15.8146667 L12.598,15.8966667 L13.38,16 L13.4946667,15.9386667 L15.304,11.5473333 L15.564,12.1846667 L15.9813333,12.4766667 L16.0433333,12.4946667 L17.2273333,12.4946667 L17.3333333,12.398 L17.3266667,11.6073333 L17.22,11.512 L17.22,11.512 Z"></path>
</svg>
\ No newline at end of file
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M18.6668129,6 L15.5560432,6 C14.8227903,6 13.7986526,6.41272987 13.280154,6.91720451 L8.05522727,12.0008107 C7.53675638,12.5052583 7.53675638,13.3307451 8.05522727,13.8352197 L11.9469669,17.621644 C12.4654378,18.1261187 13.3138725,18.1261187 13.8323712,17.621644 L19.0572423,12.5380919 C19.5757965,12.0336172 20,11.0371798 20,10.3237595 L20,7.29712785 C20,6.58370753 19.4000658,6 18.6668129,6 Z M16.8892302,10.3237595 C16.1529221,10.3237595 15.5560432,9.74302456 15.5560432,9.02663166 C15.5560432,8.31023875 16.1529221,7.7295038 16.8892302,7.7295038 C17.6255383,7.7295038 18.2224173,8.31023875 18.2224173,9.02663166 C18.2224173,9.74302456 17.6255383,10.3237595 16.8892302,10.3237595 Z M6.09355362,13.223705 L10.8482819,17.8498304 C10.3446705,18.1087155 9.70310202,18.0327795 9.28059282,17.621644 L5.38885317,13.8352197 C4.87038228,13.3307451 4.87038228,12.5052583 5.38885317,12.0008107 L10.6137799,6.91720451 C11.1322785,6.41272987 12.1564162,6 12.8896691,6 L6.09355362,12.6122714 C5.92073925,12.7804386 5.92073925,13.0555648 6.09355362,13.223705 Z"></path>
</svg>
\ No newline at end of file
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M17.765625,12 C17.765625,11.18125 18.2796875,10.4875 19,10.2109375 C18.828125,9.5359375 18.5625,8.9 18.215625,8.315625 C17.509375,8.6296875 16.65625,8.5015625 16.078125,7.921875 C15.5,7.34375 15.371875,6.4890625 15.6859375,5.784375 C15.1,5.4375 14.4640625,5.171875 13.7890625,5 C13.5109375,5.7203125 12.8171875,6.234375 12,6.234375 C11.18125,6.234375 10.4875,5.7203125 10.2109375,5 C9.5359375,5.171875 8.9,5.4375 8.315625,5.784375 C8.6296875,6.490625 8.5015625,7.34375 7.9234375,7.921875 C7.3453125,8.5 6.490625,8.628125 5.7859375,8.315625 C5.4375,8.9 5.171875,9.5359375 5,10.2109375 C5.7203125,10.4890625 6.234375,11.1828125 6.234375,12 C6.234375,12.81875 5.7203125,13.5125 5,13.7890625 C5.171875,14.4640625 5.4375,15.1 5.784375,15.684375 C6.490625,15.3703125 7.34375,15.4984375 7.921875,16.078125 C8.5,16.65625 8.628125,17.5109375 8.3140625,18.215625 C8.9,18.5625 9.5359375,18.828125 10.2109375,19 C10.4890625,18.2796875 11.1828125,17.765625 12,17.765625 C12.81875,17.765625 13.5125,18.2796875 13.7890625,19 C14.4640625,18.828125 15.1,18.5625 15.684375,18.215625 C15.3703125,17.509375 15.4984375,16.65625 16.0765625,16.078125 C16.6546875,15.5 17.509375,15.371875 18.2140625,15.684375 C18.5625,15.1 18.828125,14.4640625 19,13.7890625 C18.2796875,13.5125 17.765625,12.81875 17.765625,12 Z M12,13.921875 C10.9390625,13.921875 10.078125,13.0609375 10.078125,12 C10.078125,10.9390625 10.9390625,10.078125 12,10.078125 C13.0609375,10.078125 13.921875,10.9390625 13.921875,12 C13.921875,13.0609375 13.0609375,13.921875 12,13.921875 Z"></path>
</svg>
\ No newline at end of file
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M5,15.5676909 C5.03095109,16.1522602 5.50465989,16.6076771 6.07378825,16.6000156 L11.5915245,16.6000156 L11.5915245,18.1714107 L9.47996209,18.1714107 C9.25750784,18.1714107 9.07717303,18.3568968 9.07717303,18.5857054 C9.07717303,18.814514 9.25750784,19 9.47996209,19 L14.5200379,19 C14.7424922,19 14.922827,18.814514 14.922827,18.5857054 C14.922827,18.3568968 14.7424922,18.1714107 14.5200379,18.1714107 L12.4084755,18.1714107 L12.4084755,16.6000156 L17.9262118,16.6000156 C18.4948551,16.6068393 18.9687246,16.1516026 19,15.5676909 L19,14.6201747 L5,14.6201747 L5,15.5676909 L5,15.5676909 Z M17.9271595,7.00007804 L6.07284052,7.00007804 C5.4909608,6.99352847 5.01243475,7.47007065 5,8.06847077 L5,13.696054 L19,13.696054 L19,8.06847077 C18.9875632,7.46968644 18.508459,6.99298965 17.9262118,7.00007804 L17.9271595,7.00007804 Z"></path>
</svg>
\ No newline at end of file
// 插入样式块
// todo 光标选中
// 清除浮动
@mixin clearFix {
&:after {
content: "";
display: table;
clear: both;
}
}
// 滚动条样式
@mixin scrollBar {
&::-webkit-scrollbar {
/*滚动条整体样式*/
width: 8px; /*高宽分别对应横竖滚动条的尺寸*/
height: 8px;
}
&::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 10px;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #2555c6;
}
&::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 10px;
background: #ededed;
}
}
// 表格 todo 先留着,后面写到reset-ui里
@mixin table {
// border-radius: 8px 8px 0px 0px;
// /deep/ th {
// height: 50px;
// background: #f6f6f6;
// font-family: PingFangSC-Medium, PingFang SC;
// color: #636363;
// }
// /deep/ td {
// height: 50px;
// padding: 0;
// }
}
// 主色
$g-color-theme: #1953cd;
// 辅助色
$g-color-success: #509c00;
$g-color-wait: #e6a23b;
$g-color-danger: #e02020;
// 中性色
$font-color-mian: #272727; //85
$font-color-usually: #5a5a5a; //65
$font-color-minor: #8c8c8c; //45
$font-color-place-deep: #a6a6a6; //35
$font-color-place-shallow: #c0c0c0; //25
$border-color: #d9d9d9;
$line-color: #e9e9e9;
$background-color-shallow: #f7f7f7;
$background-color-deep: #f5f7fa;
$disabled-color: #f2f4f7;
// 导航菜单 sidebar
$sidebar-bg: #203054;
$sidebar-menu-color: #ffffff;
$sidebar-menu-color-active: #ffffff;
$sidebar-menu-bg-active: #1953cd;
$sidebar-width: 208px;
$navbar-height: 60px;
- [x] [登录注册入口](./entry)
- [ ] [个人控制台](./account)
- [ ] [联盟控制台](./federation)
- [ ] [企业控制台](./organization)
- [ ] [系统控制台](./system)
- [ ] [超管控制台](./super)
...@@ -9,52 +9,85 @@ ...@@ -9,52 +9,85 @@
"element": "home/index.vue", "element": "home/index.vue",
"title": "home", "title": "home",
"level": 1, "level": 1,
"icon": "401", "icon": "homepage",
"showInAsideMenu": true "showInAsideMenu": true
} }
}, },
{ {
"path": "admin", "path": "notice",
"name": "admin", "name": "notice",
"element": "home/index.vue",
"meta": { "meta": {
"title": "管理员", "element": "home/index.vue",
"title": "站内信",
"level": 1, "level": 1,
"icon": "401", "showInAsideMenu": false
"showInAsideMenu": true
},
"children": [
{
"path": "",
"name": "admin-list",
"meta": {
"element": "admin/index.vue",
"title": "列表",
"level": 2,
"icon": "401",
"showInAsideMenu": true
} }
}, },
{ {
"path": "create", "path": "announce-list",
"name": "admin-create", "name": "announce-list",
"element": "home/index.vue",
"meta": { "meta": {
"element": "admin/create.vue", "element": "home/index.vue",
"title": "新建", "title": "公告列表",
"level": 2, "level": 1,
"icon": "401",
"showInAsideMenu": false "showInAsideMenu": false
} }
}, },
{ {
"path": "edit/:id", "path": "chain",
"name": "admin-edit", "name": "chain",
"meta": { "meta": { "title": "链管理", "icon": "chain", "level": 1, "showInAsideMenu": true},
"element": "admin/edit.vue", "children": [
"title": "编辑", {
"level": 2, "path": "alliance-chain",
"icon": "401", "name": "alliance-chain",
"showInAsideMenu": false "element": "home/index.vue",
"meta": { "title": "联盟链","level": 2,"showInAsideMenu": true }
},
{
"path": "parallel-chain",
"name": "parallel-chain",
"element": "home/index.vue",
"meta": { "title": "平行链","level": 2,"showInAsideMenu": true }
},
{
"path": "chain-log",
"name": "chain-log",
"element": "home/index.vue",
"meta": { "title": "链日志","level": 2,"showInAsideMenu": true }
},
{
"path": "address-management",
"name": "address-management",
"element": "home/index.vue",
"meta": { "title": "地址管理","level": 2,"showInAsideMenu": true }
},
{
"path": "key-management",
"name": "key-management",
"element": "home/index.vue",
"meta": { "title": "密钥管理", "level": 2,"showInAsideMenu": true }
} }
]
},
{
"path": "openapi",
"name": "openapi",
"meta": { "title": "OpenApi", "icon": "app" },
"children": [
{
"path": "app-management",
"name": "app-management",
"element": "home/index.vue",
"meta": { "title": "授权管理", "level": 2,"showInAsideMenu": true }
},
{
"path": "app-openapi",
"name": "app-openapi",
"element": "home/index.vue",
"meta": { "title": "接口文档", "level": 2,"showInAsideMenu": true }
} }
] ]
} }
......
...@@ -24,6 +24,11 @@ const routes = [ ...@@ -24,6 +24,11 @@ const routes = [
component: () => import('@shared/layouts/default-layout.vue'), component: () => import('@shared/layouts/default-layout.vue'),
children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES], children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES],
}, },
{
path: '/proxy',
name: 'proxy',
component: () => import('@account/views/fixed/proxy/index.vue'),
},
...FIXED_ROUTES, ...FIXED_ROUTES,
...SYSTEM_ROUTES, ...SYSTEM_ROUTES,
] ]
......
<template>
<div></div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
const $router = useRouter()
$router.push({ name: 'home' })
</script>
<template>
<el-config-provider :locale="zhCn">
<router-view />
</el-config-provider>
</template>
<script setup>
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
import { useSplash } from '@shared/hooks/useSplash'
useSplash()
</script>
<style></style>
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
import { createApp } from 'vue'
import App from './App.vue'
import { router } from './router'
import { store } from '@shared/store'
import { createMockServer } from '@shared/mock'
import 'tailwindcss/tailwind.css'
import ElementPlus from 'element-plus'
import Components from '@shared/components/global/index'
import '@shared/assets/sass/index.scss'
import '@assets/icons'
import '@assets/font/font.css'
import '@assets/css/tailwind.css'
createMockServer()
const app = createApp(App)
app.use(store).use(router).use(ElementPlus).use(Components).mount('#app')
import { createRouter, createWebHistory } from 'vue-router'
import { SYSTEM_ROUTES } from '@shared/router/constants'
const FIXED_ROUTES = [
{
path: '/login',
name: 'login',
component: () => import('@entry/views/fixed/login/index.vue'),
},
{
path: '/proxy',
name: 'proxy',
component: () => import('@entry/views/fixed/proxy/index.vue'),
},
{
path: '/retrieve',
name: 'retrieve',
component: () => import('@entry/views/fixed/retrieve/index.vue'),
},
{
path: '/register',
name: 'register',
component: () => import('@entry/views/fixed/register/index.vue'),
},
]
const routes = [...FIXED_ROUTES, ...SYSTEM_ROUTES]
export const router = createRouter({
history: createWebHistory('/entry'),
routes,
})
<template>
<div class="flex flex-row justify-center items-center h-screen w-screen">
<img src="@/assets/icons/svg/401.svg" class="w-[120px]" />
<div class="ml-12">
<p class="mb-6 text-gray-700 text-4xl">抱歉 , 你没有权限 !</p>
<el-button type="info" class="px-12" @click="back">返回</el-button>
</div>
</div>
</template>
<script setup>
import { getCurrentInstance } from 'vue'
let { proxy } = getCurrentInstance()
const back = function () {
proxy.$router.back()
}
</script>
This diff is collapsed.
<template>
<div class="flex flex-row justify-center items-center h-screen w-screen">
<i class="font-404 !text-[120px] text-red-100" />
<div class="ml-12">
<p class="mb-6 text-gray-700 text-4xl">抱歉 , 页面丢失了 .</p>
<el-button type="info" class="px-12" @click="back">返回</el-button>
</div>
</div>
</template>
<script setup>
import { getCurrentInstance } from 'vue'
let { proxy } = getCurrentInstance()
const back = function () {
proxy.$router.back()
}
</script>
...@@ -2,23 +2,10 @@ ...@@ -2,23 +2,10 @@
<div id="login-page" class="h-screen w-screen flex justify-center items-center"> <div id="login-page" class="h-screen w-screen flex justify-center items-center">
<el-form ref="loginFormRef" status-icon label-width="120px" :model="authLoginForm"> <el-form ref="loginFormRef" status-icon label-width="120px" :model="authLoginForm">
<el-form-item label="用户名" prop="username" :error="v$.username.$errors.map(_ => _.$message)[0]"> <el-form-item label="用户名" prop="username" :error="v$.username.$errors.map(_ => _.$message)[0]">
<el-input <el-input v-model="authLoginForm.username" type="text" placeholder="用户名或手机号"> </el-input>
v-model="authLoginForm.username"
type="text"
autocomplete="off"
readonly
onfocus="this.removeAttribute('readonly')"
>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="密码" prop="password" :error="v$.password.$errors.map(_ => _.$message)[0]"> <el-form-item label="密码" prop="password" :error="v$.password.$errors.map(_ => _.$message)[0]">
<el-input <el-input v-model="authLoginForm.password" type="password" placeholder="请输入密码"></el-input>
v-model="authLoginForm.password"
type="password"
autocomplete="off"
readonly
onfocus="this.removeAttribute('readonly')"
></el-input>
</el-form-item> </el-form-item>
<el-form-item ref="verCodeRef" label="验证码" prop="verCode" :error="v$.verCode.$errors.map(_ => _.$message)[0]"> <el-form-item ref="verCodeRef" label="验证码" prop="verCode" :error="v$.verCode.$errors.map(_ => _.$message)[0]">
<div class="w-full h-full flex items-start gap-4"> <div class="w-full h-full flex items-start gap-4">
...@@ -57,17 +44,22 @@ ...@@ -57,17 +44,22 @@
import useVuelidate from '@vuelidate/core' import useVuelidate from '@vuelidate/core'
import { AuthLogin, AuthLoginPostReq } from '@shared/models/gateway/AuthLogin' import { AuthLogin, AuthLoginPostReq } from '@shared/models/gateway/AuthLogin'
import { reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { helpers, required } from '@vuelidate/validators' import { helpers, required } from '@vuelidate/validators'
import { useRequest } from 'vue-request' import { useRequest } from 'vue-request'
import { MessageUtils } from '@shared/utils/message-utils' import { MessageUtils } from '@shared/utils/message-utils'
import { GATEWAY_CODE } from '@shared/http/constants' import { GATEWAY_CODE } from '@shared/http/constants'
import { AuthRegisterStatus } from '@shared/models/gateway/AuthRegisterStatus' import { AuthRegisterStatus } from '@shared/models/gateway/AuthRegisterStatus'
import { AuthLicenseStatus } from '@shared/models/gateway/AuthLicenseStatus' import { AuthLicenseStatus } from '@shared/models/gateway/AuthLicenseStatus'
import { authStore } from '@shared/store/modules/auth' import { useAuth } from '@shared/store/modules/auth'
import { useLayout } from '@shared/store/modules/layout'
const $route = useRoute()
const authStore = useAuth()
const layoutStore = useLayout()
const $router = useRouter() const $router = useRouter()
const captchaUrl = ref(`${process.env.API_PREFIX}/api/kaptcha/kaptcha`) const captchaUrl = ref(`${process.env.API_PREFIX}/api/kaptcha/kaptcha`)
const authLoginForm = reactive(new AuthLoginPostReq({})) const authLoginForm = reactive(new AuthLoginPostReq({}))
authStore.$reset()
const rules: any = { const rules: any = {
username: { required: helpers.withMessage('用户名不能为空', required) }, username: { required: helpers.withMessage('用户名不能为空', required) },
password: { required: helpers.withMessage('密码不能为空', required) }, password: { required: helpers.withMessage('密码不能为空', required) },
...@@ -102,7 +94,7 @@ const handleSubmitForm = async () => { ...@@ -102,7 +94,7 @@ const handleSubmitForm = async () => {
authStore.$patch({ authStore.$patch({
loginInfo: res.data, loginInfo: res.data,
}) })
await $router.push('/') $router.push({ name: 'proxy' })
} else { } else {
MessageUtils.warning(res?.message) MessageUtils.warning(res?.message)
} }
......
<template>
<g-query-wrapper :error="userError" :data="userData" :run="userRun" :loading="userLoading" />
</template>
<script lang="ts" setup>
import { useAuth } from '@shared/store/modules/auth'
import { useRouter } from 'vue-router'
import { useUser } from '@shared/store/modules/user'
import { useRequest } from 'vue-request'
import { UserToken } from '@shared/models/user-service/UserToken'
import { GATEWAY_CODE } from '@shared/http/constants'
const authStore = useAuth()
const $router = useRouter()
const userStore = useUser()
const {
data: userData,
loading: userLoading,
error: userError,
run: userRun,
} = useRequest(() =>
UserToken.get({
token: authStore.loginInfo.token,
}).then(res => {
if (res.code === GATEWAY_CODE.success) {
userStore.$patch({ userInfo: res.data })
//超管跳转
if (authStore.loginInfo.id === 10000000) {
authStore.$patch({
consoleInfo: {
consoleName: '超管',
consoleObjectId: '1',
consoleTypeId: '1',
},
})
window.location.replace(`${origin}/super/proxy`)
return
}
//其余跳转
window.location.replace(`${origin}/account/proxy`)
}
return res
}),
)
</script>
...@@ -25,7 +25,11 @@ const routes = [ ...@@ -25,7 +25,11 @@ const routes = [
component: () => import('@shared/layouts/default-layout.vue'), component: () => import('@shared/layouts/default-layout.vue'),
children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES], children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES],
}, },
...FIXED_ROUTES, {
path: '/proxy',
name: 'proxy',
component: () => import('@account/views/fixed/proxy/index.vue'),
},
...SYSTEM_ROUTES, ...SYSTEM_ROUTES,
] ]
export const router = createRouter({ export const router = createRouter({
......
<template>
<div></div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
const $router = useRouter()
$router.push({ name: 'home' })
</script>
...@@ -25,7 +25,11 @@ const routes = [ ...@@ -25,7 +25,11 @@ const routes = [
component: () => import('@shared/layouts/default-layout.vue'), component: () => import('@shared/layouts/default-layout.vue'),
children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES], children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES],
}, },
...FIXED_ROUTES, {
path: '/proxy',
name: 'proxy',
component: () => import('@account/views/fixed/proxy/index.vue'),
},
...SYSTEM_ROUTES, ...SYSTEM_ROUTES,
] ]
export const router = createRouter({ export const router = createRouter({
......
<template>
<div></div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
const $router = useRouter()
$router.push({ name: 'home' })
</script>
...@@ -25,7 +25,11 @@ const routes = [ ...@@ -25,7 +25,11 @@ const routes = [
component: () => import('@shared/layouts/default-layout.vue'), component: () => import('@shared/layouts/default-layout.vue'),
children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES], children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES],
}, },
...FIXED_ROUTES, {
path: '/proxy',
name: 'proxy',
component: () => import('@account/views/fixed/proxy/index.vue'),
},
...SYSTEM_ROUTES, ...SYSTEM_ROUTES,
] ]
export const router = createRouter({ export const router = createRouter({
......
<template>
<div></div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
const $router = useRouter()
$router.push({ name: 'home' })
</script>
...@@ -26,7 +26,11 @@ const routes = [ ...@@ -26,7 +26,11 @@ const routes = [
component: () => import('@shared/layouts/default-layout.vue'), component: () => import('@shared/layouts/default-layout.vue'),
children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES], children: [...CROPPED_ROUTES, ...LOOKUP_ROUTES],
}, },
...FIXED_ROUTES, {
path: '/proxy',
name: 'proxy',
component: () => import('@account/views/fixed/proxy/index.vue'),
},
...SYSTEM_ROUTES, ...SYSTEM_ROUTES,
] ]
export const router = createRouter({ export const router = createRouter({
......
<template>
<div></div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
const $router = useRouter()
$router.push({ name: 'home' })
</script>
<template> <template>
<div v-loading="loading"> <div>
<slot v-if="!loading" /> <slot v-if="!loading && !error && !hasError" />
<div v-if="loading">数据获取中...</div>
<div v-if="error">
{{ error }}
</div>
<div v-if="hasError">
{{ data.message }}
</div>
<div v-if="error || hasError">
<el-button @click="run">重新请求</el-button>
</div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, defineProps, defineEmits, onMounted } from 'vue' import { GATEWAY_CODE } from '@shared/http/constants'
import { HttpResponse } from '@shared/http/HttpResponse'
import { PropType } from 'vue'
const props = defineProps({ const props = defineProps({
loading: { loading: {
type: Boolean, type: Boolean,
...@@ -14,6 +27,7 @@ const props = defineProps({ ...@@ -14,6 +27,7 @@ const props = defineProps({
required: false, required: false,
}, },
data: { data: {
type: Object as PropType<HttpResponse>,
required: false, required: false,
}, },
run: { run: {
...@@ -21,4 +35,5 @@ const props = defineProps({ ...@@ -21,4 +35,5 @@ const props = defineProps({
required: true, required: true,
}, },
}) })
const hasError = props.data && props.data?.code !== GATEWAY_CODE.success
</script> </script>
...@@ -4,7 +4,7 @@ import { isPlainObject, merge } from 'lodash' ...@@ -4,7 +4,7 @@ import { isPlainObject, merge } from 'lodash'
import { addPendingRequest, removePendingRequest } from '@shared/http/utils' import { addPendingRequest, removePendingRequest } from '@shared/http/utils'
import { MessageUtils } from '@shared/utils/message-utils' import { MessageUtils } from '@shared/utils/message-utils'
import { HttpResponse } from '@shared/http/HttpResponse' import { HttpResponse } from '@shared/http/HttpResponse'
import { authStore } from '@shared/store/modules/auth' import { useAuth } from '@shared/store/modules/auth'
// 文件类型处理 // 文件类型处理
const formatFile = (params?: AxiosRequestConfig) => { const formatFile = (params?: AxiosRequestConfig) => {
if (params?.data) { if (params?.data) {
...@@ -46,6 +46,7 @@ class PureHttp { ...@@ -46,6 +46,7 @@ class PureHttp {
private httpInterceptorsRequest(): void { private httpInterceptorsRequest(): void {
this.axiosInstance.interceptors.request.use( this.axiosInstance.interceptors.request.use(
(config: PureHttpRequestConfig) => { (config: PureHttpRequestConfig) => {
const authStore = useAuth()
const token = authStore.loginInfo?.token const token = authStore.loginInfo?.token
if (token) { if (token) {
config.headers['Authorization'] = `Bearer ${token}` config.headers['Authorization'] = `Bearer ${token}`
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
</script> </script>
<script setup> <script setup>
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { computed, defineProps } from 'vue' import { computed } from 'vue'
const props = defineProps({ const props = defineProps({
menu: { menu: {
type: Object, type: Object,
......
<template>
<!-- 超管控制台和只有个人控制台时没有下拉框 -->
<div v-if="isSuperAdmin || onlyPersonal" class="toggle-menu">
{{ consoleName }}
</div>
<el-dropdown v-else class="toggle-menu" placement="bottom-start" trigger="click" @command="handleToggleConsole">
<span class="el-dropdown-link">
<span>{{ consoleName }}</span>
<el-icon class="el-icon--right">
<g-icon name="ArrowDown" />
</el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<div v-for="item in consoleList" v-show="item.child.length !== 0" :key="item.id">
<!-- 控制台系统类型 -->
<p class="auth-class">
<span>{{ item.name }}</span>
</p>
<!-- 控制台对象 -->
<el-dropdown-item
v-for="child in item.child"
:key="child.id"
class="text-overflow"
:class="{ 'is-active': consoleObjectId === child.id }"
:command="{ parent: item, child }"
>
<span class="auth-name">{{ child.name }}</span>
</el-dropdown-item>
</div>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
<script lang="ts">
export default {
name: 'console-menu',
}
</script>
<script lang="ts" setup>
import { useRequest } from 'vue-request'
import { AuthConsole } from '@shared/models/auth-service/AuthConsole'
import { GATEWAY_CODE } from '@shared/http/constants'
import { computed } from 'vue'
import { useUser } from '@shared/store/modules/user'
import { useAuth } from '@shared/store/modules/auth'
import { useRoute, useRouter } from 'vue-router'
const $router = useRouter()
const $route = useRoute()
const userStore = useUser()
const authStore = useAuth()
const consoleList = computed(() => authStore.consoleList)
const consoleName = computed(() => authStore.consoleInfo.consoleName)
const consoleObjectId = computed(() => authStore.consoleInfo.consoleObjectId)
const isSuperAdmin = computed(() => userStore.userInfo.id === '10000000')
const onlyPersonal = computed(
() =>
!authStore.consoleList.some(item => {
return item.id !== '0'
}),
)
const {
data: consoleData,
loading: consoleLoading,
error: consoleError,
run: consoleRun,
} = useRequest(
() =>
AuthConsole.get({
userId: userStore.userInfo.id,
}).then(res => {
if (res.code === GATEWAY_CODE.success) {
authStore.$patch({ consoleList: res.data })
}
return res
}),
{
ready: computed(() => Boolean(userStore.userInfo.id)),
},
)
// 切换控制台
const handleToggleConsole = ({ parent, child }) => {
if (child.id === authStore.consoleInfo.consoleObjectId) return
authStore.$patch({
consoleInfo: {
consoleName: child.name,
consoleObjectId: child.id,
consoleTypeId: parent.id,
},
})
const reference = {
0: 'account',
1: 'system',
2: 'federation',
3: 'organization',
}
userStore.$reset()
window.location.replace(`${window.location.origin}/${reference[parent.id]}/proxy`)
}
</script>
<style lang="scss" scoped>
@import '@/assets/styles/variables.scss';
@import '@/assets/styles/mixin.scss';
.toggle-menu {
font-size: 18px;
color: $font-color-usually;
}
.el-dropdown-menu {
@include scrollBar;
width: 200px;
max-height: 400px;
overflow-y: auto;
.auth-class {
height: 36px;
font-size: 16px;
line-height: 36px;
padding: 0 20px;
}
.auth-name {
padding-left: 15px;
font-size: 14px;
&::before {
content: '';
display: inline-block;
width: 10px;
height: 10px;
margin-right: 5px;
border-left: 1px solid #000;
border-bottom: 1px solid #000;
}
}
.el-dropdown-menu__item {
&.is-active {
background-color: #e8efffff;
color: $sidebar-bg !important;
}
}
}
</style>
...@@ -56,7 +56,10 @@ ...@@ -56,7 +56,10 @@
" "
> >
<el-row type="flex" justify="space-between" align="middle" class="h-full"> <el-row type="flex" justify="space-between" align="middle" class="h-full">
<div class="flex items-center gap-4">
<g-icon :name="isCollapse ? 'Expand' : 'Fold'" @click="fold" class="cursor-pointer" /> <g-icon :name="isCollapse ? 'Expand' : 'Fold'" @click="fold" class="cursor-pointer" />
<console-menu />
</div>
<div class="flex flex-row justify-start items-center"> <div class="flex flex-row justify-start items-center">
<router-link to="/search"> <router-link to="/search">
<g-icon name="Search" @click="fold" class="mr-6 text-xl cursor-pointer" /> <g-icon name="Search" @click="fold" class="mr-6 text-xl cursor-pointer" />
...@@ -106,15 +109,16 @@ import { onBeforeRouteUpdate } from 'vue-router' ...@@ -106,15 +109,16 @@ import { onBeforeRouteUpdate } from 'vue-router'
import { ref, toRaw, onMounted, getCurrentInstance } from 'vue' import { ref, toRaw, onMounted, getCurrentInstance } from 'vue'
import { ArrowRight } from '@element-plus/icons-vue' import { ArrowRight } from '@element-plus/icons-vue'
import AsideMenuList from '@shared/layouts/components/aside-menu-list/index.vue' import AsideMenuList from '@shared/layouts/components/aside-menu-list/index.vue'
import { layoutStore } from '@shared/store/modules/layout'
import { useRequest } from 'vue-request' import { useRequest } from 'vue-request'
import { AuthLicenseStatus } from '../models/gateway/AuthLicenseStatus' import { AuthLicenseStatus } from '../models/gateway/AuthLicenseStatus'
import { AuthLogout } from '../models/gateway/AuthLogout' import { AuthLogout } from '../models/gateway/AuthLogout'
import { GATEWAY_CODE } from '../http/constants' import { GATEWAY_CODE } from '../http/constants'
import { authStore } from '../store/modules/auth'
import { MessageUtils } from '../utils/message-utils' import { MessageUtils } from '../utils/message-utils'
import { useAuth } from '@shared/store/modules/auth'
const PROJECT_NAME = process.env.PROJECT_NAME import { useLayout } from '@shared/store/modules/layout'
import ConsoleMenu from './components/console-menu'
const layoutStore = useLayout()
const PROJECT_NAME = process.env.APP_NAME
let { proxy } = getCurrentInstance() let { proxy } = getCurrentInstance()
let currentActiveRoute = ref('home') let currentActiveRoute = ref('home')
...@@ -214,11 +218,11 @@ const { ...@@ -214,11 +218,11 @@ const {
error: logoutError, error: logoutError,
run: logoutRun, run: logoutRun,
} = useRequest(() => AuthLogout.delete(), { manual: true }) } = useRequest(() => AuthLogout.delete(), { manual: true })
//退出
const handleLogout = () => { const handleLogout = () => {
logoutRun().then(res => { logoutRun().then(res => {
if (res?.code === GATEWAY_CODE.success) { if (res?.code === GATEWAY_CODE.success) {
authStore.$reset() window.location.replace(window.location.origin + '/entry/login')
proxy.$router.replace({ name: 'login' })
} else { } else {
MessageUtils.warning(res?.message) MessageUtils.warning(res?.message)
} }
......
- [ ] app-service - jqy - [ ] app-service - jqy
- [x] auth-service - zk - [x] auth-service - zk
- [ ] chain-service - zk - [x] chain-service - zk
- [ ] cloud-service - zk - [ ] cloud-service - zk
- [x] commodity-service - gxk - [x] commodity-service - gxk
- [x] common-service - gxk - [x] common-service - gxk
......
...@@ -2,6 +2,7 @@ import { JsonProperty, Serializable } from 'typescript-json-serializer' ...@@ -2,6 +2,7 @@ import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios' import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse' import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model' import { Model } from '@shared/models/Model'
import { OperationObject } from '@shared/models/auth-service/OperationObject'
@Serializable() @Serializable()
export class AuthConsole extends Model<AuthConsole> { export class AuthConsole extends Model<AuthConsole> {
...@@ -10,8 +11,8 @@ export class AuthConsole extends Model<AuthConsole> { ...@@ -10,8 +11,8 @@ export class AuthConsole extends Model<AuthConsole> {
* @param payload * @param payload
*/ */
static async get(payload: AuthConsoleGetReq) { static async get(payload: AuthConsoleGetReq) {
return await api.get<HttpResponse>('/services/auth-service/console', { return await api.get<HttpResponse<OperationObject[]>>('/services/auth-service/console', {
data: payload, params: payload,
}) })
} }
} }
......
...@@ -2,16 +2,17 @@ import { JsonProperty, Serializable } from 'typescript-json-serializer' ...@@ -2,16 +2,17 @@ import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios' import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse' import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model' import { Model } from '@shared/models/Model'
import { MenuResp } from '@shared/models/auth-service/MenuResp'
@Serializable() @Serializable()
export class AuthOperationRoleTree extends Model<AuthOperationRoleTree> { export class AuthMenuInfo extends Model<AuthMenuInfo> {
/** /**
* 获取菜单信息 * 获取菜单信息
* @param payload * @param payload
*/ */
static async get(payload: AuthMenuInfoGetReq) { static async get(payload: AuthMenuInfoGetReq) {
return await api.get<HttpResponse>('/services/auth-service/menu/info', { return await api.get<HttpResponse<MenuResp[]>>('/services/auth-service/menu/info', {
data: payload, params: payload,
}) })
} }
} }
......
import { Model } from '@shared/models/Model'
import { JsonProperty, Serializable } from 'typescript-json-serializer'
@Serializable()
export class MenuResp extends Model<MenuResp> {
@JsonProperty() menuId: string
@JsonProperty() name: string
@JsonProperty() description: string
@JsonProperty({
type: MenuResp,
})
child: MenuResp[]
}
import { Model } from '@shared/models/Model'
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { OperationObjectTypeEnum } from '@shared/models/auth-service/enums/OperationObjectTypeEnum'
@Serializable()
export class OperationObject extends Model<OperationObject> {
//权限Id
@JsonProperty() id: string
//权限名称
@JsonProperty() name: string
//权限类型
@JsonProperty() type: OperationObjectTypeEnum
//权限子集
@JsonProperty({
type: OperationObject,
})
child: OperationObject[]
}
//权限类型
export enum OperationObjectTypeEnum {
FEDERATION = 'FEDERATION',
ORGANIZATION = 'ORGANIZATION',
PERSONAL = 'PERSONAL',
SYSTEM = 'SYSTEM',
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddress extends Model<ChainAddress> {
/**
* 获取账户下的地址列表
* @param payload
*/
static async get(payload: ChainAddressGetReq) {
return await api.get<HttpResponse>('/services/chain-service/address', { params: payload })
}
/**
* 生成一个地址
* @param payload
*/
static async post(payload: ChainAddressPostReq) {
return await api.post<HttpResponse>('/services/chain-service/address', { data: payload })
}
/**
* 修改地址信息
* @param payload
*/
static async put(payload: ChainAddressPutReq) {
return await api.put<HttpResponse>('/services/chain-service/address', { data: payload })
}
/**
* 删除地址
* @param payload
*/
static async delete(payload: ChainAddressDeleteReq) {
return await api.delete<HttpResponse>(`/services/chain-service/address/${payload.aid}`)
}
}
@Serializable()
export class ChainAddressGetReq extends Model<ChainAddressGetReq> {
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
@Serializable()
export class ChainAddressPostReq extends Model<ChainAddressPostReq> {
@JsonProperty() name: string
@JsonProperty() note: string
@JsonProperty() privKey?: string
}
@Serializable()
export class ChainAddressPutReq extends Model<ChainAddressPutReq> {
@JsonProperty() aid: string
@JsonProperty() name: string
@JsonProperty() note: string
}
@Serializable()
export class ChainAddressDeleteReq extends Model<ChainAddressDeleteReq> {
@JsonProperty() aid: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddressCheckName extends Model<ChainAddressCheckName> {
/**
* 校验地址名称是否唯一
* @param payload
*/
static async get(payload: ChainAddressCheckNameGetReq) {
return await api.get<HttpResponse>('/services/chain-service/address/check-name', { params: payload })
}
}
@Serializable()
export class ChainAddressCheckNameGetReq extends Model<ChainAddressCheckNameGetReq> {
@JsonProperty() name: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddressExport extends Model<ChainAddressExport> {
/**
* 导出地址
* @param payload
*/
static async get(payload: ChainAddressExportGetReq) {
return await api.get<HttpResponse>('/services/chain-service/address/export', { params: payload })
}
}
@Serializable()
export class ChainAddressExportGetReq extends Model<ChainAddressExportGetReq> {
@JsonProperty() phone: string
@JsonProperty() verifyCode: number
@JsonProperty() addrId: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddressImport extends Model<ChainAddressImport> {
/**
* 导入地址
* @param payload
*/
static async post(payload: ChainAddressImportPostReq) {
return await api.post<HttpResponse>('/services/chain-service/address/import', { data: payload })
}
}
@Serializable()
export class ChainAddressImportPostReq extends Model<ChainAddressImportPostReq> {
@JsonProperty() addrName: string
@JsonProperty() mnemonic: string
@JsonProperty() privateKey: string
@JsonProperty() tag: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddressPrivate extends Model<ChainAddressPrivate> {
/**
* 查看地址私钥
* @param payload
*/
static async get(payload: ChainAddressPrivateGetReq) {
return await api.get<HttpResponse>('/services/chain-service/address/private', { params: payload })
}
}
@Serializable()
export class ChainAddressPrivateGetReq extends Model<ChainAddressPrivateGetReq> {
@JsonProperty() id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainChainId extends Model<ChainChainId> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 查看指定的的链信息
* @param payload
*/
static async get(payload: ChainChainIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/${payload.chain_id}`)
}
}
@Serializable()
export class ChainChainIdGetReq extends ChainChainId {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainChainIdNode extends Model<ChainChainIdNode> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 获取节点列表
* @param payload
*/
static async get(payload: ChainChainIdNodeGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/${payload.chain_id}/node`, {
params: payload,
})
}
}
@Serializable()
export class ChainChainIdNodeGetReq extends ChainChainIdNode {
@JsonProperty() chain_id: string
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainChainIdNodeIdNode extends Model<ChainChainIdNodeIdNode> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 删除节点
* @param payload
*/
static async delete(payload: ChainChainIdNodeIdNodeDeleteReq) {
return await api.delete<HttpResponse>(
`/services/chain-service/${payload.chain_type}/${payload.chain_id}/node/${payload.node_id}`,
)
}
}
@Serializable()
export class ChainChainIdNodeIdNodeDeleteReq extends ChainChainIdNodeIdNode {
@JsonProperty() chain_id: string
@JsonProperty() node_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainChangeOrder extends Model<ChainChangeOrder> {
/**
* 初始化变更订单(服务器规格变更)
* @param payload
*/
static async post(payload: ChainChangeOrderPostReq) {
return await api.post<HttpResponse>('/services/chain-service/chain/change/order', { data: payload })
}
}
@Serializable()
export class ChainChangeOrderPostReq extends Model<ChainChangeOrderPostReq> {
@JsonProperty() nodeId: string
@JsonProperty() profileRef: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainCheckLicenseNum extends Model<ChainCheckLicenseNum> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 校验License中的链相关限制
* @param payload
*/
static async get(payload: ChainCheckLicenseNumGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/check-license-num`, {
params: payload,
})
}
}
@Serializable()
export class ChainCheckLicenseNumGetReq extends ChainCheckLicenseNum {
@JsonProperty() chain_id: string
@JsonProperty() nodeSize?: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainCheckName extends Model<ChainCheckName> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 校验校验链参数是否唯一
* @param payload
*/
static async get(payload: ChainCheckNameGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/check-name`, { params: payload })
}
}
@Serializable()
export class ChainCheckNameGetReq extends ChainCheckName {
@JsonProperty() name: string
@JsonProperty() title: string
@JsonProperty() mainChainId?: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainDeleteChainIdPurge extends Model<ChainDeleteChainIdPurge> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 删除指定链
* @param payload
*/
static async delete(payload: ChainDeleteChainIdPurgeDeleteReq) {
return await api.delete<HttpResponse>(
`/services/chain-service/chain/delete/${payload.chain_type}/${payload.chain_id}/${payload.purge}`,
)
}
}
@Serializable()
export class ChainDeleteChainIdPurgeDeleteReq extends ChainDeleteChainIdPurge {
@JsonProperty() chain_id: string
@JsonProperty() purge: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainDeploy extends Model<ChainDeploy> {
/**
* 部署指定链,指定节点
* @param payload
*/
static async put(payload: ChainDeployPutReq) {
return await api.put<HttpResponse>('/services/chain-service/deploy', { data: payload })
}
}
@Serializable()
export class ChainDeployPutReq extends Model<ChainDeployPutReq> {
@JsonProperty() chainId: string
@JsonProperty() nodes: string[]
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainDeployExplorerChainId extends Model<ChainDeployExplorerChainId> {
/**
* 部署指定链的浏览器
* @param payload
*/
static async put(payload: ChainDeployExplorerChainIdPutReq) {
return await api.put<HttpResponse>('/services/chain-service/deploy/explorer/{chain_id}', { data: payload })
}
}
@Serializable()
export class ChainDeployExplorerChainIdPutReq extends Model<ChainDeployExplorerChainIdPutReq> {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainExistContractChainId extends Model<ChainExistContractChainId> {
/**
* 链是否部署合约
* @param payload
*/
static async get(payload: ChainExistContractChainIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/chain/exist-contract/${payload.chain_id}`)
}
}
@Serializable()
export class ChainExistContractChainIdGetReq extends Model<ChainExistContractChainIdGetReq> {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainExplorerInfoChainId extends Model<ChainExplorerInfoChainId> {
/**
* 查询指定浏览器节点
* @param payload
*/
static async get(payload: ChainExplorerInfoChainIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/explorer/info/${payload.chain_id}`)
}
}
@Serializable()
export class ChainExplorerInfoChainIdGetReq extends Model<ChainExplorerInfoChainIdGetReq> {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainImportDeploy extends Model<ChainImportDeploy> {
/**
* 链导入时,部署指定链的监控客户端
* @param payload
*/
static async put(payload: ChainImportDeployPutReq) {
return await api.put<HttpResponse>('/services/chain-service/import/deploy', { data: payload })
}
}
@Serializable()
export class ChainImportDeployPutReq extends Model<ChainImportDeployPutReq> {
@JsonProperty() chainId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainManageLogType extends Model<ChainManageLogType> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 根据当前登录类型查询链列表
* @param payload
*/
static async get(payload: ChainManageLogTypeGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/manage/login-type`)
}
}
@Serializable()
export class ChainManageLogTypeGetReq extends ChainManageLogType {}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeBindIp extends Model<ChainNodeBindIp> {
/**
* 节点绑定Ip地址
* @param payload
*/
static async put(payload: ChainNodeBindIpPutReq) {
return await api.put<HttpResponse>('/services/chain-service/node/bind-ip', { data: payload })
}
}
@Serializable()
export class ChainNodeBindIpPutReq extends Model<ChainNodeBindIpPutReq> {
@JsonProperty() nodeId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeProfileInfoNodeId extends Model<ChainNodeProfileInfoNodeId> {
/**
* 云节点获取规格信息
* @param payload
*/
static async get(payload: ChainNodeProfileInfoNodeIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/node/profile/info/${payload.nodeId}`, {
params: payload,
})
}
}
@Serializable()
export class ChainNodeProfileInfoNodeIdGetReq extends Model<ChainNodeProfileInfoNodeIdGetReq> {
@JsonProperty() nodeId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeRole extends Model<ChainNodeRole> {
/**
* 转换节点类型
* @param payload
*/
static async put(payload: ChainNodeRolePutReq) {
return await api.put<HttpResponse>('/services/chain-service/node-role', { data: payload })
}
}
@Serializable()
export class ChainNodeRolePutReq extends Model<ChainNodeRolePutReq> {
@JsonProperty() chain_id: string
@JsonProperty() node_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeUnBindIpNodeIp extends Model<ChainNodeUnBindIpNodeIp> {
/**
* 节点解绑Ip地址
* @param payload
*/
static async delete(payload: ChainNodeUnBindIpNodeIpDeleteReq) {
return await api.delete<HttpResponse>(`/services/chain-service/node/un-bind-ip/${payload.nodeId}`)
}
}
@Serializable()
export class ChainNodeUnBindIpNodeIpDeleteReq extends Model<ChainNodeUnBindIpNodeIpDeleteReq> {
@JsonProperty() nodeId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeUserExists extends Model<ChainNodeUserExists> {
/**
* 获取用户是否有修改节点的权限
* @param payload
*/
static async get(payload: ChainNodeUserExistsGetReq) {
return await api.get<HttpResponse>('/services/chain-service/node/user/exists', { params: payload })
}
}
@Serializable()
export class ChainNodeUserExistsGetReq extends Model<ChainNodeUserExistsGetReq> {
@JsonProperty() nodeId: string
@JsonProperty() userId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainPage extends Model<ChainPage> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 查询所有当前链
* @param payload
*/
static async get(payload: ChainPageGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/page`, { params: payload })
}
}
@Serializable()
export class ChainPageGetReq extends ChainPage {
@JsonProperty() fedName: string
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainRedoChainId extends Model<ChainRedoChainId> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 链重试
* @param payload
*/
static async put(payload: ChainRedoChainIdPutReq) {
return await api.put<HttpResponse>(`/services/chain-service/redo/${payload.chain_type}/${payload.chain_id}`)
}
}
@Serializable()
export class ChainRedoChainIdPutReq extends ChainRedoChainId {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainRedoChainIdNodeId extends Model<ChainRedoChainIdNodeId> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 节点重试
* @param payload
*/
static async put(payload: ChainRedoChainIdNodeIdPutReq) {
return await api.put<HttpResponse>(
`/services/chain-service/redo/${payload.chain_type}/${payload.chain_id}/${payload.node_id}`,
)
}
}
@Serializable()
export class ChainRedoChainIdNodeIdPutReq extends ChainRedoChainIdNodeId {
@JsonProperty() chain_id: string
@JsonProperty() node_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKey extends Model<ChainSshKey> {
/**
* 密钥列表查询
* @param payload
*/
static async get(payload: ChainSshKeyGetReq) {
return await api.get<HttpResponse>('/services/chain-service/ssh-key', { params: payload })
}
/**
* 生成私钥
* @param payload
*/
static async post(payload: ChainSshKeyPostReq) {
return await api.post<HttpResponse>('/services/chain-service/ssh-key', { data: payload })
}
}
@Serializable()
export class ChainSshKeyGetReq extends Model<ChainSshKeyGetReq> {
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
@Serializable()
export class ChainSshKeyPostReq extends Model<ChainSshKeyPostReq> {
@JsonProperty() name: string
}
import { Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKeyDefault extends Model<ChainSshKeyDefault> {
/**
* 导出系统公钥
*/
static async get() {
return await api.get<HttpResponse>('/services/chain-service/ssh-key/default-ssh-key')
}
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKeyId extends Model<ChainSshKeyId> {
@JsonProperty() id: string
/**
* 导出公钥
* @param payload
*/
static async get(payload: ChainSshKeyIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/ssh-key/${payload.id}`)
}
/**
* 删除私钥
* @param payload
*/
static async delete(payload: ChainSshKeyIdDeleteReq) {
return await api.delete<HttpResponse>(`/services/chain-service/ssh-key/${payload.id}`)
}
}
@Serializable()
export class ChainSshKeyIdGetReq extends ChainSshKeyId {}
@Serializable()
export class ChainSshKeyIdDeleteReq extends ChainSshKeyId {}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKeyImport extends Model<ChainSshKeyImport> {
/**
* 导入私钥
* @param payload
*/
static async post(payload: ChainSshKeyImportPostReq) {
return await api.post<HttpResponse>('/services/chain-service/ssh-key/import', { data: payload })
}
}
@Serializable()
export class ChainSshKeyImportPostReq extends Model<ChainSshKeyImportPostReq> {
@JsonProperty() name: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKeyPrivkeyId extends Model<ChainSshKeyPrivkeyId> {
/**
* 导出私钥
* @param payload
*/
static async get(payload) {
return await api.get<HttpResponse>(`/services/chain-service/ssh-key/decrypted-priv-key/${payload.id}`, {
params: payload,
})
}
}
@Serializable()
export class ChainSshKeyPrivkeyIdGetReq extends Model<ChainSshKeyPrivkeyIdGetReq> {
@JsonProperty() id: number
@JsonProperty() phone: string
@JsonProperty() verifyCode: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainVersion extends Model<ChainVersion> {
/**
* 获取版本列表
* @param payload
*/
static async get(payload: ChainVersionGetReq) {
return await api.get<HttpResponse>('/services/chain-service/chain-version', { params: payload })
}
/**
* 更新版本信息
* @param payload
*/
static async put(payload: ChainVersionPutReq) {
return await api.put<HttpResponse>('/services/chain-service/chain-version', { data: payload })
}
/**
* 删除版本信息
* @param payload
*/
static async delete(payload: ChainVersionDeleteReq) {
return await api.delete<HttpResponse>('/services/chain-service/chain-version', { data: payload })
}
}
@Serializable()
export class ChainVersionGetReq extends Model<ChainVersionGetReq> {
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
@Serializable()
export class ChainVersionPutReq extends Model<ChainVersionPutReq> {
@JsonProperty() chainUrl: string
@JsonProperty() content: string
@JsonProperty() createTime: number
@JsonProperty() externalChainUrl: string
@JsonProperty() id: number
@JsonProperty() operator: string
@JsonProperty() packageName: string
@JsonProperty() status: number
@JsonProperty() updateTime: string
@JsonProperty() version: string
}
@Serializable()
export class ChainVersionDeleteReq extends Model<ChainVersionDeleteReq> {
@JsonProperty() chainUrl: string
@JsonProperty() content: string
@JsonProperty() createTime: number
@JsonProperty() externalChainUrl: string
@JsonProperty() id: number
@JsonProperty() operator: string
@JsonProperty() packageName: string
@JsonProperty() status: number
@JsonProperty() updateTime: string
@JsonProperty() version: string
}
export enum ChainTypeEnum {
'consortium',
'para',
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudConfigResource extends Model<CloudConfigResource> {
/**
* 云平台配置列表接口
* @param payload
*/
static async get(payload: CloudConfigResourceGetReq) {
return await api.get<HttpResponse>('/services/cloud-service/config/resource', { params: payload })
}
/**
* 新增云平台配置
* @param payload
*/
static async post(payload: CloudConfigResourcePostReq) {
return await api.post<HttpResponse>('/services/cloud-service/config/resource', { data: payload })
}
/**
* 修改云平台配置
* @param payload
*/
static async put(payload: CloudConfigResourcePutReq) {
return await api.put<HttpResponse>('/services/cloud-service/config/resource', { data: payload })
}
}
@Serializable()
export class CloudConfigResourceGetReq extends Model<CloudConfigResourceGetReq> {
@JsonProperty() orgId: string
}
@Serializable()
export class CloudConfigResourcePostReq extends Model<CloudConfigResourcePostReq> {
@JsonProperty() accessKey: string
@JsonProperty() blance: number
@JsonProperty() cloudKey: string
@JsonProperty() connection: number
@JsonProperty() description: string
@JsonProperty() driver: string
@JsonProperty() enabled: number
@JsonProperty() orgId: string
@JsonProperty() secretKey: string
}
@Serializable()
export class CloudConfigResourcePutReq extends CloudConfigResourcePostReq {}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudConfigResourceEnabled extends Model<CloudConfigResourceEnabled> {
/**
* 启用云平台配置
* @param payload
*/
static async put(payload: CloudConfigResourceEnabledPutReq) {
return await api.put<HttpResponse>('/services/cloud-service/config/resource/enabled', { data: payload })
}
}
@Serializable()
export class CloudConfigResourceEnabledPutReq extends Model<CloudConfigResourceEnabledPutReq> {
@JsonProperty() driver: string
@JsonProperty() enabled: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudConfigResourceOwner extends Model<CloudConfigResourceOwner> {
/**
* 获取当前用户所属的ak、sk
* @param payload
*/
static async get(payload: CloudConfigResourcOwnerGetReq) {
return await api.get<HttpResponse>('/services/cloud-service/config/resource/owner', { params: payload })
}
}
@Serializable()
export class CloudConfigResourcOwnerGetReq extends Model<CloudConfigResourcOwnerGetReq> {
@JsonProperty() orgId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudConfigResourceTest extends Model<CloudConfigResourceTest> {
/**
* 测试认证信息
* @param payload
*/
static async get(payload: CloudConfigResourceTestGetReq) {
return await api.get<HttpResponse>('/services/cloud-service/config/resource/test', { params: payload })
}
}
@Serializable()
export class CloudConfigResourceTestGetReq extends Model<CloudConfigResourceTestGetReq> {
@JsonProperty() accessKey: string
@JsonProperty() secretKey: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudConfigResourceUsed extends Model<CloudConfigResourceUsed> {
@JsonProperty() driver: string
@JsonProperty() orgId: string
/**
* 使用权分配查询接口
* @param payload
*/
static async get(payload: CloudConfigResourceUsedGetReq) {
return await api.get<HttpResponse>('/services/cloud-service/config/resource/used', { params: payload })
}
/**
* 分配使用权接口(新建)
* @param payload
*/
static async post(payload: CloudConfigResourceUsedPostReq) {
return await api.post<HttpResponse>('/services/cloud-service/config/resource/used', { data: payload })
}
}
@Serializable()
export class CloudConfigResourceUsedGetReq extends CloudConfigResourceUsed {}
@Serializable()
export class CloudConfigResourceUsedPostReq extends CloudConfigResourceUsed {
@JsonProperty() resourceUser: string
}
import { Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudDriver extends Model<CloudDriver> {
/**
* 列出所有云驱动
*/
static async get() {
return await api.get<HttpResponse>('/services/cloud-service/driver')
}
}
import { Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudDriverDefault extends Model<CloudDriverDefault> {
/**
* 获取当前系统默认的云驱动信息
*/
static async get() {
return await api.get<HttpResponse>('/services/cloud-service/driver/default')
}
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudDriverKey extends Model<CloudDriverKey> {
/**
* 设置当前系统的驱动及认证信息
* @param payload
*/
static async put(payload: CloudDriverKeyPutReq) {
return await api.put<HttpResponse>(`/services/cloud-service/driver/${payload.key}`, { data: payload })
}
}
@Serializable()
export class CloudDriverKeyPutReq extends Model<CloudDriverKeyPutReq> {
@JsonProperty() accessKey: string
@JsonProperty() secretKey: string
@JsonProperty() key: string
}
import { Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudDriverTest extends Model<CloudDriverTest> {
/**
* 测试认证信息
*/
static async get() {
return await api.get<HttpResponse>('/services/cloud-service/driver/test')
}
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudFlavor extends Model<CloudFlavor> {
/**
* 列出机器规格
* @param payload
*/
static async get(payload: CloudFlavorGetReq) {
return await api.get<HttpResponse>('/services/cloud-service/flavor', { params: payload })
}
}
@Serializable()
export class CloudFlavorGetReq extends Model<CloudFlavorGetReq> {
@JsonProperty() regionId: string
@JsonProperty() zoneId: string
@JsonProperty() driverId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class CloudImage extends Model<CloudImage> {
/**
* 列出镜像信息
* @param payload
*/
static async get(payload: CloudImageGetReq) {
return await api.get<HttpResponse>('/services/cloud-service/image', { params: payload })
}
}
@Serializable()
export class CloudImageGetReq extends Model<CloudImageGetReq> {
@JsonProperty() params: string
@JsonProperty() regionId: string
@JsonProperty() driverId: string
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment