vue2-client 1.2.86 → 1.2.90

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.
Files changed (39) hide show
  1. package/.env +15 -15
  2. package/.eslintrc.js +82 -82
  3. package/CHANGELOG.md +1 -1
  4. package/package.json +94 -94
  5. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +113 -113
  6. package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
  7. package/src/base-client/components/common/CitySelect/index.js +3 -3
  8. package/src/base-client/components/common/CitySelect/index.md +109 -109
  9. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +539 -539
  10. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
  11. package/src/base-client/components/common/Upload/index.js +3 -3
  12. package/src/base-client/components/common/XAddForm/XAddForm.vue +345 -345
  13. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +322 -322
  14. package/src/base-client/components/common/XForm/XForm.vue +268 -268
  15. package/src/base-client/components/common/XTable/XTable.vue +269 -269
  16. package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +232 -232
  17. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +678 -678
  18. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
  19. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
  20. package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +300 -300
  21. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +274 -84
  22. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  23. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  24. package/src/pages/CreateQueryPage.vue +59 -58
  25. package/src/pages/login/Login.vue +55 -51
  26. package/src/pages/resourceManage/orgListManage.vue +98 -98
  27. package/src/router/async/config.async.js +26 -26
  28. package/src/router/async/router.map.js +60 -60
  29. package/src/router/index.js +27 -27
  30. package/src/services/api/WebmeterAnalysisViewApi.js +5 -1
  31. package/src/services/api/common.js +56 -56
  32. package/src/services/api/index.js +39 -39
  33. package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +18 -18
  34. package/src/services/api/manage.js +16 -16
  35. package/src/services/api/restTools.js +24 -24
  36. package/src/theme/default/style.less +47 -47
  37. package/src/utils/request.js +11 -3
  38. package/src/utils/util.js +222 -222
  39. package/vue.config.js +158 -153
package/vue.config.js CHANGED
@@ -1,153 +1,158 @@
1
- const path = require('path')
2
- const webpack = require('webpack')
3
- const ThemeColorReplacer = require('webpack-theme-color-replacer')
4
- const { getThemeColors, modifyVars } = require('./src/utils/themeUtil')
5
- const { resolveCss } = require('./src/utils/theme-color-replacer-extend')
6
- const CompressionWebpackPlugin = require('compression-webpack-plugin')
7
-
8
- const productionGzipExtensions = ['js', 'css']
9
- const isProd = process.env.NODE_ENV === 'production'
10
-
11
- // const assetsCDN = {
12
- // // webpack build externals
13
- // externals: {
14
- // vue: 'Vue',
15
- // 'vue-router': 'VueRouter',
16
- // vuex: 'Vuex',
17
- // axios: 'axios',
18
- // nprogress: 'NProgress',
19
- // clipboard: 'ClipboardJS',
20
- // '@antv/data-set': 'DataSet',
21
- // 'js-cookie': 'Cookies'
22
- // },
23
- // css: [
24
- // ],
25
- // js: [
26
- // '//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js',
27
- // '//cdn.jsdelivr.net/npm/vue-router@3.3.4/dist/vue-router.min.js',
28
- // '//cdn.jsdelivr.net/npm/vuex@3.4.0/dist/vuex.min.js',
29
- // '//cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js',
30
- // '//cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js',
31
- // '//cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js',
32
- // '//cdn.jsdelivr.net/npm/@antv/data-set@0.11.4/build/data-set.min.js',
33
- // '//cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js'
34
- // ]
35
- // }
36
-
37
- const server = 'http://121.36.106.17:8400'
38
- const local = 'http://localhost:8445/webmeter'
39
- // const local = 'http://123.60.214.109:8405/webmeter'
40
-
41
- module.exports = {
42
- devServer: {
43
- // development server port 8000
44
- port: 8001,
45
- // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
46
- proxy: {
47
- '/rs': {
48
- target: server,
49
- ws: false,
50
- changeOrigin: true
51
- },
52
- '/image': {
53
- target: server,
54
- ws: false,
55
- changeOrigin: true
56
- },
57
- '/webapps': {
58
- target: server,
59
- ws: false,
60
- changeOrigin: true
61
- },
62
- '/webmeterapi': {
63
- pathRewrite: { '^/webmeterapi': '/rs/logic' },
64
- target: local,
65
- changeOrigin: true
66
- },
67
- '/webmeteruploadapi': {
68
- pathRewrite: { '^/webmeteruploadapi': '/rs/file' },
69
- target: local,
70
- changeOrigin: true
71
- },
72
- '/webmeterresourceapi': {
73
- pathRewrite: { '^/webmeterresourceapi': '/rs/resource' },
74
- target: local,
75
- changeOrigin: true
76
- },
77
- '/resource': {
78
- pathRewrite: { '^/resource': '/' },
79
- target: 'http://127.0.0.1:4789',
80
- changeOrigin: true
81
- }
82
- }
83
- },
84
- pluginOptions: {
85
- 'style-resources-loader': {
86
- preProcessor: 'less',
87
- patterns: [path.resolve(__dirname, './src/theme/theme.less')]
88
- }
89
- },
90
- configureWebpack: config => {
91
- config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
92
- config.performance = {
93
- hints: false
94
- }
95
- config.plugins.push(
96
- new ThemeColorReplacer({
97
- fileName: 'css/theme-colors-[contenthash:8].css',
98
- matchColors: getThemeColors(),
99
- injectCss: true,
100
- resolveCss
101
- })
102
- )
103
- // Ignore all locale files of moment.js
104
- config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
105
- // 生产环境下将资源压缩成gzip格式
106
- if (isProd) {
107
- // add `CompressionWebpack` plugin to webpack plugins
108
- config.plugins.push(new CompressionWebpackPlugin({
109
- algorithm: 'gzip',
110
- test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
111
- threshold: 10240,
112
- minRatio: 0.8
113
- }))
114
- }
115
- // if prod, add externals
116
- // if (isProd) {
117
- // config.externals = assetsCDN.externals
118
- // }
119
- },
120
- chainWebpack: config => {
121
- // 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
122
- if (isProd) {
123
- config.plugin('optimize-css')
124
- .tap(args => {
125
- args[0].cssnanoOptions.preset[1].colormin = false
126
- return args
127
- })
128
- }
129
- // 生产环境下使用CDN
130
- // if (isProd) {
131
- // config.plugin('html')
132
- // .tap(args => {
133
- // args[0].cdn = assetsCDN
134
- // return args
135
- // })
136
- // }
137
- config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
138
- },
139
- css: {
140
- loaderOptions: {
141
- less: {
142
- lessOptions: {
143
- modifyVars: modifyVars(),
144
- javascriptEnabled: true
145
- }
146
- }
147
- }
148
- },
149
- publicPath: process.env.VUE_APP_PUBLIC_PATH,
150
- outputDir: 'dist',
151
- assetsDir: 'static',
152
- productionSourceMap: false
153
- }
1
+ const path = require('path')
2
+ const webpack = require('webpack')
3
+ const ThemeColorReplacer = require('webpack-theme-color-replacer')
4
+ const { getThemeColors, modifyVars } = require('./src/utils/themeUtil')
5
+ const { resolveCss } = require('./src/utils/theme-color-replacer-extend')
6
+ const CompressionWebpackPlugin = require('compression-webpack-plugin')
7
+
8
+ const productionGzipExtensions = ['js', 'css']
9
+ const isProd = process.env.NODE_ENV === 'production'
10
+
11
+ // const assetsCDN = {
12
+ // // webpack build externals
13
+ // externals: {
14
+ // vue: 'Vue',
15
+ // 'vue-router': 'VueRouter',
16
+ // vuex: 'Vuex',
17
+ // axios: 'axios',
18
+ // nprogress: 'NProgress',
19
+ // clipboard: 'ClipboardJS',
20
+ // '@antv/data-set': 'DataSet',
21
+ // 'js-cookie': 'Cookies'
22
+ // },
23
+ // css: [
24
+ // ],
25
+ // js: [
26
+ // '//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js',
27
+ // '//cdn.jsdelivr.net/npm/vue-router@3.3.4/dist/vue-router.min.js',
28
+ // '//cdn.jsdelivr.net/npm/vuex@3.4.0/dist/vuex.min.js',
29
+ // '//cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js',
30
+ // '//cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js',
31
+ // '//cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js',
32
+ // '//cdn.jsdelivr.net/npm/@antv/data-set@0.11.4/build/data-set.min.js',
33
+ // '//cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js'
34
+ // ]
35
+ // }
36
+
37
+ const server = 'http://121.36.106.17:8400'
38
+ const local = 'http://localhost:8445/webmeter'
39
+ // const local = 'http://123.60.214.109:8405/webmeter'
40
+
41
+ module.exports = {
42
+ devServer: {
43
+ // development server port 8000
44
+ port: 8001,
45
+ // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
46
+ proxy: {
47
+ '/rs': {
48
+ target: server,
49
+ ws: false,
50
+ changeOrigin: true
51
+ },
52
+ '/image': {
53
+ target: server,
54
+ ws: false,
55
+ changeOrigin: true
56
+ },
57
+ '/webapps': {
58
+ target: server,
59
+ ws: false,
60
+ changeOrigin: true
61
+ },
62
+ '/webmeterapi/foreignaidUseGasSumCountData': {
63
+ // pathRewrite: { '^/webmeterapi': '/rs/logic' },
64
+ target: 'http://61.134.55.234:8405/',
65
+ changeOrigin: true
66
+ },
67
+ '/webmeterapi': {
68
+ pathRewrite: { '^/webmeterapi': '/rs/logic' },
69
+ target: local,
70
+ changeOrigin: true
71
+ },
72
+ '/webmeteruploadapi': {
73
+ pathRewrite: { '^/webmeteruploadapi': '/rs/file' },
74
+ target: local,
75
+ changeOrigin: true
76
+ },
77
+ '/webmeterresourceapi': {
78
+ pathRewrite: { '^/webmeterresourceapi': '/rs/resource' },
79
+ target: local,
80
+ changeOrigin: true
81
+ },
82
+ '/resource': {
83
+ pathRewrite: { '^/resource': '/' },
84
+ target: 'http://127.0.0.1:4789',
85
+ changeOrigin: true
86
+ }
87
+ }
88
+ },
89
+ pluginOptions: {
90
+ 'style-resources-loader': {
91
+ preProcessor: 'less',
92
+ patterns: [path.resolve(__dirname, './src/theme/theme.less')]
93
+ }
94
+ },
95
+ configureWebpack: config => {
96
+ config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
97
+ config.performance = {
98
+ hints: false
99
+ }
100
+ config.plugins.push(
101
+ new ThemeColorReplacer({
102
+ fileName: 'css/theme-colors-[contenthash:8].css',
103
+ matchColors: getThemeColors(),
104
+ injectCss: true,
105
+ resolveCss
106
+ })
107
+ )
108
+ // Ignore all locale files of moment.js
109
+ config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
110
+ // 生产环境下将资源压缩成gzip格式
111
+ if (isProd) {
112
+ // add `CompressionWebpack` plugin to webpack plugins
113
+ config.plugins.push(new CompressionWebpackPlugin({
114
+ algorithm: 'gzip',
115
+ test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
116
+ threshold: 10240,
117
+ minRatio: 0.8
118
+ }))
119
+ }
120
+ // if prod, add externals
121
+ // if (isProd) {
122
+ // config.externals = assetsCDN.externals
123
+ // }
124
+ },
125
+ chainWebpack: config => {
126
+ // 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
127
+ if (isProd) {
128
+ config.plugin('optimize-css')
129
+ .tap(args => {
130
+ args[0].cssnanoOptions.preset[1].colormin = false
131
+ return args
132
+ })
133
+ }
134
+ // 生产环境下使用CDN
135
+ // if (isProd) {
136
+ // config.plugin('html')
137
+ // .tap(args => {
138
+ // args[0].cdn = assetsCDN
139
+ // return args
140
+ // })
141
+ // }
142
+ config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
143
+ },
144
+ css: {
145
+ loaderOptions: {
146
+ less: {
147
+ lessOptions: {
148
+ modifyVars: modifyVars(),
149
+ javascriptEnabled: true
150
+ }
151
+ }
152
+ }
153
+ },
154
+ publicPath: process.env.VUE_APP_PUBLIC_PATH,
155
+ outputDir: 'dist',
156
+ assetsDir: 'static',
157
+ productionSourceMap: false
158
+ }