├── utility
├── .gitkeep
├── err.go
└── utils.go
├── internal
├── dao
│ └── .gitkeep
├── logic
│ └── .gitkeep
├── model
│ ├── .gitkeep
│ ├── do
│ │ └── .gitkeep
│ └── entity
│ │ └── .gitkeep
├── service
│ ├── .gitkeep
│ ├── consts.go
│ ├── dao.go
│ └── model.go
├── consts
│ └── consts.go
├── packed
│ └── packed.go
└── app
│ └── system
│ ├── consts
│ ├── consts_context.go
│ ├── consts_user.go
│ ├── sys_config.go
│ ├── sys_dict_type.go
│ ├── consts_openapi.go
│ └── gtoken.go
│ ├── model
│ ├── context.go
│ ├── redis.go
│ ├── entity
│ │ ├── sys_role_dept.go
│ │ ├── sys_role_menu.go
│ │ ├── sys_user_post.go
│ │ ├── sys_user_role.go
│ │ ├── sys_job_log.go
│ │ ├── sys_dict_type.go
│ │ ├── sys_post.go
│ │ ├── sys_logininfor.go
│ │ ├── sys_config.go
│ │ ├── sys_notice.go
│ │ ├── sys_user_online.go
│ │ ├── sys_dept.go
│ │ ├── sys_dict_data.go
│ │ └── sys_job.go
│ ├── sys_dept.go
│ ├── do
│ │ ├── sys_role_dept.go
│ │ ├── sys_role_menu.go
│ │ ├── sys_user_post.go
│ │ ├── sys_user_role.go
│ │ ├── sys_job_log.go
│ │ ├── sys_dict_type.go
│ │ ├── sys_post.go
│ │ ├── sys_config.go
│ │ ├── sys_logininfor.go
│ │ ├── sys_notice.go
│ │ ├── sys_user_online.go
│ │ ├── sys_dept.go
│ │ ├── sys_dict_data.go
│ │ ├── sys_job.go
│ │ ├── sys_role.go
│ │ ├── sys_oper_log.go
│ │ ├── sys_user.go
│ │ ├── sys_menu.go
│ │ └── gen_table.go
│ ├── sys_role.go
│ ├── dict_type.go
│ └── sys_menu.go
│ ├── controller
│ ├── dict
│ │ └── dict.go
│ ├── post
│ │ └── post.go
│ └── sys_config
│ │ └── sys_config.go
│ ├── logic
│ ├── cache
│ │ └── cache.go
│ ├── sys_dict_data
│ │ └── sys_dict_data.go
│ ├── bizctx
│ │ └── bizctx.go
│ ├── session
│ │ └── session.go
│ └── logic.go
│ ├── service
│ ├── cache.go
│ ├── captcha.go
│ ├── middleware.go
│ ├── sys_dict_data.go
│ ├── session.go
│ ├── bizctx.go
│ ├── sys_user_post.go
│ ├── sys_role_dept.go
│ ├── sys_role_menu.go
│ ├── gen_table_column.go
│ ├── sys_user_role.go
│ ├── sys_post.go
│ └── sys_config.go
│ └── dao
│ ├── sys_job.go
│ ├── sys_dept.go
│ ├── sys_menu.go
│ ├── sys_post.go
│ ├── sys_role.go
│ ├── sys_user.go
│ ├── gen_table.go
│ ├── sys_config.go
│ ├── sys_notice.go
│ ├── sys_job_log.go
│ ├── sys_oper_log.go
│ ├── sys_dict_data.go
│ ├── sys_dict_type.go
│ ├── sys_role_dept.go
│ ├── sys_role_menu.go
│ ├── sys_user_post.go
│ ├── sys_user_role.go
│ ├── sys_logininfor.go
│ ├── sys_user_online.go
│ └── gen_table_column.go
├── resource
├── i18n
│ └── .gitkeep
├── template
│ └── .gitkeep
└── public
│ ├── html
│ └── .gitkeep
│ ├── plugin
│ └── .gitkeep
│ └── resource
│ ├── css
│ └── .gitkeep
│ ├── js
│ └── .gitkeep
│ └── image
│ └── .gitkeep
├── .gitattributes
├── RuoYi-Vue3
├── src
│ ├── store
│ │ ├── index.js
│ │ └── modules
│ │ │ ├── app.js
│ │ │ ├── dict.js
│ │ │ └── settings.js
│ ├── components
│ │ ├── ParentView
│ │ │ └── index.vue
│ │ ├── IconSelect
│ │ │ └── requireIcons.js
│ │ ├── RuoYi
│ │ │ ├── Doc
│ │ │ │ └── index.vue
│ │ │ └── Git
│ │ │ │ └── index.vue
│ │ ├── SvgIcon
│ │ │ ├── svgicon.js
│ │ │ └── index.vue
│ │ ├── Screenfull
│ │ │ └── index.vue
│ │ ├── iFrame
│ │ │ └── index.vue
│ │ ├── DictTag
│ │ │ └── index.vue
│ │ ├── Hamburger
│ │ │ └── index.vue
│ │ └── SizeSelect
│ │ │ └── index.vue
│ ├── assets
│ │ ├── logo
│ │ │ └── logo.png
│ │ ├── 401_images
│ │ │ └── 401.gif
│ │ ├── 404_images
│ │ │ ├── 404.png
│ │ │ └── 404_cloud.png
│ │ ├── images
│ │ │ ├── profile.jpg
│ │ │ └── login-background.jpg
│ │ ├── icons
│ │ │ └── svg
│ │ │ │ ├── chart.svg
│ │ │ │ ├── size.svg
│ │ │ │ ├── link.svg
│ │ │ │ ├── guide.svg
│ │ │ │ ├── money.svg
│ │ │ │ ├── email.svg
│ │ │ │ ├── drag.svg
│ │ │ │ ├── documentation.svg
│ │ │ │ ├── fullscreen.svg
│ │ │ │ ├── user.svg
│ │ │ │ ├── lock.svg
│ │ │ │ ├── excel.svg
│ │ │ │ ├── example.svg
│ │ │ │ ├── star.svg
│ │ │ │ ├── slider.svg
│ │ │ │ ├── table.svg
│ │ │ │ ├── search.svg
│ │ │ │ ├── education.svg
│ │ │ │ ├── tab.svg
│ │ │ │ ├── message.svg
│ │ │ │ ├── switch.svg
│ │ │ │ ├── theme.svg
│ │ │ │ ├── code.svg
│ │ │ │ ├── druid.svg
│ │ │ │ ├── peoples.svg
│ │ │ │ ├── input.svg
│ │ │ │ ├── server.svg
│ │ │ │ ├── textarea.svg
│ │ │ │ ├── time.svg
│ │ │ │ ├── edit.svg
│ │ │ │ ├── nested.svg
│ │ │ │ ├── row.svg
│ │ │ │ ├── monitor.svg
│ │ │ │ ├── tree-table.svg
│ │ │ │ ├── eye.svg
│ │ │ │ ├── build.svg
│ │ │ │ ├── clipboard.svg
│ │ │ │ ├── list.svg
│ │ │ │ ├── download.svg
│ │ │ │ ├── icon.svg
│ │ │ │ ├── international.svg
│ │ │ │ ├── question.svg
│ │ │ │ ├── wechat.svg
│ │ │ │ ├── skill.svg
│ │ │ │ ├── people.svg
│ │ │ │ ├── post.svg
│ │ │ │ ├── language.svg
│ │ │ │ ├── checkbox.svg
│ │ │ │ ├── eye-open.svg
│ │ │ │ ├── validCode.svg
│ │ │ │ ├── radio.svg
│ │ │ │ ├── select.svg
│ │ │ │ ├── upload.svg
│ │ │ │ ├── 404.svg
│ │ │ │ ├── zip.svg
│ │ │ │ ├── phone.svg
│ │ │ │ └── log.svg
│ │ └── styles
│ │ │ └── transition.scss
│ ├── utils
│ │ ├── errorCode.js
│ │ ├── auth.js
│ │ ├── dynamicTitle.js
│ │ ├── dict.js
│ │ ├── jsencrypt.js
│ │ ├── permission.js
│ │ └── theme.js
│ ├── api
│ │ ├── menu.js
│ │ ├── monitor
│ │ │ ├── server.js
│ │ │ ├── online.js
│ │ │ ├── operlog.js
│ │ │ ├── jobLog.js
│ │ │ ├── logininfor.js
│ │ │ ├── cache.js
│ │ │ └── job.js
│ │ ├── system
│ │ │ ├── post.js
│ │ │ ├── notice.js
│ │ │ ├── sys_config.js
│ │ │ ├── sys_dict_type.js
│ │ │ ├── dept.js
│ │ │ ├── dict
│ │ │ │ ├── data.js
│ │ │ │ └── type.js
│ │ │ ├── config.js
│ │ │ └── menu.js
│ │ └── login.js
│ ├── layout
│ │ └── components
│ │ │ ├── index.js
│ │ │ ├── InnerLink
│ │ │ └── index.vue
│ │ │ ├── IframeToggle
│ │ │ └── index.vue
│ │ │ ├── Sidebar
│ │ │ └── Link.vue
│ │ │ └── AppMain.vue
│ ├── views
│ │ ├── tool
│ │ │ ├── swagger
│ │ │ │ └── index.vue
│ │ │ └── build
│ │ │ │ └── index.vue
│ │ ├── monitor
│ │ │ └── druid
│ │ │ │ └── index.vue
│ │ └── redirect
│ │ │ └── index.vue
│ ├── directive
│ │ ├── index.js
│ │ └── permission
│ │ │ ├── hasRole.js
│ │ │ └── hasPermi.js
│ ├── App.vue
│ ├── plugins
│ │ ├── index.js
│ │ └── auth.js
│ └── settings.js
├── public
│ └── favicon.ico
├── .env.development
├── vite
│ └── plugins
│ │ ├── setup-extend.js
│ │ ├── auto-import.js
│ │ ├── svg-icon.js
│ │ ├── index.js
│ │ └── compression.js
├── .env.staging
├── .env.production
├── .gitignore
└── package.json
├── manifest
├── docker
│ ├── docker.sh
│ └── Dockerfile
├── deploy
│ └── kustomize
│ │ ├── base
│ │ ├── kustomization.yaml
│ │ ├── service.yaml
│ │ └── deployment.yaml
│ │ └── overlays
│ │ └── develop
│ │ ├── deployment.yaml
│ │ ├── kustomization.yaml
│ │ └── configmap.yaml
└── config
│ └── config.yaml
├── template
├── default
│ ├── internal
│ │ ├── consts
│ │ │ └── consts.tpl
│ │ ├── controller
│ │ │ └── controller.tpl
│ │ └── logic
│ │ │ └── logic.tpl
│ ├── v1
│ │ └── v.tpl
│ └── vue
│ │ └── src
│ │ └── api
│ │ └── js.tpl
└── index.tpl
├── .gitignore
├── api
└── v1
│ ├── common
│ └── req.go
│ ├── captcha.go
│ └── dict.go
├── main.go
├── hack
└── config.yaml
└── LICENSE
/utility/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/dao/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/logic/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/model/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resource/i18n/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/model/do/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/service/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resource/template/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/model/entity/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resource/public/html/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resource/public/plugin/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * linguist-language=GO
--------------------------------------------------------------------------------
/resource/public/resource/css/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resource/public/resource/js/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resource/public/resource/image/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/consts/consts.go:
--------------------------------------------------------------------------------
1 | package consts
2 |
--------------------------------------------------------------------------------
/internal/packed/packed.go:
--------------------------------------------------------------------------------
1 | package packed
2 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/store/index.js:
--------------------------------------------------------------------------------
1 | const store = createPinia()
2 |
3 | export default store
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/ParentView/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guyan0319/go-vue-admin/HEAD/RuoYi-Vue3/public/favicon.ico
--------------------------------------------------------------------------------
/internal/app/system/consts/consts_context.go:
--------------------------------------------------------------------------------
1 | package consts
2 |
3 | const (
4 | ContextKey = "ContextKey"
5 | )
6 |
--------------------------------------------------------------------------------
/internal/app/system/consts/consts_user.go:
--------------------------------------------------------------------------------
1 | package consts
2 |
3 | const (
4 | UserSessionKey = "UserSessionKey"
5 | )
6 |
--------------------------------------------------------------------------------
/manifest/docker/docker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # This shell is executed before docker build.
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/logo/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guyan0319/go-vue-admin/HEAD/RuoYi-Vue3/src/assets/logo/logo.png
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/401_images/401.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guyan0319/go-vue-admin/HEAD/RuoYi-Vue3/src/assets/401_images/401.gif
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/404_images/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guyan0319/go-vue-admin/HEAD/RuoYi-Vue3/src/assets/404_images/404.png
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/images/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guyan0319/go-vue-admin/HEAD/RuoYi-Vue3/src/assets/images/profile.jpg
--------------------------------------------------------------------------------
/internal/app/system/consts/sys_config.go:
--------------------------------------------------------------------------------
1 | package consts
2 |
3 | const (
4 | SysConfigStatusOk = "0"
5 | SysConfigStatusNo = "1"
6 | )
7 |
--------------------------------------------------------------------------------
/internal/app/system/consts/sys_dict_type.go:
--------------------------------------------------------------------------------
1 | package consts
2 |
3 | const (
4 | SysDictTypeStatusOk = "0"
5 | SysDictTypeStatusNo = "1"
6 | )
7 |
--------------------------------------------------------------------------------
/template/default/internal/consts/consts.tpl:
--------------------------------------------------------------------------------
1 | package consts
2 |
3 | const (
4 | {{.TableName}}StatusOk = "0"
5 | {{.TableName}}StatusNo = "1"
6 | )
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/404_images/404_cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guyan0319/go-vue-admin/HEAD/RuoYi-Vue3/src/assets/404_images/404_cloud.png
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/images/login-background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guyan0319/go-vue-admin/HEAD/RuoYi-Vue3/src/assets/images/login-background.jpg
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/utils/errorCode.js:
--------------------------------------------------------------------------------
1 | export default {
2 | '401': '认证失败,无法访问系统资源',
3 | '403': '当前操作没有权限',
4 | '404': '访问资源不存在',
5 | 'default': '系统未知错误,请反馈给管理员'
6 | }
7 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/.env.development:
--------------------------------------------------------------------------------
1 | # 页面标题
2 | VITE_APP_TITLE = goadmin管理系统
3 |
4 | # 开发环境配置
5 | VITE_APP_ENV = 'development'
6 |
7 | # goadmin管理系统/开发环境
8 | VITE_APP_BASE_API = '/dev-api'
9 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/vite/plugins/setup-extend.js:
--------------------------------------------------------------------------------
1 | import setupExtend from 'vite-plugin-vue-setup-extend'
2 |
3 | export default function createSetupExtend() {
4 | return setupExtend()
5 | }
6 |
--------------------------------------------------------------------------------
/manifest/deploy/kustomize/base/kustomization.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: kustomize.config.k8s.io/v1beta1
2 | kind: Kustomization
3 | resources:
4 | - deployment.yaml
5 | - service.yaml
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/template/index.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | {{.name}}
9 |
10 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/menu.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取路由
4 | export const getRouters = () => {
5 | return request({
6 | url: '/getRouters',
7 | method: 'get'
8 | })
9 | }
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/monitor/server.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取服务信息
4 | export function getServer() {
5 | return request({
6 | url: '/monitor/server',
7 | method: 'get'
8 | })
9 | }
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/chart.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/consts/consts_openapi.go:
--------------------------------------------------------------------------------
1 | package consts
2 |
3 | const (
4 | OpenAPITitle = `GoFrame Demos`
5 | OpenAPIDescription = `This is a simple demos HTTP server project that is using GoFrame. Enjoy 💖 `
6 | )
7 |
--------------------------------------------------------------------------------
/template/default/v1/v.tpl:
--------------------------------------------------------------------------------
1 | package {{.packageName}}
2 |
3 | import (
4 | "github.com/gogf/gf/v2/frame/g"
5 | )
6 | {{range $value := .apiSilce}}
7 | type {{$value.TypeName}} struct {
8 | {{$value.TypeContent}}
9 | }
10 | {{end}}
11 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/size.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .buildpath
2 | .hgignore.swp
3 | .project
4 | .orig
5 | .swp
6 | .idea/
7 | .settings/
8 | .vscode/
9 | bin/
10 | **/.DS_Store
11 | main
12 | output/
13 | manifest/output/
14 | temp/
15 | resource/log/
16 | main.exe
17 | main.exe~
18 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/.env.staging:
--------------------------------------------------------------------------------
1 | # 页面标题
2 | VITE_APP_TITLE = goadmin管理系统
3 |
4 | # 生产环境配置
5 | VITE_APP_ENV = 'staging'
6 |
7 | # goadmin管理系统/生产环境
8 | VITE_APP_BASE_API = '/stage-api'
9 |
10 | # 是否在打包时开启压缩,支持 gzip 和 brotli
11 | VITE_BUILD_COMPRESS = gzip
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/layout/components/index.js:
--------------------------------------------------------------------------------
1 | export { default as AppMain } from './AppMain'
2 | export { default as Navbar } from './Navbar'
3 | export { default as Settings } from './Settings'
4 | export { default as TagsView } from './TagsView/index.vue'
5 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/.env.production:
--------------------------------------------------------------------------------
1 | # 页面标题
2 | VITE_APP_TITLE = goadmin管理系统
3 |
4 | # 生产环境配置
5 | VITE_APP_ENV = 'production'
6 |
7 | # goadmin管理系统/生产环境
8 | VITE_APP_BASE_API = '/prod-api'
9 |
10 | # 是否在打包时开启压缩,支持 gzip 和 brotli
11 | VITE_BUILD_COMPRESS = gzip
--------------------------------------------------------------------------------
/manifest/deploy/kustomize/base/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: template-single
5 | spec:
6 | ports:
7 | - port: 80
8 | protocol: TCP
9 | targetPort: 8000
10 | selector:
11 | app: template-single
12 |
13 |
--------------------------------------------------------------------------------
/api/v1/common/req.go:
--------------------------------------------------------------------------------
1 | package common
2 |
3 | type PageReq struct {
4 | PageNum int `p:"pageNum"`
5 | PageSize int `p:"pageSize"`
6 | OrderBy string `p:"orderBy"` //排序方式
7 | Params map[string]string `p:"params"` //时间范围
8 | }
9 |
--------------------------------------------------------------------------------
/manifest/deploy/kustomize/overlays/develop/deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: template-single
5 | spec:
6 | template:
7 | spec:
8 | containers:
9 | - name : main
10 | image: template-single:develop
--------------------------------------------------------------------------------
/template/default/vue/src/api/js.tpl:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | {{range $value := .jsFuncSilce}}
4 | // {{$value.Notes}}
5 | export function {{$value.FuncName}}(query) {
6 | return request({
7 | {{$value.Content}}
8 | })
9 | }
10 | {{end}}
11 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/IconSelect/requireIcons.js:
--------------------------------------------------------------------------------
1 | let icons = []
2 | const modules = import.meta.glob('./../../assets/icons/svg/*.svg');
3 | for (const path in modules) {
4 | const p = path.split('assets/icons/svg/')[1].split('.svg')[0];
5 | icons.push(p);
6 | }
7 |
8 | export default icons
--------------------------------------------------------------------------------
/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | _ "github.com/gogf/gf/contrib/drivers/mysql/v2"
5 | "github.com/gogf/gf/v2/os/gctx"
6 | _ "go-vue-admin/internal/app/system/logic"
7 |
8 | "go-vue-admin/internal/cmd"
9 | )
10 |
11 | func main() {
12 | cmd.Main.Run(gctx.New())
13 | }
14 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/views/tool/swagger/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
--------------------------------------------------------------------------------
/manifest/deploy/kustomize/overlays/develop/kustomization.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: kustomize.config.k8s.io/v1beta1
2 | kind: Kustomization
3 |
4 | resources:
5 | - ../../base
6 | - configmap.yaml
7 |
8 | patchesStrategicMerge:
9 | - deployment.yaml
10 |
11 | namespace: default
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/RuoYi/Doc/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/consts/gtoken.go:
--------------------------------------------------------------------------------
1 | package consts
2 |
3 | const (
4 | CacheMode = 1
5 | CacheModeRedis = 2
6 | // 是否支持多端登录
7 | MultiLogin = true
8 | TokenType = "Bearer"
9 | ServerName = "开源后台系统"
10 | //超时时间 10 * 24 * 60 * 60
11 | Timeout = 86400
12 | GTokenAdminPrefix = "admin"
13 | )
14 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/RuoYi/Git/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/vite/plugins/auto-import.js:
--------------------------------------------------------------------------------
1 | import autoImport from 'unplugin-auto-import/vite'
2 |
3 | export default function createAutoImport() {
4 | return autoImport({
5 | imports: [
6 | 'vue',
7 | 'vue-router',
8 | 'pinia'
9 | ],
10 | dts: false
11 | })
12 | }
13 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/directive/index.js:
--------------------------------------------------------------------------------
1 | import hasRole from './permission/hasRole'
2 | import hasPermi from './permission/hasPermi'
3 | import copyText from './common/copyText'
4 |
5 | export default function directive(app){
6 | app.directive('hasRole', hasRole)
7 | app.directive('hasPermi', hasPermi)
8 | app.directive('copyText', copyText)
9 | }
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/guide.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/views/monitor/druid/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/SvgIcon/svgicon.js:
--------------------------------------------------------------------------------
1 | import * as components from '@element-plus/icons-vue'
2 |
3 | export default {
4 | install: (app) => {
5 | for (const key in components) {
6 | const componentConfig = components[key];
7 | app.component(componentConfig.name, componentConfig);
8 | }
9 | },
10 | };
11 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/views/redirect/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/utility/err.go:
--------------------------------------------------------------------------------
1 | package utility
2 |
3 | import (
4 | "context"
5 | "github.com/gogf/gf/v2/frame/g"
6 | )
7 |
8 | func WriteErrLog(ctx context.Context, err error, msg ...string) {
9 | if !g.IsNil(err) {
10 | g.Log().Error(ctx, err.Error())
11 | if len(msg) > 0 {
12 | panic(msg[0])
13 | } else {
14 | panic(err.Error())
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
16 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/money.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/utils/auth.js:
--------------------------------------------------------------------------------
1 | import Cookies from 'js-cookie'
2 |
3 | const TokenKey = 'Admin-Token'
4 |
5 | export function getToken() {
6 | return Cookies.get(TokenKey)
7 | }
8 |
9 | export function setToken(token) {
10 | return Cookies.set(TokenKey, token)
11 | }
12 |
13 | export function removeToken() {
14 | return Cookies.remove(TokenKey)
15 | }
16 |
--------------------------------------------------------------------------------
/manifest/deploy/kustomize/overlays/develop/configmap.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: template-single-configmap
5 | data:
6 | config.yaml: |
7 | server:
8 | address: ":8000"
9 | openapiPath: "/api.json"
10 | swaggerPath: "/swagger"
11 |
12 | logger:
13 | level : "all"
14 | stdout: true
15 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/email.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/service/consts.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | type ()
9 |
--------------------------------------------------------------------------------
/internal/service/dao.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | type ()
9 |
--------------------------------------------------------------------------------
/internal/service/model.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | type ()
9 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | **/*.log
8 |
9 | tests/**/coverage/
10 | tests/e2e/reports
11 | selenium-debug.log
12 |
13 | # Editor directories and files
14 | .idea
15 | .vscode
16 | *.suo
17 | *.ntvs*
18 | *.njsproj
19 | *.sln
20 | *.local
21 |
22 | package-lock.json
23 | yarn.lock
24 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/drag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/vite/plugins/svg-icon.js:
--------------------------------------------------------------------------------
1 | import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
2 | import path from 'path'
3 |
4 | export default function createSvgIcon(isBuild) {
5 | return createSvgIconsPlugin({
6 | iconDirs: [path.resolve(process.cwd(), 'src/assets/icons/svg')],
7 | symbolId: 'icon-[dir]-[name]',
8 | svgoOptions: isBuild
9 | })
10 | }
11 |
--------------------------------------------------------------------------------
/internal/app/system/model/context.go:
--------------------------------------------------------------------------------
1 | package model
2 |
3 | import (
4 | "github.com/gogf/gf/v2/net/ghttp"
5 | )
6 |
7 | type Context struct {
8 | Session *ghttp.Session // Session in context.
9 | User *ContextUser // User in context.
10 | }
11 |
12 | type ContextUser struct {
13 | Id int64 // User ID.
14 | UserName string // User UserName.
15 | Nickname string // User nickname.
16 | }
17 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/monitor/online.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询在线用户列表
4 | export function list(query) {
5 | return request({
6 | url: '/monitor/online/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 强退用户
13 | export function forceLogout(tokenId) {
14 | return request({
15 | url: '/monitor/online/' + tokenId,
16 | method: 'delete'
17 | })
18 | }
19 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/documentation.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/fullscreen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/utility/utils.go:
--------------------------------------------------------------------------------
1 | package utility
2 |
3 | import (
4 | "context"
5 | "github.com/gogf/gf/v2/frame/g"
6 | "github.com/gogf/gf/v2/net/ghttp"
7 | )
8 |
9 | // GetClientIp 获取客户端IP
10 | func GetClientIp(ctx context.Context) string {
11 | return g.RequestFromCtx(ctx).GetClientIp()
12 | }
13 |
14 | // GetUserAgent 获取user-agent
15 | func GetUserAgent(ctx context.Context) string {
16 | return ghttp.RequestFromCtx(ctx).Header.Get("User-Agent")
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/lock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/excel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/utils/dynamicTitle.js:
--------------------------------------------------------------------------------
1 | import store from '@/store'
2 | import defaultSettings from '@/settings'
3 | import useSettingsStore from '@/store/modules/settings'
4 |
5 | /**
6 | * 动态修改标题
7 | */
8 | export function useDynamicTitle() {
9 | const settingsStore = useSettingsStore();
10 | if (settingsStore.dynamicTitle) {
11 | document.title = settingsStore.title + ' - ' + defaultSettings.title;
12 | } else {
13 | document.title = defaultSettings.title;
14 | }
15 | }
--------------------------------------------------------------------------------
/manifest/deploy/kustomize/base/deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: template-single
5 | labels:
6 | app: template-single
7 | spec:
8 | replicas: 1
9 | selector:
10 | matchLabels:
11 | app: template-single
12 | template:
13 | metadata:
14 | labels:
15 | app: template-single
16 | spec:
17 | containers:
18 | - name : main
19 | image: template-single
20 | imagePullPolicy: Always
21 |
22 |
--------------------------------------------------------------------------------
/internal/app/system/model/redis.go:
--------------------------------------------------------------------------------
1 | package model
2 |
3 | type RedisConfig struct {
4 | Address string `json:"address"`
5 | Db int `json:"db"`
6 | IdleTimeout string `json:"idleTimeout"`
7 | MaxConnLifetime string `json:"maxConnLifetime"`
8 | WaitTimeout string `json:"waitTimeout"`
9 | DialTimeout string `json:"dialTimeout"`
10 | ReadTimeout string `json:"readTimeout"`
11 | WriteTimeout string `json:"writeTimeout"`
12 | MaxActive int `json:"maxActive"`
13 | }
14 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/example.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_role_dept.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | // SysRoleDept is the golang structure for table sys_role_dept.
8 | type SysRoleDept struct {
9 | RoleId int64 `json:"roleId" description:"角色ID"`
10 | DeptId int64 `json:"deptId" description:"部门ID"`
11 | }
12 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_role_menu.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | // SysRoleMenu is the golang structure for table sys_role_menu.
8 | type SysRoleMenu struct {
9 | RoleId int64 `json:"roleId" description:"角色ID"`
10 | MenuId int64 `json:"menuId" description:"菜单ID"`
11 | }
12 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_user_post.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | // SysUserPost is the golang structure for table sys_user_post.
8 | type SysUserPost struct {
9 | UserId int64 `json:"userId" description:"用户ID"`
10 | PostId int64 `json:"postId" description:"岗位ID"`
11 | }
12 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_user_role.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | // SysUserRole is the golang structure for table sys_user_role.
8 | type SysUserRole struct {
9 | UserId int64 `json:"userId" description:"用户ID"`
10 | RoleId int64 `json:"roleId" description:"角色ID"`
11 | }
12 |
--------------------------------------------------------------------------------
/internal/app/system/controller/dict/dict.go:
--------------------------------------------------------------------------------
1 | package dict
2 |
3 | import (
4 | "context"
5 | v1 "go-vue-admin/api/v1"
6 | "go-vue-admin/internal/app/system/service"
7 | )
8 |
9 | type dictController struct {
10 | }
11 |
12 | var Dict = dictController{}
13 |
14 | func (d *dictController) DictData(ctx context.Context, req *v1.GetDictDataReq) (res *v1.GetDictDataRes, err error) {
15 | dictData, err := service.SysDictData().GetDictDataByType(ctx, req.DictType)
16 | res = &v1.GetDictDataRes{
17 | DictData: dictData,
18 | }
19 | return
20 | }
21 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/layout/components/InnerLink/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
25 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/plugins/index.js:
--------------------------------------------------------------------------------
1 | import tab from './tab'
2 | import auth from './auth'
3 | import cache from './cache'
4 | import modal from './modal'
5 | import download from './download'
6 |
7 | export default function installPlugins(app){
8 | // 页签操作
9 | app.config.globalProperties.$tab = tab
10 | // 认证对象
11 | app.config.globalProperties.$auth = auth
12 | // 缓存对象
13 | app.config.globalProperties.$cache = cache
14 | // 模态框对象
15 | app.config.globalProperties.$modal = modal
16 | // 下载文件
17 | app.config.globalProperties.$download = download
18 | }
19 |
--------------------------------------------------------------------------------
/hack/config.yaml:
--------------------------------------------------------------------------------
1 |
2 | # CLI tool, only in development environment.
3 | # https://goframe.org/pages/viewpage.action?pageId=3673173
4 | gfcli:
5 | gen:
6 | dao:
7 | - link: "mysql:root:123456@tcp(127.0.0.1:3306)/gvadmindb"
8 | tables: ""
9 | tablesEx: ""
10 | removePrefix: "gf_"
11 | descriptionTag: true
12 | noModelComment: true
13 | path: "./internal/app/system"
14 | service:
15 | srcFolder: "internal/app/system/logic"
16 | dstFolder: "internal/app/system/service"
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/views/tool/build/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
15 |
16 | // ts(使用了 setup 语法糖), reactive 自行引入即可
17 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/Screenfull/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/internal/app/system/logic/cache/cache.go:
--------------------------------------------------------------------------------
1 | package cache
2 |
3 | import (
4 | _ "github.com/gogf/gf/contrib/nosql/redis/v2"
5 | "github.com/gogf/gf/v2/database/gredis"
6 | "github.com/gogf/gf/v2/frame/g"
7 | "go-vue-admin/internal/app/system/service"
8 | )
9 |
10 | func init() {
11 | service.RegisterCache(New())
12 | }
13 |
14 | func New() *sCache {
15 | redis := g.Redis()
16 | return &sCache{
17 | Redis: redis,
18 | }
19 | }
20 |
21 | type sCache struct {
22 | *gredis.Redis
23 | }
24 |
25 | func (s *sCache) Driver() *gredis.Redis {
26 | return s.Redis
27 | }
28 |
--------------------------------------------------------------------------------
/internal/app/system/model/sys_dept.go:
--------------------------------------------------------------------------------
1 | package model
2 |
3 | import (
4 | "go-vue-admin/internal/app/system/model/entity"
5 | )
6 |
7 | type SysDeptSRes struct {
8 | *entity.SysDept
9 | Children []*SysDeptSRes `json:"children"`
10 | }
11 |
12 | type SysDeptTreeRes struct {
13 | Id int64 `json:"id" description:"部门id"`
14 | Label string `json:"label" description:"部门名称"`
15 | Children []*SysDeptTreeRes `json:"children" description:"子部门"`
16 | }
17 | type DeptIds struct {
18 | Ids []int64 `json:"ids" description:"部门id"`
19 | }
20 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/star.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/template/default/internal/controller/controller.tpl:
--------------------------------------------------------------------------------
1 | package {{.packageName}}
2 |
3 | import (
4 | "context"
5 | )
6 |
7 | type {{.nameController}} struct {
8 | }
9 |
10 | var {{.controllerName}} = {{.nameController}} {}
11 | {{range $value := .funcSilce}}
12 | func (s *{{$value.NameController}} ) {{$value.FuncName}}(ctx context.Context, req *{{$value.ApiPackageName}}.{{$value.ServiceReq}}) (res *{{$value.ApiPackageName}}.{{$value.ServiceRes}}, err error) {
13 | res, err = service.{{$value.ServiceName}}().{{$value.FuncName}}(ctx, req)
14 | return
15 | }
16 | {{end}}
17 |
18 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/monitor/operlog.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询操作日志列表
4 | export function list(query) {
5 | return request({
6 | url: '/monitor/operlog/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 删除操作日志
13 | export function delOperlog(operId) {
14 | return request({
15 | url: '/monitor/operlog/' + operId,
16 | method: 'delete'
17 | })
18 | }
19 |
20 | // 清空操作日志
21 | export function cleanOperlog() {
22 | return request({
23 | url: '/monitor/operlog/clean',
24 | method: 'delete'
25 | })
26 | }
27 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/slider.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/monitor/jobLog.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询调度日志列表
4 | export function listJobLog(query) {
5 | return request({
6 | url: '/monitor/jobLog/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 删除调度日志
13 | export function delJobLog(jobLogId) {
14 | return request({
15 | url: '/monitor/jobLog/' + jobLogId,
16 | method: 'delete'
17 | })
18 | }
19 |
20 | // 清空调度日志
21 | export function cleanJobLog() {
22 | return request({
23 | url: '/monitor/jobLog/clean',
24 | method: 'delete'
25 | })
26 | }
27 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/vite/plugins/index.js:
--------------------------------------------------------------------------------
1 | import vue from '@vitejs/plugin-vue'
2 |
3 | import createAutoImport from './auto-import'
4 | import createSvgIcon from './svg-icon'
5 | import createCompression from './compression'
6 | import createSetupExtend from './setup-extend'
7 |
8 | export default function createVitePlugins(viteEnv, isBuild = false) {
9 | const vitePlugins = [vue()]
10 | vitePlugins.push(createAutoImport())
11 | vitePlugins.push(createSetupExtend())
12 | vitePlugins.push(createSvgIcon(isBuild))
13 | isBuild && vitePlugins.push(...createCompression(viteEnv))
14 | return vitePlugins
15 | }
16 |
--------------------------------------------------------------------------------
/api/v1/captcha.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | import "github.com/gogf/gf/v2/frame/g"
4 |
5 | type CaptchaReq struct {
6 | g.Meta `path:"/captchaImage" tags:"验证码" method:"get" summary:"获取验证码"`
7 | }
8 | type CaptchaRes struct {
9 | g.Meta `mime:"application/json"`
10 | Key string `json:"key"`
11 | Img string `json:"img"`
12 | Uuid string `json:"uuid"`
13 | CaptchaEnabled bool `json:"captchaEnabled"`
14 | }
15 | type TestReq struct {
16 | g.Meta `path:"/test" tags:"验证码" method:"get" summary:"获取验证码"`
17 | }
18 | type TestRes struct {
19 | g.Meta `mime:"application/json"`
20 | }
21 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_role_dept.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | )
10 |
11 | // SysRoleDept is the golang structure of table sys_role_dept for DAO operations like Where/Data.
12 | type SysRoleDept struct {
13 | g.Meta `orm:"table:sys_role_dept, do:true"`
14 | RoleId interface{} // 角色ID
15 | DeptId interface{} // 部门ID
16 | }
17 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_role_menu.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | )
10 |
11 | // SysRoleMenu is the golang structure of table sys_role_menu for DAO operations like Where/Data.
12 | type SysRoleMenu struct {
13 | g.Meta `orm:"table:sys_role_menu, do:true"`
14 | RoleId interface{} // 角色ID
15 | MenuId interface{} // 菜单ID
16 | }
17 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_user_post.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | )
10 |
11 | // SysUserPost is the golang structure of table sys_user_post for DAO operations like Where/Data.
12 | type SysUserPost struct {
13 | g.Meta `orm:"table:sys_user_post, do:true"`
14 | UserId interface{} // 用户ID
15 | PostId interface{} // 岗位ID
16 | }
17 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_user_role.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | )
10 |
11 | // SysUserRole is the golang structure of table sys_user_role for DAO operations like Where/Data.
12 | type SysUserRole struct {
13 | g.Meta `orm:"table:sys_user_role, do:true"`
14 | UserId interface{} // 用户ID
15 | RoleId interface{} // 角色ID
16 | }
17 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/layout/components/IframeToggle/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
20 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/education.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/tab.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/manifest/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM loads/alpine:3.8
2 |
3 | ###############################################################################
4 | # INSTALLATION
5 | ###############################################################################
6 |
7 | ENV WORKDIR /app
8 | ADD resource $WORKDIR/
9 | ADD ./temp/linux_amd64/main $WORKDIR/main
10 | RUN chmod +x $WORKDIR/main
11 |
12 | ###############################################################################
13 | # START
14 | ###############################################################################
15 | WORKDIR $WORKDIR
16 | CMD ./main
17 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/message.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/switch.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/theme.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/code.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/template/default/internal/logic/logic.tpl:
--------------------------------------------------------------------------------
1 | package {{.packageName}}
2 |
3 | import (
4 | "context"
5 | "github.com/gogf/gf/v2/frame/g"
6 | "github.com/gogf/gf/v2/os/gtime"
7 | "github.com/gogf/gf/v2/util/gconv"
8 | )
9 |
10 | func init() {
11 | service.Register{{.className}}(New())
12 | }
13 |
14 | func New() *s{{.className}} {
15 | return &s{{.className}}{}
16 | }
17 |
18 | type s{{.className}} struct {
19 | }
20 |
21 | {{range $value := .logicSilce}}
22 | // {{$value.Notes}}
23 | func (s *s{{$value.ClassName}}) {{$value.FuncName}}(ctx context.Context, req *{{$value.ApiPackageName}}.{{$value.ParamReq}}) (res *{{$value.ApiPackageName}}.{{$value.ParamRes}}, err error) {
24 | {{$value.Content}}
25 | return
26 | }
27 | {{end}}
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/druid.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/peoples.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/input.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/server.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/api/v1/dict.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | import (
4 | "github.com/gogf/gf/v2/frame/g"
5 | "go-vue-admin/internal/app/system/model/entity"
6 | )
7 |
8 | type GetDictDataReq struct {
9 | g.Meta `path:"/system/dict/type" method:"get" tags:"UserService" summary:"current Data"`
10 | DictType string `p:"dictType" v:"required"`
11 | }
12 | type GetDictDataRes struct {
13 | g.Meta `mime:"application/json"`
14 | DictData []*entity.SysDictData `json:"dictData"`
15 | }
16 |
17 | type GetDictTypeOptionSelectReq struct {
18 | g.Meta `path:"/system/dict/type/optionselect" method:"get" tags:"UserService" summary:"current Data"`
19 | }
20 | type GetDictTypeOptionSelectRes struct {
21 | g.Meta `mime:"application/json"`
22 | DictType []*entity.SysDictType `json:"dictType"`
23 | }
24 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/directive/permission/hasRole.js:
--------------------------------------------------------------------------------
1 | /**
2 | * v-hasRole 角色权限处理
3 | * Copyright (c) 2019 ruoyi
4 | */
5 |
6 | import useUserStore from '@/store/modules/user'
7 |
8 | export default {
9 | mounted(el, binding, vnode) {
10 | const { value } = binding
11 | const super_admin = "admin";
12 | const roles = useUserStore().roles
13 |
14 | if (value && value instanceof Array && value.length > 0) {
15 | const roleFlag = value
16 |
17 | const hasRole = roles.some(role => {
18 | return super_admin === role || roleFlag.includes(role)
19 | })
20 |
21 | if (!hasRole) {
22 | el.parentNode && el.parentNode.removeChild(el)
23 | }
24 | } else {
25 | throw new Error(`请设置角色权限标签值`)
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/monitor/logininfor.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询登录日志列表
4 | export function list(query) {
5 | return request({
6 | url: '/monitor/logininfor/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 删除登录日志
13 | export function delLogininfor(infoId) {
14 | return request({
15 | url: '/monitor/logininfor/' + infoId,
16 | method: 'delete'
17 | })
18 | }
19 |
20 | // 解锁用户登录状态
21 | export function unlockLogininfor(userName) {
22 | return request({
23 | url: '/monitor/logininfor/unlock/' + userName,
24 | method: 'get'
25 | })
26 | }
27 |
28 | // 清空登录日志
29 | export function cleanLogininfor() {
30 | return request({
31 | url: '/monitor/logininfor/clean',
32 | method: 'delete'
33 | })
34 | }
35 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/textarea.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/layout/components/Sidebar/Link.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
41 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/time.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/iFrame/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
32 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/edit.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/service/cache.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "github.com/gogf/gf/v2/database/gredis"
10 | )
11 |
12 | type (
13 | ICache interface {
14 | Driver() *gredis.Redis
15 | }
16 | )
17 |
18 | var (
19 | localCache ICache
20 | )
21 |
22 | func Cache() ICache {
23 | if localCache == nil {
24 | panic("implement not found for interface ICache, forgot register?")
25 | }
26 | return localCache
27 | }
28 |
29 | func RegisterCache(i ICache) {
30 | localCache = i
31 | }
32 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/nested.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/utils/dict.js:
--------------------------------------------------------------------------------
1 | import useDictStore from '@/store/modules/dict'
2 | import { getDicts } from '@/api/system/dict/data'
3 |
4 | /**
5 | * 获取字典数据
6 | */
7 | export function useDict(...args) {
8 | const res = ref({});
9 | return (() => {
10 | args.forEach((dictType, index) => {
11 | res.value[dictType] = [];
12 | const dicts = useDictStore().getDict(dictType);
13 | if (dicts) {
14 | res.value[dictType] = dicts;
15 | } else {
16 | getDicts(dictType).then(resp => {
17 | res.value[dictType] = resp.data.dictData.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass, elTagClass: p.cssClass }))
18 | useDictStore().setDict(dictType, res.value[dictType]);
19 | })
20 | }
21 | })
22 | return toRefs(res.value);
23 | })()
24 | }
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/directive/permission/hasPermi.js:
--------------------------------------------------------------------------------
1 | /**
2 | * v-hasPermi 操作权限处理
3 | * Copyright (c) 2019 ruoyi
4 | */
5 |
6 | import useUserStore from '@/store/modules/user'
7 |
8 | export default {
9 | mounted(el, binding, vnode) {
10 | const { value } = binding
11 | const all_permission = "*:*:*";
12 | const permissions = useUserStore().permissions
13 |
14 | if (value && value instanceof Array && value.length > 0) {
15 | const permissionFlag = value
16 |
17 | const hasPermissions = permissions.some(permission => {
18 | return all_permission === permission || permissionFlag.includes(permission)
19 | })
20 |
21 | if (!hasPermissions) {
22 | el.parentNode && el.parentNode.removeChild(el)
23 | }
24 | } else {
25 | throw new Error(`请设置操作权限标签值`)
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/internal/app/system/model/sys_role.go:
--------------------------------------------------------------------------------
1 | package model
2 |
3 | import "go-vue-admin/internal/app/system/model/entity"
4 |
5 | type SysRoleRes struct {
6 | *entity.SysRole
7 | Flag bool `json:"flag" `
8 | MenuIds string `json:"menuIds" `
9 | DeptIds string `json:"deptIds" `
10 | Admin bool `json:"admin" description:"是否是admin"`
11 | Permissions []string `json:"permissions" description:"权限"`
12 | }
13 | type SysRolesRes struct {
14 | RoleIds []int64 `json:"roleIds" `
15 | Roles []string `json:"roles" `
16 | SysRole []*entity.SysRole `json:"SysRole" `
17 | }
18 |
19 | type RoleList struct {
20 | *entity.SysRole
21 | Flag bool `json:"flag" `
22 | MenuIds string `json:"menuIds" `
23 | DeptIds string `json:"deptIds" `
24 | Admin bool `json:"admin" description:"是否是admin"`
25 | }
26 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/row.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/logic/sys_dict_data/sys_dict_data.go:
--------------------------------------------------------------------------------
1 | package sys_dict_data
2 |
3 | import (
4 | "context"
5 | "github.com/gogf/gf/v2/frame/g"
6 | "go-vue-admin/internal/app/system/dao"
7 | "go-vue-admin/internal/app/system/model/entity"
8 | "go-vue-admin/internal/app/system/service"
9 | "go-vue-admin/utility"
10 | )
11 |
12 | func init() {
13 | service.RegisterSysDictData(New())
14 | }
15 |
16 | func New() *sSysDictData {
17 | return &sSysDictData{}
18 | }
19 |
20 | type sSysDictData struct {
21 | }
22 |
23 | func (s *sSysDictData) GetDictDataByType(ctx context.Context, dictType string) (dictdata []*entity.SysDictData, err error) {
24 | err = g.Try(ctx, func(ctx context.Context) {
25 | //字典数据表
26 | err = dao.SysDictData.Ctx(ctx).Where(dao.SysDictData.Columns().DictType, dictType).Scan(&dictdata)
27 | utility.WriteErrLog(ctx, err, "获取字典数据表失败")
28 | })
29 | return
30 | }
31 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/monitor.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/system/post.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询岗位列表
4 | export function listPost(query) {
5 | return request({
6 | url: '/system/post/list',
7 | method: 'get',
8 | params: query
9 |
10 | })
11 | }
12 |
13 | // 查询岗位详细
14 | export function getPost(postId) {
15 | return request({
16 | url: '/system/post/' + postId,
17 | method: 'get'
18 | })
19 | }
20 |
21 | // 新增岗位
22 | export function addPost(data) {
23 | return request({
24 | url: '/system/post',
25 | method: 'post',
26 | data: data
27 | })
28 | }
29 |
30 | // 修改岗位
31 | export function updatePost(data) {
32 | return request({
33 | url: '/system/post',
34 | method: 'put',
35 | data: data
36 | })
37 | }
38 |
39 | // 删除岗位
40 | export function delPost(postId) {
41 | return request({
42 | url: '/system/post/' + postId,
43 | method: 'delete'
44 | })
45 | }
46 |
--------------------------------------------------------------------------------
/internal/app/system/service/captcha.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 | )
11 |
12 | type (
13 | ICaptcha interface {
14 | GetVerifyImgString(ctx context.Context) (idKeyC string, base64stringC string, err error)
15 | VerifyString(id, answer string) bool
16 | }
17 | )
18 |
19 | var (
20 | localCaptcha ICaptcha
21 | )
22 |
23 | func Captcha() ICaptcha {
24 | if localCaptcha == nil {
25 | panic("implement not found for interface ICaptcha, forgot register?")
26 | }
27 | return localCaptcha
28 | }
29 |
30 | func RegisterCaptcha(i ICaptcha) {
31 | localCaptcha = i
32 | }
33 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/tree-table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_job_log.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysJobLog is the golang structure of table sys_job_log for DAO operations like Where/Data.
13 | type SysJobLog struct {
14 | g.Meta `orm:"table:sys_job_log, do:true"`
15 | JobLogId interface{} // 任务日志ID
16 | JobName interface{} // 任务名称
17 | JobGroup interface{} // 任务组名
18 | InvokeTarget interface{} // 调用目标字符串
19 | JobMessage interface{} // 日志信息
20 | Status interface{} // 执行状态(0正常 1失败)
21 | ExceptionInfo interface{} // 异常信息
22 | CreateTime *gtime.Time // 创建时间
23 | }
24 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/system/notice.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询公告列表
4 | export function listNotice(query) {
5 | return request({
6 | url: '/system/notice/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询公告详细
13 | export function getNotice(noticeId) {
14 | return request({
15 | url: '/system/notice/' + noticeId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 新增公告
21 | export function addNotice(data) {
22 | return request({
23 | url: '/system/notice',
24 | method: 'post',
25 | data: data
26 | })
27 | }
28 |
29 | // 修改公告
30 | export function updateNotice(data) {
31 | return request({
32 | url: '/system/notice',
33 | method: 'put',
34 | data: data
35 | })
36 | }
37 |
38 | // 删除公告
39 | export function delNotice(noticeId) {
40 | return request({
41 | url: '/system/notice/' + noticeId,
42 | method: 'delete'
43 | })
44 | }
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_dict_type.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysDictType is the golang structure of table sys_dict_type for DAO operations like Where/Data.
13 | type SysDictType struct {
14 | g.Meta `orm:"table:sys_dict_type, do:true"`
15 | DictId interface{} // 字典主键
16 | DictName interface{} // 字典名称
17 | DictType interface{} // 字典类型
18 | Status interface{} // 状态(0正常 1停用)
19 | CreateBy interface{} // 创建者
20 | CreateTime *gtime.Time // 创建时间
21 | UpdateBy interface{} // 更新者
22 | UpdateTime *gtime.Time // 更新时间
23 | Remark interface{} // 备注
24 | }
25 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_job.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysJobDao is internal type for wrapping internal DAO implements.
12 | type internalSysJobDao = *internal.SysJobDao
13 |
14 | // sysJobDao is the data access object for table sys_job.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysJobDao struct {
17 | internalSysJobDao
18 | }
19 |
20 | var (
21 | // SysJob is globally public accessible object for table sys_job operations.
22 | SysJob = sysJobDao{
23 | internal.NewSysJobDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_post.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysPost is the golang structure of table sys_post for DAO operations like Where/Data.
13 | type SysPost struct {
14 | g.Meta `orm:"table:sys_post, do:true"`
15 | PostId interface{} // 岗位ID
16 | PostCode interface{} // 岗位编码
17 | PostName interface{} // 岗位名称
18 | PostSort interface{} // 显示顺序
19 | Status interface{} // 状态(0正常 1停用)
20 | CreateBy interface{} // 创建者
21 | CreateTime *gtime.Time // 创建时间
22 | UpdateBy interface{} // 更新者
23 | UpdateTime *gtime.Time // 更新时间
24 | Remark interface{} // 备注
25 | }
26 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/dict_type.go:
--------------------------------------------------------------------------------
1 | package model
2 |
3 | var DictTypeMap = map[string]string{
4 | "sys_menuvisible": "sys_show_hide",
5 | "sys_usersex": "sys_user_sex",
6 | "sys_jobstatus": "sys_job_status",
7 | "sys_deptstatus": "sys_normal_disable",
8 | "sys_dict_datastatus": "sys_normal_disable",
9 | "sys_menustatus": "sys_normal_disable",
10 | "sys_poststatus": "sys_normal_disable",
11 | "sys_rolestatus": "sys_normal_disable",
12 | "sys_userstatus": "sys_normal_disable",
13 | "sys_jobjob_group": "sys_job_group",
14 | "sys_job_logjob_group": "sys_job_group",
15 | "sys_configconfig_type": "sys_yes_no",
16 | "sys_noticenotice_type": "sys_notice_type",
17 | "sys_noticestatus": "sys_notice_status",
18 | "sys_oper_logbusiness_type": "sys_oper_type",
19 | "status": "sys_common_status",
20 | }
21 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_dept.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysDeptDao is internal type for wrapping internal DAO implements.
12 | type internalSysDeptDao = *internal.SysDeptDao
13 |
14 | // sysDeptDao is the data access object for table sys_dept.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysDeptDao struct {
17 | internalSysDeptDao
18 | }
19 |
20 | var (
21 | // SysDept is globally public accessible object for table sys_dept operations.
22 | SysDept = sysDeptDao{
23 | internal.NewSysDeptDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_menu.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysMenuDao is internal type for wrapping internal DAO implements.
12 | type internalSysMenuDao = *internal.SysMenuDao
13 |
14 | // sysMenuDao is the data access object for table sys_menu.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysMenuDao struct {
17 | internalSysMenuDao
18 | }
19 |
20 | var (
21 | // SysMenu is globally public accessible object for table sys_menu operations.
22 | SysMenu = sysMenuDao{
23 | internal.NewSysMenuDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_post.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysPostDao is internal type for wrapping internal DAO implements.
12 | type internalSysPostDao = *internal.SysPostDao
13 |
14 | // sysPostDao is the data access object for table sys_post.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysPostDao struct {
17 | internalSysPostDao
18 | }
19 |
20 | var (
21 | // SysPost is globally public accessible object for table sys_post operations.
22 | SysPost = sysPostDao{
23 | internal.NewSysPostDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_role.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysRoleDao is internal type for wrapping internal DAO implements.
12 | type internalSysRoleDao = *internal.SysRoleDao
13 |
14 | // sysRoleDao is the data access object for table sys_role.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysRoleDao struct {
17 | internalSysRoleDao
18 | }
19 |
20 | var (
21 | // SysRole is globally public accessible object for table sys_role operations.
22 | SysRole = sysRoleDao{
23 | internal.NewSysRoleDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_user.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysUserDao is internal type for wrapping internal DAO implements.
12 | type internalSysUserDao = *internal.SysUserDao
13 |
14 | // sysUserDao is the data access object for table sys_user.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysUserDao struct {
17 | internalSysUserDao
18 | }
19 |
20 | var (
21 | // SysUser is globally public accessible object for table sys_user operations.
22 | SysUser = sysUserDao{
23 | internal.NewSysUserDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/build.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_config.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysConfig is the golang structure of table sys_config for DAO operations like Where/Data.
13 | type SysConfig struct {
14 | g.Meta `orm:"table:sys_config, do:true"`
15 | ConfigId interface{} // 参数主键
16 | ConfigName interface{} // 参数名称
17 | ConfigKey interface{} // 参数键名
18 | ConfigValue interface{} // 参数键值
19 | ConfigType interface{} // 系统内置(Y是 N否)
20 | CreateBy interface{} // 创建者
21 | CreateTime *gtime.Time // 创建时间
22 | UpdateBy interface{} // 更新者
23 | UpdateTime *gtime.Time // 更新时间
24 | Remark interface{} // 备注
25 | }
26 |
--------------------------------------------------------------------------------
/internal/app/system/service/middleware.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "github.com/gogf/gf/v2/net/ghttp"
10 | )
11 |
12 | type (
13 | IMiddleware interface {
14 | Ctx(r *ghttp.Request)
15 | Auth(r *ghttp.Request)
16 | CORS(r *ghttp.Request)
17 | HandlerResponse(r *ghttp.Request)
18 | }
19 | )
20 |
21 | var (
22 | localMiddleware IMiddleware
23 | )
24 |
25 | func Middleware() IMiddleware {
26 | if localMiddleware == nil {
27 | panic("implement not found for interface IMiddleware, forgot register?")
28 | }
29 | return localMiddleware
30 | }
31 |
32 | func RegisterMiddleware(i IMiddleware) {
33 | localMiddleware = i
34 | }
35 |
--------------------------------------------------------------------------------
/internal/app/system/dao/gen_table.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalGenTableDao is internal type for wrapping internal DAO implements.
12 | type internalGenTableDao = *internal.GenTableDao
13 |
14 | // genTableDao is the data access object for table gen_table.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type genTableDao struct {
17 | internalGenTableDao
18 | }
19 |
20 | var (
21 | // GenTable is globally public accessible object for table gen_table operations.
22 | GenTable = genTableDao{
23 | internal.NewGenTableDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/settings.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /**
3 | * 网页标题
4 | */
5 | title: import.meta.env.VITE_APP_TITLE,
6 | /**
7 | * 侧边栏主题 深色主题theme-dark,浅色主题theme-light
8 | */
9 | sideTheme: 'theme-dark',
10 | /**
11 | * 是否系统布局配置
12 | */
13 | showSettings: false,
14 |
15 | /**
16 | * 是否显示顶部导航
17 | */
18 | topNav: false,
19 |
20 | /**
21 | * 是否显示 tagsView
22 | */
23 | tagsView: true,
24 |
25 | /**
26 | * 是否固定头部
27 | */
28 | fixedHeader: false,
29 |
30 | /**
31 | * 是否显示logo
32 | */
33 | sidebarLogo: true,
34 |
35 | /**
36 | * 是否显示动态标题
37 | */
38 | dynamicTitle: false,
39 |
40 | /**
41 | * @type {string | array} 'production' | ['production', 'development']
42 | * @description Need show err logs component.
43 | * The default is only used in the production env
44 | * If you want to also use it in dev, you can pass ['production', 'development']
45 | */
46 | errorLog: 'production'
47 | }
48 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_logininfor.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysLogininfor is the golang structure of table sys_logininfor for DAO operations like Where/Data.
13 | type SysLogininfor struct {
14 | g.Meta `orm:"table:sys_logininfor, do:true"`
15 | InfoId interface{} // 访问ID
16 | UserName interface{} // 用户账号
17 | Ipaddr interface{} // 登录IP地址
18 | LoginLocation interface{} // 登录地点
19 | Browser interface{} // 浏览器类型
20 | Os interface{} // 操作系统
21 | Status interface{} // 登录状态(0成功 1失败)
22 | Msg interface{} // 提示消息
23 | LoginTime *gtime.Time // 访问时间
24 | }
25 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_config.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysConfigDao is internal type for wrapping internal DAO implements.
12 | type internalSysConfigDao = *internal.SysConfigDao
13 |
14 | // sysConfigDao is the data access object for table sys_config.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysConfigDao struct {
17 | internalSysConfigDao
18 | }
19 |
20 | var (
21 | // SysConfig is globally public accessible object for table sys_config operations.
22 | SysConfig = sysConfigDao{
23 | internal.NewSysConfigDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_notice.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysNoticeDao is internal type for wrapping internal DAO implements.
12 | type internalSysNoticeDao = *internal.SysNoticeDao
13 |
14 | // sysNoticeDao is the data access object for table sys_notice.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysNoticeDao struct {
17 | internalSysNoticeDao
18 | }
19 |
20 | var (
21 | // SysNotice is globally public accessible object for table sys_notice operations.
22 | SysNotice = sysNoticeDao{
23 | internal.NewSysNoticeDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/clipboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_job_log.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysJobLogDao is internal type for wrapping internal DAO implements.
12 | type internalSysJobLogDao = *internal.SysJobLogDao
13 |
14 | // sysJobLogDao is the data access object for table sys_job_log.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysJobLogDao struct {
17 | internalSysJobLogDao
18 | }
19 |
20 | var (
21 | // SysJobLog is globally public accessible object for table sys_job_log operations.
22 | SysJobLog = sysJobLogDao{
23 | internal.NewSysJobLogDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/service/sys_dict_data.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 | "go-vue-admin/internal/app/system/model/entity"
11 | )
12 |
13 | type (
14 | ISysDictData interface {
15 | GetDictDataByType(ctx context.Context, dictType string) (dictdata []*entity.SysDictData, err error)
16 | }
17 | )
18 |
19 | var (
20 | localSysDictData ISysDictData
21 | )
22 |
23 | func SysDictData() ISysDictData {
24 | if localSysDictData == nil {
25 | panic("implement not found for interface ISysDictData, forgot register?")
26 | }
27 | return localSysDictData
28 | }
29 |
30 | func RegisterSysDictData(i ISysDictData) {
31 | localSysDictData = i
32 | }
33 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/vite/plugins/compression.js:
--------------------------------------------------------------------------------
1 | import compression from 'vite-plugin-compression'
2 |
3 | export default function createCompression(env) {
4 | const { VITE_BUILD_COMPRESS } = env
5 | const plugin = []
6 | if (VITE_BUILD_COMPRESS) {
7 | const compressList = VITE_BUILD_COMPRESS.split(',')
8 | if (compressList.includes('gzip')) {
9 | // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
10 | plugin.push(
11 | compression({
12 | ext: '.gz',
13 | deleteOriginFile: false
14 | })
15 | )
16 | }
17 | if (compressList.includes('brotli')) {
18 | plugin.push(
19 | compression({
20 | ext: '.br',
21 | algorithm: 'brotliCompress',
22 | deleteOriginFile: false
23 | })
24 | )
25 | }
26 | }
27 | return plugin
28 | }
29 |
--------------------------------------------------------------------------------
/internal/app/system/service/session.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 | "go-vue-admin/internal/app/system/model/entity"
11 | )
12 |
13 | type (
14 | ISession interface {
15 | SetUser(ctx context.Context, user *entity.SysUser) error
16 | GetUser(ctx context.Context) *entity.SysUser
17 | RemoveUser(ctx context.Context) error
18 | }
19 | )
20 |
21 | var (
22 | localSession ISession
23 | )
24 |
25 | func Session() ISession {
26 | if localSession == nil {
27 | panic("implement not found for interface ISession, forgot register?")
28 | }
29 | return localSession
30 | }
31 |
32 | func RegisterSession(i ISession) {
33 | localSession = i
34 | }
35 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/styles/transition.scss:
--------------------------------------------------------------------------------
1 | // global transition css
2 |
3 | /* fade */
4 | .fade-enter-active,
5 | .fade-leave-active {
6 | transition: opacity 0.28s;
7 | }
8 |
9 | .fade-enter,
10 | .fade-leave-active {
11 | opacity: 0;
12 | }
13 |
14 | /* fade-transform */
15 | .fade-transform--move,
16 | .fade-transform-leave-active,
17 | .fade-transform-enter-active {
18 | transition: all .5s;
19 | }
20 |
21 | .fade-transform-enter {
22 | opacity: 0;
23 | transform: translateX(-30px);
24 | }
25 |
26 | .fade-transform-leave-to {
27 | opacity: 0;
28 | transform: translateX(30px);
29 | }
30 |
31 | /* breadcrumb transition */
32 | .breadcrumb-enter-active,
33 | .breadcrumb-leave-active {
34 | transition: all .5s;
35 | }
36 |
37 | .breadcrumb-enter,
38 | .breadcrumb-leave-active {
39 | opacity: 0;
40 | transform: translateX(20px);
41 | }
42 |
43 | .breadcrumb-move {
44 | transition: all .5s;
45 | }
46 |
47 | .breadcrumb-leave-active {
48 | position: absolute;
49 | }
50 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_oper_log.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysOperLogDao is internal type for wrapping internal DAO implements.
12 | type internalSysOperLogDao = *internal.SysOperLogDao
13 |
14 | // sysOperLogDao is the data access object for table sys_oper_log.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysOperLogDao struct {
17 | internalSysOperLogDao
18 | }
19 |
20 | var (
21 | // SysOperLog is globally public accessible object for table sys_oper_log operations.
22 | SysOperLog = sysOperLogDao{
23 | internal.NewSysOperLogDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_notice.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysNotice is the golang structure of table sys_notice for DAO operations like Where/Data.
13 | type SysNotice struct {
14 | g.Meta `orm:"table:sys_notice, do:true"`
15 | NoticeId interface{} // 公告ID
16 | NoticeTitle interface{} // 公告标题
17 | NoticeType interface{} // 公告类型(1通知 2公告)
18 | NoticeContent []byte // 公告内容
19 | Status interface{} // 公告状态(0正常 1关闭)
20 | CreateBy interface{} // 创建者
21 | CreateTime *gtime.Time // 创建时间
22 | UpdateBy interface{} // 更新者
23 | UpdateTime *gtime.Time // 更新时间
24 | Remark interface{} // 备注
25 | }
26 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_dict_data.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysDictDataDao is internal type for wrapping internal DAO implements.
12 | type internalSysDictDataDao = *internal.SysDictDataDao
13 |
14 | // sysDictDataDao is the data access object for table sys_dict_data.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysDictDataDao struct {
17 | internalSysDictDataDao
18 | }
19 |
20 | var (
21 | // SysDictData is globally public accessible object for table sys_dict_data operations.
22 | SysDictData = sysDictDataDao{
23 | internal.NewSysDictDataDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_dict_type.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysDictTypeDao is internal type for wrapping internal DAO implements.
12 | type internalSysDictTypeDao = *internal.SysDictTypeDao
13 |
14 | // sysDictTypeDao is the data access object for table sys_dict_type.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysDictTypeDao struct {
17 | internalSysDictTypeDao
18 | }
19 |
20 | var (
21 | // SysDictType is globally public accessible object for table sys_dict_type operations.
22 | SysDictType = sysDictTypeDao{
23 | internal.NewSysDictTypeDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_role_dept.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysRoleDeptDao is internal type for wrapping internal DAO implements.
12 | type internalSysRoleDeptDao = *internal.SysRoleDeptDao
13 |
14 | // sysRoleDeptDao is the data access object for table sys_role_dept.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysRoleDeptDao struct {
17 | internalSysRoleDeptDao
18 | }
19 |
20 | var (
21 | // SysRoleDept is globally public accessible object for table sys_role_dept operations.
22 | SysRoleDept = sysRoleDeptDao{
23 | internal.NewSysRoleDeptDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_role_menu.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysRoleMenuDao is internal type for wrapping internal DAO implements.
12 | type internalSysRoleMenuDao = *internal.SysRoleMenuDao
13 |
14 | // sysRoleMenuDao is the data access object for table sys_role_menu.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysRoleMenuDao struct {
17 | internalSysRoleMenuDao
18 | }
19 |
20 | var (
21 | // SysRoleMenu is globally public accessible object for table sys_role_menu operations.
22 | SysRoleMenu = sysRoleMenuDao{
23 | internal.NewSysRoleMenuDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_user_post.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysUserPostDao is internal type for wrapping internal DAO implements.
12 | type internalSysUserPostDao = *internal.SysUserPostDao
13 |
14 | // sysUserPostDao is the data access object for table sys_user_post.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysUserPostDao struct {
17 | internalSysUserPostDao
18 | }
19 |
20 | var (
21 | // SysUserPost is globally public accessible object for table sys_user_post operations.
22 | SysUserPost = sysUserPostDao{
23 | internal.NewSysUserPostDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_user_role.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysUserRoleDao is internal type for wrapping internal DAO implements.
12 | type internalSysUserRoleDao = *internal.SysUserRoleDao
13 |
14 | // sysUserRoleDao is the data access object for table sys_user_role.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysUserRoleDao struct {
17 | internalSysUserRoleDao
18 | }
19 |
20 | var (
21 | // SysUserRole is globally public accessible object for table sys_user_role operations.
22 | SysUserRole = sysUserRoleDao{
23 | internal.NewSysUserRoleDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/list.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/service/bizctx.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 | "go-vue-admin/internal/app/system/model"
11 |
12 | "github.com/gogf/gf/v2/net/ghttp"
13 | )
14 |
15 | type (
16 | IBizCtx interface {
17 | Init(r *ghttp.Request, customCtx *model.Context)
18 | Get(ctx context.Context) *model.Context
19 | SetUser(ctx context.Context, ctxUser *model.ContextUser)
20 | }
21 | )
22 |
23 | var (
24 | localBizCtx IBizCtx
25 | )
26 |
27 | func BizCtx() IBizCtx {
28 | if localBizCtx == nil {
29 | panic("implement not found for interface IBizCtx, forgot register?")
30 | }
31 | return localBizCtx
32 | }
33 |
34 | func RegisterBizCtx(i IBizCtx) {
35 | localBizCtx = i
36 | }
37 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_logininfor.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysLogininforDao is internal type for wrapping internal DAO implements.
12 | type internalSysLogininforDao = *internal.SysLogininforDao
13 |
14 | // sysLogininforDao is the data access object for table sys_logininfor.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysLogininforDao struct {
17 | internalSysLogininforDao
18 | }
19 |
20 | var (
21 | // SysLogininfor is globally public accessible object for table sys_logininfor operations.
22 | SysLogininfor = sysLogininforDao{
23 | internal.NewSysLogininforDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/dao/sys_user_online.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalSysUserOnlineDao is internal type for wrapping internal DAO implements.
12 | type internalSysUserOnlineDao = *internal.SysUserOnlineDao
13 |
14 | // sysUserOnlineDao is the data access object for table sys_user_online.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type sysUserOnlineDao struct {
17 | internalSysUserOnlineDao
18 | }
19 |
20 | var (
21 | // SysUserOnline is globally public accessible object for table sys_user_online operations.
22 | SysUserOnline = sysUserOnlineDao{
23 | internal.NewSysUserOnlineDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/system/sys_config.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 |
4 | // 获取参数配置表列表
5 | export function listSysConfig(query) {
6 | return request({
7 | url: '/system/sys/config/list',
8 | method: 'get',
9 | params: query
10 |
11 | })
12 | }
13 |
14 | // 添加参数配置表
15 | export function addSysConfig(query) {
16 | return request({
17 | url: '/system/sys/config',
18 | method: 'post',
19 | data: query
20 |
21 | })
22 | }
23 |
24 | // 修改参数配置表
25 | export function updateSysConfig(query) {
26 | return request({
27 | url: '/system/sys/config',
28 | method: 'put',
29 | data: query
30 |
31 | })
32 | }
33 |
34 | // 删除参数配置表
35 | export function deleteSysConfig(query) {
36 | return request({
37 | url: '/system/sys/config/' + query,
38 | method: 'delete'
39 |
40 | })
41 | }
42 |
43 | // 获取参数配置表
44 | export function getSysConfig(query) {
45 | return request({
46 | url: '/system/sys/config/' + query,
47 | method: 'get'
48 |
49 | })
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/system/sys_dict_type.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 |
4 | // 获取字典类型表列表
5 | export function listSysDictType(query) {
6 | return request({
7 | url: '/system/dict/type/list',
8 | method: 'get',
9 | params: query
10 |
11 | })
12 | }
13 |
14 | // 添加字典类型表
15 | export function addSysDictType(query) {
16 | return request({
17 | url: '/system/dict/type',
18 | method: 'post',
19 | data: query
20 |
21 | })
22 | }
23 |
24 | // 修改字典类型表
25 | export function updateSysDictType(query) {
26 | return request({
27 | url: '/system/dict/type',
28 | method: 'put',
29 | data: query
30 |
31 | })
32 | }
33 |
34 | // 删除字典类型表
35 | export function deleteSysDictType(query) {
36 | return request({
37 | url: '/system/dict/type/' + query,
38 | method: 'delete'
39 |
40 | })
41 | }
42 |
43 | // 获取字典类型表
44 | export function getSysDictType(query) {
45 | return request({
46 | url: '/system/dict/type/' + query,
47 | method: 'get'
48 |
49 | })
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/download.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/dao/gen_table_column.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
3 | // =================================================================================
4 |
5 | package dao
6 |
7 | import (
8 | "go-vue-admin/internal/app/system/dao/internal"
9 | )
10 |
11 | // internalGenTableColumnDao is internal type for wrapping internal DAO implements.
12 | type internalGenTableColumnDao = *internal.GenTableColumnDao
13 |
14 | // genTableColumnDao is the data access object for table gen_table_column.
15 | // You can define custom methods on it to extend its functionality as you wish.
16 | type genTableColumnDao struct {
17 | internalGenTableColumnDao
18 | }
19 |
20 | var (
21 | // GenTableColumn is globally public accessible object for table gen_table_column operations.
22 | GenTableColumn = genTableColumnDao{
23 | internal.NewGenTableColumnDao(),
24 | }
25 | )
26 |
27 | // Fill with you ideas below.
28 |
--------------------------------------------------------------------------------
/internal/app/system/service/sys_user_post.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 |
11 | "github.com/gogf/gf/v2/database/gdb"
12 | )
13 |
14 | type (
15 | ISysUserPost interface {
16 | GetPostIdByUid(ctx context.Context, uid int64) (postId []int64, err error)
17 | AddUserPosts(ctx context.Context, tx gdb.TX, userId int64, PostIds []int64) (err error)
18 | }
19 | )
20 |
21 | var (
22 | localSysUserPost ISysUserPost
23 | )
24 |
25 | func SysUserPost() ISysUserPost {
26 | if localSysUserPost == nil {
27 | panic("implement not found for interface ISysUserPost, forgot register?")
28 | }
29 | return localSysUserPost
30 | }
31 |
32 | func RegisterSysUserPost(i ISysUserPost) {
33 | localSysUserPost = i
34 | }
35 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_job_log.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysJobLog is the golang structure for table sys_job_log.
12 | type SysJobLog struct {
13 | JobLogId int64 `json:"jobLogId" description:"任务日志ID"`
14 | JobName string `json:"jobName" description:"任务名称"`
15 | JobGroup string `json:"jobGroup" description:"任务组名"`
16 | InvokeTarget string `json:"invokeTarget" description:"调用目标字符串"`
17 | JobMessage string `json:"jobMessage" description:"日志信息"`
18 | Status string `json:"status" description:"执行状态(0正常 1失败)"`
19 | ExceptionInfo string `json:"exceptionInfo" description:"异常信息"`
20 | CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
21 | }
22 |
--------------------------------------------------------------------------------
/internal/app/system/service/sys_role_dept.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 |
11 | "github.com/gogf/gf/v2/database/gdb"
12 | )
13 |
14 | type (
15 | ISysRoleDept interface {
16 | GetDeptIdsByRoleid(ctx context.Context, roleId int64) (deptIds []int64, err error)
17 | AddRoleDepts(ctx context.Context, tx gdb.TX, roleId int64, DeptIds []int64) (err error)
18 | }
19 | )
20 |
21 | var (
22 | localSysRoleDept ISysRoleDept
23 | )
24 |
25 | func SysRoleDept() ISysRoleDept {
26 | if localSysRoleDept == nil {
27 | panic("implement not found for interface ISysRoleDept, forgot register?")
28 | }
29 | return localSysRoleDept
30 | }
31 |
32 | func RegisterSysRoleDept(i ISysRoleDept) {
33 | localSysRoleDept = i
34 | }
35 |
--------------------------------------------------------------------------------
/internal/app/system/service/sys_role_menu.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 |
11 | "github.com/gogf/gf/v2/database/gdb"
12 | )
13 |
14 | type (
15 | ISysRoleMenu interface {
16 | AddRoleMenus(ctx context.Context, tx gdb.TX, roleId int64, MenuIds []int64) (err error)
17 | GetMenuIdsByRoleId(ctx context.Context, roleId int64) (menuIds []int64, err error)
18 | }
19 | )
20 |
21 | var (
22 | localSysRoleMenu ISysRoleMenu
23 | )
24 |
25 | func SysRoleMenu() ISysRoleMenu {
26 | if localSysRoleMenu == nil {
27 | panic("implement not found for interface ISysRoleMenu, forgot register?")
28 | }
29 | return localSysRoleMenu
30 | }
31 |
32 | func RegisterSysRoleMenu(i ISysRoleMenu) {
33 | localSysRoleMenu = i
34 | }
35 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_user_online.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysUserOnline is the golang structure of table sys_user_online for DAO operations like Where/Data.
13 | type SysUserOnline struct {
14 | g.Meta `orm:"table:sys_user_online, do:true"`
15 | SessionId interface{} // 用户会话id
16 | LoginName interface{} // 登录账号
17 | DeptName interface{} // 部门名称
18 | Ipaddr interface{} // 登录IP地址
19 | LoginLocation interface{} // 登录地点
20 | Browser interface{} // 浏览器类型
21 | Os interface{} // 操作系统
22 | Status interface{} // 在线状态on_line在线off_line离线
23 | StartTimestamp *gtime.Time // session创建时间
24 | LastAccessTime *gtime.Time // session最后访问时间
25 | ExpireTime interface{} // 超时时间,单位为分钟
26 | }
27 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_dict_type.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysDictType is the golang structure for table sys_dict_type.
12 | type SysDictType struct {
13 | DictId int64 `json:"dictId" description:"字典主键"`
14 | DictName string `json:"dictName" description:"字典名称"`
15 | DictType string `json:"dictType" description:"字典类型"`
16 | Status string `json:"status" description:"状态(0正常 1停用)"`
17 | CreateBy string `json:"createBy" description:"创建者"`
18 | CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
19 | UpdateBy string `json:"updateBy" description:"更新者"`
20 | UpdateTime *gtime.Time `json:"updateTime" description:"更新时间"`
21 | Remark string `json:"remark" description:"备注"`
22 | }
23 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/system/dept.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询部门列表
4 | export function listDept(query) {
5 | return request({
6 | url: '/system/dept/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询部门列表(排除节点)
13 | export function listDeptExcludeChild(deptId) {
14 | return request({
15 | url: '/system/dept/list/exclude/' + deptId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 查询部门详细
21 | export function getDept(deptId) {
22 | return request({
23 | url: '/system/dept/' + deptId,
24 | method: 'get'
25 | })
26 | }
27 |
28 | // 新增部门
29 | export function addDept(data) {
30 | return request({
31 | url: '/system/dept',
32 | method: 'post',
33 | data: data
34 | })
35 | }
36 |
37 | // 修改部门
38 | export function updateDept(data) {
39 | return request({
40 | url: '/system/dept',
41 | method: 'put',
42 | data: data
43 | })
44 | }
45 |
46 | // 删除部门
47 | export function delDept(deptId) {
48 | return request({
49 | url: '/system/dept/' + deptId,
50 | method: 'delete'
51 | })
52 | }
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_dept.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysDept is the golang structure of table sys_dept for DAO operations like Where/Data.
13 | type SysDept struct {
14 | g.Meta `orm:"table:sys_dept, do:true"`
15 | DeptId interface{} // 部门id
16 | ParentId interface{} // 父部门id
17 | Ancestors interface{} // 祖级列表
18 | DeptName interface{} // 部门名称
19 | OrderNum interface{} // 显示顺序
20 | Leader interface{} // 负责人
21 | Phone interface{} // 联系电话
22 | Email interface{} // 邮箱
23 | Status interface{} // 部门状态(0正常 1停用)
24 | DelFlag interface{} // 删除标志(0代表存在 2代表删除)
25 | CreateBy interface{} // 创建者
26 | CreateTime *gtime.Time // 创建时间
27 | UpdateBy interface{} // 更新者
28 | UpdateTime *gtime.Time // 更新时间
29 | }
30 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_dict_data.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysDictData is the golang structure of table sys_dict_data for DAO operations like Where/Data.
13 | type SysDictData struct {
14 | g.Meta `orm:"table:sys_dict_data, do:true"`
15 | DictCode interface{} // 字典编码
16 | DictSort interface{} // 字典排序
17 | DictLabel interface{} // 字典标签
18 | DictValue interface{} // 字典键值
19 | DictType interface{} // 字典类型
20 | CssClass interface{} // 样式属性(其他样式扩展)
21 | ListClass interface{} // 表格回显样式
22 | IsDefault interface{} // 是否默认(Y是 N否)
23 | Status interface{} // 状态(0正常 1停用)
24 | CreateBy interface{} // 创建者
25 | CreateTime *gtime.Time // 创建时间
26 | UpdateBy interface{} // 更新者
27 | UpdateTime *gtime.Time // 更新时间
28 | Remark interface{} // 备注
29 | }
30 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/international.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_post.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysPost is the golang structure for table sys_post.
12 | type SysPost struct {
13 | PostId int64 `json:"postId" description:"岗位ID"`
14 | PostCode string `json:"postCode" description:"岗位编码"`
15 | PostName string `json:"postName" description:"岗位名称"`
16 | PostSort int `json:"postSort" description:"显示顺序"`
17 | Status string `json:"status" description:"状态(0正常 1停用)"`
18 | CreateBy string `json:"createBy" description:"创建者"`
19 | CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
20 | UpdateBy string `json:"updateBy" description:"更新者"`
21 | UpdateTime *gtime.Time `json:"updateTime" description:"更新时间"`
22 | Remark string `json:"remark" description:"备注"`
23 | }
24 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/question.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_job.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysJob is the golang structure of table sys_job for DAO operations like Where/Data.
13 | type SysJob struct {
14 | g.Meta `orm:"table:sys_job, do:true"`
15 | JobId interface{} // 任务ID
16 | JobName interface{} // 任务名称
17 | JobGroup interface{} // 任务组名
18 | InvokeTarget interface{} // 调用目标字符串
19 | CronExpression interface{} // cron执行表达式
20 | MisfirePolicy interface{} // 计划执行错误策略(1立即执行 2执行一次 3放弃执行)
21 | Concurrent interface{} // 是否并发执行(0允许 1禁止)
22 | Status interface{} // 状态(0正常 1暂停)
23 | CreateBy interface{} // 创建者
24 | CreateTime *gtime.Time // 创建时间
25 | UpdateBy interface{} // 更新者
26 | UpdateTime *gtime.Time // 更新时间
27 | Remark interface{} // 备注信息
28 | }
29 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/login.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 登录方法
4 | export function login(userName, password, code,verifyKey, uuid) {
5 | const data = {
6 | userName,
7 | password,
8 | code,
9 | verifyKey,
10 | uuid
11 | }
12 | return request({
13 | url: '/login',
14 | headers: {
15 | isToken: false
16 | },
17 | method: 'post',
18 | data: data
19 | })
20 | }
21 |
22 | // 注册方法
23 | export function register(data) {
24 | return request({
25 | url: '/register',
26 | headers: {
27 | isToken: false
28 | },
29 | method: 'post',
30 | data: data
31 | })
32 | }
33 |
34 | // 获取用户详细信息
35 | export function getInfo() {
36 | return request({
37 | url: 'getInfo',
38 | method: 'get'
39 | })
40 | }
41 |
42 | // 退出方法
43 | export function logout() {
44 | return request({
45 | url: '/logout',
46 | method: 'post'
47 | })
48 | }
49 |
50 | // 获取验证码
51 | export function getCodeImg() {
52 | return request({
53 | url: '/captchaImage',
54 | headers: {
55 | isToken: false
56 | },
57 | method: 'get',
58 | timeout: 20000
59 | })
60 | }
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_logininfor.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysLogininfor is the golang structure for table sys_logininfor.
12 | type SysLogininfor struct {
13 | InfoId int64 `json:"infoId" description:"访问ID"`
14 | UserName string `json:"userName" description:"用户账号"`
15 | Ipaddr string `json:"ipaddr" description:"登录IP地址"`
16 | LoginLocation string `json:"loginLocation" description:"登录地点"`
17 | Browser string `json:"browser" description:"浏览器类型"`
18 | Os string `json:"os" description:"操作系统"`
19 | Status string `json:"status" description:"登录状态(0成功 1失败)"`
20 | Msg string `json:"msg" description:"提示消息"`
21 | LoginTime *gtime.Time `json:"loginTime" description:"访问时间"`
22 | }
23 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/system/dict/data.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询字典数据列表
4 | export function listData(query) {
5 | return request({
6 | url: '/system/dict/data/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询字典数据详细
13 | export function getData(dictCode) {
14 | return request({
15 | url: '/system/dict/data',
16 | method: 'get',
17 | params:{dictCode}
18 | })
19 | }
20 |
21 | // 根据字典类型查询字典数据信息
22 | export function getDicts(dictType) {
23 | return request({
24 | url: '/system/dict/type',
25 | method: 'get',
26 | params:{dictType}
27 | })
28 | }
29 |
30 | // 新增字典数据
31 | export function addData(data) {
32 | return request({
33 | url: '/system/dict/data',
34 | method: 'post',
35 | data: data
36 | })
37 | }
38 |
39 | // 修改字典数据
40 | export function updateData(data) {
41 | return request({
42 | url: '/system/dict/data',
43 | method: 'put',
44 | data: data
45 | })
46 | }
47 |
48 | // 删除字典数据
49 | export function delData(dictCode) {
50 | return request({
51 | url: '/system/dict/data/' + dictCode,
52 | method: 'delete'
53 | })
54 | }
55 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_config.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysConfig is the golang structure for table sys_config.
12 | type SysConfig struct {
13 | ConfigId int `json:"configId" description:"参数主键"`
14 | ConfigName string `json:"configName" description:"参数名称"`
15 | ConfigKey string `json:"configKey" description:"参数键名"`
16 | ConfigValue string `json:"configValue" description:"参数键值"`
17 | ConfigType string `json:"configType" description:"系统内置(Y是 N否)"`
18 | CreateBy string `json:"createBy" description:"创建者"`
19 | CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
20 | UpdateBy string `json:"updateBy" description:"更新者"`
21 | UpdateTime *gtime.Time `json:"updateTime" description:"更新时间"`
22 | Remark string `json:"remark" description:"备注"`
23 | }
24 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/system/config.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取参数配置表列表
4 | export function listSysConfig(query) {
5 | return request({
6 | url: '/system/sys/config/list',
7 | method: 'get',
8 | params: query
9 |
10 | })
11 | }
12 |
13 | // 添加参数配置表
14 | export function addSysConfig(query) {
15 | return request({
16 | url: '/system/sys/config',
17 | method: 'post',
18 | data: query
19 |
20 | })
21 | }
22 |
23 | // 修改参数配置表
24 | export function updateSysConfig(query) {
25 | return request({
26 | url: '/system/sys/config',
27 | method: 'put',
28 | data: query
29 |
30 | })
31 | }
32 |
33 | // 删除参数配置表
34 | export function deleteSysConfig(query) {
35 | return request({
36 | url: '/system/sys/config/' + query,
37 | method: 'delete'
38 |
39 | })
40 | }
41 |
42 | // 获取参数配置表
43 | export function getSysConfig(query) {
44 | return request({
45 | url: '/system/sys/config/' + query,
46 | method: 'get'
47 |
48 | })
49 | }
50 |
51 | // 刷新参数缓存
52 | export function refreshCache() {
53 | return request({
54 | url: '/system/config/refreshCache',
55 | method: 'delete'
56 | })
57 | }
58 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/SvgIcon/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
36 |
37 |
54 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/wechat.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Guo Zhiqiang and The Contributors All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/layout/components/AppMain.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
21 |
45 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/skill.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/people.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_notice.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysNotice is the golang structure for table sys_notice.
12 | type SysNotice struct {
13 | NoticeId int `json:"noticeId" description:"公告ID"`
14 | NoticeTitle string `json:"noticeTitle" description:"公告标题"`
15 | NoticeType string `json:"noticeType" description:"公告类型(1通知 2公告)"`
16 | NoticeContent []byte `json:"noticeContent" description:"公告内容"`
17 | Status string `json:"status" description:"公告状态(0正常 1关闭)"`
18 | CreateBy string `json:"createBy" description:"创建者"`
19 | CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
20 | UpdateBy string `json:"updateBy" description:"更新者"`
21 | UpdateTime *gtime.Time `json:"updateTime" description:"更新时间"`
22 | Remark string `json:"remark" description:"备注"`
23 | }
24 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/post.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/logic/bizctx/bizctx.go:
--------------------------------------------------------------------------------
1 | package bizctx
2 |
3 | import (
4 | "context"
5 | "github.com/gogf/gf/v2/net/ghttp"
6 | "go-vue-admin/internal/app/system/consts"
7 | "go-vue-admin/internal/app/system/model"
8 | "go-vue-admin/internal/app/system/service"
9 | )
10 |
11 | type (
12 | sBizCtx struct{}
13 | )
14 |
15 | func init() {
16 | service.RegisterBizCtx(New())
17 | }
18 |
19 | func New() service.IBizCtx {
20 | return &sBizCtx{}
21 | }
22 |
23 | // Init initializes and injects custom business context object into request context.
24 | func (s *sBizCtx) Init(r *ghttp.Request, customCtx *model.Context) {
25 | r.SetCtxVar(consts.ContextKey, customCtx)
26 | }
27 |
28 | // Get retrieves and returns the user object from context.
29 | // It returns nil if nothing found in given context.
30 | func (s *sBizCtx) Get(ctx context.Context) *model.Context {
31 | value := ctx.Value(consts.ContextKey)
32 | if value == nil {
33 | return nil
34 | }
35 | if localCtx, ok := value.(*model.Context); ok {
36 | return localCtx
37 | }
38 | return nil
39 | }
40 |
41 | // SetUser injects business user object into context.
42 | func (s *sBizCtx) SetUser(ctx context.Context, ctxUser *model.ContextUser) {
43 | s.Get(ctx).User = ctxUser
44 | }
45 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/system/menu.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询菜单列表
4 | export function listMenu(query) {
5 | return request({
6 | url: '/system/menu/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询菜单详细
13 | export function getMenu(menuId) {
14 | return request({
15 | url: '/system/menu/' + menuId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 查询菜单下拉树结构
21 | export function treeselect() {
22 | return request({
23 | url: '/system/menu/treeselect',
24 | method: 'get'
25 | })
26 | }
27 |
28 | // 根据角色ID查询菜单下拉树结构
29 | export function roleMenuTreeselect(roleId) {
30 | return request({
31 | url: '/system/menu/roleMenuTreeselect/' + roleId,
32 | method: 'get'
33 | })
34 | }
35 |
36 | // 新增菜单
37 | export function addMenu(data) {
38 | return request({
39 | url: '/system/menu',
40 | method: 'post',
41 | data: data
42 | })
43 | }
44 |
45 | // 修改菜单
46 | export function updateMenu(data) {
47 | return request({
48 | url: '/system/menu',
49 | method: 'put',
50 | data: data
51 | })
52 | }
53 |
54 | // 删除菜单
55 | export function delMenu(menuId) {
56 | return request({
57 | url: '/system/menu/' + menuId,
58 | method: 'delete'
59 | })
60 | }
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/language.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/checkbox.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_role.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysRole is the golang structure of table sys_role for DAO operations like Where/Data.
13 | type SysRole struct {
14 | g.Meta `orm:"table:sys_role, do:true"`
15 | RoleId interface{} // 角色ID
16 | RoleName interface{} // 角色名称
17 | RoleKey interface{} // 角色权限字符串
18 | RoleSort interface{} // 显示顺序
19 | DataScope interface{} // 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)
20 | MenuCheckStrictly interface{} // 菜单树选择项是否关联显示
21 | DeptCheckStrictly interface{} // 部门树选择项是否关联显示
22 | Status interface{} // 角色状态(0正常 1停用)
23 | DelFlag interface{} // 删除标志(0代表存在 2代表删除)
24 | CreateBy interface{} // 创建者
25 | CreateTime *gtime.Time // 创建时间
26 | UpdateBy interface{} // 更新者
27 | UpdateTime *gtime.Time // 更新时间
28 | Remark interface{} // 备注
29 | }
30 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/utils/jsencrypt.js:
--------------------------------------------------------------------------------
1 | import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
2 |
3 | // 密钥对生成 http://web.chacuo.net/netrsakeypair
4 |
5 | const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' +
6 | 'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
7 |
8 | const privateKey = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n' +
9 | '7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN\n' +
10 | 'PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA\n' +
11 | 'kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow\n' +
12 | 'cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv\n' +
13 | 'DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh\n' +
14 | 'YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3\n' +
15 | 'UP8iWi1Qw0Y='
16 |
17 | // 加密
18 | export function encrypt(txt) {
19 | const encryptor = new JSEncrypt()
20 | encryptor.setPublicKey(publicKey) // 设置公钥
21 | return encryptor.encrypt(txt) // 对数据进行加密
22 | }
23 |
24 | // 解密
25 | export function decrypt(txt) {
26 | const encryptor = new JSEncrypt()
27 | encryptor.setPrivateKey(privateKey) // 设置私钥
28 | return encryptor.decrypt(txt) // 对数据进行解密
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/internal/app/system/controller/post/post.go:
--------------------------------------------------------------------------------
1 | package post
2 |
3 | import (
4 | "context"
5 | v1 "go-vue-admin/api/v1"
6 | "go-vue-admin/internal/app/system/service"
7 | )
8 |
9 | type postController struct {
10 | }
11 |
12 | var Post = postController{}
13 |
14 | func (s *postController) GetPostList(ctx context.Context, req *v1.GetPostListReq) (res *v1.GetPostListRes, err error) {
15 | res, err = service.SysPost().GetPostList(ctx, req)
16 | return
17 | }
18 | func (s *postController) Add(ctx context.Context, req *v1.PostPostAddReq) (res *v1.PostPostAddRes, err error) {
19 | err = service.SysPost().Add(ctx, req)
20 | return
21 | }
22 | func (s *postController) Update(ctx context.Context, req *v1.PutPostUpdateReq) (res *v1.PutPostUpdateRes, err error) {
23 | err = service.SysPost().Update(ctx, req)
24 | return
25 | }
26 | func (s *postController) Delete(ctx context.Context, req *v1.DeletePostReq) (res *v1.DeletePostRes, err error) {
27 | err = service.SysPost().Delete(ctx, req)
28 | return
29 | }
30 |
31 | // 获取岗位部门数据
32 | func (c *postController) GetPostUpdate(ctx context.Context, req *v1.GetPostUpdateReq) (res *v1.GetPostUpdateRes, err error) {
33 | res = &v1.GetPostUpdateRes{}
34 | res.SysPost, err = service.SysPost().GetPostById(ctx, req.PostId)
35 | return
36 | }
37 |
--------------------------------------------------------------------------------
/internal/app/system/service/gen_table_column.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 | "go-vue-admin/internal/app/system/model/entity"
11 | )
12 |
13 | type (
14 | IGenTableColumn interface {
15 | GetTableColumnByIds(ctx context.Context, ids []int64) (columnMap map[int64]*entity.GenTableColumn, err error)
16 | GetTableColumnByTableId(ctx context.Context, tableId int64) (tableColumn []*entity.GenTableColumn, err error)
17 | GetTableColumnByTableIds(ctx context.Context, tableIds []int64) (tableMap map[string][]*entity.GenTableColumn, err error)
18 | }
19 | )
20 |
21 | var (
22 | localGenTableColumn IGenTableColumn
23 | )
24 |
25 | func GenTableColumn() IGenTableColumn {
26 | if localGenTableColumn == nil {
27 | panic("implement not found for interface IGenTableColumn, forgot register?")
28 | }
29 | return localGenTableColumn
30 | }
31 |
32 | func RegisterGenTableColumn(i IGenTableColumn) {
33 | localGenTableColumn = i
34 | }
35 |
--------------------------------------------------------------------------------
/manifest/config/config.yaml:
--------------------------------------------------------------------------------
1 | server:
2 | address: ":8000"
3 | dumpRouterMap: true
4 | routeOverWrite: true
5 | accessLogEnabled: true
6 | openapiPath: "/api.json"
7 | swaggerPath: "/swagger"
8 | jwtSecretKey: "asd2333fliroeqnv85sdqzlf"
9 |
10 | logger:
11 | level : "all"
12 | stdout: true
13 |
14 | # Database.
15 | database:
16 | logger:
17 | level: "all"
18 | stdout: true
19 | Path: "resource/log/sql"
20 |
21 | default:
22 | link: "mysql:root:123456@tcp(127.0.0.1:3306)/gvadmindb?charset=utf8mb4&parseTime=true&loc=Local"
23 | debug: true
24 | charset: "utf8mb4" #数据库编码
25 | dryRun: false #空跑
26 | maxIdle: 10 #连接池最大闲置的连接数
27 | maxOpen: 10 #连接池最大打开的连接数
28 | maxLifetime: "30s" #(单位秒)连接对象可重复使用的时间长度
29 | # Redis 配置示例
30 | redis:
31 | # 单实例配置
32 | default:
33 | address: 127.0.0.1:6379
34 | db: 1
35 | # pass: "password" # 在此配置密码, 没有可去掉
36 | idleTimeout: "60s" #连接最大空闲时间,使用时间字符串例如30s/1m/1d
37 | maxConnLifetime: "90s" #连接最长存活时间,使用时间字符串例如30s/1m/1d
38 | waitTimeout: "60s" #等待连接池连接的超时时间,使用时间字符串例如30s/1m/1d
39 | dialTimeout: "30s" #TCP连接的超时时间,使用时间字符串例如30s/1m/1d
40 | readTimeout: "30s" #TCP的Read操作超时时间,使用时间字符串例如30s/1m/1d
41 | writeTimeout: "30s" #TCP的Write操作超时时间,使用时间字符串例如30s/1m/1d
42 | maxActive: 100
43 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/eye-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/system/dict/type.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询字典类型列表
4 | export function listType(query) {
5 | return request({
6 | url: '/system/dict/type/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询字典类型详细
13 | export function getType(dictId) {
14 | return request({
15 | url: '/system/dict/type/get',
16 | method: 'get',
17 | params:{dictId}
18 | })
19 | }
20 |
21 | // 新增字典类型
22 | export function addType(data) {
23 | return request({
24 | url: '/system/dict/type',
25 | method: 'post',
26 | data: data
27 | })
28 | }
29 |
30 | // 修改字典类型
31 | export function updateType(data) {
32 | return request({
33 | url: '/system/dict/type',
34 | method: 'put',
35 | data: data
36 | })
37 | }
38 |
39 | // 删除字典类型
40 | export function delType(dictId) {
41 | return request({
42 | url: '/system/dict/type/' + dictId,
43 | method: 'delete'
44 | })
45 | }
46 |
47 | // 刷新字典缓存
48 | export function refreshCache() {
49 | return request({
50 | url: '/system/dict/type/refreshCache',
51 | method: 'delete'
52 | })
53 | }
54 |
55 | // 获取字典选择框列表
56 | export function optionselect() {
57 | return request({
58 | url: '/system/dict/type/optionselect',
59 | method: 'get'
60 | })
61 | }
62 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_oper_log.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysOperLog is the golang structure of table sys_oper_log for DAO operations like Where/Data.
13 | type SysOperLog struct {
14 | g.Meta `orm:"table:sys_oper_log, do:true"`
15 | OperId interface{} // 日志主键
16 | Title interface{} // 模块标题
17 | BusinessType interface{} // 业务类型(0其它 1新增 2修改 3删除)
18 | Method interface{} // 方法名称
19 | RequestMethod interface{} // 请求方式
20 | OperatorType interface{} // 操作类别(0其它 1后台用户 2手机端用户)
21 | OperName interface{} // 操作人员
22 | DeptName interface{} // 部门名称
23 | OperUrl interface{} // 请求URL
24 | OperIp interface{} // 主机地址
25 | OperLocation interface{} // 操作地点
26 | OperParam interface{} // 请求参数
27 | JsonResult interface{} // 返回参数
28 | Status interface{} // 操作状态(0正常 1异常)
29 | ErrorMsg interface{} // 错误消息
30 | OperTime *gtime.Time // 操作时间
31 | CostTime interface{} // 消耗时间
32 | }
33 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/monitor/cache.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询缓存详细
4 | export function getCache() {
5 | return request({
6 | url: '/monitor/cache',
7 | method: 'get'
8 | })
9 | }
10 |
11 | // 查询缓存名称列表
12 | export function listCacheName() {
13 | return request({
14 | url: '/monitor/cache/getNames',
15 | method: 'get'
16 | })
17 | }
18 |
19 | // 查询缓存键名列表
20 | export function listCacheKey(cacheName) {
21 | return request({
22 | url: '/monitor/cache/getKeys/' + cacheName,
23 | method: 'get'
24 | })
25 | }
26 |
27 | // 查询缓存内容
28 | export function getCacheValue(cacheName, cacheKey) {
29 | return request({
30 | url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
31 | method: 'get'
32 | })
33 | }
34 |
35 | // 清理指定名称缓存
36 | export function clearCacheName(cacheName) {
37 | return request({
38 | url: '/monitor/cache/clearCacheName/' + cacheName,
39 | method: 'delete'
40 | })
41 | }
42 |
43 | // 清理指定键名缓存
44 | export function clearCacheKey(cacheKey) {
45 | return request({
46 | url: '/monitor/cache/clearCacheKey/' + cacheKey,
47 | method: 'delete'
48 | })
49 | }
50 |
51 | // 清理全部缓存
52 | export function clearCacheAll() {
53 | return request({
54 | url: '/monitor/cache/clearCacheAll',
55 | method: 'delete'
56 | })
57 | }
58 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_user.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysUser is the golang structure of table sys_user for DAO operations like Where/Data.
13 | type SysUser struct {
14 | g.Meta `orm:"table:sys_user, do:true"`
15 | UserId interface{} // 用户ID
16 | DeptId interface{} // 部门ID
17 | UserName interface{} // 用户账号
18 | NickName interface{} // 用户昵称
19 | UserType interface{} // 用户类型(00系统用户)
20 | Email interface{} // 用户邮箱
21 | Phonenumber interface{} // 手机号码
22 | Sex interface{} // 用户性别(0男 1女 2未知)
23 | Avatar interface{} // 头像地址
24 | Password interface{} // 密码
25 | Status interface{} // 帐号状态(0正常 1停用)
26 | DelFlag interface{} // 删除标志(0代表存在 2代表删除)
27 | LoginIp interface{} // 最后登录IP
28 | LoginDate *gtime.Time // 最后登录时间
29 | CreateBy interface{} // 创建者
30 | CreateTime *gtime.Time // 创建时间
31 | UpdateBy interface{} // 更新者
32 | UpdateTime *gtime.Time // 更新时间
33 | Remark interface{} // 备注
34 | }
35 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/DictTag/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ item.label }}
11 | {{ item.label }}
19 |
20 |
21 |
22 |
23 |
24 |
44 |
45 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/Hamburger/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
29 |
30 |
42 |
--------------------------------------------------------------------------------
/internal/app/system/controller/sys_config/sys_config.go:
--------------------------------------------------------------------------------
1 | package sys_config
2 |
3 | import (
4 | "context"
5 | v1 "go-vue-admin/api/v1"
6 | "go-vue-admin/internal/app/system/service"
7 | )
8 |
9 | type sysConfigController struct {
10 | }
11 |
12 | var SysConfig = sysConfigController{}
13 |
14 | func (s *sysConfigController) GetSysConfigList(ctx context.Context, req *v1.GetSysConfigListReq) (res *v1.GetSysConfigListRes, err error) {
15 | res, err = service.SysConfig().GetSysConfigList(ctx, req)
16 | return
17 | }
18 |
19 | func (s *sysConfigController) Add(ctx context.Context, req *v1.PostSysConfigReq) (res *v1.PostSysConfigRes, err error) {
20 | res, err = service.SysConfig().Add(ctx, req)
21 | return
22 | }
23 |
24 | func (s *sysConfigController) Update(ctx context.Context, req *v1.PutSysConfigReq) (res *v1.PutSysConfigRes, err error) {
25 | res, err = service.SysConfig().Update(ctx, req)
26 | return
27 | }
28 |
29 | func (s *sysConfigController) Delete(ctx context.Context, req *v1.DeleteSysConfigReq) (res *v1.DeleteSysConfigRes, err error) {
30 | res, err = service.SysConfig().Delete(ctx, req)
31 | return
32 | }
33 |
34 | func (s *sysConfigController) GetSysConfig(ctx context.Context, req *v1.GetSysConfigReq) (res *v1.GetSysConfigRes, err error) {
35 | res, err = service.SysConfig().GetSysConfig(ctx, req)
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_user_online.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysUserOnline is the golang structure for table sys_user_online.
12 | type SysUserOnline struct {
13 | SessionId string `json:"sessionId" description:"用户会话id"`
14 | LoginName string `json:"loginName" description:"登录账号"`
15 | DeptName string `json:"deptName" description:"部门名称"`
16 | Ipaddr string `json:"ipaddr" description:"登录IP地址"`
17 | LoginLocation string `json:"loginLocation" description:"登录地点"`
18 | Browser string `json:"browser" description:"浏览器类型"`
19 | Os string `json:"os" description:"操作系统"`
20 | Status string `json:"status" description:"在线状态on_line在线off_line离线"`
21 | StartTimestamp *gtime.Time `json:"startTimestamp" description:"session创建时间"`
22 | LastAccessTime *gtime.Time `json:"lastAccessTime" description:"session最后访问时间"`
23 | ExpireTime int `json:"expireTime" description:"超时时间,单位为分钟"`
24 | }
25 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/validCode.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/sys_menu.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // SysMenu is the golang structure of table sys_menu for DAO operations like Where/Data.
13 | type SysMenu struct {
14 | g.Meta `orm:"table:sys_menu, do:true"`
15 | MenuId interface{} // 菜单ID
16 | MenuName interface{} // 菜单名称
17 | ParentId interface{} // 父菜单ID
18 | OrderNum interface{} // 显示顺序
19 | Path interface{} // 路由地址
20 | ApiPath interface{} // 后台api路径
21 | Component interface{} // 组件路径
22 | Query interface{} // 路由参数
23 | IsFrame interface{} // 是否为外链(0是 1否)
24 | IsCache interface{} // 是否缓存(0缓存 1不缓存)
25 | MenuType interface{} // 菜单类型(M目录 C菜单 F按钮)
26 | Visible interface{} // 菜单状态(0显示 1隐藏)
27 | Status interface{} // 菜单状态(0正常 1停用)
28 | Perms interface{} // 权限标识
29 | Icon interface{} // 菜单图标
30 | CreateBy interface{} // 创建者
31 | CreateTime *gtime.Time // 创建时间
32 | UpdateBy interface{} // 更新者
33 | UpdateTime *gtime.Time // 更新时间
34 | Remark interface{} // 备注
35 | }
36 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/radio.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/select.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "go-admin",
3 | "version": "1.0.0",
4 | "description": "goadmin管理系统",
5 | "author": "goadmin",
6 | "license": "MIT",
7 | "scripts": {
8 | "dev": "vite",
9 | "build:prod": "vite build",
10 | "build:stage": "vite build --mode staging",
11 | "preview": "vite preview"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "https://gitee.com/y_project/RuoYi-Vue.git"
16 | },
17 | "dependencies": {
18 | "@element-plus/icons-vue": "2.0.10",
19 | "@vueup/vue-quill": "1.1.0",
20 | "@vueuse/core": "9.5.0",
21 | "axios": "0.27.2",
22 | "echarts": "5.4.0",
23 | "element-plus": "2.2.27",
24 | "file-saver": "2.0.5",
25 | "fuse.js": "6.6.2",
26 | "js-cookie": "3.0.1",
27 | "jsencrypt": "3.3.1",
28 | "nprogress": "0.2.0",
29 | "pinia": "2.0.22",
30 | "vue": "3.2.45",
31 | "vue-cropper": "1.0.3",
32 | "vue-router": "4.1.4",
33 | "js-beautify": "1.13.0",
34 | "vuedraggable": "2.24.3"
35 | },
36 | "devDependencies": {
37 | "@vitejs/plugin-vue": "3.1.0",
38 | "@vue/compiler-sfc": "3.2.45",
39 | "sass": "1.56.1",
40 | "unplugin-auto-import": "0.11.4",
41 | "vite": "3.2.3",
42 | "vite-plugin-compression": "0.5.1",
43 | "vite-plugin-svg-icons": "2.0.1",
44 | "vite-plugin-vue-setup-extend": "0.4.0"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/internal/app/system/service/sys_user_role.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 |
11 | "github.com/gogf/gf/v2/database/gdb"
12 | )
13 |
14 | type (
15 | ISysUserRole interface {
16 | AddUserRoles(ctx context.Context, tx gdb.TX, userId int64, roleIds []int64) (err error)
17 | // 角色分配用户
18 | AddRoleUsers(ctx context.Context, tx gdb.TX, roleId int64, userIds []int64) (err error)
19 | // 取消角色分配用户
20 | CancelRoleUsers(ctx context.Context, tx gdb.TX, roleId int64, userIds []int64) (err error)
21 | GetRoleIdByUid(ctx context.Context, uid int64) (roleId []int64, err error)
22 | GetUserIdByRoleId(ctx context.Context, roleId int64) (userId []int64, err error)
23 | }
24 | )
25 |
26 | var (
27 | localSysUserRole ISysUserRole
28 | )
29 |
30 | func SysUserRole() ISysUserRole {
31 | if localSysUserRole == nil {
32 | panic("implement not found for interface ISysUserRole, forgot register?")
33 | }
34 | return localSysUserRole
35 | }
36 |
37 | func RegisterSysUserRole(i ISysUserRole) {
38 | localSysUserRole = i
39 | }
40 |
--------------------------------------------------------------------------------
/internal/app/system/logic/session/session.go:
--------------------------------------------------------------------------------
1 | package session
2 |
3 | import (
4 | "context"
5 | "go-vue-admin/internal/app/system/model/entity"
6 |
7 | "go-vue-admin/internal/app/system/consts"
8 | "go-vue-admin/internal/app/system/service"
9 | )
10 |
11 | type (
12 | sSession struct{}
13 | )
14 |
15 | func init() {
16 | service.RegisterSession(New())
17 | }
18 |
19 | func New() service.ISession {
20 | return &sSession{}
21 | }
22 |
23 | // SetUser sets user into the session.
24 | func (s *sSession) SetUser(ctx context.Context, user *entity.SysUser) error {
25 | return service.BizCtx().Get(ctx).Session.Set(consts.UserSessionKey, user)
26 | }
27 |
28 | // GetUser retrieves and returns the user from session.
29 | // It returns nil if the user did not sign in.
30 | func (s *sSession) GetUser(ctx context.Context) *entity.SysUser {
31 | customCtx := service.BizCtx().Get(ctx)
32 | if customCtx != nil {
33 | if v := customCtx.Session.MustGet(consts.UserSessionKey); !v.IsNil() {
34 | var user *entity.SysUser
35 | _ = v.Struct(&user)
36 | return user
37 | }
38 | }
39 | return nil
40 | }
41 |
42 | // RemoveUser removes user rom session.
43 | func (s *sSession) RemoveUser(ctx context.Context) error {
44 | customCtx := service.BizCtx().Get(ctx)
45 | if customCtx != nil {
46 | return customCtx.Session.Remove(consts.UserSessionKey)
47 | }
48 | return nil
49 | }
50 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/upload.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/components/SizeSelect/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ item.label }}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
38 |
39 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/store/modules/app.js:
--------------------------------------------------------------------------------
1 | import Cookies from 'js-cookie'
2 |
3 | const useAppStore = defineStore(
4 | 'app',
5 | {
6 | state: () => ({
7 | sidebar: {
8 | opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
9 | withoutAnimation: false,
10 | hide: false
11 | },
12 | device: 'desktop',
13 | size: Cookies.get('size') || 'default'
14 | }),
15 | actions: {
16 | toggleSideBar(withoutAnimation) {
17 | if (this.sidebar.hide) {
18 | return false;
19 | }
20 | this.sidebar.opened = !this.sidebar.opened
21 | this.sidebar.withoutAnimation = withoutAnimation
22 | if (this.sidebar.opened) {
23 | Cookies.set('sidebarStatus', 1)
24 | } else {
25 | Cookies.set('sidebarStatus', 0)
26 | }
27 | },
28 | closeSideBar({ withoutAnimation }) {
29 | Cookies.set('sidebarStatus', 0)
30 | this.sidebar.opened = false
31 | this.sidebar.withoutAnimation = withoutAnimation
32 | },
33 | toggleDevice(device) {
34 | this.device = device
35 | },
36 | setSize(size) {
37 | this.size = size;
38 | Cookies.set('size', size)
39 | },
40 | toggleSideBarHide(status) {
41 | this.sidebar.hide = status
42 | }
43 | }
44 | })
45 |
46 | export default useAppStore
47 |
--------------------------------------------------------------------------------
/internal/app/system/logic/logic.go:
--------------------------------------------------------------------------------
1 | // ==========================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // ==========================================================================
4 |
5 | package logic
6 |
7 | import (
8 | _ "go-vue-admin/internal/app/system/logic/bizctx"
9 | _ "go-vue-admin/internal/app/system/logic/cache"
10 | _ "go-vue-admin/internal/app/system/logic/captcha"
11 | _ "go-vue-admin/internal/app/system/logic/gen_table"
12 | _ "go-vue-admin/internal/app/system/logic/gen_table_column"
13 | _ "go-vue-admin/internal/app/system/logic/middleware"
14 | _ "go-vue-admin/internal/app/system/logic/session"
15 | _ "go-vue-admin/internal/app/system/logic/sys_config"
16 | _ "go-vue-admin/internal/app/system/logic/sys_dept"
17 | _ "go-vue-admin/internal/app/system/logic/sys_dict_data"
18 | _ "go-vue-admin/internal/app/system/logic/sys_dict_type"
19 | _ "go-vue-admin/internal/app/system/logic/sys_menu"
20 | _ "go-vue-admin/internal/app/system/logic/sys_post"
21 | _ "go-vue-admin/internal/app/system/logic/sys_role"
22 | _ "go-vue-admin/internal/app/system/logic/sys_role_dept"
23 | _ "go-vue-admin/internal/app/system/logic/sys_role_menu"
24 | _ "go-vue-admin/internal/app/system/logic/sys_user"
25 | _ "go-vue-admin/internal/app/system/logic/sys_user_post"
26 | _ "go-vue-admin/internal/app/system/logic/sys_user_role"
27 | )
28 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_dept.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysDept is the golang structure for table sys_dept.
12 | type SysDept struct {
13 | DeptId int64 `json:"deptId" description:"部门id"`
14 | ParentId int64 `json:"parentId" description:"父部门id"`
15 | Ancestors string `json:"ancestors" description:"祖级列表"`
16 | DeptName string `json:"deptName" description:"部门名称"`
17 | OrderNum int `json:"orderNum" description:"显示顺序"`
18 | Leader string `json:"leader" description:"负责人"`
19 | Phone string `json:"phone" description:"联系电话"`
20 | Email string `json:"email" description:"邮箱"`
21 | Status string `json:"status" description:"部门状态(0正常 1停用)"`
22 | DelFlag string `json:"delFlag" description:"删除标志(0代表存在 2代表删除)"`
23 | CreateBy string `json:"createBy" description:"创建者"`
24 | CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
25 | UpdateBy string `json:"updateBy" description:"更新者"`
26 | UpdateTime *gtime.Time `json:"updateTime" description:"更新时间"`
27 | }
28 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/api/monitor/job.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询定时任务调度列表
4 | export function listJob(query) {
5 | return request({
6 | url: '/monitor/job/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询定时任务调度详细
13 | export function getJob(jobId) {
14 | return request({
15 | url: '/monitor/job/' + jobId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 新增定时任务调度
21 | export function addJob(data) {
22 | return request({
23 | url: '/monitor/job',
24 | method: 'post',
25 | data: data
26 | })
27 | }
28 |
29 | // 修改定时任务调度
30 | export function updateJob(data) {
31 | return request({
32 | url: '/monitor/job',
33 | method: 'put',
34 | data: data
35 | })
36 | }
37 |
38 | // 删除定时任务调度
39 | export function delJob(jobId) {
40 | return request({
41 | url: '/monitor/job/' + jobId,
42 | method: 'delete'
43 | })
44 | }
45 |
46 | // 任务状态修改
47 | export function changeJobStatus(jobId, status) {
48 | const data = {
49 | jobId,
50 | status
51 | }
52 | return request({
53 | url: '/monitor/job/changeStatus',
54 | method: 'put',
55 | data: data
56 | })
57 | }
58 |
59 |
60 | // 定时任务立即执行一次
61 | export function runJob(jobId, jobGroup) {
62 | const data = {
63 | jobId,
64 | jobGroup
65 | }
66 | return request({
67 | url: '/monitor/job/run',
68 | method: 'put',
69 | data: data
70 | })
71 | }
--------------------------------------------------------------------------------
/internal/app/system/service/sys_post.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 | v1 "go-vue-admin/api/v1"
11 | "go-vue-admin/internal/app/system/model/entity"
12 | )
13 |
14 | type (
15 | ISysPost interface {
16 | GetAllPostByStatus(ctx context.Context, status string) (posts []*entity.SysPost, err error)
17 | // 部门列表
18 | GetPostList(ctx context.Context, req *v1.GetPostListReq) (postList *v1.GetPostListRes, err error)
19 | // 添加岗位数据
20 | Add(ctx context.Context, req *v1.PostPostAddReq) (err error)
21 | // 修改数据
22 | Update(ctx context.Context, req *v1.PutPostUpdateReq) (err error)
23 | // 删除数据
24 | Delete(ctx context.Context, req *v1.DeletePostReq) (err error)
25 | GetPostById(ctx context.Context, id int64) (post *entity.SysPost, err error)
26 | }
27 | )
28 |
29 | var (
30 | localSysPost ISysPost
31 | )
32 |
33 | func SysPost() ISysPost {
34 | if localSysPost == nil {
35 | panic("implement not found for interface ISysPost, forgot register?")
36 | }
37 | return localSysPost
38 | }
39 |
40 | func RegisterSysPost(i ISysPost) {
41 | localSysPost = i
42 | }
43 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/404.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_dict_data.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysDictData is the golang structure for table sys_dict_data.
12 | type SysDictData struct {
13 | DictCode int64 `json:"dictCode" description:"字典编码"`
14 | DictSort int `json:"dictSort" description:"字典排序"`
15 | DictLabel string `json:"dictLabel" description:"字典标签"`
16 | DictValue string `json:"dictValue" description:"字典键值"`
17 | DictType string `json:"dictType" description:"字典类型"`
18 | CssClass string `json:"cssClass" description:"样式属性(其他样式扩展)"`
19 | ListClass string `json:"listClass" description:"表格回显样式"`
20 | IsDefault string `json:"isDefault" description:"是否默认(Y是 N否)"`
21 | Status string `json:"status" description:"状态(0正常 1停用)"`
22 | CreateBy string `json:"createBy" description:"创建者"`
23 | CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
24 | UpdateBy string `json:"updateBy" description:"更新者"`
25 | UpdateTime *gtime.Time `json:"updateTime" description:"更新时间"`
26 | Remark string `json:"remark" description:"备注"`
27 | }
28 |
--------------------------------------------------------------------------------
/internal/app/system/service/sys_config.go:
--------------------------------------------------------------------------------
1 | // ================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // You can delete these comments if you wish manually maintain this interface file.
4 | // ================================================================================
5 |
6 | package service
7 |
8 | import (
9 | "context"
10 | v1 "go-vue-admin/api/v1"
11 | )
12 |
13 | type (
14 | ISysConfig interface {
15 | // 获取参数配置表列表
16 | GetSysConfigList(ctx context.Context, req *v1.GetSysConfigListReq) (res *v1.GetSysConfigListRes, err error)
17 | // 添加参数配置表
18 | Add(ctx context.Context, req *v1.PostSysConfigReq) (res *v1.PostSysConfigRes, err error)
19 | // 修改参数配置表
20 | Update(ctx context.Context, req *v1.PutSysConfigReq) (res *v1.PutSysConfigRes, err error)
21 | // 删除参数配置表
22 | Delete(ctx context.Context, req *v1.DeleteSysConfigReq) (res *v1.DeleteSysConfigRes, err error)
23 | // 获取参数配置表
24 | GetSysConfig(ctx context.Context, req *v1.GetSysConfigReq) (res *v1.GetSysConfigRes, err error)
25 | }
26 | )
27 |
28 | var (
29 | localSysConfig ISysConfig
30 | )
31 |
32 | func SysConfig() ISysConfig {
33 | if localSysConfig == nil {
34 | panic("implement not found for interface ISysConfig, forgot register?")
35 | }
36 | return localSysConfig
37 | }
38 |
39 | func RegisterSysConfig(i ISysConfig) {
40 | localSysConfig = i
41 | }
42 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/store/modules/dict.js:
--------------------------------------------------------------------------------
1 | const useDictStore = defineStore(
2 | 'dict',
3 | {
4 | state: () => ({
5 | dict: new Array()
6 | }),
7 | actions: {
8 | // 获取字典
9 | getDict(_key) {
10 | if (_key == null && _key == "") {
11 | return null;
12 | }
13 | try {
14 | for (let i = 0; i < this.dict.length; i++) {
15 | if (this.dict[i].key == _key) {
16 | return this.dict[i].value;
17 | }
18 | }
19 | } catch (e) {
20 | return null;
21 | }
22 | },
23 | // 设置字典
24 | setDict(_key, value) {
25 | if (_key !== null && _key !== "") {
26 | this.dict.push({
27 | key: _key,
28 | value: value
29 | });
30 | }
31 | },
32 | // 删除字典
33 | removeDict(_key) {
34 | var bln = false;
35 | try {
36 | for (let i = 0; i < this.dict.length; i++) {
37 | if (this.dict[i].key == _key) {
38 | this.dict.splice(i, 1);
39 | return true;
40 | }
41 | }
42 | } catch (e) {
43 | bln = false;
44 | }
45 | return bln;
46 | },
47 | // 清空字典
48 | cleanDict() {
49 | this.dict = new Array();
50 | },
51 | // 初始字典
52 | initDict() {
53 | }
54 | }
55 | })
56 |
57 | export default useDictStore
58 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/zip.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/utils/permission.js:
--------------------------------------------------------------------------------
1 | import useUserStore from '@/store/modules/user'
2 |
3 | /**
4 | * 字符权限校验
5 | * @param {Array} value 校验值
6 | * @returns {Boolean}
7 | */
8 | export function checkPermi(value) {
9 | if (value && value instanceof Array && value.length > 0) {
10 | const permissions = useUserStore().permissions
11 | const permissionDatas = value
12 | const all_permission = "*:*:*";
13 |
14 | const hasPermission = permissions.some(permission => {
15 | return all_permission === permission || permissionDatas.includes(permission)
16 | })
17 |
18 | if (!hasPermission) {
19 | return false
20 | }
21 | return true
22 | } else {
23 | console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`)
24 | return false
25 | }
26 | }
27 |
28 | /**
29 | * 角色权限校验
30 | * @param {Array} value 校验值
31 | * @returns {Boolean}
32 | */
33 | export function checkRole(value) {
34 | if (value && value instanceof Array && value.length > 0) {
35 | const roles = useUserStore().roles
36 | const permissionRoles = value
37 | const super_admin = "admin";
38 |
39 | const hasRole = roles.some(role => {
40 | return super_admin === role || permissionRoles.includes(role)
41 | })
42 |
43 | if (!hasRole) {
44 | return false
45 | }
46 | return true
47 | } else {
48 | console.error(`need roles! Like checkRole="['admin','editor']"`)
49 | return false
50 | }
51 | }
--------------------------------------------------------------------------------
/internal/app/system/model/sys_menu.go:
--------------------------------------------------------------------------------
1 | package model
2 |
3 | import "go-vue-admin/internal/app/system/model/entity"
4 |
5 | type RolePerm struct {
6 | AllPerm []string
7 | MapPerms map[int64][]string
8 | }
9 | type RoleMenu struct {
10 | NenuMap map[int64][]string
11 | }
12 |
13 | type PermsData struct {
14 | RoleId int64 `json:"roleId" description:"角色ID"`
15 | Perms string `json:"perms" description:"权限标识"`
16 | }
17 | type UserMenuRes struct {
18 | Name string `json:"name"`
19 | Path string `json:"path"`
20 | Hidden bool `json:"hidden"`
21 | Redirect string `json:"redirect"`
22 | Component string `json:"component"`
23 | AlwaysShow bool `json:"alwaysShow"`
24 | Meta *MenuMeta `json:"meta"`
25 | Children []*UserMenuRes `json:"children"`
26 | }
27 | type MenuMeta struct {
28 | Title string `json:"title"`
29 | Icon string `json:"icon"`
30 | NoCache bool `json:"noCache"`
31 | Link string `json:"link"`
32 | }
33 |
34 | type SysMenuTreeRes struct {
35 | Id int64 `json:"id" description:"菜单id"`
36 | Label string `json:"label" description:"菜单名称"`
37 | Children []*SysMenuTreeRes `json:"children" description:"子菜单"`
38 | }
39 |
40 | type SysMenuList struct {
41 | *entity.SysMenu
42 | ParentName string `json:"parentName" description:"父菜单名称"`
43 | Children []*SysMenuList `json:"children" description:"子菜单"`
44 | }
45 |
--------------------------------------------------------------------------------
/internal/app/system/model/entity/sys_job.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package entity
6 |
7 | import (
8 | "github.com/gogf/gf/v2/os/gtime"
9 | )
10 |
11 | // SysJob is the golang structure for table sys_job.
12 | type SysJob struct {
13 | JobId int64 `json:"jobId" description:"任务ID"`
14 | JobName string `json:"jobName" description:"任务名称"`
15 | JobGroup string `json:"jobGroup" description:"任务组名"`
16 | InvokeTarget string `json:"invokeTarget" description:"调用目标字符串"`
17 | CronExpression string `json:"cronExpression" description:"cron执行表达式"`
18 | MisfirePolicy string `json:"misfirePolicy" description:"计划执行错误策略(1立即执行 2执行一次 3放弃执行)"`
19 | Concurrent string `json:"concurrent" description:"是否并发执行(0允许 1禁止)"`
20 | Status string `json:"status" description:"状态(0正常 1暂停)"`
21 | CreateBy string `json:"createBy" description:"创建者"`
22 | CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
23 | UpdateBy string `json:"updateBy" description:"更新者"`
24 | UpdateTime *gtime.Time `json:"updateTime" description:"更新时间"`
25 | Remark string `json:"remark" description:"备注信息"`
26 | }
27 |
--------------------------------------------------------------------------------
/internal/app/system/model/do/gen_table.go:
--------------------------------------------------------------------------------
1 | // =================================================================================
2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
3 | // =================================================================================
4 |
5 | package do
6 |
7 | import (
8 | "github.com/gogf/gf/v2/frame/g"
9 | "github.com/gogf/gf/v2/os/gtime"
10 | )
11 |
12 | // GenTable is the golang structure of table gen_table for DAO operations like Where/Data.
13 | type GenTable struct {
14 | g.Meta `orm:"table:gen_table, do:true"`
15 | TableId interface{} // 编号
16 | TableName interface{} // 表名称
17 | TableComment interface{} // 表描述
18 | SubTableName interface{} // 关联子表的表名
19 | SubTableFkName interface{} // 子表关联的外键名
20 | ClassName interface{} // 实体类名称
21 | TplCategory interface{} // 使用的模板(crud单表操作 tree树表操作)
22 | PackageName interface{} // 生成包路径
23 | ModuleName interface{} // 生成模块名
24 | BusinessName interface{} // 生成业务名
25 | FunctionName interface{} // 生成功能名
26 | FunctionAuthor interface{} // 生成功能作者
27 | GenType interface{} // 生成代码方式(0zip压缩包 1自定义路径)
28 | Status interface{} // 状态(0正常 1删除)
29 | GenPath interface{} // 生成路径(不填默认项目路径)
30 | Options interface{} // 其它生成选项
31 | CreateBy interface{} // 创建者
32 | CreateTime *gtime.Time // 创建时间
33 | UpdateBy interface{} // 更新者
34 | UpdateTime *gtime.Time // 更新时间
35 | Remark interface{} // 备注
36 | }
37 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/utils/theme.js:
--------------------------------------------------------------------------------
1 | // 处理主题样式
2 | export function handleThemeStyle(theme) {
3 | document.documentElement.style.setProperty('--el-color-primary', theme)
4 | for (let i = 1; i <= 9; i++) {
5 | document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, `${getLightColor(theme, i / 10)}`)
6 | }
7 | for (let i = 1; i <= 9; i++) {
8 | document.documentElement.style.setProperty(`--el-color-primary-dark-${i}`, `${getDarkColor(theme, i / 10)}`)
9 | }
10 | }
11 |
12 | // hex颜色转rgb颜色
13 | export function hexToRgb(str) {
14 | str = str.replace('#', '')
15 | let hexs = str.match(/../g)
16 | for (let i = 0; i < 3; i++) {
17 | hexs[i] = parseInt(hexs[i], 16)
18 | }
19 | return hexs
20 | }
21 |
22 | // rgb颜色转Hex颜色
23 | export function rgbToHex(r, g, b) {
24 | let hexs = [r.toString(16), g.toString(16), b.toString(16)]
25 | for (let i = 0; i < 3; i++) {
26 | if (hexs[i].length == 1) {
27 | hexs[i] = `0${hexs[i]}`
28 | }
29 | }
30 | return `#${hexs.join('')}`
31 | }
32 |
33 | // 变浅颜色值
34 | export function getLightColor(color, level) {
35 | let rgb = hexToRgb(color)
36 | for (let i = 0; i < 3; i++) {
37 | rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i])
38 | }
39 | return rgbToHex(rgb[0], rgb[1], rgb[2])
40 | }
41 |
42 | // 变深颜色值
43 | export function getDarkColor(color, level) {
44 | let rgb = hexToRgb(color)
45 | for (let i = 0; i < 3; i++) {
46 | rgb[i] = Math.floor(rgb[i] * (1 - level))
47 | }
48 | return rgbToHex(rgb[0], rgb[1], rgb[2])
49 | }
50 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/phone.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/store/modules/settings.js:
--------------------------------------------------------------------------------
1 | import defaultSettings from '@/settings'
2 | import { useDynamicTitle } from '@/utils/dynamicTitle'
3 |
4 | const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings
5 |
6 | const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
7 |
8 | const useSettingsStore = defineStore(
9 | 'settings',
10 | {
11 | state: () => ({
12 | title: '',
13 | theme: storageSetting.theme || '#409EFF',
14 | sideTheme: storageSetting.sideTheme || sideTheme,
15 | showSettings: showSettings,
16 | topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
17 | tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
18 | fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
19 | sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
20 | dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle
21 | }),
22 | actions: {
23 | // 修改布局设置
24 | changeSetting(data) {
25 | const { key, value } = data
26 | if (this.hasOwnProperty(key)) {
27 | this[key] = value
28 | }
29 | },
30 | // 设置网页标题
31 | setTitle(title) {
32 | this.title = title
33 | useDynamicTitle();
34 | }
35 | }
36 | })
37 |
38 | export default useSettingsStore
39 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/assets/icons/svg/log.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/RuoYi-Vue3/src/plugins/auth.js:
--------------------------------------------------------------------------------
1 | import useUserStore from '@/store/modules/user'
2 |
3 | function authPermission(permission) {
4 | const all_permission = "*:*:*";
5 | const permissions = useUserStore().permissions
6 | if (permission && permission.length > 0) {
7 | return permissions.some(v => {
8 | return all_permission === v || v === permission
9 | })
10 | } else {
11 | return false
12 | }
13 | }
14 |
15 | function authRole(role) {
16 | const super_admin = "admin";
17 | const roles = useUserStore().roles
18 | if (role && role.length > 0) {
19 | return roles.some(v => {
20 | return super_admin === v || v === role
21 | })
22 | } else {
23 | return false
24 | }
25 | }
26 |
27 | export default {
28 | // 验证用户是否具备某权限
29 | hasPermi(permission) {
30 | return authPermission(permission);
31 | },
32 | // 验证用户是否含有指定权限,只需包含其中一个
33 | hasPermiOr(permissions) {
34 | return permissions.some(item => {
35 | return authPermission(item)
36 | })
37 | },
38 | // 验证用户是否含有指定权限,必须全部拥有
39 | hasPermiAnd(permissions) {
40 | return permissions.every(item => {
41 | return authPermission(item)
42 | })
43 | },
44 | // 验证用户是否具备某角色
45 | hasRole(role) {
46 | return authRole(role);
47 | },
48 | // 验证用户是否含有指定角色,只需包含其中一个
49 | hasRoleOr(roles) {
50 | return roles.some(item => {
51 | return authRole(item)
52 | })
53 | },
54 | // 验证用户是否含有指定角色,必须全部拥有
55 | hasRoleAnd(roles) {
56 | return roles.every(item => {
57 | return authRole(item)
58 | })
59 | }
60 | }
61 |
--------------------------------------------------------------------------------