sun-biz 0.0.3-beta.7 → 0.0.3-beta.8
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 +84 -52
- package/dist/index.js +84 -52
- 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,
|
|
@@ -1456,7 +1466,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1456
1466
|
default: false
|
|
1457
1467
|
},
|
|
1458
1468
|
rowKey: {
|
|
1459
|
-
default:
|
|
1469
|
+
default: 'id'
|
|
1460
1470
|
},
|
|
1461
1471
|
loading: {
|
|
1462
1472
|
type: Boolean,
|
|
@@ -1474,10 +1484,10 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1474
1484
|
default: ()=>({})
|
|
1475
1485
|
},
|
|
1476
1486
|
layout: {
|
|
1477
|
-
default:
|
|
1487
|
+
default: 'total, sizes, prev, pager, next'
|
|
1478
1488
|
},
|
|
1479
1489
|
dragTips: {
|
|
1480
|
-
default:
|
|
1490
|
+
default: '温馨提示:您可通过拖动进行排序'
|
|
1481
1491
|
},
|
|
1482
1492
|
isShowDragTips: {
|
|
1483
1493
|
type: Boolean,
|
|
@@ -1487,7 +1497,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1487
1497
|
default: {}
|
|
1488
1498
|
},
|
|
1489
1499
|
dragTipsClassName: {
|
|
1490
|
-
default:
|
|
1500
|
+
default: ''
|
|
1491
1501
|
}
|
|
1492
1502
|
},
|
|
1493
1503
|
emits: [
|
|
@@ -1513,12 +1523,13 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1513
1523
|
});
|
|
1514
1524
|
const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
1515
1525
|
const columnTypes = [
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1526
|
+
'selection',
|
|
1527
|
+
'radio',
|
|
1528
|
+
'index',
|
|
1529
|
+
'expand',
|
|
1530
|
+
'sort'
|
|
1521
1531
|
];
|
|
1532
|
+
const tableSettingButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); //表格设置
|
|
1522
1533
|
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1523
1534
|
// 生成组件唯一id
|
|
1524
1535
|
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
|
|
@@ -1536,7 +1547,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1536
1547
|
sortData.curData = item;
|
|
1537
1548
|
sortData.result = data;
|
|
1538
1549
|
}
|
|
1539
|
-
if (item?.[attrs?.[
|
|
1550
|
+
if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
|
|
1540
1551
|
});
|
|
1541
1552
|
return sortData;
|
|
1542
1553
|
}
|
|
@@ -1546,7 +1557,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1546
1557
|
let data = [
|
|
1547
1558
|
...state.tableData
|
|
1548
1559
|
];
|
|
1549
|
-
if (attrs?.[
|
|
1560
|
+
if (attrs?.['tree-props']) {
|
|
1550
1561
|
let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
|
|
1551
1562
|
startIndex: -1
|
|
1552
1563
|
}, {
|
|
@@ -1562,7 +1573,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1562
1573
|
curData: {}
|
|
1563
1574
|
});
|
|
1564
1575
|
if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
|
|
1565
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(
|
|
1576
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
|
|
1566
1577
|
return [];
|
|
1567
1578
|
}
|
|
1568
1579
|
const [removedItem] = result.splice(oldCurIndex, 1);
|
|
@@ -1578,16 +1589,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1578
1589
|
* 表格拖拽排序
|
|
1579
1590
|
**/ const initDragSort = ()=>{
|
|
1580
1591
|
const tbody = document.querySelector(`#${uuid.value} tbody`);
|
|
1581
|
-
let initialHTML =
|
|
1592
|
+
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
1582
1593
|
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
1583
|
-
handle:
|
|
1594
|
+
handle: '.cursor-move',
|
|
1584
1595
|
animation: 300,
|
|
1585
1596
|
onEnd (evt) {
|
|
1586
1597
|
const { newIndex, oldIndex } = evt;
|
|
1587
1598
|
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
1588
1599
|
//获取拖动后的排序
|
|
1589
1600
|
let data = getSortableResult(newIndex, oldIndex);
|
|
1590
|
-
if (data.length) emit(
|
|
1601
|
+
if (data.length) emit('drag-end', data);
|
|
1591
1602
|
else evt.from.innerHTML = initialHTML;
|
|
1592
1603
|
},
|
|
1593
1604
|
onStart (evt) {
|
|
@@ -1602,7 +1613,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1602
1613
|
});
|
|
1603
1614
|
async function fetchDbgridComponent() {
|
|
1604
1615
|
let [, result] = await queryDbgridComponentByExample({
|
|
1605
|
-
componentNo: props.componentNo ||
|
|
1616
|
+
componentNo: props.componentNo || ''
|
|
1606
1617
|
});
|
|
1607
1618
|
if (result?.success) try {
|
|
1608
1619
|
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
@@ -1639,7 +1650,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1639
1650
|
state.pageInfo.pageNumber = 1;
|
|
1640
1651
|
state.pageInfo.pageSize = val;
|
|
1641
1652
|
fetchList();
|
|
1642
|
-
} else emit(
|
|
1653
|
+
} else emit('size-page-change', val);
|
|
1643
1654
|
};
|
|
1644
1655
|
/**
|
|
1645
1656
|
* 分页组件改变 当前页数 事件
|
|
@@ -1647,7 +1658,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1647
1658
|
if (props.fetchData) {
|
|
1648
1659
|
state.pageInfo.pageNumber = val;
|
|
1649
1660
|
fetchList();
|
|
1650
|
-
} else emit(
|
|
1661
|
+
} else emit('current-page-change', val);
|
|
1651
1662
|
}
|
|
1652
1663
|
// 超级表格 ref
|
|
1653
1664
|
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
@@ -1664,7 +1675,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1664
1675
|
if (Object.keys(props.filterObj).length) return [
|
|
1665
1676
|
...state.tableData
|
|
1666
1677
|
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
1667
|
-
|
|
1678
|
+
'',
|
|
1668
1679
|
void 0,
|
|
1669
1680
|
null
|
|
1670
1681
|
].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
|
|
@@ -1704,31 +1715,54 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1704
1715
|
});
|
|
1705
1716
|
/**
|
|
1706
1717
|
* 处理接口和本地的columns
|
|
1707
|
-
*/ const
|
|
1718
|
+
*/ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1708
1719
|
if (!props.componentNo) return props.columns;
|
|
1709
1720
|
{
|
|
1710
|
-
|
|
1721
|
+
let result = [
|
|
1722
|
+
...props.columns
|
|
1723
|
+
].map((cur)=>({
|
|
1711
1724
|
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
1725
|
...cur
|
|
1713
1726
|
}));
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1727
|
+
if (serveColumns.value?.length) {
|
|
1728
|
+
result = result.map((item, index)=>{
|
|
1729
|
+
let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {};
|
|
1730
|
+
return {
|
|
1731
|
+
displayFlag: item.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
1732
|
+
...item,
|
|
1733
|
+
sort: index + 1,
|
|
1734
|
+
...findObj,
|
|
1735
|
+
label: item.label || findObj.label,
|
|
1736
|
+
isHidden: item.isHidden || findObj.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
1737
|
+
};
|
|
1738
|
+
});
|
|
1739
|
+
result.sort((a, b)=>Number(a.sort) - Number(b.sort));
|
|
1740
|
+
}
|
|
1741
|
+
return result;
|
|
1742
|
+
}
|
|
1743
|
+
});
|
|
1744
|
+
/**
|
|
1745
|
+
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
1746
|
+
*/ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1747
|
+
let result = [
|
|
1748
|
+
...commonColumns.value
|
|
1749
|
+
];
|
|
1750
|
+
if (props.componentNo) {
|
|
1751
|
+
result = result.map((item, index)=>({
|
|
1721
1752
|
...item,
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1753
|
+
minWidth: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth
|
|
1754
|
+
}));
|
|
1755
|
+
if (tableSettingButtonRef?.value?.exportFileFlag && !result.find((cur)=>cur.type === pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION)) result = [
|
|
1756
|
+
{
|
|
1757
|
+
type: pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION,
|
|
1758
|
+
prop: pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION
|
|
1759
|
+
},
|
|
1760
|
+
...result
|
|
1761
|
+
];
|
|
1729
1762
|
}
|
|
1763
|
+
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
1730
1764
|
});
|
|
1731
|
-
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows());
|
|
1765
|
+
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows() || []);
|
|
1732
1766
|
return (_ctx, _cache)=>{
|
|
1733
1767
|
const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
|
|
1734
1768
|
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 +1791,9 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1757
1791
|
"table-data": selectedData.value,
|
|
1758
1792
|
"component-no": props.componentNo,
|
|
1759
1793
|
"columns-setting": props.columnsSetting,
|
|
1760
|
-
columns:
|
|
1794
|
+
columns: commonColumns.value,
|
|
1795
|
+
ref_key: "tableSettingButtonRef",
|
|
1796
|
+
ref: tableSettingButtonRef,
|
|
1761
1797
|
onSuccess: fetchDbgridComponent
|
|
1762
1798
|
}, null, 8, [
|
|
1763
1799
|
"table-data",
|
|
@@ -1779,13 +1815,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1779
1815
|
border: ""
|
|
1780
1816
|
}, _ctx.$attrs), {
|
|
1781
1817
|
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, [
|
|
1818
|
+
((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
1819
|
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
1820
|
key: 0,
|
|
1791
1821
|
ref_for: true
|
|
@@ -4408,7 +4438,7 @@ const WB_NO = "wbNo";
|
|
|
4408
4438
|
const isInlineMode = "inline" === props.layoutMode;
|
|
4409
4439
|
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
4410
4440
|
const itemRefs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
4411
|
-
const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(
|
|
4441
|
+
const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(props.data));
|
|
4412
4442
|
const model = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useModel)(__props, "modelValue");
|
|
4413
4443
|
const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getFormRules(configData.value));
|
|
4414
4444
|
const emit = __emit;
|
|
@@ -4501,7 +4531,9 @@ const WB_NO = "wbNo";
|
|
|
4501
4531
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
4502
4532
|
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
4533
|
key: 1,
|
|
4504
|
-
ref_for: true
|
|
4534
|
+
ref_for: true,
|
|
4535
|
+
ref_key: "itemRefs",
|
|
4536
|
+
ref: itemRefs
|
|
4505
4537
|
}, item.extraProps || {}, {
|
|
4506
4538
|
modelValue: formModel[item.name],
|
|
4507
4539
|
"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,
|
|
@@ -1457,7 +1467,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1457
1467
|
default: false
|
|
1458
1468
|
},
|
|
1459
1469
|
rowKey: {
|
|
1460
|
-
default:
|
|
1470
|
+
default: 'id'
|
|
1461
1471
|
},
|
|
1462
1472
|
loading: {
|
|
1463
1473
|
type: Boolean,
|
|
@@ -1475,10 +1485,10 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1475
1485
|
default: ()=>({})
|
|
1476
1486
|
},
|
|
1477
1487
|
layout: {
|
|
1478
|
-
default:
|
|
1488
|
+
default: 'total, sizes, prev, pager, next'
|
|
1479
1489
|
},
|
|
1480
1490
|
dragTips: {
|
|
1481
|
-
default:
|
|
1491
|
+
default: '温馨提示:您可通过拖动进行排序'
|
|
1482
1492
|
},
|
|
1483
1493
|
isShowDragTips: {
|
|
1484
1494
|
type: Boolean,
|
|
@@ -1488,7 +1498,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1488
1498
|
default: {}
|
|
1489
1499
|
},
|
|
1490
1500
|
dragTipsClassName: {
|
|
1491
|
-
default:
|
|
1501
|
+
default: ''
|
|
1492
1502
|
}
|
|
1493
1503
|
},
|
|
1494
1504
|
emits: [
|
|
@@ -1514,12 +1524,13 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1514
1524
|
});
|
|
1515
1525
|
const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
1516
1526
|
const columnTypes = [
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1527
|
+
'selection',
|
|
1528
|
+
'radio',
|
|
1529
|
+
'index',
|
|
1530
|
+
'expand',
|
|
1531
|
+
'sort'
|
|
1522
1532
|
];
|
|
1533
|
+
const tableSettingButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); //表格设置
|
|
1523
1534
|
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1524
1535
|
// 生成组件唯一id
|
|
1525
1536
|
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
|
|
@@ -1537,7 +1548,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1537
1548
|
sortData.curData = item;
|
|
1538
1549
|
sortData.result = data;
|
|
1539
1550
|
}
|
|
1540
|
-
if (item?.[attrs?.[
|
|
1551
|
+
if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
|
|
1541
1552
|
});
|
|
1542
1553
|
return sortData;
|
|
1543
1554
|
}
|
|
@@ -1547,7 +1558,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1547
1558
|
let data = [
|
|
1548
1559
|
...state.tableData
|
|
1549
1560
|
];
|
|
1550
|
-
if (attrs?.[
|
|
1561
|
+
if (attrs?.['tree-props']) {
|
|
1551
1562
|
let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
|
|
1552
1563
|
startIndex: -1
|
|
1553
1564
|
}, {
|
|
@@ -1563,7 +1574,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1563
1574
|
curData: {}
|
|
1564
1575
|
});
|
|
1565
1576
|
if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
|
|
1566
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(
|
|
1577
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
|
|
1567
1578
|
return [];
|
|
1568
1579
|
}
|
|
1569
1580
|
const [removedItem] = result.splice(oldCurIndex, 1);
|
|
@@ -1579,16 +1590,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1579
1590
|
* 表格拖拽排序
|
|
1580
1591
|
**/ const initDragSort = ()=>{
|
|
1581
1592
|
const tbody = document.querySelector(`#${uuid.value} tbody`);
|
|
1582
|
-
let initialHTML =
|
|
1593
|
+
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
1583
1594
|
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
1584
|
-
handle:
|
|
1595
|
+
handle: '.cursor-move',
|
|
1585
1596
|
animation: 300,
|
|
1586
1597
|
onEnd (evt) {
|
|
1587
1598
|
const { newIndex, oldIndex } = evt;
|
|
1588
1599
|
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
1589
1600
|
//获取拖动后的排序
|
|
1590
1601
|
let data = getSortableResult(newIndex, oldIndex);
|
|
1591
|
-
if (data.length) emit(
|
|
1602
|
+
if (data.length) emit('drag-end', data);
|
|
1592
1603
|
else evt.from.innerHTML = initialHTML;
|
|
1593
1604
|
},
|
|
1594
1605
|
onStart (evt) {
|
|
@@ -1603,7 +1614,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1603
1614
|
});
|
|
1604
1615
|
async function fetchDbgridComponent() {
|
|
1605
1616
|
let [, result] = await queryDbgridComponentByExample({
|
|
1606
|
-
componentNo: props.componentNo ||
|
|
1617
|
+
componentNo: props.componentNo || ''
|
|
1607
1618
|
});
|
|
1608
1619
|
if (result?.success) try {
|
|
1609
1620
|
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
@@ -1640,7 +1651,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1640
1651
|
state.pageInfo.pageNumber = 1;
|
|
1641
1652
|
state.pageInfo.pageSize = val;
|
|
1642
1653
|
fetchList();
|
|
1643
|
-
} else emit(
|
|
1654
|
+
} else emit('size-page-change', val);
|
|
1644
1655
|
};
|
|
1645
1656
|
/**
|
|
1646
1657
|
* 分页组件改变 当前页数 事件
|
|
@@ -1648,7 +1659,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1648
1659
|
if (props.fetchData) {
|
|
1649
1660
|
state.pageInfo.pageNumber = val;
|
|
1650
1661
|
fetchList();
|
|
1651
|
-
} else emit(
|
|
1662
|
+
} else emit('current-page-change', val);
|
|
1652
1663
|
}
|
|
1653
1664
|
// 超级表格 ref
|
|
1654
1665
|
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
@@ -1665,7 +1676,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1665
1676
|
if (Object.keys(props.filterObj).length) return [
|
|
1666
1677
|
...state.tableData
|
|
1667
1678
|
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
1668
|
-
|
|
1679
|
+
'',
|
|
1669
1680
|
void 0,
|
|
1670
1681
|
null
|
|
1671
1682
|
].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
|
|
@@ -1705,31 +1716,54 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1705
1716
|
});
|
|
1706
1717
|
/**
|
|
1707
1718
|
* 处理接口和本地的columns
|
|
1708
|
-
*/ const
|
|
1719
|
+
*/ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1709
1720
|
if (!props.componentNo) return props.columns;
|
|
1710
1721
|
{
|
|
1711
|
-
|
|
1722
|
+
let result = [
|
|
1723
|
+
...props.columns
|
|
1724
|
+
].map((cur)=>({
|
|
1712
1725
|
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
1726
|
...cur
|
|
1714
1727
|
}));
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1728
|
+
if (serveColumns.value?.length) {
|
|
1729
|
+
result = result.map((item, index)=>{
|
|
1730
|
+
let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {};
|
|
1731
|
+
return {
|
|
1732
|
+
displayFlag: item.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
1733
|
+
...item,
|
|
1734
|
+
sort: index + 1,
|
|
1735
|
+
...findObj,
|
|
1736
|
+
label: item.label || findObj.label,
|
|
1737
|
+
isHidden: item.isHidden || findObj.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
1738
|
+
};
|
|
1739
|
+
});
|
|
1740
|
+
result.sort((a, b)=>Number(a.sort) - Number(b.sort));
|
|
1741
|
+
}
|
|
1742
|
+
return result;
|
|
1743
|
+
}
|
|
1744
|
+
});
|
|
1745
|
+
/**
|
|
1746
|
+
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
1747
|
+
*/ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1748
|
+
let result = [
|
|
1749
|
+
...commonColumns.value
|
|
1750
|
+
];
|
|
1751
|
+
if (props.componentNo) {
|
|
1752
|
+
result = result.map((item, index)=>({
|
|
1722
1753
|
...item,
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1754
|
+
minWidth: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth
|
|
1755
|
+
}));
|
|
1756
|
+
if (tableSettingButtonRef?.value?.exportFileFlag && !result.find((cur)=>cur.type === pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION)) result = [
|
|
1757
|
+
{
|
|
1758
|
+
type: pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION,
|
|
1759
|
+
prop: pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION
|
|
1760
|
+
},
|
|
1761
|
+
...result
|
|
1762
|
+
];
|
|
1730
1763
|
}
|
|
1764
|
+
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
1731
1765
|
});
|
|
1732
|
-
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows());
|
|
1766
|
+
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows() || []);
|
|
1733
1767
|
return (_ctx, _cache)=>{
|
|
1734
1768
|
const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
|
|
1735
1769
|
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 +1792,9 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1758
1792
|
"table-data": selectedData.value,
|
|
1759
1793
|
"component-no": props.componentNo,
|
|
1760
1794
|
"columns-setting": props.columnsSetting,
|
|
1761
|
-
columns:
|
|
1795
|
+
columns: commonColumns.value,
|
|
1796
|
+
ref_key: "tableSettingButtonRef",
|
|
1797
|
+
ref: tableSettingButtonRef,
|
|
1762
1798
|
onSuccess: fetchDbgridComponent
|
|
1763
1799
|
}, null, 8, [
|
|
1764
1800
|
"table-data",
|
|
@@ -1780,13 +1816,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
|
1780
1816
|
border: ""
|
|
1781
1817
|
}, _ctx.$attrs), {
|
|
1782
1818
|
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, [
|
|
1819
|
+
((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
1820
|
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
1821
|
key: 0,
|
|
1792
1822
|
ref_for: true
|
|
@@ -5022,7 +5052,7 @@ const WB_NO = "wbNo";
|
|
|
5022
5052
|
const isInlineMode = "inline" === props.layoutMode;
|
|
5023
5053
|
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5024
5054
|
const itemRefs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
5025
|
-
const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(
|
|
5055
|
+
const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(props.data));
|
|
5026
5056
|
const model = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useModel)(__props, "modelValue");
|
|
5027
5057
|
const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getFormRules(configData.value));
|
|
5028
5058
|
const emit = __emit;
|
|
@@ -5115,7 +5145,9 @@ const WB_NO = "wbNo";
|
|
|
5115
5145
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
5116
5146
|
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
5147
|
key: 1,
|
|
5118
|
-
ref_for: true
|
|
5148
|
+
ref_for: true,
|
|
5149
|
+
ref_key: "itemRefs",
|
|
5150
|
+
ref: itemRefs
|
|
5119
5151
|
}, item.extraProps || {}, {
|
|
5120
5152
|
modelValue: formModel[item.name],
|
|
5121
5153
|
"onUpdate:modelValue": ($event)=>formModel[item.name] = $event,
|