vue2-client 1.8.99 → 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 CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
+ **1.8.101 -2024-3-14 @江超**
5
+ - 已解决:XTable显示来自配置中心的字典徽标
6
+
4
7
  **1.8.94 - 1.8.96 -2024-3-12 @江超**
5
8
  - 兼容hideInMenu的写法
6
9
  - 修改引用报错
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.99",
3
+ "version": "1.8.101",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -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
- mounted () {
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
- getParam (key, value) {
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
- const result = object[key]
59
- if (result && Object.prototype.hasOwnProperty.call(result, value)) {
60
- return result[value]
61
- } else {
62
- return null
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)