three-trees-ui 1.0.1 → 1.0.3

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": "three-trees-ui",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "publicPath": "/ui",
5
5
  "author": "hotent",
6
6
  "private": false,
@@ -10,7 +10,7 @@ const axios = require('axios')
10
10
  const { saveAs } = require('file-saver')
11
11
  import _ from 'lodash'
12
12
 
13
- const req = function (url, data = {}, option = {}) {
13
+ const req = function(url, data = {}, option = {}) {
14
14
  const requestData = {
15
15
  url: url,
16
16
  data: data,
@@ -250,7 +250,7 @@ export default {
250
250
  deep: true,
251
251
  },
252
252
  ents: {
253
- handler: function (newVal, oldValue) {
253
+ handler: function(newVal, oldValue) {
254
254
  if (newVal && newVal.length >= 1 && newVal != oldValue) {
255
255
  this.getSubData(this, this.refId)
256
256
  }
@@ -259,7 +259,7 @@ export default {
259
259
  immediate: true,
260
260
  },
261
261
  templateInfo: {
262
- handler: function (newVal) {
262
+ handler: function(newVal) {
263
263
  if (newVal && newVal.id) {
264
264
  let _me = this
265
265
  _me.templateInfo = newVal
@@ -379,13 +379,13 @@ export default {
379
379
  deep: true,
380
380
  immediate: true,
381
381
  },
382
- currentTabName: function (newVal) {
382
+ currentTabName: function(newVal) {
383
383
  if (newVal) {
384
384
  this.querySubValue = ''
385
385
  }
386
386
  },
387
387
  rows: {
388
- handler: function (newVal) {
388
+ handler: function(newVal) {
389
389
  if (this.templateInfo.defId) {
390
390
  let this_ = this
391
391
  let boAlias = this.templateInfo.boDefAlias
@@ -429,8 +429,9 @@ export default {
429
429
  if (val) {
430
430
  this.$nextTick(() => {
431
431
  if (document.getElementById('summaryDiv')) {
432
- this.summaryTableHeight =
433
- document.getElementById('summaryDiv').clientHeight
432
+ this.summaryTableHeight = document.getElementById(
433
+ 'summaryDiv'
434
+ ).clientHeight
434
435
  }
435
436
  })
436
437
  }
@@ -441,7 +442,7 @@ export default {
441
442
  //如果当前页面被嵌入iframe里面不显示草稿
442
443
  return !this.isJoinFlow
443
444
  },
444
- navbarCollapseStyle: function () {
445
+ navbarCollapseStyle: function() {
445
446
  if (this.asideShow) {
446
447
  return { left: '200px' }
447
448
  }
@@ -476,7 +477,7 @@ export default {
476
477
  })
477
478
  this.handelBindFiledValua()
478
479
  let this_ = this
479
- this.$on('data-reload-success', function () {
480
+ this.$on('data-reload-success', function() {
480
481
  this_.calcScriptBtnPermission()
481
482
  })
482
483
  this.$emit('afterMounted')
@@ -797,7 +798,7 @@ export default {
797
798
  this.listSelectable = false
798
799
  }
799
800
  let _this = this
800
- setTimeout(function () {
801
+ setTimeout(function() {
801
802
  let tdDom = _this.$el.querySelector('td.right_menu')
802
803
  if (
803
804
  !tdDom ||
@@ -902,7 +903,7 @@ export default {
902
903
  selectList[i].selectValue = value
903
904
 
904
905
  //添加监听
905
- pInst.$watch(path, function (newVal, oldVal) {
906
+ pInst.$watch(path, function(newVal, oldVal) {
906
907
  // 监听中使用间隔请求,减少请求次数
907
908
  clearTimeout(this.timeout)
908
909
  this.timeout = setTimeout(() => {
@@ -925,7 +926,7 @@ export default {
925
926
  const value = utils.getValueByPath(pInst, path)
926
927
 
927
928
  bindList[i].fillValue = value
928
- pInst.$watch(path, function (newVal, oldVal) {
929
+ pInst.$watch(path, function(newVal, oldVal) {
929
930
  // 监听中使用间隔请求,减少请求次数
930
931
  clearTimeout(this.timeout)
931
932
  this.timeout = setTimeout(() => {
@@ -1183,7 +1184,7 @@ export default {
1183
1184
  }
1184
1185
  let msg = document.createElement('canvas')
1185
1186
 
1186
- this.$qrcode.toCanvas(msg, QRCodeurl, function (error) {
1187
+ this.$qrcode.toCanvas(msg, QRCodeurl, function(error) {
1187
1188
  console.error(error)
1188
1189
  })
1189
1190
  let _canvas = document.createElement('div')
@@ -1223,7 +1224,7 @@ export default {
1223
1224
  .generateAsync({
1224
1225
  type: 'blob',
1225
1226
  })
1226
- .then(function (content) {
1227
+ .then(function(content) {
1227
1228
  let eleLink = document.createElement('a')
1228
1229
  eleLink.download = '二维码.zip'
1229
1230
  eleLink.style.display = 'none'
@@ -1276,7 +1277,7 @@ export default {
1276
1277
  context.scale(2, 2)
1277
1278
  return html2canvas(document.querySelector(classs), {
1278
1279
  canvas: canvas2,
1279
- }).then(function (canvas) {
1280
+ }).then(function(canvas) {
1280
1281
  resolve(canvas)
1281
1282
  })
1282
1283
  })
@@ -1318,7 +1319,7 @@ export default {
1318
1319
  // Base64.encode(this.$store.state.login.currentUser.account);
1319
1320
  let msg = document.getElementById('QRCode')
1320
1321
 
1321
- this.$qrcode.toCanvas(msg, this.QRCodeurl, function (error) {
1322
+ this.$qrcode.toCanvas(msg, this.QRCodeurl, function(error) {
1322
1323
  console.log(error)
1323
1324
  })
1324
1325
  this.QRCodeShow = true
@@ -1341,13 +1342,13 @@ export default {
1341
1342
  this.rowTemplateId = templateId
1342
1343
  this.rowId = id
1343
1344
  },
1344
- handleSizeChange: function (size) {
1345
+ handleSizeChange: function(size) {
1345
1346
  //每页下拉显示数据
1346
1347
  this.pagination.page = 1
1347
1348
  this.pagination.pageSize = size
1348
1349
  this.$refs.multipleTemplateTable.handleFilterChange()
1349
1350
  },
1350
- handleCurrentChange: function (currentPage) {
1351
+ handleCurrentChange: function(currentPage) {
1351
1352
  //点击第几页
1352
1353
  this.pagination.page = currentPage
1353
1354
  this.$refs.multipleTemplateTable.handleFilterChange()
@@ -1613,6 +1614,13 @@ export default {
1613
1614
  if (this.templateInfo.summaryRegionHtml) {
1614
1615
  this.loadCompiledCustomSummary()
1615
1616
  }
1617
+ // 修复初始化时 有的表格滚动不到底部的bug
1618
+ this.$nextTick(() => {
1619
+ if (this.pagination.page == 1) {
1620
+ this.$refs.multipleTemplateTable &&
1621
+ this.$refs.multipleTemplateTable.calcTableHeight(300)
1622
+ }
1623
+ })
1616
1624
  })
1617
1625
  .finally(() => {
1618
1626
  this.multipleTemplateTableloading = false
@@ -1838,10 +1846,18 @@ export default {
1838
1846
  ? operationType[operation]
1839
1847
  : operation
1840
1848
  } else if (
1841
- typeof $(searchItems[i]).children().attr('ht-query') != 'undefined'
1849
+ typeof $(searchItems[i])
1850
+ .children()
1851
+ .attr('ht-query') != 'undefined'
1842
1852
  ) {
1843
- operation = $(searchItems[i]).children().attr('operation')
1844
- operationMap[$(searchItems[i]).children().attr('ht-query')] =
1853
+ operation = $(searchItems[i])
1854
+ .children()
1855
+ .attr('operation')
1856
+ operationMap[
1857
+ $(searchItems[i])
1858
+ .children()
1859
+ .attr('ht-query')
1860
+ ] =
1845
1861
  typeof operationType[operation] != 'undefined'
1846
1862
  ? operationType[operation]
1847
1863
  : operation
@@ -1867,10 +1883,18 @@ export default {
1867
1883
  ? operationType[operation]
1868
1884
  : operation
1869
1885
  } else if (
1870
- typeof $(searchItems[i]).children().attr('ht-query') != 'undefined'
1886
+ typeof $(searchItems[i])
1887
+ .children()
1888
+ .attr('ht-query') != 'undefined'
1871
1889
  ) {
1872
- operation = $(searchItems[i]).children().attr('type')
1873
- operationMap[$(searchItems[i]).children().attr('ht-query')] =
1890
+ operation = $(searchItems[i])
1891
+ .children()
1892
+ .attr('type')
1893
+ operationMap[
1894
+ $(searchItems[i])
1895
+ .children()
1896
+ .attr('ht-query')
1897
+ ] =
1874
1898
  typeof operationType[operation] != 'undefined'
1875
1899
  ? operationType[operation]
1876
1900
  : operation
@@ -1893,12 +1917,19 @@ export default {
1893
1917
  ? true
1894
1918
  : false
1895
1919
  } else if (
1896
- typeof $(searchItems[i]).children().attr('ht-query') != 'undefined'
1920
+ typeof $(searchItems[i])
1921
+ .children()
1922
+ .attr('ht-query') != 'undefined'
1897
1923
  ) {
1898
1924
  //查询条件字段
1899
- fieldQueryMap[$(searchItems[i]).children().attr('ht-query')] =
1900
- typeof $(searchItems[i]).children().attr('special-query') !=
1901
- 'undefined'
1925
+ fieldQueryMap[
1926
+ $(searchItems[i])
1927
+ .children()
1928
+ .attr('ht-query')
1929
+ ] =
1930
+ typeof $(searchItems[i])
1931
+ .children()
1932
+ .attr('special-query') != 'undefined'
1902
1933
  ? true
1903
1934
  : false
1904
1935
  }
@@ -1965,7 +1996,7 @@ export default {
1965
1996
  }
1966
1997
  },
1967
1998
  //回车查询
1968
- searchEnterFun: function (e) {
1999
+ searchEnterFun: function(e) {
1969
2000
  let keyCode = window.event ? e.keyCode : e.which
1970
2001
  if (keyCode == 13) {
1971
2002
  this.search()