vue2-client 1.8.100 → 1.8.101
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 +3 -0
- package/package.json +1 -1
- package/src/base-client/components/common/XBadge/XBadge.vue +11 -7
- package/src/base-client/components/common/XForm/XForm.vue +5 -0
- package/src/base-client/components/common/XFormTable/XFormTable.vue +5 -0
- package/src/base-client/components/common/XTable/XTable.vue +5 -0
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +5 -0
- package/src/base-client/plugins/AppData.js +26 -6
- package/src/components/TableSetting/TableSetting.vue +5 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -37,17 +37,21 @@ export default {
|
|
|
37
37
|
required: false
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
computed: {
|
|
41
|
-
dictionary () {
|
|
42
|
-
return this.$appdata.getParam(this.badgeKey, this.value)
|
|
43
|
-
}
|
|
44
|
-
},
|
|
40
|
+
computed: {},
|
|
45
41
|
data () {
|
|
46
42
|
return {
|
|
43
|
+
dictionary: undefined
|
|
47
44
|
}
|
|
48
45
|
},
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
created () {
|
|
47
|
+
const result = this.$appdata.getParam(this.badgeKey, this.value)
|
|
48
|
+
if (result) {
|
|
49
|
+
this.dictionary = result
|
|
50
|
+
return
|
|
51
|
+
}
|
|
52
|
+
this.$appdata.getDictValue(this.badgeKey, this.value, res => {
|
|
53
|
+
this.dictionary = res
|
|
54
|
+
})
|
|
51
55
|
},
|
|
52
56
|
methods: {
|
|
53
57
|
badgeFilter (key, value) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { manageApi, post } from '@vue2-client/services/api'
|
|
2
2
|
import { handleTree } from '@vue2-client/utils/util'
|
|
3
3
|
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
4
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
4
5
|
|
|
5
6
|
const GetAppDataService = {
|
|
6
7
|
install (Vue) {
|
|
@@ -52,15 +53,34 @@ const GetAppDataService = {
|
|
|
52
53
|
const object = JSON.parse(str)
|
|
53
54
|
return object[key]
|
|
54
55
|
},
|
|
55
|
-
|
|
56
|
+
getDictValue (dictKey, value, callback) {
|
|
57
|
+
getConfigByName(dictKey, undefined, result => {
|
|
58
|
+
for (const item of result.value) {
|
|
59
|
+
if (item.value == value) {
|
|
60
|
+
callback({
|
|
61
|
+
status: item.status || 'none',
|
|
62
|
+
text: item.label
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
callback({
|
|
67
|
+
status: 'none',
|
|
68
|
+
text: item.label
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
},
|
|
72
|
+
getParam (key, value, callback) {
|
|
56
73
|
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
57
74
|
const object = JSON.parse(str)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
75
|
+
if (object && object[key]) {
|
|
76
|
+
const result = object[key]
|
|
77
|
+
if (Object.prototype.hasOwnProperty.call(result, value)) {
|
|
78
|
+
return result[value]
|
|
79
|
+
} else {
|
|
80
|
+
return null
|
|
81
|
+
}
|
|
63
82
|
}
|
|
83
|
+
return null
|
|
64
84
|
},
|
|
65
85
|
getParams () {
|
|
66
86
|
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|