浏览代码

First commit

hanqingsong 3 年之前
当前提交
ef6029c592
共有 100 个文件被更改,包括 19544 次插入0 次删除
  1. 2 0
      .browserslistrc
  2. 18 0
      .editorconfig
  3. 18 0
      .env
  4. 5 0
      .env.development
  5. 13 0
      .env.preview
  6. 15 0
      .eslintignore
  7. 229 0
      .eslintrc.js
  8. 21 0
      .gitignore
  9. 5 0
      .postcssrc.js
  10. 21 0
      LICENSE
  11. 27 0
      README.md
  12. 26 0
      README.zh.md
  13. 7 0
      babel.config.js
  14. 165 0
      d2-admin.babel
  15. 24 0
      dependencies-cdn.js
  16. 3 0
      jest.config.js
  17. 11 0
      jsconfig.json
  18. 15973 0
      package-lock.json
  19. 78 0
      package.json
  20. 二进制
      public/icon.ico
  21. 二进制
      public/image/baidu-pan-logo.png
  22. 6 0
      public/image/loading/loading-spin.svg
  23. 二进制
      public/image/theme/chester/logo/all.png
  24. 二进制
      public/image/theme/chester/logo/icon-only.png
  25. 二进制
      public/image/theme/chester/preview@2x.png
  26. 二进制
      public/image/theme/d2/logo/all.png
  27. 二进制
      public/image/theme/d2/logo/icon-only.png
  28. 二进制
      public/image/theme/d2/preview@2x.png
  29. 二进制
      public/image/theme/element/logo/all.png
  30. 二进制
      public/image/theme/element/logo/icon-only.png
  31. 二进制
      public/image/theme/element/preview@2x.png
  32. 二进制
      public/image/theme/line/bg.jpg
  33. 二进制
      public/image/theme/line/logo/all.png
  34. 二进制
      public/image/theme/line/logo/icon-only.png
  35. 二进制
      public/image/theme/line/preview@2x.png
  36. 二进制
      public/image/theme/star/bg.jpg
  37. 二进制
      public/image/theme/star/logo/all.png
  38. 二进制
      public/image/theme/star/logo/icon-only.png
  39. 二进制
      public/image/theme/star/preview@2x.png
  40. 二进制
      public/image/theme/tomorrow-night-blue/logo/all.png
  41. 二进制
      public/image/theme/tomorrow-night-blue/logo/icon-only.png
  42. 二进制
      public/image/theme/tomorrow-night-blue/preview@2x.png
  43. 二进制
      public/image/theme/violet/logo/all.png
  44. 二进制
      public/image/theme/violet/logo/icon-only.png
  45. 二进制
      public/image/theme/violet/preview@2x.png
  46. 61 0
      public/index.html
  47. 31 0
      src/App.vue
  48. 18 0
      src/api/index.js
  49. 22 0
      src/api/modules/abc.api.js
  50. 34 0
      src/api/modules/alarmRecord.api.js
  51. 27 0
      src/api/modules/dataQuery.api.js
  52. 20 0
      src/api/modules/login.api.js
  53. 30 0
      src/api/modules/paramManage/alarmParam.api.js
  54. 41 0
      src/api/modules/paramManage/dataDic.api.js
  55. 62 0
      src/api/modules/paramManage/hardParam.api.js
  56. 22 0
      src/api/modules/paramManage/scanParams.api.js
  57. 48 0
      src/api/modules/shouye.api.js
  58. 31 0
      src/api/modules/sys.user.api.js
  59. 42 0
      src/api/modules/system/announcementManagement/index.api.js
  60. 25 0
      src/api/modules/system/operationLog/index.api.js
  61. 66 0
      src/api/modules/system/organization/index.api.js
  62. 67 0
      src/api/modules/system/roleManagement/index.api.js
  63. 55 0
      src/api/modules/system/userManage/index.api.js
  64. 77 0
      src/api/modules/wareShow/wareInfo.api.js
  65. 27 0
      src/api/modules/wareShow/wareTravel.api.js
  66. 198 0
      src/api/service.js
  67. 86 0
      src/api/tools.js
  68. 二进制
      src/assets/images/bg.png
  69. 二进制
      src/assets/images/logo.png
  70. 二进制
      src/assets/images/logo_big.png
  71. 二进制
      src/assets/images/logo_small.png
  72. 二进制
      src/assets/images/nav-bg.png
  73. 二进制
      src/assets/images/selected.png
  74. 27 0
      src/assets/style/animate/vue-transition.scss
  75. 12 0
      src/assets/style/fixed/base.scss
  76. 31 0
      src/assets/style/fixed/element.scss
  77. 9 0
      src/assets/style/fixed/markdown.scss
  78. 8 0
      src/assets/style/fixed/n-progress.scss
  79. 5 0
      src/assets/style/fixed/tree-view.scss
  80. 9 0
      src/assets/style/fixed/vue-grid-layout.scss
  81. 5 0
      src/assets/style/fixed/vue-splitpane.scss
  82. 327 0
      src/assets/style/public-class.scss
  83. 47 0
      src/assets/style/public.scss
  84. 2 0
      src/assets/style/theme/chester/index.scss
  85. 64 0
      src/assets/style/theme/chester/setting.scss
  86. 2 0
      src/assets/style/theme/d2/index.scss
  87. 66 0
      src/assets/style/theme/d2/setting.scss
  88. 2 0
      src/assets/style/theme/element/index.scss
  89. 64 0
      src/assets/style/theme/element/setting.scss
  90. 2 0
      src/assets/style/theme/line/index.scss
  91. 64 0
      src/assets/style/theme/line/setting.scss
  92. 9 0
      src/assets/style/theme/register.scss
  93. 2 0
      src/assets/style/theme/star/index.scss
  94. 64 0
      src/assets/style/theme/star/setting.scss
  95. 464 0
      src/assets/style/theme/theme-base.scss
  96. 426 0
      src/assets/style/theme/theme.scss
  97. 2 0
      src/assets/style/theme/tomorrow-night-blue/index.scss
  98. 64 0
      src/assets/style/theme/tomorrow-night-blue/setting.scss
  99. 10 0
      src/assets/style/theme/violet/index.scss
  100. 0 0
      src/assets/style/theme/violet/setting.scss

+ 2 - 0
.browserslistrc

@@ -0,0 +1,2 @@
1
+> 1%
2
+last 2 versions

+ 18 - 0
.editorconfig

@@ -0,0 +1,18 @@
1
+[*.{js,jsx,ts,tsx,vue}]
2
+; indent_style = space
3
+; indent_size = 2
4
+; trim_trailing_whitespace = true
5
+; insert_final_newline = true
6
+root = true
7
+
8
+[*]
9
+charset = utf-8
10
+indent_style = space
11
+indent_size = 2
12
+end_of_line = lf
13
+insert_final_newline = true
14
+trim_trailing_whitespace = true
15
+
16
+[*.md]
17
+insert_final_newline = false
18
+trim_trailing_whitespace = false

+ 18 - 0
.env

@@ -0,0 +1,18 @@
1
+# 所有环境默认
2
+
3
+# 页面 title 前缀
4
+VUE_APP_TITLE=数量监测智能眼系统
5
+
6
+# 网络请求公用地址
7
+VUE_APP_API=/api/
8
+; VUE_APP_API=http://101.36.160.140:21023/
9
+
10
+# 仓库地址
11
+VUE_APP_REPO=https://github.com/d2-projects/d2-admin-start-kit
12
+
13
+# 国际化配置
14
+VUE_APP_I18N_LOCALE=zh-chs
15
+VUE_APP_I18N_FALLBACK_LOCALE=en
16
+
17
+# element 颜色
18
+VUE_APP_ELEMENT_COLOR=#409EFF

+ 5 - 0
.env.development

@@ -0,0 +1,5 @@
1
+# 开发环境
2
+
3
+# 页面 title 前缀
4
+VUE_APP_TITLE=数量监测智能眼系统
5
+

+ 13 - 0
.env.preview

@@ -0,0 +1,13 @@
1
+# 构建预览页面
2
+
3
+# 指定构建模式
4
+NODE_ENV=production
5
+
6
+# 标记当前构建方式
7
+VUE_APP_BUILD_MODE=PREVIEW
8
+
9
+# 显示源码按钮
10
+VUE_APP_SCOURCE_LINK=TRUE
11
+
12
+# 部署路径
13
+VUE_APP_PUBLIC_PATH=/

+ 15 - 0
.eslintignore

@@ -0,0 +1,15 @@
1
+# 忽略目录
2
+*
3
+build/
4
+tests/
5
+node_modules/
6
+
7
+# D2CRUD 演示
8
+src/views/demo/d2-crud/
9
+
10
+# node 覆盖率文件
11
+coverage/
12
+
13
+# 忽略文件
14
+**/*-min.js
15
+**/*.min.js

+ 229 - 0
.eslintrc.js

@@ -0,0 +1,229 @@
1
+// module.exports = {
2
+//   root: true,
3
+//   env: {
4
+//     node: true
5
+//   },
6
+//   'extends': [
7
+//     'plugin:vue/essential',
8
+//     '@vue/standard'
9
+//   ],
10
+//   rules: {
11
+//     'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
12
+//     'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
13
+//   },
14
+//   parserOptions: {
15
+//     parser: 'babel-eslint'
16
+//   },
17
+//   overrides: [
18
+//     {
19
+//       files: [
20
+//         '**/__tests__/*.{j,t}s?(x)',
21
+//         '**/tests/unit/**/*.spec.{j,t}s?(x)'
22
+//       ],
23
+//       env: {
24
+//         jest: true
25
+//       }
26
+//     }
27
+//   ]
28
+// }
29
+
30
+module.exports = {
31
+  root: true,
32
+  parserOptions: {
33
+    parser: 'babel-eslint',
34
+    sourceType: 'module'
35
+  },
36
+  env: {
37
+    browser: true,
38
+    node: true,
39
+    es6: true,
40
+  },
41
+  extends: ['plugin:vue/recommended', 'eslint:recommended'],
42
+
43
+  // add your custom rules here
44
+  //it is base on https://github.com/vuejs/eslint-config-vue
45
+  rules: {
46
+    "vue/max-attributes-per-line": [2, {
47
+      "singleline": 10,
48
+      "multiline": {
49
+        "max": 1,
50
+        "allowFirstLine": false
51
+      }
52
+    }],
53
+    "vue/singleline-html-element-content-newline": "off",
54
+    "vue/multiline-html-element-content-newline":"off",
55
+    "vue/name-property-casing": ["error", "PascalCase"],
56
+    "vue/no-v-html": "off",
57
+    'accessor-pairs': 2,
58
+    'arrow-spacing': [2, {
59
+      'before': true,
60
+      'after': true
61
+    }],
62
+    'block-spacing': [2, 'always'],
63
+    'brace-style': [2, '1tbs', {
64
+      'allowSingleLine': true
65
+    }],
66
+    'camelcase': [0, {
67
+      'properties': 'always'
68
+    }],
69
+    'comma-dangle': [2, 'never'],
70
+    'comma-spacing': [2, {
71
+      'before': false,
72
+      'after': true
73
+    }],
74
+    'comma-style': [2, 'last'],
75
+    'constructor-super': 2,
76
+    'curly': [2, 'multi-line'],
77
+    'dot-location': [2, 'property'],
78
+    'eol-last': 2,
79
+    'eqeqeq': ["error", "always", {"null": "ignore"}],
80
+    'generator-star-spacing': [2, {
81
+      'before': true,
82
+      'after': true
83
+    }],
84
+    'handle-callback-err': [2, '^(err|error)$'],
85
+    'indent': [2, 2, {
86
+      'SwitchCase': 1
87
+    }],
88
+    'jsx-quotes': [2, 'prefer-single'],
89
+    'key-spacing': [2, {
90
+      'beforeColon': false,
91
+      'afterColon': true
92
+    }],
93
+    'keyword-spacing': [2, {
94
+      'before': true,
95
+      'after': true
96
+    }],
97
+    'new-cap': [2, {
98
+      'newIsCap': true,
99
+      'capIsNew': false
100
+    }],
101
+    'new-parens': 2,
102
+    'no-array-constructor': 2,
103
+    'no-caller': 2,
104
+    'no-console': 'off',
105
+    'no-class-assign': 2,
106
+    'no-cond-assign': 2,
107
+    'no-const-assign': 2,
108
+    'no-control-regex': 0,
109
+    'no-delete-var': 2,
110
+    'no-dupe-args': 2,
111
+    'no-dupe-class-members': 2,
112
+    'no-dupe-keys': 2,
113
+    'no-duplicate-case': 2,
114
+    'no-empty-character-class': 2,
115
+    'no-empty-pattern': 2,
116
+    'no-eval': 2,
117
+    'no-ex-assign': 2,
118
+    'no-extend-native': 2,
119
+    'no-extra-bind': 2,
120
+    'no-extra-boolean-cast': 2,
121
+    'no-extra-parens': [2, 'functions'],
122
+    'no-fallthrough': 2,
123
+    'no-floating-decimal': 2,
124
+    'no-func-assign': 2,
125
+    'no-implied-eval': 2,
126
+    'no-inner-declarations': [2, 'functions'],
127
+    'no-invalid-regexp': 2,
128
+    'no-irregular-whitespace': 2,
129
+    'no-iterator': 2,
130
+    'no-label-var': 2,
131
+    'no-labels': [2, {
132
+      'allowLoop': false,
133
+      'allowSwitch': false
134
+    }],
135
+    'no-lone-blocks': 2,
136
+    'no-mixed-spaces-and-tabs': 2,
137
+    'no-multi-spaces': 2,
138
+    'no-multi-str': 2,
139
+    'no-multiple-empty-lines': [2, {
140
+      'max': 1
141
+    }],
142
+    'no-native-reassign': 2,
143
+    'no-negated-in-lhs': 2,
144
+    'no-new-object': 2,
145
+    'no-new-require': 2,
146
+    'no-new-symbol': 2,
147
+    'no-new-wrappers': 2,
148
+    'no-obj-calls': 2,
149
+    'no-octal': 2,
150
+    'no-octal-escape': 2,
151
+    'no-path-concat': 2,
152
+    'no-proto': 2,
153
+    'no-redeclare': 2,
154
+    'no-regex-spaces': 2,
155
+    'no-return-assign': [2, 'except-parens'],
156
+    'no-self-assign': 2,
157
+    'no-self-compare': 2,
158
+    'no-sequences': 2,
159
+    'no-shadow-restricted-names': 2,
160
+    'no-spaced-func': 2,
161
+    'no-sparse-arrays': 2,
162
+    'no-this-before-super': 2,
163
+    'no-throw-literal': 2,
164
+    'no-trailing-spaces': 2,
165
+    'no-undef': 2,
166
+    'no-undef-init': 2,
167
+    'no-unexpected-multiline': 2,
168
+    'no-unmodified-loop-condition': 2,
169
+    'no-unneeded-ternary': [2, {
170
+      'defaultAssignment': false
171
+    }],
172
+    'no-unreachable': 2,
173
+    'no-unsafe-finally': 2,
174
+    // 'no-unused-vars': [2, {
175
+    //   'vars': 'all',
176
+    //   'args': 'none'
177
+    // }],
178
+    'no-unused-vars': 'off',
179
+    'no-useless-call': 2,
180
+    'no-useless-computed-key': 2,
181
+    'no-useless-constructor': 2,
182
+    'no-useless-escape': 0,
183
+    'no-whitespace-before-property': 2,
184
+    'no-with': 2,
185
+    'one-var': [2, {
186
+      'initialized': 'never'
187
+    }],
188
+    'operator-linebreak': [2, 'after', {
189
+      'overrides': {
190
+        '?': 'before',
191
+        ':': 'before'
192
+      }
193
+    }],
194
+    'padded-blocks': [2, 'never'],
195
+    'quotes': [2, 'single', {
196
+      'avoidEscape': true,
197
+      'allowTemplateLiterals': true
198
+    }],
199
+    'semi': [2, 'never'],
200
+    'semi-spacing': [2, {
201
+      'before': false,
202
+      'after': true
203
+    }],
204
+    'space-before-blocks': [2, 'always'],
205
+    'space-before-function-paren': [2, 'never'],
206
+    'space-in-parens': [2, 'never'],
207
+    'space-infix-ops': 2,
208
+    'space-unary-ops': [2, {
209
+      'words': true,
210
+      'nonwords': false
211
+    }],
212
+    'spaced-comment': [2, 'always', {
213
+      'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
214
+    }],
215
+    'template-curly-spacing': [2, 'never'],
216
+    'use-isnan': 2,
217
+    'valid-typeof': 2,
218
+    'wrap-iife': [2, 'any'],
219
+    'yield-star-spacing': [2, 'both'],
220
+    'yoda': [2, 'never'],
221
+    'prefer-const': 2,
222
+    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
223
+    'object-curly-spacing': [2, 'always', {
224
+      objectsInObjects: false
225
+    }],
226
+    'array-bracket-spacing': [2, 'never'],
227
+    'no-unused-vars': 'off'
228
+  }
229
+}

+ 21 - 0
.gitignore

@@ -0,0 +1,21 @@
1
+.DS_Store
2
+node_modules
3
+/dist
4
+
5
+# local env files
6
+.env.local
7
+.env.*.local
8
+
9
+# Log files
10
+npm-debug.log*
11
+yarn-debug.log*
12
+yarn-error.log*
13
+
14
+# Editor directories and files
15
+.idea
16
+.vscode
17
+*.suo
18
+*.ntvs*
19
+*.njsproj
20
+*.sln
21
+*.sw?

+ 5 - 0
.postcssrc.js

@@ -0,0 +1,5 @@
1
+module.exports = {
2
+  plugins: {
3
+    autoprefixer: {}
4
+  }
5
+}

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
1
+MIT License
2
+
3
+Copyright (c) 2018 李杨
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 27 - 0
README.md

@@ -0,0 +1,27 @@
1
+
2
+# numberWeb
3
+
4
+[D2Admin](https://github.com/d2-projects/d2-admin) is a fully open source and free enterprise back-end product front-end integration solution, using the latest front-end technology stack, javascript files loading of local first screen less than 60kb, has prepared most of the project preparations, and with a lot of sample code to help the management system agile development.
5
+
6
+[中文](https://github.com/d2-projects/d2-admin-start-kit/blob/master/README.zh.md) | **English**
7
+
8
+## Preview
9
+
10
+![Deploy preview](https://github.com/d2-projects/d2-admin-start-kit/workflows/Deploy%20preview/badge.svg)
11
+[![Netlify Status](https://api.netlify.com/api/v1/badges/08ff8c93-f0a8-497a-a081-440b31fb3aa4/deploy-status)](https://app.netlify.com/sites/d2-admin-start-kit/deploys)
12
+
13
+The following access addresses are built and deployed by the latest master branch code at the same time. The access effect is completely consistent. Please select the appropriate access link according to your own network situation.
14
+
15
+| server | link | server |
16
+| --- | --- | --- |
17
+| d2.pub | [d2.pub/d2-admin-start-kit/preview](https://d2.pub/d2-admin-start-kit/preview) | China server |
18
+| cdn.d2.pub | [cdn.d2.pub/d2-admin-start-kit/preview](https://cdn.d2.pub/d2-admin-start-kit/preview) | qiniu CDN |
19
+| github | [d2-projects.github.io/d2-admin-start-kit](https://d2-projects.github.io/d2-admin-start-kit) | GitHub pages |
20
+| netlify | [d2-admin-start-kit.netlify.com](https://d2-admin-start-kit.netlify.com) | Netlify CDN |
21
+
22
+## Other synchronous repositories
23
+
24
+| type | link |
25
+| --- | --- |
26
+| gitee | [https://gitee.com/d2-projects/d2-admin](https://gitee.com/d2-projects/d2-admin) |
27
+| coding | [https://d2-projects.coding.net/p/d2-projects/d/d2-admin/git](https://d2-projects.coding.net/p/d2-projects/d/d2-admin/git) |

+ 26 - 0
README.zh.md

@@ -0,0 +1,26 @@
1
+[D2Admin](https://github.com/d2-projects/d2-admin) 是一个完全 **开源免费** 的企业中后台产品前端集成方案,使用最新的前端技术栈,小于 60kb 的本地首屏 js 加载,已经做好大部分项目前期准备工作,并且带有大量示例代码,助力管理系统敏捷开发。
2
+
3
+**中文** | [English](https://github.com/d2-projects/d2-admin-start-kit)
4
+
5
+## 预览
6
+
7
+![Deploy preview](https://github.com/d2-projects/d2-admin-start-kit/workflows/Deploy%20preview/badge.svg)
8
+[![Netlify Status](https://api.netlify.com/api/v1/badges/08ff8c93-f0a8-497a-a081-440b31fb3aa4/deploy-status)](https://app.netlify.com/sites/d2-admin-start-kit/deploys)
9
+
10
+下列访问地址均由最新的 master 分支代码同时构建部署,访问效果完全一致,请根据自身网络情况选择合适的访问链接。
11
+
12
+| 位置 | 链接 | 部署位置 |
13
+| --- | --- | --- |
14
+| d2.pub | [preview](https://d2.pub/d2-admin-start-kit/preview) | 中国服务器 |
15
+| cdn.d2.pub | [preview](https://cdn.d2.pub/d2-admin-start-kit/preview) | 七牛云 CDN |
16
+| github | [preview](https://d2-projects.github.io/d2-admin-start-kit) | GitHub pages |
17
+| netlify | [preview](https://d2-admin-start-kit.netlify.com) | Netlify CDN |
18
+
19
+## 其它同步仓库
20
+
21
+| 位置 | 链接 |
22
+| --- | --- |
23
+| 码云 | [https://gitee.com/d2-projects/d2-admin-start-kit](https://gitee.com/d2-projects/d2-admin-start-kit) |
24
+| coding | [https://d2-projects.coding.net/p/d2-projects/d/d2-admin-start-kit/git](https://d2-projects.coding.net/p/d2-projects/d/d2-admin-start-kit/git) |
25
+
26
+> 如果您在 github 仓库下载很慢,可以尝试使用我们的码云仓库克隆代码

+ 7 - 0
babel.config.js

@@ -0,0 +1,7 @@
1
+module.exports = {
2
+  presets: [
3
+    '@vue/cli-plugin-babel/preset'
4
+  ],
5
+  // 允许两种编码引入方式共存,也就是 common 规范与 es6 规范的共存处理
6
+  sourceType: 'unambiguous'
7
+}

+ 165 - 0
d2-admin.babel

@@ -0,0 +1,165 @@
1
+<babeledit_project version="1.2">
2
+    <!--
3
+
4
+    BabelEdit project file
5
+    https://www.codeandweb.com/babeledit
6
+
7
+    This file contains meta data for all translations, but not the translation texts itself.
8
+    They are stored in framework-specific message files (.json / .vue / .yaml / .properties)
9
+
10
+    -->
11
+    <preset_collections/>
12
+    <framework>vue-json</framework>
13
+    <filename>d2-admin.babel</filename>
14
+    <source_root_dir></source_root_dir>
15
+    <folder_node>
16
+        <name></name>
17
+        <children>
18
+            <concept_node>
19
+                <name>_element</name>
20
+                <definition_loaded>false</definition_loaded>
21
+                <description></description>
22
+                <comment></comment>
23
+                <default_text></default_text>
24
+                <translations>
25
+                    <translation>
26
+                        <language>en-US</language>
27
+                        <approved>false</approved>
28
+                    </translation>
29
+                    <translation>
30
+                        <language>ja-JP</language>
31
+                        <approved>false</approved>
32
+                    </translation>
33
+                    <translation>
34
+                        <language>zh-CHS</language>
35
+                        <approved>false</approved>
36
+                    </translation>
37
+                    <translation>
38
+                        <language>zh-CHT</language>
39
+                        <approved>false</approved>
40
+                    </translation>
41
+                </translations>
42
+            </concept_node>
43
+            <concept_node>
44
+                <name>_name</name>
45
+                <definition_loaded>false</definition_loaded>
46
+                <description></description>
47
+                <comment></comment>
48
+                <default_text></default_text>
49
+                <translations>
50
+                    <translation>
51
+                        <language>en-US</language>
52
+                        <approved>false</approved>
53
+                    </translation>
54
+                    <translation>
55
+                        <language>ja-JP</language>
56
+                        <approved>false</approved>
57
+                    </translation>
58
+                    <translation>
59
+                        <language>zh-CHS</language>
60
+                        <approved>false</approved>
61
+                    </translation>
62
+                    <translation>
63
+                        <language>zh-CHT</language>
64
+                        <approved>false</approved>
65
+                    </translation>
66
+                </translations>
67
+            </concept_node>
68
+            <folder_node>
69
+                <name>page</name>
70
+                <children>
71
+                    <folder_node>
72
+                        <name>demo</name>
73
+                        <children>
74
+                            <folder_node>
75
+                                <name>playground</name>
76
+                                <children>
77
+                                    <folder_node>
78
+                                        <name>locales</name>
79
+                                        <children>
80
+                                            <concept_node>
81
+                                                <name>text</name>
82
+                                                <definition_loaded>false</definition_loaded>
83
+                                                <description></description>
84
+                                                <comment></comment>
85
+                                                <default_text></default_text>
86
+                                                <translations>
87
+                                                    <translation>
88
+                                                        <language>en-US</language>
89
+                                                        <approved>false</approved>
90
+                                                    </translation>
91
+                                                    <translation>
92
+                                                        <language>ja-JP</language>
93
+                                                        <approved>false</approved>
94
+                                                    </translation>
95
+                                                    <translation>
96
+                                                        <language>zh-CHS</language>
97
+                                                        <approved>false</approved>
98
+                                                    </translation>
99
+                                                    <translation>
100
+                                                        <language>zh-CHT</language>
101
+                                                        <approved>false</approved>
102
+                                                    </translation>
103
+                                                </translations>
104
+                                            </concept_node>
105
+                                        </children>
106
+                                    </folder_node>
107
+                                </children>
108
+                            </folder_node>
109
+                        </children>
110
+                    </folder_node>
111
+                </children>
112
+            </folder_node>
113
+        </children>
114
+    </folder_node>
115
+    <isTemplateProject>false</isTemplateProject>
116
+    <languages>
117
+        <language>
118
+            <code>en-US</code>
119
+            <source_id></source_id>
120
+            <source_file>src/locales/en.json</source_file>
121
+        </language>
122
+        <language>
123
+            <code>ja-JP</code>
124
+            <source_id></source_id>
125
+            <source_file>src/locales/ja.json</source_file>
126
+        </language>
127
+        <language>
128
+            <code>zh-CHS</code>
129
+            <source_id></source_id>
130
+            <source_file>src/locales/zh-chs.json</source_file>
131
+        </language>
132
+        <language>
133
+            <code>zh-CHT</code>
134
+            <source_id></source_id>
135
+            <source_file>src/locales/zh-cht.json</source_file>
136
+        </language>
137
+    </languages>
138
+    <translation_files>
139
+        <translation_file>
140
+            <file>src/locales/en.json</file>
141
+        </translation_file>
142
+        <translation_file>
143
+            <file>src/locales/ja.json</file>
144
+        </translation_file>
145
+        <translation_file>
146
+            <file>src/locales/zh-chs.json</file>
147
+        </translation_file>
148
+        <translation_file>
149
+            <file>src/locales/zh-cht.json</file>
150
+        </translation_file>
151
+    </translation_files>
152
+    <editor_configuration>
153
+        <save_empty_translations>true</save_empty_translations>
154
+        <copy_templates>
155
+            <copy_template>$t('%1')</copy_template>
156
+            <copy_template>{{ $t('%1') }}</copy_template>
157
+            <copy_template>this.$t('%1')</copy_template>
158
+        </copy_templates>
159
+    </editor_configuration>
160
+    <primary_language>zh-CHS</primary_language>
161
+    <configuration>
162
+        <indent>tab</indent>
163
+        <format>namespaced-json</format>
164
+    </configuration>
165
+</babeledit_project>

+ 24 - 0
dependencies-cdn.js

@@ -0,0 +1,24 @@
1
+// If you want to re enable these configurations, please make sure that the version number of each package is the latest
2
+
3
+module.exports = [
4
+  // { name: 'vue', library: 'Vue', js: 'https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js', css: '' },
5
+  // { name: 'vue-i18n', library: 'VueI18n', js: 'https://cdn.jsdelivr.net/npm/vue-i18n@8.15.1/dist/vue-i18n.min.js', css: '' },
6
+  // { name: 'vue-router', library: 'VueRouter', js: 'https://cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js', css: '' },
7
+  // { name: 'vuex', library: 'Vuex', js: 'https://cdn.jsdelivr.net/npm/vuex@3.1.2/dist/vuex.min.js', css: '' },
8
+  // { name: 'axios', library: 'axios', js: 'https://cdn.jsdelivr.net/npm/axios@0.19.0/dist/axios.min.js', css: '' },
9
+  // { name: 'better-scroll', library: 'BScroll', js: 'https://cdn.jsdelivr.net/npm/better-scroll@1.15.2/dist/bscroll.min.js', css: '' },
10
+  // { name: 'axios-mock-adapter', library: 'AxiosMockAdapter', js: 'https://cdn.jsdelivr.net/npm/axios-mock-adapter@1.18.1/dist/axios-mock-adapter.min.js', css: '' },
11
+  // { name: 'element-ui', library: 'ELEMENT', js: 'https://cdn.jsdelivr.net/npm/element-ui@2.15.6/lib/index.js', css: 'https://cdn.jsdelivr.net/npm/element-ui@2.15.6/lib/theme-chalk/index.css' },
12
+  // { name: 'lodash', library: '_', js: 'https://cdn.jsdelivr.net/npm/lodash@4.17.15/lodash.min.js', css: '' },
13
+  // { name: 'ua-parser-js', library: 'UAParser', js: 'https://cdn.jsdelivr.net/npm/ua-parser-js@0.7.20/dist/ua-parser.min.js', css: '' },
14
+  // { name: 'js-cookie', library: 'Cookies', js: 'https://cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js', css: '' },
15
+  // { name: 'nprogress', library: 'NProgress', js: 'https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js', css: 'https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.css' },
16
+  // { name: 'dayjs', library: 'dayjs', js: 'https://cdn.jsdelivr.net/npm/dayjs@1.8.17/dayjs.min.js', css: '' },
17
+  // { name: 'fuse.js', library: 'Fuse', js: 'https://cdn.jsdelivr.net/npm/fuse.js@5.2.3/dist/fuse.min.js', css: '' },
18
+  // { name: 'hotkeys-js', library: 'hotkeys', js: 'https://cdn.jsdelivr.net/npm/hotkeys-js@3.7.3/dist/hotkeys.min.js', css: '' },
19
+  // { name: 'qs', library: 'Qs', js: 'https://cdn.jsdelivr.net/npm/qs@6.9.1/dist/qs.js', css: '' },
20
+  // { name: 'lowdb', library: 'low', js: 'https://cdn.jsdelivr.net/npm/lowdb@1.0.0/dist/low.min.js', css: '' },
21
+  // { name: 'lowdb/adapters/LocalStorage', library: 'LocalStorage', js: 'https://cdn.jsdelivr.net/npm/lowdb@1.0.0/dist/LocalStorage.min.js', css: '' },
22
+  // { name: 'screenfull', library: 'screenfull', js: 'https://cdn.jsdelivr.net/npm/screenfull@5.0.2/dist/screenfull.min.js', css: '' },
23
+  // { name: 'sortablejs', library: 'Sortable', js: 'https://cdn.jsdelivr.net/npm/sortablejs@1.10.1/Sortable.min.js', css: '' }
24
+]

+ 3 - 0
jest.config.js

@@ -0,0 +1,3 @@
1
+module.exports = {
2
+  preset: '@vue/cli-plugin-unit-jest'
3
+}

+ 11 - 0
jsconfig.json

@@ -0,0 +1,11 @@
1
+{
2
+  "compilerOptions": {
3
+    "target": "es2017",
4
+    "allowSyntheticDefaultImports": false,
5
+    "baseUrl": "./",
6
+    "paths": {
7
+      "@/*": ["src/*"]
8
+    }
9
+  },
10
+  "exclude": ["node_modules", "dist"]
11
+}

文件差异内容过多而无法显示
+ 15973 - 0
package-lock.json


+ 78 - 0
package.json

@@ -0,0 +1,78 @@
1
+{
2
+  "name": "d2-admin",
3
+  "version": "1.20.1",
4
+  "scripts": {
5
+    "serve": "vue-cli-service serve --open",
6
+    "start": "npm run serve",
7
+    "dev": "npm run serve",
8
+    "build": "vue-cli-service build",
9
+    "build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
10
+    "lint": "vue-cli-service lint --fix",
11
+    "test:unit": "vue-cli-service test:unit"
12
+  },
13
+  "dependencies": {
14
+    "axios": "^0.19.0",
15
+    "axios-mock-adapter": "^1.18.1",
16
+    "better-scroll": "^1.15.2",
17
+    "core-js": "^3.4.3",
18
+    "dayjs": "^1.8.17",
19
+    "echarts": "^5.2.1",
20
+    "element-ui": "^2.15.6",
21
+    "faker": "^4.1.0",
22
+    "flex.css": "^1.1.7",
23
+    "fuse.js": "^5.2.3",
24
+    "hotkeys-js": "^3.7.3",
25
+    "jquery": "^3.6.0",
26
+    "js-cookie": "^2.2.1",
27
+    "lodash": "^4.17.19",
28
+    "lowdb": "^1.0.0",
29
+    "nprogress": "^0.2.0",
30
+    "screenfull": "^5.0.2",
31
+    "sortablejs": "^1.10.1",
32
+    "ua-parser-js": "^0.7.20",
33
+    "vue": "^2.6.11",
34
+    "vue-count-to": "^1.0.13",
35
+    "vue-i18n": "^8.15.1",
36
+    "vue-router": "^3.1.3",
37
+    "vue-seamless-scroll": "^1.1.23",
38
+    "vuex": "^3.1.2"
39
+  },
40
+  "devDependencies": {
41
+    "@d2-projects/vue-filename-injector": "^1.1.0",
42
+    "@kazupon/vue-i18n-loader": "^0.5.0",
43
+    "@vue/cli-plugin-babel": "^4.1.0",
44
+    "@vue/cli-plugin-eslint": "^4.1.0",
45
+    "@vue/cli-plugin-router": "^4.1.0",
46
+    "@vue/cli-plugin-unit-jest": "^4.1.0",
47
+    "@vue/cli-plugin-vuex": "^4.1.0",
48
+    "@vue/cli-service": "^4.1.0",
49
+    "@vue/eslint-config-standard": "^5.1.2",
50
+    "@vue/test-utils": "^1.0.2",
51
+    "babel-eslint": "^10.0.3",
52
+    "compression-webpack-plugin": "^3.0.1",
53
+    "cz-conventional-changelog": "^3.2.0",
54
+    "eslint": "^6.8.0",
55
+    "eslint-plugin-import": "^2.20.2",
56
+    "eslint-plugin-node": "^11.1.0",
57
+    "eslint-plugin-promise": "^4.2.1",
58
+    "eslint-plugin-standard": "^4.0.1",
59
+    "eslint-plugin-vue": "^6.2.2",
60
+    "sass": "^1.23.7",
61
+    "sass-loader": "^8.0.0",
62
+    "svg-sprite-loader": "^4.1.6",
63
+    "text-loader": "^0.0.1",
64
+    "vue-cli-plugin-i18n": "^1.0.1",
65
+    "vue-template-compiler": "^2.6.10",
66
+    "webpack-bundle-analyzer": "^3.6.0",
67
+    "webpack-theme-color-replacer": "^1.3.3"
68
+  },
69
+  "config": {
70
+    "commitizen": {
71
+      "path": "./node_modules/cz-conventional-changelog"
72
+    }
73
+  },
74
+  "repository": {
75
+    "type": "git",
76
+    "url": "https://github.com/d2-projects/d2-admin.git"
77
+  }
78
+}

二进制
public/icon.ico


二进制
public/image/baidu-pan-logo.png


+ 6 - 0
public/image/loading/loading-spin.svg

@@ -0,0 +1,6 @@
1
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="white">
2
+  <path opacity=".25" d="M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"/>
3
+  <path d="M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z">
4
+    <animateTransform attributeName="transform" type="rotate" from="0 16 16" to="360 16 16" dur="0.8s" repeatCount="indefinite" />
5
+  </path>
6
+</svg>

二进制
public/image/theme/chester/logo/all.png


二进制
public/image/theme/chester/logo/icon-only.png


二进制
public/image/theme/chester/preview@2x.png


二进制
public/image/theme/d2/logo/all.png


二进制
public/image/theme/d2/logo/icon-only.png


二进制
public/image/theme/d2/preview@2x.png


二进制
public/image/theme/element/logo/all.png


二进制
public/image/theme/element/logo/icon-only.png


二进制
public/image/theme/element/preview@2x.png


二进制
public/image/theme/line/bg.jpg


二进制
public/image/theme/line/logo/all.png


二进制
public/image/theme/line/logo/icon-only.png


二进制
public/image/theme/line/preview@2x.png


二进制
public/image/theme/star/bg.jpg


二进制
public/image/theme/star/logo/all.png


二进制
public/image/theme/star/logo/icon-only.png


二进制
public/image/theme/star/preview@2x.png


二进制
public/image/theme/tomorrow-night-blue/logo/all.png


二进制
public/image/theme/tomorrow-night-blue/logo/icon-only.png


二进制
public/image/theme/tomorrow-night-blue/preview@2x.png


二进制
public/image/theme/violet/logo/all.png


二进制
public/image/theme/violet/logo/icon-only.png


二进制
public/image/theme/violet/preview@2x.png


+ 61 - 0
public/index.html

@@ -0,0 +1,61 @@
1
+<!DOCTYPE html>
2
+<html>
3
+  <head>
4
+    <meta charset="utf-8">
5
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
+    <link rel="icon" href="<%= BASE_URL %>icon.ico">
8
+    <!-- 使用 CDN 加速的 CSS 文件,配置在 vue.config.js 下 -->
9
+    <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.css) { %>
10
+    <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style">
11
+    <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet">
12
+    <% } %>
13
+    <!-- 使用 CDN 加速的 JS 文件,配置在 vue.config.js 下 -->
14
+    <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %>
15
+    <link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script">
16
+    <% } %>
17
+    <title><%= VUE_APP_TITLE %></title>
18
+    <style>
19
+      html, body, #app { height: 100%; margin: 0px; padding: 0px; width: 100%; }
20
+      .d2-home { background-color: #303133; height: 100%; display: flex; flex-direction: column; }
21
+      .d2-home__main { user-select: none; width: 100%; flex-grow: 1; display: flex; justify-content: center; align-items: center; flex-direction: column; }
22
+      .d2-home__footer { width: 100%; flex-grow: 0; text-align: center; padding: 1em 0; }
23
+      .d2-home__footer > a { font-size: 12px; color: #ABABAB; text-decoration: none; }
24
+      .d2-home__loading { height: 32px; width: 32px; margin-bottom: 20px; }
25
+    </style>
26
+    <script>
27
+      var _hmt = _hmt || [];
28
+      var hmid = "bc38887aa5588add05a38704342ad7e8";
29
+      (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?" + hmid; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})();
30
+    </script>
31
+  </head>
32
+  <body>
33
+    <noscript>
34
+      <strong>
35
+        Sorry, D2Admin will not work properly without JavaScript support. Enable JavaScript for browsers and continue.
36
+      </strong>
37
+    </noscript>
38
+    <div id="app">
39
+      <div class="d2-home">
40
+        <div class="d2-home__main">
41
+          <img
42
+            class="d2-home__loading"
43
+            src="./image/loading/loading-spin.svg"
44
+            alt="loading">
45
+        </div>
46
+        <div class="d2-home__footer">
47
+          <a
48
+            href="https://github.com/d2-projects/d2-admin"
49
+            target="_blank">
50
+            <!-- https://github.com/d2-projects/d2-admin -->
51
+            紫光软件 数量监测系统
52
+          </a>
53
+        </div>
54
+      </div>
55
+    </div>
56
+    <!-- 使用 CDN 加速的 JS 文件,配置在 vue.config.js 下 -->
57
+    <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %>
58
+    <script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
59
+    <% } %>
60
+  </body>
61
+</html>

+ 31 - 0
src/App.vue

@@ -0,0 +1,31 @@
1
+<template>
2
+  <div id="app">
3
+    <router-view />
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+import util from "@/libs/util";
9
+export default {
10
+  name: "app",
11
+  watch: {
12
+    "$i18n.locale": "i18nHandle",
13
+  },
14
+  created() {
15
+    this.i18nHandle(this.$i18n.locale);
16
+  },
17
+  methods: {
18
+    i18nHandle(val, oldVal) {
19
+      util.cookies.set("lang", val);
20
+      document.querySelector("html").setAttribute("lang", val);
21
+    },
22
+  },
23
+};
24
+</script>
25
+
26
+<style lang="scss">
27
+@import '~@/assets/style/public-class.scss';
28
+
29
+
30
+
31
+</style>

+ 18 - 0
src/api/index.js

@@ -0,0 +1,18 @@
1
+import { assign, map } from 'lodash'
2
+import faker from 'faker/locale/zh_CN'
3
+import { service, request, serviceForMock, requestForMock, mock } from './service'
4
+import * as tools from './tools'
5
+
6
+const files = require.context('./modules', true, /\.api\.js$/)
7
+const generators = files.keys().map(key => files(key).default)
8
+// console.log(files.keys(),"///")
9
+
10
+export default assign({}, ...map(generators, generator => generator({
11
+  service,
12
+  request,
13
+  serviceForMock,
14
+  requestForMock,
15
+  mock,
16
+  faker,
17
+  tools
18
+})))

+ 22 - 0
src/api/modules/abc.api.js

@@ -0,0 +1,22 @@
1
+export default ({request}) => ({
2
+    /**
3
+     * @description 登录
4
+     * @param {Object} data 登录携带的信息
5
+     */
6
+    //abc列表
7
+    abcList(data) {
8
+
9
+    return request({
10
+        url: 'n-basic-edge/basic/manualSaveNBasicEdge',
11
+        method: 'post',
12
+        params:data
13
+      })
14
+    },
15
+
16
+
17
+  
18
+ 
19
+  
20
+  })
21
+  
22
+  

+ 34 - 0
src/api/modules/alarmRecord.api.js

@@ -0,0 +1,34 @@
1
+export default ({request}) => ({
2
+    /**
3
+     * @description 登录
4
+     * @param {Object} data 登录携带的信息
5
+     */
6
+    //报警记录列表cha
7
+     alarmRecordList(data) {
8
+    //   return request({
9
+    //     url: `/basic-police-log/basic/getPoliceLogByHouseId/${houseId}`,
10
+    //     method: 'get',
11
+        
12
+    //   })
13
+    return request({
14
+        url: '/basic-police-log/getPoliceLogPage',
15
+        method: 'post',
16
+        data
17
+      })
18
+    },
19
+
20
+    //编辑
21
+    editAlarmRecord(data){
22
+     
23
+      return request({
24
+        url: '/storehouse/update',
25
+        method: 'post',
26
+        data
27
+      })
28
+    }
29
+  
30
+ 
31
+  
32
+  })
33
+  
34
+  

+ 27 - 0
src/api/modules/dataQuery.api.js

@@ -0,0 +1,27 @@
1
+export default ({request}) => ({
2
+    /**
3
+     * @description 登录
4
+     * @param {Object} data 登录携带的信息
5
+     */
6
+    //数据查询列表
7
+     dataList(data) {
8
+      return request({
9
+        url: `/n-basic-edge/basic/getCornByHouseId`,
10
+        method: 'post',
11
+        data
12
+      })
13
+    },
14
+//新增
15
+    addDataList(data) {
16
+        return request({
17
+          url: 'userInfo/authority/save',
18
+          method: 'post',
19
+          data
20
+        })
21
+      },
22
+  
23
+ 
24
+  
25
+  })
26
+  
27
+  

+ 20 - 0
src/api/modules/login.api.js

@@ -0,0 +1,20 @@
1
+export default ({
2
+  request
3
+}) => ({
4
+  /**
5
+   * @description 登录
6
+   * @param {Object} data 登录携带的信息
7
+   */
8
+  //登录接口
9
+  login(data) {
10
+    return request({
11
+      url: '/userInfo/login',
12
+      method: 'post',
13
+      params: data
14
+    })
15
+  },
16
+
17
+
18
+
19
+
20
+})

+ 30 - 0
src/api/modules/paramManage/alarmParam.api.js

@@ -0,0 +1,30 @@
1
+
2
+  //数据字典
3
+  export default ({request}) => ({
4
+  
5
+
6
+    //列表
7
+     alarmParams(houseId) {
8
+    
9
+    
10
+      return request({
11
+        url: `/basic-rule-police/basic/getRulePoliceByHouseId/${houseId}`,
12
+        method: 'get',
13
+     
14
+      })
15
+    
16
+      },
17
+    
18
+      //新增
19
+      addAlarmParams(data = {}) {
20
+    
21
+    
22
+        return request({
23
+          url: `/basic-rule-police/basic/saveBasicRulePolice`,
24
+          method: 'post',
25
+          data
26
+        })
27
+      
28
+        }
29
+    })
30
+    

+ 41 - 0
src/api/modules/paramManage/dataDic.api.js

@@ -0,0 +1,41 @@
1
+
2
+  //数据字典
3
+export default ({request}) => ({
4
+  
5
+
6
+//列表
7
+ dataDic(data = {}) {
8
+
9
+
10
+  return request({
11
+    url: `/basic-enum/getTree`,
12
+    method: 'post',
13
+    data
14
+  })
15
+
16
+  },
17
+
18
+  //新增
19
+  addDataDic(data = {}) {
20
+
21
+
22
+    return request({
23
+      url: `basic-enum/save`,
24
+      method: 'post',
25
+      data
26
+    })
27
+  
28
+    },
29
+
30
+      //新增
31
+  editDataDic(data = {}) {
32
+
33
+
34
+    return request({
35
+      url: `basic-enum/update`,
36
+      method: 'post',
37
+      data
38
+    })
39
+  
40
+    }
41
+})

+ 62 - 0
src/api/modules/paramManage/hardParam.api.js

@@ -0,0 +1,62 @@
1
+
2
+  //硬件参数
3
+export default ({request}) => ({
4
+  //左侧树
5
+  leftTree(params = {}) {
6
+
7
+
8
+    return request({
9
+      url: `orgInfo/authority/getTreeList`,
10
+      method: 'get',
11
+      params
12
+    })
13
+  
14
+    },
15
+
16
+//列表
17
+ hardParam(data = {}) {
18
+
19
+
20
+  return request({
21
+    url: `hdParemeter/getPage`,
22
+    method: 'post',
23
+    data
24
+  })
25
+
26
+  },
27
+
28
+  //新增
29
+  addHardParam(data = {}) {
30
+
31
+
32
+    return request({
33
+      url: `hdParemeter/save`,
34
+      method: 'post',
35
+      data
36
+    })
37
+  
38
+    },
39
+
40
+
41
+     //编辑
42
+  editHardParam(data = {}) {
43
+
44
+
45
+    return request({
46
+      url: `/hdParemeter/update`,
47
+      method: 'post',
48
+      data
49
+    })
50
+  
51
+    },
52
+
53
+
54
+    //删除
55
+    deleteHardParam(id){
56
+      return request({
57
+        url: `/hdParemeter/deleteById/${id}`,
58
+        method: 'delete',
59
+        
60
+      })
61
+    }
62
+})

+ 22 - 0
src/api/modules/paramManage/scanParams.api.js

@@ -0,0 +1,22 @@
1
+export default ({request}) => ({
2
+    /**
3
+     * @description 登录
4
+     * @param {Object} data 登录携带的信息
5
+     */
6
+    //弹框列表
7
+     dialogList(data) {
8
+      return request({
9
+        url: `/n-basic-edge/basic/getCornByHouseId`,
10
+        method: 'post',
11
+        data
12
+      })
13
+    },
14
+//新增
15
+   
16
+    
17
+  
18
+ 
19
+  
20
+  })
21
+  
22
+  

+ 48 - 0
src/api/modules/shouye.api.js

@@ -0,0 +1,48 @@
1
+export default ({
2
+    request
3
+  }) => ({
4
+    /**
5
+     * @description 登录
6
+     * @param {Object} data 登录携带的信息
7
+     */
8
+    //一周粮食数量变化
9
+    weekChange(data) {
10
+      return request({
11
+        url: 'quantity-statistics/getDataChange',
12
+        method: 'post',
13
+        data: data
14
+      })
15
+    },
16
+
17
+    //出入库数量
18
+    crkData(data){
19
+      return request({
20
+        url: 'quantity-statistics/getOutInNumber',
21
+        method: 'post',
22
+        data: data
23
+      })
24
+    },
25
+
26
+    //数据查询
27
+    dataQuery(data){
28
+      return request({
29
+        url: '/n-basic-edge/basic/getCornByOrgId',
30
+        method: 'post',
31
+        data: data
32
+      })
33
+    },
34
+
35
+
36
+    //库区图
37
+    kqData(data){
38
+      return request({
39
+        url: '/quantity-statistics/getHouseMessage',
40
+        method: 'post',
41
+        data: data
42
+      })
43
+    }
44
+  
45
+  
46
+  
47
+  })
48
+  

+ 31 - 0
src/api/modules/sys.user.api.js

@@ -0,0 +1,31 @@
1
+import { find, assign } from 'lodash'
2
+
3
+const users = [
4
+  { username: 'admin', password: 'admin', uuid: 'admin-uuid', name: 'Admin' },
5
+  { username: 'editor', password: 'editor', uuid: 'editor-uuid', name: 'Editor' },
6
+  { username: 'user1', password: 'user1', uuid: 'user1-uuid', name: 'User1' }
7
+]
8
+
9
+export default ({ service, request, serviceForMock, requestForMock, mock, faker, tools }) => ({
10
+  /**
11
+   * @description 登录
12
+   * @param {Object} data 登录携带的信息
13
+   */
14
+  SYS_USER_LOGIN (data = {}) {
15
+    // 模拟数据
16
+    mock
17
+      .onAny('/login')
18
+      .reply(config => {
19
+        const user = find(users, tools.parse(config.data))
20
+        return user
21
+          ? tools.responseSuccess(assign({}, user, { token: faker.random.uuid() }))
22
+          : tools.responseError({}, '账号或密码不正确')
23
+      })
24
+    // 接口请求
25
+    return requestForMock({
26
+      url: '/login',
27
+      method: 'post',
28
+      data
29
+    })
30
+  }
31
+})

+ 42 - 0
src/api/modules/system/announcementManagement/index.api.js

@@ -0,0 +1,42 @@
1
+export default ({request}) => ({
2
+  /**
3
+   * @description 系统管理 公告管理
4
+   * @param {Object} data 
5
+   */
6
+  // 查询列表数据
7
+   getOrgAnnouncementPage(data) {
8
+    return request({
9
+      url: 'orgAnnouncement/authority/getOrgAnnouncementPage',
10
+      method: 'post',
11
+      data
12
+    })
13
+  },
14
+  // 新增公告
15
+  addOrgAnnouncement(data) {
16
+    return request({
17
+      url: 'orgAnnouncement/authority/save',
18
+      method: 'post',
19
+      data
20
+    })
21
+  },
22
+
23
+  // 修改公告
24
+  editOrgAnnouncement(data) {
25
+    return request({
26
+      url: 'orgAnnouncement/authority/update',
27
+      method: 'post',
28
+      data
29
+    })
30
+  },
31
+
32
+  // 删除公告
33
+  deleOrgAnnouncement( id ) {
34
+    return request({
35
+      url: `orgAnnouncement/authority/deleteById/${id}`,
36
+      method: 'get',
37
+      
38
+    })
39
+  },
40
+
41
+})
42
+

+ 25 - 0
src/api/modules/system/operationLog/index.api.js

@@ -0,0 +1,25 @@
1
+export default ({request}) => ({
2
+    /**
3
+     * @description 登录
4
+     * @param {Object} data 登录携带的信息
5
+     */
6
+    //列表
7
+     operaLogList(data) {
8
+      return request({
9
+        url: '/logPeration/authority/getLogPage',
10
+        method: 'post',
11
+        data
12
+      })
13
+    },
14
+  
15
+    
16
+  
17
+  
18
+  
19
+  
20
+ 
21
+  
22
+  
23
+  })
24
+  
25
+  

+ 66 - 0
src/api/modules/system/organization/index.api.js

@@ -0,0 +1,66 @@
1
+export default ({request}) => ({
2
+  /**
3
+   * @description 系统管理 组织机构
4
+   * @param {Object} data 
5
+   */
6
+  // 查询列表数据
7
+   getOrganizationList() {
8
+    return request({
9
+      url: `/orgInfo/authority/getTreeList`,
10
+      method: 'get',
11
+    })
12
+  },
13
+  // 新增机构
14
+  addOrganization(data) {
15
+    return request({
16
+      url: `/orgInfo/authority/save`,
17
+      method: 'post',
18
+      data
19
+    })
20
+  },
21
+
22
+  // 修改机构
23
+  editOrganization(data) {
24
+    return request({
25
+      url: `/orgInfo/authority/update`,
26
+      method: 'post',
27
+      data
28
+    })
29
+  },
30
+
31
+  // 删除机构
32
+  deleOrganization( id ) {
33
+    return request({
34
+      url: `/orgInfo/authority/getByIdDelete/${id}`,
35
+      method: 'get',
36
+      
37
+    })
38
+  },
39
+
40
+  // 获取所属仓库(机构)
41
+  getOrganizationArr( data ) {
42
+    return request({
43
+      url: `/orgInfo/authority/getList`,
44
+      method: 'post',
45
+      data
46
+    })
47
+  },
48
+  // 查询  根据仓库关键字
49
+  getOrganizationByName( orgName ) {
50
+    return request({
51
+      url: `/orgInfo/authority/getTreeList?orgName=${orgName}`,
52
+      method: 'get',
53
+
54
+    })
55
+  },
56
+  // 根据id查询仓库(机构)
57
+  getOrganizationById( id ) {
58
+    return request({
59
+      url: `/orgInfo/authority/getById/${id}`,
60
+      method: 'get',
61
+
62
+    })
63
+  },
64
+
65
+})
66
+

+ 67 - 0
src/api/modules/system/roleManagement/index.api.js

@@ -0,0 +1,67 @@
1
+export default ({request}) => ({
2
+  /**
3
+   * @description 系统管理 角色管理
4
+   * @param {Object} data 
5
+   */
6
+  // 新建角色
7
+   addRole( data ) {
8
+    return request({
9
+      url: `/roleInfo/authority/saveRoleInfo`,
10
+      method: 'post',
11
+      data
12
+    })
13
+  },
14
+  // 分页查询
15
+  getRolePageList(data) {
16
+    return request({
17
+      url: `/roleInfo/authority/getRolePage`,
18
+      method: 'post',
19
+      data
20
+    })
21
+  },
22
+
23
+  // 修改角色
24
+  editRoleInfo( data ) {
25
+    return request({
26
+      url: `/roleInfo/authority/updateRoleInfo`,
27
+      method: 'post',
28
+      data
29
+    })
30
+  },
31
+
32
+  // 删除角色
33
+  deleRole( id ) {
34
+    return request({
35
+      url: `/roleInfo/authority/getByIdDeleteRoleInfo/${id}`,
36
+      method: 'get',
37
+      
38
+    })
39
+  },
40
+
41
+  // 获取所属仓库(机构)
42
+  getOrganizationArr( data ) {
43
+    return request({
44
+      url: `/orgInfo/authority/getList`,
45
+      method: 'post',
46
+      data
47
+    })
48
+  },
49
+  // 查询  根据仓库关键字
50
+  getOrganizationByName( orgName ) {
51
+    return request({
52
+      url: `/orgInfo/authority/getTreeList?orgName=${orgName}`,
53
+      method: 'get',
54
+
55
+    })
56
+  },
57
+  // 根据id查询仓库(机构)
58
+  getOrganizationById( id ) {
59
+    return request({
60
+      url: `/orgInfo/authority/getById/${id}`,
61
+      method: 'get',
62
+
63
+    })
64
+  },
65
+
66
+})
67
+

+ 55 - 0
src/api/modules/system/userManage/index.api.js

@@ -0,0 +1,55 @@
1
+export default ({request}) => ({
2
+  /**
3
+   * @description 登录
4
+   * @param {Object} data 登录携带的信息
5
+   */
6
+  //用户列表
7
+   userList(data) {
8
+    return request({
9
+      url: 'userInfo/authority/getUserPage',
10
+      method: 'post',
11
+      data
12
+    })
13
+  },
14
+
15
+   //新增
16
+   addUser(data){
17
+    return request({
18
+      url: '/userInfo/authority/save',
19
+      method: 'post',
20
+      data
21
+    })
22
+  },
23
+
24
+
25
+  //编辑
26
+  editUser(data){
27
+    return request({
28
+      url: '/userInfo/authority/update',
29
+      method: 'post',
30
+      data
31
+    })
32
+  },
33
+
34
+  //删除
35
+  deleteUser(id){
36
+    return request({
37
+      url: `/userInfo/authority/deleteById/${id}`,
38
+      method: 'get',
39
+     
40
+    })
41
+  },
42
+
43
+  //获取仓库和仓房
44
+  ckList(data){
45
+    return request({
46
+      url: 'orgInfo/authority/getList',
47
+      method: 'post',
48
+      data
49
+    })
50
+  },
51
+
52
+
53
+
54
+})
55
+

+ 77 - 0
src/api/modules/wareShow/wareInfo.api.js

@@ -0,0 +1,77 @@
1
+
2
+export default ({request}) => ({
3
+    /**
4
+     * @description 登录
5
+     * @param {Object} data 登录携带的信息
6
+     */
7
+    //仓房信息列表
8
+     wareInfoList(data) {
9
+      return request({
10
+        url: 'storehouse/getStorehousePage',
11
+        method: 'post',
12
+        data
13
+      })
14
+    },
15
+    //打开弹框时的列表
16
+    cfDialogList(params){
17
+         
18
+      return request({
19
+        url: '/storehouse/getStorehouseById',
20
+        method: 'get',
21
+        params
22
+      })
23
+    },
24
+
25
+    //编辑提交
26
+    editWareInfo(data){
27
+     
28
+      return request({
29
+        url: '/storehouse/update',
30
+        method: 'post',
31
+      
32
+       data
33
+      })
34
+    },
35
+   
36
+
37
+
38
+
39
+    // 删除仓房信息
40
+    deleteWareInfo(id){
41
+     
42
+      return request({
43
+        url: `storehouse/deleteStorehouse/${id}`,
44
+        method: 'get',
45
+       
46
+      })
47
+    },
48
+
49
+
50
+
51
+     // 删除粮食信息
52
+     deleteLsInfo(id){
53
+     
54
+      return request({
55
+        url: `storehouse/deleteStorehouseClxx/${id}`,
56
+        method: 'get',
57
+       
58
+      })
59
+    },
60
+
61
+
62
+    //获取保管员
63
+
64
+    keeper(params){
65
+     
66
+      return request({
67
+        url: `/userInfo/authority/getUserList`,
68
+        method: 'get',
69
+         params
70
+      })
71
+    }
72
+
73
+ 
74
+  
75
+  })
76
+  
77
+  

+ 27 - 0
src/api/modules/wareShow/wareTravel.api.js

@@ -0,0 +1,27 @@
1
+
2
+export default ({request}) => ({
3
+    /**
4
+     * @description 登录
5
+     * @param {Object} data 登录携带的信息
6
+     */
7
+   
8
+ 
9
+
10
+     // 三维图数据
11
+     threeData(cfbh){
12
+     
13
+      return request({
14
+        url: `point-data/getPoints/${cfbh}`,
15
+        method: 'get',
16
+       
17
+      })
18
+    },
19
+
20
+
21
+  
22
+
23
+ 
24
+  
25
+  })
26
+  
27
+  

+ 198 - 0
src/api/service.js

@@ -0,0 +1,198 @@
1
+import { Message } from 'element-ui'
2
+import axios from 'axios'
3
+import Adapter from 'axios-mock-adapter'
4
+import { get, isEmpty, merge } from 'lodash'
5
+import qs from 'qs'
6
+import util from '@/libs/util'
7
+import store from '@/store'
8
+import { parse } from './tools'
9
+
10
+/**
11
+ * @description 记录和显示错误
12
+ * @param {Error} error 错误对象
13
+ */
14
+/* function handleError (error) {
15
+  // 添加到日志
16
+  store.dispatch('d2admin/log/push', {
17
+    message: '数据请求异常',
18
+    type: 'danger',
19
+    meta: {
20
+      error
21
+    }
22
+  })
23
+  // 打印到控制台
24
+  if (process.env.NODE_ENV === 'development') {
25
+    util.log.danger('>>>>>> Error >>>>>>')
26
+    console.log(error)
27
+  }
28
+  // 显示提示
29
+  Message({
30
+    message: error.message,
31
+    type: 'error',
32
+    duration: 5 * 1000
33
+  })
34
+} */
35
+
36
+/**
37
+ * @description 创建请求实例
38
+ */
39
+function createService () {
40
+  // 创建一个 axios 实例
41
+  const service = axios.create()
42
+  // 请求拦截
43
+  service.interceptors.request.use(
44
+    config => config,
45
+    error => {
46
+      // 发送失败
47
+    
48
+      return Promise.reject(error)
49
+    }
50
+  )
51
+  // 响应拦截
52
+ /*  service.interceptors.response.use(
53
+    response => {
54
+      // const res = response.data //
55
+      // return res
56
+      // dataAxios 是 axios 返回数据中的 data
57
+      // const res = response.data 
58
+      // return res
59
+      const dataAxios = response.data
60
+      // 这个状态码是和后端约定的
61
+      const { code } = dataAxios
62
+      console.log(dataAxios,"dataAxios")
63
+      console.log(code,"///")
64
+      // 根据 code 进行判断
65
+      if (code === undefined) {
66
+        // 如果没有 code 代表这不是项目后端开发的接口 比如可能是 D2Admin 请求最新版本
67
+        return dataAxios
68
+      } else {
69
+        // 有 code 代表这是一个后端接口 可以进行进一步的判断
70
+        switch (code) {
71
+          case 200:
72
+            // [ 示例 ] code === 0 代表没有错误
73
+            return dataAxios.data
74
+           
75
+          case 'xxx':
76
+            // [ 示例 ] 其它和后台约定的 code
77
+            errorCreate(`[ code: xxx ] ${dataAxios.msg}: ${response.config.url}`)
78
+            break
79
+          default:
80
+            // 不是正确的 code
81
+            errorCreate(`${dataAxios.msg}: ${response.config.url}`)
82
+            break
83
+        }
84
+      }
85
+    },
86
+    error => {
87
+      const status = get(error, 'response.status')
88
+      switch (status) {
89
+        case 400: error.message = '请求错误'; break
90
+        case 401: error.message = '未授权,请登录'; break
91
+        case 403: error.message = '拒绝访问'; break
92
+        case 404: error.message = `请求地址出错: ${error.response.config.url}`; break
93
+        case 408: error.message = '请求超时'; break
94
+        case 500: error.message = '服务器内部错误'; break
95
+        case 501: error.message = '服务未实现'; break
96
+        case 502: error.message = '网关错误'; break
97
+        case 503: error.message = '服务不可用'; break
98
+        case 504: error.message = '网关超时'; break
99
+        case 505: error.message = 'HTTP版本不受支持'; break
100
+        default: break
101
+      }
102
+      handleError(error)
103
+      throw error
104
+    }
105
+  )*/
106
+
107
+
108
+ // 添加响应拦截器
109
+ 
110
+service.interceptors.response.use(
111
+  response => {
112
+    // 对响应数据做点什么
113
+    const res = response.data
114
+    if(res.code ==undefined) {
115
+      return res.data
116
+    }
117
+    // 有 code 判断为项目接口请求
118
+    switch (res.code) {
119
+      // 返回响应内容
120
+      case 0: return res.data
121
+      // 例如在 code 401 情况下退回到登录页面
122
+      case 401: throw new Error('请重新登录')
123
+      // 根据需要添加其它判断
124
+      // case 403: MessageBox.alert('身份失效,请重新登录', '确认退出', {
125
+      //   confirmButtonText: '确定',
126
+      //   callback:()=>{
127
+
128
+      //     this.$router.push({
129
+      //       path:"/login"
130
+      //     })
131
+         
132
+       
133
+      //   }
134
+
135
+      // })
136
+      // default: throw new Error(`${response.data.msg}: ${response.config.url}`)
137
+    }
138
+    return res;
139
+  }, function (error) {
140
+ 
141
+    // 对响应错误做点什么
142
+    return Promise.reject(error);
143
+  });
144
+  return service
145
+} 
146
+
147
+function stringify (data) {
148
+  return qs.stringify(data, { allowDots: true, encode: false })
149
+}
150
+
151
+/**
152
+ * @description 创建请求方法
153
+ * @param {Object} service axios 实例
154
+ */
155
+function createRequest (service) {
156
+  return function (config) {
157
+    const token = util.cookies.get('token')
158
+    console.log(token,"se...")
159
+    const configDefault = {
160
+      headers: {
161
+        // Authorization: token,
162
+        token: token,
163
+        'Content-Type': get(config, 'headers.Content-Type', 'application/json')
164
+      },
165
+      timeout: 5000,
166
+      baseURL: process.env.VUE_APP_API,
167
+      data: {}
168
+    }
169
+    const option = merge(configDefault, config)
170
+    // 处理 get 请求的参数
171
+    // 请根据实际需要修改
172
+    if (!isEmpty(option.params)) {
173
+      option.url = option.url + '?' + stringify(option.params)
174
+      option.params = {}
175
+    }
176
+    // 当需要以 form 形式发送时 处理发送的数据
177
+    // 请根据实际需要修改
178
+   
179
+    if (!isEmpty(option.data) && option.headers['Content-Type'] === 'application/x-www-form-urlencoded') {
180
+    
181
+      option.data = stringify(option.data)
182
+      // option.data = parse(option.data)
183
+     
184
+    }
185
+    return service(option)
186
+  }
187
+}
188
+
189
+// 用于真实网络请求的实例和请求方法
190
+export const service = createService()
191
+export const request = createRequest(service)
192
+
193
+// 用于模拟网络请求的实例和请求方法
194
+export const serviceForMock = createService()
195
+export const requestForMock = createRequest(serviceForMock)
196
+
197
+// 网络请求数据模拟工具
198
+export const mock = new Adapter(serviceForMock)

+ 86 - 0
src/api/tools.js

@@ -0,0 +1,86 @@
1
+import { Message } from 'element-ui'
2
+import store from '@/store'
3
+import util from '@/libs/util'
4
+
5
+/**
6
+ * @description 安全地解析 json 字符串
7
+ * @param {String} jsonString 需要解析的 json 字符串
8
+ * @param {String} defaultValue 默认值
9
+ */
10
+export function parse (jsonString = '{}', defaultValue = {}) {
11
+  let result = defaultValue
12
+  try {
13
+    result = JSON.parse(jsonString)
14
+  } catch (error) {
15
+    console.log(error)
16
+  }
17
+  return result
18
+}
19
+
20
+/**
21
+ * @description 接口请求返回
22
+ * @param {Any} data 返回值
23
+ * @param {String} msg 状态信息
24
+ * @param {Number} code 状态码
25
+ */
26
+export function response (data = {}, msg = '', code = 0) {
27
+  return [
28
+    200,
29
+    { code, msg, data }
30
+  ]
31
+}
32
+
33
+/**
34
+ * @description 接口请求返回 正确返回
35
+ * @param {Any} data 返回值
36
+ * @param {String} msg 状态信息
37
+ */
38
+export function responseSuccess (data = {}, msg = '成功') {
39
+  return response(data, msg)
40
+}
41
+
42
+/**
43
+ * @description 接口请求返回 错误返回
44
+ * @param {Any} data 返回值
45
+ * @param {String} msg 状态信息
46
+ * @param {Number} code 状态码
47
+ */
48
+export function responseError (data = {}, msg = '请求失败', code = 500) {
49
+  return response(data, msg, code)
50
+}
51
+
52
+/**
53
+ * @description 记录和显示错误
54
+ * @param {Error} error 错误对象
55
+ */
56
+export function errorLog (error) {
57
+  // 添加到日志
58
+  store.dispatch('d2admin/log/push', {
59
+    message: '数据请求异常',
60
+    type: 'danger',
61
+    meta: {
62
+      error
63
+    }
64
+  })
65
+  // 打印到控制台
66
+  // if (process.env.NODE_ENV === 'development') {
67
+  //   util.log.danger('>>>>>> Error >>>>>>')
68
+  //   console.log(error)
69
+  // }
70
+  // 显示提示
71
+  Message({
72
+    message: error.message,
73
+    type: 'error',
74
+    duration: 5 * 1000
75
+  })
76
+}
77
+
78
+/**
79
+ * @description 创建一个错误
80
+ * @param {String} msg 错误信息
81
+ */
82
+export function errorCreate (msg) {
83
+  const error = new Error(msg)
84
+  errorLog(error)
85
+  throw error
86
+}

二进制
src/assets/images/bg.png


二进制
src/assets/images/logo.png


二进制
src/assets/images/logo_big.png


二进制
src/assets/images/logo_small.png


二进制
src/assets/images/nav-bg.png


二进制
src/assets/images/selected.png


+ 27 - 0
src/assets/style/animate/vue-transition.scss

@@ -0,0 +1,27 @@
1
+// 过渡动画 横向渐变
2
+.fade-transverse-leave-active,
3
+.fade-transverse-enter-active {
4
+  transition: all .5s;
5
+}
6
+.fade-transverse-enter {
7
+  opacity: 0;
8
+  transform: translateX(-30px);
9
+}
10
+.fade-transverse-leave-to {
11
+  opacity: 0;
12
+  transform: translateX(30px);
13
+}
14
+
15
+// 过渡动画 缩放渐变
16
+.fade-scale-leave-active,
17
+.fade-scale-enter-active {
18
+  transition: all .3s;
19
+}
20
+.fade-scale-enter {
21
+  opacity: 0;
22
+  transform: scale(1.2);
23
+}
24
+.fade-scale-leave-to {
25
+  opacity: 0;
26
+  transform: scale(0.8);
27
+}

+ 12 - 0
src/assets/style/fixed/base.scss

@@ -0,0 +1,12 @@
1
+// 优化显示
2
+html, body {
3
+  margin: 0px;
4
+  height: 100%;
5
+  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
6
+  #app {
7
+    @extend %full;
8
+    a {
9
+      text-decoration: none;
10
+    }
11
+  }
12
+}

+ 31 - 0
src/assets/style/fixed/element.scss

@@ -0,0 +1,31 @@
1
+// element 样式补丁
2
+.el-card {
3
+  &.is-always-shadow {
4
+    box-shadow: 0 0 8px 0 rgba(232,237,250,.6), 0 2px 4px 0 rgba(232,237,250,.5);
5
+  }
6
+  &.is-hover-shadow {
7
+    &:hover {
8
+      box-shadow: 0 0 8px 0 rgba(232,237,250,.6), 0 2px 4px 0 rgba(232,237,250,.5);
9
+    }
10
+  }
11
+}
12
+
13
+.el-menu--horizontal {
14
+  border-bottom: none !important;
15
+}
16
+
17
+.el-tabs__item:focus.is-active.is-focus:not(:active) {
18
+  box-shadow: none !important;
19
+}
20
+
21
+// 修复IE宽度不能撑满
22
+.el-table__body,
23
+.el-table__header {
24
+  width: 100% !important;
25
+}
26
+
27
+// Chrome下表格头部错位修复
28
+.el-table th.gutter,
29
+.el-table colgroup.gutter {
30
+  display: table-cell !important;
31
+}

+ 9 - 0
src/assets/style/fixed/markdown.scss

@@ -0,0 +1,9 @@
1
+// markdown 样式补丁
2
+.markdown-body {
3
+  ul {
4
+    list-style: disc;
5
+  }
6
+  h1, h2 {
7
+    border-bottom: none;
8
+  }
9
+}

+ 8 - 0
src/assets/style/fixed/n-progress.scss

@@ -0,0 +1,8 @@
1
+#nprogress {
2
+  .bar {
3
+    background: $color-primary !important;
4
+  }
5
+  .peg {
6
+    box-shadow: 0 0 10px $color-primary, 0 0 5px $color-primary !important;
7
+  }
8
+}

+ 5 - 0
src/assets/style/fixed/tree-view.scss

@@ -0,0 +1,5 @@
1
+.tree-view-wrapper.tree-view-small {
2
+  .tree-view-item {
3
+    font-size: 10px;
4
+  }
5
+}

+ 9 - 0
src/assets/style/fixed/vue-grid-layout.scss

@@ -0,0 +1,9 @@
1
+// vue-splitpane 样式补丁
2
+.vue-grid-item {
3
+  &.vue-grid-placeholder {
4
+    border: 1px solid $color-border-1;
5
+    background-color: rgba(#FFF, .3);
6
+    opacity: 1;
7
+    border-radius: 4px;
8
+  }
9
+}

+ 5 - 0
src/assets/style/fixed/vue-splitpane.scss

@@ -0,0 +1,5 @@
1
+// vue-splitpane 样式补丁
2
+.splitter-pane-resizer {
3
+  background-color: $color-border-1 !important;
4
+  opacity: 1 !important;
5
+}

+ 327 - 0
src/assets/style/public-class.scss

@@ -0,0 +1,327 @@
1
+@import 'public';
2
+
3
+// 补丁 base
4
+@import '~@/assets/style/fixed/base.scss';
5
+// 补丁 element
6
+@import '~@/assets/style/fixed/element.scss';
7
+// 补丁 markdown
8
+@import '~@/assets/style/fixed/markdown.scss';
9
+// 补丁 n-progress
10
+@import '~@/assets/style/fixed/n-progress.scss';
11
+// 补丁 vue-splitpane
12
+@import '~@/assets/style/fixed/vue-splitpane.scss';
13
+// 补丁 vue-grid-layout
14
+@import '~@/assets/style/fixed/vue-grid-layout.scss';
15
+// 补丁 tree-view
16
+@import '~@/assets/style/fixed/tree-view.scss';
17
+
18
+// 动画
19
+@import '~@/assets/style/animate/vue-transition.scss';
20
+
21
+// 在这里写公用的class
22
+// 注意 这个文件里只写class
23
+// mixin等内容请在 public.scss 里书写
24
+
25
+// 文字相关
26
+.#{$prefix}-text-center {
27
+  text-align: center;
28
+}
29
+
30
+// 浮动相关
31
+.#{$prefix}-fl {
32
+  float: left;
33
+}
34
+.#{$prefix}-fr {
35
+  float: right;
36
+}
37
+
38
+// 边距相关
39
+$sizes: (0, 5, 10, 15, 20);
40
+
41
+@for $index from 1 to 6 {
42
+  .#{$prefix}-m-#{nth($sizes, $index)} { margin: #{nth($sizes, $index)}px !important; }
43
+  .#{$prefix}-mt-#{nth($sizes, $index)} { margin-top: #{nth($sizes, $index)}px !important; }
44
+  .#{$prefix}-mr-#{nth($sizes, $index)} { margin-right: #{nth($sizes, $index)}px !important; }
45
+  .#{$prefix}-mb-#{nth($sizes, $index)} { margin-bottom: #{nth($sizes, $index)}px !important; }
46
+  .#{$prefix}-ml-#{nth($sizes, $index)} { margin-left: #{nth($sizes, $index)}px !important; }
47
+
48
+  .#{$prefix}-p-#{nth($sizes, $index)} { padding: #{nth($sizes, $index)}px !important; }
49
+  .#{$prefix}-pt-#{nth($sizes, $index)} { padding-top: #{nth($sizes, $index)}px !important; }
50
+  .#{$prefix}-pr-#{nth($sizes, $index)} { padding-right: #{nth($sizes, $index)}px !important; }
51
+  .#{$prefix}-pb-#{nth($sizes, $index)} { padding-bottom: #{nth($sizes, $index)}px !important; }
52
+  .#{$prefix}-pl-#{nth($sizes, $index)} { padding-left: #{nth($sizes, $index)}px !important; }
53
+}
54
+
55
+// 快速使用
56
+
57
+.#{$prefix}-m { margin: 20px !important; }
58
+.#{$prefix}-mt { margin-top: 20px !important; }
59
+.#{$prefix}-mr { margin-right: 20px !important; }
60
+.#{$prefix}-mb { margin-bottom: 20px !important; }
61
+.#{$prefix}-ml { margin-left: 20px !important; }
62
+
63
+.#{$prefix}-p { padding: 20px !important; }
64
+.#{$prefix}-pt { padding-top: 20px !important; }
65
+.#{$prefix}-pr { padding-right: 20px !important; }
66
+.#{$prefix}-pb { padding-bottom: 20px !important; }
67
+.#{$prefix}-pl { padding-left: 20px !important; }
68
+//左侧菜单样式
69
+.main{
70
+  .left {
71
+    width: 280px;
72
+    // height:100%;
73
+    // min-height:922px;
74
+    height: calc(100vh - 110px);
75
+
76
+    overflow-y: auto;
77
+    background: #163d79;
78
+  }
79
+}
80
+
81
+.el-tree-node{
82
+  background: #163d79;
83
+  color:#fff;
84
+  font-size:12px;
85
+}
86
+
87
+//鼠标移到每行时的背景色
88
+.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{
89
+  background:hsl(204, 66%, 23%) !important;
90
+}
91
+// //头部导航一级菜单的样式
92
+.theme-d2 .d2-theme-header .el-menu .el-menu-item{
93
+  // border-right:linear-gradient(#193a6d, #487B98 20%,#193a6d 80%) !important;
94
+  border-right:linear-gradient(red yellow) !important;
95
+}
96
+// 去除二级子菜单的上下padding
97
+.el-menu--horizontal .el-menu--popup {
98
+  padding: 0;
99
+}
100
+.el-menu--horizontal .el-menu {
101
+  // 设置子菜单四周上左和右下的阴影
102
+  box-shadow: 2px 2px 2px 1px rgba(228, 231, 235, 0.2),-2px -2px 2px 1px rgba(228, 231, 235, 0.2);
103
+  border-radius: 2px;
104
+  background-color: transparent;
105
+}
106
+//头部导航二级菜单选中后整体的背景色
107
+.el-menu--horizontal .el-menu .el-menu-item{
108
+  background:#244e88 !important;
109
+  border:1px solid #346ebd;
110
+  text-align: center;
111
+}
112
+//头部导航二级菜单选中后每个的背景色
113
+.theme-d2 .el-menu--horizontal .el-menu-item:not(.is-disabled):hover{
114
+  background:#346ebd !important;
115
+  color: #fff !important;
116
+}
117
+.el-menu--horizontal .el-menu--collapse .el-menu .el-submenu, .el-menu--popup {
118
+  min-width: 142px !important;
119
+}
120
+.el-menu--horizontal .el-menu .el-submenu.is-active>.el-submenu__title {
121
+  color: #fff !important;
122
+}
123
+.el-submenu.is-active {
124
+  color: #fff;
125
+}
126
+.el-menu--horizontal .el-menu .el-menu-item.is-active, .el-menu--horizontal .el-menu .el-submenu.is-active>.el-submenu__title {
127
+  color: #fff !important;
128
+}
129
+.el-menu--horizontal .el-menu .el-menu-item.is-active, .el-menu--horizontal .el-menu .el-submenu.is-active {
130
+  background-color:#346ebd !important  ;
131
+}
132
+
133
+//头部导航仓房展示icon的大小
134
+.fa-university{
135
+  font-size:13px !important;
136
+}
137
+// .theme-d2 .d2-theme-header .el-menu .el-submenu.is-active .el-submenu__title{
138
+//   background: #0068a0 !important;
139
+//   color:#fff !important;
140
+// }
141
+
142
+//主体内容样式
143
+.right_main {
144
+  border: 1px solid #67a7df;
145
+  background: #112f5d;
146
+
147
+  margin-top: 10px;
148
+  .right_title {
149
+    color: #fff;
150
+    border-bottom: 1px solid #67a7df;
151
+    padding: 10px;
152
+    font-size: 14px;
153
+  }
154
+  .right_table {
155
+    padding: 20px;
156
+  }
157
+}
158
+//分页整体样式
159
+.el-pagination {
160
+  margin-top: 20px;
161
+  display: flex;
162
+  justify-content: flex-end;
163
+}
164
+//分页总共几页样式
165
+.el-pagination__total {
166
+  color: #fff !important;
167
+}
168
+//label样式
169
+#formLabel .el-form-item__label {
170
+  color: #fff;
171
+}
172
+// 分页跳转颜色
173
+.el-pagination .el-pagination__jump {
174
+  color: #fff;
175
+}
176
+// 弹窗关闭icon颜色
177
+.el-dialog .el-dialog__headerbtn .el-dialog__close {
178
+color: #fff;
179
+}
180
+//树形节点选中后的颜色
181
+.el-tree-node:focus > .el-tree-node__content {
182
+  background-color: #0064b9 !important;
183
+  border-radius: 20px;
184
+}
185
+//树形节点鼠标移上去的颜色
186
+.el-tree-node__content:hover {
187
+  background-color: #91a8bc !important;
188
+}
189
+.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{
190
+  background-color: #0064b9 !important;
191
+  border-radius: 20px;
192
+}
193
+//table border
194
+
195
+.el-table td,
196
+.el-table th.is-leaf,
197
+.el-table-border,
198
+.el-table--group {
199
+  border-color: #67a7df !important;
200
+}
201
+.el-table th.el-table_cell.is-leaf {
202
+  border: #67a7df !important;
203
+}
204
+.el-table tr {
205
+  background: #00375e !important;
206
+}
207
+
208
+.el-table--border {
209
+  border-color: #67a7df !important;
210
+  
211
+}
212
+//鼠标移到每行时的背景色
213
+.el-table__body tr.hover-row.current-row>td.el-table__cell,
214
+.el-table__body tr.hover-row.el-table__row--striped.current-row>td.el-table__cell,
215
+.el-table__body tr.hover-row.el-table__row--striped>td.el-table__cell,
216
+.el-table__body tr.hover-row>td.el-table__cell{
217
+  background:hsl(204, 66%, 23%) !important;
218
+}
219
+//弹框样式
220
+#dialogStyle .el-dialog{
221
+  background: #092a51;
222
+}
223
+#dialogStyle .el-dialog__header{
224
+  background:#3a8ee6;
225
+}
226
+#dialogStyle .el-dialog__title,#dialogStyle .el-form-item__label{
227
+  // color:#9bbbe3;
228
+  color:#fff;
229
+}
230
+// #dialogStyle .el-input__inner{
231
+//   background:#1d3b6b;
232
+//   border:1px solid #345684;
233
+//   opacity: 12.5;
234
+// }
235
+// #switchLabel .el-switch__label{
236
+//   color:#fff;
237
+// }
238
+// switch按钮样式
239
+// #switchBtn .el-switch__label{
240
+//   position:absolute;
241
+//   display:none;
242
+//   color:#fff !important;
243
+// }
244
+// 打开时文字位置设置
245
+// #switchBtn .el-switch__label--right{
246
+//   z-index:1;
247
+// }
248
+// // 调整打开时文字的显示位置
249
+// #switchBtn .el-switch__label--right span{
250
+//   margin-right:9px;
251
+// }
252
+// 关闭时文字位置设置
253
+// #switchBtn .el-switch__label--left{
254
+//   z-index:1;
255
+// }
256
+// // 调整关闭时文字的显示位置
257
+// #switchBtn .el-switch__label--left span{
258
+//   margin-right:9px;
259
+// }
260
+
261
+// 显示文字
262
+// #switchBtn .el-switch__label.is-active{
263
+//   display:block;
264
+// }
265
+// //调整按钮的宽度
266
+// #switchBtn.el-switch .el-switch_core,.el-switch .el-switch__label{
267
+//   width:70px !important;
268
+//   margin:0;
269
+
270
+// }
271
+
272
+.el-button--text {
273
+  color: #fff !important;
274
+}
275
+// 编辑按钮
276
+.main #formLabel .editBtn {
277
+  border: 1px solid #cefafe;
278
+  padding: 5px 3px;
279
+  color: #cefafe;
280
+  background: #142f66;
281
+}
282
+/* .el-button--text:focus, .el-button--text:hover {
283
+  background: #0064b9 !important;
284
+} */
285
+// 详情按钮
286
+button.el-button.el-button--detailbtn.el-button--mini{
287
+  border: 1px solid #aee9fb;
288
+  color: #aee9fb;
289
+  padding: 5px 8px;
290
+  background-color: #142f66;
291
+  &:hover{
292
+  background-color: #142f66;
293
+  }
294
+}
295
+// 编辑按钮
296
+button.el-button.el-button--editbtn.el-button--mini{
297
+  border: 1px solid #aee9fb;
298
+  color: #aee9fb;
299
+  padding: 5px 8px;
300
+  background-color: #142f66;
301
+  &:hover{
302
+  background-color: #142f66;
303
+  }
304
+}
305
+// 删除按钮
306
+button.el-button.el-button--delebtn.el-button--mini{
307
+  border: 1px solid #aee9fb;
308
+  color: #aee9fb;
309
+  padding: 5px 8px;
310
+  background-color: #142f66;
311
+  &:hover{
312
+  background-color: #142f66;
313
+  }
314
+}
315
+// table  表格展开图标颜色
316
+.el-icon-arrow-right {
317
+  color: #fff;
318
+}
319
+//主体内容
320
+// .ztnr{
321
+//   padding-left: 10px;
322
+// }
323
+
324
+
325
+
326
+
327
+

+ 47 - 0
src/assets/style/public.scss

@@ -0,0 +1,47 @@
1
+@import '~@/assets/style/unit/color.scss';
2
+
3
+// 工具类名统一前缀
4
+$prefix: d2;
5
+
6
+// 禁止用户选中 鼠标变为手形
7
+%unable-select {
8
+  user-select: none;
9
+  cursor: pointer;
10
+}
11
+
12
+// 填满父元素
13
+// 组要父元素 position: relative | absolute;
14
+%full {
15
+  position: absolute;
16
+  top: 0px;
17
+  right: 0px;
18
+  bottom: 0px;
19
+  left: 0px;
20
+}
21
+
22
+// flex 垂直水平居中
23
+%flex-center-row {
24
+  display: flex;
25
+  justify-content: center;
26
+  align-items: center;
27
+  flex-direction: row;
28
+}
29
+%flex-center-col {
30
+  display: flex;
31
+  justify-content: center;
32
+  align-items: center;
33
+  flex-direction: column;
34
+}
35
+
36
+// 将元素模拟成卡片外观
37
+%card {
38
+  border: 1px solid #dddee1;
39
+  border-color: #e9eaec;
40
+  background: #fff;
41
+  border-radius: 4px;
42
+  font-size: 14px;
43
+  position: relative;
44
+}
45
+.el-table {
46
+  color: #fff;
47
+}

+ 2 - 0
src/assets/style/theme/chester/index.scss

@@ -0,0 +1,2 @@
1
+@import './setting.scss';
2
+@import '../theme.scss';

+ 64 - 0
src/assets/style/theme/chester/setting.scss

@@ -0,0 +1,64 @@
1
+// 主题名称
2
+$theme-name: 'chester';
3
+// 主题背景颜色
4
+$theme-bg-color: #2C3643;
5
+// 主题背景图片遮罩
6
+$theme-bg-mask: rgba(#000, 0);
7
+
8
+// 消息提示
9
+$theme-message-info-background-color: #FFFFFF;
10
+$theme-message-info-text-color: #222A34;
11
+$theme-message-info-border-color: #222A34;
12
+
13
+// container组件
14
+$theme-container-background-color: rgba(#FFF, 1);
15
+$theme-container-header-footer-background-color: #FFF;
16
+$theme-container-border-inner: 1px solid #CFD7E5;
17
+$theme-container-border-outer: 1px solid #2A2D2E;
18
+
19
+$theme-multiple-page-control-color: #CCCCCC;
20
+$theme-multiple-page-control-color-active: #242D38;
21
+$theme-multiple-page-control-nav-prev-color: #CCCCCC;
22
+$theme-multiple-page-control-nav-next-color: #CCCCCC;
23
+$theme-multiple-page-control-border-color: #2A2D2E;
24
+$theme-multiple-page-control-border-color-active: #FFFFFF;
25
+$theme-multiple-page-control-background-color: #242D38;
26
+$theme-multiple-page-control-background-color-active: #FFFFFF;
27
+
28
+// 顶栏和侧边栏中展开的菜单 hover 状态下
29
+$theme-menu-item-color-hover: #CCCCCC;
30
+$theme-menu-item-background-color-hover: #2A2D2E;
31
+
32
+// 顶栏上的文字颜色
33
+$theme-header-item-color: #CCCCCC;
34
+$theme-header-item-background-color: transparent;
35
+// 顶栏上的项目在 hover 时
36
+$theme-header-item-color-hover: #CCCCCC;
37
+$theme-header-item-background-color-hover: #2A2D2E;
38
+// 顶栏上的项目在 focus 时
39
+$theme-header-item-color-focus: #CCCCCC;
40
+$theme-header-item-background-color-focus: #222A34;
41
+// 顶栏上的项目在 active 时
42
+$theme-header-item-color-active: #FFFFFF;
43
+$theme-header-item-background-color-active: #222A34;
44
+
45
+// 侧边栏上的文字颜色
46
+$theme-aside-item-color: #CCCCCC;
47
+$theme-aside-item-background-color: transparent;
48
+// 侧边栏上的项目在 hover 时
49
+$theme-aside-item-color-hover: #CCCCCC;
50
+$theme-aside-item-background-color-hover: #2A2D2E;
51
+// 侧边栏上的项目在 focus 时
52
+$theme-aside-item-color-focus: #CCCCCC;
53
+$theme-aside-item-background-color-focus: #222A34;
54
+// 侧边栏上的项目在 active 时
55
+$theme-aside-item-color-active: #FFFFFF;
56
+$theme-aside-item-background-color-active: #222A34;
57
+
58
+// 侧边栏菜单为空的时候显示的元素
59
+$theme-aside-menu-empty-icon-color: #CCCCCC;
60
+$theme-aside-menu-empty-text-color: #CCCCCC;
61
+$theme-aside-menu-empty-background-color: #242D38;
62
+$theme-aside-menu-empty-icon-color-hover: #FFFFFF;
63
+$theme-aside-menu-empty-text-color-hover: #FFFFFF;
64
+$theme-aside-menu-empty-background-color-hover: #242D38;

+ 2 - 0
src/assets/style/theme/d2/index.scss

@@ -0,0 +1,2 @@
1
+@import './setting.scss';
2
+@import '../theme.scss';

+ 66 - 0
src/assets/style/theme/d2/setting.scss

@@ -0,0 +1,66 @@
1
+// 主题名称
2
+$theme-name: 'd2';
3
+// 主题背景颜色
4
+$theme-bg-color: #ebf1f6;
5
+// 主题背景图片遮罩
6
+$theme-bg-mask: rgba(#000, 0);
7
+
8
+// 消息提示
9
+$theme-message-info-background-color: $color-bg;
10
+$theme-message-info-text-color: $color-text-normal;
11
+$theme-message-info-border-color: $color-border-1;
12
+
13
+// container组件
14
+$theme-container-background-color: rgba(#FFF, 1);
15
+$theme-container-header-footer-background-color: #FFF;
16
+$theme-container-border-inner: 1px solid #cfd7e5;
17
+$theme-container-border-outer: 1px solid #cfd7e5;
18
+
19
+$theme-multiple-page-control-color: $color-text-normal;
20
+$theme-multiple-page-control-color-active: #2f74ff;
21
+$theme-multiple-page-control-nav-prev-color: #cfd7e5;
22
+$theme-multiple-page-control-nav-next-color: #cfd7e5;
23
+$theme-multiple-page-control-border-color: #cfd7e5;
24
+$theme-multiple-page-control-border-color-active: #FFF;
25
+$theme-multiple-page-control-background-color: rgba(#000, .03);
26
+$theme-multiple-page-control-background-color-active: #FFF;
27
+
28
+// 顶栏和侧边栏中展开的菜单 hover 状态下
29
+$theme-menu-item-color-hover: #293849;
30
+$theme-menu-item-background-color-hover: #ecf5ff;
31
+
32
+// 顶栏上的文字颜色
33
+$theme-header-item-color: $color-text-normal;
34
+$theme-header-item-background-color: transparent;
35
+// 顶栏上的项目在 hover 时
36
+$theme-header-item-color-hover: #2f74ff;
37
+$theme-header-item-color-hover: #fff; // 顶栏上的项目在 hover 字体颜色
38
+$theme-header-item-background-color-hover: rgba(#FFF, .5);
39
+$theme-header-item-background-color-hover: #346ebd ;  // 顶栏上的项目在 hover  背景色
40
+// 顶栏上的项目在 focus 时
41
+$theme-header-item-color-focus: #2f74ff;
42
+$theme-header-item-background-color-focus: rgba(#FFF, .5);
43
+// 顶栏上的项目在 active 时
44
+$theme-header-item-color-active: #2f74ff;
45
+$theme-header-item-background-color-active: rgba(#FFF, .5);
46
+
47
+// 侧边栏上的文字颜色
48
+$theme-aside-item-color: $color-text-normal;
49
+$theme-aside-item-background-color: transparent;
50
+// 侧边栏上的项目在 hover 时
51
+$theme-aside-item-color-hover: #2f74ff;
52
+$theme-aside-item-background-color-hover: rgba(#FFF, .5);
53
+// 侧边栏上的项目在 focus 时
54
+$theme-aside-item-color-focus: #2f74ff;
55
+$theme-aside-item-background-color-focus: rgba(#FFF, .5);
56
+// 侧边栏上的项目在 active 时
57
+$theme-aside-item-color-active: #2f74ff;
58
+$theme-aside-item-background-color-active: rgba(#FFF, .5);
59
+
60
+// 侧边栏菜单为空的时候显示的元素
61
+$theme-aside-menu-empty-icon-color: $color-text-normal;
62
+$theme-aside-menu-empty-text-color: $color-text-normal;
63
+$theme-aside-menu-empty-background-color: rgba(#000, .03);
64
+$theme-aside-menu-empty-icon-color-hover: $color-text-main;
65
+$theme-aside-menu-empty-text-color-hover: $color-text-main;
66
+$theme-aside-menu-empty-background-color-hover: rgba(#000, .05);

+ 2 - 0
src/assets/style/theme/element/index.scss

@@ -0,0 +1,2 @@
1
+@import './setting.scss';
2
+@import '../theme.scss';

+ 64 - 0
src/assets/style/theme/element/setting.scss

@@ -0,0 +1,64 @@
1
+// 主题名称
2
+$theme-name: 'element';
3
+// 主题背景颜色
4
+$theme-bg-color: #314255;
5
+// 主题背景图片遮罩
6
+$theme-bg-mask: rgba(#000, 0);
7
+
8
+// 消息提示
9
+$theme-message-info-background-color: #FFFFFF;
10
+$theme-message-info-text-color: #202D3D;
11
+$theme-message-info-border-color: #202D3D;
12
+
13
+// container组件
14
+$theme-container-background-color: rgba(#FFF, 1);
15
+$theme-container-header-footer-background-color: #FFF;
16
+$theme-container-border-inner: 1px solid #CFD7E5;
17
+$theme-container-border-outer: 1px solid #011527;
18
+
19
+$theme-multiple-page-control-color: #BFCBD9;
20
+$theme-multiple-page-control-color-active: #46A0FC;
21
+$theme-multiple-page-control-nav-prev-color: #BFCBD9;
22
+$theme-multiple-page-control-nav-next-color: #BFCBD9;
23
+$theme-multiple-page-control-border-color: #011527;
24
+$theme-multiple-page-control-border-color-active: #FFFFFF;
25
+$theme-multiple-page-control-background-color: #212D3D;
26
+$theme-multiple-page-control-background-color-active: #FFFFFF;
27
+
28
+// 顶栏和侧边栏中展开的菜单 hover 状态下
29
+$theme-menu-item-color-hover: #BFCBD9;
30
+$theme-menu-item-background-color-hover: #011527;
31
+
32
+// 顶栏上的文字颜色
33
+$theme-header-item-color: #BFCBD9;
34
+$theme-header-item-background-color: transparent;
35
+// 顶栏上的项目在 hover 时
36
+$theme-header-item-color-hover: #BFCBD9;
37
+$theme-header-item-background-color-hover: #011527;
38
+// 顶栏上的项目在 focus 时
39
+$theme-header-item-color-focus: #BFCBD9;
40
+$theme-header-item-background-color-focus: #202D3D;
41
+// 顶栏上的项目在 active 时
42
+$theme-header-item-color-active: #46A0FC;
43
+$theme-header-item-background-color-active: #202D3D;
44
+
45
+// 侧边栏上的文字颜色
46
+$theme-aside-item-color: #BFCBD9;
47
+$theme-aside-item-background-color: transparent;
48
+// 侧边栏上的项目在 hover 时
49
+$theme-aside-item-color-hover: #BFCBD9;
50
+$theme-aside-item-background-color-hover: #011527;
51
+// 侧边栏上的项目在 focus 时
52
+$theme-aside-item-color-focus: #BFCBD9;
53
+$theme-aside-item-background-color-focus: #202D3D;
54
+// 侧边栏上的项目在 active 时
55
+$theme-aside-item-color-active: #46A0FC;
56
+$theme-aside-item-background-color-active: #202D3D;
57
+
58
+// 侧边栏菜单为空的时候显示的元素
59
+$theme-aside-menu-empty-icon-color: #BFCBD9;
60
+$theme-aside-menu-empty-text-color: #BFCBD9;
61
+$theme-aside-menu-empty-background-color: #202D3D;
62
+$theme-aside-menu-empty-icon-color-hover: #46A0FC;
63
+$theme-aside-menu-empty-text-color-hover: #46A0FC;
64
+$theme-aside-menu-empty-background-color-hover: #202D3D;

+ 2 - 0
src/assets/style/theme/line/index.scss

@@ -0,0 +1,2 @@
1
+@import './setting.scss';
2
+@import '../theme.scss';

+ 64 - 0
src/assets/style/theme/line/setting.scss

@@ -0,0 +1,64 @@
1
+// 主题名称
2
+$theme-name: 'line';
3
+// 主题背景颜色
4
+$theme-bg-color: #f8f8f9;
5
+// 主题背景图片遮罩
6
+$theme-bg-mask: rgba(#000, 0);
7
+
8
+// 消息提示
9
+$theme-message-info-background-color: $color-bg;
10
+$theme-message-info-text-color: $color-text-normal;
11
+$theme-message-info-border-color: $color-border-1;
12
+
13
+// container组件
14
+$theme-container-background-color: rgba(#FFF, .8);
15
+$theme-container-header-footer-background-color: #FFF;
16
+$theme-container-border-inner: 1px solid $color-border-2;
17
+$theme-container-border-outer: 1px solid #cfd7e5;
18
+
19
+$theme-multiple-page-control-color: #FFF;
20
+$theme-multiple-page-control-color-active: $color-text-normal;
21
+$theme-multiple-page-control-nav-prev-color: #cfd7e5;
22
+$theme-multiple-page-control-nav-next-color: #cfd7e5;
23
+$theme-multiple-page-control-border-color: #cfd7e5;
24
+$theme-multiple-page-control-border-color-active: #FFF;
25
+$theme-multiple-page-control-background-color: #cfd7e5;
26
+$theme-multiple-page-control-background-color-active: #FFF;
27
+
28
+// 顶栏和侧边栏中展开的菜单 hover 状态下
29
+$theme-menu-item-color-hover: #293849;
30
+$theme-menu-item-background-color-hover: #EFEFEF;
31
+
32
+// 顶栏上的文字颜色
33
+$theme-header-item-color: $color-text-normal;
34
+$theme-header-item-background-color: transparent;
35
+// 顶栏上的项目在 hover 时
36
+$theme-header-item-color-hover: $color-text-main;
37
+$theme-header-item-background-color-hover: rgba(#000, .02);
38
+// 顶栏上的项目在 focus 时
39
+$theme-header-item-color-focus: $color-text-main;
40
+$theme-header-item-background-color-focus: rgba(#000, .02);
41
+// 顶栏上的项目在 active 时
42
+$theme-header-item-color-active: $color-text-main;
43
+$theme-header-item-background-color-active: rgba(#000, .03);
44
+
45
+// 侧边栏上的文字颜色
46
+$theme-aside-item-color: $color-text-normal;
47
+$theme-aside-item-background-color: transparent;
48
+// 侧边栏上的项目在 hover 时
49
+$theme-aside-item-color-hover: $color-text-main;
50
+$theme-aside-item-background-color-hover: rgba(#000, .02);
51
+// 侧边栏上的项目在 focus 时
52
+$theme-aside-item-color-focus: $color-text-main;
53
+$theme-aside-item-background-color-focus: rgba(#000, .02);
54
+// 侧边栏上的项目在 active 时
55
+$theme-aside-item-color-active: $color-text-main;
56
+$theme-aside-item-background-color-active: rgba(#000, .03);
57
+
58
+// 侧边栏菜单为空的时候显示的元素
59
+$theme-aside-menu-empty-icon-color: $color-text-normal;
60
+$theme-aside-menu-empty-text-color: $color-text-normal;
61
+$theme-aside-menu-empty-background-color: rgba(#000, .03);
62
+$theme-aside-menu-empty-icon-color-hover: $color-text-main;
63
+$theme-aside-menu-empty-text-color-hover: $color-text-main;
64
+$theme-aside-menu-empty-background-color-hover: rgba(#000, .05);

+ 9 - 0
src/assets/style/theme/register.scss

@@ -0,0 +1,9 @@
1
+@import '~@/assets/style/theme/theme-base.scss';
2
+
3
+@import '~@/assets/style/theme/d2/index.scss';
4
+@import '~@/assets/style/theme/chester/index.scss';
5
+@import '~@/assets/style/theme/element/index.scss';
6
+@import '~@/assets/style/theme/line/index.scss';
7
+@import '~@/assets/style/theme/star/index.scss';
8
+@import '~@/assets/style/theme/tomorrow-night-blue/index.scss';
9
+@import '~@/assets/style/theme/violet/index.scss';

+ 2 - 0
src/assets/style/theme/star/index.scss

@@ -0,0 +1,2 @@
1
+@import './setting.scss';
2
+@import '../theme.scss';

+ 64 - 0
src/assets/style/theme/star/setting.scss

@@ -0,0 +1,64 @@
1
+// 主题名称
2
+$theme-name: 'star';
3
+// 主题背景颜色
4
+$theme-bg-color: #EFF4F8;
5
+// 主题背景图片遮罩
6
+$theme-bg-mask: rgba(#000, .3);
7
+
8
+// 消息提示
9
+$theme-message-info-background-color: $color-bg;
10
+$theme-message-info-text-color: $color-text-normal;
11
+$theme-message-info-border-color: $color-border-1;
12
+
13
+// container组件
14
+$theme-container-background-color: rgba(#FFF, .9);
15
+$theme-container-header-footer-background-color: #FFF;
16
+$theme-container-border-inner: 1px solid $color-border-1;
17
+$theme-container-border-outer: 1px solid #114450;
18
+
19
+$theme-multiple-page-control-color: #FFF;
20
+$theme-multiple-page-control-color-active: $color-text-normal;
21
+$theme-multiple-page-control-nav-prev-color: #FFF;
22
+$theme-multiple-page-control-nav-next-color: #FFF;
23
+$theme-multiple-page-control-border-color: #114450;
24
+$theme-multiple-page-control-border-color-active: #FFF;
25
+$theme-multiple-page-control-background-color: rgba(#FFF, .5);
26
+$theme-multiple-page-control-background-color-active: #FFF;
27
+
28
+// 顶栏和侧边栏中展开的菜单 hover 状态下
29
+$theme-menu-item-color-hover: #293849;
30
+$theme-menu-item-background-color-hover: #ecf5ff;
31
+
32
+// 顶栏上的文字颜色
33
+$theme-header-item-color: #FFF;
34
+$theme-header-item-background-color: transparent;
35
+// 顶栏上的项目在 hover 时
36
+$theme-header-item-color-hover: #FFF;
37
+$theme-header-item-background-color-hover: rgba(#000, .2);
38
+// 顶栏上的项目在 focus 时
39
+$theme-header-item-color-focus: #FFF;
40
+$theme-header-item-background-color-focus: rgba(#000, .2);
41
+// 顶栏上的项目在 active 时
42
+$theme-header-item-color-active: #FFF;
43
+$theme-header-item-background-color-active: rgba(#000, .3);
44
+
45
+// 侧边栏上的文字颜色
46
+$theme-aside-item-color: #FFF;
47
+$theme-aside-item-background-color: transparent;
48
+// 侧边栏上的项目在 hover 时
49
+$theme-aside-item-color-hover: #FFF;
50
+$theme-aside-item-background-color-hover: rgba(#000, .2);
51
+// 侧边栏上的项目在 focus 时
52
+$theme-aside-item-color-focus: #FFF;
53
+$theme-aside-item-background-color-focus: rgba(#000, .2);
54
+// 侧边栏上的项目在 active 时
55
+$theme-aside-item-color-active: #FFF;
56
+$theme-aside-item-background-color-active: rgba(#000, .3);
57
+
58
+// 侧边栏菜单为空的时候显示的元素
59
+$theme-aside-menu-empty-icon-color: #FFF;
60
+$theme-aside-menu-empty-text-color: #FFF;
61
+$theme-aside-menu-empty-background-color: rgba(#FFF, .2);
62
+$theme-aside-menu-empty-icon-color-hover: #FFF;
63
+$theme-aside-menu-empty-text-color-hover: #FFF;
64
+$theme-aside-menu-empty-background-color-hover: rgba(#FFF, .3);

+ 464 - 0
src/assets/style/theme/theme-base.scss

@@ -0,0 +1,464 @@
1
+// 减小弹出菜单的项目高度
2
+.el-menu--popup {
3
+  .el-menu-item {
4
+    height: 36px;
5
+    line-height: 36px;
6
+  }
7
+  .el-submenu__title {
8
+    height: 36px;
9
+    line-height: 36px;
10
+  }
11
+}
12
+
13
+// 整体框架结构
14
+.d2-layout-header-aside-group {
15
+  height: 100%;
16
+  width: 100%;
17
+  min-width: 900px;
18
+  background-size: cover;
19
+  background-position: center;
20
+  overflow: hidden;
21
+  position: relative;
22
+  // 背景上面的半透明遮罩
23
+  .d2-layout-header-aside-mask {
24
+    @extend %full;
25
+  }
26
+  // 内容层
27
+  .d2-layout-header-aside-content {
28
+    @extend %full;
29
+    .d2-theme-header {
30
+      height: 60px;
31
+      .d2-theme-header-menu {
32
+        overflow: hidden;
33
+        margin-left:20px;
34
+        &.is-scrollable {
35
+          position: relative;
36
+          padding: 0 20px;
37
+          .d2-theme-header-menu__prev, .d2-theme-header-menu__next {
38
+            display: -webkit-box;
39
+            display: -ms-flexbox;
40
+            display: flex;
41
+          }
42
+        }
43
+        .d2-theme-header-menu__content {
44
+          overflow: hidden;
45
+          .d2-theme-header-menu__scroll {
46
+            white-space: nowrap;
47
+            position: relative;
48
+            -webkit-transition: -webkit-transform .3s;
49
+            transition: -webkit-transform .3s;
50
+            transition: transform .3s;
51
+            transition: transform .3s, -webkit-transform .3s;
52
+            transition: transform .3s,-webkit-transform .3s;
53
+            float: left;
54
+          }
55
+        }
56
+        .d2-theme-header-menu__prev, .d2-theme-header-menu__next {
57
+          height: 60px;
58
+          position: absolute;
59
+          top: 0;
60
+          font-size: 20px;
61
+          cursor: pointer;
62
+          display: none;
63
+        }
64
+        .d2-theme-header-menu__prev {
65
+          left: 0;
66
+          border-top-left-radius: 2px;
67
+          border-bottom-left-radius: 2px;
68
+        }
69
+        .d2-theme-header-menu__next {
70
+          right: 0;
71
+          border-top-right-radius: 2px;
72
+          border-bottom-right-radius: 2px;
73
+        }
74
+      }
75
+    }
76
+    .d2-theme-container {
77
+      .d2-theme-container-aside {
78
+        position: relative;
79
+        .d2-layout-header-aside-menu-side {
80
+          @extend %full;
81
+          overflow: hidden;
82
+        }
83
+      }
84
+      .d2-theme-container-transition {
85
+        transition: width .3s;
86
+      }
87
+      .d2-theme-container-main {
88
+        padding: 0px;
89
+        position: relative;
90
+        overflow: hidden;
91
+        .d2-theme-container-main-layer {
92
+          position: absolute;
93
+          top: 0px;
94
+          bottom: 0px;
95
+          left: 0px;
96
+          right: 0px;
97
+        }
98
+        .d2-theme-container-main-body {
99
+          position: relative;
100
+        }
101
+      }
102
+    }
103
+  }
104
+}
105
+
106
+// 主题公用
107
+.d2-layout-header-aside-group {
108
+  &.grayMode {
109
+    -webkit-filter: grayscale(100%);
110
+    -moz-filter: grayscale(100%);
111
+    -ms-filter: grayscale(100%);
112
+    -o-filter: grayscale(100%);
113
+    filter: grayscale(100%);
114
+    filter: gray;
115
+  }
116
+  // 主体
117
+  .d2-layout-header-aside-content {
118
+    // [布局] 顶栏
119
+    .d2-theme-header {
120
+      // logo区域
121
+      .logo-group {
122
+        float: left;
123
+        text-align: center;
124
+        img {
125
+          height: 60px;
126
+        }
127
+      }
128
+      .logo-transition {
129
+        transition: width .3s;
130
+      }
131
+      // 折叠侧边栏切换按钮
132
+      .toggle-aside-btn {
133
+        float: left;
134
+        height: 60px;
135
+        width: 60px;
136
+        display: flex;
137
+        justify-content: center;
138
+        align-items: center;
139
+        @extend %unable-select;
140
+        i {
141
+          font-size: 20px;
142
+          margin-top: 4px;
143
+        }
144
+      }
145
+      // [菜单] 顶栏
146
+      .el-menu {
147
+        float: left;
148
+        border-bottom: none;
149
+        background-color: transparent;
150
+        %header-menu-item {
151
+          @extend %unable-select;
152
+          i.fa {
153
+            font-size: 16px;
154
+            margin-right: 4px;
155
+          }
156
+        }
157
+        .el-menu-item {
158
+          @extend %header-menu-item;
159
+          border-bottom: none;
160
+        }
161
+        .el-submenu {
162
+          @extend %header-menu-item;
163
+          .el-submenu__title {
164
+            border-bottom: none;
165
+          }
166
+        }
167
+      }
168
+      // 顶栏右侧的按钮
169
+      .d2-header-right {
170
+        float: right;
171
+        height: 60px;
172
+        display: flex;
173
+        align-items: center;
174
+        .btn-text {
175
+          padding: 14px 12px;
176
+          border-radius: 4px;
177
+          margin: 0px !important;
178
+          &.el-color-picker.el-color-picker--mini {
179
+            padding: 9px 6px;
180
+          }
181
+        }
182
+        .el-dropdown {
183
+          @extend %unable-select;
184
+        }
185
+      }
186
+    }
187
+    // [布局] 顶栏下面
188
+    .d2-theme-container {
189
+      // 侧边栏
190
+      .d2-theme-container-aside {
191
+        %d2-theme-container-aside-menu-icon {
192
+          width: 20px;
193
+          text-align: center;
194
+          font-size: 16px;
195
+        }
196
+        // [菜单] 正常状态
197
+        .el-menu {
198
+          @extend %unable-select;
199
+          background-color: transparent;
200
+          border-right: none;
201
+          .el-menu-item {
202
+            i {
203
+              @extend %d2-theme-container-aside-menu-icon;
204
+            }
205
+          }
206
+        }
207
+        .el-submenu {
208
+          @extend %unable-select;
209
+          .el-submenu__title {
210
+            i {
211
+              @extend %d2-theme-container-aside-menu-icon;
212
+            }
213
+            .el-submenu__icon-arrow {
214
+              margin-top: -10px;
215
+            }
216
+          }
217
+        }
218
+        // 菜单为空的时候显示的信息
219
+        .d2-layout-header-aside-menu-empty {
220
+          height: 160px;
221
+          margin: 10px;
222
+          margin-top: 0px;
223
+          border-radius: 4px;
224
+          @extend %unable-select;
225
+          i {
226
+            font-size: 30px;
227
+            margin-bottom: 10px;
228
+          }
229
+          span {
230
+            font-size: 14px;
231
+          }
232
+        }
233
+        // [菜单] 折叠状态
234
+        .el-menu--collapse {
235
+          background-color: transparent;
236
+          .el-submenu__title {
237
+            text-align: center;
238
+          }
239
+        }
240
+      }
241
+      // 右下 主体
242
+      .d2-theme-container-main {
243
+        // 主体部分分为多页面控制器 和主体
244
+        .d2-theme-container-main-header {
245
+          height: 41px;
246
+          // 多页面控制器
247
+          .d2-multiple-page-control-group {
248
+            padding-right: 20px;
249
+            .d2-multiple-page-control-content {
250
+              overflow: auto;
251
+              position: relative;
252
+              .d2-multiple-page-control-content-inner {
253
+                .d2-multiple-page-control {
254
+                  .el-tabs__header.is-top {
255
+                    margin: 0px;
256
+                  }
257
+                  .el-tabs__nav {
258
+                    overflow: hidden;
259
+                  }
260
+                }
261
+              }
262
+            }
263
+            .d2-multiple-page-control-btn {
264
+              position: relative;
265
+              bottom: -1px;
266
+              .el-dropdown {
267
+                .el-button-group {
268
+                  .el-button:first-child {
269
+                    border-bottom-left-radius: 0px;
270
+                  }
271
+                  .el-button:last-child {
272
+                    border-bottom-right-radius: 0px;
273
+                  }
274
+                }
275
+              }
276
+            }
277
+          }
278
+        }
279
+        // 主体
280
+        .d2-theme-container-main-body {
281
+          // 布局组件
282
+          .container-component {
283
+            @extend %full;
284
+            overflow: hidden;
285
+            // 填充式布局组件
286
+            .d2-container-full {
287
+              position: absolute;
288
+              top: 0px;
289
+              // right: 20px;
290
+              right: 0px;
291
+              bottom: 0px;
292
+              left: 0px;
293
+              display: flex;
294
+              flex-direction: column;
295
+              overflow: hidden;
296
+             
297
+              .d2-container-full__header {
298
+                // padding: 20px;
299
+                padding: 10px;
300
+                background: #004a93;
301
+                color:#fff;
302
+              }
303
+              .d2-container-full__body {
304
+                flex-grow: 1;
305
+                height: 100%;
306
+                padding: 20px 20px;
307
+             
308
+                overflow: auto;
309
+                // overflow-x: hidden;
310
+                position: relative;
311
+                background-color: #09163a;
312
+               
313
+              }
314
+              .d2-container-full__footer {
315
+                padding: 20px;
316
+              }
317
+            }
318
+            // 填充式布局组件 - 滚动优化
319
+            .d2-container-full-bs {
320
+              position: absolute;
321
+              top: 0px;
322
+              right: 20px;
323
+              bottom: 0px;
324
+              left: 0px;
325
+              display: flex;
326
+              flex-direction: column;
327
+              overflow: hidden;
328
+              .d2-container-full-bs__header {
329
+                padding: 20px;
330
+              }
331
+              .d2-container-full-bs__body {
332
+                flex-grow: 1;
333
+                overflow: hidden;
334
+                position: relative;
335
+                .d2-container-full-bs__body-wrapper-inner {
336
+                  padding: 20px;
337
+                  position: relative;
338
+                }
339
+              }
340
+              .d2-container-full-bs__footer {
341
+                padding: 20px;
342
+              }
343
+            }
344
+            // 隐形布局组件
345
+            .d2-container-ghost {
346
+              position: absolute;
347
+              top: 0px;
348
+              right: 20px;
349
+              bottom: 0px;
350
+              left: 0px;
351
+              display: flex;
352
+              flex-direction: column;
353
+              overflow: hidden;
354
+              .d2-container-ghost__header {
355
+                padding: 20px;
356
+                border-bottom-left-radius: 4px;
357
+                border-bottom-right-radius: 4px;
358
+              }
359
+              .d2-container-ghost__body {
360
+                flex-grow: 1;
361
+                overflow: auto;
362
+                position: relative;
363
+              }
364
+              .d2-container-ghost__footer {
365
+                padding: 20px;
366
+                border-top-left-radius: 4px;
367
+                border-top-right-radius: 4px;
368
+              }
369
+            }
370
+            // 隐形布局组件 - 滚动优化
371
+            .d2-container-ghost-bs {
372
+              position: absolute;
373
+              top: 0px;
374
+              right: 20px;
375
+              bottom: 0px;
376
+              left: 0px;
377
+              display: flex;
378
+              flex-direction: column;
379
+              overflow: hidden;
380
+              .d2-container-ghost-bs__header {
381
+                padding: 20px;
382
+                border-bottom-left-radius: 4px;
383
+                border-bottom-right-radius: 4px;
384
+              }
385
+              .d2-container-ghost-bs__body {
386
+                flex-grow: 1;
387
+                overflow: hidden;
388
+                position: relative;
389
+              }
390
+              .d2-container-ghost-bs__footer {
391
+                padding: 20px;
392
+                border-top-left-radius: 4px;
393
+                border-top-right-radius: 4px;
394
+              }
395
+            }
396
+            // 卡片式布局组件
397
+            .d2-container-card {
398
+              position: absolute;
399
+              top: 0px;
400
+              right: 20px;
401
+              bottom: 0px;
402
+              left: 0px;
403
+              display: flex;
404
+              flex-direction: column;
405
+              overflow: hidden;
406
+              .d2-container-card__header {
407
+                padding: 20px;
408
+              }
409
+              .d2-container-card__body {
410
+                flex-grow: 1;
411
+                overflow: auto;
412
+                .d2-container-card__body-card {
413
+                  position: relative;
414
+                  margin-bottom: 20px;
415
+                  padding: 20px;
416
+                  border-bottom-left-radius: 4px;
417
+                  border-bottom-right-radius: 4px;
418
+                }
419
+              }
420
+              .d2-container-card__footer {
421
+                padding: 20px;
422
+                border-top-left-radius: 4px;
423
+                border-top-right-radius: 4px;
424
+              }
425
+            }
426
+            // 卡片式布局组件 - 滚动优化
427
+            .d2-container-card-bs {
428
+              position: absolute;
429
+              top: 0px;
430
+              right: 20px;
431
+              bottom: 0px;
432
+              left: 0px;
433
+              display: flex;
434
+              flex-direction: column;
435
+              overflow: hidden;
436
+              .d2-container-card-bs__header {
437
+                padding: 20px;
438
+              }
439
+              .d2-container-card-bs__body {
440
+                position: relative;
441
+                flex-grow: 1;
442
+                overflow: hidden;
443
+                .d2-container-card-bs__body-wrapper-inner {
444
+                  padding-bottom: 20px;
445
+                }
446
+                .d2-container-card-bs__body-card {
447
+                  position: relative;
448
+                  padding: 20px;
449
+                  border-bottom-left-radius: 4px;
450
+                  border-bottom-right-radius: 4px;
451
+                }
452
+              }
453
+              .d2-container-card-bs__footer {
454
+                padding: 20px;
455
+                border-top-left-radius: 4px;
456
+                border-top-right-radius: 4px;
457
+              }
458
+            }
459
+          }
460
+        }
461
+      }
462
+    }
463
+  }
464
+}

+ 426 - 0
src/assets/style/theme/theme.scss

@@ -0,0 +1,426 @@
1
+// 每个主题特有的设置
2
+.theme-#{$theme-name} {
3
+
4
+  .el-message {
5
+    &.el-message--info {
6
+      background-color: $theme-message-info-background-color;
7
+      color: $theme-message-info-text-color;
8
+      border-color: $theme-message-info-border-color;
9
+    }
10
+  }
11
+
12
+  .el-card {
13
+    &.d2-card {
14
+      border: $theme-container-border-outer;
15
+      .el-card__header {
16
+        border-bottom: $theme-container-border-outer;
17
+      }
18
+    }
19
+  }
20
+
21
+  // 背景图片和遮罩
22
+  .d2-layout-header-aside-group {
23
+    // background-color: $theme-bg-color;
24
+    
25
+    .d2-layout-header-aside-mask {
26
+      background: $theme-bg-mask;
27
+    }
28
+  }
29
+
30
+  // 菜单项目
31
+  @mixin theme-menu-hover-style {
32
+    color: $theme-menu-item-color-hover;
33
+    i.fa {
34
+      color: $theme-menu-item-color-hover;
35
+    }
36
+    background: $theme-menu-item-background-color-hover;
37
+  }
38
+  %el-menu-icon {
39
+    i {
40
+      display: inline-block;
41
+      width: 14px;
42
+      text-align: center;
43
+      margin-right: 5px;
44
+    }
45
+    svg {
46
+      margin: 0px;
47
+      height: 14px;
48
+      width: 14px;
49
+      margin-right: 5px;
50
+    }
51
+  }
52
+  .el-submenu__title {
53
+    @extend %unable-select;
54
+    @extend %el-menu-icon;
55
+  }
56
+  .el-menu-item {
57
+    @extend %unable-select;
58
+    @extend %el-menu-icon;
59
+  }
60
+  .el-submenu__title:hover {
61
+    @include theme-menu-hover-style;
62
+  }
63
+  .el-menu-item:hover {
64
+    @include theme-menu-hover-style;
65
+  }
66
+  .el-menu--horizontal .el-menu-item:not(.is-disabled):hover {
67
+    @include theme-menu-hover-style;
68
+  }
69
+  .el-menu--horizontal .el-menu .el-submenu__title:hover {
70
+    @include theme-menu-hover-style;
71
+  }
72
+  
73
+  // 顶栏
74
+  .d2-theme-header {
75
+    // 顶栏菜单空间不足时显示的滚动控件
76
+    .d2-theme-header-menu {
77
+      .d2-theme-header-menu__prev, .d2-theme-header-menu__next {
78
+        color: $theme-header-item-color;
79
+        background: $theme-header-item-background-color;
80
+        &:hover {
81
+          color: $theme-header-item-color-hover;
82
+          background: $theme-header-item-background-color-hover;
83
+        }
84
+      }
85
+    }
86
+    // 切换按钮
87
+    .toggle-aside-btn {
88
+      i {
89
+        color: $theme-header-item-color;
90
+        background: $theme-header-item-background-color;
91
+        &:hover {
92
+          color: $theme-header-item-color-hover;
93
+        }
94
+      }
95
+    }
96
+    // 顶栏菜单
97
+    .el-menu {
98
+      .el-menu-item {
99
+        transition: border-top-color 0s;
100
+        color: $theme-header-item-color;
101
+        background: $theme-header-item-background-color;
102
+        i.fa { color: inherit; }
103
+        &:hover {
104
+          color: $theme-header-item-color-hover;
105
+          background: $theme-header-item-background-color-hover;
106
+          i.fa { color: inherit; }
107
+        }
108
+        &:focus {
109
+          color: $theme-header-item-color-focus;
110
+          background: $theme-header-item-background-color-focus;
111
+          i.fa { color: inherit; }
112
+        }
113
+        &.is-active {
114
+          color: $theme-header-item-color-active;
115
+          background: $theme-header-item-background-color-active;
116
+          i.fa { color: inherit; }
117
+        }
118
+      }
119
+      .el-submenu {
120
+        &.is-active {
121
+          .el-submenu__title {
122
+            color: $theme-header-item-color-active;
123
+            background: $theme-header-item-background-color-active;
124
+            i.fa { color: inherit; }
125
+          }
126
+        }
127
+        .el-submenu__title {
128
+          transition: border-top-color 0s;
129
+          color: $theme-header-item-color;
130
+          background: $theme-header-item-background-color;
131
+          i.fa { color: inherit; }
132
+          .el-submenu__icon-arrow {
133
+            color: $theme-header-item-color;
134
+          }
135
+          &:hover {
136
+            color: $theme-header-item-color-hover;
137
+            background: $theme-header-item-background-color-hover;
138
+            i.fa { color: inherit; }
139
+            .el-submenu__icon-arrow {
140
+              color: $theme-header-item-color-hover;
141
+            }
142
+          }
143
+          &:focus {
144
+            color: $theme-header-item-color-focus;
145
+            background: $theme-header-item-background-color-focus;
146
+            i.fa { color: inherit; }
147
+            .el-submenu__icon-arrow {
148
+              color: $theme-header-item-color-focus;
149
+            }
150
+          }
151
+        }
152
+      }
153
+    }
154
+    // 顶栏右侧
155
+    .d2-header-right {
156
+      .btn-text {
157
+        color: $theme-header-item-color;
158
+        &.can-hover {
159
+          &:hover {
160
+            color: $theme-header-item-color-hover;
161
+            background: $theme-header-item-background-color-hover;
162
+          }
163
+        }
164
+      }
165
+    }
166
+  }
167
+  // [布局] 顶栏下面
168
+  .d2-theme-container {
169
+    // overflow:auto ;
170
+    // 侧边栏
171
+    .d2-theme-container-aside {
172
+      // 菜单为空的时候显示的信息
173
+      .d2-layout-header-aside-menu-empty {
174
+        background: $theme-aside-menu-empty-background-color;
175
+        i {
176
+          color: $theme-aside-menu-empty-icon-color;
177
+        }
178
+        span {
179
+          color: $theme-aside-menu-empty-text-color;
180
+        }
181
+        &:hover {
182
+          background: $theme-aside-menu-empty-background-color-hover;
183
+          i {
184
+            color: $theme-aside-menu-empty-icon-color-hover;
185
+          }
186
+          span {
187
+            color: $theme-aside-menu-empty-text-color-hover;
188
+          }
189
+        }
190
+      }
191
+      // [菜单] 正常状态
192
+      .el-menu {
193
+        .el-menu-item {
194
+          color: $theme-aside-item-color;
195
+          background: $theme-aside-item-background-color;
196
+          i {
197
+            color: $theme-aside-item-color;
198
+          }
199
+          &:hover {
200
+            color: $theme-aside-item-color-hover;
201
+            fill: $theme-aside-item-color-hover;
202
+            background: $theme-aside-item-background-color-hover;
203
+            i {
204
+              color: $theme-aside-item-color-hover;
205
+            }
206
+          }
207
+          &:focus {
208
+            color: $theme-aside-item-color-focus;
209
+            fill: $theme-aside-item-color-focus;
210
+            background: $theme-aside-item-background-color-focus;
211
+            i {
212
+              color: $theme-aside-item-color-focus;
213
+            }
214
+          }
215
+          &.is-active {
216
+            color: $theme-aside-item-color-active;
217
+            fill: $theme-aside-item-color-active;
218
+            background: $theme-aside-item-background-color-active;
219
+            i {
220
+              color: $theme-aside-item-color-active;
221
+            }
222
+          }
223
+        }
224
+      }
225
+      .el-submenu {
226
+        .el-submenu__title {
227
+          color: $theme-aside-item-color;
228
+          background: $theme-aside-item-background-color;
229
+          i {
230
+            color: $theme-aside-item-color;
231
+          }
232
+          .el-submenu__icon-arrow {
233
+            color: $theme-aside-item-color;
234
+          }
235
+          &:hover {
236
+            color: $theme-aside-item-color-hover;
237
+            background: $theme-aside-item-background-color-hover;
238
+            i {
239
+              color: $theme-aside-item-color-hover;
240
+            }
241
+            .el-submenu__icon-arrow {
242
+              color: $theme-aside-item-color-hover;
243
+            }
244
+          }
245
+        }
246
+      }
247
+    }
248
+    .d2-theme-container-main {
249
+      // 主体部分分为多页面控制器 和主体
250
+      .d2-theme-container-main-header {
251
+        // 多页面控制器
252
+        .d2-multiple-page-control {
253
+          .el-tabs__header.is-top {
254
+            border-bottom-color: $theme-multiple-page-control-border-color;
255
+          }
256
+          .el-tabs__nav {
257
+            border-color: $theme-multiple-page-control-border-color;
258
+            .el-tabs__item {
259
+              @extend %unable-select;
260
+              color: $theme-multiple-page-control-color;
261
+              background-color: $theme-multiple-page-control-background-color;
262
+              border-left-color: $theme-multiple-page-control-border-color;
263
+              &:first-child {
264
+                border-left: none;
265
+                &:hover {
266
+                  padding: 0px 20px;
267
+                }
268
+              }
269
+            }
270
+            .el-tabs__item.is-active {
271
+              color: $theme-multiple-page-control-color-active;
272
+              background-color: $theme-multiple-page-control-background-color-active;
273
+              border-bottom-color: $theme-multiple-page-control-border-color-active;
274
+            }
275
+          }
276
+          %el-tabs__nav {
277
+            font-size: 20px;
278
+          }
279
+          .el-tabs__nav-prev {
280
+            @extend %el-tabs__nav;
281
+            color: $theme-multiple-page-control-nav-prev-color;
282
+          }
283
+          .el-tabs__nav-next {
284
+            @extend %el-tabs__nav;
285
+            color: $theme-multiple-page-control-nav-next-color;
286
+          }
287
+        }
288
+        // 多页控制器的关闭控制
289
+        .d2-multiple-page-control-btn {
290
+          .el-dropdown {
291
+            .el-button-group {
292
+              .el-button {
293
+                border-color: $theme-multiple-page-control-border-color;
294
+              }
295
+            }
296
+          }
297
+        }
298
+      }
299
+      // 主体
300
+      .d2-theme-container-main-body {
301
+        // 布局组件
302
+        .container-component {
303
+          // [组件]
304
+          // d2-container-full 填充型
305
+          .d2-container-full {
306
+            // border: $theme-container-border-outer;
307
+            border:none;
308
+            border-top: none;
309
+            border-bottom: none;
310
+           
311
+            .d2-container-full__header {
312
+              // border-bottom: $theme-container-border-inner;
313
+              border-bottom: none;
314
+              background: $theme-container-header-footer-background-color;
315
+            }
316
+            .d2-container-full__body {
317
+              background: $theme-container-background-color;
318
+            }
319
+            .d2-container-full__footer {
320
+              border-top: $theme-container-border-inner;
321
+              background: $theme-container-header-footer-background-color;
322
+            }
323
+          }
324
+          // [组件]
325
+          // d2-container-full-bs 填充型 滚动优化
326
+          .d2-container-full-bs {
327
+            border: $theme-container-border-outer;
328
+            border-top: none;
329
+            border-bottom: none;
330
+            .d2-container-full-bs__header {
331
+              border-bottom: $theme-container-border-inner;
332
+              background: $theme-container-header-footer-background-color;
333
+            }
334
+            .d2-container-full-bs__body {
335
+              background: $theme-container-background-color;
336
+            }
337
+            .d2-container-full-bs__footer {
338
+              border-top: $theme-container-border-inner;
339
+              background: $theme-container-header-footer-background-color;
340
+            }
341
+          }
342
+          // [组件]
343
+          // d2-container-ghost 隐形布局组件
344
+          .d2-container-ghost {
345
+            .d2-container-ghost__header {
346
+              border-bottom: $theme-container-border-outer;
347
+              border-left: $theme-container-border-outer;
348
+              border-right: $theme-container-border-outer;
349
+              background: $theme-container-header-footer-background-color;
350
+            }
351
+            .d2-container-ghost__footer {
352
+              border-top: $theme-container-border-outer;
353
+              border-left: $theme-container-border-outer;
354
+              border-right: $theme-container-border-outer;
355
+              background: $theme-container-header-footer-background-color;
356
+            }
357
+          }
358
+          // [组件]
359
+          // d2-container-ghost-bs 隐形布局组件 滚动优化
360
+          .d2-container-ghost-bs {
361
+            .d2-container-ghost-bs__header {
362
+              border-bottom: $theme-container-border-outer;
363
+              border-left: $theme-container-border-outer;
364
+              border-right: $theme-container-border-outer;
365
+              background: $theme-container-header-footer-background-color;
366
+            }
367
+            .d2-container-ghost-bs__footer {
368
+              border-top: $theme-container-border-outer;
369
+              border-left: $theme-container-border-outer;
370
+              border-right: $theme-container-border-outer;
371
+              background: $theme-container-header-footer-background-color;
372
+            }
373
+          }
374
+          // [组件]
375
+          // d2-container-card 卡片型
376
+          .d2-container-card {
377
+            .d2-container-card__header {
378
+              border-bottom: $theme-container-border-inner;
379
+              border-left: $theme-container-border-outer;
380
+              border-right: $theme-container-border-outer;
381
+              background: $theme-container-header-footer-background-color;
382
+            }
383
+            .d2-container-card__body {
384
+              .d2-container-card__body-card {
385
+                background: $theme-container-background-color;
386
+                border-left: $theme-container-border-outer;
387
+                border-right: $theme-container-border-outer;
388
+                border-bottom: $theme-container-border-outer;
389
+              }
390
+            }
391
+            .d2-container-card__footer {
392
+              border-top: $theme-container-border-outer;
393
+              border-left: $theme-container-border-outer;
394
+              border-right: $theme-container-border-outer;
395
+              background: $theme-container-header-footer-background-color;
396
+            }
397
+          }
398
+          // [组件]
399
+          // d2-container-card-bs 卡片型 滚动优化
400
+          .d2-container-card-bs {
401
+            .d2-container-card-bs__header {
402
+              border-bottom: $theme-container-border-inner;
403
+              border-left: $theme-container-border-outer;
404
+              border-right: $theme-container-border-outer;
405
+              background: $theme-container-header-footer-background-color;
406
+            }
407
+            .d2-container-card-bs__body {
408
+              .d2-container-card-bs__body-card {
409
+                background: $theme-container-background-color;
410
+                border-left: $theme-container-border-outer;
411
+                border-right: $theme-container-border-outer;
412
+                border-bottom: $theme-container-border-outer;
413
+              }
414
+            }
415
+            .d2-container-card-bs__footer {
416
+              border-top: $theme-container-border-outer;
417
+              border-left: $theme-container-border-outer;
418
+              border-right: $theme-container-border-outer;
419
+              background: $theme-container-header-footer-background-color;
420
+            }
421
+          }
422
+        }
423
+      }
424
+    }
425
+  }
426
+}

+ 2 - 0
src/assets/style/theme/tomorrow-night-blue/index.scss

@@ -0,0 +1,2 @@
1
+@import './setting.scss';
2
+@import '../theme.scss';

+ 64 - 0
src/assets/style/theme/tomorrow-night-blue/setting.scss

@@ -0,0 +1,64 @@
1
+// 主题名称
2
+$theme-name: 'tomorrow-night-blue';
3
+// 主题背景颜色
4
+$theme-bg-color: #002253;
5
+// 主题背景图片遮罩
6
+$theme-bg-mask: rgba(#000, 0);
7
+
8
+// 消息提示
9
+$theme-message-info-background-color: $color-bg;
10
+$theme-message-info-text-color: $color-text-normal;
11
+$theme-message-info-border-color: $color-border-1;
12
+
13
+// container组件
14
+$theme-container-background-color: rgba(#FFF, 1);
15
+$theme-container-header-footer-background-color: #FFF;
16
+$theme-container-border-inner: 1px solid $color-border-1;
17
+$theme-container-border-outer: 1px solid #002253;
18
+
19
+$theme-multiple-page-control-color: #FFF;
20
+$theme-multiple-page-control-color-active: $color-text-normal;
21
+$theme-multiple-page-control-nav-prev-color: #FFF;
22
+$theme-multiple-page-control-nav-next-color: #FFF;
23
+$theme-multiple-page-control-border-color: #002253;
24
+$theme-multiple-page-control-border-color-active: #FFF;
25
+$theme-multiple-page-control-background-color: rgba(#FFF, .2);
26
+$theme-multiple-page-control-background-color-active: #FFF;
27
+
28
+// 顶栏和侧边栏中展开的菜单 hover 状态下
29
+$theme-menu-item-color-hover: #293849;
30
+$theme-menu-item-background-color-hover: #ecf5ff;
31
+
32
+// 顶栏上的文字颜色
33
+$theme-header-item-color: #FF929A;
34
+$theme-header-item-background-color: transparent;
35
+// 顶栏上的项目在 hover 时
36
+$theme-header-item-color-hover: #FFEBA4;
37
+$theme-header-item-background-color-hover: rgba(#FFF, .05);
38
+// 顶栏上的项目在 focus 时
39
+$theme-header-item-color-focus: #FFB870;
40
+$theme-header-item-background-color-focus: rgba(#FFF, .05);
41
+// 顶栏上的项目在 active 时
42
+$theme-header-item-color-active: #FFB870;
43
+$theme-header-item-background-color-active: rgba(#FFF, .05);
44
+
45
+// 侧边栏上的文字颜色
46
+$theme-aside-item-color: #FF929A;
47
+$theme-aside-item-background-color: transparent;
48
+// 侧边栏上的项目在 hover 时
49
+$theme-aside-item-color-hover: #FFEBA4;
50
+$theme-aside-item-background-color-hover: rgba(#FFF, .05);
51
+// 侧边栏上的项目在 focus 时
52
+$theme-aside-item-color-focus: #FFB870;
53
+$theme-aside-item-background-color-focus: rgba(#FFF, .05);
54
+// 侧边栏上的项目在 active 时
55
+$theme-aside-item-color-active: #FFB870;
56
+$theme-aside-item-background-color-active: rgba(#FFF, .05);
57
+
58
+// 侧边栏菜单为空的时候显示的元素
59
+$theme-aside-menu-empty-icon-color: #FFB870;
60
+$theme-aside-menu-empty-text-color: #FFB870;
61
+$theme-aside-menu-empty-background-color: rgba(#FFF, .1);
62
+$theme-aside-menu-empty-icon-color-hover: #FFEBA4;
63
+$theme-aside-menu-empty-text-color-hover: #FFEBA4;
64
+$theme-aside-menu-empty-background-color-hover: rgba(#FFF, .2);

+ 10 - 0
src/assets/style/theme/violet/index.scss

@@ -0,0 +1,10 @@
1
+@import './setting.scss';
2
+@import '../theme.scss';
3
+
4
+.theme-#{$theme-name} {
5
+  .d2-layout-header-aside-group {
6
+    background: #bc00e3;
7
+    background: linear-gradient(120deg, #bc00e3 0%, #4EFFFB 100%);
8
+   
9
+  }
10
+}

+ 0 - 0
src/assets/style/theme/violet/setting.scss


部分文件因为文件数量过多而无法显示