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/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_element_sun__ from "element-sun";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_sortablejs__ from "sortablejs";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__ from "@element-sun/icons-vue";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__ from "@sun-toolkit/enums";
|
|
6
5
|
import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__ from "@sun-toolkit/request";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__ from "@sun-toolkit/enums";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__ from "@sun-toolkit/shared";
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__ from "@sun-toolkit/micro-app";
|
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
|
|
@@ -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
|
|
@@ -457,7 +529,7 @@ function useFetchDataset(codeSystemCodes, enabledFlag) {
|
|
|
457
529
|
* @param params
|
|
458
530
|
* @returns
|
|
459
531
|
*/ const exportData2File = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/untils/exportData2File', params);
|
|
460
|
-
|
|
532
|
+
// 定义 CheckboxValueType 类型
|
|
461
533
|
function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
462
534
|
const changeSort = debounce(changeInputSort, 1200);
|
|
463
535
|
return [
|
|
@@ -483,7 +555,6 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
483
555
|
'false-value': 0,
|
|
484
556
|
size: 'small',
|
|
485
557
|
modelValue: row.displayFlag,
|
|
486
|
-
disabled: row.type === SELECTION,
|
|
487
558
|
'onUpdate:modelValue': (value)=>row.displayFlag = value
|
|
488
559
|
})
|
|
489
560
|
},
|
|
@@ -494,8 +565,8 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
494
565
|
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInputNumber, {
|
|
495
566
|
maxLength: 16,
|
|
496
567
|
'controls-position': 'right',
|
|
568
|
+
min: 0,
|
|
497
569
|
modelValue: row.minWidth,
|
|
498
|
-
disabled: row.type === SELECTION,
|
|
499
570
|
'onUpdate:modelValue': (value)=>row.minWidth = value,
|
|
500
571
|
size: 'small',
|
|
501
572
|
placeholder: '请输入列宽 (最小值)'
|
|
@@ -510,7 +581,7 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
510
581
|
min: 0,
|
|
511
582
|
'controls-position': 'right',
|
|
512
583
|
modelValue: row.sort,
|
|
513
|
-
disabled: disabledDraggable.value
|
|
584
|
+
disabled: disabledDraggable.value,
|
|
514
585
|
'onUpdate:modelValue': (value)=>row.sort = value,
|
|
515
586
|
onInput: (sort)=>{
|
|
516
587
|
changeSort(index, sort);
|
|
@@ -716,20 +787,22 @@ const _hoisted_2 = {
|
|
|
716
787
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
717
788
|
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
718
789
|
const dialogRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
790
|
+
const confirmBtnRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
791
|
+
const cancelBtnRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
719
792
|
const emits = __emit;
|
|
720
793
|
// 纯关闭弹窗,不执行其他操作,用于左上角X
|
|
721
794
|
const justCloseDialog = ()=>{
|
|
722
795
|
closeDialog();
|
|
723
|
-
emits(
|
|
796
|
+
emits("close");
|
|
724
797
|
};
|
|
725
798
|
// 处理常规关闭,支持before-close钩子
|
|
726
799
|
const handleClose = ()=>{
|
|
727
|
-
if (attrs?.[
|
|
800
|
+
if (attrs?.["before-close"]) (attrs?.["before-close"])(closeDialog);
|
|
728
801
|
else closeDialog();
|
|
729
802
|
};
|
|
730
803
|
// 处理取消按钮点击
|
|
731
804
|
const handleCancel = ()=>{
|
|
732
|
-
emits(
|
|
805
|
+
emits("cancel");
|
|
733
806
|
if (__props.closeOnCancel) handleClose();
|
|
734
807
|
};
|
|
735
808
|
const handleConfirm = async ()=>{
|
|
@@ -740,7 +813,7 @@ const _hoisted_2 = {
|
|
|
740
813
|
loading.value = false;
|
|
741
814
|
if (!err) {
|
|
742
815
|
handleClose();
|
|
743
|
-
emits(
|
|
816
|
+
emits("success");
|
|
744
817
|
}
|
|
745
818
|
} catch {
|
|
746
819
|
loading.value = false;
|
|
@@ -748,13 +821,15 @@ const _hoisted_2 = {
|
|
|
748
821
|
}
|
|
749
822
|
};
|
|
750
823
|
const changeScreen = async (flag)=>{
|
|
751
|
-
emits(
|
|
824
|
+
emits("changeScreen", flag);
|
|
752
825
|
};
|
|
753
826
|
__expose({
|
|
754
827
|
ref: dialogRef,
|
|
755
828
|
open: openDialog,
|
|
756
829
|
close: closeDialog,
|
|
757
|
-
visible
|
|
830
|
+
visible,
|
|
831
|
+
confirmBtnRef,
|
|
832
|
+
cancelBtnRef
|
|
758
833
|
});
|
|
759
834
|
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
760
835
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElDialog), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
@@ -810,19 +885,29 @@ const _hoisted_2 = {
|
|
|
810
885
|
key: 1
|
|
811
886
|
}) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", _hoisted_2, [
|
|
812
887
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
813
|
-
onClick: handleCancel
|
|
888
|
+
onClick: handleCancel,
|
|
889
|
+
ref_key: "cancelBtnRef",
|
|
890
|
+
ref: cancelBtnRef,
|
|
891
|
+
onKeydown: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withKeys)(handleCancel, [
|
|
892
|
+
"enter"
|
|
893
|
+
])
|
|
814
894
|
}, {
|
|
815
895
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[3] || (_cache[3] = [
|
|
816
896
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
817
897
|
])),
|
|
818
898
|
_: 1
|
|
819
|
-
}),
|
|
899
|
+
}, 512),
|
|
820
900
|
_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), {
|
|
821
901
|
key: 0,
|
|
902
|
+
ref_key: "confirmBtnRef",
|
|
903
|
+
ref: confirmBtnRef,
|
|
822
904
|
loading: loading.value,
|
|
823
905
|
type: "primary",
|
|
824
906
|
disabled: _ctx.confirmDisabled,
|
|
825
|
-
onClick: handleConfirm
|
|
907
|
+
onClick: handleConfirm,
|
|
908
|
+
onKeydown: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withKeys)(handleConfirm, [
|
|
909
|
+
"enter"
|
|
910
|
+
])
|
|
826
911
|
}, {
|
|
827
912
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[4] || (_cache[4] = [
|
|
828
913
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
|
|
@@ -850,7 +935,7 @@ const _hoisted_2 = {
|
|
|
850
935
|
onClick: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(openDialog)
|
|
851
936
|
}, {
|
|
852
937
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
853
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(__WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.[
|
|
938
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(__WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.["button-text"]), 1)
|
|
854
939
|
]),
|
|
855
940
|
_: 1
|
|
856
941
|
}, 8, [
|
|
@@ -906,7 +991,9 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
906
991
|
]);
|
|
907
992
|
const isAdmin = userInfo?.adminFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES || userInfo?.userJobCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG_STR.NO;
|
|
908
993
|
const componentId = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
|
|
909
|
-
const fullscreen = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(
|
|
994
|
+
const fullscreen = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
|
|
995
|
+
const confirmLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
996
|
+
const applicationLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
910
997
|
const props = __props;
|
|
911
998
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
912
999
|
dialogRef.value.open();
|
|
@@ -926,7 +1013,6 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
926
1013
|
const influenceScopeCode = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PUBLIC);
|
|
927
1014
|
const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
928
1015
|
const sourceData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
929
|
-
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
|
|
930
1016
|
const disabledDraggable = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>!props.columnsSetting?.draggable);
|
|
931
1017
|
function initColumns() {
|
|
932
1018
|
sourceData.value = props.columns.map((item, index)=>({
|
|
@@ -972,7 +1058,6 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
972
1058
|
if (result?.data?.length) {
|
|
973
1059
|
componentId.value = result.data[0].componentId || '';
|
|
974
1060
|
serveDbgridComponentSettingList.value = result.data[0].dbgridComponentSettingList || [];
|
|
975
|
-
exportFileFlag.value = result.data[0].exportFileFlag;
|
|
976
1061
|
if (serveDbgridComponentSettingList.value.length) {
|
|
977
1062
|
if (!isAdmin) {
|
|
978
1063
|
influenceScopeCode.value = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE;
|
|
@@ -1042,7 +1127,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1042
1127
|
return item;
|
|
1043
1128
|
});
|
|
1044
1129
|
}
|
|
1045
|
-
function submit() {
|
|
1130
|
+
function submit(isSave) {
|
|
1046
1131
|
return new Promise((resolve, reject)=>{
|
|
1047
1132
|
if (influenceScopeCode.value === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INFLUENCE_SCOPE_CODE.PRiVATE && !bizId.value) {
|
|
1048
1133
|
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('请选择操作员');
|
|
@@ -1091,7 +1176,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1091
1176
|
}).then((result)=>{
|
|
1092
1177
|
let [, data] = result;
|
|
1093
1178
|
if (data?.success) {
|
|
1094
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success('保存成功');
|
|
1179
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(isSave ? '保存成功' : '应用成功');
|
|
1095
1180
|
resolve([]);
|
|
1096
1181
|
} else reject([
|
|
1097
1182
|
'',
|
|
@@ -1106,8 +1191,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1106
1191
|
});
|
|
1107
1192
|
}
|
|
1108
1193
|
__expose({
|
|
1109
|
-
dialogRef
|
|
1110
|
-
exportFileFlag
|
|
1194
|
+
dialogRef
|
|
1111
1195
|
}); /**
|
|
1112
1196
|
* 左右滚动
|
|
1113
1197
|
*/
|
|
@@ -1141,17 +1225,25 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1141
1225
|
function changeScreen(flag) {
|
|
1142
1226
|
fullscreen.value = flag;
|
|
1143
1227
|
}
|
|
1144
|
-
function
|
|
1145
|
-
|
|
1146
|
-
|
|
1228
|
+
function handleCancel() {
|
|
1229
|
+
dialogRef.value.close();
|
|
1230
|
+
}
|
|
1231
|
+
async function handleConfirm(isSave = true) {
|
|
1232
|
+
const loadingRef = isSave ? confirmLoading : applicationLoading;
|
|
1233
|
+
loadingRef.value = true;
|
|
1234
|
+
try {
|
|
1235
|
+
const [err] = await submit(isSave);
|
|
1236
|
+
loadingRef.value = false;
|
|
1237
|
+
if (!err) {
|
|
1238
|
+
if (isSave) handleCancel();
|
|
1239
|
+
props.success();
|
|
1240
|
+
}
|
|
1241
|
+
} catch {
|
|
1242
|
+
loadingRef.value = false;
|
|
1243
|
+
}
|
|
1147
1244
|
}
|
|
1148
1245
|
return (_ctx, _cache)=>renderDialog.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(pro_dialog, {
|
|
1149
1246
|
key: 0,
|
|
1150
|
-
"confirm-fn": submit,
|
|
1151
|
-
onSuccess: props.success,
|
|
1152
|
-
onClosed: _cache[4] || (_cache[4] = ()=>{
|
|
1153
|
-
onClose();
|
|
1154
|
-
}),
|
|
1155
1247
|
"destroy-on-close": true,
|
|
1156
1248
|
width: 1000,
|
|
1157
1249
|
fullscreen: fullscreen.value,
|
|
@@ -1162,6 +1254,49 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1162
1254
|
"button-class": "mr-5",
|
|
1163
1255
|
title: "数据窗口组件"
|
|
1164
1256
|
}, {
|
|
1257
|
+
footer: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1258
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
1259
|
+
onClick: handleCancel
|
|
1260
|
+
}, {
|
|
1261
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[7] || (_cache[7] = [
|
|
1262
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
|
|
1263
|
+
])),
|
|
1264
|
+
_: 1
|
|
1265
|
+
}),
|
|
1266
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
1267
|
+
type: "primary",
|
|
1268
|
+
loading: applicationLoading.value,
|
|
1269
|
+
disabled: applicationLoading.value,
|
|
1270
|
+
plain: "",
|
|
1271
|
+
onClick: _cache[4] || (_cache[4] = ()=>{
|
|
1272
|
+
handleConfirm(false);
|
|
1273
|
+
})
|
|
1274
|
+
}, {
|
|
1275
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[8] || (_cache[8] = [
|
|
1276
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("应用")
|
|
1277
|
+
])),
|
|
1278
|
+
_: 1
|
|
1279
|
+
}, 8, [
|
|
1280
|
+
"loading",
|
|
1281
|
+
"disabled"
|
|
1282
|
+
]),
|
|
1283
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
|
|
1284
|
+
loading: confirmLoading.value,
|
|
1285
|
+
type: "primary",
|
|
1286
|
+
disabled: confirmLoading.value,
|
|
1287
|
+
onClick: _cache[5] || (_cache[5] = ()=>{
|
|
1288
|
+
handleConfirm(true);
|
|
1289
|
+
})
|
|
1290
|
+
}, {
|
|
1291
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[9] || (_cache[9] = [
|
|
1292
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
|
|
1293
|
+
])),
|
|
1294
|
+
_: 1
|
|
1295
|
+
}, 8, [
|
|
1296
|
+
"loading",
|
|
1297
|
+
"disabled"
|
|
1298
|
+
])
|
|
1299
|
+
]),
|
|
1165
1300
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1166
1301
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
1167
1302
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
@@ -1178,6 +1313,11 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1178
1313
|
}),
|
|
1179
1314
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", null, [
|
|
1180
1315
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(pro_table, {
|
|
1316
|
+
disabled: "",
|
|
1317
|
+
"columns-setting": {
|
|
1318
|
+
disabled: true
|
|
1319
|
+
},
|
|
1320
|
+
"component-no": props.componentNo,
|
|
1181
1321
|
ref_key: "tableRef",
|
|
1182
1322
|
ref: tableRef,
|
|
1183
1323
|
columns: tableColumn.value,
|
|
@@ -1187,12 +1327,13 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1187
1327
|
{}
|
|
1188
1328
|
]
|
|
1189
1329
|
}, null, 8, [
|
|
1330
|
+
"component-no",
|
|
1190
1331
|
"columns"
|
|
1191
1332
|
])
|
|
1192
1333
|
]),
|
|
1193
1334
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", dbgrid_component_settingvue_type_script_setup_true_lang_tsx_hoisted_2, [
|
|
1194
1335
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", null, [
|
|
1195
|
-
_cache[
|
|
1336
|
+
_cache[6] || (_cache[6] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("span", null, "影响范围", -1)),
|
|
1196
1337
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElSelect), {
|
|
1197
1338
|
disabled: !(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(isAdmin),
|
|
1198
1339
|
class: "ml-6 w-60",
|
|
@@ -1255,7 +1396,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1255
1396
|
modelValue: scrollKeyWord.value,
|
|
1256
1397
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event)=>scrollKeyWord.value = $event),
|
|
1257
1398
|
placeholder: "\n 选择后可自动定位到对应的属性\n ",
|
|
1258
|
-
class: "w-
|
|
1399
|
+
class: "w-64"
|
|
1259
1400
|
}, {
|
|
1260
1401
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1261
1402
|
((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), {
|
|
@@ -1297,7 +1438,6 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1297
1438
|
]),
|
|
1298
1439
|
_: 1
|
|
1299
1440
|
}, 8, [
|
|
1300
|
-
"onSuccess",
|
|
1301
1441
|
"fullscreen"
|
|
1302
1442
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true);
|
|
1303
1443
|
}
|
|
@@ -1305,7 +1445,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1305
1445
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1306
1446
|
[
|
|
1307
1447
|
'__scopeId',
|
|
1308
|
-
"data-v-
|
|
1448
|
+
"data-v-20489fe7"
|
|
1309
1449
|
]
|
|
1310
1450
|
]);
|
|
1311
1451
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -1349,13 +1489,13 @@ const EXPORT_FILE = 'export-file';
|
|
|
1349
1489
|
tableData: {},
|
|
1350
1490
|
columns: {},
|
|
1351
1491
|
componentNo: {},
|
|
1352
|
-
columnsSetting: {}
|
|
1492
|
+
columnsSetting: {},
|
|
1493
|
+
exportFileFlag: {}
|
|
1353
1494
|
},
|
|
1354
1495
|
emits: [
|
|
1355
1496
|
'success'
|
|
1356
1497
|
],
|
|
1357
|
-
setup (__props, {
|
|
1358
|
-
const columnsSettingRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1498
|
+
setup (__props, { emit: __emit }) {
|
|
1359
1499
|
const dataSetList = useFetchDataset([
|
|
1360
1500
|
FILE_TYPE_CODE
|
|
1361
1501
|
]);
|
|
@@ -1370,7 +1510,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1370
1510
|
children: []
|
|
1371
1511
|
}
|
|
1372
1512
|
];
|
|
1373
|
-
if (exportFileFlag
|
|
1513
|
+
if (props.exportFileFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO || props.columnsSetting?.disabled) return result;
|
|
1374
1514
|
let list = dataSetList.value?.[FILE_TYPE_CODE] || [];
|
|
1375
1515
|
if (1 === list.length) result.push({
|
|
1376
1516
|
value: list[0]?.dataValueNo,
|
|
@@ -1419,6 +1559,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1419
1559
|
panelValue.value = [];
|
|
1420
1560
|
}
|
|
1421
1561
|
function openColumnSetting() {
|
|
1562
|
+
if (props.columnsSetting?.disabled) return;
|
|
1422
1563
|
tableColumnSetting({
|
|
1423
1564
|
columns: props.columns,
|
|
1424
1565
|
componentNo: props.componentNo,
|
|
@@ -1428,14 +1569,10 @@ const EXPORT_FILE = 'export-file';
|
|
|
1428
1569
|
}
|
|
1429
1570
|
});
|
|
1430
1571
|
}
|
|
1431
|
-
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>columnsSettingRef.value?.exportFileFlag);
|
|
1432
1572
|
function handleMenuClick(value) {
|
|
1433
1573
|
if (value === COLUMN_SETTING) openColumnSetting();
|
|
1434
1574
|
else exportFile(value);
|
|
1435
1575
|
}
|
|
1436
|
-
__expose({
|
|
1437
|
-
exportFileFlag
|
|
1438
|
-
});
|
|
1439
1576
|
return (_ctx, _cache)=>{
|
|
1440
1577
|
const _component_el_menu_item = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-menu-item");
|
|
1441
1578
|
const _component_el_sub_menu = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-sub-menu");
|
|
@@ -1513,29 +1650,700 @@ const EXPORT_FILE = 'export-file';
|
|
|
1513
1650
|
})) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", {
|
|
1514
1651
|
key: 1,
|
|
1515
1652
|
onClick: openColumnSetting,
|
|
1516
|
-
class:
|
|
1653
|
+
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'}`)
|
|
1517
1654
|
}, [
|
|
1518
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), {
|
|
1519
|
-
|
|
1655
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
|
|
1656
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1657
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Setting))
|
|
1658
|
+
]),
|
|
1659
|
+
_: 1
|
|
1660
|
+
})
|
|
1661
|
+
], 2));
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
});
|
|
1665
|
+
const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
|
|
1666
|
+
[
|
|
1667
|
+
'__scopeId',
|
|
1668
|
+
"data-v-33e7f7b0"
|
|
1669
|
+
]
|
|
1670
|
+
]);
|
|
1671
|
+
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
1672
|
+
/* ESM default export */ const Tablevue_type_script_setup_true_lang_tsx_name_Table = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1673
|
+
__name: 'Table',
|
|
1674
|
+
props: {
|
|
1675
|
+
id: {},
|
|
1676
|
+
loading: {
|
|
1677
|
+
type: Boolean
|
|
1678
|
+
},
|
|
1679
|
+
exportFileFlag: {},
|
|
1680
|
+
draggable: {
|
|
1681
|
+
type: Boolean
|
|
1682
|
+
},
|
|
1683
|
+
data: {},
|
|
1684
|
+
componentNo: {},
|
|
1685
|
+
rowKey: {},
|
|
1686
|
+
tableColumns: {},
|
|
1687
|
+
commonColumns: {},
|
|
1688
|
+
columnsSetting: {}
|
|
1689
|
+
},
|
|
1690
|
+
emits: [
|
|
1691
|
+
'success'
|
|
1692
|
+
],
|
|
1693
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
1694
|
+
const props = __props;
|
|
1695
|
+
const emits = __emit;
|
|
1696
|
+
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1697
|
+
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>proTableRef?.value?.getSelectionRows() || []);
|
|
1698
|
+
__expose({
|
|
1699
|
+
proTableRef
|
|
1700
|
+
});
|
|
1701
|
+
return (_ctx, _cache)=>{
|
|
1702
|
+
const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
|
|
1703
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
1704
|
+
props.componentNo ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(TableSettingButton, {
|
|
1705
|
+
key: 0,
|
|
1706
|
+
"table-data": selectedData.value,
|
|
1707
|
+
"export-file-flag": props.exportFileFlag,
|
|
1708
|
+
"component-no": props.componentNo,
|
|
1709
|
+
"columns-setting": props.columnsSetting,
|
|
1710
|
+
columns: _ctx.commonColumns,
|
|
1711
|
+
ref: "tableSettingButtonRef",
|
|
1712
|
+
onSuccess: _cache[0] || (_cache[0] = ($event)=>emits('success'))
|
|
1713
|
+
}, null, 8, [
|
|
1714
|
+
"table-data",
|
|
1715
|
+
"export-file-flag",
|
|
1716
|
+
"component-no",
|
|
1717
|
+
"columns-setting",
|
|
1718
|
+
"columns"
|
|
1719
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
1720
|
+
(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)({
|
|
1721
|
+
id: props.id,
|
|
1722
|
+
ref_key: "proTableRef",
|
|
1723
|
+
ref: proTableRef,
|
|
1724
|
+
data: props.data,
|
|
1725
|
+
style: {
|
|
1726
|
+
width: "100%"
|
|
1727
|
+
},
|
|
1728
|
+
class: "min-h-0 flex-1 overflow-auto",
|
|
1729
|
+
"row-key": props.rowKey,
|
|
1730
|
+
"cell-class-name": ({ column })=>_ctx.draggable && 'operation' !== column.property ? 'cursor-move' : '',
|
|
1731
|
+
border: ""
|
|
1732
|
+
}, _ctx.$attrs), {
|
|
1733
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1734
|
+
((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, {
|
|
1735
|
+
"column-obj": item,
|
|
1736
|
+
key: index
|
|
1737
|
+
}, null, 8, [
|
|
1738
|
+
"column-obj"
|
|
1739
|
+
]))), 128))
|
|
1740
|
+
]),
|
|
1741
|
+
_: 1
|
|
1742
|
+
}, 16, [
|
|
1743
|
+
"id",
|
|
1744
|
+
"data",
|
|
1745
|
+
"row-key",
|
|
1746
|
+
"cell-class-name"
|
|
1747
|
+
])), [
|
|
1748
|
+
[
|
|
1749
|
+
_directive_loading,
|
|
1750
|
+
props.loading
|
|
1751
|
+
]
|
|
1752
|
+
])
|
|
1753
|
+
], 64);
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1756
|
+
});
|
|
1757
|
+
const Table_exports_ = Tablevue_type_script_setup_true_lang_tsx_name_Table;
|
|
1758
|
+
/* ESM default export */ const Table = Table_exports_;
|
|
1759
|
+
// 接受父组件参数,配置默认值
|
|
1760
|
+
/* ESM default export */ const TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1761
|
+
__name: 'TableContainer',
|
|
1762
|
+
props: {
|
|
1763
|
+
model: {
|
|
1764
|
+
default: ()=>({})
|
|
1765
|
+
},
|
|
1766
|
+
draggable: {
|
|
1767
|
+
type: Boolean
|
|
1768
|
+
},
|
|
1769
|
+
editable: {
|
|
1770
|
+
type: Boolean
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
setup (__props, { expose: __expose }) {
|
|
1774
|
+
const props = __props;
|
|
1775
|
+
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1776
|
+
__expose(new Proxy({}, {
|
|
1777
|
+
get (_target, prop) {
|
|
1778
|
+
if (formRef.value) return formRef.value[prop];
|
|
1779
|
+
},
|
|
1780
|
+
has (_target, prop) {
|
|
1781
|
+
if (formRef?.value) return prop in formRef.value;
|
|
1782
|
+
return false;
|
|
1783
|
+
}
|
|
1784
|
+
}));
|
|
1785
|
+
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)({
|
|
1786
|
+
key: 0,
|
|
1787
|
+
model: props.model,
|
|
1788
|
+
ref_key: "formRef",
|
|
1789
|
+
ref: formRef
|
|
1790
|
+
}, _ctx.$attrs), {
|
|
1791
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1792
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default")
|
|
1793
|
+
]),
|
|
1794
|
+
_: 3
|
|
1795
|
+
}, 16, [
|
|
1796
|
+
"model"
|
|
1797
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default", {
|
|
1798
|
+
key: 1
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
});
|
|
1802
|
+
const TableContainer_exports_ = TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer;
|
|
1803
|
+
/* ESM default export */ const TableContainer = TableContainer_exports_;
|
|
1804
|
+
/* ESM default export */ const Paginationvue_type_script_setup_true_lang_ts_name_Pagination = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1805
|
+
__name: 'Pagination',
|
|
1806
|
+
props: {
|
|
1807
|
+
pageInfo: {},
|
|
1808
|
+
pageSizes: {},
|
|
1809
|
+
handleSizeChange: {
|
|
1810
|
+
type: Function
|
|
1811
|
+
},
|
|
1812
|
+
handleCurrentChange: {
|
|
1813
|
+
type: Function
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
setup (__props) {
|
|
1817
|
+
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)({
|
|
1818
|
+
"current-page": _ctx.pageInfo.pageNumber,
|
|
1819
|
+
"page-size": _ctx.pageInfo.pageSize,
|
|
1820
|
+
total: _ctx.pageInfo.total,
|
|
1821
|
+
"page-sizes": _ctx.pageSizes,
|
|
1822
|
+
layout: "total, sizes, prev, pager, next",
|
|
1823
|
+
onSizeChange: _ctx.handleSizeChange,
|
|
1824
|
+
onCurrentChange: _ctx.handleCurrentChange,
|
|
1825
|
+
"set-scroll-top": 500,
|
|
1826
|
+
background: ""
|
|
1827
|
+
}, _ctx.$attrs), null, 16, [
|
|
1828
|
+
"current-page",
|
|
1829
|
+
"page-size",
|
|
1830
|
+
"total",
|
|
1831
|
+
"page-sizes",
|
|
1832
|
+
"onSizeChange",
|
|
1833
|
+
"onCurrentChange"
|
|
1834
|
+
]));
|
|
1835
|
+
}
|
|
1836
|
+
});
|
|
1837
|
+
const Pagination_exports_ = Paginationvue_type_script_setup_true_lang_ts_name_Pagination;
|
|
1838
|
+
/* ESM default export */ const Pagination = Pagination_exports_;
|
|
1839
|
+
const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
|
|
1840
|
+
class: "relative flex flex-1 flex-col overflow-hidden"
|
|
1841
|
+
};
|
|
1842
|
+
const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_2 = {
|
|
1843
|
+
key: 1,
|
|
1844
|
+
class: "mt-5 flex justify-between items-center"
|
|
1845
|
+
};
|
|
1846
|
+
const SELECTION = 'selection';
|
|
1847
|
+
// 接受父组件参数,配置默认值
|
|
1848
|
+
/* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1849
|
+
__name: 'index',
|
|
1850
|
+
props: {
|
|
1851
|
+
columns: {
|
|
1852
|
+
default: ()=>[]
|
|
1853
|
+
},
|
|
1854
|
+
data: {
|
|
1855
|
+
default: ()=>[]
|
|
1856
|
+
},
|
|
1857
|
+
pagination: {
|
|
1858
|
+
type: Boolean,
|
|
1859
|
+
default: false
|
|
1860
|
+
},
|
|
1861
|
+
pageInfo: {
|
|
1862
|
+
default: void 0
|
|
1863
|
+
},
|
|
1864
|
+
componentNo: {
|
|
1865
|
+
default: ''
|
|
1866
|
+
},
|
|
1867
|
+
fetchData: {
|
|
1868
|
+
type: Function,
|
|
1869
|
+
default: void 0
|
|
1870
|
+
},
|
|
1871
|
+
columnsSetting: {
|
|
1872
|
+
default: ()=>({
|
|
1873
|
+
draggable: true
|
|
1874
|
+
})
|
|
1875
|
+
},
|
|
1876
|
+
draggable: {
|
|
1877
|
+
type: Boolean,
|
|
1878
|
+
default: false
|
|
1879
|
+
},
|
|
1880
|
+
editable: {
|
|
1881
|
+
type: Boolean,
|
|
1882
|
+
default: false
|
|
1883
|
+
},
|
|
1884
|
+
defaultQuery: {
|
|
1885
|
+
type: Boolean,
|
|
1886
|
+
default: true
|
|
1887
|
+
},
|
|
1888
|
+
rowKey: {
|
|
1889
|
+
default: 'id'
|
|
1890
|
+
},
|
|
1891
|
+
loading: {
|
|
1892
|
+
type: Boolean,
|
|
1893
|
+
default: false
|
|
1894
|
+
},
|
|
1895
|
+
pageSizes: {
|
|
1896
|
+
default: ()=>[
|
|
1897
|
+
10,
|
|
1898
|
+
25,
|
|
1899
|
+
50,
|
|
1900
|
+
100
|
|
1901
|
+
]
|
|
1902
|
+
},
|
|
1903
|
+
filterObj: {
|
|
1904
|
+
default: ()=>({})
|
|
1905
|
+
},
|
|
1906
|
+
layout: {
|
|
1907
|
+
default: 'total, sizes, prev, pager, next'
|
|
1908
|
+
},
|
|
1909
|
+
dragTips: {
|
|
1910
|
+
default: '温馨提示:您可通过拖动进行排序'
|
|
1911
|
+
},
|
|
1912
|
+
isShowDragTips: {
|
|
1913
|
+
type: Boolean,
|
|
1914
|
+
default: false
|
|
1915
|
+
},
|
|
1916
|
+
dragTipsCustomStyle: {
|
|
1917
|
+
default: {}
|
|
1918
|
+
},
|
|
1919
|
+
dragTipsClassName: {
|
|
1920
|
+
default: ''
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1923
|
+
emits: [
|
|
1924
|
+
"drag-end",
|
|
1925
|
+
"size-page-change",
|
|
1926
|
+
"current-page-change"
|
|
1927
|
+
],
|
|
1928
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
1929
|
+
const props = __props;
|
|
1930
|
+
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
|
|
1931
|
+
let state = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
1932
|
+
// 表格数据
|
|
1933
|
+
tableData: props.data,
|
|
1934
|
+
loading: false,
|
|
1935
|
+
// 分页数据
|
|
1936
|
+
pageInfo: {
|
|
1937
|
+
// 当前页数
|
|
1938
|
+
pageNumber: 1,
|
|
1939
|
+
// 每页显示条数
|
|
1940
|
+
pageSize: 10,
|
|
1941
|
+
// 总条数
|
|
1942
|
+
total: 0
|
|
1943
|
+
}
|
|
1944
|
+
});
|
|
1945
|
+
const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
1946
|
+
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1947
|
+
// 生成组件唯一id
|
|
1948
|
+
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
|
|
1949
|
+
// 定义 emit 事件
|
|
1950
|
+
const emit = __emit;
|
|
1951
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
1952
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1953
|
+
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>tableRef.value?.proTableRef);
|
|
1954
|
+
/**
|
|
1955
|
+
*获取参与排序的列表 索引 是否可以拖拽
|
|
1956
|
+
*/ function getDragSortData(newIndex, data, startIndexObj, sortData) {
|
|
1957
|
+
data.forEach((item, index)=>{
|
|
1958
|
+
startIndexObj.startIndex += 1;
|
|
1959
|
+
if (startIndexObj.startIndex > newIndex) return;
|
|
1960
|
+
if (startIndexObj.startIndex === newIndex) {
|
|
1961
|
+
sortData.curIndex = index;
|
|
1962
|
+
sortData.curData = item;
|
|
1963
|
+
sortData.result = data;
|
|
1964
|
+
}
|
|
1965
|
+
if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
|
|
1966
|
+
});
|
|
1967
|
+
return sortData;
|
|
1968
|
+
}
|
|
1969
|
+
/**
|
|
1970
|
+
* 获取拖拽排序数据结果
|
|
1971
|
+
*/ function getSortableResult(newIndex, oldIndex) {
|
|
1972
|
+
let data = [
|
|
1973
|
+
...state.tableData
|
|
1974
|
+
];
|
|
1975
|
+
if (attrs?.['tree-props']) {
|
|
1976
|
+
let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
|
|
1977
|
+
startIndex: -1
|
|
1978
|
+
}, {
|
|
1979
|
+
result: [],
|
|
1980
|
+
curIndex: 0,
|
|
1981
|
+
curData: {}
|
|
1982
|
+
});
|
|
1983
|
+
let { curIndex: oldCurIndex, curData: oldCurData } = getDragSortData(oldIndex, data, {
|
|
1984
|
+
startIndex: -1
|
|
1985
|
+
}, {
|
|
1986
|
+
result: [],
|
|
1987
|
+
curIndex: 0,
|
|
1988
|
+
curData: {}
|
|
1989
|
+
});
|
|
1990
|
+
if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
|
|
1991
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
|
|
1992
|
+
return [];
|
|
1993
|
+
}
|
|
1994
|
+
const [removedItem] = result.splice(oldCurIndex, 1);
|
|
1995
|
+
result.splice(newCurIndex, 0, removedItem);
|
|
1996
|
+
data = result;
|
|
1997
|
+
} else {
|
|
1998
|
+
const [removedItem] = data.splice(oldIndex, 1);
|
|
1999
|
+
data.splice(newIndex, 0, removedItem);
|
|
2000
|
+
}
|
|
2001
|
+
return data;
|
|
2002
|
+
}
|
|
2003
|
+
/***
|
|
2004
|
+
* 表格拖拽排序
|
|
2005
|
+
**/ const initDragSort = ()=>{
|
|
2006
|
+
const tbodyList = document.querySelectorAll(`#${uuid.value} tbody`);
|
|
2007
|
+
const tbody = tbodyList[tbodyList.length - 1];
|
|
2008
|
+
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
2009
|
+
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
2010
|
+
handle: '.cursor-move',
|
|
2011
|
+
animation: 300,
|
|
2012
|
+
scroll: true,
|
|
2013
|
+
scrollSensitivity: 80,
|
|
2014
|
+
scrollSpeed: 10,
|
|
2015
|
+
onEnd (evt) {
|
|
2016
|
+
const { newIndex, oldIndex } = evt;
|
|
2017
|
+
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
2018
|
+
//获取拖动后的排序
|
|
2019
|
+
let data = getSortableResult(newIndex, oldIndex);
|
|
2020
|
+
if (data.length) emit('drag-end', data);
|
|
2021
|
+
else evt.from.innerHTML = initialHTML;
|
|
2022
|
+
},
|
|
2023
|
+
onStart (evt) {
|
|
2024
|
+
// 在拖拽开始时,记录当前容器的 HTML
|
|
2025
|
+
initialHTML = evt.from.innerHTML;
|
|
2026
|
+
}
|
|
2027
|
+
});
|
|
2028
|
+
};
|
|
2029
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.data, (newValue)=>{
|
|
2030
|
+
state.tableData = newValue;
|
|
2031
|
+
state.pageInfo.total = (newValue || []).length;
|
|
2032
|
+
});
|
|
2033
|
+
async function fetchDbgridComponent() {
|
|
2034
|
+
let [, result] = await queryDbgridComponentByExample({
|
|
2035
|
+
componentNo: props.componentNo || ''
|
|
2036
|
+
});
|
|
2037
|
+
if (result?.success) {
|
|
2038
|
+
exportFileFlag.value = result.data.exportFileFlag;
|
|
2039
|
+
try {
|
|
2040
|
+
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
2041
|
+
serveColumns.value = column;
|
|
2042
|
+
} catch (error) {
|
|
2043
|
+
console.log(error);
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.componentNo, ()=>{
|
|
2048
|
+
if (props.componentNo) fetchDbgridComponent();
|
|
2049
|
+
}, {
|
|
2050
|
+
immediate: true
|
|
2051
|
+
});
|
|
2052
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
2053
|
+
// 支持拖拽排序
|
|
2054
|
+
if (props.draggable) (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
2055
|
+
initDragSort();
|
|
2056
|
+
});
|
|
2057
|
+
if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
|
|
2058
|
+
});
|
|
2059
|
+
/**
|
|
2060
|
+
* 获取列表
|
|
2061
|
+
*/ async function fetchList() {
|
|
2062
|
+
state.loading = true;
|
|
2063
|
+
let { total = 0, data = [] } = await (props.fetchData && props.fetchData(state.pageInfo)) || {};
|
|
2064
|
+
state.pageInfo.total = Number(total);
|
|
2065
|
+
state.tableData = data;
|
|
2066
|
+
state.loading = false;
|
|
2067
|
+
}
|
|
2068
|
+
/**
|
|
2069
|
+
* 分页组件改变 pageNumber 事件
|
|
2070
|
+
*/ const handleSizeChange = (val)=>{
|
|
2071
|
+
if (props.fetchData) {
|
|
2072
|
+
state.pageInfo.pageNumber = 1;
|
|
2073
|
+
state.pageInfo.pageSize = val;
|
|
2074
|
+
fetchList();
|
|
2075
|
+
} else emit('size-page-change', val);
|
|
2076
|
+
};
|
|
2077
|
+
/**
|
|
2078
|
+
* 分页组件改变 当前页数 事件
|
|
2079
|
+
*/ function changeCurrentPage(val) {
|
|
2080
|
+
if (props.fetchData) {
|
|
2081
|
+
state.pageInfo.pageNumber = val;
|
|
2082
|
+
fetchList();
|
|
2083
|
+
} else emit('current-page-change', val);
|
|
2084
|
+
}
|
|
2085
|
+
const selections = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2086
|
+
// 设置当前行激活态
|
|
2087
|
+
const setCurrentRow = (row)=>{
|
|
2088
|
+
if (proTableRef.value) proTableRef.value.setCurrentRow(row);
|
|
2089
|
+
};
|
|
2090
|
+
// 分页配置信息
|
|
2091
|
+
const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo);
|
|
2092
|
+
/**
|
|
2093
|
+
* 支持根据传递的filterObj完成过滤
|
|
2094
|
+
*/ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2095
|
+
if (Object.keys(props.filterObj).length) return [
|
|
2096
|
+
...state.tableData
|
|
2097
|
+
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
2098
|
+
'',
|
|
2099
|
+
void 0,
|
|
2100
|
+
null
|
|
2101
|
+
].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
|
|
2102
|
+
return state.tableData;
|
|
2103
|
+
});
|
|
2104
|
+
__expose({
|
|
2105
|
+
selections,
|
|
2106
|
+
tableData,
|
|
2107
|
+
setCurrentRow,
|
|
2108
|
+
proTableRef,
|
|
2109
|
+
eleTable: new Proxy({}, {
|
|
2110
|
+
get (_target, prop) {
|
|
2111
|
+
return proTableRef.value?.[prop];
|
|
2112
|
+
}
|
|
2113
|
+
}),
|
|
2114
|
+
formRef: new Proxy({}, {
|
|
2115
|
+
get (_target, prop) {
|
|
2116
|
+
return formRef.value?.[prop];
|
|
2117
|
+
},
|
|
2118
|
+
has (_target, prop) {
|
|
2119
|
+
return prop in formRef.value;
|
|
2120
|
+
}
|
|
2121
|
+
}),
|
|
2122
|
+
validateRow: (index, callback)=>{
|
|
2123
|
+
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${item.prop}`);
|
|
2124
|
+
return formRef.value.validateField(validateProps, callback);
|
|
2125
|
+
},
|
|
2126
|
+
fetchList: (init = true, initPageInfo = {
|
|
2127
|
+
pageNumber: 1
|
|
2128
|
+
})=>{
|
|
2129
|
+
if (init) state.pageInfo = {
|
|
2130
|
+
...state.pageInfo,
|
|
2131
|
+
...initPageInfo
|
|
2132
|
+
};
|
|
2133
|
+
fetchList();
|
|
2134
|
+
}
|
|
2135
|
+
});
|
|
2136
|
+
/**
|
|
2137
|
+
* 处理接口和本地的columns
|
|
2138
|
+
*/ const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2139
|
+
if (!props.componentNo) return props.columns;
|
|
2140
|
+
{
|
|
2141
|
+
let result = [
|
|
2142
|
+
...props.columns
|
|
2143
|
+
].map((cur)=>({
|
|
2144
|
+
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,
|
|
2145
|
+
...cur
|
|
2146
|
+
}));
|
|
2147
|
+
if (serveColumns.value?.length) {
|
|
2148
|
+
result = result.map((item, index)=>{
|
|
2149
|
+
let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {};
|
|
2150
|
+
return {
|
|
2151
|
+
displayFlag: item.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
2152
|
+
...item,
|
|
2153
|
+
sort: index + 1,
|
|
2154
|
+
...findObj,
|
|
2155
|
+
label: item.label || findObj.label,
|
|
2156
|
+
isHidden: item.isHidden || findObj.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
2157
|
+
};
|
|
2158
|
+
});
|
|
2159
|
+
result.sort((a, b)=>Number(a.sort) - Number(b.sort));
|
|
2160
|
+
}
|
|
2161
|
+
return result;
|
|
2162
|
+
}
|
|
2163
|
+
});
|
|
2164
|
+
/**
|
|
2165
|
+
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
2166
|
+
*/ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2167
|
+
let result = [
|
|
2168
|
+
...commonColumns.value
|
|
2169
|
+
];
|
|
2170
|
+
if (props.componentNo) {
|
|
2171
|
+
result = result.map((item, index)=>({
|
|
2172
|
+
...item,
|
|
2173
|
+
minWidth: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth
|
|
2174
|
+
}));
|
|
2175
|
+
if (exportFileFlag.value && !result.find((cur)=>cur.type === SELECTION)) result = [
|
|
2176
|
+
{
|
|
2177
|
+
type: SELECTION,
|
|
2178
|
+
prop: SELECTION
|
|
2179
|
+
},
|
|
2180
|
+
...result
|
|
2181
|
+
];
|
|
2182
|
+
}
|
|
2183
|
+
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
2184
|
+
});
|
|
2185
|
+
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, [
|
|
2186
|
+
props?.draggable || props?.isShowDragTips ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
2187
|
+
key: 0,
|
|
2188
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
2189
|
+
color: '#f7ba2a',
|
|
2190
|
+
...props.dragTipsCustomStyle
|
|
2191
|
+
}),
|
|
2192
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
2193
|
+
'text-base',
|
|
2194
|
+
'mb-2',
|
|
2195
|
+
props.dragTipsClassName
|
|
2196
|
+
])
|
|
2197
|
+
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(props.dragTips), 7)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
2198
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(TableContainer, {
|
|
2199
|
+
ref_key: "formRef",
|
|
2200
|
+
ref: formRef,
|
|
2201
|
+
editable: _ctx.editable,
|
|
2202
|
+
model: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state),
|
|
2203
|
+
class: "flex flex-1 flex-col overflow-hidden"
|
|
1520
2204
|
}, {
|
|
1521
2205
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1522
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.
|
|
2206
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2207
|
+
id: uuid.value,
|
|
2208
|
+
"export-file-flag": exportFileFlag.value,
|
|
2209
|
+
"common-columns": commonColumns.value,
|
|
2210
|
+
"component-no": props.componentNo,
|
|
2211
|
+
"columns-setting": props.columnsSetting,
|
|
2212
|
+
loading: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading,
|
|
2213
|
+
onSuccess: fetchDbgridComponent,
|
|
2214
|
+
ref_key: "tableRef",
|
|
2215
|
+
ref: tableRef,
|
|
2216
|
+
data: tableData.value,
|
|
2217
|
+
"row-key": props.rowKey,
|
|
2218
|
+
"table-columns": tableColumns.value
|
|
2219
|
+
}, _ctx.$attrs, {
|
|
2220
|
+
draggable: props.draggable
|
|
2221
|
+
}), null, 16, [
|
|
2222
|
+
"id",
|
|
2223
|
+
"export-file-flag",
|
|
2224
|
+
"common-columns",
|
|
2225
|
+
"component-no",
|
|
2226
|
+
"columns-setting",
|
|
2227
|
+
"loading",
|
|
2228
|
+
"data",
|
|
2229
|
+
"row-key",
|
|
2230
|
+
"table-columns",
|
|
2231
|
+
"draggable"
|
|
2232
|
+
])
|
|
1523
2233
|
]),
|
|
1524
2234
|
_: 1
|
|
1525
|
-
}
|
|
2235
|
+
}, 8, [
|
|
2236
|
+
"editable",
|
|
2237
|
+
"model"
|
|
2238
|
+
]),
|
|
2239
|
+
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, [
|
|
2240
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "pagination"),
|
|
2241
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(Pagination, {
|
|
2242
|
+
class: "w-full flex justify-end",
|
|
2243
|
+
layout: props.layout,
|
|
2244
|
+
"page-info": paginationInfo.value,
|
|
2245
|
+
"page-sizes": props.pageSizes,
|
|
2246
|
+
"handle-size-change": handleSizeChange,
|
|
2247
|
+
"handle-current-change": changeCurrentPage
|
|
2248
|
+
}, null, 8, [
|
|
2249
|
+
"layout",
|
|
2250
|
+
"page-info",
|
|
2251
|
+
"page-sizes"
|
|
2252
|
+
])
|
|
2253
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
1526
2254
|
]));
|
|
2255
|
+
}
|
|
2256
|
+
});
|
|
2257
|
+
const pro_table_exports_ = pro_tablevue_type_script_lang_ts_setup_true_name_ProTable;
|
|
2258
|
+
/* ESM default export */ const pro_table = pro_table_exports_;
|
|
2259
|
+
const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
2260
|
+
class: "min-h-0 flex-1"
|
|
2261
|
+
};
|
|
2262
|
+
/* ESM default export */ const composables_Tablevue_type_script_setup_true_lang_tsx_name_Table = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
2263
|
+
__name: 'Table',
|
|
2264
|
+
props: {
|
|
2265
|
+
id: {},
|
|
2266
|
+
loading: {
|
|
2267
|
+
type: Boolean
|
|
2268
|
+
},
|
|
2269
|
+
exportFileFlag: {},
|
|
2270
|
+
draggable: {
|
|
2271
|
+
type: Boolean
|
|
2272
|
+
},
|
|
2273
|
+
data: {},
|
|
2274
|
+
componentNo: {},
|
|
2275
|
+
rowKey: {},
|
|
2276
|
+
tableColumns: {},
|
|
2277
|
+
commonColumns: {},
|
|
2278
|
+
columnsSetting: {}
|
|
2279
|
+
},
|
|
2280
|
+
emits: [
|
|
2281
|
+
'success'
|
|
2282
|
+
],
|
|
2283
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
2284
|
+
const props = __props;
|
|
2285
|
+
const emits = __emit;
|
|
2286
|
+
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2287
|
+
const selectedData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.data.filter((cur)=>cur.checked));
|
|
2288
|
+
__expose({
|
|
2289
|
+
proTableRef
|
|
2290
|
+
});
|
|
2291
|
+
return (_ctx, _cache)=>{
|
|
2292
|
+
const _directive_loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective)("loading");
|
|
2293
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
2294
|
+
props.componentNo ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(TableSettingButton, {
|
|
2295
|
+
key: 0,
|
|
2296
|
+
"table-data": selectedData.value,
|
|
2297
|
+
"export-file-flag": props.exportFileFlag,
|
|
2298
|
+
"component-no": props.componentNo,
|
|
2299
|
+
"columns-setting": props.columnsSetting,
|
|
2300
|
+
columns: _ctx.commonColumns,
|
|
2301
|
+
ref: "tableSettingButtonRef",
|
|
2302
|
+
onSuccess: _cache[0] || (_cache[0] = ($event)=>emits('success'))
|
|
2303
|
+
}, null, 8, [
|
|
2304
|
+
"table-data",
|
|
2305
|
+
"export-file-flag",
|
|
2306
|
+
"component-no",
|
|
2307
|
+
"columns-setting",
|
|
2308
|
+
"columns"
|
|
2309
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
2310
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1, [
|
|
2311
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElAutoResizer), null, {
|
|
2312
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(({ height, width })=>[
|
|
2313
|
+
(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)({
|
|
2314
|
+
columns: props.tableColumns,
|
|
2315
|
+
data: props.data,
|
|
2316
|
+
"row-key": props.rowKey,
|
|
2317
|
+
ref_key: "proTableRef",
|
|
2318
|
+
ref: proTableRef,
|
|
2319
|
+
width: width,
|
|
2320
|
+
height: height
|
|
2321
|
+
}, _ctx.$attrs, {
|
|
2322
|
+
fixed: ""
|
|
2323
|
+
}), null, 16, [
|
|
2324
|
+
"columns",
|
|
2325
|
+
"data",
|
|
2326
|
+
"row-key",
|
|
2327
|
+
"width",
|
|
2328
|
+
"height"
|
|
2329
|
+
]), [
|
|
2330
|
+
[
|
|
2331
|
+
_directive_loading,
|
|
2332
|
+
props.loading
|
|
2333
|
+
]
|
|
2334
|
+
])
|
|
2335
|
+
]),
|
|
2336
|
+
_: 1
|
|
2337
|
+
})
|
|
2338
|
+
])
|
|
2339
|
+
], 64);
|
|
1527
2340
|
};
|
|
1528
2341
|
}
|
|
1529
2342
|
});
|
|
1530
|
-
const
|
|
1531
|
-
|
|
1532
|
-
'__scopeId',
|
|
1533
|
-
"data-v-27b372ad"
|
|
1534
|
-
]
|
|
1535
|
-
]);
|
|
1536
|
-
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
2343
|
+
const composables_Table_exports_ = composables_Tablevue_type_script_setup_true_lang_tsx_name_Table;
|
|
2344
|
+
/* ESM default export */ const composables_Table = composables_Table_exports_;
|
|
1537
2345
|
// 接受父组件参数,配置默认值
|
|
1538
|
-
/* ESM default export */ const
|
|
2346
|
+
/* ESM default export */ const composables_TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1539
2347
|
__name: 'TableContainer',
|
|
1540
2348
|
props: {
|
|
1541
2349
|
model: {
|
|
@@ -1577,9 +2385,9 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
1577
2385
|
});
|
|
1578
2386
|
}
|
|
1579
2387
|
});
|
|
1580
|
-
const
|
|
1581
|
-
/* ESM default export */ const
|
|
1582
|
-
/* ESM default export */ const
|
|
2388
|
+
const composables_TableContainer_exports_ = composables_TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer;
|
|
2389
|
+
/* ESM default export */ const composables_TableContainer = composables_TableContainer_exports_;
|
|
2390
|
+
/* ESM default export */ const composables_Paginationvue_type_script_setup_true_lang_ts_name_Pagination = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1583
2391
|
__name: 'Pagination',
|
|
1584
2392
|
props: {
|
|
1585
2393
|
pageInfo: {},
|
|
@@ -1612,18 +2420,17 @@ const TableContainer_exports_ = TableContainervue_type_script_lang_ts_setup_true
|
|
|
1612
2420
|
]));
|
|
1613
2421
|
}
|
|
1614
2422
|
});
|
|
1615
|
-
const
|
|
1616
|
-
/* ESM default export */ const
|
|
1617
|
-
const
|
|
2423
|
+
const composables_Pagination_exports_ = composables_Paginationvue_type_script_setup_true_lang_ts_name_Pagination;
|
|
2424
|
+
/* ESM default export */ const composables_Pagination = composables_Pagination_exports_;
|
|
2425
|
+
const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_hoisted_1 = {
|
|
1618
2426
|
class: "relative flex flex-1 flex-col overflow-hidden"
|
|
1619
2427
|
};
|
|
1620
|
-
const
|
|
2428
|
+
const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_hoisted_2 = {
|
|
1621
2429
|
key: 1,
|
|
1622
2430
|
class: "mt-5 flex justify-between items-center"
|
|
1623
2431
|
};
|
|
1624
|
-
const
|
|
1625
|
-
|
|
1626
|
-
/* ESM default export */ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
2432
|
+
const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION = 'selection'; // 接受父组件参数,配置默认值
|
|
2433
|
+
/* ESM default export */ const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1627
2434
|
__name: 'index',
|
|
1628
2435
|
props: {
|
|
1629
2436
|
columns: {
|
|
@@ -1705,38 +2512,26 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1705
2512
|
],
|
|
1706
2513
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
1707
2514
|
const props = __props;
|
|
2515
|
+
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
|
|
1708
2516
|
let state = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
1709
|
-
// 表格数据
|
|
1710
2517
|
tableData: props.data,
|
|
1711
2518
|
loading: false,
|
|
1712
|
-
// 分页数据
|
|
1713
2519
|
pageInfo: {
|
|
1714
|
-
// 当前页数
|
|
1715
2520
|
pageNumber: 1,
|
|
1716
|
-
// 每页显示条数
|
|
1717
2521
|
pageSize: 10,
|
|
1718
|
-
// 总条数
|
|
1719
2522
|
total: 0
|
|
1720
2523
|
}
|
|
1721
2524
|
});
|
|
1722
2525
|
const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
1723
|
-
const
|
|
1724
|
-
|
|
1725
|
-
'radio',
|
|
1726
|
-
'index',
|
|
1727
|
-
'expand',
|
|
1728
|
-
'sort'
|
|
1729
|
-
];
|
|
1730
|
-
const tableSettingButtonRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); //表格设置
|
|
1731
|
-
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1732
|
-
// 生成组件唯一id
|
|
1733
|
-
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)());
|
|
1734
|
-
// 定义 emit 事件
|
|
2526
|
+
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // 生成组件唯一id
|
|
2527
|
+
const uuid = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)((0, __WEBPACK_EXTERNAL_MODULE_vue__.useId)()); // 定义 emit 事件
|
|
1735
2528
|
const emit = __emit;
|
|
1736
2529
|
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
1737
|
-
|
|
2530
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
2531
|
+
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>tableRef.value?.proTableRef); /**
|
|
1738
2532
|
*获取参与排序的列表 索引 是否可以拖拽
|
|
1739
|
-
*/
|
|
2533
|
+
*/
|
|
2534
|
+
function getDragSortData(newIndex, data, startIndexObj, sortData) {
|
|
1740
2535
|
data.forEach((item, index)=>{
|
|
1741
2536
|
startIndexObj.startIndex += 1;
|
|
1742
2537
|
if (startIndexObj.startIndex > newIndex) return;
|
|
@@ -1748,10 +2543,10 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1748
2543
|
if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
|
|
1749
2544
|
});
|
|
1750
2545
|
return sortData;
|
|
1751
|
-
}
|
|
1752
|
-
/**
|
|
2546
|
+
} /**
|
|
1753
2547
|
* 获取拖拽排序数据结果
|
|
1754
|
-
*/
|
|
2548
|
+
*/
|
|
2549
|
+
function getSortableResult(newIndex, oldIndex) {
|
|
1755
2550
|
let data = [
|
|
1756
2551
|
...state.tableData
|
|
1757
2552
|
];
|
|
@@ -1782,11 +2577,12 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1782
2577
|
data.splice(newIndex, 0, removedItem);
|
|
1783
2578
|
}
|
|
1784
2579
|
return data;
|
|
1785
|
-
}
|
|
1786
|
-
/***
|
|
2580
|
+
} /***
|
|
1787
2581
|
* 表格拖拽排序
|
|
1788
|
-
**/
|
|
1789
|
-
|
|
2582
|
+
**/
|
|
2583
|
+
const initDragSort = ()=>{
|
|
2584
|
+
const tbodyList = document.querySelectorAll(`#${uuid.value} tbody`);
|
|
2585
|
+
const tbody = tbodyList[tbodyList.length - 1];
|
|
1790
2586
|
let initialHTML = ''; //暂不支持跨层级拖拽
|
|
1791
2587
|
if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
|
|
1792
2588
|
handle: '.cursor-move',
|
|
@@ -1796,14 +2592,12 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1796
2592
|
scrollSpeed: 10,
|
|
1797
2593
|
onEnd (evt) {
|
|
1798
2594
|
const { newIndex, oldIndex } = evt;
|
|
1799
|
-
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
|
|
1800
|
-
//获取拖动后的排序
|
|
2595
|
+
if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return; //获取拖动后的排序
|
|
1801
2596
|
let data = getSortableResult(newIndex, oldIndex);
|
|
1802
2597
|
if (data.length) emit('drag-end', data);
|
|
1803
2598
|
else evt.from.innerHTML = initialHTML;
|
|
1804
2599
|
},
|
|
1805
2600
|
onStart (evt) {
|
|
1806
|
-
// 在拖拽开始时,记录当前容器的 HTML
|
|
1807
2601
|
initialHTML = evt.from.innerHTML;
|
|
1808
2602
|
}
|
|
1809
2603
|
});
|
|
@@ -1816,11 +2610,14 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1816
2610
|
let [, result] = await queryDbgridComponentByExample({
|
|
1817
2611
|
componentNo: props.componentNo || ''
|
|
1818
2612
|
});
|
|
1819
|
-
if (result?.success)
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
2613
|
+
if (result?.success) {
|
|
2614
|
+
exportFileFlag.value = result.data.exportFileFlag;
|
|
2615
|
+
try {
|
|
2616
|
+
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
2617
|
+
serveColumns.value = column;
|
|
2618
|
+
} catch (error) {
|
|
2619
|
+
console.log(error);
|
|
2620
|
+
}
|
|
1824
2621
|
}
|
|
1825
2622
|
}
|
|
1826
2623
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.componentNo, ()=>{
|
|
@@ -1829,50 +2626,45 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1829
2626
|
immediate: true
|
|
1830
2627
|
});
|
|
1831
2628
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
1832
|
-
// 支持拖拽排序
|
|
1833
2629
|
if (props.draggable) (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
1834
2630
|
initDragSort();
|
|
1835
2631
|
});
|
|
1836
2632
|
if (props.pagination && props?.fetchData && props.defaultQuery) fetchList();
|
|
1837
|
-
});
|
|
1838
|
-
/**
|
|
2633
|
+
}); /**
|
|
1839
2634
|
* 获取列表
|
|
1840
|
-
*/
|
|
2635
|
+
*/
|
|
2636
|
+
async function fetchList() {
|
|
1841
2637
|
state.loading = true;
|
|
1842
2638
|
let { total = 0, data = [] } = await (props.fetchData && props.fetchData(state.pageInfo)) || {};
|
|
1843
2639
|
state.pageInfo.total = Number(total);
|
|
1844
2640
|
state.tableData = data;
|
|
1845
2641
|
state.loading = false;
|
|
1846
|
-
}
|
|
1847
|
-
/**
|
|
2642
|
+
} /**
|
|
1848
2643
|
* 分页组件改变 pageNumber 事件
|
|
1849
|
-
*/
|
|
2644
|
+
*/
|
|
2645
|
+
const handleSizeChange = (val)=>{
|
|
1850
2646
|
if (props.fetchData) {
|
|
1851
2647
|
state.pageInfo.pageNumber = 1;
|
|
1852
2648
|
state.pageInfo.pageSize = val;
|
|
1853
2649
|
fetchList();
|
|
1854
2650
|
} else emit('size-page-change', val);
|
|
1855
|
-
};
|
|
1856
|
-
/**
|
|
2651
|
+
}; /**
|
|
1857
2652
|
* 分页组件改变 当前页数 事件
|
|
1858
|
-
*/
|
|
2653
|
+
*/
|
|
2654
|
+
function changeCurrentPage(val) {
|
|
1859
2655
|
if (props.fetchData) {
|
|
1860
2656
|
state.pageInfo.pageNumber = val;
|
|
1861
2657
|
fetchList();
|
|
1862
2658
|
} else emit('current-page-change', val);
|
|
1863
2659
|
}
|
|
1864
|
-
|
|
1865
|
-
const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1866
|
-
const selections = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
1867
|
-
// 设置当前行激活态
|
|
2660
|
+
const selections = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); // 设置当前行激活态
|
|
1868
2661
|
const setCurrentRow = (row)=>{
|
|
1869
2662
|
if (proTableRef.value) proTableRef.value.setCurrentRow(row);
|
|
1870
|
-
};
|
|
1871
|
-
|
|
1872
|
-
const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo);
|
|
1873
|
-
/**
|
|
2663
|
+
}; // 分页配置信息
|
|
2664
|
+
const paginationInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>props.pageInfo ?? state.pageInfo); /**
|
|
1874
2665
|
* 支持根据传递的filterObj完成过滤
|
|
1875
|
-
*/
|
|
2666
|
+
*/
|
|
2667
|
+
const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1876
2668
|
if (Object.keys(props.filterObj).length) return [
|
|
1877
2669
|
...state.tableData
|
|
1878
2670
|
].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
|
|
@@ -1901,7 +2693,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1901
2693
|
}
|
|
1902
2694
|
}),
|
|
1903
2695
|
validateRow: (index, callback)=>{
|
|
1904
|
-
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${item.
|
|
2696
|
+
const validateProps = props.columns.filter((item)=>item.rules).map((item)=>`tableData.${index}.${String(item.dataKey)}`);
|
|
1905
2697
|
return formRef.value.validateField(validateProps, callback);
|
|
1906
2698
|
},
|
|
1907
2699
|
fetchList: (init = true, initPageInfo = {
|
|
@@ -1913,58 +2705,104 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1913
2705
|
};
|
|
1914
2706
|
fetchList();
|
|
1915
2707
|
}
|
|
1916
|
-
});
|
|
1917
|
-
/**
|
|
2708
|
+
}); /**
|
|
1918
2709
|
* 处理接口和本地的columns
|
|
1919
|
-
*/
|
|
2710
|
+
*/
|
|
2711
|
+
const commonColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1920
2712
|
if (!props.componentNo) return props.columns;
|
|
1921
2713
|
{
|
|
1922
2714
|
let result = [
|
|
1923
2715
|
...props.columns
|
|
1924
2716
|
].map((cur)=>({
|
|
1925
|
-
displayFlag: cur.
|
|
2717
|
+
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,
|
|
2718
|
+
align: cur.align || 'center',
|
|
1926
2719
|
...cur
|
|
1927
2720
|
}));
|
|
1928
2721
|
if (serveColumns.value?.length) {
|
|
1929
2722
|
result = result.map((item, index)=>{
|
|
1930
|
-
let findObj = serveColumns.value.find((cur)=>cur.prop === item.
|
|
2723
|
+
let findObj = serveColumns.value.find((cur)=>cur.prop === item.dataKey);
|
|
1931
2724
|
return {
|
|
1932
|
-
displayFlag: item.
|
|
2725
|
+
displayFlag: item.hidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
|
|
1933
2726
|
...item,
|
|
1934
2727
|
sort: index + 1,
|
|
1935
2728
|
...findObj,
|
|
1936
|
-
|
|
1937
|
-
|
|
2729
|
+
title: item.title || findObj.label,
|
|
2730
|
+
hidden: item.hidden || findObj?.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO
|
|
1938
2731
|
};
|
|
1939
2732
|
});
|
|
1940
2733
|
result.sort((a, b)=>Number(a.sort) - Number(b.sort));
|
|
1941
2734
|
}
|
|
1942
|
-
return result
|
|
2735
|
+
return result.map((item)=>({
|
|
2736
|
+
...item,
|
|
2737
|
+
label: item.title,
|
|
2738
|
+
prop: item.dataKey,
|
|
2739
|
+
minWidth: item.minWidth || item.width,
|
|
2740
|
+
width: void 0
|
|
2741
|
+
}));
|
|
1943
2742
|
}
|
|
1944
2743
|
});
|
|
1945
|
-
|
|
2744
|
+
function SelectionCell({ value, intermediate, onChange }) {
|
|
2745
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElCheckbox, {
|
|
2746
|
+
onChange: onChange,
|
|
2747
|
+
modelValue: value,
|
|
2748
|
+
indeterminate: intermediate
|
|
2749
|
+
}, null, 8, [
|
|
2750
|
+
"onChange",
|
|
2751
|
+
"modelValue",
|
|
2752
|
+
"indeterminate"
|
|
2753
|
+
]);
|
|
2754
|
+
} /**
|
|
1946
2755
|
* 表格渲染存在设置标志的情况 左边宽度加个40px
|
|
1947
|
-
*/
|
|
2756
|
+
*/
|
|
2757
|
+
const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
1948
2758
|
let result = [
|
|
1949
2759
|
...commonColumns.value
|
|
1950
2760
|
];
|
|
1951
2761
|
if (props.componentNo) {
|
|
1952
2762
|
result = result.map((item, index)=>({
|
|
1953
2763
|
...item,
|
|
2764
|
+
width: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth,
|
|
1954
2765
|
minWidth: 0 === index ? (item.minWidth || 40) + 40 : item.minWidth
|
|
1955
2766
|
}));
|
|
1956
|
-
if (
|
|
2767
|
+
if (exportFileFlag.value && !result.find((cur)=>cur.key === pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION)) result = [
|
|
1957
2768
|
{
|
|
1958
|
-
|
|
1959
|
-
|
|
2769
|
+
key: pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION,
|
|
2770
|
+
width: 100,
|
|
2771
|
+
align: 'center',
|
|
2772
|
+
cellRenderer: ({ rowData })=>{
|
|
2773
|
+
const onChange = (value)=>rowData.checked = value;
|
|
2774
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(SelectionCell, {
|
|
2775
|
+
value: rowData.checked,
|
|
2776
|
+
onChange: onChange
|
|
2777
|
+
}, null, 8, [
|
|
2778
|
+
"value",
|
|
2779
|
+
"onChange"
|
|
2780
|
+
]);
|
|
2781
|
+
},
|
|
2782
|
+
headerCellRenderer: ()=>{
|
|
2783
|
+
const onChange = (value)=>state.tableData = state.tableData.map((row)=>{
|
|
2784
|
+
row.checked = value;
|
|
2785
|
+
return row;
|
|
2786
|
+
});
|
|
2787
|
+
const allSelected = !!state.tableData.length && state.tableData.every((row)=>row.checked);
|
|
2788
|
+
const containsChecked = state.tableData.some((row)=>row.checked);
|
|
2789
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(SelectionCell, {
|
|
2790
|
+
value: allSelected,
|
|
2791
|
+
intermediate: containsChecked && !allSelected,
|
|
2792
|
+
onChange: onChange
|
|
2793
|
+
}, null, 8, [
|
|
2794
|
+
"value",
|
|
2795
|
+
"intermediate",
|
|
2796
|
+
"onChange"
|
|
2797
|
+
]);
|
|
2798
|
+
}
|
|
1960
2799
|
},
|
|
1961
2800
|
...result
|
|
1962
2801
|
];
|
|
1963
2802
|
}
|
|
1964
2803
|
return result.filter((item)=>!item.isHidden && !(props.componentNo && !serveColumns.value?.length && item.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO));
|
|
1965
2804
|
});
|
|
1966
|
-
|
|
1967
|
-
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, [
|
|
2805
|
+
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, [
|
|
1968
2806
|
props?.draggable || props?.isShowDragTips ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
1969
2807
|
key: 0,
|
|
1970
2808
|
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
|
|
@@ -1977,7 +2815,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1977
2815
|
props.dragTipsClassName
|
|
1978
2816
|
])
|
|
1979
2817
|
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(props.dragTips), 7)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
1980
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(
|
|
2818
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(composables_TableContainer, {
|
|
1981
2819
|
ref_key: "formRef",
|
|
1982
2820
|
ref: formRef,
|
|
1983
2821
|
editable: _ctx.editable,
|
|
@@ -1985,116 +2823,42 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
1985
2823
|
class: "flex flex-1 flex-col overflow-hidden"
|
|
1986
2824
|
}, {
|
|
1987
2825
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
"
|
|
2826
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(composables_Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2827
|
+
id: uuid.value,
|
|
2828
|
+
"export-file-flag": exportFileFlag.value,
|
|
1991
2829
|
"component-no": props.componentNo,
|
|
1992
2830
|
"columns-setting": props.columnsSetting,
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
}, null, 8, [
|
|
1998
|
-
"table-data",
|
|
1999
|
-
"component-no",
|
|
2000
|
-
"columns-setting",
|
|
2001
|
-
"columns"
|
|
2002
|
-
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
2003
|
-
(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)({
|
|
2004
|
-
id: uuid.value,
|
|
2005
|
-
ref_key: "proTableRef",
|
|
2006
|
-
ref: proTableRef,
|
|
2831
|
+
loading: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading,
|
|
2832
|
+
onSuccess: fetchDbgridComponent,
|
|
2833
|
+
ref_key: "tableRef",
|
|
2834
|
+
ref: tableRef,
|
|
2007
2835
|
data: tableData.value,
|
|
2008
|
-
style: {
|
|
2009
|
-
width: "100%"
|
|
2010
|
-
},
|
|
2011
|
-
class: "min-h-0 flex-1 overflow-auto",
|
|
2012
2836
|
"row-key": props.rowKey,
|
|
2013
|
-
"
|
|
2014
|
-
|
|
2015
|
-
}, _ctx.$attrs
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
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)({
|
|
2019
|
-
key: 0,
|
|
2020
|
-
ref_for: true
|
|
2021
|
-
}, item, {
|
|
2022
|
-
width: item.minWidth || item.width,
|
|
2023
|
-
key: item.prop ?? index,
|
|
2024
|
-
align: item.align ?? 'center',
|
|
2025
|
-
"reserve-selection": 'selection' == item.type
|
|
2026
|
-
}), {
|
|
2027
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)((scope)=>[
|
|
2028
|
-
'expand' == item.type ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
2029
|
-
key: 0
|
|
2030
|
-
}, [
|
|
2031
|
-
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)), {
|
|
2032
|
-
key: 0
|
|
2033
|
-
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, item.type, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2034
|
-
key: 1,
|
|
2035
|
-
ref_for: true
|
|
2036
|
-
}, scope))
|
|
2037
|
-
], 64)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
2038
|
-
'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), {
|
|
2039
|
-
key: 1,
|
|
2040
|
-
class: "move"
|
|
2041
|
-
}, {
|
|
2042
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2043
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
|
|
2044
|
-
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2045
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.DCaret))
|
|
2046
|
-
]),
|
|
2047
|
-
_: 1
|
|
2048
|
-
})
|
|
2049
|
-
]),
|
|
2050
|
-
_: 1
|
|
2051
|
-
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
2052
|
-
]),
|
|
2053
|
-
_: 2
|
|
2054
|
-
}, 1040, [
|
|
2055
|
-
"width",
|
|
2056
|
-
"align",
|
|
2057
|
-
"reserve-selection"
|
|
2058
|
-
])) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(composables_TableColumn), {
|
|
2059
|
-
key: 1,
|
|
2060
|
-
column: item
|
|
2061
|
-
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.createSlots)({
|
|
2062
|
-
_: 2
|
|
2063
|
-
}, [
|
|
2064
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(Object.keys(_ctx.$slots), (slot)=>({
|
|
2065
|
-
name: slot,
|
|
2066
|
-
fn: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)((scope)=>[
|
|
2067
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, slot, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2068
|
-
ref_for: true
|
|
2069
|
-
}, scope))
|
|
2070
|
-
])
|
|
2071
|
-
}))
|
|
2072
|
-
]), 1032, [
|
|
2073
|
-
"column"
|
|
2074
|
-
]))
|
|
2075
|
-
], 64))), 256))
|
|
2076
|
-
]),
|
|
2077
|
-
_: 3
|
|
2078
|
-
}, 16, [
|
|
2837
|
+
"common-columns": commonColumns.value,
|
|
2838
|
+
"table-columns": tableColumns.value
|
|
2839
|
+
}, _ctx.$attrs, {
|
|
2840
|
+
draggable: props.draggable
|
|
2841
|
+
}), null, 16, [
|
|
2079
2842
|
"id",
|
|
2843
|
+
"export-file-flag",
|
|
2844
|
+
"component-no",
|
|
2845
|
+
"columns-setting",
|
|
2846
|
+
"loading",
|
|
2080
2847
|
"data",
|
|
2081
2848
|
"row-key",
|
|
2082
|
-
"
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.vLoading),
|
|
2086
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading
|
|
2087
|
-
]
|
|
2849
|
+
"common-columns",
|
|
2850
|
+
"table-columns",
|
|
2851
|
+
"draggable"
|
|
2088
2852
|
])
|
|
2089
2853
|
]),
|
|
2090
|
-
_:
|
|
2854
|
+
_: 1
|
|
2091
2855
|
}, 8, [
|
|
2092
2856
|
"editable",
|
|
2093
2857
|
"model"
|
|
2094
2858
|
]),
|
|
2095
|
-
props.pagination ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div",
|
|
2859
|
+
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, [
|
|
2096
2860
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "pagination"),
|
|
2097
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(
|
|
2861
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(composables_Pagination, {
|
|
2098
2862
|
class: "w-full flex justify-end",
|
|
2099
2863
|
layout: props.layout,
|
|
2100
2864
|
"page-info": paginationInfo.value,
|
|
@@ -2110,8 +2874,8 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_SELECTION = 'sel
|
|
|
2110
2874
|
]));
|
|
2111
2875
|
}
|
|
2112
2876
|
});
|
|
2113
|
-
const
|
|
2114
|
-
/* ESM default export */ const
|
|
2877
|
+
const pro_table_v2_exports_ = pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable;
|
|
2878
|
+
/* ESM default export */ const pro_table_v2 = pro_table_v2_exports_;
|
|
2115
2879
|
/**
|
|
2116
2880
|
* 1-10115-1 根据条件查询菜单的检索方式列表(业务态)
|
|
2117
2881
|
* @param params
|
|
@@ -2120,7 +2884,7 @@ const pro_table_exports_ = pro_tablevue_type_script_lang_ts_setup_true_name_ProT
|
|
|
2120
2884
|
const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)("/bizsearch/queryBizDataListByExample", {
|
|
2121
2885
|
...params,
|
|
2122
2886
|
pageSize: 100,
|
|
2123
|
-
|
|
2887
|
+
pageNumber: 1
|
|
2124
2888
|
});
|
|
2125
2889
|
/**
|
|
2126
2890
|
* [4-10073-1] 根据业务标识获取Banner数据
|
|
@@ -3464,7 +4228,7 @@ const _hoisted_10 = {
|
|
|
3464
4228
|
class: "mr-2"
|
|
3465
4229
|
};
|
|
3466
4230
|
const _hoisted_11 = {
|
|
3467
|
-
class: "text-[#
|
|
4231
|
+
class: "text-[#555]"
|
|
3468
4232
|
};
|
|
3469
4233
|
const _hoisted_12 = {
|
|
3470
4234
|
class: "w-full"
|
|
@@ -3530,10 +4294,11 @@ const _hoisted_12 = {
|
|
|
3530
4294
|
return (_ctx, _cache)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", {
|
|
3531
4295
|
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
3532
4296
|
{
|
|
3533
|
-
['bg-
|
|
4297
|
+
['bg-fill-lighter']: _ctx.isBg
|
|
3534
4298
|
},
|
|
3535
4299
|
"flex px-[10px] py-2 text-base text-black items-center"
|
|
3536
|
-
])
|
|
4300
|
+
]),
|
|
4301
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)(_ctx.isBg ? "border-top: 1px solid #dfebff" : '')
|
|
3537
4302
|
}, [
|
|
3538
4303
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_1, [
|
|
3539
4304
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("div", BannerInfovue_type_script_setup_true_lang_ts_name_bannerComponent_hoisted_2, [
|
|
@@ -3620,7 +4385,7 @@ const _hoisted_12 = {
|
|
|
3620
4385
|
], 32)
|
|
3621
4386
|
], 2))), 128))
|
|
3622
4387
|
], 2)
|
|
3623
|
-
],
|
|
4388
|
+
], 6)), [
|
|
3624
4389
|
[
|
|
3625
4390
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.vLoading),
|
|
3626
4391
|
loading.value
|
|
@@ -4866,6 +5631,8 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
4866
5631
|
dataSearchBizIdTypeCode: props.dataSearchBizIdTypeCode || '',
|
|
4867
5632
|
keyWord: value,
|
|
4868
5633
|
sysMenuId: menuId || '',
|
|
5634
|
+
pageNumber: 1,
|
|
5635
|
+
pageSize: 100,
|
|
4869
5636
|
hospitalId: currentOrg?.orgId || '',
|
|
4870
5637
|
...params
|
|
4871
5638
|
});
|
|
@@ -4925,7 +5692,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
4925
5692
|
const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_selectvue_type_script_setup_true_lang_ts, [
|
|
4926
5693
|
[
|
|
4927
5694
|
'__scopeId',
|
|
4928
|
-
"data-v-
|
|
5695
|
+
"data-v-04804e6c"
|
|
4929
5696
|
]
|
|
4930
5697
|
]);
|
|
4931
5698
|
/* ESM default export */ const dict_select = dict_select_exports_;
|
|
@@ -6119,13 +6886,13 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
6119
6886
|
};
|
|
6120
6887
|
}
|
|
6121
6888
|
});
|
|
6122
|
-
const
|
|
6889
|
+
const form_design_render_composables_Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_script_setup_true_lang_tsx, [
|
|
6123
6890
|
[
|
|
6124
6891
|
'__scopeId',
|
|
6125
6892
|
"data-v-7c43a384"
|
|
6126
6893
|
]
|
|
6127
6894
|
]);
|
|
6128
|
-
/* ESM default export */ const
|
|
6895
|
+
/* ESM default export */ const form_design_render_composables_Table = form_design_render_composables_Table_exports_;
|
|
6129
6896
|
/* ESM default export */ const Setvue_type_script_setup_true_lang_tsx_name_Set = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6130
6897
|
__name: 'Set',
|
|
6131
6898
|
props: {
|
|
@@ -6289,7 +7056,7 @@ const Other_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Othervue_type_
|
|
|
6289
7056
|
const dynamicRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(null);
|
|
6290
7057
|
const components = {
|
|
6291
7058
|
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.COLLAPSE]: Collapse,
|
|
6292
|
-
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.TABLE]:
|
|
7059
|
+
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.TABLE]: form_design_render_composables_Table,
|
|
6293
7060
|
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.SET]: Set
|
|
6294
7061
|
};
|
|
6295
7062
|
__expose({
|
|
@@ -6653,4 +7420,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
|
|
|
6653
7420
|
]);
|
|
6654
7421
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
|
6655
7422
|
/** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
|
|
6656
|
-
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, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, 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, debounce, decimalCount, formatDecimalNumber, isNumber, print, use_app_config as useAppConfigData, useColumnConfig, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|
|
7423
|
+
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, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, 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, debounce, decimalCount, formatDecimalNumber, isNumber, print, use_app_config as useAppConfigData, useColumnConfig, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
|