diff --git a/.cz-config.js b/.cz-config.js new file mode 100644 index 0000000..769a2d7 --- /dev/null +++ b/.cz-config.js @@ -0,0 +1,46 @@ +"use strict"; +module.exports = { + types: [ + { value: "✨新增", name: "新增: 新的内容" }, + { value: "🐛修复", name: "修复: 修复一个Bug" }, + { value: "📝文档", name: "文档: 变更的只有文档" }, + { value: "💄格式", name: "格式: 空格, 分号等格式修复" }, + { value: "♻️重构", name: "重构: 代码重构,注意和特性、修复区分开" }, + { value: "⚡️性能", name: "性能: 提升性能" }, + { value: "✅测试", name: "测试: 添加一个测试" }, + { value: "🔧工具", name: "工具: 开发工具变动(构建、脚手架工具等)" }, + { value: "⏪回滚", name: "回滚: 代码回退" } + ], + scopes: [ + { name: "leetcode" }, + { name: "javascript" }, + { name: "typescript" }, + { name: "Vue" }, + { name: "node" } + ], + // it needs to match the value for field type. Eg.: 'fix' + /* scopeOverrides: { + fix: [ + {name: 'merge'}, + {name: 'style'}, + {name: 'e2eTest'}, + {name: 'unitTest'} + ] + }, */ + // override the messages, defaults are as follows + messages: { + type: "选择一种你的提交类型:", + scope: "选择一个scope (可选):", + // used if allowCustomScopes is true + customScope: "Denote the SCOPE of this change:", + subject: "短说明:\n", + body: '长说明,使用"|"换行(可选):\n', + breaking: "非兼容性说明 (可选):\n", + footer: "关联关闭的issue,例如:#31, #34(可选):\n", + confirmCommit: "确定提交说明?(yes/no)" + }, + allowCustomScopes: true, + allowBreakingChanges: ["特性", "修复"], + // limit subject length + subjectLimit: 100 +}; diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 7034f9b..0000000 --- a/.editorconfig +++ /dev/null @@ -1,22 +0,0 @@ -# 告诉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/.env.development b/.env.development index daadcde..52b16b8 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,14 @@ # 页面标题 -VUE_APP_TITLE = 成本管理系统 +VITE_APP_TITLE='Qomo Ai' # 开发环境配置 -ENV = 'development' +VITE_APP_ENV='development' -# 若依管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' +# 子应用路径配置 +VITE_APP_PATH='/layoutApp/testApp' -# 路由懒加载 -VUE_CLI_BABEL_TRANSPILE_MODULES = true +# 子应用名称 +VITE_APP_NAME='testApp' + +# 开发环境 +VITE_APP_BASE_API=http://172.16.1.141:8082 diff --git a/.env.production b/.env.production index 8875764..edd4434 100644 --- a/.env.production +++ b/.env.production @@ -1,8 +1,15 @@ # 页面标题 -VUE_APP_TITLE = 成本管理系统 +VITE_APP_TITLE='Qomo Ai' # 生产环境配置 -ENV = 'production' +VITE_APP_ENV='production' -# 若依管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +# 子应用路径配置 +VITE_APP_PATH='/layoutApp/testApp' + +# 子应用名称 +VITE_APP_NAME='testApp' + + +# 是否在打包时开启压缩,支持 gzip 和 brotli +VITE_BUILD_COMPRESS=gzip diff --git a/.env.staging b/.env.staging deleted file mode 100644 index 68b570b..0000000 --- a/.env.staging +++ /dev/null @@ -1,10 +0,0 @@ -# 页面标题 -VUE_APP_TITLE = 若依管理系统 - -NODE_ENV = production - -# 测试环境配置 -ENV = 'staging' - -# 若依管理系统/测试环境 -VUE_APP_BASE_API = '/API' diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 89be6f6..0000000 --- a/.eslintignore +++ /dev/null @@ -1,10 +0,0 @@ -# 忽略build目录下类型为js的文件的语法检查 -build/*.js -# 忽略src/assets目录下文件的语法检查 -src/assets -# 忽略public目录下文件的语法检查 -public -# 忽略当前目录下为js的文件的语法检查 -*.js -# 忽略当前目录下为vue的文件的语法检查 -*.vue \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 82bbdee..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,199 +0,0 @@ -// 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/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..134c1a4 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,12 @@ +{ + "env": { + "browser": true, + "es2021": true + }, + "extends": ["eslint:recommended", "plugin:vue/vue3-essential", "prettier "], + "parserOptions": { + "ecmaVersion": "latest" + }, + "plugins": ["vue"], + "rules": {} +} diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 0000000..a4fea27 --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,4 @@ +{ + "*.{js,jsx,vue}": ["prettier --write ."], + "*.md": ["prettier --write"] +} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..35e540d --- /dev/null +++ b/.npmrc @@ -0,0 +1,4 @@ +# pnpm 配置 +shamefully-hoist=true +auto-install-peers=true +strict-peer-dependencies=false diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..6a9e3fb --- /dev/null +++ b/.prettierrc @@ -0,0 +1,15 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": false, + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "trailingComma": "none", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "avoid", + "rangeStart": 0, + "endOfLine": "crlf" +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8564f29 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2018 RuoYi + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 4265caf..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,2 +0,0 @@ -# cost-frontend - diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index c8267b2..0000000 --- a/babel.config.js +++ /dev/null @@ -1,13 +0,0 @@ -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/bin/build.bat b/bin/build.bat deleted file mode 100644 index dda590d..0000000 --- a/bin/build.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo off -echo. -echo [ÐÅϢ] ´ò°üWeb¹¤³̣¬Éú³ÉdistÎļþ¡£ -echo. - -%~d0 -cd %~dp0 - -cd .. -npm run build:prod - -pause \ No newline at end of file diff --git a/bin/package.bat b/bin/package.bat deleted file mode 100644 index 0e5bc0f..0000000 --- a/bin/package.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo off -echo. -echo [ÐÅϢ] °²װWeb¹¤³̣¬Éú³Énode_modulesÎļþ¡£ -echo. - -%~d0 -cd %~dp0 - -cd .. -npm install --registry=https://registry.npmmirror.com - -pause \ No newline at end of file diff --git a/bin/run-web.bat b/bin/run-web.bat deleted file mode 100644 index d30deae..0000000 --- a/bin/run-web.bat +++ /dev/null @@ -1,12 +0,0 @@ -@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/build/index.js b/build/index.js deleted file mode 100644 index 0c57de2..0000000 --- a/build/index.js +++ /dev/null @@ -1,35 +0,0 @@ -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/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..13dc785 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,4 @@ +module.exports = { + extends: ["cz"], + rules: {} +}; diff --git a/html/ie.html b/html/ie.html new file mode 100644 index 0000000..e15c125 --- /dev/null +++ b/html/ie.html @@ -0,0 +1,262 @@ + + +
+ ++ 您正在使用 Internet Explorer + 的早期版本(IE11以下版本或使用该内核的浏览器)。这意味着在升级浏览器前,您将无法访问此网站。 +
++ 自 2016 年 1 月 12 日起,Microsoft 不再为 IE 11 + 以下版本提供相应支持和更新。没有关键的浏览器安全更新,您的电脑可能易受有害病毒、间谍软件和其他恶意软件的攻击,它们可以窃取或损害您的业务数据和信息。请参阅 + 微软对 Internet Explorer 早期版本的支持将于 2016 年 1 月 12 + 日结束的说明 + 。 +
++ 推荐使用以下浏览器的最新版本。如果您的电脑已有以下浏览器的最新版本则直接使用该浏览器访问即可。 +
+