vue2-client 1.2.55 → 1.2.56

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 (35) hide show
  1. package/.env +15 -15
  2. package/.eslintrc.js +82 -82
  3. package/CHANGELOG.md +148 -148
  4. package/package.json +1 -1
  5. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +111 -111
  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/CreateQueryItem.vue +770 -770
  10. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +792 -752
  11. package/src/base-client/components/common/Upload/Upload.vue +141 -124
  12. package/src/base-client/components/common/Upload/index.js +3 -3
  13. package/src/base-client/components/common/XAddForm/XAddForm.vue +340 -331
  14. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +316 -316
  15. package/src/base-client/components/common/XForm/XForm.vue +268 -268
  16. package/src/base-client/components/common/XForm/XFormItem.vue +358 -346
  17. package/src/base-client/components/common/XFormTable/XFormTable.vue +483 -482
  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/WebmeterAnalysisView/WebmeterAnalysisView.vue +647 -647
  21. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  22. package/src/base-client/plugins/AppData.js +70 -70
  23. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  24. package/src/config/CreateQueryConfig.js +301 -298
  25. package/src/pages/resourceManage/orgListManage.vue +98 -98
  26. package/src/router/async/config.async.js +26 -26
  27. package/src/router/index.js +27 -27
  28. package/src/services/api/common.js +56 -47
  29. package/src/services/api/manage.js +16 -16
  30. package/src/services/api/restTools.js +24 -24
  31. package/src/theme/default/style.less +47 -47
  32. package/src/utils/map-utils.js +28 -28
  33. package/src/utils/request.js +198 -198
  34. package/src/utils/util.js +222 -222
  35. package/vue.config.js +148 -143
package/vue.config.js CHANGED
@@ -1,143 +1,148 @@
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
- }
73
- },
74
- pluginOptions: {
75
- 'style-resources-loader': {
76
- preProcessor: 'less',
77
- patterns: [path.resolve(__dirname, './src/theme/theme.less')]
78
- }
79
- },
80
- configureWebpack: config => {
81
- config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
82
- config.performance = {
83
- hints: false
84
- }
85
- config.plugins.push(
86
- new ThemeColorReplacer({
87
- fileName: 'css/theme-colors-[contenthash:8].css',
88
- matchColors: getThemeColors(),
89
- injectCss: true,
90
- resolveCss
91
- })
92
- )
93
- // Ignore all locale files of moment.js
94
- config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
95
- // 生产环境下将资源压缩成gzip格式
96
- if (isProd) {
97
- // add `CompressionWebpack` plugin to webpack plugins
98
- config.plugins.push(new CompressionWebpackPlugin({
99
- algorithm: 'gzip',
100
- test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
101
- threshold: 10240,
102
- minRatio: 0.8
103
- }))
104
- }
105
- // if prod, add externals
106
- // if (isProd) {
107
- // config.externals = assetsCDN.externals
108
- // }
109
- },
110
- chainWebpack: config => {
111
- // 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
112
- if (isProd) {
113
- config.plugin('optimize-css')
114
- .tap(args => {
115
- args[0].cssnanoOptions.preset[1].colormin = false
116
- return args
117
- })
118
- }
119
- // 生产环境下使用CDN
120
- // if (isProd) {
121
- // config.plugin('html')
122
- // .tap(args => {
123
- // args[0].cdn = assetsCDN
124
- // return args
125
- // })
126
- // }
127
- config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
128
- },
129
- css: {
130
- loaderOptions: {
131
- less: {
132
- lessOptions: {
133
- modifyVars: modifyVars(),
134
- javascriptEnabled: true
135
- }
136
- }
137
- }
138
- },
139
- publicPath: process.env.VUE_APP_PUBLIC_PATH,
140
- outputDir: 'dist',
141
- assetsDir: 'static',
142
- productionSourceMap: false
143
- }
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
+ }
78
+ },
79
+ pluginOptions: {
80
+ 'style-resources-loader': {
81
+ preProcessor: 'less',
82
+ patterns: [path.resolve(__dirname, './src/theme/theme.less')]
83
+ }
84
+ },
85
+ configureWebpack: config => {
86
+ config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
87
+ config.performance = {
88
+ hints: false
89
+ }
90
+ config.plugins.push(
91
+ new ThemeColorReplacer({
92
+ fileName: 'css/theme-colors-[contenthash:8].css',
93
+ matchColors: getThemeColors(),
94
+ injectCss: true,
95
+ resolveCss
96
+ })
97
+ )
98
+ // Ignore all locale files of moment.js
99
+ config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
100
+ // 生产环境下将资源压缩成gzip格式
101
+ if (isProd) {
102
+ // add `CompressionWebpack` plugin to webpack plugins
103
+ config.plugins.push(new CompressionWebpackPlugin({
104
+ algorithm: 'gzip',
105
+ test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
106
+ threshold: 10240,
107
+ minRatio: 0.8
108
+ }))
109
+ }
110
+ // if prod, add externals
111
+ // if (isProd) {
112
+ // config.externals = assetsCDN.externals
113
+ // }
114
+ },
115
+ chainWebpack: config => {
116
+ // 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
117
+ if (isProd) {
118
+ config.plugin('optimize-css')
119
+ .tap(args => {
120
+ args[0].cssnanoOptions.preset[1].colormin = false
121
+ return args
122
+ })
123
+ }
124
+ // 生产环境下使用CDN
125
+ // if (isProd) {
126
+ // config.plugin('html')
127
+ // .tap(args => {
128
+ // args[0].cdn = assetsCDN
129
+ // return args
130
+ // })
131
+ // }
132
+ config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
133
+ },
134
+ css: {
135
+ loaderOptions: {
136
+ less: {
137
+ lessOptions: {
138
+ modifyVars: modifyVars(),
139
+ javascriptEnabled: true
140
+ }
141
+ }
142
+ }
143
+ },
144
+ publicPath: process.env.VUE_APP_PUBLIC_PATH,
145
+ outputDir: 'dist',
146
+ assetsDir: 'static',
147
+ productionSourceMap: false
148
+ }