vue2-client 1.8.82 → 1.8.84
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
CHANGED
package/package.json
CHANGED
|
@@ -205,7 +205,7 @@ export default {
|
|
|
205
205
|
getConfig () {
|
|
206
206
|
getConfigByName(this.queryParamsName, this.serviceName, (res) => {
|
|
207
207
|
this.updateComponents(res)
|
|
208
|
-
})
|
|
208
|
+
}, this.env === 'dev')
|
|
209
209
|
},
|
|
210
210
|
getConfigBySource () {
|
|
211
211
|
parseConfig(this.queryParamsJson, 'CRUD_FORM', this.serviceName, this.env === 'dev').then(res => {
|
|
@@ -215,7 +215,7 @@ export default {
|
|
|
215
215
|
getColumnJsonByLogic () {
|
|
216
216
|
getConfigByLogic(this.logicName, this.logicParam, this.serviceName, (res) => {
|
|
217
217
|
this.updateComponents(res, true)
|
|
218
|
-
})
|
|
218
|
+
}, this.env === 'dev')
|
|
219
219
|
},
|
|
220
220
|
/**
|
|
221
221
|
* 更新子组件
|
|
@@ -39,27 +39,15 @@ const commonApi = {
|
|
|
39
39
|
getColumnsJson: '/api/af-system/logic/getColumns',
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export function getNativeConfigUrl (serviceName = process.env.VUE_APP_SYSTEM_NAME) {
|
|
47
|
-
return '/api/' + serviceName + '/' + commonApi.getNativeConfig
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function parseConfigUrl (serviceName = process.env.VUE_APP_SYSTEM_NAME, isDev) {
|
|
42
|
+
/**
|
|
43
|
+
* 获取字典键参数
|
|
44
|
+
*/
|
|
45
|
+
export function getDictionaryParam (isDev) {
|
|
51
46
|
let apiPre = '/api/'
|
|
52
47
|
if (isDev) {
|
|
53
48
|
apiPre = '/devApi/'
|
|
54
49
|
}
|
|
55
|
-
return apiPre +
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* 获取字典键参数
|
|
60
|
-
*/
|
|
61
|
-
export function getDictionaryParam () {
|
|
62
|
-
return post('/api/af-system/logic/getDictionaryParam', {})
|
|
50
|
+
return post(apiPre + 'af-system/logic/getDictionaryParam', {})
|
|
63
51
|
}
|
|
64
52
|
|
|
65
53
|
/**
|
|
@@ -68,20 +56,31 @@ export function getDictionaryParam () {
|
|
|
68
56
|
* @param configName 配置名称
|
|
69
57
|
* @param serviceName 命名空间名称
|
|
70
58
|
* @param callback 回调函数
|
|
59
|
+
* @param isDev 是否为开发环境
|
|
71
60
|
*/
|
|
72
|
-
export function getConfig (content, configName, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback) {
|
|
61
|
+
export function getConfig (content, configName, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback, isDev) {
|
|
73
62
|
if (content) {
|
|
74
63
|
return content
|
|
75
64
|
}
|
|
76
|
-
|
|
65
|
+
let apiPre = '/api/'
|
|
66
|
+
if (isDev) {
|
|
67
|
+
apiPre = '/devApi/'
|
|
68
|
+
}
|
|
69
|
+
const getConfigUrl = apiPre + commonApi.getConfig
|
|
70
|
+
indexedDB.getByWeb(configName, getConfigUrl, { configName: configName }, callback)
|
|
77
71
|
}
|
|
78
72
|
|
|
79
|
-
export function getConfigByName (configName, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback) {
|
|
80
|
-
return getConfig(undefined, configName, serviceName, callback)
|
|
73
|
+
export function getConfigByName (configName, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback, isDev) {
|
|
74
|
+
return getConfig(undefined, configName, serviceName, callback, isDev)
|
|
81
75
|
}
|
|
82
76
|
|
|
83
|
-
export function getNativeConfig (configName, serviceName = process.env.VUE_APP_SYSTEM_NAME) {
|
|
84
|
-
|
|
77
|
+
export function getNativeConfig (configName, serviceName = process.env.VUE_APP_SYSTEM_NAME, isDev) {
|
|
78
|
+
let apiPre = '/api/'
|
|
79
|
+
if (isDev) {
|
|
80
|
+
apiPre = '/devApi/'
|
|
81
|
+
}
|
|
82
|
+
const getConfigUrl = apiPre + commonApi.getNativeConfig
|
|
83
|
+
return post(getConfigUrl, { configName: configName })
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
/**
|
|
@@ -90,9 +89,14 @@ export function getNativeConfig (configName, serviceName = process.env.VUE_APP_S
|
|
|
90
89
|
* @param parameter Logic调用参数
|
|
91
90
|
* @param serviceName 命名空间名称
|
|
92
91
|
* @param callback 回调函数
|
|
92
|
+
* @param isDev 是否是开发环境
|
|
93
93
|
*/
|
|
94
|
-
export function getConfigByLogic (logicName, parameter, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback) {
|
|
95
|
-
|
|
94
|
+
export function getConfigByLogic (logicName, parameter, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback, isDev) {
|
|
95
|
+
let apiPre = '/api/'
|
|
96
|
+
if (isDev) {
|
|
97
|
+
apiPre = '/devApi/'
|
|
98
|
+
}
|
|
99
|
+
indexedDB.getByWeb(`${logicName}_${JSON.stringify(parameter)}`, apiPre + serviceName + '/logic/' + logicName,
|
|
96
100
|
parameter, callback)
|
|
97
101
|
}
|
|
98
102
|
|
|
@@ -101,10 +105,14 @@ export function getConfigByLogic (logicName, parameter, serviceName = process.en
|
|
|
101
105
|
* @param configContent 原配置内容
|
|
102
106
|
* @param configType 配置类型
|
|
103
107
|
* @param serviceName 命名空间名称
|
|
104
|
-
* @
|
|
108
|
+
* @param isDev 是否是开发环境
|
|
105
109
|
*/
|
|
106
110
|
export function parseConfig (configContent, configType, serviceName = process.env.VUE_APP_SYSTEM_NAME, isDev) {
|
|
107
|
-
|
|
111
|
+
let apiPre = '/api/'
|
|
112
|
+
if (isDev) {
|
|
113
|
+
apiPre = '/devApi/'
|
|
114
|
+
}
|
|
115
|
+
const url = apiPre + serviceName + '/' + commonApi.parseConfig
|
|
108
116
|
return post(url, {
|
|
109
117
|
configType: configType,
|
|
110
118
|
configContent: configContent
|