three-trees-ui 1.0.55 → 1.0.57

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.
@@ -14,6 +14,40 @@ export default {
14
14
  fileList: [],
15
15
  tableData: { selectRows: [], querys: '' },
16
16
  dialogExportVisible: false,
17
+ ChangeRecord: {
18
+ ChangeRecordVisible: false,
19
+ recordTableLoading: false,
20
+ recordList: [],
21
+ modifyRecord: {
22
+ pagination: {
23
+ pageBean: {
24
+ page: 1,
25
+ pageSize: 10,
26
+ total: 0,
27
+ },
28
+ },
29
+ },
30
+ modifyDetailDialogVisible: false,
31
+ currentModify: {},
32
+ currentTemplateKey: '',
33
+ },
34
+ initChangeRecord: {
35
+ ChangeRecordVisible: false,
36
+ recordTableLoading: false,
37
+ recordList: [],
38
+ modifyRecord: {
39
+ pagination: {
40
+ pageBean: {
41
+ page: 1,
42
+ pageSize: 10,
43
+ total: 0,
44
+ },
45
+ },
46
+ },
47
+ modifyDetailDialogVisible: false,
48
+ currentModify: {},
49
+ currentTemplateKey: '',
50
+ },
17
51
  isdefaultQuery: true,
18
52
  exportData: { getType: 'all', expField: [] },
19
53
  exportSellection: [],
@@ -48,15 +82,17 @@ export default {
48
82
  allSummaryConfig: {},
49
83
  customSummary: '',
50
84
  summaryTableData: [],
85
+ needRequestTotal: false, // 需不需要后端统计列表全部数据
86
+ tableDataTotal: {},
51
87
  }
52
88
  },
53
89
  watch: {
54
- formKey: function(newVal) {
90
+ formKey: function (newVal) {
55
91
  if (newVal) {
56
92
  this.init()
57
93
  }
58
94
  },
59
- 'tableData.selectRows': function(newVal) {
95
+ 'tableData.selectRows': function (newVal) {
60
96
  if (newVal.length > 0) {
61
97
  let me_ = this
62
98
  me_.uploadParams.id = []
@@ -173,7 +209,7 @@ export default {
173
209
  selectList[i].selectValue = value
174
210
 
175
211
  //添加监听
176
- pInst.$watch(path, function(newVal, oldVal) {
212
+ pInst.$watch(path, function (newVal, oldVal) {
177
213
  _.debounce(() => {
178
214
  if (newVal !== oldVal) {
179
215
  _me.queryViewOptions.selectList[i].selectValue = newVal
@@ -317,7 +353,7 @@ export default {
317
353
  this.$router.push(url)
318
354
  },
319
355
 
320
- handleSizeChange: function(size) {
356
+ handleSizeChange: function (size) {
321
357
  //每页下拉显示数据
322
358
  this.pagination.pageSize = size
323
359
  if (this.$refs.queryViewList) {
@@ -326,7 +362,7 @@ export default {
326
362
  this.search()
327
363
  }
328
364
  },
329
- handleCurrentChange: function(currentPage) {
365
+ handleCurrentChange: function (currentPage) {
330
366
  //点击第几页
331
367
  this.pagination.page = currentPage
332
368
  if (this.$refs.queryViewList) {
@@ -336,15 +372,17 @@ export default {
336
372
  }
337
373
  },
338
374
  //回车查询
339
- searchEnterFun: function(e) {
375
+ searchEnterFun: function (e) {
340
376
  let keyCode = window.event ? e.keyCode : e.which
341
377
  if (keyCode == 13) {
342
378
  this.pagination.page = 1
343
379
  this.search()
344
380
  }
345
381
  },
346
- search(param, cb) {
347
- !param && (param = {})
382
+ search(param, cb, isSearchBtn, needRequestTotal = false) {
383
+ // 不需要请求后端接口统计列表数据
384
+ this.needRequestTotal = needRequestTotal
385
+ !param && (param = {})
348
386
  param.pageBean = this.pagination
349
387
  const dataTemplateQueryVo = {
350
388
  queryFilter: param,
@@ -366,11 +404,20 @@ export default {
366
404
  param: dataTemplateQueryVo,
367
405
  }
368
406
  this.getQuerySqlViewByPagination(obj, cb)
369
-
370
-
371
407
  },
372
408
  getQuerySqlViewByPagination(param, cb) {
373
- debugger
409
+ if (this.needRequestTotal) {
410
+ // 调用后端接口更新 tableDataTotal
411
+ this.$requestConfig.getViewDataListTotal(param).then((res) => {
412
+ for (const key in res) {
413
+ const newKey = key.toLowerCase()
414
+ this.tableDataTotal[newKey] = res[key]
415
+ }
416
+ this.$nextTick(() => {
417
+ this.$refs.queryViewList && this.$refs.queryViewList.doLayout()
418
+ })
419
+ })
420
+ }
374
421
  this.$requestConfig
375
422
  .getQueryViewDataList(param)
376
423
  .then((response) => {
@@ -390,6 +437,9 @@ export default {
390
437
  if (this.queryView.summaryRegionHtml) {
391
438
  this.loadCompiledCustomSummary()
392
439
  }
440
+ this.$nextTick(() => {
441
+ this.$refs.queryViewList && this.$refs.queryViewList.doLayout()
442
+ })
393
443
  })
394
444
  .finally(() => {
395
445
  cb && cb()
@@ -677,7 +727,7 @@ export default {
677
727
  punchOrder() {
678
728
  this.$store
679
729
  .dispatch('storeProcess/downLoadToFile', 'Batchkeijyo')
680
- .then(() => {})
730
+ .then(() => { })
681
731
  },
682
732
  beforeAvatarUpload(file) {
683
733
  var fileName = new Array()
@@ -704,7 +754,7 @@ export default {
704
754
  this.$message.success('送付状成功')
705
755
  window.location.reload()
706
756
  },
707
- handlePreview() {},
757
+ handlePreview() { },
708
758
  //确定导出
709
759
  submitExport() {
710
760
  if (!this.exportData || this.exportData.expField.length < 1) {
@@ -979,10 +1029,81 @@ export default {
979
1029
  )
980
1030
  return checkField.length
981
1031
  ? checkField.filter(
982
- (field) =>
983
- field.checked && ['序号', '操作'].indexOf(field.value) == -1
984
- )
1032
+ (field) =>
1033
+ field.checked && ['序号', '操作'].indexOf(field.value) == -1
1034
+ )
985
1035
  : customColumns
986
1036
  },
1037
+ ChangeRecordDialogsShow(FormDataid, templateKey) {
1038
+ this.ChangeRecord.ChangeRecordVisible = true
1039
+ let param = {
1040
+ pageBean: {
1041
+ page: 1,
1042
+ pageSize: 10,
1043
+ showTotal: true,
1044
+ },
1045
+ sorter: [
1046
+ {
1047
+ direction: 'ASC',
1048
+ property: 'modifyTime',
1049
+ },
1050
+ ],
1051
+ querys: [
1052
+ {
1053
+ property: 'ref_id_',
1054
+ value: FormDataid,
1055
+ group: 'main',
1056
+ operation: 'EQUAL',
1057
+ relation: 'AND',
1058
+ },
1059
+ ],
1060
+ }
1061
+ this.ChangeRecord.currentTemplateKey = templateKey
1062
+ this.ChangeRecord.recordTableLoading = true
1063
+ this.$requestConfig.boDataModifyRecord(param).then((resp) => {
1064
+ this.ChangeRecord.recordTableLoading = false
1065
+ this.ChangeRecord.recordList = resp.rows
1066
+ this.ChangeRecord.modifyRecord.pagination.pageBean = {
1067
+ pageSize: resp.pageSize,
1068
+ page: resp.page,
1069
+ total: resp.total,
1070
+ }
1071
+ })
1072
+ },
1073
+ ChangeRecordDialogsClose() {
1074
+ this.ChangeRecord = _.cloneDeep(this.initChangeRecord)
1075
+ },
1076
+ openModifyDetail(row) {
1077
+ this.ChangeRecord.currentModify = row
1078
+ this.ChangeRecord.modifyDetailDialogVisible = true
1079
+ },
1080
+ //查看修改记录详情
1081
+ showModifyRecord(id, refId, templateKey) {
1082
+ var url =
1083
+ '/templateForm/' +
1084
+ templateKey +
1085
+ '/get?single=true' +
1086
+ '&id=' +
1087
+ refId +
1088
+ '&startFlow=false&recordId=' +
1089
+ id +
1090
+ '&isNewPage=true'
1091
+ window.open(this.$router.resolve(url).href, '_blank')
1092
+ },
1093
+ executeMethod(params) {
1094
+ const executeMethodloading = this.$loading({
1095
+ fullscreen: true,
1096
+ lock: true,
1097
+ })
1098
+ this.$requestConfig.request(params).then((result) => {
1099
+ executeMethodloading.close()
1100
+ if (result) {
1101
+ this.$message.success('执行成功!')
1102
+ } else {
1103
+ this.$message.error('执行失败!')
1104
+ }
1105
+ this.search()
1106
+ })
1107
+ },
987
1108
  },
988
1109
  }
@@ -220,6 +220,8 @@ export default {
220
220
  defaultCurrentInnerHeight: this.currentTableHeight
221
221
  ? window.innerHeight - 280
222
222
  : 0.85 * window.innerHeight,
223
+ needRequestTotal: false, // 需不需要后端统计列表全部数据
224
+ tableDataTotal: {},
223
225
  }
224
226
  },
225
227
  watch: {
@@ -1406,7 +1408,9 @@ export default {
1406
1408
  return params
1407
1409
  },
1408
1410
  //列表数据查询入口
1409
- search(param, cb, isSearchBtn) {
1411
+ search(param, cb, isSearchBtn, needRequestTotal = false) {
1412
+ // 不需要请求后端接口统计列表数据
1413
+ this.needRequestTotal = needRequestTotal
1410
1414
  // 如果是高级查询,页码重置为首页
1411
1415
  if (isSearchBtn) {
1412
1416
  this.pagination.page = 1
@@ -1609,6 +1613,21 @@ export default {
1609
1613
  }
1610
1614
  dataTemplateQueryVo.refIdValue = params.refIdValue
1611
1615
  this.curSelectParams = dataTemplateQueryVo
1616
+ if (this.needRequestTotal) {
1617
+ // 调用后端接口更新 tableDataTotal
1618
+ this.$requestConfig
1619
+ .getDataTemplateDataListTotal(dataTemplateQueryVo)
1620
+ .then((res) => {
1621
+ for (const key in res) {
1622
+ const newKey = key.toLowerCase()
1623
+ this.tableDataTotal[newKey] = res[key]
1624
+ }
1625
+ this.$nextTick(() => {
1626
+ this.$refs.multipleTemplateTable &&
1627
+ this.$refs.multipleTemplateTable.doLayout()
1628
+ })
1629
+ })
1630
+ }
1612
1631
  this.$requestConfig
1613
1632
  .getDataTemplateDataList(dataTemplateQueryVo)
1614
1633
  .then((response) => {
@@ -1630,6 +1649,8 @@ export default {
1630
1649
  if (this.pagination.page == 1) {
1631
1650
  this.$refs.multipleTemplateTable &&
1632
1651
  this.$refs.multipleTemplateTable.calcTableHeight(300)
1652
+ this.$refs.multipleTemplateTable &&
1653
+ this.$refs.multipleTemplateTable.doLayout()
1633
1654
  }
1634
1655
  })
1635
1656
  })
@@ -2124,7 +2145,8 @@ export default {
2124
2145
  defId,
2125
2146
  isStartFlow,
2126
2147
  openType,
2127
- quitAfterSaving
2148
+ quitAfterSaving,
2149
+ needOpinion
2128
2150
  ) {
2129
2151
  let customTitleName =
2130
2152
  action == 'addFlow'
@@ -2245,6 +2267,7 @@ export default {
2245
2267
  dialogWidth: this.dialogWidth,
2246
2268
  dialogHeight: this.dialogHeight,
2247
2269
  quitAfterSaving,
2270
+ needOpinion: needOpinion && action == 'edit' ? needOpinion : '',
2248
2271
  })
2249
2272
  // this.dataViewDialogVisible = true
2250
2273
  // this.$refs.dataViewDialog.$el.firstChild.style.height = 740 + 'px'
@@ -2258,6 +2281,7 @@ export default {
2258
2281
  query: {
2259
2282
  quitAfterSaving,
2260
2283
  customTitleName,
2284
+ needOpinion,
2261
2285
  },
2262
2286
  })
2263
2287
  }
@@ -4023,7 +4047,8 @@ export default {
4023
4047
  parameter.defId,
4024
4048
  parameter.isStartFlow,
4025
4049
  parameter.openType,
4026
- parameter.quitAfterSaving
4050
+ parameter.quitAfterSaving,
4051
+ parameter.needOpinion
4027
4052
  )
4028
4053
  } else if (this.checkSelect()) {
4029
4054
  parameter.id = this.tableData.selectRows[0].id_