diff --git a/ruoyi-ui/.editorconfig b/acupuncture-ui/.editorconfig similarity index 95% rename from ruoyi-ui/.editorconfig rename to acupuncture-ui/.editorconfig index 22d302ec..7034f9bf 100644 --- a/ruoyi-ui/.editorconfig +++ b/acupuncture-ui/.editorconfig @@ -1,22 +1,22 @@ -# 告诉EditorConfig插件,这是根文件,不用继续往上查找 -root = true - -# 匹配全部文件 -[*] -# 设置字符集 -charset = utf-8 -# 缩进风格,可选space、tab -indent_style = space -# 缩进的空格数 -indent_size = 2 -# 结尾换行符,可选lf、cr、crlf -end_of_line = lf -# 在文件结尾插入新行 -insert_final_newline = true -# 删除一行中的前后空格 -trim_trailing_whitespace = true - -# 匹配md结尾的文件 -[*.md] -insert_final_newline = false -trim_trailing_whitespace = false +# 告诉EditorConfig插件,这是根文件,不用继续往上查找 +root = true + +# 匹配全部文件 +[*] +# 设置字符集 +charset = utf-8 +# 缩进风格,可选space、tab +indent_style = space +# 缩进的空格数 +indent_size = 2 +# 结尾换行符,可选lf、cr、crlf +end_of_line = lf +# 在文件结尾插入新行 +insert_final_newline = true +# 删除一行中的前后空格 +trim_trailing_whitespace = true + +# 匹配md结尾的文件 +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/ruoyi-ui/.env.development b/acupuncture-ui/.env.development similarity index 95% rename from ruoyi-ui/.env.development rename to acupuncture-ui/.env.development index 18b2a3ed..302ecd1a 100644 --- a/ruoyi-ui/.env.development +++ b/acupuncture-ui/.env.development @@ -1,11 +1,11 @@ -# 页面标题 -VUE_APP_TITLE = 若依管理系统 - -# 开发环境配置 -ENV = 'development' - -# 若依管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' - -# 路由懒加载 -VUE_CLI_BABEL_TRANSPILE_MODULES = true +# 页面标题 +VUE_APP_TITLE = 若依管理系统 + +# 开发环境配置 +ENV = 'development' + +# 若依管理系统/开发环境 +VUE_APP_BASE_API = '/dev-api' + +# 路由懒加载 +VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/ruoyi-ui/.env.production b/acupuncture-ui/.env.production similarity index 95% rename from ruoyi-ui/.env.production rename to acupuncture-ui/.env.production index cb064ec8..b4893b0d 100644 --- a/ruoyi-ui/.env.production +++ b/acupuncture-ui/.env.production @@ -1,8 +1,8 @@ -# 页面标题 -VUE_APP_TITLE = 若依管理系统 - -# 生产环境配置 -ENV = 'production' - -# 若依管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +# 页面标题 +VUE_APP_TITLE = 若依管理系统 + +# 生产环境配置 +ENV = 'production' + +# 若依管理系统/生产环境 +VUE_APP_BASE_API = '/prod-api' diff --git a/ruoyi-ui/.env.staging b/acupuncture-ui/.env.staging similarity index 94% rename from ruoyi-ui/.env.staging rename to acupuncture-ui/.env.staging index 730af342..209b64e3 100644 --- a/ruoyi-ui/.env.staging +++ b/acupuncture-ui/.env.staging @@ -1,12 +1,12 @@ -# 页面标题 -VUE_APP_TITLE = 若依管理系统 - -BABEL_ENV = production - -NODE_ENV = production - -# 测试环境配置 -ENV = 'staging' - -# 若依管理系统/测试环境 -VUE_APP_BASE_API = '/stage-api' +# 页面标题 +VUE_APP_TITLE = 若依管理系统 + +BABEL_ENV = production + +NODE_ENV = production + +# 测试环境配置 +ENV = 'staging' + +# 若依管理系统/测试环境 +VUE_APP_BASE_API = '/stage-api' diff --git a/ruoyi-ui/.eslintignore b/acupuncture-ui/.eslintignore similarity index 97% rename from ruoyi-ui/.eslintignore rename to acupuncture-ui/.eslintignore index 7dd2c2a8..89be6f65 100644 --- a/ruoyi-ui/.eslintignore +++ b/acupuncture-ui/.eslintignore @@ -1,10 +1,10 @@ -# 忽略build目录下类型为js的文件的语法检查 -build/*.js -# 忽略src/assets目录下文件的语法检查 -src/assets -# 忽略public目录下文件的语法检查 -public -# 忽略当前目录下为js的文件的语法检查 -*.js -# 忽略当前目录下为vue的文件的语法检查 +# 忽略build目录下类型为js的文件的语法检查 +build/*.js +# 忽略src/assets目录下文件的语法检查 +src/assets +# 忽略public目录下文件的语法检查 +public +# 忽略当前目录下为js的文件的语法检查 +*.js +# 忽略当前目录下为vue的文件的语法检查 *.vue \ No newline at end of file diff --git a/ruoyi-ui/.eslintrc.js b/acupuncture-ui/.eslintrc.js similarity index 96% rename from ruoyi-ui/.eslintrc.js rename to acupuncture-ui/.eslintrc.js index b321fbe4..82bbdeea 100644 --- a/ruoyi-ui/.eslintrc.js +++ b/acupuncture-ui/.eslintrc.js @@ -1,199 +1,199 @@ -// ESlint 检查配置 -module.exports = { - root: true, - parserOptions: { - parser: 'babel-eslint', - sourceType: 'module' - }, - env: { - browser: true, - node: true, - es6: true, - }, - extends: ['plugin:vue/recommended', 'eslint:recommended'], - - // add your custom rules here - //it is base on https://github.com/vuejs/eslint-config-vue - rules: { - "vue/max-attributes-per-line": [2, { - "singleline": 10, - "multiline": { - "max": 1, - "allowFirstLine": false - } - }], - "vue/singleline-html-element-content-newline": "off", - "vue/multiline-html-element-content-newline":"off", - "vue/name-property-casing": ["error", "PascalCase"], - "vue/no-v-html": "off", - 'accessor-pairs': 2, - 'arrow-spacing': [2, { - 'before': true, - 'after': true - }], - 'block-spacing': [2, 'always'], - 'brace-style': [2, '1tbs', { - 'allowSingleLine': true - }], - 'camelcase': [0, { - 'properties': 'always' - }], - 'comma-dangle': [2, 'never'], - 'comma-spacing': [2, { - 'before': false, - 'after': true - }], - 'comma-style': [2, 'last'], - 'constructor-super': 2, - 'curly': [2, 'multi-line'], - 'dot-location': [2, 'property'], - 'eol-last': 2, - 'eqeqeq': ["error", "always", {"null": "ignore"}], - 'generator-star-spacing': [2, { - 'before': true, - 'after': true - }], - 'handle-callback-err': [2, '^(err|error)$'], - 'indent': [2, 2, { - 'SwitchCase': 1 - }], - 'jsx-quotes': [2, 'prefer-single'], - 'key-spacing': [2, { - 'beforeColon': false, - 'afterColon': true - }], - 'keyword-spacing': [2, { - 'before': true, - 'after': true - }], - 'new-cap': [2, { - 'newIsCap': true, - 'capIsNew': false - }], - 'new-parens': 2, - 'no-array-constructor': 2, - 'no-caller': 2, - 'no-console': 'off', - 'no-class-assign': 2, - 'no-cond-assign': 2, - 'no-const-assign': 2, - 'no-control-regex': 0, - 'no-delete-var': 2, - 'no-dupe-args': 2, - 'no-dupe-class-members': 2, - 'no-dupe-keys': 2, - 'no-duplicate-case': 2, - 'no-empty-character-class': 2, - 'no-empty-pattern': 2, - 'no-eval': 2, - 'no-ex-assign': 2, - 'no-extend-native': 2, - 'no-extra-bind': 2, - 'no-extra-boolean-cast': 2, - 'no-extra-parens': [2, 'functions'], - 'no-fallthrough': 2, - 'no-floating-decimal': 2, - 'no-func-assign': 2, - 'no-implied-eval': 2, - 'no-inner-declarations': [2, 'functions'], - 'no-invalid-regexp': 2, - 'no-irregular-whitespace': 2, - 'no-iterator': 2, - 'no-label-var': 2, - 'no-labels': [2, { - 'allowLoop': false, - 'allowSwitch': false - }], - 'no-lone-blocks': 2, - 'no-mixed-spaces-and-tabs': 2, - 'no-multi-spaces': 2, - 'no-multi-str': 2, - 'no-multiple-empty-lines': [2, { - 'max': 1 - }], - 'no-native-reassign': 2, - 'no-negated-in-lhs': 2, - 'no-new-object': 2, - 'no-new-require': 2, - 'no-new-symbol': 2, - 'no-new-wrappers': 2, - 'no-obj-calls': 2, - 'no-octal': 2, - 'no-octal-escape': 2, - 'no-path-concat': 2, - 'no-proto': 2, - 'no-redeclare': 2, - 'no-regex-spaces': 2, - 'no-return-assign': [2, 'except-parens'], - 'no-self-assign': 2, - 'no-self-compare': 2, - 'no-sequences': 2, - 'no-shadow-restricted-names': 2, - 'no-spaced-func': 2, - 'no-sparse-arrays': 2, - 'no-this-before-super': 2, - 'no-throw-literal': 2, - 'no-trailing-spaces': 2, - 'no-undef': 2, - 'no-undef-init': 2, - 'no-unexpected-multiline': 2, - 'no-unmodified-loop-condition': 2, - 'no-unneeded-ternary': [2, { - 'defaultAssignment': false - }], - 'no-unreachable': 2, - 'no-unsafe-finally': 2, - 'no-unused-vars': [2, { - 'vars': 'all', - 'args': 'none' - }], - 'no-useless-call': 2, - 'no-useless-computed-key': 2, - 'no-useless-constructor': 2, - 'no-useless-escape': 0, - 'no-whitespace-before-property': 2, - 'no-with': 2, - 'one-var': [2, { - 'initialized': 'never' - }], - 'operator-linebreak': [2, 'after', { - 'overrides': { - '?': 'before', - ':': 'before' - } - }], - 'padded-blocks': [2, 'never'], - 'quotes': [2, 'single', { - 'avoidEscape': true, - 'allowTemplateLiterals': true - }], - 'semi': [2, 'never'], - 'semi-spacing': [2, { - 'before': false, - 'after': true - }], - 'space-before-blocks': [2, 'always'], - 'space-before-function-paren': [2, 'never'], - 'space-in-parens': [2, 'never'], - 'space-infix-ops': 2, - 'space-unary-ops': [2, { - 'words': true, - 'nonwords': false - }], - 'spaced-comment': [2, 'always', { - 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] - }], - 'template-curly-spacing': [2, 'never'], - 'use-isnan': 2, - 'valid-typeof': 2, - 'wrap-iife': [2, 'any'], - 'yield-star-spacing': [2, 'both'], - 'yoda': [2, 'never'], - 'prefer-const': 2, - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - 'object-curly-spacing': [2, 'always', { - objectsInObjects: false - }], - 'array-bracket-spacing': [2, 'never'] - } -} +// 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/ruoyi-ui/.gitignore b/acupuncture-ui/.gitignore similarity index 91% rename from ruoyi-ui/.gitignore rename to acupuncture-ui/.gitignore index 2c9b3a73..78a752d8 100644 --- a/ruoyi-ui/.gitignore +++ b/acupuncture-ui/.gitignore @@ -1,23 +1,23 @@ -.DS_Store -node_modules/ -dist/ -npm-debug.log* -yarn-debug.log* -yarn-error.log* -**/*.log - -tests/**/coverage/ -tests/e2e/reports -selenium-debug.log - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.local - -package-lock.json -yarn.lock +.DS_Store +node_modules/ +dist/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +**/*.log + +tests/**/coverage/ +tests/e2e/reports +selenium-debug.log + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.local + +package-lock.json +yarn.lock diff --git a/ruoyi-ui/README.md b/acupuncture-ui/README.md similarity index 100% rename from ruoyi-ui/README.md rename to acupuncture-ui/README.md diff --git a/ruoyi-ui/babel.config.js b/acupuncture-ui/babel.config.js similarity index 97% rename from ruoyi-ui/babel.config.js rename to acupuncture-ui/babel.config.js index d33f9ea4..c8267b2d 100644 --- a/ruoyi-ui/babel.config.js +++ b/acupuncture-ui/babel.config.js @@ -1,13 +1,13 @@ -module.exports = { - presets: [ - // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app - '@vue/cli-plugin-babel/preset' - ], - 'env': { - 'development': { - // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). - // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. - 'plugins': ['dynamic-import-node'] - } - } +module.exports = { + presets: [ + // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app + '@vue/cli-plugin-babel/preset' + ], + 'env': { + 'development': { + // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). + // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. + 'plugins': ['dynamic-import-node'] + } + } } \ No newline at end of file diff --git a/ruoyi-ui/bin/build.bat b/acupuncture-ui/bin/build.bat similarity index 100% rename from ruoyi-ui/bin/build.bat rename to acupuncture-ui/bin/build.bat diff --git a/ruoyi-ui/bin/package.bat b/acupuncture-ui/bin/package.bat similarity index 93% rename from ruoyi-ui/bin/package.bat rename to acupuncture-ui/bin/package.bat index dff0c612..0e5bc0fb 100644 --- a/ruoyi-ui/bin/package.bat +++ b/acupuncture-ui/bin/package.bat @@ -1,12 +1,12 @@ -@echo off -echo. -echo [Ϣ] װWeḅnode_modulesļ -echo. - -%~d0 -cd %~dp0 - -cd .. -npm install --registry=https://registry.npmmirror.com - +@echo off +echo. +echo [Ϣ] װWeḅnode_modulesļ +echo. + +%~d0 +cd %~dp0 + +cd .. +npm install --registry=https://registry.npmmirror.com + pause \ No newline at end of file diff --git a/ruoyi-ui/bin/run-web.bat b/acupuncture-ui/bin/run-web.bat similarity index 90% rename from ruoyi-ui/bin/run-web.bat rename to acupuncture-ui/bin/run-web.bat index 921902c4..d30deae7 100644 --- a/ruoyi-ui/bin/run-web.bat +++ b/acupuncture-ui/bin/run-web.bat @@ -1,12 +1,12 @@ -@echo off -echo. -echo [Ϣ] ʹ Vue CLI Web ̡ -echo. - -%~d0 -cd %~dp0 - -cd .. -npm run dev - +@echo off +echo. +echo [Ϣ] ʹ Vue CLI Web ̡ +echo. + +%~d0 +cd %~dp0 + +cd .. +npm run dev + pause \ No newline at end of file diff --git a/ruoyi-ui/build/index.js b/acupuncture-ui/build/index.js similarity index 96% rename from ruoyi-ui/build/index.js rename to acupuncture-ui/build/index.js index 385da08e..0c57de2a 100644 --- a/ruoyi-ui/build/index.js +++ b/acupuncture-ui/build/index.js @@ -1,35 +1,35 @@ -const { run } = require('runjs') -const chalk = require('chalk') -const config = require('../vue.config.js') -const rawArgv = process.argv.slice(2) -const args = rawArgv.join(' ') - -if (process.env.npm_config_preview || rawArgv.includes('--preview')) { - const report = rawArgv.includes('--report') - - run(`vue-cli-service build ${args}`) - - const port = 9526 - const publicPath = config.publicPath - - var connect = require('connect') - var serveStatic = require('serve-static') - const app = connect() - - app.use( - publicPath, - serveStatic('./dist', { - index: ['index.html', '/'] - }) - ) - - app.listen(port, function () { - console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) - if (report) { - console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) - } - - }) -} else { - run(`vue-cli-service build ${args}`) -} +const { run } = require('runjs') +const chalk = require('chalk') +const config = require('../vue.config.js') +const rawArgv = process.argv.slice(2) +const args = rawArgv.join(' ') + +if (process.env.npm_config_preview || rawArgv.includes('--preview')) { + const report = rawArgv.includes('--report') + + run(`vue-cli-service build ${args}`) + + const port = 9526 + const publicPath = config.publicPath + + var connect = require('connect') + var serveStatic = require('serve-static') + const app = connect() + + app.use( + publicPath, + serveStatic('./dist', { + index: ['index.html', '/'] + }) + ) + + app.listen(port, function () { + console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) + if (report) { + console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) + } + + }) +} else { + run(`vue-cli-service build ${args}`) +} diff --git a/ruoyi-ui/package.json b/acupuncture-ui/package.json similarity index 100% rename from ruoyi-ui/package.json rename to acupuncture-ui/package.json diff --git a/ruoyi-ui/public/favicon.ico b/acupuncture-ui/public/favicon.ico similarity index 100% rename from ruoyi-ui/public/favicon.ico rename to acupuncture-ui/public/favicon.ico diff --git a/ruoyi-ui/public/html/ie.html b/acupuncture-ui/public/html/ie.html similarity index 99% rename from ruoyi-ui/public/html/ie.html rename to acupuncture-ui/public/html/ie.html index 390ce8ab..052ffcd6 100644 --- a/ruoyi-ui/public/html/ie.html +++ b/acupuncture-ui/public/html/ie.html @@ -1,46 +1,46 @@ - - - - - - 请升级您的浏览器 - - - - - - -

请升级您的浏览器,以便我们更好的为您提供服务!

-

您正在使用 Internet Explorer 的早期版本(IE11以下版本或使用该内核的浏览器)。这意味着在升级浏览器前,您将无法访问此网站。

-
-

请注意:微软公司对Windows XP 及 Internet Explorer 早期版本的支持已经结束

-

自 2016 年 1 月 12 日起,Microsoft 不再为 IE 11 以下版本提供相应支持和更新。没有关键的浏览器安全更新,您的电脑可能易受有害病毒、间谍软件和其他恶意软件的攻击,它们可以窃取或损害您的业务数据和信息。请参阅 微软对 Internet Explorer 早期版本的支持将于 2016 年 1 月 12 日结束的说明

-
-

您可以选择更先进的浏览器

-

推荐使用以下浏览器的最新版本。如果您的电脑已有以下浏览器的最新版本则直接使用该浏览器访问即可。

- -
- + + + + + + 请升级您的浏览器 + + + + + + +

请升级您的浏览器,以便我们更好的为您提供服务!

+

您正在使用 Internet Explorer 的早期版本(IE11以下版本或使用该内核的浏览器)。这意味着在升级浏览器前,您将无法访问此网站。

+
+

请注意:微软公司对Windows XP 及 Internet Explorer 早期版本的支持已经结束

+

自 2016 年 1 月 12 日起,Microsoft 不再为 IE 11 以下版本提供相应支持和更新。没有关键的浏览器安全更新,您的电脑可能易受有害病毒、间谍软件和其他恶意软件的攻击,它们可以窃取或损害您的业务数据和信息。请参阅 微软对 Internet Explorer 早期版本的支持将于 2016 年 1 月 12 日结束的说明

+
+

您可以选择更先进的浏览器

+

推荐使用以下浏览器的最新版本。如果您的电脑已有以下浏览器的最新版本则直接使用该浏览器访问即可。

+ +
+ \ No newline at end of file diff --git a/ruoyi-ui/public/index.html b/acupuncture-ui/public/index.html similarity index 96% rename from ruoyi-ui/public/index.html rename to acupuncture-ui/public/index.html index 56fd45b3..925455ca 100644 --- a/ruoyi-ui/public/index.html +++ b/acupuncture-ui/public/index.html @@ -1,208 +1,208 @@ - - - - - - - - - <%= webpackConfig.name %> - - - - -
-
-
-
-
-
正在加载系统资源,请耐心等待
-
-
- - + + + + + + + + + <%= webpackConfig.name %> + + + + +
+
+
+
+
+
正在加载系统资源,请耐心等待
+
+
+ + diff --git a/ruoyi-ui/public/robots.txt b/acupuncture-ui/public/robots.txt similarity index 96% rename from ruoyi-ui/public/robots.txt rename to acupuncture-ui/public/robots.txt index c2aab7e0..77470cb3 100644 --- a/ruoyi-ui/public/robots.txt +++ b/acupuncture-ui/public/robots.txt @@ -1,2 +1,2 @@ -User-agent: * +User-agent: * Disallow: / \ No newline at end of file diff --git a/ruoyi-ui/public/styles/theme-chalk/index.css b/acupuncture-ui/public/styles/theme-chalk/index.css similarity index 100% rename from ruoyi-ui/public/styles/theme-chalk/index.css rename to acupuncture-ui/public/styles/theme-chalk/index.css diff --git a/ruoyi-ui/src/App.vue b/acupuncture-ui/src/App.vue similarity index 95% rename from ruoyi-ui/src/App.vue rename to acupuncture-ui/src/App.vue index cc29b466..b92ea379 100644 --- a/ruoyi-ui/src/App.vue +++ b/acupuncture-ui/src/App.vue @@ -1,28 +1,28 @@ - - - - + + + + diff --git a/ruoyi-ui/src/api/login.js b/acupuncture-ui/src/api/login.js similarity index 93% rename from ruoyi-ui/src/api/login.js rename to acupuncture-ui/src/api/login.js index 9f333cb3..7b7388fd 100644 --- a/ruoyi-ui/src/api/login.js +++ b/acupuncture-ui/src/api/login.js @@ -1,60 +1,60 @@ -import request from '@/utils/request' - -// 登录方法 -export function login(username, password, code, uuid) { - const data = { - username, - password, - code, - uuid - } - return request({ - url: '/login', - headers: { - isToken: false, - repeatSubmit: false - }, - method: 'post', - data: data - }) -} - -// 注册方法 -export function register(data) { - return request({ - url: '/register', - headers: { - isToken: false - }, - method: 'post', - data: data - }) -} - -// 获取用户详细信息 -export function getInfo() { - return request({ - url: '/getInfo', - method: 'get' - }) -} - -// 退出方法 -export function logout() { - return request({ - url: '/logout', - method: 'post' - }) -} - -// 获取验证码 -export function getCodeImg() { - return request({ - url: '/captchaImage', - headers: { - isToken: false - }, - method: 'get', - timeout: 20000 - }) +import request from '@/utils/request' + +// 登录方法 +export function login(username, password, code, uuid) { + const data = { + username, + password, + code, + uuid + } + return request({ + url: '/login', + headers: { + isToken: false, + repeatSubmit: false + }, + method: 'post', + data: data + }) +} + +// 注册方法 +export function register(data) { + return request({ + url: '/register', + headers: { + isToken: false + }, + method: 'post', + data: data + }) +} + +// 获取用户详细信息 +export function getInfo() { + return request({ + url: '/getInfo', + method: 'get' + }) +} + +// 退出方法 +export function logout() { + return request({ + url: '/logout', + method: 'post' + }) +} + +// 获取验证码 +export function getCodeImg() { + return request({ + url: '/captchaImage', + headers: { + isToken: false + }, + method: 'get', + timeout: 20000 + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/menu.js b/acupuncture-ui/src/api/menu.js similarity index 95% rename from ruoyi-ui/src/api/menu.js rename to acupuncture-ui/src/api/menu.js index 6e52e6e8..faef101c 100644 --- a/ruoyi-ui/src/api/menu.js +++ b/acupuncture-ui/src/api/menu.js @@ -1,9 +1,9 @@ -import request from '@/utils/request' - -// 获取路由 -export const getRouters = () => { - return request({ - url: '/getRouters', - method: 'get' - }) +import request from '@/utils/request' + +// 获取路由 +export const getRouters = () => { + return request({ + url: '/getRouters', + method: 'get' + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/monitor/cache.js b/acupuncture-ui/src/api/monitor/cache.js similarity index 95% rename from ruoyi-ui/src/api/monitor/cache.js rename to acupuncture-ui/src/api/monitor/cache.js index e1f2c878..72c5f6a3 100644 --- a/ruoyi-ui/src/api/monitor/cache.js +++ b/acupuncture-ui/src/api/monitor/cache.js @@ -1,57 +1,57 @@ -import request from '@/utils/request' - -// 查询缓存详细 -export function getCache() { - return request({ - url: '/monitor/cache', - method: 'get' - }) -} - -// 查询缓存名称列表 -export function listCacheName() { - return request({ - url: '/monitor/cache/getNames', - method: 'get' - }) -} - -// 查询缓存键名列表 -export function listCacheKey(cacheName) { - return request({ - url: '/monitor/cache/getKeys/' + cacheName, - method: 'get' - }) -} - -// 查询缓存内容 -export function getCacheValue(cacheName, cacheKey) { - return request({ - url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey, - method: 'get' - }) -} - -// 清理指定名称缓存 -export function clearCacheName(cacheName) { - return request({ - url: '/monitor/cache/clearCacheName/' + cacheName, - method: 'delete' - }) -} - -// 清理指定键名缓存 -export function clearCacheKey(cacheKey) { - return request({ - url: '/monitor/cache/clearCacheKey/' + cacheKey, - method: 'delete' - }) -} - -// 清理全部缓存 -export function clearCacheAll() { - return request({ - url: '/monitor/cache/clearCacheAll', - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询缓存详细 +export function getCache() { + return request({ + url: '/monitor/cache', + method: 'get' + }) +} + +// 查询缓存名称列表 +export function listCacheName() { + return request({ + url: '/monitor/cache/getNames', + method: 'get' + }) +} + +// 查询缓存键名列表 +export function listCacheKey(cacheName) { + return request({ + url: '/monitor/cache/getKeys/' + cacheName, + method: 'get' + }) +} + +// 查询缓存内容 +export function getCacheValue(cacheName, cacheKey) { + return request({ + url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey, + method: 'get' + }) +} + +// 清理指定名称缓存 +export function clearCacheName(cacheName) { + return request({ + url: '/monitor/cache/clearCacheName/' + cacheName, + method: 'delete' + }) +} + +// 清理指定键名缓存 +export function clearCacheKey(cacheKey) { + return request({ + url: '/monitor/cache/clearCacheKey/' + cacheKey, + method: 'delete' + }) +} + +// 清理全部缓存 +export function clearCacheAll() { + return request({ + url: '/monitor/cache/clearCacheAll', + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/monitor/job.js b/acupuncture-ui/src/api/monitor/job.js similarity index 100% rename from ruoyi-ui/src/api/monitor/job.js rename to acupuncture-ui/src/api/monitor/job.js diff --git a/ruoyi-ui/src/api/monitor/jobLog.js b/acupuncture-ui/src/api/monitor/jobLog.js similarity index 100% rename from ruoyi-ui/src/api/monitor/jobLog.js rename to acupuncture-ui/src/api/monitor/jobLog.js diff --git a/ruoyi-ui/src/api/monitor/logininfor.js b/acupuncture-ui/src/api/monitor/logininfor.js similarity index 95% rename from ruoyi-ui/src/api/monitor/logininfor.js rename to acupuncture-ui/src/api/monitor/logininfor.js index c49a40e1..4d112b78 100644 --- a/ruoyi-ui/src/api/monitor/logininfor.js +++ b/acupuncture-ui/src/api/monitor/logininfor.js @@ -1,34 +1,34 @@ -import request from '@/utils/request' - -// 查询登录日志列表 -export function list(query) { - return request({ - url: '/monitor/logininfor/list', - method: 'get', - params: query - }) -} - -// 删除登录日志 -export function delLogininfor(infoId) { - return request({ - url: '/monitor/logininfor/' + infoId, - method: 'delete' - }) -} - -// 解锁用户登录状态 -export function unlockLogininfor(userName) { - return request({ - url: '/monitor/logininfor/unlock/' + userName, - method: 'get' - }) -} - -// 清空登录日志 -export function cleanLogininfor() { - return request({ - url: '/monitor/logininfor/clean', - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询登录日志列表 +export function list(query) { + return request({ + url: '/monitor/logininfor/list', + method: 'get', + params: query + }) +} + +// 删除登录日志 +export function delLogininfor(infoId) { + return request({ + url: '/monitor/logininfor/' + infoId, + method: 'delete' + }) +} + +// 解锁用户登录状态 +export function unlockLogininfor(userName) { + return request({ + url: '/monitor/logininfor/unlock/' + userName, + method: 'get' + }) +} + +// 清空登录日志 +export function cleanLogininfor() { + return request({ + url: '/monitor/logininfor/clean', + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/monitor/online.js b/acupuncture-ui/src/api/monitor/online.js similarity index 94% rename from ruoyi-ui/src/api/monitor/online.js rename to acupuncture-ui/src/api/monitor/online.js index 288ebe02..bd221378 100644 --- a/ruoyi-ui/src/api/monitor/online.js +++ b/acupuncture-ui/src/api/monitor/online.js @@ -1,18 +1,18 @@ -import request from '@/utils/request' - -// 查询在线用户列表 -export function list(query) { - return request({ - url: '/monitor/online/list', - method: 'get', - params: query - }) -} - -// 强退用户 -export function forceLogout(tokenId) { - return request({ - url: '/monitor/online/' + tokenId, - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询在线用户列表 +export function list(query) { + return request({ + url: '/monitor/online/list', + method: 'get', + params: query + }) +} + +// 强退用户 +export function forceLogout(tokenId) { + return request({ + url: '/monitor/online/' + tokenId, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/monitor/operlog.js b/acupuncture-ui/src/api/monitor/operlog.js similarity index 94% rename from ruoyi-ui/src/api/monitor/operlog.js rename to acupuncture-ui/src/api/monitor/operlog.js index 6e881dfe..a04bca84 100644 --- a/ruoyi-ui/src/api/monitor/operlog.js +++ b/acupuncture-ui/src/api/monitor/operlog.js @@ -1,26 +1,26 @@ -import request from '@/utils/request' - -// 查询操作日志列表 -export function list(query) { - return request({ - url: '/monitor/operlog/list', - method: 'get', - params: query - }) -} - -// 删除操作日志 -export function delOperlog(operId) { - return request({ - url: '/monitor/operlog/' + operId, - method: 'delete' - }) -} - -// 清空操作日志 -export function cleanOperlog() { - return request({ - url: '/monitor/operlog/clean', - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询操作日志列表 +export function list(query) { + return request({ + url: '/monitor/operlog/list', + method: 'get', + params: query + }) +} + +// 删除操作日志 +export function delOperlog(operId) { + return request({ + url: '/monitor/operlog/' + operId, + method: 'delete' + }) +} + +// 清空操作日志 +export function cleanOperlog() { + return request({ + url: '/monitor/operlog/clean', + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/monitor/server.js b/acupuncture-ui/src/api/monitor/server.js similarity index 95% rename from ruoyi-ui/src/api/monitor/server.js rename to acupuncture-ui/src/api/monitor/server.js index cac77916..e1f9ca21 100644 --- a/ruoyi-ui/src/api/monitor/server.js +++ b/acupuncture-ui/src/api/monitor/server.js @@ -1,9 +1,9 @@ -import request from '@/utils/request' - -// 获取服务信息 -export function getServer() { - return request({ - url: '/monitor/server', - method: 'get' - }) +import request from '@/utils/request' + +// 获取服务信息 +export function getServer() { + return request({ + url: '/monitor/server', + method: 'get' + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/config.js b/acupuncture-ui/src/api/system/config.js similarity index 94% rename from ruoyi-ui/src/api/system/config.js rename to acupuncture-ui/src/api/system/config.js index 7858c692..a404d825 100644 --- a/ruoyi-ui/src/api/system/config.js +++ b/acupuncture-ui/src/api/system/config.js @@ -1,60 +1,60 @@ -import request from '@/utils/request' - -// 查询参数列表 -export function listConfig(query) { - return request({ - url: '/system/config/list', - method: 'get', - params: query - }) -} - -// 查询参数详细 -export function getConfig(configId) { - return request({ - url: '/system/config/' + configId, - method: 'get' - }) -} - -// 根据参数键名查询参数值 -export function getConfigKey(configKey) { - return request({ - url: '/system/config/configKey/' + configKey, - method: 'get' - }) -} - -// 新增参数配置 -export function addConfig(data) { - return request({ - url: '/system/config', - method: 'post', - data: data - }) -} - -// 修改参数配置 -export function updateConfig(data) { - return request({ - url: '/system/config', - method: 'put', - data: data - }) -} - -// 删除参数配置 -export function delConfig(configId) { - return request({ - url: '/system/config/' + configId, - method: 'delete' - }) -} - -// 刷新参数缓存 -export function refreshCache() { - return request({ - url: '/system/config/refreshCache', - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询参数列表 +export function listConfig(query) { + return request({ + url: '/system/config/list', + method: 'get', + params: query + }) +} + +// 查询参数详细 +export function getConfig(configId) { + return request({ + url: '/system/config/' + configId, + method: 'get' + }) +} + +// 根据参数键名查询参数值 +export function getConfigKey(configKey) { + return request({ + url: '/system/config/configKey/' + configKey, + method: 'get' + }) +} + +// 新增参数配置 +export function addConfig(data) { + return request({ + url: '/system/config', + method: 'post', + data: data + }) +} + +// 修改参数配置 +export function updateConfig(data) { + return request({ + url: '/system/config', + method: 'put', + data: data + }) +} + +// 删除参数配置 +export function delConfig(configId) { + return request({ + url: '/system/config/' + configId, + method: 'delete' + }) +} + +// 刷新参数缓存 +export function refreshCache() { + return request({ + url: '/system/config/refreshCache', + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/dept.js b/acupuncture-ui/src/api/system/dept.js similarity index 94% rename from ruoyi-ui/src/api/system/dept.js rename to acupuncture-ui/src/api/system/dept.js index 9ca69663..fc943cd4 100644 --- a/ruoyi-ui/src/api/system/dept.js +++ b/acupuncture-ui/src/api/system/dept.js @@ -1,52 +1,52 @@ -import request from '@/utils/request' - -// 查询部门列表 -export function listDept(query) { - return request({ - url: '/system/dept/list', - method: 'get', - params: query - }) -} - -// 查询部门列表(排除节点) -export function listDeptExcludeChild(deptId) { - return request({ - url: '/system/dept/list/exclude/' + deptId, - method: 'get' - }) -} - -// 查询部门详细 -export function getDept(deptId) { - return request({ - url: '/system/dept/' + deptId, - method: 'get' - }) -} - -// 新增部门 -export function addDept(data) { - return request({ - url: '/system/dept', - method: 'post', - data: data - }) -} - -// 修改部门 -export function updateDept(data) { - return request({ - url: '/system/dept', - method: 'put', - data: data - }) -} - -// 删除部门 -export function delDept(deptId) { - return request({ - url: '/system/dept/' + deptId, - method: 'delete' - }) +import request from '@/utils/request' + +// 查询部门列表 +export function listDept(query) { + return request({ + url: '/system/dept/list', + method: 'get', + params: query + }) +} + +// 查询部门列表(排除节点) +export function listDeptExcludeChild(deptId) { + return request({ + url: '/system/dept/list/exclude/' + deptId, + method: 'get' + }) +} + +// 查询部门详细 +export function getDept(deptId) { + return request({ + url: '/system/dept/' + deptId, + method: 'get' + }) +} + +// 新增部门 +export function addDept(data) { + return request({ + url: '/system/dept', + method: 'post', + data: data + }) +} + +// 修改部门 +export function updateDept(data) { + return request({ + url: '/system/dept', + method: 'put', + data: data + }) +} + +// 删除部门 +export function delDept(deptId) { + return request({ + url: '/system/dept/' + deptId, + method: 'delete' + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/dict/data.js b/acupuncture-ui/src/api/system/dict/data.js similarity index 94% rename from ruoyi-ui/src/api/system/dict/data.js rename to acupuncture-ui/src/api/system/dict/data.js index 2a6e4811..6c9eb79b 100644 --- a/ruoyi-ui/src/api/system/dict/data.js +++ b/acupuncture-ui/src/api/system/dict/data.js @@ -1,52 +1,52 @@ -import request from '@/utils/request' - -// 查询字典数据列表 -export function listData(query) { - return request({ - url: '/system/dict/data/list', - method: 'get', - params: query - }) -} - -// 查询字典数据详细 -export function getData(dictCode) { - return request({ - url: '/system/dict/data/' + dictCode, - method: 'get' - }) -} - -// 根据字典类型查询字典数据信息 -export function getDicts(dictType) { - return request({ - url: '/system/dict/data/type/' + dictType, - method: 'get' - }) -} - -// 新增字典数据 -export function addData(data) { - return request({ - url: '/system/dict/data', - method: 'post', - data: data - }) -} - -// 修改字典数据 -export function updateData(data) { - return request({ - url: '/system/dict/data', - method: 'put', - data: data - }) -} - -// 删除字典数据 -export function delData(dictCode) { - return request({ - url: '/system/dict/data/' + dictCode, - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询字典数据列表 +export function listData(query) { + return request({ + url: '/system/dict/data/list', + method: 'get', + params: query + }) +} + +// 查询字典数据详细 +export function getData(dictCode) { + return request({ + url: '/system/dict/data/' + dictCode, + method: 'get' + }) +} + +// 根据字典类型查询字典数据信息 +export function getDicts(dictType) { + return request({ + url: '/system/dict/data/type/' + dictType, + method: 'get' + }) +} + +// 新增字典数据 +export function addData(data) { + return request({ + url: '/system/dict/data', + method: 'post', + data: data + }) +} + +// 修改字典数据 +export function updateData(data) { + return request({ + url: '/system/dict/data', + method: 'put', + data: data + }) +} + +// 删除字典数据 +export function delData(dictCode) { + return request({ + url: '/system/dict/data/' + dictCode, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/dict/type.js b/acupuncture-ui/src/api/system/dict/type.js similarity index 94% rename from ruoyi-ui/src/api/system/dict/type.js rename to acupuncture-ui/src/api/system/dict/type.js index 526977d3..a7a6e01f 100644 --- a/ruoyi-ui/src/api/system/dict/type.js +++ b/acupuncture-ui/src/api/system/dict/type.js @@ -1,60 +1,60 @@ -import request from '@/utils/request' - -// 查询字典类型列表 -export function listType(query) { - return request({ - url: '/system/dict/type/list', - method: 'get', - params: query - }) -} - -// 查询字典类型详细 -export function getType(dictId) { - return request({ - url: '/system/dict/type/' + dictId, - method: 'get' - }) -} - -// 新增字典类型 -export function addType(data) { - return request({ - url: '/system/dict/type', - method: 'post', - data: data - }) -} - -// 修改字典类型 -export function updateType(data) { - return request({ - url: '/system/dict/type', - method: 'put', - data: data - }) -} - -// 删除字典类型 -export function delType(dictId) { - return request({ - url: '/system/dict/type/' + dictId, - method: 'delete' - }) -} - -// 刷新字典缓存 -export function refreshCache() { - return request({ - url: '/system/dict/type/refreshCache', - method: 'delete' - }) -} - -// 获取字典选择框列表 -export function optionselect() { - return request({ - url: '/system/dict/type/optionselect', - method: 'get' - }) +import request from '@/utils/request' + +// 查询字典类型列表 +export function listType(query) { + return request({ + url: '/system/dict/type/list', + method: 'get', + params: query + }) +} + +// 查询字典类型详细 +export function getType(dictId) { + return request({ + url: '/system/dict/type/' + dictId, + method: 'get' + }) +} + +// 新增字典类型 +export function addType(data) { + return request({ + url: '/system/dict/type', + method: 'post', + data: data + }) +} + +// 修改字典类型 +export function updateType(data) { + return request({ + url: '/system/dict/type', + method: 'put', + data: data + }) +} + +// 删除字典类型 +export function delType(dictId) { + return request({ + url: '/system/dict/type/' + dictId, + method: 'delete' + }) +} + +// 刷新字典缓存 +export function refreshCache() { + return request({ + url: '/system/dict/type/refreshCache', + method: 'delete' + }) +} + +// 获取字典选择框列表 +export function optionselect() { + return request({ + url: '/system/dict/type/optionselect', + method: 'get' + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/menu.js b/acupuncture-ui/src/api/system/menu.js similarity index 94% rename from ruoyi-ui/src/api/system/menu.js rename to acupuncture-ui/src/api/system/menu.js index 97258ee6..f6415c65 100644 --- a/ruoyi-ui/src/api/system/menu.js +++ b/acupuncture-ui/src/api/system/menu.js @@ -1,60 +1,60 @@ -import request from '@/utils/request' - -// 查询菜单列表 -export function listMenu(query) { - return request({ - url: '/system/menu/list', - method: 'get', - params: query - }) -} - -// 查询菜单详细 -export function getMenu(menuId) { - return request({ - url: '/system/menu/' + menuId, - method: 'get' - }) -} - -// 查询菜单下拉树结构 -export function treeselect() { - return request({ - url: '/system/menu/treeselect', - method: 'get' - }) -} - -// 根据角色ID查询菜单下拉树结构 -export function roleMenuTreeselect(roleId) { - return request({ - url: '/system/menu/roleMenuTreeselect/' + roleId, - method: 'get' - }) -} - -// 新增菜单 -export function addMenu(data) { - return request({ - url: '/system/menu', - method: 'post', - data: data - }) -} - -// 修改菜单 -export function updateMenu(data) { - return request({ - url: '/system/menu', - method: 'put', - data: data - }) -} - -// 删除菜单 -export function delMenu(menuId) { - return request({ - url: '/system/menu/' + menuId, - method: 'delete' - }) +import request from '@/utils/request' + +// 查询菜单列表 +export function listMenu(query) { + return request({ + url: '/system/menu/list', + method: 'get', + params: query + }) +} + +// 查询菜单详细 +export function getMenu(menuId) { + return request({ + url: '/system/menu/' + menuId, + method: 'get' + }) +} + +// 查询菜单下拉树结构 +export function treeselect() { + return request({ + url: '/system/menu/treeselect', + method: 'get' + }) +} + +// 根据角色ID查询菜单下拉树结构 +export function roleMenuTreeselect(roleId) { + return request({ + url: '/system/menu/roleMenuTreeselect/' + roleId, + method: 'get' + }) +} + +// 新增菜单 +export function addMenu(data) { + return request({ + url: '/system/menu', + method: 'post', + data: data + }) +} + +// 修改菜单 +export function updateMenu(data) { + return request({ + url: '/system/menu', + method: 'put', + data: data + }) +} + +// 删除菜单 +export function delMenu(menuId) { + return request({ + url: '/system/menu/' + menuId, + method: 'delete' + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/notice.js b/acupuncture-ui/src/api/system/notice.js similarity index 94% rename from ruoyi-ui/src/api/system/notice.js rename to acupuncture-ui/src/api/system/notice.js index 737fc169..c274ea5b 100644 --- a/ruoyi-ui/src/api/system/notice.js +++ b/acupuncture-ui/src/api/system/notice.js @@ -1,44 +1,44 @@ -import request from '@/utils/request' - -// 查询公告列表 -export function listNotice(query) { - return request({ - url: '/system/notice/list', - method: 'get', - params: query - }) -} - -// 查询公告详细 -export function getNotice(noticeId) { - return request({ - url: '/system/notice/' + noticeId, - method: 'get' - }) -} - -// 新增公告 -export function addNotice(data) { - return request({ - url: '/system/notice', - method: 'post', - data: data - }) -} - -// 修改公告 -export function updateNotice(data) { - return request({ - url: '/system/notice', - method: 'put', - data: data - }) -} - -// 删除公告 -export function delNotice(noticeId) { - return request({ - url: '/system/notice/' + noticeId, - method: 'delete' - }) +import request from '@/utils/request' + +// 查询公告列表 +export function listNotice(query) { + return request({ + url: '/system/notice/list', + method: 'get', + params: query + }) +} + +// 查询公告详细 +export function getNotice(noticeId) { + return request({ + url: '/system/notice/' + noticeId, + method: 'get' + }) +} + +// 新增公告 +export function addNotice(data) { + return request({ + url: '/system/notice', + method: 'post', + data: data + }) +} + +// 修改公告 +export function updateNotice(data) { + return request({ + url: '/system/notice', + method: 'put', + data: data + }) +} + +// 删除公告 +export function delNotice(noticeId) { + return request({ + url: '/system/notice/' + noticeId, + method: 'delete' + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/post.js b/acupuncture-ui/src/api/system/post.js similarity index 94% rename from ruoyi-ui/src/api/system/post.js rename to acupuncture-ui/src/api/system/post.js index 8faa2669..1a8e9ca0 100644 --- a/ruoyi-ui/src/api/system/post.js +++ b/acupuncture-ui/src/api/system/post.js @@ -1,44 +1,44 @@ -import request from '@/utils/request' - -// 查询岗位列表 -export function listPost(query) { - return request({ - url: '/system/post/list', - method: 'get', - params: query - }) -} - -// 查询岗位详细 -export function getPost(postId) { - return request({ - url: '/system/post/' + postId, - method: 'get' - }) -} - -// 新增岗位 -export function addPost(data) { - return request({ - url: '/system/post', - method: 'post', - data: data - }) -} - -// 修改岗位 -export function updatePost(data) { - return request({ - url: '/system/post', - method: 'put', - data: data - }) -} - -// 删除岗位 -export function delPost(postId) { - return request({ - url: '/system/post/' + postId, - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询岗位列表 +export function listPost(query) { + return request({ + url: '/system/post/list', + method: 'get', + params: query + }) +} + +// 查询岗位详细 +export function getPost(postId) { + return request({ + url: '/system/post/' + postId, + method: 'get' + }) +} + +// 新增岗位 +export function addPost(data) { + return request({ + url: '/system/post', + method: 'post', + data: data + }) +} + +// 修改岗位 +export function updatePost(data) { + return request({ + url: '/system/post', + method: 'put', + data: data + }) +} + +// 删除岗位 +export function delPost(postId) { + return request({ + url: '/system/post/' + postId, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/role.js b/acupuncture-ui/src/api/system/role.js similarity index 94% rename from ruoyi-ui/src/api/system/role.js rename to acupuncture-ui/src/api/system/role.js index 528cd186..f13e6f40 100644 --- a/ruoyi-ui/src/api/system/role.js +++ b/acupuncture-ui/src/api/system/role.js @@ -1,119 +1,119 @@ -import request from '@/utils/request' - -// 查询角色列表 -export function listRole(query) { - return request({ - url: '/system/role/list', - method: 'get', - params: query - }) -} - -// 查询角色详细 -export function getRole(roleId) { - return request({ - url: '/system/role/' + roleId, - method: 'get' - }) -} - -// 新增角色 -export function addRole(data) { - return request({ - url: '/system/role', - method: 'post', - data: data - }) -} - -// 修改角色 -export function updateRole(data) { - return request({ - url: '/system/role', - method: 'put', - data: data - }) -} - -// 角色数据权限 -export function dataScope(data) { - return request({ - url: '/system/role/dataScope', - method: 'put', - data: data - }) -} - -// 角色状态修改 -export function changeRoleStatus(roleId, status) { - const data = { - roleId, - status - } - return request({ - url: '/system/role/changeStatus', - method: 'put', - data: data - }) -} - -// 删除角色 -export function delRole(roleId) { - return request({ - url: '/system/role/' + roleId, - method: 'delete' - }) -} - -// 查询角色已授权用户列表 -export function allocatedUserList(query) { - return request({ - url: '/system/role/authUser/allocatedList', - method: 'get', - params: query - }) -} - -// 查询角色未授权用户列表 -export function unallocatedUserList(query) { - return request({ - url: '/system/role/authUser/unallocatedList', - method: 'get', - params: query - }) -} - -// 取消用户授权角色 -export function authUserCancel(data) { - return request({ - url: '/system/role/authUser/cancel', - method: 'put', - data: data - }) -} - -// 批量取消用户授权角色 -export function authUserCancelAll(data) { - return request({ - url: '/system/role/authUser/cancelAll', - method: 'put', - params: data - }) -} - -// 授权用户选择 -export function authUserSelectAll(data) { - return request({ - url: '/system/role/authUser/selectAll', - method: 'put', - params: data - }) -} - -// 根据角色ID查询部门树结构 -export function deptTreeSelect(roleId) { - return request({ - url: '/system/role/deptTree/' + roleId, - method: 'get' - }) -} +import request from '@/utils/request' + +// 查询角色列表 +export function listRole(query) { + return request({ + url: '/system/role/list', + method: 'get', + params: query + }) +} + +// 查询角色详细 +export function getRole(roleId) { + return request({ + url: '/system/role/' + roleId, + method: 'get' + }) +} + +// 新增角色 +export function addRole(data) { + return request({ + url: '/system/role', + method: 'post', + data: data + }) +} + +// 修改角色 +export function updateRole(data) { + return request({ + url: '/system/role', + method: 'put', + data: data + }) +} + +// 角色数据权限 +export function dataScope(data) { + return request({ + url: '/system/role/dataScope', + method: 'put', + data: data + }) +} + +// 角色状态修改 +export function changeRoleStatus(roleId, status) { + const data = { + roleId, + status + } + return request({ + url: '/system/role/changeStatus', + method: 'put', + data: data + }) +} + +// 删除角色 +export function delRole(roleId) { + return request({ + url: '/system/role/' + roleId, + method: 'delete' + }) +} + +// 查询角色已授权用户列表 +export function allocatedUserList(query) { + return request({ + url: '/system/role/authUser/allocatedList', + method: 'get', + params: query + }) +} + +// 查询角色未授权用户列表 +export function unallocatedUserList(query) { + return request({ + url: '/system/role/authUser/unallocatedList', + method: 'get', + params: query + }) +} + +// 取消用户授权角色 +export function authUserCancel(data) { + return request({ + url: '/system/role/authUser/cancel', + method: 'put', + data: data + }) +} + +// 批量取消用户授权角色 +export function authUserCancelAll(data) { + return request({ + url: '/system/role/authUser/cancelAll', + method: 'put', + params: data + }) +} + +// 授权用户选择 +export function authUserSelectAll(data) { + return request({ + url: '/system/role/authUser/selectAll', + method: 'put', + params: data + }) +} + +// 根据角色ID查询部门树结构 +export function deptTreeSelect(roleId) { + return request({ + url: '/system/role/deptTree/' + roleId, + method: 'get' + }) +} diff --git a/ruoyi-ui/src/api/system/user.js b/acupuncture-ui/src/api/system/user.js similarity index 100% rename from ruoyi-ui/src/api/system/user.js rename to acupuncture-ui/src/api/system/user.js diff --git a/ruoyi-ui/src/api/tool/gen.js b/acupuncture-ui/src/api/tool/gen.js similarity index 94% rename from ruoyi-ui/src/api/tool/gen.js rename to acupuncture-ui/src/api/tool/gen.js index 5728980c..20756772 100644 --- a/ruoyi-ui/src/api/tool/gen.js +++ b/acupuncture-ui/src/api/tool/gen.js @@ -1,85 +1,85 @@ -import request from '@/utils/request' - -// 查询生成表数据 -export function listTable(query) { - return request({ - url: '/tool/gen/list', - method: 'get', - params: query - }) -} -// 查询db数据库列表 -export function listDbTable(query) { - return request({ - url: '/tool/gen/db/list', - method: 'get', - params: query - }) -} - -// 查询表详细信息 -export function getGenTable(tableId) { - return request({ - url: '/tool/gen/' + tableId, - method: 'get' - }) -} - -// 修改代码生成信息 -export function updateGenTable(data) { - return request({ - url: '/tool/gen', - method: 'put', - data: data - }) -} - -// 导入表 -export function importTable(data) { - return request({ - url: '/tool/gen/importTable', - method: 'post', - params: data - }) -} - -// 创建表 -export function createTable(data) { - return request({ - url: '/tool/gen/createTable', - method: 'post', - params: data - }) -} - -// 预览生成代码 -export function previewTable(tableId) { - return request({ - url: '/tool/gen/preview/' + tableId, - method: 'get' - }) -} - -// 删除表数据 -export function delTable(tableId) { - return request({ - url: '/tool/gen/' + tableId, - method: 'delete' - }) -} - -// 生成代码(自定义路径) -export function genCode(tableName) { - return request({ - url: '/tool/gen/genCode/' + tableName, - method: 'get' - }) -} - -// 同步数据库 -export function synchDb(tableName) { - return request({ - url: '/tool/gen/synchDb/' + tableName, - method: 'get' - }) -} +import request from '@/utils/request' + +// 查询生成表数据 +export function listTable(query) { + return request({ + url: '/tool/gen/list', + method: 'get', + params: query + }) +} +// 查询db数据库列表 +export function listDbTable(query) { + return request({ + url: '/tool/gen/db/list', + method: 'get', + params: query + }) +} + +// 查询表详细信息 +export function getGenTable(tableId) { + return request({ + url: '/tool/gen/' + tableId, + method: 'get' + }) +} + +// 修改代码生成信息 +export function updateGenTable(data) { + return request({ + url: '/tool/gen', + method: 'put', + data: data + }) +} + +// 导入表 +export function importTable(data) { + return request({ + url: '/tool/gen/importTable', + method: 'post', + params: data + }) +} + +// 创建表 +export function createTable(data) { + return request({ + url: '/tool/gen/createTable', + method: 'post', + params: data + }) +} + +// 预览生成代码 +export function previewTable(tableId) { + return request({ + url: '/tool/gen/preview/' + tableId, + method: 'get' + }) +} + +// 删除表数据 +export function delTable(tableId) { + return request({ + url: '/tool/gen/' + tableId, + method: 'delete' + }) +} + +// 生成代码(自定义路径) +export function genCode(tableName) { + return request({ + url: '/tool/gen/genCode/' + tableName, + method: 'get' + }) +} + +// 同步数据库 +export function synchDb(tableName) { + return request({ + url: '/tool/gen/synchDb/' + tableName, + method: 'get' + }) +} diff --git a/ruoyi-ui/src/assets/401_images/401.gif b/acupuncture-ui/src/assets/401_images/401.gif similarity index 100% rename from ruoyi-ui/src/assets/401_images/401.gif rename to acupuncture-ui/src/assets/401_images/401.gif diff --git a/ruoyi-ui/src/assets/404_images/404.png b/acupuncture-ui/src/assets/404_images/404.png similarity index 100% rename from ruoyi-ui/src/assets/404_images/404.png rename to acupuncture-ui/src/assets/404_images/404.png diff --git a/ruoyi-ui/src/assets/404_images/404_cloud.png b/acupuncture-ui/src/assets/404_images/404_cloud.png similarity index 100% rename from ruoyi-ui/src/assets/404_images/404_cloud.png rename to acupuncture-ui/src/assets/404_images/404_cloud.png diff --git a/ruoyi-ui/src/assets/icons/index.js b/acupuncture-ui/src/assets/icons/index.js similarity index 96% rename from ruoyi-ui/src/assets/icons/index.js rename to acupuncture-ui/src/assets/icons/index.js index d79e1646..2c6b309c 100644 --- a/ruoyi-ui/src/assets/icons/index.js +++ b/acupuncture-ui/src/assets/icons/index.js @@ -1,9 +1,9 @@ -import Vue from 'vue' -import SvgIcon from '@/components/SvgIcon'// svg component - -// register globally -Vue.component('svg-icon', SvgIcon) - -const req = require.context('./svg', false, /\.svg$/) -const requireAll = requireContext => requireContext.keys().map(requireContext) -requireAll(req) +import Vue from 'vue' +import SvgIcon from '@/components/SvgIcon'// svg component + +// register globally +Vue.component('svg-icon', SvgIcon) + +const req = require.context('./svg', false, /\.svg$/) +const requireAll = requireContext => requireContext.keys().map(requireContext) +requireAll(req) diff --git a/ruoyi-ui/src/assets/icons/svg/404.svg b/acupuncture-ui/src/assets/icons/svg/404.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/404.svg rename to acupuncture-ui/src/assets/icons/svg/404.svg diff --git a/ruoyi-ui/src/assets/icons/svg/bug.svg b/acupuncture-ui/src/assets/icons/svg/bug.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/bug.svg rename to acupuncture-ui/src/assets/icons/svg/bug.svg diff --git a/ruoyi-ui/src/assets/icons/svg/build.svg b/acupuncture-ui/src/assets/icons/svg/build.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/build.svg rename to acupuncture-ui/src/assets/icons/svg/build.svg diff --git a/ruoyi-ui/src/assets/icons/svg/button.svg b/acupuncture-ui/src/assets/icons/svg/button.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/button.svg rename to acupuncture-ui/src/assets/icons/svg/button.svg diff --git a/ruoyi-ui/src/assets/icons/svg/cascader.svg b/acupuncture-ui/src/assets/icons/svg/cascader.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/cascader.svg rename to acupuncture-ui/src/assets/icons/svg/cascader.svg diff --git a/ruoyi-ui/src/assets/icons/svg/chart.svg b/acupuncture-ui/src/assets/icons/svg/chart.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/chart.svg rename to acupuncture-ui/src/assets/icons/svg/chart.svg diff --git a/ruoyi-ui/src/assets/icons/svg/checkbox.svg b/acupuncture-ui/src/assets/icons/svg/checkbox.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/checkbox.svg rename to acupuncture-ui/src/assets/icons/svg/checkbox.svg diff --git a/ruoyi-ui/src/assets/icons/svg/clipboard.svg b/acupuncture-ui/src/assets/icons/svg/clipboard.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/clipboard.svg rename to acupuncture-ui/src/assets/icons/svg/clipboard.svg diff --git a/ruoyi-ui/src/assets/icons/svg/code.svg b/acupuncture-ui/src/assets/icons/svg/code.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/code.svg rename to acupuncture-ui/src/assets/icons/svg/code.svg diff --git a/ruoyi-ui/src/assets/icons/svg/color.svg b/acupuncture-ui/src/assets/icons/svg/color.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/color.svg rename to acupuncture-ui/src/assets/icons/svg/color.svg diff --git a/ruoyi-ui/src/assets/icons/svg/component.svg b/acupuncture-ui/src/assets/icons/svg/component.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/component.svg rename to acupuncture-ui/src/assets/icons/svg/component.svg diff --git a/ruoyi-ui/src/assets/icons/svg/dashboard.svg b/acupuncture-ui/src/assets/icons/svg/dashboard.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/dashboard.svg rename to acupuncture-ui/src/assets/icons/svg/dashboard.svg diff --git a/ruoyi-ui/src/assets/icons/svg/date-range.svg b/acupuncture-ui/src/assets/icons/svg/date-range.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/date-range.svg rename to acupuncture-ui/src/assets/icons/svg/date-range.svg diff --git a/ruoyi-ui/src/assets/icons/svg/date.svg b/acupuncture-ui/src/assets/icons/svg/date.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/date.svg rename to acupuncture-ui/src/assets/icons/svg/date.svg diff --git a/ruoyi-ui/src/assets/icons/svg/dict.svg b/acupuncture-ui/src/assets/icons/svg/dict.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/dict.svg rename to acupuncture-ui/src/assets/icons/svg/dict.svg diff --git a/ruoyi-ui/src/assets/icons/svg/documentation.svg b/acupuncture-ui/src/assets/icons/svg/documentation.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/documentation.svg rename to acupuncture-ui/src/assets/icons/svg/documentation.svg diff --git a/ruoyi-ui/src/assets/icons/svg/download.svg b/acupuncture-ui/src/assets/icons/svg/download.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/download.svg rename to acupuncture-ui/src/assets/icons/svg/download.svg diff --git a/ruoyi-ui/src/assets/icons/svg/drag.svg b/acupuncture-ui/src/assets/icons/svg/drag.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/drag.svg rename to acupuncture-ui/src/assets/icons/svg/drag.svg diff --git a/ruoyi-ui/src/assets/icons/svg/druid.svg b/acupuncture-ui/src/assets/icons/svg/druid.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/druid.svg rename to acupuncture-ui/src/assets/icons/svg/druid.svg diff --git a/ruoyi-ui/src/assets/icons/svg/edit.svg b/acupuncture-ui/src/assets/icons/svg/edit.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/edit.svg rename to acupuncture-ui/src/assets/icons/svg/edit.svg diff --git a/ruoyi-ui/src/assets/icons/svg/education.svg b/acupuncture-ui/src/assets/icons/svg/education.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/education.svg rename to acupuncture-ui/src/assets/icons/svg/education.svg diff --git a/ruoyi-ui/src/assets/icons/svg/email.svg b/acupuncture-ui/src/assets/icons/svg/email.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/email.svg rename to acupuncture-ui/src/assets/icons/svg/email.svg diff --git a/ruoyi-ui/src/assets/icons/svg/example.svg b/acupuncture-ui/src/assets/icons/svg/example.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/example.svg rename to acupuncture-ui/src/assets/icons/svg/example.svg diff --git a/ruoyi-ui/src/assets/icons/svg/excel.svg b/acupuncture-ui/src/assets/icons/svg/excel.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/excel.svg rename to acupuncture-ui/src/assets/icons/svg/excel.svg diff --git a/ruoyi-ui/src/assets/icons/svg/exit-fullscreen.svg b/acupuncture-ui/src/assets/icons/svg/exit-fullscreen.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/exit-fullscreen.svg rename to acupuncture-ui/src/assets/icons/svg/exit-fullscreen.svg diff --git a/ruoyi-ui/src/assets/icons/svg/eye-open.svg b/acupuncture-ui/src/assets/icons/svg/eye-open.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/eye-open.svg rename to acupuncture-ui/src/assets/icons/svg/eye-open.svg diff --git a/ruoyi-ui/src/assets/icons/svg/eye.svg b/acupuncture-ui/src/assets/icons/svg/eye.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/eye.svg rename to acupuncture-ui/src/assets/icons/svg/eye.svg diff --git a/ruoyi-ui/src/assets/icons/svg/form.svg b/acupuncture-ui/src/assets/icons/svg/form.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/form.svg rename to acupuncture-ui/src/assets/icons/svg/form.svg diff --git a/ruoyi-ui/src/assets/icons/svg/fullscreen.svg b/acupuncture-ui/src/assets/icons/svg/fullscreen.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/fullscreen.svg rename to acupuncture-ui/src/assets/icons/svg/fullscreen.svg diff --git a/ruoyi-ui/src/assets/icons/svg/github.svg b/acupuncture-ui/src/assets/icons/svg/github.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/github.svg rename to acupuncture-ui/src/assets/icons/svg/github.svg diff --git a/ruoyi-ui/src/assets/icons/svg/guide.svg b/acupuncture-ui/src/assets/icons/svg/guide.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/guide.svg rename to acupuncture-ui/src/assets/icons/svg/guide.svg diff --git a/ruoyi-ui/src/assets/icons/svg/icon.svg b/acupuncture-ui/src/assets/icons/svg/icon.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/icon.svg rename to acupuncture-ui/src/assets/icons/svg/icon.svg diff --git a/ruoyi-ui/src/assets/icons/svg/input.svg b/acupuncture-ui/src/assets/icons/svg/input.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/input.svg rename to acupuncture-ui/src/assets/icons/svg/input.svg diff --git a/ruoyi-ui/src/assets/icons/svg/international.svg b/acupuncture-ui/src/assets/icons/svg/international.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/international.svg rename to acupuncture-ui/src/assets/icons/svg/international.svg diff --git a/ruoyi-ui/src/assets/icons/svg/job.svg b/acupuncture-ui/src/assets/icons/svg/job.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/job.svg rename to acupuncture-ui/src/assets/icons/svg/job.svg diff --git a/ruoyi-ui/src/assets/icons/svg/language.svg b/acupuncture-ui/src/assets/icons/svg/language.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/language.svg rename to acupuncture-ui/src/assets/icons/svg/language.svg diff --git a/ruoyi-ui/src/assets/icons/svg/link.svg b/acupuncture-ui/src/assets/icons/svg/link.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/link.svg rename to acupuncture-ui/src/assets/icons/svg/link.svg diff --git a/ruoyi-ui/src/assets/icons/svg/list.svg b/acupuncture-ui/src/assets/icons/svg/list.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/list.svg rename to acupuncture-ui/src/assets/icons/svg/list.svg diff --git a/ruoyi-ui/src/assets/icons/svg/lock.svg b/acupuncture-ui/src/assets/icons/svg/lock.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/lock.svg rename to acupuncture-ui/src/assets/icons/svg/lock.svg diff --git a/ruoyi-ui/src/assets/icons/svg/log.svg b/acupuncture-ui/src/assets/icons/svg/log.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/log.svg rename to acupuncture-ui/src/assets/icons/svg/log.svg diff --git a/ruoyi-ui/src/assets/icons/svg/logininfor.svg b/acupuncture-ui/src/assets/icons/svg/logininfor.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/logininfor.svg rename to acupuncture-ui/src/assets/icons/svg/logininfor.svg diff --git a/ruoyi-ui/src/assets/icons/svg/message.svg b/acupuncture-ui/src/assets/icons/svg/message.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/message.svg rename to acupuncture-ui/src/assets/icons/svg/message.svg diff --git a/ruoyi-ui/src/assets/icons/svg/money.svg b/acupuncture-ui/src/assets/icons/svg/money.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/money.svg rename to acupuncture-ui/src/assets/icons/svg/money.svg diff --git a/ruoyi-ui/src/assets/icons/svg/monitor.svg b/acupuncture-ui/src/assets/icons/svg/monitor.svg similarity index 99% rename from ruoyi-ui/src/assets/icons/svg/monitor.svg rename to acupuncture-ui/src/assets/icons/svg/monitor.svg index 70db62b4..bc308cb0 100644 --- a/ruoyi-ui/src/assets/icons/svg/monitor.svg +++ b/acupuncture-ui/src/assets/icons/svg/monitor.svg @@ -1,2 +1,2 @@ -
- - - -
- - - - - + + + + + diff --git a/ruoyi-ui/src/components/HeaderSearch/index.vue b/acupuncture-ui/src/components/HeaderSearch/index.vue similarity index 96% rename from ruoyi-ui/src/components/HeaderSearch/index.vue rename to acupuncture-ui/src/components/HeaderSearch/index.vue index 5dd4ca9e..339a6884 100644 --- a/ruoyi-ui/src/components/HeaderSearch/index.vue +++ b/acupuncture-ui/src/components/HeaderSearch/index.vue @@ -1,196 +1,196 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/IconSelect/index.vue b/acupuncture-ui/src/components/IconSelect/index.vue similarity index 100% rename from ruoyi-ui/src/components/IconSelect/index.vue rename to acupuncture-ui/src/components/IconSelect/index.vue diff --git a/ruoyi-ui/src/components/IconSelect/requireIcons.js b/acupuncture-ui/src/components/IconSelect/requireIcons.js similarity index 95% rename from ruoyi-ui/src/components/IconSelect/requireIcons.js rename to acupuncture-ui/src/components/IconSelect/requireIcons.js index 5d3005df..99e5c54c 100644 --- a/ruoyi-ui/src/components/IconSelect/requireIcons.js +++ b/acupuncture-ui/src/components/IconSelect/requireIcons.js @@ -1,11 +1,11 @@ - -const req = require.context('../../assets/icons/svg', false, /\.svg$/) -const requireAll = requireContext => requireContext.keys() - -const re = /\.\/(.*)\.svg/ - -const icons = requireAll(req).map(i => { - return i.match(re)[1] -}) - -export default icons + +const req = require.context('../../assets/icons/svg', false, /\.svg$/) +const requireAll = requireContext => requireContext.keys() + +const re = /\.\/(.*)\.svg/ + +const icons = requireAll(req).map(i => { + return i.match(re)[1] +}) + +export default icons diff --git a/ruoyi-ui/src/components/ImagePreview/index.vue b/acupuncture-ui/src/components/ImagePreview/index.vue similarity index 100% rename from ruoyi-ui/src/components/ImagePreview/index.vue rename to acupuncture-ui/src/components/ImagePreview/index.vue diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/acupuncture-ui/src/components/ImageUpload/index.vue similarity index 96% rename from ruoyi-ui/src/components/ImageUpload/index.vue rename to acupuncture-ui/src/components/ImageUpload/index.vue index cdd908ea..bf7e3814 100644 --- a/ruoyi-ui/src/components/ImageUpload/index.vue +++ b/acupuncture-ui/src/components/ImageUpload/index.vue @@ -1,231 +1,231 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/Pagination/index.vue b/acupuncture-ui/src/components/Pagination/index.vue similarity index 95% rename from ruoyi-ui/src/components/Pagination/index.vue rename to acupuncture-ui/src/components/Pagination/index.vue index 1617af00..56f5a6b9 100644 --- a/ruoyi-ui/src/components/Pagination/index.vue +++ b/acupuncture-ui/src/components/Pagination/index.vue @@ -1,114 +1,114 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/PanThumb/index.vue b/acupuncture-ui/src/components/PanThumb/index.vue similarity index 95% rename from ruoyi-ui/src/components/PanThumb/index.vue rename to acupuncture-ui/src/components/PanThumb/index.vue index 796b01b8..1bcf4170 100644 --- a/ruoyi-ui/src/components/PanThumb/index.vue +++ b/acupuncture-ui/src/components/PanThumb/index.vue @@ -1,142 +1,142 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/ParentView/index.vue b/acupuncture-ui/src/components/ParentView/index.vue similarity index 100% rename from ruoyi-ui/src/components/ParentView/index.vue rename to acupuncture-ui/src/components/ParentView/index.vue diff --git a/ruoyi-ui/src/components/RightPanel/index.vue b/acupuncture-ui/src/components/RightPanel/index.vue similarity index 95% rename from ruoyi-ui/src/components/RightPanel/index.vue rename to acupuncture-ui/src/components/RightPanel/index.vue index 25ce3f81..5abeecb0 100644 --- a/ruoyi-ui/src/components/RightPanel/index.vue +++ b/acupuncture-ui/src/components/RightPanel/index.vue @@ -1,106 +1,106 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/RightToolbar/index.vue b/acupuncture-ui/src/components/RightToolbar/index.vue similarity index 96% rename from ruoyi-ui/src/components/RightToolbar/index.vue rename to acupuncture-ui/src/components/RightToolbar/index.vue index d3d42523..67da2930 100644 --- a/ruoyi-ui/src/components/RightToolbar/index.vue +++ b/acupuncture-ui/src/components/RightToolbar/index.vue @@ -1,129 +1,129 @@ - - - + + + diff --git a/ruoyi-ui/src/components/RuoYi/Doc/index.vue b/acupuncture-ui/src/components/RuoYi/Doc/index.vue similarity index 100% rename from ruoyi-ui/src/components/RuoYi/Doc/index.vue rename to acupuncture-ui/src/components/RuoYi/Doc/index.vue diff --git a/ruoyi-ui/src/components/RuoYi/Git/index.vue b/acupuncture-ui/src/components/RuoYi/Git/index.vue similarity index 100% rename from ruoyi-ui/src/components/RuoYi/Git/index.vue rename to acupuncture-ui/src/components/RuoYi/Git/index.vue diff --git a/ruoyi-ui/src/components/Screenfull/index.vue b/acupuncture-ui/src/components/Screenfull/index.vue similarity index 94% rename from ruoyi-ui/src/components/Screenfull/index.vue rename to acupuncture-ui/src/components/Screenfull/index.vue index 85937c9c..d4e539c2 100644 --- a/ruoyi-ui/src/components/Screenfull/index.vue +++ b/acupuncture-ui/src/components/Screenfull/index.vue @@ -1,57 +1,57 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/SizeSelect/index.vue b/acupuncture-ui/src/components/SizeSelect/index.vue similarity index 95% rename from ruoyi-ui/src/components/SizeSelect/index.vue rename to acupuncture-ui/src/components/SizeSelect/index.vue index 00496f71..069b5de9 100644 --- a/ruoyi-ui/src/components/SizeSelect/index.vue +++ b/acupuncture-ui/src/components/SizeSelect/index.vue @@ -1,56 +1,56 @@ - - - + + + diff --git a/ruoyi-ui/src/components/SvgIcon/index.vue b/acupuncture-ui/src/components/SvgIcon/index.vue similarity index 95% rename from ruoyi-ui/src/components/SvgIcon/index.vue rename to acupuncture-ui/src/components/SvgIcon/index.vue index 340ace45..e4bf5ade 100644 --- a/ruoyi-ui/src/components/SvgIcon/index.vue +++ b/acupuncture-ui/src/components/SvgIcon/index.vue @@ -1,61 +1,61 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/ThemePicker/index.vue b/acupuncture-ui/src/components/ThemePicker/index.vue similarity index 100% rename from ruoyi-ui/src/components/ThemePicker/index.vue rename to acupuncture-ui/src/components/ThemePicker/index.vue diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/acupuncture-ui/src/components/TopNav/index.vue similarity index 100% rename from ruoyi-ui/src/components/TopNav/index.vue rename to acupuncture-ui/src/components/TopNav/index.vue diff --git a/ruoyi-ui/src/components/iFrame/index.vue b/acupuncture-ui/src/components/iFrame/index.vue similarity index 95% rename from ruoyi-ui/src/components/iFrame/index.vue rename to acupuncture-ui/src/components/iFrame/index.vue index 4b85f365..426857fb 100644 --- a/ruoyi-ui/src/components/iFrame/index.vue +++ b/acupuncture-ui/src/components/iFrame/index.vue @@ -1,36 +1,36 @@ - - - + + + diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/acupuncture-ui/src/layout/components/Navbar.vue similarity index 100% rename from ruoyi-ui/src/layout/components/Navbar.vue rename to acupuncture-ui/src/layout/components/Navbar.vue diff --git a/ruoyi-ui/src/layout/components/Settings/index.vue b/acupuncture-ui/src/layout/components/Settings/index.vue similarity index 96% rename from ruoyi-ui/src/layout/components/Settings/index.vue rename to acupuncture-ui/src/layout/components/Settings/index.vue index 1e6e321f..bb3c9ce9 100644 --- a/ruoyi-ui/src/layout/components/Settings/index.vue +++ b/acupuncture-ui/src/layout/components/Settings/index.vue @@ -1,260 +1,260 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js b/acupuncture-ui/src/layout/components/Sidebar/FixiOSBug.js similarity index 95% rename from ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js rename to acupuncture-ui/src/layout/components/Sidebar/FixiOSBug.js index 3d8cc21e..68237269 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js +++ b/acupuncture-ui/src/layout/components/Sidebar/FixiOSBug.js @@ -1,25 +1,25 @@ -export default { - computed: { - device() { - return this.$store.state.app.device - } - }, - mounted() { - // In order to fix the click on menu on the ios device will trigger the mouseleave bug - this.fixBugIniOS() - }, - methods: { - fixBugIniOS() { - const $subMenu = this.$refs.subMenu - if ($subMenu) { - const handleMouseleave = $subMenu.handleMouseleave - $subMenu.handleMouseleave = (e) => { - if (this.device === 'mobile') { - return - } - handleMouseleave(e) - } - } - } - } -} +export default { + computed: { + device() { + return this.$store.state.app.device + } + }, + mounted() { + // In order to fix the click on menu on the ios device will trigger the mouseleave bug + this.fixBugIniOS() + }, + methods: { + fixBugIniOS() { + const $subMenu = this.$refs.subMenu + if ($subMenu) { + const handleMouseleave = $subMenu.handleMouseleave + $subMenu.handleMouseleave = (e) => { + if (this.device === 'mobile') { + return + } + handleMouseleave(e) + } + } + } + } +} diff --git a/ruoyi-ui/src/layout/components/Sidebar/Item.vue b/acupuncture-ui/src/layout/components/Sidebar/Item.vue similarity index 94% rename from ruoyi-ui/src/layout/components/Sidebar/Item.vue rename to acupuncture-ui/src/layout/components/Sidebar/Item.vue index 37214aa0..be3285df 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Item.vue +++ b/acupuncture-ui/src/layout/components/Sidebar/Item.vue @@ -1,33 +1,33 @@ - + diff --git a/ruoyi-ui/src/layout/components/Sidebar/Link.vue b/acupuncture-ui/src/layout/components/Sidebar/Link.vue similarity index 93% rename from ruoyi-ui/src/layout/components/Sidebar/Link.vue rename to acupuncture-ui/src/layout/components/Sidebar/Link.vue index cc62468c..8b0bc93b 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Link.vue +++ b/acupuncture-ui/src/layout/components/Sidebar/Link.vue @@ -1,43 +1,43 @@ - - - + + + diff --git a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue b/acupuncture-ui/src/layout/components/Sidebar/Logo.vue similarity index 96% rename from ruoyi-ui/src/layout/components/Sidebar/Logo.vue rename to acupuncture-ui/src/layout/components/Sidebar/Logo.vue index 35cc5282..2774cc83 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue +++ b/acupuncture-ui/src/layout/components/Sidebar/Logo.vue @@ -1,93 +1,93 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue b/acupuncture-ui/src/layout/components/Sidebar/SidebarItem.vue similarity index 96% rename from ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue rename to acupuncture-ui/src/layout/components/Sidebar/SidebarItem.vue index 3a81d29a..fabc61e9 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue +++ b/acupuncture-ui/src/layout/components/Sidebar/SidebarItem.vue @@ -1,99 +1,99 @@ - - - + + + diff --git a/ruoyi-ui/src/layout/components/Sidebar/index.vue b/acupuncture-ui/src/layout/components/Sidebar/index.vue similarity index 97% rename from ruoyi-ui/src/layout/components/Sidebar/index.vue rename to acupuncture-ui/src/layout/components/Sidebar/index.vue index 24fb533b..51d0839f 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/index.vue +++ b/acupuncture-ui/src/layout/components/Sidebar/index.vue @@ -1,57 +1,57 @@ - - - + + + diff --git a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue b/acupuncture-ui/src/layout/components/TagsView/ScrollPane.vue similarity index 100% rename from ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue rename to acupuncture-ui/src/layout/components/TagsView/ScrollPane.vue diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/acupuncture-ui/src/layout/components/TagsView/index.vue similarity index 96% rename from ruoyi-ui/src/layout/components/TagsView/index.vue rename to acupuncture-ui/src/layout/components/TagsView/index.vue index 44eff7d4..39ded08c 100644 --- a/ruoyi-ui/src/layout/components/TagsView/index.vue +++ b/acupuncture-ui/src/layout/components/TagsView/index.vue @@ -1,328 +1,328 @@ - - - - - - - + + + + + + + diff --git a/ruoyi-ui/src/layout/components/index.js b/acupuncture-ui/src/layout/components/index.js similarity index 98% rename from ruoyi-ui/src/layout/components/index.js rename to acupuncture-ui/src/layout/components/index.js index 7f83004a..104bd3ac 100644 --- a/ruoyi-ui/src/layout/components/index.js +++ b/acupuncture-ui/src/layout/components/index.js @@ -1,5 +1,5 @@ -export { default as AppMain } from './AppMain' -export { default as Navbar } from './Navbar' -export { default as Settings } from './Settings' -export { default as Sidebar } from './Sidebar/index.vue' -export { default as TagsView } from './TagsView/index.vue' +export { default as AppMain } from './AppMain' +export { default as Navbar } from './Navbar' +export { default as Settings } from './Settings' +export { default as Sidebar } from './Sidebar/index.vue' +export { default as TagsView } from './TagsView/index.vue' diff --git a/ruoyi-ui/src/layout/index.vue b/acupuncture-ui/src/layout/index.vue similarity index 100% rename from ruoyi-ui/src/layout/index.vue rename to acupuncture-ui/src/layout/index.vue diff --git a/ruoyi-ui/src/layout/mixin/ResizeHandler.js b/acupuncture-ui/src/layout/mixin/ResizeHandler.js similarity index 96% rename from ruoyi-ui/src/layout/mixin/ResizeHandler.js rename to acupuncture-ui/src/layout/mixin/ResizeHandler.js index b3fc8b26..e8d0df8c 100644 --- a/ruoyi-ui/src/layout/mixin/ResizeHandler.js +++ b/acupuncture-ui/src/layout/mixin/ResizeHandler.js @@ -1,45 +1,45 @@ -import store from '@/store' - -const { body } = document -const WIDTH = 992 // refer to Bootstrap's responsive design - -export default { - watch: { - $route(route) { - if (this.device === 'mobile' && this.sidebar.opened) { - store.dispatch('app/closeSideBar', { withoutAnimation: false }) - } - } - }, - beforeMount() { - window.addEventListener('resize', this.$_resizeHandler) - }, - beforeDestroy() { - window.removeEventListener('resize', this.$_resizeHandler) - }, - mounted() { - const isMobile = this.$_isMobile() - if (isMobile) { - store.dispatch('app/toggleDevice', 'mobile') - store.dispatch('app/closeSideBar', { withoutAnimation: true }) - } - }, - methods: { - // use $_ for mixins properties - // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential - $_isMobile() { - const rect = body.getBoundingClientRect() - return rect.width - 1 < WIDTH - }, - $_resizeHandler() { - if (!document.hidden) { - const isMobile = this.$_isMobile() - store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') - - if (isMobile) { - store.dispatch('app/closeSideBar', { withoutAnimation: true }) - } - } - } - } -} +import store from '@/store' + +const { body } = document +const WIDTH = 992 // refer to Bootstrap's responsive design + +export default { + watch: { + $route(route) { + if (this.device === 'mobile' && this.sidebar.opened) { + store.dispatch('app/closeSideBar', { withoutAnimation: false }) + } + } + }, + beforeMount() { + window.addEventListener('resize', this.$_resizeHandler) + }, + beforeDestroy() { + window.removeEventListener('resize', this.$_resizeHandler) + }, + mounted() { + const isMobile = this.$_isMobile() + if (isMobile) { + store.dispatch('app/toggleDevice', 'mobile') + store.dispatch('app/closeSideBar', { withoutAnimation: true }) + } + }, + methods: { + // use $_ for mixins properties + // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential + $_isMobile() { + const rect = body.getBoundingClientRect() + return rect.width - 1 < WIDTH + }, + $_resizeHandler() { + if (!document.hidden) { + const isMobile = this.$_isMobile() + store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') + + if (isMobile) { + store.dispatch('app/closeSideBar', { withoutAnimation: true }) + } + } + } + } +} diff --git a/ruoyi-ui/src/main.js b/acupuncture-ui/src/main.js similarity index 100% rename from ruoyi-ui/src/main.js rename to acupuncture-ui/src/main.js diff --git a/ruoyi-ui/src/permission.js b/acupuncture-ui/src/permission.js similarity index 100% rename from ruoyi-ui/src/permission.js rename to acupuncture-ui/src/permission.js diff --git a/ruoyi-ui/src/plugins/auth.js b/acupuncture-ui/src/plugins/auth.js similarity index 96% rename from ruoyi-ui/src/plugins/auth.js rename to acupuncture-ui/src/plugins/auth.js index af740aae..6c6bc242 100644 --- a/ruoyi-ui/src/plugins/auth.js +++ b/acupuncture-ui/src/plugins/auth.js @@ -1,60 +1,60 @@ -import store from '@/store' - -function authPermission(permission) { - const all_permission = "*:*:*"; - const permissions = store.getters && store.getters.permissions - if (permission && permission.length > 0) { - return permissions.some(v => { - return all_permission === v || v === permission - }) - } else { - return false - } -} - -function authRole(role) { - const super_admin = "admin"; - const roles = store.getters && store.getters.roles - if (role && role.length > 0) { - return roles.some(v => { - return super_admin === v || v === role - }) - } else { - return false - } -} - -export default { - // 验证用户是否具备某权限 - hasPermi(permission) { - return authPermission(permission); - }, - // 验证用户是否含有指定权限,只需包含其中一个 - hasPermiOr(permissions) { - return permissions.some(item => { - return authPermission(item) - }) - }, - // 验证用户是否含有指定权限,必须全部拥有 - hasPermiAnd(permissions) { - return permissions.every(item => { - return authPermission(item) - }) - }, - // 验证用户是否具备某角色 - hasRole(role) { - return authRole(role); - }, - // 验证用户是否含有指定角色,只需包含其中一个 - hasRoleOr(roles) { - return roles.some(item => { - return authRole(item) - }) - }, - // 验证用户是否含有指定角色,必须全部拥有 - hasRoleAnd(roles) { - return roles.every(item => { - return authRole(item) - }) - } -} +import store from '@/store' + +function authPermission(permission) { + const all_permission = "*:*:*"; + const permissions = store.getters && store.getters.permissions + if (permission && permission.length > 0) { + return permissions.some(v => { + return all_permission === v || v === permission + }) + } else { + return false + } +} + +function authRole(role) { + const super_admin = "admin"; + const roles = store.getters && store.getters.roles + if (role && role.length > 0) { + return roles.some(v => { + return super_admin === v || v === role + }) + } else { + return false + } +} + +export default { + // 验证用户是否具备某权限 + hasPermi(permission) { + return authPermission(permission); + }, + // 验证用户是否含有指定权限,只需包含其中一个 + hasPermiOr(permissions) { + return permissions.some(item => { + return authPermission(item) + }) + }, + // 验证用户是否含有指定权限,必须全部拥有 + hasPermiAnd(permissions) { + return permissions.every(item => { + return authPermission(item) + }) + }, + // 验证用户是否具备某角色 + hasRole(role) { + return authRole(role); + }, + // 验证用户是否含有指定角色,只需包含其中一个 + hasRoleOr(roles) { + return roles.some(item => { + return authRole(item) + }) + }, + // 验证用户是否含有指定角色,必须全部拥有 + hasRoleAnd(roles) { + return roles.every(item => { + return authRole(item) + }) + } +} diff --git a/ruoyi-ui/src/plugins/cache.js b/acupuncture-ui/src/plugins/cache.js similarity index 94% rename from ruoyi-ui/src/plugins/cache.js rename to acupuncture-ui/src/plugins/cache.js index e912c9a2..b67d453f 100644 --- a/ruoyi-ui/src/plugins/cache.js +++ b/acupuncture-ui/src/plugins/cache.js @@ -1,79 +1,79 @@ -const sessionCache = { - set (key, value) { - if (!sessionStorage) { - return - } - if (key != null && value != null) { - sessionStorage.setItem(key, value) - } - }, - get (key) { - if (!sessionStorage) { - return null - } - if (key == null) { - return null - } - return sessionStorage.getItem(key) - }, - setJSON (key, jsonValue) { - if (jsonValue != null) { - this.set(key, JSON.stringify(jsonValue)) - } - }, - getJSON (key) { - const value = this.get(key) - if (value != null) { - return JSON.parse(value) - } - return null - }, - remove (key) { - sessionStorage.removeItem(key); - } -} -const localCache = { - set (key, value) { - if (!localStorage) { - return - } - if (key != null && value != null) { - localStorage.setItem(key, value) - } - }, - get (key) { - if (!localStorage) { - return null - } - if (key == null) { - return null - } - return localStorage.getItem(key) - }, - setJSON (key, jsonValue) { - if (jsonValue != null) { - this.set(key, JSON.stringify(jsonValue)) - } - }, - getJSON (key) { - const value = this.get(key) - if (value != null) { - return JSON.parse(value) - } - return null - }, - remove (key) { - localStorage.removeItem(key); - } -} - -export default { - /** - * 会话级缓存 - */ - session: sessionCache, - /** - * 本地缓存 - */ - local: localCache -} +const sessionCache = { + set (key, value) { + if (!sessionStorage) { + return + } + if (key != null && value != null) { + sessionStorage.setItem(key, value) + } + }, + get (key) { + if (!sessionStorage) { + return null + } + if (key == null) { + return null + } + return sessionStorage.getItem(key) + }, + setJSON (key, jsonValue) { + if (jsonValue != null) { + this.set(key, JSON.stringify(jsonValue)) + } + }, + getJSON (key) { + const value = this.get(key) + if (value != null) { + return JSON.parse(value) + } + return null + }, + remove (key) { + sessionStorage.removeItem(key); + } +} +const localCache = { + set (key, value) { + if (!localStorage) { + return + } + if (key != null && value != null) { + localStorage.setItem(key, value) + } + }, + get (key) { + if (!localStorage) { + return null + } + if (key == null) { + return null + } + return localStorage.getItem(key) + }, + setJSON (key, jsonValue) { + if (jsonValue != null) { + this.set(key, JSON.stringify(jsonValue)) + } + }, + getJSON (key) { + const value = this.get(key) + if (value != null) { + return JSON.parse(value) + } + return null + }, + remove (key) { + localStorage.removeItem(key); + } +} + +export default { + /** + * 会话级缓存 + */ + session: sessionCache, + /** + * 本地缓存 + */ + local: localCache +} diff --git a/ruoyi-ui/src/plugins/download.js b/acupuncture-ui/src/plugins/download.js similarity index 100% rename from ruoyi-ui/src/plugins/download.js rename to acupuncture-ui/src/plugins/download.js diff --git a/ruoyi-ui/src/plugins/index.js b/acupuncture-ui/src/plugins/index.js similarity index 95% rename from ruoyi-ui/src/plugins/index.js rename to acupuncture-ui/src/plugins/index.js index 9bc6eacd..d000f2df 100644 --- a/ruoyi-ui/src/plugins/index.js +++ b/acupuncture-ui/src/plugins/index.js @@ -1,20 +1,20 @@ -import tab from './tab' -import auth from './auth' -import cache from './cache' -import modal from './modal' -import download from './download' - -export default { - install(Vue) { - // 页签操作 - Vue.prototype.$tab = tab - // 认证对象 - Vue.prototype.$auth = auth - // 缓存对象 - Vue.prototype.$cache = cache - // 模态框对象 - Vue.prototype.$modal = modal - // 下载文件 - Vue.prototype.$download = download - } -} +import tab from './tab' +import auth from './auth' +import cache from './cache' +import modal from './modal' +import download from './download' + +export default { + install(Vue) { + // 页签操作 + Vue.prototype.$tab = tab + // 认证对象 + Vue.prototype.$auth = auth + // 缓存对象 + Vue.prototype.$cache = cache + // 模态框对象 + Vue.prototype.$modal = modal + // 下载文件 + Vue.prototype.$download = download + } +} diff --git a/ruoyi-ui/src/plugins/modal.js b/acupuncture-ui/src/plugins/modal.js similarity index 95% rename from ruoyi-ui/src/plugins/modal.js rename to acupuncture-ui/src/plugins/modal.js index 503a16f4..b37ca145 100644 --- a/ruoyi-ui/src/plugins/modal.js +++ b/acupuncture-ui/src/plugins/modal.js @@ -1,83 +1,83 @@ -import { Message, MessageBox, Notification, Loading } from 'element-ui' - -let loadingInstance; - -export default { - // 消息提示 - msg(content) { - Message.info(content) - }, - // 错误消息 - msgError(content) { - Message.error(content) - }, - // 成功消息 - msgSuccess(content) { - Message.success(content) - }, - // 警告消息 - msgWarning(content) { - Message.warning(content) - }, - // 弹出提示 - alert(content) { - MessageBox.alert(content, "系统提示") - }, - // 错误提示 - alertError(content) { - MessageBox.alert(content, "系统提示", { type: 'error' }) - }, - // 成功提示 - alertSuccess(content) { - MessageBox.alert(content, "系统提示", { type: 'success' }) - }, - // 警告提示 - alertWarning(content) { - MessageBox.alert(content, "系统提示", { type: 'warning' }) - }, - // 通知提示 - notify(content) { - Notification.info(content) - }, - // 错误通知 - notifyError(content) { - Notification.error(content); - }, - // 成功通知 - notifySuccess(content) { - Notification.success(content) - }, - // 警告通知 - notifyWarning(content) { - Notification.warning(content) - }, - // 确认窗体 - confirm(content) { - return MessageBox.confirm(content, "系统提示", { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: "warning", - }) - }, - // 提交内容 - prompt(content) { - return MessageBox.prompt(content, "系统提示", { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: "warning", - }) - }, - // 打开遮罩层 - loading(content) { - loadingInstance = Loading.service({ - lock: true, - text: content, - spinner: "el-icon-loading", - background: "rgba(0, 0, 0, 0.7)", - }) - }, - // 关闭遮罩层 - closeLoading() { - loadingInstance.close(); - } -} +import { Message, MessageBox, Notification, Loading } from 'element-ui' + +let loadingInstance; + +export default { + // 消息提示 + msg(content) { + Message.info(content) + }, + // 错误消息 + msgError(content) { + Message.error(content) + }, + // 成功消息 + msgSuccess(content) { + Message.success(content) + }, + // 警告消息 + msgWarning(content) { + Message.warning(content) + }, + // 弹出提示 + alert(content) { + MessageBox.alert(content, "系统提示") + }, + // 错误提示 + alertError(content) { + MessageBox.alert(content, "系统提示", { type: 'error' }) + }, + // 成功提示 + alertSuccess(content) { + MessageBox.alert(content, "系统提示", { type: 'success' }) + }, + // 警告提示 + alertWarning(content) { + MessageBox.alert(content, "系统提示", { type: 'warning' }) + }, + // 通知提示 + notify(content) { + Notification.info(content) + }, + // 错误通知 + notifyError(content) { + Notification.error(content); + }, + // 成功通知 + notifySuccess(content) { + Notification.success(content) + }, + // 警告通知 + notifyWarning(content) { + Notification.warning(content) + }, + // 确认窗体 + confirm(content) { + return MessageBox.confirm(content, "系统提示", { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: "warning", + }) + }, + // 提交内容 + prompt(content) { + return MessageBox.prompt(content, "系统提示", { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: "warning", + }) + }, + // 打开遮罩层 + loading(content) { + loadingInstance = Loading.service({ + lock: true, + text: content, + spinner: "el-icon-loading", + background: "rgba(0, 0, 0, 0.7)", + }) + }, + // 关闭遮罩层 + closeLoading() { + loadingInstance.close(); + } +} diff --git a/ruoyi-ui/src/plugins/tab.js b/acupuncture-ui/src/plugins/tab.js similarity index 96% rename from ruoyi-ui/src/plugins/tab.js rename to acupuncture-ui/src/plugins/tab.js index 8d7c6f1c..fcde4197 100644 --- a/ruoyi-ui/src/plugins/tab.js +++ b/acupuncture-ui/src/plugins/tab.js @@ -1,71 +1,71 @@ -import store from '@/store' -import router from '@/router'; - -export default { - // 刷新当前tab页签 - refreshPage(obj) { - const { path, query, matched } = router.currentRoute; - if (obj === undefined) { - matched.forEach((m) => { - if (m.components && m.components.default && m.components.default.name) { - if (!['Layout', 'ParentView'].includes(m.components.default.name)) { - obj = { name: m.components.default.name, path: path, query: query }; - } - } - }); - } - return store.dispatch('tagsView/delCachedView', obj).then(() => { - const { path, query } = obj - router.replace({ - path: '/redirect' + path, - query: query - }) - }) - }, - // 关闭当前tab页签,打开新页签 - closeOpenPage(obj) { - store.dispatch("tagsView/delView", router.currentRoute); - if (obj !== undefined) { - return router.push(obj); - } - }, - // 关闭指定tab页签 - closePage(obj) { - if (obj === undefined) { - return store.dispatch('tagsView/delView', router.currentRoute).then(({ visitedViews }) => { - const latestView = visitedViews.slice(-1)[0] - if (latestView) { - return router.push(latestView.fullPath) - } - return router.push('/'); - }); - } - return store.dispatch('tagsView/delView', obj); - }, - // 关闭所有tab页签 - closeAllPage() { - return store.dispatch('tagsView/delAllViews'); - }, - // 关闭左侧tab页签 - closeLeftPage(obj) { - return store.dispatch('tagsView/delLeftTags', obj || router.currentRoute); - }, - // 关闭右侧tab页签 - closeRightPage(obj) { - return store.dispatch('tagsView/delRightTags', obj || router.currentRoute); - }, - // 关闭其他tab页签 - closeOtherPage(obj) { - return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute); - }, - // 添加tab页签 - openPage(title, url, params) { - const obj = { path: url, meta: { title: title } } - store.dispatch('tagsView/addView', obj); - return router.push({ path: url, query: params }); - }, - // 修改tab页签 - updatePage(obj) { - return store.dispatch('tagsView/updateVisitedView', obj); - } -} +import store from '@/store' +import router from '@/router'; + +export default { + // 刷新当前tab页签 + refreshPage(obj) { + const { path, query, matched } = router.currentRoute; + if (obj === undefined) { + matched.forEach((m) => { + if (m.components && m.components.default && m.components.default.name) { + if (!['Layout', 'ParentView'].includes(m.components.default.name)) { + obj = { name: m.components.default.name, path: path, query: query }; + } + } + }); + } + return store.dispatch('tagsView/delCachedView', obj).then(() => { + const { path, query } = obj + router.replace({ + path: '/redirect' + path, + query: query + }) + }) + }, + // 关闭当前tab页签,打开新页签 + closeOpenPage(obj) { + store.dispatch("tagsView/delView", router.currentRoute); + if (obj !== undefined) { + return router.push(obj); + } + }, + // 关闭指定tab页签 + closePage(obj) { + if (obj === undefined) { + return store.dispatch('tagsView/delView', router.currentRoute).then(({ visitedViews }) => { + const latestView = visitedViews.slice(-1)[0] + if (latestView) { + return router.push(latestView.fullPath) + } + return router.push('/'); + }); + } + return store.dispatch('tagsView/delView', obj); + }, + // 关闭所有tab页签 + closeAllPage() { + return store.dispatch('tagsView/delAllViews'); + }, + // 关闭左侧tab页签 + closeLeftPage(obj) { + return store.dispatch('tagsView/delLeftTags', obj || router.currentRoute); + }, + // 关闭右侧tab页签 + closeRightPage(obj) { + return store.dispatch('tagsView/delRightTags', obj || router.currentRoute); + }, + // 关闭其他tab页签 + closeOtherPage(obj) { + return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute); + }, + // 添加tab页签 + openPage(title, url, params) { + const obj = { path: url, meta: { title: title } } + store.dispatch('tagsView/addView', obj); + return router.push({ path: url, query: params }); + }, + // 修改tab页签 + updatePage(obj) { + return store.dispatch('tagsView/updateVisitedView', obj); + } +} diff --git a/ruoyi-ui/src/router/index.js b/acupuncture-ui/src/router/index.js similarity index 100% rename from ruoyi-ui/src/router/index.js rename to acupuncture-ui/src/router/index.js diff --git a/ruoyi-ui/src/settings.js b/acupuncture-ui/src/settings.js similarity index 94% rename from ruoyi-ui/src/settings.js rename to acupuncture-ui/src/settings.js index 059c74d7..6a0b09f4 100644 --- a/ruoyi-ui/src/settings.js +++ b/acupuncture-ui/src/settings.js @@ -1,44 +1,44 @@ -module.exports = { - /** - * 侧边栏主题 深色主题theme-dark,浅色主题theme-light - */ - sideTheme: 'theme-dark', - - /** - * 是否系统布局配置 - */ - showSettings: false, - - /** - * 是否显示顶部导航 - */ - topNav: false, - - /** - * 是否显示 tagsView - */ - tagsView: true, - - /** - * 是否固定头部 - */ - fixedHeader: false, - - /** - * 是否显示logo - */ - sidebarLogo: true, - - /** - * 是否显示动态标题 - */ - dynamicTitle: false, - - /** - * @type {string | array} 'production' | ['production', 'development'] - * @description Need show err logs component. - * The default is only used in the production env - * If you want to also use it in dev, you can pass ['production', 'development'] - */ - errorLog: 'production' -} +module.exports = { + /** + * 侧边栏主题 深色主题theme-dark,浅色主题theme-light + */ + sideTheme: 'theme-dark', + + /** + * 是否系统布局配置 + */ + showSettings: false, + + /** + * 是否显示顶部导航 + */ + topNav: false, + + /** + * 是否显示 tagsView + */ + tagsView: true, + + /** + * 是否固定头部 + */ + fixedHeader: false, + + /** + * 是否显示logo + */ + sidebarLogo: true, + + /** + * 是否显示动态标题 + */ + dynamicTitle: false, + + /** + * @type {string | array} 'production' | ['production', 'development'] + * @description Need show err logs component. + * The default is only used in the production env + * If you want to also use it in dev, you can pass ['production', 'development'] + */ + errorLog: 'production' +} diff --git a/ruoyi-ui/src/store/getters.js b/acupuncture-ui/src/store/getters.js similarity index 97% rename from ruoyi-ui/src/store/getters.js rename to acupuncture-ui/src/store/getters.js index 5920c6e8..8adb1b65 100644 --- a/ruoyi-ui/src/store/getters.js +++ b/acupuncture-ui/src/store/getters.js @@ -1,19 +1,19 @@ -const getters = { - sidebar: state => state.app.sidebar, - size: state => state.app.size, - device: state => state.app.device, - dict: state => state.dict.dict, - visitedViews: state => state.tagsView.visitedViews, - cachedViews: state => state.tagsView.cachedViews, - token: state => state.user.token, - avatar: state => state.user.avatar, - name: state => state.user.name, - introduction: state => state.user.introduction, - roles: state => state.user.roles, - permissions: state => state.user.permissions, - permission_routes: state => state.permission.routes, - topbarRouters:state => state.permission.topbarRouters, - defaultRoutes:state => state.permission.defaultRoutes, - sidebarRouters:state => state.permission.sidebarRouters, -} -export default getters +const getters = { + sidebar: state => state.app.sidebar, + size: state => state.app.size, + device: state => state.app.device, + dict: state => state.dict.dict, + visitedViews: state => state.tagsView.visitedViews, + cachedViews: state => state.tagsView.cachedViews, + token: state => state.user.token, + avatar: state => state.user.avatar, + name: state => state.user.name, + introduction: state => state.user.introduction, + roles: state => state.user.roles, + permissions: state => state.user.permissions, + permission_routes: state => state.permission.routes, + topbarRouters:state => state.permission.topbarRouters, + defaultRoutes:state => state.permission.defaultRoutes, + sidebarRouters:state => state.permission.sidebarRouters, +} +export default getters diff --git a/ruoyi-ui/src/store/index.js b/acupuncture-ui/src/store/index.js similarity index 95% rename from ruoyi-ui/src/store/index.js rename to acupuncture-ui/src/store/index.js index 2ee6e43b..97aaef80 100644 --- a/ruoyi-ui/src/store/index.js +++ b/acupuncture-ui/src/store/index.js @@ -1,25 +1,25 @@ -import Vue from 'vue' -import Vuex from 'vuex' -import app from './modules/app' -import dict from './modules/dict' -import user from './modules/user' -import tagsView from './modules/tagsView' -import permission from './modules/permission' -import settings from './modules/settings' -import getters from './getters' - -Vue.use(Vuex) - -const store = new Vuex.Store({ - modules: { - app, - dict, - user, - tagsView, - permission, - settings - }, - getters -}) - -export default store +import Vue from 'vue' +import Vuex from 'vuex' +import app from './modules/app' +import dict from './modules/dict' +import user from './modules/user' +import tagsView from './modules/tagsView' +import permission from './modules/permission' +import settings from './modules/settings' +import getters from './getters' + +Vue.use(Vuex) + +const store = new Vuex.Store({ + modules: { + app, + dict, + user, + tagsView, + permission, + settings + }, + getters +}) + +export default store diff --git a/ruoyi-ui/src/store/modules/app.js b/acupuncture-ui/src/store/modules/app.js similarity index 95% rename from ruoyi-ui/src/store/modules/app.js rename to acupuncture-ui/src/store/modules/app.js index 5a0ed6c9..3e22d1c1 100644 --- a/ruoyi-ui/src/store/modules/app.js +++ b/acupuncture-ui/src/store/modules/app.js @@ -1,66 +1,66 @@ -import Cookies from 'js-cookie' - -const state = { - sidebar: { - opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, - withoutAnimation: false, - hide: false - }, - device: 'desktop', - size: Cookies.get('size') || 'medium' -} - -const mutations = { - TOGGLE_SIDEBAR: state => { - if (state.sidebar.hide) { - return false; - } - state.sidebar.opened = !state.sidebar.opened - state.sidebar.withoutAnimation = false - if (state.sidebar.opened) { - Cookies.set('sidebarStatus', 1) - } else { - Cookies.set('sidebarStatus', 0) - } - }, - CLOSE_SIDEBAR: (state, withoutAnimation) => { - Cookies.set('sidebarStatus', 0) - state.sidebar.opened = false - state.sidebar.withoutAnimation = withoutAnimation - }, - TOGGLE_DEVICE: (state, device) => { - state.device = device - }, - SET_SIZE: (state, size) => { - state.size = size - Cookies.set('size', size) - }, - SET_SIDEBAR_HIDE: (state, status) => { - state.sidebar.hide = status - } -} - -const actions = { - toggleSideBar({ commit }) { - commit('TOGGLE_SIDEBAR') - }, - closeSideBar({ commit }, { withoutAnimation }) { - commit('CLOSE_SIDEBAR', withoutAnimation) - }, - toggleDevice({ commit }, device) { - commit('TOGGLE_DEVICE', device) - }, - setSize({ commit }, size) { - commit('SET_SIZE', size) - }, - toggleSideBarHide({ commit }, status) { - commit('SET_SIDEBAR_HIDE', status) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} +import Cookies from 'js-cookie' + +const state = { + sidebar: { + opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, + withoutAnimation: false, + hide: false + }, + device: 'desktop', + size: Cookies.get('size') || 'medium' +} + +const mutations = { + TOGGLE_SIDEBAR: state => { + if (state.sidebar.hide) { + return false; + } + state.sidebar.opened = !state.sidebar.opened + state.sidebar.withoutAnimation = false + if (state.sidebar.opened) { + Cookies.set('sidebarStatus', 1) + } else { + Cookies.set('sidebarStatus', 0) + } + }, + CLOSE_SIDEBAR: (state, withoutAnimation) => { + Cookies.set('sidebarStatus', 0) + state.sidebar.opened = false + state.sidebar.withoutAnimation = withoutAnimation + }, + TOGGLE_DEVICE: (state, device) => { + state.device = device + }, + SET_SIZE: (state, size) => { + state.size = size + Cookies.set('size', size) + }, + SET_SIDEBAR_HIDE: (state, status) => { + state.sidebar.hide = status + } +} + +const actions = { + toggleSideBar({ commit }) { + commit('TOGGLE_SIDEBAR') + }, + closeSideBar({ commit }, { withoutAnimation }) { + commit('CLOSE_SIDEBAR', withoutAnimation) + }, + toggleDevice({ commit }, device) { + commit('TOGGLE_DEVICE', device) + }, + setSize({ commit }, size) { + commit('SET_SIZE', size) + }, + toggleSideBarHide({ commit }, status) { + commit('SET_SIDEBAR_HIDE', status) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/ruoyi-ui/src/store/modules/dict.js b/acupuncture-ui/src/store/modules/dict.js similarity index 94% rename from ruoyi-ui/src/store/modules/dict.js rename to acupuncture-ui/src/store/modules/dict.js index 8b044b60..7a1b2f02 100644 --- a/ruoyi-ui/src/store/modules/dict.js +++ b/acupuncture-ui/src/store/modules/dict.js @@ -1,50 +1,50 @@ -const state = { - dict: new Array() -} -const mutations = { - SET_DICT: (state, { key, value }) => { - if (key !== null && key !== "") { - state.dict.push({ - key: key, - value: value - }) - } - }, - REMOVE_DICT: (state, key) => { - try { - for (let i = 0; i < state.dict.length; i++) { - if (state.dict[i].key == key) { - state.dict.splice(i, 1) - return true - } - } - } catch (e) { - } - }, - CLEAN_DICT: (state) => { - state.dict = new Array() - } -} - -const actions = { - // 设置字典 - setDict({ commit }, data) { - commit('SET_DICT', data) - }, - // 删除字典 - removeDict({ commit }, key) { - commit('REMOVE_DICT', key) - }, - // 清空字典 - cleanDict({ commit }) { - commit('CLEAN_DICT') - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} - +const state = { + dict: new Array() +} +const mutations = { + SET_DICT: (state, { key, value }) => { + if (key !== null && key !== "") { + state.dict.push({ + key: key, + value: value + }) + } + }, + REMOVE_DICT: (state, key) => { + try { + for (let i = 0; i < state.dict.length; i++) { + if (state.dict[i].key == key) { + state.dict.splice(i, 1) + return true + } + } + } catch (e) { + } + }, + CLEAN_DICT: (state) => { + state.dict = new Array() + } +} + +const actions = { + // 设置字典 + setDict({ commit }, data) { + commit('SET_DICT', data) + }, + // 删除字典 + removeDict({ commit }, key) { + commit('REMOVE_DICT', key) + }, + // 清空字典 + cleanDict({ commit }) { + commit('CLEAN_DICT') + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} + diff --git a/ruoyi-ui/src/store/modules/permission.js b/acupuncture-ui/src/store/modules/permission.js similarity index 96% rename from ruoyi-ui/src/store/modules/permission.js rename to acupuncture-ui/src/store/modules/permission.js index 67760b08..b3c216a8 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/acupuncture-ui/src/store/modules/permission.js @@ -1,137 +1,137 @@ -import auth from '@/plugins/auth' -import router, { constantRoutes, dynamicRoutes } from '@/router' -import { getRouters } from '@/api/menu' -import Layout from '@/layout/index' -import ParentView from '@/components/ParentView' -import InnerLink from '@/layout/components/InnerLink' - -const permission = { - state: { - routes: [], - addRoutes: [], - defaultRoutes: [], - topbarRouters: [], - sidebarRouters: [] - }, - mutations: { - SET_ROUTES: (state, routes) => { - state.addRoutes = routes - state.routes = constantRoutes.concat(routes) - }, - SET_DEFAULT_ROUTES: (state, routes) => { - state.defaultRoutes = constantRoutes.concat(routes) - }, - SET_TOPBAR_ROUTES: (state, routes) => { - state.topbarRouters = routes - }, - SET_SIDEBAR_ROUTERS: (state, routes) => { - state.sidebarRouters = routes - }, - }, - actions: { - // 生成路由 - GenerateRoutes({ commit }) { - return new Promise(resolve => { - // 向后端请求路由数据 - getRouters().then(res => { - const sdata = JSON.parse(JSON.stringify(res.data)) - const rdata = JSON.parse(JSON.stringify(res.data)) - const sidebarRoutes = filterAsyncRouter(sdata) - const rewriteRoutes = filterAsyncRouter(rdata, false, true) - const asyncRoutes = filterDynamicRoutes(dynamicRoutes); - rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) - router.addRoutes(asyncRoutes); - commit('SET_ROUTES', rewriteRoutes) - commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes)) - commit('SET_DEFAULT_ROUTES', sidebarRoutes) - commit('SET_TOPBAR_ROUTES', sidebarRoutes) - resolve(rewriteRoutes) - }) - }) - } - } -} - -// 遍历后台传来的路由字符串,转换为组件对象 -function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { - return asyncRouterMap.filter(route => { - if (type && route.children) { - route.children = filterChildren(route.children) - } - if (route.component) { - // Layout ParentView 组件特殊处理 - if (route.component === 'Layout') { - route.component = Layout - } else if (route.component === 'ParentView') { - route.component = ParentView - } else if (route.component === 'InnerLink') { - route.component = InnerLink - } else { - route.component = loadView(route.component) - } - } - if (route.children != null && route.children && route.children.length) { - route.children = filterAsyncRouter(route.children, route, type) - } else { - delete route['children'] - delete route['redirect'] - } - return true - }) -} - -function filterChildren(childrenMap, lastRouter = false) { - var children = [] - childrenMap.forEach((el, index) => { - if (el.children && el.children.length) { - if (el.component === 'ParentView' && !lastRouter) { - el.children.forEach(c => { - c.path = el.path + '/' + c.path - if (c.children && c.children.length) { - children = children.concat(filterChildren(c.children, c)) - return - } - children.push(c) - }) - return - } - } - if (lastRouter) { - el.path = lastRouter.path + '/' + el.path - if (el.children && el.children.length) { - children = children.concat(filterChildren(el.children, el)) - return - } - } - children = children.concat(el) - }) - return children -} - -// 动态路由遍历,验证是否具备权限 -export function filterDynamicRoutes(routes) { - const res = [] - routes.forEach(route => { - if (route.permissions) { - if (auth.hasPermiOr(route.permissions)) { - res.push(route) - } - } else if (route.roles) { - if (auth.hasRoleOr(route.roles)) { - res.push(route) - } - } - }) - return res -} - -export const loadView = (view) => { - if (process.env.NODE_ENV === 'development') { - return (resolve) => require([`@/views/${view}`], resolve) - } else { - // 使用 import 实现生产环境的路由懒加载 - return () => import(`@/views/${view}`) - } -} - -export default permission +import auth from '@/plugins/auth' +import router, { constantRoutes, dynamicRoutes } from '@/router' +import { getRouters } from '@/api/menu' +import Layout from '@/layout/index' +import ParentView from '@/components/ParentView' +import InnerLink from '@/layout/components/InnerLink' + +const permission = { + state: { + routes: [], + addRoutes: [], + defaultRoutes: [], + topbarRouters: [], + sidebarRouters: [] + }, + mutations: { + SET_ROUTES: (state, routes) => { + state.addRoutes = routes + state.routes = constantRoutes.concat(routes) + }, + SET_DEFAULT_ROUTES: (state, routes) => { + state.defaultRoutes = constantRoutes.concat(routes) + }, + SET_TOPBAR_ROUTES: (state, routes) => { + state.topbarRouters = routes + }, + SET_SIDEBAR_ROUTERS: (state, routes) => { + state.sidebarRouters = routes + }, + }, + actions: { + // 生成路由 + GenerateRoutes({ commit }) { + return new Promise(resolve => { + // 向后端请求路由数据 + getRouters().then(res => { + const sdata = JSON.parse(JSON.stringify(res.data)) + const rdata = JSON.parse(JSON.stringify(res.data)) + const sidebarRoutes = filterAsyncRouter(sdata) + const rewriteRoutes = filterAsyncRouter(rdata, false, true) + const asyncRoutes = filterDynamicRoutes(dynamicRoutes); + rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) + router.addRoutes(asyncRoutes); + commit('SET_ROUTES', rewriteRoutes) + commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes)) + commit('SET_DEFAULT_ROUTES', sidebarRoutes) + commit('SET_TOPBAR_ROUTES', sidebarRoutes) + resolve(rewriteRoutes) + }) + }) + } + } +} + +// 遍历后台传来的路由字符串,转换为组件对象 +function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { + return asyncRouterMap.filter(route => { + if (type && route.children) { + route.children = filterChildren(route.children) + } + if (route.component) { + // Layout ParentView 组件特殊处理 + if (route.component === 'Layout') { + route.component = Layout + } else if (route.component === 'ParentView') { + route.component = ParentView + } else if (route.component === 'InnerLink') { + route.component = InnerLink + } else { + route.component = loadView(route.component) + } + } + if (route.children != null && route.children && route.children.length) { + route.children = filterAsyncRouter(route.children, route, type) + } else { + delete route['children'] + delete route['redirect'] + } + return true + }) +} + +function filterChildren(childrenMap, lastRouter = false) { + var children = [] + childrenMap.forEach((el, index) => { + if (el.children && el.children.length) { + if (el.component === 'ParentView' && !lastRouter) { + el.children.forEach(c => { + c.path = el.path + '/' + c.path + if (c.children && c.children.length) { + children = children.concat(filterChildren(c.children, c)) + return + } + children.push(c) + }) + return + } + } + if (lastRouter) { + el.path = lastRouter.path + '/' + el.path + if (el.children && el.children.length) { + children = children.concat(filterChildren(el.children, el)) + return + } + } + children = children.concat(el) + }) + return children +} + +// 动态路由遍历,验证是否具备权限 +export function filterDynamicRoutes(routes) { + const res = [] + routes.forEach(route => { + if (route.permissions) { + if (auth.hasPermiOr(route.permissions)) { + res.push(route) + } + } else if (route.roles) { + if (auth.hasRoleOr(route.roles)) { + res.push(route) + } + } + }) + return res +} + +export const loadView = (view) => { + if (process.env.NODE_ENV === 'development') { + return (resolve) => require([`@/views/${view}`], resolve) + } else { + // 使用 import 实现生产环境的路由懒加载 + return () => import(`@/views/${view}`) + } +} + +export default permission diff --git a/ruoyi-ui/src/store/modules/settings.js b/acupuncture-ui/src/store/modules/settings.js similarity index 96% rename from ruoyi-ui/src/store/modules/settings.js rename to acupuncture-ui/src/store/modules/settings.js index d08d8c2c..2455a1e2 100644 --- a/ruoyi-ui/src/store/modules/settings.js +++ b/acupuncture-ui/src/store/modules/settings.js @@ -1,42 +1,42 @@ -import defaultSettings from '@/settings' - -const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings - -const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || '' -const state = { - title: '', - theme: storageSetting.theme || '#409EFF', - sideTheme: storageSetting.sideTheme || sideTheme, - showSettings: showSettings, - topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav, - tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView, - fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader, - sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo, - dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle -} -const mutations = { - CHANGE_SETTING: (state, { key, value }) => { - if (state.hasOwnProperty(key)) { - state[key] = value - } - } -} - -const actions = { - // 修改布局设置 - changeSetting({ commit }, data) { - commit('CHANGE_SETTING', data) - }, - // 设置网页标题 - setTitle({ commit }, title) { - state.title = title - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} - +import defaultSettings from '@/settings' + +const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings + +const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || '' +const state = { + title: '', + theme: storageSetting.theme || '#409EFF', + sideTheme: storageSetting.sideTheme || sideTheme, + showSettings: showSettings, + topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav, + tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView, + fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader, + sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo, + dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle +} +const mutations = { + CHANGE_SETTING: (state, { key, value }) => { + if (state.hasOwnProperty(key)) { + state[key] = value + } + } +} + +const actions = { + // 修改布局设置 + changeSetting({ commit }, data) { + commit('CHANGE_SETTING', data) + }, + // 设置网页标题 + setTitle({ commit }, title) { + state.title = title + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} + diff --git a/ruoyi-ui/src/store/modules/tagsView.js b/acupuncture-ui/src/store/modules/tagsView.js similarity index 96% rename from ruoyi-ui/src/store/modules/tagsView.js rename to acupuncture-ui/src/store/modules/tagsView.js index 9a88c2bc..5fc011ca 100644 --- a/ruoyi-ui/src/store/modules/tagsView.js +++ b/acupuncture-ui/src/store/modules/tagsView.js @@ -1,228 +1,228 @@ -const state = { - visitedViews: [], - cachedViews: [], - iframeViews: [] -} - -const mutations = { - ADD_IFRAME_VIEW: (state, view) => { - if (state.iframeViews.some(v => v.path === view.path)) return - state.iframeViews.push( - Object.assign({}, view, { - title: view.meta.title || 'no-name' - }) - ) - }, - ADD_VISITED_VIEW: (state, view) => { - if (state.visitedViews.some(v => v.path === view.path)) return - state.visitedViews.push( - Object.assign({}, view, { - title: view.meta.title || 'no-name' - }) - ) - }, - ADD_CACHED_VIEW: (state, view) => { - if (state.cachedViews.includes(view.name)) return - if (view.meta && !view.meta.noCache) { - state.cachedViews.push(view.name) - } - }, - DEL_VISITED_VIEW: (state, view) => { - for (const [i, v] of state.visitedViews.entries()) { - if (v.path === view.path) { - state.visitedViews.splice(i, 1) - break - } - } - state.iframeViews = state.iframeViews.filter(item => item.path !== view.path) - }, - DEL_IFRAME_VIEW: (state, view) => { - state.iframeViews = state.iframeViews.filter(item => item.path !== view.path) - }, - DEL_CACHED_VIEW: (state, view) => { - const index = state.cachedViews.indexOf(view.name) - index > -1 && state.cachedViews.splice(index, 1) - }, - - DEL_OTHERS_VISITED_VIEWS: (state, view) => { - state.visitedViews = state.visitedViews.filter(v => { - return v.meta.affix || v.path === view.path - }) - state.iframeViews = state.iframeViews.filter(item => item.path === view.path) - }, - DEL_OTHERS_CACHED_VIEWS: (state, view) => { - const index = state.cachedViews.indexOf(view.name) - if (index > -1) { - state.cachedViews = state.cachedViews.slice(index, index + 1) - } else { - state.cachedViews = [] - } - }, - DEL_ALL_VISITED_VIEWS: state => { - // keep affix tags - const affixTags = state.visitedViews.filter(tag => tag.meta.affix) - state.visitedViews = affixTags - state.iframeViews = [] - }, - DEL_ALL_CACHED_VIEWS: state => { - state.cachedViews = [] - }, - UPDATE_VISITED_VIEW: (state, view) => { - for (let v of state.visitedViews) { - if (v.path === view.path) { - v = Object.assign(v, view) - break - } - } - }, - DEL_RIGHT_VIEWS: (state, view) => { - const index = state.visitedViews.findIndex(v => v.path === view.path) - if (index === -1) { - return - } - state.visitedViews = state.visitedViews.filter((item, idx) => { - if (idx <= index || (item.meta && item.meta.affix)) { - return true - } - const i = state.cachedViews.indexOf(item.name) - if (i > -1) { - state.cachedViews.splice(i, 1) - } - if(item.meta.link) { - const fi = state.iframeViews.findIndex(v => v.path === item.path) - state.iframeViews.splice(fi, 1) - } - return false - }) - }, - DEL_LEFT_VIEWS: (state, view) => { - const index = state.visitedViews.findIndex(v => v.path === view.path) - if (index === -1) { - return - } - state.visitedViews = state.visitedViews.filter((item, idx) => { - if (idx >= index || (item.meta && item.meta.affix)) { - return true - } - const i = state.cachedViews.indexOf(item.name) - if (i > -1) { - state.cachedViews.splice(i, 1) - } - if(item.meta.link) { - const fi = state.iframeViews.findIndex(v => v.path === item.path) - state.iframeViews.splice(fi, 1) - } - return false - }) - } -} - -const actions = { - addView({ dispatch }, view) { - dispatch('addVisitedView', view) - dispatch('addCachedView', view) - }, - addIframeView({ commit }, view) { - commit('ADD_IFRAME_VIEW', view) - }, - addVisitedView({ commit }, view) { - commit('ADD_VISITED_VIEW', view) - }, - addCachedView({ commit }, view) { - commit('ADD_CACHED_VIEW', view) - }, - delView({ dispatch, state }, view) { - return new Promise(resolve => { - dispatch('delVisitedView', view) - dispatch('delCachedView', view) - resolve({ - visitedViews: [...state.visitedViews], - cachedViews: [...state.cachedViews] - }) - }) - }, - delVisitedView({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_VISITED_VIEW', view) - resolve([...state.visitedViews]) - }) - }, - delIframeView({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_IFRAME_VIEW', view) - resolve([...state.iframeViews]) - }) - }, - delCachedView({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_CACHED_VIEW', view) - resolve([...state.cachedViews]) - }) - }, - delOthersViews({ dispatch, state }, view) { - return new Promise(resolve => { - dispatch('delOthersVisitedViews', view) - dispatch('delOthersCachedViews', view) - resolve({ - visitedViews: [...state.visitedViews], - cachedViews: [...state.cachedViews] - }) - }) - }, - delOthersVisitedViews({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_OTHERS_VISITED_VIEWS', view) - resolve([...state.visitedViews]) - }) - }, - delOthersCachedViews({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_OTHERS_CACHED_VIEWS', view) - resolve([...state.cachedViews]) - }) - }, - delAllViews({ dispatch, state }, view) { - return new Promise(resolve => { - dispatch('delAllVisitedViews', view) - dispatch('delAllCachedViews', view) - resolve({ - visitedViews: [...state.visitedViews], - cachedViews: [...state.cachedViews] - }) - }) - }, - delAllVisitedViews({ commit, state }) { - return new Promise(resolve => { - commit('DEL_ALL_VISITED_VIEWS') - resolve([...state.visitedViews]) - }) - }, - delAllCachedViews({ commit, state }) { - return new Promise(resolve => { - commit('DEL_ALL_CACHED_VIEWS') - resolve([...state.cachedViews]) - }) - }, - updateVisitedView({ commit }, view) { - commit('UPDATE_VISITED_VIEW', view) - }, - delRightTags({ commit }, view) { - return new Promise(resolve => { - commit('DEL_RIGHT_VIEWS', view) - resolve([...state.visitedViews]) - }) - }, - delLeftTags({ commit }, view) { - return new Promise(resolve => { - commit('DEL_LEFT_VIEWS', view) - resolve([...state.visitedViews]) - }) - }, -} - -export default { - namespaced: true, - state, - mutations, - actions -} +const state = { + visitedViews: [], + cachedViews: [], + iframeViews: [] +} + +const mutations = { + ADD_IFRAME_VIEW: (state, view) => { + if (state.iframeViews.some(v => v.path === view.path)) return + state.iframeViews.push( + Object.assign({}, view, { + title: view.meta.title || 'no-name' + }) + ) + }, + ADD_VISITED_VIEW: (state, view) => { + if (state.visitedViews.some(v => v.path === view.path)) return + state.visitedViews.push( + Object.assign({}, view, { + title: view.meta.title || 'no-name' + }) + ) + }, + ADD_CACHED_VIEW: (state, view) => { + if (state.cachedViews.includes(view.name)) return + if (view.meta && !view.meta.noCache) { + state.cachedViews.push(view.name) + } + }, + DEL_VISITED_VIEW: (state, view) => { + for (const [i, v] of state.visitedViews.entries()) { + if (v.path === view.path) { + state.visitedViews.splice(i, 1) + break + } + } + state.iframeViews = state.iframeViews.filter(item => item.path !== view.path) + }, + DEL_IFRAME_VIEW: (state, view) => { + state.iframeViews = state.iframeViews.filter(item => item.path !== view.path) + }, + DEL_CACHED_VIEW: (state, view) => { + const index = state.cachedViews.indexOf(view.name) + index > -1 && state.cachedViews.splice(index, 1) + }, + + DEL_OTHERS_VISITED_VIEWS: (state, view) => { + state.visitedViews = state.visitedViews.filter(v => { + return v.meta.affix || v.path === view.path + }) + state.iframeViews = state.iframeViews.filter(item => item.path === view.path) + }, + DEL_OTHERS_CACHED_VIEWS: (state, view) => { + const index = state.cachedViews.indexOf(view.name) + if (index > -1) { + state.cachedViews = state.cachedViews.slice(index, index + 1) + } else { + state.cachedViews = [] + } + }, + DEL_ALL_VISITED_VIEWS: state => { + // keep affix tags + const affixTags = state.visitedViews.filter(tag => tag.meta.affix) + state.visitedViews = affixTags + state.iframeViews = [] + }, + DEL_ALL_CACHED_VIEWS: state => { + state.cachedViews = [] + }, + UPDATE_VISITED_VIEW: (state, view) => { + for (let v of state.visitedViews) { + if (v.path === view.path) { + v = Object.assign(v, view) + break + } + } + }, + DEL_RIGHT_VIEWS: (state, view) => { + const index = state.visitedViews.findIndex(v => v.path === view.path) + if (index === -1) { + return + } + state.visitedViews = state.visitedViews.filter((item, idx) => { + if (idx <= index || (item.meta && item.meta.affix)) { + return true + } + const i = state.cachedViews.indexOf(item.name) + if (i > -1) { + state.cachedViews.splice(i, 1) + } + if(item.meta.link) { + const fi = state.iframeViews.findIndex(v => v.path === item.path) + state.iframeViews.splice(fi, 1) + } + return false + }) + }, + DEL_LEFT_VIEWS: (state, view) => { + const index = state.visitedViews.findIndex(v => v.path === view.path) + if (index === -1) { + return + } + state.visitedViews = state.visitedViews.filter((item, idx) => { + if (idx >= index || (item.meta && item.meta.affix)) { + return true + } + const i = state.cachedViews.indexOf(item.name) + if (i > -1) { + state.cachedViews.splice(i, 1) + } + if(item.meta.link) { + const fi = state.iframeViews.findIndex(v => v.path === item.path) + state.iframeViews.splice(fi, 1) + } + return false + }) + } +} + +const actions = { + addView({ dispatch }, view) { + dispatch('addVisitedView', view) + dispatch('addCachedView', view) + }, + addIframeView({ commit }, view) { + commit('ADD_IFRAME_VIEW', view) + }, + addVisitedView({ commit }, view) { + commit('ADD_VISITED_VIEW', view) + }, + addCachedView({ commit }, view) { + commit('ADD_CACHED_VIEW', view) + }, + delView({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delVisitedView', view) + dispatch('delCachedView', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delVisitedView({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_VISITED_VIEW', view) + resolve([...state.visitedViews]) + }) + }, + delIframeView({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_IFRAME_VIEW', view) + resolve([...state.iframeViews]) + }) + }, + delCachedView({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_CACHED_VIEW', view) + resolve([...state.cachedViews]) + }) + }, + delOthersViews({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delOthersVisitedViews', view) + dispatch('delOthersCachedViews', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delOthersVisitedViews({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_OTHERS_VISITED_VIEWS', view) + resolve([...state.visitedViews]) + }) + }, + delOthersCachedViews({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_OTHERS_CACHED_VIEWS', view) + resolve([...state.cachedViews]) + }) + }, + delAllViews({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delAllVisitedViews', view) + dispatch('delAllCachedViews', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delAllVisitedViews({ commit, state }) { + return new Promise(resolve => { + commit('DEL_ALL_VISITED_VIEWS') + resolve([...state.visitedViews]) + }) + }, + delAllCachedViews({ commit, state }) { + return new Promise(resolve => { + commit('DEL_ALL_CACHED_VIEWS') + resolve([...state.cachedViews]) + }) + }, + updateVisitedView({ commit }, view) { + commit('UPDATE_VISITED_VIEW', view) + }, + delRightTags({ commit }, view) { + return new Promise(resolve => { + commit('DEL_RIGHT_VIEWS', view) + resolve([...state.visitedViews]) + }) + }, + delLeftTags({ commit }, view) { + return new Promise(resolve => { + commit('DEL_LEFT_VIEWS', view) + resolve([...state.visitedViews]) + }) + }, +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/ruoyi-ui/src/store/modules/user.js b/acupuncture-ui/src/store/modules/user.js similarity index 96% rename from ruoyi-ui/src/store/modules/user.js rename to acupuncture-ui/src/store/modules/user.js index be565c5f..63e6ba2e 100644 --- a/ruoyi-ui/src/store/modules/user.js +++ b/acupuncture-ui/src/store/modules/user.js @@ -1,106 +1,106 @@ -import { login, logout, getInfo } from '@/api/login' -import { getToken, setToken, removeToken } from '@/utils/auth' -import { isHttp, isEmpty } from "@/utils/validate" -import defAva from '@/assets/images/profile.jpg' - -const user = { - state: { - token: getToken(), - id: '', - name: '', - avatar: '', - roles: [], - permissions: [] - }, - - mutations: { - SET_TOKEN: (state, token) => { - state.token = token - }, - SET_ID: (state, id) => { - state.id = id - }, - SET_NAME: (state, name) => { - state.name = name - }, - SET_AVATAR: (state, avatar) => { - state.avatar = avatar - }, - SET_ROLES: (state, roles) => { - state.roles = roles - }, - SET_PERMISSIONS: (state, permissions) => { - state.permissions = permissions - } - }, - - actions: { - // 登录 - Login({ commit }, userInfo) { - const username = userInfo.username.trim() - const password = userInfo.password - const code = userInfo.code - const uuid = userInfo.uuid - return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { - setToken(res.token) - commit('SET_TOKEN', res.token) - resolve() - }).catch(error => { - reject(error) - }) - }) - }, - - // 获取用户信息 - GetInfo({ commit, state }) { - return new Promise((resolve, reject) => { - getInfo().then(res => { - const user = res.user - let avatar = user.avatar || "" - if (!isHttp(avatar)) { - avatar = (isEmpty(avatar)) ? defAva : process.env.VUE_APP_BASE_API + avatar - } - if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 - commit('SET_ROLES', res.roles) - commit('SET_PERMISSIONS', res.permissions) - } else { - commit('SET_ROLES', ['ROLE_DEFAULT']) - } - commit('SET_ID', user.userId) - commit('SET_NAME', user.userName) - commit('SET_AVATAR', avatar) - resolve(res) - }).catch(error => { - reject(error) - }) - }) - }, - - // 退出系统 - LogOut({ commit, state }) { - return new Promise((resolve, reject) => { - logout(state.token).then(() => { - commit('SET_TOKEN', '') - commit('SET_ROLES', []) - commit('SET_PERMISSIONS', []) - removeToken() - resolve() - }).catch(error => { - reject(error) - }) - }) - }, - - // 前端 登出 - FedLogOut({ commit }) { - return new Promise(resolve => { - commit('SET_TOKEN', '') - removeToken() - resolve() - }) - } - } -} - -export default user +import { login, logout, getInfo } from '@/api/login' +import { getToken, setToken, removeToken } from '@/utils/auth' +import { isHttp, isEmpty } from "@/utils/validate" +import defAva from '@/assets/images/profile.jpg' + +const user = { + state: { + token: getToken(), + id: '', + name: '', + avatar: '', + roles: [], + permissions: [] + }, + + mutations: { + SET_TOKEN: (state, token) => { + state.token = token + }, + SET_ID: (state, id) => { + state.id = id + }, + SET_NAME: (state, name) => { + state.name = name + }, + SET_AVATAR: (state, avatar) => { + state.avatar = avatar + }, + SET_ROLES: (state, roles) => { + state.roles = roles + }, + SET_PERMISSIONS: (state, permissions) => { + state.permissions = permissions + } + }, + + actions: { + // 登录 + Login({ commit }, userInfo) { + const username = userInfo.username.trim() + const password = userInfo.password + const code = userInfo.code + const uuid = userInfo.uuid + return new Promise((resolve, reject) => { + login(username, password, code, uuid).then(res => { + setToken(res.token) + commit('SET_TOKEN', res.token) + resolve() + }).catch(error => { + reject(error) + }) + }) + }, + + // 获取用户信息 + GetInfo({ commit, state }) { + return new Promise((resolve, reject) => { + getInfo().then(res => { + const user = res.user + let avatar = user.avatar || "" + if (!isHttp(avatar)) { + avatar = (isEmpty(avatar)) ? defAva : process.env.VUE_APP_BASE_API + avatar + } + if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 + commit('SET_ROLES', res.roles) + commit('SET_PERMISSIONS', res.permissions) + } else { + commit('SET_ROLES', ['ROLE_DEFAULT']) + } + commit('SET_ID', user.userId) + commit('SET_NAME', user.userName) + commit('SET_AVATAR', avatar) + resolve(res) + }).catch(error => { + reject(error) + }) + }) + }, + + // 退出系统 + LogOut({ commit, state }) { + return new Promise((resolve, reject) => { + logout(state.token).then(() => { + commit('SET_TOKEN', '') + commit('SET_ROLES', []) + commit('SET_PERMISSIONS', []) + removeToken() + resolve() + }).catch(error => { + reject(error) + }) + }) + }, + + // 前端 登出 + FedLogOut({ commit }) { + return new Promise(resolve => { + commit('SET_TOKEN', '') + removeToken() + resolve() + }) + } + } +} + +export default user diff --git a/ruoyi-ui/src/utils/auth.js b/acupuncture-ui/src/utils/auth.js similarity index 94% rename from ruoyi-ui/src/utils/auth.js rename to acupuncture-ui/src/utils/auth.js index 88d7b6cc..08a43d6e 100644 --- a/ruoyi-ui/src/utils/auth.js +++ b/acupuncture-ui/src/utils/auth.js @@ -1,15 +1,15 @@ -import Cookies from 'js-cookie' - -const TokenKey = 'Admin-Token' - -export function getToken() { - return Cookies.get(TokenKey) -} - -export function setToken(token) { - return Cookies.set(TokenKey, token) -} - -export function removeToken() { - return Cookies.remove(TokenKey) -} +import Cookies from 'js-cookie' + +const TokenKey = 'Admin-Token' + +export function getToken() { + return Cookies.get(TokenKey) +} + +export function setToken(token) { + return Cookies.set(TokenKey, token) +} + +export function removeToken() { + return Cookies.remove(TokenKey) +} diff --git a/ruoyi-ui/src/utils/dict/Dict.js b/acupuncture-ui/src/utils/dict/Dict.js similarity index 100% rename from ruoyi-ui/src/utils/dict/Dict.js rename to acupuncture-ui/src/utils/dict/Dict.js diff --git a/ruoyi-ui/src/utils/dict/DictConverter.js b/acupuncture-ui/src/utils/dict/DictConverter.js similarity index 97% rename from ruoyi-ui/src/utils/dict/DictConverter.js rename to acupuncture-ui/src/utils/dict/DictConverter.js index 576ff546..0cf5df86 100644 --- a/ruoyi-ui/src/utils/dict/DictConverter.js +++ b/acupuncture-ui/src/utils/dict/DictConverter.js @@ -1,17 +1,17 @@ -import DictOptions from './DictOptions' -import DictData from './DictData' - -export default function(dict, dictMeta) { - const label = determineDictField(dict, dictMeta.labelField, ...DictOptions.DEFAULT_LABEL_FIELDS) - const value = determineDictField(dict, dictMeta.valueField, ...DictOptions.DEFAULT_VALUE_FIELDS) - return new DictData(dict[label], dict[value], dict) -} - -/** - * 确定字典字段 - * @param {DictData} dict - * @param {...String} fields - */ -function determineDictField(dict, ...fields) { - return fields.find(f => Object.prototype.hasOwnProperty.call(dict, f)) -} +import DictOptions from './DictOptions' +import DictData from './DictData' + +export default function(dict, dictMeta) { + const label = determineDictField(dict, dictMeta.labelField, ...DictOptions.DEFAULT_LABEL_FIELDS) + const value = determineDictField(dict, dictMeta.valueField, ...DictOptions.DEFAULT_VALUE_FIELDS) + return new DictData(dict[label], dict[value], dict) +} + +/** + * 确定字典字段 + * @param {DictData} dict + * @param {...String} fields + */ +function determineDictField(dict, ...fields) { + return fields.find(f => Object.prototype.hasOwnProperty.call(dict, f)) +} diff --git a/ruoyi-ui/src/utils/dict/DictData.js b/acupuncture-ui/src/utils/dict/DictData.js similarity index 95% rename from ruoyi-ui/src/utils/dict/DictData.js rename to acupuncture-ui/src/utils/dict/DictData.js index 37a60d5c..afc763e8 100644 --- a/ruoyi-ui/src/utils/dict/DictData.js +++ b/acupuncture-ui/src/utils/dict/DictData.js @@ -1,13 +1,13 @@ -/** - * @classdesc 字典数据 - * @property {String} label 标签 - * @property {*} value 标签 - * @property {Object} raw 原始数据 - */ -export default class DictData { - constructor(label, value, raw) { - this.label = label - this.value = value - this.raw = raw - } -} +/** + * @classdesc 字典数据 + * @property {String} label 标签 + * @property {*} value 标签 + * @property {Object} raw 原始数据 + */ +export default class DictData { + constructor(label, value, raw) { + this.label = label + this.value = value + this.raw = raw + } +} diff --git a/ruoyi-ui/src/utils/dict/DictMeta.js b/acupuncture-ui/src/utils/dict/DictMeta.js similarity index 100% rename from ruoyi-ui/src/utils/dict/DictMeta.js rename to acupuncture-ui/src/utils/dict/DictMeta.js diff --git a/ruoyi-ui/src/utils/dict/DictOptions.js b/acupuncture-ui/src/utils/dict/DictOptions.js similarity index 100% rename from ruoyi-ui/src/utils/dict/DictOptions.js rename to acupuncture-ui/src/utils/dict/DictOptions.js diff --git a/ruoyi-ui/src/utils/dict/index.js b/acupuncture-ui/src/utils/dict/index.js similarity index 96% rename from ruoyi-ui/src/utils/dict/index.js rename to acupuncture-ui/src/utils/dict/index.js index d6fdb802..215eb9e0 100644 --- a/ruoyi-ui/src/utils/dict/index.js +++ b/acupuncture-ui/src/utils/dict/index.js @@ -1,33 +1,33 @@ -import Dict from './Dict' -import { mergeOptions } from './DictOptions' - -export default function(Vue, options) { - mergeOptions(options) - Vue.mixin({ - data() { - if (this.$options === undefined || this.$options.dicts === undefined || this.$options.dicts === null) { - return {} - } - const dict = new Dict() - dict.owner = this - return { - dict - } - }, - created() { - if (!(this.dict instanceof Dict)) { - return - } - options.onCreated && options.onCreated(this.dict) - this.dict.init(this.$options.dicts).then(() => { - options.onReady && options.onReady(this.dict) - this.$nextTick(() => { - this.$emit('dictReady', this.dict) - if (this.$options.methods && this.$options.methods.onDictReady instanceof Function) { - this.$options.methods.onDictReady.call(this, this.dict) - } - }) - }) - }, - }) -} +import Dict from './Dict' +import { mergeOptions } from './DictOptions' + +export default function(Vue, options) { + mergeOptions(options) + Vue.mixin({ + data() { + if (this.$options === undefined || this.$options.dicts === undefined || this.$options.dicts === null) { + return {} + } + const dict = new Dict() + dict.owner = this + return { + dict + } + }, + created() { + if (!(this.dict instanceof Dict)) { + return + } + options.onCreated && options.onCreated(this.dict) + this.dict.init(this.$options.dicts).then(() => { + options.onReady && options.onReady(this.dict) + this.$nextTick(() => { + this.$emit('dictReady', this.dict) + if (this.$options.methods && this.$options.methods.onDictReady instanceof Function) { + this.$options.methods.onDictReady.call(this, this.dict) + } + }) + }) + }, + }) +} diff --git a/ruoyi-ui/src/utils/errorCode.js b/acupuncture-ui/src/utils/errorCode.js similarity index 100% rename from ruoyi-ui/src/utils/errorCode.js rename to acupuncture-ui/src/utils/errorCode.js diff --git a/ruoyi-ui/src/utils/generator/config.js b/acupuncture-ui/src/utils/generator/config.js similarity index 95% rename from ruoyi-ui/src/utils/generator/config.js rename to acupuncture-ui/src/utils/generator/config.js index 005140a8..7abf227d 100644 --- a/ruoyi-ui/src/utils/generator/config.js +++ b/acupuncture-ui/src/utils/generator/config.js @@ -1,438 +1,438 @@ -export const formConf = { - formRef: 'elForm', - formModel: 'formData', - size: 'medium', - labelPosition: 'right', - labelWidth: 100, - formRules: 'rules', - gutter: 15, - disabled: false, - span: 24, - formBtns: true -} - -export const inputComponents = [ - { - label: '单行文本', - tag: 'el-input', - tagIcon: 'input', - placeholder: '请输入', - defaultValue: undefined, - span: 24, - labelWidth: null, - style: { width: '100%' }, - clearable: true, - prepend: '', - append: '', - 'prefix-icon': '', - 'suffix-icon': '', - maxlength: null, - 'show-word-limit': false, - readonly: false, - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/input' - }, - { - label: '多行文本', - tag: 'el-input', - tagIcon: 'textarea', - type: 'textarea', - placeholder: '请输入', - defaultValue: undefined, - span: 24, - labelWidth: null, - autosize: { - minRows: 4, - maxRows: 4 - }, - style: { width: '100%' }, - maxlength: null, - 'show-word-limit': false, - readonly: false, - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/input' - }, - { - label: '密码', - tag: 'el-input', - tagIcon: 'password', - placeholder: '请输入', - defaultValue: undefined, - span: 24, - 'show-password': true, - labelWidth: null, - style: { width: '100%' }, - clearable: true, - prepend: '', - append: '', - 'prefix-icon': '', - 'suffix-icon': '', - maxlength: null, - 'show-word-limit': false, - readonly: false, - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/input' - }, - { - label: '计数器', - tag: 'el-input-number', - tagIcon: 'number', - placeholder: '', - defaultValue: undefined, - span: 24, - labelWidth: null, - min: undefined, - max: undefined, - step: undefined, - 'step-strictly': false, - precision: undefined, - 'controls-position': '', - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/input-number' - } -] - -export const selectComponents = [ - { - label: '下拉选择', - tag: 'el-select', - tagIcon: 'select', - placeholder: '请选择', - defaultValue: undefined, - span: 24, - labelWidth: null, - style: { width: '100%' }, - clearable: true, - disabled: false, - required: true, - filterable: false, - multiple: false, - options: [{ - label: '选项一', - value: 1 - }, { - label: '选项二', - value: 2 - }], - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/select' - }, - { - label: '级联选择', - tag: 'el-cascader', - tagIcon: 'cascader', - placeholder: '请选择', - defaultValue: [], - span: 24, - labelWidth: null, - style: { width: '100%' }, - props: { - props: { - multiple: false - } - }, - 'show-all-levels': true, - disabled: false, - clearable: true, - filterable: false, - required: true, - options: [{ - id: 1, - value: 1, - label: '选项1', - children: [{ - id: 2, - value: 2, - label: '选项1-1' - }] - }], - dataType: 'dynamic', - labelKey: 'label', - valueKey: 'value', - childrenKey: 'children', - separator: '/', - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/cascader' - }, - { - label: '单选框组', - tag: 'el-radio-group', - tagIcon: 'radio', - defaultValue: undefined, - span: 24, - labelWidth: null, - style: {}, - optionType: 'default', - border: false, - size: 'medium', - disabled: false, - required: true, - options: [{ - label: '选项一', - value: 1 - }, { - label: '选项二', - value: 2 - }], - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/radio' - }, - { - label: '多选框组', - tag: 'el-checkbox-group', - tagIcon: 'checkbox', - defaultValue: [], - span: 24, - labelWidth: null, - style: {}, - optionType: 'default', - border: false, - size: 'medium', - disabled: false, - required: true, - options: [{ - label: '选项一', - value: 1 - }, { - label: '选项二', - value: 2 - }], - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/checkbox' - }, - { - label: '开关', - tag: 'el-switch', - tagIcon: 'switch', - defaultValue: false, - span: 24, - labelWidth: null, - style: {}, - disabled: false, - required: true, - 'active-text': '', - 'inactive-text': '', - 'active-color': null, - 'inactive-color': null, - 'active-value': true, - 'inactive-value': false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/switch' - }, - { - label: '滑块', - tag: 'el-slider', - tagIcon: 'slider', - defaultValue: null, - span: 24, - labelWidth: null, - disabled: false, - required: true, - min: 0, - max: 100, - step: 1, - 'show-stops': false, - range: false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/slider' - }, - { - label: '时间选择', - tag: 'el-time-picker', - tagIcon: 'time', - placeholder: '请选择', - defaultValue: null, - span: 24, - labelWidth: null, - style: { width: '100%' }, - disabled: false, - clearable: true, - required: true, - 'picker-options': { - selectableRange: '00:00:00-23:59:59' - }, - format: 'HH:mm:ss', - 'value-format': 'HH:mm:ss', - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/time-picker' - }, - { - label: '时间范围', - tag: 'el-time-picker', - tagIcon: 'time-range', - defaultValue: null, - span: 24, - labelWidth: null, - style: { width: '100%' }, - disabled: false, - clearable: true, - required: true, - 'is-range': true, - 'range-separator': '至', - 'start-placeholder': '开始时间', - 'end-placeholder': '结束时间', - format: 'HH:mm:ss', - 'value-format': 'HH:mm:ss', - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/time-picker' - }, - { - label: '日期选择', - tag: 'el-date-picker', - tagIcon: 'date', - placeholder: '请选择', - defaultValue: null, - type: 'date', - span: 24, - labelWidth: null, - style: { width: '100%' }, - disabled: false, - clearable: true, - required: true, - format: 'yyyy-MM-dd', - 'value-format': 'yyyy-MM-dd', - readonly: false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/date-picker' - }, - { - label: '日期范围', - tag: 'el-date-picker', - tagIcon: 'date-range', - defaultValue: null, - span: 24, - labelWidth: null, - style: { width: '100%' }, - type: 'daterange', - 'range-separator': '至', - 'start-placeholder': '开始日期', - 'end-placeholder': '结束日期', - disabled: false, - clearable: true, - required: true, - format: 'yyyy-MM-dd', - 'value-format': 'yyyy-MM-dd', - readonly: false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/date-picker' - }, - { - label: '评分', - tag: 'el-rate', - tagIcon: 'rate', - defaultValue: 0, - span: 24, - labelWidth: null, - style: {}, - max: 5, - 'allow-half': false, - 'show-text': false, - 'show-score': false, - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/rate' - }, - { - label: '颜色选择', - tag: 'el-color-picker', - tagIcon: 'color', - defaultValue: null, - labelWidth: null, - 'show-alpha': false, - 'color-format': '', - disabled: false, - required: true, - size: 'medium', - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/color-picker' - }, - { - label: '上传', - tag: 'el-upload', - tagIcon: 'upload', - action: 'https://jsonplaceholder.typicode.com/posts/', - defaultValue: null, - labelWidth: null, - disabled: false, - required: true, - accept: '', - name: 'file', - 'auto-upload': true, - showTip: false, - buttonText: '点击上传', - fileSize: 2, - sizeUnit: 'MB', - 'list-type': 'text', - multiple: false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/upload' - } -] - -export const layoutComponents = [ - { - layout: 'rowFormItem', - tagIcon: 'row', - type: 'default', - justify: 'start', - align: 'top', - label: '行容器', - layoutTree: true, - children: [], - document: 'https://element.eleme.cn/#/zh-CN/component/layout' - }, - { - layout: 'colFormItem', - label: '按钮', - changeTag: true, - labelWidth: null, - tag: 'el-button', - tagIcon: 'button', - span: 24, - default: '主要按钮', - type: 'primary', - icon: 'el-icon-search', - size: 'medium', - disabled: false, - document: 'https://element.eleme.cn/#/zh-CN/component/button' - } -] - -// 组件rule的触发方式,无触发方式的组件不生成rule -export const trigger = { - 'el-input': 'blur', - 'el-input-number': 'blur', - 'el-select': 'change', - 'el-radio-group': 'change', - 'el-checkbox-group': 'change', - 'el-cascader': 'change', - 'el-time-picker': 'change', - 'el-date-picker': 'change', - 'el-rate': 'change' -} +export const formConf = { + formRef: 'elForm', + formModel: 'formData', + size: 'medium', + labelPosition: 'right', + labelWidth: 100, + formRules: 'rules', + gutter: 15, + disabled: false, + span: 24, + formBtns: true +} + +export const inputComponents = [ + { + label: '单行文本', + tag: 'el-input', + tagIcon: 'input', + placeholder: '请输入', + defaultValue: undefined, + span: 24, + labelWidth: null, + style: { width: '100%' }, + clearable: true, + prepend: '', + append: '', + 'prefix-icon': '', + 'suffix-icon': '', + maxlength: null, + 'show-word-limit': false, + readonly: false, + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/input' + }, + { + label: '多行文本', + tag: 'el-input', + tagIcon: 'textarea', + type: 'textarea', + placeholder: '请输入', + defaultValue: undefined, + span: 24, + labelWidth: null, + autosize: { + minRows: 4, + maxRows: 4 + }, + style: { width: '100%' }, + maxlength: null, + 'show-word-limit': false, + readonly: false, + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/input' + }, + { + label: '密码', + tag: 'el-input', + tagIcon: 'password', + placeholder: '请输入', + defaultValue: undefined, + span: 24, + 'show-password': true, + labelWidth: null, + style: { width: '100%' }, + clearable: true, + prepend: '', + append: '', + 'prefix-icon': '', + 'suffix-icon': '', + maxlength: null, + 'show-word-limit': false, + readonly: false, + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/input' + }, + { + label: '计数器', + tag: 'el-input-number', + tagIcon: 'number', + placeholder: '', + defaultValue: undefined, + span: 24, + labelWidth: null, + min: undefined, + max: undefined, + step: undefined, + 'step-strictly': false, + precision: undefined, + 'controls-position': '', + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/input-number' + } +] + +export const selectComponents = [ + { + label: '下拉选择', + tag: 'el-select', + tagIcon: 'select', + placeholder: '请选择', + defaultValue: undefined, + span: 24, + labelWidth: null, + style: { width: '100%' }, + clearable: true, + disabled: false, + required: true, + filterable: false, + multiple: false, + options: [{ + label: '选项一', + value: 1 + }, { + label: '选项二', + value: 2 + }], + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/select' + }, + { + label: '级联选择', + tag: 'el-cascader', + tagIcon: 'cascader', + placeholder: '请选择', + defaultValue: [], + span: 24, + labelWidth: null, + style: { width: '100%' }, + props: { + props: { + multiple: false + } + }, + 'show-all-levels': true, + disabled: false, + clearable: true, + filterable: false, + required: true, + options: [{ + id: 1, + value: 1, + label: '选项1', + children: [{ + id: 2, + value: 2, + label: '选项1-1' + }] + }], + dataType: 'dynamic', + labelKey: 'label', + valueKey: 'value', + childrenKey: 'children', + separator: '/', + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/cascader' + }, + { + label: '单选框组', + tag: 'el-radio-group', + tagIcon: 'radio', + defaultValue: undefined, + span: 24, + labelWidth: null, + style: {}, + optionType: 'default', + border: false, + size: 'medium', + disabled: false, + required: true, + options: [{ + label: '选项一', + value: 1 + }, { + label: '选项二', + value: 2 + }], + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/radio' + }, + { + label: '多选框组', + tag: 'el-checkbox-group', + tagIcon: 'checkbox', + defaultValue: [], + span: 24, + labelWidth: null, + style: {}, + optionType: 'default', + border: false, + size: 'medium', + disabled: false, + required: true, + options: [{ + label: '选项一', + value: 1 + }, { + label: '选项二', + value: 2 + }], + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/checkbox' + }, + { + label: '开关', + tag: 'el-switch', + tagIcon: 'switch', + defaultValue: false, + span: 24, + labelWidth: null, + style: {}, + disabled: false, + required: true, + 'active-text': '', + 'inactive-text': '', + 'active-color': null, + 'inactive-color': null, + 'active-value': true, + 'inactive-value': false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/switch' + }, + { + label: '滑块', + tag: 'el-slider', + tagIcon: 'slider', + defaultValue: null, + span: 24, + labelWidth: null, + disabled: false, + required: true, + min: 0, + max: 100, + step: 1, + 'show-stops': false, + range: false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/slider' + }, + { + label: '时间选择', + tag: 'el-time-picker', + tagIcon: 'time', + placeholder: '请选择', + defaultValue: null, + span: 24, + labelWidth: null, + style: { width: '100%' }, + disabled: false, + clearable: true, + required: true, + 'picker-options': { + selectableRange: '00:00:00-23:59:59' + }, + format: 'HH:mm:ss', + 'value-format': 'HH:mm:ss', + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/time-picker' + }, + { + label: '时间范围', + tag: 'el-time-picker', + tagIcon: 'time-range', + defaultValue: null, + span: 24, + labelWidth: null, + style: { width: '100%' }, + disabled: false, + clearable: true, + required: true, + 'is-range': true, + 'range-separator': '至', + 'start-placeholder': '开始时间', + 'end-placeholder': '结束时间', + format: 'HH:mm:ss', + 'value-format': 'HH:mm:ss', + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/time-picker' + }, + { + label: '日期选择', + tag: 'el-date-picker', + tagIcon: 'date', + placeholder: '请选择', + defaultValue: null, + type: 'date', + span: 24, + labelWidth: null, + style: { width: '100%' }, + disabled: false, + clearable: true, + required: true, + format: 'yyyy-MM-dd', + 'value-format': 'yyyy-MM-dd', + readonly: false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/date-picker' + }, + { + label: '日期范围', + tag: 'el-date-picker', + tagIcon: 'date-range', + defaultValue: null, + span: 24, + labelWidth: null, + style: { width: '100%' }, + type: 'daterange', + 'range-separator': '至', + 'start-placeholder': '开始日期', + 'end-placeholder': '结束日期', + disabled: false, + clearable: true, + required: true, + format: 'yyyy-MM-dd', + 'value-format': 'yyyy-MM-dd', + readonly: false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/date-picker' + }, + { + label: '评分', + tag: 'el-rate', + tagIcon: 'rate', + defaultValue: 0, + span: 24, + labelWidth: null, + style: {}, + max: 5, + 'allow-half': false, + 'show-text': false, + 'show-score': false, + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/rate' + }, + { + label: '颜色选择', + tag: 'el-color-picker', + tagIcon: 'color', + defaultValue: null, + labelWidth: null, + 'show-alpha': false, + 'color-format': '', + disabled: false, + required: true, + size: 'medium', + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/color-picker' + }, + { + label: '上传', + tag: 'el-upload', + tagIcon: 'upload', + action: 'https://jsonplaceholder.typicode.com/posts/', + defaultValue: null, + labelWidth: null, + disabled: false, + required: true, + accept: '', + name: 'file', + 'auto-upload': true, + showTip: false, + buttonText: '点击上传', + fileSize: 2, + sizeUnit: 'MB', + 'list-type': 'text', + multiple: false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/upload' + } +] + +export const layoutComponents = [ + { + layout: 'rowFormItem', + tagIcon: 'row', + type: 'default', + justify: 'start', + align: 'top', + label: '行容器', + layoutTree: true, + children: [], + document: 'https://element.eleme.cn/#/zh-CN/component/layout' + }, + { + layout: 'colFormItem', + label: '按钮', + changeTag: true, + labelWidth: null, + tag: 'el-button', + tagIcon: 'button', + span: 24, + default: '主要按钮', + type: 'primary', + icon: 'el-icon-search', + size: 'medium', + disabled: false, + document: 'https://element.eleme.cn/#/zh-CN/component/button' + } +] + +// 组件rule的触发方式,无触发方式的组件不生成rule +export const trigger = { + 'el-input': 'blur', + 'el-input-number': 'blur', + 'el-select': 'change', + 'el-radio-group': 'change', + 'el-checkbox-group': 'change', + 'el-cascader': 'change', + 'el-time-picker': 'change', + 'el-date-picker': 'change', + 'el-rate': 'change' +} diff --git a/ruoyi-ui/src/utils/generator/css.js b/acupuncture-ui/src/utils/generator/css.js similarity index 96% rename from ruoyi-ui/src/utils/generator/css.js rename to acupuncture-ui/src/utils/generator/css.js index 0d7f0752..c1c62e60 100644 --- a/ruoyi-ui/src/utils/generator/css.js +++ b/acupuncture-ui/src/utils/generator/css.js @@ -1,18 +1,18 @@ -const styles = { - 'el-rate': '.el-rate{display: inline-block; vertical-align: text-top;}', - 'el-upload': '.el-upload__tip{line-height: 1.2;}' -} - -function addCss(cssList, el) { - const css = styles[el.tag] - css && cssList.indexOf(css) === -1 && cssList.push(css) - if (el.children) { - el.children.forEach(el2 => addCss(cssList, el2)) - } -} - -export function makeUpCss(conf) { - const cssList = [] - conf.fields.forEach(el => addCss(cssList, el)) - return cssList.join('\n') -} +const styles = { + 'el-rate': '.el-rate{display: inline-block; vertical-align: text-top;}', + 'el-upload': '.el-upload__tip{line-height: 1.2;}' +} + +function addCss(cssList, el) { + const css = styles[el.tag] + css && cssList.indexOf(css) === -1 && cssList.push(css) + if (el.children) { + el.children.forEach(el2 => addCss(cssList, el2)) + } +} + +export function makeUpCss(conf) { + const cssList = [] + conf.fields.forEach(el => addCss(cssList, el)) + return cssList.join('\n') +} diff --git a/ruoyi-ui/src/utils/generator/drawingDefault.js b/acupuncture-ui/src/utils/generator/drawingDefault.js similarity index 100% rename from ruoyi-ui/src/utils/generator/drawingDefault.js rename to acupuncture-ui/src/utils/generator/drawingDefault.js diff --git a/ruoyi-ui/src/utils/generator/html.js b/acupuncture-ui/src/utils/generator/html.js similarity index 100% rename from ruoyi-ui/src/utils/generator/html.js rename to acupuncture-ui/src/utils/generator/html.js diff --git a/ruoyi-ui/src/utils/generator/icon.json b/acupuncture-ui/src/utils/generator/icon.json similarity index 100% rename from ruoyi-ui/src/utils/generator/icon.json rename to acupuncture-ui/src/utils/generator/icon.json diff --git a/ruoyi-ui/src/utils/generator/js.js b/acupuncture-ui/src/utils/generator/js.js similarity index 100% rename from ruoyi-ui/src/utils/generator/js.js rename to acupuncture-ui/src/utils/generator/js.js diff --git a/ruoyi-ui/src/utils/generator/render.js b/acupuncture-ui/src/utils/generator/render.js similarity index 96% rename from ruoyi-ui/src/utils/generator/render.js rename to acupuncture-ui/src/utils/generator/render.js index f187029d..e8640f0a 100644 --- a/ruoyi-ui/src/utils/generator/render.js +++ b/acupuncture-ui/src/utils/generator/render.js @@ -1,126 +1,126 @@ -import { makeMap } from '@/utils/index' - -// 参考https://github.com/vuejs/vue/blob/v2.6.10/src/platforms/web/server/util.js -const isAttr = makeMap( - 'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' - + 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' - + 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' - + 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' - + 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' - + 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' - + 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' - + 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' - + 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' - + 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' - + 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' - + 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' - + 'target,title,type,usemap,value,width,wrap' -) - -function vModel(self, dataObject, defaultValue) { - dataObject.props.value = defaultValue - - dataObject.on.input = val => { - self.$emit('input', val) - } -} - -const componentChild = { - 'el-button': { - default(h, conf, key) { - return conf[key] - }, - }, - 'el-input': { - prepend(h, conf, key) { - return - }, - append(h, conf, key) { - return - } - }, - 'el-select': { - options(h, conf, key) { - const list = [] - conf.options.forEach(item => { - list.push() - }) - return list - } - }, - 'el-radio-group': { - options(h, conf, key) { - const list = [] - conf.options.forEach(item => { - if (conf.optionType === 'button') list.push({item.label}) - else list.push({item.label}) - }) - return list - } - }, - 'el-checkbox-group': { - options(h, conf, key) { - const list = [] - conf.options.forEach(item => { - if (conf.optionType === 'button') { - list.push({item.label}) - } else { - list.push({item.label}) - } - }) - return list - } - }, - 'el-upload': { - 'list-type': (h, conf, key) => { - const list = [] - if (conf['list-type'] === 'picture-card') { - list.push() - } else { - list.push({conf.buttonText}) - } - if (conf.showTip) { - list.push(
只能上传不超过 {conf.fileSize}{conf.sizeUnit} 的{conf.accept}文件
) - } - return list - } - } -} - -export default { - render(h) { - const dataObject = { - attrs: {}, - props: {}, - on: {}, - style: {} - } - const confClone = JSON.parse(JSON.stringify(this.conf)) - const children = [] - - const childObjs = componentChild[confClone.tag] - if (childObjs) { - Object.keys(childObjs).forEach(key => { - const childFunc = childObjs[key] - if (confClone[key]) { - children.push(childFunc(h, confClone, key)) - } - }) - } - - Object.keys(confClone).forEach(key => { - const val = confClone[key] - if (key === 'vModel') { - vModel(this, dataObject, confClone.defaultValue) - } else if (dataObject[key]) { - dataObject[key] = val - } else if (!isAttr(key)) { - dataObject.props[key] = val - } else { - dataObject.attrs[key] = val - } - }) - return h(this.conf.tag, dataObject, children) - }, - props: ['conf'] -} +import { makeMap } from '@/utils/index' + +// 参考https://github.com/vuejs/vue/blob/v2.6.10/src/platforms/web/server/util.js +const isAttr = makeMap( + 'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' + + 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' + + 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' + + 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' + + 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' + + 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' + + 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' + + 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' + + 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' + + 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' + + 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' + + 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' + + 'target,title,type,usemap,value,width,wrap' +) + +function vModel(self, dataObject, defaultValue) { + dataObject.props.value = defaultValue + + dataObject.on.input = val => { + self.$emit('input', val) + } +} + +const componentChild = { + 'el-button': { + default(h, conf, key) { + return conf[key] + }, + }, + 'el-input': { + prepend(h, conf, key) { + return + }, + append(h, conf, key) { + return + } + }, + 'el-select': { + options(h, conf, key) { + const list = [] + conf.options.forEach(item => { + list.push() + }) + return list + } + }, + 'el-radio-group': { + options(h, conf, key) { + const list = [] + conf.options.forEach(item => { + if (conf.optionType === 'button') list.push({item.label}) + else list.push({item.label}) + }) + return list + } + }, + 'el-checkbox-group': { + options(h, conf, key) { + const list = [] + conf.options.forEach(item => { + if (conf.optionType === 'button') { + list.push({item.label}) + } else { + list.push({item.label}) + } + }) + return list + } + }, + 'el-upload': { + 'list-type': (h, conf, key) => { + const list = [] + if (conf['list-type'] === 'picture-card') { + list.push() + } else { + list.push({conf.buttonText}) + } + if (conf.showTip) { + list.push(
只能上传不超过 {conf.fileSize}{conf.sizeUnit} 的{conf.accept}文件
) + } + return list + } + } +} + +export default { + render(h) { + const dataObject = { + attrs: {}, + props: {}, + on: {}, + style: {} + } + const confClone = JSON.parse(JSON.stringify(this.conf)) + const children = [] + + const childObjs = componentChild[confClone.tag] + if (childObjs) { + Object.keys(childObjs).forEach(key => { + const childFunc = childObjs[key] + if (confClone[key]) { + children.push(childFunc(h, confClone, key)) + } + }) + } + + Object.keys(confClone).forEach(key => { + const val = confClone[key] + if (key === 'vModel') { + vModel(this, dataObject, confClone.defaultValue) + } else if (dataObject[key]) { + dataObject[key] = val + } else if (!isAttr(key)) { + dataObject.props[key] = val + } else { + dataObject.attrs[key] = val + } + }) + return h(this.conf.tag, dataObject, children) + }, + props: ['conf'] +} diff --git a/ruoyi-ui/src/utils/index.js b/acupuncture-ui/src/utils/index.js similarity index 100% rename from ruoyi-ui/src/utils/index.js rename to acupuncture-ui/src/utils/index.js diff --git a/ruoyi-ui/src/utils/jsencrypt.js b/acupuncture-ui/src/utils/jsencrypt.js similarity index 100% rename from ruoyi-ui/src/utils/jsencrypt.js rename to acupuncture-ui/src/utils/jsencrypt.js diff --git a/ruoyi-ui/src/utils/permission.js b/acupuncture-ui/src/utils/permission.js similarity index 96% rename from ruoyi-ui/src/utils/permission.js rename to acupuncture-ui/src/utils/permission.js index 0fc5515e..189a7162 100644 --- a/ruoyi-ui/src/utils/permission.js +++ b/acupuncture-ui/src/utils/permission.js @@ -1,47 +1,47 @@ -import store from '@/store' - -/** - * 字符权限校验 - * @param {Array} value 校验值 - * @returns {Boolean} - */ -export function checkPermi(value) { - if (value && value instanceof Array && value.length > 0) { - const permissions = store.getters && store.getters.permissions - const permissionDatas = value - const all_permission = "*:*:*"; - - const hasPermission = permissions.some(permission => { - return all_permission === permission || permissionDatas.includes(permission) - }) - - return hasPermission; - - } else { - console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`) - return false - } -} - -/** - * 角色权限校验 - * @param {Array} value 校验值 - * @returns {Boolean} - */ -export function checkRole(value) { - if (value && value instanceof Array && value.length > 0) { - const roles = store.getters && store.getters.roles - const permissionRoles = value - const super_admin = "admin"; - - const hasRole = roles.some(role => { - return super_admin === role || permissionRoles.includes(role) - }) - - return hasRole; - - } else { - console.error(`need roles! Like checkRole="['admin','editor']"`) - return false - } +import store from '@/store' + +/** + * 字符权限校验 + * @param {Array} value 校验值 + * @returns {Boolean} + */ +export function checkPermi(value) { + if (value && value instanceof Array && value.length > 0) { + const permissions = store.getters && store.getters.permissions + const permissionDatas = value + const all_permission = "*:*:*"; + + const hasPermission = permissions.some(permission => { + return all_permission === permission || permissionDatas.includes(permission) + }) + + return hasPermission; + + } else { + console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`) + return false + } +} + +/** + * 角色权限校验 + * @param {Array} value 校验值 + * @returns {Boolean} + */ +export function checkRole(value) { + if (value && value instanceof Array && value.length > 0) { + const roles = store.getters && store.getters.roles + const permissionRoles = value + const super_admin = "admin"; + + const hasRole = roles.some(role => { + return super_admin === role || permissionRoles.includes(role) + }) + + return hasRole; + + } else { + console.error(`need roles! Like checkRole="['admin','editor']"`) + return false + } } \ No newline at end of file diff --git a/ruoyi-ui/src/utils/request.js b/acupuncture-ui/src/utils/request.js similarity index 100% rename from ruoyi-ui/src/utils/request.js rename to acupuncture-ui/src/utils/request.js diff --git a/ruoyi-ui/src/utils/ruoyi.js b/acupuncture-ui/src/utils/ruoyi.js similarity index 100% rename from ruoyi-ui/src/utils/ruoyi.js rename to acupuncture-ui/src/utils/ruoyi.js diff --git a/ruoyi-ui/src/utils/scroll-to.js b/acupuncture-ui/src/utils/scroll-to.js similarity index 96% rename from ruoyi-ui/src/utils/scroll-to.js rename to acupuncture-ui/src/utils/scroll-to.js index 709fa574..c5d8e04e 100644 --- a/ruoyi-ui/src/utils/scroll-to.js +++ b/acupuncture-ui/src/utils/scroll-to.js @@ -1,58 +1,58 @@ -Math.easeInOutQuad = function(t, b, c, d) { - t /= d / 2 - if (t < 1) { - return c / 2 * t * t + b - } - t-- - return -c / 2 * (t * (t - 2) - 1) + b -} - -// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts -var requestAnimFrame = (function() { - return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) } -})() - -/** - * Because it's so fucking difficult to detect the scrolling element, just move them all - * @param {number} amount - */ -function move(amount) { - document.documentElement.scrollTop = amount - document.body.parentNode.scrollTop = amount - document.body.scrollTop = amount -} - -function position() { - return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop -} - -/** - * @param {number} to - * @param {number} duration - * @param {Function} callback - */ -export function scrollTo(to, duration, callback) { - const start = position() - const change = to - start - const increment = 20 - let currentTime = 0 - duration = (typeof (duration) === 'undefined') ? 500 : duration - var animateScroll = function() { - // increment the time - currentTime += increment - // find the value with the quadratic in-out easing function - var val = Math.easeInOutQuad(currentTime, start, change, duration) - // move the document.body - move(val) - // do the animation unless its over - if (currentTime < duration) { - requestAnimFrame(animateScroll) - } else { - if (callback && typeof (callback) === 'function') { - // the animation is done so lets callback - callback() - } - } - } - animateScroll() -} +Math.easeInOutQuad = function(t, b, c, d) { + t /= d / 2 + if (t < 1) { + return c / 2 * t * t + b + } + t-- + return -c / 2 * (t * (t - 2) - 1) + b +} + +// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts +var requestAnimFrame = (function() { + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) } +})() + +/** + * Because it's so fucking difficult to detect the scrolling element, just move them all + * @param {number} amount + */ +function move(amount) { + document.documentElement.scrollTop = amount + document.body.parentNode.scrollTop = amount + document.body.scrollTop = amount +} + +function position() { + return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop +} + +/** + * @param {number} to + * @param {number} duration + * @param {Function} callback + */ +export function scrollTo(to, duration, callback) { + const start = position() + const change = to - start + const increment = 20 + let currentTime = 0 + duration = (typeof (duration) === 'undefined') ? 500 : duration + var animateScroll = function() { + // increment the time + currentTime += increment + // find the value with the quadratic in-out easing function + var val = Math.easeInOutQuad(currentTime, start, change, duration) + // move the document.body + move(val) + // do the animation unless its over + if (currentTime < duration) { + requestAnimFrame(animateScroll) + } else { + if (callback && typeof (callback) === 'function') { + // the animation is done so lets callback + callback() + } + } + } + animateScroll() +} diff --git a/ruoyi-ui/src/utils/validate.js b/acupuncture-ui/src/utils/validate.js similarity index 95% rename from ruoyi-ui/src/utils/validate.js rename to acupuncture-ui/src/utils/validate.js index 13b7a15c..6a4c0c5d 100644 --- a/ruoyi-ui/src/utils/validate.js +++ b/acupuncture-ui/src/utils/validate.js @@ -1,114 +1,114 @@ -/** - * 路径匹配器 - * @param {string} pattern - * @param {string} path - * @returns {Boolean} - */ -export function isPathMatch(pattern, path) { - const regexPattern = pattern.replace(/\//g, '\\/').replace(/\*\*/g, '.*').replace(/\*/g, '[^\\/]*') - const regex = new RegExp(`^${regexPattern}$`) - return regex.test(path) -} - -/** - * 判断value字符串是否为空 - * @param {string} value - * @returns {Boolean} - */ -export function isEmpty(value) { - if (value == null || value == "" || value == undefined || value == "undefined") { - return true - } - return false -} - -/** - * 判断url是否是http或https - * @param {string} url - * @returns {Boolean} - */ -export function isHttp(url) { - return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1 -} - -/** - * 判断path是否为外链 - * @param {string} path - * @returns {Boolean} - */ -export function isExternal(path) { - return /^(https?:|mailto:|tel:)/.test(path) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function validUsername(str) { - const valid_map = ['admin', 'editor'] - return valid_map.indexOf(str.trim()) >= 0 -} - -/** - * @param {string} url - * @returns {Boolean} - */ -export function validURL(url) { - const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ - return reg.test(url) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function validLowerCase(str) { - const reg = /^[a-z]+$/ - return reg.test(str) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function validUpperCase(str) { - const reg = /^[A-Z]+$/ - return reg.test(str) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function validAlphabets(str) { - const reg = /^[A-Za-z]+$/ - return reg.test(str) -} - -/** - * @param {string} email - * @returns {Boolean} - */ -export function validEmail(email) { - const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ - return reg.test(email) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function isString(str) { - return typeof str === 'string' || str instanceof String -} - -/** - * @param {Array} arg - * @returns {Boolean} - */ -export function isArray(arg) { - if (typeof Array.isArray === 'undefined') { - return Object.prototype.toString.call(arg) === '[object Array]' - } - return Array.isArray(arg) -} +/** + * 路径匹配器 + * @param {string} pattern + * @param {string} path + * @returns {Boolean} + */ +export function isPathMatch(pattern, path) { + const regexPattern = pattern.replace(/\//g, '\\/').replace(/\*\*/g, '.*').replace(/\*/g, '[^\\/]*') + const regex = new RegExp(`^${regexPattern}$`) + return regex.test(path) +} + +/** + * 判断value字符串是否为空 + * @param {string} value + * @returns {Boolean} + */ +export function isEmpty(value) { + if (value == null || value == "" || value == undefined || value == "undefined") { + return true + } + return false +} + +/** + * 判断url是否是http或https + * @param {string} url + * @returns {Boolean} + */ +export function isHttp(url) { + return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1 +} + +/** + * 判断path是否为外链 + * @param {string} path + * @returns {Boolean} + */ +export function isExternal(path) { + return /^(https?:|mailto:|tel:)/.test(path) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function validUsername(str) { + const valid_map = ['admin', 'editor'] + return valid_map.indexOf(str.trim()) >= 0 +} + +/** + * @param {string} url + * @returns {Boolean} + */ +export function validURL(url) { + const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ + return reg.test(url) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function validLowerCase(str) { + const reg = /^[a-z]+$/ + return reg.test(str) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function validUpperCase(str) { + const reg = /^[A-Z]+$/ + return reg.test(str) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function validAlphabets(str) { + const reg = /^[A-Za-z]+$/ + return reg.test(str) +} + +/** + * @param {string} email + * @returns {Boolean} + */ +export function validEmail(email) { + const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + return reg.test(email) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function isString(str) { + return typeof str === 'string' || str instanceof String +} + +/** + * @param {Array} arg + * @returns {Boolean} + */ +export function isArray(arg) { + if (typeof Array.isArray === 'undefined') { + return Object.prototype.toString.call(arg) === '[object Array]' + } + return Array.isArray(arg) +} diff --git a/ruoyi-ui/src/views/dashboard/BarChart.vue b/acupuncture-ui/src/views/dashboard/BarChart.vue similarity index 95% rename from ruoyi-ui/src/views/dashboard/BarChart.vue rename to acupuncture-ui/src/views/dashboard/BarChart.vue index 116a4317..88e7ef64 100644 --- a/ruoyi-ui/src/views/dashboard/BarChart.vue +++ b/acupuncture-ui/src/views/dashboard/BarChart.vue @@ -1,102 +1,102 @@ - - - + + + diff --git a/ruoyi-ui/src/views/dashboard/LineChart.vue b/acupuncture-ui/src/views/dashboard/LineChart.vue similarity index 95% rename from ruoyi-ui/src/views/dashboard/LineChart.vue rename to acupuncture-ui/src/views/dashboard/LineChart.vue index cd59f240..702ff73f 100644 --- a/ruoyi-ui/src/views/dashboard/LineChart.vue +++ b/acupuncture-ui/src/views/dashboard/LineChart.vue @@ -1,135 +1,135 @@ - - - + + + diff --git a/ruoyi-ui/src/views/dashboard/PanelGroup.vue b/acupuncture-ui/src/views/dashboard/PanelGroup.vue similarity index 95% rename from ruoyi-ui/src/views/dashboard/PanelGroup.vue rename to acupuncture-ui/src/views/dashboard/PanelGroup.vue index 8d3a73bc..1a1081fc 100644 --- a/ruoyi-ui/src/views/dashboard/PanelGroup.vue +++ b/acupuncture-ui/src/views/dashboard/PanelGroup.vue @@ -1,181 +1,181 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/dashboard/PieChart.vue b/acupuncture-ui/src/views/dashboard/PieChart.vue similarity index 95% rename from ruoyi-ui/src/views/dashboard/PieChart.vue rename to acupuncture-ui/src/views/dashboard/PieChart.vue index 70c60767..63f0d849 100644 --- a/ruoyi-ui/src/views/dashboard/PieChart.vue +++ b/acupuncture-ui/src/views/dashboard/PieChart.vue @@ -1,79 +1,79 @@ - - - + + + diff --git a/ruoyi-ui/src/views/dashboard/RaddarChart.vue b/acupuncture-ui/src/views/dashboard/RaddarChart.vue similarity index 96% rename from ruoyi-ui/src/views/dashboard/RaddarChart.vue rename to acupuncture-ui/src/views/dashboard/RaddarChart.vue index 39d879b6..312e018a 100644 --- a/ruoyi-ui/src/views/dashboard/RaddarChart.vue +++ b/acupuncture-ui/src/views/dashboard/RaddarChart.vue @@ -1,116 +1,116 @@ - - - + + + diff --git a/ruoyi-ui/src/views/dashboard/mixins/resize.js b/acupuncture-ui/src/views/dashboard/mixins/resize.js similarity index 96% rename from ruoyi-ui/src/views/dashboard/mixins/resize.js rename to acupuncture-ui/src/views/dashboard/mixins/resize.js index d26194c6..b1e76e94 100644 --- a/ruoyi-ui/src/views/dashboard/mixins/resize.js +++ b/acupuncture-ui/src/views/dashboard/mixins/resize.js @@ -1,56 +1,56 @@ -import { debounce } from '@/utils' - -export default { - data() { - return { - $_sidebarElm: null, - $_resizeHandler: null - } - }, - mounted() { - this.initListener() - }, - activated() { - if (!this.$_resizeHandler) { - // avoid duplication init - this.initListener() - } - - // when keep-alive chart activated, auto resize - this.resize() - }, - beforeDestroy() { - this.destroyListener() - }, - deactivated() { - this.destroyListener() - }, - methods: { - // use $_ for mixins properties - // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential - $_sidebarResizeHandler(e) { - if (e.propertyName === 'width') { - this.$_resizeHandler() - } - }, - initListener() { - this.$_resizeHandler = debounce(() => { - this.resize() - }, 100) - window.addEventListener('resize', this.$_resizeHandler) - - this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0] - this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler) - }, - destroyListener() { - window.removeEventListener('resize', this.$_resizeHandler) - this.$_resizeHandler = null - - this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler) - }, - resize() { - const { chart } = this - chart && chart.resize() - } - } -} +import { debounce } from '@/utils' + +export default { + data() { + return { + $_sidebarElm: null, + $_resizeHandler: null + } + }, + mounted() { + this.initListener() + }, + activated() { + if (!this.$_resizeHandler) { + // avoid duplication init + this.initListener() + } + + // when keep-alive chart activated, auto resize + this.resize() + }, + beforeDestroy() { + this.destroyListener() + }, + deactivated() { + this.destroyListener() + }, + methods: { + // use $_ for mixins properties + // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential + $_sidebarResizeHandler(e) { + if (e.propertyName === 'width') { + this.$_resizeHandler() + } + }, + initListener() { + this.$_resizeHandler = debounce(() => { + this.resize() + }, 100) + window.addEventListener('resize', this.$_resizeHandler) + + this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0] + this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler) + }, + destroyListener() { + window.removeEventListener('resize', this.$_resizeHandler) + this.$_resizeHandler = null + + this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler) + }, + resize() { + const { chart } = this + chart && chart.resize() + } + } +} diff --git a/ruoyi-ui/src/views/error/401.vue b/acupuncture-ui/src/views/error/401.vue similarity index 95% rename from ruoyi-ui/src/views/error/401.vue rename to acupuncture-ui/src/views/error/401.vue index 9664fbaf..448b6ecd 100644 --- a/ruoyi-ui/src/views/error/401.vue +++ b/acupuncture-ui/src/views/error/401.vue @@ -1,88 +1,88 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/error/404.vue b/acupuncture-ui/src/views/error/404.vue similarity index 95% rename from ruoyi-ui/src/views/error/404.vue rename to acupuncture-ui/src/views/error/404.vue index 666d27c8..96f075c1 100644 --- a/ruoyi-ui/src/views/error/404.vue +++ b/acupuncture-ui/src/views/error/404.vue @@ -1,233 +1,233 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/index.vue b/acupuncture-ui/src/views/index.vue similarity index 100% rename from ruoyi-ui/src/views/index.vue rename to acupuncture-ui/src/views/index.vue diff --git a/ruoyi-ui/src/views/index_v1.vue b/acupuncture-ui/src/views/index_v1.vue similarity index 95% rename from ruoyi-ui/src/views/index_v1.vue rename to acupuncture-ui/src/views/index_v1.vue index 4828d880..d2d2ec63 100644 --- a/ruoyi-ui/src/views/index_v1.vue +++ b/acupuncture-ui/src/views/index_v1.vue @@ -1,98 +1,98 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/login.vue b/acupuncture-ui/src/views/login.vue similarity index 100% rename from ruoyi-ui/src/views/login.vue rename to acupuncture-ui/src/views/login.vue diff --git a/ruoyi-ui/src/views/monitor/cache/index.vue b/acupuncture-ui/src/views/monitor/cache/index.vue similarity index 97% rename from ruoyi-ui/src/views/monitor/cache/index.vue rename to acupuncture-ui/src/views/monitor/cache/index.vue index 77acf82c..8d2f3784 100644 --- a/ruoyi-ui/src/views/monitor/cache/index.vue +++ b/acupuncture-ui/src/views/monitor/cache/index.vue @@ -1,148 +1,148 @@ - - - + + + diff --git a/ruoyi-ui/src/views/monitor/cache/list.vue b/acupuncture-ui/src/views/monitor/cache/list.vue similarity index 96% rename from ruoyi-ui/src/views/monitor/cache/list.vue rename to acupuncture-ui/src/views/monitor/cache/list.vue index b808c38a..29a7c741 100644 --- a/ruoyi-ui/src/views/monitor/cache/list.vue +++ b/acupuncture-ui/src/views/monitor/cache/list.vue @@ -1,241 +1,241 @@ - - - + + + diff --git a/ruoyi-ui/src/views/monitor/druid/index.vue b/acupuncture-ui/src/views/monitor/druid/index.vue similarity index 94% rename from ruoyi-ui/src/views/monitor/druid/index.vue rename to acupuncture-ui/src/views/monitor/druid/index.vue index ef915d9e..c6ad585c 100644 --- a/ruoyi-ui/src/views/monitor/druid/index.vue +++ b/acupuncture-ui/src/views/monitor/druid/index.vue @@ -1,15 +1,15 @@ - - + + diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/acupuncture-ui/src/views/monitor/job/index.vue similarity index 100% rename from ruoyi-ui/src/views/monitor/job/index.vue rename to acupuncture-ui/src/views/monitor/job/index.vue diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/acupuncture-ui/src/views/monitor/job/log.vue similarity index 100% rename from ruoyi-ui/src/views/monitor/job/log.vue rename to acupuncture-ui/src/views/monitor/job/log.vue diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/acupuncture-ui/src/views/monitor/logininfor/index.vue similarity index 100% rename from ruoyi-ui/src/views/monitor/logininfor/index.vue rename to acupuncture-ui/src/views/monitor/logininfor/index.vue diff --git a/ruoyi-ui/src/views/monitor/online/index.vue b/acupuncture-ui/src/views/monitor/online/index.vue similarity index 97% rename from ruoyi-ui/src/views/monitor/online/index.vue rename to acupuncture-ui/src/views/monitor/online/index.vue index 64411efa..ad613c96 100644 --- a/ruoyi-ui/src/views/monitor/online/index.vue +++ b/acupuncture-ui/src/views/monitor/online/index.vue @@ -1,122 +1,122 @@ - - - - + + + + diff --git a/ruoyi-ui/src/views/monitor/operlog/index.vue b/acupuncture-ui/src/views/monitor/operlog/index.vue similarity index 100% rename from ruoyi-ui/src/views/monitor/operlog/index.vue rename to acupuncture-ui/src/views/monitor/operlog/index.vue diff --git a/ruoyi-ui/src/views/monitor/server/index.vue b/acupuncture-ui/src/views/monitor/server/index.vue similarity index 98% rename from ruoyi-ui/src/views/monitor/server/index.vue rename to acupuncture-ui/src/views/monitor/server/index.vue index c1feada3..15ffc9a6 100644 --- a/ruoyi-ui/src/views/monitor/server/index.vue +++ b/acupuncture-ui/src/views/monitor/server/index.vue @@ -1,207 +1,207 @@ - - - + + + diff --git a/ruoyi-ui/src/views/redirect.vue b/acupuncture-ui/src/views/redirect.vue similarity index 100% rename from ruoyi-ui/src/views/redirect.vue rename to acupuncture-ui/src/views/redirect.vue diff --git a/ruoyi-ui/src/views/register.vue b/acupuncture-ui/src/views/register.vue similarity index 100% rename from ruoyi-ui/src/views/register.vue rename to acupuncture-ui/src/views/register.vue diff --git a/ruoyi-ui/src/views/system/config/index.vue b/acupuncture-ui/src/views/system/config/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/config/index.vue rename to acupuncture-ui/src/views/system/config/index.vue diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/acupuncture-ui/src/views/system/dept/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/dept/index.vue rename to acupuncture-ui/src/views/system/dept/index.vue diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/acupuncture-ui/src/views/system/dict/data.vue similarity index 96% rename from ruoyi-ui/src/views/system/dict/data.vue rename to acupuncture-ui/src/views/system/dict/data.vue index 28c3bcd8..3befe4a6 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/acupuncture-ui/src/views/system/dict/data.vue @@ -1,402 +1,402 @@ - - - \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/acupuncture-ui/src/views/system/dict/index.vue similarity index 96% rename from ruoyi-ui/src/views/system/dict/index.vue rename to acupuncture-ui/src/views/system/dict/index.vue index 13a5f3d4..6ca54571 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/acupuncture-ui/src/views/system/dict/index.vue @@ -1,347 +1,347 @@ - - - \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/acupuncture-ui/src/views/system/menu/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/menu/index.vue rename to acupuncture-ui/src/views/system/menu/index.vue diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/acupuncture-ui/src/views/system/notice/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/notice/index.vue rename to acupuncture-ui/src/views/system/notice/index.vue diff --git a/ruoyi-ui/src/views/system/post/index.vue b/acupuncture-ui/src/views/system/post/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/post/index.vue rename to acupuncture-ui/src/views/system/post/index.vue diff --git a/ruoyi-ui/src/views/system/role/authUser.vue b/acupuncture-ui/src/views/system/role/authUser.vue similarity index 96% rename from ruoyi-ui/src/views/system/role/authUser.vue rename to acupuncture-ui/src/views/system/role/authUser.vue index 97049639..147aa33e 100644 --- a/ruoyi-ui/src/views/system/role/authUser.vue +++ b/acupuncture-ui/src/views/system/role/authUser.vue @@ -1,199 +1,199 @@ - - - \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/role/index.vue b/acupuncture-ui/src/views/system/role/index.vue similarity index 97% rename from ruoyi-ui/src/views/system/role/index.vue rename to acupuncture-ui/src/views/system/role/index.vue index db861e5f..47419baa 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/acupuncture-ui/src/views/system/role/index.vue @@ -1,605 +1,605 @@ - - - \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/role/selectUser.vue b/acupuncture-ui/src/views/system/role/selectUser.vue similarity index 96% rename from ruoyi-ui/src/views/system/role/selectUser.vue rename to acupuncture-ui/src/views/system/role/selectUser.vue index b4efce81..10a5365b 100644 --- a/ruoyi-ui/src/views/system/role/selectUser.vue +++ b/acupuncture-ui/src/views/system/role/selectUser.vue @@ -1,136 +1,136 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/user/authRole.vue b/acupuncture-ui/src/views/system/user/authRole.vue similarity index 96% rename from ruoyi-ui/src/views/system/user/authRole.vue rename to acupuncture-ui/src/views/system/user/authRole.vue index aeb42225..943710e5 100644 --- a/ruoyi-ui/src/views/system/user/authRole.vue +++ b/acupuncture-ui/src/views/system/user/authRole.vue @@ -1,117 +1,117 @@ - - - \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/user/index.vue b/acupuncture-ui/src/views/system/user/index.vue similarity index 97% rename from ruoyi-ui/src/views/system/user/index.vue rename to acupuncture-ui/src/views/system/user/index.vue index 8ca9711f..1dbc2d14 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/acupuncture-ui/src/views/system/user/index.vue @@ -1,553 +1,553 @@ - - - \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/user/profile/index.vue b/acupuncture-ui/src/views/system/user/profile/index.vue similarity index 96% rename from ruoyi-ui/src/views/system/user/profile/index.vue rename to acupuncture-ui/src/views/system/user/profile/index.vue index d22b8903..529c5644 100644 --- a/ruoyi-ui/src/views/system/user/profile/index.vue +++ b/acupuncture-ui/src/views/system/user/profile/index.vue @@ -1,91 +1,91 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue b/acupuncture-ui/src/views/system/user/profile/resetPwd.vue similarity index 97% rename from ruoyi-ui/src/views/system/user/profile/resetPwd.vue rename to acupuncture-ui/src/views/system/user/profile/resetPwd.vue index 561a30ea..f329e6e8 100644 --- a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue +++ b/acupuncture-ui/src/views/system/user/profile/resetPwd.vue @@ -1,69 +1,69 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/acupuncture-ui/src/views/system/user/profile/userAvatar.vue similarity index 100% rename from ruoyi-ui/src/views/system/user/profile/userAvatar.vue rename to acupuncture-ui/src/views/system/user/profile/userAvatar.vue diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/acupuncture-ui/src/views/system/user/profile/userInfo.vue similarity index 96% rename from ruoyi-ui/src/views/system/user/profile/userInfo.vue rename to acupuncture-ui/src/views/system/user/profile/userInfo.vue index df334599..c970dc98 100644 --- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue +++ b/acupuncture-ui/src/views/system/user/profile/userInfo.vue @@ -1,88 +1,88 @@ - - - + + + diff --git a/ruoyi-ui/src/views/tool/build/CodeTypeDialog.vue b/acupuncture-ui/src/views/tool/build/CodeTypeDialog.vue similarity index 100% rename from ruoyi-ui/src/views/tool/build/CodeTypeDialog.vue rename to acupuncture-ui/src/views/tool/build/CodeTypeDialog.vue diff --git a/ruoyi-ui/src/views/tool/build/DraggableItem.vue b/acupuncture-ui/src/views/tool/build/DraggableItem.vue similarity index 96% rename from ruoyi-ui/src/views/tool/build/DraggableItem.vue rename to acupuncture-ui/src/views/tool/build/DraggableItem.vue index f669ac0e..e881778f 100644 --- a/ruoyi-ui/src/views/tool/build/DraggableItem.vue +++ b/acupuncture-ui/src/views/tool/build/DraggableItem.vue @@ -1,100 +1,100 @@ - + diff --git a/ruoyi-ui/src/views/tool/build/IconsDialog.vue b/acupuncture-ui/src/views/tool/build/IconsDialog.vue similarity index 95% rename from ruoyi-ui/src/views/tool/build/IconsDialog.vue rename to acupuncture-ui/src/views/tool/build/IconsDialog.vue index 0d127783..958be50c 100644 --- a/ruoyi-ui/src/views/tool/build/IconsDialog.vue +++ b/acupuncture-ui/src/views/tool/build/IconsDialog.vue @@ -1,123 +1,123 @@ - - - + + + diff --git a/ruoyi-ui/src/views/tool/build/RightPanel.vue b/acupuncture-ui/src/views/tool/build/RightPanel.vue similarity index 97% rename from ruoyi-ui/src/views/tool/build/RightPanel.vue rename to acupuncture-ui/src/views/tool/build/RightPanel.vue index 863d74c0..c2760eb5 100644 --- a/ruoyi-ui/src/views/tool/build/RightPanel.vue +++ b/acupuncture-ui/src/views/tool/build/RightPanel.vue @@ -1,946 +1,946 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/tool/build/TreeNodeDialog.vue b/acupuncture-ui/src/views/tool/build/TreeNodeDialog.vue similarity index 100% rename from ruoyi-ui/src/views/tool/build/TreeNodeDialog.vue rename to acupuncture-ui/src/views/tool/build/TreeNodeDialog.vue diff --git a/ruoyi-ui/src/views/tool/build/index.vue b/acupuncture-ui/src/views/tool/build/index.vue similarity index 100% rename from ruoyi-ui/src/views/tool/build/index.vue rename to acupuncture-ui/src/views/tool/build/index.vue diff --git a/ruoyi-ui/src/views/tool/gen/basicInfoForm.vue b/acupuncture-ui/src/views/tool/gen/basicInfoForm.vue similarity index 96% rename from ruoyi-ui/src/views/tool/gen/basicInfoForm.vue rename to acupuncture-ui/src/views/tool/gen/basicInfoForm.vue index 75dc3bf3..70295298 100644 --- a/ruoyi-ui/src/views/tool/gen/basicInfoForm.vue +++ b/acupuncture-ui/src/views/tool/gen/basicInfoForm.vue @@ -1,60 +1,60 @@ - - - + + + diff --git a/ruoyi-ui/src/views/tool/gen/createTable.vue b/acupuncture-ui/src/views/tool/gen/createTable.vue similarity index 100% rename from ruoyi-ui/src/views/tool/gen/createTable.vue rename to acupuncture-ui/src/views/tool/gen/createTable.vue diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/acupuncture-ui/src/views/tool/gen/editTable.vue similarity index 100% rename from ruoyi-ui/src/views/tool/gen/editTable.vue rename to acupuncture-ui/src/views/tool/gen/editTable.vue diff --git a/ruoyi-ui/src/views/tool/gen/genInfoForm.vue b/acupuncture-ui/src/views/tool/gen/genInfoForm.vue similarity index 100% rename from ruoyi-ui/src/views/tool/gen/genInfoForm.vue rename to acupuncture-ui/src/views/tool/gen/genInfoForm.vue diff --git a/ruoyi-ui/src/views/tool/gen/importTable.vue b/acupuncture-ui/src/views/tool/gen/importTable.vue similarity index 96% rename from ruoyi-ui/src/views/tool/gen/importTable.vue rename to acupuncture-ui/src/views/tool/gen/importTable.vue index 9d738be0..3ea9532b 100644 --- a/ruoyi-ui/src/views/tool/gen/importTable.vue +++ b/acupuncture-ui/src/views/tool/gen/importTable.vue @@ -1,120 +1,120 @@ - - - + + + diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/acupuncture-ui/src/views/tool/gen/index.vue similarity index 100% rename from ruoyi-ui/src/views/tool/gen/index.vue rename to acupuncture-ui/src/views/tool/gen/index.vue diff --git a/ruoyi-ui/src/views/tool/swagger/index.vue b/acupuncture-ui/src/views/tool/swagger/index.vue similarity index 94% rename from ruoyi-ui/src/views/tool/swagger/index.vue rename to acupuncture-ui/src/views/tool/swagger/index.vue index 75018911..b8becc67 100644 --- a/ruoyi-ui/src/views/tool/swagger/index.vue +++ b/acupuncture-ui/src/views/tool/swagger/index.vue @@ -1,15 +1,15 @@ - - + + diff --git a/ruoyi-ui/vue.config.js b/acupuncture-ui/vue.config.js similarity index 100% rename from ruoyi-ui/vue.config.js rename to acupuncture-ui/vue.config.js