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 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.100",
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) {
@@ -85,6 +85,11 @@ export default {
85
85
  form: undefined,
86
86
  // 校验
87
87
  rules: {},
88
+ // 图标样式
89
+ iconStyle: {
90
+ position: 'relative',
91
+ top: '1px'
92
+ },
88
93
  // 表单项集合
89
94
  formItems: [],
90
95
  // 是否显示
@@ -81,6 +81,11 @@ export default {
81
81
  return {
82
82
  // 加载状态
83
83
  loading: false,
84
+ // 图标样式
85
+ iconStyle: {
86
+ position: 'relative',
87
+ top: '1px'
88
+ },
84
89
  loadError: false,
85
90
  // 实际查询配置内容
86
91
  realQueryConfig: {}
@@ -181,6 +181,11 @@ export default {
181
181
  editLoading: false,
182
182
  // 按钮状态
183
183
  buttonState: {},
184
+ // 图标样式
185
+ iconStyle: {
186
+ position: 'relative',
187
+ top: '1px'
188
+ },
184
189
  // 当前环境
185
190
  env: 'prod'
186
191
  }
@@ -91,6 +91,11 @@ export default {
91
91
  screenWidth: document.documentElement.clientWidth,
92
92
  // Tab页签
93
93
  tabActiveKey: '1',
94
+ // 图标样式
95
+ iconStyle: {
96
+ position: 'relative',
97
+ top: '1px'
98
+ },
94
99
  // 是否显示生成查询配置抽屉
95
100
  createQueryVisible: false,
96
101
  // 设备类型详情
@@ -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)
@@ -45,6 +45,11 @@ export default {
45
45
  },
46
46
  data () {
47
47
  return {
48
+ // 图标样式
49
+ iconStyle: {
50
+ position: 'relative',
51
+ top: '1px'
52
+ },
48
53
  allKey: [],
49
54
  indeterminate: true,
50
55
  checkAll: false,