cloud-web-corejs 1.0.54-dev.211 → 1.0.54-dev.213

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.
@@ -240,6 +240,7 @@ modules = {
240
240
  await this.initSaleOrgData();
241
241
  await this.initUserRoleData();
242
242
  await this.initBdService();
243
+ // this.handleAllTableColumnWidget();
243
244
  this.buildFormModel(!this.formJsonObj ? null : this.formJsonObj.widgetList);
244
245
  // this.hanldeCommonWidget();//处理组件显隐规则
245
246
  if (formConfig.isLoadEntity) {
@@ -467,14 +468,25 @@ modules = {
467
468
  }
468
469
  });
469
470
  },
471
+ handleAllTableColumnWidget(){
472
+ traverseAllWidgetsNew(this.formJson.widgetList, (widget) => {
473
+ //修复data-table旧数据表格列widget与editWidget为空的问题
474
+ if(widget.type == "data-table"){
475
+ this.handleTableColumnWidget(widget);
476
+ }
477
+ })
478
+ },
470
479
  handleTableColumnWidget(widget) {
471
480
  //修复data-table旧数据表格列widget与editWidget为空的问题
472
481
  if (!widget || widget.type != "data-table" || !widget.options.tableColumns) return
473
482
  let columnLoopDo = (t, e) => {
474
483
  if (t.children && t.children.length) {
475
- t.children.forEach(item => {
484
+ for (let item of t.children){
476
485
  columnLoopDo(item)
477
- })
486
+ }
487
+ /*t.children.forEach(item => {
488
+ columnLoopDo(item)
489
+ })*/
478
490
  } else {
479
491
  let type1 = columnFormatMap[t.formatS];
480
492
  if (type1 && t.columnOption && !t.widget) {
@@ -498,9 +510,12 @@ modules = {
498
510
  }
499
511
  }
500
512
 
501
- widget.options.tableColumns.forEach(item => {
513
+ for (let item of widget.options.tableColumns){
502
514
  columnLoopDo(item)
503
- })
515
+ }
516
+ /*widget.options.tableColumns.forEach(item => {
517
+ columnLoopDo(item)
518
+ })*/
504
519
  },
505
520
  hanldeCommonWidget2() {
506
521
  let wfParam = this.wfParam || {};
@@ -633,12 +648,13 @@ modules = {
633
648
  },
634
649
  hanldeWfWidgetNew1(widget) {
635
650
  if (!widget) return;
636
- if (this.getIsfreeWidgetTypesOfWf(widget)) return//过滤掉不受限组件
651
+ let flag = widget.columnType && ['editDelete', 'removeTreeRow'].includes(widget.columnType)
652
+ if (!flag && this.getIsfreeWidgetTypesOfWf(widget)) return//过滤掉不受限组件
637
653
  if (this.widgetEditOnWf) return//匹配到流程第一步可编辑,不执行下面禁用隐藏
638
654
  let wfParam = this.wfParam || {};
639
655
  if (!wfParam.hasWf) return;//过滤掉没流程
640
656
 
641
- if (widget.columnType && ['editDelete', 'removeTreeRow'].includes(widget.columnType)) {
657
+ if (flag) {
642
658
  //数据表格列的删除标识,有流程隐藏
643
659
  widget.options.hidden = true
644
660
  } else if (this.getIsHiddenWidgetTypesOfWf(widget)) {