ss
Some checks failed
GitHub Actions Mirror / mirror_to_gitee (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitlab (push) Has been cancelled
build / build (10.x) (push) Has been cancelled
build / build (12.x) (push) Has been cancelled

This commit is contained in:
2025-06-29 00:40:17 +08:00
commit bc67220ef1
489 changed files with 66822 additions and 0 deletions

14
.editorconfig Normal file
View File

@ -0,0 +1,14 @@
# https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

6
.env.development Normal file
View File

@ -0,0 +1,6 @@
# just a flag
ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://127.0.0.1:8085'

6
.env.production Normal file
View File

@ -0,0 +1,6 @@
# just a flag
ENV = 'production'
# base api
VUE_APP_BASE_API = ''

8
.env.staging Normal file
View File

@ -0,0 +1,8 @@
NODE_ENV = production
# just a flag
ENV = 'staging'
# base api
VUE_APP_BASE_API = ''

4
.eslintignore Normal file
View File

@ -0,0 +1,4 @@
build/*.js
src/assets
public
dist

198
.eslintrc.js Normal file
View File

@ -0,0 +1,198 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"off",
"vue/name-property-casing": ["error", "PascalCase"],
"vue/no-v-html": "off",
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': ["error", "always", {"null": "ignore"}],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 0,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}

29
.github/workflows/mirror.yaml vendored Normal file
View File

@ -0,0 +1,29 @@
name: 'GitHub Actions Mirror'
on: [push, delete]
jobs:
mirror_to_gitee:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v1
- name: 'Mirror to gitee'
uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
git@gitee.com:go-admin-team/go-admin-ui.git
ssh_private_key:
${{ secrets.GITEE_KEY }}
mirror_to_gitlab:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v1
- name: 'Mirror to gitlab'
uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
git@gitlab.com:go-admin-team/go-admin-ui.git
ssh_private_key:
${{ secrets.GITLAB_KEY }}

30
.github/workflows/nodejs.yml vendored Normal file
View File

@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build:prod
env:
CI: true

23
.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock

4
.npmrc Normal file
View File

@ -0,0 +1,4 @@
sass_binary_site=https://registry.npmmirror.com/mirrors/node-sass/
phantomjs_cdnurl=https://registry.npmmirror.com/mirrors/phantomjs/
electron_mirror=https://registry.npmmirror.com/mirrors/electron/
registry=https://registry.npmmirror.com

32364
.pnp.cjs generated Normal file

File diff suppressed because one or more lines are too long

2126
.pnp.loader.mjs generated Normal file

File diff suppressed because it is too large Load Diff

5
.travis.yml Normal file
View File

@ -0,0 +1,5 @@
language: node_js
node_js: 10
script: npm run test
notifications:
email: false

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM registry.cn-shanghai.aliyuncs.com/lwmeng/node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
RUN cnpm install
COPY . .
RUN npm run build:prod
# production stage
FROM registry.cn-shanghai.aliyuncs.com/lwmeng/nginx
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 wenjianzhang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

289
README.Zh-cn.md Normal file
View File

@ -0,0 +1,289 @@
# go-admin
<img align="right" width="320" src="https://gitee.com/mydearzwj/image/raw/master/img/go-admin.svg">
[![Build Status](https://github.com/wenjianzhang/go-admin/workflows/build/badge.svg)](https://github.com/go-admin-team/go-admin)
[![Release](https://img.shields.io/github/release/go-admin-team/go-admin.svg?style=flat-square)](https://github.com/go-admin-team/go-admin/releases)
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/go-admin-team/go-admin)
[English](https://github.com/go-admin-team/go-admin/blob/master/README.md) | 简体中文
基于Gin + Vue + Element UI的前后端分离权限管理系统,系统初始化极度简单只需要配置文件中修改数据库连接系统支持多指令操作迁移指令可以让初始化数据库信息变得更简单服务指令可以很简单的启动api服务
[在线文档](https://doc.go-admin.dev)
[github在线文档](https://wenjianzhang.github.io)
[gitee在线文档](http://mydearzwj.gitee.io/go-admin-doc/)
[后端项目](https://github.com/go-admin-team/go-admin)
[视频教程](https://space.bilibili.com/565616721/channel/detail?cid=125737)
## ✨ 特性
- 遵循 RESTful API 设计规范
- 基于 GIN WEB API 框架提供了丰富的中间件支持用户认证、跨域、访问日志、追踪ID等
- 基于Casbin的 RBAC 访问控制模型
- JWT 认证
- 支持 Swagger 文档(基于swaggo)
- 基于 GORM 的数据库存储,可扩展多种类型数据库
- 配置文件简单的模型映射,快速能够得到想要的配置
- 代码生成工具
- 表单构建工具
- 多指令模式
- TODO: 单元测试
## 🎁 内置
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
3. 岗位管理:配置系统用户所属担任职务。
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识,接口权限等。
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
7. 参数管理:对系统动态配置常用参数。
8. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
9. 登录日志:系统登录日志记录查询包含登录异常。
1. 接口文档根据业务代码自动生成相关的api接口文档。
1. 代码生成:根据数据表结构生成对应的增删改查相对应业务,全程可视化操作,让基本业务可以零代码实现。
1. 表单构建:自定义页面样式,拖拉拽实现页面布局。
1. 服务监控:查看一些服务器的基本信息。
1. 内容管理demo功能下设分类管理、内容管理。可以参考使用方便快速入门。
## 准备工作
你需要在本地安装 [go] [gin] [node](http://nodejs.org/) 和 [git](https://git-scm.com/)
同时配套了系列教程包含视频和文档,如何从下载完成到熟练使用,强烈建议大家先看完这些教程再来实践本项目!!!
### 轻松实现go-admin写出第一个应用 - 文档教程
[步骤一 - 基础内容介绍](http://doc.zhangwj.com/go-admin-site/guide/intro/tutorial01.html)
[步骤二 - 实际应用 - 编写增删改查](http://doc.zhangwj.com/go-admin-site/guide/intro/tutorial02.html)
### 手把手教你从入门到放弃 - 视频教程
[如何启动go-admin](https://www.bilibili.com/video/BV1z5411x7JG)
[使用生成工具轻松实现业务](https://www.bilibili.com/video/BV1Dg4y1i79D)
[v1.1.0版本代码生成工具-释放双手](https://www.bilibili.com/video/BV1N54y1i71P) [进阶]
[多命令启动方式讲解以及IDE配置](https://www.bilibili.com/video/BV1Fg4y1q7ph)
[go-admin菜单的配置说明](https://www.bilibili.com/video/BV1Wp4y1D715) [必看]
[如何配置菜单信息以及接口信息](https://www.bilibili.com/video/BV1zv411B7nG) [必看]
[go-admin权限配置使用说明](https://www.bilibili.com/video/BV1rt4y197d3) [必看]
[go-admin数据权限使用说明](https://www.bilibili.com/video/BV1LK4y1s71e) [必看]
**如有问题请先看上述使用文档和文章,若不能满足,欢迎 issue 和 pr ,视频教程和文档持续更新中**
## 📦 本地开发
### 开发目录创建
```bash
# 创建开发目录
mkdir goadmin
cd goadmin
```
### 获取代码
> 重点注意:两个项目必须放在同一文件夹下;
```bash
# 获取后端代码
git clone https://github.com/go-admin-team/go-admin.git
# 获取前端代码
git clone https://github.com/go-admin-team/go-admin-ui.git
```
### 启动说明
#### 服务端启动说明
```bash
# 进入 go-admin 后端项目
cd ./go-admin
# 编译项目
go build
# 修改配置
# 文件路径 go-admin/config/settings.yml
vi ./config/setting.yml
# 1. 配置文件中修改数据库信息
# 注意: settings.database 下对应的配置数据
# 2. 确认log路径
```
:::tip ⚠️注意 在windows环境如果没有安装中CGO会出现这个问题
```bash
E:\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec /missing-cc: exec: "/missing-cc": file does not exist
```
or
```bash
D:\Code\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec gcc: exec: "gcc": executable file not found in %PATH%
```
[解决cgo问题进入](https://doc.go-admin.dev/guide/other/faq.html#_5-cgo-exec-missing-cc-exec-missing-cc-file-does-not-exist)
:::
#### 初始化数据库,以及服务启动
``` bash
# 首次配置需要初始化数据库资源信息
# macOS or linux 下使用
$ ./go-admin migrate -c=config/settings.dev.yml
# ⚠️注意:windows 下使用
$ go-admin.exe migrate -c=config/settings.dev.yml
# 启动项目也可以用IDE进行调试
# macOS or linux 下使用
$ ./go-admin server -c config/settings.yml
# ⚠️注意:windows 下使用
$ go-admin.exe server -c config/settings.yml
```
#### 使用docker 编译启动
```shell
# 编译镜像
docker build -t go-admin .
# 启动容器第一个go-admin是容器名字第二个go-admin是镜像名称
# -v 映射配置文件 本地路径:容器路径
docker run --name go-admin -p 8000:8000 -v /config/settings.yml:/config/settings.yml -d go-admin-server
```
#### 文档生成
```bash
go generate
```
#### 交叉编译
```bash
# windows
env GOOS=windows GOARCH=amd64 go build main.go
# or
# linux
env GOOS=linux GOARCH=amd64 go build main.go
```
### UI交互端启动说明
```bash
# 安装依赖
npm install
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org
# 启动服务
npm run dev
```
## 🎬 在线体验
> admin / 123456
演示地址:[http://www.go-admin.dev](http://www.go-admin.dev/#/login)
## 📨 互动
<table>
<tr>
<td><img src="https://raw.githubusercontent.com/wenjianzhang/image/master/img/wx.png" width="180px"></td>
<td><img src="https://raw.githubusercontent.com/wenjianzhang/image/master/img/qq.png" width="200px"></td>
<td><img src="https://raw.githubusercontent.com/wenjianzhang/image/master/img/qq2.png" width="200px"></td>
</tr>
<tr>
<td>微信</td>
<td>此群已满</td>
<td><a target="_blank" href="https://shang.qq.com/wpa/qunwpa?idkey=0f2bf59f5f2edec6a4550c364242c0641f870aa328e468c4ee4b7dbfb392627b"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="go-admin技术交流乙号" title="go-admin技术交流乙号"></a></td>
</tr>
</table>
## 💎 主要成员
<a href="https://github.com/wenjianzhang"> <img src="https://avatars.githubusercontent.com/u/3890175?s=460&u=20eac63daef81588fbac611da676b99859319251&v=4" width="80px"></a>
<a href="https://github.com/lwnmengjing"> <img src="https://avatars.githubusercontent.com/u/12806223?s=400&u=a89272dce50100b77b4c0d5c81c718bf78ebb580&v=4" width="80px"></a>
<a href="https://github.com/chengxiao"> <img src="https://avatars.githubusercontent.com/u/1379545?s=460&u=557da5503d0ac4a8628df6b4075b17853d5edcd9&v=4" width="80px"></a>
<a href="https://github.com/bing127"> <img src="https://avatars.githubusercontent.com/u/31166183?s=460&u=c085bff88df10bb7676c8c0351ba9dcd031d1fb3&v=4" width="80px"></a>
## JetBrains 开源证书支持
`go-admin` 项目一直以来都是在 JetBrains 公司旗下的 GoLand 集成开发环境中进行开发,基于 **free JetBrains Open Source license(s)** 正版免费授权,在此表达我的谢意。
<a href="https://www.jetbrains.com/?from=kubeadm-ha" target="_blank"><img src="https://raw.githubusercontent.com/panjf2000/illustrations/master/jetbrains/jetbrains-variant-4.png" width="250" align="middle"/></a>
## 🤝 特别感谢
1. [chengxiao](https://github.com/chengxiao)
2. [gin](https://github.com/gin-gonic/gin)
2. [casbin](https://github.com/casbin/casbin)
2. [spf13/viper](https://github.com/spf13/viper)
2. [gorm](https://github.com/jinzhu/gorm)
2. [gin-swagger](https://github.com/swaggo/gin-swagger)
2. [jwt-go](https://github.com/dgrijalva/jwt-go)
2. [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
2. [ruoyi-vue](https://gitee.com/y_project/RuoYi-Vue)
2. [form-generator](https://github.com/JakHuang/form-generator)
## 🤟 打赏
> 如果你觉得这个项目帮助到了你,你可以帮作者买一杯果汁表示鼓励 :tropical_drink:
<img class="no-margin" src="https://raw.githubusercontent.com/wenjianzhang/image/master/img/pay.png" height="200px" >
## 🤝 链接
[Go开发者成长线路图](http://www.golangroadmap.com/)
## 🔑 License
[MIT](https://github.com/go-admin-team/go-admin/blob/master/LICENSE.md)
Copyright (c) 2020 wenjianzhang

276
README.md Normal file
View File

@ -0,0 +1,276 @@
# go-admin
<img align="right" width="320" src="https://gitee.com/mydearzwj/image/raw/master/img/go-admin.svg">
[![Build Status](https://github.com/wenjianzhang/go-admin/workflows/build/badge.svg)](https://github.com/go-admin-team/go-admin)
[![Release](https://img.shields.io/github/release/go-admin-team/go-admin.svg?style=flat-square)](https://github.com/go-admin-team/go-admin/releases)
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/go-admin-team/go-admin)
English | [简体中文](https://github.com/go-admin-team/go-admin/blob/master/README.Zh-cn.md)
The front-end and back-end separation authority management system based on Gin + Vue + Element UI is extremely simple to initialize the system. You only need to modify the database connection in the configuration file. The system supports multi-instruction operations. Migration instructions can make it easier to initialize database information. Service instructions It's easy to start the api service.
[documentation](https://doc.go-admin.dev)
[Backend project](https://github.com/go-admin-team/go-admin)
[Video tutorial](https://space.bilibili.com/565616721/channel/detail?cid=125737)
## ✨ Feature
- Follow RESTful API design specifications
- Based on the GIN WEB API framework, it provides rich middleware support (user authentication, cross-domain, access log, tracking ID, etc.)
- RBAC access control model based on Casbin
- JWT authentication
- Support Swagger documents (based on swaggo)
- Database storage based on GORM, which can expand multiple types of databases
- Simple model mapping of configuration files to quickly get the desired configuration
- Code generation tool
- Form builder
- Multi-command mode
- TODO: unit test
## 🎁 Internal
1. User management: The user is the system operator, this function mainly completes the system user configuration.
2. Department management: configure the system organization (company, department, group), and display the tree structure to support data permissions.
3. Position management: configure the positions of system users.
4. Menu management: configure the system menu, operation authority, button authority identification, interface authority, etc.
5. Role management: Role menu permission assignment and role setting are divided into data scope permissions by organization.
6. Dictionary management: Maintain some relatively fixed data frequently used in the system.
7. Parameter management: dynamically configure common parameters for the system.
8. Operation log: system normal operation log record and query; system abnormal information log record and query.
9. Login log: The system login log record query contains login exceptions.
1. Interface documentation: Automatically generate related api interface documents according to the business code.
1. Code generation: According to the data table structure, generate the corresponding addition, deletion, modification, and check corresponding business, and the whole process of visual operation, so that the basic business can be implemented with zero code.
1. Form construction: Customize the page style, drag and drop to realize the page layout.
1. Service monitoring: View the basic information of some servers.
1. Content management: demo function, including classification management and content management. You can refer to the easy to use quick start.
## Ready to work
You need to install locally [go] [gin] [node](http://nodejs.org/) 和 [git](https://git-scm.com/)
At the same time, a series of tutorials including videos and documents are provided. How to complete the downloading to the proficient use, it is strongly recommended that you read these tutorials before you practice this project! ! !
### Easily implement go-admin to write the first application-documentation tutorial
[Step 1 - basic content introduction](http://doc.zhangwj.com/go-admin-site/guide/intro/tutorial01.html)
[Step 2 - Practical application - writing database operations](http://doc.zhangwj.com/go-admin-site/guide/intro/tutorial02.html)
### Teach you from getting started to giving up-video tutorial
[How to start go-admin](https://www.bilibili.com/video/BV1z5411x7JG)
[Easily implement business using build tools](https://www.bilibili.com/video/BV1Dg4y1i79D)
[v1.1.0 version code generation tool-free your hands](https://www.bilibili.com/video/BV1N54y1i71P) [Advanced]
[Explanation of multi-command startup mode and IDE configuration](https://www.bilibili.com/video/BV1Fg4y1q7ph)
[Configuration instructions for go-admin menu](https://www.bilibili.com/video/BV1Wp4y1D715) [Must see]
[How to configure menu information and interface information](https://www.bilibili.com/video/BV1zv411B7nG) [Must see]
[go-admin permission configuration instructions](https://www.bilibili.com/video/BV1rt4y197d3) [Must see]
[Instructions for use of go-admin data permissions](https://www.bilibili.com/video/BV1LK4y1s71e) [Must see]
**If you have any questions, please read the above-mentioned usage documents and articles first. If you are not satisfied, welcome to issue and pr. Video tutorials and documents are being updated continuously.**
## 📦 Local development
### Development directory creation
```bash
# Create a development directory
mkdir goadmin
cd goadmin
```
### Get the code
> Important note: the two projects must be placed in the same folder;
```bash
# Get backend code
git clone https://github.com/go-admin-team/go-admin.git
# Get the front-end code
git clone https://github.com/go-admin-team/go-admin-ui.git
```
### Startup instructions
#### Server startup instructions
```bash
# Enter the go-admin backend project
cd ./go-admin
# Compile the project
go build
# Change setting
# File path go-admin/config/settings.yml
vi ./config/setting.yml
# 1. Modify the database information in the configuration file
# Note: The corresponding configuration data under settings.database
# 2. Confirm the log path
```
:::tip ⚠Note that this problem will occur if CGO is not installed in the windows environment;
```bash
E:\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec /missing-cc: exec: "/missing-cc": file does not exist
```
or
```bash
D:\Code\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec gcc: exec: "gcc": executable file not found in %PATH%
```
[Solve the cgo problem and enter](https://doc.go-admin.dev/guide/other/faq.html#_5-cgo-exec-missing-cc-exec-missing-cc-file-does-not-exist)
:::
#### Initialize the database, and start the service
``` bash
# The first configuration needs to initialize the database resource information
# Use under macOS or linux
$ ./go-admin migrate -c=config/settings.dev.yml
# ⚠Note: Use under windows
$ go-admin.exe migrate -c=config/settings.dev.yml
# Start the project, you can also use the IDE for debugging
# Use under macOS or linux
$ ./go-admin server -c config/settings.yml
# ⚠Note: Use under windows
$ go-admin.exe server -c config/settings.yml
```
#### Use docker to compile and start
```shell
# Compile the image
docker build -t go-admin .
# Start the container, the first go-admin is the container name, and the second go-admin is the image name
# -v Mapping configuration file Local path: container path
docker run --name go-admin -p 8000:8000 -v /config/settings.yml:/config/settings.yml -d go-admin-server
```
#### Generation Document
```bash
go generate
```
#### Cross compile
```bash
# windows
env GOOS=windows GOARCH=amd64 go build main.go
# or
# linux
env GOOS=linux GOARCH=amd64 go build main.go
```
### UI interactive terminal startup instructions
```bash
# Installation dependencies
npm install # or cnpm install
# Start service
npm run dev
```
## 🎬 Online Demo
> admin / 123456
演示地址:[http://www.go-admin.dev](http://www.go-admin.dev/#/login)
## 📨 Interactive
<table>
<tr>
<td><img src="https://raw.githubusercontent.com/wenjianzhang/image/master/img/wx.png" width="180px"></td>
<td><img src="https://raw.githubusercontent.com/wenjianzhang/image/master/img/qq2.png" width="200px"></td>
</tr>
<tr>
<td>Wechat</td>
<td><a target="_blank" href="https://shang.qq.com/wpa/qunwpa?idkey=0f2bf59f5f2edec6a4550c364242c0641f870aa328e468c4ee4b7dbfb392627b"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="go-admin技术交流乙号" title="go-admin技术交流乙号"></a></td>
</tr>
</table>
## 💎 Members
<a href="https://github.com/wenjianzhang"> <img src="https://avatars.githubusercontent.com/u/3890175?s=460&u=20eac63daef81588fbac611da676b99859319251&v=4" width="80px"></a>
<a href="https://github.com/lwnmengjing"> <img src="https://avatars.githubusercontent.com/u/12806223?s=400&u=a89272dce50100b77b4c0d5c81c718bf78ebb580&v=4" width="80px"></a>
<a href="https://github.com/chengxiao"> <img src="https://avatars.githubusercontent.com/u/1379545?s=460&u=557da5503d0ac4a8628df6b4075b17853d5edcd9&v=4" width="80px"></a>
<a href="https://github.com/bing127"> <img src="https://avatars.githubusercontent.com/u/31166183?s=460&u=c085bff88df10bb7676c8c0351ba9dcd031d1fb3&v=4" width="80px"></a>
## JetBrains open source certificate support
The `go-admin` project has always been developed in the GoLand integrated development environment under JetBrains, based on the **free JetBrains Open Source license(s)** genuine free license. I would like to express my gratitude.
<a href="https://www.jetbrains.com/?from=kubeadm-ha" target="_blank"><img src="https://raw.githubusercontent.com/panjf2000/illustrations/master/jetbrains/jetbrains-variant-4.png" width="250" align="middle"/></a>
## 🤝 Thanks
1. [chengxiao](https://github.com/chengxiao)
2. [gin](https://github.com/gin-gonic/gin)
2. [casbin](https://github.com/casbin/casbin)
2. [spf13/viper](https://github.com/spf13/viper)
2. [gorm](https://github.com/jinzhu/gorm)
2. [gin-swagger](https://github.com/swaggo/gin-swagger)
2. [jwt-go](https://github.com/dgrijalva/jwt-go)
2. [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
2. [ruoyi-vue](https://gitee.com/y_project/RuoYi-Vue)
2. [form-generator](https://github.com/JakHuang/form-generator)
## 🤟 Sponsor Us
> If you think this project helped you, you can buy a glass of juice for the author to show encouragement :tropical_drink:
<img class="no-margin" src="https://raw.githubusercontent.com/wenjianzhang/image/master/img/pay.png" height="200px" >
## 🤝 Link
[Go developer growth roadmap](http://www.golangroadmap.com/)
## 🔑 License
[MIT](https://github.com/go-admin-team/go-admin/blob/master/LICENSE.md)
Copyright (c) 2020 wenjianzhang

10
babel.config.js Normal file
View File

@ -0,0 +1,10 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
env: {
development: {
plugins: ['dynamic-import-node']
}
}
}

35
build/index.js Normal file
View File

@ -0,0 +1,35 @@
const { run } = require('runjs')
const chalk = require('chalk')
const config = require('../vue.config.js')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ')
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
const report = rawArgv.includes('--report')
run(`vue-cli-service build ${args}`)
const port = 9526
const publicPath = config.publicPath
var connect = require('connect')
var serveStatic = require('serve-static')
const app = connect()
app.use(
publicPath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})
} else {
run(`vue-cli-service build ${args}`)
}

24
jest.config.js Normal file
View File

@ -0,0 +1,24 @@
module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/tests/unit/coverage',
// 'collectCoverage': true,
'coverageReporters': [
'lcov',
'text-summary'
],
testURL: 'http://localhost/'
}

9
jsconfig.json Normal file
View File

@ -0,0 +1,9 @@
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}

136
package.json Normal file
View File

@ -0,0 +1,136 @@
{
"name": "aggregate-translate-adminui",
"version": "2.0.6",
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
"author": "https://github.com/wenjianzhang",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"new": "plop"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"keywords": [
"aggregate-translate-adminui",
"dashboard",
"boilerplate",
"management-system"
],
"repository": {
"type": "git",
"url": "git+https://github.com/go-admin-team/go-admin.git"
},
"bugs": {
"url": "https://github.com/go-admin-team/go-admin/issues"
},
"dependencies": {
"@riophae/vue-treeselect": "0.4.0",
"@tinymce/tinymce-vue": "^3.2.2",
"awe-dnd": "^0.3.4",
"axios": "0.21.1",
"clipboard": "2.0.6",
"codemirror": "5.62.0",
"core-js": "^3.6.5",
"driver.js": "0.9.8",
"dropzone": "5.7.2",
"echarts": "4.8.0",
"element-ui": "2.15.14",
"file-saver": "2.0.2",
"fuse.js": "6.4.1",
"js-cookie": "2.2.1",
"jsonlint": "1.6.3",
"jszip": "3.5.0",
"moment": "^2.27.0",
"monaco-editor": "^0.20.0",
"normalize.css": "8.0.1",
"nprogress": "0.2.0",
"path-to-regexp": "6.1.0",
"remixicon": "^2.5.0",
"sass-resources-loader": "^2.0.3",
"screenfull": "5.0.2",
"showdown": "^1.9.1",
"solarlunar": "^2.0.7",
"sortablejs": "^1.10.2",
"uuid": "^8.3.0",
"viser-vue": "^2.4.8",
"vue": "2.6.11",
"vue-codemirror": "^4.0.6",
"vue-count-to": "1.0.13",
"vue-cropper": "^0.5.5",
"vue-particles": "^1.0.9",
"vue-quill-editor": "^3.0.6",
"vue-router": "3.4.7",
"vue-splitpane": "1.0.6",
"vuedraggable": "2.24.0",
"vuex": "3.5.1",
"webpack-bundle-analyzer": "^3.8.0",
"xlsx": "0.16.5"
},
"devDependencies": {
"@babel/core": "7.11.1",
"@babel/register": "^7.10.5",
"@babel/runtime": "^7.12.1",
"@vue/babel-preset-app": "^4.5.7",
"@vue/cli-plugin-babel": "4.4.6",
"@vue/cli-plugin-eslint": "^4.4.6",
"@vue/cli-plugin-unit-jest": "4.4.6",
"@vue/cli-service": "^4.5.13",
"@vue/test-utils": "1.0.3",
"autoprefixer": "^9.8.6",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.1.0",
"babel-jest": "26.2.2",
"babel-plugin-dynamic-import-node": "^2.3.3",
"beautifier": "^0.1.7",
"chalk": "4.1.0",
"chokidar": "3.4.2",
"compression-webpack-plugin": "^4.0.0",
"connect": "3.7.0",
"eslint": "6.8.0",
"eslint-plugin-vue": "6.2.2",
"form-gen-parser": "^1.0.3",
"html-webpack-plugin": "4.3.0",
"husky": "4.2.5",
"lint-staged": "10.2.11",
"mockjs": "1.1.0",
"monaco-editor-webpack-plugin": "^1.9.0",
"plop": "2.7.4",
"runjs": "^4.4.2",
"sass": "^1.32.13",
"sass-loader": "^10.1.1",
"script-ext-html-webpack-plugin": "2.1.4",
"script-loader": "0.7.2",
"serve-static": "^1.14.1",
"svg-sprite-loader": "^5.0.0",
"svgo": "1.3.2",
"vue-quill-editor": "^3.0.6",
"vue-template-compiler": "2.6.11",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
],
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538"
}

View File

@ -0,0 +1,26 @@
{{#if template}}
<template>
<div />
</template>
{{/if}}
{{#if script}}
<script>
export default {
name: '{{ properCase name }}',
props: {},
data() {
return {}
},
created() {},
mounted() {},
methods: {}
}
</script>
{{/if}}
{{#if style}}
<style lang="scss" scoped>
</style>
{{/if}}

View File

@ -0,0 +1,55 @@
const { notEmpty } = require('../utils.js')
module.exports = {
description: 'generate vue component',
prompts: [{
type: 'input',
name: 'name',
message: 'component name please',
validate: notEmpty('name')
},
{
type: 'checkbox',
name: 'blocks',
message: 'Blocks:',
choices: [{
name: '<template>',
value: 'template',
checked: true
},
{
name: '<script>',
value: 'script',
checked: true
},
{
name: 'style',
value: 'style',
checked: true
}
],
validate(value) {
if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
return 'Components require at least a <script> or <template> tag.'
}
return true
}
}
],
actions: data => {
const name = '{{properCase name}}'
const actions = [{
type: 'add',
path: `src/components/${name}/index.vue`,
templateFile: 'plop-templates/component/index.hbs',
data: {
name: name,
template: data.blocks.includes('template'),
script: data.blocks.includes('script'),
style: data.blocks.includes('style')
}
}]
return actions
}
}

View File

@ -0,0 +1,16 @@
{{#if state}}
const state = {}
{{/if}}
{{#if mutations}}
const mutations = {}
{{/if}}
{{#if actions}}
const actions = {}
{{/if}}
export default {
namespaced: true,
{{options}}
}

View File

@ -0,0 +1,62 @@
const { notEmpty } = require('../utils.js')
module.exports = {
description: 'generate store',
prompts: [{
type: 'input',
name: 'name',
message: 'store name please',
validate: notEmpty('name')
},
{
type: 'checkbox',
name: 'blocks',
message: 'Blocks:',
choices: [{
name: 'state',
value: 'state',
checked: true
},
{
name: 'mutations',
value: 'mutations',
checked: true
},
{
name: 'actions',
value: 'actions',
checked: true
}
],
validate(value) {
if (!value.includes('state') || !value.includes('mutations')) {
return 'store require at least state and mutations'
}
return true
}
}
],
actions(data) {
const name = '{{name}}'
const { blocks } = data
const options = ['state', 'mutations']
const joinFlag = `,
`
if (blocks.length === 3) {
options.push('actions')
}
const actions = [{
type: 'add',
path: `src/store/modules/${name}.js`,
templateFile: 'plop-templates/store/index.hbs',
data: {
options: options.join(joinFlag),
state: blocks.includes('state'),
mutations: blocks.includes('mutations'),
actions: blocks.includes('actions')
}
}]
return actions
}
}

9
plop-templates/utils.js Normal file
View File

@ -0,0 +1,9 @@
exports.notEmpty = name => {
return v => {
if (!v || v.trim === '') {
return `${name} is required`
} else {
return true
}
}
}

View File

@ -0,0 +1,26 @@
{{#if template}}
<template>
<div />
</template>
{{/if}}
{{#if script}}
<script>
export default {
name: '{{ properCase name }}',
props: {},
data() {
return {}
},
created() {},
mounted() {},
methods: {}
}
</script>
{{/if}}
{{#if style}}
<style lang="scss" scoped>
</style>
{{/if}}

View File

@ -0,0 +1,55 @@
const { notEmpty } = require('../utils.js')
module.exports = {
description: 'generate a view',
prompts: [{
type: 'input',
name: 'name',
message: 'view name please',
validate: notEmpty('name')
},
{
type: 'checkbox',
name: 'blocks',
message: 'Blocks:',
choices: [{
name: '<template>',
value: 'template',
checked: true
},
{
name: '<script>',
value: 'script',
checked: true
},
{
name: 'style',
value: 'style',
checked: true
}
],
validate(value) {
if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
return 'View require at least a <script> or <template> tag.'
}
return true
}
}
],
actions: data => {
const name = '{{name}}'
const actions = [{
type: 'add',
path: `src/views/${name}/index.vue`,
templateFile: 'plop-templates/view/index.hbs',
data: {
name: name,
template: data.blocks.includes('template'),
script: data.blocks.includes('script'),
style: data.blocks.includes('style')
}
}]
return actions
}
}

9
plopfile.js Normal file
View File

@ -0,0 +1,9 @@
const viewGenerator = require('./plop-templates/view/prompt')
const componentGenerator = require('./plop-templates/component/prompt')
const storeGenerator = require('./plop-templates/store/prompt.js')
module.exports = function(plop) {
plop.setGenerator('view', viewGenerator)
plop.setGenerator('component', componentGenerator)
plop.setGenerator('store', storeGenerator)
}

5
postcss.config.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

219
public/index.html Normal file
View File

@ -0,0 +1,219 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>
<%= webpackConfig.name %>
</title>
<meta name="keywords" content="">
<meta name="description"
content="聚合翻译后台管理系统">
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
background: #f0f1f5;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
#loader {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 2s linear infinite;
-ms-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
-o-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 3s linear infinite;
-moz-animation: spin 3s linear infinite;
-o-animation: spin 3s linear infinite;
-ms-animation: spin 3s linear infinite;
animation: spin 3s linear infinite;
}
#loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-moz-animation: spin 1.5s linear infinite;
-o-animation: spin 1.5s linear infinite;
-ms-animation: spin 1.5s linear infinite;
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: #7171C6;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader-wrapper .loader-section.section-right {
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader {
opacity: 0;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.loaded #loader-wrapper {
visibility: hidden;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: all 0.3s 1s ease-out;
transition: all 0.3s 1s ease-out;
}
.no-js #loader-wrapper {
display: none;
}
.no-js h1 {
color: #222222;
}
#loader-wrapper .load_title {
font-family: 'Open Sans';
color: #FFF;
font-size: 14.3px;
width: 100%;
text-align: center;
z-index: 9999999999999;
position: absolute;
top: 60%;
opacity: 1;
line-height: 30px;
}
#loader-wrapper .load_title span {
font-weight: normal;
font-style: italic;
font-size: 13px;
color: #FFF;
opacity: 0.5;
}
</style>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
</html>

56
scripts/k8s/default.conf Normal file
View File

@ -0,0 +1,56 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://go-admin:8000/api;
proxy_http_version 1.1;
proxy_set_header Connection “”;
proxy_connect_timeout 300s;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffer_size 32k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_redirect off;
proxy_hide_header Vary;
proxy_set_header Accept-Encoding '';
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_cookie;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /login {
proxy_pass http://go-admin:8000/login;
proxy_http_version 1.1;
proxy_set_header Connection “”;
proxy_connect_timeout 300s;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffer_size 32k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_redirect off;
proxy_hide_header Vary;
proxy_set_header Accept-Encoding '';
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_cookie;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

51
scripts/k8s/deploy.yml Normal file
View File

@ -0,0 +1,51 @@
---
apiVersion: v1
kind: Service
metadata:
name: go-admin-ui
labels:
app: go-admin-ui
service: go-admim-ui
spec:
ports:
- port: 80
name: http
protocol: TCP
selector:
app: go-admin-ui
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: go-admin-ui-v1
labels:
app: go-admin-ui
version: v1
spec:
replicas: 1
selector:
matchLabels:
app: go-admin-ui
version: v1
template:
metadata:
labels:
app: go-admin-ui
version: v1
spec:
containers:
- name: go-admin-ui
image: ${IMAGE}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
volumeMounts:
- name: frontendconf
mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf
readOnly: true
volumes:
- name: frontendconf
configMap:
name: nginx-frontend
---

3
scripts/k8s/prerun.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
kubectl create ns go-admin
kubectl create configmap nginx-frontend --from-file=./default.conf -n go-admin

12
src/App.vue Normal file
View File

@ -0,0 +1,12 @@
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App'
}
</script>

View File

@ -0,0 +1,62 @@
import request from '@/utils/request'
// 查询字典数据列表
export function listData(query) {
return request({
url: '/api/v1/dict/data?dictType=' + query.dictType,
method: 'get',
params: query
})
}
// 查询字典数据详细
export function getData(dictCode) {
return request({
url: '/api/v1/dict/data/' + dictCode,
method: 'get'
})
}
// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
return request({
url: '/api/v1/dict-data/option-select?dictType=' + dictType,
method: 'get'
})
}
// 新增字典数据
export function addData(data) {
return request({
url: '/api/v1/dict/data',
method: 'post',
data: data
})
}
// 修改字典数据
export function updateData(data) {
return request({
url: '/api/v1/dict/data/' + data.dictCode,
method: 'put',
data: data
})
}
// 删除字典数据
export function delData(dictCode) {
return request({
url: '/api/v1/dict/data',
method: 'delete',
data: dictCode
})
}
// 导出字典数据
export function exportData(query) {
return request({
url: '/api/v1/dict/data/export',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,62 @@
import request from '@/utils/request'
// 查询字典类型列表
export function listType(query) {
return request({
url: '/api/v1/dict/type',
method: 'get',
params: query
})
}
// 查询字典类型详细
export function getType(dictId) {
return request({
url: '/api/v1/dict/type/' + dictId,
method: 'get'
})
}
// 新增字典类型
export function addType(data) {
return request({
url: '/api/v1/dict/type',
method: 'post',
data: data
})
}
// 修改字典类型
export function updateType(data) {
return request({
url: '/api/v1/dict/type/' + data.id,
method: 'put',
data: data
})
}
// 删除字典类型
export function delType(dictId) {
return request({
url: '/api/v1/dict/type',
method: 'delete',
data: dictId
})
}
// 导出字典类型
export function exportType(query) {
return request({
url: '/api/v1/dict/type/export',
method: 'get',
params: query
})
}
// 获取字典选择框列表
export function optionselect() {
return request({
url: '/api/v1/dict/type-option-select',
method: 'get'
})
}

46
src/api/admin/sys-api.js Normal file
View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
// 查询SysApi列表
export function listSysApi(query) {
return request({
url: '/api/v1/sys-api',
method: 'get',
params: query
})
}
// 查询SysApi详细
export function getSysApi(id) {
return request({
url: '/api/v1/sys-api/' + id,
method: 'get'
})
}
// 新增SysApi
export function addSysApi(data) {
return request({
url: '/api/v1/sys-api',
method: 'post',
data: data
})
}
// 修改SysApi
export function updateSysApi(data) {
return request({
url: '/api/v1/sys-api/' + data.id,
method: 'put',
data: data
})
}
// 删除SysApi
export function delSysApi(data) {
return request({
url: '/api/v1/sys-api',
method: 'delete',
data: data
})
}

View File

@ -0,0 +1,68 @@
import request from '@/utils/request'
// 查询参数列表
export function listConfig(query) {
return request({
url: '/api/v1/config',
method: 'get',
params: query
})
}
// 查询参数详细
export function getConfig(configId) {
return request({
url: '/api/v1/config/' + configId,
method: 'get'
})
}
// 根据参数键名查询参数值
export function getConfigKey(configKey) {
return request({
url: '/api/v1/configKey/' + configKey,
method: 'get'
})
}
// 新增参数配置
export function addConfig(data) {
return request({
url: '/api/v1/config',
method: 'post',
data: data
})
}
// 修改参数配置
export function updateConfig(data) {
return request({
url: '/api/v1/config/' + data.id,
method: 'put',
data: data
})
}
// 删除参数配置
export function delConfig(data) {
return request({
url: '/api/v1/config',
method: 'delete',
data: data
})
}
export function getSetConfig(query) {
return request({
url: '/api/v1/set-config',
method: 'get'
})
}
export function updateSetConfig(data) {
return request({
url: '/api/v1/set-config',
method: 'put',
data: data
})
}

60
src/api/admin/sys-dept.js Normal file
View File

@ -0,0 +1,60 @@
import request from '@/utils/request'
export function getDeptList(query) {
return request({
url: '/api/v1/dept',
method: 'get',
params: query
})
}
// 查询部门详细
export function getDept(deptId) {
return request({
url: '/api/v1/dept/' + deptId,
method: 'get'
})
}
// 查询部门下拉树结构
export function treeselect() {
return request({
url: '/api/v1/deptTree',
method: 'get'
})
}
// 根据角色ID查询部门树结构
export function roleDeptTreeselect(roleId) {
return request({
url: '/api/v1/roleDeptTreeselect/' + roleId,
method: 'get'
})
}
// 新增部门
export function addDept(data) {
return request({
url: '/api/v1/dept',
method: 'post',
data: data
})
}
// 修改部门
export function updateDept(data, id) {
return request({
url: '/api/v1/dept/' + id,
method: 'put',
data: data
})
}
// 删除部门
export function delDept(data) {
return request({
url: '/api/v1/dept',
method: 'delete',
data: data
})
}

View File

@ -0,0 +1,28 @@
import request from '@/utils/request'
// 查询SysLoginlog列表
export function listSysLoginlog(query) {
return request({
url: '/api/v1/sys-login-log',
method: 'get',
params: query
})
}
// 查询SysLoginlog详细
export function getSysLoginlog(ID) {
return request({
url: '/api/v1/sys-login-log/' + ID,
method: 'get'
})
}
// 删除SysLoginlog
export function delSysLoginlog(data) {
return request({
url: '/api/v1/sys-login-log',
method: 'delete',
data: data
})
}

61
src/api/admin/sys-menu.js Normal file
View File

@ -0,0 +1,61 @@
import request from '@/utils/request'
// 查询菜单列表
export function listMenu(query) {
return request({
url: '/api/v1/menu',
method: 'get',
params: query
})
}
// 查询菜单详细
export function getMenu(menuId) {
return request({
url: '/api/v1/menu/' + menuId,
method: 'get'
})
}
// 查询菜单下拉树结构
// export function treeselect() {
// return request({
// url: '/api/v1/menuTreeselect',
// method: 'get'
// })
// }
// 根据角色ID查询菜单下拉树结构
export function roleMenuTreeselect(roleId) {
return request({
url: '/api/v1/roleMenuTreeselect/' + roleId,
method: 'get'
})
}
// 新增菜单
export function addMenu(data) {
return request({
url: '/api/v1/menu',
method: 'post',
data: data
})
}
// 修改菜单
export function updateMenu(data, id) {
return request({
url: '/api/v1/menu/' + id,
method: 'put',
data: data
})
}
// 删除菜单
export function delMenu(data) {
return request({
url: '/api/v1/menu',
method: 'delete',
data: data
})
}

View File

@ -0,0 +1,28 @@
import request from '@/utils/request'
// 清空操作日志
export function cleanOperlog() {
return request({
url: '/api/v1/operlog/clean',
method: 'delete'
})
}
// 查询SysOperlog列表
export function listSysOperlog(query) {
return request({
url: '/api/v1/sys-opera-log',
method: 'get',
params: query
})
}
// 删除SysOperlog
export function delSysOperlog(data) {
return request({
url: '/api/v1/sys-opera-log',
method: 'delete',
data: data
})
}

46
src/api/admin/sys-post.js Normal file
View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
// 查询岗位列表
export function listPost(query) {
return request({
url: '/api/v1/post',
method: 'get',
params: query
})
}
// 查询岗位详细
export function getPost(postId) {
return request({
url: '/api/v1/post/' + postId,
method: 'get'
})
}
// 新增岗位
export function addPost(data) {
return request({
url: '/api/v1/post',
method: 'post',
data: data
})
}
// 修改岗位
export function updatePost(data, id) {
return request({
url: '/api/v1/post/' + id,
method: 'put',
data: data
})
}
// 删除岗位
export function delPost(postId) {
return request({
url: '/api/v1/post',
method: 'delete',
data: postId
})
}

88
src/api/admin/sys-role.js Normal file
View File

@ -0,0 +1,88 @@
import request from '@/utils/request'
// 查询角色列表
export function listRole(query) {
return request({
url: '/api/v1/role',
method: 'get',
params: query
})
}
// 查询角色详细
export function getRole(roleId) {
return request({
url: '/api/v1/role/' + roleId,
method: 'get'
})
}
// 新增角色
export function addRole(data) {
return request({
url: '/api/v1/role',
method: 'post',
data: data
})
}
// 修改角色
export function updateRole(data, roleId) {
return request({
url: '/api/v1/role/' + roleId,
method: 'put',
data: data
})
}
// 角色数据权限
export function dataScope(data) {
return request({
url: '/api/v1/roledatascope',
method: 'put',
data: data
})
}
// 角色状态修改
export function changeRoleStatus(roleId, status) {
const data = {
roleId,
status
}
return request({
url: '/api/v1/role-status',
method: 'put',
data: data
})
}
// 删除角色
export function delRole(roleId) {
return request({
url: '/api/v1/role',
method: 'delete',
data: roleId
})
}
export function getListrole(id) {
return request({
url: '/api/v1/menu/role/' + id,
method: 'get'
})
}
export function getRoutes() {
return request({
url: '/api/v1/menurole',
method: 'get'
})
}
// export function getMenuNames() {
// return request({
// url: '/api/v1/menuids',
// method: 'get'
// })
// }

135
src/api/admin/sys-user.js Normal file
View File

@ -0,0 +1,135 @@
import request from '@/utils/request'
// 查询用户列表
export function listUser(query) {
return request({
url: '/api/v1/sys-user',
method: 'get',
params: query
})
}
// 查询用户详细
export function getUser(userId) {
return request({
url: '/api/v1/sys-user/' + userId,
method: 'get'
})
}
export function getUserInit() {
return request({
url: '/api/v1/sys-user/',
method: 'get'
})
}
// 新增用户
export function addUser(data) {
return request({
url: '/api/v1/sys-user',
method: 'post',
data: data
})
}
// 修改用户
export function updateUser(data) {
return request({
url: '/api/v1/sys-user',
method: 'put',
data: data
})
}
// 删除用户
export function delUser(data) {
return request({
url: '/api/v1/sys-user',
method: 'delete',
data: data
})
}
// 导出用户
export function exportUser(query) {
return request({
url: '/api/v1/sys-user/export',
method: 'get',
params: query
})
}
// 用户密码重置
export function resetUserPwd(userId, password) {
const data = {
userId,
password
}
return request({
url: '/api/v1/user/pwd/reset',
method: 'put',
data: data
})
}
// 用户状态修改
export function changeUserStatus(e) {
const data = {
userId: e.userId,
status: e.status
}
return request({
url: '/api/v1/user/status',
method: 'put',
data: data
})
}
// 修改用户个人信息
export function updateUserProfile(data) {
return request({
url: '/api/v1/sys-user/profile',
method: 'put',
data: data
})
}
// 下载用户导入模板
export function importTemplate() {
return request({
url: '/api/v1/sys-user/importTemplate',
method: 'get'
})
}
// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
const data = {
oldPassword,
newPassword
}
return request({
url: '/api/v1/user/pwd/set',
method: 'put',
data: data
})
}
// 用户头像上传
export function uploadAvatar(data) {
return request({
url: '/api/v1/user/avatar',
method: 'post',
data: data
})
}
// 查询用户个人信息
export function getUserProfile() {
return request({
url: '/api/v1/user/profile',
method: 'get'
})
}

View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
// 查询TmMemberDailyUsage列表
export function listTmMemberDailyUsage(query) {
return request({
url: '/api/v1/tm-member-daily-usage',
method: 'get',
params: query
})
}
// 查询TmMemberDailyUsage详细
export function getTmMemberDailyUsage(id) {
return request({
url: '/api/v1/tm-member-daily-usage/' + id,
method: 'get'
})
}
// 新增TmMemberDailyUsage
export function addTmMemberDailyUsage(data) {
return request({
url: '/api/v1/tm-member-daily-usage',
method: 'post',
data: data
})
}
// 修改TmMemberDailyUsage
export function updateTmMemberDailyUsage(data) {
return request({
url: '/api/v1/tm-member-daily-usage/' + data.id,
method: 'put',
data: data
})
}
// 删除TmMemberDailyUsage
export function delTmMemberDailyUsage(data) {
return request({
url: '/api/v1/tm-member-daily-usage',
method: 'delete',
data: data
})
}

View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
// 查询TmMemberPlatform列表
export function listTmMemberPlatform(query) {
return request({
url: '/api/v1/tm-member-platform',
method: 'get',
params: query
})
}
// 查询TmMemberPlatform详细
export function getTmMemberPlatform(id) {
return request({
url: '/api/v1/tm-member-platform/' + id,
method: 'get'
})
}
// 新增TmMemberPlatform
export function addTmMemberPlatform(data) {
return request({
url: '/api/v1/tm-member-platform',
method: 'post',
data: data
})
}
// 修改TmMemberPlatform
export function updateTmMemberPlatform(data) {
return request({
url: '/api/v1/tm-member-platform/' + data.id,
method: 'put',
data: data
})
}
// 删除TmMemberPlatform
export function delTmMemberPlatform(data) {
return request({
url: '/api/v1/tm-member-platform',
method: 'delete',
data: data
})
}

View File

@ -0,0 +1,78 @@
import request from '@/utils/request'
// 查询TmMember列表
export function listTmMember(query) {
return request({
url: '/api/v1/tm-member',
method: 'get',
params: query
})
}
// 查询TmMember详细
export function getTmMember(id) {
return request({
url: '/api/v1/tm-member/' + id,
method: 'get'
})
}
// 新增TmMember
export function addTmMember(data) {
return request({
url: '/api/v1/tm-member',
method: 'post',
data: data
})
}
// 修改TmMember
export function updateTmMember(data) {
return request({
url: '/api/v1/tm-member/' + data.id,
method: 'put',
data: data
})
}
// 删除TmMember
export function delTmMember(data) {
return request({
url: '/api/v1/tm-member',
method: 'delete',
data: data
})
}
// 获取API Key
export function getMyKey() {
return request({
url: '/api/v1/tm-member/api-key',
method: 'get'
})
}
// 获取使用量统计
export function getTranslateDataStatistic() {
return request({
url: '/api/v1/translate/datastatistics',
method: 'get'
})
}
// 字符充值
export function tmMemberRecharge(data) {
return request({
url: '/api/v1/tm-member/recharge',
method: 'post',
data: data
})
}
export function changeTmMemberStatus(data) {
return request({
url: '/api/v1/tm-member/status',
method: 'put',
data: data
})
}

View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
// 查询TmPlatformAccount列表
export function listTmPlatformAccount(query) {
return request({
url: '/api/v1/tm-platform-account',
method: 'get',
params: query
})
}
// 查询TmPlatformAccount详细
export function getTmPlatformAccount(id) {
return request({
url: '/api/v1/tm-platform-account/' + id,
method: 'get'
})
}
// 新增TmPlatformAccount
export function addTmPlatformAccount(data) {
return request({
url: '/api/v1/tm-platform-account',
method: 'post',
data: data
})
}
// 修改TmPlatformAccount
export function updateTmPlatformAccount(data) {
return request({
url: '/api/v1/tm-platform-account/' + data.id,
method: 'put',
data: data
})
}
// 删除TmPlatformAccount
export function delTmPlatformAccount(data) {
return request({
url: '/api/v1/tm-platform-account',
method: 'delete',
data: data
})
}

View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
// 查询TmPlatform列表
export function listTmPlatform(query) {
return request({
url: '/api/v1/tm-platform',
method: 'get',
params: query
})
}
// 查询TmPlatform详细
export function getTmPlatform(id) {
return request({
url: '/api/v1/tm-platform/' + id,
method: 'get'
})
}
// 新增TmPlatform
export function addTmPlatform(data) {
return request({
url: '/api/v1/tm-platform',
method: 'post',
data: data
})
}
// 修改TmPlatform
export function updateTmPlatform(data) {
return request({
url: '/api/v1/tm-platform/' + data.id,
method: 'put',
data: data
})
}
// 删除TmPlatform
export function delTmPlatform(data) {
return request({
url: '/api/v1/tm-platform',
method: 'delete',
data: data
})
}

62
src/api/job/sys-job.js Normal file
View File

@ -0,0 +1,62 @@
import request from '@/utils/request'
// 查询SysJob列表
export function listSysJob(query) {
return request({
url: '/api/v1/sysjob',
method: 'get',
params: query
})
}
// 查询SysJob详细
export function getSysJob(jobId) {
return request({
url: '/api/v1/sysjob/' + jobId,
method: 'get'
})
}
// 新增SysJob
export function addSysJob(data) {
return request({
url: '/api/v1/sysjob',
method: 'post',
data: data
})
}
// 修改SysJob
export function updateSysJob(data) {
return request({
url: '/api/v1/sysjob',
method: 'put',
data: data
})
}
// 删除SysJob
export function delSysJob(data) {
return request({
url: '/api/v1/sysjob',
method: 'delete',
data: data
})
}
// 移除SysJob
export function removeJob(jobId) {
return request({
url: '/api/v1/job/remove/' + jobId,
method: 'get'
})
}
// 启动SysJob
export function startJob(jobId) {
return request({
url: '/api/v1/job/start/' + jobId,
method: 'get'
})
}

17
src/api/login.js Normal file
View File

@ -0,0 +1,17 @@
import request from '@/utils/request'
// 获取验证码
export function getCodeImg() {
return request({
url: '/api/v1/captcha',
method: 'get'
})
}
// 查询 此接口不在验证数据权限
export function getSetting() {
return request({
url: '/api/v1/app-config',
method: 'get'
})
}

View File

@ -0,0 +1,9 @@
import request from '@/utils/request'
// 查询服务器详细
export function getServer() {
return request({
url: '/api/v1/server-monitor',
method: 'get'
})
}

17
src/api/remote-search.js Normal file
View File

@ -0,0 +1,17 @@
import request from '@/utils/request'
export function searchUser(name) {
return request({
url: '/search/user',
method: 'get',
params: { name }
})
}
export function transactionList(query) {
return request({
url: '/transaction/list',
method: 'get',
params: query
})
}

43
src/api/schedule.js Normal file
View File

@ -0,0 +1,43 @@
import request from '@/utils/request'
export function list(data) {
return request({
url: 'api/v1/schedule/list',
method: 'get',
params: data
})
}
export function add(data) {
return request({
url: 'api/v1/schedule/add',
method: 'post',
data
})
}
export function edit(data) {
return request({
url: 'api/v1/schedule/update',
method: 'put',
data
})
}
export function getSchedule(id) {
return request({
url: 'api/v1/schedule/query',
method: 'get',
params: {
id
}
})
}
export function deleteSchedule(data) {
return request({
url: 'api/v1/schedule/delete',
method: 'delete',
data
})
}

20
src/api/table.js Normal file
View File

@ -0,0 +1,20 @@
// 查询列表
export function getItems(f, query) {
query = query || { pageSize: 10000 }
return f(query)
}
export function setItems(response, k, v) {
const data = []
k = k || 'id'
v = v || 'name'
if (response.data && response.data.list && response.data.list.length > 0) {
response.data.list.forEach(e => {
data.push({
key: e[k].toString(),
value: e[v].toString()
})
})
return data
}
}

103
src/api/tools/gen.js Normal file
View File

@ -0,0 +1,103 @@
import request from '@/utils/request'
// 查询生成表数据
export function listTable(query) {
return request({
url: '/api/v1/sys/tables/page',
method: 'get',
params: query
})
}
// 查询db数据库列表
export function listDbTable(query) {
return request({
url: '/api/v1/db/tables/page',
method: 'get',
params: query
})
}
// 查询表详细信息
export function getGenTable(tableId) {
return request({
url: '/api/v1/sys/tables/info/' + tableId,
method: 'get'
})
}
export function getGenTableInfo(tablename) {
return request({
url: '/api/v1/sys/tables?tableName=' + tablename,
method: 'get'
})
}
// 修改代码生成信息
export function updateGenTable(data) {
return request({
url: '/api/v1/sys/tables/info',
method: 'put',
data: data
})
}
// 导入表
export function importTable(data) {
return request({
url: '/api/v1/sys/tables/info',
method: 'post',
params: data
})
}
// 预览生成代码
export function previewTable(tableId) {
return request({
url: '/api/v1/gen/preview/' + tableId,
method: 'get'
})
}
// 删除表数据
export function delTable(tableId) {
return request({
url: '/api/v1/sys/tables/info/' + tableId,
method: 'delete'
})
}
// 生成代码到项目
export function toProjectTable(tableId) {
return request({
url: '/api/v1/gen/toproject/' + tableId,
method: 'get'
})
}
// 生成接口数据到迁移脚本
export function apiToFile(tableId) {
return request({
url: '/api/v1/gen/apitofile/' + tableId,
method: 'get'
})
}
export function toProjectTableCheckRole(tableId, ischeckrole) {
return request({
url: '/api/v1/gen/toproject/' + tableId + '?ischeckrole=' + ischeckrole,
method: 'get'
})
}
// 生成菜单到数据库
export function toDBTable(tableId) {
return request({
url: '/api/v1/gen/todb/' + tableId,
method: 'get'
})
}
export function getTableTree() {
return request({
url: '/api/v1/gen/tabletree',
method: 'get'
})
}

36
src/api/user.js Normal file
View File

@ -0,0 +1,36 @@
import request from '@/utils/request'
// login 登陆
export function login(data) {
return request({
url: '/api/v1/login',
method: 'post',
data
})
}
// logout 退出
export function logout() {
return request({
url: '/api/v1/logout',
method: 'post'
})
}
// refreshtoken 刷新token
export function refreshtoken(data) {
return request({
url: '/refreshtoken',
method: 'post',
data
})
}
// getInfo 获取用户基本信息
export function getInfo() {
return request({
url: '/api/v1/getinfo',
method: 'get'
})
}

9
src/api/ws.js Normal file
View File

@ -0,0 +1,9 @@
import request from '@/utils/request'
// 查询SysJob列表
export function unWsLogout(id, group) {
return request({
url: '/wslogout/' + id + '/' + group,
method: 'get'
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

39
src/assets/dark.svg Normal file
View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="52px" height="45px" viewBox="0 0 52 45" version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<filter x="-9.4%" y="-6.2%" width="118.8%" height="122.5%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect>
<filter x="-4.2%" y="-2.5%" width="108.3%" height="110.0%" filterUnits="objectBoundingBox" id="filter-4">
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="配置面板" width="48" height="40" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="setting-copy-2" width="48" height="40" transform="translate(-1190.000000, -136.000000)">
<g id="Group-8" width="48" height="40" transform="translate(1167.000000, 0.000000)">
<g id="Group-5-Copy-5" filter="url(#filter-1)" transform="translate(25.000000, 137.000000)">
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<g id="Rectangle-18">
<use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use>
<use fill="#F0F2F5" fill-rule="evenodd" xlink:href="#path-2"></use>
</g>
<rect id="Rectangle-11" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="48" height="10"></rect>
<rect id="Rectangle-18" fill="#303648" mask="url(#mask-3)" x="0" y="0" width="16" height="40"></rect>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/icons/12-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/assets/icons/AU-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
src/assets/icons/Access.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
src/assets/icons/Excel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
src/assets/icons/Ic-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
src/assets/icons/Idea.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src/assets/icons/Link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
src/assets/icons/Pl-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
src/assets/icons/Pn-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/assets/icons/Typora.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/assets/icons/UTools.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/assets/icons/Unknow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
src/assets/icons/Visio.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/assets/icons/Web.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Some files were not shown because too many files have changed in this diff Show More