sun-biz 0.0.3-beta.7 → 0.0.3-beta.9
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/dist/components/index.js +89 -53
- package/dist/index.js +89 -53
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -460,6 +460,7 @@ function use_fetch_dataset_useFetchDataset(codeSystemCodes, enabledFlag) {
|
|
|
460
460
|
* @param params
|
|
461
461
|
* @returns
|
|
462
462
|
*/ const exportData2File = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/untils/exportData2File', params);
|
|
463
|
+
const SELECTION = 'selection'; // 定义 CheckboxValueType 类型
|
|
463
464
|
function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
464
465
|
const changeSort = debounce(changeInputSort, 1200);
|
|
465
466
|
return [
|
|
@@ -485,6 +486,7 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
485
486
|
'false-label': 0,
|
|
486
487
|
size: 'small',
|
|
487
488
|
modelValue: row.displayFlag,
|
|
489
|
+
disabled: row.type === SELECTION,
|
|
488
490
|
'onUpdate:modelValue': (value)=>row.displayFlag = value
|
|
489
491
|
})
|
|
490
492
|
},
|
|
@@ -496,6 +498,7 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
496
498
|
maxLength: 16,
|
|
497
499
|
'controls-position': 'right',
|
|
498
500
|
modelValue: row.minWidth,
|
|
501
|
+
disabled: row.type === SELECTION,
|
|
499
502
|
'onUpdate:modelValue': (value)=>row.minWidth = value,
|
|
500
503
|
size: 'small',
|
|
501
504
|
placeholder: '请输入列宽 (最小值)'
|
|
@@ -510,7 +513,7 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
510
513
|
min: 0,
|
|
511
514
|
'controls-position': 'right',
|
|
512
515
|
modelValue: row.sort,
|
|
513
|
-
disabled: disabledDraggable.value,
|
|
516
|
+
disabled: disabledDraggable.value || row.type === SELECTION,
|
|
514
517
|
'onUpdate:modelValue': (value)=>row.sort = value,
|
|
515
518
|
onInput: (sort)=>{
|
|
516
519
|
changeSort(index, sort);
|
|
@@ -924,7 +927,10 @@ const _hoisted_3 = {
|
|
|
924
927
|
});
|
|
925
928
|
sourceData.value.sort((a, b)=>a.sort - b.sort);
|
|
926
929
|
});
|
|
927
|
-
const tableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>sourceData.value.
|
|
930
|
+
const tableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>sourceData.value.map((item)=>({
|
|
931
|
+
...item,
|
|
932
|
+
isHidden: item.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
933
|
+
})));
|
|
928
934
|
function changeSourceData(data) {
|
|
929
935
|
sourceData.value = data;
|
|
930
936
|
}
|
|
@@ -1176,7 +1182,7 @@ const _hoisted_3 = {
|
|
|
1176
1182
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1177
1183
|
[
|
|
1178
1184
|
'__scopeId',
|
|
1179
|
-
"data-v-
|
|
1185
|
+
"data-v-a19d408c"
|
|
1180
1186
|
]
|
|
1181
1187
|
]);
|
|
1182
1188
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -1197,7 +1203,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1197
1203
|
emits: [
|
|
1198
1204
|
'success'
|
|
1199
1205
|
],
|
|
1200
|
-
setup (__props, { emit: __emit }) {
|
|
1206
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
1201
1207
|
const columnsSettingRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1202
1208
|
const dataSetList = use_fetch_dataset_useFetchDataset([
|
|
1203
1209
|
FILE_TYPE_CODE
|
|
@@ -1270,6 +1276,9 @@ const EXPORT_FILE = 'export-file';
|
|
|
1270
1276
|
exportFile(value[0]);
|
|
1271
1277
|
}
|
|
1272
1278
|
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>columnsSettingRef.value?.exportFileFlag);
|
|
1279
|
+
__expose({
|
|
1280
|
+
exportFileFlag
|
|
1281
|
+
});
|
|
1273
1282
|
return (_ctx, _cache)=>{
|
|
1274
1283
|
const _component_Setting = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("Setting");
|
|
1275
1284
|
const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
|
|
@@ -1327,7 +1336,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1327
1336
|
const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
|
|
1328
1337
|
[
|
|
1329
1338
|
'__scopeId',
|
|
1330
|
-
"data-v-
|
|
1339
|
+
"data-v-52eaeaae"
|
|
1331
1340
|
]
|
|
1332
1341
|
]);
|
|
1333
1342
|
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
@@ -1418,6 +1427,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1418
1427
|
key: 1,
|
|
1419
1428
|
class: "mt-5 flex justify-between items-center"
|
|
1420
1429
|
};
|
|
1430
|
+
const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'selection';
|
|
1421
1431
|
// 接受父组件参数,配置默认值
|
|
1422
1432
|
/* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1423
1433
|
__name: 'index',
|
|
@@ -1436,7 +1446,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1436
1446
|
default: void 0
|
|
1437
1447
|
},
|
|
1438
1448
|
componentNo: {
|
|
1439
|
-
default:
|
|
1449
|
+
default: ''
|
|
1440
1450
|
},
|
|
1441
1451
|
fetchData: {
|
|
1442
1452
|
type: Function,
|
|
@@ -1455,8 +1465,12 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1455
1465
|
type: Boolean,
|
|
1456
1466
|
default: false
|
|
1457
1467
|
},
|
|
1468
|
+
defaultQuery: {
|
|
1469
|
+
type: Boolean,
|
|
1470
|
+
default: true
|
|
1471
|
+
},
|
|
1458
1472
|
rowKey: {
|
|
1459
|
-
default:
|
|
1473
|
+
default: 'id'
|
|
1460
1474
|
},
|
|
1461
1475
|
loading: {
|
|
1462
1476
|
type: Boolean,
|
|
@@ -1474,10 +1488,10 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1474
1488
|
default: ()=>({})
|
|
1475
1489
|
},
|
|
1476
1490
|
layout: {
|
|
1477
|
-
default:
|
|
1491
|
+
default: 'total, sizes, prev, pager, next'
|
|
1478
1492
|
},
|
|
1479
1493
|
dragTips: {
|
|
1480
|
-
default:
|
|
1494
|
+
default: '温馨提示:您可通过拖动进行排序'
|
|
1481
1495
|
},
|
|
1482
1496
|
isShowDragTips: {
|
|
1483
1497
|
type: Boolean,
|
|
@@ -1487,7 +1501,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1487
1501
|
default: {}
|
|
1488
1502
|
},
|
|
1489
1503
|
dragTipsClassName: {
|
|
1490
|
-
default:
|
|
1504
|
+
default: ''
|
|
1491
1505
|
}
|
|
1492
1506
|
},
|
|
1493
1507
|
emits: [
|
|
@@ -1513,12 +1527,13 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1513
1527
|
});
|
|
1514
1528
|
const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
1515
1529
|
const columnTypes = [
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1530
|
+
'selection',
|
|
1531
|
+
'radio',
|
|
1532
|
+
'index',
|
|
1533
|
+
'expand',
|
|
1534
|
+
'sort'
|
|
1521
1535
|
];
|
|
1536
|
+
const tableSettingButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); //表格设置
|
|
1522
1537
|
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1523
1538
|
// 生成组件唯一id
|
|
1524
1539
|
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
|
|
@@ -1536,7 +1551,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1536
1551
|
sortData.curData = item;
|
|
1537
1552
|
sortData.result = data;
|
|
1538
1553
|
}
|
|
1539
|
-
if (item?.[attrs?.[
|
|
1554
|
+
if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
|
|
1540
1555
|
});
|
|
1541
1556
|
return sortData;
|
|
1542
1557
|
}
|
|
@@ -1546,7 +1561,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1546
1561
|
let data = [
|
|
1547
1562
|
...state.tableData
|
|
1548
1563
|
];
|
|
1549
|
-
if (attrs?.[
|
|
1564
|
+
if (attrs?.['tree-props']) {
|
|
1550
1565
|
let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
|
|
1551
1566
|
startIndex: -1
|
|
1552
1567
|
}, {
|
|
@@ -1562,7 +1577,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1562
1577
|
curData: {}
|
|
1563
1578
|
});
|
|
1564
1579
|
if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
|
|
1565
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(
|
|
1580
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
|
|
1566
1581
|
return [];
|
|
1567
1582
|
}
|
|
1568
1583
|
const [removedItem] = result.splice(oldCurIndex, 1);
|
|
@@ -1578,16 +1593,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1578
1593
|
* 表格拖拽排序
|
|
1579
1594
|
**/ const initDragSort = ()=>{
|
|
1580
1595
|
const tbody = document.querySelector(`#${uuid.value} tbody`);
|
|
1581
|
-
let initialHTML =
|
|
1596
|
+
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
1582
1597
|
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
1583
|
-
handle:
|
|
1598
|
+
handle: '.cursor-move',
|
|
1584
1599
|
animation: 300,
|
|
1585
1600
|
onEnd (evt) {
|
|
1586
1601
|
const { newIndex, oldIndex } = evt;
|
|
1587
1602
|
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
1588
1603
|
//获取拖动后的排序
|
|
1589
1604
|
let data = getSortableResult(newIndex, oldIndex);
|
|
1590
|
-
if (data.length) emit(
|
|
1605
|
+
if (data.length) emit('drag-end', data);
|
|
1591
1606
|
else evt.from.innerHTML = initialHTML;
|
|
1592
1607
|
},
|
|
1593
1608
|
onStart (evt) {
|
|
@@ -1602,7 +1617,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1602
1617
|
});
|
|
1603
1618
|
async function fetchDbgridComponent() {
|
|
1604
1619
|
let [, result] = await queryDbgridComponentByExample({
|
|
1605
|
-
componentNo: props.componentNo ||
|
|
1620
|
+
componentNo: props.componentNo || ''
|
|
1606
1621
|
});
|
|
1607
1622
|
if (result?.success) try {
|
|
1608
1623
|
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
@@ -1621,7 +1636,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1621
1636
|
if (props.draggable) (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
1622
1637
|
initDragSort();
|
|
1623
1638
|
});
|
|
1624
|
-
if (props.pagination && props?.fetchData) fetchList();
|
|
1639
|
+
if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
|
|
1625
1640
|
});
|
|
1626
1641
|
/**
|
|
1627
1642
|
* 获取列表
|
|
@@ -1639,7 +1654,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1639
1654
|
state.pageInfo.pageNumber = 1;
|
|
1640
1655
|
state.pageInfo.pageSize = val;
|
|
1641
1656
|
fetchList();
|
|
1642
|
-
} else emit(
|
|
1657
|
+
} else emit('size-page-change', val);
|
|
1643
1658
|
};
|
|
1644
1659
|
/**
|
|
1645
1660
|
* 分页组件改变 当前页数 事件
|
|
@@ -1647,7 +1662,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1647
1662
|
if (props.fetchData) {
|
|
1648
1663
|
state.pageInfo.pageNumber = val;
|
|
1649
1664
|
fetchList();
|
|
1650
|
-
} else emit(
|
|
1665
|
+
} else emit('current-page-change', val);
|
|
1651
1666
|
}
|
|
1652
1667
|
// 超级表格 ref
|
|
1653
1668
|
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
@@ -1664,7 +1679,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1664
1679
|
if (Object.keys(props.filterObj).length) return [
|
|
1665
1680
|
...state.tableData
|
|
1666
1681
|
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
1667
|
-
|
|
1682
|
+
'',
|
|
1668
1683
|
void 0,
|
|
1669
1684
|
null
|
|
1670
1685
|
].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
|
|
@@ -1704,31 +1719,54 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1704
1719
|
});
|
|
1705
1720
|
/**
|
|
1706
1721
|
* 处理接口和本地的columns
|
|
1707
|
-
*/ const
|
|
1722
|
+
*/ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1708
1723
|
if (!props.componentNo) return props.columns;
|
|
1709
1724
|
{
|
|
1710
|
-
|
|
1725
|
+
let result = [
|
|
1726
|
+
...props.columns
|
|
1727
|
+
].map((cur)=>({
|
|
1711
1728
|
displayFlag: cur.isHidden || cur.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
1712
1729
|
...cur
|
|
1713
1730
|
}));
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1731
|
+
if (serveColumns.value?.length) {
|
|
1732
|
+
result = result.map((item, index)=>{
|
|
1733
|
+
let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {};
|
|
1734
|
+
return {
|
|
1735
|
+
displayFlag: item.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
1736
|
+
...item,
|
|
1737
|
+
sort: index + 1,
|
|
1738
|
+
...findObj,
|
|
1739
|
+
label: item.label || findObj.label,
|
|
1740
|
+
isHidden: item.isHidden || findObj.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
1741
|
+
};
|
|
1742
|
+
});
|
|
1743
|
+
result.sort((a, b)=>Number(a.sort) - Number(b.sort));
|
|
1744
|
+
}
|
|
1745
|
+
return result;
|
|
1746
|
+
}
|
|
1747
|
+
});
|
|
1748
|
+
/**
|
|
1749
|
+
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
1750
|
+
*/ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1751
|
+
let result = [
|
|
1752
|
+
...commonColumns.value
|
|
1753
|
+
];
|
|
1754
|
+
if (props.componentNo) {
|
|
1755
|
+
result = result.map((item, index)=>({
|
|
1721
1756
|
...item,
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1757
|
+
minWidth: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth
|
|
1758
|
+
}));
|
|
1759
|
+
if (tableSettingButtonRef?.value?.exportFileFlag && !result.find((cur)=>cur.type === pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION)) result = [
|
|
1760
|
+
{
|
|
1761
|
+
type: pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION,
|
|
1762
|
+
prop: pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION
|
|
1763
|
+
},
|
|
1764
|
+
...result
|
|
1765
|
+
];
|
|
1729
1766
|
}
|
|
1767
|
+
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
1730
1768
|
});
|
|
1731
|
-
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows());
|
|
1769
|
+
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows() || []);
|
|
1732
1770
|
return (_ctx, _cache)=>{
|
|
1733
1771
|
const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
|
|
1734
1772
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1, [
|
|
@@ -1757,7 +1795,9 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1757
1795
|
"table-data": selectedData.value,
|
|
1758
1796
|
"component-no": props.componentNo,
|
|
1759
1797
|
"columns-setting": props.columnsSetting,
|
|
1760
|
-
columns:
|
|
1798
|
+
columns: commonColumns.value,
|
|
1799
|
+
ref_key: "tableSettingButtonRef",
|
|
1800
|
+
ref: tableSettingButtonRef,
|
|
1761
1801
|
onSuccess: fetchDbgridComponent
|
|
1762
1802
|
}, null, 8, [
|
|
1763
1803
|
"table-data",
|
|
@@ -1779,13 +1819,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1779
1819
|
border: ""
|
|
1780
1820
|
}, _ctx.$attrs), {
|
|
1781
1821
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1782
|
-
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(tableColumns.value.
|
|
1783
|
-
/**
|
|
1784
|
-
* defaultDisplayFlag: 默认显示标识,0:不显示,1:显示
|
|
1785
|
-
* serveColumns :服务端返回的列配置
|
|
1786
|
-
*/ if (props.componentNo && !serveColumns.value.length && item.defaultDisplayFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG).NO) return false;
|
|
1787
|
-
return !item.isHidden;
|
|
1788
|
-
}), (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
1822
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(tableColumns.value, (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
1789
1823
|
item?.type && columnTypes.includes(item.type) ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTableColumn), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
1790
1824
|
key: 0,
|
|
1791
1825
|
ref_for: true
|
|
@@ -4408,7 +4442,7 @@ const WB_NO = "wbNo";
|
|
|
4408
4442
|
const isInlineMode = "inline" === props.layoutMode;
|
|
4409
4443
|
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
4410
4444
|
const itemRefs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
4411
|
-
const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(
|
|
4445
|
+
const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(props.data));
|
|
4412
4446
|
const model = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useModel)(__props, "modelValue");
|
|
4413
4447
|
const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getFormRules(configData.value));
|
|
4414
4448
|
const emit = __emit;
|
|
@@ -4501,7 +4535,9 @@ const WB_NO = "wbNo";
|
|
|
4501
4535
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
4502
4536
|
item?.render ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(item.render()), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
4503
4537
|
key: 1,
|
|
4504
|
-
ref_for: true
|
|
4538
|
+
ref_for: true,
|
|
4539
|
+
ref_key: "itemRefs",
|
|
4540
|
+
ref: itemRefs
|
|
4505
4541
|
}, item.extraProps || {}, {
|
|
4506
4542
|
modelValue: formModel[item.name],
|
|
4507
4543
|
"onUpdate:modelValue": ($event)=>formModel[item.name] = $event,
|
package/dist/index.js
CHANGED
|
@@ -461,6 +461,7 @@ function useFetchDataset(codeSystemCodes, enabledFlag) {
|
|
|
461
461
|
* @param params
|
|
462
462
|
* @returns
|
|
463
463
|
*/ const exportData2File = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/untils/exportData2File', params);
|
|
464
|
+
const SELECTION = 'selection'; // 定义 CheckboxValueType 类型
|
|
464
465
|
function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
465
466
|
const changeSort = debounce(changeInputSort, 1200);
|
|
466
467
|
return [
|
|
@@ -486,6 +487,7 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
486
487
|
'false-label': 0,
|
|
487
488
|
size: 'small',
|
|
488
489
|
modelValue: row.displayFlag,
|
|
490
|
+
disabled: row.type === SELECTION,
|
|
489
491
|
'onUpdate:modelValue': (value)=>row.displayFlag = value
|
|
490
492
|
})
|
|
491
493
|
},
|
|
@@ -497,6 +499,7 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
497
499
|
maxLength: 16,
|
|
498
500
|
'controls-position': 'right',
|
|
499
501
|
modelValue: row.minWidth,
|
|
502
|
+
disabled: row.type === SELECTION,
|
|
500
503
|
'onUpdate:modelValue': (value)=>row.minWidth = value,
|
|
501
504
|
size: 'small',
|
|
502
505
|
placeholder: '请输入列宽 (最小值)'
|
|
@@ -511,7 +514,7 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
511
514
|
min: 0,
|
|
512
515
|
'controls-position': 'right',
|
|
513
516
|
modelValue: row.sort,
|
|
514
|
-
disabled: disabledDraggable.value,
|
|
517
|
+
disabled: disabledDraggable.value || row.type === SELECTION,
|
|
515
518
|
'onUpdate:modelValue': (value)=>row.sort = value,
|
|
516
519
|
onInput: (sort)=>{
|
|
517
520
|
changeSort(index, sort);
|
|
@@ -925,7 +928,10 @@ const _hoisted_3 = {
|
|
|
925
928
|
});
|
|
926
929
|
sourceData.value.sort((a, b)=>a.sort - b.sort);
|
|
927
930
|
});
|
|
928
|
-
const tableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>sourceData.value.
|
|
931
|
+
const tableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>sourceData.value.map((item)=>({
|
|
932
|
+
...item,
|
|
933
|
+
isHidden: item.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
934
|
+
})));
|
|
929
935
|
function changeSourceData(data) {
|
|
930
936
|
sourceData.value = data;
|
|
931
937
|
}
|
|
@@ -1177,7 +1183,7 @@ const _hoisted_3 = {
|
|
|
1177
1183
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1178
1184
|
[
|
|
1179
1185
|
'__scopeId',
|
|
1180
|
-
"data-v-
|
|
1186
|
+
"data-v-a19d408c"
|
|
1181
1187
|
]
|
|
1182
1188
|
]);
|
|
1183
1189
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -1198,7 +1204,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1198
1204
|
emits: [
|
|
1199
1205
|
'success'
|
|
1200
1206
|
],
|
|
1201
|
-
setup (__props, { emit: __emit }) {
|
|
1207
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
1202
1208
|
const columnsSettingRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1203
1209
|
const dataSetList = useFetchDataset([
|
|
1204
1210
|
FILE_TYPE_CODE
|
|
@@ -1271,6 +1277,9 @@ const EXPORT_FILE = 'export-file';
|
|
|
1271
1277
|
exportFile(value[0]);
|
|
1272
1278
|
}
|
|
1273
1279
|
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>columnsSettingRef.value?.exportFileFlag);
|
|
1280
|
+
__expose({
|
|
1281
|
+
exportFileFlag
|
|
1282
|
+
});
|
|
1274
1283
|
return (_ctx, _cache)=>{
|
|
1275
1284
|
const _component_Setting = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("Setting");
|
|
1276
1285
|
const _component_el_icon = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon");
|
|
@@ -1328,7 +1337,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1328
1337
|
const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
|
|
1329
1338
|
[
|
|
1330
1339
|
'__scopeId',
|
|
1331
|
-
"data-v-
|
|
1340
|
+
"data-v-52eaeaae"
|
|
1332
1341
|
]
|
|
1333
1342
|
]);
|
|
1334
1343
|
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
@@ -1419,6 +1428,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1419
1428
|
key: 1,
|
|
1420
1429
|
class: "mt-5 flex justify-between items-center"
|
|
1421
1430
|
};
|
|
1431
|
+
const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'selection';
|
|
1422
1432
|
// 接受父组件参数,配置默认值
|
|
1423
1433
|
/* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1424
1434
|
__name: 'index',
|
|
@@ -1437,7 +1447,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1437
1447
|
default: void 0
|
|
1438
1448
|
},
|
|
1439
1449
|
componentNo: {
|
|
1440
|
-
default:
|
|
1450
|
+
default: ''
|
|
1441
1451
|
},
|
|
1442
1452
|
fetchData: {
|
|
1443
1453
|
type: Function,
|
|
@@ -1456,8 +1466,12 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1456
1466
|
type: Boolean,
|
|
1457
1467
|
default: false
|
|
1458
1468
|
},
|
|
1469
|
+
defaultQuery: {
|
|
1470
|
+
type: Boolean,
|
|
1471
|
+
default: true
|
|
1472
|
+
},
|
|
1459
1473
|
rowKey: {
|
|
1460
|
-
default:
|
|
1474
|
+
default: 'id'
|
|
1461
1475
|
},
|
|
1462
1476
|
loading: {
|
|
1463
1477
|
type: Boolean,
|
|
@@ -1475,10 +1489,10 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1475
1489
|
default: ()=>({})
|
|
1476
1490
|
},
|
|
1477
1491
|
layout: {
|
|
1478
|
-
default:
|
|
1492
|
+
default: 'total, sizes, prev, pager, next'
|
|
1479
1493
|
},
|
|
1480
1494
|
dragTips: {
|
|
1481
|
-
default:
|
|
1495
|
+
default: '温馨提示:您可通过拖动进行排序'
|
|
1482
1496
|
},
|
|
1483
1497
|
isShowDragTips: {
|
|
1484
1498
|
type: Boolean,
|
|
@@ -1488,7 +1502,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1488
1502
|
default: {}
|
|
1489
1503
|
},
|
|
1490
1504
|
dragTipsClassName: {
|
|
1491
|
-
default:
|
|
1505
|
+
default: ''
|
|
1492
1506
|
}
|
|
1493
1507
|
},
|
|
1494
1508
|
emits: [
|
|
@@ -1514,12 +1528,13 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1514
1528
|
});
|
|
1515
1529
|
const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
1516
1530
|
const columnTypes = [
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1531
|
+
'selection',
|
|
1532
|
+
'radio',
|
|
1533
|
+
'index',
|
|
1534
|
+
'expand',
|
|
1535
|
+
'sort'
|
|
1522
1536
|
];
|
|
1537
|
+
const tableSettingButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); //表格设置
|
|
1523
1538
|
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1524
1539
|
// 生成组件唯一id
|
|
1525
1540
|
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
|
|
@@ -1537,7 +1552,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1537
1552
|
sortData.curData = item;
|
|
1538
1553
|
sortData.result = data;
|
|
1539
1554
|
}
|
|
1540
|
-
if (item?.[attrs?.[
|
|
1555
|
+
if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
|
|
1541
1556
|
});
|
|
1542
1557
|
return sortData;
|
|
1543
1558
|
}
|
|
@@ -1547,7 +1562,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1547
1562
|
let data = [
|
|
1548
1563
|
...state.tableData
|
|
1549
1564
|
];
|
|
1550
|
-
if (attrs?.[
|
|
1565
|
+
if (attrs?.['tree-props']) {
|
|
1551
1566
|
let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
|
|
1552
1567
|
startIndex: -1
|
|
1553
1568
|
}, {
|
|
@@ -1563,7 +1578,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1563
1578
|
curData: {}
|
|
1564
1579
|
});
|
|
1565
1580
|
if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
|
|
1566
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(
|
|
1581
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
|
|
1567
1582
|
return [];
|
|
1568
1583
|
}
|
|
1569
1584
|
const [removedItem] = result.splice(oldCurIndex, 1);
|
|
@@ -1579,16 +1594,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1579
1594
|
* 表格拖拽排序
|
|
1580
1595
|
**/ const initDragSort = ()=>{
|
|
1581
1596
|
const tbody = document.querySelector(`#${uuid.value} tbody`);
|
|
1582
|
-
let initialHTML =
|
|
1597
|
+
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
1583
1598
|
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
1584
|
-
handle:
|
|
1599
|
+
handle: '.cursor-move',
|
|
1585
1600
|
animation: 300,
|
|
1586
1601
|
onEnd (evt) {
|
|
1587
1602
|
const { newIndex, oldIndex } = evt;
|
|
1588
1603
|
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
1589
1604
|
//获取拖动后的排序
|
|
1590
1605
|
let data = getSortableResult(newIndex, oldIndex);
|
|
1591
|
-
if (data.length) emit(
|
|
1606
|
+
if (data.length) emit('drag-end', data);
|
|
1592
1607
|
else evt.from.innerHTML = initialHTML;
|
|
1593
1608
|
},
|
|
1594
1609
|
onStart (evt) {
|
|
@@ -1603,7 +1618,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1603
1618
|
});
|
|
1604
1619
|
async function fetchDbgridComponent() {
|
|
1605
1620
|
let [, result] = await queryDbgridComponentByExample({
|
|
1606
|
-
componentNo: props.componentNo ||
|
|
1621
|
+
componentNo: props.componentNo || ''
|
|
1607
1622
|
});
|
|
1608
1623
|
if (result?.success) try {
|
|
1609
1624
|
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
@@ -1622,7 +1637,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1622
1637
|
if (props.draggable) (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
1623
1638
|
initDragSort();
|
|
1624
1639
|
});
|
|
1625
|
-
if (props.pagination && props?.fetchData) fetchList();
|
|
1640
|
+
if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
|
|
1626
1641
|
});
|
|
1627
1642
|
/**
|
|
1628
1643
|
* 获取列表
|
|
@@ -1640,7 +1655,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1640
1655
|
state.pageInfo.pageNumber = 1;
|
|
1641
1656
|
state.pageInfo.pageSize = val;
|
|
1642
1657
|
fetchList();
|
|
1643
|
-
} else emit(
|
|
1658
|
+
} else emit('size-page-change', val);
|
|
1644
1659
|
};
|
|
1645
1660
|
/**
|
|
1646
1661
|
* 分页组件改变 当前页数 事件
|
|
@@ -1648,7 +1663,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1648
1663
|
if (props.fetchData) {
|
|
1649
1664
|
state.pageInfo.pageNumber = val;
|
|
1650
1665
|
fetchList();
|
|
1651
|
-
} else emit(
|
|
1666
|
+
} else emit('current-page-change', val);
|
|
1652
1667
|
}
|
|
1653
1668
|
// 超级表格 ref
|
|
1654
1669
|
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
@@ -1665,7 +1680,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1665
1680
|
if (Object.keys(props.filterObj).length) return [
|
|
1666
1681
|
...state.tableData
|
|
1667
1682
|
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
1668
|
-
|
|
1683
|
+
'',
|
|
1669
1684
|
void 0,
|
|
1670
1685
|
null
|
|
1671
1686
|
].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
|
|
@@ -1705,31 +1720,54 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1705
1720
|
});
|
|
1706
1721
|
/**
|
|
1707
1722
|
* 处理接口和本地的columns
|
|
1708
|
-
*/ const
|
|
1723
|
+
*/ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1709
1724
|
if (!props.componentNo) return props.columns;
|
|
1710
1725
|
{
|
|
1711
|
-
|
|
1726
|
+
let result = [
|
|
1727
|
+
...props.columns
|
|
1728
|
+
].map((cur)=>({
|
|
1712
1729
|
displayFlag: cur.isHidden || cur.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
1713
1730
|
...cur
|
|
1714
1731
|
}));
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1732
|
+
if (serveColumns.value?.length) {
|
|
1733
|
+
result = result.map((item, index)=>{
|
|
1734
|
+
let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {};
|
|
1735
|
+
return {
|
|
1736
|
+
displayFlag: item.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
1737
|
+
...item,
|
|
1738
|
+
sort: index + 1,
|
|
1739
|
+
...findObj,
|
|
1740
|
+
label: item.label || findObj.label,
|
|
1741
|
+
isHidden: item.isHidden || findObj.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
1742
|
+
};
|
|
1743
|
+
});
|
|
1744
|
+
result.sort((a, b)=>Number(a.sort) - Number(b.sort));
|
|
1745
|
+
}
|
|
1746
|
+
return result;
|
|
1747
|
+
}
|
|
1748
|
+
});
|
|
1749
|
+
/**
|
|
1750
|
+
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
1751
|
+
*/ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1752
|
+
let result = [
|
|
1753
|
+
...commonColumns.value
|
|
1754
|
+
];
|
|
1755
|
+
if (props.componentNo) {
|
|
1756
|
+
result = result.map((item, index)=>({
|
|
1722
1757
|
...item,
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1758
|
+
minWidth: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth
|
|
1759
|
+
}));
|
|
1760
|
+
if (tableSettingButtonRef?.value?.exportFileFlag && !result.find((cur)=>cur.type === pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION)) result = [
|
|
1761
|
+
{
|
|
1762
|
+
type: pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION,
|
|
1763
|
+
prop: pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION
|
|
1764
|
+
},
|
|
1765
|
+
...result
|
|
1766
|
+
];
|
|
1730
1767
|
}
|
|
1768
|
+
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
1731
1769
|
});
|
|
1732
|
-
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows());
|
|
1770
|
+
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows() || []);
|
|
1733
1771
|
return (_ctx, _cache)=>{
|
|
1734
1772
|
const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
|
|
1735
1773
|
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1, [
|
|
@@ -1758,7 +1796,9 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1758
1796
|
"table-data": selectedData.value,
|
|
1759
1797
|
"component-no": props.componentNo,
|
|
1760
1798
|
"columns-setting": props.columnsSetting,
|
|
1761
|
-
columns:
|
|
1799
|
+
columns: commonColumns.value,
|
|
1800
|
+
ref_key: "tableSettingButtonRef",
|
|
1801
|
+
ref: tableSettingButtonRef,
|
|
1762
1802
|
onSuccess: fetchDbgridComponent
|
|
1763
1803
|
}, null, 8, [
|
|
1764
1804
|
"table-data",
|
|
@@ -1780,13 +1820,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1780
1820
|
border: ""
|
|
1781
1821
|
}, _ctx.$attrs), {
|
|
1782
1822
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1783
|
-
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(tableColumns.value.
|
|
1784
|
-
/**
|
|
1785
|
-
* defaultDisplayFlag: 默认显示标识,0:不显示,1:显示
|
|
1786
|
-
* serveColumns :服务端返回的列配置
|
|
1787
|
-
*/ if (props.componentNo && !serveColumns.value.length && item.defaultDisplayFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG).NO) return false;
|
|
1788
|
-
return !item.isHidden;
|
|
1789
|
-
}), (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
1823
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(tableColumns.value, (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
1790
1824
|
item?.type && columnTypes.includes(item.type) ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTableColumn), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
1791
1825
|
key: 0,
|
|
1792
1826
|
ref_for: true
|
|
@@ -5022,7 +5056,7 @@ const WB_NO = "wbNo";
|
|
|
5022
5056
|
const isInlineMode = "inline" === props.layoutMode;
|
|
5023
5057
|
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5024
5058
|
const itemRefs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5025
|
-
const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(
|
|
5059
|
+
const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(props.data));
|
|
5026
5060
|
const model = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useModel)(__props, "modelValue");
|
|
5027
5061
|
const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getFormRules(configData.value));
|
|
5028
5062
|
const emit = __emit;
|
|
@@ -5115,7 +5149,9 @@ const WB_NO = "wbNo";
|
|
|
5115
5149
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
5116
5150
|
item?.render ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(item.render()), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
5117
5151
|
key: 1,
|
|
5118
|
-
ref_for: true
|
|
5152
|
+
ref_for: true,
|
|
5153
|
+
ref_key: "itemRefs",
|
|
5154
|
+
ref: itemRefs
|
|
5119
5155
|
}, item.extraProps || {}, {
|
|
5120
5156
|
modelValue: formModel[item.name],
|
|
5121
5157
|
"onUpdate:modelValue": ($event)=>formModel[item.name] = $event,
|