vue2-client 1.20.39 → 1.20.41

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/.env.message CHANGED
@@ -1,19 +1,19 @@
1
- VUE_APP_PUBLIC_PATH=/
2
- VUE_APP_NAME=Admin
3
- VUE_APP_ROUTES_KEY=admin.routes
4
- VUE_APP_PERMISSIONS_KEY=admin.permissions
5
- VUE_APP_ROLES_KEY=admin.roles
6
- VUE_APP_USER_KEY=admin.user
7
- VUE_APP_LOGIN_KEY=admin.login
8
- VUE_APP_SETTING_KEY=admin.setting
9
- VUE_APP_TBAS_KEY=admin.tabs
10
- VUE_APP_TBAS_TITLES_KEY=admin.tabs.titles
11
- VUE_APP_DICTIONARY_KEY=admin.dictionary
12
- VUE_APP_BADGE_KEY=admin.badge
13
- VUE_APP_SINGLEVALUE_KEY=admin.singlevalue
14
- VUE_APP_DIVISIONSOHCHINA=admin.divisionsohchina
15
- VUE_APP_WEB_CONFIG_KEY=admin.webconfig
16
- VUE_APP_API_BASE_URL=http://123.60.214.109:8405
17
- VUE_APP_SYSTEM_NAME=af-message
18
- VUE_APP_LOGIN_VERSION=V4
19
-
1
+ VUE_APP_PUBLIC_PATH=/
2
+ VUE_APP_NAME=Admin
3
+ VUE_APP_ROUTES_KEY=admin.routes
4
+ VUE_APP_PERMISSIONS_KEY=admin.permissions
5
+ VUE_APP_ROLES_KEY=admin.roles
6
+ VUE_APP_USER_KEY=admin.user
7
+ VUE_APP_LOGIN_KEY=admin.login
8
+ VUE_APP_SETTING_KEY=admin.setting
9
+ VUE_APP_TBAS_KEY=admin.tabs
10
+ VUE_APP_TBAS_TITLES_KEY=admin.tabs.titles
11
+ VUE_APP_DICTIONARY_KEY=admin.dictionary
12
+ VUE_APP_BADGE_KEY=admin.badge
13
+ VUE_APP_SINGLEVALUE_KEY=admin.singlevalue
14
+ VUE_APP_DIVISIONSOHCHINA=admin.divisionsohchina
15
+ VUE_APP_WEB_CONFIG_KEY=admin.webconfig
16
+ VUE_APP_API_BASE_URL=http://123.60.214.109:8405
17
+ VUE_APP_SYSTEM_NAME=af-message
18
+ VUE_APP_LOGIN_VERSION=V4
19
+
package/package.json CHANGED
@@ -1,115 +1,115 @@
1
- {
2
- "name": "vue2-client",
3
- "version": "1.20.39",
4
- "private": false,
5
- "scripts": {
6
- "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
7
- "serve:gaslink": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode gaslink",
8
- "serve:revenue": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode revenue",
9
- "serve:liuli": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode liuli",
10
- "serve:scada": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode scada",
11
- "serve:iot": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode iot",
12
- "serve:his": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode his",
13
- "serve:runtime": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode runtime",
14
- "serve:message": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode message",
15
- "serve:apply": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode apply",
16
- "mac-serve": "vue-cli-service serve --no-eslint --mode his",
17
- "build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
18
- "test:unit": "vue-cli-service test:unit",
19
- "lint": "vue-cli-service lint",
20
- "build:preview": "vue-cli-service build --mode preview",
21
- "lint:nofix": "vue-cli-service lint --no-fix",
22
- "test": "jest"
23
- },
24
- "dependencies": {
25
- "@afwenming123/vue-easy-tree": "^1.0.1",
26
- "@afwenming123/vue-plugin-hiprint": "^0.0.70",
27
- "@amap/amap-jsapi-loader": "^1.0.1",
28
- "@antv/data-set": "^0.11.8",
29
- "@antv/g2plot": "^2.4.31",
30
- "@hufe921/canvas-editor": "^0.9.49",
31
- "@microsoft/fetch-event-source": "^2.0.1",
32
- "@vue/babel-preset-jsx": "^1.4.0",
33
- "animate.css": "^4.1.1",
34
- "ant-design-vue": "^1.7.8",
35
- "axios": "^0.27.2",
36
- "clipboard": "^2.0.11",
37
- "core-js": "^3.33.0",
38
- "crypto-js": "^4.1.1",
39
- "date-fns": "^2.29.3",
40
- "default-passive-events": "^2.0.0",
41
- "dotenv": "^16.3.1",
42
- "echarts": "^5.5.0",
43
- "enquire.js": "^2.1.6",
44
- "file-saver": "^2.0.5",
45
- "highlight.js": "^11.7.0",
46
- "html-to-image": "^1.11.13",
47
- "html2canvas": "^1.4.1",
48
- "js-base64": "^3.7.5",
49
- "js-cookie": "^2.2.1",
50
- "jsencrypt": "^3.3.2",
51
- "jspdf": "^2.5.1",
52
- "lodash.clonedeep": "^4.5.0",
53
- "lodash.debounce": "^4",
54
- "lodash.get": "^4.4.2",
55
- "marked": "^4",
56
- "mockjs": "^1.1.0",
57
- "nprogress": "^0.2.0",
58
- "ol": "10.3.1",
59
- "qs": "^6.11.2",
60
- "regenerator-runtime": "^0.14.0",
61
- "splitpanes": "^2.4.1",
62
- "videojs-contrib-hls": "^5.15.0",
63
- "viser-vue": "^2.4.8",
64
- "vue": "^2.7.14",
65
- "vue-codemirror": "4.0.6",
66
- "vue-color": "2.7.0",
67
- "vue-draggable-resizable": "^2.3.0",
68
- "vue-i18n": "^8.28.2",
69
- "vue-json-viewer": "^2.2.22",
70
- "vue-router": "^3.6.5",
71
- "vue-video-player": "^5.0.2",
72
- "vue-virtual-scroller": "^1.1.2",
73
- "vuedraggable": "^2.24.3",
74
- "vuex": "^3.6.2",
75
- "xlsx": "0.18.5"
76
- },
77
- "devDependencies": {
78
- "@ant-design/colors": "^7.0.0",
79
- "@babel/core": "^7.22.20",
80
- "@babel/eslint-parser": "^7.22.15",
81
- "@babel/preset-env": "^7.22.20",
82
- "@vue/cli-plugin-babel": "^5.0.8",
83
- "@vue/cli-plugin-eslint": "^5.0.8",
84
- "@vue/cli-service": "^5.0.8",
85
- "@vue/eslint-config-standard": "^8.0.1",
86
- "@vue/test-utils": "^1.3.6",
87
- "babel-plugin-transform-remove-console": "^6.9.4",
88
- "compression-webpack-plugin": "^10.0.0",
89
- "css-minimizer-webpack-plugin": "^5.0.1",
90
- "deepmerge": "^4.3.1",
91
- "eslint": "^8.51.0",
92
- "eslint-config-prettier": "^10.1.8",
93
- "eslint-plugin-vue": "^9.17.0",
94
- "fast-deep-equal": "^3.1.3",
95
- "ignore-loader": "^0.1.2",
96
- "jest": "^29.7.0",
97
- "jest-environment-jsdom": "^29.7.0",
98
- "jest-transform-stub": "^2.0.0",
99
- "less-loader": "^6.2.0",
100
- "script-loader": "^0.7.2",
101
- "style-resources-loader": "^1.5.0",
102
- "vue-cli-plugin-style-resources-loader": "^0.1.5",
103
- "vue-jest": "^4.0.1",
104
- "vue-template-compiler": "^2.7.14",
105
- "webpack": "^5.88.2",
106
- "webpack-theme-color-replacer": "^1.4.7",
107
- "whatwg-fetch": "^3.6.19"
108
- },
109
- "browserslist": [
110
- "> 1%",
111
- "last 2 versions",
112
- "not dead",
113
- "not ie 11"
114
- ]
115
- }
1
+ {
2
+ "name": "vue2-client",
3
+ "version": "1.20.41",
4
+ "private": false,
5
+ "scripts": {
6
+ "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
7
+ "serve:gaslink": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode gaslink",
8
+ "serve:revenue": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode revenue",
9
+ "serve:liuli": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode liuli",
10
+ "serve:scada": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode scada",
11
+ "serve:iot": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode iot",
12
+ "serve:his": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode his",
13
+ "serve:runtime": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode runtime",
14
+ "serve:message": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode message",
15
+ "serve:apply": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode apply",
16
+ "mac-serve": "vue-cli-service serve --no-eslint --mode his",
17
+ "build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
18
+ "test:unit": "vue-cli-service test:unit",
19
+ "lint": "vue-cli-service lint",
20
+ "build:preview": "vue-cli-service build --mode preview",
21
+ "lint:nofix": "vue-cli-service lint --no-fix",
22
+ "test": "jest"
23
+ },
24
+ "dependencies": {
25
+ "@afwenming123/vue-easy-tree": "^1.0.1",
26
+ "@afwenming123/vue-plugin-hiprint": "^0.0.70",
27
+ "@amap/amap-jsapi-loader": "^1.0.1",
28
+ "@antv/data-set": "^0.11.8",
29
+ "@antv/g2plot": "^2.4.31",
30
+ "@hufe921/canvas-editor": "^0.9.49",
31
+ "@microsoft/fetch-event-source": "^2.0.1",
32
+ "@vue/babel-preset-jsx": "^1.4.0",
33
+ "animate.css": "^4.1.1",
34
+ "ant-design-vue": "^1.7.8",
35
+ "axios": "^0.27.2",
36
+ "clipboard": "^2.0.11",
37
+ "core-js": "^3.33.0",
38
+ "crypto-js": "^4.1.1",
39
+ "date-fns": "^2.29.3",
40
+ "default-passive-events": "^2.0.0",
41
+ "dotenv": "^16.3.1",
42
+ "echarts": "^5.5.0",
43
+ "enquire.js": "^2.1.6",
44
+ "file-saver": "^2.0.5",
45
+ "highlight.js": "^11.7.0",
46
+ "html-to-image": "^1.11.13",
47
+ "html2canvas": "^1.4.1",
48
+ "js-base64": "^3.7.5",
49
+ "js-cookie": "^2.2.1",
50
+ "jsencrypt": "^3.3.2",
51
+ "jspdf": "^2.5.1",
52
+ "lodash.clonedeep": "^4.5.0",
53
+ "lodash.debounce": "^4",
54
+ "lodash.get": "^4.4.2",
55
+ "marked": "^4",
56
+ "mockjs": "^1.1.0",
57
+ "nprogress": "^0.2.0",
58
+ "ol": "10.3.1",
59
+ "qs": "^6.11.2",
60
+ "regenerator-runtime": "^0.14.0",
61
+ "splitpanes": "^2.4.1",
62
+ "videojs-contrib-hls": "^5.15.0",
63
+ "viser-vue": "^2.4.8",
64
+ "vue": "^2.7.14",
65
+ "vue-codemirror": "4.0.6",
66
+ "vue-color": "2.7.0",
67
+ "vue-draggable-resizable": "^2.3.0",
68
+ "vue-i18n": "^8.28.2",
69
+ "vue-json-viewer": "^2.2.22",
70
+ "vue-router": "^3.6.5",
71
+ "vue-video-player": "^5.0.2",
72
+ "vue-virtual-scroller": "^1.1.2",
73
+ "vuedraggable": "^2.24.3",
74
+ "vuex": "^3.6.2",
75
+ "xlsx": "0.18.5"
76
+ },
77
+ "devDependencies": {
78
+ "@ant-design/colors": "^7.0.0",
79
+ "@babel/core": "^7.22.20",
80
+ "@babel/eslint-parser": "^7.22.15",
81
+ "@babel/preset-env": "^7.22.20",
82
+ "@vue/cli-plugin-babel": "^5.0.8",
83
+ "@vue/cli-plugin-eslint": "^5.0.8",
84
+ "@vue/cli-service": "^5.0.8",
85
+ "@vue/eslint-config-standard": "^8.0.1",
86
+ "@vue/test-utils": "^1.3.6",
87
+ "babel-plugin-transform-remove-console": "^6.9.4",
88
+ "compression-webpack-plugin": "^10.0.0",
89
+ "css-minimizer-webpack-plugin": "^5.0.1",
90
+ "deepmerge": "^4.3.1",
91
+ "eslint": "^8.51.0",
92
+ "eslint-config-prettier": "^10.1.8",
93
+ "eslint-plugin-vue": "^9.17.0",
94
+ "fast-deep-equal": "^3.1.3",
95
+ "ignore-loader": "^0.1.2",
96
+ "jest": "^29.7.0",
97
+ "jest-environment-jsdom": "^29.7.0",
98
+ "jest-transform-stub": "^2.0.0",
99
+ "less-loader": "^6.2.0",
100
+ "script-loader": "^0.7.2",
101
+ "style-resources-loader": "^1.5.0",
102
+ "vue-cli-plugin-style-resources-loader": "^0.1.5",
103
+ "vue-jest": "^4.0.1",
104
+ "vue-template-compiler": "^2.7.14",
105
+ "webpack": "^5.88.2",
106
+ "webpack-theme-color-replacer": "^1.4.7",
107
+ "whatwg-fetch": "^3.6.19"
108
+ },
109
+ "browserslist": [
110
+ "> 1%",
111
+ "last 2 versions",
112
+ "not dead",
113
+ "not ie 11"
114
+ ]
115
+ }
@@ -21,16 +21,17 @@ const SYNC_DELAY_RETRY = 60
21
21
  const SYNC_DELAY_EXPAND = 20
22
22
 
23
23
  // 选择器常量
24
- const MAIN_TABLE_SELECTORS = [
25
- '.ant-table-tbody > tr.ant-table-row',
26
- '.ant-table-body > table > tbody > tr.ant-table-row'
27
- ]
28
24
  const FIXED_TABLE_SELECTORS = [
29
25
  '.ant-table-fixed-right .ant-table-tbody > tr',
30
26
  '.ant-table-fixed-right .ant-table-body-inner > table > tbody > tr',
31
27
  '.ant-table-fixed-right .ant-table-body > table > tbody > tr'
32
28
  ]
33
29
  const MAIN_TBODY_SELECTORS = ['.ant-table-body > table > tbody', '.ant-table-tbody']
30
+ // 仅主表滚动区域 tbody(不含左右固定列表格),用于按 data-row-key 对齐展开行与固定列
31
+ const MAIN_SCROLL_TBODY_SELECTORS = [
32
+ '.ant-table-scroll .ant-table-body > table > tbody',
33
+ '.ant-table-body > table > tbody'
34
+ ]
34
35
  const FIXED_TBODY_SELECTORS = [
35
36
  '.ant-table-fixed-right .ant-table-body-inner > table > tbody',
36
37
  '.ant-table-fixed-right .ant-table-body > table > tbody',
@@ -41,6 +42,12 @@ const TABLE_BODY_SELECTORS = ['.ant-table-body', '.ant-table-body-inner']
41
42
  // 辅助函数
42
43
  const getRowKey = (tr) => tr?.getAttribute?.('data-row-key') || tr?.dataset?.rowKey || ''
43
44
 
45
+ const escapeRowKeyAttr = (key) => {
46
+ const s = String(key)
47
+ if (typeof CSS !== 'undefined' && typeof CSS.escape === 'function') return CSS.escape(s)
48
+ return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"')
49
+ }
50
+
44
51
  const cleanRowStyles = (element, isCollapse = false) => {
45
52
  if (!element) return
46
53
  element.removeAttribute('data-synced-height')
@@ -129,6 +136,8 @@ let resizeObserver = null
129
136
  let isSyncing = false
130
137
  let rafId = 0
131
138
  let syncAfterPageChangeTimer = 0
139
+ // 记录上一次同步时的固定行高度快照,防止 MutationObserver 循环触发
140
+ let lastSyncedSnapshot = ''
132
141
 
133
142
  const getWrapperEl = () => wrapperRef.value
134
143
 
@@ -157,7 +166,6 @@ const clearAllFixedRowHeights = () => {
157
166
  }
158
167
 
159
168
  const scheduleSyncAfterPageChange = () => {
160
- clearAllFixedRowHeights()
161
169
  if (syncAfterPageChangeTimer) clearTimeout(syncAfterPageChangeTimer)
162
170
  syncAfterPageChangeTimer = setTimeout(() => {
163
171
  syncAfterPageChangeTimer = 0
@@ -177,22 +185,17 @@ const setupHeightSync = () => {
177
185
 
178
186
  const observerOptions = {
179
187
  childList: true,
180
- subtree: true,
181
- attributes: true,
182
- attributeFilter: ['style', 'class']
188
+ subtree: true
183
189
  }
184
190
 
185
191
  observer = new MutationObserver((mutations) => {
186
192
  if (isSyncing) return
193
+ const wrapper = getWrapperEl()
194
+ if (wrapper && wrapper.dataset.heightSyncing) return
195
+
187
196
  const hasChildList = mutations.some(m => m.type === 'childList')
188
- const hasAttr = mutations.some(m =>
189
- m.type === 'attributes' &&
190
- (m.attributeName === 'style' || m.attributeName === 'class')
191
- )
192
197
  if (hasChildList) {
193
198
  scheduleSyncAfterPageChange()
194
- } else if (hasAttr) {
195
- scheduleSync()
196
199
  }
197
200
  })
198
201
 
@@ -215,25 +218,56 @@ const syncFixedExpandedHeights = () => {
215
218
  if (isSyncing) return
216
219
  isSyncing = true
217
220
 
218
- const mainRows = Array.from(wrapper.querySelectorAll(MAIN_TABLE_SELECTORS.join(', ')))
221
+ const mainScrollTbody = queryFirst(wrapper, MAIN_SCROLL_TBODY_SELECTORS)
222
+ if (!mainScrollTbody) {
223
+ isSyncing = false
224
+ return
225
+ }
226
+
219
227
  const fixedRows = Array.from(wrapper.querySelectorAll(FIXED_TABLE_SELECTORS.join(', ')))
220
228
 
221
- // 只取有 key 的行进行顺序匹配
222
- const mainRowsList = mainRows.filter(m => getRowKey(m))
223
- const fixedRowsList = fixedRows.filter(f => getRowKey(f))
224
- const count = Math.min(mainRowsList.length, fixedRowsList.length)
229
+ // 生成当前快照:如果与上次完全相同,跳过写入
230
+ const snapshotParts = []
231
+ fixedRows.forEach(f => {
232
+ const key = getRowKey(f)
233
+ if (!key) return
234
+ let mainTr = null
235
+ try {
236
+ mainTr = mainScrollTbody.querySelector(`tr[data-row-key="${escapeRowKeyAttr(key)}"]`)
237
+ } catch (e) { mainTr = null }
238
+ if (!mainTr) return
239
+ const h = Math.round(mainTr.getBoundingClientRect().height)
240
+ if (h) snapshotParts.push(key + ':' + h)
241
+ })
242
+ const snapshot = snapshotParts.join('|')
243
+ if (snapshot === lastSyncedSnapshot) {
244
+ isSyncing = false
245
+ return
246
+ }
247
+ lastSyncedSnapshot = snapshot
248
+
249
+ fixedRows.forEach(f => {
250
+ const key = getRowKey(f)
251
+ if (!key) return
252
+
253
+ let mainTr = null
254
+ try {
255
+ mainTr = mainScrollTbody.querySelector(`tr[data-row-key="${escapeRowKeyAttr(key)}"]`)
256
+ } catch (e) { mainTr = null }
225
257
 
226
- for (let i = 0; i < count; i++) {
227
- const m = mainRowsList[i]
228
- const f = fixedRowsList[i]
229
- const key = getRowKey(m)
230
- if (!key) continue
258
+ if (!mainTr) {
259
+ if (f.dataset.syncedHeight) {
260
+ cleanRowStyles(f, true)
261
+ f.querySelectorAll('td').forEach(td => cleanCellStyles(td, true))
262
+ }
263
+ return
264
+ }
231
265
 
232
- const h = Math.round(m.getBoundingClientRect().height)
233
- if (!h) continue
266
+ const h = Math.round(mainTr.getBoundingClientRect().height)
267
+ if (!h) return
234
268
 
235
269
  const hs = String(h)
236
- if (f.dataset.syncedHeight === hs) continue
270
+ if (f.dataset.syncedHeight === hs) return
237
271
  f.dataset.syncedHeight = hs
238
272
 
239
273
  f.style.cssText = ''
@@ -250,16 +284,6 @@ const syncFixedExpandedHeights = () => {
250
284
  td.style.setProperty('line-height', 'normal', 'important')
251
285
  td.style.setProperty('vertical-align', 'middle', 'important')
252
286
  })
253
- }
254
-
255
- // 清理无对应主表 key 的固定列行
256
- const mainKeys = new Set(mainRowsList.map(m => getRowKey(m)))
257
- fixedRows.forEach(f => {
258
- const key = getRowKey(f)
259
- if (!mainKeys.has(key) && f.dataset.syncedHeight) {
260
- cleanRowStyles(f, true)
261
- f.querySelectorAll('td').forEach(td => cleanCellStyles(td, true))
262
- }
263
287
  })
264
288
  } catch (e) {
265
289
  console.warn('[HFormTable] syncFixedExpandedHeights error:', e)
@@ -678,7 +702,8 @@ defineExpose({
678
702
  <!-- 非scoped样式:全局覆盖表格内下拉框宽度 -->
679
703
  <style lang="less">
680
704
  .h-form-table-wrapper {
681
- .ant-table-tbody td {
705
+ // 只针对普通数据行的单元格,排除展开行
706
+ .ant-table-tbody > tr:not(.ant-table-expanded-row) > td {
682
707
  --form-label-width: 0 !important;
683
708
 
684
709
  .ant-select,
@@ -1,3 +1,3 @@
1
- import ImagePreviewModal from './ImagePreviewModal'
2
-
3
- export default ImagePreviewModal
1
+ import ImagePreviewModal from './ImagePreviewModal'
2
+
3
+ export default ImagePreviewModal