cloud-web-corejs 1.0.54-dev.210 → 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.
- package/package.json +1 -1
- package/src/components/xform/form-designer/designer.js +1 -1536
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +1 -244
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1376
- package/src/components/xform/form-designer/indexMixin.js +1 -872
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -324
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +1 -290
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -1
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -2340
- package/src/components/xform/form-render/indexMixin.js +28 -11
- package/src/components/xform/mixins/defaultHandle.js +1 -120
- package/src/components/xform/mixins/scriptHttp.js +1 -162
- package/src/components/xform/utils/util.js +2 -2
- package/src/mixins/selectDialog/index.js +1 -241
@@ -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
|
-
|
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) {
|
@@ -482,25 +494,28 @@ modules = {
|
|
482
494
|
this.getFieldWidgetByType(type1)
|
483
495
|
);
|
484
496
|
fieldWidget.options = t.columnOption;
|
485
|
-
fieldWidget.columnType = t.formatS
|
486
497
|
t.widget = fieldWidget;
|
487
498
|
}
|
499
|
+
if (t.widget) t.widget.columnType = t.formatS
|
500
|
+
|
488
501
|
let type2 = columnFormatMap[t.editFormatS];
|
489
502
|
if (type2 && t.editColumnOption && !t.editWidget) {
|
490
503
|
let fieldWidget = this.copyNewFieldWidget(
|
491
504
|
this.getFieldWidgetByType(type2)
|
492
505
|
);
|
493
506
|
fieldWidget.options = t.editColumnOption;
|
494
|
-
fieldWidget.columnType = t.editFormatS
|
495
|
-
|
496
507
|
t.editWidget = fieldWidget;
|
497
508
|
}
|
509
|
+
if (t.editWidget) t.editWidget.columnType = t.editFormatS
|
498
510
|
}
|
499
511
|
}
|
500
512
|
|
501
|
-
widget.options.tableColumns
|
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 || {};
|
@@ -618,14 +633,14 @@ modules = {
|
|
618
633
|
}
|
619
634
|
},
|
620
635
|
getIsfreeWidgetTypesOfWf(widget) {
|
621
|
-
if(!widget)return false;
|
636
|
+
if (!widget) return false;
|
622
637
|
let widgetType = widget.type;
|
623
638
|
let sourceType = widget.sourceType;
|
624
639
|
let result = freeWidgetTypesOfWf.includes(widgetType) || (sourceType && freeWidgetTypesOfWf.includes(sourceType))
|
625
640
|
return widget.options.label == "重置" || result
|
626
641
|
},
|
627
642
|
getIsHiddenWidgetTypesOfWf(widget) {
|
628
|
-
if(!widget)return false;
|
643
|
+
if (!widget) return false;
|
629
644
|
let widgetType = widget.type;
|
630
645
|
let targetType = widget.targetType;
|
631
646
|
let result = hiddenWidgetTypesOfWf.includes(widgetType) || (targetType && hiddenWidgetTypesOfWf.includes(targetType))
|
@@ -633,11 +648,13 @@ modules = {
|
|
633
648
|
},
|
634
649
|
hanldeWfWidgetNew1(widget) {
|
635
650
|
if (!widget) return;
|
636
|
-
|
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
|
+
|
657
|
+
if (flag) {
|
641
658
|
//数据表格列的删除标识,有流程隐藏
|
642
659
|
widget.options.hidden = true
|
643
660
|
} else if (this.getIsHiddenWidgetTypesOfWf(widget)) {
|