feat: 项目初始化,未病局
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# @see: http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*] # 表示所有文件适用
|
||||
charset = utf-8 # 设置文件字符集为 utf-8
|
||||
end_of_line = lf # 控制换行类型(lf | cr | crlf)
|
||||
insert_final_newline = true # 始终在文件末尾插入一个新行
|
||||
indent_style = space # 缩进风格(tab | space)
|
||||
indent_size = 2 # 缩进大小
|
||||
max_line_length = 130 # 最大行长度
|
||||
|
||||
[*.md] # 表示仅对 md 文件适用以下规则
|
||||
max_line_length = off # 关闭最大行长度限制
|
||||
trim_trailing_whitespace = false # 关闭末尾空格修剪
|
||||
@@ -0,0 +1,17 @@
|
||||
# title
|
||||
VITE_GLOB_APP_TITLE = SimpleAdmin
|
||||
|
||||
# 本地运行端口号
|
||||
VITE_PORT = 8848
|
||||
|
||||
# 启动时自动打开浏览器
|
||||
VITE_OPEN = true
|
||||
|
||||
# 开启 devTools 调试
|
||||
VITE_DEVTOOLS = false
|
||||
|
||||
# 打包后是否生成包分析文件
|
||||
VITE_REPORT = false
|
||||
|
||||
# 开启 CodeInspector 调试
|
||||
VITE_CODEINSPECTOR = false
|
||||
@@ -0,0 +1,28 @@
|
||||
# 本地环境
|
||||
VITE_USER_NODE_ENV = development
|
||||
|
||||
# 公共基础路径
|
||||
VITE_PUBLIC_PATH = /
|
||||
|
||||
# 路由模式
|
||||
# Optional: hash | history
|
||||
VITE_ROUTER_MODE = hash
|
||||
|
||||
# 打包时是否删除 console
|
||||
VITE_DROP_CONSOLE = true
|
||||
|
||||
# 是否开启 VitePWA
|
||||
VITE_PWA = false
|
||||
|
||||
# 开发环境接口地址
|
||||
VITE_API_URL = http://127.0.0.1:5566
|
||||
|
||||
# 否开启代理
|
||||
VITE_HTTP_PROXY = true
|
||||
|
||||
# 开发环境跨域代理,支持配置多个
|
||||
VITE_PROXY = [["/api","http://127.0.0.1:5566"]]
|
||||
|
||||
#是否启用mqtt
|
||||
VITE_MQTT = false
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# 线上环境
|
||||
VITE_USER_NODE_ENV = production
|
||||
|
||||
# 公共基础路径
|
||||
VITE_PUBLIC_PATH = /
|
||||
|
||||
# 路由模式
|
||||
# Optional: hash | history
|
||||
VITE_ROUTER_MODE = hash
|
||||
|
||||
# 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔
|
||||
# Optional: gzip | brotli | none
|
||||
VITE_BUILD_COMPRESS = none
|
||||
|
||||
# 打包压缩后是否删除源文件
|
||||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
||||
|
||||
# 打包时是否删除 console
|
||||
VITE_DROP_CONSOLE = true
|
||||
|
||||
# 是否开启 VitePWA
|
||||
VITE_PWA = true
|
||||
|
||||
# 否开启代理
|
||||
VITE_HTTP_PROXY = true
|
||||
|
||||
# 线上环境接口地址
|
||||
VITE_API_URL = http://127.0.0.1:5566
|
||||
|
||||
# 开发环境跨域代理,支持配置多个
|
||||
VITE_PROXY = [["/api","http://127.0.0.1:5566"]]
|
||||
|
||||
#是否启用mqtt
|
||||
VITE_MQTT = false
|
||||
@@ -0,0 +1,25 @@
|
||||
# 测试环境
|
||||
VITE_USER_NODE_ENV = test
|
||||
|
||||
# 公共基础路径
|
||||
VITE_PUBLIC_PATH = /
|
||||
|
||||
# 路由模式
|
||||
# Optional: hash | history
|
||||
VITE_ROUTER_MODE = hash
|
||||
|
||||
# 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔
|
||||
# Optional: gzip | brotli | none
|
||||
VITE_BUILD_COMPRESS = none
|
||||
|
||||
# 打包压缩后是否删除源文件
|
||||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
||||
|
||||
# 打包时是否删除 console
|
||||
VITE_DROP_CONSOLE = true
|
||||
|
||||
# 是否开启 VitePWA
|
||||
VITE_PWA = false
|
||||
|
||||
# 测试环境接口地址
|
||||
VITE_API_URL = http://127.0.0.1:5566
|
||||
@@ -0,0 +1,15 @@
|
||||
*.sh
|
||||
node_modules
|
||||
*.md
|
||||
*.woff
|
||||
*.ttf
|
||||
.vscode
|
||||
.idea
|
||||
dist
|
||||
/public
|
||||
/docs
|
||||
.husky
|
||||
.local
|
||||
/bin
|
||||
/src/mock/*
|
||||
stats.html
|
||||
@@ -0,0 +1,61 @@
|
||||
// @see: http://eslint.cn
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true
|
||||
},
|
||||
// 指定如何解析语法
|
||||
parser: "vue-eslint-parser",
|
||||
// 优先级低于 parse 的语法解析配置
|
||||
parserOptions: {
|
||||
parser: "@typescript-eslint/parser",
|
||||
ecmaVersion: 2020,
|
||||
sourceType: "module",
|
||||
jsxPragma: "React",
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
}
|
||||
},
|
||||
// 继承某些已有的规则
|
||||
extends: ["plugin:vue/vue3-recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
|
||||
/**
|
||||
* "off" 或 0 ==> 关闭规则
|
||||
* "warn" 或 1 ==> 打开的规则作为警告(不影响代码执行)
|
||||
* "error" 或 2 ==> 规则作为一个错误(代码不能执行,界面报错)
|
||||
*/
|
||||
rules: {
|
||||
// eslint (http://eslint.cn/docs/rules)
|
||||
"no-var": "error", // 要求使用 let 或 const 而不是 var
|
||||
"no-multiple-empty-lines": ["error", { max: 1 }], // 不允许多个空行
|
||||
"prefer-const": "off", // 使用 let 关键字声明但在初始分配后从未重新分配的变量,要求使用 const
|
||||
"no-use-before-define": "off", // 禁止在 函数/类/变量 定义之前使用它们
|
||||
|
||||
// typeScript (https://typescript-eslint.io/rules)
|
||||
"@typescript-eslint/no-unused-vars": "error", // 禁止定义未使用的变量
|
||||
"@typescript-eslint/prefer-ts-expect-error": "error", // 禁止使用 @ts-ignore
|
||||
"@typescript-eslint/no-empty-function": "error", // 禁止空函数
|
||||
"@typescript-eslint/ban-ts-comment": "error", // 禁止 @ts-<directive> 使用注释或要求在指令后进行描述
|
||||
"@typescript-eslint/no-inferrable-types": "off", // 可以轻松推断的显式类型可能会增加不必要的冗长
|
||||
"@typescript-eslint/no-namespace": "off", // 禁止使用自定义 TypeScript 模块和命名空间
|
||||
"@typescript-eslint/no-explicit-any": "off", // 禁止使用 any 类型
|
||||
"@typescript-eslint/ban-types": "off", // 禁止使用特定类型
|
||||
"@typescript-eslint/no-var-requires": "off", // 允许使用 require() 函数导入模块
|
||||
"@typescript-eslint/no-non-null-assertion": "off", // 不允许使用后缀运算符的非空断言(!)
|
||||
|
||||
// vue (https://eslint.vuejs.org/rules)
|
||||
"vue/script-setup-uses-vars": "error", // 防止<script setup>使用的变量<template>被标记为未使用,此规则仅在启用该no-unused-vars规则时有效
|
||||
"vue/v-slot-style": "error", // 强制执行 v-slot 指令样式
|
||||
"vue/no-mutating-props": "error", // 不允许改变组件 prop
|
||||
"vue/custom-event-name-casing": "error", // 为自定义事件名称强制使用特定大小写
|
||||
"vue/html-closing-bracket-newline": "error", // 在标签的右括号之前要求或禁止换行
|
||||
"vue/attribute-hyphenation": "error", // 对模板中的自定义组件强制执行属性命名样式:my-prop="prop"
|
||||
"vue/attributes-order": "off", // vue api使用顺序,强制执行属性顺序
|
||||
"vue/no-v-html": "off", // 禁止使用 v-html
|
||||
"vue/require-default-prop": "off", // 此规则要求为每个 prop 为必填时,必须提供默认值
|
||||
"vue/multi-word-component-names": "off", // 要求组件名称始终为 “-” 链接的单词
|
||||
"vue/no-setup-props-destructure": "off" // 禁止解构 props 传递给 setup
|
||||
}
|
||||
};
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
stats.html
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
!.vscode/settings.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install commitlint --edit $1
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npm run lint:lint-staged
|
||||
@@ -0,0 +1,9 @@
|
||||
/dist/*
|
||||
.local
|
||||
/node_modules/**
|
||||
|
||||
**/*.svg
|
||||
**/*.sh
|
||||
|
||||
/public/*
|
||||
stats.html
|
||||
@@ -0,0 +1,41 @@
|
||||
// @see: https://www.prettier.cn
|
||||
|
||||
module.exports = {
|
||||
// 指定最大换行长度
|
||||
printWidth: 150,
|
||||
// 缩进制表符宽度 | 空格数
|
||||
tabWidth: 2,
|
||||
// 使用制表符而不是空格缩进行 (true:制表符,false:空格)
|
||||
useTabs: false,
|
||||
// 结尾不用分号 (true:有,false:没有)
|
||||
semi: true,
|
||||
// 使用单引号 (true:单引号,false:双引号)
|
||||
singleQuote: false,
|
||||
// 在对象字面量中决定是否将属性名用引号括起来 可选值 "<as-needed|consistent|preserve>"
|
||||
quoteProps: "as-needed",
|
||||
// 在JSX中使用单引号而不是双引号 (true:单引号,false:双引号)
|
||||
jsxSingleQuote: false,
|
||||
// 多行时尽可能打印尾随逗号 可选值"<none|es5|all>"
|
||||
trailingComma: "none",
|
||||
// 在对象,数组括号与文字之间加空格 "{ foo: bar }" (true:有,false:没有)
|
||||
bracketSpacing: true,
|
||||
// 将 > 多行元素放在最后一行的末尾,而不是单独放在下一行 (true:放末尾,false:单独一行)
|
||||
bracketSameLine: false,
|
||||
// (x) => {} 箭头函数参数只有一个时是否要有小括号 (avoid:省略括号,always:不省略括号)
|
||||
arrowParens: "avoid",
|
||||
// 指定要使用的解析器,不需要写文件开头的 @prettier
|
||||
requirePragma: false,
|
||||
// 可以在文件顶部插入一个特殊标记,指定该文件已使用 Prettier 格式化
|
||||
insertPragma: false,
|
||||
// 用于控制文本是否应该被换行以及如何进行换行
|
||||
proseWrap: "preserve",
|
||||
// 在html中空格是否是敏感的 "css" - 遵守 CSS 显示属性的默认值, "strict" - 空格被认为是敏感的 ,"ignore" - 空格被认为是不敏感的
|
||||
htmlWhitespaceSensitivity: "css",
|
||||
// 控制在 Vue 单文件组件中 <script> 和 <style> 标签内的代码缩进方式
|
||||
vueIndentScriptAndStyle: false,
|
||||
// 换行符使用 lf 结尾是 可选值 "<auto|lf|crlf|cr>"
|
||||
endOfLine: "auto",
|
||||
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码 (rangeStart:开始,rangeEnd:结束)
|
||||
rangeStart: 0,
|
||||
rangeEnd: Infinity
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
/dist/*
|
||||
/public/*
|
||||
public/*
|
||||
stats.html
|
||||
@@ -0,0 +1,40 @@
|
||||
// @see: https://stylelint.io
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
// 继承某些已有的规则
|
||||
extends: [
|
||||
"stylelint-config-standard", // 配置 stylelint 拓展插件
|
||||
"stylelint-config-html/vue", // 配置 vue 中 template 样式格式化
|
||||
"stylelint-config-standard-scss", // 配置 stylelint scss 插件
|
||||
"stylelint-config-recommended-vue/scss", // 配置 vue 中 scss 样式格式化
|
||||
"stylelint-config-recess-order" // 配置 stylelint css 属性书写顺序插件,
|
||||
],
|
||||
overrides: [
|
||||
// 扫描 .vue/html 文件中的 <style> 标签内的样式
|
||||
{
|
||||
files: ["**/*.{vue,html}"],
|
||||
customSyntax: "postcss-html"
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
"function-url-quotes": "always", // URL 的引号 "always(必须加上引号)"|"never(没有引号)"
|
||||
"color-hex-length": "long", // 指定 16 进制颜色的简写或扩写 "short(16进制简写)"|"long(16进制扩写)"
|
||||
"rule-empty-line-before": "never", // 要求或禁止在规则之前的空行 "always(规则之前必须始终有一个空行)"|"never(规则前绝不能有空行)"|"always-multi-line(多行规则之前必须始终有一个空行)"|"never-multi-line(多行规则之前绝不能有空行)"
|
||||
"font-family-no-missing-generic-family-keyword": null, // 禁止在字体族名称列表中缺少通用字体族关键字
|
||||
"scss/at-import-partial-extension": null, // 解决不能使用 @use 引入 scss 文件
|
||||
"property-no-unknown": null, // 禁止未知的属性
|
||||
"no-empty-source": null, // 禁止空源码
|
||||
"selector-class-pattern": null, // 强制选择器类名的格式
|
||||
"value-no-vendor-prefix": null, // 关闭 vendor-prefix (为了解决多行省略 -webkit-box)
|
||||
"no-descending-specificity": null, // 不允许较低特异性的选择器出现在覆盖较高特异性的选择器
|
||||
"value-keyword-case": null, // 解决在 scss 中使用 v-bind 大写单词报错
|
||||
"selector-pseudo-class-no-unknown": [
|
||||
true,
|
||||
{
|
||||
ignorePseudoClasses: ["global", "v-deep", "deep"]
|
||||
}
|
||||
]
|
||||
},
|
||||
ignoreFiles: ["**/*.js", "**/*.jsx", "**/*.tsx", "**/*.ts"]
|
||||
};
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"vue.volar",
|
||||
"hollowtree.vue-snippets",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"stylelint.vscode-stylelint",
|
||||
"esbenp.prettier-vscode",
|
||||
"editorconfig.editorconfig",
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
"syler.sass-indented",
|
||||
"mikestead.dotenv"
|
||||
]
|
||||
}
|
||||
Vendored
+98
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.stylelint": "explicit"
|
||||
},
|
||||
"editor.quickSuggestions": {
|
||||
"strings": true,
|
||||
"other": true,
|
||||
"comments": true
|
||||
},
|
||||
"stylelint.enable": true,
|
||||
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass", "html"],
|
||||
"files.eol": "\n",
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[scss]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[less]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"cSpell.words": [
|
||||
"AMAP",
|
||||
"apng",
|
||||
"axios",
|
||||
"Biao",
|
||||
"brotli",
|
||||
"cascader",
|
||||
"commitlint",
|
||||
"contentleft",
|
||||
"contentright",
|
||||
"daterange",
|
||||
"datetimerange",
|
||||
"echarts",
|
||||
"fangda",
|
||||
"simple",
|
||||
"Gitee",
|
||||
"hexs",
|
||||
"huiche",
|
||||
"iconfont",
|
||||
"juejin",
|
||||
"liquidfill",
|
||||
"longpress",
|
||||
"monthrange",
|
||||
"nprogress",
|
||||
"officedocument",
|
||||
"openxmlformats",
|
||||
"Pageable",
|
||||
"persistedstate",
|
||||
"pinia",
|
||||
"pjpeg",
|
||||
"Prefixs",
|
||||
"screenfull",
|
||||
"sortablejs",
|
||||
"sousuo",
|
||||
"spreadsheetml",
|
||||
"styl",
|
||||
"stylelint",
|
||||
"stylelintignore",
|
||||
"stylelintrc",
|
||||
"suoxiao",
|
||||
"truetype",
|
||||
"tuichu",
|
||||
"unplugin",
|
||||
"VITE",
|
||||
"vuedraggable",
|
||||
"vueuse",
|
||||
"Vuex",
|
||||
"wangeditor",
|
||||
"xiala",
|
||||
"xiaoxi",
|
||||
"zhongyingwen",
|
||||
"zhuti"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,103 @@
|
||||
# SimpleAdmin.Web
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://jihulab.com/zxzyjs/simpleadmin.web.git
|
||||
git branch -M master
|
||||
git push -uf origin master
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://jihulab.com/zxzyjs/simpleadmin.web/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
---
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
||||
@@ -0,0 +1,46 @@
|
||||
import path from "path";
|
||||
|
||||
export function isDevFn(mode: string): boolean {
|
||||
return mode === "development";
|
||||
}
|
||||
|
||||
export function isProdFn(mode: string): boolean {
|
||||
return mode === "production";
|
||||
}
|
||||
|
||||
export function isTestFn(mode: string): boolean {
|
||||
return mode === "test";
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to generate package preview
|
||||
*/
|
||||
export function isReportMode(): boolean {
|
||||
return process.env.VITE_REPORT === "true";
|
||||
}
|
||||
|
||||
// Read all environment variable configuration files to process.env
|
||||
export function wrapperEnv(envConf: Recordable): ViteEnv {
|
||||
const ret: any = {};
|
||||
|
||||
for (const envName of Object.keys(envConf)) {
|
||||
let realName = envConf[envName].replace(/\\n/g, "\n");
|
||||
realName = realName === "true" ? true : realName === "false" ? false : realName;
|
||||
if (envName === "VITE_PORT") realName = Number(realName);
|
||||
if (envName === "VITE_PROXY") {
|
||||
try {
|
||||
realName = JSON.parse(realName);
|
||||
} catch (error) {}
|
||||
}
|
||||
ret[envName] = realName;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user root directory
|
||||
* @param dir file path
|
||||
*/
|
||||
export function getRootPath(...dir: string[]) {
|
||||
return path.resolve(process.cwd(), ...dir);
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
import { resolve } from "path";
|
||||
import { PluginOption } from "vite";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
import { visualizer } from "rollup-plugin-visualizer";
|
||||
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
|
||||
import { createHtmlPlugin } from "vite-plugin-html";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
import eslintPlugin from "vite-plugin-eslint";
|
||||
import viteCompression from "vite-plugin-compression";
|
||||
import vueSetupExtend from "unplugin-vue-setup-extend-plus/vite";
|
||||
import UnoCSS from "unocss/vite";
|
||||
import AutoImport from "unplugin-auto-import/vite";
|
||||
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
||||
import Components from "unplugin-vue-components/vite";
|
||||
import Icons from "unplugin-icons/vite";
|
||||
import IconsResolver from "unplugin-icons/resolver";
|
||||
import NextDevTools from "vite-plugin-vue-devtools";
|
||||
import { codeInspectorPlugin } from "code-inspector-plugin";
|
||||
/**
|
||||
* 创建 vite 插件
|
||||
* @param viteEnv
|
||||
*/
|
||||
export const createVitePlugins = (viteEnv: ViteEnv): (PluginOption | PluginOption[])[] => {
|
||||
const { VITE_GLOB_APP_TITLE, VITE_REPORT, VITE_DEVTOOLS, VITE_PWA, VITE_CODEINSPECTOR } = viteEnv;
|
||||
|
||||
return [
|
||||
vue(),
|
||||
// devTools
|
||||
VITE_DEVTOOLS && NextDevTools({ launchEditor: "code" }),
|
||||
// vue 可以使用 jsx/tsx 语法
|
||||
vueJsx(),
|
||||
// esLint 报错信息显示在浏览器界面上
|
||||
eslintPlugin(),
|
||||
// name 可以写在 script 标签上
|
||||
vueSetupExtend({}),
|
||||
// 创建打包压缩配置
|
||||
createCompression(viteEnv),
|
||||
// 注入变量到 html 文件
|
||||
createHtmlPlugin({
|
||||
minify: true,
|
||||
inject: {
|
||||
data: { title: VITE_GLOB_APP_TITLE }
|
||||
}
|
||||
}),
|
||||
// 使用 svg 图标
|
||||
createSvgIconsPlugin({
|
||||
iconDirs: [resolve(process.cwd(), "src/assets/svg")],
|
||||
symbolId: "local-[dir]-[name]"
|
||||
}),
|
||||
// vitePWA
|
||||
VITE_PWA && createVitePwa(viteEnv),
|
||||
// 是否生成包预览,分析依赖包大小做优化处理
|
||||
VITE_REPORT && (visualizer({ filename: "stats.html", gzipSize: true, brotliSize: true }) as PluginOption),
|
||||
// 自动 IDE 并将光标定位到 DOM 对应的源代码位置。see: https://inspector.fe-dev.cn/guide/start.html
|
||||
VITE_CODEINSPECTOR &&
|
||||
codeInspectorPlugin({
|
||||
bundler: "vite"
|
||||
}),
|
||||
// 自动导入组件
|
||||
AutoImport({
|
||||
imports: ["vue", "vue-router"],
|
||||
// Auto import functions from Element Plus, e.g. ElMessage, ElMessageBox... (with style)
|
||||
// 自动导入 Element Plus 相关函数,如:ElMessage, ElMessageBox... (带样式)
|
||||
resolvers: [
|
||||
ElementPlusResolver(),
|
||||
|
||||
// Auto import icon components
|
||||
// 自动导入图标组件
|
||||
IconsResolver({
|
||||
prefix: "Icon"
|
||||
})
|
||||
],
|
||||
dts: "src/auto-import.d.ts" // 路径下自动生成文件夹存放全局指令
|
||||
}),
|
||||
Components({
|
||||
dirs: ["src/components"], // 配置需要默认导入的自定义组件文件夹,该文件夹下的所有组件都会自动 import
|
||||
resolvers: [
|
||||
// Auto register icon components
|
||||
// 自动注册图标组件
|
||||
IconsResolver({
|
||||
enabledCollections: ["ep"] // element-plus 图标库
|
||||
}),
|
||||
// Auto register Element Plus components
|
||||
// 自动导入 Element Plus 组件
|
||||
ElementPlusResolver()
|
||||
]
|
||||
}),
|
||||
Icons({
|
||||
compiler: "vue3",
|
||||
autoInstall: true
|
||||
}),
|
||||
|
||||
UnoCSS() // UnoCSS
|
||||
];
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 根据 compress 配置,生成不同的压缩规则
|
||||
* @param viteEnv
|
||||
*/
|
||||
const createCompression = (viteEnv: ViteEnv): PluginOption | PluginOption[] => {
|
||||
const { VITE_BUILD_COMPRESS = "none", VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE } = viteEnv;
|
||||
const compressList = VITE_BUILD_COMPRESS.split(",");
|
||||
const plugins: PluginOption[] = [];
|
||||
if (compressList.includes("gzip")) {
|
||||
plugins.push(
|
||||
viteCompression({
|
||||
ext: ".gz",
|
||||
algorithm: "gzip",
|
||||
deleteOriginFile: VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE
|
||||
})
|
||||
);
|
||||
}
|
||||
if (compressList.includes("brotli")) {
|
||||
plugins.push(
|
||||
viteCompression({
|
||||
ext: ".br",
|
||||
algorithm: "brotliCompress",
|
||||
deleteOriginFile: VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE
|
||||
})
|
||||
);
|
||||
}
|
||||
return plugins;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description VitePwa
|
||||
* @param viteEnv
|
||||
*/
|
||||
const createVitePwa = (viteEnv: ViteEnv): PluginOption | PluginOption[] => {
|
||||
const { VITE_GLOB_APP_TITLE } = viteEnv;
|
||||
return VitePWA({
|
||||
registerType: "autoUpdate",
|
||||
workbox: {
|
||||
// 添加此项配置,增加需要缓存的最大文件大小
|
||||
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024
|
||||
},
|
||||
manifest: {
|
||||
name: VITE_GLOB_APP_TITLE,
|
||||
short_name: VITE_GLOB_APP_TITLE,
|
||||
theme_color: "#ffffff",
|
||||
icons: [
|
||||
{
|
||||
src: "/logo.png",
|
||||
sizes: "192x192",
|
||||
type: "image/png"
|
||||
},
|
||||
{
|
||||
src: "/logo.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png"
|
||||
},
|
||||
{
|
||||
src: "/logo.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
purpose: "any maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { ProxyOptions } from "vite";
|
||||
|
||||
type ProxyItem = [string, string];
|
||||
|
||||
type ProxyList = ProxyItem[];
|
||||
|
||||
type ProxyTargetList = Record<string, ProxyOptions>;
|
||||
|
||||
/**
|
||||
* 创建代理,用于解析 .env.development 代理配置
|
||||
* @param list
|
||||
*/
|
||||
export function createProxy(list: ProxyList = []) {
|
||||
const ret: ProxyTargetList = {};
|
||||
for (const [prefix, target] of list) {
|
||||
const httpsRE = /^https:\/\//;
|
||||
const isHttps = httpsRE.test(target);
|
||||
|
||||
// https://github.com/http-party/node-http-proxy#options
|
||||
ret[prefix] = {
|
||||
target: target,
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: path => path.replace(new RegExp(`^${prefix}`), ""),
|
||||
// https is require secure=false
|
||||
...(isHttps ? { secure: false } : {})
|
||||
};
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
// @see: https://cz-git.qbenben.com/zh/guide
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const scopes = fs
|
||||
.readdirSync(path.resolve(__dirname, "src"), { withFileTypes: true })
|
||||
.filter(dirent => dirent.isDirectory())
|
||||
.map(dirent => dirent.name.replace(/s$/, ""));
|
||||
|
||||
/** @type {import('cz-git').UserConfig} */
|
||||
module.exports = {
|
||||
ignores: [commit => commit.includes("init")],
|
||||
extends: ["@commitlint/config-conventional"],
|
||||
rules: {
|
||||
// @see: https://commitlint.js.org/#/reference-rules
|
||||
"body-leading-blank": [2, "always"],
|
||||
"footer-leading-blank": [1, "always"],
|
||||
"header-max-length": [2, "always", 108],
|
||||
"subject-empty": [2, "never"],
|
||||
"type-empty": [2, "never"],
|
||||
"subject-case": [0],
|
||||
"type-enum": [
|
||||
2,
|
||||
"always",
|
||||
[
|
||||
"feat",
|
||||
"fix",
|
||||
"docs",
|
||||
"style",
|
||||
"refactor",
|
||||
"perf",
|
||||
"test",
|
||||
"build",
|
||||
"ci",
|
||||
"chore",
|
||||
"revert",
|
||||
"wip",
|
||||
"workflow",
|
||||
"types",
|
||||
"release"
|
||||
]
|
||||
]
|
||||
},
|
||||
prompt: {
|
||||
messages: {
|
||||
type: "选择你要提交的类型 :",
|
||||
scope: "选择一个提交范围(可选):",
|
||||
customScope: "请输入自定义的提交范围 :",
|
||||
subject: "填写简短精炼的变更描述 :\n",
|
||||
body: '填写更加详细的变更描述(可选)。使用 "|" 换行 :\n',
|
||||
breaking: '列举非兼容性重大的变更(可选)。使用 "|" 换行 :\n',
|
||||
footerPrefixsSelect: "选择关联issue前缀(可选):",
|
||||
customFooterPrefixs: "输入自定义issue前缀 :",
|
||||
footer: "列举关联issue (可选) 例如: #31, #I3244 :\n",
|
||||
confirmCommit: "是否提交或修改commit ?"
|
||||
},
|
||||
types: [
|
||||
{ value: "feat", name: "特性: 🚀 新增功能", emoji: "🚀" },
|
||||
{ value: "fix", name: "修复: 🧩 修复缺陷", emoji: "🧩" },
|
||||
{ value: "docs", name: "文档: 📚 文档变更", emoji: "📚" },
|
||||
{ value: "style", name: "格式: 🎨 代码格式(不影响功能,例如空格、分号等格式修正)", emoji: "🎨" },
|
||||
{ value: "refactor", name: "重构: ♻️ 代码重构(不包括 bug 修复、功能新增)", emoji: "♻️" },
|
||||
{ value: "perf", name: "性能: ⚡️ 性能优化", emoji: "⚡️" },
|
||||
{ value: "test", name: "测试: ✅ 添加疏漏测试或已有测试改动", emoji: "✅" },
|
||||
{ value: "build", name: "构建: 📦️ 构建流程、外部依赖变更(如升级 npm 包、修改 webpack 配置等)", emoji: "📦️" },
|
||||
{ value: "ci", name: "集成: 🎡 修改 CI 配置、脚本", emoji: "🎡" },
|
||||
{ value: "revert", name: "回退: ⏪️ 回滚 commit", emoji: "⏪️" },
|
||||
{ value: "chore", name: "其他: 🔨 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)", emoji: "🔨" },
|
||||
{ value: "wip", name: "开发: 🕔 正在开发中", emoji: "🕔" },
|
||||
{ value: "workflow", name: "工作流: 📋 工作流程改进", emoji: "📋" },
|
||||
{ value: "types", name: "类型: 🔰 类型定义文件修改", emoji: "🔰" }
|
||||
],
|
||||
useEmoji: true,
|
||||
scopes: [...scopes],
|
||||
customScopesAlign: "bottom",
|
||||
emptyScopesAlias: "empty",
|
||||
customScopesAlias: "custom",
|
||||
allowBreakingChanges: ["feat", "fix"],
|
||||
issuePrefixs: [
|
||||
//如果使用 gitee 作为开发管理,注意邮箱要和gitee中设置一致才行
|
||||
//@see: https://gitee.com/help/articles/4141#article-header2
|
||||
{ value: "link", name: "link: 链接 ISSUES 进行中" },
|
||||
{ value: "closed", name: "closed: 标记 ISSUES 已完成" }
|
||||
]
|
||||
}
|
||||
};
|
||||
Vendored
+118
@@ -0,0 +1,118 @@
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
export {}
|
||||
|
||||
/* prettier-ignore */
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
403: typeof import('./src/components/ErrorMessage/403.vue')['default']
|
||||
404: typeof import('./src/components/ErrorMessage/404.vue')['default']
|
||||
500: typeof import('./src/components/ErrorMessage/500.vue')['default']
|
||||
CheckCard: typeof import('./src/components/CheckCard/index.vue')['default']
|
||||
ChooseModule: typeof import('./src/components/ChooseModule/index.vue')['default']
|
||||
CodeHighLight: typeof import('./src/components/CodeHighLight/index.vue')['default']
|
||||
ColorPicker: typeof import('./src/components/ColorPicker/index.vue')['default']
|
||||
ColSetting: typeof import('./src/components/ProTable/components/ColSetting.vue')['default']
|
||||
CropUpload: typeof import('./src/components/CropUpload/index.vue')['default']
|
||||
DatePicker: typeof import('./src/components/Form/DatePicker/index.vue')['default']
|
||||
ECharts: typeof import('./src/components/ECharts/index.vue')['default']
|
||||
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||
ElAside: typeof import('element-plus/es')['ElAside']
|
||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
||||
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||
ElFooter: typeof import('element-plus/es')['ElFooter']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElLink: typeof import('element-plus/es')['ElLink']
|
||||
ElMain: typeof import('element-plus/es')['ElMain']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElSlider: typeof import('element-plus/es')['ElSlider']
|
||||
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||
ElStep: typeof import('element-plus/es')['ElStep']
|
||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
ElWatermark: typeof import('element-plus/es')['ElWatermark']
|
||||
ESign: typeof import('./src/components/ESign/index.vue')['default']
|
||||
FormContainer: typeof import('./src/components/Form/FormContainer/index.vue')['default']
|
||||
Grid: typeof import('./src/components/Grid/index.vue')['default']
|
||||
GridItem: typeof import('./src/components/Grid/components/GridItem.vue')['default']
|
||||
Loading: typeof import('./src/components/Loading/index.vue')['default']
|
||||
MenuSelector: typeof import('./src/components/Selectors/MenuSelector/index.vue')['default']
|
||||
OrgSelector: typeof import('./src/components/Selectors/OrgSelector/index.vue')['default']
|
||||
Pagination: typeof import('./src/components/ProTable/components/Pagination.vue')['default']
|
||||
PositionSelector: typeof import('./src/components/Selectors/PositionSelector/index.vue')['default']
|
||||
ProTable: typeof import('./src/components/ProTable/index.vue')['default']
|
||||
RoleSelector: typeof import('./src/components/Selectors/RoleSelector/index.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SButton: typeof import('./src/components/Form/SButton/index.vue')['default']
|
||||
SCheckboxGroup: typeof import('./src/components/Form/SCheckboxGroup/index.vue')['default']
|
||||
SearchForm: typeof import('./src/components/SearchForm/index.vue')['default']
|
||||
SearchFormItem: typeof import('./src/components/SearchForm/components/SearchFormItem.vue')['default']
|
||||
SelectFilter: typeof import('./src/components/SelectFilter/index.vue')['default']
|
||||
SelectIcon: typeof import('./src/components/SelectIcon/index.vue')['default']
|
||||
SelectIconPlus: typeof import('./src/components/SelectIconPlus/index.vue')['default']
|
||||
SFormItem: typeof import('./src/components/Form/SFormItem/index.vue')['default']
|
||||
SInput: typeof import('./src/components/Form/SInput/index.vue')['default']
|
||||
SRadioGroup: typeof import('./src/components/Form/SRadioGroup/index.vue')['default']
|
||||
SSelect: typeof import('./src/components/Form/SSelect/index.vue')['default']
|
||||
SvgIcon: typeof import('./src/components/SvgIcon/index.vue')['default']
|
||||
SwitchDark: typeof import('./src/components/SwitchDark/index.vue')['default']
|
||||
TableColumn: typeof import('./src/components/ProTable/components/TableColumn.vue')['default']
|
||||
TreeFilter: typeof import('./src/components/TreeFilter/index.vue')['default']
|
||||
UploadFile: typeof import('./src/components/Upload/UploadFile.vue')['default']
|
||||
UploadImg: typeof import('./src/components/Upload/UploadImg.vue')['default']
|
||||
UploadImgs: typeof import('./src/components/Upload/UploadImgs.vue')['default']
|
||||
UserSelector: typeof import('./src/components/Selectors/UserSelector/index.vue')['default']
|
||||
}
|
||||
export interface ComponentCustomProperties {
|
||||
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
|
||||
}
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/api/sys/ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title><%- title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.loading-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.loading-box .loading-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 98px;
|
||||
}
|
||||
.dot {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 32px;
|
||||
transform: rotate(45deg);
|
||||
animation: ant-rotate 1.2s infinite linear;
|
||||
}
|
||||
.dot i {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background-color: #409eff;
|
||||
border-radius: 100%;
|
||||
opacity: 0.3;
|
||||
transform: scale(0.75);
|
||||
transform-origin: 50% 50%;
|
||||
animation: ant-spin-move 1s infinite linear alternate;
|
||||
}
|
||||
.dot i:nth-child(1) {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.dot i:nth-child(2) {
|
||||
top: 0;
|
||||
right: 0;
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
.dot i:nth-child(3) {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
animation-delay: 0.8s;
|
||||
}
|
||||
.dot i:nth-child(4) {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
|
||||
@keyframes ant-rotate {
|
||||
to {
|
||||
transform: rotate(405deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ant-spin-move {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="loading-box">
|
||||
<div class="loading-wrap">
|
||||
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const globalState = JSON.parse(window.localStorage.getItem("simple-global"));
|
||||
if (globalState) {
|
||||
const dot = document.querySelectorAll(".dot i");
|
||||
const html = document.querySelector("html");
|
||||
dot.forEach(item => (item.style.background = globalState.primary));
|
||||
if (globalState.isDark) html.style.background = "#141414";
|
||||
}
|
||||
</script>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
"*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
|
||||
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": ["prettier --write--parser json"],
|
||||
"package.json": ["prettier --write"],
|
||||
"*.vue": ["eslint --fix", "prettier --write", "stylelint --fix"],
|
||||
"*.{scss,less,styl,html}": ["stylelint --fix", "prettier --write"],
|
||||
"*.md": ["prettier --write"]
|
||||
};
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
{
|
||||
"name": "simple-admin",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"description": "SimpleAdmin是ElementUI最好看的开源通用业务型后台管理系统",
|
||||
"author": {
|
||||
"name": "huguodong",
|
||||
"email": "531035580@qq.com",
|
||||
"url": "https://gitee.com/dotnetmoyu"
|
||||
},
|
||||
"license": "MIT",
|
||||
"homepage": "https://gitee.com/dotnetmoyu/SimpleAdmin",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@gitee.com:dotnetmoyu/SimpleAdmin.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://gitee.com/dotnetmoyu/SimpleAdmin/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"serve": "vite",
|
||||
"build:dev": "vue-tsc && vite build --mode development",
|
||||
"build:test": "vue-tsc && vite build --mode test",
|
||||
"build:pro": "vue-tsc && vite build --mode production",
|
||||
"type:check": "vue-tsc --noEmit --skipLibCheck",
|
||||
"preview": "pnpm run build:dev && vite preview",
|
||||
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
|
||||
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
|
||||
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
|
||||
"lint:lint-staged": "lint-staged",
|
||||
"prepare": "husky install",
|
||||
"release": "standard-version",
|
||||
"commit": "git add -A && czg && git push"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/g2plot": "^2.4.32",
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@highlightjs/vue-plugin": "^2.1.0",
|
||||
"@iconify/vue": "^4.1.2",
|
||||
"@vueuse/core": "^11.0.3",
|
||||
"axios": "^1.7.7",
|
||||
"dayjs": "^1.11.13",
|
||||
"default-passive-events": "^2.0.0",
|
||||
"echarts": "^5.5.1",
|
||||
"element-plus": "^2.7.6",
|
||||
"highlight.js": "^11.10.0",
|
||||
"md5": "^2.3.0",
|
||||
"mitt": "^3.0.1",
|
||||
"mqtt": "^5.10.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.2.2",
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
"print-js": "^1.6.0",
|
||||
"qs": "^6.13.0",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.3",
|
||||
"vue": "^3.5.5",
|
||||
"vue-cropper": "^1.1.1",
|
||||
"vue-router": "^4.4.5",
|
||||
"vue3-colorpicker": "^2.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.5.0",
|
||||
"@commitlint/config-conventional": "^19.5.0",
|
||||
"@iconify/json": "^2.2.247",
|
||||
"@types/md5": "^2.3.5",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/qs": "^6.9.15",
|
||||
"@types/sm-crypto": "^0.3.4",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
||||
"@typescript-eslint/parser": "^7.18.0",
|
||||
"@vitejs/plugin-vue": "^5.1.3",
|
||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"code-inspector-plugin": "^0.16.1",
|
||||
"cz-git": "^1.9.4",
|
||||
"czg": "^1.9.4",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-vue": "^9.26.0",
|
||||
"husky": "^9.0.11",
|
||||
"lint-staged": "^15.2.10",
|
||||
"naive-ui": "^2.39.0",
|
||||
"postcss": "^8.4.45",
|
||||
"postcss-html": "^1.7.0",
|
||||
"prettier": "^3.3.3",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "^1.78.0",
|
||||
"sm-crypto": "^0.3.13",
|
||||
"standard-version": "^9.5.0",
|
||||
"stylelint": "^16.9.0",
|
||||
"stylelint-config-html": "^1.1.0",
|
||||
"stylelint-config-recess-order": "^5.1.0",
|
||||
"stylelint-config-recommended-scss": "^14.1.0",
|
||||
"stylelint-config-recommended-vue": "^1.5.0",
|
||||
"stylelint-config-standard": "^36.0.1",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"typescript": "^5.5.4",
|
||||
"unocss": "^0.62.3",
|
||||
"unplugin-auto-import": "^0.18.3",
|
||||
"unplugin-icons": "^0.19.3",
|
||||
"unplugin-vue-components": "^0.27.4",
|
||||
"unplugin-vue-setup-extend-plus": "^1.0.1",
|
||||
"vite": "^5.4.5",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-plugin-html": "^3.2.2",
|
||||
"vite-plugin-pwa": "^0.20.5",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vite-plugin-vue-devtools": "^7.3.5",
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
"vue-tsc": "^2.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
"> 1%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "node_modules/cz-git"
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+13037
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
onlyBuiltDependencies:
|
||||
- '@parcel/watcher'
|
||||
- esbuild
|
||||
- vue-demi
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
autoprefixer: {}
|
||||
}
|
||||
};
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 878 KiB |
+23
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<el-config-provider :locale="zhCn" :size="assemblySize" :button="buttonConfig">
|
||||
<router-view></router-view>
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, computed } from "vue";
|
||||
import { useTheme } from "@/hooks/useTheme";
|
||||
import { ElConfigProvider } from "element-plus";
|
||||
import { useGlobalStore } from "@/stores/modules/global";
|
||||
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
||||
const globalStore = useGlobalStore();
|
||||
|
||||
// init theme
|
||||
const { initTheme } = useTheme();
|
||||
initTheme();
|
||||
// element assemblySize
|
||||
const assemblySize = computed(() => globalStore.assemblySize);
|
||||
|
||||
// element button config
|
||||
const buttonConfig = reactive({ autoInsertSpace: false });
|
||||
</script>
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* @description axios取消请求
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { CustomAxiosRequestConfig } from "../request/instance";
|
||||
import qs from "qs";
|
||||
|
||||
// 声明一个 Map 用于存储每个请求的标识 和 取消函数
|
||||
let pendingMap = new Map<string, AbortController>();
|
||||
|
||||
// 序列化参数,确保对象属性顺序一致
|
||||
const sortedStringify = (obj: any) => {
|
||||
return qs.stringify(obj, { arrayFormat: "repeat", sort: (a, b) => a.localeCompare(b) });
|
||||
};
|
||||
|
||||
// 获取请求的唯一标识
|
||||
export const getPendingUrl = (config: CustomAxiosRequestConfig) => {
|
||||
return [config.baseURL, config.method, config.url, sortedStringify(config.data), sortedStringify(config.params)].join("&");
|
||||
};
|
||||
|
||||
export class AxiosCanceler {
|
||||
/**
|
||||
* @description: 添加请求
|
||||
* @param {Object} config
|
||||
* @return void
|
||||
*/
|
||||
addPending(config: CustomAxiosRequestConfig) {
|
||||
// 在请求开始前,对之前的请求做检查取消操作
|
||||
this.removePending(config);
|
||||
const url = getPendingUrl(config);
|
||||
const controller = new AbortController();
|
||||
config.signal = controller.signal;
|
||||
pendingMap.set(url, controller);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 移除请求
|
||||
* @param {Object} config
|
||||
*/
|
||||
removePending(config: CustomAxiosRequestConfig) {
|
||||
const url = getPendingUrl(config);
|
||||
// 如果在 pending 中存在当前请求标识,需要取消当前请求并删除条目
|
||||
const controller = pendingMap.get(url);
|
||||
if (controller) {
|
||||
controller.abort();
|
||||
pendingMap.delete(url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 清空所有pending
|
||||
*/
|
||||
removeAllPending() {
|
||||
pendingMap.forEach(controller => {
|
||||
controller && controller.abort();
|
||||
});
|
||||
pendingMap.clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* @description 校验网络请求状态码
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
import { useConfigStore } from "@/stores/modules";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
/**
|
||||
* @description: 校验网络请求状态码
|
||||
* @param {Number} status
|
||||
* @return void
|
||||
*/
|
||||
export const checkStatus = (status: number) => {
|
||||
switch (status) {
|
||||
case 400:
|
||||
ElMessage.error("请求失败!请您稍后重试");
|
||||
break;
|
||||
case 401:
|
||||
ElMessage.error("登录失效!请您重新登录");
|
||||
break;
|
||||
case 403:
|
||||
ElMessage.error("当前账号无权限访问!");
|
||||
break;
|
||||
case 404:
|
||||
ElMessage.error("你所访问的资源不存在!");
|
||||
break;
|
||||
case 405:
|
||||
ElMessage.error("请求方式错误!请您稍后重试");
|
||||
break;
|
||||
case 408:
|
||||
ElMessage.error("请求超时!请您稍后重试");
|
||||
break;
|
||||
case 423:
|
||||
const configStore = useConfigStore();
|
||||
ElMessage.error(configStore.sysBaseInfoGet.SYS_WEB_CLOSE_PROMPT);
|
||||
break;
|
||||
case 500:
|
||||
ElMessage.error("服务异常!");
|
||||
break;
|
||||
case 502:
|
||||
ElMessage.error("网关错误!");
|
||||
break;
|
||||
case 503:
|
||||
ElMessage.error("服务不可用!");
|
||||
break;
|
||||
case 504:
|
||||
ElMessage.error("网关超时!");
|
||||
break;
|
||||
default:
|
||||
ElMessage.error("请求失败!");
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./modules";
|
||||
export * from "./interface";
|
||||
export * from "./request";
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @description 接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
export * from "./ops";
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @description 接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
export * from "./test";
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @description 测试管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqPage } from "@/api/interface";
|
||||
|
||||
/**
|
||||
* @Description: 测试管理接口
|
||||
* @Author: superAdmin
|
||||
* @Date: 2025-03-20 14:12:55
|
||||
*/
|
||||
export namespace GenTest {
|
||||
/**测试分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
/** 姓名 */
|
||||
name: string;
|
||||
/** 性别 */
|
||||
sex: string;
|
||||
/** 民族 */
|
||||
nation: string;
|
||||
}
|
||||
|
||||
/** 测试信息 */
|
||||
export interface GenTestInfo {
|
||||
/** 姓名 */
|
||||
name: string;
|
||||
/** 性别 */
|
||||
sex: string;
|
||||
/** 民族 */
|
||||
nation: string;
|
||||
/** 年龄 */
|
||||
age: number;
|
||||
/** 生日 */
|
||||
bir: string;
|
||||
/** 存款 */
|
||||
money: number;
|
||||
/** 排序码 */
|
||||
sortCode: number;
|
||||
/** 状态 */
|
||||
status: string;
|
||||
/** Id */
|
||||
id: number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @description 接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
// 请求响应参数(不包含data)
|
||||
export interface Result {
|
||||
code: string;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
// 请求响应参数(包含data)
|
||||
export interface ResultData<T = any> extends Result {
|
||||
data: T;
|
||||
}
|
||||
|
||||
// 分页响应参数
|
||||
export interface ResPage<T> {
|
||||
list: T[];
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
// 分页请求参数
|
||||
export interface ReqPage {
|
||||
/** 页码 */
|
||||
pageNum: number;
|
||||
/** 数量 */
|
||||
pageSize: number;
|
||||
/** 排序字段 */
|
||||
sortField?: string;
|
||||
/** 排序方式 */
|
||||
sortOrder?: string;
|
||||
/** 关键字 */
|
||||
searchKey?: string;
|
||||
}
|
||||
|
||||
/** id请求参数 */
|
||||
export interface ReqId {
|
||||
/** id */
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
export * from "./sys";
|
||||
export * from "./biz";
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
export * from "./visLog";
|
||||
export * from "./opLog";
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* @description 操作日志接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqPage, VisLog } from "@/api";
|
||||
/**
|
||||
* @Description: 操作日志接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace OpLog {
|
||||
/** 操作日志分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
/** 操作日志分类 */
|
||||
category: string;
|
||||
}
|
||||
|
||||
/** 操作日志信息 */
|
||||
export interface OpLogInfo extends VisLog.VisLogInfo {
|
||||
/** 具体消息 */
|
||||
exeMessage: null;
|
||||
/** 类名称 */
|
||||
className: string;
|
||||
/** 方法名称 */
|
||||
methodName: string;
|
||||
/** 请求方式 */
|
||||
reqMethod: string;
|
||||
/** 请求地址 */
|
||||
reqUrl: string;
|
||||
/** 请求参数 */
|
||||
paramJson: string | null;
|
||||
/** 返回结果 */
|
||||
resultJson: string | null;
|
||||
}
|
||||
|
||||
/** 折线图 */
|
||||
export interface ColumnChart {
|
||||
/** 日期 */
|
||||
date: string;
|
||||
/** 日志类型 */
|
||||
name: string;
|
||||
/** 数量 */
|
||||
count: number;
|
||||
}
|
||||
|
||||
/** 饼图 */
|
||||
export interface PineChart {
|
||||
/** 类型 */
|
||||
type: string;
|
||||
/** 数量 */
|
||||
value: number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* @description 访问日志接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqPage } from "@/api";
|
||||
|
||||
/**
|
||||
* @Description: 操作日志接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace VisLog {
|
||||
/** 访问日志分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
/** 访问日志分类 */
|
||||
category: string;
|
||||
}
|
||||
|
||||
/** 访问日志详情 */
|
||||
export interface VisLogInfo {
|
||||
/** id */
|
||||
id: number;
|
||||
/** 访问日志分类 */
|
||||
category: string;
|
||||
/** 访问日志标题 */
|
||||
name: string;
|
||||
/** 执行状态 */
|
||||
exeStatus: string;
|
||||
/** 操作Ip */
|
||||
opIp: string;
|
||||
/** 操作地址 */
|
||||
opAddress: string;
|
||||
/** 操作浏览器 */
|
||||
opBrowser: string;
|
||||
/** 操作系统 */
|
||||
opOs: string;
|
||||
/** 操作时间 */
|
||||
opTime: string;
|
||||
/** 操作人 */
|
||||
opUser: string;
|
||||
/** 操作账号 */
|
||||
opAccount: string;
|
||||
/** 操作时间 */
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
/** 折线图 */
|
||||
export interface LineChart {
|
||||
/** 日期 */
|
||||
date: string;
|
||||
/** 登入量 */
|
||||
loginCount: number;
|
||||
/** 登出量 */
|
||||
logoutCount: number;
|
||||
}
|
||||
|
||||
/** 饼图 */
|
||||
export interface PineChart {
|
||||
/** 类型 */
|
||||
type: string;
|
||||
/** 数量 */
|
||||
value: number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./login";
|
||||
@@ -0,0 +1,133 @@
|
||||
/**
|
||||
* @description 登录模块接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace Login {
|
||||
/** 模块信息 */
|
||||
export type ModuleInfo = {
|
||||
id: number | string;
|
||||
title: string;
|
||||
code: string;
|
||||
icon: string;
|
||||
description: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
interface ValidCode {
|
||||
/** 验证码 */
|
||||
validCode: string;
|
||||
/** 验证码请求号 */
|
||||
validCodeReqNo: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 账号密码登录表单
|
||||
*/
|
||||
export interface LoginForm extends ValidCode {
|
||||
account: string;
|
||||
password: string;
|
||||
tenantId?: number | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号登录表单
|
||||
*/
|
||||
export interface PhoneLoginForm extends ValidCode {
|
||||
/** 手机号 */
|
||||
phone: string;
|
||||
/** 租户Id */
|
||||
tenantId?: number | string;
|
||||
}
|
||||
|
||||
/** 获取手机验证码请求 */
|
||||
export interface ReqPhoneValidCode extends ValidCode {
|
||||
/** 手机号 */
|
||||
phone: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销表单
|
||||
*/
|
||||
export interface Logout {
|
||||
token: string;
|
||||
}
|
||||
|
||||
// 登录返回
|
||||
export interface Login {
|
||||
/** token */
|
||||
token: string;
|
||||
/** 默认模块 */
|
||||
defaultModule: string;
|
||||
/** 模块列表 */
|
||||
moduleList: ModuleInfo[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证码返回
|
||||
*/
|
||||
export interface ReqValidCode {
|
||||
/** 验证码 */
|
||||
validCodeBase64: string;
|
||||
/** 验证码请求号 */
|
||||
validCodeReqNo: string;
|
||||
}
|
||||
|
||||
/** 用户信息 */
|
||||
export interface LoginUserInfo {
|
||||
/** 用户id */
|
||||
id: string | number;
|
||||
/** 用户名 */
|
||||
account: string;
|
||||
/** 用户姓名 */
|
||||
name: string;
|
||||
/** 用户昵称 */
|
||||
nickname: string;
|
||||
/** 用户头像 */
|
||||
avatar: string;
|
||||
/** 用户性别 */
|
||||
gender: string;
|
||||
/** 民族 */
|
||||
nation: string;
|
||||
/** 出生日期 */
|
||||
birthday: string;
|
||||
/** 家庭住址 */
|
||||
homeAddress: string;
|
||||
/** 电话号码 */
|
||||
phone: string;
|
||||
/** 邮箱 */
|
||||
email: string;
|
||||
/** 用户签名 */
|
||||
signature: string;
|
||||
/** 默认模块 */
|
||||
defaultModule: number | string;
|
||||
/** 模块列表 */
|
||||
moduleList: ModuleInfo[];
|
||||
/** 组织全程 */
|
||||
orgNames: string;
|
||||
/** 职位名称 */
|
||||
positionName: string;
|
||||
/** 按钮码集合 */
|
||||
buttonCodeList: string[];
|
||||
/** 权限码集合 */
|
||||
permissionCodeList: string[];
|
||||
/** 角色码集合 */
|
||||
roleCodeList: string[];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
/**
|
||||
* @description 代码生成
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqPage, ReqId } from "@/api/interface";
|
||||
|
||||
/**
|
||||
* @Description: 生成代码配置接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2025-01-07 13:06:14
|
||||
*/
|
||||
export namespace GenCode {
|
||||
/** 代码生成基础 */
|
||||
export interface GenBasic {
|
||||
/** ID */
|
||||
id: number | string;
|
||||
/** 库名 */
|
||||
configId: string;
|
||||
/** 主表 */
|
||||
dbTable: string;
|
||||
/** 实体名称 */
|
||||
entityName: string;
|
||||
/** 功能列表 */
|
||||
functions: string;
|
||||
/** 数据权限 */
|
||||
dataPermission: string;
|
||||
/** 生成模版 */
|
||||
moduleType: string;
|
||||
/** 树Id字段 */
|
||||
treeId: string;
|
||||
/** 树父Id字段 */
|
||||
treePid: string;
|
||||
/** 树名称字段 */
|
||||
treeName: string;
|
||||
/** 关联子表名 */
|
||||
childTable: string;
|
||||
/** 关联子表外键 */
|
||||
childFk: string;
|
||||
/** 表前缀 */
|
||||
tablePrefix: string;
|
||||
/** 生成方式 */
|
||||
generateType: string;
|
||||
/** 所属模块 */
|
||||
module: number;
|
||||
/** 上级目录 */
|
||||
menuPid: number;
|
||||
/** 路由名 */
|
||||
routeName: string;
|
||||
/** 图标 */
|
||||
icon: string;
|
||||
/** 功能名 */
|
||||
functionName: string;
|
||||
/** 功能名后缀 */
|
||||
functionNameSuffix: string;
|
||||
/** 业务名 */
|
||||
busName: string;
|
||||
/** 类名 */
|
||||
className: string;
|
||||
/** 表单布局 */
|
||||
formLayout: string;
|
||||
/** 使用栅格 */
|
||||
gridWhether: string;
|
||||
/** 左树 */
|
||||
leftTree: string;
|
||||
/** 前端路径 */
|
||||
frontedPath: string;
|
||||
/** 服务代码存放项目 */
|
||||
servicePosition: string;
|
||||
/** 服务代码存放文件夹 */
|
||||
serviceDictionary: string;
|
||||
/** 控制器代码存放位置 */
|
||||
controllerPosition: string;
|
||||
/** 控制器代码存放文件夹 */
|
||||
controllerDictionary: string;
|
||||
/** 作者 */
|
||||
authorName: string;
|
||||
/** 排序 */
|
||||
sortCode: number;
|
||||
/** 功能列表 */
|
||||
funcList: string[];
|
||||
}
|
||||
|
||||
/** 代码生成配置 */
|
||||
export interface GenConfig {
|
||||
/** ID */
|
||||
id: number | string;
|
||||
/** 基础配置ID */
|
||||
basicId: number;
|
||||
/** 字段排序 */
|
||||
fieldIndex: number;
|
||||
/** 是否主键 */
|
||||
isPrimaryKey: string;
|
||||
/** 字段 */
|
||||
fieldName: string;
|
||||
/** 名称 */
|
||||
fieldRemark: string;
|
||||
/** 类型 */
|
||||
fieldType: string;
|
||||
/** 实体类型 */
|
||||
fieldNetType: string;
|
||||
/** 作用类型 */
|
||||
effectType: string;
|
||||
/** 外键实体名称 */
|
||||
fkEntityName: string;
|
||||
/** 外键ID */
|
||||
fkColumnId: string;
|
||||
/** 外键显示字段 */
|
||||
fkColumnName: string;
|
||||
/** 字典 */
|
||||
dictTypeCode: string;
|
||||
/** 列宽度 */
|
||||
width: number;
|
||||
/** 列表显示 */
|
||||
whetherTable: string;
|
||||
/** 列省略 */
|
||||
whetherRetract: string;
|
||||
/** 可伸缩列 */
|
||||
whetherResizable: string;
|
||||
/** 是否增改 */
|
||||
whetherAddUpdate: string;
|
||||
|
||||
/** 是否导入导出 */
|
||||
whetherImportExport: string;
|
||||
/** 必填 */
|
||||
whetherRequired: string;
|
||||
/** 查询 */
|
||||
queryWhether: string;
|
||||
/** 查询方式 */
|
||||
queryType: string;
|
||||
/** 排序 */
|
||||
sortCode: number;
|
||||
}
|
||||
|
||||
// 表属性接口
|
||||
export interface TableList {
|
||||
label: string;
|
||||
value: string;
|
||||
tableName: string;
|
||||
configId: string;
|
||||
entityName: string;
|
||||
tableDescription: string;
|
||||
tableColumns: any[];
|
||||
}
|
||||
|
||||
/** 分页查询 */
|
||||
export interface Page extends ReqPage {}
|
||||
|
||||
/** 代码生成基础 */
|
||||
export interface ExecGen extends ReqId {
|
||||
/** 生成类型 */
|
||||
execType: string;
|
||||
}
|
||||
|
||||
/** SqlSugar字段信息 */
|
||||
export interface SqlSugarColumnInfo {
|
||||
/** 字段名 */
|
||||
columnName: string;
|
||||
/** 字段类型 */
|
||||
dataType: string;
|
||||
/** 是否主键 */
|
||||
isPrimaryKey: boolean;
|
||||
/** 是否可空 */
|
||||
isNullable: boolean;
|
||||
/** 字段说明 */
|
||||
columnDescription: string;
|
||||
}
|
||||
|
||||
/** SqlSugar表信息 */
|
||||
export interface ResSqlSugarTableInfo {
|
||||
/** 所属库 */
|
||||
configId: string;
|
||||
/** 表名 */
|
||||
tableName: string;
|
||||
/** 表注释 */
|
||||
entityName: string;
|
||||
/** 主键 */
|
||||
tableDescription: string;
|
||||
/** 表字段 */
|
||||
columns: SqlSugarColumnInfo[];
|
||||
}
|
||||
|
||||
/** 代码生成结果 */
|
||||
export interface GenBaseCodeResult {
|
||||
/** 代码文件名 */
|
||||
codeFileName: string;
|
||||
/** 代码文件路径 */
|
||||
filePath: string;
|
||||
/** 代码文件内容 */
|
||||
codeFileContent: string;
|
||||
}
|
||||
|
||||
/** 代码生成预览 */
|
||||
export interface ResGenBasePreview {
|
||||
/** SQL代码结果集 */
|
||||
sqlResults: GenBaseCodeResult[];
|
||||
/** 前端代码结果集 */
|
||||
codeFrontendResults: GenBaseCodeResult[];
|
||||
/** 后端代码结果集 */
|
||||
codeBackendResults: GenBaseCodeResult[];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @description 在线开发
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
export * from "./gen";
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @description 基础工具接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
export * from "./message";
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @description 站内消息接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqPage } from "@/api/interface";
|
||||
import { MessageTypeDictEnum, MessageSendWayDictEnum } from "@/enums";
|
||||
import { SysUser, SysRole } from "@/api";
|
||||
/**
|
||||
* @Description: 站内消息接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2024-11-08 15:54:07
|
||||
*/
|
||||
export namespace SysMessage {
|
||||
/** 消息类型 */
|
||||
export type MessageType = MessageTypeDictEnum.INFORM | MessageTypeDictEnum.NOTICE | MessageTypeDictEnum.MESSAGE;
|
||||
|
||||
/** 消息信息 */
|
||||
export interface SysMessageInfo {
|
||||
/** 消息ID */
|
||||
id: number | string;
|
||||
/** 消息类型 */
|
||||
category: string;
|
||||
/** 消息标题 */
|
||||
subject: string;
|
||||
/** 消息内容 */
|
||||
content: string;
|
||||
/** 消息接收者 */
|
||||
receiverType: string;
|
||||
/** 是否已读 */
|
||||
read: boolean;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 接受者Id列表 */
|
||||
receiverInfo: SysUser.SysUserInfo[] | SysRole.SysRoleInfo[];
|
||||
/**发送方式 */
|
||||
sendWay: MessageSendWayDictEnum;
|
||||
/**发送时间 */
|
||||
sendTime: string;
|
||||
/**发送时间格式化 */
|
||||
sendTimeFormat: string;
|
||||
/**延迟时间 */
|
||||
delayTime: number;
|
||||
/**发送状态 */
|
||||
status: string;
|
||||
/**接收详情 */
|
||||
receiverDetail: receiverDetail[]; //接收者详情
|
||||
}
|
||||
|
||||
/** 消息信息 */
|
||||
export interface receiverDetail {
|
||||
/** 消息ID */
|
||||
id: number | string;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/** 是否已读 */
|
||||
read: boolean;
|
||||
}
|
||||
/** 消息分页查询 */
|
||||
export interface Page extends ReqPage {}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @description 即时通讯接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
export * from "./mqtt";
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* @description mqtt 接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
/**
|
||||
* @Description: 角色管理接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2024-11-08 15:53:56
|
||||
*/
|
||||
export namespace Mqtt {
|
||||
/** mqtt参数 */
|
||||
export interface MqttParameter {
|
||||
/** 服务器地址 */
|
||||
url: string;
|
||||
/** 用户名 */
|
||||
username: string;
|
||||
/** 密码 */
|
||||
password: string;
|
||||
/** 客户端ID */
|
||||
clientId: string;
|
||||
/** 主题 */
|
||||
topics: string[];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @description sys模块接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./upload";
|
||||
export * from "./userCenter";
|
||||
export * from "./limit";
|
||||
export * from "./ops";
|
||||
export * from "./audit";
|
||||
export * from "./organization";
|
||||
export * from "./auth";
|
||||
export * from "./im";
|
||||
export * from "./dev";
|
||||
export * from "./curd";
|
||||
export * from "./mobile";
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @description 按钮管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqPage } from "@/api";
|
||||
/**
|
||||
* @Description: 权限按钮接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace Button {
|
||||
/**按钮分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
/** 菜单Id */
|
||||
parentId: number | string;
|
||||
}
|
||||
|
||||
/** 按钮信息 */
|
||||
export interface ButtonInfo {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 上级菜单 */
|
||||
parentId: number | string;
|
||||
/** 按钮名称 */
|
||||
title: string;
|
||||
/** 按钮码 */
|
||||
code: string;
|
||||
/** 按钮排序*/
|
||||
sortCode: number;
|
||||
/** 按钮描述 */
|
||||
description: string;
|
||||
}
|
||||
|
||||
/** 按钮信息 */
|
||||
export interface Batch {
|
||||
/** 上级菜单 */
|
||||
parentId: number | string;
|
||||
/** 按钮名称 */
|
||||
title: string;
|
||||
/** 按钮码 */
|
||||
code: string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @description 资源管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./spa";
|
||||
export * from "./menu";
|
||||
export * from "./module";
|
||||
export * from "./button";
|
||||
export * from "./role";
|
||||
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @description 菜单管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
import { Spa } from "@/api/interface";
|
||||
import { MenuTypeDictEnum } from "@/enums";
|
||||
/**
|
||||
* @Description: 菜单管理接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace Menu {
|
||||
/** 菜单类型 */
|
||||
export type MenuType = MenuTypeDictEnum.MENU | MenuTypeDictEnum.CATALOG | MenuTypeDictEnum.LINK;
|
||||
|
||||
/**菜单分页查询 */
|
||||
export interface Tree {
|
||||
/** 菜单名称 */
|
||||
menuType?: MenuType;
|
||||
/** 所属模块名称 */
|
||||
module: number | string;
|
||||
}
|
||||
|
||||
/** 菜单信息 */
|
||||
export interface MenuInfo extends Spa.SpaInfo {
|
||||
/** 所属模块 */
|
||||
module: number | string;
|
||||
/** 上级菜单 */
|
||||
parentId: number | string;
|
||||
/** 分类 */
|
||||
category: string;
|
||||
/** 子菜单 */
|
||||
children?: MenuInfo[];
|
||||
}
|
||||
|
||||
/** 菜单树信息 */
|
||||
export interface MenuTreeInfo {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 菜单名称 */
|
||||
title: string;
|
||||
/** 上级菜单Id */
|
||||
parentId: number | string;
|
||||
/** 菜单路由 */
|
||||
path?: string;
|
||||
/** 是否禁用 */
|
||||
disabled?: boolean;
|
||||
/** 菜单类型 */
|
||||
menuType: MenuType;
|
||||
/** 子菜单 */
|
||||
children?: MenuTreeInfo[];
|
||||
}
|
||||
|
||||
/** 菜单树选择器输入参数 */
|
||||
export interface MenuTreeSelectorReq {
|
||||
/** 所属模块 */
|
||||
module?: number | string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* @description 模块管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
import { ReqPage } from "@/api/interface";
|
||||
/**
|
||||
* @Description: 模块管理接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace Module {
|
||||
/**模块分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
title: string;
|
||||
}
|
||||
|
||||
/** 单页信息 */
|
||||
export interface ModuleInfo {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 菜单名称 */
|
||||
title: string;
|
||||
/** 菜单描述 */
|
||||
description: string;
|
||||
/** 菜单图标 */
|
||||
icon: string;
|
||||
/** 状态 */
|
||||
status: string;
|
||||
/** 排序 */
|
||||
sortCode: number;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
/**
|
||||
* @description 角色管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
import { ReqPage } from "@/api/interface";
|
||||
import { ReqId, SysUser } from "@/api/interface";
|
||||
/**
|
||||
* @Description: 角色管理接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace SysRole {
|
||||
/** 角色分页查询 */
|
||||
export interface Page extends ReqPage {}
|
||||
|
||||
/** 角色信息 */
|
||||
export interface SysRoleInfo {
|
||||
/** 角色id */
|
||||
id: number | string;
|
||||
/** 机构ID */
|
||||
orgId: number | string;
|
||||
/** 角色名称 */
|
||||
name: string;
|
||||
/** 角色编码 */
|
||||
code: string;
|
||||
/** 角色分类 */
|
||||
category: string;
|
||||
/** 默认数据范围 */
|
||||
defaultDataScope: DefaultDataScope;
|
||||
/** 状态 */
|
||||
status: string;
|
||||
/** 排序码 */
|
||||
sortCode: number;
|
||||
/** 用户信息 */
|
||||
userList: SysUser.SysUserInfo[];
|
||||
}
|
||||
|
||||
/** 默认数据范围 */
|
||||
export interface DefaultDataScope {
|
||||
/** 权重 */
|
||||
level: number;
|
||||
/** 标题 */
|
||||
title: string;
|
||||
/** 范围分类 */
|
||||
scopeCategory: DataScopeEnum;
|
||||
/** 机构ID列表 */
|
||||
scopeDefineOrgIdList: string[] | number[];
|
||||
/** 是否被选中 */
|
||||
check?: boolean;
|
||||
test?: string;
|
||||
}
|
||||
|
||||
/** 角色树 */
|
||||
export interface SysRoleTree {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/** 是否是角色 */
|
||||
isRole: boolean;
|
||||
/** 子集 */
|
||||
children: SysRoleTree[];
|
||||
}
|
||||
|
||||
/** 数据范围枚举 */
|
||||
export enum DataScopeEnum {
|
||||
/** 全部 */
|
||||
SCOPE_ALL = "SCOPE_ALL",
|
||||
/** 所属组织及以下 */
|
||||
SCOPE_ORG_CHILD = "SCOPE_ORG_CHILD",
|
||||
/** 所属组织 */
|
||||
SCOPE_ORG = "SCOPE_ORG",
|
||||
/** 仅自己 */
|
||||
SCOPE_SELF = "SCOPE_SELF",
|
||||
/** 自定义 */
|
||||
SCOPE_ORG_DEFINE = "SCOPE_ORG_DEFINE"
|
||||
}
|
||||
|
||||
/** 数据范围数组 */
|
||||
export const dataScopeOptions: DefaultDataScope[] = [
|
||||
{
|
||||
level: 5,
|
||||
title: "全部",
|
||||
scopeCategory: DataScopeEnum.SCOPE_ALL,
|
||||
scopeDefineOrgIdList: []
|
||||
},
|
||||
{
|
||||
level: 4,
|
||||
title: "所属组织及以下",
|
||||
scopeCategory: DataScopeEnum.SCOPE_ORG_CHILD,
|
||||
scopeDefineOrgIdList: []
|
||||
},
|
||||
{
|
||||
level: 2,
|
||||
title: "所属组织",
|
||||
scopeCategory: DataScopeEnum.SCOPE_ORG,
|
||||
scopeDefineOrgIdList: []
|
||||
},
|
||||
{
|
||||
level: 1,
|
||||
title: "仅自己",
|
||||
scopeCategory: DataScopeEnum.SCOPE_SELF,
|
||||
scopeDefineOrgIdList: []
|
||||
},
|
||||
{
|
||||
level: 3,
|
||||
title: "自定义",
|
||||
scopeCategory: DataScopeEnum.SCOPE_ORG_DEFINE,
|
||||
scopeDefineOrgIdList: []
|
||||
}
|
||||
];
|
||||
|
||||
/** 角色授权资源树 */
|
||||
export interface ResTreeSelector {
|
||||
/** 模块id */
|
||||
id: number | string;
|
||||
/** 模块名称 */
|
||||
title: string;
|
||||
/** 图标 */
|
||||
icon: string;
|
||||
/** 模块下菜单集合 */
|
||||
menu: RoleGrantResourceMenu[];
|
||||
}
|
||||
|
||||
/** 角色授权资源菜单信息 */
|
||||
export interface RoleGrantResourceMenu {
|
||||
/** 菜单id */
|
||||
id: number | string;
|
||||
/** 父id */
|
||||
parentId: number | string;
|
||||
/** 父名称 */
|
||||
parentName: string;
|
||||
/** 模块名称 */
|
||||
title: string;
|
||||
/** 模块id */
|
||||
module: number;
|
||||
/** 菜单下按钮集合 */
|
||||
button: RoleGrantResourceButton[];
|
||||
/** 父级是否选中 */
|
||||
parentCheck: boolean;
|
||||
/** 是否选中 */
|
||||
nameCheck: boolean;
|
||||
}
|
||||
|
||||
/** 角色授权资源按钮信息 */
|
||||
export interface RoleGrantResourceButton {
|
||||
/** 按钮id */
|
||||
id: number | string;
|
||||
/** 名称 */
|
||||
title: string;
|
||||
/** 是否被选中 */
|
||||
check: boolean;
|
||||
}
|
||||
|
||||
/** 角色拥有资源 */
|
||||
export interface RoleOwnResource {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 已授权资源信息 */
|
||||
grantInfoList: RelationRoleResource[];
|
||||
}
|
||||
|
||||
/** 角色有哪些资源 */
|
||||
export interface RelationRoleResource {
|
||||
/** 菜单id */
|
||||
menuId: number | string;
|
||||
/** 按钮信息 */
|
||||
buttonInfo: number[] | string[];
|
||||
}
|
||||
|
||||
/** 角色权限关系扩展 */
|
||||
export interface RelationRolePermission {
|
||||
/** 数据范围 */
|
||||
scopeCategory: string;
|
||||
/** 自定义机构范围列表 */
|
||||
scopeDefineOrgIdList: string[] | number[];
|
||||
/** 接口Url */
|
||||
apiUrl: string;
|
||||
}
|
||||
|
||||
/** 角色拥有权限 */
|
||||
export interface RoleOwnPermission {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 已授权权限信息 */
|
||||
grantInfoList: RelationRolePermission[];
|
||||
}
|
||||
|
||||
/** 角色授权资源请求参数 */
|
||||
export interface GrantResourceReq extends ReqId {
|
||||
/** 授权资源信息 */
|
||||
grantInfoList: RelationRoleResource[];
|
||||
/** 默认数据范围,给用户授权资源用的 */
|
||||
defaultDataScope?: DefaultDataScope;
|
||||
}
|
||||
|
||||
/** 角色授权资源请求参数 */
|
||||
export interface GrantPermissionReq extends ReqId {
|
||||
/** 授权资源信息 */
|
||||
grantInfoList: RelationRolePermission[];
|
||||
}
|
||||
|
||||
/** 角色授权权限信息 */
|
||||
export interface RoleGrantPermission {
|
||||
/** api地址 */
|
||||
api: string;
|
||||
/** 是否被选中 */
|
||||
check: boolean;
|
||||
/** 数据范围 */
|
||||
dataScope: DefaultDataScope;
|
||||
}
|
||||
|
||||
/** 角色授权用户请求参数 */
|
||||
export interface GrantUserReq extends ReqId {
|
||||
/** 授权资源信息 */
|
||||
grantInfoList: number[] | string[];
|
||||
}
|
||||
|
||||
/** 角色选择器请求参数 */
|
||||
export interface RoleSelectorReq {
|
||||
/** 角色名称 */
|
||||
account?: string;
|
||||
/** 组织id */
|
||||
orgId: string | number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* @description 单页管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
import { ReqPage } from "@/api/interface";
|
||||
import { MenuTypeDictEnum } from "@/enums";
|
||||
/**
|
||||
* @Description: 单页管理接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace Spa {
|
||||
/** 单页类型 */
|
||||
export type SpaType = MenuTypeDictEnum.MENU | MenuTypeDictEnum.LINK;
|
||||
|
||||
/**单页分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
menuType: SpaType;
|
||||
}
|
||||
|
||||
/** 单页信息 */
|
||||
export interface SpaInfo {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 菜单名称 */
|
||||
title: string;
|
||||
/** 组件名称 */
|
||||
name: string;
|
||||
/** 菜单描述 */
|
||||
description: string;
|
||||
/** 菜单类型 */
|
||||
menuType: string;
|
||||
/** 菜单图标 */
|
||||
icon: string;
|
||||
/** 菜单路径 */
|
||||
path: string;
|
||||
/** 状态 */
|
||||
status: string;
|
||||
/** 菜单组件 */
|
||||
component: string;
|
||||
/** 需要高亮的 path (通常用作详情页高亮父级菜单) */
|
||||
activeMenu: string;
|
||||
/** 是否首页 */
|
||||
isHome: boolean;
|
||||
/** 排序 */
|
||||
sortCode: number;
|
||||
/** 是否隐藏 */
|
||||
isHide: boolean;
|
||||
/** 是否缓存 */
|
||||
isKeepAlive: boolean;
|
||||
/** 是否全屏 */
|
||||
isAffix: boolean;
|
||||
/** 是否全屏 */
|
||||
isFull: boolean;
|
||||
/** 外链地址 */
|
||||
isLink: string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @description 接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
export * from "./module";
|
||||
export * from "./menu";
|
||||
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* @description 菜单管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { MobileModule } from "@/api/interface";
|
||||
import { MenuTypeDictEnum } from "@/enums";
|
||||
import { ReqId } from "@/api/interface";
|
||||
|
||||
/**
|
||||
* @Description: 菜单管理接口
|
||||
* @Author: superAdmin
|
||||
* @Date: 2025-06-26 16:41:59
|
||||
*/
|
||||
export namespace MobileMenu {
|
||||
/** 菜单类型 */
|
||||
export type MenuType = MenuTypeDictEnum.MENU | MenuTypeDictEnum.CATALOG | MenuTypeDictEnum.LINK;
|
||||
|
||||
/**菜单分页查询 */
|
||||
export interface Tree {
|
||||
/** 菜单名称 */
|
||||
menuType?: MenuType;
|
||||
/** 所属模块名称 */
|
||||
module: number | string;
|
||||
}
|
||||
|
||||
/** 菜单信息 */
|
||||
export interface MobileMenuInfo extends MobileModule.MobileModuleInfo {}
|
||||
|
||||
/** 菜单树选择器输入参数 */
|
||||
export interface MenuTreeSelectorReq {
|
||||
/** 所属模块 */
|
||||
module?: number | string;
|
||||
}
|
||||
|
||||
/** 移动端资源授权树 */
|
||||
export interface MobileResTreeSelector {
|
||||
/** 模块id */
|
||||
id: number | string;
|
||||
/** 模块名称 */
|
||||
title: string;
|
||||
/** 图标 */
|
||||
icon: string;
|
||||
/** 模块下菜单集合 */
|
||||
menu: RoleGrantMobileResourceMenu[];
|
||||
}
|
||||
|
||||
/** 角色授权移动端资源菜单信息 */
|
||||
export interface RoleGrantMobileResourceMenu {
|
||||
/** 菜单id */
|
||||
id: number | string;
|
||||
/** 父id */
|
||||
parentId: number | string;
|
||||
/** 父名称 */
|
||||
parentName: string;
|
||||
/** 菜单名称 */
|
||||
title: string;
|
||||
/** 模块id */
|
||||
module: number;
|
||||
/**菜单下按钮集合 */
|
||||
button: RoleGrantResourceButton[];
|
||||
/** 父级是否选中 */
|
||||
parentCheck: boolean;
|
||||
/** 是否选中 */
|
||||
nameCheck: boolean;
|
||||
}
|
||||
|
||||
export interface RoleGrantResourceButton {
|
||||
/** 按钮id */
|
||||
id: number | string;
|
||||
/** 标题 */
|
||||
title: string;
|
||||
/** 是否被选中 */
|
||||
check: boolean;
|
||||
}
|
||||
/** 角色拥有移动端资源 */
|
||||
export interface RoleOwnMobileResource {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 已授权移动端资源信息 */
|
||||
grantInfoList: RelationRoleMobileResource[];
|
||||
}
|
||||
|
||||
/** 角色移动端资源关系 */
|
||||
export interface RelationRoleMobileResource {
|
||||
/** 菜单id */
|
||||
menuId: number | string;
|
||||
/** 按钮id */
|
||||
buttonInfo: (string | number)[];
|
||||
}
|
||||
|
||||
/** 角色授权移动端资源请求参数 */
|
||||
export interface GrantMobileResourceReq extends ReqId {
|
||||
/** 授权移动端资源信息 */
|
||||
GrantInfoList: RelationRoleMobileResource[];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* @description 模块管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqPage } from "@/api/interface";
|
||||
|
||||
/**
|
||||
* @Description: 模块管理接口
|
||||
* @Author: superAdmin
|
||||
* @Date: 2025-06-25 14:37:52
|
||||
*/
|
||||
export namespace MobileModule {
|
||||
/**模块分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
/** 名称 */
|
||||
title: string;
|
||||
/** 可用状态 */
|
||||
status: string;
|
||||
}
|
||||
|
||||
/** 模块信息 */
|
||||
export interface MobileModuleInfo {
|
||||
/** 父id */
|
||||
parentId: number;
|
||||
/** 名称 */
|
||||
title: string;
|
||||
/** 别名 */
|
||||
name: string;
|
||||
/** 描述 */
|
||||
description: string;
|
||||
/** 编码 */
|
||||
code: string;
|
||||
/** 分类 */
|
||||
category: string;
|
||||
/** 所属模块Id */
|
||||
module: number | string;
|
||||
/** 菜单类型 */
|
||||
menuType: string;
|
||||
/** 路径 */
|
||||
path: string;
|
||||
/** 图标 */
|
||||
icon: string;
|
||||
/** 颜色 */
|
||||
color: string;
|
||||
/** 排序码 */
|
||||
sortCode: number;
|
||||
/** 规则类型 */
|
||||
regType: string;
|
||||
/** 可用状态 */
|
||||
status: string;
|
||||
/** Id */
|
||||
id: number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* @description 系统配置请求接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { SysConfigTypeEnum, TenantEnum } from "@/enums";
|
||||
|
||||
/**
|
||||
* @Description: 系统配置请求接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace SysConfig {
|
||||
/** 系统配置返回 */
|
||||
export interface ConfigInfo {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 分类 */
|
||||
category: SysConfigTypeEnum;
|
||||
/** key */
|
||||
configKey: string;
|
||||
/** value */
|
||||
configValue: string;
|
||||
/** 描述 */
|
||||
remark?: string;
|
||||
/** 排序 */
|
||||
sortCode?: number;
|
||||
}
|
||||
|
||||
/** 工作台 */
|
||||
export interface WorkBenchData {
|
||||
/** 快捷方式 */
|
||||
shortcut: number[] | string[];
|
||||
}
|
||||
|
||||
// 超链接接口
|
||||
export interface FooterLinkProps {
|
||||
/** 标题 */
|
||||
name: string;
|
||||
/** 地址 */
|
||||
url: string;
|
||||
/** 排序 */
|
||||
sortCode: number;
|
||||
}
|
||||
|
||||
/** 系统配置接口 */
|
||||
export interface SysBaseConfig {
|
||||
/** 系统logo */
|
||||
SYS_LOGO: string;
|
||||
/** 系统ICO文件 */
|
||||
SYS_ICO?: string;
|
||||
/** 系统名称 */
|
||||
SYS_NAME: string;
|
||||
/** 系统版本 */
|
||||
SYS_VERSION: string;
|
||||
/** 系统版权 */
|
||||
SYS_COPYRIGHT: string;
|
||||
/** 系统版权链接地址 */
|
||||
SYS_COPYRIGHT_URL: string;
|
||||
/** 系统默认工作台数据 */
|
||||
SYS_DEFAULT_WORKBENCH_DATA?: WorkBenchData;
|
||||
/** 网站状态 */
|
||||
SYS_WEB_STATUS?: string;
|
||||
/** 网站关闭提示 */
|
||||
SYS_WEB_CLOSE_PROMPT?: string;
|
||||
/** 多租户选项 */
|
||||
SYS_TENANT_OPTIONS: TenantEnum;
|
||||
/** 底部超链接 */
|
||||
SYS_FOOTER_LINKS: FooterLinkProps[];
|
||||
}
|
||||
|
||||
/** 登录配置接口 */
|
||||
export interface LoginPolicyConfig {
|
||||
/** 单用户登录开关 */
|
||||
LOGIN_SINGLE_OPEN: string;
|
||||
/** 登录验证码开关 */
|
||||
LOGIN_CAPTCHA_OPEN: string;
|
||||
/** 登录验证码类型 */
|
||||
LOGIN_CAPTCHA_TYPE: string;
|
||||
/** 登录错误次数 */
|
||||
LOGIN_ERROR_COUNT: number;
|
||||
/** 登录重置时间 */
|
||||
LOGIN_ERROR_RESET_TIME: number;
|
||||
/** 登录错误锁定时间 */
|
||||
LOGIN_ERROR_LOCK: number;
|
||||
}
|
||||
|
||||
/** 密码配置接口 */
|
||||
export interface PwdPolicyConfig {
|
||||
/** 默认密码 */
|
||||
PWD_DEFAULT_PASSWORD: string;
|
||||
/** 密码定期提醒更新 */
|
||||
PWD_REMIND: string;
|
||||
/** 密码提醒时间 */
|
||||
PWD_REMIND_DAY: number;
|
||||
/** 修改初始密码提醒 */
|
||||
PWD_UPDATE_DEFAULT: string;
|
||||
/** 密码最小长度 */
|
||||
PWD_MIN_LENGTH: number;
|
||||
/** 包含数字 */
|
||||
PWD_CONTAIN_NUM: string;
|
||||
/** 包含小写字母 */
|
||||
PWD_CONTAIN_LOWER: string;
|
||||
/** 包含大写字母 */
|
||||
PWD_CONTAIN_UPPER: string;
|
||||
/** 包含特殊字符 */
|
||||
PWD_CONTAIN_CHARACTER: string;
|
||||
}
|
||||
|
||||
/** mqtt配置接口 */
|
||||
export interface MqttPolicyConfig {
|
||||
/** MQTT服务端地址 */
|
||||
MQTT_PARAM_URL: string;
|
||||
/** MQTT用户名 */
|
||||
MQTT_PARAM_USERNAME: string;
|
||||
/** MQTT密码 */
|
||||
MQTT_PARAM_PASSWORD: string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @description 字典接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqPage } from "@/api";
|
||||
/**
|
||||
* @Description: 字典接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace SysDict {
|
||||
/* 字典信息 */
|
||||
export interface DictTree {
|
||||
/** 字典值 */
|
||||
dictValue: string;
|
||||
/** 字典标签 */
|
||||
dictLabel: string;
|
||||
/** 状态 */
|
||||
status: string;
|
||||
/** 子集 */
|
||||
children: DictTree[];
|
||||
}
|
||||
|
||||
/** 字典分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
/** 所属模块名称 */
|
||||
parentId: number | string;
|
||||
/** 字典分类 */
|
||||
category: string;
|
||||
}
|
||||
|
||||
/** 字典信息 */
|
||||
export interface DictInfo extends DictTree {
|
||||
/** 字典id */
|
||||
id: number | string;
|
||||
/** 父Id */
|
||||
parentId: number | string;
|
||||
/** 字典分类 */
|
||||
category: string;
|
||||
/** 字典排序 */
|
||||
sortCode: number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./config";
|
||||
export * from "./dict";
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./org";
|
||||
export * from "./user";
|
||||
export * from "./position";
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* @description 组织管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { SysUser } from "@/api";
|
||||
import { ReqPage } from "@/api";
|
||||
/**
|
||||
* @Description: 组织管理接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace SysOrg {
|
||||
/** 组织分页查询 */
|
||||
export interface Page extends ReqPage {}
|
||||
|
||||
/** 组织树查询 */
|
||||
export interface ReqTree {
|
||||
parentId?: number | string;
|
||||
}
|
||||
|
||||
/** 组织信息 */
|
||||
export interface SysOrgInfo {
|
||||
/** 组织id */
|
||||
id: number | string;
|
||||
/** 父ID */
|
||||
parentId: number | string;
|
||||
/** 主管Id */
|
||||
directorId: number | string | null;
|
||||
/** 组织名称 */
|
||||
name: string;
|
||||
/** 组织全称 */
|
||||
names: string;
|
||||
/** 组织编码 */
|
||||
code: string;
|
||||
/** 组织分类 */
|
||||
category: string;
|
||||
/** 状态 */
|
||||
status: string;
|
||||
/** 排序码 */
|
||||
sortCode: number;
|
||||
/** 主管信息 */
|
||||
directorInfo: SysUser.SysUserInfo | null;
|
||||
}
|
||||
/** 组织树 */
|
||||
export interface SysOrgTree {
|
||||
/** 组织id */
|
||||
id: number | string;
|
||||
/** 父ID */
|
||||
parentId: number | string;
|
||||
/** 组织名称 */
|
||||
name: string;
|
||||
/** 子集 */
|
||||
children: SysOrgTree[];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* @description 职位管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqPage } from "@/api";
|
||||
import { CascaderOption } from "element-plus";
|
||||
/**
|
||||
* @Description: 职位管理接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace SysPosition {
|
||||
/** 职位分页查询 */
|
||||
export interface Page extends ReqPage {}
|
||||
|
||||
/** 职位信息 */
|
||||
export interface SysPositionInfo {
|
||||
/** 职位id */
|
||||
id: number | string;
|
||||
/** 职位ID */
|
||||
orgId: number | string;
|
||||
/** 职位名称 */
|
||||
name: string;
|
||||
/** 职位编码 */
|
||||
code: string;
|
||||
/** 职位分类 */
|
||||
category: string;
|
||||
/** 状态 */
|
||||
status: string;
|
||||
/** 排序码 */
|
||||
sortCode: number;
|
||||
}
|
||||
/** 职位树 */
|
||||
export interface SysPositionTree {
|
||||
/** id */
|
||||
id: number | string;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/** 是否是职位 */
|
||||
isPosition: boolean;
|
||||
/** 子集 */
|
||||
children: SysPositionTree[];
|
||||
}
|
||||
|
||||
/** 职位选择器 */
|
||||
export interface SysPositionSelector extends CascaderOption {
|
||||
/** id */
|
||||
id: string | number;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/** 组织Id */
|
||||
orgId: number | string;
|
||||
/** 子集 */
|
||||
children: SysPositionSelector[];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* @description 用户管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqId, ReqPage } from "@/api";
|
||||
/**
|
||||
* @Description: 用户管理接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
export namespace SysUser {
|
||||
/** 用户分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
/** 用户状态 */
|
||||
status?: string;
|
||||
}
|
||||
|
||||
/** 用户信息 */
|
||||
export interface SysUserInfo {
|
||||
id: number | string;
|
||||
/** 头像 */
|
||||
avatar?: string;
|
||||
/** 签名 */
|
||||
signature?: string;
|
||||
/** 账号 */
|
||||
account: string;
|
||||
/** 姓名 */
|
||||
name?: string;
|
||||
/** 昵称 */
|
||||
nickname?: string;
|
||||
/** 性别 */
|
||||
gender?: string;
|
||||
/** 出生日期 */
|
||||
birthday?: string;
|
||||
/** 民族 */
|
||||
nation?: string;
|
||||
/** 籍贯 */
|
||||
nativePlace?: string;
|
||||
/** 家庭住址 */
|
||||
homeAddress?: string;
|
||||
/** 通信地址 */
|
||||
mailingAddress?: string;
|
||||
/** 证件类型 */
|
||||
idCardType?: string;
|
||||
/** 证件号码 */
|
||||
idCardNumber?: string;
|
||||
/** 文化程度 */
|
||||
cultureLevel?: string;
|
||||
/** 政治面貌 */
|
||||
politicalOutlook?: string;
|
||||
/** 毕业院校 */
|
||||
college?: string;
|
||||
/** 学历 */
|
||||
education?: string;
|
||||
/** 学制 */
|
||||
eduLength?: string;
|
||||
/** 学位 */
|
||||
degree?: string;
|
||||
/** 手机 */
|
||||
phone?: string;
|
||||
/** 邮箱 */
|
||||
email?: string;
|
||||
/** 家庭电话 */
|
||||
homeTel?: string;
|
||||
/** 办公电话 */
|
||||
officeTel?: string;
|
||||
/** 紧急联系人 */
|
||||
emergencyContact?: string;
|
||||
/** 紧急联系人电话 */
|
||||
emergencyPhone?: string;
|
||||
/** 紧急联系人地址 */
|
||||
emergencyAddress?: string;
|
||||
/** 员工编号 */
|
||||
empNo?: string;
|
||||
/** 入职日期 */
|
||||
entryDate?: string;
|
||||
/** 机构id */
|
||||
orgId: number;
|
||||
/** 职位id */
|
||||
positionId: number;
|
||||
/** 职级 */
|
||||
positionLevel?: string;
|
||||
/** 主管id */
|
||||
directorId?: number | string | null;
|
||||
/** 主管id */
|
||||
orgAndPosIdList: number[] | string[];
|
||||
/** 主管id */
|
||||
directorInfo?: SysUser.SysUserInfo | null;
|
||||
/** 用户状态 */
|
||||
status?: string;
|
||||
/** 排序码 */
|
||||
sortCode?: number;
|
||||
/** 默认模块 */
|
||||
defaultModule?: number | string;
|
||||
/** 机构信息 */
|
||||
orgName?: string;
|
||||
/** 机构信息全称 */
|
||||
orgNames?: string;
|
||||
}
|
||||
|
||||
/** 用户分页查询 */
|
||||
export interface UserSelector extends ReqPage {
|
||||
/** 用户账号 */
|
||||
account?: string;
|
||||
/** 组织id */
|
||||
orgId: string | number;
|
||||
}
|
||||
|
||||
/** 用户授权角色请求参数 */
|
||||
export interface GrantRoleReq extends ReqId {
|
||||
/** 授权资源信息 */
|
||||
roleIdList: number[] | string[];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export namespace Upload {
|
||||
// 文件上传返回
|
||||
export interface ResFileUrl {
|
||||
fileUrl: string; // 文件地址
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* @description 用户个人中心接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
import { ReqId } from "@/api/interface";
|
||||
/**
|
||||
* @Description: 用户个人中心接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
|
||||
*/
|
||||
export namespace UserCenter {
|
||||
/** 设置默认模块 */
|
||||
export interface ResModuleDefault extends ReqId {
|
||||
/** 是否默认 */
|
||||
ifDefault: boolean;
|
||||
}
|
||||
|
||||
/** 修改用户密码 */
|
||||
export interface ReqUpdatePassword {
|
||||
/** 旧密码 */
|
||||
password: string;
|
||||
/** 新密码 */
|
||||
newPassword: string;
|
||||
}
|
||||
|
||||
/** 更新快捷方式 */
|
||||
export interface ResUpdateUserWorkbench {
|
||||
/** 快捷方式 */
|
||||
WorkbenchData: string;
|
||||
}
|
||||
|
||||
/** 未读消息数量 */
|
||||
export interface ResUnReadCount {
|
||||
/** 分类 */
|
||||
category: string;
|
||||
/** 数量 */
|
||||
unReadCount: number;
|
||||
}
|
||||
/** 消息详情 */
|
||||
export interface ResSysMessageDetail {
|
||||
/** 消息id */
|
||||
id: number | string;
|
||||
/** 消息类型 */
|
||||
category: string;
|
||||
/** 消息标题 */
|
||||
subject: string;
|
||||
/** 消息内容 */
|
||||
content: string;
|
||||
/** 是否已读 */
|
||||
read: boolean;
|
||||
/**发送时间 */
|
||||
sendTime: string;
|
||||
/**发送时间格式化 */
|
||||
sendTimeFormat: string;
|
||||
}
|
||||
|
||||
export interface ReqMyMessagePage {
|
||||
category?: string; //消息分类
|
||||
searchKey?: string; //关键字
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @description 药材管理接口
|
||||
*/
|
||||
|
||||
import { moduleRequest } from "@/api/request";
|
||||
import { ResPage } from "@/api/interface";
|
||||
|
||||
// 请求前缀,根据后端路由配置
|
||||
const http = moduleRequest("/biz/weibingju/medicinal/");
|
||||
|
||||
/**
|
||||
* 药材接口
|
||||
*/
|
||||
const medicinalApi = {
|
||||
/** 获取药材分页列表 */
|
||||
page(params: { name?: string; pageNum?: number; pageSize?: number }) {
|
||||
return http.get<ResPage<MedicinalInfo>>("list", params);
|
||||
},
|
||||
|
||||
/** 获取药材下拉字典 */
|
||||
getDictList() {
|
||||
return http.get<MedicinalInfo[]>("getmedicinaldictlist");
|
||||
},
|
||||
|
||||
/** 获取药材消耗记录 */
|
||||
getConsumptionRecords(id: number) {
|
||||
return http.get<any>(`${id}/consumption-records`);
|
||||
},
|
||||
|
||||
/** 获取药材添加记录 */
|
||||
getAdditionRecords(id: number, params?: { pageNum?: number; pageSize?: number }) {
|
||||
// 注意:这里把 id 放到路径里,分页走 params
|
||||
return http.get<any>(`/${id}/addition-records`, { params });
|
||||
},
|
||||
|
||||
/** 添加药材 */
|
||||
addMedicinal(params: AddMedicinalInput) {
|
||||
return http.post("add", params);
|
||||
},
|
||||
|
||||
/** 修改药材添加记录 */
|
||||
updateAdditionRecord(id: number, params: UpdateMedicinalAddLogInput) {
|
||||
return http.put(`addition-records/${id}`, params);
|
||||
},
|
||||
|
||||
/** 删除药材添加记录 */
|
||||
deleteAdditionRecord(id: number) {
|
||||
return http.delete(`addition-records/${id}`);
|
||||
}
|
||||
};
|
||||
|
||||
/** 药材信息 */
|
||||
export interface MedicinalInfo {
|
||||
id?: number;
|
||||
name: string;
|
||||
unit?: string;
|
||||
stock?: number;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/** 添加药材 */
|
||||
export interface AddMedicinalInput {
|
||||
medicinalTypeId: number;
|
||||
addWeight: number;
|
||||
unitPrice: number;
|
||||
medicinalName: string;
|
||||
}
|
||||
|
||||
/** 修改添加记录 */
|
||||
export interface UpdateMedicinalAddLogInput {
|
||||
addWeight: number;
|
||||
unitPrice: number;
|
||||
}
|
||||
|
||||
export { medicinalApi };
|
||||
@@ -0,0 +1,42 @@
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/biz/weibingju/prescription/");
|
||||
|
||||
const prescriptionApi = {
|
||||
/** 获取处方列表(分页) */
|
||||
getList(params: any) {
|
||||
return http.get<any>("list", params);
|
||||
},
|
||||
|
||||
/** 获取处方详情 */
|
||||
getDetail(params: any) {
|
||||
return http.get<any>("detail", params);
|
||||
},
|
||||
|
||||
/** 保存处方(新增/编辑) */
|
||||
save(params: any) {
|
||||
const url = params.id ? "edit" : "add";
|
||||
return http.post<any>(url, params);
|
||||
},
|
||||
|
||||
/** 获取人员列表 */
|
||||
getPersonList(params: any) {
|
||||
return http.get<any>("persons", params, { loading: false });
|
||||
},
|
||||
|
||||
/** 新增人员 */
|
||||
addPerson(params: any) {
|
||||
return http.post<any>("addpersons", params);
|
||||
},
|
||||
|
||||
/** 获取亲属关系列表 */
|
||||
getRelationTypes() {
|
||||
return http.get<any>("relation-types", {}, { loading: false });
|
||||
},
|
||||
|
||||
/** 搜索药材 */
|
||||
searchMedicinals(params: any) {
|
||||
return http.get<any>("medicinals/search", params, { loading: false });
|
||||
}
|
||||
};
|
||||
|
||||
export { prescriptionApi };
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
export * from "./organization";
|
||||
export * from "./ops";
|
||||
export * from "./WeiBingJu/medicinal";
|
||||
export * from "./WeiBingJu/prescription";
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @description 接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
export * from "./test";
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @description 测试管理Api
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { ReqId, ResPage, GenTest, moduleRequest } from "@/api";
|
||||
const http = moduleRequest("/biz/ops/test/");
|
||||
|
||||
/**
|
||||
* @Description: 测试管理
|
||||
* @Author: superAdmin
|
||||
* @Date: 2025-03-20 14:12:55
|
||||
*/
|
||||
const genTestApi = {
|
||||
/** 获取测试分页 */
|
||||
page(params: GenTest.Page) {
|
||||
return http.get<ResPage<GenTest.GenTestInfo>>("page", params);
|
||||
},
|
||||
/** 获取测试详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<GenTest.GenTestInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除测试 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
}
|
||||
};
|
||||
|
||||
export { genTestApi };
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./org";
|
||||
export * from "./user";
|
||||
export * from "./position";
|
||||
export * from "./role";
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @description 机构管理
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { ReqId, ResPage, SysOrg } from "@/api";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/biz/organization/org/");
|
||||
|
||||
/**
|
||||
* @Description: 机构管理
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const bizOrgApi = {
|
||||
/** 获取机构分页 */
|
||||
page(params: SysOrg.Page) {
|
||||
return http.get<ResPage<SysOrg.SysOrgInfo>>("page", params);
|
||||
},
|
||||
/** 获取机构树 */
|
||||
tree() {
|
||||
return http.get<SysOrg.SysOrgTree[]>("tree");
|
||||
},
|
||||
/** 获取机构详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<SysOrg.SysOrgInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除机构 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
/** 复制机构 */
|
||||
copy(params = {}) {
|
||||
return http.post("copy", params);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @Description: 机构管理按钮权限码
|
||||
* @Author: huguodong
|
||||
* @Date: 2024-02-20 09:51:15
|
||||
*/
|
||||
const bizOrgButtonCode = {
|
||||
/** 新增机构 */
|
||||
add: "bizOrgAdd",
|
||||
/** 编辑机构 */
|
||||
edit: "bizOrgEdit",
|
||||
/** 删除机构 */
|
||||
delete: "bizOrgDelete",
|
||||
/** 批量删除机构 */
|
||||
batchDelete: "bizOrgBatchDelete",
|
||||
/** 复制机构 */
|
||||
copy: "bizOrgCopy"
|
||||
};
|
||||
|
||||
export { bizOrgApi, bizOrgButtonCode };
|
||||
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @description 岗位管理
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { ReqId, ResPage, SysPosition } from "@/api";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/biz/organization/position/");
|
||||
|
||||
/**
|
||||
* @Description: 岗位管理
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const bizPositionApi = {
|
||||
/** 获取岗位分页 */
|
||||
page(params: SysPosition.Page) {
|
||||
return http.get<ResPage<SysPosition.SysPositionInfo>>("page", params);
|
||||
},
|
||||
/** 获取岗位树 */
|
||||
tree() {
|
||||
return http.get<SysPosition.SysPositionTree[]>("tree", {}, { loading: false });
|
||||
},
|
||||
/** 获取岗位详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<SysPosition.SysPositionInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除岗位 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
/** 岗位选择器 */
|
||||
selector() {
|
||||
return http.get<SysPosition.SysPositionSelector[]>("selector", {}, { loading: false });
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @Description: 岗位管理按钮权限码
|
||||
* @Author: huguodong
|
||||
* @Date: 2024-02-20 09:51:15
|
||||
*/
|
||||
const bizPositionButtonCode = {
|
||||
/** 新增岗位 */
|
||||
add: "bizPositionAdd",
|
||||
/** 编辑岗位 */
|
||||
edit: "bizPositionEdit",
|
||||
/** 删除岗位 */
|
||||
delete: "bizPositionDelete",
|
||||
/** 批量删除岗位 */
|
||||
batchDelete: "bizPositionBatchDelete"
|
||||
};
|
||||
|
||||
export { bizPositionApi, bizPositionButtonCode };
|
||||
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* @description 角色管理
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { ReqId, ResPage, SysRole, SysUser } from "@/api";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/biz/organization/role/");
|
||||
|
||||
/**
|
||||
* @Description: 角色管理
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const bizRoleApi = {
|
||||
/** 获取角色分页 */
|
||||
page(params: SysRole.Page) {
|
||||
return http.get<ResPage<SysRole.SysRoleInfo>>("page", params);
|
||||
},
|
||||
/** 获取角色树 */
|
||||
tree() {
|
||||
return http.get<SysRole.SysRoleTree[]>("tree", {}, { loading: false });
|
||||
},
|
||||
/** 获取角色详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<SysRole.SysRoleInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除角色 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
/** 获取资源授权树 */
|
||||
resourceTreeSelector() {
|
||||
return http.get<SysRole.ResTreeSelector[]>("resourceTreeSelector", {}, { loading: false });
|
||||
},
|
||||
/** 获取权限授权树 */
|
||||
permissionTreeSelector(params: ReqId) {
|
||||
return http.get<string[]>("permissionTreeSelector", params, { loading: false });
|
||||
},
|
||||
/** 获取角色拥有资源 */
|
||||
ownResource(params: ReqId) {
|
||||
return http.get<SysRole.RoleOwnResource>("ownResource", params, { loading: false });
|
||||
},
|
||||
/** 给角色授权资源 */
|
||||
grantResource(params: SysRole.GrantResourceReq) {
|
||||
return http.post("grantResource", params);
|
||||
},
|
||||
/** 获取角色拥有权限 */
|
||||
ownPermission(params: ReqId) {
|
||||
return http.get<SysRole.RoleOwnPermission>("ownPermission", params, { loading: false });
|
||||
},
|
||||
/** 给角色授权权限 */
|
||||
grantPermission(params: SysRole.GrantPermissionReq) {
|
||||
return http.post("grantPermission", params);
|
||||
},
|
||||
/** 获取角色下的用户 */
|
||||
ownUser(params: ReqId) {
|
||||
return http.get<SysUser.SysUserInfo[]>("ownUser", params, { loading: false });
|
||||
},
|
||||
/** 给角色授权用户 */
|
||||
grantUser(params: SysRole.GrantUserReq) {
|
||||
return http.post("grantUser", params);
|
||||
},
|
||||
/** 获取角色选择器 */
|
||||
roleSelector(params: SysRole.RoleSelectorReq) {
|
||||
return http.get<SysRole.SysRoleInfo[]>("roleSelector", params, { loading: false });
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @Description: 角色管理按钮权限码
|
||||
* @Author: huguodong
|
||||
* @Date: 2024-02-20 09:51:15
|
||||
*/
|
||||
const bizRoleButtonCode = {
|
||||
/** 新增角色 */
|
||||
add: "bizRoleAdd",
|
||||
/** 编辑角色 */
|
||||
edit: "bizRoleEdit",
|
||||
/** 删除角色 */
|
||||
delete: "bizRoleDelete",
|
||||
/** 批量删除角色 */
|
||||
batchDelete: "bizRoleBatchDelete",
|
||||
/** 授权资源 */
|
||||
grantResource: "bizRoleGrantResource",
|
||||
/** 授权用户 */
|
||||
grantUser: "bizRoleGrantUser"
|
||||
};
|
||||
export { bizRoleApi, bizRoleButtonCode };
|
||||
@@ -0,0 +1,107 @@
|
||||
import { CommonStatusEnum } from "@/enums";
|
||||
/**
|
||||
* @description 人员管理
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { ReqId, ResPage, SysRole, SysUser } from "@/api";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/biz/organization/user/");
|
||||
|
||||
/**
|
||||
* @Description: 人员管理
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const bizUserApi = {
|
||||
/** 人员分页 */
|
||||
page(params: SysUser.Page) {
|
||||
return http.get<ResPage<SysUser.SysUserInfo>>("page", params);
|
||||
},
|
||||
/** 人员选择器 */
|
||||
selector(params: any) {
|
||||
return http.get<ResPage<SysUser.SysUserInfo>>("selector", params);
|
||||
},
|
||||
/** 获取人员详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<SysUser.SysUserInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除人员 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
/** 修改人员状态 */
|
||||
updateStatus(params: ReqId, operation: CommonStatusEnum) {
|
||||
return http.post(operation === CommonStatusEnum.DISABLE ? "disableUser" : "enableUser", params);
|
||||
},
|
||||
/** 重置人员密码 */
|
||||
resetPassword(params: ReqId) {
|
||||
return http.post("resetPassword", params);
|
||||
},
|
||||
/** 获取人员拥有角色 */
|
||||
ownRole(params: ReqId) {
|
||||
return http.get<SysRole.SysRoleInfo[]>("ownRole", params);
|
||||
},
|
||||
/** 给人员授权角色 */
|
||||
grantRole(params: SysUser.GrantRoleReq) {
|
||||
return http.post("grantRole", params);
|
||||
},
|
||||
// 获取权限授权树
|
||||
permissionTreeSelector(params: ReqId) {
|
||||
return http.get<string[]>("permissionTreeSelector", params, { loading: false });
|
||||
},
|
||||
// 获取人员拥有资源
|
||||
ownResource(params: ReqId) {
|
||||
return http.get<SysRole.RoleOwnResource>("ownResource", params, { loading: false });
|
||||
},
|
||||
/** 给人员授权资源 */
|
||||
grantResource(params: SysRole.GrantResourceReq) {
|
||||
return http.post("grantResource", params);
|
||||
},
|
||||
/** 获取人员拥有权限 */
|
||||
ownPermission(params: ReqId) {
|
||||
return http.get<SysRole.RoleOwnPermission>("ownPermission", params, { loading: false });
|
||||
},
|
||||
/** 获取人员拥有权限 */
|
||||
grantPermission(params: SysRole.GrantPermissionReq) {
|
||||
return http.post("grantPermission", params);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @Description: 人员管理按钮权限码
|
||||
* @Author: huguodong
|
||||
* @Date: 2024-02-20 09:51:15
|
||||
*/
|
||||
const bizUserButtonCode = {
|
||||
/** 新增人员 */
|
||||
add: "bizUserAdd",
|
||||
/** 编辑人员 */
|
||||
edit: "bizUserEdit",
|
||||
/** 删除人员 */
|
||||
delete: "bizUserDelete",
|
||||
/** 批量删除人员 */
|
||||
batchDelete: "bizUserBatchDelete",
|
||||
/** 授权角色 */
|
||||
grantRole: "bizUserGrantRole",
|
||||
/** 重置密码 */
|
||||
pwdReset: "bizUserPwdReset",
|
||||
/** 启用禁用 */
|
||||
UpdateStatus: "bizUserUpdateStatus"
|
||||
};
|
||||
|
||||
export { bizUserApi, bizUserButtonCode };
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
export * from "./sys";
|
||||
export * from "./biz";
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./visLog";
|
||||
export * from "./opLog";
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @description 操作日志
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { ResPage, OpLog, ReqId } from "@/api/interface";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/sys/audit/logOperate/");
|
||||
|
||||
/**
|
||||
* @Description: 操作日志
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const opLogApi = {
|
||||
/** 获取操作日志分页 */
|
||||
page(params: OpLog.Page) {
|
||||
return http.get<ResPage<OpLog.OpLogInfo>>("page", params);
|
||||
},
|
||||
/** 获取操作日志柱状图数据 */
|
||||
columnChart() {
|
||||
return http.get<OpLog.ColumnChart[]>("columnChartData", {}, { loading: false });
|
||||
},
|
||||
/** 获取操作日志饼状图数据 */
|
||||
pieChart() {
|
||||
return http.get<OpLog.PineChart[]>("pieChartData", {}, { loading: false });
|
||||
},
|
||||
/** 获取操作日志详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<OpLog.OpLogInfo>("detail", params, { loading: false });
|
||||
},
|
||||
/** 清空操作日志 */
|
||||
delete(category: string) {
|
||||
return http.post("delete", { category });
|
||||
}
|
||||
};
|
||||
|
||||
export { opLogApi };
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @description 访问日志
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { ResPage, VisLog } from "@/api/interface";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/sys/audit/logVisit/");
|
||||
|
||||
/**
|
||||
* @Description: 访问日志
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const visLogApi = {
|
||||
/** 获取访问日志分页 */
|
||||
page(params: VisLog.Page) {
|
||||
return http.get<ResPage<VisLog.VisLogInfo>>("page", params);
|
||||
},
|
||||
/** 获取访问日志折线图数据 */
|
||||
lineChart() {
|
||||
return http.get<VisLog.LineChart[]>("lineChartData", {}, { loading: false });
|
||||
},
|
||||
/** 获取访问日志饼状图数据 */
|
||||
pieChart() {
|
||||
return http.get<VisLog.PineChart[]>("pieChartData", {}, { loading: false });
|
||||
},
|
||||
/** 清空访问日志 */
|
||||
delete(category: string) {
|
||||
return http.post("delete", { category });
|
||||
}
|
||||
};
|
||||
|
||||
export { visLogApi };
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./login";
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @description 登录模块接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
import { Login } from "@/api/interface";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/sys/auth/b/");
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const loginApi = {
|
||||
/** 用户登录 */
|
||||
login(params: Login.LoginForm) {
|
||||
return http.post<Login.Login>("login", params, { loading: false }); // 正常 post json 请求 = application/json
|
||||
},
|
||||
/** 获取验证码 */
|
||||
picCaptcha() {
|
||||
return http.get<Login.ReqValidCode>("getPicCaptcha", {}, { loading: false });
|
||||
},
|
||||
/** 用户退出登录 */
|
||||
logout(params: Login.Logout) {
|
||||
return http.post("logout", params);
|
||||
},
|
||||
/** 获取用户信息 */
|
||||
getLoginUser() {
|
||||
return http.get<Login.LoginUserInfo>("getLoginUser", {}, { loading: false });
|
||||
},
|
||||
/** 获取短信验证码 */
|
||||
getPhoneValidCode(params: Login.ReqPhoneValidCode) {
|
||||
return http.get<string>("getPhoneValidCode", params, { loading: false });
|
||||
},
|
||||
/** 手机号登录 */
|
||||
loginByPhone(params: Login.PhoneLoginForm) {
|
||||
return http.post<Login.Login>("loginByPhone", params, { loading: false });
|
||||
}
|
||||
};
|
||||
|
||||
export { loginApi };
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @description 通用接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 通用接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
import { SysConfig, SysOrg } from "@/api/interface";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/sys/");
|
||||
|
||||
/**
|
||||
* @Description: 通用接口
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
|
||||
*/
|
||||
const commonApi = {
|
||||
/** 获取系统配置 */
|
||||
sysInfo() {
|
||||
return http.get<SysConfig.ConfigInfo[]>("sysInfo", {}, { loading: false, cancel: false });
|
||||
},
|
||||
/** 获取登录策略 */
|
||||
loginPolicy() {
|
||||
return http.get<SysConfig.ConfigInfo[]>("loginPolicy", {}, { loading: false, cancel: false });
|
||||
},
|
||||
/** 获取租户列表 */
|
||||
tenantList() {
|
||||
return http.get<SysOrg.SysOrgInfo[]>("tenantList", {}, { loading: false, cancel: false });
|
||||
}
|
||||
};
|
||||
|
||||
export { commonApi };
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { moduleRequest } from "@/api/request";
|
||||
import { ReqId, ResPage, GenCode } from "@/api";
|
||||
const http = moduleRequest("/sys/curd/gen/basic");
|
||||
const genBasicApi = {
|
||||
/** 获取代码生成器基础分页 */
|
||||
page(params: any) {
|
||||
return http.get<ResPage<GenCode.GenBasic>>("page", params);
|
||||
},
|
||||
/** 获取所有表信息 */
|
||||
tables(params: any) {
|
||||
return http.get<GenCode.ResSqlSugarTableInfo[]>("tables", params);
|
||||
},
|
||||
/** 获取项目所有程序集 */
|
||||
assemblies() {
|
||||
return http.get<string[]>("assemblies");
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post<GenCode.GenBasic>(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除代码生成器基础 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
/** 代码生成预览 */
|
||||
previewGen(params: any) {
|
||||
return http.get<GenCode.ResGenBasePreview>("previewGen", params);
|
||||
},
|
||||
/** 执行代码生成(压缩包) */
|
||||
execGenZip(params: GenCode.ExecGen) {
|
||||
const options = {
|
||||
responseType: "blob"
|
||||
};
|
||||
return http.get<any>("execGenZip", params, options);
|
||||
},
|
||||
/** 执行代码生成(本地) */
|
||||
execGenPro(params: GenCode.ExecGen) {
|
||||
return http.post("execGenPro", params);
|
||||
}
|
||||
};
|
||||
|
||||
export { genBasicApi };
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @description 代码生成详细配置
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { moduleRequest } from "@/api/request";
|
||||
import { ReqId, ResPage, GenCode } from "@/api";
|
||||
const http = moduleRequest("/sys/curd/gen/config");
|
||||
const genConfigApi = {
|
||||
/** 查询代码生成详细配置列表 */
|
||||
list(params: any) {
|
||||
return http.get<ResPage<GenCode.GenConfig>>("list", params);
|
||||
},
|
||||
/** 编辑代码生成详细 */
|
||||
editBatch(params: ReqId[]) {
|
||||
return http.post("editBatch", params);
|
||||
}
|
||||
};
|
||||
export { genConfigApi };
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @description 在线开发
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
export * from "./genBasic";
|
||||
export * from "./genConfig";
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @description 基础工具
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
export * from "./message";
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @description 站内消息
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { moduleRequest } from "@/api/request";
|
||||
import { ReqId, ResPage, SysMessage } from "@/api";
|
||||
const http = moduleRequest("/sys/dev/message/");
|
||||
const messageApi = {
|
||||
/** 获取消息分页 */
|
||||
page(params: any) {
|
||||
return http.get<ResPage<SysMessage.SysMessageInfo>>("page", params);
|
||||
},
|
||||
/** 获取消息详情 */
|
||||
detail(params = {}) {
|
||||
return http.get<SysMessage.SysMessageInfo>("detail", params);
|
||||
},
|
||||
/** 获取已读未读详情 */
|
||||
readDetail(params = {}) {
|
||||
return http.get<SysMessage.receiverDetail[]>("readDetail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除单页 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
}
|
||||
};
|
||||
|
||||
export { messageApi };
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @description 即时通讯
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
export * from "./mqtt";
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @description mqtt 接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
import { Mqtt } from "@/api";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/mqtt/");
|
||||
const mqttApi = {
|
||||
/**
|
||||
* @description 获取mqtt配置
|
||||
* @returns
|
||||
*/
|
||||
getMqttParameter: () => http.get<Mqtt.MqttParameter>("getParameter", {}, { loading: false, cancel: false })
|
||||
};
|
||||
|
||||
export { mqttApi };
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
export * from "./auth";
|
||||
export * from "./userCenter";
|
||||
export * from "./limit";
|
||||
export * from "./ops";
|
||||
export * from "./audit";
|
||||
export * from "./organization";
|
||||
export * from "./upload";
|
||||
export * from "./common";
|
||||
export * from "./im";
|
||||
export * from "./dev";
|
||||
export * from "./curd";
|
||||
export * from "./mobile";
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @description 权限按钮
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { moduleRequest } from "@/api/request";
|
||||
import { ReqId, ResPage, Button } from "@/api/interface";
|
||||
const http = moduleRequest("/sys/limit/button/");
|
||||
|
||||
/**
|
||||
* @Description: 权限按钮
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const buttonApi = {
|
||||
/** 获取单页分页 */
|
||||
page(params: Button.Page) {
|
||||
return http.get<ResPage<Button.ButtonInfo>>("page", params);
|
||||
},
|
||||
/** 获取单页详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<Button.ButtonInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除按钮 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
/** 批量删除 */
|
||||
batch(params: Button.Batch) {
|
||||
return http.post("batch", params);
|
||||
}
|
||||
};
|
||||
|
||||
export { buttonApi };
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @description 资源管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
export * from "./spa";
|
||||
export * from "./module";
|
||||
export * from "./menu";
|
||||
export * from "./button";
|
||||
export * from "./role";
|
||||
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* @description 系统菜单
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { moduleRequest } from "@/api/request";
|
||||
import { ReqId, Spa, Menu } from "@/api/interface";
|
||||
const http = moduleRequest("/sys/limit/menu/");
|
||||
|
||||
/**
|
||||
* @Description: 系统菜单
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const menuApi = {
|
||||
/** 获取菜单树 */
|
||||
tree(params: Menu.Tree) {
|
||||
return http.get<Menu.MenuInfo[]>("tree", params);
|
||||
},
|
||||
/** 获取菜单树选择器 */
|
||||
menuTreeSelector(params: Menu.MenuTreeSelectorReq) {
|
||||
return http.get<Menu.MenuInfo[]>("menuTreeSelector", params);
|
||||
},
|
||||
/** 获取菜单详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<Spa.SpaInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除菜单 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
/** 修改模块菜单 */
|
||||
changeModule(params: { id: number | string; module: number | string }) {
|
||||
return http.post("changeModule", params);
|
||||
}
|
||||
};
|
||||
|
||||
export { menuApi };
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @description 应用模块
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { moduleRequest } from "@/api/request";
|
||||
import { ReqId, ResPage, Spa } from "@/api/interface";
|
||||
const http = moduleRequest("/sys/limit/module/");
|
||||
|
||||
/**
|
||||
* @Description: 应用模块
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const moduleApi = {
|
||||
/** 获取模块分页 */
|
||||
page(params: Spa.Page) {
|
||||
return http.get<ResPage<Spa.SpaInfo>>("page", params);
|
||||
},
|
||||
/** 获取模块详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<Spa.SpaInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除模块 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
/** 获取模块列表 */
|
||||
list() {
|
||||
return http.get<Spa.SpaInfo[]>("list");
|
||||
}
|
||||
};
|
||||
|
||||
export { moduleApi };
|
||||
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* @description 角色管理
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
import { ReqId, ResPage, SysRole, SysUser } from "@/api";
|
||||
import { moduleRequest } from "@/api/request";
|
||||
const http = moduleRequest("/sys/limit/role/");
|
||||
|
||||
/**
|
||||
* @Description: 角色管理
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const sysRoleApi = {
|
||||
/** 获取角色分页 */
|
||||
page(params: SysRole.Page) {
|
||||
return http.get<ResPage<SysRole.SysRoleInfo>>("page", params);
|
||||
},
|
||||
/** 获取角色树 */
|
||||
tree() {
|
||||
return http.get<SysRole.SysRoleTree[]>("tree", {}, { loading: false });
|
||||
},
|
||||
/** 获取角色详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<SysRole.SysRoleInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除角色 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
/** 获取资源授权树 */
|
||||
resourceTreeSelector() {
|
||||
return http.get<SysRole.ResTreeSelector[]>("resourceTreeSelector", {}, { loading: false });
|
||||
},
|
||||
/** 获取权限授权树 */
|
||||
permissionTreeSelector(params: ReqId) {
|
||||
return http.get<string[]>("permissionTreeSelector", params, { loading: false });
|
||||
},
|
||||
/** 获取角色拥有资源 */
|
||||
ownResource(params: ReqId) {
|
||||
return http.get<SysRole.RoleOwnResource>("ownResource", params, { loading: false });
|
||||
},
|
||||
/** 给角色授权资源 */
|
||||
grantResource(params: SysRole.GrantResourceReq) {
|
||||
return http.post("grantResource", params);
|
||||
},
|
||||
/** 获取角色拥有权限 */
|
||||
ownPermission(params: ReqId) {
|
||||
return http.get<SysRole.RoleOwnPermission>("ownPermission", params, { loading: false });
|
||||
},
|
||||
/** 给角色授权权限 */
|
||||
grantPermission(params: SysRole.GrantPermissionReq) {
|
||||
return http.post("grantPermission", params);
|
||||
},
|
||||
/** 获取角色下的用户 */
|
||||
ownUser(params: ReqId) {
|
||||
return http.get<SysUser.SysUserInfo[]>("ownUser", params, { loading: false });
|
||||
},
|
||||
/** 给角色授权用户 */
|
||||
grantUser(params: SysRole.GrantUserReq) {
|
||||
return http.post("grantUser", params);
|
||||
},
|
||||
/** 获取角色选择器 */
|
||||
roleSelector(params: SysRole.RoleSelectorReq) {
|
||||
return http.get<SysRole.SysRoleInfo[]>("roleSelector", params, { loading: false });
|
||||
}
|
||||
};
|
||||
|
||||
export { sysRoleApi };
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* @description 单页管理接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
import { moduleRequest } from "@/api/request";
|
||||
import { ReqId, ResPage, Spa } from "@/api/interface";
|
||||
const http = moduleRequest("/sys/limit/spa/");
|
||||
|
||||
/**
|
||||
* @Description: 单页管理
|
||||
* @Author: huguodong
|
||||
* @Date: 2023-12-15 15:34:54
|
||||
*/
|
||||
const spaApi = {
|
||||
/** 获取单页分页 */
|
||||
page(params: Spa.Page) {
|
||||
return http.get<ResPage<Spa.SpaInfo>>("page", params);
|
||||
},
|
||||
/** 获取单页详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<Spa.SpaInfo>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除单页 */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
}
|
||||
};
|
||||
|
||||
export { spaApi };
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user