From 2f0465a1a14dc99ac83fec5d95b5d1b539e094bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=A7=80=E9=92=A2?= Date: Wed, 2 Jun 2021 14:11:45 +0800 Subject: [PATCH] =?UTF-8?q?added=20ESlint=20=E8=AF=AD=E6=B3=95=E6=A3=80?= =?UTF-8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/.eslintignore | 4 + web/.eslintrc.js | 269 ++++++++ web/babel.config.js | 8 +- web/build.config.js | 30 +- web/openDocument.js | 24 +- web/src/App.vue | 10 +- web/src/api/api.js | 86 ++- web/src/api/authority.js | 64 +- web/src/api/autoCode.js | 54 +- web/src/api/breakpoint.js | 36 +- web/src/api/casbin.js | 24 +- web/src/api/customer.js | 57 +- web/src/api/email.js | 12 +- web/src/api/excel.js | 98 +-- web/src/api/fileUploadAndDownload.js | 24 +- web/src/api/github.js | 43 +- web/src/api/initdb.js | 22 +- web/src/api/jwt.js | 11 +- web/src/api/menu.js | 91 ++- web/src/api/simpleUploader.js | 22 +- web/src/api/sysDictionary.js | 71 +-- web/src/api/sysDictionaryDetail.js | 71 +-- web/src/api/sysOperationRecord.js | 32 +- web/src/api/system.js | 36 +- web/src/api/user.js | 116 ++-- web/src/api/workflowProcess.js | 146 +++-- web/src/components/chooseImg/index.vue | 40 +- web/src/components/customPic/index.vue | 102 +-- web/src/components/upload/image.vue | 51 +- web/src/directive/auth.js | 68 +- web/src/main.js | 228 ++++--- web/src/mixins/infoList.js | 76 +-- web/src/permission.js | 80 +-- web/src/router/index.js | 33 +- web/src/store/index.js | 26 +- web/src/store/module/dictionary.js | 76 +-- web/src/store/module/router.js | 145 +++-- web/src/store/module/user.js | 141 +++-- web/src/utils/_import.js | 4 +- web/src/utils/asyncRouter.js | 24 +- web/src/utils/bus.js | 30 +- web/src/utils/date.js | 42 +- web/src/utils/dictionary.js | 10 +- web/src/utils/downloadImg.js | 36 +- web/src/utils/image.js | 162 +++-- web/src/utils/page.js | 10 +- web/src/utils/request.js | 173 +++-- web/src/utils/stringFun.js | 6 +- web/src/view/about/index.vue | 76 +-- .../view/dashboard/component/musicPlayer.vue | 74 ++- .../dashboard/component/todoList/Todo.vue | 150 ++--- .../dashboard/component/todoList/index.vue | 212 +++---- web/src/view/dashboard/index.vue | 172 ++--- web/src/view/error/index.vue | 26 +- .../view/example/breakpoint/breakpoint.vue | 148 +++-- web/src/view/example/customer/customer.vue | 178 +++--- web/src/view/example/excel/excel.vue | 45 +- web/src/view/example/index.vue | 9 +- .../example/simpleUploader/simpleUploader.vue | 136 ++-- web/src/view/example/upload/upload.vue | 150 ++--- web/src/view/iconList/index.vue | 593 +++++++++-------- web/src/view/init/init.vue | 66 +- .../aside/asideComponent/asyncSubmenu.vue | 10 +- .../layout/aside/asideComponent/index.vue | 28 +- .../layout/aside/asideComponent/menuItem.vue | 6 +- .../layout/aside/historyComponent/history.vue | 264 ++++---- web/src/view/layout/aside/index.vue | 96 +-- web/src/view/layout/bottomInfo/bottomInfo.vue | 10 +- web/src/view/layout/index.vue | 172 ++--- web/src/view/layout/screenfull/index.vue | 98 ++- web/src/view/layout/search/search.vue | 43 +- web/src/view/login/login.vue | 130 ++-- web/src/view/person/person.vue | 118 ++-- web/src/view/routerHolder.vue | 11 +- web/src/view/superAdmin/api/api.vue | 337 +++++----- .../view/superAdmin/authority/authority.vue | 363 +++++------ .../superAdmin/authority/components/apis.vue | 63 +- .../superAdmin/authority/components/datas.vue | 149 +++-- .../superAdmin/authority/components/menus.vue | 86 +-- .../superAdmin/dictionary/sysDictionary.vue | 200 +++--- .../dictionary/sysDictionaryDetail.vue | 204 +++--- web/src/view/superAdmin/index.vue | 9 +- web/src/view/superAdmin/menu/icon.vue | 594 +++++++++--------- web/src/view/superAdmin/menu/menu.vue | 303 ++++----- .../operation/sysOperationRecord.vue | 168 ++--- web/src/view/superAdmin/user/user.vue | 153 +++-- web/src/view/system/state.vue | 86 +-- .../autoCode/component/fieldDialog.vue | 127 ++-- .../autoCode/component/previewCodeDialg.vue | 94 ++- web/src/view/systemTools/autoCode/index.vue | 349 +++++----- web/src/view/systemTools/formCreate/index.vue | 19 +- web/src/view/systemTools/index.vue | 9 +- web/src/view/systemTools/system/system.vue | 231 +++---- web/vue.config.js | 232 ++++--- 94 files changed, 5031 insertions(+), 4790 deletions(-) create mode 100644 web/.eslintignore create mode 100644 web/.eslintrc.js diff --git a/web/.eslintignore b/web/.eslintignore new file mode 100644 index 00000000..e6529fc0 --- /dev/null +++ b/web/.eslintignore @@ -0,0 +1,4 @@ +build/*.js +src/assets +public +dist diff --git a/web/.eslintrc.js b/web/.eslintrc.js new file mode 100644 index 00000000..92400e99 --- /dev/null +++ b/web/.eslintrc.js @@ -0,0 +1,269 @@ +//@author: [bstdn](https://github.com/bstdn) +//@description: 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'] + } +} diff --git a/web/babel.config.js b/web/babel.config.js index 682afd8b..205457ca 100644 --- a/web/babel.config.js +++ b/web/babel.config.js @@ -2,12 +2,12 @@ module.exports = { presets: [ '@vue/cli-plugin-babel/preset' ], - "plugins": [ + 'plugins': [ [ - "component", + 'component', { - "libraryName": "element-ui", - "styleLibraryName": "theme-chalk" + 'libraryName': 'element-ui', + 'styleLibraryName': 'theme-chalk' } ] ] diff --git a/web/build.config.js b/web/build.config.js index 75b666ee..8bf7c89e 100644 --- a/web/build.config.js +++ b/web/build.config.js @@ -1,19 +1,17 @@ 'use strict' module.exports = { - title: 'GIN-VUE-ADMIN1', - vueClientPort: 8080, - goServerPort: 8888, - baseCdnUrl: '//cdn.staticfile.org', - cdns: [ - /** - * 如果设置path属性, { name: 'vue', scope: 'Vue', path: '/vue/2.6.9/vue.min.js' } 即编译出来以[baseCdnUrl][path] - * 否则自动拼写 [baseCdnUrl]/[name]/[version]/[name].min.js - * */ - { name: 'vue', scope: 'Vue' }, - { name: 'vue-router', scope: 'VueRouter' }, - { name: 'vuex', scope: 'Vuex' }, - { name: 'axios', scope: 'axios' }, - { name: 'element-ui', scope: 'ELEMENT', path: '/element-ui/2.12.0/index.js'}, - ] -}; + title: 'GIN-VUE-ADMIN', + baseCdnUrl: '//cdn.staticfile.org', + cdns: [ + /** + * 如果设置path属性, { name: 'vue', scope: 'Vue', path: '/vue/2.6.9/vue.min.js' } 即编译出来以[baseCdnUrl][path] + * 否则自动拼写 [baseCdnUrl]/[name]/[version]/[name].min.js + * */ + { name: 'vue', scope: 'Vue' }, + { name: 'vue-router', scope: 'VueRouter' }, + { name: 'vuex', scope: 'Vuex' }, + { name: 'axios', scope: 'axios' }, + { name: 'element-ui', scope: 'ELEMENT', path: '/element-ui/2.12.0/index.js' } + ] +} diff --git a/web/openDocument.js b/web/openDocument.js index 0999755f..2d525416 100644 --- a/web/openDocument.js +++ b/web/openDocument.js @@ -5,19 +5,19 @@ 否则将依法维权 */ -var child_process = require("child_process"); +var child_process = require('child_process') -var url = "https://www.gin-vue-admin.com", - cmd = ''; +var url = 'https://www.gin-vue-admin.com' +var cmd = '' console.log(process.platform) switch (process.platform) { - case 'win32': - cmd = 'start'; - child_process.exec(cmd + ' ' + url); - break; + case 'win32': + cmd = 'start' + child_process.exec(cmd + ' ' + url) + break - case 'darwin': - cmd = 'open'; - child_process.exec(cmd + ' ' + url); - break; -} \ No newline at end of file + case 'darwin': + cmd = 'open' + child_process.exec(cmd + ' ' + url) + break +} diff --git a/web/src/App.vue b/web/src/App.vue index 356b6470..a864f38f 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -1,16 +1,16 @@ diff --git a/web/src/api/api.js b/web/src/api/api.js index 8549e9b1..2e665a42 100644 --- a/web/src/api/api.js +++ b/web/src/api/api.js @@ -1,4 +1,5 @@ import service from '@/utils/request' + // @Tags api // @Summary 分页获取角色列表 // @Security ApiKeyAuth @@ -12,14 +13,13 @@ import service from '@/utils/request' // pageSize int // } export const getApiList = (data) => { - return service({ - url: "/api/getApiList", - method: 'post', - data - }) + return service({ + url: '/api/getApiList', + method: 'post', + data + }) } - // @Tags Api // @Summary 创建基础api // @Security ApiKeyAuth @@ -29,11 +29,11 @@ export const getApiList = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /api/createApi [post] export const createApi = (data) => { - return service({ - url: "/api/createApi", - method: 'post', - data - }) + return service({ + url: '/api/createApi', + method: 'post', + data + }) } // @Tags menu @@ -45,15 +45,13 @@ export const createApi = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /menu/getApiById [post] export const getApiById = (data) => { - return service({ - url: "/api/getApiById", - method: 'post', - data - }) + return service({ + url: '/api/getApiById', + method: 'post', + data + }) } - - // @Tags Api // @Summary 更新api // @Security ApiKeyAuth @@ -63,11 +61,11 @@ export const getApiById = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"更新成功"}" // @Router /api/updateApi [post] export const updateApi = (data) => { - return service({ - url: "/api/updateApi", - method: 'post', - data - }) + return service({ + url: '/api/updateApi', + method: 'post', + data + }) } // @Tags Api @@ -79,11 +77,11 @@ export const updateApi = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"更新成功"}" // @Router /api/setAuthApi [post] export const setAuthApi = (data) => { - return service({ - url: "/api/setAuthApi", - method: 'post', - data - }) + return service({ + url: '/api/setAuthApi', + method: 'post', + data + }) } // @Tags Api @@ -94,11 +92,11 @@ export const setAuthApi = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /api/getAllApis [post] export const getAllApis = (data) => { - return service({ - url: "/api/getAllApis", - method: 'post', - data - }) + return service({ + url: '/api/getAllApis', + method: 'post', + data + }) } // @Tags Api @@ -110,11 +108,11 @@ export const getAllApis = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /api/deleteApi [post] export const deleteApi = (data) => { - return service({ - url: "/api/deleteApi", - method: 'post', - data - }) + return service({ + url: '/api/deleteApi', + method: 'post', + data + }) } // @Tags SysApi @@ -126,9 +124,9 @@ export const deleteApi = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Router /api/deleteApisByIds [delete] export const deleteApisByIds = (data) => { - return service({ - url: "/api/deleteApisByIds", - method: 'delete', - data - }) -} \ No newline at end of file + return service({ + url: '/api/deleteApisByIds', + method: 'delete', + data + }) +} diff --git a/web/src/api/authority.js b/web/src/api/authority.js index baee9e42..02dc4136 100644 --- a/web/src/api/authority.js +++ b/web/src/api/authority.js @@ -1,16 +1,14 @@ import service from '@/utils/request' - // @Router /authority/getAuthorityList [post] export const getAuthorityList = (data) => { - return service({ - url: "/authority/getAuthorityList", - method: 'post', - data - }) + return service({ + url: '/authority/getAuthorityList', + method: 'post', + data + }) } - // @Summary 删除角色 // @Security ApiKeyAuth // @accept application/json @@ -19,11 +17,11 @@ export const getAuthorityList = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /authority/deleteAuthority [post] export const deleteAuthority = (data) => { - return service({ - url: "/authority/deleteAuthority", - method: 'post', - data - }) + return service({ + url: '/authority/deleteAuthority', + method: 'post', + data + }) } // @Summary 创建角色 @@ -34,11 +32,11 @@ export const deleteAuthority = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /authority/createAuthority [post] export const createAuthority = (data) => { - return service({ - url: "/authority/createAuthority", - method: 'post', - data - }) + return service({ + url: '/authority/createAuthority', + method: 'post', + data + }) } // @Tags authority @@ -50,11 +48,11 @@ export const createAuthority = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"拷贝成功"}" // @Router /authority/copyAuthority [post] export const copyAuthority = (data) => { - return service({ - url: "/authority/copyAuthority", - method: 'post', - data - }) + return service({ + url: '/authority/copyAuthority', + method: 'post', + data + }) } // @Summary 设置角色资源权限 @@ -65,11 +63,11 @@ export const copyAuthority = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}" // @Router /authority/setDataAuthority [post] export const setDataAuthority = (data) => { - return service({ - url: "/authority/setDataAuthority", - method: 'post', - data - }) + return service({ + url: '/authority/setDataAuthority', + method: 'post', + data + }) } // @Summary 修改角色 @@ -80,9 +78,9 @@ export const setDataAuthority = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}" // @Router /authority/setDataAuthority [post] export const updateAuthority = (data) => { - return service({ - url: "/authority/updateAuthority", - method: 'put', - data - }) -} \ No newline at end of file + return service({ + url: '/authority/updateAuthority', + method: 'put', + data + }) +} diff --git a/web/src/api/autoCode.js b/web/src/api/autoCode.js index a5756b51..ad7f40bd 100644 --- a/web/src/api/autoCode.js +++ b/web/src/api/autoCode.js @@ -1,20 +1,20 @@ import service from '@/utils/request' export const preview = (data) => { - return service({ - url: "/autoCode/preview", - method: 'post', - data, - }) + return service({ + url: '/autoCode/preview', + method: 'post', + data + }) } export const createTemp = (data) => { - return service({ - url: "/autoCode/createTemp", - method: 'post', - data, - responseType: 'blob' - }) + return service({ + url: '/autoCode/createTemp', + method: 'post', + data, + responseType: 'blob' + }) } // @Tags SysApi @@ -25,14 +25,12 @@ export const createTemp = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}" // @Router /autoCode/getDatabase [get] export const getDB = () => { - return service({ - url: "/autoCode/getDB", - method: 'get', - }) + return service({ + url: '/autoCode/getDB', + method: 'get' + }) } - - // @Tags SysApi // @Summary 获取当前数据库所有表 // @Security ApiKeyAuth @@ -41,11 +39,11 @@ export const getDB = () => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}" // @Router /autoCode/getTables [get] export const getTable = (params) => { - return service({ - url: "/autoCode/getTables", - method: 'get', - params, - }) + return service({ + url: '/autoCode/getTables', + method: 'get', + params + }) } // @Tags SysApi @@ -56,9 +54,9 @@ export const getTable = (params) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}" // @Router /autoCode/getColumn [get] export const getColumn = (params) => { - return service({ - url: "/autoCode/getColumn", - method: 'get', - params, - }) -} \ No newline at end of file + return service({ + url: '/autoCode/getColumn', + method: 'get', + params + }) +} diff --git a/web/src/api/breakpoint.js b/web/src/api/breakpoint.js index 382f53b9..04d754e8 100644 --- a/web/src/api/breakpoint.js +++ b/web/src/api/breakpoint.js @@ -9,28 +9,26 @@ import service from '@/utils/request' // @Router /authority/setDataAuthority [post] export const findFile = (params) => { - return service({ - url: "/fileUploadAndDownload/findFile", - method: 'get', - params - }) + return service({ + url: '/fileUploadAndDownload/findFile', + method: 'get', + params + }) } - - export const breakpointContinueFinish = (params) => { - return service({ - url: "/fileUploadAndDownload/breakpointContinueFinish", - method: 'post', - params - }) + return service({ + url: '/fileUploadAndDownload/breakpointContinueFinish', + method: 'post', + params + }) } export const removeChunk = (data, params) => { - return service({ - url: "/fileUploadAndDownload/removeChunk", - method: 'post', - data, - params - }) -} \ No newline at end of file + return service({ + url: '/fileUploadAndDownload/removeChunk', + method: 'post', + data, + params + }) +} diff --git a/web/src/api/casbin.js b/web/src/api/casbin.js index 8ef9f8e0..6d8e02b4 100644 --- a/web/src/api/casbin.js +++ b/web/src/api/casbin.js @@ -8,16 +8,14 @@ import service from '@/utils/request' // @Param data body api.CreateAuthorityPatams true "更改角色api权限" // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /casbin/UpdateCasbin [post] - export const UpdateCasbin = (data) => { - return service({ - url: "/casbin/updateCasbin", - method: 'post', - data - }) + return service({ + url: '/casbin/updateCasbin', + method: 'post', + data + }) } - // @Tags casbin // @Summary 获取权限列表 // @Security ApiKeyAuth @@ -27,9 +25,9 @@ export const UpdateCasbin = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /casbin/getPolicyPathByAuthorityId [post] export const getPolicyPathByAuthorityId = (data) => { - return service({ - url: "/casbin/getPolicyPathByAuthorityId", - method: 'post', - data - }) -} \ No newline at end of file + return service({ + url: '/casbin/getPolicyPathByAuthorityId', + method: 'post', + data + }) +} diff --git a/web/src/api/customer.js b/web/src/api/customer.js index 2cfa49c2..3e8f5e11 100644 --- a/web/src/api/customer.js +++ b/web/src/api/customer.js @@ -9,15 +9,13 @@ import service from '@/utils/request' // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /customer/customer [post] export const createExaCustomer = (data) => { - return service({ - url: "/customer/customer", - method: 'post', - data - }) + return service({ + url: '/customer/customer', + method: 'post', + data + }) } - - // @Tags SysApi // @Summary 更新客户信息 // @Security ApiKeyAuth @@ -27,14 +25,13 @@ export const createExaCustomer = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /customer/customer [put] export const updateExaCustomer = (data) => { - return service({ - url: "/customer/customer", - method: 'put', - data - }) + return service({ + url: '/customer/customer', + method: 'put', + data + }) } - // @Tags SysApi // @Summary 创建客户 // @Security ApiKeyAuth @@ -44,14 +41,13 @@ export const updateExaCustomer = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /customer/customer [delete] export const deleteExaCustomer = (data) => { - return service({ - url: "/customer/customer", - method: 'delete', - data - }) + return service({ + url: '/customer/customer', + method: 'delete', + data + }) } - // @Tags SysApi // @Summary 获取单一客户信息 // @Security ApiKeyAuth @@ -61,14 +57,13 @@ export const deleteExaCustomer = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /customer/customer [get] export const getExaCustomer = (params) => { - return service({ - url: "/customer/customer", - method: 'get', - params - }) + return service({ + url: '/customer/customer', + method: 'get', + params + }) } - // @Tags SysApi // @Summary 获取权限客户列表 // @Security ApiKeyAuth @@ -78,9 +73,9 @@ export const getExaCustomer = (params) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /customer/customerList [get] export const getExaCustomerList = (params) => { - return service({ - url: "/customer/customerList", - method: 'get', - params - }) -} \ No newline at end of file + return service({ + url: '/customer/customerList', + method: 'get', + params + }) +} diff --git a/web/src/api/email.js b/web/src/api/email.js index 25023533..932aa1f2 100644 --- a/web/src/api/email.js +++ b/web/src/api/email.js @@ -7,9 +7,9 @@ import service from '@/utils/request' // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}" // @Router /email/emailTest [post] export const emailTest = (data) => { - return service({ - url: "/email/emailTest", - method: 'post', - data - }) -} \ No newline at end of file + return service({ + url: '/email/emailTest', + method: 'post', + data + }) +} diff --git a/web/src/api/excel.js b/web/src/api/excel.js index 3315f6ab..398be2ee 100644 --- a/web/src/api/excel.js +++ b/web/src/api/excel.js @@ -1,29 +1,29 @@ -import service from '@/utils/request'; -import { Message } from 'element-ui'; +import service from '@/utils/request' +import { Message } from 'element-ui' const handleFileError = (res, fileName) => { - if (typeof(res.data) !== "undefined") { - if (res.data.type == "application/json") { - const reader = new FileReader(); - reader.onload = function() { - let message = JSON.parse(reader.result).msg; - Message({ - showClose: true, - message: message, - type: 'error' - }) - }; - reader.readAsText(new Blob([res.data])); - } - } else { - var downloadUrl = window.URL.createObjectURL(new Blob([res])); - var a = document.createElement('a'); - a.style.display = 'none'; - a.href = downloadUrl; - a.download = fileName; - var event = new MouseEvent("click"); - a.dispatchEvent(event); + if (typeof (res.data) !== 'undefined') { + if (res.data.type === 'application/json') { + const reader = new FileReader() + reader.onload = function() { + const message = JSON.parse(reader.result).msg + Message({ + showClose: true, + message: message, + type: 'error' + }) + } + reader.readAsText(new Blob([res.data])) } + } else { + var downloadUrl = window.URL.createObjectURL(new Blob([res])) + var a = document.createElement('a') + a.style.display = 'none' + a.href = downloadUrl + a.download = fileName + var event = new MouseEvent('click') + a.dispatchEvent(event) + } } // @Tags excel @@ -35,17 +35,17 @@ const handleFileError = (res, fileName) => { // @Success 200 // @Router /excel/exportExcel [post] export const exportExcel = (tableData, fileName) => { - service({ - url: "/excel/exportExcel", - method: 'post', - data: { - fileName: fileName, - infoList: tableData - }, - responseType: 'blob' - }).then((res) => { - handleFileError(res, fileName) - }) + service({ + url: '/excel/exportExcel', + method: 'post', + data: { + fileName: fileName, + infoList: tableData + }, + responseType: 'blob' + }).then((res) => { + handleFileError(res, fileName) + }) } // @Tags excel @@ -57,10 +57,10 @@ export const exportExcel = (tableData, fileName) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"导入成功"}" // @Router /excel/importExcel [post] export const loadExcelData = () => { - return service({ - url: "/excel/loadExcel", - method: 'get' - }) + return service({ + url: '/excel/loadExcel', + method: 'get' + }) } // @Tags excel @@ -72,14 +72,14 @@ export const loadExcelData = () => { // @Success 200 // @Router /excel/downloadTemplate [get] export const downloadTemplate = (fileName) => { - return service({ - url: "/excel/downloadTemplate", - method: 'get', - params: { - fileName: fileName - }, - responseType: 'blob' - }).then((res) => { - handleFileError(res, fileName) - }) -} \ No newline at end of file + return service({ + url: '/excel/downloadTemplate', + method: 'get', + params: { + fileName: fileName + }, + responseType: 'blob' + }).then((res) => { + handleFileError(res, fileName) + }) +} diff --git a/web/src/api/fileUploadAndDownload.js b/web/src/api/fileUploadAndDownload.js index 492be034..c8063961 100644 --- a/web/src/api/fileUploadAndDownload.js +++ b/web/src/api/fileUploadAndDownload.js @@ -1,4 +1,4 @@ -import service from '@/utils/request'; +import service from '@/utils/request' // @Tags FileUploadAndDownload // @Summary 分页文件列表 @@ -9,11 +9,11 @@ import service from '@/utils/request'; // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /fileUploadAndDownload/getFileList [post] export const getFileList = (data) => { - return service({ - url: "/fileUploadAndDownload/getFileList", - method: "post", - data - }) + return service({ + url: '/fileUploadAndDownload/getFileList', + method: 'post', + data + }) } // @Tags FileUploadAndDownload @@ -24,9 +24,9 @@ export const getFileList = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"返回成功"}" // @Router /fileUploadAndDownload/deleteFile [post] export const deleteFile = (data) => { - return service({ - url: "/fileUploadAndDownload/deleteFile", - method: "post", - data - }) -} \ No newline at end of file + return service({ + url: '/fileUploadAndDownload/deleteFile', + method: 'post', + data + }) +} diff --git a/web/src/api/github.js b/web/src/api/github.js index 3a3559d9..0f28509b 100644 --- a/web/src/api/github.js +++ b/web/src/api/github.js @@ -1,33 +1,32 @@ -import axios from "axios"; -import { Loading } from "element-ui"; +import axios from 'axios' +import { Loading } from 'element-ui' -let loadingInstance; -let service = axios.create(); +let loadingInstance +const service = axios.create() service.interceptors.request.use((config) => { - loadingInstance = Loading.service({ fullscreen: true }); - return config; -}); + loadingInstance = Loading.service({ fullscreen: true }) + return config +}) service.interceptors.response.use((resp) => { - loadingInstance.close(); - return resp; + loadingInstance.close() + return resp }, (error) => { - loadingInstance.close(); - return error; -}); + loadingInstance.close() + return error +}) export function Commits(page) { - return service({ - url: "https://api.github.com/repos/flipped-aurora/gin-vue-admin/commits?page=" + - page, - method: "get", - }); + return service({ + url: 'https://api.github.com/repos/flipped-aurora/gin-vue-admin/commits?page=' + page, + method: 'get' + }) } export function Members() { - return service({ - url: "https://api.github.com/orgs/FLIPPED-AURORA/members", - method: "get", - }); -} \ No newline at end of file + return service({ + url: 'https://api.github.com/orgs/FLIPPED-AURORA/members', + method: 'get' + }) +} diff --git a/web/src/api/initdb.js b/web/src/api/initdb.js index 1c8f072a..c67ebc4a 100644 --- a/web/src/api/initdb.js +++ b/web/src/api/initdb.js @@ -7,23 +7,21 @@ import service from '@/utils/request' // @Success 200 {string} string "{"code":0,"data":{},"msg":"自动创建数据库成功"}" // @Router /init/initdb [post] export const initDB = (data) => { - return service({ - url: "/init/initdb", - method: 'post', - data - }) + return service({ + url: '/init/initdb', + method: 'post', + data + }) } - // @Tags CheckDB // @Summary 初始化用户数据库 // @Produce application/json // @Success 200 {string} string "{"code":0,"data":{},"msg":"探测完成"}" // @Router /init/checkdb [post] - export const checkDB = () => { - return service({ - url: "/init/checkdb", - method: 'post', - }) -} \ No newline at end of file + return service({ + url: '/init/checkdb', + method: 'post' + }) +} diff --git a/web/src/api/jwt.js b/web/src/api/jwt.js index a4be8429..39ac494e 100644 --- a/web/src/api/jwt.js +++ b/web/src/api/jwt.js @@ -7,10 +7,9 @@ import service from '@/utils/request' // @Produce application/json // @Success 200 {string} string "{"success":true,"data":{},"msg":"拉黑成功"}" // @Router /jwt/jsonInBlacklist [post] - export const jsonInBlacklist = () => { - return service({ - url: "/jwt/jsonInBlacklist", - method: 'post', - }) -} \ No newline at end of file + return service({ + url: '/jwt/jsonInBlacklist', + method: 'post' + }) +} diff --git a/web/src/api/menu.js b/web/src/api/menu.js index cf512fbe..7f5a7c6b 100644 --- a/web/src/api/menu.js +++ b/web/src/api/menu.js @@ -5,10 +5,10 @@ import service from '@/utils/request' // @Param 可以什么都不填 调一下即可 // @Router /menu/getMenu [post] export const asyncMenu = () => { - return service({ - url: "/menu/getMenu", - method: 'post', - }) + return service({ + url: '/menu/getMenu', + method: 'post' + }) } // @Summary 获取menu列表 @@ -19,24 +19,23 @@ export const asyncMenu = () => { // } // @Router /menu/getMenuList [post] export const getMenuList = (data) => { - return service({ - url: "/menu/getMenuList", - method: 'post', - data - }) + return service({ + url: '/menu/getMenuList', + method: 'post', + data + }) } - // @Summary 新增基础menu // @Produce application/json // @Param menu Object // @Router /menu/getMenuList [post] export const addBaseMenu = (data) => { - return service({ - url: "/menu/addBaseMenu", - method: 'post', - data - }) + return service({ + url: '/menu/addBaseMenu', + method: 'post', + data + }) } // @Summary 获取基础路由列表 @@ -44,10 +43,10 @@ export const addBaseMenu = (data) => { // @Param 可以什么都不填 调一下即可 // @Router /menu/getBaseMenuTree [post] export const getBaseMenuTree = () => { - return service({ - url: "/menu/getBaseMenuTree", - method: 'post', - }) + return service({ + url: '/menu/getBaseMenuTree', + method: 'post' + }) } // @Summary 添加用户menu关联关系 @@ -55,11 +54,11 @@ export const getBaseMenuTree = () => { // @Param menus Object authorityId string // @Router /menu/getMenuList [post] export const addMenuAuthority = (data) => { - return service({ - url: "/menu/addMenuAuthority", - method: 'post', - data - }) + return service({ + url: '/menu/addMenuAuthority', + method: 'post', + data + }) } // @Summary 获取用户menu关联关系 @@ -67,11 +66,11 @@ export const addMenuAuthority = (data) => { // @Param authorityId string // @Router /menu/getMenuAuthority [post] export const getMenuAuthority = (data) => { - return service({ - url: "/menu/getMenuAuthority", - method: 'post', - data - }) + return service({ + url: '/menu/getMenuAuthority', + method: 'post', + data + }) } // @Summary 获取用户menu关联关系 @@ -79,27 +78,25 @@ export const getMenuAuthority = (data) => { // @Param ID float64 // @Router /menu/deleteBaseMenu [post] export const deleteBaseMenu = (data) => { - return service({ - url: "/menu/deleteBaseMenu", - method: 'post', - data - }) + return service({ + url: '/menu/deleteBaseMenu', + method: 'post', + data + }) } - // @Summary 修改menu列表 // @Produce application/json // @Param menu Object // @Router /menu/updateBaseMenu [post] export const updateBaseMenu = (data) => { - return service({ - url: "/menu/updateBaseMenu", - method: 'post', - data - }) + return service({ + url: '/menu/updateBaseMenu', + method: 'post', + data + }) } - // @Tags menu // @Summary 根据id获取菜单 // @Security ApiKeyAuth @@ -109,9 +106,9 @@ export const updateBaseMenu = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /menu/getBaseMenuById [post] export const getBaseMenuById = (data) => { - return service({ - url: "/menu/getBaseMenuById", - method: 'post', - data - }) -} \ No newline at end of file + return service({ + url: '/menu/getBaseMenuById', + method: 'post', + data + }) +} diff --git a/web/src/api/simpleUploader.js b/web/src/api/simpleUploader.js index 7cfe7d6c..e3064c9b 100644 --- a/web/src/api/simpleUploader.js +++ b/web/src/api/simpleUploader.js @@ -1,5 +1,4 @@ - import service from '@/utils/request' // @Tags SimpleUploader @@ -11,14 +10,13 @@ import service from '@/utils/request' // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}" // @Router /simpleUploader/checkFileMd5 [get] export const checkFileMd5 = (params) => { - return service({ - url: "/simpleUploader/checkFileMd5", - method: 'get', - params - }) + return service({ + url: '/simpleUploader/checkFileMd5', + method: 'get', + params + }) } - // @Tags SimpleUploader // @Summary 合并文件 // @Security ApiKeyAuth @@ -27,10 +25,10 @@ export const checkFileMd5 = (params) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"合并成功"}" // @Router /simpleUploader/mergeFileMd5 [get] export const mergeFileMd5 = (params) => { - return service({ - url: "/simpleUploader/mergeFileMd5", - method: 'get', - params - }) + return service({ + url: '/simpleUploader/mergeFileMd5', + method: 'get', + params + }) } diff --git a/web/src/api/sysDictionary.js b/web/src/api/sysDictionary.js index e08efbbb..dc953313 100644 --- a/web/src/api/sysDictionary.js +++ b/web/src/api/sysDictionary.js @@ -9,13 +9,12 @@ import service from '@/utils/request' // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /sysDictionary/createSysDictionary [post] export const createSysDictionary = (data) => { - return service({ - url: "/sysDictionary/createSysDictionary", - method: 'post', - data - }) - } - + return service({ + url: '/sysDictionary/createSysDictionary', + method: 'post', + data + }) +} // @Tags SysDictionary // @Summary 删除SysDictionary @@ -25,13 +24,13 @@ export const createSysDictionary = (data) => { // @Param data body model.SysDictionary true "删除SysDictionary" // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Router /sysDictionary/deleteSysDictionary [delete] - export const deleteSysDictionary = (data) => { - return service({ - url: "/sysDictionary/deleteSysDictionary", - method: 'delete', - data - }) - } +export const deleteSysDictionary = (data) => { + return service({ + url: '/sysDictionary/deleteSysDictionary', + method: 'delete', + data + }) +} // @Tags SysDictionary // @Summary 更新SysDictionary @@ -41,14 +40,13 @@ export const createSysDictionary = (data) => { // @Param data body model.SysDictionary true "更新SysDictionary" // @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}" // @Router /sysDictionary/updateSysDictionary [put] - export const updateSysDictionary = (data) => { - return service({ - url: "/sysDictionary/updateSysDictionary", - method: 'put', - data - }) - } - +export const updateSysDictionary = (data) => { + return service({ + url: '/sysDictionary/updateSysDictionary', + method: 'put', + data + }) +} // @Tags SysDictionary // @Summary 用id查询SysDictionary @@ -58,14 +56,13 @@ export const createSysDictionary = (data) => { // @Param data body model.SysDictionary true "用id查询SysDictionary" // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}" // @Router /sysDictionary/findSysDictionary [get] - export const findSysDictionary = (params) => { - return service({ - url: "/sysDictionary/findSysDictionary", - method: 'get', - params - }) - } - +export const findSysDictionary = (params) => { + return service({ + url: '/sysDictionary/findSysDictionary', + method: 'get', + params + }) +} // @Tags SysDictionary // @Summary 分页获取SysDictionary列表 @@ -75,10 +72,10 @@ export const createSysDictionary = (data) => { // @Param data body request.PageInfo true "分页获取SysDictionary列表" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /sysDictionary/getSysDictionaryList [get] - export const getSysDictionaryList = (params) => { - return service({ - url: "/sysDictionary/getSysDictionaryList", - method: 'get', - params - }) - } \ No newline at end of file +export const getSysDictionaryList = (params) => { + return service({ + url: '/sysDictionary/getSysDictionaryList', + method: 'get', + params + }) +} diff --git a/web/src/api/sysDictionaryDetail.js b/web/src/api/sysDictionaryDetail.js index a64fe68a..35fc04bf 100644 --- a/web/src/api/sysDictionaryDetail.js +++ b/web/src/api/sysDictionaryDetail.js @@ -9,13 +9,12 @@ import service from '@/utils/request' // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /sysDictionaryDetail/createSysDictionaryDetail [post] export const createSysDictionaryDetail = (data) => { - return service({ - url: "/sysDictionaryDetail/createSysDictionaryDetail", - method: 'post', - data - }) - } - + return service({ + url: '/sysDictionaryDetail/createSysDictionaryDetail', + method: 'post', + data + }) +} // @Tags SysDictionaryDetail // @Summary 删除SysDictionaryDetail @@ -25,13 +24,13 @@ export const createSysDictionaryDetail = (data) => { // @Param data body model.SysDictionaryDetail true "删除SysDictionaryDetail" // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Router /sysDictionaryDetail/deleteSysDictionaryDetail [delete] - export const deleteSysDictionaryDetail = (data) => { - return service({ - url: "/sysDictionaryDetail/deleteSysDictionaryDetail", - method: 'delete', - data - }) - } +export const deleteSysDictionaryDetail = (data) => { + return service({ + url: '/sysDictionaryDetail/deleteSysDictionaryDetail', + method: 'delete', + data + }) +} // @Tags SysDictionaryDetail // @Summary 更新SysDictionaryDetail @@ -41,14 +40,13 @@ export const createSysDictionaryDetail = (data) => { // @Param data body model.SysDictionaryDetail true "更新SysDictionaryDetail" // @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}" // @Router /sysDictionaryDetail/updateSysDictionaryDetail [put] - export const updateSysDictionaryDetail = (data) => { - return service({ - url: "/sysDictionaryDetail/updateSysDictionaryDetail", - method: 'put', - data - }) - } - +export const updateSysDictionaryDetail = (data) => { + return service({ + url: '/sysDictionaryDetail/updateSysDictionaryDetail', + method: 'put', + data + }) +} // @Tags SysDictionaryDetail // @Summary 用id查询SysDictionaryDetail @@ -58,14 +56,13 @@ export const createSysDictionaryDetail = (data) => { // @Param data body model.SysDictionaryDetail true "用id查询SysDictionaryDetail" // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}" // @Router /sysDictionaryDetail/findSysDictionaryDetail [get] - export const findSysDictionaryDetail = (params) => { - return service({ - url: "/sysDictionaryDetail/findSysDictionaryDetail", - method: 'get', - params - }) - } - +export const findSysDictionaryDetail = (params) => { + return service({ + url: '/sysDictionaryDetail/findSysDictionaryDetail', + method: 'get', + params + }) +} // @Tags SysDictionaryDetail // @Summary 分页获取SysDictionaryDetail列表 @@ -75,10 +72,10 @@ export const createSysDictionaryDetail = (data) => { // @Param data body request.PageInfo true "分页获取SysDictionaryDetail列表" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /sysDictionaryDetail/getSysDictionaryDetailList [get] - export const getSysDictionaryDetailList = (params) => { - return service({ - url: "/sysDictionaryDetail/getSysDictionaryDetailList", - method: 'get', - params - }) - } \ No newline at end of file +export const getSysDictionaryDetailList = (params) => { + return service({ + url: '/sysDictionaryDetail/getSysDictionaryDetailList', + method: 'get', + params + }) +} diff --git a/web/src/api/sysOperationRecord.js b/web/src/api/sysOperationRecord.js index 18a67e84..fb64245c 100644 --- a/web/src/api/sysOperationRecord.js +++ b/web/src/api/sysOperationRecord.js @@ -9,11 +9,11 @@ import service from '@/utils/request' // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Router /sysOperationRecord/deleteSysOperationRecord [delete] export const deleteSysOperationRecord = (data) => { - return service({ - url: "/sysOperationRecord/deleteSysOperationRecord", - method: 'delete', - data - }) + return service({ + url: '/sysOperationRecord/deleteSysOperationRecord', + method: 'delete', + data + }) } // @Tags SysOperationRecord @@ -25,11 +25,11 @@ export const deleteSysOperationRecord = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Router /sysOperationRecord/deleteSysOperationRecord [delete] export const deleteSysOperationRecordByIds = (data) => { - return service({ - url: "/sysOperationRecord/deleteSysOperationRecordByIds", - method: 'delete', - data - }) + return service({ + url: '/sysOperationRecord/deleteSysOperationRecordByIds', + method: 'delete', + data + }) } // @Tags SysOperationRecord @@ -41,9 +41,9 @@ export const deleteSysOperationRecordByIds = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /sysOperationRecord/getSysOperationRecordList [get] export const getSysOperationRecordList = (params) => { - return service({ - url: "/sysOperationRecord/getSysOperationRecordList", - method: 'get', - params - }) -} \ No newline at end of file + return service({ + url: '/sysOperationRecord/getSysOperationRecordList', + method: 'get', + params + }) +} diff --git a/web/src/api/system.js b/web/src/api/system.js index 622685db..3f32c52a 100644 --- a/web/src/api/system.js +++ b/web/src/api/system.js @@ -1,4 +1,4 @@ -import service from "@/utils/request"; +import service from '@/utils/request' // @Tags systrm // @Summary 获取配置文件内容 @@ -7,11 +7,11 @@ import service from "@/utils/request"; // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}" // @Router /system/getSystemConfig [post] export const getSystemConfig = () => { - return service({ - url: "/system/getSystemConfig", - method: "post", - }); -}; + return service({ + url: '/system/getSystemConfig', + method: 'post' + }) +} // @Tags system // @Summary 设置配置文件内容 @@ -21,12 +21,12 @@ export const getSystemConfig = () => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}" // @Router /system/setSystemConfig [post] export const setSystemConfig = (data) => { - return service({ - url: "/system/setSystemConfig", - method: "post", - data, - }); -}; + return service({ + url: '/system/setSystemConfig', + method: 'post', + data + }) +} // @Tags system // @Summary 获取服务器运行状态 @@ -35,9 +35,9 @@ export const setSystemConfig = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}" // @Router /system/getServerInfo [post] export const getSystemState = () => { - return service({ - url: "/system/getServerInfo", - method: "post", - donNotShowLoading: true - }); -}; \ No newline at end of file + return service({ + url: '/system/getServerInfo', + method: 'post', + donNotShowLoading: true + }) +} diff --git a/web/src/api/user.js b/web/src/api/user.js index aae6ccfa..a833888c 100644 --- a/web/src/api/user.js +++ b/web/src/api/user.js @@ -5,11 +5,11 @@ import service from '@/utils/request' // @Param data body {username:"string",password:"string"} // @Router /base/login [post] export const login = (data) => { - return service({ - url: "/base/login", - method: 'post', - data: data - }) + return service({ + url: '/base/login', + method: 'post', + data: data + }) } // @Summary 获取验证码 @@ -17,11 +17,11 @@ export const login = (data) => { // @Param data body {username:"string",password:"string"} // @Router /base/captcha [post] export const captcha = (data) => { - return service({ - url: "/base/captcha", - method: 'post', - data: data - }) + return service({ + url: '/base/captcha', + method: 'post', + data: data + }) } // @Summary 用户注册 @@ -29,39 +29,40 @@ export const captcha = (data) => { // @Param data body {username:"string",password:"string"} // @Router /base/resige [post] export const register = (data) => { - return service({ - url: "/user/register", - method: 'post', - data: data - }) - } - // @Summary 修改密码 - // @Produce application/json - // @Param data body {username:"string",password:"string",newPassword:"string"} - // @Router /user/changePassword [post] -export const changePassword = (data) => { - return service({ - url: "/user/changePassword", - method: 'post', - data: data - }) - } - // @Tags User - // @Summary 分页获取用户列表 - // @Security ApiKeyAuth - // @accept application/json - // @Produce application/json - // @Param data body modelInterface.PageInfo true "分页获取用户列表" - // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" - // @Router /user/getUserList [post] -export const getUserList = (data) => { - return service({ - url: "/user/getUserList", - method: 'post', - data: data - }) + return service({ + url: '/user/register', + method: 'post', + data: data + }) } +// @Summary 修改密码 +// @Produce application/json +// @Param data body {username:"string",password:"string",newPassword:"string"} +// @Router /user/changePassword [post] +export const changePassword = (data) => { + return service({ + url: '/user/changePassword', + method: 'post', + data: data + }) +} + +// @Tags User +// @Summary 分页获取用户列表 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body modelInterface.PageInfo true "分页获取用户列表" +// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" +// @Router /user/getUserList [post] +export const getUserList = (data) => { + return service({ + url: '/user/getUserList', + method: 'post', + data: data + }) +} // @Tags User // @Summary 设置用户权限 @@ -72,14 +73,13 @@ export const getUserList = (data) => { // @Success 200 {string} json "{"success":true,"data":{},"msg":"修改成功"}" // @Router /user/setUserAuthority [post] export const setUserAuthority = (data) => { - return service({ - url: "/user/setUserAuthority", - method: 'post', - data: data - }) + return service({ + url: '/user/setUserAuthority', + method: 'post', + data: data + }) } - // @Tags SysUser // @Summary 删除用户 // @Security ApiKeyAuth @@ -89,11 +89,11 @@ export const setUserAuthority = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}" // @Router /user/deleteUser [delete] export const deleteUser = (data) => { - return service({ - url: "/user/deleteUser", - method: 'delete', - data: data - }) + return service({ + url: '/user/deleteUser', + method: 'delete', + data: data + }) } // @Tags SysUser @@ -105,9 +105,9 @@ export const deleteUser = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}" // @Router /user/setUserInfo [put] export const setUserInfo = (data) => { - return service({ - url: "/user/setUserInfo", - method: 'put', - data: data - }) -} \ No newline at end of file + return service({ + url: '/user/setUserInfo', + method: 'put', + data: data + }) +} diff --git a/web/src/api/workflowProcess.js b/web/src/api/workflowProcess.js index e73644b1..347df2a6 100644 --- a/web/src/api/workflowProcess.js +++ b/web/src/api/workflowProcess.js @@ -9,14 +9,13 @@ import service from '@/utils/request' // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /workflowProcess/createWorkflowProcess [post] export const createWorkflowProcess = (data) => { - return service({ - url: "/workflowProcess/createWorkflowProcess", - method: 'post', - data - }) + return service({ + url: '/workflowProcess/createWorkflowProcess', + method: 'post', + data + }) } - // @Tags WorkflowProcess // @Summary 删除WorkflowProcess // @Security ApiKeyAuth @@ -26,11 +25,11 @@ export const createWorkflowProcess = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Router /workflowProcess/deleteWorkflowProcess [delete] export const deleteWorkflowProcess = (data) => { - return service({ - url: "/workflowProcess/deleteWorkflowProcess", - method: 'delete', - data - }) + return service({ + url: '/workflowProcess/deleteWorkflowProcess', + method: 'delete', + data + }) } // @Tags WorkflowProcess @@ -42,11 +41,11 @@ export const deleteWorkflowProcess = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Router /workflowProcess/deleteWorkflowProcess [delete] export const deleteWorkflowProcessByIds = (data) => { - return service({ - url: "/workflowProcess/deleteWorkflowProcessByIds", - method: 'delete', - data - }) + return service({ + url: '/workflowProcess/deleteWorkflowProcessByIds', + method: 'delete', + data + }) } // @Tags WorkflowProcess @@ -58,14 +57,13 @@ export const deleteWorkflowProcessByIds = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}" // @Router /workflowProcess/updateWorkflowProcess [put] export const updateWorkflowProcess = (data) => { - return service({ - url: "/workflowProcess/updateWorkflowProcess", - method: 'put', - data - }) + return service({ + url: '/workflowProcess/updateWorkflowProcess', + method: 'put', + data + }) } - // @Tags WorkflowProcess // @Summary 用id查询WorkflowProcess // @Security ApiKeyAuth @@ -75,14 +73,13 @@ export const updateWorkflowProcess = (data) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}" // @Router /workflowProcess/findWorkflowProcess [get] export const findWorkflowProcess = (params) => { - return service({ - url: "/workflowProcess/findWorkflowProcess", - method: 'get', - params - }) + return service({ + url: '/workflowProcess/findWorkflowProcess', + method: 'get', + params + }) } - // @Tags WorkflowProcess // @Summary 分页获取WorkflowProcess列表 // @Security ApiKeyAuth @@ -92,11 +89,11 @@ export const findWorkflowProcess = (params) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /workflowProcess/getWorkflowProcessList [get] export const getWorkflowProcessList = (params) => { - return service({ - url: "/workflowProcess/getWorkflowProcessList", - method: 'get', - params - }) + return service({ + url: '/workflowProcess/getWorkflowProcessList', + method: 'get', + params + }) } // @Tags WorkflowProcess @@ -108,14 +105,13 @@ export const getWorkflowProcessList = (params) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}" // @Router /workflowProcess/findWorkflowStep [get] export const findWorkflowStep = (params) => { - return service({ - url: "/workflowProcess/findWorkflowStep", - method: 'get', - params - }) + return service({ + url: '/workflowProcess/findWorkflowStep', + method: 'get', + params + }) } - // @Tags ExaWfLeave // @Summary 创建ExaWfLeave // @Security ApiKeyAuth @@ -124,15 +120,14 @@ export const findWorkflowStep = (params) => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /workflowProcess/startWorkflow [post] export const startWorkflow = (data, params = { businessType: data.wf.businessType }) => { - return service({ - url: "/workflowProcess/startWorkflow", - method: 'post', - data, - params - }) + return service({ + url: '/workflowProcess/startWorkflow', + method: 'post', + data, + params + }) } - // @Tags ExaWfLeave // @Summary 创建ExaWfLeave // @Security ApiKeyAuth @@ -141,28 +136,27 @@ export const startWorkflow = (data, params = { businessType: data.wf.businessTyp // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /workflowProcess/completeWorkflowMove [post] export const completeWorkflowMove = (data, params = { businessType: data.wf.businessType }) => { - return service({ - url: "/workflowProcess/completeWorkflowMove", - method: 'post', - data, - params - }) - } - // @Tags WorkflowProcess - // @Summary 我发起的工作流 - // @Security ApiKeyAuth - // @accept application/json - // @Produce application/json - // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" - // @Router /workflowProcess/getMyStated [get] -export const getMyStated = () => { - return service({ - url: "/workflowProcess/getMyStated", - method: 'get', - }) + return service({ + url: '/workflowProcess/completeWorkflowMove', + method: 'post', + data, + params + }) } - +// @Tags WorkflowProcess +// @Summary 我发起的工作流 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" +// @Router /workflowProcess/getMyStated [get] +export const getMyStated = () => { + return service({ + url: '/workflowProcess/getMyStated', + method: 'get' + }) +} // @Tags WorkflowProcess // @Summary 我发起的工作流 @@ -172,10 +166,10 @@ export const getMyStated = () => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /workflowProcess/getMyNeed [get] export const getMyNeed = () => { - return service({ - url: "/workflowProcess/getMyNeed", - method: 'get', - }) + return service({ + url: '/workflowProcess/getMyNeed', + method: 'get' + }) } // @Tags WorkflowProcess @@ -187,9 +181,9 @@ export const getMyNeed = () => { // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /workflowProcess/getWorkflowMoveByID [get] export const getWorkflowMoveByID = (params) => { - return service({ - url: "/workflowProcess/getWorkflowMoveByID", - method: 'get', - params - }) -} \ No newline at end of file + return service({ + url: '/workflowProcess/getWorkflowMoveByID', + method: 'get', + params + }) +} diff --git a/web/src/components/chooseImg/index.vue b/web/src/components/chooseImg/index.vue index 517e401b..73d0462b 100644 --- a/web/src/components/chooseImg/index.vue +++ b/web/src/components/chooseImg/index.vue @@ -2,14 +2,14 @@
- +
@@ -18,34 +18,40 @@ \ No newline at end of file + diff --git a/web/src/components/customPic/index.vue b/web/src/components/customPic/index.vue index 956c67af..a4785f08 100644 --- a/web/src/components/customPic/index.vue +++ b/web/src/components/customPic/index.vue @@ -1,63 +1,63 @@ diff --git a/web/src/components/upload/image.vue b/web/src/components/upload/image.vue index 47479df5..3db8f8e4 100644 --- a/web/src/components/upload/image.vue +++ b/web/src/components/upload/image.vue @@ -4,8 +4,6 @@ 已上传文件 {{ imageUrl }} - - --> + diff --git a/web/src/view/dashboard/component/todoList/Todo.vue b/web/src/view/dashboard/component/todoList/Todo.vue index 1ca0af92..c4b3cae2 100644 --- a/web/src/view/dashboard/component/todoList/Todo.vue +++ b/web/src/view/dashboard/component/todoList/Todo.vue @@ -1,81 +1,81 @@ diff --git a/web/src/view/dashboard/component/todoList/index.vue b/web/src/view/dashboard/component/todoList/index.vue index 7e2159a4..79d7a164 100644 --- a/web/src/view/dashboard/component/todoList/index.vue +++ b/web/src/view/dashboard/component/todoList/index.vue @@ -1,120 +1,120 @@ \ No newline at end of file + diff --git a/web/src/view/example/breakpoint/breakpoint.vue b/web/src/view/example/breakpoint/breakpoint.vue index a297f305..0b4eb807 100644 --- a/web/src/view/example/breakpoint/breakpoint.vue +++ b/web/src/view/example/breakpoint/breakpoint.vue @@ -1,30 +1,31 @@ + \ No newline at end of file + diff --git a/web/src/view/example/excel/excel.vue b/web/src/view/example/excel/excel.vue index c211eb89..c65c853c 100644 --- a/web/src/view/example/excel/excel.vue +++ b/web/src/view/example/excel/excel.vue @@ -19,26 +19,27 @@ - - - + + + - - - + + + + \ No newline at end of file + diff --git a/web/src/view/example/index.vue b/web/src/view/example/index.vue index 87b57206..9962dcb4 100644 --- a/web/src/view/example/index.vue +++ b/web/src/view/example/index.vue @@ -1,15 +1,14 @@ - diff --git a/web/src/view/example/simpleUploader/simpleUploader.vue b/web/src/view/example/simpleUploader/simpleUploader.vue index dcfb916d..d8bc6336 100644 --- a/web/src/view/example/simpleUploader/simpleUploader.vue +++ b/web/src/view/example/simpleUploader/simpleUploader.vue @@ -2,145 +2,143 @@ - +

拖拽文件至此或点击

选择文件
- +
\ No newline at end of file + diff --git a/web/src/view/example/upload/upload.vue b/web/src/view/example/upload/upload.vue index 70b2f7d5..bdc3c644 100644 --- a/web/src/view/example/upload/upload.vue +++ b/web/src/view/example/upload/upload.vue @@ -12,12 +12,12 @@ :show-file-list="false" > 点击上传 -
只能上传jpg/png文件,且不超过500kb
+
只能上传jpg/png文件,且不超过500kb
带压缩的上传, (512(k)为压缩限制) - + 已上传文件 {{ imageUrl }} @@ -25,7 +25,7 @@ @@ -33,8 +33,8 @@
{{ scope.row.UpdatedAt | formatDate }}
- - + + diff --git a/web/src/view/iconList/index.vue b/web/src/view/iconList/index.vue index 61199e9d..4d1e9283 100644 --- a/web/src/view/iconList/index.vue +++ b/web/src/view/iconList/index.vue @@ -1,305 +1,304 @@ \ No newline at end of file diff --git a/web/src/view/layout/aside/asideComponent/index.vue b/web/src/view/layout/aside/asideComponent/index.vue index 004f1e66..98be93f5 100644 --- a/web/src/view/layout/aside/asideComponent/index.vue +++ b/web/src/view/layout/aside/asideComponent/index.vue @@ -1,7 +1,7 @@ @@ -12,14 +12,9 @@ import AsyncSubmenu from './asyncSubmenu' export default { name: 'AsideComponent', - computed: { - menuComponent() { - if (this.routerInfo.children&&this.routerInfo.children.filter(item=>!item.hidden).length) { - return 'AsyncSubmenu' - } else { - return 'MenuItem' - } - } + components: { + MenuItem, + AsyncSubmenu }, props: { routerInfo: { @@ -29,11 +24,14 @@ export default { type: Object } }, - components: { - MenuItem, - AsyncSubmenu + computed: { + menuComponent() { + if (this.routerInfo.children && this.routerInfo.children.filter(item => !item.hidden).length) { + return 'AsyncSubmenu' + } else { + return 'MenuItem' + } + } } } - \ No newline at end of file diff --git a/web/src/view/layout/aside/asideComponent/menuItem.vue b/web/src/view/layout/aside/asideComponent/menuItem.vue index bfb14783..b7fc90f0 100644 --- a/web/src/view/layout/aside/asideComponent/menuItem.vue +++ b/web/src/view/layout/aside/asideComponent/menuItem.vue @@ -1,7 +1,7 @@ @@ -18,5 +18,3 @@ export default { } } - \ No newline at end of file diff --git a/web/src/view/layout/aside/historyComponent/history.vue b/web/src/view/layout/aside/historyComponent/history.vue index e546d75b..fe5db3f3 100644 --- a/web/src/view/layout/aside/historyComponent/history.vue +++ b/web/src/view/layout/aside/historyComponent/history.vue @@ -1,24 +1,24 @@ + + \ No newline at end of file + diff --git a/web/src/view/layout/aside/index.vue b/web/src/view/layout/aside/index.vue index cd53e431..46b514a2 100644 --- a/web/src/view/layout/aside/index.vue +++ b/web/src/view/layout/aside/index.vue @@ -6,14 +6,14 @@ :collapse="isCollapse" :collapse-transition="true" :default-active="active" - @select="selectMenuItem" active-text-color="#fff" class="el-menu-vertical" text-color="rgb(191, 203, 217)" unique-opened + @select="selectMenuItem" > @@ -22,63 +22,63 @@ \ No newline at end of file + diff --git a/web/src/view/layout/bottomInfo/bottomInfo.vue b/web/src/view/layout/bottomInfo/bottomInfo.vue index 889136fe..64f1488f 100644 --- a/web/src/view/layout/bottomInfo/bottomInfo.vue +++ b/web/src/view/layout/bottomInfo/bottomInfo.vue @@ -3,21 +3,23 @@ + + \ No newline at end of file diff --git a/web/src/view/login/login.vue b/web/src/view/login/login.vue index 7aeb82af..081e31a8 100644 --- a/web/src/view/login/login.vue +++ b/web/src/view/login/login.vue @@ -3,37 +3,35 @@
- - + + + + /> @@ -50,32 +48,26 @@ width="100%" height="100%" alt="请输入验证码" - @click="loginVefify()" - /> + @click="loginVerify()" + >
- 登 录 + 登 录
@@ -84,80 +76,80 @@ \ No newline at end of file + diff --git a/web/src/view/routerHolder.vue b/web/src/view/routerHolder.vue index 1a382f96..b8fec872 100644 --- a/web/src/view/routerHolder.vue +++ b/web/src/view/routerHolder.vue @@ -1,16 +1,15 @@ - diff --git a/web/src/view/superAdmin/api/api.vue b/web/src/view/superAdmin/api/api.vue index e5d586d0..b8b225dc 100644 --- a/web/src/view/superAdmin/api/api.vue +++ b/web/src/view/superAdmin/api/api.vue @@ -3,61 +3,61 @@
- + - + - + - + + /> - 查询 + 查询 - 新增api + 新增api - +

确定要删除吗?

-
- 取消 - 确定 -
- 批量删除 +
+ 取消 + 确定 +
+ 批量删除
- - + - - - - - + width="55" + /> + + + + @@ -65,12 +65,12 @@ @@ -81,43 +81,42 @@ :page-sizes="[10, 30, 50, 100]" :style="{float:'right',padding:'20px'}" :total="total" + layout="total, sizes, prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" - layout="total, sizes, prev, pager, next, jumper" - > + /> - + - + - + + /> - + - +
新增Api需要在角色管理内配置权限才可使用
- - + \ No newline at end of file + diff --git a/web/src/view/superAdmin/authority/authority.vue b/web/src/view/superAdmin/authority/authority.vue index 52569572..8142ad09 100644 --- a/web/src/view/superAdmin/authority/authority.vue +++ b/web/src/view/superAdmin/authority/authority.vue @@ -1,7 +1,7 @@ + - \ No newline at end of file diff --git a/web/src/view/systemTools/index.vue b/web/src/view/systemTools/index.vue index 7cd5e907..98c585c4 100644 --- a/web/src/view/systemTools/index.vue +++ b/web/src/view/systemTools/index.vue @@ -1,15 +1,14 @@ - diff --git a/web/src/view/systemTools/system/system.vue b/web/src/view/systemTools/system/system.vue index f357699a..72e019a0 100644 --- a/web/src/view/systemTools/system/system.vue +++ b/web/src/view/systemTools/system/system.vue @@ -1,32 +1,32 @@