diff --git a/yxt-as-ui/.editorconfig b/yxt-as-ui/.editorconfig deleted file mode 100644 index ea6e20f5b2..0000000000 --- a/yxt-as-ui/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -# http://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -insert_final_newline = false -trim_trailing_whitespace = false diff --git a/yxt-as-ui/.env.development b/yxt-as-ui/.env.development deleted file mode 100644 index 284a65afb4..0000000000 --- a/yxt-as-ui/.env.development +++ /dev/null @@ -1,10 +0,0 @@ -# just a flag -ENV = 'development' - -# base api -VUE_APP_BASE_API = '/api' - -## 配置测试和本地开发时的 接口地址 -##VUE_APP_URL = "http://26077a35f5.wicp.vip" -VUE_APP_URL = "http://anrui.yyundong.com" - diff --git a/yxt-as-ui/.env.production b/yxt-as-ui/.env.production deleted file mode 100644 index 61b8a1dead..0000000000 --- a/yxt-as-ui/.env.production +++ /dev/null @@ -1,9 +0,0 @@ -# just a flag -ENV = 'production' - -# base api -VUE_APP_BASE_API = '/api' - -## 配置 正式接口地址 -VUE_APP_URL = "http://218.11.12.154:8111" - diff --git a/yxt-as-ui/.env.staging b/yxt-as-ui/.env.staging deleted file mode 100644 index a8793a0989..0000000000 --- a/yxt-as-ui/.env.staging +++ /dev/null @@ -1,8 +0,0 @@ -NODE_ENV = production - -# just a flag -ENV = 'staging' - -# base api -VUE_APP_BASE_API = '/stage-api' - diff --git a/yxt-as-ui/.eslintignore b/yxt-as-ui/.eslintignore deleted file mode 100644 index e6529fc09c..0000000000 --- a/yxt-as-ui/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -build/*.js -src/assets -public -dist diff --git a/yxt-as-ui/.eslintrc.js b/yxt-as-ui/.eslintrc.js deleted file mode 100644 index bb624b1ca3..0000000000 --- a/yxt-as-ui/.eslintrc.js +++ /dev/null @@ -1,199 +0,0 @@ -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 - // }], - 'indent': 'off', - '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/yxt-as-ui/.gitignore b/yxt-as-ui/.gitignore deleted file mode 100644 index 9ad28d23dd..0000000000 --- a/yxt-as-ui/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -.DS_Store -node_modules/ -dist/ -npm-debug.log* -yarn-debug.log* -yarn-error.log* -package-lock.json -tests/**/coverage/ - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln diff --git a/yxt-as-ui/.project b/yxt-as-ui/.project deleted file mode 100644 index a7648aaa62..0000000000 --- a/yxt-as-ui/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - anrui-system-ui - - - - - - com.aptana.ide.core.unifiedBuilder - - - - - - com.aptana.projects.webnature - - - - 1629107336958 - - 26 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-node_modules - - - - diff --git a/yxt-as-ui/.travis.yml b/yxt-as-ui/.travis.yml deleted file mode 100644 index f4be7a0855..0000000000 --- a/yxt-as-ui/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: 10 -script: npm run test -notifications: - email: false diff --git a/yxt-as-ui/LICENSE b/yxt-as-ui/LICENSE deleted file mode 100644 index 61515750df..0000000000 --- a/yxt-as-ui/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017-present PanJiaChen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/yxt-as-ui/README-zh.md b/yxt-as-ui/README-zh.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/yxt-as-ui/README.md b/yxt-as-ui/README.md deleted file mode 100644 index a2f3c71543..0000000000 --- a/yxt-as-ui/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# vue-admin-template - -English | [简体中文](./README-zh.md) - -> A minimal vue admin template with Element UI & axios & iconfont & permission control & lint - -**Live demo:** http://panjiachen.github.io/vue-admin-template - - -**The current version is `v4.0+` build on `vue-cli`. If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0), it does not rely on `vue-cli`** - -## Build Setup - -```bash -# clone the project -git clone https://github.com/PanJiaChen/vue-admin-template.git - -# enter the project directory -cd vue-admin-template - -# install dependency -npm install - -# develop -npm run dev -``` - -This will automatically open http://localhost:9528 - -## Build - -```bash -# build for test environment -npm run build:stage - -# build for production environment -npm run build:prod -``` - -## Advanced - -```bash -# preview the release environment effect -npm run preview - -# preview the release environment effect + static resource analysis -npm run preview -- --report - -# code format check -npm run lint - -# code format check and auto fix -npm run lint -- --fix -``` - -Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information - -## Demo - -![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif) - -## Extra - -If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control) - -For `typescript` version, you can use [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour)) - -## Related Project - -- [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) - -- [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) - -- [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) - -- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312) - -## Browsers support - -Modern browsers and Internet Explorer 10+. - -| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | -| --------- | --------- | --------- | --------- | -| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions - -## License - -[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license. - -Copyright (c) 2017-present PanJiaChen diff --git a/yxt-as-ui/babel.config.js b/yxt-as-ui/babel.config.js deleted file mode 100644 index fb82b2715f..0000000000 --- a/yxt-as-ui/babel.config.js +++ /dev/null @@ -1,14 +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. - // https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html - 'plugins': ['dynamic-import-node'] - } - } -} diff --git a/yxt-as-ui/build/index.js b/yxt-as-ui/build/index.js deleted file mode 100644 index 0c57de2aad..0000000000 --- a/yxt-as-ui/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/yxt-as-ui/jest.config.js b/yxt-as-ui/jest.config.js deleted file mode 100644 index 143cdc868c..0000000000 --- a/yxt-as-ui/jest.config.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - moduleFileExtensions: ['js', 'jsx', 'json', 'vue'], - transform: { - '^.+\\.vue$': 'vue-jest', - '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': - 'jest-transform-stub', - '^.+\\.jsx?$': 'babel-jest' - }, - moduleNameMapper: { - '^@/(.*)$': '/src/$1' - }, - snapshotSerializers: ['jest-serializer-vue'], - testMatch: [ - '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)' - ], - collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'], - coverageDirectory: '/tests/unit/coverage', - // 'collectCoverage': true, - 'coverageReporters': [ - 'lcov', - 'text-summary' - ], - testURL: 'http://localhost/' -} diff --git a/yxt-as-ui/jsconfig.json b/yxt-as-ui/jsconfig.json deleted file mode 100644 index ed079e2b9b..0000000000 --- a/yxt-as-ui/jsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": "./", - "paths": { - "@/*": ["src/*"] - } - }, - "exclude": ["node_modules", "dist"] -} diff --git a/yxt-as-ui/mock/index.js b/yxt-as-ui/mock/index.js deleted file mode 100644 index c514c13573..0000000000 --- a/yxt-as-ui/mock/index.js +++ /dev/null @@ -1,57 +0,0 @@ -const Mock = require('mockjs') -const { param2Obj } = require('./utils') - -const user = require('./user') -const table = require('./table') - -const mocks = [ - ...user, - ...table -] - -// for front mock -// please use it cautiously, it will redefine XMLHttpRequest, -// which will cause many of your third-party libraries to be invalidated(like progress event). -function mockXHR() { - // mock patch - // https://github.com/nuysoft/Mock/issues/300 - Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send - Mock.XHR.prototype.send = function() { - if (this.custom.xhr) { - this.custom.xhr.withCredentials = this.withCredentials || false - - if (this.responseType) { - this.custom.xhr.responseType = this.responseType - } - } - this.proxy_send(...arguments) - } - - function XHR2ExpressReqWrap(respond) { - return function(options) { - let result = null - if (respond instanceof Function) { - const { body, type, url } = options - // https://expressjs.com/en/4x/api.html#req - result = respond({ - method: type, - body: JSON.parse(body), - query: param2Obj(url) - }) - } else { - result = respond - } - return Mock.mock(result) - } - } - - for (const i of mocks) { - Mock.mock(new RegExp(i.url), i.type || 'get', XHR2ExpressReqWrap(i.response)) - } -} - -module.exports = { - mocks, - mockXHR -} - diff --git a/yxt-as-ui/mock/mock-server.js b/yxt-as-ui/mock/mock-server.js deleted file mode 100644 index 8941ec0f80..0000000000 --- a/yxt-as-ui/mock/mock-server.js +++ /dev/null @@ -1,81 +0,0 @@ -const chokidar = require('chokidar') -const bodyParser = require('body-parser') -const chalk = require('chalk') -const path = require('path') -const Mock = require('mockjs') - -const mockDir = path.join(process.cwd(), 'mock') - -function registerRoutes(app) { - let mockLastIndex - const { mocks } = require('./index.js') - const mocksForServer = mocks.map(route => { - return responseFake(route.url, route.type, route.response) - }) - for (const mock of mocksForServer) { - app[mock.type](mock.url, mock.response) - mockLastIndex = app._router.stack.length - } - const mockRoutesLength = Object.keys(mocksForServer).length - return { - mockRoutesLength: mockRoutesLength, - mockStartIndex: mockLastIndex - mockRoutesLength - } -} - -function unregisterRoutes() { - Object.keys(require.cache).forEach(i => { - if (i.includes(mockDir)) { - delete require.cache[require.resolve(i)] - } - }) -} - -// for mock server -const responseFake = (url, type, respond) => { - return { - url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`), - type: type || 'get', - response(req, res) { - console.log('request invoke:' + req.path) - res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond)) - } - } -} - -module.exports = app => { - // parse app.body - // https://expressjs.com/en/4x/api.html#req.body - app.use(bodyParser.json()) - app.use(bodyParser.urlencoded({ - extended: true - })) - - const mockRoutes = registerRoutes(app) - var mockRoutesLength = mockRoutes.mockRoutesLength - var mockStartIndex = mockRoutes.mockStartIndex - - // watch files, hot reload mock server - chokidar.watch(mockDir, { - ignored: /mock-server/, - ignoreInitial: true - }).on('all', (event, path) => { - if (event === 'change' || event === 'add') { - try { - // remove mock routes stack - app._router.stack.splice(mockStartIndex, mockRoutesLength) - - // clear routes cache - unregisterRoutes() - - const mockRoutes = registerRoutes(app) - mockRoutesLength = mockRoutes.mockRoutesLength - mockStartIndex = mockRoutes.mockStartIndex - - console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`)) - } catch (error) { - console.log(chalk.redBright(error)) - } - } - }) -} diff --git a/yxt-as-ui/mock/table.js b/yxt-as-ui/mock/table.js deleted file mode 100644 index bd0e0133e1..0000000000 --- a/yxt-as-ui/mock/table.js +++ /dev/null @@ -1,29 +0,0 @@ -const Mock = require('mockjs') - -const data = Mock.mock({ - 'items|30': [{ - id: '@id', - title: '@sentence(10, 20)', - 'status|1': ['published', 'draft', 'deleted'], - author: 'name', - display_time: '@datetime', - pageviews: '@integer(300, 5000)' - }] -}) - -module.exports = [ - { - url: '/vue-admin-template/table/list', - type: 'get', - response: config => { - const items = data.items - return { - code: 20000, - data: { - total: items.length, - items: items - } - } - } - } -] diff --git a/yxt-as-ui/mock/user.js b/yxt-as-ui/mock/user.js deleted file mode 100644 index 7555338562..0000000000 --- a/yxt-as-ui/mock/user.js +++ /dev/null @@ -1,84 +0,0 @@ - -const tokens = { - admin: { - token: 'admin-token' - }, - editor: { - token: 'editor-token' - } -} - -const users = { - 'admin-token': { - roles: ['admin'], - introduction: 'I am a super administrator', - avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', - name: 'Super Admin' - }, - 'editor-token': { - roles: ['editor'], - introduction: 'I am an editor', - avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', - name: 'Normal Editor' - } -} - -module.exports = [ - // user login - { - url: '/vue-admin-template/user/login', - type: 'post', - response: config => { - const { username } = config.body - const token = tokens[username] - - // mock error - if (!token) { - return { - code: 60204, - message: 'Account and password are incorrect.' - } - } - - return { - code: 20000, - data: token - } - } - }, - - // get user info - { - url: '/vue-admin-template/user/info\.*', - type: 'get', - response: config => { - const { token } = config.query - const info = users[token] - - // mock error - if (!info) { - return { - code: 50008, - message: 'Login failed, unable to get user details.' - } - } - - return { - code: 20000, - data: info - } - } - }, - - // user logout - { - url: '/vue-admin-template/user/logout', - type: 'post', - response: _ => { - return { - code: 20000, - data: 'success' - } - } - } -] diff --git a/yxt-as-ui/mock/utils.js b/yxt-as-ui/mock/utils.js deleted file mode 100644 index 95cc27d5fe..0000000000 --- a/yxt-as-ui/mock/utils.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @param {string} url - * @returns {Object} - */ -function param2Obj(url) { - const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') - if (!search) { - return {} - } - const obj = {} - const searchArr = search.split('&') - searchArr.forEach(v => { - const index = v.indexOf('=') - if (index !== -1) { - const name = v.substring(0, index) - const val = v.substring(index + 1, v.length) - obj[name] = val - } - }) - return obj -} - -module.exports = { - param2Obj -} diff --git a/yxt-as-ui/package.json b/yxt-as-ui/package.json deleted file mode 100644 index 48c94f7525..0000000000 --- a/yxt-as-ui/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "admin-template", - "version": "4.4.0", - "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", - "author": "Pan ", - "scripts": { - "dev": "vue-cli-service serve", - "build:prod": "vue-cli-service build", - "build:stage": "vue-cli-service build --mode staging", - "preview": "node build/index.js --preview", - "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", - "lint": "eslint --ext .js,.vue src", - "test:unit": "jest --clearCache && vue-cli-service test:unit", - "test:ci": "npm run lint && npm run test:unit" - }, - "dependencies": { - "axios": "0.18.1", - "core-js": "^3.22.5", - "element-ui": "2.13.2", - "js-cookie": "2.2.0", - "normalize.css": "7.0.0", - "nprogress": "0.2.0", - "path-to-regexp": "2.4.0", - "portfinder": "^1.0.21", - "qs": "^6.9.4", - "sass-resources-loader": "^2.1.1", - "viewerjs": "^1.9.0", - "vue": "2.6.10", - "vue-amap": "^0.5.10", - "vue-router": "3.0.6", - "vuex": "3.1.0", - "vuex-persistedstate": "^4.0.0" - }, - "devDependencies": { - "@vue/cli-plugin-babel": "4.4.4", - "@vue/cli-plugin-eslint": "4.4.4", - "@vue/cli-plugin-unit-jest": "4.4.4", - "@vue/cli-service": "4.4.4", - "@vue/test-utils": "1.0.0-beta.29", - "autoprefixer": "9.5.1", - "babel-eslint": "10.1.0", - "babel-jest": "23.6.0", - "babel-plugin-dynamic-import-node": "2.3.3", - "babel-polyfill": "^6.26.0", - "chalk": "2.4.2", - "connect": "3.6.6", - "eslint": "6.7.2", - "eslint-plugin-vue": "6.2.2", - "html-webpack-plugin": "3.2.0", - "mockjs": "1.0.1-beta3", - "runjs": "4.3.2", - "sass": "1.26.8", - "sass-loader": "8.0.2", - "script-ext-html-webpack-plugin": "2.1.3", - "serve-static": "1.13.2", - "svg-sprite-loader": "4.1.3", - "svgo": "1.2.2", - "vue-template-compiler": "2.6.10" - }, - "browserslist": [ - "> 1%", - "last 2 versions" - ], - "engines": { - "node": ">=8.9", - "npm": ">= 3.0.0" - }, - "license": "MIT" -} diff --git a/yxt-as-ui/postcss.config.js b/yxt-as-ui/postcss.config.js deleted file mode 100644 index 10473efcf8..0000000000 --- a/yxt-as-ui/postcss.config.js +++ /dev/null @@ -1,8 +0,0 @@ -// https://github.com/michael-ciniawsky/postcss-load-config - -module.exports = { - 'plugins': { - // to edit target browsers: use "browserslist" field in package.json - 'autoprefixer': {} - } -} diff --git a/yxt-as-ui/public/favicon.ico b/yxt-as-ui/public/favicon.ico deleted file mode 100644 index 34b63ac63a..0000000000 Binary files a/yxt-as-ui/public/favicon.ico and /dev/null differ diff --git a/yxt-as-ui/public/image/liuchengtu.jpg b/yxt-as-ui/public/image/liuchengtu.jpg deleted file mode 100644 index 8d891be497..0000000000 Binary files a/yxt-as-ui/public/image/liuchengtu.jpg and /dev/null differ diff --git a/yxt-as-ui/public/index.html b/yxt-as-ui/public/index.html deleted file mode 100644 index fa2be9164a..0000000000 --- a/yxt-as-ui/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - <%= webpackConfig.name %> - - - -
- - - diff --git a/yxt-as-ui/src/App.vue b/yxt-as-ui/src/App.vue deleted file mode 100644 index c65a59abd6..0000000000 --- a/yxt-as-ui/src/App.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/yxt-as-ui/src/api/Common/Upload.js b/yxt-as-ui/src/api/Common/Upload.js deleted file mode 100644 index 6f5f0c578a..0000000000 --- a/yxt-as-ui/src/api/Common/Upload.js +++ /dev/null @@ -1,4 +0,0 @@ -import request from '@/utils/request' -// 上传图片 - -export const uploadFile = '/api/riskcenter/file/upload' diff --git a/yxt-as-ui/src/api/Common/areaPicker.js b/yxt-as-ui/src/api/Common/areaPicker.js deleted file mode 100644 index ed87a6bf8d..0000000000 --- a/yxt-as-ui/src/api/Common/areaPicker.js +++ /dev/null @@ -1,49 +0,0 @@ -import request from '@/utils/request' - -//区域获取省 -// export function getProvince(data) { -// return request({ -// url: '/system/region/getProvince', -// method: 'get' -// }) -// } -// //根据省sid获取该省的所有市 -// export function getCity(data) { -// return request({ -// url: '/system/region/getCity', -// method: 'get', -// params: data -// }) -// } -// //根据市sid获取该市的所有县区 -// export function getCounty(data) { -// return request({ -// url: '/system/region/getCounty', -// method: 'get', -// params: data -// }) -// } -// 获取省/portal/v1/regions/getProvince -export function getProvince(data) { - return request({ - url: '/portal/v1/regions/getProvince',data, - method: 'get', - params:data, - }) -} -// 根据省sid获取该省的所有市 -export function getCity(data) { - return request({ - url: '/portal/v1/regions/getCity', - params:data, - method: 'get', - }) -} -// 根据市sid获取该市的所有县区 -export function getCounty(data) { - return request({ - url: '/portal/v1/regions/getCounty', - method: 'get', - params:data, - }) -} diff --git a/yxt-as-ui/src/api/Common/dictcommons.js b/yxt-as-ui/src/api/Common/dictcommons.js deleted file mode 100644 index d952e303a6..0000000000 --- a/yxt-as-ui/src/api/Common/dictcommons.js +++ /dev/null @@ -1,135 +0,0 @@ -import request from '@/utils/request' - -export function typeValues(data) { - return request({ - url: '/portal/v1/dictcommons/typeValues', - method: 'get', - params: data - }) -} - -// 根据当前登录人orgSidPath(全路径sid)查询分公司 -export function getOrgSidByPath(data) { - return request({ - url: '/portal/v1/sysstafforg/getOrgSidByPath', - method: 'get', - params: data - }) -} - -// 根据分公司sid查询分公司名称 -export function fetchBySid(sid) { - return request({ - url: 'portal/v1/sysorganization/fetchBySid/' + sid, - method: 'get' - }) -} - -// 根据当前登录用户sid获取本分公司下的销售部门和销售专员 -export function selectOrgList(data) { - return request({ - url: '/portal/v1/sysorganization/selectOrgList', - method: 'get', - params: data - }) -} - -// 根据当前登录用户全路径sidPath获取本分公司下的资方信息 -export function selectListByOrgPath(data) { - return request({ - url: '/riskcenter/v1/loanfinbank/selectListByOrgPath', - method: 'get', - params: data - }) -} - -// 根据当前登录用户的分公司sid获取本分公司下的车型信息 -export function selModelByUseOrgSid(data) { - return request({ - url: '/base/basevehmodelconfig/selModelByUseOrgSid', - method: 'post', - params: data - }) -} - -// 根据当前登录用户的全路径sidPath、用户sid、客户类型(01个人、02企业)等获取客户信息 -export function selectCustomerList(data) { - return request({ - url: '/crm/v1/crmcustomertemp/selectCustomerList', - method: 'get', - params: data - }) -} - -// 当前用户创建申请时判断该用户是否有该菜单的操作权限 -export function selectHaveMessage(data) { - return request({ - url: '/portal/v1/sysuser/selectHaveMessage ', - method: 'post', - data: data, - headers: { 'Content-Type': 'application/json' } - }) -} - -// 根据当前登录用户的角色获取菜单分页列表页面右上角按钮的隐藏 -export function getButtonPermissions(data) { - return request({ - url: '/portal/v1/sysfunction/getButtonPermissions', - method: 'post', - data: data, - headers: { 'Content-Type': 'application/json' } - }) -} - -// 根据分公司sid获取该分公司下的所有供应商 -export function getGysByOrgSid(data) { - return request({ - url: '/base/v1/basemanufacturer/getGysByOrgSid', - method: 'post', - params: data - }) -} - -// 根据分公司sid获取该分公司下的所有供应商 -export function getGysTypeByOrgSid(data) { - return request({ - url: '/base/v1/basemanufacturer/getGysTypeByOrgSid', - method: 'post', - params: data - }) -} - -// 根据分公司全路径sid和车型sid获取合格证公告型号 -export function getAnnounceList(data) { - return request({ - url: '/base/v1/basevehmodelannouncementmodel/getAnnounceList', - method: 'get', - params: data - }) -} - -// 根据分公司全路径sid、当前登录用户sid、是否打包获取已备案(有效期内)的产品政策信息 -export function selectList(data) { - return request({ - url: '/riskcenter/v1/LoanFinPolicy/selectList', - method: 'get', - params: data - }) -} - -// 获取产品政策下的其它融信息,或分公司下备案通过的其它融 -export function selectListByOther(data) { - return request({ - url: '/riskcenter/v1/LoanFinOtherPolicy/selectList', - method: 'get', - params: data - }) -} - -// 销售订单--编辑、详情初始化 -export function fetchDetails(data) { - return request({ - url: '/buscenter/v1/bussalesorder/fetchDetailsBySid/' + data, - method: 'get' - }) -} diff --git a/yxt-as-ui/src/api/Common/permission.js b/yxt-as-ui/src/api/Common/permission.js deleted file mode 100644 index 5c3b5622ca..0000000000 --- a/yxt-as-ui/src/api/Common/permission.js +++ /dev/null @@ -1,13 +0,0 @@ -import request from '@/utils/request' -// 请求按钮权限 -export default { - - // 查询分页列表,输入当前路径和userSid,返回 - buttonPermission: function(params) { - return request({ - url: '/demopackage/v1/demo/buttonPermission', - method: 'post', - data: params - }) - } -} diff --git a/yxt-as-ui/src/api/User/login.js b/yxt-as-ui/src/api/User/login.js deleted file mode 100644 index ef4554b83a..0000000000 --- a/yxt-as-ui/src/api/User/login.js +++ /dev/null @@ -1,36 +0,0 @@ -import request from '@/utils/request' -import qs from 'qs' - -class user { - login(data) { // 登录 - return request({ - url: '/system/user/login', - method: 'post', - data - }) - } - logout(data) { // 退出 - return request({ - url: '/portal/v1/sysuser/signOut', - method: 'post', - data: qs.stringify(data) - }) - } - updatePassword(data) { // 退出修改密码 - return request({ - url: '/portal/v1/sysuser/updatePassword', - method: 'post', - data: qs.stringify(data) - }) - } - reGetPwd(data){ - return request({ - url: `/system/user/reGetPwd/${data.userName}/${data.userPhone}`, - method: 'post', - data: qs.stringify(data) - }) - } - -} - -export default new user() \ No newline at end of file diff --git a/yxt-as-ui/src/api/system/Role/role.js b/yxt-as-ui/src/api/system/Role/role.js deleted file mode 100644 index c7fe6d1736..0000000000 --- a/yxt-as-ui/src/api/system/Role/role.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' -import qs from 'qs' -let tokens = window.sessionStorage.getItem('token'); -// -export function rolemenus(data) { - return request({ - url: '/system/v1/rolemenus/'+data.roleSid, - method: 'get', - params: data - }) -} - -// 获取左侧菜单 -export function getrolemenus(data) { - return request({ - url: '/portal/v1/sysmenu/sourcemenutree', - data: data, - method: 'POST', - async: false, - headers: {'Content-Type': 'application/json'} - }) -} - -// 获取角色的主页菜单 -export function sourcesofrole(data) { - return request({ - url: '/system/v1/rolemenus/sourcesofrole', - method: 'POST', - data: data, - headers: {'Content-Type': 'application/json'} - }) -} - -// 根据token值获取登录后的用户信息 -export function loginDetails(data) { - return request({ - url: '/portal/v1/sysuser/loginDetails', - method: 'post', - data: data, - headers: { - 'Content-Type': 'application/json' - } - }) -} diff --git a/yxt-as-ui/src/api/user.js b/yxt-as-ui/src/api/user.js deleted file mode 100644 index 4e137c4512..0000000000 --- a/yxt-as-ui/src/api/user.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' -import qs from 'qs' -//登录 -export function login(data) { - return request({ - url: '/portal/v1/sysuser/login', - method: 'post', - data: data, - headers: {'Content-Type': 'application/json'} - }) -} -// 用户注册 -export function registUser(data) { - return request({ - url: '/system/user/save', - method: 'post', - data, - headers:{'Content-Type':'application/x-www-form-urlencoded;'} - }) -} -// 获取手机验证码 -export function getVerificationCode(data) { - return request({ - url: '/system/user/getVerificationCode', - method: 'get', - params: data - }) -} - -// 获取登录验证码 -export function imgCode() { - return request({ - url: '/system/api/defaultBlendCode?temm=' + new Date().getTime(), - method: 'get' - }) -} - -// 获取用信息 -export function getInfo(token) { - return request({ - url: '/system/user/loginDetails', - method: 'post', - }) -} diff --git a/yxt-as-ui/src/assets/404_images/404.png b/yxt-as-ui/src/assets/404_images/404.png deleted file mode 100644 index 3d8e2305cc..0000000000 Binary files a/yxt-as-ui/src/assets/404_images/404.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/404_images/404_cloud.png b/yxt-as-ui/src/assets/404_images/404_cloud.png deleted file mode 100644 index c6281d0901..0000000000 Binary files a/yxt-as-ui/src/assets/404_images/404_cloud.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/anrui.png b/yxt-as-ui/src/assets/home/anrui.png deleted file mode 100644 index 31de90aed0..0000000000 Binary files a/yxt-as-ui/src/assets/home/anrui.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/bIcon1.png b/yxt-as-ui/src/assets/home/bIcon1.png deleted file mode 100644 index f2c1381a50..0000000000 Binary files a/yxt-as-ui/src/assets/home/bIcon1.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/bIcon2.png b/yxt-as-ui/src/assets/home/bIcon2.png deleted file mode 100644 index 4076e7e9bf..0000000000 Binary files a/yxt-as-ui/src/assets/home/bIcon2.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/bIcon3.png b/yxt-as-ui/src/assets/home/bIcon3.png deleted file mode 100644 index bbc6c51bb4..0000000000 Binary files a/yxt-as-ui/src/assets/home/bIcon3.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/bIcon4.png b/yxt-as-ui/src/assets/home/bIcon4.png deleted file mode 100644 index a7ef26fec9..0000000000 Binary files a/yxt-as-ui/src/assets/home/bIcon4.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/bIcon5.png b/yxt-as-ui/src/assets/home/bIcon5.png deleted file mode 100644 index 6840128871..0000000000 Binary files a/yxt-as-ui/src/assets/home/bIcon5.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/bIcon6.png b/yxt-as-ui/src/assets/home/bIcon6.png deleted file mode 100644 index 61c88a8628..0000000000 Binary files a/yxt-as-ui/src/assets/home/bIcon6.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/bIcon7.png b/yxt-as-ui/src/assets/home/bIcon7.png deleted file mode 100644 index 209f1a5dff..0000000000 Binary files a/yxt-as-ui/src/assets/home/bIcon7.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/bIcon8.png b/yxt-as-ui/src/assets/home/bIcon8.png deleted file mode 100644 index f2c2e33164..0000000000 Binary files a/yxt-as-ui/src/assets/home/bIcon8.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/bottomBg.png b/yxt-as-ui/src/assets/home/bottomBg.png deleted file mode 100644 index 334f6146cc..0000000000 Binary files a/yxt-as-ui/src/assets/home/bottomBg.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/line.png b/yxt-as-ui/src/assets/home/line.png deleted file mode 100644 index b828cc3c60..0000000000 Binary files a/yxt-as-ui/src/assets/home/line.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/ltBg.png b/yxt-as-ui/src/assets/home/ltBg.png deleted file mode 100644 index 7c487f7f63..0000000000 Binary files a/yxt-as-ui/src/assets/home/ltBg.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/ltIcon1.png b/yxt-as-ui/src/assets/home/ltIcon1.png deleted file mode 100644 index 0c17623e86..0000000000 Binary files a/yxt-as-ui/src/assets/home/ltIcon1.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/ltIcon2.png b/yxt-as-ui/src/assets/home/ltIcon2.png deleted file mode 100644 index f4f2531580..0000000000 Binary files a/yxt-as-ui/src/assets/home/ltIcon2.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/ltIcon3.png b/yxt-as-ui/src/assets/home/ltIcon3.png deleted file mode 100644 index a69ef7ceef..0000000000 Binary files a/yxt-as-ui/src/assets/home/ltIcon3.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/ltIcon4.png b/yxt-as-ui/src/assets/home/ltIcon4.png deleted file mode 100644 index 740cfb3ebe..0000000000 Binary files a/yxt-as-ui/src/assets/home/ltIcon4.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/notice.png b/yxt-as-ui/src/assets/home/notice.png deleted file mode 100644 index f964245d6b..0000000000 Binary files a/yxt-as-ui/src/assets/home/notice.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/home/rtBg.png b/yxt-as-ui/src/assets/home/rtBg.png deleted file mode 100644 index 987b9cbed3..0000000000 Binary files a/yxt-as-ui/src/assets/home/rtBg.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/arrow.png b/yxt-as-ui/src/assets/images/arrow.png deleted file mode 100644 index 9e4c33b99f..0000000000 Binary files a/yxt-as-ui/src/assets/images/arrow.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/bdrysh.png b/yxt-as-ui/src/assets/images/bdrysh.png deleted file mode 100644 index c0acee9aba..0000000000 Binary files a/yxt-as-ui/src/assets/images/bdrysh.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/btn.png b/yxt-as-ui/src/assets/images/btn.png deleted file mode 100644 index 4aaf9f01c7..0000000000 Binary files a/yxt-as-ui/src/assets/images/btn.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/cdgl.png b/yxt-as-ui/src/assets/images/cdgl.png deleted file mode 100644 index d3e20f9f94..0000000000 Binary files a/yxt-as-ui/src/assets/images/cdgl.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/cxjl.png b/yxt-as-ui/src/assets/images/cxjl.png deleted file mode 100644 index 99285003e1..0000000000 Binary files a/yxt-as-ui/src/assets/images/cxjl.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/czsc.png b/yxt-as-ui/src/assets/images/czsc.png deleted file mode 100644 index 00a8f4f379..0000000000 Binary files a/yxt-as-ui/src/assets/images/czsc.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/dwrysh.png b/yxt-as-ui/src/assets/images/dwrysh.png deleted file mode 100644 index f9804b7d53..0000000000 Binary files a/yxt-as-ui/src/assets/images/dwrysh.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/dwxxgl.png b/yxt-as-ui/src/assets/images/dwxxgl.png deleted file mode 100644 index c1d9769c98..0000000000 Binary files a/yxt-as-ui/src/assets/images/dwxxgl.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/dy.png b/yxt-as-ui/src/assets/images/dy.png deleted file mode 100644 index de8157ed79..0000000000 Binary files a/yxt-as-ui/src/assets/images/dy.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/head.png b/yxt-as-ui/src/assets/images/head.png deleted file mode 100644 index abd71010e4..0000000000 Binary files a/yxt-as-ui/src/assets/images/head.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/info.png b/yxt-as-ui/src/assets/images/info.png deleted file mode 100644 index b681da30da..0000000000 Binary files a/yxt-as-ui/src/assets/images/info.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/jcxx.png b/yxt-as-ui/src/assets/images/jcxx.png deleted file mode 100644 index d9c40674a2..0000000000 Binary files a/yxt-as-ui/src/assets/images/jcxx.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/jggl.png b/yxt-as-ui/src/assets/images/jggl.png deleted file mode 100644 index ab4c742f96..0000000000 Binary files a/yxt-as-ui/src/assets/images/jggl.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/jlsc.png b/yxt-as-ui/src/assets/images/jlsc.png deleted file mode 100644 index 6061b81ac0..0000000000 Binary files a/yxt-as-ui/src/assets/images/jlsc.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/jsgl.png b/yxt-as-ui/src/assets/images/jsgl.png deleted file mode 100644 index 2da71f4e4f..0000000000 Binary files a/yxt-as-ui/src/assets/images/jsgl.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/jsxd.png b/yxt-as-ui/src/assets/images/jsxd.png deleted file mode 100644 index e5b3ed049b..0000000000 Binary files a/yxt-as-ui/src/assets/images/jsxd.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/login/OAKQ.png b/yxt-as-ui/src/assets/images/login/OAKQ.png deleted file mode 100644 index d237cfb05a..0000000000 Binary files a/yxt-as-ui/src/assets/images/login/OAKQ.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/login/bg2-img.png b/yxt-as-ui/src/assets/images/login/bg2-img.png deleted file mode 100644 index b53bf40c3f..0000000000 Binary files a/yxt-as-ui/src/assets/images/login/bg2-img.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/login/bgimg.jpg b/yxt-as-ui/src/assets/images/login/bgimg.jpg deleted file mode 100644 index 1bd964a85a..0000000000 Binary files a/yxt-as-ui/src/assets/images/login/bgimg.jpg and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/login/nose.png b/yxt-as-ui/src/assets/images/login/nose.png deleted file mode 100644 index b6c8086a96..0000000000 Binary files a/yxt-as-ui/src/assets/images/login/nose.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/login/pasw.png b/yxt-as-ui/src/assets/images/login/pasw.png deleted file mode 100644 index 5244bc45be..0000000000 Binary files a/yxt-as-ui/src/assets/images/login/pasw.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/login/user.png b/yxt-as-ui/src/assets/images/login/user.png deleted file mode 100644 index e370214533..0000000000 Binary files a/yxt-as-ui/src/assets/images/login/user.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/lzrysh.png b/yxt-as-ui/src/assets/images/lzrysh.png deleted file mode 100644 index 03125a1180..0000000000 Binary files a/yxt-as-ui/src/assets/images/lzrysh.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/org/headerimg.png b/yxt-as-ui/src/assets/images/org/headerimg.png deleted file mode 100644 index 661f06b7e7..0000000000 Binary files a/yxt-as-ui/src/assets/images/org/headerimg.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/org/jian.png b/yxt-as-ui/src/assets/images/org/jian.png deleted file mode 100644 index 1e528b099f..0000000000 Binary files a/yxt-as-ui/src/assets/images/org/jian.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/org/sfz.png b/yxt-as-ui/src/assets/images/org/sfz.png deleted file mode 100644 index 7f79b47936..0000000000 Binary files a/yxt-as-ui/src/assets/images/org/sfz.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/org/sqs.png b/yxt-as-ui/src/assets/images/org/sqs.png deleted file mode 100644 index 8071e21033..0000000000 Binary files a/yxt-as-ui/src/assets/images/org/sqs.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/org/success.png b/yxt-as-ui/src/assets/images/org/success.png deleted file mode 100644 index 6a54c31950..0000000000 Binary files a/yxt-as-ui/src/assets/images/org/success.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/org/yyzz.png b/yxt-as-ui/src/assets/images/org/yyzz.png deleted file mode 100644 index 2a1101991a..0000000000 Binary files a/yxt-as-ui/src/assets/images/org/yyzz.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/place.png b/yxt-as-ui/src/assets/images/place.png deleted file mode 100644 index 5e36be9d35..0000000000 Binary files a/yxt-as-ui/src/assets/images/place.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/qjsh.png b/yxt-as-ui/src/assets/images/qjsh.png deleted file mode 100644 index 85c2ce8937..0000000000 Binary files a/yxt-as-ui/src/assets/images/qjsh.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/ryda.png b/yxt-as-ui/src/assets/images/ryda.png deleted file mode 100644 index 4cddf396a7..0000000000 Binary files a/yxt-as-ui/src/assets/images/ryda.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/rzgl.png b/yxt-as-ui/src/assets/images/rzgl.png deleted file mode 100644 index 068ae3bb90..0000000000 Binary files a/yxt-as-ui/src/assets/images/rzgl.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/select.png b/yxt-as-ui/src/assets/images/select.png deleted file mode 100644 index 0a70ffa2d9..0000000000 Binary files a/yxt-as-ui/src/assets/images/select.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/sjcc.png b/yxt-as-ui/src/assets/images/sjcc.png deleted file mode 100644 index 6f01ae0849..0000000000 Binary files a/yxt-as-ui/src/assets/images/sjcc.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/sjzd.png b/yxt-as-ui/src/assets/images/sjzd.png deleted file mode 100644 index 06af6b9810..0000000000 Binary files a/yxt-as-ui/src/assets/images/sjzd.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/tjfx.png b/yxt-as-ui/src/assets/images/tjfx.png deleted file mode 100644 index e097e3d130..0000000000 Binary files a/yxt-as-ui/src/assets/images/tjfx.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/tjfx2.png b/yxt-as-ui/src/assets/images/tjfx2.png deleted file mode 100644 index 681993c9d8..0000000000 Binary files a/yxt-as-ui/src/assets/images/tjfx2.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/wenjian.png b/yxt-as-ui/src/assets/images/wenjian.png deleted file mode 100644 index 163e441dba..0000000000 Binary files a/yxt-as-ui/src/assets/images/wenjian.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/xgmm.png b/yxt-as-ui/src/assets/images/xgmm.png deleted file mode 100644 index 46b8d5c705..0000000000 Binary files a/yxt-as-ui/src/assets/images/xgmm.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/xtbg.png b/yxt-as-ui/src/assets/images/xtbg.png deleted file mode 100644 index 8ac2bfc3ad..0000000000 Binary files a/yxt-as-ui/src/assets/images/xtbg.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/xtgl.png b/yxt-as-ui/src/assets/images/xtgl.png deleted file mode 100644 index 2eeed54e4c..0000000000 Binary files a/yxt-as-ui/src/assets/images/xtgl.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/xxzx.png b/yxt-as-ui/src/assets/images/xxzx.png deleted file mode 100644 index 0e3c1501d2..0000000000 Binary files a/yxt-as-ui/src/assets/images/xxzx.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/images/zwsm.png b/yxt-as-ui/src/assets/images/zwsm.png deleted file mode 100644 index 948916931f..0000000000 Binary files a/yxt-as-ui/src/assets/images/zwsm.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/loginImg/account.png b/yxt-as-ui/src/assets/loginImg/account.png deleted file mode 100644 index 0531b4a147..0000000000 Binary files a/yxt-as-ui/src/assets/loginImg/account.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/loginImg/bgImg.png b/yxt-as-ui/src/assets/loginImg/bgImg.png deleted file mode 100644 index 94dba71d8c..0000000000 Binary files a/yxt-as-ui/src/assets/loginImg/bgImg.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/loginImg/logo.png b/yxt-as-ui/src/assets/loginImg/logo.png deleted file mode 100644 index a56f153dc7..0000000000 Binary files a/yxt-as-ui/src/assets/loginImg/logo.png and /dev/null differ diff --git a/yxt-as-ui/src/assets/loginImg/password.png b/yxt-as-ui/src/assets/loginImg/password.png deleted file mode 100644 index 9426a01194..0000000000 Binary files a/yxt-as-ui/src/assets/loginImg/password.png and /dev/null differ diff --git a/yxt-as-ui/src/components/AreaPicker/index.vue b/yxt-as-ui/src/components/AreaPicker/index.vue deleted file mode 100644 index 105c64750f..0000000000 --- a/yxt-as-ui/src/components/AreaPicker/index.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - diff --git a/yxt-as-ui/src/components/Breadcrumb/index.vue b/yxt-as-ui/src/components/Breadcrumb/index.vue deleted file mode 100644 index 29f9a04c9d..0000000000 --- a/yxt-as-ui/src/components/Breadcrumb/index.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/ButtonBar/index.vue b/yxt-as-ui/src/components/ButtonBar/index.vue deleted file mode 100644 index 963a81e972..0000000000 --- a/yxt-as-ui/src/components/ButtonBar/index.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/E-image/index.vue b/yxt-as-ui/src/components/E-image/index.vue deleted file mode 100644 index 9401ce4561..0000000000 --- a/yxt-as-ui/src/components/E-image/index.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/ErrorLog/index.vue b/yxt-as-ui/src/components/ErrorLog/index.vue deleted file mode 100644 index 6119c0374f..0000000000 --- a/yxt-as-ui/src/components/ErrorLog/index.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/Hamburger/index.vue b/yxt-as-ui/src/components/Hamburger/index.vue deleted file mode 100644 index 368b002154..0000000000 --- a/yxt-as-ui/src/components/Hamburger/index.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/Screenfull/index.vue b/yxt-as-ui/src/components/Screenfull/index.vue deleted file mode 100644 index 4735604530..0000000000 --- a/yxt-as-ui/src/components/Screenfull/index.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/SizeSelect/index.vue b/yxt-as-ui/src/components/SizeSelect/index.vue deleted file mode 100644 index e88065b49f..0000000000 --- a/yxt-as-ui/src/components/SizeSelect/index.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - diff --git a/yxt-as-ui/src/components/SvgIcon/index.vue b/yxt-as-ui/src/components/SvgIcon/index.vue deleted file mode 100644 index b07ded2af3..0000000000 --- a/yxt-as-ui/src/components/SvgIcon/index.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/ThemePicker/index.vue b/yxt-as-ui/src/components/ThemePicker/index.vue deleted file mode 100644 index 3879c5ad02..0000000000 --- a/yxt-as-ui/src/components/ThemePicker/index.vue +++ /dev/null @@ -1,175 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/amap/amap.vue b/yxt-as-ui/src/components/amap/amap.vue deleted file mode 100644 index c7d643c478..0000000000 --- a/yxt-as-ui/src/components/amap/amap.vue +++ /dev/null @@ -1,224 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/imgCodeRole/index.vue b/yxt-as-ui/src/components/imgCodeRole/index.vue deleted file mode 100644 index 852d9f324e..0000000000 --- a/yxt-as-ui/src/components/imgCodeRole/index.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/pagination/index.vue b/yxt-as-ui/src/components/pagination/index.vue deleted file mode 100644 index fae5a55f63..0000000000 --- a/yxt-as-ui/src/components/pagination/index.vue +++ /dev/null @@ -1,136 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/pagination/pageye.vue b/yxt-as-ui/src/components/pagination/pageye.vue deleted file mode 100644 index c69dca4b4d..0000000000 --- a/yxt-as-ui/src/components/pagination/pageye.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/passwordSafe/index.vue b/yxt-as-ui/src/components/passwordSafe/index.vue deleted file mode 100644 index 847af1bcb9..0000000000 --- a/yxt-as-ui/src/components/passwordSafe/index.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/tab-search/index.vue b/yxt-as-ui/src/components/tab-search/index.vue deleted file mode 100644 index 0ad9150257..0000000000 --- a/yxt-as-ui/src/components/tab-search/index.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/uploadFile/upload.vue b/yxt-as-ui/src/components/uploadFile/upload.vue deleted file mode 100644 index 4c242e6d3b..0000000000 --- a/yxt-as-ui/src/components/uploadFile/upload.vue +++ /dev/null @@ -1,218 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/uploadFile/uploadImg.vue b/yxt-as-ui/src/components/uploadFile/uploadImg.vue deleted file mode 100644 index 4a0aa2282d..0000000000 --- a/yxt-as-ui/src/components/uploadFile/uploadImg.vue +++ /dev/null @@ -1,231 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/components/viewerjs/index.vue b/yxt-as-ui/src/components/viewerjs/index.vue deleted file mode 100644 index 3d6f841569..0000000000 --- a/yxt-as-ui/src/components/viewerjs/index.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/icons/index.js b/yxt-as-ui/src/icons/index.js deleted file mode 100644 index 2c6b309c96..0000000000 --- a/yxt-as-ui/src/icons/index.js +++ /dev/null @@ -1,9 +0,0 @@ -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/yxt-as-ui/src/icons/svg/dashboard.svg b/yxt-as-ui/src/icons/svg/dashboard.svg deleted file mode 100644 index 5317d37029..0000000000 --- a/yxt-as-ui/src/icons/svg/dashboard.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/example.svg b/yxt-as-ui/src/icons/svg/example.svg deleted file mode 100644 index 46f42b5323..0000000000 --- a/yxt-as-ui/src/icons/svg/example.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/eye-open.svg b/yxt-as-ui/src/icons/svg/eye-open.svg deleted file mode 100644 index 88dcc98e6c..0000000000 --- a/yxt-as-ui/src/icons/svg/eye-open.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/eye.svg b/yxt-as-ui/src/icons/svg/eye.svg deleted file mode 100644 index 16ed2d872d..0000000000 --- a/yxt-as-ui/src/icons/svg/eye.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/form.svg b/yxt-as-ui/src/icons/svg/form.svg deleted file mode 100644 index dcbaa185a8..0000000000 --- a/yxt-as-ui/src/icons/svg/form.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/link.svg b/yxt-as-ui/src/icons/svg/link.svg deleted file mode 100644 index 48197ba4da..0000000000 --- a/yxt-as-ui/src/icons/svg/link.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/nested.svg b/yxt-as-ui/src/icons/svg/nested.svg deleted file mode 100644 index 06713a86c6..0000000000 --- a/yxt-as-ui/src/icons/svg/nested.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/password.svg b/yxt-as-ui/src/icons/svg/password.svg deleted file mode 100644 index e291d85df2..0000000000 --- a/yxt-as-ui/src/icons/svg/password.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/table.svg b/yxt-as-ui/src/icons/svg/table.svg deleted file mode 100644 index 0e3dc9dea5..0000000000 --- a/yxt-as-ui/src/icons/svg/table.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/tree.svg b/yxt-as-ui/src/icons/svg/tree.svg deleted file mode 100644 index dd4b7dd22f..0000000000 --- a/yxt-as-ui/src/icons/svg/tree.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svg/user.svg b/yxt-as-ui/src/icons/svg/user.svg deleted file mode 100644 index 0ba0716a62..0000000000 --- a/yxt-as-ui/src/icons/svg/user.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/yxt-as-ui/src/icons/svgo.yml b/yxt-as-ui/src/icons/svgo.yml deleted file mode 100644 index d11906aec2..0000000000 --- a/yxt-as-ui/src/icons/svgo.yml +++ /dev/null @@ -1,22 +0,0 @@ -# replace default config - -# multipass: true -# full: true - -plugins: - - # - name - # - # or: - # - name: false - # - name: true - # - # or: - # - name: - # param1: 1 - # param2: 2 - -- removeAttrs: - attrs: - - 'fill' - - 'fill-rule' diff --git a/yxt-as-ui/src/layout/components/AppMain.vue b/yxt-as-ui/src/layout/components/AppMain.vue deleted file mode 100644 index a8f3718274..0000000000 --- a/yxt-as-ui/src/layout/components/AppMain.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - diff --git a/yxt-as-ui/src/layout/components/Navbar.vue b/yxt-as-ui/src/layout/components/Navbar.vue deleted file mode 100644 index 431f0c8ce0..0000000000 --- a/yxt-as-ui/src/layout/components/Navbar.vue +++ /dev/null @@ -1,157 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/layout/components/Sidebar/FixiOSBug.js b/yxt-as-ui/src/layout/components/Sidebar/FixiOSBug.js deleted file mode 100644 index bc14856f07..0000000000 --- a/yxt-as-ui/src/layout/components/Sidebar/FixiOSBug.js +++ /dev/null @@ -1,26 +0,0 @@ -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 - // https://github.com/PanJiaChen/vue-element-admin/issues/1135 - 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/yxt-as-ui/src/layout/components/Sidebar/Item.vue b/yxt-as-ui/src/layout/components/Sidebar/Item.vue deleted file mode 100644 index aa1f5da4de..0000000000 --- a/yxt-as-ui/src/layout/components/Sidebar/Item.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - diff --git a/yxt-as-ui/src/layout/components/Sidebar/Link.vue b/yxt-as-ui/src/layout/components/Sidebar/Link.vue deleted file mode 100644 index 530b3d5b37..0000000000 --- a/yxt-as-ui/src/layout/components/Sidebar/Link.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/yxt-as-ui/src/layout/components/Sidebar/Logo.vue b/yxt-as-ui/src/layout/components/Sidebar/Logo.vue deleted file mode 100644 index 040fab6469..0000000000 --- a/yxt-as-ui/src/layout/components/Sidebar/Logo.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/layout/components/Sidebar/SidebarItem.vue b/yxt-as-ui/src/layout/components/Sidebar/SidebarItem.vue deleted file mode 100644 index e955f1b933..0000000000 --- a/yxt-as-ui/src/layout/components/Sidebar/SidebarItem.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - diff --git a/yxt-as-ui/src/layout/components/Sidebar/index.vue b/yxt-as-ui/src/layout/components/Sidebar/index.vue deleted file mode 100644 index cddc6b6ca4..0000000000 --- a/yxt-as-ui/src/layout/components/Sidebar/index.vue +++ /dev/null @@ -1,123 +0,0 @@ - - - diff --git a/yxt-as-ui/src/layout/components/TagsView/ScrollPane.vue b/yxt-as-ui/src/layout/components/TagsView/ScrollPane.vue deleted file mode 100644 index e8d682bd9c..0000000000 --- a/yxt-as-ui/src/layout/components/TagsView/ScrollPane.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - \ No newline at end of file diff --git a/yxt-as-ui/src/layout/components/TagsView/index.vue b/yxt-as-ui/src/layout/components/TagsView/index.vue deleted file mode 100644 index ff1f8da266..0000000000 --- a/yxt-as-ui/src/layout/components/TagsView/index.vue +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - diff --git a/yxt-as-ui/src/layout/components/index.js b/yxt-as-ui/src/layout/components/index.js deleted file mode 100644 index 686faf6f80..0000000000 --- a/yxt-as-ui/src/layout/components/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { default as Navbar } from './Navbar' -export { default as Sidebar } from './Sidebar' -export { default as AppMain } from './AppMain' -export { default as TagsView } from './TagsView/index.vue' diff --git a/yxt-as-ui/src/layout/index.vue b/yxt-as-ui/src/layout/index.vue deleted file mode 100644 index aa05682dea..0000000000 --- a/yxt-as-ui/src/layout/index.vue +++ /dev/null @@ -1,114 +0,0 @@ - - - - - diff --git a/yxt-as-ui/src/layout/mixin/ResizeHandler.js b/yxt-as-ui/src/layout/mixin/ResizeHandler.js deleted file mode 100644 index e8d0df8c23..0000000000 --- a/yxt-as-ui/src/layout/mixin/ResizeHandler.js +++ /dev/null @@ -1,45 +0,0 @@ -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/yxt-as-ui/src/main.js b/yxt-as-ui/src/main.js deleted file mode 100644 index 35adacd3a7..0000000000 --- a/yxt-as-ui/src/main.js +++ /dev/null @@ -1,154 +0,0 @@ -import 'babel-polyfill' -import Vue from 'vue' -import 'normalize.css/normalize.css' // A modern alternative to CSS resets -import ElementUI from 'element-ui' -import 'element-ui/lib/theme-chalk/index.css' -import '@/styles/index.scss' // global css -import App from './App' -import store from './store' -import router from './router' - -import '@/icons' // icon -// 全局自定义组件 -import Pagination from '@/components/pagination/index.vue' -import tabsearch from '@/components/tab-search/index.vue' -import eimage from '@/components/E-image/index.vue' -import Print from '@/utils/print' // 引入附件的js文件 -import { setStorage, setDefaultOrgPathName, setDefaultOrgPath } from './utils/auth.js' -import VueAMap from 'vue-amap' -import request from '@/utils/request' - -Vue.use(ElementUI) - -// import '@/permission' //权限控制 - -Vue.prototype.$userInfo = null // 用户信息 - -Vue.component('Pagination', Pagination) - -Vue.component('tab-search', tabsearch) - -Vue.component('eimage', eimage) - -Vue.use(Print) // 注册 -Vue.use(VueAMap) -VueAMap.initAMapApiLoader({ - key: 'ccda12d8bffc72e9f1a32c599323a876', // 此处的key,在高德开放平台申请 - plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'], // 此处的插件按需添加 - v: '1.4.4', - uiVersion: '1.0' -}) - -Vue.config.productionTip = false - -let token = null -token = GetQueryString('token') -// token = getQueryVariable('token') - -if (token) { - setStorage(token) - let href = window.location.href - // href = href.split(`token=${token}`)[0] - // window.location.href = href.slice(0, href.length - 1) -} - -function GetQueryString(name) { - var one = window.location.href.indexOf('?token=') + 7 - if (one < 7) - return null - var two = window.location.href.lastIndexOf('&') // + 1 - var data = window.location.href.substr(one) - if (two > one) { - data = window.location.href.slice(one, two) - console.log('token', data) - } - if (data) { - return data - } - return null - // var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)') - // var se = window.location.search.substr(1) - // var hr = window.location.href.substr(window.location.href.indexOf("?")+1) - // var r = hr.match( reg) - // if (r != null) - // return unescape(r[2]); - // return null -} - -function getQueryVariable(variable) { - var query = window.location.search.substring(1) - // console.log('main:query'+ query) - var vars = query.split('&') - for (var i = 0; i < vars.length; i++) { - var pair = vars[i].split('=') - // console.log('main:pair-0', pair[0]) - // console.log('main:pair-1', pair[1]) - if (pair[0] == variable) { - return pair[1] - } - } - return (false) -} - -var one = window.location.href.indexOf('&organizationData') + 18 -if (parseInt(one) > 18) { - const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 - var data1 = decodeURIComponent(data) - if (data1 !== undefined) { - const obj = JSON.parse(data1) - setDefaultOrgPath(obj.defaultOrgPath) - setDefaultOrgPathName(obj.defaultOrgPathName) - } -} - -// 获取登录用户信息 -function getUserInfo() { - return request({ - url: '/portal/v1/sysuser/loginDetails', - method: 'post', - headers: { - 'Content-Type': 'application/json' - } - }).then(rep => { - const data = rep.data - let user = { - roleSid: data.roleSid, - name: data.name, - userName: data.userName, - departmentName: data.departmentName, // 部门名称 - departmentSid: data.departmentSid, // 部门sid - isAdmin: data.isAdmin, - staffSid: data.staffSid, // 业务员sid - userSid: data.sid, - orgSid: data.organizationSid, // 单位sid - Orgname: data.organizationName, - dwjb: data.dwjb, - orgNamePath: data.orgNamePath, // 使用组织全路径名称 - orgSidPath: data.orgSidPath, // 使用组织全路径Sid - pNameAndDepartmentNameAndPostName: data.pNameAndDepartmentNameAndPostName - } - //结果存入缓存 - window.sessionStorage.setItem('staffSid', user.staffSid) - window.sessionStorage.setItem('userSid', user.userSid) - window.sessionStorage.setItem('Orgname', user.Orgname) - window.sessionStorage.setItem('orgSid', user.orgSid) - window.sessionStorage.setItem('departmentName', user.departmentName) - window.sessionStorage.setItem('name', user.name) - window.sessionStorage.setItem('user', user) - window.sessionStorage.setItem('departmentName', user.departmentName) - window.sessionStorage.setItem('departmentSid', user.departmentSid) - window.sessionStorage.setItem('orgNamePath', user.orgNamePath) - window.sessionStorage.setItem('orgSidPath', user.orgSidPath) - window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', user.pNameAndDepartmentNameAndPostName) - new Vue({ - el: '#app', - router, - store, - render: h => h(App) - }) - }) -} - -getUserInfo() - -export default getUserInfo() diff --git a/yxt-as-ui/src/permission.js b/yxt-as-ui/src/permission.js deleted file mode 100644 index 9f1976886a..0000000000 --- a/yxt-as-ui/src/permission.js +++ /dev/null @@ -1,33 +0,0 @@ -import router from './router' -import store from './store' -import NProgress from 'nprogress' // progress bar -import 'nprogress/nprogress.css' // progress bar style -import getPageTitle from '@/utils/get-page-title' -NProgress.configure({ showSpinner: false }) // NProgress Configuration -import { getStorage } from '@/utils/auth' // get token from cookie -import { getRoleRouter } from '@/router/modules/components.js' -const whiteList = ['/login', '/registUser', '/registOrg'] // no redirect whitelist -router.beforeEach(async(to, from, next) => { - NProgress.start() - document.title = getPageTitle(to.meta.title) - const hasToken = window.sessionStorage.getItem('token') - if (hasToken) { - const userInfo = store.getters.userInfo - if (userInfo) { - next() - NProgress.done() - } else { - await store.dispatch('user/getInfo') - let userRoles = await getRoleRouter(store.getters.userInfo.userSid) - router.options.routes = userRoles - router.addRoutes(userRoles) // 动态添加可访问路由表 - next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: - } - } else { - window.location.href = process.env.VUE_APP_URL - } -}) - -router.afterEach(() => { - NProgress.done() -}) diff --git a/yxt-as-ui/src/router/index.js b/yxt-as-ui/src/router/index.js deleted file mode 100644 index 41a69e52e5..0000000000 --- a/yxt-as-ui/src/router/index.js +++ /dev/null @@ -1,64 +0,0 @@ -import Vue from 'vue' -import Router from 'vue-router' - -Vue.use(Router) - -/* Layout */ -import Layout from '@/layout' -/* 所有角色可以访问/没有权限要求的基页 */ - -export const constantRoutes = [ - { - path: '/redirect', - component: Layout, - hidden: true, - children: [{ - path: '/redirect/:path(.*)', - component: () => import('@/views/redirect/index.vue') - }] - }, - { - path: '/', - redirect: 'index' - }, - { - path: '/index', - component: Layout, - redirect: '/index', - children: [{ - path: '/index', - component: () => - import('@/views/index.vue'), - name: 'index', - meta: { - title: '主页', - noCache: true, - affix: true - } - }] - }, - { - path: '/404', - component: () => - import('@/views/404'), - hidden: true - }, - // 404 page must be placed at the end !!! - // { path: '*', redirect: '/404', hidden: true } -] - -const createRouter = () => new Router({ - // mode: 'history', // require service support - scrollBehavior: () => ({ y: 0 }), - routes: constantRoutes -}) - -const router = createRouter() - -// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 -export function resetRouter() { - const newRouter = createRouter() - router.matcher = newRouter.matcher // reset router -} - -export default router diff --git a/yxt-as-ui/src/router/modules/components.js b/yxt-as-ui/src/router/modules/components.js deleted file mode 100644 index b0ee40be70..0000000000 --- a/yxt-as-ui/src/router/modules/components.js +++ /dev/null @@ -1,34 +0,0 @@ -const Layout = () => import('@/layout') -/* 权限路由 */ -/* 获取权限路由列表 */ -import { getrolemenus } from '@/api/system/Role/role.js' -import { getSession } from '@/utils/auth.js' - -export async function getRoleRouter(userSid) { - const rolemenus = await getrolemenus({ userSid: userSid }) - const userRoles = resRouter(rolemenus.data) - userRoles.push({ path: '*', redirect: '/404', hidden: true }) - return userRoles -} - -function resRouter(menus) { // 递归,将后台传来数组 - for (var i = 0; i < menus.length; i++) { - if (menus[i].children && menus[i].children.length != 0) { - resRouter(menus[i].children) - } - if (menus[i].children.length == 0) { - delete menus[i].children - delete menus[i].redirect - } - if (menus[i].component != '') { - menus[i].component = eval(menus[i].path.substr(1)) - menus[i] = { - path: menus[i].path, - component: Layout, - redirect: menus[i].path, - children: [menus[i]] - } - } - } - return menus -} diff --git a/yxt-as-ui/src/settings.js b/yxt-as-ui/src/settings.js deleted file mode 100644 index 647f65bb57..0000000000 --- a/yxt-as-ui/src/settings.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - - title: '安瑞集团信息化平台', - - /** - * @type {boolean} true | false - * @description Whether fix the header - */ - fixedHeader: false, - - /** - * @type {boolean} true | false - * @description Whether show the logo in sidebar - */ - sidebarLogo: false -} diff --git a/yxt-as-ui/src/store/getters.js b/yxt-as-ui/src/store/getters.js deleted file mode 100644 index 33a426a94e..0000000000 --- a/yxt-as-ui/src/store/getters.js +++ /dev/null @@ -1,17 +0,0 @@ -const getters = { - sidebar: state => state.app.sidebar, - size: state => state.app.size, - device: state => state.app.device, - 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, - userInfo: state => state.user.userInfo, - menus: state => state.user.menus, - introduction: state => state.user.introduction, - roles: state => state.user.roles, - permission_routes: state => state.permission.routes, - errorLogs: state => state.errorLog.logs -} -export default getters diff --git a/yxt-as-ui/src/store/index.js b/yxt-as-ui/src/store/index.js deleted file mode 100644 index d0cb3aa71b..0000000000 --- a/yxt-as-ui/src/store/index.js +++ /dev/null @@ -1,39 +0,0 @@ -import Vue from 'vue' -import Vuex from 'vuex' -import getters from './getters' - -Vue.use(Vuex) - -// https://webpack.js.org/guides/dependency-management/#requirecontext -const modulesFiles = require.context('./modules', true, /\.js$/) - -// you do not need `import app from './modules/app'` -// it will auto require all vuex module from modules file -const modules = modulesFiles.keys().reduce((modules, modulePath) => { - // set './app.js' => 'app' - const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') - const value = modulesFiles(modulePath) - modules[moduleName] = value.default - return modules -}, {}) - -const store = new Vuex.Store({ - state: { - counter: 0, - distributionSid: '', - modelName:'' - }, - mutations: { - - }, - actions: { - - }, - getters: { - - }, - modules, - getters -}) - -export default store diff --git a/yxt-as-ui/src/store/modules/app.js b/yxt-as-ui/src/store/modules/app.js deleted file mode 100644 index 45d89bb964..0000000000 --- a/yxt-as-ui/src/store/modules/app.js +++ /dev/null @@ -1,56 +0,0 @@ -import Cookies from 'js-cookie' - -const state = { - sidebar: { - opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, - withoutAnimation: false - }, - device: 'desktop', - size: Cookies.get('size') || 'medium' -} - -const mutations = { - TOGGLE_SIDEBAR: state => { - 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) - } -} - -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) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} diff --git a/yxt-as-ui/src/store/modules/errorLog.js b/yxt-as-ui/src/store/modules/errorLog.js deleted file mode 100644 index 6b01f95754..0000000000 --- a/yxt-as-ui/src/store/modules/errorLog.js +++ /dev/null @@ -1,28 +0,0 @@ -const state = { - logs: [] -} - -const mutations = { - ADD_ERROR_LOG: (state, log) => { - state.logs.push(log) - }, - CLEAR_ERROR_LOG: (state) => { - state.logs.splice(0) - } -} - -const actions = { - addErrorLog({ commit }, log) { - commit('ADD_ERROR_LOG', log) - }, - clearErrorLog({ commit }) { - commit('CLEAR_ERROR_LOG') - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} diff --git a/yxt-as-ui/src/store/modules/permission.js b/yxt-as-ui/src/store/modules/permission.js deleted file mode 100644 index aeb5ee5397..0000000000 --- a/yxt-as-ui/src/store/modules/permission.js +++ /dev/null @@ -1,69 +0,0 @@ -import { asyncRoutes, constantRoutes } from '@/router' - -/** - * Use meta.role to determine if the current user has permission - * @param roles - * @param route - */ -function hasPermission(roles, route) { - if (route.meta && route.meta.roles) { - return roles.some(role => route.meta.roles.includes(role)) - } else { - return true - } -} - -/** - * Filter asynchronous routing tables by recursion - * @param routes asyncRoutes - * @param roles - */ -export function filterAsyncRoutes(routes, roles) { - const res = [] - - routes.forEach(route => { - const tmp = { ...route } - if (hasPermission(roles, tmp)) { - if (tmp.children) { - tmp.children = filterAsyncRoutes(tmp.children, roles) - } - res.push(tmp) - } - }) - - return res -} - -const state = { - routes: [], - addRoutes: [] -} - -const mutations = { - SET_ROUTES: (state, routes) => { - state.addRoutes = routes - state.routes = constantRoutes.concat(routes) - } -} - -const actions = { - generateRoutes({ commit }, roles) { - return new Promise(resolve => { - let accessedRoutes - if (roles.includes('admin')) { - accessedRoutes = asyncRoutes || [] - } else { - accessedRoutes = filterAsyncRoutes(asyncRoutes, roles) - } - commit('SET_ROUTES', accessedRoutes) - resolve(accessedRoutes) - }) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} diff --git a/yxt-as-ui/src/store/modules/settings.js b/yxt-as-ui/src/store/modules/settings.js deleted file mode 100644 index 110533f738..0000000000 --- a/yxt-as-ui/src/store/modules/settings.js +++ /dev/null @@ -1,35 +0,0 @@ -import variables from '@/styles/element-variables.scss' -import defaultSettings from '@/settings' - -const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings - -const state = { - theme: variables.theme, - showSettings: showSettings, - tagsView: tagsView, - fixedHeader: fixedHeader, - sidebarLogo: sidebarLogo -} - -const mutations = { - CHANGE_SETTING: (state, { key, value }) => { - // eslint-disable-next-line no-prototype-builtins - if (state.hasOwnProperty(key)) { - state[key] = value - } - } -} - -const actions = { - changeSetting({ commit }, data) { - commit('CHANGE_SETTING', data) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} - diff --git a/yxt-as-ui/src/store/modules/tagsView.js b/yxt-as-ui/src/store/modules/tagsView.js deleted file mode 100644 index 57e72421e6..0000000000 --- a/yxt-as-ui/src/store/modules/tagsView.js +++ /dev/null @@ -1,160 +0,0 @@ -const state = { - visitedViews: [], - cachedViews: [] -} - -const mutations = { - 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.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 - } - } - }, - 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 - }) - }, - 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 { - // if index = -1, there is no cached tags - state.cachedViews = [] - } - }, - - DEL_ALL_VISITED_VIEWS: state => { - // keep affix tags - const affixTags = state.visitedViews.filter(tag => tag.meta.affix) - state.visitedViews = affixTags - }, - 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 - } - } - } -} - -const actions = { - addView({ dispatch }, view) { - dispatch('addVisitedView', view) - dispatch('addCachedView', 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]) - }) - }, - 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) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} diff --git a/yxt-as-ui/src/store/modules/user.js b/yxt-as-ui/src/store/modules/user.js deleted file mode 100644 index fa4dae6c85..0000000000 --- a/yxt-as-ui/src/store/modules/user.js +++ /dev/null @@ -1,122 +0,0 @@ -import { login, logout, getInfo } from '@/api/user' -import { getStorage, setStorage, removeStorage } from '@/utils/auth' - -import router, { resetRouter } from '@/router' - -const state = { - token: getStorage(), - userInfo: '', - menus: '', -} - -const mutations = { - SET_TOKEN: (state, token) => { - state.token = token - }, - SET_UESRINFO: (state, userInfo) => { - state.userInfo = userInfo - }, - SET_MENUS: (state, menus) => { - state.menus = menus - } -} - -const actions = { - // user login - login({ commit }, userInfo) { - return new Promise((resolve, reject) => { - login(userInfo).then(response => { - const { data } = response - commit('SET_TOKEN', data.token) - setStorage(data.token) - let user = { - roleSid: data.roleSid, - name: data.name, - userName: data.userName, - departmentName: data.departmentName, - isAdmin: data.isAdmin, - staffSid: data.staffSid, - userSid: data.sid, - orgSid: data.organizationSid, - Orgname: data.organizationName, - dwjb: data.dwjb, - pNameAndDepartmentNameAndPostName:data.pNameAndDepartmentNameAndPostName - } - commit('SET_UESRINFO', user) - window.sessionStorage.setItem('userSid', user.userSid); - window.sessionStorage.setItem('Orgname', user.Orgname); - window.sessionStorage.setItem('departmentName', user.departmentName); - window.sessionStorage.setItem('name', user.name); - window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', user.pNameAndDepartmentNameAndPostName) - resolve(data) - }).catch(error => { - reject(error) - }) - }) - }, - - // get user info - getInfo({ commit, state }) { - return new Promise((resolve, reject) => { - getInfo().then(response => { - const { data } = response - if (!data) { - removeStorage() - reject('Verification failed, please Login again.') - } - let user = { - roleSid: data.roleSid, - name: data.name, - userName: data.userName, - orgRoleName: data.orgRoleName, - isAdmin: data.isAdmin, - staffSid: data.staffSid, - userSid: data.sid, - orgSid: data.organizationSid, - Orgname: data.organizationName, - dwjb: data.dwjb - } - commit('SET_UESRINFO', user) - resolve(data) - }).catch(error => { - removeStorage() - router.push({path: '/'}) - // reject(error) - }) - }) - }, - - getMenus({ commit, state }) { - return new Promise((resolve, reject) => { - getInfo().then(response => { - const { data } = response - commit('SET_UESRINFO', user) - resolve(data) - }).catch(error => { - reject(error) - }) - }) - }, - - // user logout - logout({ commit, state, dispatch }) { - return new Promise((resolve, reject) => { - logout(state.token).then(() => { - commit('SET_TOKEN', '') - commit('SET_UESRINFO', '') - removeStorage() - resetRouter() - resolve() - }).catch(error => { - reject(error) - }) - }) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} diff --git a/yxt-as-ui/src/styles/e-table.scss b/yxt-as-ui/src/styles/e-table.scss deleted file mode 100644 index 95b9f9c03d..0000000000 --- a/yxt-as-ui/src/styles/e-table.scss +++ /dev/null @@ -1,30 +0,0 @@ -.e-table { - width: 100%; - padding: 0 30px; - tr:first-child th{ - background-color: #c1f4cd; - } - tr { - td { - border: 1px solid #e6e9f0; - border-right: 0px; - border-bottom: 0px; - padding: 10px 20px; - } - td:last-child { - border-right: 1px solid #e6e9f0; - } - } - tr:last-child { - td { - border-bottom: 1px solid #e6e9f0; - } - } - - td:nth-child(2n-1) { - text-align: right; - } - td:nth-child(2n) { - text-align: left; - } - } diff --git a/yxt-as-ui/src/styles/element-table.scss b/yxt-as-ui/src/styles/element-table.scss deleted file mode 100644 index 727938ca3b..0000000000 --- a/yxt-as-ui/src/styles/element-table.scss +++ /dev/null @@ -1,19 +0,0 @@ -.el-table { - .el-table__header{ - tr th{ - background: #edf1f7; - color: #333333; - } - } -} - -.table-describe{ - border: 1px solid #dfe4ed; - border-bottom: 0px solid #dfe4ed; - h4{ - float: left; - margin: 0; - line-height: 34px; - padding:0 15px; - } -} diff --git a/yxt-as-ui/src/styles/element-tabs.scss b/yxt-as-ui/src/styles/element-tabs.scss deleted file mode 100644 index 26321fb16c..0000000000 --- a/yxt-as-ui/src/styles/element-tabs.scss +++ /dev/null @@ -1,25 +0,0 @@ -.el-tabs--card{ - .el-tabs__header{ - .el-tabs__nav-scroll{ - padding-left: 3px; - padding-bottom: 10px; - border-bottom: 1px solid #018ad2; - .el-tabs__nav { - border: none; - } - .el-tabs__item { - border: 1px solid #dfe4ed; - margin-right: 12px; - margin-left: 2px; - } - .el-tabs__item:first-child { - border-left: 1px solid #dfe4ed; - } - .el-tabs__item.is-active{ - border-bottom-color: #018ad2; - background-color: #018ad2; - color: #fff; - } - } - } -} diff --git a/yxt-as-ui/src/styles/element-ui.scss b/yxt-as-ui/src/styles/element-ui.scss deleted file mode 100644 index 50c4dc361c..0000000000 --- a/yxt-as-ui/src/styles/element-ui.scss +++ /dev/null @@ -1,62 +0,0 @@ -.el-image .el-image__inner--center{ - top: 0; - left: 0; - transform: none; -} - -.tablerow-click{ - color: #007FFF; - cursor: pointer; -} -// cover some element-ui styles - -.el-breadcrumb__inner, -.el-breadcrumb__inner a { - font-weight: 400 !important; -} - -.el-upload { - input[type="file"] { - display: none !important; - } -} - -.el-upload__input { - display: none; -} - - -// to fixed https://github.com/ElemeFE/element/issues/2461 -.el-dialog { - transform: none; - left: 0; - position: relative; - margin: 0 auto; -} - -// refine element ui upload -.upload-container { - .el-upload { - width: 100%; - - .el-upload-dragger { - width: 100%; - height: 200px; - } - } -} - -// dropdown -.el-dropdown-menu { - a { - display: block - } -} - -// to fix el-date-picker css style -.el-range-separator { - box-sizing: content-box; -} - - - diff --git a/yxt-as-ui/src/styles/element-variables.scss b/yxt-as-ui/src/styles/element-variables.scss deleted file mode 100644 index ecd0728841..0000000000 --- a/yxt-as-ui/src/styles/element-variables.scss +++ /dev/null @@ -1,35 +0,0 @@ -/** -* I think element-ui's default theme color is too light for long-term use. -* So I modified the default color and you can modify it to your liking. -**/ - -/* theme color */ -// $--color-primary: #018ad2; -// $--color-success: #13ce66; -// $--color-warning: #ffba00; -// $--color-danger: #ff4949; -// $--color-info: #1E1E1E; -$--color-primary: #018ad2; -$--color-success: #2cab69; -$--color-warning: #ffba00; -$--color-danger: #e84026; -$--color-info: #cccccc; -$--button-font-weight: 400; - -// $--color-text-regular: #1f2d3d; - -$--border-color-light: #dfe4ed; -$--border-color-lighter: #e6ebf5; - -$--table-border: 1px solid #dfe6ec; - -/* icon font path, required */ -$--font-path: "~element-ui/lib/theme-chalk/fonts"; - -@import "~element-ui/packages/theme-chalk/src/index"; - -// the :export directive is the magic sauce for webpack -// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass -:export { - theme: $--color-primary; -} diff --git a/yxt-as-ui/src/styles/index.scss b/yxt-as-ui/src/styles/index.scss deleted file mode 100644 index fb94599d69..0000000000 --- a/yxt-as-ui/src/styles/index.scss +++ /dev/null @@ -1,444 +0,0 @@ -@import './variables.scss'; -@import './mixin.scss'; -@import './transition.scss'; -@import './element-ui.scss'; -@import './sidebar.scss'; -@import './table.scss'; -@import './e-table.scss'; -@import './element-table.scss'; -@import './element-tabs.scss'; -body { - height: 100%; - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; -} - -label { - font-weight: 700; -} - -html { - height: 100%; - box-sizing: border-box; -} - -#app { - height: 100%; -} - -*, -*:before, -*:after { - box-sizing: inherit; -} - -a:focus, -a:active { - outline: none; -} - -a, -a:focus, -a:hover { - cursor: pointer; - color: inherit; - text-decoration: none; -} - -div:focus { - outline: none; -} - -.clearfix { - &:after { - visibility: hidden; - display: block; - font-size: 0; - content: " "; - clear: both; - height: 0; - } -} -.bg-primary{ - background-color: $color-primary !important; -} -// main-container global css -.container{ - min-height: 100%; - height: 100%; - background-color: #FFFFFF; - box-sizing: border-box; - padding: 10px 0; -} - -.fl{ - float: left; -} -.fr{ - float: right; -} -.text-center{ - text-align: center; -} -.color-red{ - color: red !important; -} - -.pd-b10{ - padding-bottom: 10px; -} - -.pd-y40 { - padding: 40px 0; -} - -.pd-y20 { - padding: 20px 0; -} - -.fs20 { - font-size: 20px; -} - -// 页面上的button按钮 -.app-container { - .el-button--medium { - padding: 10px 14px; - font-size: 16px; - } - - .el-button--small { - padding: 8px 12px; - font-size: 14px; - } - - .el-button--mini { - padding: 7px 10px; - font-size: 12px; - } -} -// 添加样式 -.app-container { - margin: 5px 0 5px 0; - background-color: #fff; -} -// 设置了滚动区域 -.main-content{ overflow-x: hidden;overflow-y: auto;height: calc(100vh - 200px);padding: 0 20px;} -.listcon{height: calc(100vh - 425px);overflow-y: auto;overflow-x: hidden;} -.listconadd{height: calc(100vh - 200px);overflow-y: auto;overflow-x: hidden;} -.listconadd{ - .titwu { - font-size: 28px; - text-align: center; - padding: 30px 0 20px 0; - } -} -.listconsub { - height: calc(100vh - 310px); - overflow-y: auto; - overflow-x: hidden; -} - -.listconsubjxs { - height: calc(100vh - 300px); - overflow-y: auto; - overflow-x: hidden; -} - -// 搜索的 -.webtop { - // position: fixed;top: 110px;width: calc(100% - 240px);z-index: 6000; - background-color: #fff; - display: flex !important; - flex-direction: row; - justify-content: space-between !important; - align-items: center; - margin-bottom: 0px !important; - font-size: 20px; -} - -// 设置了页面头部的内边距和背景色 -.tab-header { - font-size: 20px; - font-weight: bold; -} -// 设置了搜索条件里的样式 -.search { - .tab-header { - .el-form-item { - margin-right: 16px; - .el-form-item__label { - font-size: 16px; - font-weight: 500; - } - } - } -} -.filter-item { - padding: 0 10px; - width: 220px; - display: inline-block; -} - -// 设置列表页面内容布局 -.listtop { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - padding: 0 0 0 15px; - margin-top: 0; - border: 1px solid #dfe4ed; - height: 42px; - line-height: 42px; -} - -.listtop .tit { - font-weight: bold; - font-size: 16px -} - -.listtop .pagination { - margin: 0; - padding: 0; -} - -.pages { - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: flex-end; - padding: 0 0 15px 15px; -} -.pages .tit{font-weight: bold;} -.pages .pagination{margin: 0;} -// .formadd{padding: 20px ;} -// .listeltable{overflow-y: auto;height: calc(100vh - 420px);} - -.formadd { - padding: 10px 40px 0 40px; - font-size: 16px; - // height: calc(100vh - 200px);overflow-y: auto; - .title { - padding: 12px; - font-weight: bold; - font-size: 16px; - background-color: $header-bg; - text-align: left; - color: #ffffff; - } - .first_row{ - border-top: 1px solid $table-border-color; - } - .el-row { - display: flex; - flex-wrap: wrap; - border-left: 1px solid $table-border-color; - .el-col { - border-right: 1px solid $table-border-color; - border-bottom: 1px solid $table-border-color; - padding: 0 15px; - min-height: 42px; - line-height: 1; - - .el-form-item { - margin-bottom: 0; - line-height: 42px; - // .addinputw{width: 400px;} - .addinputw { - width: 80%; - line-height: 42px; - } - .el-input__inner { - height: 36px; - } - } - } - } - .footer{margin: 20px;} -} - - -.formaddcopy02 { - padding: 10px 40px 0 40px; - .title { - padding: 12px; - font-weight: bold; - font-size: 16px; - background-color: #0294d7; - color: #ffffff; - text-align: left; - } - - .el-row { - display: flex; - flex-wrap: wrap; - border-left: 1px solid $table-border-color; - - .el-col { - border-right: 1px solid $table-border-color; - border-bottom: 1px solid $table-border-color; - min-height: 42px; - padding: 0 15px; - line-height: 42px; - position: relative; - .span-sty { - position: absolute; - top: 0; - bottom: 0; - left: 0; - line-height: 42px; - text-align: right; - font-size: 14px; - color: #606266; - font-weight: 600; - width: 70px; - padding-right: 5px; - border-right: 1px solid #e0e3eb; - } - - .el-form-item { - margin-bottom: 0; - line-height: 42px; - .addinputw { - //padding: 5px 0; - width: 65%; - margin-left: 80px; - line-height: 42px; - } - - .addinputInfo { - margin-left: 80px; - line-height: 42px; - } - - .el-input__inner { - height: 36px; - } - } - } - - } - - .footer { - margin: 20px; - } -} - -.forminfo { - padding: 10px 40px 0 40px; - font-size: 16px; - .title { - padding: 12px; - font-weight: bold; - font-size: 16px; - background-color: $header-bg; - text-align: left; - color: #ffffff; - } - .el-row { - display:flex; - flex-wrap: wrap; - border-left: 1px solid $table-border-color; - .trightb{ text-align: right;font-weight: bold;color: #606266; } - .tleft{ text-align: left; } - .el-col{ - border-right: 1px solid $table-border-color; - border-bottom: 1px solid $table-border-color; - padding: 0 15px 0 15px !important; - min-height: 50px; - line-height: 50px; - font-size: 14px; - } - - } - .footer{margin: 20px;} -} - -.el-form-item__error { - z-index: 100; -} -.bluezi{color: $header-bg; cursor: pointer} -// 经销商添加样式 -.titcon{ - display: flex; - flex-direction: row; - justify-content: space-around; - background-color: #0294d7; - flex: 3; -} - -.titcon .title { - padding: 10px; - font-weight: bold; - font-size: 20px; - text-align: center; - color: #ffffff; -} - -.titcon .baocun { - text-align: right; - flex: 2; - padding: 5px 20px; -} - -.addinputwda { - width: 600px; -} - -//.searchcon{margin: 0px 0 10px 0;} -//.searchcon .searchbtn{margin: 10px 0;border: #2cab69 1px solid;color: #2cab69;} -// 隐藏显示按钮 -.main-content { - .searchcon { - .searchbtn { - margin: 5px 0; - border: #2cab69 1px solid; - color: #2cab69; - } - } -} - - -.search .btn { - padding: 5px 0; - border: 1px solid #e0e3eb; - text-align: center; - margin-bottom: 5px; -} - - -// 弹出窗口按钮 -.btnCancel{ - background: #e84026 !important;outline: none;border: none;color: #fff !important; -} -.btnCancel:hover{ - background: #ed6651 !important; -} -.btnFalses{ - background: #2cab69 !important;outline: none;border: none; -} -.btnFalses:hover{ - background: #3dc47e !important; -} -.btntopblueline{background-color: #066bc9 !important;} -.btntopblueline:hover{background-color: #34a1db !important;} -.btntophui{background-color: #cccccc !important;} -.btntophui:hover{background-color: #d6d6d6 !important;} -.bordertopline{ border-top: 1px solid $table-border-color;} -.lookimg img{width: 250px;margin: 10px;} -.listimg{width: 80px;} -.tleftb { - text-align: right; - font-size: 14px; - color: #606266; - line-height: 40px !important; - font-weight: 600; -} - -.icon { - color: #e84026; - margin-right: 4px; -} diff --git a/yxt-as-ui/src/styles/mixin.scss b/yxt-as-ui/src/styles/mixin.scss deleted file mode 100644 index 36b74bbd99..0000000000 --- a/yxt-as-ui/src/styles/mixin.scss +++ /dev/null @@ -1,28 +0,0 @@ -@mixin clearfix { - &:after { - content: ""; - display: table; - clear: both; - } -} - -@mixin scrollBar { - &::-webkit-scrollbar-track-piece { - background: #d3dce6; - } - - &::-webkit-scrollbar { - width: 6px; - } - - &::-webkit-scrollbar-thumb { - background: #99a9bf; - border-radius: 20px; - } -} - -@mixin relative { - position: relative; - width: 100%; - height: 100%; -} diff --git a/yxt-as-ui/src/styles/sidebar.scss b/yxt-as-ui/src/styles/sidebar.scss deleted file mode 100644 index ef66650a63..0000000000 --- a/yxt-as-ui/src/styles/sidebar.scss +++ /dev/null @@ -1,261 +0,0 @@ -#app { - background-color: #f7f9fc; - - .main-container { - height: 100vh; - transition: margin-left .28s; - padding-left: $sideBarWidth; - padding-top: 60px; - position: relative; - overflow: hidden; - } - .TagsView{ - height: 50px; - } - .home-box{ - position: fixed; - top: 60px; - left: 0; - background-color: $menuBg; - border: 1px solid $menuHover; - line-height: 40px; - width: 210px; - z-index: 1000; - a{ - display: inline-block; - line-height: 40px; - box-sizing: border-box; - width: 50%; - text-align: center; - font-size: 16px; - font-weight: 500; - color: #FFFFFF; - } - a:last-child{ - border:0; - background-color: $menuHover; - } - } - .sidebar-container { - transition: width 0.28s; - width: $sideBarWidth !important; - background-color: $menuBg; - height: calc(100% - 60px) ; - position: absolute; - font-size: 0px; - top: 60px; - bottom: 0; - left: 0; - z-index: 8; - overflow: hidden; - padding-top: 40px; - - // reset element-ui css - .horizontal-collapse-transition { - transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; - } - - .scrollbar-wrapper { - overflow-x: hidden !important; - } - - .el-scrollbar__bar.is-vertical { - right: 0px; - } - - .el-scrollbar { - height: 100%; - } - - &.has-logo { - .el-scrollbar { - height: calc(100% - 50px); - } - } - - .is-horizontal { - display: none; - } - - a { - display: inline-block; - width: 100%; - overflow: hidden; - } - - .svg-icon { - margin-right: 16px; - } - - .sub-el-icon { - margin-right: 12px; - margin-left: -2px; - } - - .el-menu { - border: none; - height: 100%; - width: 100% !important; - } - - // menu hover - .submenu-title-noDropdown, - .el-submenu__title { - &:hover { - background-color: $menuHover !important; - } - } - .el-submenu__title i{ - color: #FFFFFF; - } - .is-active>.el-submenu__title { - color: $subMenuActiveText !important; - } - - & .nest-menu .el-submenu>.el-submenu__title, - & .el-submenu .el-menu-item { - min-width: $sideBarWidth !important; - background-color: $subMenuBg !important; - - &:hover { - background-color: $subMenuHover !important; - } - } - & .el-menu-item.is-active { - background-color: $subMenuHover !important; - } - } - - // .hideSidebar { - // .sidebar-container { - // width: 54px !important; - // } - - // .main-container { - // margin-left: 54px; - // } - - // .submenu-title-noDropdown { - // padding: 0 !important; - // position: relative; - - // .el-tooltip { - // padding: 0 !important; - - // .svg-icon { - // margin-left: 20px; - // } - - // .sub-el-icon { - // margin-left: 19px; - // } - // } - // } - - // .el-submenu { - // overflow: hidden; - - // &>.el-submenu__title { - // padding: 0 !important; - - // .svg-icon { - // margin-left: 20px; - // } - - // .sub-el-icon { - // margin-left: 19px; - // } - - // .el-submenu__icon-arrow { - // display: none; - // } - // } - // } - - // .el-menu--collapse { - // .el-submenu { - // &>.el-submenu__title { - // &>span { - // height: 0; - // width: 0; - // overflow: hidden; - // visibility: hidden; - // display: inline-block; - // } - // } - // } - // } - // } - - .el-menu--collapse .el-menu .el-submenu { - min-width: $sideBarWidth !important; - } - - // mobile responsive - .mobile { - .main-container { - margin-left: 0px; - } - - .sidebar-container { - transition: transform .28s; - width: $sideBarWidth !important; - } - - &.hideSidebar { - .sidebar-container { - pointer-events: none; - transition-duration: 0.3s; - transform: translate3d(-$sideBarWidth, 0, 0); - } - } - } - - .withoutAnimation { - - .main-container, - .sidebar-container { - transition: none; - } - } -} - -// when menu collapsed -.el-menu--vertical { - &>.el-menu { - .svg-icon { - margin-right: 16px; - } - .sub-el-icon { - margin-right: 12px; - margin-left: -2px; - } - } - - .nest-menu .el-submenu>.el-submenu__title, - .el-menu-item { - &:hover { - // you can use $subMenuHover - background-color: $menuHover !important; - } - } - - // the scroll bar appears when the subMenu is too long - >.el-menu--popup { - max-height: 100vh; - overflow-y: auto; - - &::-webkit-scrollbar-track-piece { - background: #d3dce6; - } - - &::-webkit-scrollbar { - width: 6px; - } - - &::-webkit-scrollbar-thumb { - background: #99a9bf; - border-radius: 20px; - } - } -} diff --git a/yxt-as-ui/src/styles/table.scss b/yxt-as-ui/src/styles/table.scss deleted file mode 100644 index 08e9142ddc..0000000000 --- a/yxt-as-ui/src/styles/table.scss +++ /dev/null @@ -1,48 +0,0 @@ -.container{ - /* 头 */ - .el-table thead{ - color: $text-color; - } - .el-table .cell{ - a{ - display: block; - color: $table-a-color; - } - .el-button--text{ - color: $table-a-color; - } - } - .el-table td, .el-table th{ - padding: 8px 0; - } - .el-table.is-group th{ - background-color: $table-bg-color; - } - .el-table--enable-row-hover .el-table__body tr:hover>td { - background-color: $table-bg-color !important; - } - .el-table--border td, .el-table--border th, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed { - border-right: 1px solid $table-border-color; - } - .el-table td, .el-table th.is-leaf{ - border-bottom: 1px solid $table-border-color; - } - .table-fixed { - .el-table__fixed-right { - height: 100% !important; //设置高优先,以覆盖内联样式 - } - } -} - -.children-box { - padding: 10px; - .table-header { - padding: 0 20px 5px 20px; - border-bottom: 2px solid $border-color; - .el-page-header { - line-height: 40px; - font-weight: 500; - - } - } -} diff --git a/yxt-as-ui/src/styles/transition.scss b/yxt-as-ui/src/styles/transition.scss deleted file mode 100644 index 4cb27cc811..0000000000 --- a/yxt-as-ui/src/styles/transition.scss +++ /dev/null @@ -1,48 +0,0 @@ -// global transition css - -/* fade */ -.fade-enter-active, -.fade-leave-active { - transition: opacity 0.28s; -} - -.fade-enter, -.fade-leave-active { - opacity: 0; -} - -/* fade-transform */ -.fade-transform-leave-active, -.fade-transform-enter-active { - transition: all .5s; -} - -.fade-transform-enter { - opacity: 0; - transform: translateX(-30px); -} - -.fade-transform-leave-to { - opacity: 0; - transform: translateX(30px); -} - -/* breadcrumb transition */ -.breadcrumb-enter-active, -.breadcrumb-leave-active { - transition: all .5s; -} - -.breadcrumb-enter, -.breadcrumb-leave-active { - opacity: 0; - transform: translateX(20px); -} - -.breadcrumb-move { - transition: all .5s; -} - -.breadcrumb-leave-active { - position: absolute; -} diff --git a/yxt-as-ui/src/styles/variables.scss b/yxt-as-ui/src/styles/variables.scss deleted file mode 100644 index 9ff78c5273..0000000000 --- a/yxt-as-ui/src/styles/variables.scss +++ /dev/null @@ -1,52 +0,0 @@ -// 行为色 -$color-primary: #018ad2; -$color-success: #4cd964; -$color-warning: #f0ad4e; -$color-error: #dd524d; -// header -$header-bg:#0294d7; -// sidebar -$menuText: rgba($color: #FFFFFF, $alpha: 0.9); -$menuActiveText:#ffffff; -$subMenuActiveText:#ffffff; //https://github.com/ElemeFE/element/issues/12951 - -$menuBg:#0294d7; -$menuHover:#087dba; - -$subMenuBg:#0294d7; -$subMenuHover:#087dba; - -$sideBarWidth: 210px; - -/* 表格的相关样式 */ -$search-bg:#edf1f7; // 表格搜索景色 -$table-bg-color:#edf1f7; // 表格背景 -$table-border-color:#e0e3eb; // 表格边框色 -// 文字 -$table-a-color:#018ad2; -/* 表格的相关样式 */ - -/* 边框颜色 */ -$border-color:#018ad2; -/* 文字基本颜色 */ -$text-color:#333;//基本色 -$text-color-inverse:#fff;//反色 -$text-color-grey:#999;//辅助灰色,如加载更多的提示信息 -$text-color-placeholder: #808080; -$text-color-disable:#c0c0c0; -$text-red: #d00000; - -$a-color:#018ad2; - -// the :export directive is the magic sauce for webpack -// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass -:export { - menuText: $menuText; - menuActiveText: $menuActiveText; - subMenuActiveText: $subMenuActiveText; - menuBg: $menuBg; - menuHover: $menuHover; - subMenuBg: $subMenuBg; - subMenuHover: $subMenuHover; - sideBarWidth: $sideBarWidth; -} diff --git a/yxt-as-ui/src/utils/auth.js b/yxt-as-ui/src/utils/auth.js deleted file mode 100644 index 5c6d8f6629..0000000000 --- a/yxt-as-ui/src/utils/auth.js +++ /dev/null @@ -1,37 +0,0 @@ -import Cookies from 'js-cookie' - -const TokenKey = 'token' -const sessionKey = 'token' - -export function getToken() { - return Cookies.get(TokenKey) -} - -export function setToken(token) { - return Cookies.set(TokenKey, token, { expires: 7, path: '/' }) -} - -export function removeToken() { - return Cookies.remove(TokenKey) -} - -export function getStorage() { - return sessionStorage.getItem('token') - // return 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI0MjdhMmZiMC02MGM1LTQwOWYtYmVhNC00ZWI0NDEwNDFhZTYiLCJpc3MiOiJXQksiLCJleHAiOjE2MzcxOTk1Mjl9.VkUkYAaHBjEaElFMPlUHAhUYO5zYf1aUQpX_3-w43UQ' -} - -export function setStorage(session) { - return sessionStorage.setItem('token', session) -} - -export function setDefaultOrgPathName(data) { - return sessionStorage.setItem('defaultOrgPathName', data) -} - -export function setDefaultOrgPath(data) { - return sessionStorage.setItem('defaultOrgPath', data) -} - -export function removeStorage() { - return sessionStorage.removeItem('token') -} diff --git a/yxt-as-ui/src/utils/axios.js b/yxt-as-ui/src/utils/axios.js deleted file mode 100644 index 56ca72360e..0000000000 --- a/yxt-as-ui/src/utils/axios.js +++ /dev/null @@ -1,248 +0,0 @@ -import axios from 'axios' -import router from '@/router' -import { Message } from 'element-ui' -import { removeToken, getToken } from '@/utils/auth' -// 统一请求路径前缀 -const base = process.env.VUE_APP_BASE_API -// 超时设定 -axios.defaults.timeout = 120000 - -axios.interceptors.request.use( - config => { - // console.log('请求拦截器数据', config) - return config - }, - err => { - Message.error('请求超时') - return Promise.resolve(err) - } -) - -// http response 拦截器 -axios.interceptors.response.use( - response => { - const data = response.data - // console.log('响应拦截器数据', response) - // console.log('data.code:' + data.code) - // 根据返回的code值来做不同的处理(和后端约定) - switch (data.code) { - case 401: - // Message.error('登录失效,请重新登录!') - console.log('登录失效,请重新登录!') - // 未登录 - // removeToken().then(() => { // 清除已登录状态 - // router.push('/login') - // }) - // if (router.history.current.name !== 'login') { - // console.log(router.history.current.name) - // if (data.msg !== null) { - // Message.error(data.msg) - // } else { - // Message.error('未知错误,请重新登录') - // } - // } - break - case 403: - // 没有权限 - if (data.msg !== null) { - Message.error(data.msg) - } else { - Message.error('未知错误') - } - break - case 500: - // 错误 - if (data.msg !== null) { - Message.error(data.msg) - } else { - Message.error('未知错误') - } - break - case 99: - if (data.msg !== null) { - if (data.msg == '登录状态已过期') { - // 未登录 - // removeToken().then(() => { // 清除已登录状态 - // router.push('/login') - // }) - } else { - // Message.error(data.msg) - return data - } - } else { - Message.error('未知错误') - } - break - default: - return data - } - return Promise.reject(new Error(response.msg || 'Error')) - }, - error => { - // 返回状态码不为200时候的错误处理 - Message.error(error.toString()) - if (error.request.responseURL.indexOf('/sys/security/needLogin')) { - // removeToken().then(() => { // 清除已登录状态 - // router.push('/login') - // }) - } - // return err - return Promise.reject(error) - } -) - -export const getRequest = (url, params) => { - const accessToken = getToken() - console.log(`-------------------${base}${url}`) - return axios({ - method: 'get', - url: `${base}${url}`, - params: params, - headers: { - accessToken: accessToken - } - }) -} - -export const postRequest = (url, params) => { - const accessToken = getToken() - return axios({ - method: 'post', - url: `${base}${url}`, - data: params, - transformRequest: [ - function(data) { - let ret = '' - for (const it in data) { - ret += - encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' - } - return ret - } - ], - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - accessToken: accessToken - } - }) -} - -export const post = (url, params) => { - const accessToken = getToken() - return axios({ - method: 'post', - url: `${base}${url}`, - data: params, - headers: { - 'Content-Type': 'application/json;charset=utf-8', - // 'Content-Type': 'multipart/form-data', - accessToken: accessToken - } - }) -} - -// export const postExport = (url, params) => { -// const accessToken = getToken() -// return axios({ -// method: 'post', -// url: `${base}${url}`, -// data: params, -// headers: { -// 'Content-Type': 'application/json;charset=utf-8', -// // 'Content-Type': 'multipart/form-data', -// accessToken: accessToken -// }, -// responseType: 'blob' // 表明返回服务器返回的数据类型 -// }) -// } - -export const putRequest = (url, params) => { - const accessToken = getToken() - return axios({ - method: 'put', - url: `${base}${url}`, - data: params, - transformRequest: [ - function(data) { - let ret = '' - for (const it in data) { - ret += - encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' - } - return ret - } - ], - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - accessToken: accessToken - } - }) -} - -export const deleteRequest = (url, params) => { - const accessToken = getToken() - return axios({ - method: 'delete', - url: `${base}${url}`, - params: params, - headers: { - accessToken: accessToken - } - }) -} - -export const importRequest = (url, params) => { - const accessToken = getToken() - return axios({ - method: 'post', - url: `${base}${url}`, - data: params, - headers: { - accessToken: accessToken - } - }) -} - -export const uploadFileRequest = (url, params) => { - const accessToken = getToken() - return axios({ - method: 'post', - url: `${base}${url}`, - params: params, - headers: { - accessToken: accessToken - } - }) -} - -export const getDownLoadUrl = (url) => { - const accessToken = getToken() - return base + url + '?token=' + accessToken -} - -export const uploadFileRequestJianCai = (url, params) => { - const accessToken = getToken() - return axios({ - method: 'post', - url: `${base}${url}`, - data: params, - headers: { - 'Content-Type': 'multipart/form-data', - contentType: false, - processData: false, - accessToken: accessToken - } - }) -} - -export const postBodyRequest = (url, params) => { - const accessToken = getToken() - return axios({ - method: 'post', - url: `${base}${url}`, - data: params, - headers: { - accessToken: accessToken - } - }) -} diff --git a/yxt-as-ui/src/utils/baocun.js b/yxt-as-ui/src/utils/baocun.js deleted file mode 100644 index b80fb74fd2..0000000000 --- a/yxt-as-ui/src/utils/baocun.js +++ /dev/null @@ -1,52 +0,0 @@ -const TokenKey = 'AdminWuJingToken' -const userInfo = 'wj_user' -// 保存基础信息 -export function getuser() { - return JSON.parse(localStorage.getItem(userInfo)) -} -export function setuser(obj) { - return localStorage.setItem(userInfo, JSON.stringify(obj)) -} - -// 保存修改基础信息 -export function getXiu() { - return JSON.parse(localStorage.getItem(userInfo)) -} -export function setXiu(obj) { - return localStorage.setItem(userInfo, JSON.stringify(obj)) -} -// 保存查看基础信息 -export function getLook() { - return JSON.parse(localStorage.getItem(userInfo)) -} -export function setLook(obj) { - return localStorage.setItem(userInfo, JSON.stringify(obj)) -} -// 信息 -export function getChe() { - return JSON.parse(localStorage.getItem(userInfo)) -} -export function setChe(obj) { - return localStorage.setItem(userInfo, JSON.stringify(obj)) -} -// 经销商保存 -export function getJing() { - return JSON.parse(localStorage.getItem(userInfo)) -} -export function setJing(obj) { - return localStorage.setItem(userInfo, JSON.stringify(obj)) -} -// 车型名称保存 -export function getCHeap() { - return JSON.parse(localStorage.getItem(userInfo)) -} -export function setCHeap(obj) { - return localStorage.setItem(userInfo, JSON.stringify(obj)) -} -// 车型sid保存 -export function getMIng() { - return JSON.parse(localStorage.getItem(userInfo)) -} -export function setMIng(obj) { - return localStorage.setItem(userInfo, JSON.stringify(obj)) -} diff --git a/yxt-as-ui/src/utils/get-page-title.js b/yxt-as-ui/src/utils/get-page-title.js deleted file mode 100644 index a6de99dde3..0000000000 --- a/yxt-as-ui/src/utils/get-page-title.js +++ /dev/null @@ -1,10 +0,0 @@ -import defaultSettings from '@/settings' - -const title = defaultSettings.title || 'Vue Admin Template' - -export default function getPageTitle(pageTitle) { - if (pageTitle) { - return `${pageTitle} - ${title}` - } - return `${title}` -} diff --git a/yxt-as-ui/src/utils/index.js b/yxt-as-ui/src/utils/index.js deleted file mode 100644 index 4830c04890..0000000000 --- a/yxt-as-ui/src/utils/index.js +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Created by PanJiaChen on 16/11/18. - */ - -/** - * Parse the time to string - * @param {(Object|string|number)} time - * @param {string} cFormat - * @returns {string | null} - */ -export function parseTime(time, cFormat) { - if (arguments.length === 0 || !time) { - return null - } - const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' - let date - if (typeof time === 'object') { - date = time - } else { - if ((typeof time === 'string')) { - if ((/^[0-9]+$/.test(time))) { - // support "1548221490638" - time = parseInt(time) - } else { - // support safari - // https://stackoverflow.com/questions/4310953/invalid-date-in-safari - time = time.replace(new RegExp(/-/gm), '/') - } - } - - if ((typeof time === 'number') && (time.toString().length === 10)) { - time = time * 1000 - } - date = new Date(time) - } - const formatObj = { - y: date.getFullYear(), - m: date.getMonth() + 1, - d: date.getDate(), - h: date.getHours(), - i: date.getMinutes(), - s: date.getSeconds(), - a: date.getDay() - } - const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { - const value = formatObj[key] - // Note: getDay() returns 0 on Sunday - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] } - return value.toString().padStart(2, '0') - }) - return time_str -} - -/** - * @param {number} time - * @param {string} option - * @returns {string} - */ -export function formatTime(time, option) { - if (('' + time).length === 10) { - time = parseInt(time) * 1000 - } else { - time = +time - } - const d = new Date(time) - const now = Date.now() - - const diff = (now - d) / 1000 - - if (diff < 30) { - return '刚刚' - } else if (diff < 3600) { - // less 1 hour - return Math.ceil(diff / 60) + '分钟前' - } else if (diff < 3600 * 24) { - return Math.ceil(diff / 3600) + '小时前' - } else if (diff < 3600 * 24 * 2) { - return '1天前' - } - if (option) { - return parseTime(time, option) - } else { - return ( - d.getMonth() + - 1 + - '月' + - d.getDate() + - '日' + - d.getHours() + - '时' + - d.getMinutes() + - '分' - ) - } -} - -/** - * @param {string} url - * @returns {Object} - */ -export function param2Obj(url) { - const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') - if (!search) { - return {} - } - const obj = {} - const searchArr = search.split('&') - searchArr.forEach(v => { - const index = v.indexOf('=') - if (index !== -1) { - const name = v.substring(0, index) - const val = v.substring(index + 1, v.length) - obj[name] = val - } - }) - return obj -} diff --git a/yxt-as-ui/src/utils/print.js b/yxt-as-ui/src/utils/print.js deleted file mode 100644 index 799a333764..0000000000 --- a/yxt-as-ui/src/utils/print.js +++ /dev/null @@ -1,123 +0,0 @@ -// 打印类属性、方法定义 -/* eslint-disable */ -const Print =function(dom, options) { - if (!(this instanceof Print)) return new Print(dom, options); - - this.options = this.extend({ - 'noPrint': '.no-print' - }, options); - - if ((typeof dom) === "string") { - this.dom = document.querySelector(dom); - } else { - this.dom = dom; - } - - this.init(); -}; -Print.prototype = { - init: function () { - var content = this.getStyle() + this.getHtml(); - this.writeIframe(content); - }, - extend: function (obj, obj2) { - for (var k in obj2) { - obj[k] = obj2[k]; - } - return obj; - }, - - getStyle: function () { - var str = "", - styles = document.querySelectorAll('style,link'); - for (var i = 0; i < styles.length; i++) { - str += styles[i].outerHTML; - } - str += ""; - - return str; - }, - - getHtml: function () { - var inputs = document.querySelectorAll('input'); - var textareas = document.querySelectorAll('textarea'); - var selects = document.querySelectorAll('select'); - - for (var k in inputs) { - if (inputs[k].type == "checkbox" || inputs[k].type == "radio") { - if (inputs[k].checked == true) { - inputs[k].setAttribute('checked', "checked") - } else { - inputs[k].removeAttribute('checked') - } - } else if (inputs[k].type == "text") { - inputs[k].setAttribute('value', inputs[k].value) - } - } - - for (var k2 in textareas) { - if (textareas[k2].type == 'textarea') { - textareas[k2].innerHTML = textareas[k2].value - } - } - - for (var k3 in selects) { - if (selects[k3].type == 'select-one') { - var child = selects[k3].children; - for (var i in child) { - if (child[i].tagName == 'OPTION') { - if (child[i].selected == true) { - child[i].setAttribute('selected', "selected") - } else { - child[i].removeAttribute('selected') - } - } - } - } - } - - return this.dom.outerHTML; - }, - - writeIframe: function (content) { - var w, doc, iframe = document.createElement('iframe'), - f = document.body.appendChild(iframe); - iframe.id = "myIframe"; - iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;"; - - w = f.contentWindow || f.contentDocument; - doc = f.contentDocument || f.contentWindow.document; - doc.open(); - doc.write(content); - doc.close(); - this.toPrint(w); - - setTimeout(function () { - document.body.removeChild(iframe) - }, 100) - }, - - toPrint: function (frameWindow) { - try { - setTimeout(function () { - frameWindow.focus(); - try { - if (!frameWindow.document.execCommand('print', false, null)) { - frameWindow.print(); - } - } catch (e) { - frameWindow.print(); - } - frameWindow.close(); - }, 10); - } catch (err) { - console.log('err', err); - } - } -}; -const MyPlugin = {} -MyPlugin.install = function (Vue, options) { - // 4. 添加实例方法 - Vue.prototype.$print = Print -} -export default MyPlugin \ No newline at end of file diff --git a/yxt-as-ui/src/utils/request.js b/yxt-as-ui/src/utils/request.js deleted file mode 100644 index c9d3f4eec7..0000000000 --- a/yxt-as-ui/src/utils/request.js +++ /dev/null @@ -1,69 +0,0 @@ -import axios from 'axios' -import { MessageBox, Message } from 'element-ui' -import store from '@/store' -import { getToken, getStorage } from '@/utils/auth' - -// create an axios instance -console.log(process.env.VUE_APP_URL) -const service = axios.create({ - baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url - // timeout: 5000 // request timeout - headers:{'Content-Type':'application/x-www-form-urlencoded;'} -}) - -// request interceptor -service.interceptors.request.use( - config => { - config.params = { - ...config.params, - _t: Date.parse(new Date()) / 1000 - } - if (getStorage()) { - - config.headers['token'] = getStorage() - } - return config - }, - error => { - console.log(error) // for debug - return Promise.reject(error) - } -) - -// response interceptor -service.interceptors.response.use( - - response => { - const res = response.data - - if(res.type !=undefined){ - return res - } - // if the custom code is not 20000, it is judged as an error. - if (res.code != 200) { - if (res.msg == "请重新登录") { - // window.location.href = 'http://39.104.100.138:8082/' - } else { - Message({ - message: res.msg || 'Error', - type: 'error', - duration: 5 * 1000 - }) - } - return Promise.reject(new Error(res.message || 'Error')) - } else { - return res - } - }, - error => { - console.log('err' + error) // for debug - Message({ - message: error.message, - type: 'error', - duration: 5 * 1000 - }) - return Promise.reject(error) - } -) - -export default service diff --git a/yxt-as-ui/src/utils/roles.js b/yxt-as-ui/src/utils/roles.js deleted file mode 100644 index 07a6557422..0000000000 --- a/yxt-as-ui/src/utils/roles.js +++ /dev/null @@ -1,98 +0,0 @@ -/** - * 表单校验规则 - * 不符合规则时,返回错误文案 - * 符合规则时,返回false - */ - -var rules = {} - -// 是否必填 -rules.required = function (value) { - return (!!value || value === 0) ? false : "请输入内容" -}; - -// 最大字符长度 -rules.maxLength = function (value, size) { - var size = size || 256; - return String(value).length <= size ? false : ("最大不超过" + size + "个字符") -} - -// 只允许字母和数字 -rules.onlyAlphabetic = function (value) { - var reg = /^[0-9a-zA-Z]+$/; - return reg.test(value) ? false : "只能输入字母和数字" -} - -// 只允许字母数字和下划线 -rules.onlyAlphabeticUnderline = function (value) { - var reg = /^[0-9a-zA-Z_]+$/; - return reg.test(value) ? false : "只能输入字母、数字或下划线" -} - -// 只允许数字 -rules.onlyNumber = function (value) { - var reg = /^[0-9]+$/; - return reg.test(value) ? false : "只能输入数字" -} - -// 只允许字母 -rules.onlyLetter = function (value) { - var reg = /^[a-zA-Z]+$/; - return reg.test(value) ? false : "只能输入字母" -} - -// 特殊字符 -rules.noSpecial = function (value) { - var regEn = /[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im, - regCn = /[·!#¥(——):;“”‘、,|《。》?、【】[\]]/im; - return regEn.test(value) || regCn.test(value) ? false : "不能输入特殊字符" -} - -// 邮箱 -rules.email = function (value) { - var reg = /^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/; - return reg.test(value) ? false : "邮箱格式错误" -} - -// 手机号(以1开头的11位数字) -rules.phone = function (value) { - var reg = /^[1][3,4,5,7,8][0-9]{9}$/; - return reg.test(value) ? false : "手机格式错误" -} - -// 只允许汉字 -rules.chinese = function (value) { - var reg = /^[\u4e00-\u9fa5]+$/; - return reg.test(value) ? false : "只能输入汉字" -} - -// 密码格式校验 -rules.password = function (value) { - if (String(value).length < 6) { - return "密码长度不小于6位" - } - if (String(value).length > 18) { - return "密码长度不超过18位" - } - var level = 0; - if (value.search(/[a-z]/) > -1) { - level++; //密码中包含小写字母 - } - if (value.search(/[A-Z]/) > -1) { - level++; //密码中包含大写字母 - } - if (value.search(/[0-9]/) > -1) { - level++; //密码中包含数组 - } - if (value.search(/[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im) > -1) { - level++; //密码中包含特殊符号 - } - if(level<2){ - return "密码至少包含大写字母、小写字母、数字、标点符号中的两种" - }else{ - return level; // 当前密码强度为level(2/3/4) - } -} - - -export default rules; \ No newline at end of file diff --git a/yxt-as-ui/src/utils/validate.js b/yxt-as-ui/src/utils/validate.js deleted file mode 100644 index 8d962ad4a2..0000000000 --- a/yxt-as-ui/src/utils/validate.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Created by PanJiaChen on 16/11/18. - */ - -/** - * @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 -} diff --git a/yxt-as-ui/tests/unit/.eslintrc.js b/yxt-as-ui/tests/unit/.eslintrc.js deleted file mode 100644 index 958d51ba27..0000000000 --- a/yxt-as-ui/tests/unit/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - env: { - jest: true - } -} diff --git a/yxt-as-ui/tests/unit/components/Breadcrumb.spec.js b/yxt-as-ui/tests/unit/components/Breadcrumb.spec.js deleted file mode 100644 index 1d94c8fc71..0000000000 --- a/yxt-as-ui/tests/unit/components/Breadcrumb.spec.js +++ /dev/null @@ -1,98 +0,0 @@ -import { mount, createLocalVue } from '@vue/test-utils' -import VueRouter from 'vue-router' -import ElementUI from 'element-ui' -import Breadcrumb from '@/components/Breadcrumb/index.vue' - -const localVue = createLocalVue() -localVue.use(VueRouter) -localVue.use(ElementUI) - -const routes = [ - { - path: '/', - name: 'home', - children: [{ - path: 'dashboard', - name: 'dashboard' - }] - }, - { - path: '/menu', - name: 'menu', - children: [{ - path: 'menu1', - name: 'menu1', - meta: { title: 'menu1' }, - children: [{ - path: 'menu1-1', - name: 'menu1-1', - meta: { title: 'menu1-1' } - }, - { - path: 'menu1-2', - name: 'menu1-2', - redirect: 'noredirect', - meta: { title: 'menu1-2' }, - children: [{ - path: 'menu1-2-1', - name: 'menu1-2-1', - meta: { title: 'menu1-2-1' } - }, - { - path: 'menu1-2-2', - name: 'menu1-2-2' - }] - }] - }] - }] - -const router = new VueRouter({ - routes -}) - -describe('Breadcrumb.vue', () => { - const wrapper = mount(Breadcrumb, { - localVue, - router - }) - it('dashboard', () => { - router.push('/dashboard') - const len = wrapper.findAll('.el-breadcrumb__inner').length - expect(len).toBe(1) - }) - it('normal route', () => { - router.push('/menu/menu1') - const len = wrapper.findAll('.el-breadcrumb__inner').length - expect(len).toBe(2) - }) - it('nested route', () => { - router.push('/menu/menu1/menu1-2/menu1-2-1') - const len = wrapper.findAll('.el-breadcrumb__inner').length - expect(len).toBe(4) - }) - it('no meta.title', () => { - router.push('/menu/menu1/menu1-2/menu1-2-2') - const len = wrapper.findAll('.el-breadcrumb__inner').length - expect(len).toBe(3) - }) - // it('click link', () => { - // router.push('/menu/menu1/menu1-2/menu1-2-2') - // const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') - // const second = breadcrumbArray.at(1) - // console.log(breadcrumbArray) - // const href = second.find('a').attributes().href - // expect(href).toBe('#/menu/menu1') - // }) - // it('noRedirect', () => { - // router.push('/menu/menu1/menu1-2/menu1-2-1') - // const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') - // const redirectBreadcrumb = breadcrumbArray.at(2) - // expect(redirectBreadcrumb.contains('a')).toBe(false) - // }) - it('last breadcrumb', () => { - router.push('/menu/menu1/menu1-2/menu1-2-1') - const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') - const redirectBreadcrumb = breadcrumbArray.at(3) - expect(redirectBreadcrumb.contains('a')).toBe(false) - }) -}) diff --git a/yxt-as-ui/tests/unit/components/Hamburger.spec.js b/yxt-as-ui/tests/unit/components/Hamburger.spec.js deleted file mode 100644 index 01ea303a5e..0000000000 --- a/yxt-as-ui/tests/unit/components/Hamburger.spec.js +++ /dev/null @@ -1,18 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import Hamburger from '@/components/Hamburger/index.vue' -describe('Hamburger.vue', () => { - it('toggle click', () => { - const wrapper = shallowMount(Hamburger) - const mockFn = jest.fn() - wrapper.vm.$on('toggleClick', mockFn) - wrapper.find('.hamburger').trigger('click') - expect(mockFn).toBeCalled() - }) - it('prop isActive', () => { - const wrapper = shallowMount(Hamburger) - wrapper.setProps({ isActive: true }) - expect(wrapper.contains('.is-active')).toBe(true) - wrapper.setProps({ isActive: false }) - expect(wrapper.contains('.is-active')).toBe(false) - }) -}) diff --git a/yxt-as-ui/tests/unit/components/SvgIcon.spec.js b/yxt-as-ui/tests/unit/components/SvgIcon.spec.js deleted file mode 100644 index 31467a9f6f..0000000000 --- a/yxt-as-ui/tests/unit/components/SvgIcon.spec.js +++ /dev/null @@ -1,22 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import SvgIcon from '@/components/SvgIcon/index.vue' -describe('SvgIcon.vue', () => { - it('iconClass', () => { - const wrapper = shallowMount(SvgIcon, { - propsData: { - iconClass: 'test' - } - }) - expect(wrapper.find('use').attributes().href).toBe('#icon-test') - }) - it('className', () => { - const wrapper = shallowMount(SvgIcon, { - propsData: { - iconClass: 'test' - } - }) - expect(wrapper.classes().length).toBe(1) - wrapper.setProps({ className: 'test' }) - expect(wrapper.classes().includes('test')).toBe(true) - }) -}) diff --git a/yxt-as-ui/tests/unit/utils/formatTime.spec.js b/yxt-as-ui/tests/unit/utils/formatTime.spec.js deleted file mode 100644 index 24e165b42d..0000000000 --- a/yxt-as-ui/tests/unit/utils/formatTime.spec.js +++ /dev/null @@ -1,30 +0,0 @@ -import { formatTime } from '@/utils/index.js' - -describe('Utils:formatTime', () => { - const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01" - const retrofit = 5 * 1000 - - it('ten digits timestamp', () => { - expect(formatTime((d / 1000).toFixed(0))).toBe('7月13日17时54分') - }) - it('test now', () => { - expect(formatTime(+new Date() - 1)).toBe('刚刚') - }) - it('less two minute', () => { - expect(formatTime(+new Date() - 60 * 2 * 1000 + retrofit)).toBe('2分钟前') - }) - it('less two hour', () => { - expect(formatTime(+new Date() - 60 * 60 * 2 * 1000 + retrofit)).toBe('2小时前') - }) - it('less one day', () => { - expect(formatTime(+new Date() - 60 * 60 * 24 * 1 * 1000)).toBe('1天前') - }) - it('more than one day', () => { - expect(formatTime(d)).toBe('7月13日17时54分') - }) - it('format', () => { - expect(formatTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54') - expect(formatTime(d, '{y}-{m}-{d}')).toBe('2018-07-13') - expect(formatTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54') - }) -}) diff --git a/yxt-as-ui/tests/unit/utils/param2Obj.spec.js b/yxt-as-ui/tests/unit/utils/param2Obj.spec.js deleted file mode 100644 index e106ed88b5..0000000000 --- a/yxt-as-ui/tests/unit/utils/param2Obj.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -import { param2Obj } from '@/utils/index.js' -describe('Utils:param2Obj', () => { - const url = 'https://github.com/PanJiaChen/vue-element-admin?name=bill&age=29&sex=1&field=dGVzdA==&key=%E6%B5%8B%E8%AF%95' - - it('param2Obj test', () => { - expect(param2Obj(url)).toEqual({ - name: 'bill', - age: '29', - sex: '1', - field: window.btoa('test'), - key: '测试' - }) - }) -}) diff --git a/yxt-as-ui/tests/unit/utils/parseTime.spec.js b/yxt-as-ui/tests/unit/utils/parseTime.spec.js deleted file mode 100644 index 56045af4a8..0000000000 --- a/yxt-as-ui/tests/unit/utils/parseTime.spec.js +++ /dev/null @@ -1,35 +0,0 @@ -import { parseTime } from '@/utils/index.js' - -describe('Utils:parseTime', () => { - const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01" - it('timestamp', () => { - expect(parseTime(d)).toBe('2018-07-13 17:54:01') - }) - it('timestamp string', () => { - expect(parseTime((d + ''))).toBe('2018-07-13 17:54:01') - }) - it('ten digits timestamp', () => { - expect(parseTime((d / 1000).toFixed(0))).toBe('2018-07-13 17:54:01') - }) - it('new Date', () => { - expect(parseTime(new Date(d))).toBe('2018-07-13 17:54:01') - }) - it('format', () => { - expect(parseTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54') - expect(parseTime(d, '{y}-{m}-{d}')).toBe('2018-07-13') - expect(parseTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54') - }) - it('get the day of the week', () => { - expect(parseTime(d, '{a}')).toBe('五') // 星期五 - }) - it('get the day of the week', () => { - expect(parseTime(+d + 1000 * 60 * 60 * 24 * 2, '{a}')).toBe('日') // 星期日 - }) - it('empty argument', () => { - expect(parseTime()).toBeNull() - }) - - it('null', () => { - expect(parseTime(null)).toBeNull() - }) -}) diff --git a/yxt-as-ui/tests/unit/utils/validate.spec.js b/yxt-as-ui/tests/unit/utils/validate.spec.js deleted file mode 100644 index f774905b00..0000000000 --- a/yxt-as-ui/tests/unit/utils/validate.spec.js +++ /dev/null @@ -1,17 +0,0 @@ -import { validUsername, isExternal } from '@/utils/validate.js' - -describe('Utils:validate', () => { - it('validUsername', () => { - expect(validUsername('admin')).toBe(true) - expect(validUsername('editor')).toBe(true) - expect(validUsername('xxxx')).toBe(false) - }) - it('isExternal', () => { - expect(isExternal('https://github.com/PanJiaChen/vue-element-admin')).toBe(true) - expect(isExternal('http://github.com/PanJiaChen/vue-element-admin')).toBe(true) - expect(isExternal('github.com/PanJiaChen/vue-element-admin')).toBe(false) - expect(isExternal('/dashboard')).toBe(false) - expect(isExternal('./dashboard')).toBe(false) - expect(isExternal('dashboard')).toBe(false) - }) -}) diff --git a/yxt-as-ui/vue.config.js b/yxt-as-ui/vue.config.js deleted file mode 100644 index 0b85478041..0000000000 --- a/yxt-as-ui/vue.config.js +++ /dev/null @@ -1,142 +0,0 @@ -'use strict' -const path = require('path') -const defaultSettings = require('./src/settings.js') - -function resolve(dir) { - return path.join(__dirname, dir) -} - -const name = defaultSettings.title || '安瑞集团信息化平台' // page title - -// 如果端口设置为80, -// 使用管理员权限执行命令行。 -// 例如,Mac:sudo npm run -// 可以通过以下方法更改端口: -// port=9528 npm run dev或npm run dev--port=9528 -const port = process.env.port || process.env.npm_config_port || 9531 // dev port - -// 所有配置项说明都可以在中找到https://cli.vuejs.org/config/ -module.exports = { - /** - *如果计划在子路径下部署站点,则需要设置publicPath, - *例如GitHub页面。如果您计划将站点部署到https://foo.github.io/bar/, - *然后publicPath应设置为“/bar/”。 - *在大多数情况下,请使用“/”!!! - *详细信息:https://cli.vuejs.org/config/#publicpath - */ - publicPath: process.env.NODE_ENV === 'production' ? '/as/' : '/', - outputDir: 'System', - assetsDir: 'static', - lintOnSave: process.env.NODE_ENV === 'development', - productionSourceMap: false, - devServer: { - hot: true, // 自动保存 - host: '0.0.0.0', - port: port, - // open: true, - overlay: { - warnings: false, - errors: true - }, - proxy: { - '/api': { // 匹配所有以 '/api'开头的请求路径 - // target: 'http://127.0.0.1:8111/', - target: process.env.VUE_APP_URL, // 代理目标的基础路径 - changeOrigin: true, // 支持跨域 - pathRewrite: { // 重写路径: 去掉路径中开头的'/api' - '^/api': '' - } - }, - '/upload': { // 匹配所有以 '/api'开头的请求路径 - // target: 'http://127.0.0.1:8111/', - target: process.env.VUE_APP_URL, // 代理目标的基础路径 - changeOrigin: true, // 支持跨域 - pathRewrite: { // 重写路径: 去掉路径中开头的'/api' - '^/upload': '' - } - } - }, - disableHostCheck: true - }, - configureWebpack: { - // 在webpack的name字段中提供应用程序的标题,以便 - // 它可以在索引.html插入正确的标题。 - name: name, - resolve: { - alias: { - '@': resolve('src'), - '@C': resolve('src/components') - } - } - }, - chainWebpack(config) { - // 它可以提高第一屏的速度,建议打开预加载 - config.plugin('preload').tap(() => [{ - rel: 'preload', - // 忽略 runtime.js - // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171 - fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], - include: 'initial' - }]) - - // 当有很多页面时,会导致太多无意义的请求 - config.plugins.delete('prefetch') - - // set svg-sprite-loader 设置 svg精灵加载程序 - config.module - .rule('svg') - .exclude.add(resolve('src/icons')) - .end() - config.module - .rule('icons') - .test(/\.svg$/) - .include.add(resolve('src/icons')) - .end() - .use('svg-sprite-loader') - .loader('svg-sprite-loader') - .options({ - symbolId: 'icon-[name]' - }) - .end() - - config - .when(process.env.NODE_ENV !== 'development', - config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) - .end() - config - .optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }) - // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk - config.optimization.runtimeChunk('single') - } - ) - } -}