cloud-web-corejs 1.0.98 → 1.0.100
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/form-widget/container-widget/data-table-mixin.js +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +70 -18
- package/src/mixins/selectDialog/index.js +1 -1
- package/src/views/user/user/dialog.vue +1 -1
- package/src/views/user/wf/wf_obj_config/list.vue +3 -2
@@ -44,7 +44,7 @@
|
|
44
44
|
fixed="left"
|
45
45
|
>
|
46
46
|
<template #default="scope">
|
47
|
-
<el-input v-model="scope.row.label"></el-input>
|
47
|
+
<el-input v-model="scope.row.label" @change="changeRowLabel(scope.row)"></el-input>
|
48
48
|
</template>
|
49
49
|
</el-table-column>
|
50
50
|
<el-table-column
|
@@ -55,6 +55,7 @@
|
|
55
55
|
<template #default="scope">
|
56
56
|
<el-input
|
57
57
|
v-model="scope.row.prop"
|
58
|
+
@change="changeRowProp(scope.row)"
|
58
59
|
:disabled="'editAttachment' == scope.row.formatS"
|
59
60
|
></el-input>
|
60
61
|
</template>
|
@@ -79,7 +80,7 @@
|
|
79
80
|
</el-table-column>
|
80
81
|
<el-table-column :label="i18nt('必填')" width="70" prop="required">
|
81
82
|
<template #default="scope">
|
82
|
-
<el-switch v-model="scope.row.required"></el-switch>
|
83
|
+
<el-switch v-model="scope.row.required" @change="changeRowRequired(scope.row)"></el-switch>
|
83
84
|
</template>
|
84
85
|
</el-table-column>
|
85
86
|
<el-table-column
|
@@ -499,7 +500,7 @@
|
|
499
500
|
<script>
|
500
501
|
import i18n from "../../../../../../components/xform/utils/i18n";
|
501
502
|
import Sortable from "sortablejs";
|
502
|
-
import {generateId, loopHandleWidget,deepClone} from "../../../../../../components/xform/utils/util";
|
503
|
+
import {generateId, loopHandleWidget, deepClone} from "../../../../../../components/xform/utils/util";
|
503
504
|
import columnRenderDialog from "./columnRenderDialog.vue"
|
504
505
|
import {businessFields} from "@base/components/xform/form-designer/widget-panel/widgetsConfig";
|
505
506
|
|
@@ -1158,12 +1159,12 @@ export default {
|
|
1158
1159
|
return isButtontCell;
|
1159
1160
|
},
|
1160
1161
|
//drag end
|
1161
|
-
changeFormatS(row,isEdit) {
|
1162
|
+
changeFormatS(row, isEdit) {
|
1162
1163
|
let formatS = isEdit ? row.editFormatS : row.formatS;
|
1163
1164
|
let isButtontCell = this.getIsButtontCell(formatS);
|
1164
1165
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, true, isEdit);
|
1165
1166
|
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1166
|
-
if(!isEdit){
|
1167
|
+
if (!isEdit) {
|
1167
1168
|
//格式化类型
|
1168
1169
|
if (columnSelectedWidget) {
|
1169
1170
|
row.columnOption = columnSelectedWidget.options;
|
@@ -1172,7 +1173,7 @@ export default {
|
|
1172
1173
|
row.columnOption = {};
|
1173
1174
|
row.widget = null;
|
1174
1175
|
}
|
1175
|
-
}else{
|
1176
|
+
} else {
|
1176
1177
|
//编辑插槽类型
|
1177
1178
|
if (columnSelectedWidget) {
|
1178
1179
|
row.columnOption = columnSelectedWidget.options;
|
@@ -1183,7 +1184,7 @@ export default {
|
|
1183
1184
|
}
|
1184
1185
|
}
|
1185
1186
|
|
1186
|
-
if(!isEdit){
|
1187
|
+
if (!isEdit) {
|
1187
1188
|
if (row.formatS == "editTreeButtonGroup") {
|
1188
1189
|
row.prop = null;
|
1189
1190
|
row.label = null;
|
@@ -1355,6 +1356,15 @@ export default {
|
|
1355
1356
|
}
|
1356
1357
|
return result;
|
1357
1358
|
},
|
1359
|
+
|
1360
|
+
getRowWidget(row){
|
1361
|
+
let widget = row.widget
|
1362
|
+
if(!widget){
|
1363
|
+
widget.options.a = a;
|
1364
|
+
widget.options.a = a;
|
1365
|
+
}
|
1366
|
+
return widget;
|
1367
|
+
},
|
1358
1368
|
openFormatConfigDialog(row, index) {
|
1359
1369
|
if (row.formatS == 'widgetRender') {
|
1360
1370
|
let formWidgetList = deepClone(this.designer.widgetList);
|
@@ -1371,7 +1381,7 @@ export default {
|
|
1371
1381
|
targetColumn = this.findColumnByColumnId(item.options.tableColumns, columnId)
|
1372
1382
|
}
|
1373
1383
|
});
|
1374
|
-
let getWidgetList = (subWidgetList = []) =>{
|
1384
|
+
let getWidgetList = (subWidgetList = []) => {
|
1375
1385
|
targetColumn.widgetList = this.$baseLodash.cloneDeep(subWidgetList);
|
1376
1386
|
return formWidgetList;
|
1377
1387
|
}
|
@@ -1387,7 +1397,7 @@ export default {
|
|
1387
1397
|
}
|
1388
1398
|
|
1389
1399
|
|
1390
|
-
let option = row.columnOption;
|
1400
|
+
/*let option = row.columnOption;
|
1391
1401
|
let selectedWidget;
|
1392
1402
|
let columnWidgetConfig = this.getColumnWidgetConfig(row);
|
1393
1403
|
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
@@ -1400,7 +1410,8 @@ export default {
|
|
1400
1410
|
}
|
1401
1411
|
|
1402
1412
|
let columnOption = this.$baseLodash.cloneDeep(option);
|
1403
|
-
row.columnOption = columnOption
|
1413
|
+
row.columnOption = columnOption;*/
|
1414
|
+
let selectedWidget = row.widget;
|
1404
1415
|
this.operateIndex = index;
|
1405
1416
|
|
1406
1417
|
let tableColumns = this.tableData;
|
@@ -1409,7 +1420,7 @@ export default {
|
|
1409
1420
|
columnSelectedWidget: selectedWidget,
|
1410
1421
|
tableColumns,
|
1411
1422
|
index: index,
|
1412
|
-
columnEditFields: columnEditFields,
|
1423
|
+
// columnEditFields: columnEditFields,
|
1413
1424
|
callback: (columnOption) => {
|
1414
1425
|
this.confirmFormatConfigDialog(columnOption, row);
|
1415
1426
|
},
|
@@ -1423,9 +1434,9 @@ export default {
|
|
1423
1434
|
// let row = this.tableData[this.operateIndex];
|
1424
1435
|
row.columnOption = columnOption;
|
1425
1436
|
|
1426
|
-
if(row.widget){
|
1437
|
+
if (row.widget) {
|
1427
1438
|
row.widget.options = columnOption;
|
1428
|
-
}else{
|
1439
|
+
} else {
|
1429
1440
|
let type = this.columnFormatMap[row.formatS];
|
1430
1441
|
let fieldWidget = this.designer.copyNewFieldWidget(
|
1431
1442
|
this.designer.getFieldWidgetByType(type)
|
@@ -1442,7 +1453,7 @@ export default {
|
|
1442
1453
|
}
|
1443
1454
|
},
|
1444
1455
|
openEditFormatConfigDialog(row, index) {
|
1445
|
-
let option = row.columnOption;
|
1456
|
+
/*let option = row.columnOption;
|
1446
1457
|
let selectedWidget;
|
1447
1458
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, null, true);
|
1448
1459
|
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
@@ -1455,7 +1466,8 @@ export default {
|
|
1455
1466
|
}
|
1456
1467
|
|
1457
1468
|
let columnOption = this.$baseLodash.cloneDeep(option);
|
1458
|
-
row.editColumnOption = columnOption
|
1469
|
+
row.editColumnOption = columnOption;*/
|
1470
|
+
let selectedWidget = row.editWidget;
|
1459
1471
|
this.operateIndex = index;
|
1460
1472
|
|
1461
1473
|
let tableColumns = this.tableData;
|
@@ -1464,7 +1476,7 @@ export default {
|
|
1464
1476
|
tableColumns,
|
1465
1477
|
columnSelectedWidget: selectedWidget,
|
1466
1478
|
index: index,
|
1467
|
-
columnEditFields: columnEditFields,
|
1479
|
+
// columnEditFields: columnEditFields,
|
1468
1480
|
callback: (columnOption) => {
|
1469
1481
|
this.confirmEditFormatConfigDialog(columnOption, row);
|
1470
1482
|
},
|
@@ -1475,9 +1487,9 @@ export default {
|
|
1475
1487
|
row.editColumnOption = columnOption;
|
1476
1488
|
// row.editWidget.options = columnOption;
|
1477
1489
|
|
1478
|
-
if(row.editWidget){
|
1490
|
+
if (row.editWidget) {
|
1479
1491
|
row.editWidget.options = columnOption;
|
1480
|
-
}else{
|
1492
|
+
} else {
|
1481
1493
|
let type = this.columnFormatMap[row.editFormatS];
|
1482
1494
|
let fieldWidget = this.designer.copyNewFieldWidget(
|
1483
1495
|
this.designer.getFieldWidgetByType(type)
|
@@ -1531,6 +1543,46 @@ export default {
|
|
1531
1543
|
);
|
1532
1544
|
this.showTableColumnConfigDialog = false;
|
1533
1545
|
},
|
1546
|
+
changeRowLabel(row) {
|
1547
|
+
this.setRowWidgetAttars(row, 'label', row.label);
|
1548
|
+
},
|
1549
|
+
changeRowProp(row) {
|
1550
|
+
this.setRowWidgetAttars(row, 'keyName', row.prop);
|
1551
|
+
},
|
1552
|
+
changeRowRequired(row) {
|
1553
|
+
this.setRowWidgetAttars(row, 'required', row.required);
|
1554
|
+
},
|
1555
|
+
setRowWidgetAttars(row, key, value) {
|
1556
|
+
let type1 = this.columnFormatMap[row.formatS];
|
1557
|
+
let type2 = this.columnFormatMap[row.editFormatS];
|
1558
|
+
let newWidget = type1 ? this.designer.copyNewFieldWidget(
|
1559
|
+
this.designer.getFieldWidgetByType(type1)
|
1560
|
+
) : null;
|
1561
|
+
|
1562
|
+
let newEditWidget = type2 ? this.designer.copyNewFieldWidget(
|
1563
|
+
this.designer.getFieldWidgetByType(type2)
|
1564
|
+
) : null;
|
1565
|
+
|
1566
|
+
if (newWidget.formItemFlag) {
|
1567
|
+
if (row.widget) {
|
1568
|
+
if (row.widget.options[key] !== undefined) row.widget.options[key] = value;
|
1569
|
+
}
|
1570
|
+
if (row.columnOption) {
|
1571
|
+
if (row.columnOption[key] !== undefined) row.columnOption[key] = value;
|
1572
|
+
}
|
1573
|
+
}
|
1574
|
+
|
1575
|
+
if (newWidget.formItemFlag) {
|
1576
|
+
if (row.editWidget) {
|
1577
|
+
if (row.editWidget.options[key] !== undefined) row.editWidget.options[key] = value;
|
1578
|
+
}
|
1579
|
+
if (row.editColumnOption) {
|
1580
|
+
if (row.editColumnOption[key] !== undefined) row.editColumnOption[key] = value;
|
1581
|
+
}
|
1582
|
+
}
|
1583
|
+
|
1584
|
+
|
1585
|
+
},
|
1534
1586
|
},
|
1535
1587
|
};
|
1536
1588
|
</script>
|