提交 4a30b6eb 作者: 方治民

合并分支 '3.x' 到 'electron'

3.x

查看合并请求 !14
...@@ -13,12 +13,13 @@ VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://localhos ...@@ -13,12 +13,13 @@ VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://localhos
VITE_DROP_CONSOLE = false VITE_DROP_CONSOLE = false
# Basic interface address SPA # Basic interface address SPA
VITE_GLOB_API_URL=/basic-api # VITE_GLOB_API_URL=/basic-api
# VITE_GLOB_API_URL=http://192.168.0.156:8081 VITE_GLOB_API_URL=http://127.0.0.1:8081
# Interface prefix # Interface prefix
VITE_GLOB_API_URL_PREFIX= # VITE_GLOB_API_URL_PREFIX=
# VITE_GLOB_API_URL_PREFIX=/api VITE_GLOB_API_URL_PREFIX=/api
# File upload address, optional # File upload address, optional
VITE_GLOB_UPLOAD_URL=/upload # VITE_GLOB_UPLOAD_URL=/upload
VITE_GLOB_UPLOAD_URL=/common/file/upload
{ {
"name": "basic-vue-admin", "name": "basic-vue-admin",
"version": "3.0.1", "version": "3.0.2",
"description": "Basic Vue Admin (Template)", "description": "Basic Vue Admin (Template)",
"keywords": [ "keywords": [
"vue", "vue",
...@@ -54,128 +54,132 @@ ...@@ -54,128 +54,132 @@
} }
}, },
"dependencies": { "dependencies": {
"@ant-design/colors": "^6.0.0", "@ant-design/colors": "^7.0.0",
"@ant-design/icons-vue": "^6.1.0", "@ant-design/icons-vue": "^6.1.0",
"@iconify/iconify": "^2.2.1", "@iconify/iconify": "^3.1.0",
"@logicflow/core": "^1.1.31", "@logicflow/core": "^1.2.1",
"@logicflow/extension": "^1.1.31", "@logicflow/extension": "^1.2.1",
"@stomp/stompjs": "^6.1.2", "@stomp/stompjs": "^7.0.0",
"@vue/runtime-core": "^3.2.45", "@vue/runtime-core": "^3.2.47",
"@vue/shared": "^3.2.45", "@vue/shared": "^3.2.47",
"@vueuse/core": "^9.5.0", "@vueuse/core": "^9.13.0",
"@vueuse/shared": "^9.5.0", "@vueuse/shared": "^9.13.0",
"@zxcvbn-ts/core": "^2.1.0", "@zxcvbn-ts/core": "^2.2.1",
"ant-design-vue": "^3.2.15", "ant-design-vue": "^3.2.16",
"axios": "^0.26.1", "axios": "^0.26.1",
"codemirror": "^6.0.1", "codemirror": "^6.0.1",
"cropperjs": "^1.5.12", "cropperjs": "^1.5.13",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"dayjs": "^1.11.6", "dayjs": "^1.11.7",
"echarts": "^5.4.0", "echarts": "^5.4.2",
"intro.js": "^5.1.0", "intro.js": "^6.0.0",
"js-file-download": "^0.4.12",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"nanoid": "^4.0.0", "nanoid": "^4.0.2",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"path-to-regexp": "^6.2.1", "path-to-regexp": "^6.2.1",
"pinia": "^2.0.23", "pinia": "^2.0.33",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"qrcode": "^1.5.1", "qrcode": "^1.5.1",
"qs": "^6.11.0", "qs": "^6.11.1",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"sockjs-client": "^1.6.1", "sockjs-client": "^1.6.1",
"sortablejs": "^1.15.0", "sortablejs": "^1.15.0",
"stompjs": "^2.3.3", "stompjs": "^2.3.3",
"tinymce": "^5.10.6", "tinymce": "^5.10.7",
"vditor": "^3.8.18", "vditor": "^3.9.1",
"vue": "^3.2.45", "vue": "^3.2.47",
"vue-i18n": "^9.2.2", "vue-i18n": "^9.2.2",
"vue-json-pretty": "^2.2.3", "vue-json-pretty": "^2.2.4",
"vue-router": "^4.1.6", "vue-router": "^4.1.6",
"vue-types": "^4.2.1", "vue-types": "^5.0.2",
"xlsx": "^0.18.5" "xlsx": "^0.18.5"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^17.2.0", "@commitlint/cli": "^17.5.0",
"@commitlint/config-conventional": "^17.2.0", "@commitlint/config-conventional": "^17.4.4",
"@iconify/json": "^2.1.136", "@iconify/json": "^2.2.39",
"@purge-icons/generated": "^0.8.1", "@purge-icons/generated": "^0.9.0",
"@types/codemirror": "^5.60.5", "@types/codemirror": "^5.60.7",
"@types/crypto-js": "^4.1.1", "@types/crypto-js": "^4.1.1",
"@types/fs-extra": "^9.0.13", "@types/fs-extra": "^11.0.1",
"@types/inquirer": "^9.0.3", "@types/inquirer": "^9.0.3",
"@types/intro.js": "^3.0.2", "@types/intro.js": "^5.1.1",
"@types/lodash-es": "^4.17.6", "@types/lodash": "^4.14.191",
"@types/lodash-es": "^4.17.7",
"@types/mockjs": "^1.0.7", "@types/mockjs": "^1.0.7",
"@types/node": "^18.11.9", "@types/node": "^18.15.10",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.5.0", "@types/qrcode": "^1.5.0",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@types/showdown": "^1.9.4", "@types/showdown": "^2.0.0",
"@types/sockjs-client": "^1.5.1", "@types/sockjs-client": "^1.5.1",
"@types/sortablejs": "^1.15.0", "@types/sortablejs": "^1.15.1",
"@types/stompjs": "^2.3.5", "@types/stompjs": "^2.3.5",
"@typescript-eslint/eslint-plugin": "^5.42.1", "@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.42.1", "@typescript-eslint/parser": "^5.56.0",
"@vitejs/plugin-legacy": "^2.3.1", "@vitejs/plugin-legacy": "^4.0.2",
"@vitejs/plugin-vue": "^3.2.0", "@vitejs/plugin-vue": "^4.1.0",
"@vitejs/plugin-vue-jsx": "^1.3.10", "@vitejs/plugin-vue-jsx": "^3.0.1",
"@vue/compiler-sfc": "3.2.31", "@vue/compiler-dom": "^3.2.47",
"@vue/test-utils": "^2.2.2", "@vue/compiler-sfc": "^3.2.47",
"autoprefixer": "^10.4.13", "@vue/test-utils": "^2.3.2",
"commitizen": "^4.2.5", "autoprefixer": "^10.4.14",
"commitizen": "^4.3.0",
"conventional-changelog-cli": "^2.2.2", "conventional-changelog-cli": "^2.2.2",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.3.0", "cz-conventional-changelog": "^3.3.0",
"cz-git": "^1.3.12", "cz-git": "^1.6.1",
"czg": "^1.3.12", "czg": "^1.6.1",
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"eslint": "^8.27.0", "eslint": "^8.36.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.7.0", "eslint-plugin-vue": "^9.10.0",
"esno": "^0.14.1", "esno": "^0.16.3",
"fs-extra": "^10.1.0", "fs-extra": "^11.1.1",
"husky": "^7.0.4", "husky": "^8.0.3",
"inquirer": "^9.1.4", "inquirer": "^9.1.5",
"less": "^4.1.3", "less": "^4.1.3",
"lint-staged": "12.3.7", "lint-staged": "^13.2.0",
"lodash": "^4.17.21",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"pont-engine": "^1.5.3", "pont-engine": "^1.5.7",
"postcss": "^8.4.19", "postcss": "^8.4.21",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"prettier": "^2.7.1", "prettier": "^2.8.7",
"rimraf": "^3.0.2", "rimraf": "^4.4.1",
"rollup": "^2.79.1", "rollup": "^2.79.1",
"rollup-plugin-visualizer": "^5.8.3", "rollup-plugin-visualizer": "^5.9.0",
"sort-package-json": "^1.57.0", "sort-package-json": "^2.4.1",
"stylelint": "^14.15.0", "stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4", "stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended": "^9.0.0", "stylelint-config-recommended": "^9.0.0",
"stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-recommended-vue": "^1.4.0",
"stylelint-config-standard": "^29.0.0", "stylelint-config-standard": "^29.0.0",
"stylelint-order": "^5.0.0", "stylelint-order": "^5.0.0",
"terser": "^5.15.1", "terser": "^5.16.8",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^4.8.4", "typescript": "^4.9.5",
"unplugin-auto-import": "^0.11.4", "unplugin-auto-import": "^0.12.2",
"vite": "^3.2.3", "vite": "^4.2.1",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0", "vite-plugin-html": "^3.2.0",
"vite-plugin-mkcert": "^1.10.1", "vite-plugin-mkcert": "^1.13.4",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
"vite-plugin-purge-icons": "^0.9.1", "vite-plugin-purge-icons": "^0.9.2",
"vite-plugin-pwa": "^0.13.3", "vite-plugin-pwa": "^0.14.6",
"vite-plugin-style-import": "^2.0.0", "vite-plugin-style-import": "^2.0.0",
"vite-plugin-svg-icons": "^2.0.1", "vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-theme": "github:tt-sevth/vite-plugin-theme", "vite-plugin-theme": "^0.8.6",
"vite-plugin-vue-setup-extend": "^0.4.0", "vite-plugin-vue-setup-extend": "^0.4.0",
"vite-plugin-windicss": "^1.8.8", "vite-plugin-windicss": "^1.8.10",
"vue-eslint-parser": "^9.1.0", "vue-eslint-parser": "^9.1.0",
"vue-tsc": "^1.0.9" "vue-tsc": "^1.2.0"
}, },
"engines": { "engines": {
"node": ">=14" "node": ">=14"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"originType": "SwaggerV2", "originType": "SwaggerV3",
"originUrl": "http://127.0.0.1:8081/api/v2/api-docs", "originUrl": "http://127.0.0.1:8081/api/v3/api-docs",
"templateType": "fetch", "templateType": "fetch",
"templatePath": "./pont-template", "templatePath": "./pont-template",
"transformPath": "./pont-transform", "transformPath": "./pont-transform",
"outDir": "./src/api/services", "outDir": "./src/api/services",
"surrounding": "typeScript", "surrounding": "typeScript",
"usingOperationId": true,
"mocks": { "mocks": {
"enable": true, "enable": true,
"basePath": "", "basePath": "",
......
import * as Pont from 'pont-engine' // import * as Pont from 'pont-engine'
import { Interface, BaseClass, Property, CodeGenerator } from 'pont-engine' import { Interface, BaseClass, Property, CodeGenerator } from 'pont-engine'
// 接口 API 前缀 // 接口 API 前缀
// 通常与项目的 env 配置中的 VITE_GLOB_API_URL_PREFIX 相同 // 通常与项目的 env 配置中的 VITE_GLOB_API_URL_PREFIX 相同
const API_URL_PREFIX = '/api' const API_URL_PREFIX = '/api'
export class FileStructures extends Pont.FileStructures {
getModsDeclaration(originCode: string): string {
return originCode
}
}
export default class BasicGenerator extends CodeGenerator { export default class BasicGenerator extends CodeGenerator {
checkJsonParam(inter: Interface, paramsCode: string): boolean { isRequestBody(inter: Interface, paramsCode: string): boolean {
const prettier = require('prettier') const prettier = require('prettier')
const requestParams = inter.getRequestParams(this.surrounding) const requestParams = inter.getRequestParams(this.surrounding)
const code = prettier.format(paramsCode, { parser: 'typescript' }) const code = prettier.format(paramsCode, { parser: 'typescript' })
return code.includes('{}') && requestParams.includes('body') return code.includes('{}') && requestParams.includes('body')
} }
// 认为没有返回值的接口表示下载(通常是)
isDownload(inter: Interface): boolean {
return inter.responseType === 'any'
}
// 认为包含 form 参数的接口表示带有上传功能 // 认为包含 form 参数的接口表示带有上传功能
isUpload(inter: Interface): boolean { isUpload(inter: Interface): boolean {
return inter.getRequestParams(this.surrounding).includes('form') return inter.getRequestParams(this.surrounding).includes('form')
...@@ -40,8 +29,9 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -40,8 +29,9 @@ export default class BasicGenerator extends CodeGenerator {
} }
if (requestParams.includes('body')) { if (requestParams.includes('body')) {
requestParams = requestParams.replace('params?: Params, ', '')
bodyTypeDef = requestParams.replace(/^.*body: (.*),.*$/gi, '$1') bodyTypeDef = requestParams.replace(/^.*body: (.*),.*$/gi, '$1')
requestParams = requestParams.replace('params?: Params, ', '')
requestParams = requestParams.replace('body:', 'body?:')
} }
} }
...@@ -56,11 +46,18 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -56,11 +46,18 @@ export default class BasicGenerator extends CodeGenerator {
getInterfaceContentInDeclaration(inter: Interface) { getInterfaceContentInDeclaration(inter: Interface) {
const paramsCode = inter.getParamsCode('Params') const paramsCode = inter.getParamsCode('Params')
const requestParams = this.getParams(inter, paramsCode) const requestParams = this.getParams(inter, paramsCode)
const sourceResponseType = inter.responseType
const targetResponseType =
sourceResponseType === 'File'
? 'void'
: sourceResponseType === 'defs.ResultString'
? 'string'
: sourceResponseType.replace(/defs.Result(.*)/, 'defs.$1')
return ` return `
export ${paramsCode} export ${paramsCode}
export type Response = ${inter.responseType.replace(/defs.Result\<(.*)\>/, '$1')}; export type Response = ${targetResponseType};
export const init: Response; export const init: Response;
...@@ -88,8 +85,10 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -88,8 +85,10 @@ export default class BasicGenerator extends CodeGenerator {
const method = inter.method.toUpperCase() const method = inter.method.toUpperCase()
const paramsCode = inter.getParamsCode('Params', this.surrounding) const paramsCode = inter.getParamsCode('Params', this.surrounding)
const requestParams = this.getParams(inter, paramsCode) const requestParams = this.getParams(inter, paramsCode)
const isBody = this.checkJsonParam(inter, paramsCode) const initValue = inter.response.getInitialValue(true)
const responseType = `Promise<${inter.responseType.replace(/defs.Result\<(.*)\>/, '$1') || 'any'}>` const undef = initValue === 'undefined' || initValue === `''`
const isBody = this.isRequestBody(inter, paramsCode)
const isDownload = inter.responseType === 'File'
// TODO // TODO
// 扩展 hooks mode // 扩展 hooks mode
...@@ -99,11 +98,15 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -99,11 +98,15 @@ export default class BasicGenerator extends CodeGenerator {
/** /**
* @desc ${inter.description} * @desc ${inter.description}
*/ */
${undef ? '' : `import * as defs from '../../baseClass';`}
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
${isBody ? '' : `export ${paramsCode}`} ${isBody ? '' : `export ${paramsCode}`}
export function request(${requestParams}): ${responseType} { ${undef ? '' : `export const init = ${initValue};`}
export function request(${requestParams}) {
return defHttp.request({ return defHttp.request({
url: "${inter.path.replace(API_URL_PREFIX, '')}", url: "${inter.path.replace(API_URL_PREFIX, '')}",
method: '${method}', method: '${method}',
...@@ -116,12 +119,24 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -116,12 +119,24 @@ export default class BasicGenerator extends CodeGenerator {
requestParams.includes('form') requestParams.includes('form')
? `headers: { 'Content-Type': 'multipart/form-data;charset=UTF-8' },` ? `headers: { 'Content-Type': 'multipart/form-data;charset=UTF-8' },`
: isBody : isBody
? `headers: { 'Content-Type': 'application/json;charset=UTF-8' },` ? `headers: { 'Content-Type': 'application/json' },`
: ''
}
${
isDownload
? `
responseType: 'blob',
timeout: 0,
`
: '' : ''
} }
...config, ...config,
}, options); }, {
${isDownload ? `download: true,` : ''}
...options,
});
} }
` `
} }
......
import { StandardDataSource } from 'pont-engine' import { StandardDataSource } from 'pont-engine'
export default function (dataSource: StandardDataSource): StandardDataSource { export default function transform(dataSource: StandardDataSource): StandardDataSource {
console.log(dataSource)
return dataSource return dataSource
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3,6 +3,54 @@ type ObjectMap<Key extends string | number | symbol = any, Value = any> = { ...@@ -3,6 +3,54 @@ type ObjectMap<Key extends string | number | symbol = any, Value = any> = {
} }
declare namespace defs { declare namespace defs {
export class DictItemVo {
/** 字典选项描述 */
description?: string
/** 字典选项是否启用 */
enable?: boolean
/** id */
id?: string
/** 字典选项名称 */
name?: string
/** 字典选项排序序号 */
serial?: number
/** 字典选项值 */
value?: string
}
export class DictVo {
/** 字典编号 */
code?: string
/** 字典描述 */
description?: string
/** id */
id?: string
/** 字典名称 */
name?: string
}
export class KeyValueVo {
/** 是否启用 */
enable?: string
/** key */
key?: string
/** label */
label?: string
/** value */
value?: string
}
export class LoginVo { export class LoginVo {
/** token */ /** token */
token?: string token?: string
...@@ -29,6 +77,9 @@ declare namespace defs { ...@@ -29,6 +77,9 @@ declare namespace defs {
/** 重定向 */ /** 重定向 */
redirect?: string redirect?: string
/** 唯一标识 */
uid?: string
} }
export class PageParam { export class PageParam {
...@@ -45,9 +96,9 @@ declare namespace defs { ...@@ -45,9 +96,9 @@ declare namespace defs {
sortOrder?: 'ASC' | 'DESC' sortOrder?: 'ASC' | 'DESC'
} }
export class PageVo<T0 = any> { export class PageVoDictItemVo {
/** 数据 */ /** 数据 */
data?: Array<T0> data?: Array<defs.DictItemVo>
/** 数据最新时间 */ /** 数据最新时间 */
latest?: string latest?: string
...@@ -56,10 +107,62 @@ declare namespace defs { ...@@ -56,10 +107,62 @@ declare namespace defs {
total?: number total?: number
} }
export class PermissionVo { export class PageVoDictVo {
/** 子权限 */ /** 数据 */
children?: Array<defs.PermissionVo> data?: Array<defs.DictVo>
/** 数据最新时间 */
latest?: string
/** 数据总数 */
total?: number
}
export class PageVoPermissionVo {
/** 数据 */
data?: Array<defs.PermissionVo>
/** 数据最新时间 */
latest?: string
/** 数据总数 */
total?: number
}
export class PageVoRoleVo {
/** 数据 */
data?: Array<defs.RoleVo>
/** 数据最新时间 */
latest?: string
/** 数据总数 */
total?: number
}
export class PageVoString {
/** 数据 */
data?: Array<string>
/** 数据最新时间 */
latest?: string
/** 数据总数 */
total?: number
}
export class PageVoUserVo {
/** 数据 */
data?: Array<defs.UserVo>
/** 数据最新时间 */
latest?: string
/** 数据总数 */
total?: number
}
export class PermissionParam {
/** 组件 */ /** 组件 */
component?: string component?: string
...@@ -72,7 +175,7 @@ declare namespace defs { ...@@ -72,7 +175,7 @@ declare namespace defs {
/** 图标 */ /** 图标 */
icon?: string icon?: string
/** 主键 */ /** id */
id?: string id?: string
/** 元数据 */ /** 元数据 */
...@@ -87,6 +190,9 @@ declare namespace defs { ...@@ -87,6 +190,9 @@ declare namespace defs {
/** 父级ID */ /** 父级ID */
pid?: string pid?: string
/** 重定向 */
redirect?: string
/** 序号 */ /** 序号 */
serial?: number serial?: number
...@@ -97,9 +203,50 @@ declare namespace defs { ...@@ -97,9 +203,50 @@ declare namespace defs {
uid?: string uid?: string
} }
export class Result<T0 = any> { export class PermissionVo {
/** children */
children?: Array<defs.PermissionVo>
/** component */
component?: string
/** enable */
enable?: boolean
/** hidden */
hidden?: boolean
/** icon */
icon?: string
/** id */
id?: string
/** meta */
meta?: ObjectMap<any, object>
/** name */
name?: string
/** path */
path?: string
/** pid */
pid?: string
/** serial */
serial?: number
/** type */
type?: 'DIR' | 'MENU' | 'BUTTON'
/** uid */
uid?: string
}
export class ResultArrayListKeyValueVo {
/** 内容 */ /** 内容 */
body?: T0 body?: Array<defs.KeyValueVo>
/** 业务标识码 */ /** 业务标识码 */
code?: number code?: number
...@@ -123,111 +270,903 @@ declare namespace defs { ...@@ -123,111 +270,903 @@ declare namespace defs {
timestamp?: string timestamp?: string
} }
export class RoleVo { export class ResultArrayListMenuVo {
/** 主键 */ /** 内容 */
id?: string body?: Array<defs.MenuVo>
/** 名称 */ /** 业务标识码 */
name?: string code?: number
/** 权限 */ /** 详细信息 */
permissions?: Array<defs.PermissionVo> details?: string
/** 标识 */ /** 异常信息 */
uid?: string error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
} }
export class UserExtensionVo { export class ResultArrayListPermissionVo {
/** 年龄 */ /** 内容 */
age?: number body?: Array<defs.PermissionVo>
/** 性别 */ /** 业务标识码 */
gender?: number code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
} }
export class UserInfo { export class ResultArrayListRoleVo {
/** 头像 */ /** 内容 */
avatar?: string body?: Array<defs.RoleVo>
/** 介绍 */ /** 业务标识码 */
desc?: string code?: number
/** 用户主页 */ /** 详细信息 */
homePath?: string details?: string
/** 手机号 */ /** 异常信息 */
mobile?: string error?: string
/** 真实姓名 */ /** 消息 */
realName?: string message?: string
/** 角色 */ /** 状态码 */
roles?: Array<defs.RoleVo> status?: number
/** 主键 */ /** 耗时 */
userId?: string times?: string
/** 用户名 */ /** 响应时间 */
username?: string timestamp?: string
} }
export class UserVo { export class ResultArrayListString {
/** 头像 */ /** 内容 */
avatar?: string body?: Array<string>
/** 最后登录时间 */ /** 业务标识码 */
createTime?: string code?: number
/** 是否删除 */ /** 详细信息 */
deleted?: boolean details?: string
/** 邮箱 */ /** 异常信息 */
email?: string error?: string
/** 是否启用 */ /** 消息 */
enabled?: boolean message?: string
/** 主键 */ /** 状态码 */
id?: string status?: number
/** 最后登录IP地址 */ /** 耗时 */
lastLoginIp?: string times?: string
/** 最后登录时间 */ /** 响应时间 */
lastLoginTime?: string timestamp?: string
}
/** 手机号 */ export class ResultBoolean {
mobile?: string /** 内容 */
body?: boolean
/** 真实姓名 */ /** 业务标识码 */
realName?: string code?: number
/** 职称 */ /** 详细信息 */
title?: string details?: string
/** 用户名 */ /** 异常信息 */
username?: string error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultDictItemVo {
/** body */
body?: defs.DictItemVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultDictVo {
/** body */
body?: defs.DictVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultLoginVo {
/** body */
body?: defs.LoginVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoDictItemVo {
/** body */
body?: defs.PageVoDictItemVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoDictVo {
/** body */
body?: defs.PageVoDictVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoPermissionVo {
/** body */
body?: defs.PageVoPermissionVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoRoleVo {
/** body */
body?: defs.PageVoRoleVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoString {
/** body */
body?: defs.PageVoString
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoUserVo {
/** body */
body?: defs.PageVoUserVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPermissionVo {
/** body */
body?: defs.PermissionVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultRoleVo {
/** body */
body?: defs.RoleVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultString {
/** 内容 */
body?: string
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultUserExtensionVo {
/** body */
body?: defs.UserExtensionVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultUserInfo {
/** body */
body?: defs.UserInfo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class RoleVo {
/** 主键 */
id?: string
/** 名称 */
name?: string
/** 权限 */
permissions?: Array<defs.PermissionVo>
/** 标识 */
uid?: string
}
export class UserExtensionVo {
/** 年龄 */
age?: number
/** 性别 */
gender?: any
/** 简介 */
introduction?: string
}
export class UserInfo {
/** 头像 */
avatar?: string
/** 介绍 */
desc?: string
/** 用户主页 */
homePath?: string
/** 手机号 */
mobile?: string
/** 真实姓名 */
realName?: string
/** 角色 */
roles?: Array<defs.RoleVo>
/** 主键 */
userId?: string
/** 用户名 */
username?: string
}
export class UserVo {
/** 头像 */
avatar?: string
/** 最后登录时间 */
createTime?: string
/** 是否删除 */
deleted?: boolean
/** 邮箱 */
email?: string
/** 是否启用 */
enabled?: boolean
/** 主键 */
id?: string
/** 最后登录IP地址 */
lastLoginIp?: string
/** 最后登录时间 */
lastLoginTime?: string
/** 手机号 */
mobile?: string
/** 真实姓名 */
realName?: string
/** 职称 */
title?: string
/** 用户名 */
username?: string
}
}
declare namespace API {
/**
* 身份认证
*/
export namespace auth {
/**
* 登录
* /auth/login
*/
export namespace login {
export class Params {
/** 账号(支持用户名/手机号/邮箱) */
account: string
/** 密码 */
password: string
}
export type Response = defs.LoginVo
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 登出
* /auth/logout
*/
export namespace logout {
export class Params {}
export type Response = string
export const init: Response
export function request(
params?: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 注册
* /auth/register
*/
export namespace register {
export class Params {
/** 用户名 */
username: string
/** 密码 */
password: string
/** 真实姓名 */
realName: string
/** 手机号 */
mobile: string
/** 头像 */
avatar?: string
/** 邮箱 */
email?: string
/** 是否启用 */
enable?: boolean
}
export type Response = string
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 安全验证
* /auth/safe
*/
export namespace safe {
export class Params {
/** 密码 */
password: string
}
export type Response = string
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 检查登录
* /auth/valid
*/
export namespace valid {
export class Params {}
export type Response = defs.Boolean
export const init: Response
export function request(
params?: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
}
/**
* 字典管理
*/
export namespace dict {
/**
* 新增
* /sys/dict/add
*/
export namespace add {
export class Params {
/** id */
id: string
/** 字典名称 */
name: string
/** 字典编号 */
code: string
/** 字典描述 */
description?: string
}
export type Response = string
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 查询
* /sys/dict/find
*/
export namespace find {
export class Params {
/** id */
id: string
}
export type Response = defs.DictVo
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 修改
* /sys/dict/modify
*/
export namespace modify {
export class Params {
/** id */
id: string
/** 字典名称 */
name: string
/** 字典编号 */
code: string
/** 字典描述 */
description?: string
}
export type Response = string
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 分页查询
* /sys/dict/page
*/
export namespace page {
export class Params {
/** 分页条数 */
pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */
sortField?: string
/** 排序方向(ASC|DESC) */
sortOrder?: string
}
export type Response = defs.PageVoDictVo
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 删除
* /sys/dict/remove
*/
export namespace remove {
export class Params {
/** ids 多个以逗号分割 */
ids: string
}
export type Response = string
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 选项查询
* /sys/dict/selector
*/
export namespace selector {
export class Params {}
export type Response = defs.ArrayListKeyValueVo
export const init: Response
export function request(
params?: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
}
/**
* 字典选项管理
*/
export namespace dictItem {
/**
* 新增
* /sys/dict/item/add
*/
export namespace add {
export class Params {
/** id */
id: string
/** 字典 ID */
dictId: string
/** 字典选项名称 */
name: string
/** 字典选项值 */
value: string
/** 字典选项描述 */
description?: string
/** 字典选项排序序号 */
serial?: number
/** 字典选项是否启用 */
enable: boolean
}
export type Response = string
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
} }
}
namespace API {
/**
* 身份认证
*/
export namespace auth {
/** /**
* 登录 * 查询
* /api/auth/login * /sys/dict/item/find
*/ */
export namespace login { export namespace find {
export class Params { export class Params {
/** 账号(支持用户名/手机号/邮箱) */ /** id */
account: string id: string
/** 密码 */
password: string
} }
export type Response = defs.LoginVo export type Response = defs.DictItemVo
export const init: Response export const init: Response
...@@ -239,48 +1178,55 @@ namespace API { ...@@ -239,48 +1178,55 @@ namespace API {
} }
/** /**
* 登出 * 修改
* /api/auth/logout * /sys/dict/item/modify
*/ */
export namespace logout { export namespace modify {
export class Params {} export class Params {
/** id */
id: string
/** 字典 ID */
dictId: string
/** 字典选项名称 */
name: string
/** 字典选项值 */
value: string
/** 字典选项描述 */
description?: string
/** 字典选项排序序号 */
serial?: number
/** 字典选项是否启用 */
enable: boolean
}
export type Response = string export type Response = string
export const init: Response export const init: Response
export function request( export function request(
params?: Params, params: Params,
config?: http.RequestConfig<Params>, config?: http.RequestConfig<Params>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
} }
/** /**
* 注册 * 分页查询
* /api/auth/register * /sys/dict/item/page
*/ */
export namespace register { export namespace page {
export class Params { export class Params {
/** 头像 */ /** 分页条数 */
avatar?: string pageSize: number
/** 邮箱 */ /** 当前页数 */
email?: string pageNo: number
/** 是否启用 */ /** 排序字段 */
enable?: boolean sortField?: string
/** 简介 */ /** 排序方向(ASC|DESC) */
introduction?: string sortOrder?: string
/** 手机号 */
mobile: string
/** 密码 */
password: string
/** 真实姓名 */
realName: string
/** 用户名 */
username: string
} }
export type Response = string export type Response = defs.PageVoDictItemVo
export const init: Response export const init: Response
...@@ -292,13 +1238,13 @@ namespace API { ...@@ -292,13 +1238,13 @@ namespace API {
} }
/** /**
* 安全校验 * 删除
* /api/auth/safe * /sys/dict/item/remove
*/ */
export namespace safe { export namespace remove {
export class Params { export class Params {
/** 密码 */ /** ids 多个以逗号分割 */
password: string ids: string
} }
export type Response = string export type Response = string
...@@ -313,18 +1259,25 @@ namespace API { ...@@ -313,18 +1259,25 @@ namespace API {
} }
/** /**
* 检查登录 * 选项查询
* /api/auth/valid * /sys/dict/item/selector
*/ */
export namespace valid { export namespace selector {
export class Params {} export class Params {
/** 字典 ID */
dictId?: string
/** 字典 ID */
dictCode?: string
/** 字典选项是否启用 */
enable?: boolean
}
export type Response = boolean export type Response = defs.ArrayListKeyValueVo
export const init: Response export const init: Response
export function request( export function request(
params?: Params, params: Params,
config?: http.RequestConfig<Params>, config?: http.RequestConfig<Params>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
...@@ -337,7 +1290,7 @@ namespace API { ...@@ -337,7 +1290,7 @@ namespace API {
export namespace example { export namespace example {
/** /**
* Hello World * Hello World
* /api/example/ * /example/
*/ */
export namespace hello { export namespace hello {
export class Params {} export class Params {}
...@@ -355,12 +1308,12 @@ namespace API { ...@@ -355,12 +1308,12 @@ namespace API {
/** /**
* 文件下载 * 文件下载
* /api/example/download * /example/download
*/ */
export namespace download { export namespace download {
export class Params {} export class Params {}
export type Response = any export type Response = void
export const init: Response export const init: Response
...@@ -373,7 +1326,7 @@ namespace API { ...@@ -373,7 +1326,7 @@ namespace API {
/** /**
* 测试失败 * 测试失败
* /api/example/fail * /example/fail
*/ */
export namespace fail { export namespace fail {
export class Params {} export class Params {}
...@@ -391,7 +1344,7 @@ namespace API { ...@@ -391,7 +1344,7 @@ namespace API {
/** /**
* 查询用户属性 * 查询用户属性
* /api/example/findUserExtensionInfo * /example/findUserExtensionInfo
*/ */
export namespace findUserExtensionInfo { export namespace findUserExtensionInfo {
export class Params {} export class Params {}
...@@ -409,17 +1362,17 @@ namespace API { ...@@ -409,17 +1362,17 @@ namespace API {
/** /**
* JSON 传参 * JSON 传参
* /api/example/json * /example/json
*/ */
export namespace json { export namespace json {
export class Params {} export class Params {}
export type Response = defs.PageVo<string> export type Response = defs.PageVoString
export const init: Response export const init: Response
export function request( export function request(
body: defs.PageParam, body?: defs.PageParam,
config?: http.RequestConfig<defs.PageParam>, config?: http.RequestConfig<defs.PageParam>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
...@@ -427,21 +1380,21 @@ namespace API { ...@@ -427,21 +1380,21 @@ namespace API {
/** /**
* 分页条件查询 * 分页条件查询
* /api/example/page * /example/page
*/ */
export namespace page { export namespace page {
export class Params { export class Params {
/** 当前页数 */
pageNo: number
/** 分页条数 */ /** 分页条数 */
pageSize: number pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export type Response = defs.PageVo<string> export type Response = defs.PageVoString
export const init: Response export const init: Response
...@@ -451,6 +1404,24 @@ namespace API { ...@@ -451,6 +1404,24 @@ namespace API {
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
} }
/**
* 文件上传
* /example/upload
*/
export namespace upload {
export class Params {}
export type Response = string
export const init: Response
export function request(
body?: object,
config?: http.RequestConfig<object>,
options?: http.RequestOptions,
): Promise<Response>
}
} }
/** /**
...@@ -459,7 +1430,7 @@ namespace API { ...@@ -459,7 +1430,7 @@ namespace API {
export namespace file { export namespace file {
/** /**
* 文件下载 * 文件下载
* /api/common/file/download * /common/file/download
*/ */
export namespace download { export namespace download {
export class Params { export class Params {
...@@ -469,7 +1440,7 @@ namespace API { ...@@ -469,7 +1440,7 @@ namespace API {
object: string object: string
} }
export type Response = any export type Response = void
export const init: Response export const init: Response
...@@ -482,7 +1453,7 @@ namespace API { ...@@ -482,7 +1453,7 @@ namespace API {
/** /**
* 文件上传 * 文件上传
* /api/common/file/upload * /common/file/upload
*/ */
export namespace upload { export namespace upload {
export class Params {} export class Params {}
...@@ -492,30 +1463,26 @@ namespace API { ...@@ -492,30 +1463,26 @@ namespace API {
export const init: Response export const init: Response
export function request( export function request(
params: Params, body?: object,
form: FormData, config?: http.RequestConfig<object>,
config?: http.RequestConfig<Params | FormData>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
} }
/** /**
* Base64 图片上传 * Base64 图片上传
* /api/common/file/uploadBase64Image * /common/file/uploadBase64Image
*/ */
export namespace uploadBase64Image { export namespace uploadBase64Image {
export class Params { export class Params {}
/** Base64 图片信息 */
base64Image: string
}
export type Response = string export type Response = string
export const init: Response export const init: Response
export function request( export function request(
params: Params, body?: string,
config?: http.RequestConfig<Params>, config?: http.RequestConfig<string>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
} }
...@@ -527,58 +1494,33 @@ namespace API { ...@@ -527,58 +1494,33 @@ namespace API {
export namespace permission { export namespace permission {
/** /**
* 新增 * 新增
* /api/sys/permission/add * /sys/permission/add
*/ */
export namespace add { export namespace add {
export class Params { export class Params {}
/** 组件 */
component?: string
/** 是否启用 */
enable?: boolean
/** 是否隐藏 */
hidden?: boolean
/** 图标 */
icon?: string
/** 元数据 */
meta?: string
/** 名称 */
name: string
/** 路径 */
path?: string
/** 父级ID */
pid?: string
/** 重定向 */
redirect?: string
/** 序号 */
serial?: number
/** 权限类型 */
type: 'DIR' | 'MENU' | 'BUTTON'
/** 标识 */
uid: string
}
export type Response = string export type Response = string
export const init: Response export const init: Response
export function request( export function request(
params: Params, body?: defs.PermissionParam,
config?: http.RequestConfig<Params>, config?: http.RequestConfig<defs.PermissionParam>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
} }
/** /**
* 删除 * 查询
* /api/sys/permission/deleted * /sys/permission/find
*/ */
export namespace deleted { export namespace find {
export class Params { export class Params {
/** id */ /** id */
id: string id: string
} }
export type Response = string export type Response = defs.PermissionVo
export const init: Response export const init: Response
...@@ -590,61 +1532,40 @@ namespace API { ...@@ -590,61 +1532,40 @@ namespace API {
} }
/** /**
* 查询 * 修改
* /api/sys/permission/find * /sys/permission/modify
*/ */
export namespace find { export namespace modify {
export class Params { export class Params {}
/** id */
id: string
}
export type Response = defs.PermissionVo export type Response = string
export const init: Response export const init: Response
export function request( export function request(
params: Params, body?: defs.PermissionParam,
config?: http.RequestConfig<Params>, config?: http.RequestConfig<defs.PermissionParam>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
} }
/** /**
* 修改 * 分页查询
* /api/sys/permission/modify * /sys/permission/page
*/ */
export namespace modify { export namespace page {
export class Params { export class Params {
/** 组件 */ /** 分页条数 */
component?: string pageSize: number
/** 是否启用 */ /** 当前页数 */
enable?: boolean pageNo: number
/** 是否隐藏 */ /** 排序字段 */
hidden?: boolean sortField?: string
/** 图标 */ /** 排序方向(ASC|DESC) */
icon?: string sortOrder?: string
/** id */
id: string
/** 元数据 */
meta?: string
/** 名称 */
name: string
/** 路径 */
path?: string
/** 父级ID */
pid?: string
/** 重定向 */
redirect?: string
/** 序号 */
serial?: number
/** 权限类型 */
type: 'DIR' | 'MENU' | 'BUTTON'
/** 标识 */
uid: string
} }
export type Response = string export type Response = defs.PageVoPermissionVo
export const init: Response export const init: Response
...@@ -656,22 +1577,16 @@ namespace API { ...@@ -656,22 +1577,16 @@ namespace API {
} }
/** /**
* 分页查询 * 删除
* /api/sys/permission/page * /sys/permission/remove
*/ */
export namespace page { export namespace remove {
export class Params { export class Params {
/** 当前页数 */ /** id */
pageNo: number id: string
/** 分页条数 */
pageSize: number
/** 排序字段 */
sortField?: string
/** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC'
} }
export type Response = defs.PageVo<defs.PermissionVo> export type Response = string
export const init: Response export const init: Response
...@@ -684,15 +1599,15 @@ namespace API { ...@@ -684,15 +1599,15 @@ namespace API {
/** /**
* 树结构查询 * 树结构查询
* /api/sys/permission/tree * /sys/permission/tree
*/ */
export namespace tree { export namespace tree {
export class Params { export class Params {
/** pid */ /** pid */
pid?: string pid: string
} }
export type Response = Array<defs.PermissionVo> export type Response = defs.ArrayListPermissionVo
export const init: Response export const init: Response
...@@ -710,14 +1625,16 @@ namespace API { ...@@ -710,14 +1625,16 @@ namespace API {
export namespace role { export namespace role {
/** /**
* 新增 * 新增
* /api/sys/role/add * /sys/role/add
*/ */
export namespace add { export namespace add {
export class Params { export class Params {
/** 名称 */ /** id */
name: string id: string
/** 标识 */ /** 标识 */
uid: string uid: string
/** 名称 */
name: string
} }
export type Response = string export type Response = string
...@@ -733,7 +1650,7 @@ namespace API { ...@@ -733,7 +1650,7 @@ namespace API {
/** /**
* 分配权限 * 分配权限
* /api/sys/role/assign * /sys/role/assign
*/ */
export namespace assign { export namespace assign {
export class Params { export class Params {
...@@ -755,29 +1672,8 @@ namespace API { ...@@ -755,29 +1672,8 @@ namespace API {
} }
/** /**
* 删除
* /api/sys/role/deleted
*/
export namespace deleted {
export class Params {
/** ids 多个以逗号分割 */
ids: string
}
export type Response = string
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 查询 * 查询
* /api/sys/role/find * /sys/role/find
*/ */
export namespace find { export namespace find {
export class Params { export class Params {
...@@ -798,16 +1694,16 @@ namespace API { ...@@ -798,16 +1694,16 @@ namespace API {
/** /**
* 修改 * 修改
* /api/sys/role/modify * /sys/role/modify
*/ */
export namespace modify { export namespace modify {
export class Params { export class Params {
/** id */ /** id */
id: string id: string
/** 名称 */
name: string
/** 标识 */ /** 标识 */
uid: string uid: string
/** 名称 */
name: string
} }
export type Response = string export type Response = string
...@@ -823,21 +1719,42 @@ namespace API { ...@@ -823,21 +1719,42 @@ namespace API {
/** /**
* 分页查询 * 分页查询
* /api/sys/role/page * /sys/role/page
*/ */
export namespace page { export namespace page {
export class Params { export class Params {
/** 当前页数 */
pageNo: number
/** 分页条数 */ /** 分页条数 */
pageSize: number pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
}
export type Response = defs.PageVoRoleVo
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 删除
* /sys/role/remove
*/
export namespace remove {
export class Params {
/** ids 多个以逗号分割 */
ids: string
} }
export type Response = defs.PageVo<defs.RoleVo> export type Response = string
export const init: Response export const init: Response
...@@ -850,12 +1767,12 @@ namespace API { ...@@ -850,12 +1767,12 @@ namespace API {
/** /**
* 选项查询 * 选项查询
* /api/sys/role/selector * /sys/role/selector
*/ */
export namespace selector { export namespace selector {
export class Params {} export class Params {}
export type Response = Array<defs.RoleVo> export type Response = defs.ArrayListRoleVo
export const init: Response export const init: Response
...@@ -873,7 +1790,7 @@ namespace API { ...@@ -873,7 +1790,7 @@ namespace API {
export namespace user { export namespace user {
/** /**
* 分配角色 * 分配角色
* /api/sys/user/assign * /sys/user/assign
*/ */
export namespace assign { export namespace assign {
export class Params { export class Params {
...@@ -896,21 +1813,21 @@ namespace API { ...@@ -896,21 +1813,21 @@ namespace API {
/** /**
* 分页查询 * 分页查询
* /api/sys/user/page * /sys/user/page
*/ */
export namespace page { export namespace page {
export class Params { export class Params {
/** 当前页数 */
pageNo: number
/** 分页条数 */ /** 分页条数 */
pageSize: number pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export type Response = defs.PageVo<defs.UserVo> export type Response = defs.PageVoUserVo
export const init: Response export const init: Response
...@@ -928,12 +1845,12 @@ namespace API { ...@@ -928,12 +1845,12 @@ namespace API {
export namespace userView { export namespace userView {
/** /**
* 获取用户菜单 * 获取用户菜单
* /api/user/getMenuList * /user/getMenuList
*/ */
export namespace getMenuList { export namespace getMenuList {
export class Params {} export class Params {}
export type Response = Array<defs.MenuVo> export type Response = defs.ArrayListMenuVo
export const init: Response export const init: Response
...@@ -946,12 +1863,12 @@ namespace API { ...@@ -946,12 +1863,12 @@ namespace API {
/** /**
* 获取用户权限 * 获取用户权限
* /api/user/getPermCode * /user/getPermCode
*/ */
export namespace getPermCode { export namespace getPermCode {
export class Params {} export class Params {}
export type Response = Array<string> export type Response = defs.ArrayListString
export const init: Response export const init: Response
...@@ -964,7 +1881,7 @@ namespace API { ...@@ -964,7 +1881,7 @@ namespace API {
/** /**
* 获取登录用户信息 * 获取登录用户信息
* /api/user/getUserInfo * /user/getUserInfo
*/ */
export namespace getUserInfo { export namespace getUserInfo {
export class Params {} export class Params {}
......
export class DictItemVo {
/** 字典选项描述 */
description = ''
/** 字典选项是否启用 */
enable = false
/** id */
id = ''
/** 字典选项名称 */
name = ''
/** 字典选项排序序号 */
serial = undefined
/** 字典选项值 */
value = ''
}
export class DictVo {
/** 字典编号 */
code = ''
/** 字典描述 */
description = ''
/** id */
id = ''
/** 字典名称 */
name = ''
}
export class KeyValueVo {
/** 是否启用 */
enable = ''
/** key */
key = ''
/** label */
label = ''
/** value */
value = ''
}
export class LoginVo { export class LoginVo {
/** token */ /** token */
token = '' token = ''
...@@ -24,6 +72,9 @@ export class MenuVo { ...@@ -24,6 +72,9 @@ export class MenuVo {
/** 重定向 */ /** 重定向 */
redirect = '' redirect = ''
/** 唯一标识 */
uid = ''
} }
export class PageParam { export class PageParam {
...@@ -40,7 +91,7 @@ export class PageParam { ...@@ -40,7 +91,7 @@ export class PageParam {
sortOrder = 'ASC' sortOrder = 'ASC'
} }
export class PageVo { export class PageVoDictItemVo {
/** 数据 */ /** 数据 */
data = [] data = []
...@@ -51,10 +102,62 @@ export class PageVo { ...@@ -51,10 +102,62 @@ export class PageVo {
total = undefined total = undefined
} }
export class PermissionVo { export class PageVoDictVo {
/** 子权限 */ /** 数据 */
children = [] data = []
/** 数据最新时间 */
latest = ''
/** 数据总数 */
total = undefined
}
export class PageVoPermissionVo {
/** 数据 */
data = []
/** 数据最新时间 */
latest = ''
/** 数据总数 */
total = undefined
}
export class PageVoRoleVo {
/** 数据 */
data = []
/** 数据最新时间 */
latest = ''
/** 数据总数 */
total = undefined
}
export class PageVoString {
/** 数据 */
data = []
/** 数据最新时间 */
latest = ''
/** 数据总数 */
total = undefined
}
export class PageVoUserVo {
/** 数据 */
data = []
/** 数据最新时间 */
latest = ''
/** 数据总数 */
total = undefined
}
export class PermissionParam {
/** 组件 */ /** 组件 */
component = '' component = ''
...@@ -67,7 +170,7 @@ export class PermissionVo { ...@@ -67,7 +170,7 @@ export class PermissionVo {
/** 图标 */ /** 图标 */
icon = '' icon = ''
/** 主键 */ /** id */
id = '' id = ''
/** 元数据 */ /** 元数据 */
...@@ -82,6 +185,9 @@ export class PermissionVo { ...@@ -82,6 +185,9 @@ export class PermissionVo {
/** 父级ID */ /** 父级ID */
pid = '' pid = ''
/** 重定向 */
redirect = ''
/** 序号 */ /** 序号 */
serial = undefined serial = undefined
...@@ -92,9 +198,50 @@ export class PermissionVo { ...@@ -92,9 +198,50 @@ export class PermissionVo {
uid = '' uid = ''
} }
export class Result { export class PermissionVo {
/** children */
children = []
/** component */
component = ''
/** enable */
enable = false
/** hidden */
hidden = false
/** icon */
icon = ''
/** id */
id = ''
/** meta */
meta = undefined
/** name */
name = ''
/** path */
path = ''
/** pid */
pid = ''
/** serial */
serial = undefined
/** type */
type = 'DIR'
/** uid */
uid = ''
}
export class ResultArrayListKeyValueVo {
/** 内容 */ /** 内容 */
body = new LoginVo() body = []
/** 业务标识码 */ /** 业务标识码 */
code = undefined code = undefined
...@@ -118,26 +265,523 @@ export class Result { ...@@ -118,26 +265,523 @@ export class Result {
timestamp = '' timestamp = ''
} }
export class RoleVo { export class ResultArrayListMenuVo {
/** 主键 */ /** 内容 */
id = '' body = []
/** 名称 */ /** 业务标识码 */
name = '' code = undefined
/** 权限 */ /** 详细信息 */
permissions = [] details = ''
/** 标识 */ /** 异常信息 */
uid = '' error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
} }
export class UserExtensionVo { export class ResultArrayListPermissionVo {
/** 年龄 */ /** 内容 */
age = undefined body = []
/** 性别 */ /** 业务标识码 */
gender = undefined code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultArrayListRoleVo {
/** 内容 */
body = []
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultArrayListString {
/** 内容 */
body = []
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultBoolean {
/** 内容 */
body = false
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultDictItemVo {
/** body */
body = new DictItemVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultDictVo {
/** body */
body = new DictVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultLoginVo {
/** body */
body = new LoginVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPageVoDictItemVo {
/** body */
body = new PageVoDictItemVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPageVoDictVo {
/** body */
body = new PageVoDictVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPageVoPermissionVo {
/** body */
body = new PageVoPermissionVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPageVoRoleVo {
/** body */
body = new PageVoRoleVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPageVoString {
/** body */
body = new PageVoString()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPageVoUserVo {
/** body */
body = new PageVoUserVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPermissionVo {
/** body */
body = new PermissionVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultRoleVo {
/** body */
body = new RoleVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultString {
/** 内容 */
body = ''
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultUserExtensionVo {
/** body */
body = new UserExtensionVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultUserInfo {
/** body */
body = new UserInfo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class RoleVo {
/** 主键 */
id = ''
/** 名称 */
name = ''
/** 权限 */
permissions = []
/** 标识 */
uid = ''
}
export class UserExtensionVo {
/** 年龄 */
age = undefined
/** 性别 */
gender = undefined
/** 简介 */
introduction = ''
} }
export class UserInfo { export class UserInfo {
......
/** /**
* @desc 登录 * @desc 登录
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
...@@ -10,11 +12,9 @@ export class Params { ...@@ -10,11 +12,9 @@ export class Params {
password: string password: string
} }
export function request( export const init = new defs.ResultLoginVo()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<defs.LoginVo> {
return defHttp.request( return defHttp.request(
{ {
url: '/auth/login', url: '/auth/login',
...@@ -23,6 +23,8 @@ export function request( ...@@ -23,6 +23,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 登出 * @desc 登出
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export const init = new defs.ResultString()
params?: Params,
config?: http.RequestConfig<Params>, export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/auth/logout', url: '/auth/logout',
...@@ -18,6 +18,8 @@ export function request( ...@@ -18,6 +18,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 注册 * @desc 注册
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 用户名 */
username: string
/** 密码 */
password: string
/** 真实姓名 */
realName: string
/** 手机号 */
mobile: string
/** 头像 */ /** 头像 */
avatar?: string avatar?: string
/** 邮箱 */ /** 邮箱 */
email?: string email?: string
/** 是否启用 */ /** 是否启用 */
enable?: boolean enable?: boolean
/** 简介 */
introduction?: string
/** 手机号 */
mobile: string
/** 密码 */
password: string
/** 真实姓名 */
realName: string
/** 用户名 */
username: string
} }
export function request( export const init = new defs.ResultString()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/auth/register', url: '/auth/register',
...@@ -35,6 +33,8 @@ export function request( ...@@ -35,6 +33,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 安全校验 * @desc 安全验证
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
...@@ -8,11 +10,9 @@ export class Params { ...@@ -8,11 +10,9 @@ export class Params {
password: string password: string
} }
export function request( export const init = new defs.ResultString()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/auth/safe', url: '/auth/safe',
...@@ -21,6 +21,8 @@ export function request( ...@@ -21,6 +21,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 检查登录 * @desc 检查登录
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export const init = new defs.ResultBoolean()
params?: Params,
config?: http.RequestConfig<Params>, export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<boolean> {
return defHttp.request( return defHttp.request(
{ {
url: '/auth/valid', url: '/auth/valid',
...@@ -18,6 +18,8 @@ export function request( ...@@ -18,6 +18,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/**
* @desc 新增
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** id */
id: string
/** 字典名称 */
name: string
/** 字典编号 */
code: string
/** 字典描述 */
description?: string
}
export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/add',
method: 'POST',
data: params,
...config,
},
{
...options,
},
)
}
/**
* @desc 查询
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** id */
id: string
}
export const init = new defs.ResultDictVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/find',
method: 'GET',
params,
...config,
},
{
...options,
},
)
}
/**
* @description 字典管理
*/
import * as add from './add'
import * as find from './find'
import * as modify from './modify'
import * as page from './page'
import * as remove from './remove'
import * as selector from './selector'
export { add, find, modify, page, remove, selector }
/**
* @desc 修改
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** id */
id: string
/** 字典名称 */
name: string
/** 字典编号 */
code: string
/** 字典描述 */
description?: string
}
export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/modify',
method: 'POST',
data: params,
...config,
},
{
...options,
},
)
}
/**
* @desc 分页查询
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** 分页条数 */
pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */
sortField?: string
/** 排序方向(ASC|DESC) */
sortOrder?: string
}
export const init = new defs.ResultPageVoDictVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/page',
method: 'GET',
params,
...config,
},
{
...options,
},
)
}
/** /**
* @desc 删除 * @desc 删除
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
...@@ -8,19 +10,19 @@ export class Params { ...@@ -8,19 +10,19 @@ export class Params {
ids: string ids: string
} }
export function request( export const init = new defs.ResultString()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/role/deleted', url: '/sys/dict/remove',
method: 'POST', method: 'POST',
data: params, data: params,
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/**
* @desc 选项查询
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {}
export const init = new defs.ResultArrayListKeyValueVo()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/selector',
method: 'GET',
params,
...config,
},
{
...options,
},
)
}
/**
* @desc 新增
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** id */
id: string
/** 字典 ID */
dictId: string
/** 字典选项名称 */
name: string
/** 字典选项值 */
value: string
/** 字典选项描述 */
description?: string
/** 字典选项排序序号 */
serial?: number
/** 字典选项是否启用 */
enable: boolean
}
export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/item/add',
method: 'POST',
data: params,
...config,
},
{
...options,
},
)
}
/**
* @desc 查询
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** id */
id: string
}
export const init = new defs.ResultDictItemVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/item/find',
method: 'GET',
params,
...config,
},
{
...options,
},
)
}
/**
* @description 字典选项管理
*/
import * as add from './add'
import * as find from './find'
import * as modify from './modify'
import * as page from './page'
import * as remove from './remove'
import * as selector from './selector'
export { add, find, modify, page, remove, selector }
/**
* @desc 修改
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** id */
id: string
/** 字典 ID */
dictId: string
/** 字典选项名称 */
name: string
/** 字典选项值 */
value: string
/** 字典选项描述 */
description?: string
/** 字典选项排序序号 */
serial?: number
/** 字典选项是否启用 */
enable: boolean
}
export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/item/modify',
method: 'POST',
data: params,
...config,
},
{
...options,
},
)
}
/**
* @desc 分页查询
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** 分页条数 */
pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */
sortField?: string
/** 排序方向(ASC|DESC) */
sortOrder?: string
}
export const init = new defs.ResultPageVoDictItemVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/item/page',
method: 'GET',
params,
...config,
},
{
...options,
},
)
}
/**
* @desc 删除
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** ids 多个以逗号分割 */
ids: string
}
export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/item/remove',
method: 'POST',
data: params,
...config,
},
{
...options,
},
)
}
/**
* @desc 选项查询
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** 字典 ID */
dictId?: string
/** 字典 ID */
dictCode?: string
/** 字典选项是否启用 */
enable?: boolean
}
export const init = new defs.ResultArrayListKeyValueVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/dict/item/selector',
method: 'GET',
params,
...config,
},
{
...options,
},
)
}
/** /**
* @desc 文件下载 * @desc 文件下载
*/ */
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
params?: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<any> {
return defHttp.request( return defHttp.request(
{ {
url: '/example/download', url: '/example/download',
method: 'GET', method: 'GET',
params, params,
responseType: 'blob',
timeout: 0,
...config, ...config,
}, },
options, {
download: true,
...options,
},
) )
} }
/** /**
* @desc 测试失败 * @desc 测试失败
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export const init = new defs.ResultString()
params?: Params,
config?: http.RequestConfig<Params>, export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/example/fail', url: '/example/fail',
...@@ -18,6 +18,8 @@ export function request( ...@@ -18,6 +18,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 查询用户属性 * @desc 查询用户属性
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export const init = new defs.ResultUserExtensionVo()
params?: Params,
config?: http.RequestConfig<Params>, export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<defs.UserExtensionVo> {
return defHttp.request( return defHttp.request(
{ {
url: '/example/findUserExtensionInfo', url: '/example/findUserExtensionInfo',
...@@ -18,6 +18,8 @@ export function request( ...@@ -18,6 +18,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc Hello World * @desc Hello World
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export const init = new defs.ResultString()
params?: Params,
config?: http.RequestConfig<Params>, export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/example/', url: '/example/',
...@@ -18,6 +18,8 @@ export function request( ...@@ -18,6 +18,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
...@@ -7,5 +7,6 @@ import * as fail from './fail' ...@@ -7,5 +7,6 @@ import * as fail from './fail'
import * as findUserExtensionInfo from './findUserExtensionInfo' import * as findUserExtensionInfo from './findUserExtensionInfo'
import * as json from './json' import * as json from './json'
import * as page from './page' import * as page from './page'
import * as upload from './upload'
export { hello, download, fail, findUserExtensionInfo, json, page } export { hello, download, fail, findUserExtensionInfo, json, page, upload }
/** /**
* @desc JSON 传参 * @desc JSON 传参
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export const init = new defs.ResultPageVoString()
export function request( export function request(
body: defs.PageParam, body?: defs.PageParam,
config?: http.RequestConfig<defs.PageParam>, config?: http.RequestConfig<defs.PageParam>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<defs.PageVo<string>> { ) {
return defHttp.request( return defHttp.request(
{ {
url: '/example/json', url: '/example/json',
...@@ -17,6 +21,8 @@ export function request( ...@@ -17,6 +21,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 分页条件查询 * @desc 分页条件查询
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */
pageNo: number
/** 分页条数 */ /** 分页条数 */
pageSize: number pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export function request( export const init = new defs.ResultPageVoString()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<defs.PageVo<string>> {
return defHttp.request( return defHttp.request(
{ {
url: '/example/page', url: '/example/page',
...@@ -27,6 +27,8 @@ export function request( ...@@ -27,6 +27,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/**
* @desc 文件上传
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export const init = new defs.ResultString()
export function request(body?: object, config?: http.RequestConfig<object>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/example/upload',
method: 'POST',
data: body,
headers: { 'Content-Type': 'application/json' },
...config,
},
{
...options,
},
)
}
/** /**
* @desc 文件下载 * @desc 文件下载
*/ */
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
...@@ -10,19 +11,22 @@ export class Params { ...@@ -10,19 +11,22 @@ export class Params {
object: string object: string
} }
export function request( export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<any> {
return defHttp.request( return defHttp.request(
{ {
url: '/common/file/download', url: '/common/file/download',
method: 'GET', method: 'GET',
params, params,
responseType: 'blob',
timeout: 0,
...config, ...config,
}, },
options, {
download: true,
...options,
},
) )
} }
/** /**
* @desc 文件上传 * @desc 文件上传
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export const init = new defs.ResultString()
export function request( export function request(body?: object, config?: http.RequestConfig<object>, options?: http.RequestOptions) {
params: Params,
form: FormData,
config?: http.RequestConfig<Params | FormData>,
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/common/file/upload', url: '/common/file/upload',
method: 'POST', method: 'POST',
data: form || params, data: body,
headers: { 'Content-Type': 'multipart/form-data;charset=UTF-8' }, headers: { 'Content-Type': 'application/json' },
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc Base64 图片上传 * @desc Base64 图片上传
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export const init = new defs.ResultString()
/** Base64 图片信息 */
base64Image: string
}
export function request( export function request(body?: string, config?: http.RequestConfig<string>, options?: http.RequestOptions) {
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/common/file/uploadBase64Image', url: '/common/file/uploadBase64Image',
method: 'POST', method: 'POST',
data: params, data: body,
headers: { 'Content-Type': 'application/json' },
...config, ...config,
}, },
options, {
...options,
},
) )
} }
import * as auth from './auth' import * as auth from './auth'
import * as dict from './dict'
import * as dictItem from './dictItem'
import * as example from './example' import * as example from './example'
import * as file from './file' import * as file from './file'
import * as permission from './permission' import * as permission from './permission'
...@@ -8,6 +10,8 @@ import * as userView from './userView' ...@@ -8,6 +10,8 @@ import * as userView from './userView'
export const API = { export const API = {
auth, auth,
dict,
dictItem,
example, example,
file, file,
permission, permission,
......
/** /**
* @desc 新增 * @desc 新增
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export const init = new defs.ResultString()
/** 组件 */
component?: string
/** 是否启用 */
enable?: boolean
/** 是否隐藏 */
hidden?: boolean
/** 图标 */
icon?: string
/** 元数据 */
meta?: string
/** 名称 */
name: string
/** 路径 */
path?: string
/** 父级ID */
pid?: string
/** 重定向 */
redirect?: string
/** 序号 */
serial?: number
/** 权限类型 */
type: 'DIR' | 'MENU' | 'BUTTON'
/** 标识 */
uid: string
}
export function request( export function request(
params: Params, body?: defs.PermissionParam,
config?: http.RequestConfig<Params>, config?: http.RequestConfig<defs.PermissionParam>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<string> { ) {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/permission/add', url: '/sys/permission/add',
method: 'POST', method: 'POST',
data: params, data: body,
headers: { 'Content-Type': 'application/json' },
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 查询 * @desc 查询
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
...@@ -8,11 +10,9 @@ export class Params { ...@@ -8,11 +10,9 @@ export class Params {
id: string id: string
} }
export function request( export const init = new defs.ResultPermissionVo()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<defs.PermissionVo> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/permission/find', url: '/sys/permission/find',
...@@ -21,6 +21,8 @@ export function request( ...@@ -21,6 +21,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
* @description 权限管理 * @description 权限管理
*/ */
import * as add from './add' import * as add from './add'
import * as deleted from './deleted'
import * as find from './find' import * as find from './find'
import * as modify from './modify' import * as modify from './modify'
import * as page from './page' import * as page from './page'
import * as remove from './remove'
import * as tree from './tree' import * as tree from './tree'
export { add, deleted, find, modify, page, tree } export { add, find, modify, page, remove, tree }
/** /**
* @desc 修改 * @desc 修改
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export const init = new defs.ResultString()
/** 组件 */
component?: string
/** 是否启用 */
enable?: boolean
/** 是否隐藏 */
hidden?: boolean
/** 图标 */
icon?: string
/** id */
id: string
/** 元数据 */
meta?: string
/** 名称 */
name: string
/** 路径 */
path?: string
/** 父级ID */
pid?: string
/** 重定向 */
redirect?: string
/** 序号 */
serial?: number
/** 权限类型 */
type: 'DIR' | 'MENU' | 'BUTTON'
/** 标识 */
uid: string
}
export function request( export function request(
params: Params, body?: defs.PermissionParam,
config?: http.RequestConfig<Params>, config?: http.RequestConfig<defs.PermissionParam>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<string> { ) {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/permission/modify', url: '/sys/permission/modify',
method: 'POST', method: 'POST',
data: params, data: body,
headers: { 'Content-Type': 'application/json' },
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 分页查询 * @desc 分页查询
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */
pageNo: number
/** 分页条数 */ /** 分页条数 */
pageSize: number pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export function request( export const init = new defs.ResultPageVoPermissionVo()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<defs.PageVo<defs.PermissionVo>> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/permission/page', url: '/sys/permission/page',
...@@ -27,6 +27,8 @@ export function request( ...@@ -27,6 +27,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 删除 * @desc 删除
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
...@@ -8,19 +10,19 @@ export class Params { ...@@ -8,19 +10,19 @@ export class Params {
id: string id: string
} }
export function request( export const init = new defs.ResultString()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/permission/deleted', url: '/sys/permission/remove',
method: 'POST', method: 'POST',
data: params, data: params,
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 树结构查询 * @desc 树结构查询
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** pid */ /** pid */
pid?: string pid: string
} }
export function request( export const init = new defs.ResultArrayListPermissionVo()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<Array<defs.PermissionVo>> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/permission/tree', url: '/sys/permission/tree',
...@@ -21,6 +21,8 @@ export function request( ...@@ -21,6 +21,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 新增 * @desc 新增
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 名称 */ /** id */
name: string id: string
/** 标识 */ /** 标识 */
uid: string uid: string
/** 名称 */
name: string
} }
export function request( export const init = new defs.ResultString()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/role/add', url: '/sys/role/add',
...@@ -23,6 +25,8 @@ export function request( ...@@ -23,6 +25,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 分配权限 * @desc 分配权限
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
...@@ -10,11 +12,9 @@ export class Params { ...@@ -10,11 +12,9 @@ export class Params {
ids: string ids: string
} }
export function request( export const init = new defs.ResultString()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/role/assign', url: '/sys/role/assign',
...@@ -23,6 +23,8 @@ export function request( ...@@ -23,6 +23,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 查询 * @desc 查询
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
...@@ -8,11 +10,9 @@ export class Params { ...@@ -8,11 +10,9 @@ export class Params {
id: string id: string
} }
export function request( export const init = new defs.ResultRoleVo()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<defs.RoleVo> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/role/find', url: '/sys/role/find',
...@@ -21,6 +21,8 @@ export function request( ...@@ -21,6 +21,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
*/ */
import * as add from './add' import * as add from './add'
import * as assign from './assign' import * as assign from './assign'
import * as deleted from './deleted'
import * as find from './find' import * as find from './find'
import * as modify from './modify' import * as modify from './modify'
import * as page from './page' import * as page from './page'
import * as remove from './remove'
import * as selector from './selector' import * as selector from './selector'
export { add, assign, deleted, find, modify, page, selector } export { add, assign, find, modify, page, remove, selector }
/** /**
* @desc 修改 * @desc 修改
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** id */ /** id */
id: string id: string
/** 名称 */
name: string
/** 标识 */ /** 标识 */
uid: string uid: string
/** 名称 */
name: string
} }
export function request( export const init = new defs.ResultString()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/role/modify', url: '/sys/role/modify',
...@@ -25,6 +25,8 @@ export function request( ...@@ -25,6 +25,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 分页查询 * @desc 分页查询
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */
pageNo: number
/** 分页条数 */ /** 分页条数 */
pageSize: number pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export function request( export const init = new defs.ResultPageVoRoleVo()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<defs.PageVo<defs.RoleVo>> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/role/page', url: '/sys/role/page',
...@@ -27,6 +27,8 @@ export function request( ...@@ -27,6 +27,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/**
* @desc 删除
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** ids 多个以逗号分割 */
ids: string
}
export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/role/remove',
method: 'POST',
data: params,
...config,
},
{
...options,
},
)
}
/** /**
* @desc 选项查询 * @desc 选项查询
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export const init = new defs.ResultArrayListRoleVo()
params?: Params,
config?: http.RequestConfig<Params>, export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<Array<defs.RoleVo>> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/role/selector', url: '/sys/role/selector',
...@@ -18,6 +18,8 @@ export function request( ...@@ -18,6 +18,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 分配角色 * @desc 分配角色
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
...@@ -10,11 +12,9 @@ export class Params { ...@@ -10,11 +12,9 @@ export class Params {
ids: string ids: string
} }
export function request( export const init = new defs.ResultString()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<string> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/user/assign', url: '/sys/user/assign',
...@@ -23,6 +23,8 @@ export function request( ...@@ -23,6 +23,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 分页查询 * @desc 分页查询
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */
pageNo: number
/** 分页条数 */ /** 分页条数 */
pageSize: number pageSize: number
/** 当前页数 */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export function request( export const init = new defs.ResultPageVoUserVo()
params: Params,
config?: http.RequestConfig<Params>, export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<defs.PageVo<defs.UserVo>> {
return defHttp.request( return defHttp.request(
{ {
url: '/sys/user/page', url: '/sys/user/page',
...@@ -27,6 +27,8 @@ export function request( ...@@ -27,6 +27,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 获取用户菜单 * @desc 获取用户菜单
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export const init = new defs.ResultArrayListMenuVo()
params?: Params,
config?: http.RequestConfig<Params>, export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<Array<defs.MenuVo>> {
return defHttp.request( return defHttp.request(
{ {
url: '/user/getMenuList', url: '/user/getMenuList',
...@@ -18,6 +18,8 @@ export function request( ...@@ -18,6 +18,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 获取用户权限 * @desc 获取用户权限
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export const init = new defs.ResultArrayListString()
params?: Params,
config?: http.RequestConfig<Params>, export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<Array<string>> {
return defHttp.request( return defHttp.request(
{ {
url: '/user/getPermCode', url: '/user/getPermCode',
...@@ -18,6 +18,8 @@ export function request( ...@@ -18,6 +18,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
/** /**
* @desc 获取登录用户信息 * @desc 获取登录用户信息
*/ */
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export function request( export const init = new defs.ResultUserInfo()
params?: Params,
config?: http.RequestConfig<Params>, export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
options?: http.RequestOptions,
): Promise<defs.UserInfo> {
return defHttp.request( return defHttp.request(
{ {
url: '/user/getUserInfo', url: '/user/getUserInfo',
...@@ -18,6 +18,8 @@ export function request( ...@@ -18,6 +18,8 @@ export function request(
...config, ...config,
}, },
options, {
...options,
},
) )
} }
const validColors = ['error', 'warning', 'success', ''] as const const validColors = ['error', 'warning', 'success', ''] as const
type ButtonColorType = typeof validColors[number] type ButtonColorType = (typeof validColors)[number]
export const buttonProps = { export const buttonProps = {
color: { color: {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div :class="`${prefixCls}__links`"> <div :class="`${prefixCls}__links`">
<a @click="openWindow(SITE_URL)">{{ t('layout.footer.onlinePreview') }}</a> <a @click="openWindow(SITE_URL)">{{ t('layout.footer.onlinePreview') }}</a>
<GithubFilled @click="openWindow(GITLAB_URL)" :class="`${prefixCls}__github`" /> <GithubFilled @click="openWindow(GIT_URL)" :class="`${prefixCls}__git`" />
<a @click="openWindow(DOC_URL)">{{ t('layout.footer.onlineDocument') }}</a> <a @click="openWindow(DOC_URL)">{{ t('layout.footer.onlineDocument') }}</a>
</div> </div>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import { GithubFilled } from '@ant-design/icons-vue' import { GithubFilled } from '@ant-design/icons-vue'
import { DOC_URL, GITLAB_URL, SITE_URL } from '/@/settings/siteSetting' import { DOC_URL, GIT_URL, SITE_URL } from '/@/settings/siteSetting'
import { openWindow } from '/@/utils' import { openWindow } from '/@/utils'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
prefixCls, prefixCls,
t, t,
DOC_URL, DOC_URL,
GITLAB_URL, GIT_URL,
SITE_URL, SITE_URL,
openWindow, openWindow,
footerRef, footerRef,
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
} }
} }
&__github { &__git {
margin: 0 30px; margin: 0 30px;
&:hover { &:hover {
......
...@@ -83,7 +83,7 @@ export default defineComponent({ ...@@ -83,7 +83,7 @@ export default defineComponent({
<> <>
<TypePicker <TypePicker
menuTypeList={menuTypeList} menuTypeList={menuTypeList}
handler={(item: typeof menuTypeList[0]) => { handler={(item: (typeof menuTypeList)[0]) => {
baseHandler(HandlerEnum.CHANGE_LAYOUT, { baseHandler(HandlerEnum.CHANGE_LAYOUT, {
mode: item.mode, mode: item.mode,
type: item.type, type: item.type,
......
...@@ -24,6 +24,10 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) { ...@@ -24,6 +24,10 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) {
if (!item.component && item.meta?.frameSrc) { if (!item.component && item.meta?.frameSrc) {
item.component = 'IFRAME' item.component = 'IFRAME'
} }
// FIXD: 修复动态路由的唯一标识问题
item.name = item.uid || item.name
const { component, name } = item const { component, name } = item
const { children } = item const { children } = item
if (component) { if (component) {
......
...@@ -9,6 +9,7 @@ export type Component<T = any> = ...@@ -9,6 +9,7 @@ export type Component<T = any> =
// @ts-ignore // @ts-ignore
export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> { export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
uid?: string
name: string name: string
meta: RouteMeta meta: RouteMeta
component?: Component | string component?: Component | string
......
...@@ -25,6 +25,7 @@ const setting: ProjectConfig = { ...@@ -25,6 +25,7 @@ const setting: ProjectConfig = {
// Permission mode // Permission mode
permissionMode: PermissionModeEnum.ROUTE_MAPPING, permissionMode: PermissionModeEnum.ROUTE_MAPPING,
// permissionMode: PermissionModeEnum.BACK,
// Permission-related cache is stored in sessionStorage or localStorage // Permission-related cache is stored in sessionStorage or localStorage
permissionCacheType: CacheTypeEnum.LOCAL, permissionCacheType: CacheTypeEnum.LOCAL,
......
// gitlab repo url // git repo url
export const GITLAB_URL = 'https://gitlab.yiring.com/basic/basic-vue-admin' export const GIT_URL = 'https://gitlab.yiring.com/basic/basic-vue-admin'
// README.md // README.md
export const DOC_URL = 'https://gitlab.yiring.com/basic/basic-vue-admin/blob/main/README.md' export const DOC_URL = 'https://gitlab.yiring.com/basic/basic-vue-admin/blob/main/README.md'
......
...@@ -21,6 +21,7 @@ import { AxiosRetry } from '/@/utils/http/axios/axiosRetry' ...@@ -21,6 +21,7 @@ import { AxiosRetry } from '/@/utils/http/axios/axiosRetry'
import * as HTTP from '/@/api/types' import * as HTTP from '/@/api/types'
import { API_URL, API_URL_PREFIX } from '/@/utils/net' import { API_URL, API_URL_PREFIX } from '/@/utils/net'
import { handleResponseResource } from '/@/utils/proxy' import { handleResponseResource } from '/@/utils/proxy'
import fileDownload from 'js-file-download'
const GLOBAL_API_ERROR_MESSAGE_KEY = 'GLOBAL_MESSAGE_KEY' const GLOBAL_API_ERROR_MESSAGE_KEY = 'GLOBAL_MESSAGE_KEY'
const globSetting = useGlobSetting() const globSetting = useGlobSetting()
...@@ -36,7 +37,16 @@ const transform: AxiosTransform = { ...@@ -36,7 +37,16 @@ const transform: AxiosTransform = {
*/ */
transformRequestHook: (res: AxiosResponse<Result>, options: RequestOptions) => { transformRequestHook: (res: AxiosResponse<Result>, options: RequestOptions) => {
const { t } = useI18n() const { t } = useI18n()
const { isTransformResponse, isReturnNativeResponse } = options const { isTransformResponse, isReturnNativeResponse, download } = options
// 判断是否为下载
const disposition = res.headers['content-disposition']
if (download && disposition) {
const fileName = decodeURIComponent(disposition.split('=')[1])
fileDownload(res.data, fileName)
return
}
// 是否返回原生响应头 比如:需要获取响应头时使用该属性 // 是否返回原生响应头 比如:需要获取响应头时使用该属性
if (isReturnNativeResponse) { if (isReturnNativeResponse) {
return res return res
......
import { useGlobSetting } from '/@/hooks/setting' import { useGlobSetting } from '/@/hooks/setting'
const globSetting = useGlobSetting()
let HOST = 'localhost' let HOST = 'localhost'
let API_URL = `${HOST}` let API_URL = `${HOST}`
const globSetting = useGlobSetting() let API_URL_PREFIX = globSetting.urlPrefix
const API_URL_PREFIX = globSetting.urlPrefix
// ============================================================================= // =============================================================================
// ✨ 生产环境 // ✨ 生产环境
// HOST = 'https://beta.app.yiring.com' // HOST = 'https://beta.app.yiring.com'
// API_URL = `${HOST}` // API_URL = `${HOST}`
// API_URL_PREFIX = globSetting.urlPrefix
// 📖 开发环境 // 📖 开发环境
HOST = globSetting.apiUrl HOST = globSetting.apiUrl
API_URL = `${HOST}` API_URL = `${HOST}`
API_URL_PREFIX = globSetting.urlPrefix
// 🔦 检查生产环境,使用对应 env 中的配置,保留原有方式方便开发中调试 // 🔦 检查生产环境,使用对应 env 中的配置,保留原有方式方便开发中调试
API_URL = import.meta.env.MODE !== 'development' ? globSetting.apiUrl : API_URL if (import.meta.env.MODE !== 'development') {
API_URL = globSetting.apiUrl
API_URL_PREFIX = globSetting.urlPrefix
}
// 📢 如果使用代理访问网站,则默认使用代理 API 地址 // 📢 如果使用代理访问网站,则默认使用代理 API 地址
// API_URL = isProxy(window.location.host) ? `http://proxy.yiring.com` : API_URL // API_URL = isProxy(window.location.host) ? `http://proxy.yiring.com` : API_URL
......
import type { VueTypesDefaults } from 'vue-types/dist/types'
import { CSSProperties, VNodeChild } from 'vue' import { CSSProperties, VNodeChild } from 'vue'
import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types' import VueTypes, { VueTypeValidableDef, toValidableType } from 'vue-types'
export type VueNode = VNodeChild | JSX.Element export type VueNode = VNodeChild | JSX.Element
type PropTypes = VueTypesInterface & { VueTypes.sensibleDefaults = {
readonly style: VueTypeValidableDef<CSSProperties> ...(VueTypes.sensibleDefaults as Partial<VueTypesDefaults>),
readonly VNodeChild: VueTypeValidableDef<VueNode>
// readonly trueBool: VueTypeValidableDef<boolean>;
}
const propTypes = createTypes({
func: undefined, func: undefined,
bool: undefined, bool: undefined,
string: undefined, string: undefined,
number: undefined, number: undefined,
object: undefined, object: undefined,
integer: undefined, integer: undefined,
}) as PropTypes }
propTypes.extend([ class PropTypes extends VueTypes {
{ static get style(): VueTypeValidableDef<CSSProperties> {
name: 'style', return toValidableType('style', {
getter: true,
type: [String, Object], type: [String, Object],
default: undefined, default: undefined,
}, })
{ }
name: 'VNodeChild', static get VNodeChild(): VueTypeValidableDef<VueNode> {
getter: true, return toValidableType('VNodeChild', {
type: undefined, type: undefined,
}, })
]) }
export { propTypes } }
export { PropTypes as propTypes }
...@@ -28,3 +28,7 @@ ...@@ -28,3 +28,7 @@
<div class="title">{{ text }}</div> <div class="title">{{ text }}</div>
</PageWrapper> </PageWrapper>
</template> </template>
<style lang="less" scoped>
/* ... */
</style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<template #headerContent> <template #headerContent>
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<span class="flex-1"> <span class="flex-1">
<a :href="GITLAB_URL" target="_blank">{{ name }}</a> <a :href="GIT_URL" target="_blank">{{ name }}</a>
是一个基于Vue3.0、Vite、 Ant-Design-Vue 、TypeScript 的后台解决方案, 目标是为项目开发, 是一个基于Vue3.0、Vite、 Ant-Design-Vue 、TypeScript 的后台解决方案, 目标是为项目开发,
提供现成的开箱解决方案。 提供现成的开箱解决方案。
</span> </span>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { PageWrapper } from '/@/components/Page' import { PageWrapper } from '/@/components/Page'
import { Description, DescItem, useDescription } from '/@/components/Description/index' import { Description, DescItem, useDescription } from '/@/components/Description/index'
import { GITLAB_URL, SITE_URL, DOC_URL } from '/@/settings/siteSetting' import { GIT_URL, SITE_URL, DOC_URL } from '/@/settings/siteSetting'
const { pkg, lastBuildTime } = __APP_INFO__ const { pkg, lastBuildTime } = __APP_INFO__
...@@ -53,9 +53,9 @@ ...@@ -53,9 +53,9 @@
render: commonLinkRender('预览地址'), render: commonLinkRender('预览地址'),
}, },
{ {
label: 'GitLab', label: 'Git',
field: 'gitlab', field: 'git',
render: commonLinkRender('GitLab'), render: commonLinkRender(GIT_URL),
}, },
] ]
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
lastBuildTime, lastBuildTime,
doc: DOC_URL, doc: DOC_URL,
preview: SITE_URL, preview: SITE_URL,
gitlab: GITLAB_URL, git: GIT_URL,
} }
Object.keys(dependencies).forEach((key) => { Object.keys(dependencies).forEach((key) => {
......
...@@ -11,9 +11,9 @@ export interface RetryRequest { ...@@ -11,9 +11,9 @@ export interface RetryRequest {
export type Result<T = any> = defs.Result<T> export type Result<T = any> = defs.Result<T>
// multipart/form-data: upload file // multipart/form-data: upload file
export interface UploadFileParams { export interface UploadFileParams<T = any> {
// Other parameters // Other parameters
data?: Recordable data?: T | Recordable
// File parameter interface field name // File parameter interface field name
name?: string name?: string
// file name // file name
......
...@@ -122,6 +122,8 @@ declare global { ...@@ -122,6 +122,8 @@ declare global {
withToken?: boolean withToken?: boolean
// 请求重试机制 // 请求重试机制
retryRequest?: RetryRequest retryRequest?: RetryRequest
// 下载
download?: boolean
} }
type RequestConfig<T = any> = AxiosRequestConfig<T> type RequestConfig<T = any> = AxiosRequestConfig<T>
......
...@@ -94,6 +94,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { ...@@ -94,6 +94,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
author: pkg.author, author: pkg.author,
lastBuildTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), lastBuildTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}, },
// FIX: https://github.com/vbenjs/vite-plugin-theme/issues/27
__COLOR_PLUGIN_OUTPUT_FILE_NAME__: undefined,
__PROD__: true,
__COLOR_PLUGIN_OPTIONS__: {},
}, },
css: { css: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论