vue2-client 1.3.6 → 1.3.9
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 +1 -1
- package/package.json +1 -1
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +4 -4
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1 -1
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +1 -1
- package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
- package/src/base-client/components/common/Upload/Upload.vue +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +6 -2
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +7 -2
- package/src/base-client/components/common/XForm/XForm.vue +1 -1
- package/src/base-client/components/common/XForm/XFormItem.vue +4 -2
- package/src/base-client/components/common/XFormTable/XFormTable.vue +1 -0
- package/src/base-client/components/system/LogDetailsView/LogDetailsView.vue +376 -372
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +1 -1
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +14 -13
- package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +1 -1
- package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
- package/src/base-client/plugins/AppData.js +4 -6
- package/src/base-client/plugins/GetLoginInfoService.js +252 -252
- package/src/base-client/plugins/PagedList.js +3 -3
- package/src/base-client/plugins/i18n-extend.js +32 -32
- 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/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/checkbox/ImgCheckbox.vue +163 -163
- package/src/components/exception/ExceptionPage.vue +70 -70
- package/src/components/form/FormRow.vue +52 -52
- package/src/components/menu/SideMenu.vue +62 -62
- package/src/components/menu/menu.js +273 -273
- package/src/components/setting/Setting.vue +235 -235
- package/src/components/table/advance/ActionColumns.vue +158 -158
- package/src/components/table/advance/SearchArea.vue +355 -355
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/components/tool/AvatarList.vue +68 -69
- package/src/components/tool/Drawer.vue +142 -142
- package/src/components/transition/PageToggleTransition.vue +97 -97
- package/src/config/replacer/resolve.config.js +67 -67
- package/src/layouts/AdminLayout.vue +174 -174
- package/src/layouts/header/AdminHeader.vue +3 -3
- package/src/layouts/header/HeaderNotice.vue +1 -1
- package/src/layouts/header/HeaderSearch.vue +67 -67
- package/src/layouts/header/InstitutionDetail.vue +3 -3
- package/src/layouts/tabs/TabsHead.vue +190 -190
- package/src/layouts/tabs/TabsView.vue +379 -379
- package/src/mock/goods/index.js +108 -108
- package/src/pages/CreateQueryPage.vue +2 -2
- package/src/pages/report/ReportTable.js +124 -125
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/system/file/index.vue +3 -3
- package/src/pages/system/ticket/index.vue +4 -1
- package/src/services/api/DictionaryDetailsViewApi.js +1 -1
- package/src/services/api/LogDetailsViewApi.js +3 -3
- package/src/services/api/QueryParamsDetailsViewApi.js +1 -1
- package/src/services/api/TicketDetailsViewApi.js +15 -23
- package/src/services/api/common.js +11 -11
- package/src/services/api/commonTempTable.js +3 -3
- package/src/services/api/manage.js +2 -2
- package/src/theme/default/nprogress.less +76 -76
- package/src/utils/colors.js +103 -103
- package/src/utils/excel/Blob.js +53 -54
- package/src/utils/excel/Export2Excel.js +4 -4
- package/src/utils/formatter.js +68 -68
- package/src/utils/i18n.js +1 -1
- package/src/utils/routerUtil.js +3 -3
- package/src/utils/theme-color-replacer-extend.js +3 -3
- package/src/utils/themeUtil.js +100 -102
- package/src/utils/util.js +2 -2
- package/vue.config.js +5 -15
- package/vue2-client.iml +9 -0
|
@@ -16,7 +16,7 @@ function generateArray(table) {
|
|
|
16
16
|
let colspan = cell.getAttribute('colspan');
|
|
17
17
|
let rowspan = cell.getAttribute('rowspan');
|
|
18
18
|
let cellValue = cell.innerText;
|
|
19
|
-
if (cellValue !== "" && cellValue
|
|
19
|
+
if (cellValue !== "" && cellValue === +cellValue) cellValue = +cellValue;
|
|
20
20
|
|
|
21
21
|
//Skip ranges
|
|
22
22
|
ranges.forEach(function (range) {
|
|
@@ -52,8 +52,8 @@ function datenum(v, date1904) {
|
|
|
52
52
|
function sheet_from_array_of_arrays(data, opts) {
|
|
53
53
|
const ws = {};
|
|
54
54
|
const range = {s: {c: 10000000, r: 10000000}, e: {c: 0, r: 0}};
|
|
55
|
-
for (let R = 0; R
|
|
56
|
-
for (let C = 0; C
|
|
55
|
+
for (let R = 0; R !== data.length; ++R) {
|
|
56
|
+
for (let C = 0; C !== data[R].length; ++C) {
|
|
57
57
|
if (range.s.r > R) range.s.r = R;
|
|
58
58
|
if (range.s.c > C) range.s.c = C;
|
|
59
59
|
if (range.e.r < R) range.e.r = R;
|
|
@@ -86,7 +86,7 @@ function Workbook() {
|
|
|
86
86
|
function s2ab(s) {
|
|
87
87
|
const buf = new ArrayBuffer(s.length);
|
|
88
88
|
const view = new Uint8Array(buf);
|
|
89
|
-
for (let i = 0; i
|
|
89
|
+
for (let i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
|
|
90
90
|
return buf;
|
|
91
91
|
}
|
|
92
92
|
|
package/src/utils/formatter.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 把对象按照 js配置文件的格式进行格式化
|
|
3
|
-
* @param obj 格式化的对象
|
|
4
|
-
* @param dep 层级,此项无需传值
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
|
-
function formatConfig (obj, dep) {
|
|
8
|
-
dep = dep || 1
|
|
9
|
-
const LN = '\n'; const TAB = ' '
|
|
10
|
-
let indent = ''
|
|
11
|
-
for (let i = 0; i < dep; i++) {
|
|
12
|
-
indent += TAB
|
|
13
|
-
}
|
|
14
|
-
let isArray = false; let arrayLastIsObj = false
|
|
15
|
-
let str = ''; let prefix = '{'; let subfix = '}'
|
|
16
|
-
if (Array.isArray(obj)) {
|
|
17
|
-
isArray = true
|
|
18
|
-
prefix = '['
|
|
19
|
-
subfix = ']'
|
|
20
|
-
str = obj.map((item, index) => {
|
|
21
|
-
let format = ''
|
|
22
|
-
if (typeof item == 'function') {
|
|
23
|
-
//
|
|
24
|
-
} else if (typeof item == 'object') {
|
|
25
|
-
arrayLastIsObj = true
|
|
26
|
-
format = `${LN}${indent}${formatConfig(item, dep + 1)},`
|
|
27
|
-
} else if ((typeof item == 'number' && !isNaN(item)) || typeof item == 'boolean') {
|
|
28
|
-
format = `${item},`
|
|
29
|
-
} else if (typeof item == 'string') {
|
|
30
|
-
format = `'${item}',`
|
|
31
|
-
}
|
|
32
|
-
if (index
|
|
33
|
-
format = format.substring(0, format.length - 1)
|
|
34
|
-
} else {
|
|
35
|
-
arrayLastIsObj = false
|
|
36
|
-
}
|
|
37
|
-
return format
|
|
38
|
-
}).join('')
|
|
39
|
-
} else if (typeof obj != 'function' && typeof obj == 'object') {
|
|
40
|
-
str = Object.keys(obj).map((key, index, keys) => {
|
|
41
|
-
const val = obj[key]
|
|
42
|
-
let format = ''
|
|
43
|
-
if (typeof val == 'function') {
|
|
44
|
-
//
|
|
45
|
-
} else if (typeof val == 'object') {
|
|
46
|
-
format = `${LN}${indent}${key}: ${formatConfig(val, dep + 1)},`
|
|
47
|
-
} else if ((typeof val == 'number' && !isNaN(val)) || typeof val == 'boolean') {
|
|
48
|
-
format = `${LN}${indent}${key}: ${val},`
|
|
49
|
-
} else if (typeof val == 'string') {
|
|
50
|
-
format = `${LN}${indent}${key}: '${val}',`
|
|
51
|
-
}
|
|
52
|
-
if (index
|
|
53
|
-
format = format.substring(0, format.length - 1)
|
|
54
|
-
}
|
|
55
|
-
return format
|
|
56
|
-
}).join('')
|
|
57
|
-
}
|
|
58
|
-
const len = TAB.length
|
|
59
|
-
if (indent.length >= len) {
|
|
60
|
-
indent = indent.substring(0, indent.length - len)
|
|
61
|
-
}
|
|
62
|
-
if (!isArray || arrayLastIsObj) {
|
|
63
|
-
subfix = LN + indent + subfix
|
|
64
|
-
}
|
|
65
|
-
return `${prefix}${str}${subfix}`
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
module.exports = { formatConfig }
|
|
1
|
+
/**
|
|
2
|
+
* 把对象按照 js配置文件的格式进行格式化
|
|
3
|
+
* @param obj 格式化的对象
|
|
4
|
+
* @param dep 层级,此项无需传值
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
function formatConfig (obj, dep) {
|
|
8
|
+
dep = dep || 1
|
|
9
|
+
const LN = '\n'; const TAB = ' '
|
|
10
|
+
let indent = ''
|
|
11
|
+
for (let i = 0; i < dep; i++) {
|
|
12
|
+
indent += TAB
|
|
13
|
+
}
|
|
14
|
+
let isArray = false; let arrayLastIsObj = false
|
|
15
|
+
let str = ''; let prefix = '{'; let subfix = '}'
|
|
16
|
+
if (Array.isArray(obj)) {
|
|
17
|
+
isArray = true
|
|
18
|
+
prefix = '['
|
|
19
|
+
subfix = ']'
|
|
20
|
+
str = obj.map((item, index) => {
|
|
21
|
+
let format = ''
|
|
22
|
+
if (typeof item == 'function') {
|
|
23
|
+
//
|
|
24
|
+
} else if (typeof item == 'object') {
|
|
25
|
+
arrayLastIsObj = true
|
|
26
|
+
format = `${LN}${indent}${formatConfig(item, dep + 1)},`
|
|
27
|
+
} else if ((typeof item == 'number' && !isNaN(item)) || typeof item == 'boolean') {
|
|
28
|
+
format = `${item},`
|
|
29
|
+
} else if (typeof item == 'string') {
|
|
30
|
+
format = `'${item}',`
|
|
31
|
+
}
|
|
32
|
+
if (index === obj.length - 1) {
|
|
33
|
+
format = format.substring(0, format.length - 1)
|
|
34
|
+
} else {
|
|
35
|
+
arrayLastIsObj = false
|
|
36
|
+
}
|
|
37
|
+
return format
|
|
38
|
+
}).join('')
|
|
39
|
+
} else if (typeof obj != 'function' && typeof obj == 'object') {
|
|
40
|
+
str = Object.keys(obj).map((key, index, keys) => {
|
|
41
|
+
const val = obj[key]
|
|
42
|
+
let format = ''
|
|
43
|
+
if (typeof val == 'function') {
|
|
44
|
+
//
|
|
45
|
+
} else if (typeof val == 'object') {
|
|
46
|
+
format = `${LN}${indent}${key}: ${formatConfig(val, dep + 1)},`
|
|
47
|
+
} else if ((typeof val == 'number' && !isNaN(val)) || typeof val == 'boolean') {
|
|
48
|
+
format = `${LN}${indent}${key}: ${val},`
|
|
49
|
+
} else if (typeof val == 'string') {
|
|
50
|
+
format = `${LN}${indent}${key}: '${val}',`
|
|
51
|
+
}
|
|
52
|
+
if (index === keys.length - 1) {
|
|
53
|
+
format = format.substring(0, format.length - 1)
|
|
54
|
+
}
|
|
55
|
+
return format
|
|
56
|
+
}).join('')
|
|
57
|
+
}
|
|
58
|
+
const len = TAB.length
|
|
59
|
+
if (indent.length >= len) {
|
|
60
|
+
indent = indent.substring(0, indent.length - len)
|
|
61
|
+
}
|
|
62
|
+
if (!isArray || arrayLastIsObj) {
|
|
63
|
+
subfix = LN + indent + subfix
|
|
64
|
+
}
|
|
65
|
+
return `${prefix}${str}${subfix}`
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
module.exports = { formatConfig }
|
package/src/utils/i18n.js
CHANGED
|
@@ -30,7 +30,7 @@ function initI18n (locale, fallback) {
|
|
|
30
30
|
function generateI18n (lang, routes, valueKey) {
|
|
31
31
|
routes.forEach(route => {
|
|
32
32
|
const keys = getI18nKey(route.fullPath).split('.')
|
|
33
|
-
const value = valueKey === 'path' ? route[valueKey].split('/').filter(item => !item.startsWith(':') && item
|
|
33
|
+
const value = valueKey === 'path' ? route[valueKey].split('/').filter(item => !item.startsWith(':') && item !== '').join('.') : route[valueKey]
|
|
34
34
|
lang.assignProps(keys, value)
|
|
35
35
|
if (route.children) {
|
|
36
36
|
generateI18n(lang, route.children, valueKey)
|
package/src/utils/routerUtil.js
CHANGED
|
@@ -60,7 +60,7 @@ function parseRoutes (routesConfig, routerMap) {
|
|
|
60
60
|
routeCfg = { path: (router && router.path) || item, router: item }
|
|
61
61
|
} else if (typeof item === 'object') {
|
|
62
62
|
// 当没有设置路由对象名或者设置的是blank路由对象时, 给空界面, path为名称
|
|
63
|
-
if (!item.router || item.router
|
|
63
|
+
if (!item.router || item.router === 'blank') {
|
|
64
64
|
router = routerMap['blank']
|
|
65
65
|
item.path = item.name
|
|
66
66
|
} else {
|
|
@@ -145,7 +145,7 @@ function loadRoutes (routesConfig) {
|
|
|
145
145
|
const { router, store, i18n } = appOptions
|
|
146
146
|
|
|
147
147
|
// 刷新页面时,有些全局状态丢失,在此处从本地缓存拿出来赋值
|
|
148
|
-
if (JSON.stringify(Vue.$login.f)
|
|
148
|
+
if (JSON.stringify(Vue.$login.f) === '{}') {
|
|
149
149
|
const login = store.getters['account/login']
|
|
150
150
|
Object.assign(Vue.$login, login)
|
|
151
151
|
}
|
|
@@ -287,7 +287,7 @@ function formatAuthority (routes, pAuthorities = []) {
|
|
|
287
287
|
* @returns {*}
|
|
288
288
|
*/
|
|
289
289
|
function getI18nKey (path) {
|
|
290
|
-
const keys = path.split('/').filter(item => !item.startsWith(':') && item
|
|
290
|
+
const keys = path.split('/').filter(item => !item.startsWith(':') && item !== '')
|
|
291
291
|
keys.push('name')
|
|
292
292
|
return keys.join('.')
|
|
293
293
|
}
|
|
@@ -4,7 +4,7 @@ function resolveCss (output, srcArr) {
|
|
|
4
4
|
const regExps = []
|
|
5
5
|
// 提取 resolve 配置中所有的正则配置
|
|
6
6
|
Object.keys(cssResolve).forEach(key => {
|
|
7
|
-
let isRegExp
|
|
7
|
+
let isRegExp
|
|
8
8
|
let reg = {}
|
|
9
9
|
try {
|
|
10
10
|
reg = eval(key)
|
|
@@ -26,7 +26,7 @@ function resolveCss (output, srcArr) {
|
|
|
26
26
|
// 转换为 css 对象
|
|
27
27
|
const cssObj = parseCssObj(text)
|
|
28
28
|
// 根据selector匹配配置,匹配成功,则按配置处理 css
|
|
29
|
-
if (cssResolve[cssObj.selector]
|
|
29
|
+
if (cssResolve[cssObj.selector] !== undefined) {
|
|
30
30
|
const cfg = cssResolve[cssObj.selector]
|
|
31
31
|
if (cfg) {
|
|
32
32
|
outArr.push(cfg.resolve(text, cssObj))
|
|
@@ -43,7 +43,7 @@ function resolveCss (output, srcArr) {
|
|
|
43
43
|
// 未匹配到正则,则设置 cssText 为默认的 css(即不处理)
|
|
44
44
|
cssText = text
|
|
45
45
|
}
|
|
46
|
-
if (cssText
|
|
46
|
+
if (cssText !== '') {
|
|
47
47
|
outArr.push(cssText)
|
|
48
48
|
}
|
|
49
49
|
}
|
package/src/utils/themeUtil.js
CHANGED
|
@@ -1,102 +1,100 @@
|
|
|
1
|
-
const client = require('webpack-theme-color-replacer/client')
|
|
2
|
-
const { theme } = require('../config')
|
|
3
|
-
const { getMenuColors, getAntdColors, getThemeToggleColors, getFunctionalColors } = require('../utils/colors')
|
|
4
|
-
const { ANTD } = require('../config/default')
|
|
5
|
-
|
|
6
|
-
function getThemeColors (color, $theme) {
|
|
7
|
-
const _color = color || theme.color
|
|
8
|
-
const mode = $theme || theme.mode
|
|
9
|
-
const replaceColors = getThemeToggleColors(_color, mode)
|
|
10
|
-
|
|
11
|
-
...replaceColors.mainColors,
|
|
12
|
-
...replaceColors.subColors,
|
|
13
|
-
...replaceColors.menuColors,
|
|
14
|
-
...replaceColors.contentColors,
|
|
15
|
-
...replaceColors.rgbColors,
|
|
16
|
-
...replaceColors.functionalColors.success,
|
|
17
|
-
...replaceColors.functionalColors.warning,
|
|
18
|
-
...replaceColors.functionalColors.error
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
'primary-
|
|
36
|
-
'primary-
|
|
37
|
-
'primary-
|
|
38
|
-
'primary-
|
|
39
|
-
'primary-
|
|
40
|
-
'primary-
|
|
41
|
-
'primary-
|
|
42
|
-
'primary-
|
|
43
|
-
'primary-
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'alert-
|
|
51
|
-
'alert-
|
|
52
|
-
'alert-
|
|
53
|
-
'alert-
|
|
54
|
-
'alert-
|
|
55
|
-
'alert-
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
color
|
|
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
|
-
getLocalSetting
|
|
102
|
-
}
|
|
1
|
+
const client = require('webpack-theme-color-replacer/client')
|
|
2
|
+
const { theme } = require('../config')
|
|
3
|
+
const { getMenuColors, getAntdColors, getThemeToggleColors, getFunctionalColors } = require('../utils/colors')
|
|
4
|
+
const { ANTD } = require('../config/default')
|
|
5
|
+
|
|
6
|
+
function getThemeColors (color, $theme) {
|
|
7
|
+
const _color = color || theme.color
|
|
8
|
+
const mode = $theme || theme.mode
|
|
9
|
+
const replaceColors = getThemeToggleColors(_color, mode)
|
|
10
|
+
return [
|
|
11
|
+
...replaceColors.mainColors,
|
|
12
|
+
...replaceColors.subColors,
|
|
13
|
+
...replaceColors.menuColors,
|
|
14
|
+
...replaceColors.contentColors,
|
|
15
|
+
...replaceColors.rgbColors,
|
|
16
|
+
...replaceColors.functionalColors.success,
|
|
17
|
+
...replaceColors.functionalColors.warning,
|
|
18
|
+
...replaceColors.functionalColors.error
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function changeThemeColor (newColor, $theme) {
|
|
23
|
+
return client.changer.changeColor({newColors: getThemeColors(newColor, $theme)})
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function modifyVars (color) {
|
|
27
|
+
const _color = color || theme.color
|
|
28
|
+
const palettes = getAntdColors(_color, theme.mode)
|
|
29
|
+
const menuColors = getMenuColors(_color, theme.mode)
|
|
30
|
+
const { success, warning, error } = getFunctionalColors(theme.mode)
|
|
31
|
+
const primary = palettes[5]
|
|
32
|
+
return {
|
|
33
|
+
'primary-color': primary,
|
|
34
|
+
'primary-1': palettes[0],
|
|
35
|
+
'primary-2': palettes[1],
|
|
36
|
+
'primary-3': palettes[2],
|
|
37
|
+
'primary-4': palettes[3],
|
|
38
|
+
'primary-5': palettes[4],
|
|
39
|
+
'primary-6': palettes[5],
|
|
40
|
+
'primary-7': palettes[6],
|
|
41
|
+
'primary-8': palettes[7],
|
|
42
|
+
'primary-9': palettes[8],
|
|
43
|
+
'primary-10': palettes[9],
|
|
44
|
+
'info-color': primary,
|
|
45
|
+
'success-color': success[5],
|
|
46
|
+
'warning-color': warning[5],
|
|
47
|
+
'error-color': error[5],
|
|
48
|
+
'alert-info-bg-color': palettes[0],
|
|
49
|
+
'alert-info-border-color': palettes[2],
|
|
50
|
+
'alert-success-bg-color': success[0],
|
|
51
|
+
'alert-success-border-color': success[2],
|
|
52
|
+
'alert-warning-bg-color': warning[0],
|
|
53
|
+
'alert-warning-border-color': warning[2],
|
|
54
|
+
'alert-error-bg-color': error[0],
|
|
55
|
+
'alert-error-border-color': error[2],
|
|
56
|
+
'processing-color': primary,
|
|
57
|
+
'menu-dark-submenu-bg': menuColors[0],
|
|
58
|
+
'layout-header-background': menuColors[1],
|
|
59
|
+
'layout-trigger-background': menuColors[2],
|
|
60
|
+
'btn-danger-bg': error[4],
|
|
61
|
+
'btn-danger-border': error[4],
|
|
62
|
+
...ANTD.theme[theme.mode]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function loadLocalTheme (localSetting) {
|
|
67
|
+
if (localSetting && localSetting.theme) {
|
|
68
|
+
let { color, mode } = localSetting.theme
|
|
69
|
+
color = color || theme.color
|
|
70
|
+
mode = mode || theme.mode
|
|
71
|
+
changeThemeColor(color, mode)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 获取本地保存的配置
|
|
77
|
+
* @param load {boolean} 是否加载配置中的主题
|
|
78
|
+
* @returns {Object}
|
|
79
|
+
*/
|
|
80
|
+
function getLocalSetting (loadTheme) {
|
|
81
|
+
let localSetting = {}
|
|
82
|
+
try {
|
|
83
|
+
const localSettingStr = localStorage.getItem(process.env.VUE_APP_SETTING_KEY)
|
|
84
|
+
localSetting = JSON.parse(localSettingStr)
|
|
85
|
+
} catch (e) {
|
|
86
|
+
console.error(e)
|
|
87
|
+
}
|
|
88
|
+
if (loadTheme) {
|
|
89
|
+
loadLocalTheme(localSetting)
|
|
90
|
+
}
|
|
91
|
+
return localSetting
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
module.exports = {
|
|
95
|
+
getThemeColors,
|
|
96
|
+
changeThemeColor,
|
|
97
|
+
modifyVars,
|
|
98
|
+
loadLocalTheme,
|
|
99
|
+
getLocalSetting
|
|
100
|
+
}
|
package/src/utils/util.js
CHANGED
|
@@ -27,8 +27,8 @@ const timeList = [
|
|
|
27
27
|
* 数组去空值
|
|
28
28
|
*/
|
|
29
29
|
export function arrRemoveEmpty (arr) {
|
|
30
|
-
for (
|
|
31
|
-
if (arr[i]
|
|
30
|
+
for (let i = 0; i < arr.length; i++) {
|
|
31
|
+
if (arr[i] === '' || typeof (arr[i]) == 'undefined') {
|
|
32
32
|
arr.splice(i, 1)
|
|
33
33
|
i--
|
|
34
34
|
}
|
package/vue.config.js
CHANGED
|
@@ -23,24 +23,14 @@ module.exports = {
|
|
|
23
23
|
ws: false,
|
|
24
24
|
changeOrigin: true
|
|
25
25
|
},
|
|
26
|
-
'/
|
|
27
|
-
pathRewrite: { '^/af-system/
|
|
26
|
+
'/api': {
|
|
27
|
+
pathRewrite: { '^/api/af-system/': '/rs/' },
|
|
28
28
|
target: local,
|
|
29
29
|
changeOrigin: true
|
|
30
30
|
},
|
|
31
|
-
'/
|
|
32
|
-
pathRewrite: { '^/
|
|
33
|
-
target:
|
|
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,
|
|
31
|
+
'/resource': {
|
|
32
|
+
pathRewrite: { '^/resource': '/' },
|
|
33
|
+
target: 'http://127.0.0.1:4789',
|
|
44
34
|
changeOrigin: true
|
|
45
35
|
}
|
|
46
36
|
}
|
package/vue2-client.iml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
|
6
|
+
<orderEntry type="inheritedJdk" />
|
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
+
</component>
|
|
9
|
+
</module>
|