vue2-client 1.3.1 → 1.3.4
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/CHANGELOG.md +9 -1
- package/index.js +30 -28
- package/package.json +1 -1
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -163
- package/src/base-client/components/common/ScrollList/ScrollList.vue +113 -0
- package/src/base-client/components/common/ScrollList/index.js +3 -0
- package/src/base-client/components/common/Upload/Upload.vue +161 -158
- package/src/base-client/components/common/XAddForm/XAddForm.vue +349 -349
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +321 -322
- package/src/base-client/components/common/XForm/XForm.vue +273 -268
- package/src/base-client/components/common/XForm/XFormItem.vue +387 -371
- package/src/base-client/components/common/XFormTable/XFormTable.vue +6 -5
- package/src/base-client/components/common/XTable/XTable.vue +278 -274
- package/src/base-client/components/{iot → system}/LogDetailsView/LogDetailsView.vue +0 -0
- package/src/base-client/components/{iot → system}/LogDetailsView/index.js +0 -0
- package/src/base-client/components/{iot → system}/LogDetailsView/index.md +0 -0
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -280
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +806 -804
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +24 -24
- package/src/base-client/plugins/PagedList.js +177 -176
- package/src/components/STable/index.js +318 -316
- package/src/components/index.js +36 -36
- package/src/components/table/StandardTable.vue +141 -142
- package/src/components/tool/TagSelect.vue +83 -83
- package/src/layouts/header/AdminHeader.vue +104 -109
- package/src/layouts/header/HeaderNotice.vue +167 -199
- package/src/layouts/header/InstitutionDetail.vue +181 -182
- package/src/pages/CreateQueryPage.vue +65 -59
- package/src/pages/system/dictionary/index.vue +43 -41
- package/src/pages/system/file/Info.vue +56 -0
- package/src/pages/system/file/index.vue +317 -0
- package/src/pages/system/queryParams/index.vue +43 -41
- package/src/pages/system/ticket/index.vue +458 -452
- package/src/pages/system/ticket/submitTicketSuccess.vue +206 -203
- package/src/router/async/config.async.js +2 -1
- package/src/router/async/router.map.js +56 -60
- package/src/services/api/DictionaryDetailsViewApi.js +6 -6
- package/src/services/api/LogDetailsViewApi.js +10 -10
- package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
- package/src/services/api/TicketDetailsViewApi.js +42 -40
- package/src/services/api/commonTempTable.js +10 -0
- package/src/services/api/index.js +2 -24
- package/src/services/api/manage.js +8 -16
- package/src/utils/excel/Blob.js +181 -181
- package/src/utils/excel/Export2Excel.js +141 -142
- package/src/utils/i18n.js +80 -80
- package/src/utils/request.js +4 -4
- package/src/utils/routerUtil.js +358 -350
- package/src/utils/theme-color-replacer-extend.js +91 -92
- package/vue.config.js +109 -163
- package/src/base-client/all.js +0 -62
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +0 -225
- package/src/base-client/components/iot/CustomerDetailsView/index.js +0 -3
- package/src/base-client/components/iot/CustomerDetailsView/index.md +0 -40
- package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +0 -127
- package/src/base-client/components/iot/DataAnalysisUser/index.js +0 -3
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +0 -452
- package/src/base-client/components/iot/DeviceBrandDetailsView/index.js +0 -3
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +0 -232
- package/src/base-client/components/iot/DeviceDetailsView/index.js +0 -3
- package/src/base-client/components/iot/DeviceDetailsView/index.md +0 -41
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +0 -678
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +0 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +0 -122
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +0 -121
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +0 -269
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +0 -131
- package/src/base-client/components/iot/DeviceDetailsView/part/index.js +0 -8
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +0 -300
- package/src/base-client/components/iot/DeviceTypeDetailsView/index.js +0 -3
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +0 -464
- package/src/base-client/components/iot/InstructDetailsView/index.js +0 -3
- package/src/base-client/components/iot/InstructDetailsView/index.md +0 -43
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +0 -352
- package/src/base-client/components/iot/MeterDetailsView/index.js +0 -3
- package/src/base-client/components/iot/MeterDetailsView/index.md +0 -41
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +0 -330
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +0 -179
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +0 -285
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +0 -230
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +0 -251
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +0 -184
- package/src/base-client/components/iot/MeterDetailsView/part/index.js +0 -9
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +0 -960
- package/src/base-client/components/iot/WebmeterAnalysisView/index.js +0 -3
- package/src/base-client/components/iot/WebmeterAnalysisView/index.md +0 -42
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +0 -370
- package/src/base-client/components/ticket/EmployeeDetailsView/index.js +0 -3
- package/src/base-client/components/ticket/EmployeeDetailsView/index.md +0 -28
- package/src/components/Charts/DataUserOrderSituation.vue +0 -77
- package/src/components/Charts/DataUserReporting.vue +0 -74
- package/src/components/Charts/DataUserSituation.vue +0 -107
- package/src/services/api/CustomerDetailsViewApi.js +0 -6
- package/src/services/api/DeviceBrandDetailsViewApi.js +0 -14
- package/src/services/api/DeviceDetailsViewApi.js +0 -10
- package/src/services/api/DeviceTypeDetailsViewApi.js +0 -6
- package/src/services/api/EmployeeDetailsViewApi.js +0 -12
- package/src/services/api/FormGroupEditApi.js +0 -6
- package/src/services/api/InstructDetailsViewApi.js +0 -12
- package/src/services/api/MeterDetailsViewApi.js +0 -24
- package/src/services/api/WebmeterAnalysisViewApi.js +0 -24
- package/src/services/api/applyInstallApi.js +0 -14
- package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +0 -18
- package/src/services/api/iot.js +0 -7
- package/src/services/api/service.js +0 -12
|
@@ -1,92 +1,91 @@
|
|
|
1
|
-
const { cssResolve } = require('../config/replacer')
|
|
2
|
-
// 修正 webpack-theme-color-replacer 插件提取的 css 结果
|
|
3
|
-
function resolveCss (output, srcArr) {
|
|
4
|
-
const regExps = []
|
|
5
|
-
// 提取 resolve 配置中所有的正则配置
|
|
6
|
-
Object.keys(cssResolve).forEach(key => {
|
|
7
|
-
let isRegExp = false
|
|
8
|
-
let reg = {}
|
|
9
|
-
try {
|
|
10
|
-
reg = eval(key)
|
|
11
|
-
isRegExp = reg instanceof RegExp
|
|
12
|
-
} catch (e) {
|
|
13
|
-
isRegExp = false
|
|
14
|
-
}
|
|
15
|
-
if (isRegExp) {
|
|
16
|
-
regExps.push([reg, cssResolve[key]])
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
// 去重
|
|
21
|
-
srcArr = dropDuplicate(srcArr)
|
|
22
|
-
|
|
23
|
-
// 处理 css
|
|
24
|
-
const outArr = []
|
|
25
|
-
srcArr.forEach(text => {
|
|
26
|
-
// 转换为 css 对象
|
|
27
|
-
const cssObj = parseCssObj(text)
|
|
28
|
-
// 根据selector匹配配置,匹配成功,则按配置处理 css
|
|
29
|
-
if (cssResolve[cssObj.selector] != undefined) {
|
|
30
|
-
const cfg = cssResolve[cssObj.selector]
|
|
31
|
-
if (cfg) {
|
|
32
|
-
outArr.push(cfg.resolve(text, cssObj))
|
|
33
|
-
}
|
|
34
|
-
} else {
|
|
35
|
-
let cssText = ''
|
|
36
|
-
// 匹配不成功,则测试是否有匹配的正则配置,有则按正则对应的配置处理
|
|
37
|
-
for (const regExp of regExps) {
|
|
38
|
-
if (regExp[0].test(cssObj.selector)) {
|
|
39
|
-
const cssCfg = regExp[1]
|
|
40
|
-
cssText = cssCfg ? cssCfg.resolve(text, cssObj) : ''
|
|
41
|
-
break
|
|
42
|
-
}
|
|
43
|
-
// 未匹配到正则,则设置 cssText 为默认的 css(即不处理)
|
|
44
|
-
cssText = text
|
|
45
|
-
}
|
|
46
|
-
if (cssText != '') {
|
|
47
|
-
outArr.push(cssText)
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
output = outArr.join('\n')
|
|
52
|
-
return output
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// 数组去重
|
|
56
|
-
function dropDuplicate (arr) {
|
|
57
|
-
const map = {}
|
|
58
|
-
const r = []
|
|
59
|
-
for (const s of arr) {
|
|
60
|
-
if (!map[s]) {
|
|
61
|
-
r.push(s)
|
|
62
|
-
map[s] = 1
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return r
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* 从字符串解析 css 对象
|
|
70
|
-
* @param cssText
|
|
71
|
-
* @returns {{
|
|
72
|
-
* name: String,
|
|
73
|
-
* rules: Array[String],
|
|
74
|
-
* toText: function
|
|
75
|
-
* }}
|
|
76
|
-
*/
|
|
77
|
-
function parseCssObj (cssText) {
|
|
78
|
-
const css = {}
|
|
79
|
-
const ruleIndex = cssText.indexOf('{')
|
|
80
|
-
css.selector = cssText.substring(0, ruleIndex)
|
|
81
|
-
const ruleBody = cssText.substring(ruleIndex + 1, cssText.length - 1)
|
|
82
|
-
|
|
83
|
-
css.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
module.exports = { resolveCss }
|
|
1
|
+
const { cssResolve } = require('../config/replacer')
|
|
2
|
+
// 修正 webpack-theme-color-replacer 插件提取的 css 结果
|
|
3
|
+
function resolveCss (output, srcArr) {
|
|
4
|
+
const regExps = []
|
|
5
|
+
// 提取 resolve 配置中所有的正则配置
|
|
6
|
+
Object.keys(cssResolve).forEach(key => {
|
|
7
|
+
let isRegExp = false
|
|
8
|
+
let reg = {}
|
|
9
|
+
try {
|
|
10
|
+
reg = eval(key)
|
|
11
|
+
isRegExp = reg instanceof RegExp
|
|
12
|
+
} catch (e) {
|
|
13
|
+
isRegExp = false
|
|
14
|
+
}
|
|
15
|
+
if (isRegExp) {
|
|
16
|
+
regExps.push([reg, cssResolve[key]])
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
// 去重
|
|
21
|
+
srcArr = dropDuplicate(srcArr)
|
|
22
|
+
|
|
23
|
+
// 处理 css
|
|
24
|
+
const outArr = []
|
|
25
|
+
srcArr.forEach(text => {
|
|
26
|
+
// 转换为 css 对象
|
|
27
|
+
const cssObj = parseCssObj(text)
|
|
28
|
+
// 根据selector匹配配置,匹配成功,则按配置处理 css
|
|
29
|
+
if (cssResolve[cssObj.selector] != undefined) {
|
|
30
|
+
const cfg = cssResolve[cssObj.selector]
|
|
31
|
+
if (cfg) {
|
|
32
|
+
outArr.push(cfg.resolve(text, cssObj))
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
let cssText = ''
|
|
36
|
+
// 匹配不成功,则测试是否有匹配的正则配置,有则按正则对应的配置处理
|
|
37
|
+
for (const regExp of regExps) {
|
|
38
|
+
if (regExp[0].test(cssObj.selector)) {
|
|
39
|
+
const cssCfg = regExp[1]
|
|
40
|
+
cssText = cssCfg ? cssCfg.resolve(text, cssObj) : ''
|
|
41
|
+
break
|
|
42
|
+
}
|
|
43
|
+
// 未匹配到正则,则设置 cssText 为默认的 css(即不处理)
|
|
44
|
+
cssText = text
|
|
45
|
+
}
|
|
46
|
+
if (cssText != '') {
|
|
47
|
+
outArr.push(cssText)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
output = outArr.join('\n')
|
|
52
|
+
return output
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 数组去重
|
|
56
|
+
function dropDuplicate (arr) {
|
|
57
|
+
const map = {}
|
|
58
|
+
const r = []
|
|
59
|
+
for (const s of arr) {
|
|
60
|
+
if (!map[s]) {
|
|
61
|
+
r.push(s)
|
|
62
|
+
map[s] = 1
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return r
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 从字符串解析 css 对象
|
|
70
|
+
* @param cssText
|
|
71
|
+
* @returns {{
|
|
72
|
+
* name: String,
|
|
73
|
+
* rules: Array[String],
|
|
74
|
+
* toText: function
|
|
75
|
+
* }}
|
|
76
|
+
*/
|
|
77
|
+
function parseCssObj (cssText) {
|
|
78
|
+
const css = {}
|
|
79
|
+
const ruleIndex = cssText.indexOf('{')
|
|
80
|
+
css.selector = cssText.substring(0, ruleIndex)
|
|
81
|
+
const ruleBody = cssText.substring(ruleIndex + 1, cssText.length - 1)
|
|
82
|
+
css.rules = ruleBody.split(';')
|
|
83
|
+
css.toText = function () {
|
|
84
|
+
let body = ''
|
|
85
|
+
this.rules.forEach(item => { body += item + ';' })
|
|
86
|
+
return `${this.selector}{${body}}`
|
|
87
|
+
}
|
|
88
|
+
return css
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
module.exports = { resolveCss }
|
package/vue.config.js
CHANGED
|
@@ -1,163 +1,109 @@
|
|
|
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
|
-
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
'
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
resolveCss
|
|
111
|
-
})
|
|
112
|
-
)
|
|
113
|
-
// Ignore all locale files of moment.js
|
|
114
|
-
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
|
|
115
|
-
// 生产环境下将资源压缩成gzip格式
|
|
116
|
-
if (isProd) {
|
|
117
|
-
// add `CompressionWebpack` plugin to webpack plugins
|
|
118
|
-
config.plugins.push(new CompressionWebpackPlugin({
|
|
119
|
-
algorithm: 'gzip',
|
|
120
|
-
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
|
121
|
-
threshold: 10240,
|
|
122
|
-
minRatio: 0.8
|
|
123
|
-
}))
|
|
124
|
-
}
|
|
125
|
-
// if prod, add externals
|
|
126
|
-
// if (isProd) {
|
|
127
|
-
// config.externals = assetsCDN.externals
|
|
128
|
-
// }
|
|
129
|
-
},
|
|
130
|
-
chainWebpack: config => {
|
|
131
|
-
// 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
|
|
132
|
-
if (isProd) {
|
|
133
|
-
config.plugin('optimize-css')
|
|
134
|
-
.tap(args => {
|
|
135
|
-
args[0].cssnanoOptions.preset[1].colormin = false
|
|
136
|
-
return args
|
|
137
|
-
})
|
|
138
|
-
}
|
|
139
|
-
// 生产环境下使用CDN
|
|
140
|
-
// if (isProd) {
|
|
141
|
-
// config.plugin('html')
|
|
142
|
-
// .tap(args => {
|
|
143
|
-
// args[0].cdn = assetsCDN
|
|
144
|
-
// return args
|
|
145
|
-
// })
|
|
146
|
-
// }
|
|
147
|
-
config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
|
|
148
|
-
},
|
|
149
|
-
css: {
|
|
150
|
-
loaderOptions: {
|
|
151
|
-
less: {
|
|
152
|
-
lessOptions: {
|
|
153
|
-
modifyVars: modifyVars(),
|
|
154
|
-
javascriptEnabled: true
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
160
|
-
outputDir: 'dist',
|
|
161
|
-
assetsDir: 'static',
|
|
162
|
-
productionSourceMap: false
|
|
163
|
-
}
|
|
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 server = 'http://121.36.106.17:8400'
|
|
12
|
+
// const local = 'http://localhost:8445/webmeter'
|
|
13
|
+
const local = 'http://123.60.214.109:8406'
|
|
14
|
+
|
|
15
|
+
module.exports = {
|
|
16
|
+
devServer: {
|
|
17
|
+
// development server port 8000
|
|
18
|
+
port: 8001,
|
|
19
|
+
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
|
20
|
+
proxy: {
|
|
21
|
+
'/rs': {
|
|
22
|
+
target: server,
|
|
23
|
+
ws: false,
|
|
24
|
+
changeOrigin: true
|
|
25
|
+
},
|
|
26
|
+
'/af-system/entity': {
|
|
27
|
+
pathRewrite: { '^/af-system/entity': '/rs/entity' },
|
|
28
|
+
target: local,
|
|
29
|
+
changeOrigin: true
|
|
30
|
+
},
|
|
31
|
+
'/af-system/upload': {
|
|
32
|
+
pathRewrite: { '^/af-system/upload': '/rs/file/upload' },
|
|
33
|
+
target: local,
|
|
34
|
+
changeOrigin: true
|
|
35
|
+
},
|
|
36
|
+
'/af-system/resource': {
|
|
37
|
+
pathRewrite: { '^/af-system/resource': '/rs/resource' },
|
|
38
|
+
target: local,
|
|
39
|
+
changeOrigin: true
|
|
40
|
+
},
|
|
41
|
+
'/af-system': {
|
|
42
|
+
pathRewrite: { '^/af-system': '/rs/logic' },
|
|
43
|
+
target: local,
|
|
44
|
+
changeOrigin: true
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
pluginOptions: {
|
|
49
|
+
'style-resources-loader': {
|
|
50
|
+
preProcessor: 'less',
|
|
51
|
+
patterns: [path.resolve(__dirname, './src/theme/theme.less')]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
configureWebpack: config => {
|
|
55
|
+
config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
|
|
56
|
+
config.performance = {
|
|
57
|
+
hints: false
|
|
58
|
+
}
|
|
59
|
+
config.plugins.push(
|
|
60
|
+
new ThemeColorReplacer({
|
|
61
|
+
fileName: 'css/theme-colors-[contenthash:8].css',
|
|
62
|
+
matchColors: getThemeColors(),
|
|
63
|
+
injectCss: true,
|
|
64
|
+
resolveCss
|
|
65
|
+
})
|
|
66
|
+
)
|
|
67
|
+
// Ignore all locale files of moment.js
|
|
68
|
+
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
|
|
69
|
+
// 生产环境下将资源压缩成gzip格式
|
|
70
|
+
if (isProd) {
|
|
71
|
+
// add `CompressionWebpack` plugin to webpack plugins
|
|
72
|
+
config.plugins.push(new CompressionWebpackPlugin({
|
|
73
|
+
algorithm: 'gzip',
|
|
74
|
+
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
|
75
|
+
threshold: 10240,
|
|
76
|
+
minRatio: 0.8
|
|
77
|
+
}))
|
|
78
|
+
}
|
|
79
|
+
// if prod, add externals
|
|
80
|
+
// if (isProd) {
|
|
81
|
+
// config.externals = assetsCDN.externals
|
|
82
|
+
// }
|
|
83
|
+
},
|
|
84
|
+
chainWebpack: config => {
|
|
85
|
+
// 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
|
|
86
|
+
if (isProd) {
|
|
87
|
+
config.plugin('optimize-css')
|
|
88
|
+
.tap(args => {
|
|
89
|
+
args[0].cssnanoOptions.preset[1].colormin = false
|
|
90
|
+
return args
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
|
|
94
|
+
},
|
|
95
|
+
css: {
|
|
96
|
+
loaderOptions: {
|
|
97
|
+
less: {
|
|
98
|
+
lessOptions: {
|
|
99
|
+
modifyVars: modifyVars(),
|
|
100
|
+
javascriptEnabled: true
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
106
|
+
outputDir: 'dist',
|
|
107
|
+
assetsDir: 'static',
|
|
108
|
+
productionSourceMap: false
|
|
109
|
+
}
|
package/src/base-client/all.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
|
|
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 DataAnalysisUser from '@vue2-client/base-client/components/iot/DataAnalysisUser'
|
|
13
|
-
import AmapPointRendering from '@vue2-client/base-client/components/common/AmapMarker'
|
|
14
|
-
import DeviceTypeDetailsView from '@vue2-client/base-client/components/iot/DeviceTypeDetailsView'
|
|
15
|
-
import DeviceBrandDetailsView from '@vue2-client/base-client/components/iot/DeviceBrandDetailsView'
|
|
16
|
-
import DictionaryDetailsView from '@vue2-client/base-client/components/system/DictionaryDetailsView'
|
|
17
|
-
import QueryParamsDetailsView from '@vue2-client/base-client/components/system/QueryParamsDetailsView'
|
|
18
|
-
import DeviceDetailsView from '@vue2-client/base-client/components/iot/DeviceDetailsView'
|
|
19
|
-
import TicketDetailsView from '@vue2-client/base-client/components/ticket/TicketDetailsView'
|
|
20
|
-
import EmployeeDetailsView from '@vue2-client/base-client/components/ticket/EmployeeDetailsView'
|
|
21
|
-
import submitTicketSuccess from '@vue2-client/base-client/components/ticket/TicketSubmitSuccessView'
|
|
22
|
-
import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
|
|
23
|
-
import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
|
|
24
|
-
import FormGroupQuery from '@vue2-client/base-client/components/common/FormGroupQuery'
|
|
25
|
-
import FormGroupEdit from '@vue2-client/base-client/components/common/FormGroupEdit'
|
|
26
|
-
import JSONToTree from '@vue2-client/base-client/components/common/JSONToTree'
|
|
27
|
-
import Upload from '@vue2-client/base-client/components/common/Upload'
|
|
28
|
-
import AddressSearchCombobox from '@vue2-client/base-client/components/common/AddressSearchCombobox'
|
|
29
|
-
import CitySelect from '@vue2-client/base-client/components/common/CitySelect'
|
|
30
|
-
import PersonSetting from '@vue2-client/base-client/components/common/PersonSetting'
|
|
31
|
-
// 插件
|
|
32
|
-
import Plugins from '@vue2-client/base-client/plugins'
|
|
33
|
-
Vue.use(Plugins)
|
|
34
|
-
|
|
35
|
-
Vue.component('custom-columns-drawer', CustomColumnsDrawer)
|
|
36
|
-
Vue.component('InstructDetailsView', InstructDetailsView)
|
|
37
|
-
Vue.component('MeterDetailsView', MeterDetailsView)
|
|
38
|
-
Vue.component('CustomerDetailsView', CustomerDetailsView)
|
|
39
|
-
Vue.component('LogDetailsView', LogDetailsView)
|
|
40
|
-
Vue.component('WebmeterAnalysisView', WebmeterAnalysisView)
|
|
41
|
-
Vue.component('XCard', XCard)
|
|
42
|
-
Vue.component('XBadge', XBadge)
|
|
43
|
-
Vue.component('XFormCol', XFormCol)
|
|
44
|
-
Vue.component('DataAnalysisUser', DataAnalysisUser)
|
|
45
|
-
Vue.component('DeviceTypeDetailsView', DeviceTypeDetailsView)
|
|
46
|
-
Vue.component('DeviceBrandDetailsView', DeviceBrandDetailsView)
|
|
47
|
-
Vue.component('DeviceDetailsView', DeviceDetailsView)
|
|
48
|
-
Vue.component('DictionaryDetailsView', DictionaryDetailsView)
|
|
49
|
-
Vue.component('QueryParamsDetailsView', QueryParamsDetailsView)
|
|
50
|
-
Vue.component('TicketDetailsView', TicketDetailsView)
|
|
51
|
-
Vue.component('EmployeeDetailsView', EmployeeDetailsView)
|
|
52
|
-
Vue.component('submitTicketSuccess', submitTicketSuccess)
|
|
53
|
-
Vue.component('CreateQuery', CreateQuery)
|
|
54
|
-
Vue.component('CreateSimpleFormQuery', CreateSimpleFormQuery)
|
|
55
|
-
Vue.component('FormGroupQuery', FormGroupQuery)
|
|
56
|
-
Vue.component('FormGroupEdit', FormGroupEdit)
|
|
57
|
-
Vue.component('JSONToTree', JSONToTree)
|
|
58
|
-
Vue.component('Upload', Upload)
|
|
59
|
-
Vue.component('AmapPointRendering', AmapPointRendering)
|
|
60
|
-
Vue.component('AddressSearchCombobox', AddressSearchCombobox)
|
|
61
|
-
Vue.component('CitySelect', CitySelect)
|
|
62
|
-
Vue.component('PersonSetting', PersonSetting)
|