diff --git a/dvadmin-ui/.eslintignore b/dvadmin-ui/.eslintignore index 89be6f6..a02471b 100755 --- a/dvadmin-ui/.eslintignore +++ b/dvadmin-ui/.eslintignore @@ -5,6 +5,7 @@ src/assets # 忽略public目录下文件的语法检查 public # 忽略当前目录下为js的文件的语法检查 -*.js +# *.js # 忽略当前目录下为vue的文件的语法检查 -*.vue \ No newline at end of file +# *.vue +vue.config.js diff --git a/dvadmin-ui/.eslintrc.js b/dvadmin-ui/.eslintrc.js index 82bbdee..a0472aa 100755 --- a/dvadmin-ui/.eslintrc.js +++ b/dvadmin-ui/.eslintrc.js @@ -2,18 +2,18 @@ module.exports = { root: true, parserOptions: { - parser: 'babel-eslint', - sourceType: 'module' + parser: "babel-eslint", + sourceType: "module" }, env: { browser: true, node: true, - es6: true, + es6: true }, - extends: ['plugin:vue/recommended', 'eslint:recommended'], + extends: ["plugin:vue/recommended", "eslint:recommended"], // add your custom rules here - //it is base on https://github.com/vuejs/eslint-config-vue + // it is base on https://github.com/vuejs/eslint-config-vue rules: { "vue/max-attributes-per-line": [2, { "singleline": 10, @@ -23,177 +23,199 @@ module.exports = { } }], "vue/singleline-html-element-content-newline": "off", - "vue/multiline-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 + "accessor-pairs": 2, + "arrow-spacing": [2, { + "before": true, + "after": true }], - 'block-spacing': [2, 'always'], - 'brace-style': [2, '1tbs', { - 'allowSingleLine': true + "block-spacing": [2, "always"], + "brace-style": [2, "1tbs", { + "allowSingleLine": true }], - 'camelcase': [0, { - 'properties': 'always' + "camelcase": [0, { + "properties": "always" }], - 'comma-dangle': [2, 'never'], - 'comma-spacing': [2, { - 'before': false, - 'after': true + "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 + "comma-style": [2, "last"], + "constructor-super": 2, + "curly": [2, "multi-line"], + "dot-location": [2, "property"], + "eol-last": 2, + "eqeqeq": 0, + "generator-star-spacing": [2, { + "before": true, + "after": true }], - 'handle-callback-err': [2, '^(err|error)$'], - 'indent': [2, 2, { - 'SwitchCase': 1 + "handle-callback-err": [2, "^(err|error)$"], + "indent": [2, 2, { + "SwitchCase": 2 }], - 'jsx-quotes': [2, 'prefer-single'], - 'key-spacing': [2, { - 'beforeColon': false, - 'afterColon': true + "jsx-quotes": [2, "prefer-single"], + "key-spacing": [2, { + "beforeColon": false, + "afterColon": true }], - 'keyword-spacing': [2, { - 'before': true, - 'after': true + "keyword-spacing": [2, { + "before": true, + "after": true }], - 'new-cap': [2, { - 'newIsCap': true, - 'capIsNew': false + "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 + "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-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-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-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' + "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' + "operator-linebreak": [2, "after", { + "overrides": { + "?": "before", + ":": "before" } }], - 'padded-blocks': [2, 'never'], - 'quotes': [2, 'single', { - 'avoidEscape': true, - 'allowTemplateLiterals': true + "padded-blocks": [2, "never"], + "quotes": [2, "double", { + "avoidEscape": true, + "allowTemplateLiterals": true }], - 'semi': [2, 'never'], - 'semi-spacing': [2, { - 'before': false, - 'after': true + "semi": [2, "always"], + "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 + "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', '!', ','] + "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', { + "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'] + "array-bracket-spacing": [2, "never"], + "vue/no-unused-components": 0, + // 对component中的组件命名样式实施特定的大小写 + "vue/component-name-in-template-casing": 0, + // 允许HTML未闭合标签 + "vue/html-self-closing": 0, + // 允许props修改 + "vue/no-mutating-props": 0, + // 允许computed修改名称 + "vue/no-side-effects-in-computed-properties": 0, + // $emit不校验kebab-case + "vue/custom-event-name-casing": 0, + // 允许v-for和v-if一起用 + "vue/no-use-v-if-with-v-for": 0, + "vue/require-default-prop": 0, + "vue/require-valid-default-prop": 0, + "vue/require-prop-types": 0, + "vue/no-lone-template": 0, + "vue/no-template-shadow": 0, + "vue/this-in-template": 0, + "vue/prop-name-casing": 0, + // 允许在 case 子句中使用词法声明 + "no-case-declarations": 0 } -} +}; diff --git a/dvadmin-ui/package.json b/dvadmin-ui/package.json index a7f15f8..5b264e1 100755 --- a/dvadmin-ui/package.json +++ b/dvadmin-ui/package.json @@ -9,7 +9,8 @@ "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", - "lint": "eslint --ext .js,.vue src" + "lint": "eslint --fix --ext .js --ext .jsx --ext .vue src", + "lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src" }, "husky": { "hooks": { @@ -43,7 +44,6 @@ "core-js": "3.8.1", "echarts": "^4.9.0", "element-ui": "2.15.0", - "eslint-loader": "^4.0.2", "file-saver": "2.0.4", "fuse.js": "6.4.3", "highlight.js": "9.18.5", @@ -69,10 +69,17 @@ "@vue/cli-plugin-eslint": "4.4.6", "@vue/cli-service": "4.4.6", "@vue/composition-api": "^1.0.0-rc.6", - "babel-eslint": "10.1.0", + "babel-eslint": "^10.1.0", "chalk": "4.1.0", "connect": "3.6.6", - "eslint": "7.15.0", + "eslint": "^7.15.0", + "eslint-config-standard": "^16.0.3", + "eslint-loader": "^4.0.2", + "eslint-plugin-html": "^6.1.2", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.0", + "eslint-plugin-standard": "^5.0.0", "eslint-plugin-vue": "7.2.0", "lint-staged": "10.5.3", "runjs": "4.4.2", diff --git a/dvadmin-ui/src/App.vue b/dvadmin-ui/src/App.vue index e448b11..ac6b216 100755 --- a/dvadmin-ui/src/App.vue +++ b/dvadmin-ui/src/App.vue @@ -5,7 +5,7 @@ diff --git a/dvadmin-ui/src/api/vadmin/login.js b/dvadmin-ui/src/api/vadmin/login.js index 2b05380..36ce2d8 100755 --- a/dvadmin-ui/src/api/vadmin/login.js +++ b/dvadmin-ui/src/api/vadmin/login.js @@ -1,4 +1,4 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 登录方法 export function login(username, password, code, uuid) { @@ -7,34 +7,34 @@ export function login(username, password, code, uuid) { password, idValueC: code, idKeyC: uuid - } + }; return request({ - url: '/admin/login/', - method: 'post', + url: "/admin/login/", + method: "post", data: data - }) + }); } // 获取用户详细信息 export function getInfo() { return request({ - url: '/admin/getInfo/', - method: 'get' - }) + url: "/admin/getInfo/", + method: "get" + }); } // 退出方法 export function logout() { return request({ - url: '/admin/logout/', - method: 'post' - }) + url: "/admin/logout/", + method: "post" + }); } // 获取验证码 export function getCodeImg() { return request({ - url: '/admin/captcha/refresh/', - method: 'get' - }) + url: "/admin/captcha/refresh/", + method: "get" + }); } diff --git a/dvadmin-ui/src/api/vadmin/menu.js b/dvadmin-ui/src/api/vadmin/menu.js index 205e8dd..ae002ea 100755 --- a/dvadmin-ui/src/api/vadmin/menu.js +++ b/dvadmin-ui/src/api/vadmin/menu.js @@ -1,9 +1,9 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 获取路由 export const getRouters = () => { return request({ - url: '/admin/getRouters/', - method: 'get' - }) -} + url: "/admin/getRouters/", + method: "get" + }); +}; diff --git a/dvadmin-ui/src/api/vadmin/monitor/cache.js b/dvadmin-ui/src/api/vadmin/monitor/cache.js index 59d3505..8eb7c1b 100755 --- a/dvadmin-ui/src/api/vadmin/monitor/cache.js +++ b/dvadmin-ui/src/api/vadmin/monitor/cache.js @@ -1,9 +1,9 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询缓存详细 export function getCache() { return request({ - url: '/monitor/cache', - method: 'get' - }) + url: "/monitor/cache", + method: "get" + }); } diff --git a/dvadmin-ui/src/api/vadmin/monitor/celery.js b/dvadmin-ui/src/api/vadmin/monitor/celery.js index 98d0a04..11b8c50 100644 --- a/dvadmin-ui/src/api/vadmin/monitor/celery.js +++ b/dvadmin-ui/src/api/vadmin/monitor/celery.js @@ -1,15 +1,15 @@ -import request from '@/utils/request' +import request from "@/utils/request"; /** * 封装celery任务信息接口请求 */ // 获取 -export const sync_data_prefix = '/admin/celery'; +export const sync_data_prefix = "/admin/celery"; // 获取 export function getIntervalschedulea(id) { return request({ url: `${sync_data_prefix}/intervalschedule/${id}/`, - method: 'get' + method: "get" }); } @@ -17,7 +17,7 @@ export function getIntervalschedulea(id) { export function listIntervalschedule(params) { return request({ url: `${sync_data_prefix}/intervalschedule/`, - method: 'get', + method: "get", params }); } @@ -26,7 +26,7 @@ export function listIntervalschedule(params) { export function updateIntervalschedule(data) { return request({ url: `${sync_data_prefix}/intervalschedule/${data.id}/`, - method: 'put', + method: "put", data }); } @@ -34,7 +34,7 @@ export function updateIntervalschedule(data) { export function createIntervalschedule(data) { return request({ url: `${sync_data_prefix}/intervalschedule/`, - method: 'post', + method: "post", data }); } @@ -42,7 +42,7 @@ export function createIntervalschedule(data) { export function deleteIntervalschedule(id) { return request({ url: `${sync_data_prefix}/intervalschedule/${id}/`, - method: 'delete' + method: "delete" }); } @@ -50,7 +50,7 @@ export function deleteIntervalschedule(id) { export function getCrontabSchedule(id) { return request({ url: `${sync_data_prefix}/crontabschedule/${id}/`, - method: 'get' + method: "get" }); } @@ -58,7 +58,7 @@ export function getCrontabSchedule(id) { export function listCrontabSchedule(params) { return request({ url: `${sync_data_prefix}/crontabschedule/`, - method: 'get', + method: "get", params }); } @@ -67,7 +67,7 @@ export function listCrontabSchedule(params) { export function updateCrontabSchedule(data) { return request({ url: `${sync_data_prefix}/crontabschedule/${data.id}/`, - method: 'put', + method: "put", data }); } @@ -75,7 +75,7 @@ export function updateCrontabSchedule(data) { export function createCrontabSchedule(data) { return request({ url: `${sync_data_prefix}/crontabschedule/`, - method: 'post', + method: "post", data }); } @@ -83,7 +83,7 @@ export function createCrontabSchedule(data) { export function deleteCrontabSchedule(id) { return request({ url: `${sync_data_prefix}/crontabschedule/${id}/`, - method: 'delete' + method: "delete" }); } @@ -91,7 +91,7 @@ export function deleteCrontabSchedule(id) { export function getPeriodicTask(id) { return request({ url: `${sync_data_prefix}/periodictask/${id}/`, - method: 'get' + method: "get" }); } @@ -99,7 +99,7 @@ export function getPeriodicTask(id) { export function listPeriodicTask(params) { return request({ url: `${sync_data_prefix}/periodictask/`, - method: 'get', + method: "get", params }); } @@ -107,7 +107,7 @@ export function listPeriodicTask(params) { export function TasksAsChoices(params) { return request({ url: `${sync_data_prefix}/tasks_as_choices/`, - method: 'get', + method: "get", params }); } @@ -116,7 +116,7 @@ export function TasksAsChoices(params) { export function updatePeriodicTask(data) { return request({ url: `${sync_data_prefix}/periodictask/${data.id}/`, - method: 'put', + method: "put", data }); } @@ -124,7 +124,7 @@ export function updatePeriodicTask(data) { export function createPeriodicTask(data) { return request({ url: `${sync_data_prefix}/periodictask/`, - method: 'post', + method: "post", data }); } @@ -132,7 +132,7 @@ export function createPeriodicTask(data) { export function deletePeriodicTask(id) { return request({ url: `${sync_data_prefix}/periodictask/${id}/`, - method: 'delete' + method: "delete" }); } @@ -140,7 +140,7 @@ export function deletePeriodicTask(id) { export function operatesyncdata(data) { return request({ url: `${sync_data_prefix}/operate_celery/`, - method: 'post', + method: "post", data }); } @@ -148,33 +148,33 @@ export function operatesyncdata(data) { // 查询定时任务日志列表 export function list(query) { return request({ - url: '/admin/system/celery_log/', - method: 'get', + url: "/admin/system/celery_log/", + method: "get", params: query - }) + }); } // 删除定时任务日志 export function delCeleryLog(infoId) { return request({ url: `/admin/system/celery_log/${infoId}/`, - method: 'delete' - }) + method: "delete" + }); } // 清空定时任务日志 export function cleanCeleryLog() { return request({ - url: '/admin/system/celery_log/clean', - method: 'delete' - }) + url: "/admin/system/celery_log/clean", + method: "delete" + }); } // 导出定时任务日志 export function exportCeleryLog(query) { return request({ - url: '/admin/system/celery_log/export', - method: 'get', + url: "/admin/system/celery_log/export", + method: "get", params: query - }) + }); } diff --git a/dvadmin-ui/src/api/vadmin/monitor/job.js b/dvadmin-ui/src/api/vadmin/monitor/job.js index 58c4343..b7241b5 100755 --- a/dvadmin-ui/src/api/vadmin/monitor/job.js +++ b/dvadmin-ui/src/api/vadmin/monitor/job.js @@ -1,55 +1,55 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询定时任务调度列表 export function listJob(query) { return request({ - url: '/monitor/job/list', - method: 'get', + url: "/monitor/job/list", + method: "get", params: query - }) + }); } // 查询定时任务调度详细 export function getJob(jobId) { return request({ - url: '/monitor/job/' + jobId, - method: 'get' - }) + url: "/monitor/job/" + jobId, + method: "get" + }); } // 新增定时任务调度 export function addJob(data) { return request({ - url: '/monitor/job', - method: 'post', + url: "/monitor/job", + method: "post", data: data - }) + }); } // 修改定时任务调度 export function updateJob(data) { return request({ - url: '/monitor/job', - method: 'put', + url: "/monitor/job", + method: "put", data: data - }) + }); } // 删除定时任务调度 export function delJob(jobId) { return request({ - url: '/monitor/job/' + jobId, - method: 'delete' - }) + url: "/monitor/job/" + jobId, + method: "delete" + }); } // 导出定时任务调度 export function exportJob(query) { return request({ - url: '/monitor/job/export', - method: 'get', + url: "/monitor/job/export", + method: "get", params: query - }) + }); } // 任务状态修改 @@ -57,24 +57,23 @@ export function changeJobStatus(jobId, status) { const data = { jobId, status - } + }; return request({ - url: '/monitor/job/changeStatus', - method: 'put', + url: "/monitor/job/changeStatus", + method: "put", data: data - }) + }); } - // 定时任务立即执行一次 export function runJob(jobId, jobGroup) { const data = { jobId, jobGroup - } + }; return request({ - url: '/monitor/job/run', - method: 'put', + url: "/monitor/job/run", + method: "put", data: data - }) -} \ No newline at end of file + }); +} diff --git a/dvadmin-ui/src/api/vadmin/monitor/jobLog.js b/dvadmin-ui/src/api/vadmin/monitor/jobLog.js index be1fffd..e26c981 100755 --- a/dvadmin-ui/src/api/vadmin/monitor/jobLog.js +++ b/dvadmin-ui/src/api/vadmin/monitor/jobLog.js @@ -1,35 +1,35 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询调度日志列表 export function listJobLog(query) { return request({ - url: '/monitor/jobLog/list', - method: 'get', + url: "/monitor/jobLog/list", + method: "get", params: query - }) + }); } // 删除调度日志 export function delJobLog(jobLogId) { return request({ - url: '/monitor/jobLog/' + jobLogId, - method: 'delete' - }) + url: "/monitor/jobLog/" + jobLogId, + method: "delete" + }); } // 清空调度日志 export function cleanJobLog() { return request({ - url: '/monitor/jobLog/clean', - method: 'delete' - }) + url: "/monitor/jobLog/clean", + method: "delete" + }); } // 导出调度日志 export function exportJobLog(query) { return request({ - url: '/monitor/jobLog/export', - method: 'get', + url: "/monitor/jobLog/export", + method: "get", params: query - }) -} \ No newline at end of file + }); +} diff --git a/dvadmin-ui/src/api/vadmin/monitor/logininfor.js b/dvadmin-ui/src/api/vadmin/monitor/logininfor.js index 1dc21d4..df440dc 100755 --- a/dvadmin-ui/src/api/vadmin/monitor/logininfor.js +++ b/dvadmin-ui/src/api/vadmin/monitor/logininfor.js @@ -1,35 +1,35 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询登录日志列表 export function list(query) { return request({ - url: '/admin/system/logininfor/', - method: 'get', + url: "/admin/system/logininfor/", + method: "get", params: query - }) + }); } // 删除登录日志 export function delLogininfor(infoId) { return request({ url: `/admin/system/logininfor/${infoId}/`, - method: 'delete' - }) + method: "delete" + }); } // 清空登录日志 export function cleanLogininfor() { return request({ - url: '/admin/system/logininfor/clean', - method: 'delete' - }) + url: "/admin/system/logininfor/clean", + method: "delete" + }); } // 导出登录日志 export function exportLogininfor(query) { return request({ - url: '/admin/system/logininfor/export', - method: 'get', + url: "/admin/system/logininfor/export", + method: "get", params: query - }) + }); } diff --git a/dvadmin-ui/src/api/vadmin/monitor/online.js b/dvadmin-ui/src/api/vadmin/monitor/online.js index ca3348b..df987bc 100755 --- a/dvadmin-ui/src/api/vadmin/monitor/online.js +++ b/dvadmin-ui/src/api/vadmin/monitor/online.js @@ -1,18 +1,18 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询在线用户列表 export function list(query) { return request({ - url: '/admin/monitor/online/list', - method: 'get', + url: "/admin/monitor/online/list", + method: "get", params: query - }) + }); } // 强退用户 export function forceLogout(tokenId) { return request({ - url: '/admin/monitor/online/' + tokenId, - method: 'delete' - }) + url: "/admin/monitor/online/" + tokenId, + method: "delete" + }); } diff --git a/dvadmin-ui/src/api/vadmin/monitor/operlog.js b/dvadmin-ui/src/api/vadmin/monitor/operlog.js index f09b8ed..0f64087 100755 --- a/dvadmin-ui/src/api/vadmin/monitor/operlog.js +++ b/dvadmin-ui/src/api/vadmin/monitor/operlog.js @@ -1,35 +1,35 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询操作日志列表 export function list(query) { return request({ - url: '/monitor/operlog/list', - method: 'get', + url: "/monitor/operlog/list", + method: "get", params: query - }) + }); } // 删除操作日志 export function delOperlog(operId) { return request({ - url: '/monitor/operlog/' + operId, - method: 'delete' - }) + url: "/monitor/operlog/" + operId, + method: "delete" + }); } // 清空操作日志 export function cleanOperlog() { return request({ - url: '/monitor/operlog/clean', - method: 'delete' - }) + url: "/monitor/operlog/clean", + method: "delete" + }); } // 导出操作日志 export function exportOperlog(query) { return request({ - url: '/monitor/operlog/export', - method: 'get', + url: "/monitor/operlog/export", + method: "get", params: query - }) -} \ No newline at end of file + }); +} diff --git a/dvadmin-ui/src/api/vadmin/monitor/server.js b/dvadmin-ui/src/api/vadmin/monitor/server.js index e25be29..beac0af 100755 --- a/dvadmin-ui/src/api/vadmin/monitor/server.js +++ b/dvadmin-ui/src/api/vadmin/monitor/server.js @@ -1,50 +1,50 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询服务器信息详细 export function getServerList(params) { return request({ - url: 'admin/monitor/server/', + url: "admin/monitor/server/", params, - method: 'get' - }) + method: "get" + }); } // 修改服务器信息 export function updateServerInfo(id, data) { - let {name, remark} = data; + const { name, remark } = data; return request({ url: `admin/monitor/server/${id}/`, data: { name, remark }, - method: 'PUT' - }) + method: "PUT" + }); } // 获取监控配置信息 export function getMonitorStatusInfo() { return request({ - url: 'admin/monitor/monitor/enabled/', - method: 'get' - }) + url: "admin/monitor/monitor/enabled/", + method: "get" + }); } // 更新监控配置信息 export function updateMonitorStatusInfo(params) { return request({ - url: 'admin/monitor/monitor/enabled/', + url: "admin/monitor/monitor/enabled/", params, - method: 'get' - }) + method: "get" + }); } // 清空记录 export function cleanMonitorLog() { return request({ - url: 'admin/monitor/monitor/clean/', - method: 'delete' - }) + url: "admin/monitor/monitor/clean/", + method: "delete" + }); } // 获取监控记录 @@ -52,14 +52,14 @@ export function getMonitorLogs(id, params) { return request({ url: `admin/monitor/monitor/rate/${id}/`, params, - method: 'get' - }) + method: "get" + }); } // 获取服务器最新监控日志信息 export function getServerLatestLog(id) { return request({ url: `admin/monitor/monitor/info/${id}/`, - method: 'get' - }) + method: "get" + }); } diff --git a/dvadmin-ui/src/api/vadmin/permission/dept.js b/dvadmin-ui/src/api/vadmin/permission/dept.js index 17918b1..085052d 100755 --- a/dvadmin-ui/src/api/vadmin/permission/dept.js +++ b/dvadmin-ui/src/api/vadmin/permission/dept.js @@ -1,68 +1,68 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询部门列表 export function listDept(query) { return request({ - url: '/admin/permission/dept/', - method: 'get', + url: "/admin/permission/dept/", + method: "get", params: query - }) + }); } // 查询部门列表(排除节点) export function listDeptExcludeChild(deptId) { return request({ - url: '/admin/permission/dept/exclude/' + deptId + '/', - method: 'get' - }) + url: "/admin/permission/dept/exclude/" + deptId + "/", + method: "get" + }); } // 查询部门详细 export function getDept(deptId) { return request({ - url: '/admin/permission/dept/' + deptId + '/', - method: 'get' - }) + url: "/admin/permission/dept/" + deptId + "/", + method: "get" + }); } // 查询部门下拉树结构 export function treeselect() { return request({ - url: '/admin/permission/dept/treeselect/?status=1', - method: 'get' - }) + url: "/admin/permission/dept/treeselect/?status=1", + method: "get" + }); } // 根据角色ID查询部门树结构 export function roleDeptTreeselect(roleId) { return request({ - url: '/admin/permission/dept/roleDeptTreeselect/' + roleId + '/?status=1', - method: 'get' - }) + url: "/admin/permission/dept/roleDeptTreeselect/" + roleId + "/?status=1", + method: "get" + }); } // 新增部门 export function addDept(data) { return request({ - url: '/admin/permission/dept/', - method: 'post', + url: "/admin/permission/dept/", + method: "post", data: data - }) + }); } // 修改部门 export function updateDept(data) { return request({ - url: '/admin/permission/dept/' + data.id + '/', - method: 'put', + url: "/admin/permission/dept/" + data.id + "/", + method: "put", data: data - }) + }); } // 删除部门 export function delDept(deptId) { return request({ - url: '/admin/permission/dept/' + deptId + '', - method: 'delete' - }) + url: "/admin/permission/dept/" + deptId + "", + method: "delete" + }); } diff --git a/dvadmin-ui/src/api/vadmin/permission/menu.js b/dvadmin-ui/src/api/vadmin/permission/menu.js index cd1cceb..af4b2b3 100755 --- a/dvadmin-ui/src/api/vadmin/permission/menu.js +++ b/dvadmin-ui/src/api/vadmin/permission/menu.js @@ -1,60 +1,60 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询菜单列表 export function listMenu(query) { return request({ - url: '/admin/permission/menus/', - method: 'get', + url: "/admin/permission/menus/", + method: "get", params: query - }) + }); } // 查询菜单详细 export function getMenu(menuId) { return request({ - url: '/admin/permission/menus/' + menuId, - method: 'get' - }) + url: "/admin/permission/menus/" + menuId, + method: "get" + }); } // 查询菜单下拉树结构 export function treeselect() { return request({ - url: '/admin/permission/menus/treeselect/?status=1', - method: 'get' - }) + url: "/admin/permission/menus/treeselect/?status=1", + method: "get" + }); } // 根据角色ID查询菜单下拉树结构 export function roleMenuTreeselect(roleId) { return request({ - url: '/admin/permission/menus/roleMenuTreeselect/' + roleId + '/?status=1', - method: 'get' - }) + url: "/admin/permission/menus/roleMenuTreeselect/" + roleId + "/?status=1", + method: "get" + }); } // 新增菜单 export function addMenu(data) { return request({ - url: '/admin/permission/menus/', - method: 'post', + url: "/admin/permission/menus/", + method: "post", data: data - }) + }); } // 修改菜单 export function updateMenu(data) { return request({ - url: '/admin/permission/menus/'+ data.id + '/', - method: 'put', + url: "/admin/permission/menus/" + data.id + "/", + method: "put", data: data - }) + }); } // 删除菜单 export function delMenu(menuId) { return request({ - url: '/admin/permission/menus/' + menuId + '/', - method: 'delete' - }) + url: "/admin/permission/menus/" + menuId + "/", + method: "delete" + }); } diff --git a/dvadmin-ui/src/api/vadmin/permission/msg.js b/dvadmin-ui/src/api/vadmin/permission/msg.js index f0d68f8..54e5fe7 100644 --- a/dvadmin-ui/src/api/vadmin/permission/msg.js +++ b/dvadmin-ui/src/api/vadmin/permission/msg.js @@ -6,23 +6,23 @@ * @Description: In User Settings Edit * @FilePath: \dvadmin-ui\src\api\permission\msg.js */ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询消息列表 export function getList(query) { return request({ - url: '/admin/system/config/', - method: 'get', + url: "/admin/system/config/", + method: "get", params: query - }) + }); } // 查看详情 export function getDesc(configId) { return request({ - url: '/admin/system/config/' + configId + '/', - method: 'get' - }) + url: "/admin/system/config/" + configId + "/", + method: "get" + }); } // // 根据消息标题查询 @@ -36,35 +36,34 @@ export function getDesc(configId) { // 新增消息 export function addMsg(data) { return request({ - url: '/admin/system/config/', - method: 'post', + url: "/admin/system/config/", + method: "post", data: data - }) + }); } // 修改消息 export function updateMsg(data) { return request({ - url: '/admin/system/config/' + data.id + '/', - method: 'put', + url: "/admin/system/config/" + data.id + "/", + method: "put", data: data - }) + }); } // 删除消息 export function delMsg(configId) { return request({ - url: '/admin/system/config/' + configId + '/', - method: 'delete' - }) + url: "/admin/system/config/" + configId + "/", + method: "delete" + }); } - // 导出消息 export function exportMsg(query) { return request({ - url: '/admin/system/config/export/', - method: 'get', + url: "/admin/system/config/export/", + method: "get", params: query - }) + }); } diff --git a/dvadmin-ui/src/api/vadmin/permission/post.js b/dvadmin-ui/src/api/vadmin/permission/post.js index 1bde3a6..8c2a4ca 100755 --- a/dvadmin-ui/src/api/vadmin/permission/post.js +++ b/dvadmin-ui/src/api/vadmin/permission/post.js @@ -1,53 +1,53 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询岗位列表 export function listPost(query) { return request({ - url: '/admin/permission/post/', - method: 'get', + url: "/admin/permission/post/", + method: "get", params: query - }) + }); } // 查询岗位详细 export function getPost(postId) { return request({ - url: '/admin/permission/post/' + postId + '/', - method: 'get' - }) + url: "/admin/permission/post/" + postId + "/", + method: "get" + }); } // 新增岗位 export function addPost(data) { return request({ - url: '/admin/permission/post/', - method: 'post', + url: "/admin/permission/post/", + method: "post", data: data - }) + }); } // 修改岗位 export function updatePost(data) { return request({ - url: '/admin/permission/post/' + data.id + '/', - method: 'put', + url: "/admin/permission/post/" + data.id + "/", + method: "put", data: data - }) + }); } // 删除岗位 export function delPost(postId) { return request({ - url: '/admin/permission/post/' + postId + '/', - method: 'delete' - }) + url: "/admin/permission/post/" + postId + "/", + method: "delete" + }); } // 导出岗位 export function exportPost(query) { return request({ - url: '/admin/permission/post/export/', - method: 'get', + url: "/admin/permission/post/export/", + method: "get", params: query - }) + }); } diff --git a/dvadmin-ui/src/api/vadmin/permission/role.js b/dvadmin-ui/src/api/vadmin/permission/role.js index 73bcbb9..48acc74 100755 --- a/dvadmin-ui/src/api/vadmin/permission/role.js +++ b/dvadmin-ui/src/api/vadmin/permission/role.js @@ -1,47 +1,47 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询角色列表 export function listRole(query) { return request({ - url: '/admin/permission/role/', - method: 'get', + url: "/admin/permission/role/", + method: "get", params: query - }) + }); } // 查询角色详细 export function getRole(roleId) { return request({ - url: '/admin/permission/role/' + roleId + '/', - method: 'get' - }) + url: "/admin/permission/role/" + roleId + "/", + method: "get" + }); } // 新增角色 export function addRole(data) { return request({ - url: '/admin/permission/role/', - method: 'post', + url: "/admin/permission/role/", + method: "post", data: data - }) + }); } // 修改角色 export function updateRole(data) { return request({ - url: '/admin/permission/role/' + data.id + '/', - method: 'put', + url: "/admin/permission/role/" + data.id + "/", + method: "put", data: data - }) + }); } // 角色数据权限 export function dataScope(data) { return request({ - url: '/admin/permission/role/' + data.id + '/', - method: 'put', + url: "/admin/permission/role/" + data.id + "/", + method: "put", data: data - }) + }); } // 角色状态修改 @@ -49,27 +49,27 @@ export function changeRoleStatus(roleId, status) { const data = { roleId, status - } + }; return request({ - url: '/admin/permission/role/changeStatus/', - method: 'put', + url: "/admin/permission/role/changeStatus/", + method: "put", data: data - }) + }); } // 删除角色 export function delRole(roleId) { return request({ - url: '/admin/permission/role/' + roleId + '/', - method: 'delete' - }) + url: "/admin/permission/role/" + roleId + "/", + method: "delete" + }); } // 导出角色 export function exportRole(query) { return request({ - url: '/admin/permission/role/export/', - method: 'get', + url: "/admin/permission/role/export/", + method: "get", params: query - }) + }); } diff --git a/dvadmin-ui/src/api/vadmin/permission/user.js b/dvadmin-ui/src/api/vadmin/permission/user.js index fa01c92..819e38e 100755 --- a/dvadmin-ui/src/api/vadmin/permission/user.js +++ b/dvadmin-ui/src/api/vadmin/permission/user.js @@ -1,56 +1,56 @@ -import request from '@/utils/request' -import {praseStrEmpty} from "@/utils/ruoyi"; +import request from "@/utils/request"; +import { praseStrEmpty } from "@/utils/ruoyi"; // 查询用户列表 export function listUser(query) { return request({ - url: '/admin/permission/user/', - method: 'get', + url: "/admin/permission/user/", + method: "get", params: query - }) + }); } // 查询用户详细 export function getUser(userId) { return request({ - url: '/admin/permission/user/details/?userId=' + praseStrEmpty(userId), - method: 'get' - }) + url: "/admin/permission/user/details/?userId=" + praseStrEmpty(userId), + method: "get" + }); } // 新增用户 export function addUser(data) { return request({ - url: '/admin/permission/user/', - method: 'post', + url: "/admin/permission/user/", + method: "post", data: data - }) + }); } // 修改用户 export function updateUser(data) { return request({ - url: '/admin/permission/user/' + data.id + '/', - method: 'put', + url: "/admin/permission/user/" + data.id + "/", + method: "put", data: data - }) + }); } // 删除用户 export function delUser(userId) { return request({ - url: '/admin/permission/user/' + userId + '/', - method: 'delete' - }) + url: "/admin/permission/user/" + userId + "/", + method: "delete" + }); } // 导出用户 export function exportUser(query) { return request({ - url: '/admin/permission/user/export/', - method: 'get', + url: "/admin/permission/user/export/", + method: "get", params: query - }) + }); } // 用户密码重置 @@ -58,12 +58,12 @@ export function resetUserPwd(userId, password) { const data = { userId, password - } + }; return request({ - url: '/admin/permission/user/resetPwd/', - method: 'put', + url: "/admin/permission/user/resetPwd/", + method: "put", data: data - }) + }); } // 用户状态修改 @@ -71,29 +71,29 @@ export function changeUserStatus(userId, status) { const data = { userId, status - } + }; return request({ - url: '/admin/permission/user/changeStatus/', - method: 'put', + url: "/admin/permission/user/changeStatus/", + method: "put", data: data - }) + }); } // 查询用户个人信息 export function getUserProfile() { return request({ - url: '/admin/permission/user/profile/', - method: 'get' - }) + url: "/admin/permission/user/profile/", + method: "get" + }); } // 修改用户个人信息 export function updateUserProfile(data) { return request({ - url: '/admin/permission/user/profile/', - method: 'put', + url: "/admin/permission/user/profile/", + method: "put", data: data - }) + }); } // 用户密码重置 @@ -101,36 +101,36 @@ export function updateUserPwd(oldPassword, newPassword) { const data = { oldPassword, newPassword - } + }; return request({ - url: '/admin/permission/user/profile/updatePwd/', - method: 'put', + url: "/admin/permission/user/profile/updatePwd/", + method: "put", data: data - }) + }); } // 用户头像上传 export function uploadAvatar(data) { return request({ - url: '/admin/permission/user/profile/avatar/', - method: 'put', + url: "/admin/permission/user/profile/avatar/", + method: "put", data: data - }) + }); } // 下载用户导入模板 export function importTemplate() { return request({ - url: '/admin/permission/user/importTemplate/', - method: 'get' - }) + url: "/admin/permission/user/importTemplate/", + method: "get" + }); } // 用户导入 export function importsUser(data) { return request({ - url: '/admin/permission/user/importTemplate/', - method: 'post', + url: "/admin/permission/user/importTemplate/", + method: "post", data: data - }) + }); } diff --git a/dvadmin-ui/src/api/vadmin/system/config.js b/dvadmin-ui/src/api/vadmin/system/config.js index beaf681..74b50a5 100755 --- a/dvadmin-ui/src/api/vadmin/system/config.js +++ b/dvadmin-ui/src/api/vadmin/system/config.js @@ -1,69 +1,69 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询参数列表 export function listConfig(query) { return request({ - url: '/admin/system/config/', - method: 'get', + url: "/admin/system/config/", + method: "get", params: query - }) + }); } // 查询参数详细 export function getConfig(configId) { return request({ - url: '/admin/system/config/' + configId + '/', - method: 'get' - }) + url: "/admin/system/config/" + configId + "/", + method: "get" + }); } // 根据参数键名查询参数值 export function getConfigKey(configKey) { return request({ - url: '/admin/system/config/configKey/' + configKey + '/?status=1', - method: 'get' - }) + url: "/admin/system/config/configKey/" + configKey + "/?status=1", + method: "get" + }); } // 新增参数配置 export function addConfig(data) { return request({ - url: '/admin/system/config/', - method: 'post', + url: "/admin/system/config/", + method: "post", data: data - }) + }); } // 修改参数配置 export function updateConfig(data) { return request({ - url: '/admin/system/config/' + data.id + '/', - method: 'put', + url: "/admin/system/config/" + data.id + "/", + method: "put", data: data - }) + }); } // 删除参数配置 export function delConfig(configId) { return request({ - url: '/admin/system/config/' + configId + '/', - method: 'delete' - }) + url: "/admin/system/config/" + configId + "/", + method: "delete" + }); } // 清理参数缓存 export function clearCache() { return request({ - url: '/admin/system/config/clearCache/', - method: 'delete' - }) + url: "/admin/system/config/clearCache/", + method: "delete" + }); } // 导出参数 export function exportConfig(query) { return request({ - url: '/admin/system/config/export/', - method: 'get', + url: "/admin/system/config/export/", + method: "get", params: query - }) + }); } diff --git a/dvadmin-ui/src/api/vadmin/system/dict/data.js b/dvadmin-ui/src/api/vadmin/system/dict/data.js index cdbef01..b8cd6a9 100755 --- a/dvadmin-ui/src/api/vadmin/system/dict/data.js +++ b/dvadmin-ui/src/api/vadmin/system/dict/data.js @@ -1,61 +1,61 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询字典数据列表 export function listData(query) { return request({ - url: '/admin/system/dict/data/', - method: 'get', + url: "/admin/system/dict/data/", + method: "get", params: query - }) + }); } // 查询字典数据详细 export function getData(dictCode) { return request({ - url: '/admin/system/dict/data/' + dictCode + '/', - method: 'get' - }) + url: "/admin/system/dict/data/" + dictCode + "/", + method: "get" + }); } // 根据字典类型查询字典数据信息 export function getDicts(dictType) { return request({ - url: '/admin/system/dict/get/type/' + dictType + '/?status=1', - method: 'get' - }) + url: "/admin/system/dict/get/type/" + dictType + "/?status=1", + method: "get" + }); } // 新增字典数据 export function addData(data) { return request({ - url: '/admin/system/dict/data' + '/', - method: 'post', + url: "/admin/system/dict/data" + "/", + method: "post", data: data - }) + }); } // 修改字典数据 export function updateData(data) { return request({ - url: '/admin/system/dict/data/' + data.id + '/', - method: 'put', + url: "/admin/system/dict/data/" + data.id + "/", + method: "put", data: data - }) + }); } // 删除字典数据 export function delData(dictCode) { return request({ - url: '/admin/system/dict/data/' + dictCode + '/', - method: 'delete' - }) + url: "/admin/system/dict/data/" + dictCode + "/", + method: "delete" + }); } // 导出字典数据 export function exportData(query) { return request({ - url: '/admin/system/dict/data/export/', - method: 'get', + url: "/admin/system/dict/data/export/", + method: "get", params: query - }) + }); } diff --git a/dvadmin-ui/src/api/vadmin/system/dict/type.js b/dvadmin-ui/src/api/vadmin/system/dict/type.js index c0867ff..96edacc 100755 --- a/dvadmin-ui/src/api/vadmin/system/dict/type.js +++ b/dvadmin-ui/src/api/vadmin/system/dict/type.js @@ -1,69 +1,69 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询字典类型列表 export function listType(query) { return request({ - url: '/admin/system/dict/type/', - method: 'get', + url: "/admin/system/dict/type/", + method: "get", params: query - }) + }); } // 查询字典类型详细 export function getType(dictId) { return request({ - url: '/admin/system/dict/type/' + dictId + '/', - method: 'get' - }) + url: "/admin/system/dict/type/" + dictId + "/", + method: "get" + }); } // 新增字典类型 export function addType(data) { return request({ - url: '/admin/system/dict/type/', - method: 'post', + url: "/admin/system/dict/type/", + method: "post", data: data - }) + }); } // 修改字典类型 export function updateType(data) { return request({ - url: '/admin/system/dict/type/' + data.id + '/', - method: 'put', + url: "/admin/system/dict/type/" + data.id + "/", + method: "put", data: data - }) + }); } // 删除字典类型 export function delType(dictId) { return request({ - url: '/admin/system/dict/type/' + dictId + '/', - method: 'delete' - }) + url: "/admin/system/dict/type/" + dictId + "/", + method: "delete" + }); } // 清理参数缓存 export function clearCache() { return request({ - url: '/admin/system/dict/type/clearCache/', - method: 'delete' - }) + url: "/admin/system/dict/type/clearCache/", + method: "delete" + }); } // 导出字典类型 export function exportType(query) { return request({ - url: '/admin/system/dict/type/export/', - method: 'get', + url: "/admin/system/dict/type/export/", + method: "get", params: query - }) + }); } // 获取字典选择框列表 export function optionselect() { return request({ - url: '/admin/system/dict/type/optionselect', - method: 'get' - }) + url: "/admin/system/dict/type/optionselect", + method: "get" + }); } diff --git a/dvadmin-ui/src/api/vadmin/system/message.js b/dvadmin-ui/src/api/vadmin/system/message.js index 986fb76..9afb095 100755 --- a/dvadmin-ui/src/api/vadmin/system/message.js +++ b/dvadmin-ui/src/api/vadmin/system/message.js @@ -1,71 +1,70 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询通知列表 export function listMessage(query) { return request({ - url: '/admin/system/message/', - method: 'get', + url: "/admin/system/message/", + method: "get", params: query - }) + }); } // 查询通知详细 export function getMessage(messageId) { return request({ - url: '/admin/system/message/' + messageId + '/', - method: 'get' - }) + url: "/admin/system/message/" + messageId + "/", + method: "get" + }); } // 新增通知配置 export function addMessage(data) { return request({ - url: '/admin/system/message/', - method: 'post', + url: "/admin/system/message/", + method: "post", data: data - }) + }); } // 修改通知配置 export function updateMessage(data) { return request({ - url: '/admin/system/message/' + data.id + '/', - method: 'put', + url: "/admin/system/message/" + data.id + "/", + method: "put", data: data - }) + }); } // 删除通知配置 export function delMessage(messageId) { return request({ - url: '/admin/system/message/' + messageId + '/', - method: 'delete' - }) + url: "/admin/system/message/" + messageId + "/", + method: "delete" + }); } - // 导出通知 export function exportMessage(query) { return request({ - url: '/admin/system/message/export/', - method: 'get', + url: "/admin/system/message/export/", + method: "get", params: query - }) + }); } // 获取用户通知列表 export function userMessage(query) { return request({ - url: '/admin/system/message/user_messages/', - method: 'get', + url: "/admin/system/message/user_messages/", + method: "get", params: query - }) + }); } // 修改通知为已读 export function updateIsRead(data) { return request({ - url: '/admin/system/message/is_read/'+ data.id + '/', - method: 'put', - }) + url: "/admin/system/message/is_read/" + data.id + "/", + method: "put" + }); } diff --git a/dvadmin-ui/src/api/vadmin/system/notice.js b/dvadmin-ui/src/api/vadmin/system/notice.js index af4b266..9263bb2 100755 --- a/dvadmin-ui/src/api/vadmin/system/notice.js +++ b/dvadmin-ui/src/api/vadmin/system/notice.js @@ -1,44 +1,44 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询公告列表 export function listNotice(query) { return request({ - url: '/admin/system/notice/list', - method: 'get', + url: "/admin/system/notice/list", + method: "get", params: query - }) + }); } // 查询公告详细 export function getNotice(noticeId) { return request({ - url: '/admin/system/notice/' + noticeId, - method: 'get' - }) + url: "/admin/system/notice/" + noticeId, + method: "get" + }); } // 新增公告 export function addNotice(data) { return request({ - url: '/admin/system/notice', - method: 'post', + url: "/admin/system/notice", + method: "post", data: data - }) + }); } // 修改公告 export function updateNotice(data) { return request({ - url: '/admin/system/notice', - method: 'put', + url: "/admin/system/notice", + method: "put", data: data - }) + }); } // 删除公告 export function delNotice(noticeId) { return request({ - url: '/admin/system/notice/' + noticeId, - method: 'delete' - }) + url: "/admin/system/notice/" + noticeId, + method: "delete" + }); } diff --git a/dvadmin-ui/src/api/vadmin/system/operationlog.js b/dvadmin-ui/src/api/vadmin/system/operationlog.js index 7971fc7..2766fac 100755 --- a/dvadmin-ui/src/api/vadmin/system/operationlog.js +++ b/dvadmin-ui/src/api/vadmin/system/operationlog.js @@ -1,35 +1,35 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询操作日志列表 export function list(query) { return request({ - url: '/admin/system/operation_log/', - method: 'get', + url: "/admin/system/operation_log/", + method: "get", params: query - }) + }); } // 删除操作日志 export function delOperationLog(operId) { return request({ - url: '/admin/system/operation_log/' + operId + '/', - method: 'delete' - }) + url: "/admin/system/operation_log/" + operId + "/", + method: "delete" + }); } // 清空操作日志 export function cleanOperationLog() { return request({ - url: '/admin/system/operation_log/clean/', - method: 'delete' - }) + url: "/admin/system/operation_log/clean/", + method: "delete" + }); } // 导出操作日志 export function exportOperationLog(query) { return request({ - url: '/admin/system/operation_log/export/', - method: 'get', + url: "/admin/system/operation_log/export/", + method: "get", params: query - }) + }); } diff --git a/dvadmin-ui/src/api/vadmin/system/savefile.js b/dvadmin-ui/src/api/vadmin/system/savefile.js index 77f1820..9249ceb 100644 --- a/dvadmin-ui/src/api/vadmin/system/savefile.js +++ b/dvadmin-ui/src/api/vadmin/system/savefile.js @@ -1,36 +1,35 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询文件列表 export function listSaveFile(query) { return request({ - url: '/admin/system/savefile/', - method: 'get', + url: "/admin/system/savefile/", + method: "get", params: query - }) + }); } // 新增文件 export function addSaveFile(data) { return request({ - url: '/admin/system/savefile/', - method: 'post', + url: "/admin/system/savefile/", + method: "post", data: data - }) + }); } - // 删除文件 export function delSaveFile(menuId) { return request({ - url: '/admin/system/savefile/' + menuId + '/', - method: 'delete' - }) + url: "/admin/system/savefile/" + menuId + "/", + method: "delete" + }); } // 清理废弃文件 export function clearSaveFile() { return request({ - url: '/admin/system/clearsavefile/', - method: 'post' - }) + url: "/admin/system/clearsavefile/", + method: "post" + }); } diff --git a/dvadmin-ui/src/api/vadmin/tool/gen.js b/dvadmin-ui/src/api/vadmin/tool/gen.js index 4506927..91fd24e 100755 --- a/dvadmin-ui/src/api/vadmin/tool/gen.js +++ b/dvadmin-ui/src/api/vadmin/tool/gen.js @@ -1,76 +1,76 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询生成表数据 export function listTable(query) { return request({ - url: '/tool/gen/list', - method: 'get', + url: "/tool/gen/list", + method: "get", params: query - }) + }); } // 查询db数据库列表 export function listDbTable(query) { return request({ - url: '/tool/gen/db/list', - method: 'get', + url: "/tool/gen/db/list", + method: "get", params: query - }) + }); } // 查询表详细信息 export function getGenTable(tableId) { return request({ - url: '/tool/gen/' + tableId, - method: 'get' - }) + url: "/tool/gen/" + tableId, + method: "get" + }); } // 修改代码生成信息 export function updateGenTable(data) { return request({ - url: '/tool/gen', - method: 'put', + url: "/tool/gen", + method: "put", data: data - }) + }); } // 导入表 export function importTable(data) { return request({ - url: '/tool/gen/importTable', - method: 'post', + url: "/tool/gen/importTable", + method: "post", params: data - }) + }); } // 预览生成代码 export function previewTable(tableId) { return request({ - url: '/tool/gen/preview/' + tableId, - method: 'get' - }) + url: "/tool/gen/preview/" + tableId, + method: "get" + }); } // 删除表数据 export function delTable(tableId) { return request({ - url: '/tool/gen/' + tableId, - method: 'delete' - }) + url: "/tool/gen/" + tableId, + method: "delete" + }); } // 生成代码(自定义路径) export function genCode(tableName) { return request({ - url: '/tool/gen/genCode/' + tableName, - method: 'get' - }) + url: "/tool/gen/genCode/" + tableName, + method: "get" + }); } // 同步数据库 export function synchDb(tableName) { return request({ - url: '/tool/gen/synchDb/' + tableName, - method: 'get' - }) + url: "/tool/gen/synchDb/" + tableName, + method: "get" + }); } diff --git a/dvadmin-ui/src/components/Breadcrumb/index.vue b/dvadmin-ui/src/components/Breadcrumb/index.vue index 2e0c775..00590e9 100755 --- a/dvadmin-ui/src/components/Breadcrumb/index.vue +++ b/dvadmin-ui/src/components/Breadcrumb/index.vue @@ -14,49 +14,49 @@ export default { data() { return { levelList: null - } + }; }, watch: { $route(route) { // if you go to the redirect page, do not update the breadcrumbs - if (route.path.startsWith('/redirect/')) { - return + if (route.path.startsWith("/redirect/")) { + return; } - this.getBreadcrumb() + this.getBreadcrumb(); } }, created() { - this.getBreadcrumb() + this.getBreadcrumb(); }, methods: { getBreadcrumb() { // only show routes with meta.title - let matched = this.$route.matched.filter(item => item.meta && item.meta.title) - const first = matched[0] + const matched = this.$route.matched.filter(item => item.meta && item.meta.title); + const first = matched[0]; if (!this.isDashboard(first)) { // matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched) } - this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) + this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false); }, isDashboard(route) { - const name = route && route.name + const name = route && route.name; if (!name) { - return false + return false; } - return name.trim() === '首页' + return name.trim() === "首页"; }, handleLink(item) { - const { redirect, path } = item + const { redirect, path } = item; if (redirect) { - this.$router.push(redirect) - return + this.$router.push(redirect); + return; } - this.$router.push(path) + this.$router.push(path); } } -} +}; \ No newline at end of file + diff --git a/dvadmin-ui/src/components/FileUpload/index.vue b/dvadmin-ui/src/components/FileUpload/index.vue index 32bce09..b2be5e8 100755 --- a/dvadmin-ui/src/components/FileUpload/index.vue +++ b/dvadmin-ui/src/components/FileUpload/index.vue @@ -1,6 +1,7 @@ diff --git a/dvadmin-ui/src/components/Hamburger/index.vue b/dvadmin-ui/src/components/Hamburger/index.vue index 368b002..243e5e9 100755 --- a/dvadmin-ui/src/components/Hamburger/index.vue +++ b/dvadmin-ui/src/components/Hamburger/index.vue @@ -15,7 +15,7 @@ \ No newline at end of file + diff --git a/dvadmin-ui/src/components/Modal/DetailFormDialog.vue b/dvadmin-ui/src/components/Modal/DetailFormDialog.vue index 1300f1c..6d63a69 100644 --- a/dvadmin-ui/src/components/Modal/DetailFormDialog.vue +++ b/dvadmin-ui/src/components/Modal/DetailFormDialog.vue @@ -1,22 +1,23 @@