@ -0,0 +1,22 @@ |
||||
# 告诉EditorConfig插件,这是根文件,不用继续往上查找 |
||||
root = true |
||||
|
||||
# 匹配全部文件 |
||||
[*] |
||||
# 设置字符集 |
||||
charset = utf-8 |
||||
# 缩进风格,可选space、tab |
||||
indent_style = space |
||||
# 缩进的空格数 |
||||
indent_size = 2 |
||||
# 结尾换行符,可选lf、cr、crlf |
||||
end_of_line = lf |
||||
# 在文件结尾插入新行 |
||||
insert_final_newline = true |
||||
# 删除一行中的前后空格 |
||||
trim_trailing_whitespace = true |
||||
|
||||
# 匹配md结尾的文件 |
||||
[*.md] |
||||
insert_final_newline = false |
||||
trim_trailing_whitespace = false |
@ -0,0 +1,6 @@ |
||||
# just a flag |
||||
ENV = 'development' |
||||
|
||||
# base api |
||||
# VUE_APP_BASE_API = '/dev-api' |
||||
VUE_APP_BASE_API = 'http://localhost:9901/api' |
@ -0,0 +1,6 @@ |
||||
# just a flag |
||||
ENV = 'production' |
||||
|
||||
# base api |
||||
VUE_APP_BASE_API = '/prod-api' |
||||
|
@ -0,0 +1,8 @@ |
||||
NODE_ENV = production |
||||
|
||||
# just a flag |
||||
ENV = 'staging' |
||||
|
||||
# base api |
||||
VUE_APP_BASE_API = '/stage-api' |
||||
|
@ -0,0 +1,4 @@ |
||||
build/*.js |
||||
src/assets |
||||
public |
||||
dist |
@ -0,0 +1,199 @@ |
||||
// ESlint 检查配置
|
||||
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'] |
||||
} |
||||
} |
@ -0,0 +1,16 @@ |
||||
.DS_Store |
||||
node_modules/ |
||||
dist/ |
||||
npm-debug.log* |
||||
yarn-debug.log* |
||||
yarn-error.log* |
||||
package-lock.json |
||||
tests/**/coverage/ |
||||
|
||||
# Editor directories and files |
||||
.idea |
||||
.vscode |
||||
*.suo |
||||
*.ntvs* |
||||
*.njsproj |
||||
*.sln |
@ -0,0 +1,5 @@ |
||||
language: node_js |
||||
node_js: 10 |
||||
script: npm run test |
||||
notifications: |
||||
email: false |
@ -0,0 +1,21 @@ |
||||
MIT License |
||||
|
||||
Copyright (c) 2017-present PanJiaChen |
||||
|
||||
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. |
@ -0,0 +1,14 @@ |
||||
module.exports = { |
||||
presets: [ |
||||
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
|
||||
'@vue/cli-plugin-babel/preset' |
||||
], |
||||
'env': { |
||||
'development': { |
||||
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
|
||||
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
|
||||
// https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
|
||||
'plugins': ['dynamic-import-node'] |
||||
} |
||||
} |
||||
} |
@ -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}`) |
||||
} |
@ -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/' |
||||
} |
@ -0,0 +1,9 @@ |
||||
{ |
||||
"compilerOptions": { |
||||
"baseUrl": "./", |
||||
"paths": { |
||||
"@/*": ["src/*"] |
||||
} |
||||
}, |
||||
"exclude": ["node_modules", "dist"] |
||||
} |
@ -0,0 +1,69 @@ |
||||
{ |
||||
"name": "vue-admin-template", |
||||
"version": "4.4.0", |
||||
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", |
||||
"author": "Pan <panfree23@gmail.com>", |
||||
"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", |
||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", |
||||
"lint": "eslint --ext .js,.vue src", |
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit", |
||||
"test:ci": "npm run lint && npm run test:unit" |
||||
}, |
||||
"dependencies": { |
||||
"axios": "0.18.1", |
||||
"clean": "^4.0.2", |
||||
"core-js": "3.6.5", |
||||
"element-ui": "2.13.2", |
||||
"js-cookie": "2.2.0", |
||||
"jsencrypt": "^3.0.0-rc.1", |
||||
"normalize.css": "7.0.0", |
||||
"nprogress": "0.2.0", |
||||
"path-to-regexp": "2.4.0", |
||||
"sortablejs": "^1.13.0", |
||||
"vue": "2.6.10", |
||||
"vue-cropper": "^0.5.6", |
||||
"vue-router": "3.0.6", |
||||
"vuex": "3.1.0" |
||||
}, |
||||
"devDependencies": { |
||||
"@vue/cli-plugin-babel": "4.4.4", |
||||
"@vue/cli-plugin-eslint": "4.4.4", |
||||
"@vue/cli-plugin-unit-jest": "4.4.4", |
||||
"@vue/cli-service": "4.4.4", |
||||
"@vue/test-utils": "1.0.0-beta.29", |
||||
"@riophae/vue-treeselect": "0.4.0", |
||||
"autoprefixer": "9.5.1", |
||||
"babel-eslint": "10.1.0", |
||||
"babel-jest": "23.6.0", |
||||
"babel-plugin-dynamic-import-node": "2.3.3", |
||||
"chalk": "2.4.2", |
||||
"connect": "3.6.6", |
||||
"eslint": "6.7.2", |
||||
"eslint-plugin-vue": "6.2.2", |
||||
"html-webpack-plugin": "3.2.0", |
||||
"less": "^4.0.0", |
||||
"less-loader": "^7.2.0", |
||||
"mockjs": "1.0.1-beta3", |
||||
"runjs": "4.3.2", |
||||
"sass": "1.26.8", |
||||
"sass-loader": "8.0.2", |
||||
"script-ext-html-webpack-plugin": "2.1.3", |
||||
"serve-static": "1.13.2", |
||||
"svg-sprite-loader": "4.1.3", |
||||
"svgo": "1.2.2", |
||||
"vue-template-compiler": "2.6.10" |
||||
}, |
||||
"browserslist": [ |
||||
"> 1%", |
||||
"last 2 versions" |
||||
], |
||||
"engines": { |
||||
"node": ">=8.9", |
||||
"npm": ">= 3.0.0" |
||||
}, |
||||
"license": "MIT" |
||||
} |
@ -0,0 +1,8 @@ |
||||
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||
|
||||
module.exports = { |
||||
'plugins': { |
||||
// to edit target browsers: use "browserslist" field in package.json
|
||||
'autoprefixer': {} |
||||
} |
||||
} |
After Width: | Height: | Size: 37 KiB |
@ -0,0 +1,17 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
||||
<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> |
||||
</head> |
||||
<body> |
||||
<noscript> |
||||
<strong>We're sorry but <%= webpackConfig.name %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
||||
</noscript> |
||||
<div id="app"></div> |
||||
<!-- built files will be auto injected --> |
||||
</body> |
||||
</html> |
@ -0,0 +1,11 @@ |
||||
<template> |
||||
<div id="app"> |
||||
<router-view /> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
name: 'App' |
||||
} |
||||
</script> |
@ -0,0 +1,77 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 查询部门管理树-列表
|
||||
export function listDeptMgmtTree(query) { |
||||
return request({ |
||||
url: '/dept/listDeptMgmtTree', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询部门选项树-列表
|
||||
export function listDeptOptionTree(query) { |
||||
return request({ |
||||
url: '/dept/listDeptOptionTree', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询部门列表(排除节点)
|
||||
export function listDeptExcludeChild(deptId) { |
||||
return request({ |
||||
url: '/system/dept/list/exclude/' + deptId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 查询部门详细
|
||||
export function getDeptDetail(deptId) { |
||||
return request({ |
||||
url: '/dept/detail/' + deptId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 查询部门下拉树结构
|
||||
export function treeselect() { |
||||
return request({ |
||||
url: '/dept/listDeptOptionTree', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 根据角色ID查询部门树结构
|
||||
export function roleDeptTreeselect(roleId) { |
||||
return request({ |
||||
url: '/system/dept/roleDeptTreeselect/' + roleId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增部门
|
||||
export function addDept(data) { |
||||
return request({ |
||||
url: '/dept/add', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改部门
|
||||
export function updateDept(data) { |
||||
return request({ |
||||
url: '/dept/update', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除部门
|
||||
export function delDept(deptId) { |
||||
return request({ |
||||
url: '/dept/delete/' + deptId, |
||||
method: 'delete' |
||||
}) |
||||
} |
@ -0,0 +1,40 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 登录方法
|
||||
export function login(username, password, captchaCode, requestId) { |
||||
const data = { |
||||
username, |
||||
password, |
||||
captchaCode, |
||||
requestId |
||||
} |
||||
return request({ |
||||
url: '/login', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 获取用户详细信息
|
||||
export function getUserInfo() { |
||||
return request({ |
||||
url: '/getUserInfo', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 退出方法
|
||||
export function logout() { |
||||
return request({ |
||||
url: '/logout', |
||||
method: 'post' |
||||
}) |
||||
} |
||||
|
||||
// 获取验证码
|
||||
export function getCaptchaImage() { |
||||
return request({ |
||||
url: '/captchaImage', |
||||
method: 'get' |
||||
}) |
||||
} |
@ -0,0 +1,11 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 分页列表
|
||||
export function listLoginLog(query) { |
||||
return request({ |
||||
url: '/login/log/listPage', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
@ -0,0 +1,79 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 获取路由
|
||||
export const getRouters = () => { |
||||
return request({ |
||||
url: '/getRouters', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 查询菜单列表
|
||||
export function listMenuTree(query) { |
||||
return request({ |
||||
url: '/menu/listMenuTree', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询菜单选项列表
|
||||
export function listMenuOptionTree(query) { |
||||
return request({ |
||||
url: '/menu/listMenuOptionTree', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询菜单详细
|
||||
export function getMenuDetail(menuId) { |
||||
return request({ |
||||
url: '/menu/detail/' + menuId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
|
||||
// 新增菜单
|
||||
export function addMenu(data) { |
||||
return request({ |
||||
url: '/menu/add', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改菜单
|
||||
export function updateMenu(data) { |
||||
return request({ |
||||
url: '/menu/update', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除菜单
|
||||
export function delMenu(menuId) { |
||||
return request({ |
||||
url: '/menu/delete/' + menuId, |
||||
method: 'delete' |
||||
}) |
||||
} |
||||
|
||||
// 查询菜单下拉树结构
|
||||
export function treeselect() { |
||||
return request({ |
||||
url: '/menu/listMenuTree', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 根据角色ID查询菜单下拉树结构
|
||||
export function roleMenuTreeselect(roleId) { |
||||
return request({ |
||||
url: '/system/menu/roleMenuTreeselect/' + roleId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
@ -0,0 +1,64 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
export function listPage(query) { |
||||
return request({ |
||||
url: '/role/listPage', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
//下拉选项
|
||||
export function listRoleOption(query) { |
||||
return request({ |
||||
url: '/role/listOption', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询角色详细
|
||||
export function getRoleDetail(roleId) { |
||||
return request({ |
||||
url: '/role/detail/' + roleId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增角色
|
||||
export function addRole(data) { |
||||
return request({ |
||||
url: '/role/add', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改角色
|
||||
export function updateRole(data) { |
||||
return request({ |
||||
url: '/role/update', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除角色
|
||||
export function delRole(menuId) { |
||||
return request({ |
||||
url: '/role/delete/' + menuId, |
||||
method: 'delete' |
||||
}) |
||||
} |
||||
|
||||
// 移除角色用户绑定关系
|
||||
export function removeUserRole(roleId, userId) { |
||||
const data = { 'roleId': roleId, 'userId': userId } |
||||
return request({ |
||||
url: '/role/removeUser', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
|
@ -0,0 +1,81 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 我的平台列表
|
||||
export function platformMyList(query) { |
||||
return request({ |
||||
url: '/system/myList', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 我的平台排序
|
||||
export function sortMySystem(sysCodeList) { |
||||
const data = { 'sysCodeList': sysCodeList } |
||||
return request({ |
||||
url: '/system/sortMy', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 平台管理列表
|
||||
export function platformMgmtList(query) { |
||||
return request({ |
||||
url: '/system/mgmtList', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 系统详情
|
||||
export function getDetailBySysCode(query) { |
||||
return request({ |
||||
url: '/system/getDetailBySysCode?sysCode=' + query, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增平台
|
||||
export function addSystem(data) { |
||||
return request({ |
||||
url: '/system/add', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改平台
|
||||
export function updateSystem(data) { |
||||
return request({ |
||||
url: '/system/update', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改秘钥
|
||||
export function updateSecret(data) { |
||||
return request({ |
||||
url: '/system/updateSecret', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改图标
|
||||
export function uploadSysIcon(sysId, data) { |
||||
return request({ |
||||
url: '/system/uploadIcon/' + sysId, |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除平台
|
||||
export function delSystem(sysId) { |
||||
return request({ |
||||
url: '/system/delete/' + sysId, |
||||
method: 'delete' |
||||
}) |
||||
} |
@ -0,0 +1,40 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 系统管理员-用户分页列表
|
||||
export function listPageSystemMgmt(query) { |
||||
return request({ |
||||
url: '/systemMgmt/listPage', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 新增-管理员权限
|
||||
export function addSystemMgmt(data) { |
||||
return request({ |
||||
url: '/systemMgmt/add', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 移除-用户管理员权限
|
||||
export function removeUserSystemMgmt(sysCode, userId) { |
||||
const data = { 'sysCode': sysCode, 'userId': userId } |
||||
return request({ |
||||
url: '/systemMgmt/remove', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改状态-用户管理员权限
|
||||
export function updateSystemMgmtStatus(id, status) { |
||||
const data = { 'id': id, 'status': status } |
||||
return request({ |
||||
url: '/systemMgmt/updateStatus', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
@ -0,0 +1,9 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
export function getList(params) { |
||||
return request({ |
||||
url: '/vue-admin-template/table/list', |
||||
method: 'get', |
||||
params |
||||
}) |
||||
} |
@ -0,0 +1,201 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
export function login(data) { |
||||
return request({ |
||||
url: '/login', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function getInfo(token) { |
||||
return request({ |
||||
url: '/getUserInfo', |
||||
method: 'get', |
||||
params: { token } |
||||
}) |
||||
} |
||||
|
||||
export function logout() { |
||||
return request({ |
||||
url: '/logout', |
||||
method: 'post' |
||||
}) |
||||
} |
||||
|
||||
// 查询用户列表
|
||||
export function listUser(query) { |
||||
return request({ |
||||
url: '/user/listPage', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 根据用户名或者手机号-模糊查询用户下拉列表
|
||||
export function listUserOption(keywords) { |
||||
if (null === keywords || undefined === keywords) { |
||||
keywords = '' |
||||
} |
||||
return request({ |
||||
url: '/user/listUserOption?keywords=' + keywords, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 查询用户详细
|
||||
export function getDeptDetail(data) { |
||||
return request({ |
||||
url: '/user/detail', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 根据手机号查询
|
||||
export function getUserByPhone(phone) { |
||||
return request({ |
||||
url: '/user/getUserByPhone/' + phone, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 根据用户名查询
|
||||
export function getUserByUserName(username) { |
||||
return request({ |
||||
url: '/user/getUserByUserName/' + username, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增用户
|
||||
export function addUser(data) { |
||||
return request({ |
||||
url: '/user/add', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改用户
|
||||
export function updateUser(data) { |
||||
return request({ |
||||
url: '/user/update', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 移除用户系统关系
|
||||
export function removeUserSystem(data) { |
||||
return request({ |
||||
url: '/user/removeUserSystem', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除用户
|
||||
export function delUser(data) { |
||||
return request({ |
||||
url: '/user/delete', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 导出用户
|
||||
export function exportUser(query) { |
||||
return request({ |
||||
url: '/system/user/export', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) { |
||||
const data = { |
||||
userId, |
||||
password |
||||
} |
||||
return request({ |
||||
url: '/user/resetPwd', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户状态修改
|
||||
export function changeUserStatus(userId, status) { |
||||
const data = { |
||||
userId, |
||||
status |
||||
} |
||||
return request({ |
||||
url: '/system/user/changeStatus', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() { |
||||
return request({ |
||||
url: '/user/profile/detail', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) { |
||||
return request({ |
||||
url: '/user/profile/update', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(userId, oldPassword, newPassword) { |
||||
const data = { 'userId': userId, 'oldPassword': oldPassword, 'newPassword': newPassword } |
||||
return request({ |
||||
url: '/user/profile/updatePwd', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) { |
||||
return request({ |
||||
url: '/user/profile/avatar', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 在线用户列表
|
||||
export function listPageOnlineUser(query) { |
||||
return request({ |
||||
url: '/user/online/listPage', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查看已登录子系统列表
|
||||
export function listOnlineSys(userId) { |
||||
return request({ |
||||
url: '/user/online/listOnlineSys/' + userId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 强退用户
|
||||
export function retreatUser(userId) { |
||||
return request({ |
||||
url: '/user/online/retreatUser/' + userId, |
||||
method: 'put' |
||||
}) |
||||
} |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 4.7 KiB |
@ -0,0 +1,9 @@ |
||||
import Vue from 'vue' |
||||
import SvgIcon from '@/components/SvgIcon'// svg component
|
||||
|
||||
// register globally
|
||||
Vue.component('svg-icon', SvgIcon) |
||||
|
||||
const req = require.context('./svg', false, /\.svg$/) |
||||
const requireAll = requireContext => requireContext.keys().map(requireContext) |
||||
requireAll(req) |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 954 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 179 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 971 B |
After Width: | Height: | Size: 732 B |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 418 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 356 B |
After Width: | Height: | Size: 724 B |
After Width: | Height: | Size: 818 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 347 B |
After Width: | Height: | Size: 497 B |
After Width: | Height: | Size: 459 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 944 B |
After Width: | Height: | Size: 710 B |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 421 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 744 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 285 B |
After Width: | Height: | Size: 1017 B |
After Width: | Height: | Size: 444 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 669 B |
After Width: | Height: | Size: 335 B |
After Width: | Height: | Size: 884 B |
After Width: | Height: | Size: 821 B |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 731 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 757 B |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.3 KiB |