sun-biz 0.0.3-beta.21 → 0.0.3-beta.22
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/biz-select/dict-select/api.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1095 -328
- package/dist/components/pro-table/composables/dbgrid-component-setting/typings/index.d.ts +2 -0
- package/dist/components/pro-table/interface/index.d.ts +2 -2
- package/dist/components/pro-table-v2/index.d.ts +3 -0
- package/dist/components/pro-table-v2/interface/index.d.ts +32 -0
- package/dist/components/static/css/index.css +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1096 -329
- package/dist/static/css/index.css +3 -3
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -327,64 +327,84 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
327
327
|
},
|
|
328
328
|
setup (props, { slots }) {
|
|
329
329
|
const enumMap = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('enumMap', (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(new Map())); // 渲染表格数据
|
|
330
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
331
330
|
const renderCellData = (item, scope)=>{
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
331
|
+
const rawValue = handleRowAccordingToProp(scope.row, item.prop);
|
|
332
|
+
let result = enumMap.value.get(item.prop) && item.isFilterEnum ? filterEnum(rawValue, enumMap.value.get(item.prop), item.fieldNames) : formatValue(rawValue);
|
|
333
|
+
if (item?.autoFormatterNumber) result = formatDecimalNumber(result) ?? '--';
|
|
334
|
+
return item?.supportCopyAndTips ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(copy_text_with_tooltip, {
|
|
335
|
+
supportTextCopy: item?.supportTextCopy,
|
|
336
|
+
align: "text-center",
|
|
337
|
+
text: result
|
|
338
|
+
}, null, 8, [
|
|
339
|
+
"supportTextCopy",
|
|
340
|
+
"text"
|
|
341
|
+
]) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
|
|
342
|
+
result
|
|
343
343
|
]);
|
|
344
344
|
}; // 获取 tag 类型
|
|
345
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
346
345
|
const getTagType = (item, scope)=>filterEnum(handleRowAccordingToProp(scope.row, item.prop), enumMap.value.get(item.prop), item.fieldNames, 'tag') || 'primary';
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
346
|
+
const renderColumn = (column)=>{
|
|
347
|
+
const columnProps = {
|
|
348
|
+
...column,
|
|
349
|
+
align: column.align ?? 'center',
|
|
350
|
+
fixed: column.fixed ?? false,
|
|
351
|
+
showOverflowTooltip: column.showOverflowTooltip ?? 'operation' !== column.prop
|
|
352
|
+
};
|
|
353
|
+
const renderHeader = (scope)=>{
|
|
354
|
+
if (column.headerRender) return [
|
|
355
|
+
column.headerRender(scope)
|
|
356
|
+
];
|
|
357
|
+
if (column.prop && slots?.[`${handleProp(column.prop)}Header`]) return [
|
|
358
|
+
slots[`${handleProp(column.prop)}Header`](scope)
|
|
359
|
+
];
|
|
360
|
+
return [
|
|
361
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", {
|
|
362
|
+
class: column.columnClass
|
|
363
|
+
}, [
|
|
364
|
+
column.required && (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", {
|
|
365
|
+
style: "color: #f56c6c"
|
|
366
|
+
}, [
|
|
367
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("*")
|
|
368
|
+
]),
|
|
369
|
+
column.label
|
|
370
|
+
], 2)
|
|
371
|
+
];
|
|
372
|
+
};
|
|
373
|
+
const renderDefault = (scope)=>{
|
|
374
|
+
if (column._children?.length) return column._children.map((child)=>renderColumn(child));
|
|
375
|
+
// 自定义 render 函数
|
|
376
|
+
if (column.render) {
|
|
377
|
+
if (column.editable && scope.row.editable) {
|
|
378
|
+
let _slot;
|
|
379
|
+
return [
|
|
380
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-form-item"), {
|
|
381
|
+
style: {
|
|
382
|
+
marginBottom: '0'
|
|
383
|
+
},
|
|
384
|
+
prop: `tableData.${scope.$index}.${column.prop}`,
|
|
385
|
+
rules: column.rules ? 'function' == typeof column.rules ? column.rules(scope.row) : column.rules : []
|
|
386
|
+
}, _isSlot(_slot = column.render(scope.row, scope.$index)) ? _slot : {
|
|
387
|
+
default: ()=>[
|
|
388
|
+
_slot
|
|
389
|
+
],
|
|
390
|
+
_: 1
|
|
391
|
+
}, 8, [
|
|
392
|
+
"rules"
|
|
393
|
+
])
|
|
394
|
+
];
|
|
395
|
+
}
|
|
396
|
+
return [
|
|
397
|
+
column.render(scope.row, scope.$index)
|
|
398
|
+
];
|
|
399
|
+
} // 插槽内容
|
|
400
|
+
if (column.prop && slots?.[handleProp(column.prop)]) return [
|
|
401
|
+
slots[handleProp(column.prop)](scope)
|
|
402
|
+
];
|
|
403
|
+
// Tag 类型
|
|
404
|
+
if (column.tag) {
|
|
405
|
+
let _slot2;
|
|
406
|
+
return [
|
|
407
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag, {
|
|
388
408
|
type: getTagType(column, scope)
|
|
389
409
|
}, _isSlot(_slot2 = renderCellData(column, scope)) ? _slot2 : {
|
|
390
410
|
default: ()=>[
|
|
@@ -393,41 +413,93 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
|
393
413
|
_: 1
|
|
394
414
|
}, 8, [
|
|
395
415
|
"type"
|
|
396
|
-
])
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
column.required && (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", {
|
|
409
|
-
class: "mr-2",
|
|
410
|
-
style: {
|
|
411
|
-
color: '#f56c6c'
|
|
412
|
-
}
|
|
413
|
-
}, [
|
|
414
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("*")
|
|
415
|
-
]),
|
|
416
|
-
column.label
|
|
417
|
-
], 2)
|
|
418
|
-
];
|
|
419
|
-
},
|
|
420
|
-
_: 1
|
|
421
|
-
}, 16, [
|
|
422
|
-
"align",
|
|
423
|
-
"fixed",
|
|
424
|
-
"showOverflowTooltip"
|
|
425
|
-
])
|
|
426
|
-
]);
|
|
416
|
+
])
|
|
417
|
+
];
|
|
418
|
+
} // 默认渲染
|
|
419
|
+
return [
|
|
420
|
+
renderCellData(column, scope)
|
|
421
|
+
];
|
|
422
|
+
};
|
|
423
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTableColumn, columnProps, {
|
|
424
|
+
default: (scope)=>renderDefault(scope),
|
|
425
|
+
header: (scope)=>renderHeader(scope),
|
|
426
|
+
_: 1
|
|
427
|
+
}, 16);
|
|
427
428
|
};
|
|
429
|
+
return ()=>renderColumn(props.column);
|
|
428
430
|
}
|
|
429
431
|
});
|
|
430
432
|
/* ESM default export */ const composables_TableColumn = TableColumn;
|
|
433
|
+
// 接受父组件参数,配置默认值
|
|
434
|
+
/* ESM default export */ const RenderColumnvue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
435
|
+
__name: 'RenderColumn',
|
|
436
|
+
props: {
|
|
437
|
+
columnObj: {}
|
|
438
|
+
},
|
|
439
|
+
setup (__props) {
|
|
440
|
+
const columnTypes = [
|
|
441
|
+
'selection',
|
|
442
|
+
'radio',
|
|
443
|
+
'index',
|
|
444
|
+
'expand',
|
|
445
|
+
'sort'
|
|
446
|
+
];
|
|
447
|
+
return (_ctx, _cache)=>_ctx.columnObj?.type && columnTypes.includes(_ctx.columnObj.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)({
|
|
448
|
+
key: 0
|
|
449
|
+
}, _ctx.columnObj, {
|
|
450
|
+
width: _ctx.columnObj.minWidth || _ctx.columnObj.width,
|
|
451
|
+
align: _ctx.columnObj.align ?? 'center',
|
|
452
|
+
"reserve-selection": 'selection' == _ctx.columnObj.type
|
|
453
|
+
}), {
|
|
454
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)((scope)=>[
|
|
455
|
+
'expand' == _ctx.columnObj.type ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
456
|
+
key: 0
|
|
457
|
+
}, [
|
|
458
|
+
_ctx.columnObj.render ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(_ctx.columnObj.render(scope.row, scope.$index, scope.expanded)), {
|
|
459
|
+
key: 0
|
|
460
|
+
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, _ctx.columnObj.type, (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
461
|
+
key: 1
|
|
462
|
+
}, scope)))
|
|
463
|
+
], 64)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
464
|
+
'sort' == _ctx.columnObj.type ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
|
|
465
|
+
key: 1,
|
|
466
|
+
class: "move"
|
|
467
|
+
}, {
|
|
468
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
469
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
|
|
470
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
471
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.DCaret))
|
|
472
|
+
]),
|
|
473
|
+
_: 1
|
|
474
|
+
})
|
|
475
|
+
]),
|
|
476
|
+
_: 1
|
|
477
|
+
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
478
|
+
]),
|
|
479
|
+
_: 3
|
|
480
|
+
}, 16, [
|
|
481
|
+
"width",
|
|
482
|
+
"align",
|
|
483
|
+
"reserve-selection"
|
|
484
|
+
])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(composables_TableColumn), {
|
|
485
|
+
key: 1,
|
|
486
|
+
column: _ctx.columnObj
|
|
487
|
+
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
488
|
+
_: 2
|
|
489
|
+
}, [
|
|
490
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(Object.keys(_ctx.$slots), (slot)=>({
|
|
491
|
+
name: slot,
|
|
492
|
+
fn: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)((scope)=>[
|
|
493
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, slot, (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeProps)((0, __WEBPACK_EXTERNAL_MODULE_vue__.guardReactiveProps)(scope)))
|
|
494
|
+
])
|
|
495
|
+
}))
|
|
496
|
+
]), 1032, [
|
|
497
|
+
"column"
|
|
498
|
+
]));
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
const RenderColumn_exports_ = RenderColumnvue_type_script_lang_ts_setup_true_name_ProTable;
|
|
502
|
+
/* ESM default export */ const RenderColumn = RenderColumn_exports_;
|
|
431
503
|
/**
|
|
432
504
|
* [1-10012-1]获取值域列表
|
|
433
505
|
* @param data
|
|
@@ -456,7 +528,7 @@ function use_fetch_dataset_useFetchDataset(codeSystemCodes, enabledFlag) {
|
|
|
456
528
|
* @param params
|
|
457
529
|
* @returns
|
|
458
530
|
*/ const exportData2File = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/untils/exportData2File', params);
|
|
459
|
-
|
|
531
|
+
// 定义 CheckboxValueType 类型
|
|
460
532
|
function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
461
533
|
const changeSort = debounce(changeInputSort, 1200);
|
|
462
534
|
return [
|
|
@@ -482,7 +554,6 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
482
554
|
'false-value': 0,
|
|
483
555
|
size: 'small',
|
|
484
556
|
modelValue: row.displayFlag,
|
|
485
|
-
disabled: row.type === SELECTION,
|
|
486
557
|
'onUpdate:modelValue': (value)=>row.displayFlag = value
|
|
487
558
|
})
|
|
488
559
|
},
|
|
@@ -493,8 +564,8 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
493
564
|
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInputNumber, {
|
|
494
565
|
maxLength: 16,
|
|
495
566
|
'controls-position': 'right',
|
|
567
|
+
min: 0,
|
|
496
568
|
modelValue: row.minWidth,
|
|
497
|
-
disabled: row.type === SELECTION,
|
|
498
569
|
'onUpdate:modelValue': (value)=>row.minWidth = value,
|
|
499
570
|
size: 'small',
|
|
500
571
|
placeholder: '请输入列宽 (最小值)'
|
|
@@ -509,7 +580,7 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
509
580
|
min: 0,
|
|
510
581
|
'controls-position': 'right',
|
|
511
582
|
modelValue: row.sort,
|
|
512
|
-
disabled: disabledDraggable.value
|
|
583
|
+
disabled: disabledDraggable.value,
|
|
513
584
|
'onUpdate:modelValue': (value)=>row.sort = value,
|
|
514
585
|
onInput: (sort)=>{
|
|
515
586
|
changeSort(index, sort);
|
|
@@ -715,20 +786,22 @@ const _hoisted_2 = {
|
|
|
715
786
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
716
787
|
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
717
788
|
const dialogRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
789
|
+
const confirmBtnRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
790
|
+
const cancelBtnRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
718
791
|
const emits = __emit;
|
|
719
792
|
// 纯关闭弹窗,不执行其他操作,用于左上角X
|
|
720
793
|
const justCloseDialog = ()=>{
|
|
721
794
|
closeDialog();
|
|
722
|
-
emits(
|
|
795
|
+
emits("close");
|
|
723
796
|
};
|
|
724
797
|
// 处理常规关闭,支持before-close钩子
|
|
725
798
|
const handleClose = ()=>{
|
|
726
|
-
if (attrs?.[
|
|
799
|
+
if (attrs?.["before-close"]) (attrs?.["before-close"])(closeDialog);
|
|
727
800
|
else closeDialog();
|
|
728
801
|
};
|
|
729
802
|
// 处理取消按钮点击
|
|
730
803
|
const handleCancel = ()=>{
|
|
731
|
-
emits(
|
|
804
|
+
emits("cancel");
|
|
732
805
|
if (__props.closeOnCancel) handleClose();
|
|
733
806
|
};
|
|
734
807
|
const handleConfirm = async ()=>{
|
|
@@ -739,7 +812,7 @@ const _hoisted_2 = {
|
|
|
739
812
|
loading.value = false;
|
|
740
813
|
if (!err) {
|
|
741
814
|
handleClose();
|
|
742
|
-
emits(
|
|
815
|
+
emits("success");
|
|
743
816
|
}
|
|
744
817
|
} catch {
|
|
745
818
|
loading.value = false;
|
|
@@ -747,13 +820,15 @@ const _hoisted_2 = {
|
|
|
747
820
|
}
|
|
748
821
|
};
|
|
749
822
|
const changeScreen = async (flag)=>{
|
|
750
|
-
emits(
|
|
823
|
+
emits("changeScreen", flag);
|
|
751
824
|
};
|
|
752
825
|
__expose({
|
|
753
826
|
ref: dialogRef,
|
|
754
827
|
open: openDialog,
|
|
755
828
|
close: closeDialog,
|
|
756
|
-
visible
|
|
829
|
+
visible,
|
|
830
|
+
confirmBtnRef,
|
|
831
|
+
cancelBtnRef
|
|
757
832
|
});
|
|
758
833
|
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
759
834
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElDialog), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
@@ -809,19 +884,29 @@ const _hoisted_2 = {
|
|
|
809
884
|
key: 1
|
|
810
885
|
}) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", _hoisted_2, [
|
|
811
886
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
812
|
-
onClick: handleCancel
|
|
887
|
+
onClick: handleCancel,
|
|
888
|
+
ref_key: "cancelBtnRef",
|
|
889
|
+
ref: cancelBtnRef,
|
|
890
|
+
onKeydown: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withKeys)(handleCancel, [
|
|
891
|
+
"enter"
|
|
892
|
+
])
|
|
813
893
|
}, {
|
|
814
894
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[3] || (_cache[3] = [
|
|
815
895
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
816
896
|
])),
|
|
817
897
|
_: 1
|
|
818
|
-
}),
|
|
898
|
+
}, 512),
|
|
819
899
|
_ctx.showConfirmButton ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
820
900
|
key: 0,
|
|
901
|
+
ref_key: "confirmBtnRef",
|
|
902
|
+
ref: confirmBtnRef,
|
|
821
903
|
loading: loading.value,
|
|
822
904
|
type: "primary",
|
|
823
905
|
disabled: _ctx.confirmDisabled,
|
|
824
|
-
onClick: handleConfirm
|
|
906
|
+
onClick: handleConfirm,
|
|
907
|
+
onKeydown: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withKeys)(handleConfirm, [
|
|
908
|
+
"enter"
|
|
909
|
+
])
|
|
825
910
|
}, {
|
|
826
911
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[4] || (_cache[4] = [
|
|
827
912
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
|
|
@@ -849,7 +934,7 @@ const _hoisted_2 = {
|
|
|
849
934
|
onClick: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(openDialog)
|
|
850
935
|
}, {
|
|
851
936
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
852
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(__WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.[
|
|
937
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(__WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.["button-text"]), 1)
|
|
853
938
|
]),
|
|
854
939
|
_: 1
|
|
855
940
|
}, 8, [
|
|
@@ -905,7 +990,9 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
905
990
|
]);
|
|
906
991
|
const isAdmin = userInfo?.adminFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES || userInfo?.userJobCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG_STR.NO;
|
|
907
992
|
const componentId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
|
|
908
|
-
const fullscreen = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(
|
|
993
|
+
const fullscreen = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
|
|
994
|
+
const confirmLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
995
|
+
const applicationLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
909
996
|
const props = __props;
|
|
910
997
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
911
998
|
dialogRef.value.open();
|
|
@@ -925,7 +1012,6 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
925
1012
|
const influenceScopeCode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PUBLIC);
|
|
926
1013
|
const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
927
1014
|
const sourceData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
928
|
-
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
|
|
929
1015
|
const disabledDraggable = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>!props.columnsSetting?.draggable);
|
|
930
1016
|
function initColumns() {
|
|
931
1017
|
sourceData.value = props.columns.map((item, index)=>({
|
|
@@ -971,7 +1057,6 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
971
1057
|
if (result?.data?.length) {
|
|
972
1058
|
componentId.value = result.data[0].componentId || '';
|
|
973
1059
|
serveDbgridComponentSettingList.value = result.data[0].dbgridComponentSettingList || [];
|
|
974
|
-
exportFileFlag.value = result.data[0].exportFileFlag;
|
|
975
1060
|
if (serveDbgridComponentSettingList.value.length) {
|
|
976
1061
|
if (!isAdmin) {
|
|
977
1062
|
influenceScopeCode.value = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE;
|
|
@@ -1041,7 +1126,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1041
1126
|
return item;
|
|
1042
1127
|
});
|
|
1043
1128
|
}
|
|
1044
|
-
function submit() {
|
|
1129
|
+
function submit(isSave) {
|
|
1045
1130
|
return new Promise((resolve, reject)=>{
|
|
1046
1131
|
if (influenceScopeCode.value === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE && !bizId.value) {
|
|
1047
1132
|
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('请选择操作员');
|
|
@@ -1090,7 +1175,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1090
1175
|
}).then((result)=>{
|
|
1091
1176
|
let [, data] = result;
|
|
1092
1177
|
if (data?.success) {
|
|
1093
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success('保存成功');
|
|
1178
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(isSave ? '保存成功' : '应用成功');
|
|
1094
1179
|
resolve([]);
|
|
1095
1180
|
} else reject([
|
|
1096
1181
|
'',
|
|
@@ -1105,8 +1190,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1105
1190
|
});
|
|
1106
1191
|
}
|
|
1107
1192
|
__expose({
|
|
1108
|
-
dialogRef
|
|
1109
|
-
exportFileFlag
|
|
1193
|
+
dialogRef
|
|
1110
1194
|
}); /**
|
|
1111
1195
|
* 左右滚动
|
|
1112
1196
|
*/
|
|
@@ -1140,17 +1224,25 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1140
1224
|
function changeScreen(flag) {
|
|
1141
1225
|
fullscreen.value = flag;
|
|
1142
1226
|
}
|
|
1143
|
-
function
|
|
1144
|
-
|
|
1145
|
-
|
|
1227
|
+
function handleCancel() {
|
|
1228
|
+
dialogRef.value.close();
|
|
1229
|
+
}
|
|
1230
|
+
async function handleConfirm(isSave = true) {
|
|
1231
|
+
const loadingRef = isSave ? confirmLoading : applicationLoading;
|
|
1232
|
+
loadingRef.value = true;
|
|
1233
|
+
try {
|
|
1234
|
+
const [err] = await submit(isSave);
|
|
1235
|
+
loadingRef.value = false;
|
|
1236
|
+
if (!err) {
|
|
1237
|
+
if (isSave) handleCancel();
|
|
1238
|
+
props.success();
|
|
1239
|
+
}
|
|
1240
|
+
} catch {
|
|
1241
|
+
loadingRef.value = false;
|
|
1242
|
+
}
|
|
1146
1243
|
}
|
|
1147
1244
|
return (_ctx, _cache)=>renderDialog.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(pro_dialog, {
|
|
1148
1245
|
key: 0,
|
|
1149
|
-
"confirm-fn": submit,
|
|
1150
|
-
onSuccess: props.success,
|
|
1151
|
-
onClosed: _cache[4] || (_cache[4] = ()=>{
|
|
1152
|
-
onClose();
|
|
1153
|
-
}),
|
|
1154
1246
|
"destroy-on-close": true,
|
|
1155
1247
|
width: 1000,
|
|
1156
1248
|
fullscreen: fullscreen.value,
|
|
@@ -1161,6 +1253,49 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1161
1253
|
"button-class": "mr-5",
|
|
1162
1254
|
title: "数据窗口组件"
|
|
1163
1255
|
}, {
|
|
1256
|
+
footer: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1257
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
1258
|
+
onClick: handleCancel
|
|
1259
|
+
}, {
|
|
1260
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[7] || (_cache[7] = [
|
|
1261
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
1262
|
+
])),
|
|
1263
|
+
_: 1
|
|
1264
|
+
}),
|
|
1265
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
1266
|
+
type: "primary",
|
|
1267
|
+
loading: applicationLoading.value,
|
|
1268
|
+
disabled: applicationLoading.value,
|
|
1269
|
+
plain: "",
|
|
1270
|
+
onClick: _cache[4] || (_cache[4] = ()=>{
|
|
1271
|
+
handleConfirm(false);
|
|
1272
|
+
})
|
|
1273
|
+
}, {
|
|
1274
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[8] || (_cache[8] = [
|
|
1275
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用")
|
|
1276
|
+
])),
|
|
1277
|
+
_: 1
|
|
1278
|
+
}, 8, [
|
|
1279
|
+
"loading",
|
|
1280
|
+
"disabled"
|
|
1281
|
+
]),
|
|
1282
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
1283
|
+
loading: confirmLoading.value,
|
|
1284
|
+
type: "primary",
|
|
1285
|
+
disabled: confirmLoading.value,
|
|
1286
|
+
onClick: _cache[5] || (_cache[5] = ()=>{
|
|
1287
|
+
handleConfirm(true);
|
|
1288
|
+
})
|
|
1289
|
+
}, {
|
|
1290
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[9] || (_cache[9] = [
|
|
1291
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
|
|
1292
|
+
])),
|
|
1293
|
+
_: 1
|
|
1294
|
+
}, 8, [
|
|
1295
|
+
"loading",
|
|
1296
|
+
"disabled"
|
|
1297
|
+
])
|
|
1298
|
+
]),
|
|
1164
1299
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1165
1300
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
1166
1301
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
@@ -1177,6 +1312,11 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1177
1312
|
}),
|
|
1178
1313
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", null, [
|
|
1179
1314
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(pro_table, {
|
|
1315
|
+
disabled: "",
|
|
1316
|
+
"columns-setting": {
|
|
1317
|
+
disabled: true
|
|
1318
|
+
},
|
|
1319
|
+
"component-no": props.componentNo,
|
|
1180
1320
|
ref_key: "tableRef",
|
|
1181
1321
|
ref: tableRef,
|
|
1182
1322
|
columns: tableColumn.value,
|
|
@@ -1186,12 +1326,13 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1186
1326
|
{}
|
|
1187
1327
|
]
|
|
1188
1328
|
}, null, 8, [
|
|
1329
|
+
"component-no",
|
|
1189
1330
|
"columns"
|
|
1190
1331
|
])
|
|
1191
1332
|
]),
|
|
1192
1333
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", dbgrid_component_settingvue_type_script_setup_true_lang_tsx_hoisted_2, [
|
|
1193
1334
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", null, [
|
|
1194
|
-
_cache[
|
|
1335
|
+
_cache[6] || (_cache[6] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, "影响范围", -1)),
|
|
1195
1336
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElSelect), {
|
|
1196
1337
|
disabled: !(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isAdmin),
|
|
1197
1338
|
class: "ml-6 w-60",
|
|
@@ -1254,7 +1395,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1254
1395
|
modelValue: scrollKeyWord.value,
|
|
1255
1396
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event)=>scrollKeyWord.value = $event),
|
|
1256
1397
|
placeholder: "\n 选择后可自动定位到对应的属性\n ",
|
|
1257
|
-
class: "w-
|
|
1398
|
+
class: "w-64"
|
|
1258
1399
|
}, {
|
|
1259
1400
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1260
1401
|
((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)(sourceData.value, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElOption), {
|
|
@@ -1296,7 +1437,6 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1296
1437
|
]),
|
|
1297
1438
|
_: 1
|
|
1298
1439
|
}, 8, [
|
|
1299
|
-
"onSuccess",
|
|
1300
1440
|
"fullscreen"
|
|
1301
1441
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true);
|
|
1302
1442
|
}
|
|
@@ -1304,7 +1444,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1304
1444
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1305
1445
|
[
|
|
1306
1446
|
'__scopeId',
|
|
1307
|
-
"data-v-
|
|
1447
|
+
"data-v-20489fe7"
|
|
1308
1448
|
]
|
|
1309
1449
|
]);
|
|
1310
1450
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -1348,13 +1488,13 @@ const EXPORT_FILE = 'export-file';
|
|
|
1348
1488
|
tableData: {},
|
|
1349
1489
|
columns: {},
|
|
1350
1490
|
componentNo: {},
|
|
1351
|
-
columnsSetting: {}
|
|
1491
|
+
columnsSetting: {},
|
|
1492
|
+
exportFileFlag: {}
|
|
1352
1493
|
},
|
|
1353
1494
|
emits: [
|
|
1354
1495
|
'success'
|
|
1355
1496
|
],
|
|
1356
|
-
setup (__props, {
|
|
1357
|
-
const columnsSettingRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1497
|
+
setup (__props, { emit: __emit }) {
|
|
1358
1498
|
const dataSetList = use_fetch_dataset_useFetchDataset([
|
|
1359
1499
|
FILE_TYPE_CODE
|
|
1360
1500
|
]);
|
|
@@ -1369,7 +1509,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1369
1509
|
children: []
|
|
1370
1510
|
}
|
|
1371
1511
|
];
|
|
1372
|
-
if (exportFileFlag
|
|
1512
|
+
if (props.exportFileFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO || props.columnsSetting?.disabled) return result;
|
|
1373
1513
|
let list = dataSetList.value?.[FILE_TYPE_CODE] || [];
|
|
1374
1514
|
if (1 === list.length) result.push({
|
|
1375
1515
|
value: list[0]?.dataValueNo,
|
|
@@ -1418,6 +1558,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1418
1558
|
panelValue.value = [];
|
|
1419
1559
|
}
|
|
1420
1560
|
function openColumnSetting() {
|
|
1561
|
+
if (props.columnsSetting?.disabled) return;
|
|
1421
1562
|
tableColumnSetting({
|
|
1422
1563
|
columns: props.columns,
|
|
1423
1564
|
componentNo: props.componentNo,
|
|
@@ -1427,14 +1568,10 @@ const EXPORT_FILE = 'export-file';
|
|
|
1427
1568
|
}
|
|
1428
1569
|
});
|
|
1429
1570
|
}
|
|
1430
|
-
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>columnsSettingRef.value?.exportFileFlag);
|
|
1431
1571
|
function handleMenuClick(value) {
|
|
1432
1572
|
if (value === COLUMN_SETTING) openColumnSetting();
|
|
1433
1573
|
else exportFile(value);
|
|
1434
1574
|
}
|
|
1435
|
-
__expose({
|
|
1436
|
-
exportFileFlag
|
|
1437
|
-
});
|
|
1438
1575
|
return (_ctx, _cache)=>{
|
|
1439
1576
|
const _component_el_menu_item = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-menu-item");
|
|
1440
1577
|
const _component_el_sub_menu = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-sub-menu");
|
|
@@ -1512,29 +1649,700 @@ const EXPORT_FILE = 'export-file';
|
|
|
1512
1649
|
})) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", {
|
|
1513
1650
|
key: 1,
|
|
1514
1651
|
onClick: openColumnSetting,
|
|
1515
|
-
class:
|
|
1652
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(`el-dropdown-link absolute left-3 top-2.5 z-50 ${props.columnsSetting?.disabled ? 'cursor-not-allowed text-blue-400' : 'cursor-pointer text-blue-600'}`)
|
|
1516
1653
|
}, [
|
|
1517
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), {
|
|
1518
|
-
|
|
1654
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
|
|
1655
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1656
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Setting))
|
|
1657
|
+
]),
|
|
1658
|
+
_: 1
|
|
1659
|
+
})
|
|
1660
|
+
], 2));
|
|
1661
|
+
};
|
|
1662
|
+
}
|
|
1663
|
+
});
|
|
1664
|
+
const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
|
|
1665
|
+
[
|
|
1666
|
+
'__scopeId',
|
|
1667
|
+
"data-v-33e7f7b0"
|
|
1668
|
+
]
|
|
1669
|
+
]);
|
|
1670
|
+
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
1671
|
+
/* ESM default export */ const Tablevue_type_script_setup_true_lang_tsx_name_Table = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1672
|
+
__name: 'Table',
|
|
1673
|
+
props: {
|
|
1674
|
+
id: {},
|
|
1675
|
+
loading: {
|
|
1676
|
+
type: Boolean
|
|
1677
|
+
},
|
|
1678
|
+
exportFileFlag: {},
|
|
1679
|
+
draggable: {
|
|
1680
|
+
type: Boolean
|
|
1681
|
+
},
|
|
1682
|
+
data: {},
|
|
1683
|
+
componentNo: {},
|
|
1684
|
+
rowKey: {},
|
|
1685
|
+
tableColumns: {},
|
|
1686
|
+
commonColumns: {},
|
|
1687
|
+
columnsSetting: {}
|
|
1688
|
+
},
|
|
1689
|
+
emits: [
|
|
1690
|
+
'success'
|
|
1691
|
+
],
|
|
1692
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
1693
|
+
const props = __props;
|
|
1694
|
+
const emits = __emit;
|
|
1695
|
+
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1696
|
+
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows() || []);
|
|
1697
|
+
__expose({
|
|
1698
|
+
proTableRef
|
|
1699
|
+
});
|
|
1700
|
+
return (_ctx, _cache)=>{
|
|
1701
|
+
const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
|
|
1702
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
1703
|
+
props.componentNo ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(TableSettingButton, {
|
|
1704
|
+
key: 0,
|
|
1705
|
+
"table-data": selectedData.value,
|
|
1706
|
+
"export-file-flag": props.exportFileFlag,
|
|
1707
|
+
"component-no": props.componentNo,
|
|
1708
|
+
"columns-setting": props.columnsSetting,
|
|
1709
|
+
columns: _ctx.commonColumns,
|
|
1710
|
+
ref: "tableSettingButtonRef",
|
|
1711
|
+
onSuccess: _cache[0] || (_cache[0] = ($event)=>emits('success'))
|
|
1712
|
+
}, null, 8, [
|
|
1713
|
+
"table-data",
|
|
1714
|
+
"export-file-flag",
|
|
1715
|
+
"component-no",
|
|
1716
|
+
"columns-setting",
|
|
1717
|
+
"columns"
|
|
1718
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
1719
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTable), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
1720
|
+
id: props.id,
|
|
1721
|
+
ref_key: "proTableRef",
|
|
1722
|
+
ref: proTableRef,
|
|
1723
|
+
data: props.data,
|
|
1724
|
+
style: {
|
|
1725
|
+
width: "100%"
|
|
1726
|
+
},
|
|
1727
|
+
class: "min-h-0 flex-1 overflow-auto",
|
|
1728
|
+
"row-key": props.rowKey,
|
|
1729
|
+
"cell-class-name": ({ column })=>_ctx.draggable && 'operation' !== column.property ? 'cursor-move' : '',
|
|
1730
|
+
border: ""
|
|
1731
|
+
}, _ctx.$attrs), {
|
|
1732
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1733
|
+
((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)(props.tableColumns, (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(RenderColumn, {
|
|
1734
|
+
"column-obj": item,
|
|
1735
|
+
key: index
|
|
1736
|
+
}, null, 8, [
|
|
1737
|
+
"column-obj"
|
|
1738
|
+
]))), 128))
|
|
1739
|
+
]),
|
|
1740
|
+
_: 1
|
|
1741
|
+
}, 16, [
|
|
1742
|
+
"id",
|
|
1743
|
+
"data",
|
|
1744
|
+
"row-key",
|
|
1745
|
+
"cell-class-name"
|
|
1746
|
+
])), [
|
|
1747
|
+
[
|
|
1748
|
+
_directive_loading,
|
|
1749
|
+
props.loading
|
|
1750
|
+
]
|
|
1751
|
+
])
|
|
1752
|
+
], 64);
|
|
1753
|
+
};
|
|
1754
|
+
}
|
|
1755
|
+
});
|
|
1756
|
+
const Table_exports_ = Tablevue_type_script_setup_true_lang_tsx_name_Table;
|
|
1757
|
+
/* ESM default export */ const Table = Table_exports_;
|
|
1758
|
+
// 接受父组件参数,配置默认值
|
|
1759
|
+
/* ESM default export */ const TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1760
|
+
__name: 'TableContainer',
|
|
1761
|
+
props: {
|
|
1762
|
+
model: {
|
|
1763
|
+
default: ()=>({})
|
|
1764
|
+
},
|
|
1765
|
+
draggable: {
|
|
1766
|
+
type: Boolean
|
|
1767
|
+
},
|
|
1768
|
+
editable: {
|
|
1769
|
+
type: Boolean
|
|
1770
|
+
}
|
|
1771
|
+
},
|
|
1772
|
+
setup (__props, { expose: __expose }) {
|
|
1773
|
+
const props = __props;
|
|
1774
|
+
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1775
|
+
__expose(new Proxy({}, {
|
|
1776
|
+
get (_target, prop) {
|
|
1777
|
+
if (formRef.value) return formRef.value[prop];
|
|
1778
|
+
},
|
|
1779
|
+
has (_target, prop) {
|
|
1780
|
+
if (formRef?.value) return prop in formRef.value;
|
|
1781
|
+
return false;
|
|
1782
|
+
}
|
|
1783
|
+
}));
|
|
1784
|
+
return (_ctx, _cache)=>_ctx.editable ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElForm), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
1785
|
+
key: 0,
|
|
1786
|
+
model: props.model,
|
|
1787
|
+
ref_key: "formRef",
|
|
1788
|
+
ref: formRef
|
|
1789
|
+
}, _ctx.$attrs), {
|
|
1790
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1791
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default")
|
|
1792
|
+
]),
|
|
1793
|
+
_: 3
|
|
1794
|
+
}, 16, [
|
|
1795
|
+
"model"
|
|
1796
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default", {
|
|
1797
|
+
key: 1
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
});
|
|
1801
|
+
const TableContainer_exports_ = TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer;
|
|
1802
|
+
/* ESM default export */ const TableContainer = TableContainer_exports_;
|
|
1803
|
+
/* ESM default export */ const Paginationvue_type_script_setup_true_lang_ts_name_Pagination = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1804
|
+
__name: 'Pagination',
|
|
1805
|
+
props: {
|
|
1806
|
+
pageInfo: {},
|
|
1807
|
+
pageSizes: {},
|
|
1808
|
+
handleSizeChange: {
|
|
1809
|
+
type: Function
|
|
1810
|
+
},
|
|
1811
|
+
handleCurrentChange: {
|
|
1812
|
+
type: Function
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
setup (__props) {
|
|
1816
|
+
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElPagination), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
1817
|
+
"current-page": _ctx.pageInfo.pageNumber,
|
|
1818
|
+
"page-size": _ctx.pageInfo.pageSize,
|
|
1819
|
+
total: _ctx.pageInfo.total,
|
|
1820
|
+
"page-sizes": _ctx.pageSizes,
|
|
1821
|
+
layout: "total, sizes, prev, pager, next",
|
|
1822
|
+
onSizeChange: _ctx.handleSizeChange,
|
|
1823
|
+
onCurrentChange: _ctx.handleCurrentChange,
|
|
1824
|
+
"set-scroll-top": 500,
|
|
1825
|
+
background: ""
|
|
1826
|
+
}, _ctx.$attrs), null, 16, [
|
|
1827
|
+
"current-page",
|
|
1828
|
+
"page-size",
|
|
1829
|
+
"total",
|
|
1830
|
+
"page-sizes",
|
|
1831
|
+
"onSizeChange",
|
|
1832
|
+
"onCurrentChange"
|
|
1833
|
+
]));
|
|
1834
|
+
}
|
|
1835
|
+
});
|
|
1836
|
+
const Pagination_exports_ = Paginationvue_type_script_setup_true_lang_ts_name_Pagination;
|
|
1837
|
+
/* ESM default export */ const Pagination = Pagination_exports_;
|
|
1838
|
+
const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
|
|
1839
|
+
class: "relative flex flex-1 flex-col overflow-hidden"
|
|
1840
|
+
};
|
|
1841
|
+
const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
1842
|
+
key: 1,
|
|
1843
|
+
class: "mt-5 flex justify-between items-center"
|
|
1844
|
+
};
|
|
1845
|
+
const SELECTION = 'selection';
|
|
1846
|
+
// 接受父组件参数,配置默认值
|
|
1847
|
+
/* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1848
|
+
__name: 'index',
|
|
1849
|
+
props: {
|
|
1850
|
+
columns: {
|
|
1851
|
+
default: ()=>[]
|
|
1852
|
+
},
|
|
1853
|
+
data: {
|
|
1854
|
+
default: ()=>[]
|
|
1855
|
+
},
|
|
1856
|
+
pagination: {
|
|
1857
|
+
type: Boolean,
|
|
1858
|
+
default: false
|
|
1859
|
+
},
|
|
1860
|
+
pageInfo: {
|
|
1861
|
+
default: void 0
|
|
1862
|
+
},
|
|
1863
|
+
componentNo: {
|
|
1864
|
+
default: ''
|
|
1865
|
+
},
|
|
1866
|
+
fetchData: {
|
|
1867
|
+
type: Function,
|
|
1868
|
+
default: void 0
|
|
1869
|
+
},
|
|
1870
|
+
columnsSetting: {
|
|
1871
|
+
default: ()=>({
|
|
1872
|
+
draggable: true
|
|
1873
|
+
})
|
|
1874
|
+
},
|
|
1875
|
+
draggable: {
|
|
1876
|
+
type: Boolean,
|
|
1877
|
+
default: false
|
|
1878
|
+
},
|
|
1879
|
+
editable: {
|
|
1880
|
+
type: Boolean,
|
|
1881
|
+
default: false
|
|
1882
|
+
},
|
|
1883
|
+
defaultQuery: {
|
|
1884
|
+
type: Boolean,
|
|
1885
|
+
default: true
|
|
1886
|
+
},
|
|
1887
|
+
rowKey: {
|
|
1888
|
+
default: 'id'
|
|
1889
|
+
},
|
|
1890
|
+
loading: {
|
|
1891
|
+
type: Boolean,
|
|
1892
|
+
default: false
|
|
1893
|
+
},
|
|
1894
|
+
pageSizes: {
|
|
1895
|
+
default: ()=>[
|
|
1896
|
+
10,
|
|
1897
|
+
25,
|
|
1898
|
+
50,
|
|
1899
|
+
100
|
|
1900
|
+
]
|
|
1901
|
+
},
|
|
1902
|
+
filterObj: {
|
|
1903
|
+
default: ()=>({})
|
|
1904
|
+
},
|
|
1905
|
+
layout: {
|
|
1906
|
+
default: 'total, sizes, prev, pager, next'
|
|
1907
|
+
},
|
|
1908
|
+
dragTips: {
|
|
1909
|
+
default: '温馨提示:您可通过拖动进行排序'
|
|
1910
|
+
},
|
|
1911
|
+
isShowDragTips: {
|
|
1912
|
+
type: Boolean,
|
|
1913
|
+
default: false
|
|
1914
|
+
},
|
|
1915
|
+
dragTipsCustomStyle: {
|
|
1916
|
+
default: {}
|
|
1917
|
+
},
|
|
1918
|
+
dragTipsClassName: {
|
|
1919
|
+
default: ''
|
|
1920
|
+
}
|
|
1921
|
+
},
|
|
1922
|
+
emits: [
|
|
1923
|
+
"drag-end",
|
|
1924
|
+
"size-page-change",
|
|
1925
|
+
"current-page-change"
|
|
1926
|
+
],
|
|
1927
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
1928
|
+
const props = __props;
|
|
1929
|
+
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
|
|
1930
|
+
let state = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
1931
|
+
// 表格数据
|
|
1932
|
+
tableData: props.data,
|
|
1933
|
+
loading: false,
|
|
1934
|
+
// 分页数据
|
|
1935
|
+
pageInfo: {
|
|
1936
|
+
// 当前页数
|
|
1937
|
+
pageNumber: 1,
|
|
1938
|
+
// 每页显示条数
|
|
1939
|
+
pageSize: 10,
|
|
1940
|
+
// 总条数
|
|
1941
|
+
total: 0
|
|
1942
|
+
}
|
|
1943
|
+
});
|
|
1944
|
+
const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
1945
|
+
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1946
|
+
// 生成组件唯一id
|
|
1947
|
+
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
|
|
1948
|
+
// 定义 emit 事件
|
|
1949
|
+
const emit = __emit;
|
|
1950
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
1951
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1952
|
+
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>tableRef.value?.proTableRef);
|
|
1953
|
+
/**
|
|
1954
|
+
*获取参与排序的列表 索引 是否可以拖拽
|
|
1955
|
+
*/ function getDragSortData(newIndex, data, startIndexObj, sortData) {
|
|
1956
|
+
data.forEach((item, index)=>{
|
|
1957
|
+
startIndexObj.startIndex += 1;
|
|
1958
|
+
if (startIndexObj.startIndex > newIndex) return;
|
|
1959
|
+
if (startIndexObj.startIndex === newIndex) {
|
|
1960
|
+
sortData.curIndex = index;
|
|
1961
|
+
sortData.curData = item;
|
|
1962
|
+
sortData.result = data;
|
|
1963
|
+
}
|
|
1964
|
+
if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
|
|
1965
|
+
});
|
|
1966
|
+
return sortData;
|
|
1967
|
+
}
|
|
1968
|
+
/**
|
|
1969
|
+
* 获取拖拽排序数据结果
|
|
1970
|
+
*/ function getSortableResult(newIndex, oldIndex) {
|
|
1971
|
+
let data = [
|
|
1972
|
+
...state.tableData
|
|
1973
|
+
];
|
|
1974
|
+
if (attrs?.['tree-props']) {
|
|
1975
|
+
let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
|
|
1976
|
+
startIndex: -1
|
|
1977
|
+
}, {
|
|
1978
|
+
result: [],
|
|
1979
|
+
curIndex: 0,
|
|
1980
|
+
curData: {}
|
|
1981
|
+
});
|
|
1982
|
+
let { curIndex: oldCurIndex, curData: oldCurData } = getDragSortData(oldIndex, data, {
|
|
1983
|
+
startIndex: -1
|
|
1984
|
+
}, {
|
|
1985
|
+
result: [],
|
|
1986
|
+
curIndex: 0,
|
|
1987
|
+
curData: {}
|
|
1988
|
+
});
|
|
1989
|
+
if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
|
|
1990
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
|
|
1991
|
+
return [];
|
|
1992
|
+
}
|
|
1993
|
+
const [removedItem] = result.splice(oldCurIndex, 1);
|
|
1994
|
+
result.splice(newCurIndex, 0, removedItem);
|
|
1995
|
+
data = result;
|
|
1996
|
+
} else {
|
|
1997
|
+
const [removedItem] = data.splice(oldIndex, 1);
|
|
1998
|
+
data.splice(newIndex, 0, removedItem);
|
|
1999
|
+
}
|
|
2000
|
+
return data;
|
|
2001
|
+
}
|
|
2002
|
+
/***
|
|
2003
|
+
* 表格拖拽排序
|
|
2004
|
+
**/ const initDragSort = ()=>{
|
|
2005
|
+
const tbodyList = document.querySelectorAll(`#${uuid.value} tbody`);
|
|
2006
|
+
const tbody = tbodyList[tbodyList.length - 1];
|
|
2007
|
+
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
2008
|
+
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
2009
|
+
handle: '.cursor-move',
|
|
2010
|
+
animation: 300,
|
|
2011
|
+
scroll: true,
|
|
2012
|
+
scrollSensitivity: 80,
|
|
2013
|
+
scrollSpeed: 10,
|
|
2014
|
+
onEnd (evt) {
|
|
2015
|
+
const { newIndex, oldIndex } = evt;
|
|
2016
|
+
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
2017
|
+
//获取拖动后的排序
|
|
2018
|
+
let data = getSortableResult(newIndex, oldIndex);
|
|
2019
|
+
if (data.length) emit('drag-end', data);
|
|
2020
|
+
else evt.from.innerHTML = initialHTML;
|
|
2021
|
+
},
|
|
2022
|
+
onStart (evt) {
|
|
2023
|
+
// 在拖拽开始时,记录当前容器的 HTML
|
|
2024
|
+
initialHTML = evt.from.innerHTML;
|
|
2025
|
+
}
|
|
2026
|
+
});
|
|
2027
|
+
};
|
|
2028
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.data, (newValue)=>{
|
|
2029
|
+
state.tableData = newValue;
|
|
2030
|
+
state.pageInfo.total = (newValue || []).length;
|
|
2031
|
+
});
|
|
2032
|
+
async function fetchDbgridComponent() {
|
|
2033
|
+
let [, result] = await queryDbgridComponentByExample({
|
|
2034
|
+
componentNo: props.componentNo || ''
|
|
2035
|
+
});
|
|
2036
|
+
if (result?.success) {
|
|
2037
|
+
exportFileFlag.value = result.data.exportFileFlag;
|
|
2038
|
+
try {
|
|
2039
|
+
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
2040
|
+
serveColumns.value = column;
|
|
2041
|
+
} catch (error) {
|
|
2042
|
+
console.log(error);
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.componentNo, ()=>{
|
|
2047
|
+
if (props.componentNo) fetchDbgridComponent();
|
|
2048
|
+
}, {
|
|
2049
|
+
immediate: true
|
|
2050
|
+
});
|
|
2051
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
2052
|
+
// 支持拖拽排序
|
|
2053
|
+
if (props.draggable) (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
2054
|
+
initDragSort();
|
|
2055
|
+
});
|
|
2056
|
+
if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
|
|
2057
|
+
});
|
|
2058
|
+
/**
|
|
2059
|
+
* 获取列表
|
|
2060
|
+
*/ async function fetchList() {
|
|
2061
|
+
state.loading = true;
|
|
2062
|
+
let { total = 0, data = [] } = await (props.fetchData && props.fetchData(state.pageInfo)) || {};
|
|
2063
|
+
state.pageInfo.total = Number(total);
|
|
2064
|
+
state.tableData = data;
|
|
2065
|
+
state.loading = false;
|
|
2066
|
+
}
|
|
2067
|
+
/**
|
|
2068
|
+
* 分页组件改变 pageNumber 事件
|
|
2069
|
+
*/ const handleSizeChange = (val)=>{
|
|
2070
|
+
if (props.fetchData) {
|
|
2071
|
+
state.pageInfo.pageNumber = 1;
|
|
2072
|
+
state.pageInfo.pageSize = val;
|
|
2073
|
+
fetchList();
|
|
2074
|
+
} else emit('size-page-change', val);
|
|
2075
|
+
};
|
|
2076
|
+
/**
|
|
2077
|
+
* 分页组件改变 当前页数 事件
|
|
2078
|
+
*/ function changeCurrentPage(val) {
|
|
2079
|
+
if (props.fetchData) {
|
|
2080
|
+
state.pageInfo.pageNumber = val;
|
|
2081
|
+
fetchList();
|
|
2082
|
+
} else emit('current-page-change', val);
|
|
2083
|
+
}
|
|
2084
|
+
const selections = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2085
|
+
// 设置当前行激活态
|
|
2086
|
+
const setCurrentRow = (row)=>{
|
|
2087
|
+
if (proTableRef.value) proTableRef.value.setCurrentRow(row);
|
|
2088
|
+
};
|
|
2089
|
+
// 分页配置信息
|
|
2090
|
+
const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo);
|
|
2091
|
+
/**
|
|
2092
|
+
* 支持根据传递的filterObj完成过滤
|
|
2093
|
+
*/ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2094
|
+
if (Object.keys(props.filterObj).length) return [
|
|
2095
|
+
...state.tableData
|
|
2096
|
+
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
2097
|
+
'',
|
|
2098
|
+
void 0,
|
|
2099
|
+
null
|
|
2100
|
+
].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
|
|
2101
|
+
return state.tableData;
|
|
2102
|
+
});
|
|
2103
|
+
__expose({
|
|
2104
|
+
selections,
|
|
2105
|
+
tableData,
|
|
2106
|
+
setCurrentRow,
|
|
2107
|
+
proTableRef,
|
|
2108
|
+
eleTable: new Proxy({}, {
|
|
2109
|
+
get (_target, prop) {
|
|
2110
|
+
return proTableRef.value?.[prop];
|
|
2111
|
+
}
|
|
2112
|
+
}),
|
|
2113
|
+
formRef: new Proxy({}, {
|
|
2114
|
+
get (_target, prop) {
|
|
2115
|
+
return formRef.value?.[prop];
|
|
2116
|
+
},
|
|
2117
|
+
has (_target, prop) {
|
|
2118
|
+
return prop in formRef.value;
|
|
2119
|
+
}
|
|
2120
|
+
}),
|
|
2121
|
+
validateRow: (index, callback)=>{
|
|
2122
|
+
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${item.prop}`);
|
|
2123
|
+
return formRef.value.validateField(validateProps, callback);
|
|
2124
|
+
},
|
|
2125
|
+
fetchList: (init = true, initPageInfo = {
|
|
2126
|
+
pageNumber: 1
|
|
2127
|
+
})=>{
|
|
2128
|
+
if (init) state.pageInfo = {
|
|
2129
|
+
...state.pageInfo,
|
|
2130
|
+
...initPageInfo
|
|
2131
|
+
};
|
|
2132
|
+
fetchList();
|
|
2133
|
+
}
|
|
2134
|
+
});
|
|
2135
|
+
/**
|
|
2136
|
+
* 处理接口和本地的columns
|
|
2137
|
+
*/ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2138
|
+
if (!props.componentNo) return props.columns;
|
|
2139
|
+
{
|
|
2140
|
+
let result = [
|
|
2141
|
+
...props.columns
|
|
2142
|
+
].map((cur)=>({
|
|
2143
|
+
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,
|
|
2144
|
+
...cur
|
|
2145
|
+
}));
|
|
2146
|
+
if (serveColumns.value?.length) {
|
|
2147
|
+
result = result.map((item, index)=>{
|
|
2148
|
+
let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {};
|
|
2149
|
+
return {
|
|
2150
|
+
displayFlag: item.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
2151
|
+
...item,
|
|
2152
|
+
sort: index + 1,
|
|
2153
|
+
...findObj,
|
|
2154
|
+
label: item.label || findObj.label,
|
|
2155
|
+
isHidden: item.isHidden || findObj.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
2156
|
+
};
|
|
2157
|
+
});
|
|
2158
|
+
result.sort((a, b)=>Number(a.sort) - Number(b.sort));
|
|
2159
|
+
}
|
|
2160
|
+
return result;
|
|
2161
|
+
}
|
|
2162
|
+
});
|
|
2163
|
+
/**
|
|
2164
|
+
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
2165
|
+
*/ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2166
|
+
let result = [
|
|
2167
|
+
...commonColumns.value
|
|
2168
|
+
];
|
|
2169
|
+
if (props.componentNo) {
|
|
2170
|
+
result = result.map((item, index)=>({
|
|
2171
|
+
...item,
|
|
2172
|
+
minWidth: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth
|
|
2173
|
+
}));
|
|
2174
|
+
if (exportFileFlag.value && !result.find((cur)=>cur.type === SELECTION)) result = [
|
|
2175
|
+
{
|
|
2176
|
+
type: SELECTION,
|
|
2177
|
+
prop: SELECTION
|
|
2178
|
+
},
|
|
2179
|
+
...result
|
|
2180
|
+
];
|
|
2181
|
+
}
|
|
2182
|
+
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
2183
|
+
});
|
|
2184
|
+
return (_ctx, _cache)=>((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, [
|
|
2185
|
+
props?.draggable || props?.isShowDragTips ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
2186
|
+
key: 0,
|
|
2187
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
2188
|
+
color: '#f7ba2a',
|
|
2189
|
+
...props.dragTipsCustomStyle
|
|
2190
|
+
}),
|
|
2191
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
2192
|
+
'text-base',
|
|
2193
|
+
'mb-2',
|
|
2194
|
+
props.dragTipsClassName
|
|
2195
|
+
])
|
|
2196
|
+
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(props.dragTips), 7)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
2197
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(TableContainer, {
|
|
2198
|
+
ref_key: "formRef",
|
|
2199
|
+
ref: formRef,
|
|
2200
|
+
editable: _ctx.editable,
|
|
2201
|
+
model: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state),
|
|
2202
|
+
class: "flex flex-1 flex-col overflow-hidden"
|
|
1519
2203
|
}, {
|
|
1520
2204
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1521
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
2205
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2206
|
+
id: uuid.value,
|
|
2207
|
+
"export-file-flag": exportFileFlag.value,
|
|
2208
|
+
"common-columns": commonColumns.value,
|
|
2209
|
+
"component-no": props.componentNo,
|
|
2210
|
+
"columns-setting": props.columnsSetting,
|
|
2211
|
+
loading: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading,
|
|
2212
|
+
onSuccess: fetchDbgridComponent,
|
|
2213
|
+
ref_key: "tableRef",
|
|
2214
|
+
ref: tableRef,
|
|
2215
|
+
data: tableData.value,
|
|
2216
|
+
"row-key": props.rowKey,
|
|
2217
|
+
"table-columns": tableColumns.value
|
|
2218
|
+
}, _ctx.$attrs, {
|
|
2219
|
+
draggable: props.draggable
|
|
2220
|
+
}), null, 16, [
|
|
2221
|
+
"id",
|
|
2222
|
+
"export-file-flag",
|
|
2223
|
+
"common-columns",
|
|
2224
|
+
"component-no",
|
|
2225
|
+
"columns-setting",
|
|
2226
|
+
"loading",
|
|
2227
|
+
"data",
|
|
2228
|
+
"row-key",
|
|
2229
|
+
"table-columns",
|
|
2230
|
+
"draggable"
|
|
2231
|
+
])
|
|
1522
2232
|
]),
|
|
1523
2233
|
_: 1
|
|
1524
|
-
}
|
|
2234
|
+
}, 8, [
|
|
2235
|
+
"editable",
|
|
2236
|
+
"model"
|
|
2237
|
+
]),
|
|
2238
|
+
props.pagination ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2, [
|
|
2239
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "pagination"),
|
|
2240
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(Pagination, {
|
|
2241
|
+
class: "w-full flex justify-end",
|
|
2242
|
+
layout: props.layout,
|
|
2243
|
+
"page-info": paginationInfo.value,
|
|
2244
|
+
"page-sizes": props.pageSizes,
|
|
2245
|
+
"handle-size-change": handleSizeChange,
|
|
2246
|
+
"handle-current-change": changeCurrentPage
|
|
2247
|
+
}, null, 8, [
|
|
2248
|
+
"layout",
|
|
2249
|
+
"page-info",
|
|
2250
|
+
"page-sizes"
|
|
2251
|
+
])
|
|
2252
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
1525
2253
|
]));
|
|
2254
|
+
}
|
|
2255
|
+
});
|
|
2256
|
+
const pro_table_exports_ = pro_tablevue_type_script_lang_ts_setup_true_name_ProTable;
|
|
2257
|
+
/* ESM default export */ const pro_table = pro_table_exports_;
|
|
2258
|
+
const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
2259
|
+
class: "min-h-0 flex-1"
|
|
2260
|
+
};
|
|
2261
|
+
/* ESM default export */ const composables_Tablevue_type_script_setup_true_lang_tsx_name_Table = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
2262
|
+
__name: 'Table',
|
|
2263
|
+
props: {
|
|
2264
|
+
id: {},
|
|
2265
|
+
loading: {
|
|
2266
|
+
type: Boolean
|
|
2267
|
+
},
|
|
2268
|
+
exportFileFlag: {},
|
|
2269
|
+
draggable: {
|
|
2270
|
+
type: Boolean
|
|
2271
|
+
},
|
|
2272
|
+
data: {},
|
|
2273
|
+
componentNo: {},
|
|
2274
|
+
rowKey: {},
|
|
2275
|
+
tableColumns: {},
|
|
2276
|
+
commonColumns: {},
|
|
2277
|
+
columnsSetting: {}
|
|
2278
|
+
},
|
|
2279
|
+
emits: [
|
|
2280
|
+
'success'
|
|
2281
|
+
],
|
|
2282
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
2283
|
+
const props = __props;
|
|
2284
|
+
const emits = __emit;
|
|
2285
|
+
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2286
|
+
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.data.filter((cur)=>cur.checked));
|
|
2287
|
+
__expose({
|
|
2288
|
+
proTableRef
|
|
2289
|
+
});
|
|
2290
|
+
return (_ctx, _cache)=>{
|
|
2291
|
+
const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
|
|
2292
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
2293
|
+
props.componentNo ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(TableSettingButton, {
|
|
2294
|
+
key: 0,
|
|
2295
|
+
"table-data": selectedData.value,
|
|
2296
|
+
"export-file-flag": props.exportFileFlag,
|
|
2297
|
+
"component-no": props.componentNo,
|
|
2298
|
+
"columns-setting": props.columnsSetting,
|
|
2299
|
+
columns: _ctx.commonColumns,
|
|
2300
|
+
ref: "tableSettingButtonRef",
|
|
2301
|
+
onSuccess: _cache[0] || (_cache[0] = ($event)=>emits('success'))
|
|
2302
|
+
}, null, 8, [
|
|
2303
|
+
"table-data",
|
|
2304
|
+
"export-file-flag",
|
|
2305
|
+
"component-no",
|
|
2306
|
+
"columns-setting",
|
|
2307
|
+
"columns"
|
|
2308
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
2309
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1, [
|
|
2310
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElAutoResizer), null, {
|
|
2311
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ height, width })=>[
|
|
2312
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)((0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTableV2), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2313
|
+
columns: props.tableColumns,
|
|
2314
|
+
data: props.data,
|
|
2315
|
+
"row-key": props.rowKey,
|
|
2316
|
+
ref_key: "proTableRef",
|
|
2317
|
+
ref: proTableRef,
|
|
2318
|
+
width: width,
|
|
2319
|
+
height: height
|
|
2320
|
+
}, _ctx.$attrs, {
|
|
2321
|
+
fixed: ""
|
|
2322
|
+
}), null, 16, [
|
|
2323
|
+
"columns",
|
|
2324
|
+
"data",
|
|
2325
|
+
"row-key",
|
|
2326
|
+
"width",
|
|
2327
|
+
"height"
|
|
2328
|
+
]), [
|
|
2329
|
+
[
|
|
2330
|
+
_directive_loading,
|
|
2331
|
+
props.loading
|
|
2332
|
+
]
|
|
2333
|
+
])
|
|
2334
|
+
]),
|
|
2335
|
+
_: 1
|
|
2336
|
+
})
|
|
2337
|
+
])
|
|
2338
|
+
], 64);
|
|
1526
2339
|
};
|
|
1527
2340
|
}
|
|
1528
2341
|
});
|
|
1529
|
-
const
|
|
1530
|
-
|
|
1531
|
-
'__scopeId',
|
|
1532
|
-
"data-v-27b372ad"
|
|
1533
|
-
]
|
|
1534
|
-
]);
|
|
1535
|
-
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
2342
|
+
const composables_Table_exports_ = composables_Tablevue_type_script_setup_true_lang_tsx_name_Table;
|
|
2343
|
+
/* ESM default export */ const composables_Table = composables_Table_exports_;
|
|
1536
2344
|
// 接受父组件参数,配置默认值
|
|
1537
|
-
/* ESM default export */ const
|
|
2345
|
+
/* ESM default export */ const composables_TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1538
2346
|
__name: 'TableContainer',
|
|
1539
2347
|
props: {
|
|
1540
2348
|
model: {
|
|
@@ -1576,9 +2384,9 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
1576
2384
|
});
|
|
1577
2385
|
}
|
|
1578
2386
|
});
|
|
1579
|
-
const
|
|
1580
|
-
/* ESM default export */ const
|
|
1581
|
-
/* ESM default export */ const
|
|
2387
|
+
const composables_TableContainer_exports_ = composables_TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer;
|
|
2388
|
+
/* ESM default export */ const composables_TableContainer = composables_TableContainer_exports_;
|
|
2389
|
+
/* ESM default export */ const composables_Paginationvue_type_script_setup_true_lang_ts_name_Pagination = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1582
2390
|
__name: 'Pagination',
|
|
1583
2391
|
props: {
|
|
1584
2392
|
pageInfo: {},
|
|
@@ -1611,18 +2419,17 @@ const TableContainer_exports_ = TableContainervue_type_script_lang_ts_setup_true
|
|
|
1611
2419
|
]));
|
|
1612
2420
|
}
|
|
1613
2421
|
});
|
|
1614
|
-
const
|
|
1615
|
-
/* ESM default export */ const
|
|
1616
|
-
const
|
|
2422
|
+
const composables_Pagination_exports_ = composables_Paginationvue_type_script_setup_true_lang_ts_name_Pagination;
|
|
2423
|
+
/* ESM default export */ const composables_Pagination = composables_Pagination_exports_;
|
|
2424
|
+
const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_hoisted_1 = {
|
|
1617
2425
|
class: "relative flex flex-1 flex-col overflow-hidden"
|
|
1618
2426
|
};
|
|
1619
|
-
const
|
|
2427
|
+
const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_hoisted_2 = {
|
|
1620
2428
|
key: 1,
|
|
1621
2429
|
class: "mt-5 flex justify-between items-center"
|
|
1622
2430
|
};
|
|
1623
|
-
const
|
|
1624
|
-
|
|
1625
|
-
/* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
2431
|
+
const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION = 'selection'; // 接受父组件参数,配置默认值
|
|
2432
|
+
/* ESM default export */ const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1626
2433
|
__name: 'index',
|
|
1627
2434
|
props: {
|
|
1628
2435
|
columns: {
|
|
@@ -1704,38 +2511,26 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1704
2511
|
],
|
|
1705
2512
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
1706
2513
|
const props = __props;
|
|
2514
|
+
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
|
|
1707
2515
|
let state = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
1708
|
-
// 表格数据
|
|
1709
2516
|
tableData: props.data,
|
|
1710
2517
|
loading: false,
|
|
1711
|
-
// 分页数据
|
|
1712
2518
|
pageInfo: {
|
|
1713
|
-
// 当前页数
|
|
1714
2519
|
pageNumber: 1,
|
|
1715
|
-
// 每页显示条数
|
|
1716
2520
|
pageSize: 10,
|
|
1717
|
-
// 总条数
|
|
1718
2521
|
total: 0
|
|
1719
2522
|
}
|
|
1720
2523
|
});
|
|
1721
2524
|
const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
1722
|
-
const
|
|
1723
|
-
|
|
1724
|
-
'radio',
|
|
1725
|
-
'index',
|
|
1726
|
-
'expand',
|
|
1727
|
-
'sort'
|
|
1728
|
-
];
|
|
1729
|
-
const tableSettingButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); //表格设置
|
|
1730
|
-
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1731
|
-
// 生成组件唯一id
|
|
1732
|
-
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
|
|
1733
|
-
// 定义 emit 事件
|
|
2525
|
+
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // 生成组件唯一id
|
|
2526
|
+
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)()); // 定义 emit 事件
|
|
1734
2527
|
const emit = __emit;
|
|
1735
2528
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
1736
|
-
|
|
2529
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2530
|
+
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>tableRef.value?.proTableRef); /**
|
|
1737
2531
|
*获取参与排序的列表 索引 是否可以拖拽
|
|
1738
|
-
*/
|
|
2532
|
+
*/
|
|
2533
|
+
function getDragSortData(newIndex, data, startIndexObj, sortData) {
|
|
1739
2534
|
data.forEach((item, index)=>{
|
|
1740
2535
|
startIndexObj.startIndex += 1;
|
|
1741
2536
|
if (startIndexObj.startIndex > newIndex) return;
|
|
@@ -1747,10 +2542,10 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1747
2542
|
if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
|
|
1748
2543
|
});
|
|
1749
2544
|
return sortData;
|
|
1750
|
-
}
|
|
1751
|
-
/**
|
|
2545
|
+
} /**
|
|
1752
2546
|
* 获取拖拽排序数据结果
|
|
1753
|
-
*/
|
|
2547
|
+
*/
|
|
2548
|
+
function getSortableResult(newIndex, oldIndex) {
|
|
1754
2549
|
let data = [
|
|
1755
2550
|
...state.tableData
|
|
1756
2551
|
];
|
|
@@ -1781,11 +2576,12 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1781
2576
|
data.splice(newIndex, 0, removedItem);
|
|
1782
2577
|
}
|
|
1783
2578
|
return data;
|
|
1784
|
-
}
|
|
1785
|
-
/***
|
|
2579
|
+
} /***
|
|
1786
2580
|
* 表格拖拽排序
|
|
1787
|
-
**/
|
|
1788
|
-
|
|
2581
|
+
**/
|
|
2582
|
+
const initDragSort = ()=>{
|
|
2583
|
+
const tbodyList = document.querySelectorAll(`#${uuid.value} tbody`);
|
|
2584
|
+
const tbody = tbodyList[tbodyList.length - 1];
|
|
1789
2585
|
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
1790
2586
|
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
1791
2587
|
handle: '.cursor-move',
|
|
@@ -1795,14 +2591,12 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1795
2591
|
scrollSpeed: 10,
|
|
1796
2592
|
onEnd (evt) {
|
|
1797
2593
|
const { newIndex, oldIndex } = evt;
|
|
1798
|
-
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
1799
|
-
//获取拖动后的排序
|
|
2594
|
+
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return; //获取拖动后的排序
|
|
1800
2595
|
let data = getSortableResult(newIndex, oldIndex);
|
|
1801
2596
|
if (data.length) emit('drag-end', data);
|
|
1802
2597
|
else evt.from.innerHTML = initialHTML;
|
|
1803
2598
|
},
|
|
1804
2599
|
onStart (evt) {
|
|
1805
|
-
// 在拖拽开始时,记录当前容器的 HTML
|
|
1806
2600
|
initialHTML = evt.from.innerHTML;
|
|
1807
2601
|
}
|
|
1808
2602
|
});
|
|
@@ -1815,11 +2609,14 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1815
2609
|
let [, result] = await queryDbgridComponentByExample({
|
|
1816
2610
|
componentNo: props.componentNo || ''
|
|
1817
2611
|
});
|
|
1818
|
-
if (result?.success)
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
2612
|
+
if (result?.success) {
|
|
2613
|
+
exportFileFlag.value = result.data.exportFileFlag;
|
|
2614
|
+
try {
|
|
2615
|
+
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
2616
|
+
serveColumns.value = column;
|
|
2617
|
+
} catch (error) {
|
|
2618
|
+
console.log(error);
|
|
2619
|
+
}
|
|
1823
2620
|
}
|
|
1824
2621
|
}
|
|
1825
2622
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.componentNo, ()=>{
|
|
@@ -1828,50 +2625,45 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1828
2625
|
immediate: true
|
|
1829
2626
|
});
|
|
1830
2627
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
1831
|
-
// 支持拖拽排序
|
|
1832
2628
|
if (props.draggable) (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
1833
2629
|
initDragSort();
|
|
1834
2630
|
});
|
|
1835
2631
|
if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
|
|
1836
|
-
});
|
|
1837
|
-
/**
|
|
2632
|
+
}); /**
|
|
1838
2633
|
* 获取列表
|
|
1839
|
-
*/
|
|
2634
|
+
*/
|
|
2635
|
+
async function fetchList() {
|
|
1840
2636
|
state.loading = true;
|
|
1841
2637
|
let { total = 0, data = [] } = await (props.fetchData && props.fetchData(state.pageInfo)) || {};
|
|
1842
2638
|
state.pageInfo.total = Number(total);
|
|
1843
2639
|
state.tableData = data;
|
|
1844
2640
|
state.loading = false;
|
|
1845
|
-
}
|
|
1846
|
-
/**
|
|
2641
|
+
} /**
|
|
1847
2642
|
* 分页组件改变 pageNumber 事件
|
|
1848
|
-
*/
|
|
2643
|
+
*/
|
|
2644
|
+
const handleSizeChange = (val)=>{
|
|
1849
2645
|
if (props.fetchData) {
|
|
1850
2646
|
state.pageInfo.pageNumber = 1;
|
|
1851
2647
|
state.pageInfo.pageSize = val;
|
|
1852
2648
|
fetchList();
|
|
1853
2649
|
} else emit('size-page-change', val);
|
|
1854
|
-
};
|
|
1855
|
-
/**
|
|
2650
|
+
}; /**
|
|
1856
2651
|
* 分页组件改变 当前页数 事件
|
|
1857
|
-
*/
|
|
2652
|
+
*/
|
|
2653
|
+
function changeCurrentPage(val) {
|
|
1858
2654
|
if (props.fetchData) {
|
|
1859
2655
|
state.pageInfo.pageNumber = val;
|
|
1860
2656
|
fetchList();
|
|
1861
2657
|
} else emit('current-page-change', val);
|
|
1862
2658
|
}
|
|
1863
|
-
|
|
1864
|
-
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1865
|
-
const selections = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1866
|
-
// 设置当前行激活态
|
|
2659
|
+
const selections = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // 设置当前行激活态
|
|
1867
2660
|
const setCurrentRow = (row)=>{
|
|
1868
2661
|
if (proTableRef.value) proTableRef.value.setCurrentRow(row);
|
|
1869
|
-
};
|
|
1870
|
-
|
|
1871
|
-
const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo);
|
|
1872
|
-
/**
|
|
2662
|
+
}; // 分页配置信息
|
|
2663
|
+
const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo); /**
|
|
1873
2664
|
* 支持根据传递的filterObj完成过滤
|
|
1874
|
-
*/
|
|
2665
|
+
*/
|
|
2666
|
+
const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1875
2667
|
if (Object.keys(props.filterObj).length) return [
|
|
1876
2668
|
...state.tableData
|
|
1877
2669
|
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
@@ -1900,7 +2692,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1900
2692
|
}
|
|
1901
2693
|
}),
|
|
1902
2694
|
validateRow: (index, callback)=>{
|
|
1903
|
-
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${item.
|
|
2695
|
+
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${String(item.dataKey)}`);
|
|
1904
2696
|
return formRef.value.validateField(validateProps, callback);
|
|
1905
2697
|
},
|
|
1906
2698
|
fetchList: (init = true, initPageInfo = {
|
|
@@ -1912,58 +2704,104 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1912
2704
|
};
|
|
1913
2705
|
fetchList();
|
|
1914
2706
|
}
|
|
1915
|
-
});
|
|
1916
|
-
/**
|
|
2707
|
+
}); /**
|
|
1917
2708
|
* 处理接口和本地的columns
|
|
1918
|
-
*/
|
|
2709
|
+
*/
|
|
2710
|
+
const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1919
2711
|
if (!props.componentNo) return props.columns;
|
|
1920
2712
|
{
|
|
1921
2713
|
let result = [
|
|
1922
2714
|
...props.columns
|
|
1923
2715
|
].map((cur)=>({
|
|
1924
|
-
displayFlag: cur.
|
|
2716
|
+
displayFlag: cur.hidden || 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,
|
|
2717
|
+
align: cur.align || 'center',
|
|
1925
2718
|
...cur
|
|
1926
2719
|
}));
|
|
1927
2720
|
if (serveColumns.value?.length) {
|
|
1928
2721
|
result = result.map((item, index)=>{
|
|
1929
|
-
let findObj = serveColumns.value.find((cur)=>cur.prop === item.
|
|
2722
|
+
let findObj = serveColumns.value.find((cur)=>cur.prop === item.dataKey);
|
|
1930
2723
|
return {
|
|
1931
|
-
displayFlag: item.
|
|
2724
|
+
displayFlag: item.hidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
1932
2725
|
...item,
|
|
1933
2726
|
sort: index + 1,
|
|
1934
2727
|
...findObj,
|
|
1935
|
-
|
|
1936
|
-
|
|
2728
|
+
title: item.title || findObj.label,
|
|
2729
|
+
hidden: item.hidden || findObj?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
1937
2730
|
};
|
|
1938
2731
|
});
|
|
1939
2732
|
result.sort((a, b)=>Number(a.sort) - Number(b.sort));
|
|
1940
2733
|
}
|
|
1941
|
-
return result
|
|
2734
|
+
return result.map((item)=>({
|
|
2735
|
+
...item,
|
|
2736
|
+
label: item.title,
|
|
2737
|
+
prop: item.dataKey,
|
|
2738
|
+
minWidth: item.minWidth || item.width,
|
|
2739
|
+
width: void 0
|
|
2740
|
+
}));
|
|
1942
2741
|
}
|
|
1943
2742
|
});
|
|
1944
|
-
|
|
2743
|
+
function SelectionCell({ value, intermediate, onChange }) {
|
|
2744
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElCheckbox, {
|
|
2745
|
+
onChange: onChange,
|
|
2746
|
+
modelValue: value,
|
|
2747
|
+
indeterminate: intermediate
|
|
2748
|
+
}, null, 8, [
|
|
2749
|
+
"onChange",
|
|
2750
|
+
"modelValue",
|
|
2751
|
+
"indeterminate"
|
|
2752
|
+
]);
|
|
2753
|
+
} /**
|
|
1945
2754
|
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
1946
|
-
*/
|
|
2755
|
+
*/
|
|
2756
|
+
const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1947
2757
|
let result = [
|
|
1948
2758
|
...commonColumns.value
|
|
1949
2759
|
];
|
|
1950
2760
|
if (props.componentNo) {
|
|
1951
2761
|
result = result.map((item, index)=>({
|
|
1952
2762
|
...item,
|
|
2763
|
+
width: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth,
|
|
1953
2764
|
minWidth: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth
|
|
1954
2765
|
}));
|
|
1955
|
-
if (
|
|
2766
|
+
if (exportFileFlag.value && !result.find((cur)=>cur.key === pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION)) result = [
|
|
1956
2767
|
{
|
|
1957
|
-
|
|
1958
|
-
|
|
2768
|
+
key: pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION,
|
|
2769
|
+
width: 100,
|
|
2770
|
+
align: 'center',
|
|
2771
|
+
cellRenderer: ({ rowData })=>{
|
|
2772
|
+
const onChange = (value)=>rowData.checked = value;
|
|
2773
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(SelectionCell, {
|
|
2774
|
+
value: rowData.checked,
|
|
2775
|
+
onChange: onChange
|
|
2776
|
+
}, null, 8, [
|
|
2777
|
+
"value",
|
|
2778
|
+
"onChange"
|
|
2779
|
+
]);
|
|
2780
|
+
},
|
|
2781
|
+
headerCellRenderer: ()=>{
|
|
2782
|
+
const onChange = (value)=>state.tableData = state.tableData.map((row)=>{
|
|
2783
|
+
row.checked = value;
|
|
2784
|
+
return row;
|
|
2785
|
+
});
|
|
2786
|
+
const allSelected = !!state.tableData.length && state.tableData.every((row)=>row.checked);
|
|
2787
|
+
const containsChecked = state.tableData.some((row)=>row.checked);
|
|
2788
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(SelectionCell, {
|
|
2789
|
+
value: allSelected,
|
|
2790
|
+
intermediate: containsChecked && !allSelected,
|
|
2791
|
+
onChange: onChange
|
|
2792
|
+
}, null, 8, [
|
|
2793
|
+
"value",
|
|
2794
|
+
"intermediate",
|
|
2795
|
+
"onChange"
|
|
2796
|
+
]);
|
|
2797
|
+
}
|
|
1959
2798
|
},
|
|
1960
2799
|
...result
|
|
1961
2800
|
];
|
|
1962
2801
|
}
|
|
1963
2802
|
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
1964
2803
|
});
|
|
1965
|
-
|
|
1966
|
-
return (_ctx, _cache)=>((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, [
|
|
2804
|
+
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_hoisted_1, [
|
|
1967
2805
|
props?.draggable || props?.isShowDragTips ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
1968
2806
|
key: 0,
|
|
1969
2807
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
@@ -1976,7 +2814,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1976
2814
|
props.dragTipsClassName
|
|
1977
2815
|
])
|
|
1978
2816
|
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(props.dragTips), 7)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
1979
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(
|
|
2817
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(composables_TableContainer, {
|
|
1980
2818
|
ref_key: "formRef",
|
|
1981
2819
|
ref: formRef,
|
|
1982
2820
|
editable: _ctx.editable,
|
|
@@ -1984,116 +2822,42 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1984
2822
|
class: "flex flex-1 flex-col overflow-hidden"
|
|
1985
2823
|
}, {
|
|
1986
2824
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
"
|
|
2825
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(composables_Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2826
|
+
id: uuid.value,
|
|
2827
|
+
"export-file-flag": exportFileFlag.value,
|
|
1990
2828
|
"component-no": props.componentNo,
|
|
1991
2829
|
"columns-setting": props.columnsSetting,
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
}, null, 8, [
|
|
1997
|
-
"table-data",
|
|
1998
|
-
"component-no",
|
|
1999
|
-
"columns-setting",
|
|
2000
|
-
"columns"
|
|
2001
|
-
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
2002
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTable), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2003
|
-
id: uuid.value,
|
|
2004
|
-
ref_key: "proTableRef",
|
|
2005
|
-
ref: proTableRef,
|
|
2830
|
+
loading: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading,
|
|
2831
|
+
onSuccess: fetchDbgridComponent,
|
|
2832
|
+
ref_key: "tableRef",
|
|
2833
|
+
ref: tableRef,
|
|
2006
2834
|
data: tableData.value,
|
|
2007
|
-
style: {
|
|
2008
|
-
width: "100%"
|
|
2009
|
-
},
|
|
2010
|
-
class: "min-h-0 flex-1 overflow-auto",
|
|
2011
2835
|
"row-key": props.rowKey,
|
|
2012
|
-
"
|
|
2013
|
-
|
|
2014
|
-
}, _ctx.$attrs
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
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)({
|
|
2018
|
-
key: 0,
|
|
2019
|
-
ref_for: true
|
|
2020
|
-
}, item, {
|
|
2021
|
-
width: item.minWidth || item.width,
|
|
2022
|
-
key: item.prop ?? index,
|
|
2023
|
-
align: item.align ?? 'center',
|
|
2024
|
-
"reserve-selection": 'selection' == item.type
|
|
2025
|
-
}), {
|
|
2026
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)((scope)=>[
|
|
2027
|
-
'expand' == item.type ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
2028
|
-
key: 0
|
|
2029
|
-
}, [
|
|
2030
|
-
item.render ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(item.render(scope.row, scope.$index, scope.expanded)), {
|
|
2031
|
-
key: 0
|
|
2032
|
-
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, item.type, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2033
|
-
key: 1,
|
|
2034
|
-
ref_for: true
|
|
2035
|
-
}, scope))
|
|
2036
|
-
], 64)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
2037
|
-
'sort' == 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__.ElTag), {
|
|
2038
|
-
key: 1,
|
|
2039
|
-
class: "move"
|
|
2040
|
-
}, {
|
|
2041
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2042
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
|
|
2043
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2044
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.DCaret))
|
|
2045
|
-
]),
|
|
2046
|
-
_: 1
|
|
2047
|
-
})
|
|
2048
|
-
]),
|
|
2049
|
-
_: 1
|
|
2050
|
-
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
2051
|
-
]),
|
|
2052
|
-
_: 2
|
|
2053
|
-
}, 1040, [
|
|
2054
|
-
"width",
|
|
2055
|
-
"align",
|
|
2056
|
-
"reserve-selection"
|
|
2057
|
-
])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(composables_TableColumn), {
|
|
2058
|
-
key: 1,
|
|
2059
|
-
column: item
|
|
2060
|
-
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
2061
|
-
_: 2
|
|
2062
|
-
}, [
|
|
2063
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(Object.keys(_ctx.$slots), (slot)=>({
|
|
2064
|
-
name: slot,
|
|
2065
|
-
fn: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)((scope)=>[
|
|
2066
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, slot, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2067
|
-
ref_for: true
|
|
2068
|
-
}, scope))
|
|
2069
|
-
])
|
|
2070
|
-
}))
|
|
2071
|
-
]), 1032, [
|
|
2072
|
-
"column"
|
|
2073
|
-
]))
|
|
2074
|
-
], 64))), 256))
|
|
2075
|
-
]),
|
|
2076
|
-
_: 3
|
|
2077
|
-
}, 16, [
|
|
2836
|
+
"common-columns": commonColumns.value,
|
|
2837
|
+
"table-columns": tableColumns.value
|
|
2838
|
+
}, _ctx.$attrs, {
|
|
2839
|
+
draggable: props.draggable
|
|
2840
|
+
}), null, 16, [
|
|
2078
2841
|
"id",
|
|
2842
|
+
"export-file-flag",
|
|
2843
|
+
"component-no",
|
|
2844
|
+
"columns-setting",
|
|
2845
|
+
"loading",
|
|
2079
2846
|
"data",
|
|
2080
2847
|
"row-key",
|
|
2081
|
-
"
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.vLoading),
|
|
2085
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading
|
|
2086
|
-
]
|
|
2848
|
+
"common-columns",
|
|
2849
|
+
"table-columns",
|
|
2850
|
+
"draggable"
|
|
2087
2851
|
])
|
|
2088
2852
|
]),
|
|
2089
|
-
_:
|
|
2853
|
+
_: 1
|
|
2090
2854
|
}, 8, [
|
|
2091
2855
|
"editable",
|
|
2092
2856
|
"model"
|
|
2093
2857
|
]),
|
|
2094
|
-
props.pagination ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div",
|
|
2858
|
+
props.pagination ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_hoisted_2, [
|
|
2095
2859
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "pagination"),
|
|
2096
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(
|
|
2860
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(composables_Pagination, {
|
|
2097
2861
|
class: "w-full flex justify-end",
|
|
2098
2862
|
layout: props.layout,
|
|
2099
2863
|
"page-info": paginationInfo.value,
|
|
@@ -2109,8 +2873,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
2109
2873
|
]));
|
|
2110
2874
|
}
|
|
2111
2875
|
});
|
|
2112
|
-
const
|
|
2113
|
-
/* ESM default export */ const
|
|
2876
|
+
const pro_table_v2_exports_ = pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable;
|
|
2877
|
+
/* ESM default export */ const pro_table_v2 = pro_table_v2_exports_;
|
|
2114
2878
|
/**
|
|
2115
2879
|
* 1-10115-1 根据条件查询菜单的检索方式列表(业务态)
|
|
2116
2880
|
* @param params
|
|
@@ -2119,7 +2883,7 @@ const pro_table_exports_ = pro_tablevue_type_script_lang_ts_setup_true_name_ProT
|
|
|
2119
2883
|
const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)("/bizsearch/queryBizDataListByExample", {
|
|
2120
2884
|
...params,
|
|
2121
2885
|
pageSize: 100,
|
|
2122
|
-
|
|
2886
|
+
pageNumber: 1
|
|
2123
2887
|
});
|
|
2124
2888
|
/**
|
|
2125
2889
|
* [4-10073-1] 根据业务标识获取Banner数据
|
|
@@ -3066,7 +3830,7 @@ const _hoisted_10 = {
|
|
|
3066
3830
|
class: "mr-2"
|
|
3067
3831
|
};
|
|
3068
3832
|
const _hoisted_11 = {
|
|
3069
|
-
class: "text-[#
|
|
3833
|
+
class: "text-[#555]"
|
|
3070
3834
|
};
|
|
3071
3835
|
const _hoisted_12 = {
|
|
3072
3836
|
class: "w-full"
|
|
@@ -3132,10 +3896,11 @@ const _hoisted_12 = {
|
|
|
3132
3896
|
return (_ctx, _cache)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
3133
3897
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
3134
3898
|
{
|
|
3135
|
-
['bg-
|
|
3899
|
+
['bg-fill-lighter']: _ctx.isBg
|
|
3136
3900
|
},
|
|
3137
3901
|
"flex px-[10px] py-2 text-base text-black items-center"
|
|
3138
|
-
])
|
|
3902
|
+
]),
|
|
3903
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(_ctx.isBg ? "border-top: 1px solid #dfebff" : '')
|
|
3139
3904
|
}, [
|
|
3140
3905
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1, [
|
|
3141
3906
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2, [
|
|
@@ -3222,7 +3987,7 @@ const _hoisted_12 = {
|
|
|
3222
3987
|
], 32)
|
|
3223
3988
|
], 2))), 128))
|
|
3224
3989
|
], 2)
|
|
3225
|
-
],
|
|
3990
|
+
], 6)), [
|
|
3226
3991
|
[
|
|
3227
3992
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.vLoading),
|
|
3228
3993
|
loading.value
|
|
@@ -4252,6 +5017,8 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
4252
5017
|
dataSearchBizIdTypeCode: props.dataSearchBizIdTypeCode || '',
|
|
4253
5018
|
keyWord: value,
|
|
4254
5019
|
sysMenuId: menuId || '',
|
|
5020
|
+
pageNumber: 1,
|
|
5021
|
+
pageSize: 100,
|
|
4255
5022
|
hospitalId: currentOrg?.orgId || '',
|
|
4256
5023
|
...params
|
|
4257
5024
|
});
|
|
@@ -4311,7 +5078,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
4311
5078
|
const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_selectvue_type_script_setup_true_lang_ts, [
|
|
4312
5079
|
[
|
|
4313
5080
|
'__scopeId',
|
|
4314
|
-
"data-v-
|
|
5081
|
+
"data-v-04804e6c"
|
|
4315
5082
|
]
|
|
4316
5083
|
]);
|
|
4317
5084
|
/* ESM default export */ const dict_select = dict_select_exports_;
|
|
@@ -5251,13 +6018,13 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
5251
6018
|
};
|
|
5252
6019
|
}
|
|
5253
6020
|
});
|
|
5254
|
-
const
|
|
6021
|
+
const form_design_render_composables_Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_script_setup_true_lang_tsx, [
|
|
5255
6022
|
[
|
|
5256
6023
|
'__scopeId',
|
|
5257
6024
|
"data-v-7c43a384"
|
|
5258
6025
|
]
|
|
5259
6026
|
]);
|
|
5260
|
-
/* ESM default export */ const
|
|
6027
|
+
/* ESM default export */ const form_design_render_composables_Table = form_design_render_composables_Table_exports_;
|
|
5261
6028
|
/* ESM default export */ const Setvue_type_script_setup_true_lang_tsx_name_Set = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
5262
6029
|
__name: 'Set',
|
|
5263
6030
|
props: {
|
|
@@ -5421,7 +6188,7 @@ const Other_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Othervue_type_
|
|
|
5421
6188
|
const dynamicRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(null);
|
|
5422
6189
|
const components = {
|
|
5423
6190
|
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.COLLAPSE]: Collapse,
|
|
5424
|
-
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.TABLE]:
|
|
6191
|
+
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.TABLE]: form_design_render_composables_Table,
|
|
5425
6192
|
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.SET]: Set
|
|
5426
6193
|
};
|
|
5427
6194
|
__expose({
|
|
@@ -6255,4 +7022,4 @@ const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_4 = {
|
|
|
6255
7022
|
const invoice_exports_ = invoicevue_type_script_setup_true_lang_ts_name_proInvoice;
|
|
6256
7023
|
/* ESM default export */ const invoice = invoice_exports_;
|
|
6257
7024
|
var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
|
|
6258
|
-
export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, Title, convertToSpellNo, convertToWbNo, print, usePrintReceipt, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|
|
7025
|
+
export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, Title, convertToSpellNo, convertToWbNo, print, usePrintReceipt, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|