vue2-client 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +81 -81
- package/README.md +4 -2
- package/babel.config.js +14 -14
- package/docs/index.md +29 -29
- package/{src/index.js → index.js} +8 -8
- package/jest.config.js +3 -3
- package/package.json +1 -1
- package/public/index.html +27 -27
- package/src/App.vue +93 -93
- package/src/base-client/all.js +26 -26
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +4 -4
- package/src/base-client/components/common/CreateQuery/index.md +42 -42
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +3 -3
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
- package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
- package/src/base-client/components/common/XAddForm/XAddForm.vue +3 -3
- package/src/base-client/components/common/XAddForm/index.md +60 -60
- package/src/base-client/components/common/XBadge/index.md +39 -39
- package/src/base-client/components/common/XCard/index.md +43 -43
- package/src/base-client/components/common/XForm/XForm.vue +2 -2
- package/src/base-client/components/common/XForm/XFormItem.vue +1 -1
- package/src/base-client/components/common/XForm/index.md +3 -3
- package/src/base-client/components/common/XFormCol/index.md +35 -35
- package/src/base-client/components/common/XFormTable/XFormTable.vue +6 -6
- package/src/base-client/components/common/XFormTable/index.md +89 -89
- package/src/base-client/components/common/XTable/XTable.vue +3 -3
- package/src/base-client/components/common/XTable/index.md +3 -3
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +105 -105
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +3 -3
- package/src/base-client/components/iot/CustomerDetailsView/index.md +41 -41
- package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +127 -127
- package/src/base-client/components/iot/DataAnalysisViewGD/DataAnalysisViewGD.vue +5 -5
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +3 -3
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +3 -3
- package/src/base-client/components/iot/DeviceDetailsView/index.md +43 -43
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +122 -122
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +4 -4
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +225 -225
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +135 -135
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +3 -3
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +5 -5
- package/src/base-client/components/iot/InstructDetailsView/index.md +45 -45
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +3 -3
- package/src/base-client/components/iot/LogDetailsView/index.md +43 -43
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +3 -3
- package/src/base-client/components/iot/MeterDetailsView/index.md +43 -43
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +1 -1
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +3 -3
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +3 -3
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +4 -4
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +3 -3
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +3 -3
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +4 -4
- package/src/base-client/components/iot/WebmeterAnalysisView/index.md +48 -48
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +4 -4
- package/src/base-client/components/system/DictionaryDetailsView/index.md +41 -41
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +3 -3
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +5 -5
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +5 -5
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +3 -3
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +6 -6
- package/src/base-client/plugins/AppData.js +3 -3
- package/src/base-client/plugins/GetLoginInfoService.js +2 -2
- package/src/base-client/plugins/index.js +4 -4
- package/src/bootstrap.js +4 -4
- package/src/components/Ellipsis/Ellipsis.vue +64 -64
- package/src/components/Ellipsis/index.md +38 -38
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/STable/README.md +341 -341
- package/src/components/Trend/index.md +45 -45
- package/src/components/cache/AKeepAlive.js +172 -172
- package/src/components/checkbox/index.js +7 -7
- package/src/components/index.js +36 -36
- package/src/components/menu/menu.js +273 -273
- package/src/components/setting/Setting.vue +237 -237
- package/src/components/table/advance/AdvanceTable.vue +275 -275
- package/src/components/transition/PageToggleTransition.vue +97 -97
- package/src/config/default/setting.config.js +33 -33
- package/src/layouts/CommonLayout.vue +42 -42
- package/src/layouts/ComponentLayoutOne.vue +47 -47
- package/src/layouts/PageLayout.vue +151 -151
- package/src/layouts/SinglePageView.vue +74 -74
- package/src/layouts/header/AdminHeader.vue +109 -109
- package/src/layouts/header/HeaderAvatar.vue +60 -60
- package/src/layouts/header/HeaderNotice.vue +1 -1
- package/src/layouts/tabs/TabsHead.vue +190 -190
- package/src/layouts/tabs/TabsView.vue +355 -355
- package/src/main.js +2 -2
- package/src/mock/common/reportData.js +20 -20
- package/src/mock/goods/index.js +108 -108
- package/src/mock/index.js +12 -12
- package/src/mock/project/index.js +17 -17
- package/src/mock/user/current.js +13 -13
- package/src/mock/user/login.js +39 -39
- package/src/mock/user/routes.js +61 -61
- package/src/mock/workplace/index.js +15 -15
- package/src/pages/exception/403.vue +2 -2
- package/src/pages/exception/404.vue +2 -2
- package/src/pages/exception/500.vue +2 -2
- package/src/pages/login/Login.vue +8 -8
- package/src/pages/report/ReportTable.js +125 -125
- package/src/pages/report/ReportTableHome.vue +2 -2
- package/src/pages/resourceManage/resourceManageMain.vue +1 -1
- package/src/pages/system/applyInstallView/Core.vue +570 -570
- package/src/pages/system/applyInstallView/index.vue +34 -34
- package/src/pages/system/dictionary/index.vue +41 -41
- package/src/pages/system/queryParams/index.vue +41 -41
- package/src/router/async/config.async.js +25 -25
- package/src/router/async/router.map.js +13 -13
- package/src/router/guards.js +104 -104
- package/src/router/index.js +2 -2
- package/src/services/api/common.js +1 -1
- package/src/services/api/restTools.js +1 -1
- package/src/services/dataSource.js +12 -12
- package/src/services/user.js +34 -34
- package/src/store/index.js +5 -5
- package/src/store/modules/setting.js +114 -114
- package/src/theme/index.less +5 -5
- package/src/theme/reportTable.less +58 -58
- package/src/utils/i18n.js +80 -80
- package/src/utils/indexedDB.js +1 -1
- package/src/utils/request.js +1 -1
- package/src/utils/routerUtil.js +3 -3
- package/tests/unit/ReportTable.spec.js +2 -2
- package/vue.config.js +1 -0
- package/webpack.config.js +1 -1
- package/src/router/config.js +0 -23
package/.eslintrc.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: {
|
|
4
|
-
node: true
|
|
5
|
-
},
|
|
6
|
-
'extends': [
|
|
7
|
-
'plugin:vue/essential',
|
|
8
|
-
'plugin:vue/strongly-recommended',
|
|
9
|
-
'@vue/standard'
|
|
10
|
-
],
|
|
11
|
-
rules: {
|
|
12
|
-
'no-console': 'off',
|
|
13
|
-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
14
|
-
'generator-star-spacing': 'off',
|
|
15
|
-
'no-mixed-operators': 0,
|
|
16
|
-
'vue/max-attributes-per-line': [
|
|
17
|
-
2,
|
|
18
|
-
{
|
|
19
|
-
'singleline': 5,
|
|
20
|
-
'multiline': {
|
|
21
|
-
'max': 1,
|
|
22
|
-
'allowFirstLine': false
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
'vue/attribute-hyphenation': 0,
|
|
27
|
-
'vue/html-self-closing': 0,
|
|
28
|
-
'vue/component-name-in-template-casing': 0,
|
|
29
|
-
'vue/html-closing-bracket-spacing': 0,
|
|
30
|
-
'vue/singleline-html-element-content-newline': 0,
|
|
31
|
-
'vue/no-unused-components': 0,
|
|
32
|
-
'vue/multiline-html-element-content-newline': 0,
|
|
33
|
-
'vue/no-use-v-if-with-v-for': 0,
|
|
34
|
-
'vue/html-closing-bracket-newline': 0,
|
|
35
|
-
'vue/no-parsing-error': 0,
|
|
36
|
-
'vue/name-property-casing': 0,
|
|
37
|
-
'no-tabs': 0,
|
|
38
|
-
'quotes': [
|
|
39
|
-
2,
|
|
40
|
-
'single',
|
|
41
|
-
{
|
|
42
|
-
'avoidEscape': true,
|
|
43
|
-
'allowTemplateLiterals': true
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
'semi': [
|
|
47
|
-
2,
|
|
48
|
-
'never',
|
|
49
|
-
{
|
|
50
|
-
'beforeStatementContinuationChars': 'never'
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
'no-delete-var': 2,
|
|
54
|
-
'prefer-const': [
|
|
55
|
-
2,
|
|
56
|
-
{
|
|
57
|
-
'ignoreReadBeforeAssign': false
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
'template-curly-spacing': 'off',
|
|
61
|
-
'indent': 'off',
|
|
62
|
-
// 必须使用全等: false
|
|
63
|
-
'eqeqeq': 0,
|
|
64
|
-
// 可以使用!! 双重否定
|
|
65
|
-
'no-extra-boolean-cast': 'off'
|
|
66
|
-
},
|
|
67
|
-
parserOptions: {
|
|
68
|
-
parser: 'babel-eslint'
|
|
69
|
-
},
|
|
70
|
-
overrides: [
|
|
71
|
-
{
|
|
72
|
-
files: [
|
|
73
|
-
'**/__tests__/*.{j,t}s?(x)',
|
|
74
|
-
'**/tests/unit/**/*.spec.{j,t}s?(x)'
|
|
75
|
-
],
|
|
76
|
-
env: {
|
|
77
|
-
jest: true
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: {
|
|
4
|
+
node: true
|
|
5
|
+
},
|
|
6
|
+
'extends': [
|
|
7
|
+
'plugin:vue/essential',
|
|
8
|
+
'plugin:vue/strongly-recommended',
|
|
9
|
+
'@vue/standard'
|
|
10
|
+
],
|
|
11
|
+
rules: {
|
|
12
|
+
'no-console': 'off',
|
|
13
|
+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
14
|
+
'generator-star-spacing': 'off',
|
|
15
|
+
'no-mixed-operators': 0,
|
|
16
|
+
'vue/max-attributes-per-line': [
|
|
17
|
+
2,
|
|
18
|
+
{
|
|
19
|
+
'singleline': 5,
|
|
20
|
+
'multiline': {
|
|
21
|
+
'max': 1,
|
|
22
|
+
'allowFirstLine': false
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
'vue/attribute-hyphenation': 0,
|
|
27
|
+
'vue/html-self-closing': 0,
|
|
28
|
+
'vue/component-name-in-template-casing': 0,
|
|
29
|
+
'vue/html-closing-bracket-spacing': 0,
|
|
30
|
+
'vue/singleline-html-element-content-newline': 0,
|
|
31
|
+
'vue/no-unused-components': 0,
|
|
32
|
+
'vue/multiline-html-element-content-newline': 0,
|
|
33
|
+
'vue/no-use-v-if-with-v-for': 0,
|
|
34
|
+
'vue/html-closing-bracket-newline': 0,
|
|
35
|
+
'vue/no-parsing-error': 0,
|
|
36
|
+
'vue/name-property-casing': 0,
|
|
37
|
+
'no-tabs': 0,
|
|
38
|
+
'quotes': [
|
|
39
|
+
2,
|
|
40
|
+
'single',
|
|
41
|
+
{
|
|
42
|
+
'avoidEscape': true,
|
|
43
|
+
'allowTemplateLiterals': true
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
'semi': [
|
|
47
|
+
2,
|
|
48
|
+
'never',
|
|
49
|
+
{
|
|
50
|
+
'beforeStatementContinuationChars': 'never'
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
'no-delete-var': 2,
|
|
54
|
+
'prefer-const': [
|
|
55
|
+
2,
|
|
56
|
+
{
|
|
57
|
+
'ignoreReadBeforeAssign': false
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
'template-curly-spacing': 'off',
|
|
61
|
+
'indent': 'off',
|
|
62
|
+
// 必须使用全等: false
|
|
63
|
+
'eqeqeq': 0,
|
|
64
|
+
// 可以使用!! 双重否定
|
|
65
|
+
'no-extra-boolean-cast': 'off'
|
|
66
|
+
},
|
|
67
|
+
parserOptions: {
|
|
68
|
+
parser: 'babel-eslint'
|
|
69
|
+
},
|
|
70
|
+
overrides: [
|
|
71
|
+
{
|
|
72
|
+
files: [
|
|
73
|
+
'**/__tests__/*.{j,t}s?(x)',
|
|
74
|
+
'**/tests/unit/**/*.spec.{j,t}s?(x)'
|
|
75
|
+
],
|
|
76
|
+
env: {
|
|
77
|
+
jest: true
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ import Vue from 'vue'
|
|
|
9
9
|
import App from './App.vue'
|
|
10
10
|
import Router from 'vue-router'
|
|
11
11
|
import Vuex from 'vuex'
|
|
12
|
-
import '
|
|
13
|
-
import { routerOptions, modules, i18n, message, bootstrap } from 'vue2-client
|
|
12
|
+
import '@vue2-client/mock'
|
|
13
|
+
import { routerOptions, modules, i18n, message, bootstrap } from 'vue2-client'
|
|
14
14
|
|
|
15
15
|
Vue.use(Router)
|
|
16
16
|
Vue.use(Vuex)
|
|
@@ -26,6 +26,8 @@ new Vue({
|
|
|
26
26
|
render: h => h(App)
|
|
27
27
|
}).$mount('#app')
|
|
28
28
|
|
|
29
|
+
注意引入项目请添加webpack别名配置
|
|
30
|
+
config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'node_modules/vue2-client/src'))
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
## 目录结构
|
package/babel.config.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
|
|
2
|
-
|
|
3
|
-
const plugins = []
|
|
4
|
-
if (IS_PROD) {
|
|
5
|
-
plugins.push('transform-remove-console')
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
module.exports = {
|
|
9
|
-
presets: [
|
|
10
|
-
'@vue/cli-plugin-babel/preset',
|
|
11
|
-
['@vue/babel-preset-jsx', { 'injectH': false }]
|
|
12
|
-
],
|
|
13
|
-
plugins
|
|
14
|
-
}
|
|
1
|
+
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
|
|
2
|
+
|
|
3
|
+
const plugins = []
|
|
4
|
+
if (IS_PROD) {
|
|
5
|
+
plugins.push('transform-remove-console')
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
presets: [
|
|
10
|
+
'@vue/cli-plugin-babel/preset',
|
|
11
|
+
['@vue/babel-preset-jsx', { 'injectH': false }]
|
|
12
|
+
],
|
|
13
|
+
plugins
|
|
14
|
+
}
|
package/docs/index.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
## 文档列表
|
|
2
|
-
### common
|
|
3
|
-
* [CreateQuery 完整查询配置生成](../src/base-client/components/common/CreateQuery/index.md)
|
|
4
|
-
* [CreateSimpleFormQuery 基础表单配置生成](../src/base-client/components/common/CreateSimpleFormQuery/index.md)
|
|
5
|
-
* [CustomColumnsDrawer 自定义表格列](../src/base-client/components/common/CustomColumnsDrawer/index.md)
|
|
6
|
-
* [FormGroupEdit 表单参数组配置编辑](../src/base-client/components/common/FormGroupEdit/index.md)
|
|
7
|
-
* [FormGroupQuery 表单参数组配置生成](../src/base-client/components/common/FormGroupQuery/index.md)
|
|
8
|
-
* [XAddForm 动态新增/修改表单控件,根据JSON配置生成一个完整的可供新增/修改数据的动态表单](../src/base-client/components/common/XAddForm/index.md)
|
|
9
|
-
* [XBadge 重封装徽标](../src/base-client/components/common/XBadge/index.md)
|
|
10
|
-
* [XCard 通用数据加载状态管理容器](../src/base-client/components/common/XCard/index.md)
|
|
11
|
-
* [XForm 动态表单控件,根据JSON配置生成一个完整的动态表单](../src/base-client/components/common/XForm/index.md)
|
|
12
|
-
* [XFormCol 适用于表单的通用响应式栅格a-col封装](../src/base-client/components/common/XFormCol/index.md)
|
|
13
|
-
* [XFormTable 动态查询控件,进一步整合了XTable和XForm](../src/base-client/components/common/XFormTable/index.md)
|
|
14
|
-
* [XTable 动态表格控件,根据JSON配置生成一个完整的动态表格](../src/base-client/components/common/XTable/index.md)
|
|
15
|
-
|
|
16
|
-
### iot
|
|
17
|
-
* [CustomerDetailsView 客户详情页](../src/base-client/components/iot/CustomerDetailsView/index.md)
|
|
18
|
-
* [DeviceDetailsView 档案详情页](../src/base-client/components/iot/DeviceDetailsView/index.md)
|
|
19
|
-
* [InstructDetailsView 指令详情页](../src/base-client/components/iot/InstructDetailsView/index.md)
|
|
20
|
-
* [LogDetailsView 日志详情页](../src/base-client/components/iot/LogDetailsView/index.md)
|
|
21
|
-
* [MeterDetailsView 单个表具档案](../src/base-client/components/iot/MeterDetailsView/index.md)
|
|
22
|
-
|
|
23
|
-
### system
|
|
24
|
-
* [DictionaryDetailsView 字典详情页](../src/base-client/components/system/DictionaryDetailsView/index.md)
|
|
25
|
-
|
|
26
|
-
### ticket
|
|
27
|
-
* [EmployeeDetailsView 员工详情页](../src/base-client/components/ticket/EmployeeDetailsView/index.md)
|
|
28
|
-
* [TicketDetailsView 工单详情页](../src/base-client/components/ticket/TicketDetailsView/index.md)
|
|
29
|
-
* [TicketSubmitSuccessView 单个工单详情页](../src/base-client/components/ticket/TicketSubmitSuccessView/index.md)
|
|
1
|
+
## 文档列表
|
|
2
|
+
### common
|
|
3
|
+
* [CreateQuery 完整查询配置生成](../src/base-client/components/common/CreateQuery/index.md)
|
|
4
|
+
* [CreateSimpleFormQuery 基础表单配置生成](../src/base-client/components/common/CreateSimpleFormQuery/index.md)
|
|
5
|
+
* [CustomColumnsDrawer 自定义表格列](../src/base-client/components/common/CustomColumnsDrawer/index.md)
|
|
6
|
+
* [FormGroupEdit 表单参数组配置编辑](../src/base-client/components/common/FormGroupEdit/index.md)
|
|
7
|
+
* [FormGroupQuery 表单参数组配置生成](../src/base-client/components/common/FormGroupQuery/index.md)
|
|
8
|
+
* [XAddForm 动态新增/修改表单控件,根据JSON配置生成一个完整的可供新增/修改数据的动态表单](../src/base-client/components/common/XAddForm/index.md)
|
|
9
|
+
* [XBadge 重封装徽标](../src/base-client/components/common/XBadge/index.md)
|
|
10
|
+
* [XCard 通用数据加载状态管理容器](../src/base-client/components/common/XCard/index.md)
|
|
11
|
+
* [XForm 动态表单控件,根据JSON配置生成一个完整的动态表单](../src/base-client/components/common/XForm/index.md)
|
|
12
|
+
* [XFormCol 适用于表单的通用响应式栅格a-col封装](../src/base-client/components/common/XFormCol/index.md)
|
|
13
|
+
* [XFormTable 动态查询控件,进一步整合了XTable和XForm](../src/base-client/components/common/XFormTable/index.md)
|
|
14
|
+
* [XTable 动态表格控件,根据JSON配置生成一个完整的动态表格](../src/base-client/components/common/XTable/index.md)
|
|
15
|
+
|
|
16
|
+
### iot
|
|
17
|
+
* [CustomerDetailsView 客户详情页](../src/base-client/components/iot/CustomerDetailsView/index.md)
|
|
18
|
+
* [DeviceDetailsView 档案详情页](../src/base-client/components/iot/DeviceDetailsView/index.md)
|
|
19
|
+
* [InstructDetailsView 指令详情页](../src/base-client/components/iot/InstructDetailsView/index.md)
|
|
20
|
+
* [LogDetailsView 日志详情页](../src/base-client/components/iot/LogDetailsView/index.md)
|
|
21
|
+
* [MeterDetailsView 单个表具档案](../src/base-client/components/iot/MeterDetailsView/index.md)
|
|
22
|
+
|
|
23
|
+
### system
|
|
24
|
+
* [DictionaryDetailsView 字典详情页](../src/base-client/components/system/DictionaryDetailsView/index.md)
|
|
25
|
+
|
|
26
|
+
### ticket
|
|
27
|
+
* [EmployeeDetailsView 员工详情页](../src/base-client/components/ticket/EmployeeDetailsView/index.md)
|
|
28
|
+
* [TicketDetailsView 工单详情页](../src/base-client/components/ticket/TicketDetailsView/index.md)
|
|
29
|
+
* [TicketSubmitSuccessView 单个工单详情页](../src/base-client/components/ticket/TicketSubmitSuccessView/index.md)
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import { initRouter } from '
|
|
3
|
-
import { initI18n } from '
|
|
4
|
-
import bootstrap from '
|
|
5
|
-
import { modules } from '
|
|
6
|
-
import '
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
2
|
+
import { initRouter } from '@vue2-client/router'
|
|
3
|
+
import { initI18n } from '@vue2-client/utils/i18n'
|
|
4
|
+
import bootstrap from '@vue2-client/bootstrap'
|
|
5
|
+
import { modules } from '@vue2-client/store'
|
|
6
|
+
import '@vue2-client/theme/index.less'
|
|
7
|
+
import '@vue2-client/base-client/all'
|
|
8
|
+
import '@vue2-client/utils/filter'
|
|
9
9
|
import 'animate.css/source/animate.css'
|
|
10
10
|
import 'moment/locale/zh-cn'
|
|
11
11
|
import Antd from 'ant-design-vue'
|
|
12
12
|
import Viser from 'viser-vue'
|
|
13
13
|
|
|
14
|
-
const routerOptions = initRouter(
|
|
14
|
+
const routerOptions = initRouter()
|
|
15
15
|
const i18n = initI18n('CN', 'US')
|
|
16
16
|
|
|
17
17
|
Vue.use(Antd)
|
package/jest.config.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
preset: '@vue/cli-plugin-unit-jest'
|
|
3
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
preset: '@vue/cli-plugin-unit-jest'
|
|
3
|
+
}
|
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" class="beauty-scroll">
|
|
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 %>favicon.ico">
|
|
8
|
-
<title><%= process.env.VUE_APP_NAME %></title>
|
|
9
|
-
<!-- require cdn assets css -->
|
|
10
|
-
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
|
|
11
|
-
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
|
|
12
|
-
<% } %>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<noscript>
|
|
16
|
-
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
17
|
-
</noscript>
|
|
18
|
-
<div id="popContainer" class="beauty-scroll" style="height: 100vh; overflow-y: scroll">
|
|
19
|
-
<div id="app"></div>
|
|
20
|
-
</div>
|
|
21
|
-
<!-- require cdn assets js -->
|
|
22
|
-
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
|
|
23
|
-
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
|
|
24
|
-
<% } %>
|
|
25
|
-
<!-- built files will be auto injected -->
|
|
26
|
-
</body>
|
|
27
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" class="beauty-scroll">
|
|
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 %>favicon.ico">
|
|
8
|
+
<title><%= process.env.VUE_APP_NAME %></title>
|
|
9
|
+
<!-- require cdn assets css -->
|
|
10
|
+
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
|
|
11
|
+
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
|
|
12
|
+
<% } %>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<noscript>
|
|
16
|
+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
17
|
+
</noscript>
|
|
18
|
+
<div id="popContainer" class="beauty-scroll" style="height: 100vh; overflow-y: scroll">
|
|
19
|
+
<div id="app"></div>
|
|
20
|
+
</div>
|
|
21
|
+
<!-- require cdn assets js -->
|
|
22
|
+
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
|
|
23
|
+
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
|
|
24
|
+
<% } %>
|
|
25
|
+
<!-- built files will be auto injected -->
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
package/src/App.vue
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-config-provider :locale="locale" :get-popup-container="popContainer">
|
|
3
|
-
<router-view/>
|
|
4
|
-
</a-config-provider>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import { enquireScreen } from './utils/util'
|
|
9
|
-
import { mapState, mapMutations } from 'vuex'
|
|
10
|
-
import themeUtil from '
|
|
11
|
-
import { getI18nKey } from '
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: 'App',
|
|
15
|
-
data () {
|
|
16
|
-
return {
|
|
17
|
-
locale: {}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
created () {
|
|
21
|
-
this.setHtmlTitle()
|
|
22
|
-
this.setLanguage(this.lang)
|
|
23
|
-
enquireScreen(isMobile => this.setDevice(isMobile))
|
|
24
|
-
},
|
|
25
|
-
mounted () {
|
|
26
|
-
this.setWeekModeTheme(this.weekMode)
|
|
27
|
-
},
|
|
28
|
-
watch: {
|
|
29
|
-
weekMode (val) {
|
|
30
|
-
this.setWeekModeTheme(val)
|
|
31
|
-
},
|
|
32
|
-
lang (val) {
|
|
33
|
-
this.setLanguage(val)
|
|
34
|
-
this.setHtmlTitle()
|
|
35
|
-
},
|
|
36
|
-
$route () {
|
|
37
|
-
this.setHtmlTitle()
|
|
38
|
-
},
|
|
39
|
-
'theme.mode': function (val) {
|
|
40
|
-
const closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`)
|
|
41
|
-
themeUtil.changeThemeColor(this.theme.color, val).then(closeMessage)
|
|
42
|
-
},
|
|
43
|
-
'theme.color': function (val) {
|
|
44
|
-
const closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`)
|
|
45
|
-
themeUtil.changeThemeColor(val, this.theme.mode).then(closeMessage)
|
|
46
|
-
},
|
|
47
|
-
'layout': function () {
|
|
48
|
-
window.dispatchEvent(new Event('resize'))
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
computed: {
|
|
52
|
-
...mapState('setting', ['layout', 'theme', 'weekMode', 'lang'])
|
|
53
|
-
},
|
|
54
|
-
methods: {
|
|
55
|
-
...mapMutations('setting', ['setDevice']),
|
|
56
|
-
setWeekModeTheme (weekMode) {
|
|
57
|
-
if (weekMode) {
|
|
58
|
-
document.body.classList.add('week-mode')
|
|
59
|
-
} else {
|
|
60
|
-
document.body.classList.remove('week-mode')
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
setLanguage (lang) {
|
|
64
|
-
this.$i18n.locale = lang
|
|
65
|
-
switch (lang) {
|
|
66
|
-
case 'CN':
|
|
67
|
-
this.locale = require('ant-design-vue/es/locale-provider/zh_CN').default
|
|
68
|
-
break
|
|
69
|
-
case 'HK':
|
|
70
|
-
this.locale = require('ant-design-vue/es/locale-provider/zh_TW').default
|
|
71
|
-
break
|
|
72
|
-
case 'US':
|
|
73
|
-
default:
|
|
74
|
-
this.locale = require('ant-design-vue/es/locale-provider/en_US').default
|
|
75
|
-
break
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
setHtmlTitle () {
|
|
79
|
-
const route = this.$route
|
|
80
|
-
const key = route.path === '/' ? 'home.name' : getI18nKey(route.matched[route.matched.length - 1].path)
|
|
81
|
-
document.title = process.env.VUE_APP_NAME + ' | ' + this.$t(key)
|
|
82
|
-
},
|
|
83
|
-
popContainer () {
|
|
84
|
-
return document.getElementById('popContainer')
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
</script>
|
|
89
|
-
|
|
90
|
-
<style lang="less" scoped>
|
|
91
|
-
#id{
|
|
92
|
-
}
|
|
93
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-config-provider :locale="locale" :get-popup-container="popContainer">
|
|
3
|
+
<router-view/>
|
|
4
|
+
</a-config-provider>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { enquireScreen } from './utils/util'
|
|
9
|
+
import { mapState, mapMutations } from 'vuex'
|
|
10
|
+
import themeUtil from '@vue2-client/utils/themeUtil'
|
|
11
|
+
import { getI18nKey } from '@vue2-client/utils/routerUtil'
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'App',
|
|
15
|
+
data () {
|
|
16
|
+
return {
|
|
17
|
+
locale: {}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
created () {
|
|
21
|
+
this.setHtmlTitle()
|
|
22
|
+
this.setLanguage(this.lang)
|
|
23
|
+
enquireScreen(isMobile => this.setDevice(isMobile))
|
|
24
|
+
},
|
|
25
|
+
mounted () {
|
|
26
|
+
this.setWeekModeTheme(this.weekMode)
|
|
27
|
+
},
|
|
28
|
+
watch: {
|
|
29
|
+
weekMode (val) {
|
|
30
|
+
this.setWeekModeTheme(val)
|
|
31
|
+
},
|
|
32
|
+
lang (val) {
|
|
33
|
+
this.setLanguage(val)
|
|
34
|
+
this.setHtmlTitle()
|
|
35
|
+
},
|
|
36
|
+
$route () {
|
|
37
|
+
this.setHtmlTitle()
|
|
38
|
+
},
|
|
39
|
+
'theme.mode': function (val) {
|
|
40
|
+
const closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`)
|
|
41
|
+
themeUtil.changeThemeColor(this.theme.color, val).then(closeMessage)
|
|
42
|
+
},
|
|
43
|
+
'theme.color': function (val) {
|
|
44
|
+
const closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`)
|
|
45
|
+
themeUtil.changeThemeColor(val, this.theme.mode).then(closeMessage)
|
|
46
|
+
},
|
|
47
|
+
'layout': function () {
|
|
48
|
+
window.dispatchEvent(new Event('resize'))
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
computed: {
|
|
52
|
+
...mapState('setting', ['layout', 'theme', 'weekMode', 'lang'])
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
...mapMutations('setting', ['setDevice']),
|
|
56
|
+
setWeekModeTheme (weekMode) {
|
|
57
|
+
if (weekMode) {
|
|
58
|
+
document.body.classList.add('week-mode')
|
|
59
|
+
} else {
|
|
60
|
+
document.body.classList.remove('week-mode')
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
setLanguage (lang) {
|
|
64
|
+
this.$i18n.locale = lang
|
|
65
|
+
switch (lang) {
|
|
66
|
+
case 'CN':
|
|
67
|
+
this.locale = require('ant-design-vue/es/locale-provider/zh_CN').default
|
|
68
|
+
break
|
|
69
|
+
case 'HK':
|
|
70
|
+
this.locale = require('ant-design-vue/es/locale-provider/zh_TW').default
|
|
71
|
+
break
|
|
72
|
+
case 'US':
|
|
73
|
+
default:
|
|
74
|
+
this.locale = require('ant-design-vue/es/locale-provider/en_US').default
|
|
75
|
+
break
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
setHtmlTitle () {
|
|
79
|
+
const route = this.$route
|
|
80
|
+
const key = route.path === '/' ? 'home.name' : getI18nKey(route.matched[route.matched.length - 1].path)
|
|
81
|
+
document.title = process.env.VUE_APP_NAME + ' | ' + this.$t(key)
|
|
82
|
+
},
|
|
83
|
+
popContainer () {
|
|
84
|
+
return document.getElementById('popContainer')
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<style lang="less" scoped>
|
|
91
|
+
#id{
|
|
92
|
+
}
|
|
93
|
+
</style>
|
package/src/base-client/all.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
2
|
|
|
3
|
-
import CustomColumnsDrawer from '
|
|
4
|
-
import InstructDetailsView from '
|
|
5
|
-
import MeterDetailsView from '
|
|
6
|
-
import CustomerDetailsView from '
|
|
7
|
-
import LogDetailsView from '
|
|
8
|
-
import WebmeterAnalysisView from '
|
|
9
|
-
import XCard from '
|
|
10
|
-
import XFormCol from '
|
|
11
|
-
import XBadge from '
|
|
12
|
-
import DataAnalysisView from '
|
|
13
|
-
import DataAnalysisUser from '
|
|
14
|
-
import DataAnalysisViewGD from '
|
|
15
|
-
import DeviceTypeDetailsView from '
|
|
16
|
-
import DeviceBrandDetailsView from '
|
|
17
|
-
import DictionaryDetailsView from '
|
|
18
|
-
import QueryParamsDetailsView from '
|
|
19
|
-
import DeviceDetailsView from '
|
|
20
|
-
import TicketDetailsView from '
|
|
21
|
-
import EmployeeDetailsView from '
|
|
22
|
-
import submitTicketSuccess from '
|
|
23
|
-
import CreateQuery from '
|
|
24
|
-
import CreateSimpleFormQuery from '
|
|
25
|
-
import FormGroupQuery from '
|
|
26
|
-
import FormGroupEdit from '
|
|
27
|
-
import JSONToTree from '
|
|
3
|
+
import CustomColumnsDrawer from '@vue2-client/base-client/components/common/CustomColumnsDrawer'
|
|
4
|
+
import InstructDetailsView from '@vue2-client/base-client/components/iot/InstructDetailsView'
|
|
5
|
+
import MeterDetailsView from '@vue2-client/base-client/components/iot/MeterDetailsView'
|
|
6
|
+
import CustomerDetailsView from '@vue2-client/base-client/components/iot/CustomerDetailsView'
|
|
7
|
+
import LogDetailsView from '@vue2-client/base-client/components/iot/LogDetailsView'
|
|
8
|
+
import WebmeterAnalysisView from '@vue2-client/base-client/components/iot/WebmeterAnalysisView'
|
|
9
|
+
import XCard from '@vue2-client/base-client/components/common/XCard/XCard'
|
|
10
|
+
import XFormCol from '@vue2-client/base-client/components/common/XFormCol'
|
|
11
|
+
import XBadge from '@vue2-client/base-client/components/common/XBadge'
|
|
12
|
+
import DataAnalysisView from '@vue2-client/base-client/components/iot/DataAnalysisView'
|
|
13
|
+
import DataAnalysisUser from '@vue2-client/base-client/components/iot/DataAnalysisUser'
|
|
14
|
+
import DataAnalysisViewGD from '@vue2-client/base-client/components/iot/DataAnalysisViewGD'
|
|
15
|
+
import DeviceTypeDetailsView from '@vue2-client/base-client/components/iot/DeviceTypeDetailsView'
|
|
16
|
+
import DeviceBrandDetailsView from '@vue2-client/base-client/components/iot/DeviceBrandDetailsView'
|
|
17
|
+
import DictionaryDetailsView from '@vue2-client/base-client/components/system/DictionaryDetailsView'
|
|
18
|
+
import QueryParamsDetailsView from '@vue2-client/base-client/components/system/QueryParamsDetailsView'
|
|
19
|
+
import DeviceDetailsView from '@vue2-client/base-client/components/iot/DeviceDetailsView'
|
|
20
|
+
import TicketDetailsView from '@vue2-client/base-client/components/ticket/TicketDetailsView'
|
|
21
|
+
import EmployeeDetailsView from '@vue2-client/base-client/components/ticket/EmployeeDetailsView'
|
|
22
|
+
import submitTicketSuccess from '@vue2-client/base-client/components/ticket/TicketSubmitSuccessView'
|
|
23
|
+
import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
|
|
24
|
+
import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
|
|
25
|
+
import FormGroupQuery from '@vue2-client/base-client/components/common/FormGroupQuery'
|
|
26
|
+
import FormGroupEdit from '@vue2-client/base-client/components/common/FormGroupEdit'
|
|
27
|
+
import JSONToTree from '@vue2-client/base-client/components/common/JSONToTree'
|
|
28
28
|
|
|
29
29
|
// 插件
|
|
30
|
-
import Plugins from '
|
|
30
|
+
import Plugins from '@vue2-client/base-client/plugins'
|
|
31
31
|
Vue.use(Plugins)
|
|
32
32
|
|
|
33
33
|
Vue.component('custom-columns-drawer', CustomColumnsDrawer)
|
|
@@ -597,13 +597,13 @@
|
|
|
597
597
|
</template>
|
|
598
598
|
|
|
599
599
|
<script>
|
|
600
|
-
import XFormItem from '
|
|
601
|
-
import XFormTable from '
|
|
600
|
+
import XFormItem from '@vue2-client/base-client/components/common/XForm/XFormItem'
|
|
601
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
602
602
|
import JsonViewer from 'vue-json-viewer'
|
|
603
603
|
import FileSaver from 'file-saver'
|
|
604
604
|
import { mapState } from 'vuex'
|
|
605
|
-
import { post } from '
|
|
606
|
-
import { commonApi } from '
|
|
605
|
+
import { post } from '@vue2-client/services/api/restTools'
|
|
606
|
+
import { commonApi } from '@vue2-client/services/api/common'
|
|
607
607
|
const DemoJson = [{ value: 'zhejiang', label: 'Zhejiang', children: [{ value: 'hangzhou', label: 'Hangzhou', children: [{ value: 'xihu', label: 'West Lake' }] }] }]
|
|
608
608
|
export default {
|
|
609
609
|
name: 'CreateQuery',
|