diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d6da251 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# https://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/.env.development b/.env.development new file mode 100644 index 0000000..49c2e4a --- /dev/null +++ b/.env.development @@ -0,0 +1,10 @@ +ENV = 'development' + +# 接口地址 + +# 许镇-本地服地址 +VUE_APP_BASE_API = 'http://192.168.99.72:15000' +VUE_APP_WEBRTCSTREAMER_API = '127.0.0.1:8000' + +# 是否启用 babel-plugin-dynamic-import-node插件 +VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..6b77597 --- /dev/null +++ b/.env.production @@ -0,0 +1,11 @@ +ENV = 'production' + +# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 +# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http + +VUE_APP_BASE_API = 'http://192.168.99.86:12010' +VUE_APP_WEBRTCSTREAMER_API = '192.168.99.100:8000' + +# 如果接口是 http 形式, wss 需要改为 ws +#VUE_APP_WS_API = 'ws://27.16.212.58:11100' +#VUE_APP_CAMERA_API = '192.168.99.107:3000' diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..16ee710 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +build/*.js +src/assets +public +dist +vendors diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..187c448 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,197 @@ +module.exports = { + root: true, + parserOptions: { + parser: 'babel-eslint', + sourceType: 'module' + }, + env: { + browser: true, + node: true, + es6: true, + }, + extends: ['plugin:vue/recommended', 'eslint:recommended'], + + + rules: { + "vue/max-attributes-per-line": [2, { + "singleline": 10, + "multiline": { + "max": 1, + "allowFirstLine": false + } + }], + "vue/singleline-html-element-content-newline": "off", + "vue/multiline-html-element-content-newline":"off", + "vue/name-property-casing": ["error", "PascalCase"], + "vue/no-v-html": "off", + 'accessor-pairs': 2, + 'arrow-spacing': [2, { + 'before': true, + 'after': true + }], + 'block-spacing': [2, 'always'], + 'brace-style': [2, '1tbs', { + 'allowSingleLine': true + }], + 'camelcase': [0, { + 'properties': 'always' + }], + 'comma-dangle': [2, 'never'], + 'comma-spacing': [2, { + 'before': false, + 'after': true + }], + 'comma-style': [2, 'last'], + 'constructor-super': 2, + 'curly': [2, 'multi-line'], + 'dot-location': [2, 'property'], + 'eol-last': 2, + 'eqeqeq': ["error", "always", {"null": "ignore"}], + 'generator-star-spacing': [2, { + 'before': true, + 'after': true + }], + 'handle-callback-err': [2, '^(err|error)$'], + 'indent': [2, 2, { + 'SwitchCase': 1 + }], + 'jsx-quotes': [2, 'prefer-single'], + 'key-spacing': [2, { + 'beforeColon': false, + 'afterColon': true + }], + 'keyword-spacing': [2, { + 'before': true, + 'after': true + }], + 'new-cap': [2, { + 'newIsCap': true, + 'capIsNew': false + }], + 'new-parens': 2, + 'no-array-constructor': 2, + 'no-caller': 2, + 'no-console': 'off', + 'no-class-assign': 2, + 'no-cond-assign': 2, + 'no-const-assign': 2, + 'no-control-regex': 0, + 'no-delete-var': 2, + 'no-dupe-args': 2, + 'no-dupe-class-members': 2, + 'no-dupe-keys': 2, + 'no-duplicate-case': 2, + 'no-empty-character-class': 2, + 'no-empty-pattern': 2, + 'no-eval': 2, + 'no-ex-assign': 2, + 'no-extend-native': 2, + 'no-extra-bind': 2, + 'no-extra-boolean-cast': 2, + 'no-extra-parens': [2, 'functions'], + 'no-fallthrough': 2, + 'no-floating-decimal': 2, + 'no-func-assign': 2, + 'no-implied-eval': 2, + 'no-inner-declarations': [2, 'functions'], + 'no-invalid-regexp': 2, + 'no-irregular-whitespace': 2, + 'no-iterator': 2, + 'no-label-var': 2, + 'no-labels': [2, { + 'allowLoop': false, + 'allowSwitch': false + }], + 'no-lone-blocks': 2, + 'no-mixed-spaces-and-tabs': 2, + 'no-multi-spaces': 2, + 'no-multi-str': 2, + 'no-multiple-empty-lines': [2, { + 'max': 1 + }], + 'no-native-reassign': 2, + 'no-negated-in-lhs': 2, + 'no-new-object': 2, + 'no-new-require': 2, + 'no-new-symbol': 2, + 'no-new-wrappers': 2, + 'no-obj-calls': 2, + 'no-octal': 2, + 'no-octal-escape': 2, + 'no-path-concat': 2, + 'no-proto': 2, + 'no-redeclare': 2, + 'no-regex-spaces': 2, + 'no-return-assign': [2, 'except-parens'], + 'no-self-assign': 2, + 'no-self-compare': 2, + 'no-sequences': 2, + 'no-shadow-restricted-names': 2, + 'no-spaced-func': 2, + 'no-sparse-arrays': 2, + 'no-this-before-super': 2, + 'no-throw-literal': 2, + 'no-trailing-spaces': 2, + 'no-undef': 2, + 'no-undef-init': 2, + 'no-unexpected-multiline': 2, + 'no-unmodified-loop-condition': 2, + 'no-unneeded-ternary': [2, { + 'defaultAssignment': false + }], + 'no-unreachable': 2, + 'no-unsafe-finally': 2, + 'no-unused-vars': [2, { + 'vars': 'all', + 'args': 'none' + }], + 'no-useless-call': 2, + 'no-useless-computed-key': 2, + 'no-useless-constructor': 2, + 'no-useless-escape': 0, + 'no-whitespace-before-property': 2, + 'no-with': 2, + 'one-var': [2, { + 'initialized': 'never' + }], + 'operator-linebreak': [2, 'after', { + 'overrides': { + '?': 'before', + ':': 'before' + } + }], + 'padded-blocks': [2, 'never'], + 'quotes': [2, 'single', { + 'avoidEscape': true, + 'allowTemplateLiterals': true + }], + 'semi': [2, 'never'], + 'semi-spacing': [2, { + 'before': false, + 'after': true + }], + 'space-before-blocks': [2, 'always'], + 'space-before-function-paren': [2, 'never'], + 'space-in-parens': [2, 'never'], + 'space-infix-ops': 2, + 'space-unary-ops': [2, { + 'words': true, + 'nonwords': false + }], + 'spaced-comment': [2, 'always', { + 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] + }], + 'template-curly-spacing': [2, 'never'], + 'use-isnan': 2, + 'valid-typeof': 2, + 'wrap-iife': [2, 'any'], + 'yield-star-spacing': [2, 'both'], + 'yoda': [2, 'never'], + 'prefer-const': 2, + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, + 'object-curly-spacing': [2, 'always', { + objectsInObjects: false + }], + 'array-bracket-spacing': [2, 'never'] + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bf24052 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +.DS_Store +node_modules/ +dist/ +demo/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +**/*.log + +tests/**/coverage/ +tests/e2e/reports +selenium-debug.log + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.local + +package-lock.json +yarn.lock diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a95f7bb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: 10 +script: npm run test +notifications: + email: false diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9c95393 --- /dev/null +++ b/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "{}" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright 2019 Zheng Jie + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..d0178a2 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,11 @@ +const plugins = ['@vue/babel-plugin-transform-vue-jsx', '@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-nullish-coalescing-operator'] +// 生产环境移除console +if (process.env.NODE_ENV === 'production') { + plugins.push('transform-remove-console') +} +module.exports = { + plugins: plugins, + presets: [ + ['@vue/app', { useBuiltIns: 'entry' }] + ] +} diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..ca6c565 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,24 @@ +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/package.json b/package.json new file mode 100644 index 0000000..7904a57 --- /dev/null +++ b/package.json @@ -0,0 +1,156 @@ +{ + "name": "library-management-system", + "version": "1.0.0", + "description": "RFID资产管理后台", + "license": "", + "scripts": { + "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", + "build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build", + "build:stage": "vue-cli-service build --mode staging", + "preview": "node build/index.js --preview", + "lint": "eslint --ext .js,.vue src", + "test:unit": "jest --clearCache && vue-cli-service test:unit", + "svgo": "svgo -f src/assets/icons/svg --config=src/assets/icons/svgo.yml", + "new": "plop" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "src/**/*.{js,vue}": [ + "eslint --fix", + "git add" + ] + }, + "dependencies": { + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@handsontable/vue": "^14.1.0", + "@lapo/asn1js": "^1.2.1", + "@pdf-lib/fontkit": "^1.1.1", + "@riophae/vue-treeselect": "^0.4.0", + "@tinymce/tinymce-vue": "^3.0.1", + "@vue-office/docx": "^1.6.0", + "@vue-office/excel": "^1.6.5", + "axios": "^0.21.1", + "chokidar": "^3.5.3", + "clipboard": "2.0.4", + "codemirror": "^5.49.2", + "connect": "3.6.6", + "core-js": "^3.6.5", + "cropperjs": "^1.6.2", + "d3": "^4.12.0", + "dimple": "git+https://github.com/PMSI-AlignAlytics/dimple.git#2.3.0", + "docx-preview": "^0.1.8", + "echarts": "^4.2.1", + "echarts-gl": "^1.1.1", + "echarts-wordcloud": "^1.1.3", + "element-resize-detector": "^1.2.4", + "element-ui": "^2.15.6", + "exceljs": "^4.4.0", + "fabric": "2.5", + "file-saver": "^1.3.8", + "fuse.js": "3.4.4", + "handsontable": "^14.1.0", + "highlight.js": "^11.5.1", + "html2canvas": "^1.4.1", + "jquery": "^3.2.1", + "js-beautify": "^1.10.2", + "js-cookie": "2.2.0", + "js-md5": "^0.7.3", + "js-sha1": "^0.6.0", + "jsbarcode": "^3.11.6", + "jsencrypt": "^3.0.0-rc.1", + "jsrsasign": "^10.3.0", + "jszip": "^3.7.0", + "jszip-utils": "^0.1.0", + "mavon-editor": "^2.9.1", + "normalize.css": "7.0.0", + "nprogress": "0.2.0", + "ofd-xml-parser": "^0.0.2", + "path-to-regexp": "2.4.0", + "pdf-lib": "^1.17.1", + "pdfdist-mergeofd": "^2.2.228", + "pdfjs-dist": "^2.12.313", + "print-js": "^1.6.0", + "qrcodejs2": "^0.0.2", + "qs": "^6.10.1", + "quill": "^2.0.0-dev.3", + "quill-better-table": "^1.2.10", + "quill-image-resize-module": "^3.0.0", + "screenfull": "4.2.0", + "sm-crypto": "^0.3.2", + "sortablejs": "1.8.4", + "spark-md5": "^3.0.2", + "v-viewer": "^1.6.4", + "vconsole": "^3.15.1", + "vkbeautify": "^0.99.3", + "vue": "^2.6.14", + "vue-awesome-swiper": "^3.1.3", + "vue-count-to": "^1.0.13", + "vue-cropper": "^0.4.9", + "vue-cropperjs": "^5.0.0", + "vue-demi": "^0.14.7", + "vue-echarts": "^5.0.0-beta.0", + "vue-highlightjs": "^1.3.3", + "vue-image-crop-upload": "^2.5.0", + "vue-print-nb": "^1.7.5", + "vue-quill-editor": "^3.0.6", + "vue-resource": "^1.5.3", + "vue-router": "3.0.2", + "vue-simple-uploader": "^0.7.6", + "vue-splitpane": "1.0.4", + "vuedraggable": "2.20.0", + "vuex": "3.1.0", + "wangeditor": "^4.7.11", + "web-streams-polyfill": "^3.1.0", + "x2js": "^3.4.0", + "xlsx": "^0.17.4" + }, + "devDependencies": { + "@babel/parser": "^7.7.4", + "@babel/register": "7.0.0", + "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", + "@vue/cli-plugin-babel": "3.5.3", + "@vue/cli-plugin-eslint": "^3.9.1", + "@vue/cli-plugin-unit-jest": "3.5.3", + "@vue/cli-service": "3.5.3", + "@vue/test-utils": "1.0.0-beta.29", + "autoprefixer": "^9.5.1", + "babel-core": "7.0.0-bridge.0", + "babel-eslint": "10.0.1", + "babel-jest": "23.6.0", + "babel-plugin-dynamic-import-node": "2.3.0", + "babel-plugin-transform-remove-console": "^6.9.4", + "chalk": "2.4.2", + "chokidar": "2.1.5", + "connect": "3.6.6", + "eslint": "5.15.3", + "eslint-plugin-vue": "5.2.2", + "generate-asset-webpack-plugin": "^0.3.0", + "html-webpack-plugin": "^4.5.2", + "http-proxy-middleware": "^0.19.1", + "husky": "1.3.1", + "lint-staged": "8.1.5", + "plop": "2.3.0", + "sass": "1.32.13", + "sass-loader": "10.2.0", + "script-ext-html-webpack-plugin": "2.1.3", + "script-loader": "0.7.2", + "serve-static": "^1.13.2", + "svg-sprite-loader": "4.1.3", + "svgo": "1.2.0", + "tasksfile": "^5.1.1", + "vue-template-compiler": "2.6.14" + }, + "engines": { + "node": ">=8.9", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} diff --git a/plopfile.js b/plopfile.js new file mode 100644 index 0000000..725c51b --- /dev/null +++ b/plopfile.js @@ -0,0 +1,7 @@ +const viewGenerator = require('./plop-templates/view/prompt') +const componentGenerator = require('./plop-templates/component/prompt') + +module.exports = function(plop) { + plop.setGenerator('view', viewGenerator) + plop.setGenerator('component', componentGenerator) +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..2be0631 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + autoprefixer: {} + } +} diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..02f4e77 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..f0eb69e --- /dev/null +++ b/public/index.html @@ -0,0 +1,17 @@ + + + + + + + + + + + <%= webpackConfig.name %> + + + +
+ + \ No newline at end of file diff --git a/public/static/adapter.min.js b/public/static/adapter.min.js new file mode 100644 index 0000000..f766aa6 --- /dev/null +++ b/public/static/adapter.min.js @@ -0,0 +1,3514 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.adapter = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 0 && arguments[0] !== undefined ? arguments[0] : {}, + window = _ref.window; + + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { + shimChrome: true, + shimFirefox: true, + shimSafari: true + }; + + // Utils. + var logging = utils.log; + var browserDetails = utils.detectBrowser(window); + + var adapter = { + browserDetails: browserDetails, + commonShim: commonShim, + extractVersion: utils.extractVersion, + disableLog: utils.disableLog, + disableWarnings: utils.disableWarnings, + // Expose sdp as a convenience. For production apps include directly. + sdp: sdp + }; + + // Shim browser if found. + switch (browserDetails.browser) { + case 'chrome': + if (!chromeShim || !chromeShim.shimPeerConnection || !options.shimChrome) { + logging('Chrome shim is not included in this adapter release.'); + return adapter; + } + if (browserDetails.version === null) { + logging('Chrome shim can not determine version, not shimming.'); + return adapter; + } + logging('adapter.js shimming chrome.'); + // Export to the adapter global object visible in the browser. + adapter.browserShim = chromeShim; + + // Must be called before shimPeerConnection. + commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails); + commonShim.shimParameterlessSetLocalDescription(window, browserDetails); + + chromeShim.shimGetUserMedia(window, browserDetails); + chromeShim.shimMediaStream(window, browserDetails); + chromeShim.shimPeerConnection(window, browserDetails); + chromeShim.shimOnTrack(window, browserDetails); + chromeShim.shimAddTrackRemoveTrack(window, browserDetails); + chromeShim.shimGetSendersWithDtmf(window, browserDetails); + chromeShim.shimGetStats(window, browserDetails); + chromeShim.shimSenderReceiverGetStats(window, browserDetails); + chromeShim.fixNegotiationNeeded(window, browserDetails); + + commonShim.shimRTCIceCandidate(window, browserDetails); + commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails); + commonShim.shimConnectionState(window, browserDetails); + commonShim.shimMaxMessageSize(window, browserDetails); + commonShim.shimSendThrowTypeError(window, browserDetails); + commonShim.removeExtmapAllowMixed(window, browserDetails); + break; + case 'firefox': + if (!firefoxShim || !firefoxShim.shimPeerConnection || !options.shimFirefox) { + logging('Firefox shim is not included in this adapter release.'); + return adapter; + } + logging('adapter.js shimming firefox.'); + // Export to the adapter global object visible in the browser. + adapter.browserShim = firefoxShim; + + // Must be called before shimPeerConnection. + commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails); + commonShim.shimParameterlessSetLocalDescription(window, browserDetails); + + firefoxShim.shimGetUserMedia(window, browserDetails); + firefoxShim.shimPeerConnection(window, browserDetails); + firefoxShim.shimOnTrack(window, browserDetails); + firefoxShim.shimRemoveStream(window, browserDetails); + firefoxShim.shimSenderGetStats(window, browserDetails); + firefoxShim.shimReceiverGetStats(window, browserDetails); + firefoxShim.shimRTCDataChannel(window, browserDetails); + firefoxShim.shimAddTransceiver(window, browserDetails); + firefoxShim.shimGetParameters(window, browserDetails); + firefoxShim.shimCreateOffer(window, browserDetails); + firefoxShim.shimCreateAnswer(window, browserDetails); + + commonShim.shimRTCIceCandidate(window, browserDetails); + commonShim.shimConnectionState(window, browserDetails); + commonShim.shimMaxMessageSize(window, browserDetails); + commonShim.shimSendThrowTypeError(window, browserDetails); + break; + case 'safari': + if (!safariShim || !options.shimSafari) { + logging('Safari shim is not included in this adapter release.'); + return adapter; + } + logging('adapter.js shimming safari.'); + // Export to the adapter global object visible in the browser. + adapter.browserShim = safariShim; + + // Must be called before shimCallbackAPI. + commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails); + commonShim.shimParameterlessSetLocalDescription(window, browserDetails); + + safariShim.shimRTCIceServerUrls(window, browserDetails); + safariShim.shimCreateOfferLegacy(window, browserDetails); + safariShim.shimCallbacksAPI(window, browserDetails); + safariShim.shimLocalStreamsAPI(window, browserDetails); + safariShim.shimRemoteStreamsAPI(window, browserDetails); + safariShim.shimTrackEventTransceiver(window, browserDetails); + safariShim.shimGetUserMedia(window, browserDetails); + safariShim.shimAudioContext(window, browserDetails); + + commonShim.shimRTCIceCandidate(window, browserDetails); + commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails); + commonShim.shimMaxMessageSize(window, browserDetails); + commonShim.shimSendThrowTypeError(window, browserDetails); + commonShim.removeExtmapAllowMixed(window, browserDetails); + break; + default: + logging('Unsupported browser!'); + break; + } + + return adapter; +} + +// Browser shims. + +},{"./chrome/chrome_shim":3,"./common_shim":6,"./firefox/firefox_shim":7,"./safari/safari_shim":10,"./utils":11,"sdp":12}],3:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +/* eslint-env node */ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.shimGetDisplayMedia = exports.shimGetUserMedia = undefined; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _getusermedia = require('./getusermedia'); + +Object.defineProperty(exports, 'shimGetUserMedia', { + enumerable: true, + get: function get() { + return _getusermedia.shimGetUserMedia; + } +}); + +var _getdisplaymedia = require('./getdisplaymedia'); + +Object.defineProperty(exports, 'shimGetDisplayMedia', { + enumerable: true, + get: function get() { + return _getdisplaymedia.shimGetDisplayMedia; + } +}); +exports.shimMediaStream = shimMediaStream; +exports.shimOnTrack = shimOnTrack; +exports.shimGetSendersWithDtmf = shimGetSendersWithDtmf; +exports.shimGetStats = shimGetStats; +exports.shimSenderReceiverGetStats = shimSenderReceiverGetStats; +exports.shimAddTrackRemoveTrackWithNative = shimAddTrackRemoveTrackWithNative; +exports.shimAddTrackRemoveTrack = shimAddTrackRemoveTrack; +exports.shimPeerConnection = shimPeerConnection; +exports.fixNegotiationNeeded = fixNegotiationNeeded; + +var _utils = require('../utils.js'); + +var utils = _interopRequireWildcard(_utils); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function shimMediaStream(window) { + window.MediaStream = window.MediaStream || window.webkitMediaStream; +} + +function shimOnTrack(window) { + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCPeerConnection && !('ontrack' in window.RTCPeerConnection.prototype)) { + Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', { + get: function get() { + return this._ontrack; + }, + set: function set(f) { + if (this._ontrack) { + this.removeEventListener('track', this._ontrack); + } + this.addEventListener('track', this._ontrack = f); + }, + + enumerable: true, + configurable: true + }); + var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription; + window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() { + var _this = this; + + if (!this._ontrackpoly) { + this._ontrackpoly = function (e) { + // onaddstream does not fire when a track is added to an existing + // stream. But stream.onaddtrack is implemented so we use that. + e.stream.addEventListener('addtrack', function (te) { + var receiver = void 0; + if (window.RTCPeerConnection.prototype.getReceivers) { + receiver = _this.getReceivers().find(function (r) { + return r.track && r.track.id === te.track.id; + }); + } else { + receiver = { track: te.track }; + } + + var event = new Event('track'); + event.track = te.track; + event.receiver = receiver; + event.transceiver = { receiver: receiver }; + event.streams = [e.stream]; + _this.dispatchEvent(event); + }); + e.stream.getTracks().forEach(function (track) { + var receiver = void 0; + if (window.RTCPeerConnection.prototype.getReceivers) { + receiver = _this.getReceivers().find(function (r) { + return r.track && r.track.id === track.id; + }); + } else { + receiver = { track: track }; + } + var event = new Event('track'); + event.track = track; + event.receiver = receiver; + event.transceiver = { receiver: receiver }; + event.streams = [e.stream]; + _this.dispatchEvent(event); + }); + }; + this.addEventListener('addstream', this._ontrackpoly); + } + return origSetRemoteDescription.apply(this, arguments); + }; + } else { + // even if RTCRtpTransceiver is in window, it is only used and + // emitted in unified-plan. Unfortunately this means we need + // to unconditionally wrap the event. + utils.wrapPeerConnectionEvent(window, 'track', function (e) { + if (!e.transceiver) { + Object.defineProperty(e, 'transceiver', { value: { receiver: e.receiver } }); + } + return e; + }); + } +} + +function shimGetSendersWithDtmf(window) { + // Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack. + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCPeerConnection && !('getSenders' in window.RTCPeerConnection.prototype) && 'createDTMFSender' in window.RTCPeerConnection.prototype) { + var shimSenderWithDtmf = function shimSenderWithDtmf(pc, track) { + return { + track: track, + get dtmf() { + if (this._dtmf === undefined) { + if (track.kind === 'audio') { + this._dtmf = pc.createDTMFSender(track); + } else { + this._dtmf = null; + } + } + return this._dtmf; + }, + _pc: pc + }; + }; + + // augment addTrack when getSenders is not available. + if (!window.RTCPeerConnection.prototype.getSenders) { + window.RTCPeerConnection.prototype.getSenders = function getSenders() { + this._senders = this._senders || []; + return this._senders.slice(); // return a copy of the internal state. + }; + var origAddTrack = window.RTCPeerConnection.prototype.addTrack; + window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) { + var sender = origAddTrack.apply(this, arguments); + if (!sender) { + sender = shimSenderWithDtmf(this, track); + this._senders.push(sender); + } + return sender; + }; + + var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack; + window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) { + origRemoveTrack.apply(this, arguments); + var idx = this._senders.indexOf(sender); + if (idx !== -1) { + this._senders.splice(idx, 1); + } + }; + } + var origAddStream = window.RTCPeerConnection.prototype.addStream; + window.RTCPeerConnection.prototype.addStream = function addStream(stream) { + var _this2 = this; + + this._senders = this._senders || []; + origAddStream.apply(this, [stream]); + stream.getTracks().forEach(function (track) { + _this2._senders.push(shimSenderWithDtmf(_this2, track)); + }); + }; + + var origRemoveStream = window.RTCPeerConnection.prototype.removeStream; + window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) { + var _this3 = this; + + this._senders = this._senders || []; + origRemoveStream.apply(this, [stream]); + + stream.getTracks().forEach(function (track) { + var sender = _this3._senders.find(function (s) { + return s.track === track; + }); + if (sender) { + // remove sender + _this3._senders.splice(_this3._senders.indexOf(sender), 1); + } + }); + }; + } else if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCPeerConnection && 'getSenders' in window.RTCPeerConnection.prototype && 'createDTMFSender' in window.RTCPeerConnection.prototype && window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) { + var origGetSenders = window.RTCPeerConnection.prototype.getSenders; + window.RTCPeerConnection.prototype.getSenders = function getSenders() { + var _this4 = this; + + var senders = origGetSenders.apply(this, []); + senders.forEach(function (sender) { + return sender._pc = _this4; + }); + return senders; + }; + + Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', { + get: function get() { + if (this._dtmf === undefined) { + if (this.track.kind === 'audio') { + this._dtmf = this._pc.createDTMFSender(this.track); + } else { + this._dtmf = null; + } + } + return this._dtmf; + } + }); + } +} + +function shimGetStats(window) { + if (!window.RTCPeerConnection) { + return; + } + + var origGetStats = window.RTCPeerConnection.prototype.getStats; + window.RTCPeerConnection.prototype.getStats = function getStats() { + var _this5 = this; + + var _arguments = Array.prototype.slice.call(arguments), + selector = _arguments[0], + onSucc = _arguments[1], + onErr = _arguments[2]; + + // If selector is a function then we are in the old style stats so just + // pass back the original getStats format to avoid breaking old users. + + + if (arguments.length > 0 && typeof selector === 'function') { + return origGetStats.apply(this, arguments); + } + + // When spec-style getStats is supported, return those when called with + // either no arguments or the selector argument is null. + if (origGetStats.length === 0 && (arguments.length === 0 || typeof selector !== 'function')) { + return origGetStats.apply(this, []); + } + + var fixChromeStats_ = function fixChromeStats_(response) { + var standardReport = {}; + var reports = response.result(); + reports.forEach(function (report) { + var standardStats = { + id: report.id, + timestamp: report.timestamp, + type: { + localcandidate: 'local-candidate', + remotecandidate: 'remote-candidate' + }[report.type] || report.type + }; + report.names().forEach(function (name) { + standardStats[name] = report.stat(name); + }); + standardReport[standardStats.id] = standardStats; + }); + + return standardReport; + }; + + // shim getStats with maplike support + var makeMapStats = function makeMapStats(stats) { + return new Map(Object.keys(stats).map(function (key) { + return [key, stats[key]]; + })); + }; + + if (arguments.length >= 2) { + var successCallbackWrapper_ = function successCallbackWrapper_(response) { + onSucc(makeMapStats(fixChromeStats_(response))); + }; + + return origGetStats.apply(this, [successCallbackWrapper_, selector]); + } + + // promise-support + return new Promise(function (resolve, reject) { + origGetStats.apply(_this5, [function (response) { + resolve(makeMapStats(fixChromeStats_(response))); + }, reject]); + }).then(onSucc, onErr); + }; +} + +function shimSenderReceiverGetStats(window) { + if (!((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCPeerConnection && window.RTCRtpSender && window.RTCRtpReceiver)) { + return; + } + + // shim sender stats. + if (!('getStats' in window.RTCRtpSender.prototype)) { + var origGetSenders = window.RTCPeerConnection.prototype.getSenders; + if (origGetSenders) { + window.RTCPeerConnection.prototype.getSenders = function getSenders() { + var _this6 = this; + + var senders = origGetSenders.apply(this, []); + senders.forEach(function (sender) { + return sender._pc = _this6; + }); + return senders; + }; + } + + var origAddTrack = window.RTCPeerConnection.prototype.addTrack; + if (origAddTrack) { + window.RTCPeerConnection.prototype.addTrack = function addTrack() { + var sender = origAddTrack.apply(this, arguments); + sender._pc = this; + return sender; + }; + } + window.RTCRtpSender.prototype.getStats = function getStats() { + var sender = this; + return this._pc.getStats().then(function (result) { + return ( + /* Note: this will include stats of all senders that + * send a track with the same id as sender.track as + * it is not possible to identify the RTCRtpSender. + */ + utils.filterStats(result, sender.track, true) + ); + }); + }; + } + + // shim receiver stats. + if (!('getStats' in window.RTCRtpReceiver.prototype)) { + var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers; + if (origGetReceivers) { + window.RTCPeerConnection.prototype.getReceivers = function getReceivers() { + var _this7 = this; + + var receivers = origGetReceivers.apply(this, []); + receivers.forEach(function (receiver) { + return receiver._pc = _this7; + }); + return receivers; + }; + } + utils.wrapPeerConnectionEvent(window, 'track', function (e) { + e.receiver._pc = e.srcElement; + return e; + }); + window.RTCRtpReceiver.prototype.getStats = function getStats() { + var receiver = this; + return this._pc.getStats().then(function (result) { + return utils.filterStats(result, receiver.track, false); + }); + }; + } + + if (!('getStats' in window.RTCRtpSender.prototype && 'getStats' in window.RTCRtpReceiver.prototype)) { + return; + } + + // shim RTCPeerConnection.getStats(track). + var origGetStats = window.RTCPeerConnection.prototype.getStats; + window.RTCPeerConnection.prototype.getStats = function getStats() { + if (arguments.length > 0 && arguments[0] instanceof window.MediaStreamTrack) { + var track = arguments[0]; + var sender = void 0; + var receiver = void 0; + var err = void 0; + this.getSenders().forEach(function (s) { + if (s.track === track) { + if (sender) { + err = true; + } else { + sender = s; + } + } + }); + this.getReceivers().forEach(function (r) { + if (r.track === track) { + if (receiver) { + err = true; + } else { + receiver = r; + } + } + return r.track === track; + }); + if (err || sender && receiver) { + return Promise.reject(new DOMException('There are more than one sender or receiver for the track.', 'InvalidAccessError')); + } else if (sender) { + return sender.getStats(); + } else if (receiver) { + return receiver.getStats(); + } + return Promise.reject(new DOMException('There is no sender or receiver for the track.', 'InvalidAccessError')); + } + return origGetStats.apply(this, arguments); + }; +} + +function shimAddTrackRemoveTrackWithNative(window) { + // shim addTrack/removeTrack with native variants in order to make + // the interactions with legacy getLocalStreams behave as in other browsers. + // Keeps a mapping stream.id => [stream, rtpsenders...] + window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() { + var _this8 = this; + + this._shimmedLocalStreams = this._shimmedLocalStreams || {}; + return Object.keys(this._shimmedLocalStreams).map(function (streamId) { + return _this8._shimmedLocalStreams[streamId][0]; + }); + }; + + var origAddTrack = window.RTCPeerConnection.prototype.addTrack; + window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) { + if (!stream) { + return origAddTrack.apply(this, arguments); + } + this._shimmedLocalStreams = this._shimmedLocalStreams || {}; + + var sender = origAddTrack.apply(this, arguments); + if (!this._shimmedLocalStreams[stream.id]) { + this._shimmedLocalStreams[stream.id] = [stream, sender]; + } else if (this._shimmedLocalStreams[stream.id].indexOf(sender) === -1) { + this._shimmedLocalStreams[stream.id].push(sender); + } + return sender; + }; + + var origAddStream = window.RTCPeerConnection.prototype.addStream; + window.RTCPeerConnection.prototype.addStream = function addStream(stream) { + var _this9 = this; + + this._shimmedLocalStreams = this._shimmedLocalStreams || {}; + + stream.getTracks().forEach(function (track) { + var alreadyExists = _this9.getSenders().find(function (s) { + return s.track === track; + }); + if (alreadyExists) { + throw new DOMException('Track already exists.', 'InvalidAccessError'); + } + }); + var existingSenders = this.getSenders(); + origAddStream.apply(this, arguments); + var newSenders = this.getSenders().filter(function (newSender) { + return existingSenders.indexOf(newSender) === -1; + }); + this._shimmedLocalStreams[stream.id] = [stream].concat(newSenders); + }; + + var origRemoveStream = window.RTCPeerConnection.prototype.removeStream; + window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) { + this._shimmedLocalStreams = this._shimmedLocalStreams || {}; + delete this._shimmedLocalStreams[stream.id]; + return origRemoveStream.apply(this, arguments); + }; + + var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack; + window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) { + var _this10 = this; + + this._shimmedLocalStreams = this._shimmedLocalStreams || {}; + if (sender) { + Object.keys(this._shimmedLocalStreams).forEach(function (streamId) { + var idx = _this10._shimmedLocalStreams[streamId].indexOf(sender); + if (idx !== -1) { + _this10._shimmedLocalStreams[streamId].splice(idx, 1); + } + if (_this10._shimmedLocalStreams[streamId].length === 1) { + delete _this10._shimmedLocalStreams[streamId]; + } + }); + } + return origRemoveTrack.apply(this, arguments); + }; +} + +function shimAddTrackRemoveTrack(window, browserDetails) { + if (!window.RTCPeerConnection) { + return; + } + // shim addTrack and removeTrack. + if (window.RTCPeerConnection.prototype.addTrack && browserDetails.version >= 65) { + return shimAddTrackRemoveTrackWithNative(window); + } + + // also shim pc.getLocalStreams when addTrack is shimmed + // to return the original streams. + var origGetLocalStreams = window.RTCPeerConnection.prototype.getLocalStreams; + window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() { + var _this11 = this; + + var nativeStreams = origGetLocalStreams.apply(this); + this._reverseStreams = this._reverseStreams || {}; + return nativeStreams.map(function (stream) { + return _this11._reverseStreams[stream.id]; + }); + }; + + var origAddStream = window.RTCPeerConnection.prototype.addStream; + window.RTCPeerConnection.prototype.addStream = function addStream(stream) { + var _this12 = this; + + this._streams = this._streams || {}; + this._reverseStreams = this._reverseStreams || {}; + + stream.getTracks().forEach(function (track) { + var alreadyExists = _this12.getSenders().find(function (s) { + return s.track === track; + }); + if (alreadyExists) { + throw new DOMException('Track already exists.', 'InvalidAccessError'); + } + }); + // Add identity mapping for consistency with addTrack. + // Unless this is being used with a stream from addTrack. + if (!this._reverseStreams[stream.id]) { + var newStream = new window.MediaStream(stream.getTracks()); + this._streams[stream.id] = newStream; + this._reverseStreams[newStream.id] = stream; + stream = newStream; + } + origAddStream.apply(this, [stream]); + }; + + var origRemoveStream = window.RTCPeerConnection.prototype.removeStream; + window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) { + this._streams = this._streams || {}; + this._reverseStreams = this._reverseStreams || {}; + + origRemoveStream.apply(this, [this._streams[stream.id] || stream]); + delete this._reverseStreams[this._streams[stream.id] ? this._streams[stream.id].id : stream.id]; + delete this._streams[stream.id]; + }; + + window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) { + var _this13 = this; + + if (this.signalingState === 'closed') { + throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError'); + } + var streams = [].slice.call(arguments, 1); + if (streams.length !== 1 || !streams[0].getTracks().find(function (t) { + return t === track; + })) { + // this is not fully correct but all we can manage without + // [[associated MediaStreams]] internal slot. + throw new DOMException('The adapter.js addTrack polyfill only supports a single ' + ' stream which is associated with the specified track.', 'NotSupportedError'); + } + + var alreadyExists = this.getSenders().find(function (s) { + return s.track === track; + }); + if (alreadyExists) { + throw new DOMException('Track already exists.', 'InvalidAccessError'); + } + + this._streams = this._streams || {}; + this._reverseStreams = this._reverseStreams || {}; + var oldStream = this._streams[stream.id]; + if (oldStream) { + // this is using odd Chrome behaviour, use with caution: + // https://bugs.chromium.org/p/webrtc/issues/detail?id=7815 + // Note: we rely on the high-level addTrack/dtmf shim to + // create the sender with a dtmf sender. + oldStream.addTrack(track); + + // Trigger ONN async. + Promise.resolve().then(function () { + _this13.dispatchEvent(new Event('negotiationneeded')); + }); + } else { + var newStream = new window.MediaStream([track]); + this._streams[stream.id] = newStream; + this._reverseStreams[newStream.id] = stream; + this.addStream(newStream); + } + return this.getSenders().find(function (s) { + return s.track === track; + }); + }; + + // replace the internal stream id with the external one and + // vice versa. + function replaceInternalStreamId(pc, description) { + var sdp = description.sdp; + Object.keys(pc._reverseStreams || []).forEach(function (internalId) { + var externalStream = pc._reverseStreams[internalId]; + var internalStream = pc._streams[externalStream.id]; + sdp = sdp.replace(new RegExp(internalStream.id, 'g'), externalStream.id); + }); + return new RTCSessionDescription({ + type: description.type, + sdp: sdp + }); + } + function replaceExternalStreamId(pc, description) { + var sdp = description.sdp; + Object.keys(pc._reverseStreams || []).forEach(function (internalId) { + var externalStream = pc._reverseStreams[internalId]; + var internalStream = pc._streams[externalStream.id]; + sdp = sdp.replace(new RegExp(externalStream.id, 'g'), internalStream.id); + }); + return new RTCSessionDescription({ + type: description.type, + sdp: sdp + }); + } + ['createOffer', 'createAnswer'].forEach(function (method) { + var nativeMethod = window.RTCPeerConnection.prototype[method]; + var methodObj = _defineProperty({}, method, function () { + var _this14 = this; + + var args = arguments; + var isLegacyCall = arguments.length && typeof arguments[0] === 'function'; + if (isLegacyCall) { + return nativeMethod.apply(this, [function (description) { + var desc = replaceInternalStreamId(_this14, description); + args[0].apply(null, [desc]); + }, function (err) { + if (args[1]) { + args[1].apply(null, err); + } + }, arguments[2]]); + } + return nativeMethod.apply(this, arguments).then(function (description) { + return replaceInternalStreamId(_this14, description); + }); + }); + window.RTCPeerConnection.prototype[method] = methodObj[method]; + }); + + var origSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription; + window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() { + if (!arguments.length || !arguments[0].type) { + return origSetLocalDescription.apply(this, arguments); + } + arguments[0] = replaceExternalStreamId(this, arguments[0]); + return origSetLocalDescription.apply(this, arguments); + }; + + // TODO: mangle getStats: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamstats-streamidentifier + + var origLocalDescription = Object.getOwnPropertyDescriptor(window.RTCPeerConnection.prototype, 'localDescription'); + Object.defineProperty(window.RTCPeerConnection.prototype, 'localDescription', { + get: function get() { + var description = origLocalDescription.get.apply(this); + if (description.type === '') { + return description; + } + return replaceInternalStreamId(this, description); + } + }); + + window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) { + var _this15 = this; + + if (this.signalingState === 'closed') { + throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError'); + } + // We can not yet check for sender instanceof RTCRtpSender + // since we shim RTPSender. So we check if sender._pc is set. + if (!sender._pc) { + throw new DOMException('Argument 1 of RTCPeerConnection.removeTrack ' + 'does not implement interface RTCRtpSender.', 'TypeError'); + } + var isLocal = sender._pc === this; + if (!isLocal) { + throw new DOMException('Sender was not created by this connection.', 'InvalidAccessError'); + } + + // Search for the native stream the senders track belongs to. + this._streams = this._streams || {}; + var stream = void 0; + Object.keys(this._streams).forEach(function (streamid) { + var hasTrack = _this15._streams[streamid].getTracks().find(function (track) { + return sender.track === track; + }); + if (hasTrack) { + stream = _this15._streams[streamid]; + } + }); + + if (stream) { + if (stream.getTracks().length === 1) { + // if this is the last track of the stream, remove the stream. This + // takes care of any shimmed _senders. + this.removeStream(this._reverseStreams[stream.id]); + } else { + // relying on the same odd chrome behaviour as above. + stream.removeTrack(sender.track); + } + this.dispatchEvent(new Event('negotiationneeded')); + } + }; +} + +function shimPeerConnection(window, browserDetails) { + if (!window.RTCPeerConnection && window.webkitRTCPeerConnection) { + // very basic support for old versions. + window.RTCPeerConnection = window.webkitRTCPeerConnection; + } + if (!window.RTCPeerConnection) { + return; + } + + // shim implicit creation of RTCSessionDescription/RTCIceCandidate + if (browserDetails.version < 53) { + ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) { + var nativeMethod = window.RTCPeerConnection.prototype[method]; + var methodObj = _defineProperty({}, method, function () { + arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]); + return nativeMethod.apply(this, arguments); + }); + window.RTCPeerConnection.prototype[method] = methodObj[method]; + }); + } +} + +// Attempt to fix ONN in plan-b mode. +function fixNegotiationNeeded(window, browserDetails) { + utils.wrapPeerConnectionEvent(window, 'negotiationneeded', function (e) { + var pc = e.target; + if (browserDetails.version < 72 || pc.getConfiguration && pc.getConfiguration().sdpSemantics === 'plan-b') { + if (pc.signalingState !== 'stable') { + return; + } + } + return e; + }); +} + +},{"../utils.js":11,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(require,module,exports){ +/* + * Copyright (c) 2018 The adapter.js project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +/* eslint-env node */ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.shimGetDisplayMedia = shimGetDisplayMedia; +function shimGetDisplayMedia(window, getSourceId) { + if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) { + return; + } + if (!window.navigator.mediaDevices) { + return; + } + // getSourceId is a function that returns a promise resolving with + // the sourceId of the screen/window/tab to be shared. + if (typeof getSourceId !== 'function') { + console.error('shimGetDisplayMedia: getSourceId argument is not ' + 'a function'); + return; + } + window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) { + return getSourceId(constraints).then(function (sourceId) { + var widthSpecified = constraints.video && constraints.video.width; + var heightSpecified = constraints.video && constraints.video.height; + var frameRateSpecified = constraints.video && constraints.video.frameRate; + constraints.video = { + mandatory: { + chromeMediaSource: 'desktop', + chromeMediaSourceId: sourceId, + maxFrameRate: frameRateSpecified || 3 + } + }; + if (widthSpecified) { + constraints.video.mandatory.maxWidth = widthSpecified; + } + if (heightSpecified) { + constraints.video.mandatory.maxHeight = heightSpecified; + } + return window.navigator.mediaDevices.getUserMedia(constraints); + }); + }; +} + +},{}],5:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +/* eslint-env node */ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.shimGetUserMedia = shimGetUserMedia; + +var _utils = require('../utils.js'); + +var utils = _interopRequireWildcard(_utils); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var logging = utils.log; + +function shimGetUserMedia(window, browserDetails) { + var navigator = window && window.navigator; + + if (!navigator.mediaDevices) { + return; + } + + var constraintsToChrome_ = function constraintsToChrome_(c) { + if ((typeof c === 'undefined' ? 'undefined' : _typeof(c)) !== 'object' || c.mandatory || c.optional) { + return c; + } + var cc = {}; + Object.keys(c).forEach(function (key) { + if (key === 'require' || key === 'advanced' || key === 'mediaSource') { + return; + } + var r = _typeof(c[key]) === 'object' ? c[key] : { ideal: c[key] }; + if (r.exact !== undefined && typeof r.exact === 'number') { + r.min = r.max = r.exact; + } + var oldname_ = function oldname_(prefix, name) { + if (prefix) { + return prefix + name.charAt(0).toUpperCase() + name.slice(1); + } + return name === 'deviceId' ? 'sourceId' : name; + }; + if (r.ideal !== undefined) { + cc.optional = cc.optional || []; + var oc = {}; + if (typeof r.ideal === 'number') { + oc[oldname_('min', key)] = r.ideal; + cc.optional.push(oc); + oc = {}; + oc[oldname_('max', key)] = r.ideal; + cc.optional.push(oc); + } else { + oc[oldname_('', key)] = r.ideal; + cc.optional.push(oc); + } + } + if (r.exact !== undefined && typeof r.exact !== 'number') { + cc.mandatory = cc.mandatory || {}; + cc.mandatory[oldname_('', key)] = r.exact; + } else { + ['min', 'max'].forEach(function (mix) { + if (r[mix] !== undefined) { + cc.mandatory = cc.mandatory || {}; + cc.mandatory[oldname_(mix, key)] = r[mix]; + } + }); + } + }); + if (c.advanced) { + cc.optional = (cc.optional || []).concat(c.advanced); + } + return cc; + }; + + var shimConstraints_ = function shimConstraints_(constraints, func) { + if (browserDetails.version >= 61) { + return func(constraints); + } + constraints = JSON.parse(JSON.stringify(constraints)); + if (constraints && _typeof(constraints.audio) === 'object') { + var remap = function remap(obj, a, b) { + if (a in obj && !(b in obj)) { + obj[b] = obj[a]; + delete obj[a]; + } + }; + constraints = JSON.parse(JSON.stringify(constraints)); + remap(constraints.audio, 'autoGainControl', 'googAutoGainControl'); + remap(constraints.audio, 'noiseSuppression', 'googNoiseSuppression'); + constraints.audio = constraintsToChrome_(constraints.audio); + } + if (constraints && _typeof(constraints.video) === 'object') { + // Shim facingMode for mobile & surface pro. + var face = constraints.video.facingMode; + face = face && ((typeof face === 'undefined' ? 'undefined' : _typeof(face)) === 'object' ? face : { ideal: face }); + var getSupportedFacingModeLies = browserDetails.version < 66; + + if (face && (face.exact === 'user' || face.exact === 'environment' || face.ideal === 'user' || face.ideal === 'environment') && !(navigator.mediaDevices.getSupportedConstraints && navigator.mediaDevices.getSupportedConstraints().facingMode && !getSupportedFacingModeLies)) { + delete constraints.video.facingMode; + var matches = void 0; + if (face.exact === 'environment' || face.ideal === 'environment') { + matches = ['back', 'rear']; + } else if (face.exact === 'user' || face.ideal === 'user') { + matches = ['front']; + } + if (matches) { + // Look for matches in label, or use last cam for back (typical). + return navigator.mediaDevices.enumerateDevices().then(function (devices) { + devices = devices.filter(function (d) { + return d.kind === 'videoinput'; + }); + var dev = devices.find(function (d) { + return matches.some(function (match) { + return d.label.toLowerCase().includes(match); + }); + }); + if (!dev && devices.length && matches.includes('back')) { + dev = devices[devices.length - 1]; // more likely the back cam + } + if (dev) { + constraints.video.deviceId = face.exact ? { exact: dev.deviceId } : { ideal: dev.deviceId }; + } + constraints.video = constraintsToChrome_(constraints.video); + logging('chrome: ' + JSON.stringify(constraints)); + return func(constraints); + }); + } + } + constraints.video = constraintsToChrome_(constraints.video); + } + logging('chrome: ' + JSON.stringify(constraints)); + return func(constraints); + }; + + var shimError_ = function shimError_(e) { + if (browserDetails.version >= 64) { + return e; + } + return { + name: { + PermissionDeniedError: 'NotAllowedError', + PermissionDismissedError: 'NotAllowedError', + InvalidStateError: 'NotAllowedError', + DevicesNotFoundError: 'NotFoundError', + ConstraintNotSatisfiedError: 'OverconstrainedError', + TrackStartError: 'NotReadableError', + MediaDeviceFailedDueToShutdown: 'NotAllowedError', + MediaDeviceKillSwitchOn: 'NotAllowedError', + TabCaptureError: 'AbortError', + ScreenCaptureError: 'AbortError', + DeviceCaptureError: 'AbortError' + }[e.name] || e.name, + message: e.message, + constraint: e.constraint || e.constraintName, + toString: function toString() { + return this.name + (this.message && ': ') + this.message; + } + }; + }; + + var getUserMedia_ = function getUserMedia_(constraints, onSuccess, onError) { + shimConstraints_(constraints, function (c) { + navigator.webkitGetUserMedia(c, onSuccess, function (e) { + if (onError) { + onError(shimError_(e)); + } + }); + }); + }; + navigator.getUserMedia = getUserMedia_.bind(navigator); + + // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia + // function which returns a Promise, it does not accept spec-style + // constraints. + if (navigator.mediaDevices.getUserMedia) { + var origGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices); + navigator.mediaDevices.getUserMedia = function (cs) { + return shimConstraints_(cs, function (c) { + return origGetUserMedia(c).then(function (stream) { + if (c.audio && !stream.getAudioTracks().length || c.video && !stream.getVideoTracks().length) { + stream.getTracks().forEach(function (track) { + track.stop(); + }); + throw new DOMException('', 'NotFoundError'); + } + return stream; + }, function (e) { + return Promise.reject(shimError_(e)); + }); + }); + }; + } +} + +},{"../utils.js":11}],6:[function(require,module,exports){ +/* + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +/* eslint-env node */ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.shimRTCIceCandidate = shimRTCIceCandidate; +exports.shimRTCIceCandidateRelayProtocol = shimRTCIceCandidateRelayProtocol; +exports.shimMaxMessageSize = shimMaxMessageSize; +exports.shimSendThrowTypeError = shimSendThrowTypeError; +exports.shimConnectionState = shimConnectionState; +exports.removeExtmapAllowMixed = removeExtmapAllowMixed; +exports.shimAddIceCandidateNullOrEmpty = shimAddIceCandidateNullOrEmpty; +exports.shimParameterlessSetLocalDescription = shimParameterlessSetLocalDescription; + +var _sdp = require('sdp'); + +var _sdp2 = _interopRequireDefault(_sdp); + +var _utils = require('./utils'); + +var utils = _interopRequireWildcard(_utils); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function shimRTCIceCandidate(window) { + // foundation is arbitrarily chosen as an indicator for full support for + // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface + if (!window.RTCIceCandidate || window.RTCIceCandidate && 'foundation' in window.RTCIceCandidate.prototype) { + return; + } + + var NativeRTCIceCandidate = window.RTCIceCandidate; + window.RTCIceCandidate = function RTCIceCandidate(args) { + // Remove the a= which shouldn't be part of the candidate string. + if ((typeof args === 'undefined' ? 'undefined' : _typeof(args)) === 'object' && args.candidate && args.candidate.indexOf('a=') === 0) { + args = JSON.parse(JSON.stringify(args)); + args.candidate = args.candidate.substr(2); + } + + if (args.candidate && args.candidate.length) { + // Augment the native candidate with the parsed fields. + var nativeCandidate = new NativeRTCIceCandidate(args); + var parsedCandidate = _sdp2.default.parseCandidate(args.candidate); + var augmentedCandidate = Object.assign(nativeCandidate, parsedCandidate); + + // Add a serializer that does not serialize the extra attributes. + augmentedCandidate.toJSON = function toJSON() { + return { + candidate: augmentedCandidate.candidate, + sdpMid: augmentedCandidate.sdpMid, + sdpMLineIndex: augmentedCandidate.sdpMLineIndex, + usernameFragment: augmentedCandidate.usernameFragment + }; + }; + return augmentedCandidate; + } + return new NativeRTCIceCandidate(args); + }; + window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype; + + // Hook up the augmented candidate in onicecandidate and + // addEventListener('icecandidate', ...) + utils.wrapPeerConnectionEvent(window, 'icecandidate', function (e) { + if (e.candidate) { + Object.defineProperty(e, 'candidate', { + value: new window.RTCIceCandidate(e.candidate), + writable: 'false' + }); + } + return e; + }); +} + +function shimRTCIceCandidateRelayProtocol(window) { + if (!window.RTCIceCandidate || window.RTCIceCandidate && 'relayProtocol' in window.RTCIceCandidate.prototype) { + return; + } + + // Hook up the augmented candidate in onicecandidate and + // addEventListener('icecandidate', ...) + utils.wrapPeerConnectionEvent(window, 'icecandidate', function (e) { + if (e.candidate) { + var parsedCandidate = _sdp2.default.parseCandidate(e.candidate.candidate); + if (parsedCandidate.type === 'relay') { + // This is a libwebrtc-specific mapping of local type preference + // to relayProtocol. + e.candidate.relayProtocol = { + 0: 'tls', + 1: 'tcp', + 2: 'udp' + }[parsedCandidate.priority >> 24]; + } + } + return e; + }); +} + +function shimMaxMessageSize(window, browserDetails) { + if (!window.RTCPeerConnection) { + return; + } + + if (!('sctp' in window.RTCPeerConnection.prototype)) { + Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', { + get: function get() { + return typeof this._sctp === 'undefined' ? null : this._sctp; + } + }); + } + + var sctpInDescription = function sctpInDescription(description) { + if (!description || !description.sdp) { + return false; + } + var sections = _sdp2.default.splitSections(description.sdp); + sections.shift(); + return sections.some(function (mediaSection) { + var mLine = _sdp2.default.parseMLine(mediaSection); + return mLine && mLine.kind === 'application' && mLine.protocol.indexOf('SCTP') !== -1; + }); + }; + + var getRemoteFirefoxVersion = function getRemoteFirefoxVersion(description) { + // TODO: Is there a better solution for detecting Firefox? + var match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/); + if (match === null || match.length < 2) { + return -1; + } + var version = parseInt(match[1], 10); + // Test for NaN (yes, this is ugly) + return version !== version ? -1 : version; + }; + + var getCanSendMaxMessageSize = function getCanSendMaxMessageSize(remoteIsFirefox) { + // Every implementation we know can send at least 64 KiB. + // Note: Although Chrome is technically able to send up to 256 KiB, the + // data does not reach the other peer reliably. + // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419 + var canSendMaxMessageSize = 65536; + if (browserDetails.browser === 'firefox') { + if (browserDetails.version < 57) { + if (remoteIsFirefox === -1) { + // FF < 57 will send in 16 KiB chunks using the deprecated PPID + // fragmentation. + canSendMaxMessageSize = 16384; + } else { + // However, other FF (and RAWRTC) can reassemble PPID-fragmented + // messages. Thus, supporting ~2 GiB when sending. + canSendMaxMessageSize = 2147483637; + } + } else if (browserDetails.version < 60) { + // Currently, all FF >= 57 will reset the remote maximum message size + // to the default value when a data channel is created at a later + // stage. :( + // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831 + canSendMaxMessageSize = browserDetails.version === 57 ? 65535 : 65536; + } else { + // FF >= 60 supports sending ~2 GiB + canSendMaxMessageSize = 2147483637; + } + } + return canSendMaxMessageSize; + }; + + var getMaxMessageSize = function getMaxMessageSize(description, remoteIsFirefox) { + // Note: 65536 bytes is the default value from the SDP spec. Also, + // every implementation we know supports receiving 65536 bytes. + var maxMessageSize = 65536; + + // FF 57 has a slightly incorrect default remote max message size, so + // we need to adjust it here to avoid a failure when sending. + // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697 + if (browserDetails.browser === 'firefox' && browserDetails.version === 57) { + maxMessageSize = 65535; + } + + var match = _sdp2.default.matchPrefix(description.sdp, 'a=max-message-size:'); + if (match.length > 0) { + maxMessageSize = parseInt(match[0].substr(19), 10); + } else if (browserDetails.browser === 'firefox' && remoteIsFirefox !== -1) { + // If the maximum message size is not present in the remote SDP and + // both local and remote are Firefox, the remote peer can receive + // ~2 GiB. + maxMessageSize = 2147483637; + } + return maxMessageSize; + }; + + var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription; + window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() { + this._sctp = null; + // Chrome decided to not expose .sctp in plan-b mode. + // As usual, adapter.js has to do an 'ugly worakaround' + // to cover up the mess. + if (browserDetails.browser === 'chrome' && browserDetails.version >= 76) { + var _getConfiguration = this.getConfiguration(), + sdpSemantics = _getConfiguration.sdpSemantics; + + if (sdpSemantics === 'plan-b') { + Object.defineProperty(this, 'sctp', { + get: function get() { + return typeof this._sctp === 'undefined' ? null : this._sctp; + }, + + enumerable: true, + configurable: true + }); + } + } + + if (sctpInDescription(arguments[0])) { + // Check if the remote is FF. + var isFirefox = getRemoteFirefoxVersion(arguments[0]); + + // Get the maximum message size the local peer is capable of sending + var canSendMMS = getCanSendMaxMessageSize(isFirefox); + + // Get the maximum message size of the remote peer. + var remoteMMS = getMaxMessageSize(arguments[0], isFirefox); + + // Determine final maximum message size + var maxMessageSize = void 0; + if (canSendMMS === 0 && remoteMMS === 0) { + maxMessageSize = Number.POSITIVE_INFINITY; + } else if (canSendMMS === 0 || remoteMMS === 0) { + maxMessageSize = Math.max(canSendMMS, remoteMMS); + } else { + maxMessageSize = Math.min(canSendMMS, remoteMMS); + } + + // Create a dummy RTCSctpTransport object and the 'maxMessageSize' + // attribute. + var sctp = {}; + Object.defineProperty(sctp, 'maxMessageSize', { + get: function get() { + return maxMessageSize; + } + }); + this._sctp = sctp; + } + + return origSetRemoteDescription.apply(this, arguments); + }; +} + +function shimSendThrowTypeError(window) { + if (!(window.RTCPeerConnection && 'createDataChannel' in window.RTCPeerConnection.prototype)) { + return; + } + + // Note: Although Firefox >= 57 has a native implementation, the maximum + // message size can be reset for all data channels at a later stage. + // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831 + + function wrapDcSend(dc, pc) { + var origDataChannelSend = dc.send; + dc.send = function send() { + var data = arguments[0]; + var length = data.length || data.size || data.byteLength; + if (dc.readyState === 'open' && pc.sctp && length > pc.sctp.maxMessageSize) { + throw new TypeError('Message too large (can send a maximum of ' + pc.sctp.maxMessageSize + ' bytes)'); + } + return origDataChannelSend.apply(dc, arguments); + }; + } + var origCreateDataChannel = window.RTCPeerConnection.prototype.createDataChannel; + window.RTCPeerConnection.prototype.createDataChannel = function createDataChannel() { + var dataChannel = origCreateDataChannel.apply(this, arguments); + wrapDcSend(dataChannel, this); + return dataChannel; + }; + utils.wrapPeerConnectionEvent(window, 'datachannel', function (e) { + wrapDcSend(e.channel, e.target); + return e; + }); +} + +/* shims RTCConnectionState by pretending it is the same as iceConnectionState. + * See https://bugs.chromium.org/p/webrtc/issues/detail?id=6145#c12 + * for why this is a valid hack in Chrome. In Firefox it is slightly incorrect + * since DTLS failures would be hidden. See + * https://bugzilla.mozilla.org/show_bug.cgi?id=1265827 + * for the Firefox tracking bug. + */ +function shimConnectionState(window) { + if (!window.RTCPeerConnection || 'connectionState' in window.RTCPeerConnection.prototype) { + return; + } + var proto = window.RTCPeerConnection.prototype; + Object.defineProperty(proto, 'connectionState', { + get: function get() { + return { + completed: 'connected', + checking: 'connecting' + }[this.iceConnectionState] || this.iceConnectionState; + }, + + enumerable: true, + configurable: true + }); + Object.defineProperty(proto, 'onconnectionstatechange', { + get: function get() { + return this._onconnectionstatechange || null; + }, + set: function set(cb) { + if (this._onconnectionstatechange) { + this.removeEventListener('connectionstatechange', this._onconnectionstatechange); + delete this._onconnectionstatechange; + } + if (cb) { + this.addEventListener('connectionstatechange', this._onconnectionstatechange = cb); + } + }, + + enumerable: true, + configurable: true + }); + + ['setLocalDescription', 'setRemoteDescription'].forEach(function (method) { + var origMethod = proto[method]; + proto[method] = function () { + if (!this._connectionstatechangepoly) { + this._connectionstatechangepoly = function (e) { + var pc = e.target; + if (pc._lastConnectionState !== pc.connectionState) { + pc._lastConnectionState = pc.connectionState; + var newEvent = new Event('connectionstatechange', e); + pc.dispatchEvent(newEvent); + } + return e; + }; + this.addEventListener('iceconnectionstatechange', this._connectionstatechangepoly); + } + return origMethod.apply(this, arguments); + }; + }); +} + +function removeExtmapAllowMixed(window, browserDetails) { + /* remove a=extmap-allow-mixed for webrtc.org < M71 */ + if (!window.RTCPeerConnection) { + return; + } + if (browserDetails.browser === 'chrome' && browserDetails.version >= 71) { + return; + } + if (browserDetails.browser === 'safari' && browserDetails.version >= 605) { + return; + } + var nativeSRD = window.RTCPeerConnection.prototype.setRemoteDescription; + window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription(desc) { + if (desc && desc.sdp && desc.sdp.indexOf('\na=extmap-allow-mixed') !== -1) { + var sdp = desc.sdp.split('\n').filter(function (line) { + return line.trim() !== 'a=extmap-allow-mixed'; + }).join('\n'); + // Safari enforces read-only-ness of RTCSessionDescription fields. + if (window.RTCSessionDescription && desc instanceof window.RTCSessionDescription) { + arguments[0] = new window.RTCSessionDescription({ + type: desc.type, + sdp: sdp + }); + } else { + desc.sdp = sdp; + } + } + return nativeSRD.apply(this, arguments); + }; +} + +function shimAddIceCandidateNullOrEmpty(window, browserDetails) { + // Support for addIceCandidate(null or undefined) + // as well as addIceCandidate({candidate: "", ...}) + // https://bugs.chromium.org/p/chromium/issues/detail?id=978582 + // Note: must be called before other polyfills which change the signature. + if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) { + return; + } + var nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate; + if (!nativeAddIceCandidate || nativeAddIceCandidate.length === 0) { + return; + } + window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() { + if (!arguments[0]) { + if (arguments[1]) { + arguments[1].apply(null); + } + return Promise.resolve(); + } + // Firefox 68+ emits and processes {candidate: "", ...}, ignore + // in older versions. + // Native support for ignoring exists for Chrome M77+. + // Safari ignores as well, exact version unknown but works in the same + // version that also ignores addIceCandidate(null). + if ((browserDetails.browser === 'chrome' && browserDetails.version < 78 || browserDetails.browser === 'firefox' && browserDetails.version < 68 || browserDetails.browser === 'safari') && arguments[0] && arguments[0].candidate === '') { + return Promise.resolve(); + } + return nativeAddIceCandidate.apply(this, arguments); + }; +} + +// Note: Make sure to call this ahead of APIs that modify +// setLocalDescription.length +function shimParameterlessSetLocalDescription(window, browserDetails) { + if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) { + return; + } + var nativeSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription; + if (!nativeSetLocalDescription || nativeSetLocalDescription.length === 0) { + return; + } + window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() { + var _this = this; + + var desc = arguments[0] || {}; + if ((typeof desc === 'undefined' ? 'undefined' : _typeof(desc)) !== 'object' || desc.type && desc.sdp) { + return nativeSetLocalDescription.apply(this, arguments); + } + // The remaining steps should technically happen when SLD comes off the + // RTCPeerConnection's operations chain (not ahead of going on it), but + // this is too difficult to shim. Instead, this shim only covers the + // common case where the operations chain is empty. This is imperfect, but + // should cover many cases. Rationale: Even if we can't reduce the glare + // window to zero on imperfect implementations, there's value in tapping + // into the perfect negotiation pattern that several browsers support. + desc = { type: desc.type, sdp: desc.sdp }; + if (!desc.type) { + switch (this.signalingState) { + case 'stable': + case 'have-local-offer': + case 'have-remote-pranswer': + desc.type = 'offer'; + break; + default: + desc.type = 'answer'; + break; + } + } + if (desc.sdp || desc.type !== 'offer' && desc.type !== 'answer') { + return nativeSetLocalDescription.apply(this, [desc]); + } + var func = desc.type === 'offer' ? this.createOffer : this.createAnswer; + return func.apply(this).then(function (d) { + return nativeSetLocalDescription.apply(_this, [d]); + }); + }; +} + +},{"./utils":11,"sdp":12}],7:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +/* eslint-env node */ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.shimGetDisplayMedia = exports.shimGetUserMedia = undefined; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _getusermedia = require('./getusermedia'); + +Object.defineProperty(exports, 'shimGetUserMedia', { + enumerable: true, + get: function get() { + return _getusermedia.shimGetUserMedia; + } +}); + +var _getdisplaymedia = require('./getdisplaymedia'); + +Object.defineProperty(exports, 'shimGetDisplayMedia', { + enumerable: true, + get: function get() { + return _getdisplaymedia.shimGetDisplayMedia; + } +}); +exports.shimOnTrack = shimOnTrack; +exports.shimPeerConnection = shimPeerConnection; +exports.shimSenderGetStats = shimSenderGetStats; +exports.shimReceiverGetStats = shimReceiverGetStats; +exports.shimRemoveStream = shimRemoveStream; +exports.shimRTCDataChannel = shimRTCDataChannel; +exports.shimAddTransceiver = shimAddTransceiver; +exports.shimGetParameters = shimGetParameters; +exports.shimCreateOffer = shimCreateOffer; +exports.shimCreateAnswer = shimCreateAnswer; + +var _utils = require('../utils'); + +var utils = _interopRequireWildcard(_utils); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function shimOnTrack(window) { + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) { + Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', { + get: function get() { + return { receiver: this.receiver }; + } + }); + } +} + +function shimPeerConnection(window, browserDetails) { + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object' || !(window.RTCPeerConnection || window.mozRTCPeerConnection)) { + return; // probably media.peerconnection.enabled=false in about:config + } + if (!window.RTCPeerConnection && window.mozRTCPeerConnection) { + // very basic support for old versions. + window.RTCPeerConnection = window.mozRTCPeerConnection; + } + + if (browserDetails.version < 53) { + // shim away need for obsolete RTCIceCandidate/RTCSessionDescription. + ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) { + var nativeMethod = window.RTCPeerConnection.prototype[method]; + var methodObj = _defineProperty({}, method, function () { + arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]); + return nativeMethod.apply(this, arguments); + }); + window.RTCPeerConnection.prototype[method] = methodObj[method]; + }); + } + + var modernStatsTypes = { + inboundrtp: 'inbound-rtp', + outboundrtp: 'outbound-rtp', + candidatepair: 'candidate-pair', + localcandidate: 'local-candidate', + remotecandidate: 'remote-candidate' + }; + + var nativeGetStats = window.RTCPeerConnection.prototype.getStats; + window.RTCPeerConnection.prototype.getStats = function getStats() { + var _arguments = Array.prototype.slice.call(arguments), + selector = _arguments[0], + onSucc = _arguments[1], + onErr = _arguments[2]; + + return nativeGetStats.apply(this, [selector || null]).then(function (stats) { + if (browserDetails.version < 53 && !onSucc) { + // Shim only promise getStats with spec-hyphens in type names + // Leave callback version alone; misc old uses of forEach before Map + try { + stats.forEach(function (stat) { + stat.type = modernStatsTypes[stat.type] || stat.type; + }); + } catch (e) { + if (e.name !== 'TypeError') { + throw e; + } + // Avoid TypeError: "type" is read-only, in old versions. 34-43ish + stats.forEach(function (stat, i) { + stats.set(i, Object.assign({}, stat, { + type: modernStatsTypes[stat.type] || stat.type + })); + }); + } + } + return stats; + }).then(onSucc, onErr); + }; +} + +function shimSenderGetStats(window) { + if (!((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) { + return; + } + if (window.RTCRtpSender && 'getStats' in window.RTCRtpSender.prototype) { + return; + } + var origGetSenders = window.RTCPeerConnection.prototype.getSenders; + if (origGetSenders) { + window.RTCPeerConnection.prototype.getSenders = function getSenders() { + var _this = this; + + var senders = origGetSenders.apply(this, []); + senders.forEach(function (sender) { + return sender._pc = _this; + }); + return senders; + }; + } + + var origAddTrack = window.RTCPeerConnection.prototype.addTrack; + if (origAddTrack) { + window.RTCPeerConnection.prototype.addTrack = function addTrack() { + var sender = origAddTrack.apply(this, arguments); + sender._pc = this; + return sender; + }; + } + window.RTCRtpSender.prototype.getStats = function getStats() { + return this.track ? this._pc.getStats(this.track) : Promise.resolve(new Map()); + }; +} + +function shimReceiverGetStats(window) { + if (!((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) { + return; + } + if (window.RTCRtpSender && 'getStats' in window.RTCRtpReceiver.prototype) { + return; + } + var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers; + if (origGetReceivers) { + window.RTCPeerConnection.prototype.getReceivers = function getReceivers() { + var _this2 = this; + + var receivers = origGetReceivers.apply(this, []); + receivers.forEach(function (receiver) { + return receiver._pc = _this2; + }); + return receivers; + }; + } + utils.wrapPeerConnectionEvent(window, 'track', function (e) { + e.receiver._pc = e.srcElement; + return e; + }); + window.RTCRtpReceiver.prototype.getStats = function getStats() { + return this._pc.getStats(this.track); + }; +} + +function shimRemoveStream(window) { + if (!window.RTCPeerConnection || 'removeStream' in window.RTCPeerConnection.prototype) { + return; + } + window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) { + var _this3 = this; + + utils.deprecated('removeStream', 'removeTrack'); + this.getSenders().forEach(function (sender) { + if (sender.track && stream.getTracks().includes(sender.track)) { + _this3.removeTrack(sender); + } + }); + }; +} + +function shimRTCDataChannel(window) { + // rename DataChannel to RTCDataChannel (native fix in FF60): + // https://bugzilla.mozilla.org/show_bug.cgi?id=1173851 + if (window.DataChannel && !window.RTCDataChannel) { + window.RTCDataChannel = window.DataChannel; + } +} + +function shimAddTransceiver(window) { + // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647 + // Firefox ignores the init sendEncodings options passed to addTransceiver + // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918 + if (!((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCPeerConnection)) { + return; + } + var origAddTransceiver = window.RTCPeerConnection.prototype.addTransceiver; + if (origAddTransceiver) { + window.RTCPeerConnection.prototype.addTransceiver = function addTransceiver() { + this.setParametersPromises = []; + // WebIDL input coercion and validation + var sendEncodings = arguments[1] && arguments[1].sendEncodings; + if (sendEncodings === undefined) { + sendEncodings = []; + } + sendEncodings = [].concat(_toConsumableArray(sendEncodings)); + var shouldPerformCheck = sendEncodings.length > 0; + if (shouldPerformCheck) { + // If sendEncodings params are provided, validate grammar + sendEncodings.forEach(function (encodingParam) { + if ('rid' in encodingParam) { + var ridRegex = /^[a-z0-9]{0,16}$/i; + if (!ridRegex.test(encodingParam.rid)) { + throw new TypeError('Invalid RID value provided.'); + } + } + if ('scaleResolutionDownBy' in encodingParam) { + if (!(parseFloat(encodingParam.scaleResolutionDownBy) >= 1.0)) { + throw new RangeError('scale_resolution_down_by must be >= 1.0'); + } + } + if ('maxFramerate' in encodingParam) { + if (!(parseFloat(encodingParam.maxFramerate) >= 0)) { + throw new RangeError('max_framerate must be >= 0.0'); + } + } + }); + } + var transceiver = origAddTransceiver.apply(this, arguments); + if (shouldPerformCheck) { + // Check if the init options were applied. If not we do this in an + // asynchronous way and save the promise reference in a global object. + // This is an ugly hack, but at the same time is way more robust than + // checking the sender parameters before and after the createOffer + // Also note that after the createoffer we are not 100% sure that + // the params were asynchronously applied so we might miss the + // opportunity to recreate offer. + var sender = transceiver.sender; + + var params = sender.getParameters(); + if (!('encodings' in params) || + // Avoid being fooled by patched getParameters() below. + params.encodings.length === 1 && Object.keys(params.encodings[0]).length === 0) { + params.encodings = sendEncodings; + sender.sendEncodings = sendEncodings; + this.setParametersPromises.push(sender.setParameters(params).then(function () { + delete sender.sendEncodings; + }).catch(function () { + delete sender.sendEncodings; + })); + } + } + return transceiver; + }; + } +} + +function shimGetParameters(window) { + if (!((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCRtpSender)) { + return; + } + var origGetParameters = window.RTCRtpSender.prototype.getParameters; + if (origGetParameters) { + window.RTCRtpSender.prototype.getParameters = function getParameters() { + var params = origGetParameters.apply(this, arguments); + if (!('encodings' in params)) { + params.encodings = [].concat(this.sendEncodings || [{}]); + } + return params; + }; + } +} + +function shimCreateOffer(window) { + // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647 + // Firefox ignores the init sendEncodings options passed to addTransceiver + // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918 + if (!((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCPeerConnection)) { + return; + } + var origCreateOffer = window.RTCPeerConnection.prototype.createOffer; + window.RTCPeerConnection.prototype.createOffer = function createOffer() { + var _this4 = this, + _arguments2 = arguments; + + if (this.setParametersPromises && this.setParametersPromises.length) { + return Promise.all(this.setParametersPromises).then(function () { + return origCreateOffer.apply(_this4, _arguments2); + }).finally(function () { + _this4.setParametersPromises = []; + }); + } + return origCreateOffer.apply(this, arguments); + }; +} + +function shimCreateAnswer(window) { + // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647 + // Firefox ignores the init sendEncodings options passed to addTransceiver + // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918 + if (!((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCPeerConnection)) { + return; + } + var origCreateAnswer = window.RTCPeerConnection.prototype.createAnswer; + window.RTCPeerConnection.prototype.createAnswer = function createAnswer() { + var _this5 = this, + _arguments3 = arguments; + + if (this.setParametersPromises && this.setParametersPromises.length) { + return Promise.all(this.setParametersPromises).then(function () { + return origCreateAnswer.apply(_this5, _arguments3); + }).finally(function () { + _this5.setParametersPromises = []; + }); + } + return origCreateAnswer.apply(this, arguments); + }; +} + +},{"../utils":11,"./getdisplaymedia":8,"./getusermedia":9}],8:[function(require,module,exports){ +/* + * Copyright (c) 2018 The adapter.js project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +/* eslint-env node */ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.shimGetDisplayMedia = shimGetDisplayMedia; +function shimGetDisplayMedia(window, preferredMediaSource) { + if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) { + return; + } + if (!window.navigator.mediaDevices) { + return; + } + window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) { + if (!(constraints && constraints.video)) { + var err = new DOMException('getDisplayMedia without video ' + 'constraints is undefined'); + err.name = 'NotFoundError'; + // from https://heycam.github.io/webidl/#idl-DOMException-error-names + err.code = 8; + return Promise.reject(err); + } + if (constraints.video === true) { + constraints.video = { mediaSource: preferredMediaSource }; + } else { + constraints.video.mediaSource = preferredMediaSource; + } + return window.navigator.mediaDevices.getUserMedia(constraints); + }; +} + +},{}],9:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +/* eslint-env node */ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.shimGetUserMedia = shimGetUserMedia; + +var _utils = require('../utils'); + +var utils = _interopRequireWildcard(_utils); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function shimGetUserMedia(window, browserDetails) { + var navigator = window && window.navigator; + var MediaStreamTrack = window && window.MediaStreamTrack; + + navigator.getUserMedia = function (constraints, onSuccess, onError) { + // Replace Firefox 44+'s deprecation warning with unprefixed version. + utils.deprecated('navigator.getUserMedia', 'navigator.mediaDevices.getUserMedia'); + navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError); + }; + + if (!(browserDetails.version > 55 && 'autoGainControl' in navigator.mediaDevices.getSupportedConstraints())) { + var remap = function remap(obj, a, b) { + if (a in obj && !(b in obj)) { + obj[b] = obj[a]; + delete obj[a]; + } + }; + + var nativeGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices); + navigator.mediaDevices.getUserMedia = function (c) { + if ((typeof c === 'undefined' ? 'undefined' : _typeof(c)) === 'object' && _typeof(c.audio) === 'object') { + c = JSON.parse(JSON.stringify(c)); + remap(c.audio, 'autoGainControl', 'mozAutoGainControl'); + remap(c.audio, 'noiseSuppression', 'mozNoiseSuppression'); + } + return nativeGetUserMedia(c); + }; + + if (MediaStreamTrack && MediaStreamTrack.prototype.getSettings) { + var nativeGetSettings = MediaStreamTrack.prototype.getSettings; + MediaStreamTrack.prototype.getSettings = function () { + var obj = nativeGetSettings.apply(this, arguments); + remap(obj, 'mozAutoGainControl', 'autoGainControl'); + remap(obj, 'mozNoiseSuppression', 'noiseSuppression'); + return obj; + }; + } + + if (MediaStreamTrack && MediaStreamTrack.prototype.applyConstraints) { + var nativeApplyConstraints = MediaStreamTrack.prototype.applyConstraints; + MediaStreamTrack.prototype.applyConstraints = function (c) { + if (this.kind === 'audio' && (typeof c === 'undefined' ? 'undefined' : _typeof(c)) === 'object') { + c = JSON.parse(JSON.stringify(c)); + remap(c, 'autoGainControl', 'mozAutoGainControl'); + remap(c, 'noiseSuppression', 'mozNoiseSuppression'); + } + return nativeApplyConstraints.apply(this, [c]); + }; + } + } +} + +},{"../utils":11}],10:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.shimLocalStreamsAPI = shimLocalStreamsAPI; +exports.shimRemoteStreamsAPI = shimRemoteStreamsAPI; +exports.shimCallbacksAPI = shimCallbacksAPI; +exports.shimGetUserMedia = shimGetUserMedia; +exports.shimConstraints = shimConstraints; +exports.shimRTCIceServerUrls = shimRTCIceServerUrls; +exports.shimTrackEventTransceiver = shimTrackEventTransceiver; +exports.shimCreateOfferLegacy = shimCreateOfferLegacy; +exports.shimAudioContext = shimAudioContext; + +var _utils = require('../utils'); + +var utils = _interopRequireWildcard(_utils); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function shimLocalStreamsAPI(window) { + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object' || !window.RTCPeerConnection) { + return; + } + if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) { + window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() { + if (!this._localStreams) { + this._localStreams = []; + } + return this._localStreams; + }; + } + if (!('addStream' in window.RTCPeerConnection.prototype)) { + var _addTrack = window.RTCPeerConnection.prototype.addTrack; + window.RTCPeerConnection.prototype.addStream = function addStream(stream) { + var _this = this; + + if (!this._localStreams) { + this._localStreams = []; + } + if (!this._localStreams.includes(stream)) { + this._localStreams.push(stream); + } + // Try to emulate Chrome's behaviour of adding in audio-video order. + // Safari orders by track id. + stream.getAudioTracks().forEach(function (track) { + return _addTrack.call(_this, track, stream); + }); + stream.getVideoTracks().forEach(function (track) { + return _addTrack.call(_this, track, stream); + }); + }; + + window.RTCPeerConnection.prototype.addTrack = function addTrack(track) { + var _this2 = this; + + for (var _len = arguments.length, streams = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + streams[_key - 1] = arguments[_key]; + } + + if (streams) { + streams.forEach(function (stream) { + if (!_this2._localStreams) { + _this2._localStreams = [stream]; + } else if (!_this2._localStreams.includes(stream)) { + _this2._localStreams.push(stream); + } + }); + } + return _addTrack.apply(this, arguments); + }; + } + if (!('removeStream' in window.RTCPeerConnection.prototype)) { + window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) { + var _this3 = this; + + if (!this._localStreams) { + this._localStreams = []; + } + var index = this._localStreams.indexOf(stream); + if (index === -1) { + return; + } + this._localStreams.splice(index, 1); + var tracks = stream.getTracks(); + this.getSenders().forEach(function (sender) { + if (tracks.includes(sender.track)) { + _this3.removeTrack(sender); + } + }); + }; + } +} + +function shimRemoteStreamsAPI(window) { + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object' || !window.RTCPeerConnection) { + return; + } + if (!('getRemoteStreams' in window.RTCPeerConnection.prototype)) { + window.RTCPeerConnection.prototype.getRemoteStreams = function getRemoteStreams() { + return this._remoteStreams ? this._remoteStreams : []; + }; + } + if (!('onaddstream' in window.RTCPeerConnection.prototype)) { + Object.defineProperty(window.RTCPeerConnection.prototype, 'onaddstream', { + get: function get() { + return this._onaddstream; + }, + set: function set(f) { + var _this4 = this; + + if (this._onaddstream) { + this.removeEventListener('addstream', this._onaddstream); + this.removeEventListener('track', this._onaddstreampoly); + } + this.addEventListener('addstream', this._onaddstream = f); + this.addEventListener('track', this._onaddstreampoly = function (e) { + e.streams.forEach(function (stream) { + if (!_this4._remoteStreams) { + _this4._remoteStreams = []; + } + if (_this4._remoteStreams.includes(stream)) { + return; + } + _this4._remoteStreams.push(stream); + var event = new Event('addstream'); + event.stream = stream; + _this4.dispatchEvent(event); + }); + }); + } + }); + var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription; + window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() { + var pc = this; + if (!this._onaddstreampoly) { + this.addEventListener('track', this._onaddstreampoly = function (e) { + e.streams.forEach(function (stream) { + if (!pc._remoteStreams) { + pc._remoteStreams = []; + } + if (pc._remoteStreams.indexOf(stream) >= 0) { + return; + } + pc._remoteStreams.push(stream); + var event = new Event('addstream'); + event.stream = stream; + pc.dispatchEvent(event); + }); + }); + } + return origSetRemoteDescription.apply(pc, arguments); + }; + } +} + +function shimCallbacksAPI(window) { + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object' || !window.RTCPeerConnection) { + return; + } + var prototype = window.RTCPeerConnection.prototype; + var origCreateOffer = prototype.createOffer; + var origCreateAnswer = prototype.createAnswer; + var setLocalDescription = prototype.setLocalDescription; + var setRemoteDescription = prototype.setRemoteDescription; + var addIceCandidate = prototype.addIceCandidate; + + prototype.createOffer = function createOffer(successCallback, failureCallback) { + var options = arguments.length >= 2 ? arguments[2] : arguments[0]; + var promise = origCreateOffer.apply(this, [options]); + if (!failureCallback) { + return promise; + } + promise.then(successCallback, failureCallback); + return Promise.resolve(); + }; + + prototype.createAnswer = function createAnswer(successCallback, failureCallback) { + var options = arguments.length >= 2 ? arguments[2] : arguments[0]; + var promise = origCreateAnswer.apply(this, [options]); + if (!failureCallback) { + return promise; + } + promise.then(successCallback, failureCallback); + return Promise.resolve(); + }; + + var withCallback = function withCallback(description, successCallback, failureCallback) { + var promise = setLocalDescription.apply(this, [description]); + if (!failureCallback) { + return promise; + } + promise.then(successCallback, failureCallback); + return Promise.resolve(); + }; + prototype.setLocalDescription = withCallback; + + withCallback = function withCallback(description, successCallback, failureCallback) { + var promise = setRemoteDescription.apply(this, [description]); + if (!failureCallback) { + return promise; + } + promise.then(successCallback, failureCallback); + return Promise.resolve(); + }; + prototype.setRemoteDescription = withCallback; + + withCallback = function withCallback(candidate, successCallback, failureCallback) { + var promise = addIceCandidate.apply(this, [candidate]); + if (!failureCallback) { + return promise; + } + promise.then(successCallback, failureCallback); + return Promise.resolve(); + }; + prototype.addIceCandidate = withCallback; +} + +function shimGetUserMedia(window) { + var navigator = window && window.navigator; + + if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { + // shim not needed in Safari 12.1 + var mediaDevices = navigator.mediaDevices; + var _getUserMedia = mediaDevices.getUserMedia.bind(mediaDevices); + navigator.mediaDevices.getUserMedia = function (constraints) { + return _getUserMedia(shimConstraints(constraints)); + }; + } + + if (!navigator.getUserMedia && navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { + navigator.getUserMedia = function getUserMedia(constraints, cb, errcb) { + navigator.mediaDevices.getUserMedia(constraints).then(cb, errcb); + }.bind(navigator); + } +} + +function shimConstraints(constraints) { + if (constraints && constraints.video !== undefined) { + return Object.assign({}, constraints, { video: utils.compactObject(constraints.video) }); + } + + return constraints; +} + +function shimRTCIceServerUrls(window) { + if (!window.RTCPeerConnection) { + return; + } + // migrate from non-spec RTCIceServer.url to RTCIceServer.urls + var OrigPeerConnection = window.RTCPeerConnection; + window.RTCPeerConnection = function RTCPeerConnection(pcConfig, pcConstraints) { + if (pcConfig && pcConfig.iceServers) { + var newIceServers = []; + for (var i = 0; i < pcConfig.iceServers.length; i++) { + var server = pcConfig.iceServers[i]; + if (!server.hasOwnProperty('urls') && server.hasOwnProperty('url')) { + utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls'); + server = JSON.parse(JSON.stringify(server)); + server.urls = server.url; + delete server.url; + newIceServers.push(server); + } else { + newIceServers.push(pcConfig.iceServers[i]); + } + } + pcConfig.iceServers = newIceServers; + } + return new OrigPeerConnection(pcConfig, pcConstraints); + }; + window.RTCPeerConnection.prototype = OrigPeerConnection.prototype; + // wrap static methods. Currently just generateCertificate. + if ('generateCertificate' in OrigPeerConnection) { + Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', { + get: function get() { + return OrigPeerConnection.generateCertificate; + } + }); + } +} + +function shimTrackEventTransceiver(window) { + // Add event.transceiver member over deprecated event.receiver + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) { + Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', { + get: function get() { + return { receiver: this.receiver }; + } + }); + } +} + +function shimCreateOfferLegacy(window) { + var origCreateOffer = window.RTCPeerConnection.prototype.createOffer; + window.RTCPeerConnection.prototype.createOffer = function createOffer(offerOptions) { + if (offerOptions) { + if (typeof offerOptions.offerToReceiveAudio !== 'undefined') { + // support bit values + offerOptions.offerToReceiveAudio = !!offerOptions.offerToReceiveAudio; + } + var audioTransceiver = this.getTransceivers().find(function (transceiver) { + return transceiver.receiver.track.kind === 'audio'; + }); + if (offerOptions.offerToReceiveAudio === false && audioTransceiver) { + if (audioTransceiver.direction === 'sendrecv') { + if (audioTransceiver.setDirection) { + audioTransceiver.setDirection('sendonly'); + } else { + audioTransceiver.direction = 'sendonly'; + } + } else if (audioTransceiver.direction === 'recvonly') { + if (audioTransceiver.setDirection) { + audioTransceiver.setDirection('inactive'); + } else { + audioTransceiver.direction = 'inactive'; + } + } + } else if (offerOptions.offerToReceiveAudio === true && !audioTransceiver) { + this.addTransceiver('audio', { direction: 'recvonly' }); + } + + if (typeof offerOptions.offerToReceiveVideo !== 'undefined') { + // support bit values + offerOptions.offerToReceiveVideo = !!offerOptions.offerToReceiveVideo; + } + var videoTransceiver = this.getTransceivers().find(function (transceiver) { + return transceiver.receiver.track.kind === 'video'; + }); + if (offerOptions.offerToReceiveVideo === false && videoTransceiver) { + if (videoTransceiver.direction === 'sendrecv') { + if (videoTransceiver.setDirection) { + videoTransceiver.setDirection('sendonly'); + } else { + videoTransceiver.direction = 'sendonly'; + } + } else if (videoTransceiver.direction === 'recvonly') { + if (videoTransceiver.setDirection) { + videoTransceiver.setDirection('inactive'); + } else { + videoTransceiver.direction = 'inactive'; + } + } + } else if (offerOptions.offerToReceiveVideo === true && !videoTransceiver) { + this.addTransceiver('video', { direction: 'recvonly' }); + } + } + return origCreateOffer.apply(this, arguments); + }; +} + +function shimAudioContext(window) { + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object' || window.AudioContext) { + return; + } + window.AudioContext = window.webkitAudioContext; +} + +},{"../utils":11}],11:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +/* eslint-env node */ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.extractVersion = extractVersion; +exports.wrapPeerConnectionEvent = wrapPeerConnectionEvent; +exports.disableLog = disableLog; +exports.disableWarnings = disableWarnings; +exports.log = log; +exports.deprecated = deprecated; +exports.detectBrowser = detectBrowser; +exports.compactObject = compactObject; +exports.walkStats = walkStats; +exports.filterStats = filterStats; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var logDisabled_ = true; +var deprecationWarnings_ = true; + +/** + * Extract browser version out of the provided user agent string. + * + * @param {!string} uastring userAgent string. + * @param {!string} expr Regular expression used as match criteria. + * @param {!number} pos position in the version string to be returned. + * @return {!number} browser version. + */ +function extractVersion(uastring, expr, pos) { + var match = uastring.match(expr); + return match && match.length >= pos && parseInt(match[pos], 10); +} + +// Wraps the peerconnection event eventNameToWrap in a function +// which returns the modified event object (or false to prevent +// the event). +function wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) { + if (!window.RTCPeerConnection) { + return; + } + var proto = window.RTCPeerConnection.prototype; + var nativeAddEventListener = proto.addEventListener; + proto.addEventListener = function (nativeEventName, cb) { + if (nativeEventName !== eventNameToWrap) { + return nativeAddEventListener.apply(this, arguments); + } + var wrappedCallback = function wrappedCallback(e) { + var modifiedEvent = wrapper(e); + if (modifiedEvent) { + if (cb.handleEvent) { + cb.handleEvent(modifiedEvent); + } else { + cb(modifiedEvent); + } + } + }; + this._eventMap = this._eventMap || {}; + if (!this._eventMap[eventNameToWrap]) { + this._eventMap[eventNameToWrap] = new Map(); + } + this._eventMap[eventNameToWrap].set(cb, wrappedCallback); + return nativeAddEventListener.apply(this, [nativeEventName, wrappedCallback]); + }; + + var nativeRemoveEventListener = proto.removeEventListener; + proto.removeEventListener = function (nativeEventName, cb) { + if (nativeEventName !== eventNameToWrap || !this._eventMap || !this._eventMap[eventNameToWrap]) { + return nativeRemoveEventListener.apply(this, arguments); + } + if (!this._eventMap[eventNameToWrap].has(cb)) { + return nativeRemoveEventListener.apply(this, arguments); + } + var unwrappedCb = this._eventMap[eventNameToWrap].get(cb); + this._eventMap[eventNameToWrap].delete(cb); + if (this._eventMap[eventNameToWrap].size === 0) { + delete this._eventMap[eventNameToWrap]; + } + if (Object.keys(this._eventMap).length === 0) { + delete this._eventMap; + } + return nativeRemoveEventListener.apply(this, [nativeEventName, unwrappedCb]); + }; + + Object.defineProperty(proto, 'on' + eventNameToWrap, { + get: function get() { + return this['_on' + eventNameToWrap]; + }, + set: function set(cb) { + if (this['_on' + eventNameToWrap]) { + this.removeEventListener(eventNameToWrap, this['_on' + eventNameToWrap]); + delete this['_on' + eventNameToWrap]; + } + if (cb) { + this.addEventListener(eventNameToWrap, this['_on' + eventNameToWrap] = cb); + } + }, + + enumerable: true, + configurable: true + }); +} + +function disableLog(bool) { + if (typeof bool !== 'boolean') { + return new Error('Argument type: ' + (typeof bool === 'undefined' ? 'undefined' : _typeof(bool)) + '. Please use a boolean.'); + } + logDisabled_ = bool; + return bool ? 'adapter.js logging disabled' : 'adapter.js logging enabled'; +} + +/** + * Disable or enable deprecation warnings + * @param {!boolean} bool set to true to disable warnings. + */ +function disableWarnings(bool) { + if (typeof bool !== 'boolean') { + return new Error('Argument type: ' + (typeof bool === 'undefined' ? 'undefined' : _typeof(bool)) + '. Please use a boolean.'); + } + deprecationWarnings_ = !bool; + return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled'); +} + +function log() { + if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object') { + if (logDisabled_) { + return; + } + if (typeof console !== 'undefined' && typeof console.log === 'function') { + console.log.apply(console, arguments); + } + } +} + +/** + * Shows a deprecation warning suggesting the modern and spec-compatible API. + */ +function deprecated(oldMethod, newMethod) { + if (!deprecationWarnings_) { + return; + } + console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.'); +} + +/** + * Browser detector. + * + * @return {object} result containing browser and version + * properties. + */ +function detectBrowser(window) { + // Returned result object. + var result = { browser: null, version: null }; + + // Fail early if it's not a browser + if (typeof window === 'undefined' || !window.navigator) { + result.browser = 'Not a browser.'; + return result; + } + + var navigator = window.navigator; + + + if (navigator.mozGetUserMedia) { + // Firefox. + result.browser = 'firefox'; + result.version = extractVersion(navigator.userAgent, /Firefox\/(\d+)\./, 1); + } else if (navigator.webkitGetUserMedia || window.isSecureContext === false && window.webkitRTCPeerConnection) { + // Chrome, Chromium, Webview, Opera. + // Version matches Chrome/WebRTC version. + // Chrome 74 removed webkitGetUserMedia on http as well so we need the + // more complicated fallback to webkitRTCPeerConnection. + result.browser = 'chrome'; + result.version = extractVersion(navigator.userAgent, /Chrom(e|ium)\/(\d+)\./, 2); + } else if (window.RTCPeerConnection && navigator.userAgent.match(/AppleWebKit\/(\d+)\./)) { + // Safari. + result.browser = 'safari'; + result.version = extractVersion(navigator.userAgent, /AppleWebKit\/(\d+)\./, 1); + result.supportsUnifiedPlan = window.RTCRtpTransceiver && 'currentDirection' in window.RTCRtpTransceiver.prototype; + } else { + // Default fallthrough: not supported. + result.browser = 'Not a supported browser.'; + return result; + } + + return result; +} + +/** + * Checks if something is an object. + * + * @param {*} val The something you want to check. + * @return true if val is an object, false otherwise. + */ +function isObject(val) { + return Object.prototype.toString.call(val) === '[object Object]'; +} + +/** + * Remove all empty objects and undefined values + * from a nested object -- an enhanced and vanilla version + * of Lodash's `compact`. + */ +function compactObject(data) { + if (!isObject(data)) { + return data; + } + + return Object.keys(data).reduce(function (accumulator, key) { + var isObj = isObject(data[key]); + var value = isObj ? compactObject(data[key]) : data[key]; + var isEmptyObject = isObj && !Object.keys(value).length; + if (value === undefined || isEmptyObject) { + return accumulator; + } + return Object.assign(accumulator, _defineProperty({}, key, value)); + }, {}); +} + +/* iterates the stats graph recursively. */ +function walkStats(stats, base, resultSet) { + if (!base || resultSet.has(base.id)) { + return; + } + resultSet.set(base.id, base); + Object.keys(base).forEach(function (name) { + if (name.endsWith('Id')) { + walkStats(stats, stats.get(base[name]), resultSet); + } else if (name.endsWith('Ids')) { + base[name].forEach(function (id) { + walkStats(stats, stats.get(id), resultSet); + }); + } + }); +} + +/* filter getStats for a sender/receiver track. */ +function filterStats(result, track, outbound) { + var streamStatsType = outbound ? 'outbound-rtp' : 'inbound-rtp'; + var filteredResult = new Map(); + if (track === null) { + return filteredResult; + } + var trackStats = []; + result.forEach(function (value) { + if (value.type === 'track' && value.trackIdentifier === track.id) { + trackStats.push(value); + } + }); + trackStats.forEach(function (trackStat) { + result.forEach(function (stats) { + if (stats.type === streamStatsType && stats.trackId === trackStat.id) { + walkStats(result, stats, filteredResult); + } + }); + }); + return filteredResult; +} + +},{}],12:[function(require,module,exports){ +/* eslint-env node */ +'use strict'; + +// SDP helpers. + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var SDPUtils = {}; + +// Generate an alphanumeric identifier for cname or mids. +// TODO: use UUIDs instead? https://gist.github.com/jed/982883 +SDPUtils.generateIdentifier = function () { + return Math.random().toString(36).substr(2, 10); +}; + +// The RTCP CNAME used by all peerconnections from the same JS. +SDPUtils.localCName = SDPUtils.generateIdentifier(); + +// Splits SDP into lines, dealing with both CRLF and LF. +SDPUtils.splitLines = function (blob) { + return blob.trim().split('\n').map(function (line) { + return line.trim(); + }); +}; +// Splits SDP into sessionpart and mediasections. Ensures CRLF. +SDPUtils.splitSections = function (blob) { + var parts = blob.split('\nm='); + return parts.map(function (part, index) { + return (index > 0 ? 'm=' + part : part).trim() + '\r\n'; + }); +}; + +// Returns the session description. +SDPUtils.getDescription = function (blob) { + var sections = SDPUtils.splitSections(blob); + return sections && sections[0]; +}; + +// Returns the individual media sections. +SDPUtils.getMediaSections = function (blob) { + var sections = SDPUtils.splitSections(blob); + sections.shift(); + return sections; +}; + +// Returns lines that start with a certain prefix. +SDPUtils.matchPrefix = function (blob, prefix) { + return SDPUtils.splitLines(blob).filter(function (line) { + return line.indexOf(prefix) === 0; + }); +}; + +// Parses an ICE candidate line. Sample input: +// candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8 +// rport 55996" +// Input can be prefixed with a=. +SDPUtils.parseCandidate = function (line) { + var parts = void 0; + // Parse both variants. + if (line.indexOf('a=candidate:') === 0) { + parts = line.substring(12).split(' '); + } else { + parts = line.substring(10).split(' '); + } + + var candidate = { + foundation: parts[0], + component: { 1: 'rtp', 2: 'rtcp' }[parts[1]] || parts[1], + protocol: parts[2].toLowerCase(), + priority: parseInt(parts[3], 10), + ip: parts[4], + address: parts[4], // address is an alias for ip. + port: parseInt(parts[5], 10), + // skip parts[6] == 'typ' + type: parts[7] + }; + + for (var i = 8; i < parts.length; i += 2) { + switch (parts[i]) { + case 'raddr': + candidate.relatedAddress = parts[i + 1]; + break; + case 'rport': + candidate.relatedPort = parseInt(parts[i + 1], 10); + break; + case 'tcptype': + candidate.tcpType = parts[i + 1]; + break; + case 'ufrag': + candidate.ufrag = parts[i + 1]; // for backward compatibility. + candidate.usernameFragment = parts[i + 1]; + break; + default: + // extension handling, in particular ufrag. Don't overwrite. + if (candidate[parts[i]] === undefined) { + candidate[parts[i]] = parts[i + 1]; + } + break; + } + } + return candidate; +}; + +// Translates a candidate object into SDP candidate attribute. +// This does not include the a= prefix! +SDPUtils.writeCandidate = function (candidate) { + var sdp = []; + sdp.push(candidate.foundation); + + var component = candidate.component; + if (component === 'rtp') { + sdp.push(1); + } else if (component === 'rtcp') { + sdp.push(2); + } else { + sdp.push(component); + } + sdp.push(candidate.protocol.toUpperCase()); + sdp.push(candidate.priority); + sdp.push(candidate.address || candidate.ip); + sdp.push(candidate.port); + + var type = candidate.type; + sdp.push('typ'); + sdp.push(type); + if (type !== 'host' && candidate.relatedAddress && candidate.relatedPort) { + sdp.push('raddr'); + sdp.push(candidate.relatedAddress); + sdp.push('rport'); + sdp.push(candidate.relatedPort); + } + if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') { + sdp.push('tcptype'); + sdp.push(candidate.tcpType); + } + if (candidate.usernameFragment || candidate.ufrag) { + sdp.push('ufrag'); + sdp.push(candidate.usernameFragment || candidate.ufrag); + } + return 'candidate:' + sdp.join(' '); +}; + +// Parses an ice-options line, returns an array of option tags. +// Sample input: +// a=ice-options:foo bar +SDPUtils.parseIceOptions = function (line) { + return line.substr(14).split(' '); +}; + +// Parses a rtpmap line, returns RTCRtpCoddecParameters. Sample input: +// a=rtpmap:111 opus/48000/2 +SDPUtils.parseRtpMap = function (line) { + var parts = line.substr(9).split(' '); + var parsed = { + payloadType: parseInt(parts.shift(), 10) // was: id + }; + + parts = parts[0].split('/'); + + parsed.name = parts[0]; + parsed.clockRate = parseInt(parts[1], 10); // was: clockrate + parsed.channels = parts.length === 3 ? parseInt(parts[2], 10) : 1; + // legacy alias, got renamed back to channels in ORTC. + parsed.numChannels = parsed.channels; + return parsed; +}; + +// Generates a rtpmap line from RTCRtpCodecCapability or +// RTCRtpCodecParameters. +SDPUtils.writeRtpMap = function (codec) { + var pt = codec.payloadType; + if (codec.preferredPayloadType !== undefined) { + pt = codec.preferredPayloadType; + } + var channels = codec.channels || codec.numChannels || 1; + return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate + (channels !== 1 ? '/' + channels : '') + '\r\n'; +}; + +// Parses a extmap line (headerextension from RFC 5285). Sample input: +// a=extmap:2 urn:ietf:params:rtp-hdrext:toffset +// a=extmap:2/sendonly urn:ietf:params:rtp-hdrext:toffset +SDPUtils.parseExtmap = function (line) { + var parts = line.substr(9).split(' '); + return { + id: parseInt(parts[0], 10), + direction: parts[0].indexOf('/') > 0 ? parts[0].split('/')[1] : 'sendrecv', + uri: parts[1] + }; +}; + +// Generates an extmap line from RTCRtpHeaderExtensionParameters or +// RTCRtpHeaderExtension. +SDPUtils.writeExtmap = function (headerExtension) { + return 'a=extmap:' + (headerExtension.id || headerExtension.preferredId) + (headerExtension.direction && headerExtension.direction !== 'sendrecv' ? '/' + headerExtension.direction : '') + ' ' + headerExtension.uri + '\r\n'; +}; + +// Parses a fmtp line, returns dictionary. Sample input: +// a=fmtp:96 vbr=on;cng=on +// Also deals with vbr=on; cng=on +SDPUtils.parseFmtp = function (line) { + var parsed = {}; + var kv = void 0; + var parts = line.substr(line.indexOf(' ') + 1).split(';'); + for (var j = 0; j < parts.length; j++) { + kv = parts[j].trim().split('='); + parsed[kv[0].trim()] = kv[1]; + } + return parsed; +}; + +// Generates a fmtp line from RTCRtpCodecCapability or RTCRtpCodecParameters. +SDPUtils.writeFmtp = function (codec) { + var line = ''; + var pt = codec.payloadType; + if (codec.preferredPayloadType !== undefined) { + pt = codec.preferredPayloadType; + } + if (codec.parameters && Object.keys(codec.parameters).length) { + var params = []; + Object.keys(codec.parameters).forEach(function (param) { + if (codec.parameters[param] !== undefined) { + params.push(param + '=' + codec.parameters[param]); + } else { + params.push(param); + } + }); + line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\r\n'; + } + return line; +}; + +// Parses a rtcp-fb line, returns RTCPRtcpFeedback object. Sample input: +// a=rtcp-fb:98 nack rpsi +SDPUtils.parseRtcpFb = function (line) { + var parts = line.substr(line.indexOf(' ') + 1).split(' '); + return { + type: parts.shift(), + parameter: parts.join(' ') + }; +}; + +// Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters. +SDPUtils.writeRtcpFb = function (codec) { + var lines = ''; + var pt = codec.payloadType; + if (codec.preferredPayloadType !== undefined) { + pt = codec.preferredPayloadType; + } + if (codec.rtcpFeedback && codec.rtcpFeedback.length) { + // FIXME: special handling for trr-int? + codec.rtcpFeedback.forEach(function (fb) { + lines += 'a=rtcp-fb:' + pt + ' ' + fb.type + (fb.parameter && fb.parameter.length ? ' ' + fb.parameter : '') + '\r\n'; + }); + } + return lines; +}; + +// Parses a RFC 5576 ssrc media attribute. Sample input: +// a=ssrc:3735928559 cname:something +SDPUtils.parseSsrcMedia = function (line) { + var sp = line.indexOf(' '); + var parts = { + ssrc: parseInt(line.substr(7, sp - 7), 10) + }; + var colon = line.indexOf(':', sp); + if (colon > -1) { + parts.attribute = line.substr(sp + 1, colon - sp - 1); + parts.value = line.substr(colon + 1); + } else { + parts.attribute = line.substr(sp + 1); + } + return parts; +}; + +// Parse a ssrc-group line (see RFC 5576). Sample input: +// a=ssrc-group:semantics 12 34 +SDPUtils.parseSsrcGroup = function (line) { + var parts = line.substr(13).split(' '); + return { + semantics: parts.shift(), + ssrcs: parts.map(function (ssrc) { + return parseInt(ssrc, 10); + }) + }; +}; + +// Extracts the MID (RFC 5888) from a media section. +// Returns the MID or undefined if no mid line was found. +SDPUtils.getMid = function (mediaSection) { + var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0]; + if (mid) { + return mid.substr(6); + } +}; + +// Parses a fingerprint line for DTLS-SRTP. +SDPUtils.parseFingerprint = function (line) { + var parts = line.substr(14).split(' '); + return { + algorithm: parts[0].toLowerCase(), // algorithm is case-sensitive in Edge. + value: parts[1].toUpperCase() // the definition is upper-case in RFC 4572. + }; +}; + +// Extracts DTLS parameters from SDP media section or sessionpart. +// FIXME: for consistency with other functions this should only +// get the fingerprint line as input. See also getIceParameters. +SDPUtils.getDtlsParameters = function (mediaSection, sessionpart) { + var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=fingerprint:'); + // Note: a=setup line is ignored since we use the 'auto' role in Edge. + return { + role: 'auto', + fingerprints: lines.map(SDPUtils.parseFingerprint) + }; +}; + +// Serializes DTLS parameters to SDP. +SDPUtils.writeDtlsParameters = function (params, setupType) { + var sdp = 'a=setup:' + setupType + '\r\n'; + params.fingerprints.forEach(function (fp) { + sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n'; + }); + return sdp; +}; + +// Parses a=crypto lines into +// https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#dictionary-rtcsrtpsdesparameters-members +SDPUtils.parseCryptoLine = function (line) { + var parts = line.substr(9).split(' '); + return { + tag: parseInt(parts[0], 10), + cryptoSuite: parts[1], + keyParams: parts[2], + sessionParams: parts.slice(3) + }; +}; + +SDPUtils.writeCryptoLine = function (parameters) { + return 'a=crypto:' + parameters.tag + ' ' + parameters.cryptoSuite + ' ' + (_typeof(parameters.keyParams) === 'object' ? SDPUtils.writeCryptoKeyParams(parameters.keyParams) : parameters.keyParams) + (parameters.sessionParams ? ' ' + parameters.sessionParams.join(' ') : '') + '\r\n'; +}; + +// Parses the crypto key parameters into +// https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#rtcsrtpkeyparam* +SDPUtils.parseCryptoKeyParams = function (keyParams) { + if (keyParams.indexOf('inline:') !== 0) { + return null; + } + var parts = keyParams.substr(7).split('|'); + return { + keyMethod: 'inline', + keySalt: parts[0], + lifeTime: parts[1], + mkiValue: parts[2] ? parts[2].split(':')[0] : undefined, + mkiLength: parts[2] ? parts[2].split(':')[1] : undefined + }; +}; + +SDPUtils.writeCryptoKeyParams = function (keyParams) { + return keyParams.keyMethod + ':' + keyParams.keySalt + (keyParams.lifeTime ? '|' + keyParams.lifeTime : '') + (keyParams.mkiValue && keyParams.mkiLength ? '|' + keyParams.mkiValue + ':' + keyParams.mkiLength : ''); +}; + +// Extracts all SDES parameters. +SDPUtils.getCryptoParameters = function (mediaSection, sessionpart) { + var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=crypto:'); + return lines.map(SDPUtils.parseCryptoLine); +}; + +// Parses ICE information from SDP media section or sessionpart. +// FIXME: for consistency with other functions this should only +// get the ice-ufrag and ice-pwd lines as input. +SDPUtils.getIceParameters = function (mediaSection, sessionpart) { + var ufrag = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=ice-ufrag:')[0]; + var pwd = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=ice-pwd:')[0]; + if (!(ufrag && pwd)) { + return null; + } + return { + usernameFragment: ufrag.substr(12), + password: pwd.substr(10) + }; +}; + +// Serializes ICE parameters to SDP. +SDPUtils.writeIceParameters = function (params) { + var sdp = 'a=ice-ufrag:' + params.usernameFragment + '\r\n' + 'a=ice-pwd:' + params.password + '\r\n'; + if (params.iceLite) { + sdp += 'a=ice-lite\r\n'; + } + return sdp; +}; + +// Parses the SDP media section and returns RTCRtpParameters. +SDPUtils.parseRtpParameters = function (mediaSection) { + var description = { + codecs: [], + headerExtensions: [], + fecMechanisms: [], + rtcp: [] + }; + var lines = SDPUtils.splitLines(mediaSection); + var mline = lines[0].split(' '); + for (var i = 3; i < mline.length; i++) { + // find all codecs from mline[3..] + var pt = mline[i]; + var rtpmapline = SDPUtils.matchPrefix(mediaSection, 'a=rtpmap:' + pt + ' ')[0]; + if (rtpmapline) { + var codec = SDPUtils.parseRtpMap(rtpmapline); + var fmtps = SDPUtils.matchPrefix(mediaSection, 'a=fmtp:' + pt + ' '); + // Only the first a=fmtp: is considered. + codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {}; + codec.rtcpFeedback = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-fb:' + pt + ' ').map(SDPUtils.parseRtcpFb); + description.codecs.push(codec); + // parse FEC mechanisms from rtpmap lines. + switch (codec.name.toUpperCase()) { + case 'RED': + case 'ULPFEC': + description.fecMechanisms.push(codec.name.toUpperCase()); + break; + default: + // only RED and ULPFEC are recognized as FEC mechanisms. + break; + } + } + } + SDPUtils.matchPrefix(mediaSection, 'a=extmap:').forEach(function (line) { + description.headerExtensions.push(SDPUtils.parseExtmap(line)); + }); + // FIXME: parse rtcp. + return description; +}; + +// Generates parts of the SDP media section describing the capabilities / +// parameters. +SDPUtils.writeRtpDescription = function (kind, caps) { + var sdp = ''; + + // Build the mline. + sdp += 'm=' + kind + ' '; + sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs. + sdp += ' UDP/TLS/RTP/SAVPF '; + sdp += caps.codecs.map(function (codec) { + if (codec.preferredPayloadType !== undefined) { + return codec.preferredPayloadType; + } + return codec.payloadType; + }).join(' ') + '\r\n'; + + sdp += 'c=IN IP4 0.0.0.0\r\n'; + sdp += 'a=rtcp:9 IN IP4 0.0.0.0\r\n'; + + // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb. + caps.codecs.forEach(function (codec) { + sdp += SDPUtils.writeRtpMap(codec); + sdp += SDPUtils.writeFmtp(codec); + sdp += SDPUtils.writeRtcpFb(codec); + }); + var maxptime = 0; + caps.codecs.forEach(function (codec) { + if (codec.maxptime > maxptime) { + maxptime = codec.maxptime; + } + }); + if (maxptime > 0) { + sdp += 'a=maxptime:' + maxptime + '\r\n'; + } + + if (caps.headerExtensions) { + caps.headerExtensions.forEach(function (extension) { + sdp += SDPUtils.writeExtmap(extension); + }); + } + // FIXME: write fecMechanisms. + return sdp; +}; + +// Parses the SDP media section and returns an array of +// RTCRtpEncodingParameters. +SDPUtils.parseRtpEncodingParameters = function (mediaSection) { + var encodingParameters = []; + var description = SDPUtils.parseRtpParameters(mediaSection); + var hasRed = description.fecMechanisms.indexOf('RED') !== -1; + var hasUlpfec = description.fecMechanisms.indexOf('ULPFEC') !== -1; + + // filter a=ssrc:... cname:, ignore PlanB-msid + var ssrcs = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) { + return SDPUtils.parseSsrcMedia(line); + }).filter(function (parts) { + return parts.attribute === 'cname'; + }); + var primarySsrc = ssrcs.length > 0 && ssrcs[0].ssrc; + var secondarySsrc = void 0; + + var flows = SDPUtils.matchPrefix(mediaSection, 'a=ssrc-group:FID').map(function (line) { + var parts = line.substr(17).split(' '); + return parts.map(function (part) { + return parseInt(part, 10); + }); + }); + if (flows.length > 0 && flows[0].length > 1 && flows[0][0] === primarySsrc) { + secondarySsrc = flows[0][1]; + } + + description.codecs.forEach(function (codec) { + if (codec.name.toUpperCase() === 'RTX' && codec.parameters.apt) { + var encParam = { + ssrc: primarySsrc, + codecPayloadType: parseInt(codec.parameters.apt, 10) + }; + if (primarySsrc && secondarySsrc) { + encParam.rtx = { ssrc: secondarySsrc }; + } + encodingParameters.push(encParam); + if (hasRed) { + encParam = JSON.parse(JSON.stringify(encParam)); + encParam.fec = { + ssrc: primarySsrc, + mechanism: hasUlpfec ? 'red+ulpfec' : 'red' + }; + encodingParameters.push(encParam); + } + } + }); + if (encodingParameters.length === 0 && primarySsrc) { + encodingParameters.push({ + ssrc: primarySsrc + }); + } + + // we support both b=AS and b=TIAS but interpret AS as TIAS. + var bandwidth = SDPUtils.matchPrefix(mediaSection, 'b='); + if (bandwidth.length) { + if (bandwidth[0].indexOf('b=TIAS:') === 0) { + bandwidth = parseInt(bandwidth[0].substr(7), 10); + } else if (bandwidth[0].indexOf('b=AS:') === 0) { + // use formula from JSEP to convert b=AS to TIAS value. + bandwidth = parseInt(bandwidth[0].substr(5), 10) * 1000 * 0.95 - 50 * 40 * 8; + } else { + bandwidth = undefined; + } + encodingParameters.forEach(function (params) { + params.maxBitrate = bandwidth; + }); + } + return encodingParameters; +}; + +// parses http://draft.ortc.org/#rtcrtcpparameters* +SDPUtils.parseRtcpParameters = function (mediaSection) { + var rtcpParameters = {}; + + // Gets the first SSRC. Note that with RTX there might be multiple + // SSRCs. + var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) { + return SDPUtils.parseSsrcMedia(line); + }).filter(function (obj) { + return obj.attribute === 'cname'; + })[0]; + if (remoteSsrc) { + rtcpParameters.cname = remoteSsrc.value; + rtcpParameters.ssrc = remoteSsrc.ssrc; + } + + // Edge uses the compound attribute instead of reducedSize + // compound is !reducedSize + var rsize = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-rsize'); + rtcpParameters.reducedSize = rsize.length > 0; + rtcpParameters.compound = rsize.length === 0; + + // parses the rtcp-mux attrіbute. + // Note that Edge does not support unmuxed RTCP. + var mux = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-mux'); + rtcpParameters.mux = mux.length > 0; + + return rtcpParameters; +}; + +SDPUtils.writeRtcpParameters = function (rtcpParameters) { + var sdp = ''; + if (rtcpParameters.reducedSize) { + sdp += 'a=rtcp-rsize\r\n'; + } + if (rtcpParameters.mux) { + sdp += 'a=rtcp-mux\r\n'; + } + if (rtcpParameters.ssrc !== undefined && rtcpParameters.cname) { + sdp += 'a=ssrc:' + rtcpParameters.ssrc + ' cname:' + rtcpParameters.cname + '\r\n'; + } + return sdp; +}; + +// parses either a=msid: or a=ssrc:... msid lines and returns +// the id of the MediaStream and MediaStreamTrack. +SDPUtils.parseMsid = function (mediaSection) { + var parts = void 0; + var spec = SDPUtils.matchPrefix(mediaSection, 'a=msid:'); + if (spec.length === 1) { + parts = spec[0].substr(7).split(' '); + return { stream: parts[0], track: parts[1] }; + } + var planB = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) { + return SDPUtils.parseSsrcMedia(line); + }).filter(function (msidParts) { + return msidParts.attribute === 'msid'; + }); + if (planB.length > 0) { + parts = planB[0].value.split(' '); + return { stream: parts[0], track: parts[1] }; + } +}; + +// SCTP +// parses draft-ietf-mmusic-sctp-sdp-26 first and falls back +// to draft-ietf-mmusic-sctp-sdp-05 +SDPUtils.parseSctpDescription = function (mediaSection) { + var mline = SDPUtils.parseMLine(mediaSection); + var maxSizeLine = SDPUtils.matchPrefix(mediaSection, 'a=max-message-size:'); + var maxMessageSize = void 0; + if (maxSizeLine.length > 0) { + maxMessageSize = parseInt(maxSizeLine[0].substr(19), 10); + } + if (isNaN(maxMessageSize)) { + maxMessageSize = 65536; + } + var sctpPort = SDPUtils.matchPrefix(mediaSection, 'a=sctp-port:'); + if (sctpPort.length > 0) { + return { + port: parseInt(sctpPort[0].substr(12), 10), + protocol: mline.fmt, + maxMessageSize: maxMessageSize + }; + } + var sctpMapLines = SDPUtils.matchPrefix(mediaSection, 'a=sctpmap:'); + if (sctpMapLines.length > 0) { + var parts = sctpMapLines[0].substr(10).split(' '); + return { + port: parseInt(parts[0], 10), + protocol: parts[1], + maxMessageSize: maxMessageSize + }; + } +}; + +// SCTP +// outputs the draft-ietf-mmusic-sctp-sdp-26 version that all browsers +// support by now receiving in this format, unless we originally parsed +// as the draft-ietf-mmusic-sctp-sdp-05 format (indicated by the m-line +// protocol of DTLS/SCTP -- without UDP/ or TCP/) +SDPUtils.writeSctpDescription = function (media, sctp) { + var output = []; + if (media.protocol !== 'DTLS/SCTP') { + output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.protocol + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctp-port:' + sctp.port + '\r\n']; + } else { + output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.port + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctpmap:' + sctp.port + ' ' + sctp.protocol + ' 65535\r\n']; + } + if (sctp.maxMessageSize !== undefined) { + output.push('a=max-message-size:' + sctp.maxMessageSize + '\r\n'); + } + return output.join(''); +}; + +// Generate a session ID for SDP. +// https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-5.2.1 +// recommends using a cryptographically random +ve 64-bit value +// but right now this should be acceptable and within the right range +SDPUtils.generateSessionId = function () { + return Math.random().toString().substr(2, 21); +}; + +// Write boiler plate for start of SDP +// sessId argument is optional - if not supplied it will +// be generated randomly +// sessVersion is optional and defaults to 2 +// sessUser is optional and defaults to 'thisisadapterortc' +SDPUtils.writeSessionBoilerplate = function (sessId, sessVer, sessUser) { + var sessionId = void 0; + var version = sessVer !== undefined ? sessVer : 2; + if (sessId) { + sessionId = sessId; + } else { + sessionId = SDPUtils.generateSessionId(); + } + var user = sessUser || 'thisisadapterortc'; + // FIXME: sess-id should be an NTP timestamp. + return 'v=0\r\n' + 'o=' + user + ' ' + sessionId + ' ' + version + ' IN IP4 127.0.0.1\r\n' + 's=-\r\n' + 't=0 0\r\n'; +}; + +// Gets the direction from the mediaSection or the sessionpart. +SDPUtils.getDirection = function (mediaSection, sessionpart) { + // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv. + var lines = SDPUtils.splitLines(mediaSection); + for (var i = 0; i < lines.length; i++) { + switch (lines[i]) { + case 'a=sendrecv': + case 'a=sendonly': + case 'a=recvonly': + case 'a=inactive': + return lines[i].substr(2); + default: + // FIXME: What should happen here? + } + } + if (sessionpart) { + return SDPUtils.getDirection(sessionpart); + } + return 'sendrecv'; +}; + +SDPUtils.getKind = function (mediaSection) { + var lines = SDPUtils.splitLines(mediaSection); + var mline = lines[0].split(' '); + return mline[0].substr(2); +}; + +SDPUtils.isRejected = function (mediaSection) { + return mediaSection.split(' ', 2)[1] === '0'; +}; + +SDPUtils.parseMLine = function (mediaSection) { + var lines = SDPUtils.splitLines(mediaSection); + var parts = lines[0].substr(2).split(' '); + return { + kind: parts[0], + port: parseInt(parts[1], 10), + protocol: parts[2], + fmt: parts.slice(3).join(' ') + }; +}; + +SDPUtils.parseOLine = function (mediaSection) { + var line = SDPUtils.matchPrefix(mediaSection, 'o=')[0]; + var parts = line.substr(2).split(' '); + return { + username: parts[0], + sessionId: parts[1], + sessionVersion: parseInt(parts[2], 10), + netType: parts[3], + addressType: parts[4], + address: parts[5] + }; +}; + +// a very naive interpretation of a valid SDP. +SDPUtils.isValidSDP = function (blob) { + if (typeof blob !== 'string' || blob.length === 0) { + return false; + } + var lines = SDPUtils.splitLines(blob); + for (var i = 0; i < lines.length; i++) { + if (lines[i].length < 2 || lines[i].charAt(1) !== '=') { + return false; + } + // TODO: check the modifier a bit more. + } + return true; +}; + +// Expose public methods. +if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object') { + module.exports = SDPUtils; +} +},{}]},{},[1])(1) +}); diff --git a/public/static/config.js b/public/static/config.js new file mode 100644 index 0000000..2873d3c --- /dev/null +++ b/public/static/config.js @@ -0,0 +1,5 @@ +window.g = { + AXIOS_TIMEOUT: 10000, + ApiUrl: 'http://192.168.99.72:15000', // 配置服务器地址 + ApiWebRtcServerUrl: '127.0.0.1:8000', // 配置监控视频服务器地址 +} \ No newline at end of file diff --git a/public/static/webrtcstreamer.js b/public/static/webrtcstreamer.js new file mode 100644 index 0000000..89a5c5f --- /dev/null +++ b/public/static/webrtcstreamer.js @@ -0,0 +1,305 @@ +var WebRtcStreamer = (function() { + + /** + * Interface with WebRTC-streamer API + * @constructor + * @param {string} videoElement - id of the video element tag + * @param {string} srvurl - url of webrtc-streamer (default is current location) + */ + var WebRtcStreamer = function WebRtcStreamer (videoElement, srvurl) { + if (typeof videoElement === "string") { + this.videoElement = document.getElementById(videoElement); + } else { + this.videoElement = videoElement; + } + this.srvurl = srvurl || location.protocol+"//"+window.location.hostname+":"+window.location.port; + this.pc = null; + + this.mediaConstraints = { offerToReceiveAudio: true, offerToReceiveVideo: true }; + + this.iceServers = null; + this.earlyCandidates = []; + } + + WebRtcStreamer.prototype._handleHttpErrors = function (response) { + if (!response.ok) { + throw Error(response.statusText); + } + return response; + } + + /** + * Connect a WebRTC Stream to videoElement + * @param {string} videourl - id of WebRTC video stream + * @param {string} audiourl - id of WebRTC audio stream + * @param {string} options - options of WebRTC call + * @param {string} stream - local stream to send + */ + WebRtcStreamer.prototype.connect = function(videourl, audiourl, options, localstream) { + this.disconnect(); + + // getIceServers is not already received + if (!this.iceServers) { + console.log("Get IceServers"); + + fetch(this.srvurl + "/api/getIceServers") + .then(this._handleHttpErrors) + .then( (response) => (response.json()) ) + .then( (response) => this.onReceiveGetIceServers(response, videourl, audiourl, options, localstream)) + .catch( (error) => this.onError("getIceServers " + error )) + + } else { + this.onReceiveGetIceServers(this.iceServers, videourl, audiourl, options, localstream); + } + } + + /** + * Disconnect a WebRTC Stream and clear videoElement source + */ + WebRtcStreamer.prototype.disconnect = function() { + if (this.videoElement?.srcObject) { + this.videoElement.srcObject.getTracks().forEach(track => { + track.stop() + this.videoElement.srcObject.removeTrack(track); + }); + } + if (this.pc) { + fetch(this.srvurl + "/api/hangup?peerid=" + this.pc.peerid) + .then(this._handleHttpErrors) + .catch( (error) => this.onError("hangup " + error )) + + + try { + this.pc.close(); + } + catch (e) { + console.log ("Failure close peer connection:" + e); + } + this.pc = null; + } + } + + /* + * GetIceServers callback + */ + WebRtcStreamer.prototype.onReceiveGetIceServers = function(iceServers, videourl, audiourl, options, stream) { + this.iceServers = iceServers; + this.pcConfig = iceServers || {"iceServers": [] }; + try { + this.createPeerConnection(); + + var callurl = this.srvurl + "/api/call?peerid=" + this.pc.peerid + "&url=" + encodeURIComponent(videourl); + if (audiourl) { + callurl += "&audiourl="+encodeURIComponent(audiourl); + } + if (options) { + callurl += "&options="+encodeURIComponent(options); + } + + if (stream) { + this.pc.addStream(stream); + } + + // clear early candidates + this.earlyCandidates.length = 0; + + // create Offer + this.pc.createOffer(this.mediaConstraints).then((sessionDescription) => { + console.log("Create offer:" + JSON.stringify(sessionDescription)); + + this.pc.setLocalDescription(sessionDescription) + .then(() => { + fetch(callurl, { method: "POST", body: JSON.stringify(sessionDescription) }) + .then(this._handleHttpErrors) + .then( (response) => (response.json()) ) + .catch( (error) => this.onError("call " + error )) + .then( (response) => this.onReceiveCall(response) ) + .catch( (error) => this.onError("call " + error )) + + }, (error) => { + console.log ("setLocalDescription error:" + JSON.stringify(error)); + }); + + }, (error) => { + alert("Create offer error:" + JSON.stringify(error)); + }); + + } catch (e) { + this.disconnect(); + alert("connect error: " + e); + } + } + + + WebRtcStreamer.prototype.getIceCandidate = function() { + fetch(this.srvurl + "/api/getIceCandidate?peerid=" + this.pc.peerid) + .then(this._handleHttpErrors) + .then( (response) => (response.json()) ) + .then( (response) => this.onReceiveCandidate(response)) + .catch( (error) => this.onError("getIceCandidate " + error )) + } + + /* + * create RTCPeerConnection + */ + WebRtcStreamer.prototype.createPeerConnection = function() { + console.log("createPeerConnection config: " + JSON.stringify(this.pcConfig)); + this.pc = new RTCPeerConnection(this.pcConfig); + var pc = this.pc; + pc.peerid = Math.random(); + + pc.onicecandidate = (evt) => this.onIceCandidate(evt); + pc.onaddstream = (evt) => this.onAddStream(evt); + pc.oniceconnectionstatechange = (evt) => { + console.log("oniceconnectionstatechange state: " + pc.iceConnectionState); + if (this.videoElement) { + if (pc.iceConnectionState === "connected") { + this.videoElement.style.opacity = "1.0"; + } + else if (pc.iceConnectionState === "disconnected") { + this.videoElement.style.opacity = "0.25"; + } + else if ( (pc.iceConnectionState === "failed") || (pc.iceConnectionState === "closed") ) { + this.videoElement.style.opacity = "0.5"; + } else if (pc.iceConnectionState === "new") { + this.getIceCandidate(); + } + } + } + pc.ondatachannel = function(evt) { + console.log("remote datachannel created:"+JSON.stringify(evt)); + + evt.channel.onopen = function () { + console.log("remote datachannel open"); + this.send("remote channel openned"); + } + evt.channel.onmessage = function (event) { + console.log("remote datachannel recv:"+JSON.stringify(event.data)); + } + } + pc.onicegatheringstatechange = function() { + if (pc.iceGatheringState === "complete") { + const recvs = pc.getReceivers(); + + recvs.forEach((recv) => { + if (recv.track && recv.track.kind === "video") { + console.log("codecs:" + JSON.stringify(recv.getParameters().codecs)) + } + }); + } + } + + try { + var dataChannel = pc.createDataChannel("ClientDataChannel"); + dataChannel.onopen = function() { + console.log("local datachannel open"); + this.send("local channel openned"); + } + dataChannel.onmessage = function(evt) { + console.log("local datachannel recv:"+JSON.stringify(evt.data)); + } + } catch (e) { + console.log("Cannor create datachannel error: " + e); + } + + console.log("Created RTCPeerConnnection with config: " + JSON.stringify(this.pcConfig) ); + return pc; + } + + + /* + * RTCPeerConnection IceCandidate callback + */ + WebRtcStreamer.prototype.onIceCandidate = function (event) { + if (event.candidate) { + if (this.pc.currentRemoteDescription) { + this.addIceCandidate(this.pc.peerid, event.candidate); + } else { + this.earlyCandidates.push(event.candidate); + } + } + else { + console.log("End of candidates."); + } + } + + + WebRtcStreamer.prototype.addIceCandidate = function(peerid, candidate) { + fetch(this.srvurl + "/api/addIceCandidate?peerid="+peerid, { method: "POST", body: JSON.stringify(candidate) }) + .then(this._handleHttpErrors) + .then( (response) => (response.json()) ) + .then( (response) => {console.log("addIceCandidate ok:" + response)}) + .catch( (error) => this.onError("addIceCandidate " + error )) + } + + /* + * RTCPeerConnection AddTrack callback + */ + WebRtcStreamer.prototype.onAddStream = function(event) { + console.log("Remote track added:" + JSON.stringify(event)); + + this.videoElement.srcObject = event.stream; + var promise = this.videoElement.play(); + if (promise !== undefined) { + promise.catch((error) => { + console.warn("error:"+error); + this.videoElement.setAttribute("controls", true); + }); + } + } + + /* + * AJAX /call callback + */ + WebRtcStreamer.prototype.onReceiveCall = function(dataJson) { + + console.log("offer: " + JSON.stringify(dataJson)); + var descr = new RTCSessionDescription(dataJson); + this.pc.setRemoteDescription(descr).then(() => { + console.log ("setRemoteDescription ok"); + while (this.earlyCandidates.length) { + var candidate = this.earlyCandidates.shift(); + this.addIceCandidate(this.pc.peerid, candidate); + } + + this.getIceCandidate() + } + , (error) => { + console.log ("setRemoteDescription error:" + JSON.stringify(error)); + }); + } + + /* + * AJAX /getIceCandidate callback + */ + WebRtcStreamer.prototype.onReceiveCandidate = function(dataJson) { + console.log("candidate: " + JSON.stringify(dataJson)); + if (dataJson) { + for (var i=0; i { console.log ("addIceCandidate OK"); } + , (error) => { console.log ("addIceCandidate error:" + JSON.stringify(error)); } ); + } + this.pc.addIceCandidate(); + } + } + + + /* + * AJAX callback for Error + */ + WebRtcStreamer.prototype.onError = function(status) { + console.log("onError:" + status); + } + + return WebRtcStreamer; + })(); + + if (typeof window !== 'undefined' && typeof window.document !== 'undefined') { + window.WebRtcStreamer = WebRtcStreamer; + } + if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { + module.exports = WebRtcStreamer; + } \ No newline at end of file diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..71f2713 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,30 @@ + + + diff --git a/src/api/RFID/RFID.js b/src/api/RFID/RFID.js new file mode 100644 index 0000000..cdaea12 --- /dev/null +++ b/src/api/RFID/RFID.js @@ -0,0 +1,43 @@ +import request from '@/utils/request' + +export function checkStatus(params) { + return request({ + url: 'api/RFID/CheckStatus', + method: 'get', + params + }) +} + +export function readEpc(params) { + return request({ + url: 'api/RFID/ReadEpc', + method: 'get', + params + }) +} + +export function writeEPC(params) { + return request({ + url: 'api/RFID/WriteEPC', + method: 'get', + params + }) +} + +export function getDeviceMac() { + return request({ + // url: 'api/RFID/getDeviceMac', + url: 'api/RFID/getDeviceMacLinux', + method: 'get' + }) +} + +export function getDeviceIdByMac(mac) { + const params = { mac: mac } + return request({ + url: 'api/RFID/getDeviceIdByMac', + method: 'get', + params + }) +} +export default { checkStatus, readEpc, writeEPC, getDeviceMac, getDeviceIdByMac } diff --git a/src/api/asset/index.js b/src/api/asset/index.js new file mode 100644 index 0000000..6f16f03 --- /dev/null +++ b/src/api/asset/index.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +export function FetchInitAssetInfo(params) { + return request({ + url: 'api/asset/initAssetInfo', + method: 'get', + params + }) +} + +// 新增盘点单 +export function add(data) { + return request({ + url: 'api/stocktake/addStockTakeBill', + method: 'post', + data + }) +} + +// 获取盘点单详情 +export function FetchStockTakeDetailsByTaskId(params) { + return request({ + url: 'api/stocktake/getStockTakeDetailsByTaskId', + method: 'get', + params + }) +} + +// 结算盘点单 +export function FetchStockSettle(ids) { + return request({ + url: 'api/stocktake/stockSettle', + method: 'post', + data: ids + }) +} + +export function FetchDeleteStockTake(ids) { + return request({ + url: 'api/stocktake/deleteStockTake', + method: 'post', + data: ids + }) +} + +export default { + FetchInitAssetInfo, + add, + FetchStockTakeDetailsByTaskId, + FetchStockSettle, + FetchDeleteStockTake +} diff --git a/src/api/assetDevice/index.js b/src/api/assetDevice/index.js new file mode 100644 index 0000000..fa28434 --- /dev/null +++ b/src/api/assetDevice/index.js @@ -0,0 +1,92 @@ +import request from '@/utils/request' +// 获取仓库树 +export function FetchWarehouseTree(params) { + return request({ + url: 'api/warehouse/getWarehouseTree', + method: 'get', + params + }) +} + +// 获取市州-仓库树 +export function FetchFondsWarehouseTree(params) { + return request({ + url: 'api/warehouse/getFondsWarehouseTree', + method: 'get', + params + }) +} + +// 初始化设备列表 +export function FetchInitDeviceInfo(params) { + return request({ + url: 'api/device/initDeviceInfo', + method: 'get', + params + }) +} + +// 根据仓库iD获取全部设备 +export function FetchDeviceAlllByWarehouseId(params) { + return request({ + url: 'api/device/getDeviceAlllByWarehouseId', + method: 'get', + params + }) +} + +// 新增设备 +export function add(data) { + return request({ + url: 'api/device/editDevice', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/device/deleteDevice', + method: 'post', + data: ids + }) +} + +// 获取设备类型树 +export function FetchDeviceTypeTree(params) { + return request({ + url: 'api/device/deviceTypeTree', + method: 'get', + params + }) +} +// 根据id获取设备详情 +export function FetchDeviceDetailsById(params) { + return request({ + url: 'api/device/getDeviceDetailsById', + method: 'get', + params + }) +} + +// 获取密码 +export function FetchDevicePasswordById(params) { + return request({ + url: 'api/device/getDevicePasswordById', + method: 'get', + params + }) +} + +export default { + FetchFondsWarehouseTree, + FetchWarehouseTree, + FetchInitDeviceInfo, + add, + edit: add, + del, + FetchDeviceTypeTree, + FetchDeviceDetailsById, + FetchDevicePasswordById, + FetchDeviceAlllByWarehouseId +} diff --git a/src/api/assetFonds/index.js b/src/api/assetFonds/index.js new file mode 100644 index 0000000..578fbb3 --- /dev/null +++ b/src/api/assetFonds/index.js @@ -0,0 +1,24 @@ +import request from '@/utils/request' + +// 同步市州 +export function FetchSyncFonds(data) { + return request({ + url: 'api/fonds/syncFonds', + method: 'post', + data + }) +} + +// 同步存放地 +export function FetchStorageLocation(data) { + return request({ + url: '/api/storageLocation/syncStorageLocation', + method: 'post', + data + }) +} + +export default { + FetchSyncFonds, + FetchStorageLocation +} diff --git a/src/api/assetWarehouse/index.js b/src/api/assetWarehouse/index.js new file mode 100644 index 0000000..f94448f --- /dev/null +++ b/src/api/assetWarehouse/index.js @@ -0,0 +1,43 @@ +import request from '@/utils/request' + +// 初始化仓库列表 +export function FetchInitWarehouseList(params) { + return request({ + url: 'api/warehouse/initWarehouseList', + method: 'get', + params + }) +} + +// 新增编辑仓库 +export function add(data) { + return request({ + url: 'api/warehouse/editWarehouse', + method: 'post', + data + }) +} + +export function FetchEditWarehouseStatus(data) { + return request({ + url: 'api/warehouse/editWarehouseStatus', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/warehouse/deleteWarehouse', + method: 'post', + data: ids + }) +} + +export default { + FetchInitWarehouseList, + add, + edit: add, + FetchEditWarehouseStatus, + del +} diff --git a/src/api/data.js b/src/api/data.js new file mode 100644 index 0000000..27f9580 --- /dev/null +++ b/src/api/data.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' +import qs from 'qs' + +export function initData(url, params) { + return request({ + url: url + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +export function download(url, params) { + return request({ + url: url + '?' + qs.stringify(params, { indices: false }), + method: 'get', + responseType: 'blob' + }) +} diff --git a/src/api/deviceVI/index.js b/src/api/deviceVI/index.js new file mode 100644 index 0000000..2d10b90 --- /dev/null +++ b/src/api/deviceVI/index.js @@ -0,0 +1,99 @@ +import request from '@/utils/request' + +// 获取区域树 +export function FetchRegionTree(params) { + return request({ + url: 'api/device/getRegionTree', + method: 'get', + params + }) +} + +// 设备列表 +export function FetchinitDeviceInfoList(params) { + return request({ + url: 'api/device/initDeviceInfoList', + method: 'get', + params + }) +} + +export function add(data) { + return request({ + url: 'api/device/editDeviceInfo', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/device/editDeviceInfo', + method: 'post', + data + }) +} + +export function del(data) { + return request({ + url: 'api/device/delDeviceInfo', + method: 'post', + data + }) +} + +// 通过设备id获取设备详情 +export function FetchDeviceById(params) { + return request({ + url: 'api/device/getDeviceById', + method: 'get', + params + }) +} + +// 摄像头绑定书架 +export function FetchDeviceShelfGridBinding(data) { + return request({ + url: 'api/device/deviceShelfGridBinding', + method: 'post', + data + }) +} + +// 根据设备和条件获取已绑定书架 +export function FetchBoundGridByDevice(params) { + return request({ + url: 'api/device/getBoundGridByDevice', + method: 'get', + params + }) +} + +// 根据条件获取未绑定书架 +export function FetchUnboundGrid(params) { + return request({ + url: 'api/device/getUnboundGrid', + method: 'get', + params + }) +} + +// 根据摄像头信息获取摄像头状态2export function FetchBoundGridByDevice(params) { +export function FetchPingIP(params) { + return request({ + url: 'api/queryDeviceAPI/pingIP', + method: 'get', + params + }) +} + +// 根据设备类别获取设备树 +export function FetchDeviceTreeByType(params) { + return request({ + url: 'api/device/getDeviceTreeByType', + method: 'get', + params + }) +} + +export default { add, edit, del, FetchRegionTree, FetchinitDeviceInfoList, FetchDeviceById, FetchDeviceShelfGridBinding, FetchBoundGridByDevice, FetchUnboundGrid, FetchPingIP, FetchDeviceTreeByType } diff --git a/src/api/home/alarm/index.js b/src/api/home/alarm/index.js new file mode 100644 index 0000000..e4511ad --- /dev/null +++ b/src/api/home/alarm/index.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +export function info(params) { + return request({ + url: 'api/alarm/info', + params, + method: 'get' + }) +} +export default { info } diff --git a/src/api/home/cpu/index.js b/src/api/home/cpu/index.js new file mode 100644 index 0000000..109c73d --- /dev/null +++ b/src/api/home/cpu/index.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// 获取服务器基础信息 +export function FetchSystemInfo(params) { + return request({ + url: '/api/home/getSystemInfo', + params, + method: 'get' + }) +} +export default { FetchSystemInfo } diff --git a/src/api/home/securityDoor/securityDoor.js b/src/api/home/securityDoor/securityDoor.js new file mode 100644 index 0000000..faa19ab --- /dev/null +++ b/src/api/home/securityDoor/securityDoor.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +export function securitydoor(params) { + return request({ + url: 'api/securitydoor/initSecurityDoorLog', + method: 'get', + params + }) +} +export default { securitydoor } diff --git a/src/api/login.js b/src/api/login.js new file mode 100644 index 0000000..c68444c --- /dev/null +++ b/src/api/login.js @@ -0,0 +1,36 @@ +import request from '@/utils/request' + +export function login(username, password, code, uuid) { + return request({ + url: 'api/auth/login', + method: 'post', + data: { + username, + password, + code, + uuid + } + }) +} + +export function getInfo() { + return request({ + url: 'api/auth/info', + method: 'get' + }) +} + +export function getCodeImg(data) { + return request({ + url: 'api/auth/captcha', + method: 'post', + data + }) +} + +export function logout() { + return request({ + url: 'api/auth/logout', + method: 'post' + }) +} diff --git a/src/api/stockTask/index.js b/src/api/stockTask/index.js new file mode 100644 index 0000000..d1bbba5 --- /dev/null +++ b/src/api/stockTask/index.js @@ -0,0 +1,176 @@ +import request from '@/utils/request' +import qs from 'qs' + +export function add(data) { + return request({ + url: 'api/stocktask-task/editStockTask', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/stocktask-task/editStockTask', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/stocktask-task/delStockTask', + method: 'post', + data: ids + }) +} + +// 修改盘点任务状态 +export function FetchUpdateStockTaskStatus(data) { + return request({ + url: 'api/stocktask-task/updateStockTaskStatus', + method: 'post', + data + }) +} + +// 统计分析-建议倒架 +export function FetchInitSuggestTilting(params) { + return request({ + url: 'api/stocktask-task/initSuggestTilting' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 盘点管理-初始化参数 +export function FetchInitSetting(params) { + return request({ + url: 'api/stocktask-task/initSetting' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 盘点管理-编辑初始化参数 +export function FetchEditSetting(data) { + return request({ + url: 'api/stocktask-task/editSetting', + method: 'post', + data + }) +} + +// 初始化统计基础数据 +export function FetchInitHomeInfo(params) { + return request({ + url: 'api/stocktask-task/initHomeInfo' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 初始化盘点概况 +export function FetchInitStockInfo(params) { + return request({ + url: 'api/stocktask-task/initStockInfo' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 初始化热门图书 +export function FetchInitHotBookList(params) { + return request({ + url: 'api/stocktask-task/initHotBookList' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 初始化热门架位 +export function FetchInitHotShelfList(params) { + return request({ + url: 'api/stocktask-task/initHotShelfList' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 根据层架位id获取架位图书 +export function FetchInitBookDetailsByGrids(params) { + return request({ + url: 'api/stocktask-task/initBookDetailsByGrids' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// AI处理终端状态查询 +export function FetchAITerminalStatusQuery(params) { + return request({ + url: 'api/stocktask-task/AITerminalStatusQuery' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 根据书架和书架层获取盘点单信息 +export function FetchBillByShelfIdAndGridShelf(params) { + return request({ + url: 'api/stocktask-task/getBillByShelfIdAndGridShelf' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 根据盘点单号和层架位id获取是否完美切割 +export function FetchIsGoodcutByBillNoAndGridId(params) { + return request({ + url: 'api/stocktask-task/getIsGoodcutByBillNoAndGridId' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 建议顺架 +export function FetchInitErrorProbaDesc(params) { + return request({ + url: 'api/stocktask-task/initErrorProbaDesc' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 根据盘点id书架id和书架架位查询总览数据 +export function FetchShowByBillIdAndShelfIdAndGridShelf(params) { + return request({ + url: 'api/stocktask-task/showByBillIdAndShelfIdAndGridShelf' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 运行/停止图书AI识别程序 +export function FetchStartStopBookAIService(params) { + return request({ + url: 'api/stocktask-task/startStopBookAIService' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 移动盘点 +export function FetchMoveBills(data) { + return request({ + url: 'api/stocktask-task/moveBill', + method: 'post', + data + }) +} + +// 根据层架位id获取最新盘点信息 +export function FetchNewBillByGridId(params) { + return request({ + url: 'api/stocktask-task/getNewBillByGridId' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 手动上架 +export function FetchManualShelving(data) { + return request({ + url: 'api/stocktask-task/manualShelving', + method: 'post', + data + }) +} + +export default { add, edit, del, FetchUpdateStockTaskStatus, FetchInitSuggestTilting, FetchInitSetting, FetchEditSetting, FetchInitHomeInfo, FetchInitStockInfo, FetchInitHotBookList, FetchInitHotShelfList, FetchInitBookDetailsByGrids, FetchAITerminalStatusQuery, FetchBillByShelfIdAndGridShelf, FetchIsGoodcutByBillNoAndGridId, FetchInitErrorProbaDesc, FetchShowByBillIdAndShelfIdAndGridShelf, FetchStartStopBookAIService, FetchMoveBills, FetchNewBillByGridId, FetchManualShelving } diff --git a/src/api/stockTaskLog/index.js b/src/api/stockTaskLog/index.js new file mode 100644 index 0000000..5855d88 --- /dev/null +++ b/src/api/stockTaskLog/index.js @@ -0,0 +1,111 @@ +import request from '@/utils/request' +import qs from 'qs' + +// export function add(data) { +// return request({ +// url: 'api/stocktask-task/editStockTask', +// method: 'post', +// data +// }) +// } + +// export function edit(data) { +// return request({ +// url: 'api/stocktask-task/editStockTask', +// method: 'post', +// data +// }) +// } + +// 盘点单删除 +export function del(data) { + return request({ + url: '/api/stocktask-task/delStockBill', + method: 'post', + data: data + }) +} + +// 终止盘点单 +export function FetchStopStockBill(data) { + return request({ + url: '/api/stocktask-task/stopStockBill', + method: 'post', + data: data + }) +} + +// 盘点日志列表 +export function FetchInitStockLogList(params) { + return request({ + url: 'api/stocktask-task/initStockLogList' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 盘点日志详情 +export function FetchInitStockLogDetails(params) { + return request({ + url: 'api/stocktask-task/initStockLogDetails' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 根据盘点单id查看各层位详情 +export function FetchInitStockTaskDetails(params) { + return request({ + url: 'api/stocktask-task/initStockTaskDetails' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 根据盘点单号和层架位编码查看进度 +export function FetchProgressByStockBillAndGridCode(params) { + return request({ + url: 'api/stocktask-task/getProgressByStockBillAndGridCode' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 获取最新的盘点单号 +export function FetchNewBillNo(params) { + return request({ + url: 'api/stocktask-task/getNewBillNo' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 获取目标最新层架位数量 +export function FetchStockGirdNum(params) { + return request({ + url: 'api/stocktask-task/getStockGirdNum' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 获取目标区域层架位总数量 +export function FetchTotalGirdNum(params) { + return request({ + url: 'api/stocktask-task/getTotalGirdNum' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 手动创建盘点任务 +export function add(data) { + return request({ + url: 'api/stocktask-task/createBill', + method: 'post', + data: data + }) +} + +// 获取目标可盘层架信息 +export function FetchStockGirdSuccess(params) { + return request({ + url: 'api/stocktask-task/getStockGirdSuccess' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +export default { del, FetchStopStockBill, FetchInitStockLogList, FetchInitStockLogDetails, FetchProgressByStockBillAndGridCode, FetchInitStockTaskDetails, FetchNewBillNo, FetchStockGirdNum, FetchTotalGirdNum, add, FetchStockGirdSuccess } diff --git a/src/api/system/code.js b/src/api/system/code.js new file mode 100644 index 0000000..9500804 --- /dev/null +++ b/src/api/system/code.js @@ -0,0 +1,15 @@ +import request from '@/utils/request' + +export function resetEmail(data) { + return request({ + url: 'api/code/resetEmail?email=' + data, + method: 'post' + }) +} + +export function updatePass(pass) { + return request({ + url: 'api/users/updatePass/' + pass, + method: 'get' + }) +} diff --git a/src/api/system/dept.js b/src/api/system/dept.js new file mode 100644 index 0000000..5a1705c --- /dev/null +++ b/src/api/system/dept.js @@ -0,0 +1,87 @@ +import request from '@/utils/request' + +export function getDepts(params) { + return request({ + url: 'api/dept/initDeptInfo', + method: 'get', + params + }) +} + +export function getAssetDeptTree(params) { + return request({ + url: 'api/asset/getAssetDeptTree', + method: 'get', + params + }) +} + +export function getInitDeptTree(params) { + return request({ + url: 'api/dept/initDeptTree', + method: 'get', + params + }) +} + +// 同步部门 +export function FetchSyncDepts(data) { + return request({ + url: 'api/dept/syncDepts', + method: 'post', + data + }) +} + +// ----------------------------------------- + +export function getDeptSuperior(ids) { + const data = ids.length || ids.length === 0 ? ids : Array.of(ids) + return request({ + url: 'api/dept/superior', + method: 'post', + data + }) +} + +export function add(data) { + return request({ + url: 'api/depts/editDepts', + method: 'post', + data + }) +} + +export function del(data) { + return request({ + url: 'api/depts/delDepts', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/depts/editDepts', + method: 'post', + data + }) +} + +export function FetchUpdateDeptsStatus(data) { + return request({ + url: '/api/depts/updateDeptsStatus', + method: 'post', + data + }) +} + +export function FetchSonDepts(params) { + return request({ + url: '/api/depts/getSonDepts', + method: 'get', + params + }) +} + +export default { FetchSyncDepts, getDepts, getInitDeptTree, getAssetDeptTree, add, edit, del, getDeptSuperior, FetchUpdateDeptsStatus, FetchSonDepts } diff --git a/src/api/system/dict.js b/src/api/system/dict.js new file mode 100644 index 0000000..ebf068c --- /dev/null +++ b/src/api/system/dict.js @@ -0,0 +1,69 @@ +import request from '@/utils/request' + +export function FetchDictsList(params) { + return request({ + url: 'api/dictionary/initDictionaryList', + method: 'get', + params + }) +} + +export function add(data) { + return request({ + url: 'api/dictionary/editDictionary', + method: 'post', + data + }) +} + +export function del(data) { + return request({ + url: 'api/dictionary/delDictionary', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/dictionary/editDictionary', + method: 'post', + data + }) +} + +export function FetchDictionaryTree(params) { + return request({ + url: 'api/dictionary/initDictionaryTree', + method: 'get', + params + }) +} + +export function FetchSonDictionaryList(params) { + return request({ + url: 'api/dictionary/getSonDictionaryList', + method: 'get', + params + }) +} + +// 快速筛选 +export function FetchDictionaryTreeByCategoryId(params) { + return request({ + url: 'api/dictionary/getDictionaryTreeByCategoryId', + method: 'get', + params + }) +} + +// 根据父code查询子集 +export function FetchSonDictionaryListByCode(params) { + return request({ + url: '/api/dictionary/getSonDictionaryListByCode', + method: 'get', + params + }) +} + +export default { add, edit, del, FetchDictsList, FetchDictionaryTree, FetchSonDictionaryList, FetchDictionaryTreeByCategoryId, FetchSonDictionaryListByCode } diff --git a/src/api/system/dictDetail.js b/src/api/system/dictDetail.js new file mode 100644 index 0000000..14218d5 --- /dev/null +++ b/src/api/system/dictDetail.js @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +export function FetchDictsList(params) { + return request({ + url: 'api/dictionary/initDictionaryList', + method: 'get', + params + }) +} + +export function add(data) { + return request({ + url: 'api/dictionary/editDictionary', + method: 'post', + data + }) +} + +export function del(data) { + return request({ + url: 'api/dictionary/delDictionary', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/dictionary/editDictionary', + method: 'post', + data + }) +} + +export function FetchDictionaryTree(params) { + return request({ + url: 'api/dictionary/initDictionaryTree', + method: 'get', + params + }) +} + +export function FetchSonDictionaryList(params) { + return request({ + url: 'api/dictionary/getSonDictionaryList', + method: 'get', + params + }) +} + +// 快速筛选 +export function FetchDictionaryTreeByCategoryId(params) { + return request({ + url: 'api/dictionary/getDictionaryTreeByCategoryId', + method: 'get', + params + }) +} + +export default { add, edit, del, FetchDictsList, FetchDictionaryTree, FetchSonDictionaryList, FetchDictionaryTreeByCategoryId } diff --git a/src/api/system/fonds.js b/src/api/system/fonds.js new file mode 100644 index 0000000..c7119e2 --- /dev/null +++ b/src/api/system/fonds.js @@ -0,0 +1,83 @@ +import request from '@/utils/request' + +export function FetchInitFondsList(params) { + return request({ + url: 'api/fonds/initFondsList', + method: 'get', + params + }) +} + +export function add(data) { + return request({ + url: 'api/fonds/editFonds', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/fonds/editFonds', + method: 'post', + data + }) +} + +export function del(data) { + return request({ + url: 'api/fonds/delFonds', + method: 'post', + data + }) +} + +export function FetchUpdateFondsStatus(data) { + return request({ + url: 'api/fonds/updateFondsStatus', + method: 'post', + data + }) +} + +export function FetchDownload(params) { + return request({ + url: 'api/fonds/download', + method: 'get', + params + }) +} + +export function FetchFondsAll() { + return request({ + url: 'api/fonds/getFondsAll', + method: 'get' + }) +} + +export function FetchFondsCategory(data) { + return request({ + url: 'api/fonds/fondsCategory', + method: 'post', + data + }) +} + +export function FetchFondsDetail(params) { + return request({ + url: 'api/fonds/getFondsDetail', + method: 'get', + params + }) +} + +// 根据门类和档案id获取显示全宗 +export function FetchInitFondsByCategoryIdAndArchivesId(params) { + return request({ + url: 'api/fonds/initFondsByCategoryIdAndArchivesId', + method: 'get', + params + }) +} + +export default { add, edit, del, FetchInitFondsList, FetchUpdateFondsStatus, FetchDownload, FetchFondsCategory, FetchFondsDetail, FetchInitFondsByCategoryIdAndArchivesId } diff --git a/src/api/system/job.js b/src/api/system/job.js new file mode 100644 index 0000000..daeb737 --- /dev/null +++ b/src/api/system/job.js @@ -0,0 +1,58 @@ +import request from '@/utils/request' + +export function getAllJob() { + const params = { + page: 0, + size: 9999, + enabled: true + } + return request({ + url: 'api/posts/initPostList', + method: 'get', + params + }) +} + +export function add(data) { + return request({ + url: 'api/posts/editPost', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/posts/delPosts', + method: 'post', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'api/posts/editPost', + method: 'post', + data + }) +} + +// 获取全部岗位 +export function FetchPostAll(params) { + return request({ + url: 'api/posts/getPostAll', + method: 'get', + params + }) +} + +// 根据岗位查询用户信息 +export function FetchFindUserByPost(params) { + return request({ + url: 'api/posts/findUserByPost', + method: 'get', + params + }) +} + +export default { add, edit, del, FetchPostAll, FetchFindUserByPost } diff --git a/src/api/system/logs.js b/src/api/system/logs.js new file mode 100644 index 0000000..bef8aa5 --- /dev/null +++ b/src/api/system/logs.js @@ -0,0 +1,73 @@ +import request from '@/utils/request' +import qs from 'qs' + +export function getErrDetail(id) { + return request({ + url: 'api/log/getErrorLogDetail?id=' + id, + method: 'get' + }) +} + +// 清空登录日志 +export function FetchClearLoginLog(data) { + return request({ + url: '/api/log/clearLoginLog', + method: 'post', + data + }) +} + +// 清空操作日志 +export function FetchClearLog(data) { + return request({ + url: '/api/log/clearLog', + method: 'post', + data + }) +} + +// 清空报错日志 +export function FetchClearErrorLog(data) { + return request({ + url: '/api/log/clearErrorLog', + method: 'post', + data + }) +} + +// -------消息中心------ +// 获取列表 +export function getUserNotice(params) { + return request({ + url: 'api/users/notice' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 标记已读 +export function isread(data) { + return request({ + url: 'api/users/isread', + method: 'put', + data + }) +} + +// 删除 +export function userMsgDel(data) { + return request({ + url: '/api/users/delnotice', + method: 'delete', + data + }) +} + +export default { + getErrDetail, + FetchClearLoginLog, + FetchClearLog, + FetchClearErrorLog, + getUserNotice, + isread, + userMsgDel +} diff --git a/src/api/system/menu.js b/src/api/system/menu.js new file mode 100644 index 0000000..8f96b4e --- /dev/null +++ b/src/api/system/menu.js @@ -0,0 +1,67 @@ +import request from '@/utils/request' + +// 返回全部菜单 +export function getMenusTree(pid) { + return request({ + url: 'api/menu/lazy?pid=' + pid, + method: 'get' + }) +} + +export function getMenus(params) { + return request({ + url: 'api/menu/initMenu', + method: 'get', + params + }) +} + +// 查询菜单:根据ID获取同级与上级数据 +export function getMenuSuperior(ids) { + const data = Array.isArray(ids) || ids.length === 0 ? ids : Array.of(ids) + return request({ + url: 'api/menu/superior', + method: 'post', + data + }) +} + +// 根据菜单ID返回所有子节点ID,包含自身ID +export function getChild(id) { + return request({ + url: 'api/menu/child?id=' + id, + method: 'get' + }) +} + +export function buildMenus() { + return request({ + url: 'api/menu/build', + method: 'get' + }) +} +export function add(data) { + return request({ + url: 'api/menu/editMenu', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/menu/deleteMenu', + method: 'post', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'api/menu/editMenu', + method: 'post', + data + }) +} + +export default { add, edit, del, getMenusTree, getMenuSuperior, getMenus, getChild } diff --git a/src/api/system/new.js b/src/api/system/new.js new file mode 100644 index 0000000..ca1f462 --- /dev/null +++ b/src/api/system/new.js @@ -0,0 +1,30 @@ +import request from '@/utils/request' + +// 我的系统通知 +export function FetchMySystemNotice(params) { + return request({ + url: 'api/notice/mySystemNotice', + method: 'get', + params + }) +} + +// 通知详情 +export function FetchInitNoticeDetails(data) { + return request({ + url: 'api/notice/initNoticeDetails', + method: 'post', + data + }) +} + +// 全部已读 +export function FetchReadedAll(data) { + return request({ + url: 'api/notice/readedAll', + method: 'post', + data + }) +} + +export default { FetchMySystemNotice, FetchInitNoticeDetails, FetchReadedAll } diff --git a/src/api/system/notify.js b/src/api/system/notify.js new file mode 100644 index 0000000..8c27664 --- /dev/null +++ b/src/api/system/notify.js @@ -0,0 +1,20 @@ +import request from '@/utils/request' + +export function getNoticeList(params) { + return request({ + url: 'api/notice/initNotice', + method: 'get', + params + }) +} + +// 发布 +export function add(data) { + return request({ + url: 'api/notice/create', + method: 'post', + data + }) +} + +export default { add, getNoticeList } diff --git a/src/api/system/param.js b/src/api/system/param.js new file mode 100644 index 0000000..a12fc1a --- /dev/null +++ b/src/api/system/param.js @@ -0,0 +1,13 @@ +import request from '@/utils/request' + +export function verifyMaintenance(code) { + const params = { + code + } + return request({ + url: 'api/dictionary/maintenanceVerification', + method: 'get', + params + }) +} +export default { verifyMaintenance } diff --git a/src/api/system/role.js b/src/api/system/role.js new file mode 100644 index 0000000..3dcabce --- /dev/null +++ b/src/api/system/role.js @@ -0,0 +1,68 @@ +import request from '@/utils/request' + +// 获取所有的Role +export function getAll(params) { + return request({ + url: 'api/role/initRoleList', + method: 'get', + params + }) +} + +export function add(data) { + return request({ + url: 'api/role/editRole', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/role/editRole', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/role/delRole', + method: 'post', + data: ids + }) +} + +export function editFonds(data) { + return request({ + url: 'api/role/fonds', + method: 'put', + data + }) +} + +export function editMenu(data) { + return request({ + url: 'api/role/menu', + method: 'post', + data + }) +} + +export function get(id) { + return request({ + url: 'api/role/' + id, + method: 'get' + }) +} + +// ---------------------------------------- + +export function getLevel() { + return request({ + url: 'api/roles/level', + method: 'get' + }) +} + +export default { add, edit, del, get, editMenu, editFonds } diff --git a/src/api/system/sql.js b/src/api/system/sql.js new file mode 100644 index 0000000..b7adc15 --- /dev/null +++ b/src/api/system/sql.js @@ -0,0 +1,39 @@ +import request from '@/utils/request' + +// 备份数据库 +export function add(data) { + return request({ + url: 'api/database/backupSQL', + method: 'post', + data + }) +} + +// 获取备份数据库文件名 +export function FetchBackupName(params) { + return request({ + url: 'api/database/getBackupName', + method: 'get', + params + }) +} + +// 删除数据库备份 +export function del(data) { + return request({ + url: 'api/database/deleteDatabaseBackup', + method: 'post', + data + }) +} + +// 还原数据库 +export function FetchrestoreDatabase(params) { + return request({ + url: 'api/database/restoreDatabase', + method: 'get', + params + }) +} + +export default { add, FetchBackupName, del, FetchrestoreDatabase } diff --git a/src/api/system/user.js b/src/api/system/user.js new file mode 100644 index 0000000..24c2e23 --- /dev/null +++ b/src/api/system/user.js @@ -0,0 +1,109 @@ +import request from '@/utils/request' +import { encrypt } from '@/utils/rsaEncrypt' +import { getToken } from '@/utils/auth' + +export function FetchInitUserList(params) { + return request({ + url: 'api/user/initUserInfo', + method: 'get', + params + }) +} + +export function FetchSyncUser(data) { + return request({ + url: 'api/user/syncUser', + method: 'post', + data + }) +} + +// 根据人员ID查询详情 +export function FetchUserDetailsById(params) { + return request({ + url: 'api/user/getUserDetailsById', + method: 'get', + params + }) +} + +export function add(data) { + return request({ + url: 'api/user/editUser', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/user/deleteUser', + method: 'post', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'api/user/editUser', + method: 'post', + data + }) +} + +export function editUser(data) { + return request({ + url: 'api/users/updateOwn', + method: 'put', + data + }) +} + +export function updatePass(user) { + const data = { + oldPass: encrypt(user.oldPass), + newPass: encrypt(user.newPass) + } + return request({ + url: 'api/users/updatePass/', + method: 'post', + data + }) +} + +export function updateEmail(form) { + const data = { + password: encrypt(form.pass), + email: form.email + } + return request({ + url: 'api/users/updateEmail/' + form.code, + method: 'post', + data + }) +} + +export function resetpassword(data) { + return request({ + url: 'api/user/resetPassword', + method: 'post', + headers: { + Authorization: getToken() + }, + data + }) +} + +export function FetchEditUserState(data) { + return request({ + url: 'api/user/changeStatus', + method: 'post', + headers: { + Authorization: getToken() + }, + data + }) +} + +export default { FetchSyncUser, FetchUserDetailsById, add, edit, del, resetpassword, FetchEditUserState, FetchInitUserList } + diff --git a/src/api/tools/alipay.js b/src/api/tools/alipay.js new file mode 100644 index 0000000..6a10246 --- /dev/null +++ b/src/api/tools/alipay.js @@ -0,0 +1,25 @@ +import request from '@/utils/request' + +export function get() { + return request({ + url: 'api/aliPay', + method: 'get' + }) +} + +export function update(data) { + return request({ + url: 'api/aliPay', + data, + method: 'put' + }) +} + +// 支付 +export function toAliPay(url, data) { + return request({ + url: 'api/' + url, + data, + method: 'post' + }) +} diff --git a/src/api/tools/email.js b/src/api/tools/email.js new file mode 100644 index 0000000..7fb72bf --- /dev/null +++ b/src/api/tools/email.js @@ -0,0 +1,24 @@ +import request from '@/utils/request' + +export function get() { + return request({ + url: 'api/email', + method: 'get' + }) +} + +export function update(data) { + return request({ + url: 'api/email', + data, + method: 'put' + }) +} + +export function send(data) { + return request({ + url: 'api/email', + data, + method: 'post' + }) +} diff --git a/src/api/tools/localStorage.js b/src/api/tools/localStorage.js new file mode 100644 index 0000000..8fce4c2 --- /dev/null +++ b/src/api/tools/localStorage.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function add(data) { + return request({ + url: 'api/localStorage', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/localStorage/', + method: 'delete', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'api/localStorage', + method: 'put', + data + }) +} + +export default { add, edit, del } diff --git a/src/api/tools/qiniu.js b/src/api/tools/qiniu.js new file mode 100644 index 0000000..3d2515c --- /dev/null +++ b/src/api/tools/qiniu.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +export function get() { + return request({ + url: 'api/qiNiuContent/config', + method: 'get' + }) +} + +export function update(data) { + return request({ + url: 'api/qiNiuContent/config', + data, + method: 'put' + }) +} + +export function download(id) { + return request({ + url: 'api/qiNiuContent/download/' + id, + method: 'get' + }) +} + +export function sync() { + return request({ + url: 'api/qiNiuContent/synchronize', + method: 'post' + }) +} + +export function del(ids) { + return request({ + url: 'api/qiNiuContent', + method: 'delete', + data: ids + }) +} + +export default { del, download, sync } diff --git a/src/assets/401_images/401.gif b/src/assets/401_images/401.gif new file mode 100644 index 0000000..cd6e0d9 Binary files /dev/null and b/src/assets/401_images/401.gif differ diff --git a/src/assets/404_images/404.png b/src/assets/404_images/404.png new file mode 100644 index 0000000..3d8e230 Binary files /dev/null and b/src/assets/404_images/404.png differ diff --git a/src/assets/404_images/404_cloud.png b/src/assets/404_images/404_cloud.png new file mode 100644 index 0000000..c6281d0 Binary files /dev/null and b/src/assets/404_images/404_cloud.png differ diff --git a/src/assets/fonts/锐字潮牌可变真言2.0.ttf b/src/assets/fonts/锐字潮牌可变真言2.0.ttf new file mode 100644 index 0000000..624a757 Binary files /dev/null and b/src/assets/fonts/锐字潮牌可变真言2.0.ttf differ diff --git a/src/assets/iconfonts/iconfont.css b/src/assets/iconfonts/iconfont.css new file mode 100644 index 0000000..bac2a5a --- /dev/null +++ b/src/assets/iconfonts/iconfont.css @@ -0,0 +1,291 @@ +@font-face { + font-family: "iconfont"; /* Project id 3409379 */ + src: url('iconfont.woff2?t=1663406583019') format('woff2'), + url('iconfont.woff?t=1663406583019') format('woff'), + url('iconfont.ttf?t=1663406583019') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-danganhezongliang:before { + content: "\e64a"; +} + +.icon-danganzongliang:before { + content: "\e64c"; +} + +.icon-zaijieshuliang:before { + content: "\e638"; +} + +.icon-zaikushuliang:before { + content: "\e649"; +} + +.icon-danganjieyue:before { + content: "\e636"; +} + +.icon-danganleixing:before { + content: "\e637"; +} + +.icon-quanbushebei:before { + content: "\e639"; +} + +.icon-lixianshebei:before { + content: "\e63a"; +} + +.icon-zaixianshebei:before { + content: "\e64b"; +} + +.icon-jiesuan-fanbai:before { + content: "\e648"; +} + +.icon-chuliyichang-fanbai:before { + content: "\e647"; +} + +.icon-fabu-fanbai:before { + content: "\e644"; +} + +.icon-biaojiyidu-fanbai:before { + content: "\e645"; +} + +.icon-shoudongchuli-fanbai:before { + content: "\e646"; +} + +.icon-zhenglishi:before { + content: "\e63c"; +} + +.icon-shebeizhuangtai:before { + content: "\e63d"; +} + +.icon-loushuijiance:before { + content: "\e63e"; +} + +.icon-loushuibaojing:before { + content: "\e63f"; +} + +.icon-loushuiweizhi:before { + content: "\e640"; +} + +.icon-weihubaojing:before { + content: "\e641"; +} + +.icon-kongqizhiliangshuju:before { + content: "\e642"; +} + +.icon-ganyingxianduanlie:before { + content: "\e643"; +} + +.icon-chuku-fanbai:before { + content: "\e63b"; +} + +.icon-a-3Dkufang:before { + content: "\e631"; +} + +.icon-baojingjilu:before { + content: "\e632"; +} + +.icon-menjinjilu:before { + content: "\e633"; +} + +.icon-tongzhigonggao:before { + content: "\e634"; +} + +.icon-xiaoxi:before { + content: "\e635"; +} + +.icon-bangdingcanshu-fanbai:before { + content: "\e61a"; +} + +.icon-chaihe-fanbai:before { + content: "\e61b"; +} + +.icon-bangding-fanbai:before { + content: "\e61c"; +} + +.icon-fenjuanzhuanghe-fanbai:before { + content: "\e61d"; +} + +.icon-jiechubangding-fanbai:before { + content: "\e61e"; +} + +.icon-chehui-fanbai:before { + content: "\e61f"; +} + +.icon-daochu-fanbai:before { + content: "\e620"; +} + +.icon-dengji-fanbai:before { + content: "\e621"; +} + +.icon-tishichenggong:before { + content: "\e622"; +} + +.icon-xiazai-fanbai:before { + content: "\e623"; +} + +.icon-jieyue-fanbai:before { + content: "\e624"; +} + +.icon-tishijinggao:before { + content: "\e625"; +} + +.icon-shuaxin:before { + content: "\e626"; +} + +.icon-guihuan-fanbai:before { + content: "\e627"; +} + +.icon-yichu-fanbai:before { + content: "\e628"; +} + +.icon-shangchuanfujian-fanbai:before { + content: "\e629"; +} + +.icon-ruku-fanbai:before { + content: "\e62a"; +} + +.icon-jiechu-fanbai:before { + content: "\e62b"; +} + +.icon-xinzengpandian-fanbai:before { + content: "\e62c"; +} + +.icon-huanyuan-fanbai:before { + content: "\e62d"; +} + +.icon-fujian:before { + content: "\e62e"; +} + +.icon-zhuanghe--fanbai:before { + content: "\e62f"; +} + +.icon-bangdingshebei-fanbai:before { + content: "\e630"; +} + +.icon-weibiaoti-2:before { + content: "\e619"; +} + +.icon-paixu-fanbai:before { + content: "\e618"; +} + +.icon-rili:before { + content: "\e617"; +} + +.icon-yonghuyouxiang-fanbai:before { + content: "\e616"; +} + +.icon-shoujihaoma-fanbai:before { + content: "\e615"; +} + +.icon-yonghunicheng-fanbai:before { + content: "\e614"; +} + +.icon-anquanshezhi-fanbai:before { + content: "\e613"; +} + +.icon-dengluzhanghao-fanbai:before { + content: "\e612"; +} + +.icon-suoshubumen-fanbai:before { + content: "\e611"; +} + +.icon-zhuangtai-fanbai:before { + content: "\e610"; +} + +.icon-a-zu33:before { + content: "\e60d"; +} + +.icon-a-lujing259:before { + content: "\e60c"; +} + +.icon-shouye5:before { + content: "\e60b"; +} + +.icon-shouye4:before { + content: "\e60a"; +} + +.icon-shouye3:before { + content: "\e609"; +} + +.icon-shouye2:before { + content: "\e608"; +} + +.icon-shouye1:before { + content: "\e607"; +} + +.icon-shouye:before { + content: "\e605"; +} + diff --git a/src/assets/iconfonts/iconfont.js b/src/assets/iconfonts/iconfont.js new file mode 100644 index 0000000..79521ea --- /dev/null +++ b/src/assets/iconfonts/iconfont.js @@ -0,0 +1 @@ +window._iconfont_svg_string_3409379='',function(h){var c=(c=document.getElementsByTagName("script"))[c.length-1],l=c.getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var z,i,a,m,F,v=function(c,l){l.parentNode.insertBefore(c,l)};if(l&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}z=function(){var c,l=document.createElement("div");l.innerHTML=h._iconfont_svg_string_3409379,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(c=document.body).firstChild?v(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(z,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),z()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(a=z,m=h.document,F=!1,o(),m.onreadystatechange=function(){"complete"==m.readyState&&(m.onreadystatechange=null,t())})}function t(){F||(F=!0,a())}function o(){try{m.documentElement.doScroll("left")}catch(c){return void setTimeout(o,50)}t()}}(window); \ No newline at end of file diff --git a/src/assets/iconfonts/iconfont.json b/src/assets/iconfonts/iconfont.json new file mode 100644 index 0000000..53b9e0b --- /dev/null +++ b/src/assets/iconfonts/iconfont.json @@ -0,0 +1,492 @@ +{ + "id": "3409379", + "name": "库房综合管理系统", + "font_family": "iconfont", + "css_prefix_text": "icon-", + "description": "", + "glyphs": [ + { + "icon_id": "31883356", + "name": "档案盒总量", + "font_class": "danganhezongliang", + "unicode": "e64a", + "unicode_decimal": 58954 + }, + { + "icon_id": "31883360", + "name": "档案总量", + "font_class": "danganzongliang", + "unicode": "e64c", + "unicode_decimal": 58956 + }, + { + "icon_id": "31883346", + "name": "在借数量", + "font_class": "zaijieshuliang", + "unicode": "e638", + "unicode_decimal": 58936 + }, + { + "icon_id": "31883347", + "name": "在库数量", + "font_class": "zaikushuliang", + "unicode": "e649", + "unicode_decimal": 58953 + }, + { + "icon_id": "31873467", + "name": "档案借阅", + "font_class": "danganjieyue", + "unicode": "e636", + "unicode_decimal": 58934 + }, + { + "icon_id": "31873468", + "name": "档案类型", + "font_class": "danganleixing", + "unicode": "e637", + "unicode_decimal": 58935 + }, + { + "icon_id": "31873470", + "name": "全部设备", + "font_class": "quanbushebei", + "unicode": "e639", + "unicode_decimal": 58937 + }, + { + "icon_id": "31873471", + "name": "离线设备", + "font_class": "lixianshebei", + "unicode": "e63a", + "unicode_decimal": 58938 + }, + { + "icon_id": "31873474", + "name": "在线设备", + "font_class": "zaixianshebei", + "unicode": "e64b", + "unicode_decimal": 58955 + }, + { + "icon_id": "31085501", + "name": "结算-反白", + "font_class": "jiesuan-fanbai", + "unicode": "e648", + "unicode_decimal": 58952 + }, + { + "icon_id": "31064921", + "name": "处理异常-反白", + "font_class": "chuliyichang-fanbai", + "unicode": "e647", + "unicode_decimal": 58951 + }, + { + "icon_id": "30765497", + "name": "发布-反白", + "font_class": "fabu-fanbai", + "unicode": "e644", + "unicode_decimal": 58948 + }, + { + "icon_id": "30765498", + "name": "标记已读-反白", + "font_class": "biaojiyidu-fanbai", + "unicode": "e645", + "unicode_decimal": 58949 + }, + { + "icon_id": "30765499", + "name": "手动处理-反白", + "font_class": "shoudongchuli-fanbai", + "unicode": "e646", + "unicode_decimal": 58950 + }, + { + "icon_id": "30660167", + "name": "整理室", + "font_class": "zhenglishi", + "unicode": "e63c", + "unicode_decimal": 58940 + }, + { + "icon_id": "30660168", + "name": "设备状态", + "font_class": "shebeizhuangtai", + "unicode": "e63d", + "unicode_decimal": 58941 + }, + { + "icon_id": "30660169", + "name": "漏水检测", + "font_class": "loushuijiance", + "unicode": "e63e", + "unicode_decimal": 58942 + }, + { + "icon_id": "30660170", + "name": "漏水报警", + "font_class": "loushuibaojing", + "unicode": "e63f", + "unicode_decimal": 58943 + }, + { + "icon_id": "30660171", + "name": "漏水位置", + "font_class": "loushuiweizhi", + "unicode": "e640", + "unicode_decimal": 58944 + }, + { + "icon_id": "30660173", + "name": "维护报警", + "font_class": "weihubaojing", + "unicode": "e641", + "unicode_decimal": 58945 + }, + { + "icon_id": "30660174", + "name": "空气质量数据", + "font_class": "kongqizhiliangshuju", + "unicode": "e642", + "unicode_decimal": 58946 + }, + { + "icon_id": "30660264", + "name": "感应线断裂", + "font_class": "ganyingxianduanlie", + "unicode": "e643", + "unicode_decimal": 58947 + }, + { + "icon_id": "30627119", + "name": "出库-反白", + "font_class": "chuku-fanbai", + "unicode": "e63b", + "unicode_decimal": 58939 + }, + { + "icon_id": "30256922", + "name": "3D库房", + "font_class": "a-3Dkufang", + "unicode": "e631", + "unicode_decimal": 58929 + }, + { + "icon_id": "30256923", + "name": "报警记录", + "font_class": "baojingjilu", + "unicode": "e632", + "unicode_decimal": 58930 + }, + { + "icon_id": "30256924", + "name": "门禁记录", + "font_class": "menjinjilu", + "unicode": "e633", + "unicode_decimal": 58931 + }, + { + "icon_id": "30256925", + "name": "通知公告", + "font_class": "tongzhigonggao", + "unicode": "e634", + "unicode_decimal": 58932 + }, + { + "icon_id": "30256926", + "name": "消息", + "font_class": "xiaoxi", + "unicode": "e635", + "unicode_decimal": 58933 + }, + { + "icon_id": "30256625", + "name": "绑定参数-反白", + "font_class": "bangdingcanshu-fanbai", + "unicode": "e61a", + "unicode_decimal": 58906 + }, + { + "icon_id": "30256626", + "name": "拆盒-反白", + "font_class": "chaihe-fanbai", + "unicode": "e61b", + "unicode_decimal": 58907 + }, + { + "icon_id": "30256627", + "name": "绑定参数-反白", + "font_class": "bangding-fanbai", + "unicode": "e61c", + "unicode_decimal": 58908 + }, + { + "icon_id": "30256628", + "name": "分卷装盒-反白", + "font_class": "fenjuanzhuanghe-fanbai", + "unicode": "e61d", + "unicode_decimal": 58909 + }, + { + "icon_id": "30256629", + "name": "解除绑定-反白", + "font_class": "jiechubangding-fanbai", + "unicode": "e61e", + "unicode_decimal": 58910 + }, + { + "icon_id": "30256630", + "name": "撤回-反白", + "font_class": "chehui-fanbai", + "unicode": "e61f", + "unicode_decimal": 58911 + }, + { + "icon_id": "30256631", + "name": "导出-反白", + "font_class": "daochu-fanbai", + "unicode": "e620", + "unicode_decimal": 58912 + }, + { + "icon_id": "30256632", + "name": "登记-反白", + "font_class": "dengji-fanbai", + "unicode": "e621", + "unicode_decimal": 58913 + }, + { + "icon_id": "30256633", + "name": "提示成功", + "font_class": "tishichenggong", + "unicode": "e622", + "unicode_decimal": 58914 + }, + { + "icon_id": "30256634", + "name": "下载-反白", + "font_class": "xiazai-fanbai", + "unicode": "e623", + "unicode_decimal": 58915 + }, + { + "icon_id": "30256635", + "name": "借阅-反白", + "font_class": "jieyue-fanbai", + "unicode": "e624", + "unicode_decimal": 58916 + }, + { + "icon_id": "30256636", + "name": "提示警告", + "font_class": "tishijinggao", + "unicode": "e625", + "unicode_decimal": 58917 + }, + { + "icon_id": "30256637", + "name": "刷新", + "font_class": "shuaxin", + "unicode": "e626", + "unicode_decimal": 58918 + }, + { + "icon_id": "30256638", + "name": "归还-反白", + "font_class": "guihuan-fanbai", + "unicode": "e627", + "unicode_decimal": 58919 + }, + { + "icon_id": "30256639", + "name": "移出-反白", + "font_class": "yichu-fanbai", + "unicode": "e628", + "unicode_decimal": 58920 + }, + { + "icon_id": "30256640", + "name": "上传附件-反白", + "font_class": "shangchuanfujian-fanbai", + "unicode": "e629", + "unicode_decimal": 58921 + }, + { + "icon_id": "30256641", + "name": "入库-反白", + "font_class": "ruku-fanbai", + "unicode": "e62a", + "unicode_decimal": 58922 + }, + { + "icon_id": "30256642", + "name": "借出-反白", + "font_class": "jiechu-fanbai", + "unicode": "e62b", + "unicode_decimal": 58923 + }, + { + "icon_id": "30256643", + "name": "新增盘点-反白", + "font_class": "xinzengpandian-fanbai", + "unicode": "e62c", + "unicode_decimal": 58924 + }, + { + "icon_id": "30256644", + "name": "还原-反白", + "font_class": "huanyuan-fanbai", + "unicode": "e62d", + "unicode_decimal": 58925 + }, + { + "icon_id": "30256645", + "name": "附件", + "font_class": "fujian", + "unicode": "e62e", + "unicode_decimal": 58926 + }, + { + "icon_id": "30256646", + "name": "装盒--反白", + "font_class": "zhuanghe--fanbai", + "unicode": "e62f", + "unicode_decimal": 58927 + }, + { + "icon_id": "30256647", + "name": "绑定设备-反白", + "font_class": "bangdingshebei-fanbai", + "unicode": "e630", + "unicode_decimal": 58928 + }, + { + "icon_id": "30032164", + "name": "更多", + "font_class": "weibiaoti-2", + "unicode": "e619", + "unicode_decimal": 58905 + }, + { + "icon_id": "30000502", + "name": "排序-反白", + "font_class": "paixu-fanbai", + "unicode": "e618", + "unicode_decimal": 58904 + }, + { + "icon_id": "30000487", + "name": "日历", + "font_class": "rili", + "unicode": "e617", + "unicode_decimal": 58903 + }, + { + "icon_id": "29943155", + "name": "用户邮箱-反白", + "font_class": "yonghuyouxiang-fanbai", + "unicode": "e616", + "unicode_decimal": 58902 + }, + { + "icon_id": "29943067", + "name": "手机号码-反白", + "font_class": "shoujihaoma-fanbai", + "unicode": "e615", + "unicode_decimal": 58901 + }, + { + "icon_id": "29943063", + "name": "用户昵称-反白", + "font_class": "yonghunicheng-fanbai", + "unicode": "e614", + "unicode_decimal": 58900 + }, + { + "icon_id": "29943055", + "name": "安全设置-反白", + "font_class": "anquanshezhi-fanbai", + "unicode": "e613", + "unicode_decimal": 58899 + }, + { + "icon_id": "29942791", + "name": "登录账号-反白", + "font_class": "dengluzhanghao-fanbai", + "unicode": "e612", + "unicode_decimal": 58898 + }, + { + "icon_id": "29942549", + "name": "所属部门-反白", + "font_class": "suoshubumen-fanbai", + "unicode": "e611", + "unicode_decimal": 58897 + }, + { + "icon_id": "29932079", + "name": "状态-反白", + "font_class": "zhuangtai-fanbai", + "unicode": "e610", + "unicode_decimal": 58896 + }, + { + "icon_id": "29795508", + "name": "定位", + "font_class": "a-zu33", + "unicode": "e60d", + "unicode_decimal": 58893 + }, + { + "icon_id": "29794660", + "name": "关闭", + "font_class": "a-lujing259", + "unicode": "e60c", + "unicode_decimal": 58892 + }, + { + "icon_id": "29794633", + "name": "系统管理", + "font_class": "shouye5", + "unicode": "e60b", + "unicode_decimal": 58891 + }, + { + "icon_id": "29794580", + "name": "档案配置", + "font_class": "shouye4", + "unicode": "e60a", + "unicode_decimal": 58890 + }, + { + "icon_id": "29794435", + "name": "库房管理", + "font_class": "shouye3", + "unicode": "e609", + "unicode_decimal": 58889 + }, + { + "icon_id": "29794316", + "name": "门类管理", + "font_class": "shouye2", + "unicode": "e608", + "unicode_decimal": 58888 + }, + { + "icon_id": "29794182", + "name": "档案管理", + "font_class": "shouye1", + "unicode": "e607", + "unicode_decimal": 58887 + }, + { + "icon_id": "29793951", + "name": "首页", + "font_class": "shouye", + "unicode": "e605", + "unicode_decimal": 58885 + } + ] +} diff --git a/src/assets/iconfonts/iconfont.ttf b/src/assets/iconfonts/iconfont.ttf new file mode 100644 index 0000000..52a84fe Binary files /dev/null and b/src/assets/iconfonts/iconfont.ttf differ diff --git a/src/assets/iconfonts/iconfont.woff b/src/assets/iconfonts/iconfont.woff new file mode 100644 index 0000000..8082fd8 Binary files /dev/null and b/src/assets/iconfonts/iconfont.woff differ diff --git a/src/assets/iconfonts/iconfont.woff2 b/src/assets/iconfonts/iconfont.woff2 new file mode 100644 index 0000000..60efa93 Binary files /dev/null and b/src/assets/iconfonts/iconfont.woff2 differ diff --git a/src/assets/iconfonts/light/iconfont.css b/src/assets/iconfonts/light/iconfont.css new file mode 100644 index 0000000..612da09 --- /dev/null +++ b/src/assets/iconfonts/light/iconfont.css @@ -0,0 +1,751 @@ +@font-face { + font-family: "iconfont"; /* Project id 3966148 */ + src: url('iconfont.woff2?t=1776390500333') format('woff2'), + url('iconfont.woff?t=1776390500333') format('woff'), + url('iconfont.ttf?t=1776390500333') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-cangku:before { + content: "\e927"; +} + +.icon-baojingjilu:before { + content: "\e6a8"; +} + +.icon-yitiji:before { + content: "\e6a2"; +} + +.icon-kufangguanli:before { + content: "\e6a3"; +} + +.icon-renlianshibiejiqi:before { + content: "\e759"; +} + +.icon-wangluoshexiangtou:before { + content: "\e754"; +} + +.icon-Dkufang:before { + content: "\e6a4"; +} + +.icon-rfidduxieqi:before { + content: "\e879"; +} + +.icon-shouchipandianyi:before { + content: "\e6a5"; +} + +.icon-zhinengyitiji:before { + content: "\e6a6"; +} + +.icon-a-3D-xidingtanceqi:before { + content: "\e6b7"; +} + +.icon-saomiao:before { + content: "\e6a7"; +} + +.icon-mimachakan:before { + content: "\e6a1"; +} + +.icon-d:before { + content: "\e6a0"; +} + +.icon-yooxi:before { + content: "\e69d"; +} + +.icon-heimingdan:before { + content: "\e69f"; +} + +.icon-caidan:before { + content: "\e69c"; +} + +.icon-lanmu1:before { + content: "\e69e"; +} + +.icon-yuzhuceqiye:before { + content: "\e69a"; +} + +.icon-yonghuzhuce:before { + content: "\e69b"; +} + +.icon-shenfen:before { + content: "\e698"; +} + +.icon-shenfenshimingrenzheng:before { + content: "\e699"; +} + +.icon-fuzhichenggong1:before { + content: "\e696"; +} + +.icon-fuzhi:before { + content: "\ec7a"; +} + +.icon-jiantou-sanjiao-shang:before { + content: "\e697"; +} + +.icon-tuoguanhetong:before { + content: "\e694"; +} + +.icon-weituo:before { + content: "\e695"; +} + +.icon-yijiantiquwenzi:before { + content: "\e692"; +} + +.icon-fasong-jiantou:before { + content: "\e9d6"; +} + +.icon-wenjianjiexi:before { + content: "\e82f"; +} + +.icon-shendusikao:before { + content: "\e876"; +} + +.icon-zhongduanjiankong:before { + content: "\e691"; +} + +.icon-lianjieduankai:before { + content: "\e600"; +} + +.icon-stop:before { + content: "\e714"; +} + +.icon-zhuangtai1:before { + content: "\e690"; +} + +.icon-zhuangtai2:before { + content: "\e6bc"; +} + +.icon-biaoqian:before { + content: "\e693"; +} + +.icon-_biaoqian-:before { + content: "\e68f"; +} + +.icon-shuju:before { + content: "\e68e"; +} + +.icon-duolouceng:before { + content: "\e87c"; +} + +.icon-shujia:before { + content: "\e68c"; +} + +.icon-hangzhengquyuguanli:before { + content: "\e68d"; +} + +.icon-quyu1:before { + content: "\e68b"; +} + +.icon-gongsi:before { + content: "\e689"; +} + +.icon-louceng:before { + content: "\e68a"; +} + +.icon-wodeshujia:before { + content: "\e688"; +} + +.icon-ceshi:before { + content: "\e687"; +} + +.icon-yuanchengkongzhi:before { + content: "\e7d4"; +} + +.icon-attachment:before { + content: "\e6a9"; +} + +.icon-zhuti:before { + content: "\e686"; +} + +.icon-gengduo:before { + content: "\e670"; +} + +.icon-huoqu:before { + content: "\e674"; +} + +.icon-dayin:before { + content: "\e67b"; +} + +.icon-guaqi:before { + content: "\e67c"; +} + +.icon-dangantongji:before { + content: "\e685"; +} + +.icon-sulan:before { + content: "\e63b"; +} + +.icon-jiesuan:before { + content: "\e649"; +} + +.icon-rengongqueren:before { + content: "\e659"; +} + +.icon-shengchengpandiandan:before { + content: "\e663"; +} + +.icon-yijiao:before { + content: "\e669"; +} + +.icon-shanchu1:before { + content: "\e66f"; +} + +.icon-jiarujieyueche:before { + content: "\e67d"; +} + +.icon-liuchengfaqi:before { + content: "\e67e"; +} + +.icon-cuowu1:before { + content: "\e67f"; +} + +.icon-danganliyong:before { + content: "\e680"; +} + +.icon-fou:before { + content: "\e681"; +} + +.icon-shi:before { + content: "\e682"; +} + +.icon-dengdai:before { + content: "\e683"; +} + +.icon-jieyueche-ding:before { + content: "\e684"; +} + +.icon-ruku:before { + content: "\e671"; +} + +.icon-yulan:before { + content: "\e672"; +} + +.icon-chuku:before { + content: "\e673"; +} + +.icon-mijijia:before { + content: "\e675"; +} + +.icon-shuaxin:before { + content: "\e676"; +} + +.icon-bangding:before { + content: "\e677"; +} + +.icon-quyu:before { + content: "\e678"; +} + +.icon-shebei:before { + content: "\e679"; +} + +.icon-danganbaoguan-fanbai:before { + content: "\e67a"; +} + +.icon-kufang:before { + content: "\e667"; +} + +.icon-chaihe:before { + content: "\e668"; +} + +.icon-zishebeiguanli:before { + content: "\e66a"; +} + +.icon-zidonggengxin:before { + content: "\e66b"; +} + +.icon-jiebang:before { + content: "\e66c"; +} + +.icon-you-fanbai:before { + content: "\e66d"; +} + +.icon-zuo-fanbai:before { + content: "\e66e"; +} + +.icon-duqu:before { + content: "\e664"; +} + +.icon-chexiao:before { + content: "\e665"; +} + +.icon-zhuanghe:before { + content: "\e666"; +} + +.icon-danganguanli-fanbai:before { + content: "\e662"; +} + +.icon-gengduo2:before { + content: "\e661"; +} + +.icon-gengduo1:before { + content: "\e660"; +} + +.icon-wancheng:before { + content: "\e65f"; +} + +.icon-zhengque:before { + content: "\e653"; +} + +.icon-cuowu:before { + content: "\e654"; +} + +.icon-huifu:before { + content: "\e655"; +} + +.icon-dian2:before { + content: "\e656"; +} + +.icon-dian:before { + content: "\e657"; +} + +.icon-shangchuanchenggong:before { + content: "\e658"; +} + +.icon-shangchuanshibai:before { + content: "\e65a"; +} + +.icon-xiaowenjian:before { + content: "\e65b"; +} + +.icon-bendiguajie:before { + content: "\e65c"; +} + +.icon-zhongxinjiance:before { + content: "\e65d"; +} + +.icon-tianjiawenjian:before { + content: "\e65e"; +} + +.icon-shangchuan2:before { + content: "\e650"; +} + +.icon-a-1:before { + content: "\e64f"; +} + +.icon-a-2:before { + content: "\e651"; +} + +.icon-xiazai:before { + content: "\e652"; +} + +.icon-zhengli:before { + content: "\e64e"; +} + +.icon-changgui:before { + content: "\e64d"; +} + +.icon-yuguidangku:before { + content: "\e64b"; +} + +.icon-shoujizhengbian:before { + content: "\e64c"; +} + +.icon-yidong:before { + content: "\e645"; +} + +.icon-piliangchengjian:before { + content: "\e646"; +} + +.icon-hebingchengjian:before { + content: "\e647"; +} + +.icon-danganfenlei:before { + content: "\e648"; +} + +.icon-fenlei:before { + content: "\e64a"; +} + +.icon-tupianyulan:before { + content: "\e644"; +} + +.icon-fabu:before { + content: "\e643"; +} + +.icon-jihuo:before { + content: "\e63d"; +} + +.icon-xiala-shouqi:before { + content: "\e63e"; +} + +.icon-xiala-chakanxinxi:before { + content: "\e63f"; +} + +.icon-chakan:before { + content: "\e640"; +} + +.icon-jiazaigengduo:before { + content: "\e641"; +} + +.icon-quanbuyidu:before { + content: "\e642"; +} + +.icon-shangchuan:before { + content: "\e62b"; +} + +.icon-yonghuyouxiang:before { + content: "\e635"; +} + +.icon-yonghuming:before { + content: "\e636"; +} + +.icon-suoshubumen:before { + content: "\e637"; +} + +.icon-suoshuquanzong:before { + content: "\e638"; +} + +.icon-shoujihaoma:before { + content: "\e639"; +} + +.icon-yonghujiaose:before { + content: "\e63a"; +} + +.icon-xingbie:before { + content: "\e63c"; +} + +.icon-dianzibiao:before { + content: "\e623"; +} + +.icon-yonghuguanli:before { + content: "\e624"; +} + +.icon-danganjieshou:before { + content: "\e625"; +} + +.icon-xitongshezhi2:before { + content: "\e626"; +} + +.icon-danganguanli:before { + content: "\e627"; +} + +.icon-yucundangguanli:before { + content: "\e628"; +} + +.icon-paixu-xia:before { + content: "\e629"; +} + +.icon-paixu-caozuo:before { + content: "\e62a"; +} + +.icon-paixu-shang:before { + content: "\e62c"; +} + +.icon-xinzeng:before { + content: "\e62d"; +} + +.icon-bianji:before { + content: "\e62e"; +} + +.icon-shezhi:before { + content: "\e62f"; +} + +.icon-kuaisushezhi:before { + content: "\e630"; +} + +.icon-shanchu:before { + content: "\e631"; +} + +.icon-paixu:before { + content: "\e632"; +} + +.icon-daochu:before { + content: "\e633"; +} + +.icon-zhongzhi2:before { + content: "\e634"; +} + +.icon-rili:before { + content: "\e604"; +} + +.icon-shouye:before { + content: "\e605"; +} + +.icon-xitongshezhi:before { + content: "\e606"; +} + +.icon-shouqi:before { + content: "\e607"; +} + +.icon-xiala-fanbai:before { + content: "\e608"; +} + +.icon-xiala:before { + content: "\e609"; +} + +.icon-zhuangtai:before { + content: "\e60a"; +} + +.icon-xiaoxi:before { + content: "\e60b"; +} + +.icon-zhongzhi:before { + content: "\e60c"; +} + +.icon-xiala-xia:before { + content: "\e60d"; +} + +.icon-xiala-you:before { + content: "\e60e"; +} + +.icon-xiala-shang:before { + content: "\e60f"; +} + +.icon-kuangxuan-jinyong2:before { + content: "\e610"; +} + +.icon-kuangxuan-xuanze:before { + content: "\e611"; +} + +.icon-kuangxuan-moren:before { + content: "\e612"; +} + +.icon-kuangxuan-jinyong1:before { + content: "\e613"; +} + +.icon-weizhi-copy:before { + content: "\e7d5"; +} + +.icon-xuanzhong:before { + content: "\e614"; +} + +.icon-weixuan:before { + content: "\e615"; +} + +.icon-sousuo:before { + content: "\e616"; +} + +.icon-guan:before { + content: "\e617"; +} + +.icon-kai:before { + content: "\e618"; +} + +.icon-weizhi:before { + content: "\e619"; +} + +.icon-biaoji:before { + content: "\e61a"; +} + +.icon-guanbixiao:before { + content: "\e61b"; +} + +.icon-guanbi:before { + content: "\e61c"; +} + +.icon-zhuyi-hong:before { + content: "\e61d"; +} + +.icon-zhuyi-lan:before { + content: "\e61e"; +} + +.icon-zhuyi-hong-xiao:before { + content: "\e61f"; +} + +.icon-wenjian-xiao:before { + content: "\e620"; +} + +.icon-wenjian-da:before { + content: "\e621"; +} + +.icon-dangan:before { + content: "\e622"; +} + +.icon-yanzhengma:before { + content: "\e602"; +} + +.icon-mima:before { + content: "\e603"; +} + +.icon-zhanghao:before { + content: "\e601"; +} + diff --git a/src/assets/iconfonts/light/iconfont.js b/src/assets/iconfonts/light/iconfont.js new file mode 100644 index 0000000..1a260e6 --- /dev/null +++ b/src/assets/iconfonts/light/iconfont.js @@ -0,0 +1 @@ +window._iconfont_svg_string_3966148='',(l=>{var c=(a=(a=document.getElementsByTagName("script"))[a.length-1]).getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,i,o,t,z,v=function(c,a){a.parentNode.insertBefore(c,a)};if(c&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}h=function(){var c,a=document.createElement("div");a.innerHTML=l._iconfont_svg_string_3966148,(a=a.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",a=a,(c=document.body).firstChild?v(a,c.firstChild):c.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,t=l.document,z=!1,p(),t.onreadystatechange=function(){"complete"==t.readyState&&(t.onreadystatechange=null,s())})}function s(){z||(z=!0,o())}function p(){try{t.documentElement.doScroll("left")}catch(c){return void setTimeout(p,50)}s()}})(window); \ No newline at end of file diff --git a/src/assets/iconfonts/light/iconfont.json b/src/assets/iconfonts/light/iconfont.json new file mode 100644 index 0000000..19c6569 --- /dev/null +++ b/src/assets/iconfonts/light/iconfont.json @@ -0,0 +1,1297 @@ +{ + "id": "3966148", + "name": "阅行客-电子档案管理xit", + "font_family": "iconfont", + "css_prefix_text": "icon-", + "description": "", + "glyphs": [ + { + "icon_id": "44433330", + "name": "仓库", + "font_class": "cangku", + "unicode": "e927", + "unicode_decimal": 59687 + }, + { + "icon_id": "30256923", + "name": "报警记录", + "font_class": "baojingjilu", + "unicode": "e6a8", + "unicode_decimal": 59048 + }, + { + "icon_id": "79099", + "name": "一体机", + "font_class": "yitiji", + "unicode": "e6a2", + "unicode_decimal": 59042 + }, + { + "icon_id": "6296998", + "name": "库房管理", + "font_class": "kufangguanli", + "unicode": "e6a3", + "unicode_decimal": 59043 + }, + { + "icon_id": "8434614", + "name": "人脸识别机器", + "font_class": "renlianshibiejiqi", + "unicode": "e759", + "unicode_decimal": 59225 + }, + { + "icon_id": "9437011", + "name": "网络摄像头", + "font_class": "wangluoshexiangtou", + "unicode": "e754", + "unicode_decimal": 59220 + }, + { + "icon_id": "11661938", + "name": "3D库房", + "font_class": "Dkufang", + "unicode": "e6a4", + "unicode_decimal": 59044 + }, + { + "icon_id": "19373677", + "name": "rfid读写器", + "font_class": "rfidduxieqi", + "unicode": "e879", + "unicode_decimal": 59513 + }, + { + "icon_id": "31422233", + "name": "手持盘点仪", + "font_class": "shouchipandianyi", + "unicode": "e6a5", + "unicode_decimal": 59045 + }, + { + "icon_id": "36973886", + "name": "智能一体机", + "font_class": "zhinengyitiji", + "unicode": "e6a6", + "unicode_decimal": 59046 + }, + { + "icon_id": "40950858", + "name": "3D-吸顶探测器", + "font_class": "a-3D-xidingtanceqi", + "unicode": "e6b7", + "unicode_decimal": 59063 + }, + { + "icon_id": "43488473", + "name": "吸顶式盘点设备", + "font_class": "saomiao", + "unicode": "e6a7", + "unicode_decimal": 59047 + }, + { + "icon_id": "26584955", + "name": "密码查看", + "font_class": "mimachakan", + "unicode": "e6a1", + "unicode_decimal": 59041 + }, + { + "icon_id": "13302910", + "name": "3d", + "font_class": "d", + "unicode": "e6a0", + "unicode_decimal": 59040 + }, + { + "icon_id": "778898", + "name": "vip", + "font_class": "yooxi", + "unicode": "e69d", + "unicode_decimal": 59037 + }, + { + "icon_id": "9826652", + "name": "黑名单", + "font_class": "heimingdan", + "unicode": "e69f", + "unicode_decimal": 59039 + }, + { + "icon_id": "4438260", + "name": "菜单", + "font_class": "caidan", + "unicode": "e69c", + "unicode_decimal": 59036 + }, + { + "icon_id": "29778608", + "name": "栏目", + "font_class": "lanmu1", + "unicode": "e69e", + "unicode_decimal": 59038 + }, + { + "icon_id": "704557", + "name": "预注册企业", + "font_class": "yuzhuceqiye", + "unicode": "e69a", + "unicode_decimal": 59034 + }, + { + "icon_id": "5651535", + "name": "用户注册", + "font_class": "yonghuzhuce", + "unicode": "e69b", + "unicode_decimal": 59035 + }, + { + "icon_id": "6421901", + "name": "身份", + "font_class": "shenfen", + "unicode": "e698", + "unicode_decimal": 59032 + }, + { + "icon_id": "22785279", + "name": "身份实名认证", + "font_class": "shenfenshimingrenzheng", + "unicode": "e699", + "unicode_decimal": 59033 + }, + { + "icon_id": "40338657", + "name": "复制成功-copy", + "font_class": "fuzhichenggong1", + "unicode": "e696", + "unicode_decimal": 59030 + }, + { + "icon_id": "5993150", + "name": "复制", + "font_class": "fuzhi", + "unicode": "ec7a", + "unicode_decimal": 60538 + }, + { + "icon_id": "10943054", + "name": "箭头-三角-上", + "font_class": "jiantou-sanjiao-shang", + "unicode": "e697", + "unicode_decimal": 59031 + }, + { + "icon_id": "13091314", + "name": "托管合同", + "font_class": "tuoguanhetong", + "unicode": "e694", + "unicode_decimal": 59028 + }, + { + "icon_id": "16327703", + "name": "委托", + "font_class": "weituo", + "unicode": "e695", + "unicode_decimal": 59029 + }, + { + "icon_id": "42551369", + "name": "一键提取文字", + "font_class": "yijiantiquwenzi", + "unicode": "e692", + "unicode_decimal": 59026 + }, + { + "icon_id": "41794940", + "name": "发送-箭头", + "font_class": "fasong-jiantou", + "unicode": "e9d6", + "unicode_decimal": 59862 + }, + { + "icon_id": "40591561", + "name": "文件解析", + "font_class": "wenjianjiexi", + "unicode": "e82f", + "unicode_decimal": 59439 + }, + { + "icon_id": "43375318", + "name": "深度思考", + "font_class": "shendusikao", + "unicode": "e876", + "unicode_decimal": 59510 + }, + { + "icon_id": "18610501", + "name": "终端监控", + "font_class": "zhongduanjiankong", + "unicode": "e691", + "unicode_decimal": 59025 + }, + { + "icon_id": "10596948", + "name": "链接断开", + "font_class": "lianjieduankai", + "unicode": "e600", + "unicode_decimal": 58880 + }, + { + "icon_id": "10014347", + "name": "终止", + "font_class": "stop", + "unicode": "e714", + "unicode_decimal": 59156 + }, + { + "icon_id": "13446589", + "name": "状态", + "font_class": "zhuangtai1", + "unicode": "e690", + "unicode_decimal": 59024 + }, + { + "icon_id": "18916458", + "name": "状态", + "font_class": "zhuangtai2", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "4487893", + "name": "标签", + "font_class": "biaoqian", + "unicode": "e693", + "unicode_decimal": 59027 + }, + { + "icon_id": "6796688", + "name": "2_标签-06", + "font_class": "_biaoqian-", + "unicode": "e68f", + "unicode_decimal": 59023 + }, + { + "icon_id": "15392667", + "name": "数据", + "font_class": "shuju", + "unicode": "e68e", + "unicode_decimal": 59022 + }, + { + "icon_id": "10767710", + "name": "多楼层", + "font_class": "duolouceng", + "unicode": "e87c", + "unicode_decimal": 59516 + }, + { + "icon_id": "16328040", + "name": "书架", + "font_class": "shujia", + "unicode": "e68c", + "unicode_decimal": 59020 + }, + { + "icon_id": "23855671", + "name": "行政区域管理", + "font_class": "hangzhengquyuguanli", + "unicode": "e68d", + "unicode_decimal": 59021 + }, + { + "icon_id": "24272021", + "name": "区域", + "font_class": "quyu1", + "unicode": "e68b", + "unicode_decimal": 59019 + }, + { + "icon_id": "6901606", + "name": "公司", + "font_class": "gongsi", + "unicode": "e689", + "unicode_decimal": 59017 + }, + { + "icon_id": "7032903", + "name": "楼层", + "font_class": "louceng", + "unicode": "e68a", + "unicode_decimal": 59018 + }, + { + "icon_id": "15085894", + "name": "我的书架", + "font_class": "wodeshujia", + "unicode": "e688", + "unicode_decimal": 59016 + }, + { + "icon_id": "18585490", + "name": "数据测试名称", + "font_class": "ceshi", + "unicode": "e687", + "unicode_decimal": 59015 + }, + { + "icon_id": "30849212", + "name": "远程控制", + "font_class": "yuanchengkongzhi", + "unicode": "e7d4", + "unicode_decimal": 59348 + }, + { + "icon_id": "265327", + "name": "附件", + "font_class": "attachment", + "unicode": "e6a9", + "unicode_decimal": 59049 + }, + { + "icon_id": "1263393", + "name": "主题", + "font_class": "zhuti", + "unicode": "e686", + "unicode_decimal": 59014 + }, + { + "icon_id": "38782218", + "name": "更多", + "font_class": "gengduo", + "unicode": "e670", + "unicode_decimal": 58992 + }, + { + "icon_id": "38782217", + "name": "获取", + "font_class": "huoqu", + "unicode": "e674", + "unicode_decimal": 58996 + }, + { + "icon_id": "38782216", + "name": "打印", + "font_class": "dayin", + "unicode": "e67b", + "unicode_decimal": 59003 + }, + { + "icon_id": "38782215", + "name": "挂起", + "font_class": "guaqi", + "unicode": "e67c", + "unicode_decimal": 59004 + }, + { + "icon_id": "38782214", + "name": "档案统计", + "font_class": "dangantongji", + "unicode": "e685", + "unicode_decimal": 59013 + }, + { + "icon_id": "38782220", + "name": "速览", + "font_class": "sulan", + "unicode": "e63b", + "unicode_decimal": 58939 + }, + { + "icon_id": "38782223", + "name": "结算", + "font_class": "jiesuan", + "unicode": "e649", + "unicode_decimal": 58953 + }, + { + "icon_id": "38782224", + "name": "人工确认", + "font_class": "rengongqueren", + "unicode": "e659", + "unicode_decimal": 58969 + }, + { + "icon_id": "38782222", + "name": "生成盘点单", + "font_class": "shengchengpandiandan", + "unicode": "e663", + "unicode_decimal": 58979 + }, + { + "icon_id": "38782221", + "name": "移交", + "font_class": "yijiao", + "unicode": "e669", + "unicode_decimal": 58985 + }, + { + "icon_id": "38782219", + "name": "删除", + "font_class": "shanchu1", + "unicode": "e66f", + "unicode_decimal": 58991 + }, + { + "icon_id": "38402334", + "name": "加入借阅车", + "font_class": "jiarujieyueche", + "unicode": "e67d", + "unicode_decimal": 59005 + }, + { + "icon_id": "38402333", + "name": "流程发起", + "font_class": "liuchengfaqi", + "unicode": "e67e", + "unicode_decimal": 59006 + }, + { + "icon_id": "38402329", + "name": "错误", + "font_class": "cuowu1", + "unicode": "e67f", + "unicode_decimal": 59007 + }, + { + "icon_id": "38402332", + "name": "档案利用", + "font_class": "danganliyong", + "unicode": "e680", + "unicode_decimal": 59008 + }, + { + "icon_id": "38402331", + "name": "否", + "font_class": "fou", + "unicode": "e681", + "unicode_decimal": 59009 + }, + { + "icon_id": "38402327", + "name": "是", + "font_class": "shi", + "unicode": "e682", + "unicode_decimal": 59010 + }, + { + "icon_id": "38402328", + "name": "等待", + "font_class": "dengdai", + "unicode": "e683", + "unicode_decimal": 59011 + }, + { + "icon_id": "38402330", + "name": "借阅车-顶", + "font_class": "jieyueche-ding", + "unicode": "e684", + "unicode_decimal": 59012 + }, + { + "icon_id": "37827791", + "name": "入库", + "font_class": "ruku", + "unicode": "e671", + "unicode_decimal": 58993 + }, + { + "icon_id": "37827792", + "name": "预览", + "font_class": "yulan", + "unicode": "e672", + "unicode_decimal": 58994 + }, + { + "icon_id": "37827785", + "name": "出库", + "font_class": "chuku", + "unicode": "e673", + "unicode_decimal": 58995 + }, + { + "icon_id": "37827788", + "name": "密集架", + "font_class": "mijijia", + "unicode": "e675", + "unicode_decimal": 58997 + }, + { + "icon_id": "37827787", + "name": "刷新", + "font_class": "shuaxin", + "unicode": "e676", + "unicode_decimal": 58998 + }, + { + "icon_id": "37827786", + "name": "绑定", + "font_class": "bangding", + "unicode": "e677", + "unicode_decimal": 58999 + }, + { + "icon_id": "37827783", + "name": "区域", + "font_class": "quyu", + "unicode": "e678", + "unicode_decimal": 59000 + }, + { + "icon_id": "37827784", + "name": "设备", + "font_class": "shebei", + "unicode": "e679", + "unicode_decimal": 59001 + }, + { + "icon_id": "37827782", + "name": "档案保管-反白", + "font_class": "danganbaoguan-fanbai", + "unicode": "e67a", + "unicode_decimal": 59002 + }, + { + "icon_id": "37827801", + "name": "库房", + "font_class": "kufang", + "unicode": "e667", + "unicode_decimal": 58983 + }, + { + "icon_id": "37827795", + "name": "拆盒", + "font_class": "chaihe", + "unicode": "e668", + "unicode_decimal": 58984 + }, + { + "icon_id": "37827800", + "name": "子设备管理", + "font_class": "zishebeiguanli", + "unicode": "e66a", + "unicode_decimal": 58986 + }, + { + "icon_id": "37827797", + "name": "自动更新", + "font_class": "zidonggengxin", + "unicode": "e66b", + "unicode_decimal": 58987 + }, + { + "icon_id": "37827798", + "name": "解绑", + "font_class": "jiebang", + "unicode": "e66c", + "unicode_decimal": 58988 + }, + { + "icon_id": "37827790", + "name": "右-反白", + "font_class": "you-fanbai", + "unicode": "e66d", + "unicode_decimal": 58989 + }, + { + "icon_id": "37827793", + "name": "左-反白", + "font_class": "zuo-fanbai", + "unicode": "e66e", + "unicode_decimal": 58990 + }, + { + "icon_id": "37827672", + "name": "读取", + "font_class": "duqu", + "unicode": "e664", + "unicode_decimal": 58980 + }, + { + "icon_id": "37827670", + "name": "撤销", + "font_class": "chexiao", + "unicode": "e665", + "unicode_decimal": 58981 + }, + { + "icon_id": "37827669", + "name": "装盒", + "font_class": "zhuanghe", + "unicode": "e666", + "unicode_decimal": 58982 + }, + { + "icon_id": "37827673", + "name": "档案管理-反白", + "font_class": "danganguanli-fanbai", + "unicode": "e662", + "unicode_decimal": 58978 + }, + { + "icon_id": "37728696", + "name": "更多", + "font_class": "gengduo2", + "unicode": "e661", + "unicode_decimal": 58977 + }, + { + "icon_id": "37728681", + "name": "更多", + "font_class": "gengduo1", + "unicode": "e660", + "unicode_decimal": 58976 + }, + { + "icon_id": "36940610", + "name": "完成", + "font_class": "wancheng", + "unicode": "e65f", + "unicode_decimal": 58975 + }, + { + "icon_id": "35809396", + "name": "正确", + "font_class": "zhengque", + "unicode": "e653", + "unicode_decimal": 58963 + }, + { + "icon_id": "35809397", + "name": "错误", + "font_class": "cuowu", + "unicode": "e654", + "unicode_decimal": 58964 + }, + { + "icon_id": "35809398", + "name": "恢复", + "font_class": "huifu", + "unicode": "e655", + "unicode_decimal": 58965 + }, + { + "icon_id": "35809399", + "name": "点2", + "font_class": "dian2", + "unicode": "e656", + "unicode_decimal": 58966 + }, + { + "icon_id": "35809400", + "name": "点", + "font_class": "dian", + "unicode": "e657", + "unicode_decimal": 58967 + }, + { + "icon_id": "35809401", + "name": "上传成功", + "font_class": "shangchuanchenggong", + "unicode": "e658", + "unicode_decimal": 58968 + }, + { + "icon_id": "35809403", + "name": "上传失败", + "font_class": "shangchuanshibai", + "unicode": "e65a", + "unicode_decimal": 58970 + }, + { + "icon_id": "35809404", + "name": "小文件", + "font_class": "xiaowenjian", + "unicode": "e65b", + "unicode_decimal": 58971 + }, + { + "icon_id": "35809405", + "name": "本地挂接", + "font_class": "bendiguajie", + "unicode": "e65c", + "unicode_decimal": 58972 + }, + { + "icon_id": "35809406", + "name": "重新检测", + "font_class": "zhongxinjiance", + "unicode": "e65d", + "unicode_decimal": 58973 + }, + { + "icon_id": "35809407", + "name": "添加文件", + "font_class": "tianjiawenjian", + "unicode": "e65e", + "unicode_decimal": 58974 + }, + { + "icon_id": "35809370", + "name": "上传2", + "font_class": "shangchuan2", + "unicode": "e650", + "unicode_decimal": 58960 + }, + { + "icon_id": "35809352", + "name": "1", + "font_class": "a-1", + "unicode": "e64f", + "unicode_decimal": 58959 + }, + { + "icon_id": "35809354", + "name": "2", + "font_class": "a-2", + "unicode": "e651", + "unicode_decimal": 58961 + }, + { + "icon_id": "35809355", + "name": "下载", + "font_class": "xiazai", + "unicode": "e652", + "unicode_decimal": 58962 + }, + { + "icon_id": "35809307", + "name": "整理", + "font_class": "zhengli", + "unicode": "e64e", + "unicode_decimal": 58958 + }, + { + "icon_id": "35809305", + "name": "常规", + "font_class": "changgui", + "unicode": "e64d", + "unicode_decimal": 58957 + }, + { + "icon_id": "35809299", + "name": "预归档库", + "font_class": "yuguidangku", + "unicode": "e64b", + "unicode_decimal": 58955 + }, + { + "icon_id": "35809300", + "name": "收集整编", + "font_class": "shoujizhengbian", + "unicode": "e64c", + "unicode_decimal": 58956 + }, + { + "icon_id": "35808830", + "name": "移动", + "font_class": "yidong", + "unicode": "e645", + "unicode_decimal": 58949 + }, + { + "icon_id": "35808831", + "name": "批量成件", + "font_class": "piliangchengjian", + "unicode": "e646", + "unicode_decimal": 58950 + }, + { + "icon_id": "35808833", + "name": "合并成件", + "font_class": "hebingchengjian", + "unicode": "e647", + "unicode_decimal": 58951 + }, + { + "icon_id": "35808942", + "name": "档案分类", + "font_class": "danganfenlei", + "unicode": "e648", + "unicode_decimal": 58952 + }, + { + "icon_id": "35808945", + "name": "分类", + "font_class": "fenlei", + "unicode": "e64a", + "unicode_decimal": 58954 + }, + { + "icon_id": "35165878", + "name": "图片预览", + "font_class": "tupianyulan", + "unicode": "e644", + "unicode_decimal": 58948 + }, + { + "icon_id": "35119672", + "name": "发布", + "font_class": "fabu", + "unicode": "e643", + "unicode_decimal": 58947 + }, + { + "icon_id": "35004712", + "name": "激活", + "font_class": "jihuo", + "unicode": "e63d", + "unicode_decimal": 58941 + }, + { + "icon_id": "35004753", + "name": "下拉-收起", + "font_class": "xiala-shouqi", + "unicode": "e63e", + "unicode_decimal": 58942 + }, + { + "icon_id": "35004754", + "name": "下拉-查看信息", + "font_class": "xiala-chakanxinxi", + "unicode": "e63f", + "unicode_decimal": 58943 + }, + { + "icon_id": "35004755", + "name": "查看", + "font_class": "chakan", + "unicode": "e640", + "unicode_decimal": 58944 + }, + { + "icon_id": "35004756", + "name": "加载更多", + "font_class": "jiazaigengduo", + "unicode": "e641", + "unicode_decimal": 58945 + }, + { + "icon_id": "35004757", + "name": "全部已读", + "font_class": "quanbuyidu", + "unicode": "e642", + "unicode_decimal": 58946 + }, + { + "icon_id": "35004555", + "name": "上传", + "font_class": "shangchuan", + "unicode": "e62b", + "unicode_decimal": 58923 + }, + { + "icon_id": "35004562", + "name": "用户邮箱", + "font_class": "yonghuyouxiang", + "unicode": "e635", + "unicode_decimal": 58933 + }, + { + "icon_id": "35004563", + "name": "用户名", + "font_class": "yonghuming", + "unicode": "e636", + "unicode_decimal": 58934 + }, + { + "icon_id": "35004564", + "name": "所属部门", + "font_class": "suoshubumen", + "unicode": "e637", + "unicode_decimal": 58935 + }, + { + "icon_id": "35004565", + "name": "所属全宗", + "font_class": "suoshuquanzong", + "unicode": "e638", + "unicode_decimal": 58936 + }, + { + "icon_id": "35004566", + "name": "手机号码", + "font_class": "shoujihaoma", + "unicode": "e639", + "unicode_decimal": 58937 + }, + { + "icon_id": "35004567", + "name": "用户角色", + "font_class": "yonghujiaose", + "unicode": "e63a", + "unicode_decimal": 58938 + }, + { + "icon_id": "35004569", + "name": "性别", + "font_class": "xingbie", + "unicode": "e63c", + "unicode_decimal": 58940 + }, + { + "icon_id": "34690983", + "name": "电子表", + "font_class": "dianzibiao", + "unicode": "e623", + "unicode_decimal": 58915 + }, + { + "icon_id": "34690999", + "name": "用户管理", + "font_class": "yonghuguanli", + "unicode": "e624", + "unicode_decimal": 58916 + }, + { + "icon_id": "34691000", + "name": "档案接收", + "font_class": "danganjieshou", + "unicode": "e625", + "unicode_decimal": 58917 + }, + { + "icon_id": "34691001", + "name": "系统设置2", + "font_class": "xitongshezhi2", + "unicode": "e626", + "unicode_decimal": 58918 + }, + { + "icon_id": "34691002", + "name": "档案管理", + "font_class": "danganguanli", + "unicode": "e627", + "unicode_decimal": 58919 + }, + { + "icon_id": "34691003", + "name": "预存档管理", + "font_class": "yucundangguanli", + "unicode": "e628", + "unicode_decimal": 58920 + }, + { + "icon_id": "34691008", + "name": "排序-下", + "font_class": "paixu-xia", + "unicode": "e629", + "unicode_decimal": 58921 + }, + { + "icon_id": "34691009", + "name": "排序-操作", + "font_class": "paixu-caozuo", + "unicode": "e62a", + "unicode_decimal": 58922 + }, + { + "icon_id": "34691011", + "name": "排序-上", + "font_class": "paixu-shang", + "unicode": "e62c", + "unicode_decimal": 58924 + }, + { + "icon_id": "34691028", + "name": "新增", + "font_class": "xinzeng", + "unicode": "e62d", + "unicode_decimal": 58925 + }, + { + "icon_id": "34691029", + "name": "编辑", + "font_class": "bianji", + "unicode": "e62e", + "unicode_decimal": 58926 + }, + { + "icon_id": "34691030", + "name": "设置", + "font_class": "shezhi", + "unicode": "e62f", + "unicode_decimal": 58927 + }, + { + "icon_id": "34691031", + "name": "快速设置", + "font_class": "kuaisushezhi", + "unicode": "e630", + "unicode_decimal": 58928 + }, + { + "icon_id": "34691032", + "name": "删除", + "font_class": "shanchu", + "unicode": "e631", + "unicode_decimal": 58929 + }, + { + "icon_id": "34691039", + "name": "排序", + "font_class": "paixu", + "unicode": "e632", + "unicode_decimal": 58930 + }, + { + "icon_id": "34691040", + "name": "导出", + "font_class": "daochu", + "unicode": "e633", + "unicode_decimal": 58931 + }, + { + "icon_id": "34691041", + "name": "重置2", + "font_class": "zhongzhi2", + "unicode": "e634", + "unicode_decimal": 58932 + }, + { + "icon_id": "34690517", + "name": "日历", + "font_class": "rili", + "unicode": "e604", + "unicode_decimal": 58884 + }, + { + "icon_id": "34690518", + "name": "首页", + "font_class": "shouye", + "unicode": "e605", + "unicode_decimal": 58885 + }, + { + "icon_id": "34690519", + "name": "系统设置", + "font_class": "xitongshezhi", + "unicode": "e606", + "unicode_decimal": 58886 + }, + { + "icon_id": "34690520", + "name": "收起", + "font_class": "shouqi", + "unicode": "e607", + "unicode_decimal": 58887 + }, + { + "icon_id": "34690528", + "name": "下拉-反白", + "font_class": "xiala-fanbai", + "unicode": "e608", + "unicode_decimal": 58888 + }, + { + "icon_id": "34690529", + "name": "下拉", + "font_class": "xiala", + "unicode": "e609", + "unicode_decimal": 58889 + }, + { + "icon_id": "34690630", + "name": "状态", + "font_class": "zhuangtai", + "unicode": "e60a", + "unicode_decimal": 58890 + }, + { + "icon_id": "34690643", + "name": "消息", + "font_class": "xiaoxi", + "unicode": "e60b", + "unicode_decimal": 58891 + }, + { + "icon_id": "34690803", + "name": "重置", + "font_class": "zhongzhi", + "unicode": "e60c", + "unicode_decimal": 58892 + }, + { + "icon_id": "34690892", + "name": "下拉-下", + "font_class": "xiala-xia", + "unicode": "e60d", + "unicode_decimal": 58893 + }, + { + "icon_id": "34690893", + "name": "下拉-右", + "font_class": "xiala-you", + "unicode": "e60e", + "unicode_decimal": 58894 + }, + { + "icon_id": "34690894", + "name": "下拉-上", + "font_class": "xiala-shang", + "unicode": "e60f", + "unicode_decimal": 58895 + }, + { + "icon_id": "34690907", + "name": "框选-禁用2", + "font_class": "kuangxuan-jinyong2", + "unicode": "e610", + "unicode_decimal": 58896 + }, + { + "icon_id": "34690908", + "name": "框选-选择", + "font_class": "kuangxuan-xuanze", + "unicode": "e611", + "unicode_decimal": 58897 + }, + { + "icon_id": "34690909", + "name": "框选-默认", + "font_class": "kuangxuan-moren", + "unicode": "e612", + "unicode_decimal": 58898 + }, + { + "icon_id": "34690910", + "name": "框选-禁用1", + "font_class": "kuangxuan-jinyong1", + "unicode": "e613", + "unicode_decimal": 58899 + }, + { + "icon_id": "40682301", + "name": "位置-copy", + "font_class": "weizhi-copy", + "unicode": "e7d5", + "unicode_decimal": 59349 + }, + { + "icon_id": "34690923", + "name": "选中", + "font_class": "xuanzhong", + "unicode": "e614", + "unicode_decimal": 58900 + }, + { + "icon_id": "34690924", + "name": "未选", + "font_class": "weixuan", + "unicode": "e615", + "unicode_decimal": 58901 + }, + { + "icon_id": "34690925", + "name": "搜索", + "font_class": "sousuo", + "unicode": "e616", + "unicode_decimal": 58902 + }, + { + "icon_id": "34690926", + "name": "关", + "font_class": "guan", + "unicode": "e617", + "unicode_decimal": 58903 + }, + { + "icon_id": "34690927", + "name": "开", + "font_class": "kai", + "unicode": "e618", + "unicode_decimal": 58904 + }, + { + "icon_id": "34690928", + "name": "位置", + "font_class": "weizhi", + "unicode": "e619", + "unicode_decimal": 58905 + }, + { + "icon_id": "34690929", + "name": "标记", + "font_class": "biaoji", + "unicode": "e61a", + "unicode_decimal": 58906 + }, + { + "icon_id": "34690932", + "name": "关闭小", + "font_class": "guanbixiao", + "unicode": "e61b", + "unicode_decimal": 58907 + }, + { + "icon_id": "34690934", + "name": "关闭", + "font_class": "guanbi", + "unicode": "e61c", + "unicode_decimal": 58908 + }, + { + "icon_id": "34690941", + "name": "注意-红", + "font_class": "zhuyi-hong", + "unicode": "e61d", + "unicode_decimal": 58909 + }, + { + "icon_id": "34690942", + "name": "注意-蓝", + "font_class": "zhuyi-lan", + "unicode": "e61e", + "unicode_decimal": 58910 + }, + { + "icon_id": "34690943", + "name": "注意-红-小", + "font_class": "zhuyi-hong-xiao", + "unicode": "e61f", + "unicode_decimal": 58911 + }, + { + "icon_id": "34690966", + "name": "文件-小", + "font_class": "wenjian-xiao", + "unicode": "e620", + "unicode_decimal": 58912 + }, + { + "icon_id": "34690970", + "name": "文件-大", + "font_class": "wenjian-da", + "unicode": "e621", + "unicode_decimal": 58913 + }, + { + "icon_id": "34690973", + "name": "档案", + "font_class": "dangan", + "unicode": "e622", + "unicode_decimal": 58914 + }, + { + "icon_id": "34686145", + "name": "验证码", + "font_class": "yanzhengma", + "unicode": "e602", + "unicode_decimal": 58882 + }, + { + "icon_id": "34686146", + "name": "密码", + "font_class": "mima", + "unicode": "e603", + "unicode_decimal": 58883 + }, + { + "icon_id": "34685701", + "name": "账号", + "font_class": "zhanghao", + "unicode": "e601", + "unicode_decimal": 58881 + } + ] +} diff --git a/src/assets/iconfonts/light/iconfont.ttf b/src/assets/iconfonts/light/iconfont.ttf new file mode 100644 index 0000000..be968e0 Binary files /dev/null and b/src/assets/iconfonts/light/iconfont.ttf differ diff --git a/src/assets/iconfonts/light/iconfont.woff b/src/assets/iconfonts/light/iconfont.woff new file mode 100644 index 0000000..1c690e4 Binary files /dev/null and b/src/assets/iconfonts/light/iconfont.woff differ diff --git a/src/assets/iconfonts/light/iconfont.woff2 b/src/assets/iconfonts/light/iconfont.woff2 new file mode 100644 index 0000000..6d423fc Binary files /dev/null and b/src/assets/iconfonts/light/iconfont.woff2 differ diff --git a/src/assets/icons/iconfont.js b/src/assets/icons/iconfont.js new file mode 100644 index 0000000..71f898a --- /dev/null +++ b/src/assets/icons/iconfont.js @@ -0,0 +1 @@ +!function(c){var t,e,l,o,i,n='',a=(a=document.getElementsByTagName("script"))[a.length-1].getAttribute("data-injectcss"),h=function(c,t){t.parentNode.insertBefore(c,t)};if(a&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function s(){i||(i=!0,l())}function d(){try{o.documentElement.doScroll("left")}catch(c){return void setTimeout(d,50)}s()}t=function(){var c,t=document.createElement("div");t.innerHTML=n,n=null,(t=t.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",t=t,(c=document.body).firstChild?h(t,c.firstChild):c.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(e=function(){document.removeEventListener("DOMContentLoaded",e,!1),t()},document.addEventListener("DOMContentLoaded",e,!1)):document.attachEvent&&(l=t,o=c.document,i=!1,d(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,s())})}(window); \ No newline at end of file diff --git a/src/assets/icons/index.js b/src/assets/icons/index.js new file mode 100644 index 0000000..d79e164 --- /dev/null +++ b/src/assets/icons/index.js @@ -0,0 +1,9 @@ +import Vue from 'vue' +import SvgIcon from '@/components/SvgIcon'// svg component + +// register globally +Vue.component('svg-icon', SvgIcon) + +const req = require.context('./svg', false, /\.svg$/) +const requireAll = requireContext => requireContext.keys().map(requireContext) +requireAll(req) diff --git a/src/assets/icons/svg/Steve-Jobs.svg b/src/assets/icons/svg/Steve-Jobs.svg new file mode 100644 index 0000000..6f0fc84 --- /dev/null +++ b/src/assets/icons/svg/Steve-Jobs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/alerm.svg b/src/assets/icons/svg/alerm.svg new file mode 100644 index 0000000..7a1b15d --- /dev/null +++ b/src/assets/icons/svg/alerm.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/src/assets/icons/svg/alipay.svg b/src/assets/icons/svg/alipay.svg new file mode 100644 index 0000000..9138981 --- /dev/null +++ b/src/assets/icons/svg/alipay.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/anq.svg b/src/assets/icons/svg/anq.svg new file mode 100644 index 0000000..a2895e2 --- /dev/null +++ b/src/assets/icons/svg/anq.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/app.svg b/src/assets/icons/svg/app.svg new file mode 100644 index 0000000..e5cf869 --- /dev/null +++ b/src/assets/icons/svg/app.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/backup.svg b/src/assets/icons/svg/backup.svg new file mode 100644 index 0000000..3143040 --- /dev/null +++ b/src/assets/icons/svg/backup.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/bindbiaoqian.svg b/src/assets/icons/svg/bindbiaoqian.svg new file mode 100644 index 0000000..d68ce8b --- /dev/null +++ b/src/assets/icons/svg/bindbiaoqian.svg @@ -0,0 +1,22 @@ + + + + + + + + + + diff --git a/src/assets/icons/svg/chain.svg b/src/assets/icons/svg/chain.svg new file mode 100644 index 0000000..ed3317f --- /dev/null +++ b/src/assets/icons/svg/chain.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/chart.svg b/src/assets/icons/svg/chart.svg new file mode 100644 index 0000000..27728fb --- /dev/null +++ b/src/assets/icons/svg/chart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/chehui.svg b/src/assets/icons/svg/chehui.svg new file mode 100644 index 0000000..d365ceb --- /dev/null +++ b/src/assets/icons/svg/chehui.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/src/assets/icons/svg/co2.svg b/src/assets/icons/svg/co2.svg new file mode 100644 index 0000000..4dfcf95 --- /dev/null +++ b/src/assets/icons/svg/co2.svg @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/codeConsole.svg b/src/assets/icons/svg/codeConsole.svg new file mode 100644 index 0000000..c54c0d1 --- /dev/null +++ b/src/assets/icons/svg/codeConsole.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/danganjieyue.svg b/src/assets/icons/svg/danganjieyue.svg new file mode 100644 index 0000000..098f2f9 --- /dev/null +++ b/src/assets/icons/svg/danganjieyue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/danganleibie.svg b/src/assets/icons/svg/danganleibie.svg new file mode 100644 index 0000000..54bb6c7 --- /dev/null +++ b/src/assets/icons/svg/danganleibie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/dashboard.svg b/src/assets/icons/svg/dashboard.svg new file mode 100644 index 0000000..5317d37 --- /dev/null +++ b/src/assets/icons/svg/dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/database.svg b/src/assets/icons/svg/database.svg new file mode 100644 index 0000000..8197a0e --- /dev/null +++ b/src/assets/icons/svg/database.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/date.svg b/src/assets/icons/svg/date.svg new file mode 100644 index 0000000..0540e99 --- /dev/null +++ b/src/assets/icons/svg/date.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/dengji-fanbai.svg b/src/assets/icons/svg/dengji-fanbai.svg new file mode 100644 index 0000000..3274a48 --- /dev/null +++ b/src/assets/icons/svg/dengji-fanbai.svg @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/src/assets/icons/svg/deploy.svg b/src/assets/icons/svg/deploy.svg new file mode 100644 index 0000000..f4a1c56 --- /dev/null +++ b/src/assets/icons/svg/deploy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/dept.svg b/src/assets/icons/svg/dept.svg new file mode 100644 index 0000000..bf26aba --- /dev/null +++ b/src/assets/icons/svg/dept.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/dev.svg b/src/assets/icons/svg/dev.svg new file mode 100644 index 0000000..ed4d23c --- /dev/null +++ b/src/assets/icons/svg/dev.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/develop.svg b/src/assets/icons/svg/develop.svg new file mode 100644 index 0000000..e189223 --- /dev/null +++ b/src/assets/icons/svg/develop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/dictionary.svg b/src/assets/icons/svg/dictionary.svg new file mode 100644 index 0000000..549123a --- /dev/null +++ b/src/assets/icons/svg/dictionary.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/doc.svg b/src/assets/icons/svg/doc.svg new file mode 100644 index 0000000..c34965c --- /dev/null +++ b/src/assets/icons/svg/doc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/download.svg b/src/assets/icons/svg/download.svg new file mode 100644 index 0000000..1508c45 --- /dev/null +++ b/src/assets/icons/svg/download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/edit.svg b/src/assets/icons/svg/edit.svg new file mode 100644 index 0000000..d26101f --- /dev/null +++ b/src/assets/icons/svg/edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/education.svg b/src/assets/icons/svg/education.svg new file mode 100644 index 0000000..7bfb01d --- /dev/null +++ b/src/assets/icons/svg/education.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/email.svg b/src/assets/icons/svg/email.svg new file mode 100644 index 0000000..8c78e31 --- /dev/null +++ b/src/assets/icons/svg/email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/empty.svg b/src/assets/icons/svg/empty.svg new file mode 100644 index 0000000..08c993f --- /dev/null +++ b/src/assets/icons/svg/empty.svg @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/error.svg b/src/assets/icons/svg/error.svg new file mode 100644 index 0000000..04cef8f --- /dev/null +++ b/src/assets/icons/svg/error.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/exception.svg b/src/assets/icons/svg/exception.svg new file mode 100644 index 0000000..5605b3f --- /dev/null +++ b/src/assets/icons/svg/exception.svg @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/src/assets/icons/svg/exit-fullscreen.svg b/src/assets/icons/svg/exit-fullscreen.svg new file mode 100644 index 0000000..485c128 --- /dev/null +++ b/src/assets/icons/svg/exit-fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/fujian.svg b/src/assets/icons/svg/fujian.svg new file mode 100644 index 0000000..19a407a --- /dev/null +++ b/src/assets/icons/svg/fujian.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + diff --git a/src/assets/icons/svg/fullscreen.svg b/src/assets/icons/svg/fullscreen.svg new file mode 100644 index 0000000..0e86b6f --- /dev/null +++ b/src/assets/icons/svg/fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/fwb.svg b/src/assets/icons/svg/fwb.svg new file mode 100644 index 0000000..59933fc --- /dev/null +++ b/src/assets/icons/svg/fwb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/github.svg b/src/assets/icons/svg/github.svg new file mode 100644 index 0000000..8145e95 --- /dev/null +++ b/src/assets/icons/svg/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/gonggao.svg b/src/assets/icons/svg/gonggao.svg new file mode 100644 index 0000000..22aed08 --- /dev/null +++ b/src/assets/icons/svg/gonggao.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/guihuan-fanbai.svg b/src/assets/icons/svg/guihuan-fanbai.svg new file mode 100644 index 0000000..90783f3 --- /dev/null +++ b/src/assets/icons/svg/guihuan-fanbai.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + diff --git a/src/assets/icons/svg/huanyuan-fanbai.svg b/src/assets/icons/svg/huanyuan-fanbai.svg new file mode 100644 index 0000000..b8c1427 --- /dev/null +++ b/src/assets/icons/svg/huanyuan-fanbai.svg @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/src/assets/icons/svg/icon.svg b/src/assets/icons/svg/icon.svg new file mode 100644 index 0000000..82fbdd9 --- /dev/null +++ b/src/assets/icons/svg/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/image.svg b/src/assets/icons/svg/image.svg new file mode 100644 index 0000000..16d572f --- /dev/null +++ b/src/assets/icons/svg/image.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/index.svg b/src/assets/icons/svg/index.svg new file mode 100644 index 0000000..fdb3826 --- /dev/null +++ b/src/assets/icons/svg/index.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/international.svg b/src/assets/icons/svg/international.svg new file mode 100644 index 0000000..e9b56ee --- /dev/null +++ b/src/assets/icons/svg/international.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/ipvisits.svg b/src/assets/icons/svg/ipvisits.svg new file mode 100644 index 0000000..4ca473d --- /dev/null +++ b/src/assets/icons/svg/ipvisits.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/java.svg b/src/assets/icons/svg/java.svg new file mode 100644 index 0000000..e2effbb --- /dev/null +++ b/src/assets/icons/svg/java.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/jiechu-fanbai.svg b/src/assets/icons/svg/jiechu-fanbai.svg new file mode 100644 index 0000000..e959ca6 --- /dev/null +++ b/src/assets/icons/svg/jiechu-fanbai.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + diff --git a/src/assets/icons/svg/jieyue.svg b/src/assets/icons/svg/jieyue.svg new file mode 100644 index 0000000..4dd6a3c --- /dev/null +++ b/src/assets/icons/svg/jieyue.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/src/assets/icons/svg/link.svg b/src/assets/icons/svg/link.svg new file mode 100644 index 0000000..48197ba --- /dev/null +++ b/src/assets/icons/svg/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/list.svg b/src/assets/icons/svg/list.svg new file mode 100644 index 0000000..20259ed --- /dev/null +++ b/src/assets/icons/svg/list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/lock.svg b/src/assets/icons/svg/lock.svg new file mode 100644 index 0000000..0f842ea --- /dev/null +++ b/src/assets/icons/svg/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/log.svg b/src/assets/icons/svg/log.svg new file mode 100644 index 0000000..4fefe74 --- /dev/null +++ b/src/assets/icons/svg/log.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/login.svg b/src/assets/icons/svg/login.svg new file mode 100644 index 0000000..cc5a854 --- /dev/null +++ b/src/assets/icons/svg/login.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/logo-title.svg b/src/assets/icons/svg/logo-title.svg new file mode 100644 index 0000000..6c28f79 --- /dev/null +++ b/src/assets/icons/svg/logo-title.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/logo.svg b/src/assets/icons/svg/logo.svg new file mode 100644 index 0000000..02f4e77 --- /dev/null +++ b/src/assets/icons/svg/logo.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/markdown.svg b/src/assets/icons/svg/markdown.svg new file mode 100644 index 0000000..7cd6747 --- /dev/null +++ b/src/assets/icons/svg/markdown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/menjin.svg b/src/assets/icons/svg/menjin.svg new file mode 100644 index 0000000..90c6958 --- /dev/null +++ b/src/assets/icons/svg/menjin.svg @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/src/assets/icons/svg/menu.svg b/src/assets/icons/svg/menu.svg new file mode 100644 index 0000000..e4360a0 --- /dev/null +++ b/src/assets/icons/svg/menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/message.svg b/src/assets/icons/svg/message.svg new file mode 100644 index 0000000..14ca817 --- /dev/null +++ b/src/assets/icons/svg/message.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/mnt.svg b/src/assets/icons/svg/mnt.svg new file mode 100644 index 0000000..502a7c0 --- /dev/null +++ b/src/assets/icons/svg/mnt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/money.svg b/src/assets/icons/svg/money.svg new file mode 100644 index 0000000..c1580de --- /dev/null +++ b/src/assets/icons/svg/money.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/monitor.svg b/src/assets/icons/svg/monitor.svg new file mode 100644 index 0000000..ce8c5c0 --- /dev/null +++ b/src/assets/icons/svg/monitor.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/svg/nested.svg b/src/assets/icons/svg/nested.svg new file mode 100644 index 0000000..06713a8 --- /dev/null +++ b/src/assets/icons/svg/nested.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/partzhuanghe.svg b/src/assets/icons/svg/partzhuanghe.svg new file mode 100644 index 0000000..f4b5db5 --- /dev/null +++ b/src/assets/icons/svg/partzhuanghe.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/src/assets/icons/svg/password.svg b/src/assets/icons/svg/password.svg new file mode 100644 index 0000000..4ab451f --- /dev/null +++ b/src/assets/icons/svg/password.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/people.svg b/src/assets/icons/svg/people.svg new file mode 100644 index 0000000..2bd54ae --- /dev/null +++ b/src/assets/icons/svg/people.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/peoples.svg b/src/assets/icons/svg/peoples.svg new file mode 100644 index 0000000..2c91161 --- /dev/null +++ b/src/assets/icons/svg/peoples.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/permission.svg b/src/assets/icons/svg/permission.svg new file mode 100644 index 0000000..c4c7409 --- /dev/null +++ b/src/assets/icons/svg/permission.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/phone.svg b/src/assets/icons/svg/phone.svg new file mode 100644 index 0000000..da339f9 --- /dev/null +++ b/src/assets/icons/svg/phone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/pm10.svg b/src/assets/icons/svg/pm10.svg new file mode 100644 index 0000000..11b922b --- /dev/null +++ b/src/assets/icons/svg/pm10.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/pm25.svg b/src/assets/icons/svg/pm25.svg new file mode 100644 index 0000000..c6c14f4 --- /dev/null +++ b/src/assets/icons/svg/pm25.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/print.svg b/src/assets/icons/svg/print.svg new file mode 100644 index 0000000..9ec7363 --- /dev/null +++ b/src/assets/icons/svg/print.svg @@ -0,0 +1,22 @@ + + + + + + + + + + diff --git a/src/assets/icons/svg/qiniu.svg b/src/assets/icons/svg/qiniu.svg new file mode 100644 index 0000000..c2f9f8b --- /dev/null +++ b/src/assets/icons/svg/qiniu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/redis.svg b/src/assets/icons/svg/redis.svg new file mode 100644 index 0000000..bef111b --- /dev/null +++ b/src/assets/icons/svg/redis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/remove_bind.svg b/src/assets/icons/svg/remove_bind.svg new file mode 100644 index 0000000..6c70c79 --- /dev/null +++ b/src/assets/icons/svg/remove_bind.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/role.svg b/src/assets/icons/svg/role.svg new file mode 100644 index 0000000..76cb18f --- /dev/null +++ b/src/assets/icons/svg/role.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/ruku.svg b/src/assets/icons/svg/ruku.svg new file mode 100644 index 0000000..a1aa719 --- /dev/null +++ b/src/assets/icons/svg/ruku.svg @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/src/assets/icons/svg/s-sjzb.svg b/src/assets/icons/svg/s-sjzb.svg new file mode 100644 index 0000000..8664e43 --- /dev/null +++ b/src/assets/icons/svg/s-sjzb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/search.svg b/src/assets/icons/svg/search.svg new file mode 100644 index 0000000..84233dd --- /dev/null +++ b/src/assets/icons/svg/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/server.svg b/src/assets/icons/svg/server.svg new file mode 100644 index 0000000..db6dcdf --- /dev/null +++ b/src/assets/icons/svg/server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/shidu.svg b/src/assets/icons/svg/shidu.svg new file mode 100644 index 0000000..fbdc078 --- /dev/null +++ b/src/assets/icons/svg/shidu.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/shopping.svg b/src/assets/icons/svg/shopping.svg new file mode 100644 index 0000000..87513e7 --- /dev/null +++ b/src/assets/icons/svg/shopping.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/size.svg b/src/assets/icons/svg/size.svg new file mode 100644 index 0000000..ddb25b8 --- /dev/null +++ b/src/assets/icons/svg/size.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/skill.svg b/src/assets/icons/svg/skill.svg new file mode 100644 index 0000000..a3b7312 --- /dev/null +++ b/src/assets/icons/svg/skill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/source.svg b/src/assets/icons/svg/source.svg new file mode 100644 index 0000000..1c3a038 --- /dev/null +++ b/src/assets/icons/svg/source.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sqlMonitor.svg b/src/assets/icons/svg/sqlMonitor.svg new file mode 100644 index 0000000..950a430 --- /dev/null +++ b/src/assets/icons/svg/sqlMonitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sr-dn-gl.svg b/src/assets/icons/svg/sr-dn-gl.svg new file mode 100644 index 0000000..a4b1cea --- /dev/null +++ b/src/assets/icons/svg/sr-dn-gl.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sr-dn-pz.svg b/src/assets/icons/svg/sr-dn-pz.svg new file mode 100644 index 0000000..3614c37 --- /dev/null +++ b/src/assets/icons/svg/sr-dn-pz.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sr-dngl.svg b/src/assets/icons/svg/sr-dngl.svg new file mode 100644 index 0000000..6e0a272 --- /dev/null +++ b/src/assets/icons/svg/sr-dngl.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sr-home.svg b/src/assets/icons/svg/sr-home.svg new file mode 100644 index 0000000..0da329d --- /dev/null +++ b/src/assets/icons/svg/sr-home.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sr-kf.svg b/src/assets/icons/svg/sr-kf.svg new file mode 100644 index 0000000..6707f20 --- /dev/null +++ b/src/assets/icons/svg/sr-kf.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sr-ly.svg b/src/assets/icons/svg/sr-ly.svg new file mode 100644 index 0000000..aa1fb81 --- /dev/null +++ b/src/assets/icons/svg/sr-ly.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sr-ml.svg b/src/assets/icons/svg/sr-ml.svg new file mode 100644 index 0000000..4cd800f --- /dev/null +++ b/src/assets/icons/svg/sr-ml.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sr-system.svg b/src/assets/icons/svg/sr-system.svg new file mode 100644 index 0000000..a8c11b8 --- /dev/null +++ b/src/assets/icons/svg/sr-system.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sr-ygdk.svg b/src/assets/icons/svg/sr-ygdk.svg new file mode 100644 index 0000000..9a2fbe6 --- /dev/null +++ b/src/assets/icons/svg/sr-ygdk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/swagger.svg b/src/assets/icons/svg/swagger.svg new file mode 100644 index 0000000..ded7de8 --- /dev/null +++ b/src/assets/icons/svg/swagger.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/sys-tools.svg b/src/assets/icons/svg/sys-tools.svg new file mode 100644 index 0000000..324aa04 --- /dev/null +++ b/src/assets/icons/svg/sys-tools.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/system.svg b/src/assets/icons/svg/system.svg new file mode 100644 index 0000000..1745439 --- /dev/null +++ b/src/assets/icons/svg/system.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/svg/system1.svg b/src/assets/icons/svg/system1.svg new file mode 100644 index 0000000..37b0a0a --- /dev/null +++ b/src/assets/icons/svg/system1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/tab.svg b/src/assets/icons/svg/tab.svg new file mode 100644 index 0000000..b4b48e4 --- /dev/null +++ b/src/assets/icons/svg/tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/temperature.svg b/src/assets/icons/svg/temperature.svg new file mode 100644 index 0000000..e3164cb --- /dev/null +++ b/src/assets/icons/svg/temperature.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/theme.svg b/src/assets/icons/svg/theme.svg new file mode 100644 index 0000000..5982a2f --- /dev/null +++ b/src/assets/icons/svg/theme.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/timing.svg b/src/assets/icons/svg/timing.svg new file mode 100644 index 0000000..8775a4e --- /dev/null +++ b/src/assets/icons/svg/timing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/tools.svg b/src/assets/icons/svg/tools.svg new file mode 100644 index 0000000..aba1a40 --- /dev/null +++ b/src/assets/icons/svg/tools.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/tree-table.svg b/src/assets/icons/svg/tree-table.svg new file mode 100644 index 0000000..8aafdb8 --- /dev/null +++ b/src/assets/icons/svg/tree-table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/tree.svg b/src/assets/icons/svg/tree.svg new file mode 100644 index 0000000..dd4b7dd --- /dev/null +++ b/src/assets/icons/svg/tree.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/unlock.svg b/src/assets/icons/svg/unlock.svg new file mode 100644 index 0000000..1219e41 --- /dev/null +++ b/src/assets/icons/svg/unlock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/user.svg b/src/assets/icons/svg/user.svg new file mode 100644 index 0000000..09d7a81 --- /dev/null +++ b/src/assets/icons/svg/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/user1.svg b/src/assets/icons/svg/user1.svg new file mode 100644 index 0000000..14ca51e --- /dev/null +++ b/src/assets/icons/svg/user1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/validCode.svg b/src/assets/icons/svg/validCode.svg new file mode 100644 index 0000000..9258785 --- /dev/null +++ b/src/assets/icons/svg/validCode.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/visits.svg b/src/assets/icons/svg/visits.svg new file mode 100644 index 0000000..8425662 --- /dev/null +++ b/src/assets/icons/svg/visits.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/voc.svg b/src/assets/icons/svg/voc.svg new file mode 100644 index 0000000..3935b50 --- /dev/null +++ b/src/assets/icons/svg/voc.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/warning.svg b/src/assets/icons/svg/warning.svg new file mode 100644 index 0000000..0d561f4 --- /dev/null +++ b/src/assets/icons/svg/warning.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/web.svg b/src/assets/icons/svg/web.svg new file mode 100644 index 0000000..9c57415 --- /dev/null +++ b/src/assets/icons/svg/web.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/wechat.svg b/src/assets/icons/svg/wechat.svg new file mode 100644 index 0000000..c586e55 --- /dev/null +++ b/src/assets/icons/svg/wechat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/weixin.svg b/src/assets/icons/svg/weixin.svg new file mode 100644 index 0000000..93c6ed7 --- /dev/null +++ b/src/assets/icons/svg/weixin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/xinzengpandian-fanbai.svg b/src/assets/icons/svg/xinzengpandian-fanbai.svg new file mode 100644 index 0000000..32d797b --- /dev/null +++ b/src/assets/icons/svg/xinzengpandian-fanbai.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/src/assets/icons/svg/yichu-fanbai.svg b/src/assets/icons/svg/yichu-fanbai.svg new file mode 100644 index 0000000..cbd2f81 --- /dev/null +++ b/src/assets/icons/svg/yichu-fanbai.svg @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/src/assets/icons/svg/zaijieshuliang.svg b/src/assets/icons/svg/zaijieshuliang.svg new file mode 100644 index 0000000..7b3f160 --- /dev/null +++ b/src/assets/icons/svg/zaijieshuliang.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/zhuanghe.svg b/src/assets/icons/svg/zhuanghe.svg new file mode 100644 index 0000000..495f2da --- /dev/null +++ b/src/assets/icons/svg/zhuanghe.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/src/assets/icons/svg/zujian.svg b/src/assets/icons/svg/zujian.svg new file mode 100644 index 0000000..a92f806 --- /dev/null +++ b/src/assets/icons/svg/zujian.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svgo.yml b/src/assets/icons/svgo.yml new file mode 100644 index 0000000..14f8f5c --- /dev/null +++ b/src/assets/icons/svgo.yml @@ -0,0 +1,22 @@ +# 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/src/assets/images/alert_bottom.png b/src/assets/images/alert_bottom.png new file mode 100644 index 0000000..5da2ff6 Binary files /dev/null and b/src/assets/images/alert_bottom.png differ diff --git a/src/assets/images/archives/bg.png b/src/assets/images/archives/bg.png new file mode 100644 index 0000000..a4a0d27 Binary files /dev/null and b/src/assets/images/archives/bg.png differ diff --git a/src/assets/images/archives/bgw.png b/src/assets/images/archives/bgw.png new file mode 100644 index 0000000..5487ed6 Binary files /dev/null and b/src/assets/images/archives/bgw.png differ diff --git a/src/assets/images/archives/dah.png b/src/assets/images/archives/dah.png new file mode 100644 index 0000000..6b0ca86 Binary files /dev/null and b/src/assets/images/archives/dah.png differ diff --git a/src/assets/images/archives/icon-js.png b/src/assets/images/archives/icon-js.png new file mode 100644 index 0000000..6f528dd Binary files /dev/null and b/src/assets/images/archives/icon-js.png differ diff --git a/src/assets/images/archives/icon-ls.png b/src/assets/images/archives/icon-ls.png new file mode 100644 index 0000000..e818544 Binary files /dev/null and b/src/assets/images/archives/icon-ls.png differ diff --git a/src/assets/images/archives/ys1.png b/src/assets/images/archives/ys1.png new file mode 100644 index 0000000..ab0565d Binary files /dev/null and b/src/assets/images/archives/ys1.png differ diff --git a/src/assets/images/archives/ys2.png b/src/assets/images/archives/ys2.png new file mode 100644 index 0000000..bc89c9e Binary files /dev/null and b/src/assets/images/archives/ys2.png differ diff --git a/src/assets/images/archives/ys3.png b/src/assets/images/archives/ys3.png new file mode 100644 index 0000000..14dc38e Binary files /dev/null and b/src/assets/images/archives/ys3.png differ diff --git a/src/assets/images/archives/ys4.png b/src/assets/images/archives/ys4.png new file mode 100644 index 0000000..bba0cba Binary files /dev/null and b/src/assets/images/archives/ys4.png differ diff --git a/src/assets/images/archives/zt-lx.png b/src/assets/images/archives/zt-lx.png new file mode 100644 index 0000000..d66f5a7 Binary files /dev/null and b/src/assets/images/archives/zt-lx.png differ diff --git a/src/assets/images/archives/zt-zx.png b/src/assets/images/archives/zt-zx.png new file mode 100644 index 0000000..43ab863 Binary files /dev/null and b/src/assets/images/archives/zt-zx.png differ diff --git a/src/assets/images/avatar.png b/src/assets/images/avatar.png new file mode 100644 index 0000000..997732a Binary files /dev/null and b/src/assets/images/avatar.png differ diff --git a/src/assets/images/closed.png b/src/assets/images/closed.png new file mode 100644 index 0000000..3341f93 Binary files /dev/null and b/src/assets/images/closed.png differ diff --git a/src/assets/images/cover-bg.png b/src/assets/images/cover-bg.png new file mode 100644 index 0000000..fa668ba Binary files /dev/null and b/src/assets/images/cover-bg.png differ diff --git a/src/assets/images/data_border_default.png b/src/assets/images/data_border_default.png new file mode 100644 index 0000000..a9df4c1 Binary files /dev/null and b/src/assets/images/data_border_default.png differ diff --git a/src/assets/images/data_border_warn.png b/src/assets/images/data_border_warn.png new file mode 100644 index 0000000..cfe2939 Binary files /dev/null and b/src/assets/images/data_border_warn.png differ diff --git a/src/assets/images/des_title.png b/src/assets/images/des_title.png new file mode 100644 index 0000000..8c0ef80 Binary files /dev/null and b/src/assets/images/des_title.png differ diff --git a/src/assets/images/dialog_left.png b/src/assets/images/dialog_left.png new file mode 100644 index 0000000..6e528a8 Binary files /dev/null and b/src/assets/images/dialog_left.png differ diff --git a/src/assets/images/dialog_left_bottom.png b/src/assets/images/dialog_left_bottom.png new file mode 100644 index 0000000..8d62d26 Binary files /dev/null and b/src/assets/images/dialog_left_bottom.png differ diff --git a/src/assets/images/dialog_left_top.png b/src/assets/images/dialog_left_top.png new file mode 100644 index 0000000..997eeba Binary files /dev/null and b/src/assets/images/dialog_left_top.png differ diff --git a/src/assets/images/dialog_right.png b/src/assets/images/dialog_right.png new file mode 100644 index 0000000..94a95b6 Binary files /dev/null and b/src/assets/images/dialog_right.png differ diff --git a/src/assets/images/dialog_right_bottom.png b/src/assets/images/dialog_right_bottom.png new file mode 100644 index 0000000..9a7d141 Binary files /dev/null and b/src/assets/images/dialog_right_bottom.png differ diff --git a/src/assets/images/dialog_right_top.png b/src/assets/images/dialog_right_top.png new file mode 100644 index 0000000..85b0d02 Binary files /dev/null and b/src/assets/images/dialog_right_top.png differ diff --git a/src/assets/images/grzx-bg.png b/src/assets/images/grzx-bg.png new file mode 100644 index 0000000..e0937c4 Binary files /dev/null and b/src/assets/images/grzx-bg.png differ diff --git a/src/assets/images/home-icon1.png b/src/assets/images/home-icon1.png new file mode 100644 index 0000000..3e80f6d Binary files /dev/null and b/src/assets/images/home-icon1.png differ diff --git a/src/assets/images/home-icon2.png b/src/assets/images/home-icon2.png new file mode 100644 index 0000000..43a2915 Binary files /dev/null and b/src/assets/images/home-icon2.png differ diff --git a/src/assets/images/home-icon3.png b/src/assets/images/home-icon3.png new file mode 100644 index 0000000..77057d5 Binary files /dev/null and b/src/assets/images/home-icon3.png differ diff --git a/src/assets/images/home-icon4.png b/src/assets/images/home-icon4.png new file mode 100644 index 0000000..bc7908c Binary files /dev/null and b/src/assets/images/home-icon4.png differ diff --git a/src/assets/images/icon/arrow.png b/src/assets/images/icon/arrow.png new file mode 100644 index 0000000..b6fbf2b Binary files /dev/null and b/src/assets/images/icon/arrow.png differ diff --git a/src/assets/images/icon/fqdq.png b/src/assets/images/icon/fqdq.png new file mode 100644 index 0000000..16dfd8d Binary files /dev/null and b/src/assets/images/icon/fqdq.png differ diff --git a/src/assets/images/icon/jjdq.png b/src/assets/images/icon/jjdq.png new file mode 100644 index 0000000..e23f03a Binary files /dev/null and b/src/assets/images/icon/jjdq.png differ diff --git a/src/assets/images/icon/lcdd.png b/src/assets/images/icon/lcdd.png new file mode 100644 index 0000000..f55a454 Binary files /dev/null and b/src/assets/images/icon/lcdd.png differ diff --git a/src/assets/images/icon/lcwc.png b/src/assets/images/icon/lcwc.png new file mode 100644 index 0000000..ecdf110 Binary files /dev/null and b/src/assets/images/icon/lcwc.png differ diff --git a/src/assets/images/icon/menu-tree01.png b/src/assets/images/icon/menu-tree01.png new file mode 100644 index 0000000..520ac5b Binary files /dev/null and b/src/assets/images/icon/menu-tree01.png differ diff --git a/src/assets/images/icon/menu-tree02.png b/src/assets/images/icon/menu-tree02.png new file mode 100644 index 0000000..013fe1b Binary files /dev/null and b/src/assets/images/icon/menu-tree02.png differ diff --git a/src/assets/images/icon/theme.png b/src/assets/images/icon/theme.png new file mode 100644 index 0000000..afdc1ca Binary files /dev/null and b/src/assets/images/icon/theme.png differ diff --git a/src/assets/images/icon/tip-icon.png b/src/assets/images/icon/tip-icon.png new file mode 100644 index 0000000..8a27526 Binary files /dev/null and b/src/assets/images/icon/tip-icon.png differ diff --git a/src/assets/images/icon/tree-01.png b/src/assets/images/icon/tree-01.png new file mode 100644 index 0000000..ef637e0 Binary files /dev/null and b/src/assets/images/icon/tree-01.png differ diff --git a/src/assets/images/icon/tree-02.png b/src/assets/images/icon/tree-02.png new file mode 100644 index 0000000..d1c7d85 Binary files /dev/null and b/src/assets/images/icon/tree-02.png differ diff --git a/src/assets/images/icon/tree-03.png b/src/assets/images/icon/tree-03.png new file mode 100644 index 0000000..882e33e Binary files /dev/null and b/src/assets/images/icon/tree-03.png differ diff --git a/src/assets/images/icon/xttz.png b/src/assets/images/icon/xttz.png new file mode 100644 index 0000000..def25e7 Binary files /dev/null and b/src/assets/images/icon/xttz.png differ diff --git a/src/assets/images/left_bottom.png b/src/assets/images/left_bottom.png new file mode 100644 index 0000000..c48b86c Binary files /dev/null and b/src/assets/images/left_bottom.png differ diff --git a/src/assets/images/left_top.png b/src/assets/images/left_top.png new file mode 100644 index 0000000..8d4b775 Binary files /dev/null and b/src/assets/images/left_top.png differ diff --git a/src/assets/images/login/dl-bg.png b/src/assets/images/login/dl-bg.png new file mode 100644 index 0000000..96771dc Binary files /dev/null and b/src/assets/images/login/dl-bg.png differ diff --git a/src/assets/images/login/dl-bgt.png b/src/assets/images/login/dl-bgt.png new file mode 100644 index 0000000..dd63a00 Binary files /dev/null and b/src/assets/images/login/dl-bgt.png differ diff --git a/src/assets/images/login/dl-logo.png b/src/assets/images/login/dl-logo.png new file mode 100644 index 0000000..f14fa5b Binary files /dev/null and b/src/assets/images/login/dl-logo.png differ diff --git a/src/assets/images/login/dl-logo@2x.png b/src/assets/images/login/dl-logo@2x.png new file mode 100644 index 0000000..06ea32f Binary files /dev/null and b/src/assets/images/login/dl-logo@2x.png differ diff --git a/src/assets/images/logo.png b/src/assets/images/logo.png new file mode 100644 index 0000000..7d4a3e0 Binary files /dev/null and b/src/assets/images/logo.png differ diff --git a/src/assets/images/panel-n.png b/src/assets/images/panel-n.png new file mode 100644 index 0000000..4622043 Binary files /dev/null and b/src/assets/images/panel-n.png differ diff --git a/src/assets/images/panel-y.png b/src/assets/images/panel-y.png new file mode 100644 index 0000000..49ee2c4 Binary files /dev/null and b/src/assets/images/panel-y.png differ diff --git a/src/assets/images/pop-message.png b/src/assets/images/pop-message.png new file mode 100644 index 0000000..48afdec Binary files /dev/null and b/src/assets/images/pop-message.png differ diff --git a/src/assets/images/pop_arrow.png b/src/assets/images/pop_arrow.png new file mode 100644 index 0000000..3fcfe6b Binary files /dev/null and b/src/assets/images/pop_arrow.png differ diff --git a/src/assets/images/pop_sanjiao.png b/src/assets/images/pop_sanjiao.png new file mode 100644 index 0000000..bed219a Binary files /dev/null and b/src/assets/images/pop_sanjiao.png differ diff --git a/src/assets/images/right_bottom.png b/src/assets/images/right_bottom.png new file mode 100644 index 0000000..01dec39 Binary files /dev/null and b/src/assets/images/right_bottom.png differ diff --git a/src/assets/images/right_top.png b/src/assets/images/right_top.png new file mode 100644 index 0000000..93ca011 Binary files /dev/null and b/src/assets/images/right_top.png differ diff --git a/src/assets/images/serve1-1.png b/src/assets/images/serve1-1.png new file mode 100644 index 0000000..7b65d0e Binary files /dev/null and b/src/assets/images/serve1-1.png differ diff --git a/src/assets/images/serve1-2.png b/src/assets/images/serve1-2.png new file mode 100644 index 0000000..5ca5a78 Binary files /dev/null and b/src/assets/images/serve1-2.png differ diff --git a/src/assets/images/serve1-3.png b/src/assets/images/serve1-3.png new file mode 100644 index 0000000..756eae2 Binary files /dev/null and b/src/assets/images/serve1-3.png differ diff --git a/src/assets/images/serve1.png b/src/assets/images/serve1.png new file mode 100644 index 0000000..6e1dd64 Binary files /dev/null and b/src/assets/images/serve1.png differ diff --git a/src/assets/images/sidebar_bg.png b/src/assets/images/sidebar_bg.png new file mode 100644 index 0000000..cec680b Binary files /dev/null and b/src/assets/images/sidebar_bg.png differ diff --git a/src/assets/images/system/default-img.jpg b/src/assets/images/system/default-img.jpg new file mode 100644 index 0000000..b25ad1e Binary files /dev/null and b/src/assets/images/system/default-img.jpg differ diff --git a/src/assets/images/system/default-img2.png b/src/assets/images/system/default-img2.png new file mode 100644 index 0000000..5659001 Binary files /dev/null and b/src/assets/images/system/default-img2.png differ diff --git a/src/assets/images/system/logo.png b/src/assets/images/system/logo.png new file mode 100644 index 0000000..9224cb6 Binary files /dev/null and b/src/assets/images/system/logo.png differ diff --git a/src/assets/images/system/zwsj.png b/src/assets/images/system/zwsj.png new file mode 100644 index 0000000..a3dd5b6 Binary files /dev/null and b/src/assets/images/system/zwsj.png differ diff --git a/src/assets/images/tab_archives_logo.png b/src/assets/images/tab_archives_logo.png new file mode 100644 index 0000000..a801b7c Binary files /dev/null and b/src/assets/images/tab_archives_logo.png differ diff --git a/src/assets/images/tab_collate_logo.png b/src/assets/images/tab_collate_logo.png new file mode 100644 index 0000000..90b3912 Binary files /dev/null and b/src/assets/images/tab_collate_logo.png differ diff --git a/src/assets/images/tab_fullview_logo.png b/src/assets/images/tab_fullview_logo.png new file mode 100644 index 0000000..b3b5be5 Binary files /dev/null and b/src/assets/images/tab_fullview_logo.png differ diff --git a/src/assets/images/tab_img.png b/src/assets/images/tab_img.png new file mode 100644 index 0000000..27d26bb Binary files /dev/null and b/src/assets/images/tab_img.png differ diff --git a/src/assets/images/tab_left.png b/src/assets/images/tab_left.png new file mode 100644 index 0000000..d181934 Binary files /dev/null and b/src/assets/images/tab_left.png differ diff --git a/src/assets/images/tab_left_active.png b/src/assets/images/tab_left_active.png new file mode 100644 index 0000000..a20bd8a Binary files /dev/null and b/src/assets/images/tab_left_active.png differ diff --git a/src/assets/images/tab_read_logo.png b/src/assets/images/tab_read_logo.png new file mode 100644 index 0000000..79198cd Binary files /dev/null and b/src/assets/images/tab_read_logo.png differ diff --git a/src/assets/images/tab_right.png b/src/assets/images/tab_right.png new file mode 100644 index 0000000..f1f72b7 Binary files /dev/null and b/src/assets/images/tab_right.png differ diff --git a/src/assets/images/tab_right_active.png b/src/assets/images/tab_right_active.png new file mode 100644 index 0000000..a1db363 Binary files /dev/null and b/src/assets/images/tab_right_active.png differ diff --git a/src/assets/images/table_head_bg.png b/src/assets/images/table_head_bg.png new file mode 100644 index 0000000..85d4121 Binary files /dev/null and b/src/assets/images/table_head_bg.png differ diff --git a/src/assets/images/ter1-1.png b/src/assets/images/ter1-1.png new file mode 100644 index 0000000..edf0162 Binary files /dev/null and b/src/assets/images/ter1-1.png differ diff --git a/src/assets/images/ter1.png b/src/assets/images/ter1.png new file mode 100644 index 0000000..9e9cb7c Binary files /dev/null and b/src/assets/images/ter1.png differ diff --git a/src/assets/images/ter2-1.png b/src/assets/images/ter2-1.png new file mode 100644 index 0000000..883c64e Binary files /dev/null and b/src/assets/images/ter2-1.png differ diff --git a/src/assets/images/ter2.png b/src/assets/images/ter2.png new file mode 100644 index 0000000..8632e5c Binary files /dev/null and b/src/assets/images/ter2.png differ diff --git a/src/assets/images/ter3-1.png b/src/assets/images/ter3-1.png new file mode 100644 index 0000000..e5da414 Binary files /dev/null and b/src/assets/images/ter3-1.png differ diff --git a/src/assets/images/ter3.png b/src/assets/images/ter3.png new file mode 100644 index 0000000..f83a741 Binary files /dev/null and b/src/assets/images/ter3.png differ diff --git a/src/assets/images/ter4-1.png b/src/assets/images/ter4-1.png new file mode 100644 index 0000000..a563770 Binary files /dev/null and b/src/assets/images/ter4-1.png differ diff --git a/src/assets/images/ter4.png b/src/assets/images/ter4.png new file mode 100644 index 0000000..5fd737d Binary files /dev/null and b/src/assets/images/ter4.png differ diff --git a/src/assets/images/ter5-1.png b/src/assets/images/ter5-1.png new file mode 100644 index 0000000..c8ff5b5 Binary files /dev/null and b/src/assets/images/ter5-1.png differ diff --git a/src/assets/images/ter5.png b/src/assets/images/ter5.png new file mode 100644 index 0000000..03fce7c Binary files /dev/null and b/src/assets/images/ter5.png differ diff --git a/src/assets/images/user.jpg b/src/assets/images/user.jpg new file mode 100644 index 0000000..8e38b99 Binary files /dev/null and b/src/assets/images/user.jpg differ diff --git a/src/assets/images/warehouse_arrow_left.png b/src/assets/images/warehouse_arrow_left.png new file mode 100644 index 0000000..57d1016 Binary files /dev/null and b/src/assets/images/warehouse_arrow_left.png differ diff --git a/src/assets/images/warehouse_arrow_right.png b/src/assets/images/warehouse_arrow_right.png new file mode 100644 index 0000000..544c165 Binary files /dev/null and b/src/assets/images/warehouse_arrow_right.png differ diff --git a/src/assets/images/warehouse_tab_active.png b/src/assets/images/warehouse_tab_active.png new file mode 100644 index 0000000..3bd18fb Binary files /dev/null and b/src/assets/images/warehouse_tab_active.png differ diff --git a/src/assets/images/warehouse_tab_bg.png b/src/assets/images/warehouse_tab_bg.png new file mode 100644 index 0000000..3f6f73b Binary files /dev/null and b/src/assets/images/warehouse_tab_bg.png differ diff --git a/src/assets/styles/archives-manage.scss b/src/assets/styles/archives-manage.scss new file mode 100644 index 0000000..af9bd03 --- /dev/null +++ b/src/assets/styles/archives-manage.scss @@ -0,0 +1,1008 @@ +@import 'variables'; +@import 'mixin'; + +.filter-search, +.filter-rfid{ + @include btn_blue_style; + &:hover{ + @include btn_blue_hover; + } + &:focus{ + @include btn_blue_style; + } +} +.filter-refresh{ + @include btn_white_style; + &:hover{ + @include btn_white_hover; + } + &:focus{ + @include btn_white_style; + } +} + +.packing-head{ + display: flex; + justify-content: space-between; + align-items: center; + .el-input__inner { + padding-left: 100px; + border-radius: 3px; + } +} +.container-main{ + .left-tree-item{ + margin-bottom: 20px; + min-height: calc(100vh/2 - 105px); + &:last-child{ + margin-bottom: 0; + } + } +} + +// 库房可删 +.archives-handler-btn{ + .el-button{ + padding: 0 13px 0 3px; + span{ + margin-left: 5px; + } + &.packing-btn{ + border-color: $arcPurple; + background-color: $arcPurple; + &.is-disabled{ + border-color:#2B1D70; + background-color: #2B1D70; + } + } + &.part-btn{ + border-color: $arcCyan; + background-color: $arcCyan; + &.is-disabled{ + border-color:#075E6C; + background-color: #075E6C; + } + } + &.lending-btn{ + border-color: $arcRed; + background-color: $arcRed; + &.is-disabled{ + border-color:#7A2831; + background-color: #7A2831; + } + } + &.binding-btn{ + border-color: $arcGreen; + background-color: $arcGreen; + &.is-disabled{ + border-color:#0D5649; + background-color: #0D5649; + } + } + &.is-disabled{ + color: #666; + } + } + .iconfont{ + line-height: 30px; + } +} + +.archives-table, +.base-info{ + td.el-table__cell .row-state{ + display: block; + width: 60px; + height: 26px; + line-height: 24px; + margin: 0 auto; + border-radius: 3px; + color: #A6ADB6; + border: 1px solid #E6E8ED; + background-color: #F3F5F9; + } + .row-open{ + &.state-active{ + color: #563be1 !important; + border-color: #b5a7fa !important; + background-color: #ebe7ff !important; + } + } + .row-physical{ + &.state-active{ + color: #0348F3 !important; + border-color: #90B0F9 !important; + background-color: #EEF5FE !important; + } + } + .row-packing{ + &.state-active{ + color: #018BFF !important; + border-color: #9BD1FF !important; + background-color: #DCEDFD !important; + } + } + .row-warehousing{ + &.state-active{ + color: #FF8329!important; + border-color: #FEBD98 !important; + background-color: #FFF3E5 !important; + } + } + .row-lending{ + &.state-active{ + color: #FD7359 !important; + border-color: #FBC0B5 !important; + background-color: #FCECE9 !important; + } + } + .row-binding{ + &.state-active{ + color: #2ECAAC !important; + border-color: #B1EBDF !important; + background-color: #E8F8F5 !important; + } + } + .is-scrolling-left, + .is-scrolling-middle, + .is-scrolling-right{ + max-height: calc(100vh - 352px) !important; + } +} +.base-info .row-state{ + width: 68px; + height: 26px; + line-height: 24px; + text-align: center; + margin-top: -6px; + border-width: 1px; + border-style: solid; + border-radius: 26px; +} + +// 上传附件 +.upload-file{ + position: relative; + z-index: 1001; + .upload-curd{ + display: flex; + flex-direction: row; + margin: 0 32px 20px 32px; + } + .upload-demo{ + position: relative; + margin-right: 10px; + .el-upload-list{ + display: none; + position: absolute; + left: 0; + bottom: 0; + } + } +} + +.file-down, +.packing-handle-btn, +.packing-recall-btn, +.handOver-btn{ + display: block; + width: 64px; + height: 28px; + line-height: 26px; + padding: 0; + border-radius: 3px; + margin: 0 auto; + &::before{ + margin-right: 5px; + } +} +.file-down{ + padding: 0 !important; + @include btn_blue_style; + &:hover{ + @include btn_blue_hover; + } + &:focus{ + @include btn_blue_style; + } +} +.packing-handle-btn{ + background-color: transparent !important; + border-color: #41A4FF !important; + color: #41A4FF !important; +} +.packing-recall-btn{ + background-color: transparent !important; + border-color: #FD7359 !important; + color: #FD7359 !important; +} + +// 绑定标签 +.bindingDialog{ + .el-dialog{ + width: 720px; + } + .el-dialog__body{ + padding: 35px 35px 58px 35px; + } +} +.rebinding { + display: flex; + justify-content: space-between; + padding: 50px 65px 35px 65px; + span{ + display: block; + width: 60px; + line-height: 36px; + color: #3A99FD; + } + .el-input { + .el-input__inner{ + font-size: 14px; + height: 36px; + line-height: 36px; + color: #fff; + border: 1px solid #3A99FD; + background-color: transparent; + } + } +} + +.binding-flow{ + .step-item{ + position: relative; + display: flex; + justify-content: space-between; + margin-bottom: 10px; + z-index: 1; + &::before{ + content: ""; + position: absolute; + left: 15px; + top: -48px; + width: 2px; + height: 45px; + border-left: 2px solid #0348F3; + opacity: 0.3; + z-index: 1; + } + &:first-child::before{ + display: none; + } + &.step-active{ + &::before{ + opacity: 1; + } + } + &.step-loading{ + &::before{ + opacity: 1; + border-left: 2px dashed #0348F3; + } + } + } + .step-left-num{ + position: relative; + display: block; + width: 30px; + height: 30px; + line-height: 28px; + border-radius: 50%; + font-size: 16px; + text-align: center; + color: #0348F3; + border: 2px solid #0348F3; + opacity: 0.3; + z-index: 4; + &.step-active{ + color: #fff; + background-color:#0348F3; + opacity: 1; + } + &.step-loading{ + color: #0348F3; + border: 2px solid #0348F3; + background-color: #fff; + &::before, + &::after{ + content: ""; + position: absolute; + left: 50%; + top: 50%; + margin: -15px 0 0 -15px; + width: 30px; + height: 30px; + border-radius: 50%; + border: 1px solid #0348F3; + z-index: 1; + } + &::before{ + animation: halo 2s linear 0.5s infinite; + } + &::after{ + animation: halo 2s linear 1.5s infinite; + } + } + } + // 晕开效果 + @keyframes halo { + 0% { + transform: scale(1); + -webkit-transform: scale(1); + opacity: 0.0; + } + 25% { + transform: scale(1); + -webkit-transform: scale(1); + opacity: 0.1; + } + 50% { + transform: scale(1); + -webkit-transform: scale(1); + opacity: 0.3; + } + 75% { + transform: scale(1.3); + -webkit-transform: scale(1.3); + opacity: 0.5; + } + 100% { + transform: scale(1.6); + -webkit-transform: scale(1.6); + opacity: 0.0; + } + } + .step-right-cont{ + flex: 1; + margin-left: 12px; + .step-title{ + font-size: 16px; + line-height: 30px; + color: #0348F3; + span{ + padding-left: 10px; + color: #0C0E1E; + } + } + .step-tip{ + padding: 0 10px; + height: 40px; + line-height: 40px; + color: #A6ADB6; + background-color: #EDEFF3; + border-radius: 4px; + &.tip-active{ + color: #545B65; + } + &.tip-error{ + color: #ED4A41; + } + } + } +} + +// 分卷装盒 +.partPackingDialog{ + .el-dialog{ + width: 950px !important; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + margin-top: 0 !important; + } + .dialog-footer{ + margin: 20px auto 0 auto; + padding-bottom: 20px; + } + .packing-head{ + margin-bottom: 20px; + .head-search{ + margin-bottom: 0; + } + } +} + +.selct-data-head{ + color: #545B65; + line-height: 30px; + span{ + display: inline-block; + padding: 0 2px; + color: #0C0E1E; + } +} + +.part-packing-cont{ + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; +} +.part-packing-item{ + width: calc(100%/2 - 10px); + .part-packing-title{ + position: relative; + padding: 0 12px; + height: 40px; + line-height: 40px; + font-size: 16px; + font-weight: normal; + color: #0C0E1E; + &::before{ + content: ""; + position: absolute; + left: 0; + top: 50%; + width: 3px; + height: 14px; + margin-top: -7px; + background-color: #0348F3; + } + } + .el-table{ + overflow-x: hidden; + overflow-y: auto; + border-top: none; + } +} + +.upload-btn{ + position: relative; + margin-right: 10px; + overflow: hidden; + #upFile{ + position: absolute; + left: 0; + top: 0; + opacity: 0; + height: 34px; + } +} + +// 借阅管理 +.el-dialog .el-dialog__body{ + .el-button.is-disabled, + .el-button.is-disabled:hover, + .el-button.is-disabled:focus{ + color: #b4c8fb; + border-color: #b4c8fb; + background-color: #f2f5fe; + } +} + +.crud-opts { + display: inline-block; +} + +.iconfont::before { + margin-right: 5px; +} + +.clear { + border-radius: 13px; + width: 80px; + height: 26px; + line-height: 26px; + display: inline-block; + text-align: center; +} + +.no-clear .clear { + color: $arcYellow; + border: 1px solid $arcYellow; +} + +.have-clear .clear { + color: $arcGreen; + border: 1px solid $arcGreen; +} + +.fail-clear .clear { + color: $arcRed; + border: 1px solid $arcRed; +} +.other-clear .clear { + color: $arcCyan; + border: 1px solid $arcCyan; +} +.error-clear-bg .clear{ + color: #fff; + background-color: $arcRed; +} +.have-clear-bg .clear{ + color: #fff; + background-color: $arcGreen; +} +.no-clear-bg .clear{ + color: #fff; + background-color: $arcYellow; +} + +//3D库房 +.iframe_box { + width: 100%; + height: calc(100vh - 285px); +} + +.warehouse { + display: flex; + max-height: calc(100vh - 184px); + overflow: hidden; + + .warehouse-left { + flex: 1; + } + + .warehouse-right { + width: 458px; + max-height: calc(100vh - 192px); + } +} + +.warehose-el-table .el-table__header-wrapper { + box-shadow: inset 0px 0px 6px 1px $mainColor; + background: none !important; +} + +.warehose-el-table .el-table__header .el-table__cell { + padding: 0; + height: 30px; + background: transparent; + .cell { + font-size: 14px; + } +} + +.light-blue { + background-color: #011E4F !important; +} + +// 20230712 抽屉 +.el-drawer__wrapper { + position: absolute; + top: -22px; + right: -22px; + height: calc(100vh - 138px); +} +[data-theme=dark] .el-drawer__wrapper { + position: absolute; + top: -42px; + right: -22px; + height: calc(100vh - 159px); +} + +.management-drawer.el-drawer__wrapper { + height: calc(100vh - 118px); +} +[data-theme=dark] .management-drawer.el-drawer__wrapper { + height: calc(100vh - 159px); +} + +.storage-drawer.el-drawer__wrapper { + height: calc(100vh - 133px); +} +[data-theme=dark] .storage-drawer.el-drawer__wrapper { + height: calc(100vh - 173px); +} + +.el-drawer{ + overflow: visible; +} +[data-theme=dark] .el-drawer{ + background-color: #031435; + border: 1px solid #113d72; +} + +.el-drawer.rtl{ + top: 0; + box-shadow: -8px 0px 10px 0px rgba(0,0,0,0.08); + border: 1px solid #E6E8ED; +} + +[data-theme=dark] .el-drawer.rtl{ + border: 1px solid #113d72; +} + +.el-drawer__body{ + position: relative; + overflow: visible; + padding-top: 54px; +} + +[data-theme=dark] .el-drawer__body{ + padding-top: 40px; +} + +.anjuan-drawer .el-drawer__body{ + padding-top: 23px; +} + +[data-theme=dark] .anjuan-drawer .el-drawer__body{ + padding-top: 42px; +} + +[data-theme=dark] .anjuan-drawer .el-drawer.rtl { + border-top: none; +} + +.management-drawer.el-drawer__wrapper { + .el-drawer__body{ + padding: 20px; + } +} +.storage-drawer.el-drawer__wrapper { + .el-drawer__body{ + padding: 54px 20px 20px 20px; + } +} + + +// .closed-btn{ +// position: relative; +// position: absolute; +// left: -22px; +// top: 50%; +// display: block; +// width: 22px; +// height: 60px; +// margin-top: -30px; +// background: url("~@/assets/images/collect/zk.png") no-repeat; +// background-size: 22px 60px; +// z-index: 999; +// cursor: pointer; +// } + +// .collect-header{ +// display: flex; +// justify-content: space-between; +// height: 73px; +// padding: 20px 10px 0 20px; +// border-top: 1px solid #EDEFF3; +// h4{ +// flex: 1; +// padding-left: 62px; +// line-height: 40px; +// background: url("~@/assets/images/collect/xm.png") no-repeat left top; +// background-size: 47px 40px; +// font-size: 18px; +// font-weight: 500; +// color: #0C0E1E; +// &.is-anjuan{ +// background: url("~@/assets/images/collect/aj.png") no-repeat left -2px; +// background-size: 50px 39px; +// } +// &.is-juannei{ +// background: url("~@/assets/images/collect/jn.png") no-repeat left top; +// background-size: 46px 49px; +// } +// &.is-file{ +// background: url("~@/assets/images/collect/yw.png") no-repeat left -6px; +// background-size: 50px 46px; +// } +// } +// .head-search{ +// margin-right: 30px; +// .el-button{ +// margin-left: 10px; +// } +// &.is-recycle{ +// margin-right: 10px; +// } +// } +// } + +// [data-theme=dark] .collect-header{ +// border-top: none; +// h4{ +// color: #fff; +// } +// } + +.collect-menu{ + .el-menu.el-menu--horizontal{ + border-bottom: none; + background-color: transparent; + } + .el-submenu{ + width: 76px; + height: 32px; + border-radius: 3px; + border: 1px solid #0348F3; + margin-right: 10px; + .el-submenu__title{ + display: flex; + justify-content: center; + align-items: center; + padding: 0; + height: 30px; + line-height: 32px; + font-weight: bold; + color: #0348F3; + border-bottom: none; + i.iconfont{ + color: #0348F3; + margin-right: 0; + } + span{ + display: block; + } + .el-submenu__icon-arrow { + display: none; + } + &:focus, + &:hover{ + color: #0348F3; + } + } + &.is-active{ + .el-submenu__title{ + border-bottom: none; + color: #0348F3; + } + } + } +} + +.el-menu--popup{ + min-width: 120px; + padding: 10px 0; + border-radius: 3px; + border: 1px solid #E6E8ED; + .collect-submenu-group{ + .el-menu-item{ + padding: 0 18px !important; + color: #0C0E1E; + &:hover, + &:focus, + &.active-item{ + background: #F5F9FC; + color: #0348F3; + } + } + .el-menu-item-group__title{ + font-size: 14px; + padding: 0 18px !important; + line-height: 36px; + color: #A6ADB6; + } + &.submenu-tree{ + .el-menu-item{ + padding: 0 18px 0 32px !important; + } + } + } +} + +.collect-menu-item{ + position: relative; + .collect-submenu{ + display: none; + position: absolute; + top: 40px; + right: 0; + width: 120px; + height: 125px; + background: #FFFFFF; + box-shadow: 0px 2px 10px 2px rgba(0,0,0,0.08); + border-radius: 3px; + border: 1px solid #E6E8ED; + transform-origin: 95% 40%; + transition: all 0.3s ease-in-out; + } +} + +.fileUpload-dialog { + .el-dialog{ + width: 536px; + } +} + +.collect-filter{ + display: flex; + height: 32px; + justify-content: flex-end; + .vue-treeselect{ + font-size: 12px; + margin-right: 10px !important; + .vue-treeselect__control{ + height: 33px !important; + } + } +} + +.mangement-fixed-top{ + text-align: right; + flex: 1; + color: #545B65; +} + +.drag-tip { + display: block; + padding-left: 20px; + padding-bottom: 10px; + font-style: normal; + font-weight: bold; + font-size: 12px; +} + +.spk-a { + display: inline-block; + width: 10px; + height: 10px; + border-radius: 5px; + background-color:#2FD490; + box-shadow: 0px 3px 4px 0px rgba(17,243,189,0.35); + vertical-align: middle; +} +.off-line { + display: inline-block; + width: 10px; + height: 10px; + border-radius: 5px; + background-color: #ED4A41; + box-shadow: 0px 3px 4px 0px rgba(252,122,122,0.35); + vertical-align: middle; +} + +.device-child-btn{ + width: auto !important; + padding: 0 14px !important; + line-height: 28px !important; + font-weight: bold !important; + color: #0348F3 !important; + border-color: #0348F3 !important; +} + +.device-sulan-btn{ + display: inline-block; + padding: 0 7px; + color: #FF8329; + background-color: #FFF3E5; + border: 1px solid #FEBD98; + border-radius: 3px; + cursor: pointer; +} + +.device-edit-btn{ + display: inline-block; + padding: 0 6px 0 10px; + margin: 0 4px; + text-align: center; + color: #0348F3; + background-color: #DCEDFD; + border: 1px solid #9BD1FF; + border-radius: 3px; + cursor: pointer; +} + +.device-delt-btn{ + display: inline-block; + padding: 0 6px 0 10px; + text-align: center; + color: #ED4A41; + background-color: #FCECE9; + border: 1px solid #FBC0B5; + border-radius: 3px; + cursor: pointer; +} +.detail-tab{ + position: relative; +} +.double-click-btn{ + // position: absolute; + // right: 0; + // top: 0; + display: flex; + justify-content: flex-end; + align-items: center; + line-height: 26px; + margin: -6px 0 4px 0; + span{ + display: inline-block; + font-size: 12px; + color: #545B65; + } + i{ + display: inline-block; + color: #0348F3; + } +} + +.filter-rfid{ + margin-left: 10px; + padding: 0 13px; + height: 32px; + line-height: 30px; + &.is-disabled, + &.is-disabled:focus{ + border-color: #0348F3 !important; + background-color: rgba(31, 85, 235, 0.20) !important; + color: #0348F3 !important; + opacity: 0.6; + } + .iconfont{ + font-size: 20px; + } +} + +.upload-container{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 496px; + min-height: 178px; + padding: 12px; + border-radius: 3px; + background: #EDEFF3; + border: 1px dashed #BCC2C7; + .upload-icon{ + font-size: 32px; + color: #1F55EB; + } + .el-upload__tip{ + font-size: 12px; + color: #A6ADB6; + } + .file-list{ + font-size: 12px; + line-height: 24px; + color: #545B65; + } +} + +.upload-input{ + position: relative; + margin-top: 16px; + width: 104px; + height: 32px; + & input{ + position: absolute; + left: 0; + top: 0; + height: 32px; + opacity: 0; + } +} +.upload-zip{ + width: 104px; + height: 32px; + line-height: 32px; + font-size: 14px; + color: #fff; + text-align: center; + border-radius: 3px; + background: #1F55EB; + & i{ + font-size: 13px; + } +} + +.message-type-title{ + display: block; + padding-left: 33px; + height: 33px; + line-height: 33px; + margin-bottom: 15px; + &.type-title1{ + background: url('~@/assets/images/icon/xttz.png') no-repeat left center; + background-size: 23px 23px; + } + &.type-title2{ + background: url('~@/assets/images/icon/lcdd.png') no-repeat left center; + background-size: 23px 23px; + } + &.type-title3{ + background: url('~@/assets/images/icon/lcwc.png') no-repeat left center; + background-size: 23px 23px; + } + &.type-title4{ + background: url('~@/assets/images/icon/fqdq.png') no-repeat left center; + background-size: 23px 23px; + } + &.type-title5{ + background: url('~@/assets/images/icon/jjdq.png') no-repeat left center; + background-size: 23px 23px; + } +} \ No newline at end of file diff --git a/src/assets/styles/digitalScreen.scss b/src/assets/styles/digitalScreen.scss new file mode 100644 index 0000000..c16944c --- /dev/null +++ b/src/assets/styles/digitalScreen.scss @@ -0,0 +1,371 @@ +.config-title{ + position: relative; + display: flex; + justify-content: flex-start; + align-items: center; + color: #0c0e1e; + height: 40px; + line-height: 40px; + margin-bottom: 16px; + overflow: hidden; + p{ + font-weight: bold; + width: 90px; + } + .title-readonly { + width: 600px; + height: 32px; + line-height: 32px; + padding: 0 15px; + border: 1px solid #dcdfe6; + border-radius: 4px; + background-color: #fff; + cursor: default; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: #606266; + font-size: 13px; + } + .double-click-btn{ + margin: 0 0 0 20px; + color: #f56c6c; + } +} + +.screen-content-title{ + display: flex; + justify-content: flex-start; + align-items: center; + border-left: 3px solid #0348F3; + line-height: 30px; + padding-left: 10px; + font-size: 14px; + h4{ + font-size: 18px; + color: #0c0e1e; + margin-right: 10px; + } + .el-tag{ + margin-right: 10px; + } + .el-tag--small{ + background-color: #e7faf0; + border-color: #d0f5e0; + color: #12C47A; + } + .el-tag--danger{ + background-color: #ffeded; + border-color: #f65163; + color: #f65163; + } + p{ + span{ + display: inline-block; + padding: 0 3px; + font-weight: bold; + color: #0348F3; + } + } +} +.screen-remarks{ + margin-top: 12px; + padding: 8px; + background-color: #EEF5FE; + font-size: 14px; + line-height: 22px; + border-radius: 4px; +} +.area-config{ + .config-item{ + padding: 15px 0; + } + .config-item-main{ + display: flex; + justify-content: flex-start; + align-items: flex-start; + line-height: 32px; + .data-title{ + display: block; + width: 80px; + text-align: right; + margin-right: 20px; + } + + .el-radio-group{ + .el-radio{ + line-height: 32px; + } + } + } + .library-form{ + padding-left: 100px; + margin-top: 10px; + .el-input{ + width: 240px !important; + } + .config-remarks{ + margin-left: 100px; + } + .edit-readonly { + width: 240px !important; + } + } + .el-form{ + .el-input{ + width: 340px; + margin-right: 20px; + } + .edit-readonly{ + width: 340px; + } + ::v-deep .el-form-item__content{ + height: 40px; + overflow: hidden; + } + } + + .edit-readonly { + display: inline-block; + height: 32px; + line-height: 32px; + padding: 0 15px; + border: 1px solid #dcdfe6; + border-radius: 4px; + background-color: #fff; + margin-right: 20px; + cursor: default; + color: #606266; + font-size: 13px; + &:hover { + border-color: #c0c4cc; + } + } + + .config-remarks{ + font-size: 12px; + line-height: 18px; + color: #9098a4; + margin-left: 200px; + } + .upload-item{ + display: flex; + justify-content: flex-start; + p{ + width: 100px; + text-align: right; + font-size: 14px; + color: #606266; + padding: 0 12px 0 0; + font-weight: bold; + } + } + .avatar-uploader { + ::v-deep .el-upload { + border: 1px dashed #d9d9d9; + border-radius: 6px; + cursor: pointer; + position: relative; + overflow: hidden; + &:hover { + border-color: #409EFF; + } + } + } + .avatar-uploader-icon { + font-size: 28px; + color: #8c939d; + width: 100px; + height: 100px; + line-height: 100px; + text-align: center; + } + .avatar { + width: 100px; + height: 100px; + display: block; + } + // .book-list-upload{ + // display: flex; + // flex-wrap: nowrap; + // gap: 10px; + // overflow-x: auto; // 超出宽度时显示横向滚动条 + // scrollbar-width: thin; + // max-width: 1000px; + // } + .book-swiper-wrapper { + position: relative; + // width: 100%; + // padding: 0 20px; + max-width: 1140px; + overflow: visible !important; // 避免意外截断 + } + .book-swiper { + width: 100%; + } + .book-list-item{ + position: relative; + width: 110px; + height: 160px; + flex-shrink: 0; // 禁止压缩,保持固定尺寸 + // border: 2px solid #fff; + border-radius: 4px; + transition: all 0.2s; + margin: 0 5px; + background-color: #c0c4cc; + // &:hover { + // border-color: #0348F3; // hover时高亮边框 + // box-shadow: 0 2px 8px rgba(3, 72, 243, 0.1); + // } + img{ + display: block; + width: 100%; + height: 100%; + object-fit: cover; + } + .book-select, .book-delete { + // position: absolute; + // bottom: 3px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + transition: all 0.2s; + z-index: 10; + .iconfont{ + font-size: 18px; + } + } + .book-select { + // left: 6px; + .icon-wancheng { + display: none; + color: #fff; + } + .icon-weixuan { + color: #fff; + } + + } + + .book-delete { + // right: 3px; + .icon-shanchu { + font-size: 16px; + color: #ED4A41; + } + } + // 选中状态样式 + &:has(.icon-wancheng:not([style*="display: none"])) { + .icon-wancheng { + display: block; + } + .icon-weixuan { + display: none; + } + border-color: #0348F3; + } + + &:hover { + border-color: #c9d4f0; + box-shadow: 0 2px 8px rgba(3, 72, 243, 0.1); + } + + &.book-list-item--selected { + position: relative; + // background:rgba(0,0,0,0.5); + // border-color: #ED4A41; + // box-shadow: 0 2px 12px rgba(3, 72, 243, 0.2); + .select-style{ + position: relative; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + .select-mask{ + width: 100%; + height: 100%; + background:rgba(0,0,0,0.3); + } + .icon-wancheng{ + position: absolute; + right: 10px; + top: 10px; + z-index: 9999; + color: #fff; + font-size: 26px; + } + } + + } + } + .book-upload-btn{ + width: 160px; + height: 160px; + text-align: center; + border: 1px dashed #d9d9d9; + border-radius: 6px; + cursor: pointer; + position: relative; + overflow: hidden; + margin: 0 0 0 10px; + .iconfont { + line-height: 160px; + font-size: 30px; + color: #8c939d; + } + } + // .book-recommend{ + // position: relative; + // padding-bottom: 40px; + // } + // .batch-delete-btn{ + // position: absolute; + // bottom: 0; + // left: 100px; + // } +} + +// 输入框聚焦样式增强 +::v-deep .el-input__inner:focus { + border-color: #0348f3; + box-shadow: 0 0 0 2px rgba(3, 72, 243, 0.2); +} + +.upload-img-input{ + position: relative; + width: 120px; + height: 120px; + & input{ + position: absolute; + left: 0; + top: 0; + width: 120px; + height: 120px; + opacity: 0; + } +} +.upload-libImg{ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 120px; + height: 120px; + font-size: 14px; + font-weight: bold; + color: #1F55EB; + text-align: center; + border: 1px dashed #BCC2C7; + background-color: #EDEFF3; + border-radius: 4px; + & i{ + font-size: 30px; + } +} + +// 选中时图片轻微缩放增强反馈 +.book-list-item--selected .book-img{ + transform: scale(0.95); +} \ No newline at end of file diff --git a/src/assets/styles/element-ui.scss b/src/assets/styles/element-ui.scss new file mode 100644 index 0000000..416256f --- /dev/null +++ b/src/assets/styles/element-ui.scss @@ -0,0 +1,79 @@ +// cover some element-ui styles +.el-breadcrumb__inner, +.el-breadcrumb__inner a { + @include breadcrumb-text; + font-weight: 400 !important; +} + +.el-upload { + input[type="file"] { + display: none !important; + } +} + +.el-upload__input { + display: none; +} + +.cell { + .el-tag { + margin-right: 0; + } +} + +.small-padding { + .cell { + padding-left: 5px; + padding-right: 5px; + } +} + +.fixed-width { + .el-button--mini { + padding: 7px 10px; + width: 60px; + } +} + +.status-col { + .cell { + padding: 0 10px; + text-align: center; + + .el-tag { + margin-right: 0; + } + } +} + +// 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 + } +} + +// fix date-picker ui bug in filter-item +.el-range-editor.el-input__inner { + display: inline-flex !important; +} diff --git a/src/assets/styles/element-variables.scss b/src/assets/styles/element-variables.scss new file mode 100644 index 0000000..9a646ff --- /dev/null +++ b/src/assets/styles/element-variables.scss @@ -0,0 +1,31 @@ +/** +* 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: #1890ff; +$--color-success: #13ce66; +$--color-warning: #FFBA00; +$--color-danger: #ff4949; +// $--color-info: #1E1E1E; + +$--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 "../../../node_modules/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/src/assets/styles/index.scss b/src/assets/styles/index.scss new file mode 100644 index 0000000..85dd5f9 --- /dev/null +++ b/src/assets/styles/index.scss @@ -0,0 +1,346 @@ +@import 'variables'; +@import 'mixin'; +@import 'transition'; +@import 'element-ui'; +@import 'sidebar'; +@import '~@/assets/iconfonts/light/iconfont.css'; +@import 'yxk-admin'; +@import 'archives-manage'; +@import 'manage'; + +@font-face { + font-family: "logo-Regular"; + src: url('~@/assets/fonts/锐字潮牌可变真言2.0.ttf'); + font-weight: normal; + font-style: normal; +} + +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 { + margin: 0; + padding: 0; + box-sizing: inherit; +} + +.no-padding { + padding: 0 !important; +} + +.padding-content { + padding: 4px 0; +} + +a:focus, +a:active { + outline: none; +} + +a, +a:focus, +a:hover { + cursor: pointer; + color: inherit; + text-decoration: none; +} + +div:focus { + outline: none; +} + +.fr { + float: right; +} + +.fl { + float: left; +} + +.pr-5 { + padding-right: 5px; +} + +.pl-5 { + padding-left: 5px; +} + +.block { + display: block; +} + +.pointer { + cursor: pointer; +} + +.inlineBlock { + display: block; +} + +.clearfix { + &:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; + } +} + +aside { + background: #eef1f6; + padding: 8px 24px; + margin-bottom: 20px; + border-radius: 2px; + display: block; + line-height: 30px; + font-size: 16px; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; + color: #2c3e50; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + a { + color: #337ab7; + cursor: pointer; + &:hover { + color: rgb(32, 160, 255); + } + } +} + +ul{ + margin: 0; + padding: 0; + li{ + list-style: none; + } +} + +//main-container全局样式 +.app-wrapper{ + background-color: $main-bg-light; +} + +.app-container { + margin: 0 20px 20px 20px; +} + +.components-container { + margin: 30px 50px; + position: relative; +} + +.pagination-container { + margin-top: 30px; +} + +.text-center { + text-align: center +} + +.sub-navbar { + height: 50px; + line-height: 50px; + position: relative; + width: 100%; + text-align: right; + padding-right: 20px; + transition: 600ms ease position; + background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%); + .subtitle { + font-size: 20px; + color: #fff; + } + + &.draft { + background: #d0d0d0; + } + + &.deleted { + background: #d0d0d0; + } +} + +.link-type, +.link-type:focus { + color: #337ab7; + cursor: pointer; + + &:hover { + color: rgb(32, 160, 255); + } +} + +//refine vue-multiselect plugin +.multiselect { + line-height: 16px; +} + +.multiselect--active { + z-index: 1000 !important; +} + +/**滚动条的宽度*/ +::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +//滚动条的滑块 +::-webkit-scrollbar-thumb { + @include scrollBar-bg; + border-radius: 4px; +} + +//只需要加上这一行 +::-webkit-scrollbar-corner { + // @include scrollBar-bg; + background-color: transparent; +} + +// 设置loading-mask +.el-loading-mask{ + background-color: rgba(0,0,0,0.2); +} + + +.iconfont{ + font-weight: normal; +} + +@media screen and (min-width:1200px) and (max-width:1536px){ + .tab-content .tab-nav { + li{ + font-size: 14px; + padding: 0 4px !important; + letter-spacing: normal; + &:first-child{ + padding: 0 12px !important; + } + } + .tab-right-img{ + width: 73px !important; + } + } + .des-preview-left{ + width: 510px; + flex: auto !important; + .des-form{ + width: 100% !important; + .el-input__inner{ + width: 100% !important; + } + .input-num .el-input__inner{ + width: 30px !important; + } + .input-num { + .el-form-item__content .el-input, + .el-input-number{ + width: 100% !important; + } + .el-input__inner{ + padding: 0; + text-align: center; + } + } + } + } + // 档案管理 + .tree-scroll{ + height: calc(100vh - 480px) !important; + } + // 库房 + .warehouse-left{ + .msg-list{ + li{ + .msg-list-svg{ + font-size: 26px !important; + margin-left: 8px !important; + } + .msg-list-unit{ + font-size: 10px !important; + } + .msg-list-num{ + font-size: 20px !important; + top: 20px !important; + } + &.msg-pm{ + .msg-list-svg{ + font-size: 32px !important; + } + .msg-list-unit{ + left: -8px !important; + } + } + } + } + } +} + + +.previewHeader{ + position: relative; + padding: 0 20px !important; + height: 40px; + line-height: 40px; + font-weight: bold; +} +.previewClose{ + top: 50% !important; + transform: translateY(-50%); +} +.previewBodyUtil{ + display: flex; + justify-content: flex-end; + align-items: center; + height: 40px !important; +} +.previewBodyUtilPrintBtn{ + position: static !important; + top: 0 !important; + left: 0 !important; + margin-top: 0 !important; + margin-right: 30px !important; +} + +.login-info{ + .el-dialog__body{ + padding: 10px 20px 30px 20px; + line-height: 30px; + color:#0C0E1E; + h4{ + font-size: 18px; + } + .text-item{ + margin-bottom: 10px; + h5{ + font-size: 14px; + } + p{ + text-indent: 2em; + } + } + } +} \ No newline at end of file diff --git a/src/assets/styles/manage.scss b/src/assets/styles/manage.scss new file mode 100644 index 0000000..a5031fa --- /dev/null +++ b/src/assets/styles/manage.scss @@ -0,0 +1,670 @@ +@import 'variables'; +@import 'mixin'; + +.venue-header{ + display: flex; + justify-content: space-between; + align-items: center; + padding: 16px 30px 10px 20px; + color: #0C0E1E; + background-color: #fff; + border-bottom: 1px solid #EDEFF3; + h4{ + flex: 1; + i{ + font-size: 22px; + color: #0348F3; + padding-right: 6px; + } + } + p{ + font-size: 14px; + color: #9098a4; + i{ + font-size: 18px; + } + } + .bookshelf-area{ + padding-right: 30px; + font-weight: bold; + color: #0348F3; + } +} + +.dataScreening-header{ + h4{ + flex: none; + } + .bookshelf-area{ + position: relative; + display: flex; + justify-content: flex-start; + align-items: center; + flex: 1; + font-size: 14px; + padding: 4px 30px; + a{ + display: block; + } + span{ + display: block; + padding: 0 6px; + } + .double-click-btn{ + position: inherit; + margin: 0 0 0 20px !important; + font-weight: normal; + border: 1px solid #545b65; + border-radius: 13px; + line-height: 18px; + background-color: #e2e9f3; + } + } +} + +.venue-content{ + display: flex; + justify-content: space-between; + // height: calc(100% - 52px); +} + +.venue-left{ + width: calc(100% / 2 - 20px); + margin-right: 20px; + @include bg_color; + @include box_padding; + .head-container{ + margin-bottom: 20px; + .crud-opts{ + justify-content: center; + } + } + .container-left{ + @include tree_height_min; + } +} +.venue-right{ + width: calc(100% / 2); + @include bg_color; + @include box_padding; + .head-container{ + margin-bottom: 20px; + } + .container-right{ + @include table_height_min; + &.tab-content{ + @include tab_height_min_lib; + } + } +} + +.venue-content{ + .tab-content{ + position: relative; + @include row_tab_style; + .tab-nav{ + margin-bottom: 0; + } + } +} + + +.venue-preview{ + width: 100%; + height: 630px; + margin-top: 20px; + overflow: hidden; + img{ + display: block; + max-width: 100%; + max-height: 100%; + } +} + +::v-deep .book-cover-upload { + display: flex; + justify-content: flex-start; + .el-form-item__content{ + position: relative; + width: 580px !important; + display: flex; + justify-content: space-between; + .input-style{ + width: 490px; + height: 34px; + line-height: 34px; + padding: 0 20px; + border: 1px solid #e6e8ed; + border-radius: 3px; + &.error-box{ + border-color: #ed4a41; + } + } + .error-tip{ + position: absolute; + left: 0; + bottom: -26px; + font-size: 12px; + color: #ff4949; + } + } +} + +.venue-mark{ + position: absolute; + right: 10px; + top: 0; + i{ + font-weight: bold; + } +} +.mark-dialog{ + .el-dialog{ + width: auto !important; + } +} +.mark-handle{ + display: flex; + justify-content: space-between; + align-items: center; + .mark-img{ + width: 900px; + overflow: hidden; + img{ + display: block; + width: 100%; + } + } + .mark-right{ + // display: flex; + // flex-direction: column; + // justify-content: space-between; + width: 200px; + padding: 0 20px; + } + .mark-info{ + font-size: 16px; + li{ + margin-bottom: 14px; + p{ + font-weight: bold; + color: #0C0E1E; + line-height: 30px; + } + } + } +} +.mark-button{ + margin-top: 80px; + .el-button{ + width: 150px; + height: 40px; + line-height: 40px; + padding: 0; + margin-bottom: 10px; + margin-left: 0; + border-color: #E6E8ED; + background-color: transparent; + color: #545B65; + font-weight: normal; + &.el-button--primary{ + color: #fff; + background-color: #0348F3; + border-color: #0348F3; + } + } +} + + +.bookshelf-main{ + height: calc(100% - 80px); + padding: 20px; + background-color: #fff; +} + +.bookshelf-top{ + display: flex; + justify-content: space-between; + align-items: flex-start; +} + +.bookshelf-info{ + flex: 1; + display: flex; + justify-content: flex-start; + flex-wrap: wrap; + li{ + width: calc(100% / 3); + line-height: 40px; + color: #545B65; + p{ + display: inline-block; + color: #0C0E1E; + } + } +} + +.bookshelf-layer-info{ + display: flex; + justify-content: space-between; + +} + +.bookshelf-left{ + flex: 1; +} + +.bookshelf-right-info{ + width: 260px; + padding: 20px; + margin: 52px 0 0 0; + border: 1px solid #EDEFF3; + .layer-status{ + display: flex; + justify-content: flex-start; + .row-state{ + margin-right: 10px; + padding: 0 5px; + // width: 50%; + height: 20px; + line-height: 20px; + font-size: 12px; + } + } + .layer-name{ + font-size: 20px; + font-weight: bold; + // text-align: center; + color: #0C0E1E; + padding: 20px 0; + } + .layer-code-sort{ + // display: flex; + // justify-content: space-between; + // align-items: stretch; + ul { + flex: 1; + li { + margin-bottom: 10px; + p { + font-weight: bold; + color: #0C0E1E; + margin-bottom: 5px; + } + &:last-child{ + margin-bottom: 0; + } + // span{ + // display: block; + // height: 26px; + // line-height: 26px; + // } + } + } + .edit-callNumber{ + // width: 90px; + font-size: 14px; + height: 30px; + line-height: 30px; + padding: 0 5px !important; + i{ + display: block; + font-style: normal; + text-align: justify; + &:first-child{ + padding-bottom: 4px; + } + } + } + } + .layer-handle{ + padding-top: 30px; + margin-top: 30px; + border-top: 1px solid #EDEFF3; + li{ + display: flex; + justify-content: flex-start; + margin-bottom: 20px; + p{ + padding-right: 20px; + font-weight: bold; + color: #0C0E1E; + } + } + } +} + +.cabinet-row{ + display: flex; + // flex: 1; + flex-wrap: wrap; + text-align: center; + // height: 100%; + .cabinet-cell{ + position: relative; + font-size: 14px; + color: #0C0E1E; + border: 2px solid #fff; + background-color: #E8F2FF; + border-radius: 3px; + overflow: hidden; + cursor: pointer; + // &:nth-last-of-type(-n+4) { + // margin-bottom: 0; + // } + // &:nth-child(4n){ + // margin-right: 0; + // } + span{ + display: block; + width: 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + z-index: 9; + } + &.active{ + color: #fff; + background-color: #0348F3; + } + } + .in-all, .out-all, .out-part, .in-part{ + position: relative; + width: 100%; + span{ + display: block; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + z-index: 9; + } + } + .in-all, .out-all{ + height: 100%; + } + .out-part, .in-part{ + height: 50%; + } + .out-all, .out-part{ + background-color: #F65163; + } + .in-all, .in-part{ + background-color: #1AAE93; + } +} + +.tag-info{ + display: flex; + justify-content: flex-start; + align-items: center; + p{ + font-size: 14px; + font-weight: bold; + } +} + +.tag-sort{ + i{ + color: #0348F3; + } +} + +.tag-place{ + i{ + color: #ED4A41; + } +} + +.tag-in{ + i{ + color: #2ECAAC; + } +} + +.tag-all{ + i{ + color: #0C0E1E; + } +} + +.check-btn{ + color: #fff !important; + background-color: #0348f3; +} + + +.el-button.check-btn:hover, +.el-button.check-btn:focus, +.el-button--info.check-btn.is-plain:hover, +.el-button--info.check-btn.is-plain:focus{ + color: #fff !important; + background-color: #0348f3 !important; +} + +.dataScreening-content.venue-content{ + position: relative; + overflow: hidden; + background-color: #fff; + .crud-opts{ + position: absolute; + right: 20px; + top: 10px; + } + .venue-left{ + flex: 1; + margin-right: 0 !important; + height: calc(100vh - 192px); + overflow: hidden; + .venue-preview{ + height: 633px !important; + } + } + .venue-right{ + display: flex; + flex-direction: column; + width: 300px; + height: calc(100vh - 192px); + padding: 50px 0 20px 0 !important; + margin: 0 20px 0 0 !important; + .lib-right-item{ + position: relative; + // padding: 10px; + // height: calc(100% / 3); + padding-bottom: 10px; + margin-bottom: 10px; + border: 1px solid #E8F2FF; + border-radius: 4px; + h4{ + padding: 6px 10px; + background-color: #E8F2FF; + color: #000; + line-height: 30px; + border-bottom: 1px solid #edeff3; + } + .refresh-date{ + position: absolute; + right: 14px; + top: 10px; + font-size: 12px; + line-height: 30px; + } + } + } + + .data-right-list { + padding-top: 10px; + li{ + display: flex; + justify-content: flex-start; + align-items: center; + line-height: 36px; + font-size: 14px; + p{ + width: 80px; + font-weight: bold; + text-align: right; + } + span{ + width: 140px; + display: block; + text-align: right; + i{ + font-style: normal; + font-weight: bold; + padding: 0 10px; + color: #0348f3; + } + &.percentage{ + width: auto; + } + } + } + } + .total-data{ + display: flex; + justify-content: flex-start; + align-items: center; + position: absolute; + right: 12px; + top: 60px; + font-size: 14px; + padding: 4px 6px; + color: #fff; + background-color: rgba(3,72,243,.9); + border-radius: 4px; + z-index: 999; + p{ + margin-left: 10px; + } + } +} + +.tooltip-style, +.popover-external-set { + width: 250px; + background:rgba(0,0,0,1); + color: #fff; + border-radius: 6px; +} + +.tooltip-style{ + display:none; + position:absolute; +} + +.popover-external-set { + position: fixed; + z-index: 1000; +} + +.tooltip-style, +.popover-content-set{ + .tooltip-top{ + display: flex; + justify-content: space-between; + align-items: center; + font-size: 14px; + height: 40px; + line-height: 40px; + padding: 0 10px; + border-bottom: 1px solid #fff; + } + .tooltip-top span, + .tooltip-top i{ + font-size: 12px; + font-style: normal; + } + ul{ + padding: 10px; + } + ul li{ + display: flex; + justify-content: flex-start; + align-items: center; + line-height: 24px; + font-style: normal; + font-size: 12px; + } + + ul li p{ + width: 60px; + font-weight: bold; + text-align: right; + } + ul li span, + ul li em{ + width: 100px; + display: block; + text-align: right; + font-style: normal; + } + ul li i{ + font-style: normal; + font-weight: bold; + padding: 0 10px; + color: #0348f3; + } + ul li span.percentage, + ul li em.percentage{ + width: auto; + } + + .tag-item{ + display: block; + // width: 50px; + height: 18px; + line-height: 16px; + padding: 0 4px; + border-radius: 3px; + font-size: 12px; + color: #A6ADB6; + border: 1px solid #E6E8ED; + background-color: #F3F5F9; + text-align: center; + &.tag-sort{ + color: #FD7359 !important; + border-color: #FBC0B5 !important; + background-color: #FCECE9 !important; + } + &.tag-place{ + color: #018BFF !important; + border-color: #9BD1FF !important; + background-color: #DCEDFD !important; + } + &.tag-all{ + color: #0C0E1E; + border-color: #545B65 !important; + background-color: #E6E8ED !important; + } + } +} +.tip-bottom{ + font-size: 12px; + padding: 5px 0 10px 0; + text-align: center; +} + +.swiper-title{ + font-size: 16px; + color: #545B65; + .swiper-wrapper{ + margin: 10px 0; + border-bottom: 1px solid #EDEFF3; + } +} +.swiper-slide-title { + width: auto !important; + margin-top: -10px; + margin-right: 20px; + cursor: pointer; + .tab-name { + padding: 10px; + &.active { + padding-bottom: 10px; + color: #0348F3; + border-bottom: 3px solid #0348F3; + } + } +} \ No newline at end of file diff --git a/src/assets/styles/mixin.scss b/src/assets/styles/mixin.scss new file mode 100644 index 0000000..e87da84 --- /dev/null +++ b/src/assets/styles/mixin.scss @@ -0,0 +1,1106 @@ +@import "variables"; +@mixin clearfix { + &:after { + content: ""; + display: table; + clear: both; + } +} + +@mixin btn_blue_style{ + [data-theme="light"] & { + background-color: #0348F3; + border-color: #0348F3; + color: #fff !important; + } +} + +@mixin btn_blue_hover{ + [data-theme="light"] & { + background-color: #4579FA; + border-color: #4579FA; + } +} + +@mixin btn_white_style{ + [data-theme="light"] & { + background-color: #fff; + border-color: #E3E7EE; + color: #545B65 !important; + } +} + +@mixin btn_white_hover{ + [data-theme="light"] & { + background-color: #F7F9FA; + } +} + +@mixin btn_hover{ + [data-theme="dark"] & { + background-color: #02255F; + } + [data-theme="light"] & { + background-color: #0348F3; + } +} + +@mixin scrollBar-bg{ + [data-theme="dark"] & { + background-color: #13439E; + } + [data-theme="light"] & { + background-color:#0348F3; + } +} + +@mixin font_color($color) { + color: $color; + [data-theme="dark"] & { + color: $font-color-dark; + } + [data-theme="light"] & { + color: $font-color-light; + } +} + +@mixin shadow-set(){ + [data-theme="dark"] & { + box-shadow: 5px 2px 10px 1px rgba(15,164,222,0.16); + } +} + +// siderBar +@mixin siderBar-set(){ + [data-theme="dark"] & { + background: url(~@/assets/images/sidebar_bg.png) #031435 no-repeat right bottom; + background-size: contain; + box-shadow: 5px 2px 10px 1px rgba(15,164,222,0.16); + } + [data-theme="light"] & { + background: linear-gradient(180deg, #2B67DD 0%, #4180FB 100%); + color: #fff; + } +} + +@mixin siderBar-submenu-set(){ + [data-theme="light"] & { + color: rgba(255,255,255,0.8) !important; + } +} + +@mixin siderBar-submenu-set-acitve(){ + [data-theme="dark"] & { + background: $subMenuHover !important; + } + [data-theme="light"] & { + background: linear-gradient(270deg, #021C5E 0%, rgba(2,28,94,0) 100%) !important; + color: #fff !important; + font-weight: bold !important; + border-right: 4px solid #33D0FF !important; + } +} + +@mixin siderBar-title-set-acitve{ + [data-theme="dark"] & { + color: $mainColor !important; + background-image: $menuActiveBg !important; + &::before{ + content: ""; + position: absolute; + left: 0; + top: 0; + width: 5px; + height: 60px; + background-color: $mainColor; + } + } +} + +@mixin siderBar-icon{ + [data-theme="dark"] & { + color: $mainColor; + } + [data-theme="light"] & { + color: #fff; + } +} + +@mixin breadcrumb-bg{ + [data-theme="dark"] & { + background-color: $background-color-dark; + } + [data-theme="light"] & { + background-color: $main-bg-light; + } +} + +@mixin breadcrumb-text{ + [data-theme="dark"] & { + color: $mainColor; + } + [data-theme="light"] & { + color: #9098A4; + } +} + +@mixin breadcrumb-text-active{ + [data-theme="dark"] & { + color: #fff; + } + [data-theme="light"] & { + color: #1F55EB; + } +} + +@mixin main_bg_color() { + [data-theme="dark"] & { + background-color: $background-color-dark; + @include font-color($font-color-dark); + } + [data-theme="light"] & { + background-color: transparent; + @include font-color($font-color-light); + } +} + +@mixin dropdown_bg() { + [data-theme="dark"] & { + box-shadow: rgb(51 156 255) 0px 0px 10px 1px inset; + background: #02255F; + } + [data-theme="light"] & { + box-shadow: 0px 5px 11px 0px rgba(0,0,0,0.17); + background: #fff; + } +} + +@mixin dropdown_bg_hover() { + [data-theme="dark"] & { + background: #13439E; + color: #fff; + } + [data-theme="light"] & { + background: #F5F9FC; + color: #0348F3; + } +} + +@mixin icon_color() { + [data-theme="dark"] & { + color: $icon-color-dark; + } + [data-theme="light"] & { + color: $icon-color-light; + } +} + +@mixin svg_color() { + [data-theme="dark"] & { + fill: #339cff; + } + [data-theme="light"] & { + fill: #0348F3; + } +} + +@mixin bg_color() { + [data-theme="dark"] & { + background-color: $background-color-dark; + @include font-color($font-color-dark); + } + [data-theme="light"] & { + background-color: $background-color-light; + @include font-color($font-color-light); + } +} + +// 内容模块 背景-线条-font设置 +@mixin user_cont() { + [data-theme="dark"] & { + background-color: $background-color-dark; + border: $mainContainerBorder; + @include font-color($font-color-dark); + } + [data-theme="light"] & { + background-color: $background-color-light; + border: none; + @include font-color($font-color-light); + } +} + +@mixin before_line_color() { + [data-theme="dark"] & { + border-top: 1px solid $mainColor; + border-left: 1px solid $mainColor; + } + [data-theme="light"] & { + border-top: none; + border-left: none; + } +} + +@mixin after_line_color() { + [data-theme="dark"] & { + border-right: 1px solid $mainColor; + border-bottom: 1px solid $mainColor; + } + [data-theme="light"] & { + border-right: none; + border-bottom: none; + } +} + +@mixin left_bottom_line_color() { + [data-theme="dark"] & { + border-bottom: 1px solid $mainColor; + border-left: 1px solid $mainColor; + } + [data-theme="light"] & { + border-left: none; + border-bottom: none; + } +} + +@mixin right_top_line_color() { + [data-theme="dark"] & { + border-right: 1px solid $mainColor; + border-top: 1px solid $mainColor; + } + [data-theme="light"] & { + border-right: none; + border-top: none; + } +} + +@mixin box_padding{ + [data-theme="dark"] & { + padding: 0 !important; + margin-top: 20px; + } + [data-theme="light"] & { + padding: 20px !important; + } +} + +@mixin tree_height_min{ + [data-theme="dark"] & { + min-height: calc(100vh - 210px); + } + [data-theme="light"] & { + min-height: calc(100vh - 230px); + } +} + +@mixin tree_tab_style{ + [data-theme="dark"] & { + border-bottom: 1px solid $mainColor; + } + [data-theme="light"] & { + border-bottom: 1px solid #E3E7EE; + } +} + +@mixin tree_tab_item{ + [data-theme="dark"] & { + padding: 15px 0 12px 0; + } + [data-theme="light"] & { + color: #A6ADB6; + padding-bottom: 12px; + } +} + +@mixin tree_tab_item_active{ + [data-theme="dark"] & { + border-bottom: 3px solid #3a99fd; + } + [data-theme="light"] & { + color: #000; + border-bottom: 3px solid #0348F3; + } +} + +@mixin tree_no_header{ + [data-theme="dark"] & { + margin-top:122px; + min-height: calc(100vh - 262px); + padding: 0 20px; + } +} + +@mixin table_height_min{ + [data-theme="dark"] & { + min-height: calc(100vh - 260px); + } + [data-theme="light"] & { + min-height: calc(100vh - 280px); + } +} + +@mixin tab_height_min{ + [data-theme="dark"] & { + min-height: calc(100vh - 200px); + } + [data-theme="light"] & { + min-height: calc(100vh - 178px); + } +} + +@mixin tab_height_min_lib{ + [data-theme="dark"] & { + min-height: calc(100vh - 230px); + } + [data-theme="light"] & { + min-height: calc(100vh - 230px); + } +} + +@mixin input_style{ + [data-theme="dark"] & { + border: 1px solid $mainColor; + color: #fff; + } + [data-theme="light"] & { + border: 1px solid #E3E7EE; + color: #0C0E1E; + } +} + +@mixin tree_font_color{ + [data-theme="dark"] & { + color: $mainColor; + } + [data-theme="light"] & { + color: #0C0E1E; + } +} + +@mixin tree_style{ + @include tree_font_color; + [data-theme="dark"] & { + padding: 0 30px !important; + } +} + +@mixin tree_children_font{ + [data-theme="light"] & { + color: #545B65; + } +} + +@mixin tree_children_icon_font{ + [data-theme="light"] & { + color: #0C0E1E; + } +} + +@mixin tree_store_icon_font{ + [data-theme="light"] & { + color: #FFA000; + } +} + +@mixin tree_classfiy_icon_font{ + [data-theme="light"] & { + color: #3ACFB1; + } +} + +@mixin tree_children_padding{ + [data-theme="light"] & { + padding: 0 !important; + } +} + +@mixin tree_hover{ + [data-theme="dark"] & { + background-color: transparent !important; + background-image: $subMenuActiveBg; + } + [data-theme="light"] & { + background-color: #E8F2FF !important; + color: #0348F3; + } +} + +@mixin tree_active{ + [data-theme="dark"] & { + background-image: $subMenuActiveBg !important; + color: #fff; + } + [data-theme="light"] & { + background-color: #E8F2FF !important; + color: #0348F3 !important; + } +} + +@mixin elButton-style{ + [data-theme="dark"] & { + border-color: $mainColor; + color: #fff; + } + [data-theme="light"] & { + font-weight: bold; + border-color: #0348F3; + color: #0348F3; + } +} + +@mixin elButton-disabled-style{ + [data-theme="dark"] & { + color: #13439E; + background-color: transparent; + border-color: #13439E; + } + [data-theme="light"] & { + color: #B4C8FB; + border-color: #B4C8FB; + background-color: #F2F5FE; + } +} + +@mixin elButton-hover-style{ + [data-theme="dark"] & { + color: #fff; + background-color: #02255F; + border-color: $mainColor; + } + [data-theme="light"] & { + background-color: #E8F2FF; + } +} + +// el-table +@mixin elTable-style{ + [data-theme="dark"] & { + background-color: #02255f; + } + [data-theme="light"] & { + background-color: #F5F9FC; + } +} + +@mixin elTable-font-style{ + [data-theme="dark"] & { + color: $mainColor; + } + [data-theme="light"] & { + color: #0C0E1E; + } +} + +@mixin elTable-td-font-style{ + [data-theme="dark"] & { + color: $mainColor; + border-bottom: 1px dashed #113D72; + } + [data-theme="light"] & { + color: #545B65; + border-bottom: 1px solid #F5F9FC; + } +} + +@mixin elTable-hover-style{ + [data-theme="dark"] & { + color: #fff; + background-color: #13439E; + } + [data-theme="light"] & { + background-color: #EAF3FB; + color: #545B65; + } +} + +@mixin checkbox-style{ + [data-theme="dark"] & { + border-color: $mainColor; + } + [data-theme="light"] & { + border-color: #D6D8DD; + } +} + +@mixin checkbox-disabled-style{ + [data-theme="dark"] & { + border-color: $mainColor; + background: transparent; + } + [data-theme="light"] & { + border-color:#D6D8DD; + background-color: #E6E7E9; + &::after{ + border-color:#D1D3D7; + } + } +} + +@mixin checkboxAnddisabled-style{ + [data-theme="dark"] & { + border-color: $mainColor; + background: transparent; + } + [data-theme="light"] & { + border-color:#BECEFB; + background-color: #E9EEFD; + &::after{ + border-color:#BECEFB; + } + } +} + +@mixin checkbox-active-style{ + [data-theme="dark"] & { + border-color: $mainColor; + background: transparent; + &::after{ + border-color: $mainColor; + } + } + [data-theme="light"] & { + border-color:#0348F3; + background-color: #0348F3; + &::after{ + border-color: #fff; + } + } +} + +// el-pagination +@mixin pagination-font{ + [data-theme="dark"] & { + color: $mainColor; + } + [data-theme="light"] & { + color: #545B65; + } +} + +@mixin pagination-input{ + @include pagination-font; + [data-theme="dark"] & { + border-color: $mainColor; + } + [data-theme="light"] & { + border-color: #E3E7EE; + } +} + +@mixin pagination-active{ + [data-theme="dark"] & { + background-color: #2072D2; + border-color: #2072D2; + } + [data-theme="light"] & { + background-color:#0348F3; + border-color: #0348F3; + } +} + +@mixin pagination-paper{ + @include pagination-font; + [data-theme="dark"] & { + border: 1px solid $mainColor; + } + [data-theme="light"] & { + border: 1px solid #E3E7EE; + } +} + +@mixin pagination-paper-more{ + [data-theme="dark"] & { + color: $mainColor; + } + [data-theme="light"] & { + color: #E3E7EE; + } +} + +// switch +@mixin switch-style{ + [data-theme="dark"] &{ + border-color: rgb(64, 158, 255); + background-color: rgb(64, 158, 255); + } + [data-theme="light"] & { + border-color: #0348F3 !important; + background-color: #0348F3 !important; + } +} + +@mixin switch-disabled{ + [data-theme="light"] & { + border-color: #D6DBE7 !important; + background-color: #D6DBE7 !important; + } +} + +@mixin row_height_min{ + [data-theme="dark"] & { + min-height: calc(100vh - 262px); + } + [data-theme="light"] & { + min-height: calc(100vh - 282px); + } +} + +@mixin row_tab_style{ + [data-theme="dark"] & { + margin-top: 61px; + border: 1px solid #113d72; + .head-container{ + margin: 20px; + } + .el-table__header{ + border-top: 1px solid #113D72; + } + .tab-nav{ + height: 41px; + line-height: 41px; + margin: -41px 0 30px -1px; + font-weight: bold; + color: #359AFC; + border-bottom: 1px solid #113D72; + li{ + position: relative; + padding: 0 24px; + margin: -1px 30px 0 0; + letter-spacing: 2px; + border-top: 1px solid #113D72; + background-color: #021941; + cursor: pointer; + &::before, + &::after{ + content: ""; + position: absolute; + top: 0; + width: 33px; + height: 41px; + } + &::before{ + left: -15px; + background: url(~@/assets/images/tab_left.png) no-repeat; + background-size: contain; + } + &::after{ + right: -32px; + background: url(~@/assets/images/tab_right.png) no-repeat; + background-size: contain; + } + &:first-child{ + border-left: 1px solid #113d72;; + &::before{ + width: 17px; + height: 17px; + left: -1px; + top: -1px; + border-left: 1px solid $mainColor; + border-top: 1px solid $mainColor; + } + } + &.active-tab-nav{ + color: #fff; + &::before{ + background: url(~@/assets/images/tab_left_active.png) no-repeat; + background-size: contain; + } + &::after{ + background: url(~@/assets/images/tab_right_active.png) no-repeat; + background-size: contain; + } + i{ + display: block; + position: absolute; + bottom: -1px; + left: 0; + width: 100%; + height: 1px; + border-bottom: 1px solid #021941; + } + } + } + .tab-right-img{ + display: block; + width: 93px; + margin: 4px 0 0 -14px; + background: url(~@/assets/images/tab_img.png) no-repeat; + background-size: contain; + } + } + } + [data-theme="light"] & { + margin-top: 0; + .head-container{ + margin: 20px 20px 20px 0; + } + .tab-nav{ + color: #545B65; + padding: 0 0 0 20px; + border-bottom: 1px solid #EDEFF3; + li{ + margin-right: 60px; + &.active-tab-nav{ + padding-bottom: 10px; + color: #0348F3; + border-bottom: 3px solid #0348F3; + } + } + } + } +} +@mixin category-left-style{ + [data-theme="dark"] & { + width: 328px; + } + [data-theme="light"] & { + width: 368px; + } +} + +@mixin category-right-hide{ + [data-theme="dark"] & { + width: calc(100vw - 442px); + } + [data-theme="light"] & { + width: calc(100vw - 482px); + } +} + +@mixin category-right-open{ + [data-theme="dark"] & { + width: calc(100vw - 644px); + } + [data-theme="light"] & { + width: calc(100vw - 684px); + } +} + + +@mixin category-info-item{ + [data-theme="dark"] & { + margin-bottom: 30px; + } + [data-theme="light"] & { + margin-bottom: 15px; + } +} + +@mixin category-info-text{ + [data-theme="dark"] & { + background-color: #02255f; + color: #fff; + border-radius: 4px; + margin-right: 20px; + border: none; + } + [data-theme="light"] & { + color: #0C0E1E; + } +} + +@mixin category-padding{ + [data-theme="dark"] & { + margin-top: -20px; + } +} + +@mixin des-title{ + [data-theme="dark"] & { + padding-left: 46px; + p{ + position: absolute; + left: 46px; + top: 0; + background-image: -webkit-gradient( + linear, + 0 0, + 0 bottom, + from(rgba(255, 255, 255, 1)), + to(rgba(46, 143, 237, 1)) + ); + background-clip: text; + -webkit-text-fill-color: transparent; + z-index: 2; + i{ + -webkit-text-fill-color: #fff; + } + } + &::before { + top: 0; + width: 93px; + height: 28px; + background: url(~@/assets/images/des_title.png) no-repeat; + background-size: contain; + } + } + [data-theme="light"] & { + padding-left: 8px; + p{ + color: #000; + i{ + -webkit-text-fill-color: #9098A4; + } + } + &::before { + top: 50%; + width: 3px; + height: 14px; + margin-top: -7px; + background-color: #0348F3; + } + } +} + +@mixin des-fields{ + [data-theme="dark"] & { + color: #3a99fd; + border: 1px solid #339cff; + &:hover, + &.fields-active { + color: #fff; + background-color: #339cff; + } + } + [data-theme="light"] & { + color: #545B65; + border: 1px solid #E6E8ED; + &:hover, + &.fields-active { + color: #0348F3; + background-color: #E8F2FF; + } + } +} + + +@mixin des-preview-label{ + font-weight: normal; + [data-theme="dark"] & { + color: #3a99fd; + } +} + +@mixin des-preview-input-num{ + [data-theme="dark"] & { + margin-right: 24px !important; + } + [data-theme="light"] & { + margin-right: 10px !important; + } +} + +@mixin des-preview-input-cont{ + [data-theme="dark"] & { + margin-right: 10px !important; + width: 50px !important; + .el-input__inner{ + width: 50px !important; + } + } + [data-theme="light"] & { + margin-right: 6px !important; + width: 40px !important; + .el-input__inner{ + width: 40px !important; + } + } +} +@mixin main-padding{ + [data-theme="dark"] & { + padding: 0 20px 20px 20px; + } + [data-theme="light"] & { + padding: 20px 0; + } +} + +@mixin elTag-style{ + [data-theme="dark"] & { + border: 1px solid $mainColor; + background-color: #02255f; + } + [data-theme="light"] & { + color: #0348F3; + border: 1px solid #90B0F9; + background-color: #EEF5FE; + } +} + +@mixin select-elTag-style{ + [data-theme="dark"] & { + color: #fff; + background-color: #02255f; + } + [data-theme="light"] & { + color: #0348F3; + background-color: #EEF5FE; + } +} + +@mixin prepend-input{ + [data-theme="dark"] & { + border:none; + border-right: 1px solid $mainColor; + color: #339cff !important; + } + [data-theme="light"] & { + border:none; + border-right: 1px solid #E3E7EE; + color: #545B65 !important; + } +} + +@mixin prepend-color{ + [data-theme="dark"] & { + color: #339cff !important; + } + [data-theme="light"] & { + color: #545B65 !important; + } +} + +@mixin setting-item-font{ + [data-theme="dark"] & { + color: #fff; + } + [data-theme="light"] & { + color: #0C0E1E; + } +} + +@mixin setting-item-selected{ + [data-theme="dark"] & { + color: #fff; + background-color: #02255f; + } + [data-theme="light"] & { + color: #545B65; + background-color: #F5F7FA; + } +} + +@mixin table-fixed-style{ + [data-theme="dark"] & { + background-color: $boxBg !important; + box-shadow: -5px 5px 10px 1px rgba(15,164,222,0.16); + } + [data-theme="light"] & { + background-color: #FFFFFF !important; + box-shadow: -3px 3px 11px 0px rgba(0,0,0,0.08); + } +} + +// 个人中心 +@mixin process-left-style{ + [data-theme="dark"] & { + box-shadow: 5px 2px 10px 1px rgba(15,164,222,.16); + color: #339cff; + li{ + &.active-li{ + color: #fff; + &::before{ + background-color: #fff; + } + } + &:hover{ + background-image: $subMenuHover; + } + } + } + [data-theme="light"] & { + color: #0C0E1E; + box-shadow: 4px 0px 4px 0px rgba(0,0,0,0.04); + li{ + &.active-li{ + color: #0348F3; + &::before{ + background-color: #0348F3; + } + } + &:hover{ + background-color:#E8F2FF; + color: #0C0E1E; + } + } + } +} + +[data-theme=dark] .process-center { + height: calc(100vh - 290px); + margin-top: -30px; + .process-right{ + padding-right: 20px; + width: calc(100vw - 944px); + } +} +[data-theme=light] .process-center { + height: calc(100vh - 283px); + .process-right{ + width: calc(100vw - 964px); + } +} + +@mixin process-status-style{ + [data-theme="dark"] & { + &.ing-state{ + color: #0348F3; + border: 1px solid #0348F3 ; + } + &.end-state{ + color: #1aae93; + border: 1px solid #1aae93; + } + &.cancel-state{ + color: #ED4A41; + border: 1px solid #FFA5A0; + opacity: 0.6; + } + &.soon-state{ + color: #FF8329; + border: 1px solid #FEBD98; + opacity: 0.6; + } + &.other-state{ + color: #8B43F0; + border: 1px solid #CAA4FF; + opacity: 0.6; + } + &.no-state{ + color: #a6adb6; + border: 1px solid #e6e8ed; + opacity: 0.6; + } + } + [data-theme="light"] & { + &.ing-state{ + color: #0348F3; + background-color: #EEF5FE; + border: 1px solid #0348F3; + } + &.end-state{ + color: #2ECAAC; + background-color: #E8F8F5; + border: 1px solid #B1EBDF; + } + &.cancel-state{ + color: #ED4A41; + background-color: #FFEBEA; + border: 1px solid #FFA5A0; + } + &.soon-state{ + color: #FF8329; + background-color: #FFF3E5; + border: 1px solid #FEBD98 + } + &.other-state{ + color: #8B43F0; + background-color: #e2d4f5; + border: 1px solid #CAA4FF; + } + &.no-state{ + color: #a6adb6; + background-color: #f3f5f9; + border: 1px solid #e6e8ed; + } + } +} \ No newline at end of file diff --git a/src/assets/styles/quillEditor.css b/src/assets/styles/quillEditor.css new file mode 100644 index 0000000..140ef00 --- /dev/null +++ b/src/assets/styles/quillEditor.css @@ -0,0 +1,205 @@ +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { + content: "黑体"; + font-family: "SimHei"; +} + +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { + content: "微软雅黑"; + font-family: "Microsoft YaHei"; +} + +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { + content: "楷体"; + font-family: "KaiTi"; +} + +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before { + content: "仿宋"; + font-family: "FangSong"; +} + +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { + content: "Arial"; + font-family: "Arial"; +} + +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { + content: "Times New Roman"; + font-family: "Times New Roman"; +} + +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before { + content: "sans-serif"; + font-family: "sans-serif"; +} + +.ql-font-SimSun { + font-family: "SimSun"; +} + +.ql-font-SimHei { + font-family: "SimHei"; +} + +.ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei"; +} + +.ql-font-KaiTi { + font-family: "KaiTi"; +} + +.ql-font-FangSong { + font-family: "FangSong"; +} + +.ql-font-Arial { + font-family: "Arial"; +} + +.ql-font-Times-New-Roman { + font-family: "Times New Roman"; +} + +.ql-font-sans-serif { + font-family: "sans-serif"; +} + +/* 字号设置 */ +/* 默认字号 */ +.ql-snow .ql-picker.ql-size .ql-picker-label::before, +.ql-snow .ql-picker.ql-size .ql-picker-item::before { + content: "12px"; +} + +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="12px"]::before{ + content: "12px"; + font-size: 14px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="14px"]::before{ + content: "14px"; + font-size: 14px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="16px"]::before{ + content: "16px"; + font-size: 14px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="18px"]::before{ + content: "18px"; + font-size: 14px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="20px"]::before{ + content: "20px"; + font-size: 14px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="22px"]::before{ + content: "22px"; + font-size: 14px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="26px"]::before{ + content: "26px"; + font-size: 14px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="28px"]::before{ + content: "28px"; + font-size: 14px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="30px"]::before{ + content: "30px"; + font-size: 14px; +} + +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12px"]::before { + content: "12px"; + font-size: 12px; +} + +.ql-size-12px { + font-size: 12px; +} + +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="14px"]::before { + content: "14px"; + font-size: 14px; +} + +.ql-size-14px { + font-size: 14px; +} + + +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="16px"]::before { + content: "16px"; + font-size: 16px; +} + +.ql-size-16px { + font-size: 16px; +} + + +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18px"]::before { + content: "18px"; + font-size: 18px; +} + +.ql-size-18px { + font-size: 18px; +} + + +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="20px"]::before { + content: "20px"; + font-size: 20px; +} + +.ql-size-20px { + font-size: 20px; +} + + +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="22px"]::before { + content: "22px"; + font-size: 22px; +} + +.ql-size-22px { + font-size: 22px; +} + + +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="26px"]::before { + content: "26px"; + font-size: 26px; +} + +.ql-size-26px { + font-size: 26px; +} + + +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="28px"]::before { + content: "28px"; + font-size: 28px; +} + +.ql-size-28px { + font-size: 28px; +} + + +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="30px"]::before { + content: "30px"; + font-size: 30px; +} + +.ql-size-30px { + font-size: 30px; +} diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss new file mode 100644 index 0000000..b5eeb08 --- /dev/null +++ b/src/assets/styles/sidebar.scss @@ -0,0 +1,305 @@ +#app { + .main-container { + min-height: 100%; + transition: margin-left .28s; + margin-left: $sideBarWidth; + position: relative; + padding-top: $headerHeight; + background-color: $main-bg-light; + } + + .sidebar-container { + transition: width 0.28s; + width: $sideBarWidth !important; + background-color: $boxBg; + height: 100%; + position: fixed; + font-size: 0; + top: $headerHeight; + bottom: 0; + left: 0; + z-index: 200; + @include bg_color; + @include siderBar-set; + padding-bottom: 50px; + + // 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: 0; + } + + .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: 10px; + } + + .el-submenu__icon-arrow{ + font-size: 18px; + @include siderBar-icon; + } + + .el-menu { + border: none; + height: 100%; + width: 100% !important; + background-color: transparent !important; + } + + // menu hover + .submenu-title-noDropdown, + .el-submenu__title { + font-size: 16px; + height: 60px !important; + line-height: 60px !important; + // padding: 0 30px 0 28px !important; + background-color: transparent !important; + @include siderBar-submenu-set; + &:hover { + @include siderBar-title-set-acitve; + } + svg{ + stroke: red; + } + } + + & .el-submenu{ + & a{ + .el-menu-item{ + position: relative; + // padding: 0 60px 0 82px !important; + height: 36px !important; + line-height: 36px; + @include siderBar-submenu-set; + & .dot{ + // content: ""; + // position: absolute; + // left: 56px; + // top: 50%; + display: inline-block; + width: 6px; + height: 6px; + background-color: #fff; + border-radius: 50%; + margin-right: 14px; + // transform: translateY(-50%); + } + .svg-icon { + display: none; + } + } + } + } + + .is-active>.el-submenu__title, + .is-active.submenu-title-noDropdown { + position: relative; + @include siderBar-title-set-acitve; + } + + & .nest-menu .el-submenu>.el-submenu__title, + & .el-submenu .el-menu-item { + min-width: $sideBarWidth !important; + background-color: transparent !important; + &:hover { + @include siderBar-submenu-set-acitve; + } + } + + .is-active.el-menu-item { + @include siderBar-submenu-set-acitve; + } + + + .el-menu{ + .nest-menu{ + & li.el-submenu{ + & div.el-submenu__title{ + font-size: 14px !important; + height: 50px !important; + line-height: 50px !important; + & i.el-submenu__icon-arrow{ + font-size: 14px !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; + } + } + } + + .el-submenu { + overflow: hidden; + + &>.el-submenu__title { + padding: 0 !important; + + .svg-icon { + margin-left: 20px; + } + + .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; + } + } + } + } + + .main-breadcrumb{ + left: 54px; + } + } + + .el-menu--collapse .el-menu .el-submenu { + min-width: $sideBarWidth !important; + } + + // mobile responsive + .mobile { + .main-container { + margin-left: 0; + } + + .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 { + display: none; + margin-right: 16px; + } + } + + .nest-menu .el-submenu>.el-submenu__title, + .el-menu-item { + position: relative; + padding-left: 50px !important; + height: 40px !important; + line-height: 40px; + &::before{ + content: ""; + position: absolute; + left: 30px; + top: 50%; + width: 6px; + height: 6px; + background-color: #fff; + border-radius: 50%; + transform: translateY(-50%); + } + &:hover { + background-image: $subMenuHover !important; + } + + & i.el-submenu__icon-arrow { + position: static; + right: 0; + margin-top: 0; + } + } + + // 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/src/assets/styles/transition.scss b/src/assets/styles/transition.scss new file mode 100644 index 0000000..25e7e18 --- /dev/null +++ b/src/assets/styles/transition.scss @@ -0,0 +1,48 @@ +// 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/src/assets/styles/variables.scss b/src/assets/styles/variables.scss new file mode 100644 index 0000000..e4f0e83 --- /dev/null +++ b/src/assets/styles/variables.scss @@ -0,0 +1,50 @@ +$background-color-theme: #031435; //背景主题颜色默认 +$font-color-theme : #fff; //字体主题颜色默认 + +$boxBg: #031435; // 板块背景色 +$mainColor: #339CFF; // 主色 +$otherColor: #02255F; // 辅助色1 +$otherColor2: #13439E; // 辅助色2 +$btnBorder:#3581CC; // 按钮描边 + +// dark-theme +$background-color-dark: #031435; //背景主题颜色1 +$icon-color-dark: #fff; +$font-color-dark : #fff; + +// ligit-theme +$background-color-light: #fff; //亮色bg主题 +$main-bg-light: #F6F8FC; //亮色bg主题 +$icon-color-light: #1C1C1C; +$font-color-light: #545B65; + +$headerHeight: 64px; +$sideBarWidth: 256px; + +$arcPurple:#563BE1; +$arcYellow:#FD8042; +$arcRed:#F65163; +$arcGreen: #1AAE93; +$arcCyan: #0FBED9; + +$menuText:#359AFC; +$menuActiveBg: linear-gradient(90deg, rgba(59, 160, 255, 0.3) 0% 0%, rgba(42,112,177,0.3) 43%, rgba(51, 156, 255, 0) 100%); +$subMenuActiveBg: linear-gradient(90deg, rgba(59, 160, 255, 0) 0%, rgba(42,112,177,0.3) 43%, rgba(51, 156, 255, 0) 100%); +$subMenuHover: linear-gradient(90deg, rgba(59, 160, 255, 0) 0%, rgba(42,112,177,0.3) 43%, rgba(51, 156, 255, 0) 100%); + +$breadcrumbBg: #021941; +$mainContainerBorder: 1px solid #113D72; + +$desPreviewColor: #3A99FD; + +:export { + menuText: $menuText; + menuActiveBg: $menuActiveBg; + subMenuHover: $subMenuHover; + sideBarWidth: $sideBarWidth; + headerHeight: $headerHeight; + subMenuActiveBg: $subMenuActiveBg; + mainContainerBorder: $mainContainerBorder; + breadcrumbBg: $breadcrumbBg; + desPreviewColor: $desPreviewColor; +} diff --git a/src/assets/styles/yxk-admin.scss b/src/assets/styles/yxk-admin.scss new file mode 100644 index 0000000..72a184c --- /dev/null +++ b/src/assets/styles/yxk-admin.scss @@ -0,0 +1,2092 @@ +.elect-cont-left{ + width: 265px; + margin-right: 20px; + @include bg_color; + @include box_padding; + .head-container{ + margin-bottom: 20px; + .crud-opts{ + justify-content: center; + } + } + .container-left{ + @include tree_height_min; + } +} +.elect-cont-right{ + @include bg_color; + @include box_padding; + .head-container{ + margin-bottom: 20px; + } + .container-right{ + @include table_height_min; + &.tab-content{ + @include tab_height_min; + } + } +} + +.role-cont-left{ + .container-left{ + @include tree_no_header; + } +} + +.hideSidebar{ + // siderbar-收起 54 + 间距 60 + treeLeft 265 + .elect-cont-right{ + width: calc(100vw - 379px); + } + .category-container{ + .elect-cont-right{ + @include category-right-hide; + } + } +} + +.openSidebar{ + // siderbar-展开 256 + 间距 60 + treeLeft 265 + .elect-cont-right{ + width: calc(100vw - 581px); + } + .category-container{ + .elect-cont-right{ + @include category-right-open; + } + } +} + +.row-container{ + @include bg_color; + @include box_padding; + .container-wrap{ + margin-top: 20px; + @include row_height_min; + } +} + +.tab-container{ + @include bg_color; + @include box_padding; +} + +.tab-container, +.category-container, +.archives-container{ + .tab-content{ + position: relative; + @include row_tab_style; + + .tab-nav{ + margin-bottom: 0; + } + } +} + +.detail-tab{ + margin-top: 0; + .head-container{ + margin: 20px 20px 20px 0; + } + .tab-nav{ + margin: 25px 0 18px 0; + color: #545B65; + padding: 0 0 0 20px; + border-bottom: 1px solid #EDEFF3; + li{ + margin-right: 60px; + &.active-tab-nav{ + padding-bottom: 10px; + color: #0348F3; + border-bottom: 3px solid #0348F3; + } + } + } +} + +.category-container{ + .elect-cont-left{ + @include category-left-style; + } + .elect-cont-right{ + margin-top: 0; + } +} + +.head-container { + display: flex; + justify-content: space-between; + align-items: center; + .filter-item { + vertical-align: middle; + margin-right: 10px; + input { + @include input_style; + background-color: transparent; + height: 30px; + line-height: 30px; + } + .iconfont{ + line-height: 30px; + } + } + .el-select__caret.el-input__icon.el-icon-arrow-up{ + line-height: 30px; + } + .date-item { + display: inline-block; + vertical-align: middle; + @include bg_color; + @include input_style; + margin-right: 10px; + height: 30px !important; + width: 230px !important; + } + .icon-zhuangtai{ + font-size: 14px; + } + // tree-select + .vue-treeselect{ + margin-right: 10px; + .vue-treeselect__control{ + font-size: 12px !important; + height: 30px !important; + background-color: transparent !important; + border-radius: 4px; + @include input_style; + .vue-treeselect__placeholder{ + line-height: 28px !important; + } + .vue-treeselect__input{ + font-size: 13px !important; + } + } + } + .el-select{ + margin-right: 10px; + .el-input__inner{ + height: 30px !important; + line-height: 30px !important; + background-color: transparent; + @include pagination-input; + } + } +} + +.el-tabs{ + margin-bottom: 25px; +} + +// xu +// 四角边线 +// 有左右分区时 +.container-main{ + display: flex; + justify-content: space-between; + margin-left: 0 !important; + margin-right: 0 !important; +} + +.container-left, +.container-right, +.container-wrap, +.el-card, +.header-container-wrap{ + position: relative; + min-height: 100%; + @include user_cont; + min-height: calc(100vh - 190px); + &::before, + &::after{ + content: ""; + position: absolute; + width: 17px; + height: 17px; + z-index: 99; + } + &::before{ + top: -1px; + left: -1px; + @include before_line_color; + } + &::after{ + right: -1px; + bottom: -1px; + @include after_line_color; + } +} + +.el-card, +.container-left{ + background-color: transparent; + min-height: auto; + border-radius: 0; + overflow: visible; + .el-card__header{ + background-color: #02255F; + border-bottom: none; + .role-span{ + color: #fff; + } + } + .el-card__body{ + padding: 0; + .head-container{ + padding: 0; + } + } + .crud-opts{ + justify-content: center; + padding: 20px 0 !important; + border-bottom: 1px solid #113D72; + } + .el-tree{ + margin: 20px 0; + } +} + +.head-search{ + display: flex; + justify-content: flex-start; + // margin-bottom: 20px; + .el-button{ + margin-left: 0; + background-color: $desPreviewColor; + } +} + +.el-button, +.el-button--info.is-plain{ + font-size: 14px; + background-color: transparent; + @include elButton-style; +} +.el-button.is-disabled, +.el-button.is-disabled:hover, +.el-button.is-disabled:focus{ + @include elButton-disabled-style; +} +.el-button:hover, +.el-button:focus, +.el-button--info.is-plain:hover, +.el-button--info.is-plain:focus{ + @include elButton-hover-style; +} + +.el-button--mini{ + padding: 7px 10px; +} + +.header-container-wrap{ + min-height: auto; +} + +.right-top-line, +.left-bottom-line, +.right-bottom-line{ + display: block; + position: absolute; + width: 17px; + height: 17px; + z-index: 99; +} + +.left-bottom-line{ + bottom: -1px; + left: -1px; + @include left_bottom_line_color; +} + +.right-top-line{ + right: -1px; + top: -1px; + @include right_top_line_color; +} +.right-bottom-line{ + right: -1px; + bottom: -1px; + @include after_line_color; +} +.el-tree{ + background: transparent !important; + .el-tree-node:focus>.el-tree-node__content { + background-color: transparent !important; + } + .is-current>.el-tree-node__content { + @include tree_active; + } + .el-tree-node__content{ + height: 40px; + @include tree_style; + background-color: transparent; + .el-tree-node__label{ + font-size: 16px; + font-weight: 600; + } + &:hover{ + @include tree_hover; + } + } + .el-tree-node__expand-icon{ + font-size: 16px; + @include tree_font_color; + } + .el-tree-node__children{ + padding: 0 0 0 18px; + .el-tree-node__content{ + @include tree_children_padding; + height: 30px; + } + .el-tree-node__label{ + @include tree_children_font; + font-size: 14px; + font-weight: normal; + } + } + +} +.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{ + @include tree_hover; +} +.el-tree .el-tree-node.is-current>.el-tree-node__content .el-tree-node__label{ + @include tree_active; +} + +.el-date-editor .el-range-input{ + background: transparent; + @include tree_font_color; +} +// table +.el-table{ + width: 100%; + display: flex; + flex-direction: column; + background: transparent; + tr{ + background: transparent; + .el-table__cell{ + height: 40px; + background-color: transparent; + } + } + .el-table__body-wrapper { + flex: 1; + } + + .el-table__header-wrapper, + .el-table__header{ + th.el-table__cell{ + @include elTable-style; + border-bottom: none; + &>.cell{ + font-size: 14px; + @include elTable-font-style; + } + } + } + + .el-table__body-wrapper, + .el-table__fixed-right{ + td.el-table__cell{ + @include elTable-td-font-style; + font-size: 14px; + padding: 5px 0; + } + } + + &::before, + .el-table--group::after, + .el-table--border::after, + .el-table__fixed::before, + .el-table__fixed-right::before{ + background-color: transparent; + } + + .el-table__body tr.hover-row > td, + .el-table__body tr.hover-row.current-row > td, + .el-table__body tr.hover-row.el-table__row--striped > td, + .el-table__body tr.hover-row.el-table__row--striped.current-row > td { + @include elTable-hover-style; + .el-checkbox__input.is-checked .el-checkbox__inner{ + @include checkbox-active-style; + } + } + .el-button{ + padding: 7px 15px; + } + .el-button--primary { + background-color: #1890ff; + border-color: #1890ff; + } + .el-button--danger { + background-color: #ff4949; + border-color: #ff4949; + } + + .el-button.is-disabled, + .el-button.is-disabled:hover, + .el-button.is-disabled:focus{ + color: #fff; + background-color: #ffa4a4; + border-color: #ffa4a4; + } +} +.el-table__body tr.el-table__row:hover>td.el-table__cell, +.el-table__body tr.el-table__row:focus>td.el-table__cell, +.el-table__body tr.current-row>td.el-table__cell, +.el-table__body tr.current-row:hover>td.el-table__cell, +.el-table__body tr.current-row:focus>td.el-table__cell{ + @include elTable-hover-style; + .el-checkbox__input.is-checked .el-checkbox__inner{ + @include checkbox-active-style; + } +} + +.el-table__body tr.current-row>td.el-table__cell{ + background-color: transparent; +} + +.el-checkbox__inner{ + background: transparent; + @include checkbox-style; +} + +.el-icon-arrow-right:before{ + @include icon_color; +} +.el-picker-panel__icon-btn:before{ + color: #303133; +} +// 分页 +.el-pagination{ + display: flex; + justify-content: flex-end; + padding: 0; + margin: 64px 0 10px 0 !important; + .el-pagination__total{ + font-size: 12px; + @include pagination-font; + } + button, + span:not([class*=suffix]){ + height: 24px!important; + line-height: 24px!important; + background-color: transparent; + &:disabled{ + background-color: transparent; + } + } + .el-pager li{ + min-width: 24px; + height: 24px; + margin: 0 4px; + line-height: 24px; + border: 1px solid #fff; + font-size: 12px; + @include pagination-input; + background-color: transparent; + &.more{ + border: none; + @include pagination-paper-more; + &::before{ + margin-right: 0 !important; + line-height: 24px !important; + } + } + } + .el-pager li.active{ + color: #fff; + @include pagination-active; + &+li{ + @include pagination-paper; + } + } + .el-select .el-input { + width: 70px; + margin: 0 !important; + .el-input__inner{ + height: 24px; + line-height: 24px; + padding-left: 6px; + padding-right: 18px !important; + font-size: 12px; + background-color: transparent; + border-radius: 0; + @include pagination-input; + } + } + .el-icon-arrow-right:before{ + @include pagination-font; + } + .btn-prev, + .btn-next{ + @include pagination-font; + background-color: transparent; + } + .el-select .el-input .el-select__caret{ + line-height: 24px; + @include pagination-font; + } +} + +// 弹框 +.el-dialog{ + position: relative; + position: fixed; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + margin-top: 0 !important; + width: 736px; + padding: 0 20px; + border-radius: 6px; + box-shadow: 0px 14px 21px 0px rgba(0,0,0,0.17); + .el-dialog__header{ + padding: 17px 0; + border-bottom: 1px solid #E6E8ED; + .el-dialog__title{ + font-size: 16px; + color: #000; + } + .el-dialog__close{ + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-size: 14px; + color: #545B65; + &::before{ + content: "\e61c"; + } + } + } + .el-dialog__body{ + padding: 30px 0; + .el-form-item{ + &:nth-child(odd){ + margin-right: 40px; + } + .el-form-item__label{ + color: #0C0E1E; + } + .el-form-item__content{ + width: 225px; + .el-input__inner, + .el-textarea__inner{ + border-color: #E6E8ED; + &:focus{ + border-color:#0348F3; + } + } + .vue-treeselect__control{ + height: 32px; + border-color: #E6E8ED; + .vue-treeselect__control, + .vue-treeselect__placeholder, + .vue-treeselect__single-value { + height: 32px; + line-height: 32px; + } + } + .vue-treeselect--focused{ + .vue-treeselect__control{ + border-radius: 5px; + border-color: #0348F3; + } + } + .el-icon-close{ + border-radius: 0; + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background-color: transparent; + color: #0348F3; + &:before{ + content: "\E61b"; + } + } + .el-radio__inner::after{ + width: 8px; + height: 8px; + } + .el-radio__input.is-checked{ + .el-radio__inner{ + border-color: #0348F3; + background: #0348F3; + } + &+.el-radio__label{ + color: #545B65; + } + } + + } + &.is-error .el-input__inner, + &.is-error .el-input__inner:focus, + &.is-error .el-textarea__inner, + &.is-error .el-textarea__inner:focus{ + border-color:#ED4A41; + } + } + .selecct-dropdown{ + .el-select-dropdown{ + position: absolute !important; + top: 36px !important; + left: 0 !important; + padding: 6px 0; + margin-top: 0; + .el-select-dropdown__item{ + height: 26px; + line-height: 26px; + } + } + } + .el-input-number{ + width: 225px; + .el-input__inner{ + text-align: left; + } + .el-input-number__increase, + .el-input-number__decrease{ + background-color: transparent !important; + width: 20px !important; + &.is-disabled{ + background-color: #E3E7EE !important; + } + } + .el-icon-arrow-down, + .el-icon-arrow-up{ + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-size: 12px; + color: #545B65; + transform: scale(0.5); + } + .el-icon-arrow-down:before{ + content: "\E629"; + } + .el-icon-arrow-up:before{ + content: "\E62c"; + } + } + } +} + + +.dialog-footer, +.el-message-box__btns{ + display: flex; + justify-content: flex-end; + margin-top: 60px; + .el-button{ + width: 76px; + height: 32px; + line-height: 32px; + padding: 0; + border-color: #E6E8ED; + background-color: transparent; + color: #545B65; + font-weight: normal; + &.el-button--primary{ + color: #fff; + background-color: #0348F3; + border-color: #0348F3; + } + } +} + +.el-form-item.is-error .el-input__inner, +.el-form-item.is-error .el-input__inner:focus, +.el-form-item.is-error .el-textarea__inner, +.el-form-item.is-error .el-textarea__inner:focus{ + border-color:#ED4A41; +} + +// el-tree 最终节点不显示箭头 +.is-leaf::before { + color: transparent; +} + +.el-input__prefix{ + left: 8px; +} + +// tab样式布局 +.tab-content{ + border-top: none; + &::before{ + display: none; + } + .tab-nav{ + display: flex; + justify-content: flex-start; + font-size: 16px; + li{ + cursor: pointer; + } + } +} + +// 默认底图 - 暂时只有头像 +.user-img-cover{ + border-radius: 50%; + background: url(~@/assets/images/avatar.png) no-repeat #fff; + background-size: cover; + overflow: hidden; +} + +// 提示框-dialog +.tip-dialog{ + .el-dialog{ + width: 504px; + .setting-dialog{ + padding: 0 10px; + } + .tip-content{ + padding-left: 34px; + font-size: 14px; + line-height: 24px; + color: #0C0E1E; + background: url("~@/assets/images/icon/tip-icon.png") no-repeat left top; + background-size: 24px 24px; + span{ + font-size: 12px; + color: #ED4A41; + } + } + } + .dialog-footer{ + margin-top: 27px; + } +} +.tip-middle-dialog{ + .el-dialog{ + width: 708px; + } +} + +// 门类-字段管理 +.field-setting-dialog, +.edit-form-dialog{ + .el-dialog{ + width: 600px; + .el-dialog__body { + .el-form-item{ + &:nth-child(odd){ + margin-right: 0; + } + .el-form-item__content{ + .el-input__inner, + .el-textarea__inner{ + width: 264px; + } + } + } + } + } + .des-form{ + .checkbox-item{ + height: 33px; + line-height: 33px; + .el-checkbox__inner{ + border-color: #D6D8DD; + } + .el-checkbox__input.is-checked .el-checkbox__inner{ + border-color: #0348f3; + background-color: #0348f3; + &::after{ + border-color: #fff; + } + } + .el-checkbox__input.is-disabled .el-checkbox__inner { + border-color: #D6D8DD; + background-color:#f5f7fa; + &::after{ + border-color: #fff; + } + } + span{ + font-weight: bold; + color: #0C0E1E; + } + } + + } +} +.des-form{ + .input-num{ + .el-form-item__content{ + display: flex; + justify-content: flex-start; + width: 50px !important; + .el-input, + .el-input-number--small, + .el-input-number.is-controls-right { + width: 50px !important; + margin-right: 10px; + .el-input__inner{ + width: 50px !important; + padding-left: 5px; + padding-right: 5px; + text-align: center; + } + .el-input-number__decrease, + .el-input-number__increase{ + display: none; + } + } + } + } +} + +.des-preview-left{ + .el-form-item__label{ + @include des-preview-label; + } + .el-form-item__content{ + span{ + @include des-preview-label; + } + } + .el-input__inner{ + @include category-info-text; + } +} + +.small-preview-left{ + .checkbox-item { + .el-form-item__content{ + margin-left: 50px !important; + } + } +} + +.preview-dialog{ + .el-dialog{ + width: 758px !important; + .preview-content{ + height: calc(100vh - 330px) !important; + overflow: hidden !important; + overflow-y: auto !important; + border: none !important; + .el-form-item__label{ + color: #0C0E1E !important; + } + } + .dialog-footer{ + margin-top: 10px !important; + } + } +} + +// 去除element ui 中el-input type=“number“的上下箭头 +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none !important; +} +input[type ='number'] { + -moz-appearance: textfield !important; +} + +.dialog-middle{ + .el-dialog{ + width: 536px; + .el-dialog__body { + .el-form-item { + .el-form-item__content{ + width: 400px; + } + &:nth-child(odd){ + margin-right: 0; + } + } + } + } +} + +.el-message-box{ + width: 504px; + padding: 0 20px 30px 20px; + .el-message-box__header{ + + padding: 17px 0; + border-bottom: 1px solid #E6E8ED; + .el-message-box__title{ + font-size: 16px; + line-height: 24px; + color: #000; + } + .el-message-box__headerbtn{ + top: 20px; + right: 0; + .el-icon-close{ + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-size: 16px; + color: #545b65; + &::before{ + content: "\E61b"; + } + } + } + } + .el-message-box__content{ + padding: 26px 10px 10px 10px; + .el-message-box__status{ + top: 12px; + &.el-icon-warning{ + color: #ED4A41; + } + } + .el-message-box__message{ + p{ + color: #0C0E1E; + span{ + display: block; + font-size: 12px; + color: #ED4A41; + } + } + } + } + .el-message-box__btns{ + padding: 0; + margin-top: 27px; + } +} + +.el-table__header-wrapper{ + @include elTable-style; +} + +.svg-style{ + margin-right: 5px; +} +.svg-arc-style{ + margin-right: 10px; +} + +.el-form-item__error--inline{ + margin-left: 0; + vertical-align: top; +} +.inline-error-item .el-form-item__content{ + line-height: normal; + margin-bottom: -15px; +} + +.el-select-dropdown, +.el-dropdown-menu{ + margin: 0; + padding: 17px 0; + @include dropdown_bg; + border: none; +} +.el-dropdown-menu{ + top: 46px !important; +} +.el-select-dropdown__item{ + @include icon_color; +} +.el-select-dropdown__item.hover, +.el-select-dropdown__item:hover{ + @include dropdown_bg_hover; +} + +.el-select-dropdown.is-multiple .el-select-dropdown__item.selected{ + background-color: transparent; + @include icon_color; +} +.el-select-dropdown.is-multiple .el-select-dropdown__item.selected.hover{ + @include dropdown_bg_hover; +} + +.el-popper[x-placement^=bottom] .popper__arrow{ + opacity: 0; +} + +.el-popper[x-placement^=bottom] .popper__arrow::after{ + content: ''; + border: none; +} +.el-dropdown-menu .el-dropdown-menu__item{ + @include icon_color; +} +.el-dropdown-menu .el-dropdown-menu__item:hover{ + @include dropdown_bg_hover; +} + +//vue-treeselect +.vue-treeselect__multi-value-item{ + background:#13439E !important; + border: none !important; +} +.vue-treeselect__multi-value-label{ + color: #fff; +} +.vue-treeselect__value-remove{ + border-left: none !important; +} +.vue-treeselect__value-remove > svg{ + color: #fff; +} +.el-dropdown-menu--small .el-dropdown-menu__item{ + font-size: 14px; + line-height: 32px; + padding: 0 32px; +} + +.el-dropdown-menu--small .el-dropdown-menu__item.message-list-item{ + padding: 0; +} +.message-list-item a, +.messsage-item{ + display: flex; + justify-content: flex-start; + padding: 5px 10px; + // height: 40px; + font-size: 14px; + line-height: 30px; + // border-bottom: 1px solid #113D72; + &:hover{ + background-color: #F5F9FC; + } + p, span, i{ + // line-height: 40px; + } + p{ + width: 300px; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + } + span{ + display: block; + } + i.el-icon-arrow-right:before{ + font-size: 16px; + color: $mainColor; + } +} +.message-dropdown.el-popper[x-placement^=bottom]{ + .popper__arrow{ + width: 89px; + height: 20px; + top: -8px; + background: url('~@/assets/images/pop-message.png') no-repeat !important; + border: none; + transform: rotate(0); + } +} + +// 库房空气质量监控 +.msg-list{ + position: absolute; + top: 0; + left: 0; + width: calc(100vw - 800px); +} +.msg-list, +.screen-env-list{ + display: flex; + li{ + display: flex; + flex-wrap: nowrap; + align-items: center; + align-content: center; + justify-content: center; + width: calc(100%/6); + height: 80px; + margin-right: 20px; + background: url('~@/assets/images/data_border_default.png') no-repeat; + background-size: 100% 100%; + position: relative; + &.li-warn{ + background: url('~@/assets/images/data_border_warn.png') no-repeat; + background-size: 100% 100%; + } + .msg-list-svg{ + font-size: 36px; + display: inline-block; + height: 80px; + line-height: 80px; + margin-left: 30px; + } + .msg-pm{ + font-size: 46px; + } + .msg-txt{ + position: relative; + flex: 1; + height: 80px; + text-align: center; + } + .msg-list-unit{ + position: absolute; + left: 0; + bottom: 12px; + width: 100%; + font-size: 14px; + color: $mainColor; + } + .msg-list-num{ + color: #fff; + font-size: 26px; + position: absolute; + left: 0; + top: 14px; + width: 100%; + } + } +} + +.el-tag--small{ + margin: 2px 0; + @include elTag-style; +} + +.el-tag.el-tag--warning { + background-color: transparent; + border-color: #FD8042; + color: #FD8042; +} + +.el-tag.el-tag--danger { + background-color: transparent; + border-color: #f65163; + color: #f65163; +} + +.el-tag.el-tag--info { + margin: 0 0 0 8px; + height: 20px; + line-height: 20px; + font-size: 12px; + border: none; + @include select-elTag-style; +} + +.el-tag.el-tag--info .el-tag__close { + @include select-elTag-style; +} + +// table 选中状态 +.el-table__body .rowStyle>td { + color: #fff !important; + background-color: #13439E !important; +} + +// 数据为空 +.empty-main{ + display: flex; + height: calc(100% - 40px); + flex-flow: column; + justify-content: center; + align-items: center; + .empty-img{ + width: 140px !important; + height: 140px !important; + vertical-align: middle !important; + } + p{ + font-size: 12px; + color: #999; + margin-top: -10px; + } +} + +// 日期控件btn +.el-date-range-picker{ + .el-picker-panel__footer .el-button{ + border: 1px solid $mainColor; + color: $mainColor !important; + } + .el-picker-panel__footer .el-button:hover{ + background-color: transparent; + } + .el-picker-panel__footer .el-button.is-plain { + background-color: #1890ff; + border-color: #1890ff; + color: #fff !important; + } +} +// 档案统计title +.table-title { + @include font-color($font-color-dark); + font-size: 16px; + text-align: center; + height: 40px; + line-height: 40px; +} + +.warehouse-svg { + margin: 0 10px 1px 0; +} +.el-switch .el-switch__core{ + @include switch-disabled; +} + +.el-switch.is-checked .el-switch__core{ + @include switch-style; +} + +.el-switch.is-disabled .el-switch__core{ + @include switch-disabled; +} + +.vue-treeselect--open-below .vue-treeselect__menu{ + padding: 6px 0; + top: 4px !important; + margin-top: 0 !important; + border: none !important; + box-shadow: 0px 3px 11px 0px rgba(0,0,0,0.17) !important; + border-radius: 3px !important; + .vue-treeselect__option{ + height: 26px; + line-height: 26px; + .vue-treeselect__label{ + font-weight: normal; + color: #545B65; + } + &.vue-treeselect__option--highlight, + &.vue-treeselect__option--selected{ + background: #F5F9FC; + .vue-treeselect__label{ + color:#0348F3; + } + } + } +} + +// 角色权限选择 +.tree-tab { + display: flex; + justify-content: space-between; + align-items: first baseline; + @include tree_tab_style; + span.role-span{ + display: block; + font-size: 14px; + @include tree_tab_item; + line-height: 26px; + cursor: pointer; + &.role-tab-active{ + font-size: 16px; + @include tree_tab_item_active; + } + } + .el-button--mini{ + width: 46px; + height: 26px; + padding: 0; + } +} + +// checkbox +.el-checkbox__input.is-checked .el-checkbox__inner{ + @include checkbox-active-style; +} + +.el-checkbox__input.is-indeterminate .el-checkbox__inner{ + @include checkbox-active-style; +} + +.el-checkbox__input.is-disabled .el-checkbox__inner{ + @include checkbox-disabled-style; +} + +.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{ + @include checkboxAnddisabled-style; +} + +.el-radio-button__orig-radio:checked+.el-radio-button__inner{ + color: #0348F3; + background-color: #E8F2FF; + border-color: #dcdfe6; + -webkit-box-shadow: -1px 0 0 0 #1890ff; + box-shadow: -1px 0 0 0 #E8F2FF; +} + +.iconFolder{ + display: inline-block; + // width: 17px; + height: 17px; + padding-left: 22px; + background: url('~@/assets/images/icon/tree-01.png') no-repeat left center; + background-size: 17px 17px; + // background-size: contain; +} +.iconArch{ + display: inline-block; + // width: 20px; + height: 20px; + padding-left: 22px; + background: url('~@/assets/images/icon/tree-02.png') no-repeat left center; + background-size: 20px 20px; + // background-size: cover; +} + +.iconFile{ + @include tree_children_font; + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + &::before{ + content: "\e623"; + font-size: 16px; + @include tree_children_icon_font; + } +} + +.iconMenu{ + display: inline-block; + height: 20px; + padding-left: 22px; + background: url('~@/assets/images/icon/menu-tree01.png') no-repeat left center; + background-size: 20px 20px; +} + +.iconMenuColumn{ + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + &::before{ + content: "\e69e"; + font-size: 16px; + @include tree_children_icon_font; + } +} + +.iconStoreHouse{ + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + &::before{ + content: "\e667"; + font-size: 16px; + @include tree_store_icon_font; + } +} + +.iconArea{ + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + &::before{ + content: "\e678"; + font-size: 14px; + @include tree_children_icon_font; + } +} + +.iconLevel{ + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + &::before{ + content: "\e675"; + font-size: 14px; + @include tree_children_icon_font; + } +} + +.iconClassify{ + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + &::before{ + content: "\e648"; + font-size: 14px; + @include tree_classfiy_icon_font; + } +} +.iconClassify-child{ + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + &::before{ + content: "\e64a"; + font-size: 14px; + @include tree_classfiy_icon_font; + } +} + +// 档案门类-基本信息 +.system-base-info { + @include category-padding; + padding: 20px; + .info-item { + display: flex; + font-size: 14px; + @include category-info-item; + span { + display: block; + width: 80px; + height: 36px; + line-height: 36px; + text-align: right; + @include pagination-font; + } + p { + width: 300px; + padding: 0 10px; + line-height: 36px; + @include category-info-text; + } + } + .info-content p { + height: 120px; + } +} + + +.sort-dialog{ + .el-dialog{ + width: 504px; + padding: 0; + } + .el-dialog__header{ + margin: 0 20px; + } + .el-dialog__body{ + padding-top: 0; + } + .dialog-footer{ + padding: 0 20px; + } + .drag-tip { + display: block; + padding: 15px 20px; + font-style: normal; + font-weight: normal; + color: #0348F3; + } +} + +// 档案门类 2 +.format-main { + display: flex; + justify-content: flex-start; + @include category-padding; + .format-main-left { + padding-right: 10px; + } + .format-main-right { + flex-grow: 1; + } +} +.addEdit-category-form{ + .setting-dialog{ + .el-form{ + max-height: 600px; + padding-right: 10px; + overflow: hidden; + overflow-y: scroll; + } + } +} + +// 归档章/水印提示 +.chapter-tip{ + padding: 10px 20px 10px 40px; + margin-bottom: 30px; + font-size: 12px; + color: #545B65; + line-height: 26px; + background-color: #EEF5FE; + border: 1px solid #CBDAFF; + border-left: 2px solid #0348F3; + p{ + font-size: 14px; + color: #0C0E1E; + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + &::before{ + content: '\e61e'; + color: #215EF4; + margin-left: -24px; + margin-right: 10px; + } + } + span{ + display: block; + position: relative; + padding-left: 14px; + &::before{ + content: ''; + position: absolute; + left: 0; + top: 50%; + width: 6px; + height: 6px; + border-radius: 50%; + background-color: #9BA6B7; + transform: translateY(-50%); + } + } +} +.chapter-setting, +.waterMark-main{ + display: flex; + justify-content: space-between; +} +.chapter-format{ + padding-left: 42px; +} + +.chapter-item{ + display: flex; + justify-content: flex-start; + font-size: 14px; + height: 32px; + line-height: 32px; + margin-bottom: 20px; + p.item-title{ + width: 70px; + @include setting-item-font; + text-align: right; + margin-right: 10px; + } + span.item-selected{ + display: block; + width: 297px; + padding: 0 13px; + @include setting-item-selected; + } +} + +.chapter-enable{ + display: flex; + justify-content: flex-start; + .chapter-edit{ + margin-left: 36px; + } +} + +.format-style{ + display: flex; + justify-content: space-between; + flex-wrap: wrap; + width: 300px; + height: 80px; + border-left: 1px solid #E6E8ED; + border-top: 1px solid #E6E8ED; + span{ + display: block; + width: 100px; + height: 40px; + margin-left: -1px; + margin-top: -1px; + line-height: 40px; + text-align: center; + border: 1px solid #E6E8ED; + border-left: none; + border-top: none; + } +} + +.isEnable-chapter{ + margin-top: 5px; + .el-switch__core{ + width: 28px !important; + height: 16px !important; + &::after{ + width: 12px; + height: 12px; + margin-left: 0; + } + } +} + +.chapter-enable, +.process-item{ + .el-switch.is-checked .el-switch__core::after{ + margin-left: -13px !important; + } +} + +.waterMark-result{ + .chapter-item{ + p.item-title{ + width: 90px; + } + .item-remark{ + height: 110px; + } + } +} + +// 著录界面 +.category-main { + display: flex; + justify-content: flex-start; + @include main-padding; + .des-preview-left, + .des-preview-right { + height: calc(100vh - 274px); + padding-right: 10px; + overflow-y: auto; + } + .des-preview-left { + flex: 1; + .des-form{ + .input-num{ + display: flex; + justify-content: flex-end; + text-align: right; + @include des-preview-input-num; + .el-form-item__content{ + margin-left: 0 !important; + .el-input, + .el-input-number--small, + .el-input-number.is-controls-right { + padding-left: 2px; + padding-right: 2px; + @include des-preview-input-cont; + } + } + } + } + .el-col-8{ + text-align: right; + } + checkbox-item{ + .el-form-item__content{ + margin-left: 0 !important; + } + } + } + .des-title { + position: relative; + height: 28px; + margin-bottom: 10px; + font-size: 14px; + font-weight: bold; + color: #fff; + cursor: pointer; + @include des-title; + p { + line-height: 28px; + i { + font-size: 16px; + margin-left: 6px; + background-image: none; + transition: all ease-in 0.5s; + &.arrow-up { + transform: rotate(180deg); + } + } + } + &::before { + content: ""; + position: absolute; + left: 0; + z-index: 1; + } + } + .des-fields { + display: flex; + flex-wrap: wrap; + margin-bottom: 20px; + margin-left: 1px; + li { + width: 100px; + height: 40px; + line-height: 40px; + margin: -1px 0 0 -1px; + font-size: 14px; + text-align: center; + @include des-fields; + cursor: pointer; + p { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + } + } + } + .des-set-btn { + display: flex; + justify-content: flex-end; + text-align: right; + margin-bottom: 20px; + .el-button { + display: block; + @include elButton-style; + &.el-button--small{ + padding: 7px 10px; + } + } + .des-set-sort { + .iconfont { + line-height: 0 !important; + } + } + } + + .des-preview-right { + width: 740px; + margin-left: 20px; + } +} + +// 带select得输入框 +.input-prepend{ + position: relative; + z-index: 99; + overflow: hidden; + .el-input__inner { + padding-left: 80px; + background-color: transparent; + } + .el-input-group__prepend { + position: absolute; + left: 0; + top: 1px; + color: #fff; + background-color: transparent; + border: none !important; + height: 32px; + line-height: 30px; + .el-input__inner { + padding: 0 10px !important; + border-radius: 3px 0 0 3px; + @include prepend-input; + } + .el-input__inner:hover, + .el-input__inner:focus{ + @include prepend-input; + } + .el-select__caret{ + @include prepend-color; + } + } +} + +// 系统日志 +.el-table__expanded-cell{ + padding: 0 !important; +} +.demo-table-expand { + padding: 10px 30px; + background-color: #F5F9FC; +} +.demo-table-expand { + .el-form-item { + display: flex; + justify-content: flex-start; + margin-right: 0; + margin-bottom: 0; + width: 100%; + .el-form-item__label{ + width: 80px !important; + font-size: 12px; + color: #0C0E1E; + } + .el-form-item__content { + font-size: 12px; + color: #545B65; + } + } +} + +// 元数据 +.hljs{ + width: 100%; + padding: 0 30px; + background-color: transparent !important; + font-family: "Sans Mono", "Consolas", "Courier", monospace; + font-size: 14px; + .hljs-attribute{ + display: inline-block; + margin: 2px 0 !important; + } +} + +.java.hljs { + color: #545B65 !important; + height: 630px !important; +} + +.tip { + display: inline-block; + margin: 4px 0 0 14px; + padding-left: 20px; + font-style: normal; + font-weight: normal; + font-size: 12px; + line-height: 20px; + background: url('~@/assets/images/icon/tip-icon.png') no-repeat left 6px; + background-size: 14px 14px; +} + + +.fixed-table.el-table .el-table__fixed-right{ + @include table-fixed-style; +} + +// 流程管理内 - 档案列表dialog +.detail-dialog{ + .el-dialog{ + width: 860px; + .el-dialog__body{ + padding: 0 0 30px 0; + } + } + .el-pagination{ + margin: 20px 0 10px 0 !important; + } +} + +.item-content{ + height: calc(100vh - 380px); +} + +// 个人中心 +.process-center{ + display: flex; + justify-content: space-between; + height: 100%; + overflow: hidden; + .process-left{ + width: 240px; + padding: 26px 0; + @include process-left-style; + li{ + height: 50px; + line-height: 50px; + padding-left: 40px; + cursor: pointer; + &.active-li{ + position: relative; + &::before{ + position: absolute; + left: 0; + top: 50%; + content: ""; + width: 3px; + height: 28px; + margin-top: -14px; + } + } + + } + } + .head-container{ + margin: 20px 0 !important; + } + .user-search-btn{ + @include btn_blue_style; + } +} + +.corres-field-main{ + display: flex; + justify-content: space-between; + height: 428px; + border: 1px solid #E6E8ED; + overflow: hidden; + overflow-y: scroll; + .corres-field-list{ + .corres-field-title{ + height: 60px; + line-height: 20px; + background-color: #F5F9FC; + text-align: center; + p{ + font-size: 14px; + color: #0C0E1E; + padding-top: 10px; + } + span{ + font-size: 12px; + color: #0348F3; + } + } + .field-list{ + border-right: 1px solid #E6E8ED; + .field-item{ + display: flex; + justify-content: space-between; + height: 40px; + line-height: 40px; + border-bottom: 1px solid #E6E8ED; + p{ + flex: 1; + font-size: 14px; + color: #545B65; + text-align: center; + } + .el-select{ + width: 302px; + border-right: 1px solid #E6E8ED; + .el-input__inner{ + height: 38px; + line-height: 38px; + border: none; + } + } + .field-state{ + width: 88px; + text-align: center; + border-left: 1px solid #E6E8ED; + span{ + display: inline-block; + width: 48px; + height: 22px; + line-height: 22px; + font-size: 12px; + border-radius: 3px; + } + span.is-select{ + color: #0348F3; + background-color: #EEF5FE; + border: 1px solid #90B0F9; + } + span.is-hide{ + color: #A6ADB6; + background-color: #F3F5F9; + border: 1px solid #E6E8ED; + } + } + } + } + } + .corres-field-middle, + .corres-field-right{ + flex: 1; + } + .corres-field-right{ + border-right: none; + } +} + +.el-upload { + .el-button{ + color: #fff !important; + background-color: #1F55EB !important; + border: none !important; + } +} + +// 2023-10-8 +.upload-bgColor{ + position: relative; + .upload-input{ + position: absolute; + left: 0; + top: 0; + opacity: 0; + } + .el-button{ + color: #fff !important; + background-color: #1F55EB !important; + border: none !important; + } +} + +.row-state{ + display: inline-block; + padding: 0 4px; + height: 20px; + line-height: 20px; + text-align: center; + font-size: 12px; + border-radius: 3px; + @include process-status-style; +} + +.vue-treeselect--disabled .vue-treeselect__control{ + background-color: #f5f7fa !important; + border-color: #dfe4ed !important; + color: #c0c4cc !important; + cursor: not-allowed !important; +} +.vue-treeselect--disabled .vue-treeselect__single-value{ + color: #c0c4cc !important; +} + +// .fileIcon{ +// display: block; +// width: 32px; +// height: 32px; +// margin: 0 auto; +// &.icon-image{ +// background: url("~@/assets/images/fileIcon/image.png") no-repeat; +// background-size: 100% 100%; +// } +// &.icon-excel{ +// background: url("~@/assets/images/fileIcon/excel.png") no-repeat; +// background-size: 100% 100%; +// } +// &.icon-pdf{ +// background: url("~@/assets/images/fileIcon/pdf.png") no-repeat; +// background-size: 100% 100%; +// } +// &.icon-ppt{ +// background: url("~@/assets/images/fileIcon/ppt.png") no-repeat; +// background-size: 100% 100%; +// } +// &.icon-word{ +// background: url("~@/assets/images/fileIcon/word.png") no-repeat; +// background-size: 100% 100%; +// } +// &.icon-zip{ +// background: url("~@/assets/images/fileIcon/zip.png") no-repeat; +// background-size: 100% 100%; +// } +// &.icon-txt{ +// background: url("~@/assets/images/fileIcon/txt.png") no-repeat; +// background-size: 100% 100%; +// } +// &.icon-other{ +// background: url("~@/assets/images/fileIcon/attachment.png") no-repeat; +// background-size: 100% 100%; +// } +// } + +.handle-btn { + display: flex; + justify-content: center; + align-items: center; + flex-wrap: nowrap; + .el-button{ + padding: 5px; + font-size: 18px; + font-weight: normal; + &.iconfont::before{ + margin-right: 0; + } + &.icon-xiazai{ + font-size: 16px; + } + } +} + +.map-dialog{ + .el-dialog{ + width: 1200px; + height: 800px; + .el-dialog__body{ + padding: 0 !important; + } + } +} \ No newline at end of file diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue new file mode 100644 index 0000000..2422b9f --- /dev/null +++ b/src/components/Breadcrumb/index.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/components/Crud/CRUD.operation.vue b/src/components/Crud/CRUD.operation.vue new file mode 100644 index 0000000..4e6b211 --- /dev/null +++ b/src/components/Crud/CRUD.operation.vue @@ -0,0 +1,254 @@ + + + + diff --git a/src/components/Crud/Pagination.vue b/src/components/Crud/Pagination.vue new file mode 100644 index 0000000..5b2b29c --- /dev/null +++ b/src/components/Crud/Pagination.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/components/Crud/RR.operation.vue b/src/components/Crud/RR.operation.vue new file mode 100644 index 0000000..6def715 --- /dev/null +++ b/src/components/Crud/RR.operation.vue @@ -0,0 +1,47 @@ + + + + diff --git a/src/components/Crud/UD.operation.vue b/src/components/Crud/UD.operation.vue new file mode 100644 index 0000000..806a91b --- /dev/null +++ b/src/components/Crud/UD.operation.vue @@ -0,0 +1,103 @@ + + + + diff --git a/src/components/Crud/crud.js b/src/components/Crud/crud.js new file mode 100644 index 0000000..ff0857f --- /dev/null +++ b/src/components/Crud/crud.js @@ -0,0 +1,893 @@ +import { initData, download } from '@/api/data' +import { parseTime, downloadFile } from '@/utils/index' +import Vue from 'vue' + +/** + * CRUD配置 + * @author moxun + * @param {*} options
+ * @return crud instance. + * @example + * 要使用多crud时,请在关联crud的组件处使用crud-tag进行标记,如: + */ +function CRUD(options) { + const defaultOptions = { + tag: 'default', + // id字段名 + idField: 'id', + // 标题 + title: '', + // 请求数据的url + url: '', + // 表格数据 + data: [], + // 选择项 + selections: [], + // 待查询的对象 + query: {}, + // 查询数据的参数 + params: {}, + // Form 表单 + form: {}, + // 重置表单 + defaultForm: () => {}, + // 排序规则,默认 id 降序, 支持多字段排序 ['id,desc', 'createTime,asc'] + sort: [], + // 等待时间 + time: 50, + // CRUD Method + crudMethod: { + add: (form) => {}, + del: (id) => {}, + edit: (form) => {}, + get: (id) => {} + }, + // 主页操作栏显示哪些按钮 + optShow: { + add: true, + edit: true, + del: true, + download: true, + reset: true, + group: true + }, + // 自定义一些扩展属性 + props: {}, + // 在主页准备 + queryOnPresenterCreated: true, + // 调试开关 + debug: false, + confirmDeleteMsg: null + } + options = mergeOptions(defaultOptions, options) + const data = { + ...options, + // 记录数据状态 + dataStatus: {}, + status: { + add: CRUD.STATUS.NORMAL, + edit: CRUD.STATUS.NORMAL, + // 添加或编辑状态 + get cu() { + if (this.add === CRUD.STATUS.NORMAL && this.edit === CRUD.STATUS.NORMAL) { + return CRUD.STATUS.NORMAL + } else if (this.add === CRUD.STATUS.PREPARED || this.edit === CRUD.STATUS.PREPARED) { + return CRUD.STATUS.PREPARED + } else if (this.add === CRUD.STATUS.PROCESSING || this.edit === CRUD.STATUS.PROCESSING) { + return CRUD.STATUS.PROCESSING + } + throw new Error('wrong crud\'s cu status') + }, + // 标题 + get title() { + return this.add > CRUD.STATUS.NORMAL ? `新增${crud.title}` : this.edit > CRUD.STATUS.NORMAL ? `编辑${crud.title}` : crud.title + } + }, + msg: { + submit: '提交成功', + add: '新增成功', + edit: '编辑成功', + del: '删除成功' + }, + page: { + // 页码 + page: 0, + // 每页数据条数 + size: 10, + // 总数据条数 + total: 0 + }, + // 整体loading + loading: false, + // 导出的 Loading + downloadLoading: false, + // 删除的 Loading + delAllLoading: false + } + const methods = { + /** + * 通用的提示 + */ + submitSuccessNotify() { + crud.notify(crud.msg.submit, CRUD.NOTIFICATION_TYPE.SUCCESS) + }, + addSuccessNotify() { + crud.notify(crud.msg.add, CRUD.NOTIFICATION_TYPE.SUCCESS) + }, + addErrorNotify(message) { + crud.notify(message, CRUD.NOTIFICATION_TYPE.ERROR) + }, + editSuccessNotify() { + crud.notify(crud.msg.edit, CRUD.NOTIFICATION_TYPE.SUCCESS) + }, + delSuccessNotify() { + crud.notify(crud.msg.del, CRUD.NOTIFICATION_TYPE.SUCCESS) + }, + // 搜索 + toQuery() { + crud.page.page = 1 + crud.refresh() + }, + // 刷新 + refresh() { + if (!callVmHook(crud, CRUD.HOOK.beforeRefresh)) { + return + } + return new Promise((resolve, reject) => { + crud.loading = true + // 请求数据 + initData(crud.url, crud.getQueryParams()).then(data => { + const table = crud.getTable() + if (table && table.lazy) { // 懒加载子节点数据,清掉已加载的数据 + table.store.states.treeData = {} + table.store.states.lazyTreeNodeMap = {} + } + if (Array.isArray(data)) { + crud.page.total = data.totalElements !== null ? data.totalElements : data.length + crud.data = data.content ? data.content : data + } else { + if (data.list) { + crud.page.total = data.total + crud.data = data.list ? data.list : data + } else if (data.records) { + crud.page.total = data.total !== null ? data.total : data.length + crud.data = data.records ? data.records : data + } else if (data.data) { + crud.page.total = data.total !== null ? data.total : data.length + crud.data = data.data ? data.data : data + } else { + crud.page.total = data.totalElements !== null ? data.totalElements : data.length + crud.data = data.content ? data.content : data + } + } + crud.resetDataStatus() + // time 毫秒后显示表格 + setTimeout(() => { + crud.loading = false + callVmHook(crud, CRUD.HOOK.afterRefresh) + }, crud.time) + resolve(data) + }).catch(err => { + crud.loading = false + reject(err) + }) + }) + }, + /** + * 启动添加 + */ + toAdd() { + crud.resetForm() + if (!(callVmHook(crud, CRUD.HOOK.beforeToAdd, crud.form) && callVmHook(crud, CRUD.HOOK.beforeToCU, crud.form, 'add'))) { + return + } + crud.status.add = CRUD.STATUS.PREPARED + callVmHook(crud, CRUD.HOOK.afterToAdd, crud.form) + callVmHook(crud, CRUD.HOOK.afterToCU, crud.form) + }, + /** + * 启动编辑 + * @param {*} data 数据项 + */ + toEdit(data) { + crud.resetForm(JSON.parse(JSON.stringify(data))) + if (!(callVmHook(crud, CRUD.HOOK.beforeToEdit, crud.form) && callVmHook(crud, CRUD.HOOK.beforeToCU, crud.form, 'edit'))) { + return + } + crud.status.edit = CRUD.STATUS.PREPARED + console.log(crud.getDataId(data)) + console.log(crud.getDataStatus(crud.getDataId(data))) + crud.getDataStatus(crud.getDataId(data)).edit = CRUD.STATUS.PREPARED + callVmHook(crud, CRUD.HOOK.afterToEdit, crud.form) + callVmHook(crud, CRUD.HOOK.afterToCU, crud.form) + }, + /** + * 启动删除 + * @param {*} data 数据项 + */ + toDelete(data) { + crud.getDataStatus(crud.getDataId(data)).delete = CRUD.STATUS.PREPARED + }, + /** + * 取消删除 + * @param {*} data 数据项 + */ + cancelDelete(data) { + if (!callVmHook(crud, CRUD.HOOK.beforeDeleteCancel, data)) { + return + } + crud.getDataStatus(crud.getDataId(data)).delete = CRUD.STATUS.NORMAL + callVmHook(crud, CRUD.HOOK.afterDeleteCancel, data) + }, + /** + * 取消新增/编辑 + */ + cancelCU() { + const addStatus = crud.status.add + const editStatus = crud.status.edit + if (addStatus === CRUD.STATUS.PREPARED) { + if (!callVmHook(crud, CRUD.HOOK.beforeAddCancel, crud.form)) { + return + } + crud.status.add = CRUD.STATUS.NORMAL + } + if (editStatus === CRUD.STATUS.PREPARED) { + if (!callVmHook(crud, CRUD.HOOK.beforeEditCancel, crud.form)) { + return + } + crud.status.edit = CRUD.STATUS.NORMAL + crud.getDataStatus(crud.getDataId(crud.form)).edit = CRUD.STATUS.NORMAL + } + crud.resetForm() + if (addStatus === CRUD.STATUS.PREPARED) { + callVmHook(crud, CRUD.HOOK.afterAddCancel, crud.form) + } + if (editStatus === CRUD.STATUS.PREPARED) { + callVmHook(crud, CRUD.HOOK.afterEditCancel, crud.form) + } + // 清除表单验证 + if (crud.findVM('form').$refs['form']) { + crud.findVM('form').$refs['form'].clearValidate() + } + }, + /** + * 提交新增/编辑 + */ + submitCU() { + if (!callVmHook(crud, CRUD.HOOK.beforeValidateCU)) { + return + } + crud.findVM('form').$refs['form'].validate(valid => { + if (!valid) { + return + } + if (!callVmHook(crud, CRUD.HOOK.afterValidateCU)) { + return + } + if (crud.status.add === CRUD.STATUS.PREPARED) { + crud.doAdd() + } else if (crud.status.edit === CRUD.STATUS.PREPARED) { + crud.doEdit() + } + }) + }, + /** + * 执行添加 + */ + doAdd() { + if (!callVmHook(crud, CRUD.HOOK.beforeSubmit)) { + return + } + crud.status.add = CRUD.STATUS.PROCESSING + crud.crudMethod.add(crud.form).then((res) => { + crud.status.add = CRUD.STATUS.NORMAL + crud.resetForm() + console.log('res', res) + // if (res && res !== 'SUCCESS' || res !== '保存成功' || res.code !== 500) { + if (res === 'SUCCESS' || res === '保存成功' || res.code !== 500 || res.code !== null) { + crud.addSuccessNotify() + callVmHook(crud, CRUD.HOOK.afterSubmit, res) + } else { + crud.addErrorNotify(res.message) + callVmHook(crud, CRUD.HOOK.afterAddError) + } + crud.toQuery() + }).catch(() => { + crud.status.add = CRUD.STATUS.PREPARED + callVmHook(crud, CRUD.HOOK.afterAddError) + }) + }, + /** + * 执行编辑 + */ + doEdit() { + if (!callVmHook(crud, CRUD.HOOK.beforeSubmit)) { + return + } + crud.status.edit = CRUD.STATUS.PROCESSING + crud.crudMethod.edit(crud.form).then(() => { + crud.status.edit = CRUD.STATUS.NORMAL + crud.getDataStatus(crud.getDataId(crud.form)).edit = CRUD.STATUS.NORMAL + crud.editSuccessNotify() + crud.resetForm() + callVmHook(crud, CRUD.HOOK.afterSubmit) + crud.refresh() + }).catch(() => { + crud.status.edit = CRUD.STATUS.PREPARED + callVmHook(crud, CRUD.HOOK.afterEditError) + }) + }, + /** + * 执行删除 + * @param {*} data 数据项 + */ + doDelete(data) { + let delAll = false + let dataStatus + const ids = [] + if (data instanceof Array) { + delAll = true + data.forEach(val => { + ids.push(this.getDataId(val)) + }) + } else { + ids.push(this.getDataId(data)) + dataStatus = crud.getDataStatus(this.getDataId(data)) + } + if (!callVmHook(crud, CRUD.HOOK.beforeDelete, data)) { + return + } + if (!delAll) { + dataStatus.delete = CRUD.STATUS.PROCESSING + } + return crud.crudMethod.del(ids).then(() => { + if (delAll) { + crud.delAllLoading = false + } else dataStatus.delete = CRUD.STATUS.PREPARED + crud.dleChangePage(1) + // crud.delSuccessNotify() + callVmHook(crud, CRUD.HOOK.afterDelete, data) + crud.refresh() + }).catch(() => { + if (delAll) { + crud.delAllLoading = false + } else dataStatus.delete = CRUD.STATUS.PREPARED + }) + }, + /** + * 通用导出 + */ + doExport() { + crud.downloadLoading = true + download(crud.url + '/download', crud.getQueryParams()).then(result => { + downloadFile(result, crud.title + '数据', 'xlsx') + crud.downloadLoading = false + }).catch(() => { + crud.downloadLoading = false + }) + }, + /** + * 获取查询参数 + */ + getQueryParams: function() { + // 清除参数无值的情况 + Object.keys(crud.query).length !== 0 && Object.keys(crud.query).forEach(item => { + if (crud.query[item] === null || crud.query[item] === '') crud.query[item] = undefined + }) + Object.keys(crud.params).length !== 0 && Object.keys(crud.params).forEach(item => { + if (crud.params[item] === null || crud.params[item] === '') crud.params[item] = undefined + }) + return { + page: crud.page.page - 1, + size: crud.page.size, + sort: crud.sort, + ...crud.query, + ...crud.params + } + }, + // 当前页改变 + pageChangeHandler(e) { + crud.page.page = e + crud.refresh() + }, + // 每页条数改变 + sizeChangeHandler(e) { + crud.page.size = e + crud.page.page = 1 + crud.refresh() + }, + // 预防删除第二页最后一条数据时,或者多选删除第二页的数据时,页码错误导致请求无数据 + dleChangePage(size) { + if (crud.data.length === size && crud.page.page !== 1) { + crud.page.page -= 1 + } + }, + // 选择改变 + selectionChangeHandler(val) { + crud.selections = val + }, + /** + * 重置查询参数 + * @param {Boolean} toQuery 重置后进行查询操作 + */ + resetQuery(toQuery = true) { + const defaultQuery = JSON.parse(JSON.stringify(crud.defaultQuery)) + const query = crud.query + Object.keys(query).forEach(key => { + query[key] = defaultQuery[key] + }) + // 重置参数 + this.params = {} + if (toQuery) { + crud.toQuery() + } + }, + /** + * 重置表单 + * @param {Array} data 数据 + */ + resetForm(data) { + const form = data || (typeof crud.defaultForm === 'object' ? JSON.parse(JSON.stringify(crud.defaultForm)) : crud.defaultForm.apply(crud.findVM('form'))) + const crudFrom = crud.form + for (const key in form) { + if (crudFrom.hasOwnProperty(key)) { + crudFrom[key] = form[key] + } else { + Vue.set(crudFrom, key, form[key]) + } + } + // add by ghl 2020-10-04 页面重复添加信息时,下拉框的校验会存在,需要找工取消 + if (crud.findVM('form').$refs['form']) { + crud.findVM('form').$refs['form'].clearValidate() + } + }, + /** + * 重置数据状态 + */ + resetDataStatus() { + const dataStatus = {} + function resetStatus(datas) { + datas.forEach(e => { + dataStatus[crud.getDataId(e)] = { + delete: 0, + edit: 0 + } + if (e.children) { + resetStatus(e.children) + } + }) + } + resetStatus(crud.data) + crud.dataStatus = dataStatus + }, + /** + * 获取数据状态 + * @param {Number | String} id 数据项id + */ + getDataStatus(id) { + return crud.dataStatus[id] + }, + /** + * 用于树形表格多选, 选中所有 + * @param selection + */ + selectAllChange(selection) { + // 如果选中的数目与请求到的数目相同就选中子节点,否则就清空选中 + if (selection && selection.length === crud.data.length) { + selection.forEach(val => { + crud.selectChange(selection, val) + }) + } else { + crud.getTable().clearSelection() + } + }, + /** + * 用于树形表格多选,单选的封装 + * @param selection + * @param row + */ + selectChange(selection, row) { + // 如果selection中存在row代表是选中,否则是取消选中 + if (selection.find(val => { return crud.getDataId(val) === crud.getDataId(row) })) { + if (row.children) { + row.children.forEach(val => { + crud.getTable().toggleRowSelection(val, true) + selection.push(val) + if (val.children) { + crud.selectChange(selection, val) + } + }) + } + } else { + crud.toggleRowSelection(selection, row) + } + }, + /** + * 切换选中状态 + * @param selection + * @param data + */ + toggleRowSelection(selection, data) { + if (data.children) { + data.children.forEach(val => { + crud.getTable().toggleRowSelection(val, false) + if (val.children) { + crud.toggleRowSelection(selection, val) + } + }) + } + }, + findVM(type) { + return crud.vms.find(vm => vm && vm.type === type).vm + }, + notify(message, type = CRUD.NOTIFICATION_TYPE.INFO) { + crud.vms[0].vm.$message({ + message, + type, + duration: 2500 + }) + }, + updateProp(name, value) { + Vue.set(crud.props, name, value) + }, + getDataId(data) { + return data[this.idField] + }, + getTable() { + return this.findVM('presenter').$refs.table + }, + attchTable() { + const table = this.getTable() + this.updateProp('table', table) + const that = this + table.$on('expand-change', (row, expanded) => { + if (!expanded) { + return + } + const lazyTreeNodeMap = table.store.states.lazyTreeNodeMap + row.children = lazyTreeNodeMap[crud.getDataId(row)] + if (row.children) { + row.children.forEach(ele => { + const id = crud.getDataId(ele) + if (that.dataStatus[id] === undefined) { + that.dataStatus[id] = { + delete: 0, + edit: 0 + } + } + }) + } + }) + } + } + const crud = Object.assign({}, data) + // 可观测化 + Vue.observable(crud) + // 附加方法 + Object.assign(crud, methods) + // 记录初始默认的查询参数,后续重置查询时使用 + Object.assign(crud, { + defaultQuery: JSON.parse(JSON.stringify(data.query)), + // 预留4位存储:组件 主页、头部、分页、表单,调试查看也方便找 + vms: Array(4), + /** + * 注册组件实例 + * @param {String} type 类型 + * @param {*} vm 组件实例 + * @param {Number} index 该参数内部使用 + */ + registerVM(type, vm, index = -1) { + const vmObj = { + type, + vm: vm + } + if (index < 0) { + this.vms.push(vmObj) + return + } + if (index < 4) { // 内置预留vm数 + this.vms[index] = vmObj + return + } + this.vms.length = Math.max(this.vms.length, index) + this.vms.splice(index, 1, vmObj) + }, + /** + * 取消注册组件实例 + * @param {*} vm 组件实例 + */ + unregisterVM(type, vm) { + for (let i = this.vms.length - 1; i >= 0; i--) { + if (this.vms[i] === undefined) { + continue + } + if (this.vms[i].type === type && this.vms[i].vm === vm) { + if (i < 4) { // 内置预留vm数 + this.vms[i] = undefined + } else { + this.vms.splice(i, 1) + } + break + } + } + } + }) + // 冻结处理,需要扩展数据的话,使用crud.updateProp(name, value),以crud.props.name形式访问,这个是响应式的,可以做数据绑定 + Object.freeze(crud) + return crud +} + +// hook VM +function callVmHook(crud, hook) { + if (crud.debug) { + console.log('callVmHook: ' + hook) + } + const tagHook = crud.tag ? hook + '$' + crud.tag : null + let ret = true + const nargs = [crud] + for (let i = 2; i < arguments.length; ++i) { + nargs.push(arguments[i]) + } + // 有些组件扮演了多个角色,调用钩子时,需要去重 + const vmSet = new Set() + crud.vms.forEach(vm => vm && vmSet.add(vm.vm)) + vmSet.forEach(vm => { + if (vm[hook]) { + ret = vm[hook].apply(vm, nargs) !== false && ret + } + if (tagHook && vm[tagHook]) { + ret = vm[tagHook].apply(vm, nargs) !== false && ret + } + }) + return ret +} + +function mergeOptions(src, opts) { + const optsRet = { + ...src + } + for (const key in src) { + if (opts.hasOwnProperty(key)) { + optsRet[key] = opts[key] + } + } + return optsRet +} + +/** + * 查找crud + * @param {*} vm + * @param {string} tag + */ +function lookupCrud(vm, tag) { + tag = tag || vm.$attrs['crud-tag'] || 'default' + // function lookupCrud(vm, tag) { + if (vm.$crud) { + const ret = vm.$crud[tag] + if (ret) { + return ret + } + } + return vm.$parent ? lookupCrud(vm.$parent, tag) : undefined +} + +/** + * crud主页 + */ +function presenter(crud) { + if (crud) { + console.warn('[CRUD warn]: ' + 'please use $options.cruds() { return CRUD(...) or [CRUD(...), ...] }') + } + return { + data() { + // 在data中返回crud,是为了将crud与当前实例关联,组件观测crud相关属性变化 + return { + crud: this.crud + } + }, + beforeCreate() { + this.$crud = this.$crud || {} + let cruds = this.$options.cruds instanceof Function ? this.$options.cruds() : crud + if (!(cruds instanceof Array)) { + cruds = [cruds] + } + cruds.forEach(ele => { + if (this.$crud[ele.tag]) { + console.error('[CRUD error]: ' + 'crud with tag [' + ele.tag + ' is already exist') + } + this.$crud[ele.tag] = ele + ele.registerVM('presenter', this, 0) + }) + this.crud = this.$crud['defalut'] || cruds[0] + }, + methods: { + parseTime + }, + created() { + for (const k in this.$crud) { + if (this.$crud[k].queryOnPresenterCreated) { + this.$crud[k].toQuery() + } + } + }, + destroyed() { + for (const k in this.$crud) { + this.$crud[k].unregisterVM('presenter', this) + } + }, + mounted() { + // 如果table未实例化(例如使用了v-if),请稍后在适当时机crud.attchTable刷新table信息 + if (this.$refs.table !== undefined) { + this.crud.attchTable() + } + } + } +} + +/** + * 头部 + */ +function header() { + return { + data() { + return { + crud: this.crud, + query: this.crud.query + } + }, + beforeCreate() { + this.crud = lookupCrud(this) + this.crud.registerVM('header', this, 1) + }, + destroyed() { + this.crud.unregisterVM('header', this) + } + } +} + +/** + * 分页 + */ +function pagination() { + return { + data() { + return { + crud: this.crud, + page: this.crud.page + } + }, + beforeCreate() { + this.crud = lookupCrud(this) + this.crud.registerVM('pagination', this, 2) + }, + destroyed() { + this.crud.unregisterVM('pagination', this) + } + } +} + +/** + * 表单 + */ +function form(defaultForm) { + return { + data() { + return { + crud: this.crud, + form: this.crud.form + } + }, + beforeCreate() { + this.crud = lookupCrud(this) + this.crud.registerVM('form', this, 3) + }, + created() { + this.crud.defaultForm = defaultForm + this.crud.resetForm() + }, + destroyed() { + this.crud.unregisterVM('form', this) + } + } +} + +/** + * crud + */ +function crud(options = {}) { + const defaultOptions = { + type: undefined + } + options = mergeOptions(defaultOptions, options) + return { + data() { + return { + crud: this.crud + } + }, + beforeCreate() { + this.crud = lookupCrud(this) + this.crud.registerVM(options.type, this) + }, + destroyed() { + this.crud.unregisterVM(options.type, this) + } + } +} + +/** + * CRUD钩子 + */ +CRUD.HOOK = { + /** 刷新 - 之前 */ + beforeRefresh: 'beforeCrudRefresh', + /** 刷新 - 之后 */ + afterRefresh: 'afterCrudRefresh', + /** 删除 - 之前 */ + beforeDelete: 'beforeCrudDelete', + /** 删除 - 之后 */ + afterDelete: 'afterCrudDelete', + /** 删除取消 - 之前 */ + beforeDeleteCancel: 'beforeCrudDeleteCancel', + /** 删除取消 - 之后 */ + afterDeleteCancel: 'afterCrudDeleteCancel', + /** 新建 - 之前 */ + beforeToAdd: 'beforeCrudToAdd', + /** 新建 - 之后 */ + afterToAdd: 'afterCrudToAdd', + /** 编辑 - 之前 */ + beforeToEdit: 'beforeCrudToEdit', + /** 编辑 - 之后 */ + afterToEdit: 'afterCrudToEdit', + /** 开始 "新建/编辑" - 之前 */ + beforeToCU: 'beforeCrudToCU', + /** 开始 "新建/编辑" - 之后 */ + afterToCU: 'afterCrudToCU', + /** "新建/编辑" 验证 - 之前 */ + beforeValidateCU: 'beforeCrudValidateCU', + /** "新建/编辑" 验证 - 之后 */ + afterValidateCU: 'afterCrudValidateCU', + /** 添加取消 - 之前 */ + beforeAddCancel: 'beforeCrudAddCancel', + /** 添加取消 - 之后 */ + afterAddCancel: 'afterCrudAddCancel', + /** 编辑取消 - 之前 */ + beforeEditCancel: 'beforeCrudEditCancel', + /** 编辑取消 - 之后 */ + afterEditCancel: 'afterCrudEditCancel', + /** 提交 - 之前 */ + beforeSubmit: 'beforeCrudSubmitCU', + /** 提交 - 之后 */ + afterSubmit: 'afterCrudSubmitCU', + afterAddError: 'afterCrudAddError', + afterEditError: 'afterCrudEditError' +} + +/** + * CRUD状态 + */ +CRUD.STATUS = { + NORMAL: 0, + PREPARED: 1, + PROCESSING: 2 +} + +/** + * CRUD通知类型 + */ +CRUD.NOTIFICATION_TYPE = { + SUCCESS: 'success', + WARNING: 'warning', + INFO: 'info', + ERROR: 'error' +} + +export default CRUD + +export { + presenter, + header, + form, + pagination, + crud +} diff --git a/src/components/DateRangePicker/index.vue b/src/components/DateRangePicker/index.vue new file mode 100644 index 0000000..5eac6a4 --- /dev/null +++ b/src/components/DateRangePicker/index.vue @@ -0,0 +1,45 @@ + diff --git a/src/components/Dict/Dict.js b/src/components/Dict/Dict.js new file mode 100644 index 0000000..b2a8a35 --- /dev/null +++ b/src/components/Dict/Dict.js @@ -0,0 +1,29 @@ +import Vue from 'vue' +import { get as getDictDetail } from '@/api/archivesConfig/dictDetail' + +export default class Dict { + constructor(dict) { + this.dict = dict + } + + async init(names, completeCallback) { + if (names === undefined || name === null) { + throw new Error('need Dict names') + } + const ps = [] + names.forEach(n => { + Vue.set(this.dict.dict, n, {}) + Vue.set(this.dict.label, n, {}) + Vue.set(this.dict, n, []) + ps.push(getDictDetail(n).then(data => { + this.dict[n].splice(0, 0, ...data.content) + data.content.forEach(d => { + Vue.set(this.dict.dict[n], d.value, d) + Vue.set(this.dict.label[n], d.value, d.label) + }) + })) + }) + await Promise.all(ps) + completeCallback() + } +} diff --git a/src/components/Dict/index.js b/src/components/Dict/index.js new file mode 100644 index 0000000..7f6d94d --- /dev/null +++ b/src/components/Dict/index.js @@ -0,0 +1,29 @@ +import Dict from './Dict' + +const install = function(Vue) { + Vue.mixin({ + data() { + if (this.$options.dicts instanceof Array) { + const dict = { + dict: {}, + label: {} + } + return { + dict + } + } + return {} + }, + created() { + if (this.$options.dicts instanceof Array) { + new Dict(this.dict).init(this.$options.dicts, () => { + this.$nextTick(() => { + this.$emit('dictReady') + }) + }) + } + } + }) +} + +export default { install } diff --git a/src/components/Doc/index.vue b/src/components/Doc/index.vue new file mode 100644 index 0000000..a9f893e --- /dev/null +++ b/src/components/Doc/index.vue @@ -0,0 +1,16 @@ + + + diff --git a/src/components/Echarts/BarChart.vue b/src/components/Echarts/BarChart.vue new file mode 100644 index 0000000..a9f21fa --- /dev/null +++ b/src/components/Echarts/BarChart.vue @@ -0,0 +1,106 @@ + + + diff --git a/src/components/Echarts/Category.vue b/src/components/Echarts/Category.vue new file mode 100644 index 0000000..9d3318e --- /dev/null +++ b/src/components/Echarts/Category.vue @@ -0,0 +1,438 @@ + + + diff --git a/src/components/Echarts/Funnel.vue b/src/components/Echarts/Funnel.vue new file mode 100644 index 0000000..8abab2d --- /dev/null +++ b/src/components/Echarts/Funnel.vue @@ -0,0 +1,120 @@ + + + diff --git a/src/components/Echarts/Gauge.vue b/src/components/Echarts/Gauge.vue new file mode 100644 index 0000000..9fc94f9 --- /dev/null +++ b/src/components/Echarts/Gauge.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/components/Echarts/Graph.vue b/src/components/Echarts/Graph.vue new file mode 100644 index 0000000..b08a08d --- /dev/null +++ b/src/components/Echarts/Graph.vue @@ -0,0 +1,101 @@ + + + diff --git a/src/components/Echarts/HeatMap.vue b/src/components/Echarts/HeatMap.vue new file mode 100644 index 0000000..69a1a6e --- /dev/null +++ b/src/components/Echarts/HeatMap.vue @@ -0,0 +1,105 @@ + + + diff --git a/src/components/Echarts/Line3D.vue b/src/components/Echarts/Line3D.vue new file mode 100644 index 0000000..710fd75 --- /dev/null +++ b/src/components/Echarts/Line3D.vue @@ -0,0 +1,96 @@ + + + diff --git a/src/components/Echarts/PieChart.vue b/src/components/Echarts/PieChart.vue new file mode 100644 index 0000000..4324919 --- /dev/null +++ b/src/components/Echarts/PieChart.vue @@ -0,0 +1,84 @@ + + + diff --git a/src/components/Echarts/Point.vue b/src/components/Echarts/Point.vue new file mode 100644 index 0000000..bbe81ae --- /dev/null +++ b/src/components/Echarts/Point.vue @@ -0,0 +1,149 @@ + + + diff --git a/src/components/Echarts/RadarChart.vue b/src/components/Echarts/RadarChart.vue new file mode 100644 index 0000000..7285b1f --- /dev/null +++ b/src/components/Echarts/RadarChart.vue @@ -0,0 +1,120 @@ + + + diff --git a/src/components/Echarts/Rich.vue b/src/components/Echarts/Rich.vue new file mode 100644 index 0000000..de9eb92 --- /dev/null +++ b/src/components/Echarts/Rich.vue @@ -0,0 +1,149 @@ + + + diff --git a/src/components/Echarts/Sankey.vue b/src/components/Echarts/Sankey.vue new file mode 100644 index 0000000..b7d5cd9 --- /dev/null +++ b/src/components/Echarts/Sankey.vue @@ -0,0 +1,100 @@ + + + diff --git a/src/components/Echarts/Scatter.vue b/src/components/Echarts/Scatter.vue new file mode 100644 index 0000000..94ad7fc --- /dev/null +++ b/src/components/Echarts/Scatter.vue @@ -0,0 +1,143 @@ + + + diff --git a/src/components/Echarts/Sunburst.vue b/src/components/Echarts/Sunburst.vue new file mode 100644 index 0000000..e5c4465 --- /dev/null +++ b/src/components/Echarts/Sunburst.vue @@ -0,0 +1,107 @@ + + + diff --git a/src/components/Echarts/ThemeRiver.vue b/src/components/Echarts/ThemeRiver.vue new file mode 100644 index 0000000..1b9c707 --- /dev/null +++ b/src/components/Echarts/ThemeRiver.vue @@ -0,0 +1,148 @@ + + + diff --git a/src/components/Echarts/WordCloud.vue b/src/components/Echarts/WordCloud.vue new file mode 100644 index 0000000..1bf1f20 --- /dev/null +++ b/src/components/Echarts/WordCloud.vue @@ -0,0 +1,192 @@ + + + diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue new file mode 100644 index 0000000..1f9db32 --- /dev/null +++ b/src/components/Hamburger/index.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/src/components/IconSelect/index.vue b/src/components/IconSelect/index.vue new file mode 100644 index 0000000..a7512b2 --- /dev/null +++ b/src/components/IconSelect/index.vue @@ -0,0 +1,68 @@ + + + + + + diff --git a/src/components/IconSelect/requireIcons.js b/src/components/IconSelect/requireIcons.js new file mode 100644 index 0000000..5d3005d --- /dev/null +++ b/src/components/IconSelect/requireIcons.js @@ -0,0 +1,11 @@ + +const req = require.context('../../assets/icons/svg', false, /\.svg$/) +const requireAll = requireContext => requireContext.keys() + +const re = /\.\/(.*)\.svg/ + +const icons = requireAll(req).map(i => { + return i.match(re)[1] +}) + +export default icons diff --git a/src/components/Iframe/index.vue b/src/components/Iframe/index.vue new file mode 100644 index 0000000..002f8e6 --- /dev/null +++ b/src/components/Iframe/index.vue @@ -0,0 +1,30 @@ +