vue2-client 1.8.209 → 1.8.211

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.209",
3
+ "version": "1.8.211",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
package/src/App.vue CHANGED
@@ -122,7 +122,7 @@ export default {
122
122
  }
123
123
  themeUtil.changeThemeColor(themeStore.themeColor, themeScheme)
124
124
  }
125
- }catch (e){
125
+ } catch (e) {
126
126
  }
127
127
  },
128
128
  setLanguage (lang) {
@@ -219,6 +219,7 @@ export default {
219
219
  },
220
220
  toggleAdvanced () {
221
221
  this.advanced = !this.advanced
222
+ this.$emit('toggleAdvanced')
222
223
  },
223
224
  toggleVisible () {
224
225
  this.visible = !this.visible
@@ -31,6 +31,7 @@
31
31
  </div>
32
32
  <x-form
33
33
  ref="xForm"
34
+ @toggleAdvanced="toggleAdvanced"
34
35
  @onSubmit="onSearchSubmit">
35
36
  <slot name="formBtnExpand"></slot>
36
37
  </x-form>
@@ -442,16 +443,18 @@ export default {
442
443
  afterDelete (res) {
443
444
  this.$emit('afterDelete', res)
444
445
  },
446
+ /**
447
+ * 更多条件是否展示
448
+ */
449
+ toggleAdvanced () {
450
+ this.$refs.xTable.setScrollYHeight({})
451
+ },
445
452
  /**
446
453
  * 查询表单部分显示/隐藏切换
447
454
  */
448
455
  toggleIsFormShow () {
449
- const visible = this.$refs.xForm.toggleVisible()
450
- let height = visible ? 'default' : 'calc(100vh - 27rem)'
451
- if (!visible && window.__MICRO_APP_ENVIRONMENT__) {
452
- height = 'calc(100vh - 23.5rem)'
453
- }
454
- this.$refs.xTable.setScrollYHeight(height)
456
+ this.$refs.xForm.toggleVisible()
457
+ this.$refs.xTable.setScrollYHeight({})
455
458
  },
456
459
  /**
457
460
  * 选择列事件
@@ -138,7 +138,7 @@ export default {
138
138
  this.uploading = false
139
139
  })
140
140
  },
141
- handleRemove() {
141
+ handleRemove () {
142
142
  this.fileList = []
143
143
  this.uploading = false
144
144
  }
@@ -55,6 +55,7 @@
55
55
  </a-row>
56
56
  <s-table
57
57
  ref="table"
58
+ id="XTable"
58
59
  :alert="true"
59
60
  :columns="tableColumns"
60
61
  :data="loadData"
@@ -310,7 +311,7 @@ export default {
310
311
  }
311
312
  }
312
313
  // 设置表格高度为固定值
313
- this.setScrollYHeight('default')
314
+ this.setScrollYHeight({ type: 'default' })
314
315
  // 横向滚动长度大于所有宽度,才能实现固定表头
315
316
  this.scrollXWidth = totalWidth
316
317
  // 加载筛选列完成
@@ -379,14 +380,37 @@ export default {
379
380
  this.$refs.table.refresh(bool)
380
381
  })
381
382
  },
382
- setScrollYHeight (value) {
383
- if (value === 'default') {
384
- value = 'calc(100vh - 31rem)'
385
- if (window.__MICRO_APP_ENVIRONMENT__) {
386
- value = 'calc(100vh - 27.5rem)'
383
+ setScrollYHeight ({ extraHeight = 80, id = 'XTable', type = '' }) {
384
+ this.$nextTick(() => {
385
+ if (typeof extraHeight == 'undefined') {
386
+ // 默认底部分页32 + 边距48
387
+ extraHeight = 48 + 32
387
388
  }
388
- }
389
- this.scrollYHeight = value
389
+ let tHeader = null
390
+ console.log(document.getElementById(id))
391
+ if (id) {
392
+ tHeader = document.getElementById(id) ? document.getElementById(id).getElementsByClassName('ant-table-thead')[0] : null
393
+ } else {
394
+ tHeader = document.getElementsByClassName('ant-table-thead')[0]
395
+ }
396
+ // 表格内容距离顶部的距离
397
+ let tHeaderBottom = 0
398
+ if (tHeader) {
399
+ console.log(tHeader.getBoundingClientRect())
400
+ tHeaderBottom = tHeader.getBoundingClientRect().bottom
401
+ }
402
+ if (tHeaderBottom === 0) {
403
+ this.scrollYHeight = 'calc(100vh - 31rem)'
404
+ if (window.__MICRO_APP_ENVIRONMENT__) {
405
+ this.scrollYHeight = 'calc(100vh - 28.5rem)'
406
+ }
407
+ return
408
+ }
409
+ // 窗体高度-表格内容顶部的高度-表格内容底部的高度
410
+ // this.scrollYHeight = document.body.clientHeight - tHeaderBottom - extraHeight
411
+ console.log(`calc(100vh - ${tHeaderBottom + extraHeight}px)`)
412
+ this.scrollYHeight = `calc(100vh - ${tHeaderBottom + extraHeight}px)`
413
+ })
390
414
  },
391
415
  /**
392
416
  * 格式化日期
package/vue.config.js CHANGED
@@ -56,7 +56,7 @@ module.exports = {
56
56
  '/api': {
57
57
  // v3用
58
58
  // pathRewrite: { '^/api/af-system/': '/rs/', '^/api/af-iot/': '/rs/' },
59
- target: gateway,
59
+ target: revenue,
60
60
  changeOrigin: true
61
61
  },
62
62
  '/resource': {