sun-biz 0.0.3-beta.21 → 0.0.3-beta.23
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 +1286 -428
- package/dist/components/print/print.d.ts +3 -3
- package/dist/components/print/template.d.ts +1 -1
- 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 +1287 -429
- 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
|
-
class: ""
|
|
1520
|
-
}, {
|
|
1655
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
|
|
1521
1656
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
1522
1657
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.Setting))
|
|
1523
1658
|
]),
|
|
1524
1659
|
_: 1
|
|
1525
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"
|
|
1526
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"
|
|
2204
|
+
}, {
|
|
2205
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
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
|
+
])
|
|
2233
|
+
]),
|
|
2234
|
+
_: 1
|
|
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)
|
|
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
|
|
@@ -3643,6 +4408,7 @@ const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_ba
|
|
|
3643
4408
|
const templateModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({
|
|
3644
4409
|
templateId: ""
|
|
3645
4410
|
});
|
|
4411
|
+
const operation = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
|
|
3646
4412
|
const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
3647
4413
|
templateId: [
|
|
3648
4414
|
{
|
|
@@ -3667,9 +4433,11 @@ const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_ba
|
|
|
3667
4433
|
};
|
|
3668
4434
|
// 提交
|
|
3669
4435
|
const handleConfirmSubmit = async ()=>{
|
|
4436
|
+
operation.value = "";
|
|
3670
4437
|
await formRef.value?.validate();
|
|
3671
4438
|
const printTemplate = printTemplateList.value.find((item)=>item.receiptTemplateRuleId === templateModel.value.templateId);
|
|
3672
4439
|
await props.onTemplateConfirm(printTemplate);
|
|
4440
|
+
operation.value = "confirm";
|
|
3673
4441
|
return [];
|
|
3674
4442
|
};
|
|
3675
4443
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
@@ -3687,11 +4455,10 @@ const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_ba
|
|
|
3687
4455
|
"destroy-on-close": true,
|
|
3688
4456
|
"confirm-fn": ()=>handleConfirmSubmit(),
|
|
3689
4457
|
"align-center": true,
|
|
3690
|
-
|
|
3691
|
-
(
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
}
|
|
4458
|
+
onClose: _cache[1] || (_cache[1] = async ()=>{
|
|
4459
|
+
if (!operation.value || 'cancel' === operation.value) await props.onTemplateConfirm(void 0, 'cancel');
|
|
4460
|
+
}),
|
|
4461
|
+
onCancel: _cache[2] || (_cache[2] = ($event)=>operation.value = 'cancel')
|
|
3695
4462
|
}, {
|
|
3696
4463
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
3697
4464
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElForm), {
|
|
@@ -3740,8 +4507,7 @@ const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_ba
|
|
|
3740
4507
|
]),
|
|
3741
4508
|
_: 1
|
|
3742
4509
|
}, 8, [
|
|
3743
|
-
"confirm-fn"
|
|
3744
|
-
"before-close"
|
|
4510
|
+
"confirm-fn"
|
|
3745
4511
|
]));
|
|
3746
4512
|
}
|
|
3747
4513
|
});
|
|
@@ -4175,110 +4941,184 @@ const createPrint = ()=>{
|
|
|
4175
4941
|
});
|
|
4176
4942
|
let defaultContext = initData();
|
|
4177
4943
|
let isLocalPrint = false;
|
|
4944
|
+
let breakPrint = false;
|
|
4178
4945
|
/** 获取当前是否是本地打印 */ const getIsLocalPrint = ()=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.getAppData)("isLocalPrint");
|
|
4946
|
+
/** 校验方法提取 */ const validateRequired = (value, errorMessage)=>{
|
|
4947
|
+
if (null == value) {
|
|
4948
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error(errorMessage);
|
|
4949
|
+
breakPrint = true;
|
|
4950
|
+
return false;
|
|
4951
|
+
}
|
|
4952
|
+
return true;
|
|
4953
|
+
};
|
|
4954
|
+
/** 校验参数是否都传了 */ const validateParams = (params)=>{
|
|
4955
|
+
if (!validateRequired(params?.designFlag, "设计时标志不能为空")) return;
|
|
4956
|
+
if (!validateRequired(params?.sysMenuId, "系统菜单标识不能为空")) return;
|
|
4957
|
+
if (!validateRequired(params?.receiptId, "单据标识不能为空")) return;
|
|
4958
|
+
if (!validateRequired(params?.bizIdTypeCode, "业务标识类型代码不能为空")) return;
|
|
4959
|
+
if (!validateRequired(params?.bizIds, "业务标识集合不能为空")) return;
|
|
4960
|
+
if (params?.bizIds?.length === 0) {
|
|
4961
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("业务标识集合不能为空");
|
|
4962
|
+
breakPrint = true;
|
|
4963
|
+
return;
|
|
4964
|
+
}
|
|
4965
|
+
if (!validateRequired(params?.printType, "打印类型不能为空")) return;
|
|
4966
|
+
if (!validateRequired(params?.formOperationType, "打印类别不能为空")) return;
|
|
4967
|
+
if (params?.invoiceInfo) {
|
|
4968
|
+
if (!validateRequired(params?.invoiceInfo?.invOperateTypeCode, "票据操作类型代码不能为空")) return;
|
|
4969
|
+
if (!validateRequired(params?.invoiceInfo?.invoiceAllotId, "票据分配标识不能为空")) return;
|
|
4970
|
+
if (!validateRequired(params?.invoiceInfo?.invoiceUsageCode, "票据用途代码不能为空")) return;
|
|
4971
|
+
}
|
|
4972
|
+
};
|
|
4179
4973
|
// 打印
|
|
4180
4974
|
const printStart = async (params)=>{
|
|
4181
|
-
/** 初始化 */
|
|
4975
|
+
/** 初始化 */ breakPrint = false;
|
|
4976
|
+
validateParams(params);
|
|
4977
|
+
if (breakPrint) return;
|
|
4978
|
+
defaultContext = initData();
|
|
4182
4979
|
isLocalPrint = getIsLocalPrint();
|
|
4183
4980
|
defaultContext.printParams = params;
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
await
|
|
4189
|
-
if (
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4981
|
+
/** 1.查询单据信息 */ await fetchReceiptInfo();
|
|
4982
|
+
if (breakPrint) return;
|
|
4983
|
+
/** 2.弹窗询问 */ if (defaultContext?.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) await dialogAsk();
|
|
4984
|
+
if (breakPrint) return;
|
|
4985
|
+
/** 3.模版选择 */ await selectPrintTemplateFn();
|
|
4986
|
+
if (breakPrint) return;
|
|
4987
|
+
/** 5.单据重新组织分单 */ await splitReceiptFn();
|
|
4988
|
+
if (breakPrint) return;
|
|
4989
|
+
/** 6.票据组织分单 */ await splitInvoiceFn();
|
|
4990
|
+
if (breakPrint) return;
|
|
4991
|
+
return await printLoop();
|
|
4194
4992
|
};
|
|
4195
4993
|
/**
|
|
4196
|
-
*
|
|
4994
|
+
* 1.获取单据信息
|
|
4197
4995
|
*/ const fetchReceiptInfo = async ()=>{
|
|
4198
|
-
const [, res] = await queryReceiptByExample({
|
|
4996
|
+
const [err, res] = await queryReceiptByExample({
|
|
4199
4997
|
receiptIds: [
|
|
4200
4998
|
defaultContext.printParams?.receiptId
|
|
4201
4999
|
]
|
|
4202
5000
|
});
|
|
4203
|
-
if (
|
|
5001
|
+
if (err) {
|
|
5002
|
+
breakPrint = true;
|
|
5003
|
+
return;
|
|
5004
|
+
}
|
|
5005
|
+
if (!res?.data || res?.data?.length === 0) {
|
|
5006
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("单据不存在");
|
|
5007
|
+
breakPrint = true;
|
|
5008
|
+
return;
|
|
5009
|
+
}
|
|
5010
|
+
// 更新 defaultContext
|
|
5011
|
+
defaultContext = {
|
|
4204
5012
|
...defaultContext,
|
|
4205
5013
|
receiptInfo: res.data[0]
|
|
4206
5014
|
};
|
|
4207
5015
|
};
|
|
4208
5016
|
/**
|
|
4209
|
-
*
|
|
5017
|
+
* 2.弹窗询问
|
|
4210
5018
|
*/ const dialogAsk = async ()=>{
|
|
4211
|
-
if (defaultContext?.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES) return nextAction();
|
|
4212
5019
|
const { receiptPrintRuleCode, receiptPrintCategCode, receiptNameDisplay, menuXReceiptList } = defaultContext.receiptInfo || {};
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
// 按菜单
|
|
5020
|
+
if (!receiptPrintRuleCode) return;
|
|
5021
|
+
let code = receiptPrintCategCode;
|
|
4216
5022
|
if (receiptPrintRuleCode === constant_RECEIPT_PRINT_RULE_CODE.MENU) {
|
|
4217
|
-
//获取菜单打印配置信息
|
|
4218
5023
|
const menuReceiptInfo = menuXReceiptList?.find((item)=>item.sysXMenuId === defaultContext.printParams?.sysMenuId);
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
5024
|
+
code = menuReceiptInfo?.receiptPrintCategCode || receiptPrintCategCode;
|
|
5025
|
+
}
|
|
5026
|
+
const isConfirmed = await messageBoxAskJudge(code, receiptNameDisplay);
|
|
5027
|
+
if (!isConfirmed) {
|
|
5028
|
+
breakPrint = true; // 如果用户取消操作,设置 breakPrint 为 true
|
|
5029
|
+
return;
|
|
4222
5030
|
}
|
|
4223
5031
|
};
|
|
4224
5032
|
/**
|
|
4225
|
-
*
|
|
5033
|
+
* 2.弹窗询问判断方法
|
|
4226
5034
|
*/ const messageBoxAskJudge = async (receiptPrintCategCode, receiptNameDisplay)=>{
|
|
4227
5035
|
if (receiptPrintCategCode === constant_RECEIPT_PRINT_CATEG_CODE.ASK_PRINT || receiptPrintCategCode === constant_RECEIPT_PRINT_CATEG_CODE.ASK_ISSUE_NO_PRINT) return await messageBoxAsk(receiptPrintCategCode, receiptNameDisplay);
|
|
4228
|
-
return
|
|
5036
|
+
return true;
|
|
4229
5037
|
};
|
|
4230
5038
|
/**
|
|
4231
|
-
* ElMessageBox询问
|
|
5039
|
+
* 2.弹窗询问ElMessageBox询问
|
|
4232
5040
|
*/ const messageBoxAsk = async (code, receiptNameDisplay)=>{
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
return data;
|
|
5041
|
+
try {
|
|
5042
|
+
await __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessageBox.confirm(`是否${code === constant_RECEIPT_PRINT_CATEG_CODE.ASK_PRINT ? "打印" : "开具"} ${receiptNameDisplay}`, "提示", {
|
|
5043
|
+
confirmButtonText: "确定",
|
|
5044
|
+
cancelButtonText: "取消",
|
|
5045
|
+
type: "warning"
|
|
5046
|
+
});
|
|
5047
|
+
// 如果用户点击了“确定”,返回 true
|
|
5048
|
+
return true;
|
|
5049
|
+
} catch (error) {
|
|
5050
|
+
// 如果用户点击了“取消”、关闭按钮、遮罩层或按 ESC 键,返回 false
|
|
5051
|
+
return false;
|
|
5052
|
+
}
|
|
4246
5053
|
};
|
|
4247
|
-
/**
|
|
4248
|
-
* 打印模板选择
|
|
4249
|
-
*/ const printTemplateFn = async ()=>{
|
|
5054
|
+
/** 3.模板选择 */ const selectPrintTemplateFn = async ()=>{
|
|
4250
5055
|
const { chooseReceiptTemplateRuleList, receiptNameDisplay } = defaultContext?.receiptInfo || {};
|
|
4251
|
-
//
|
|
5056
|
+
// 过滤出启用的模板
|
|
4252
5057
|
defaultContext.printTemplateList = chooseReceiptTemplateRuleList?.filter((item)=>item.enabledFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES) ?? [];
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
onTemplateConfirm: templateConfirm
|
|
4256
|
-
});
|
|
4257
|
-
else if (defaultContext?.printTemplateList.length === 1) {
|
|
4258
|
-
defaultContext.printTemplate = defaultContext?.printTemplateList[0];
|
|
4259
|
-
await splitReceiptFn();
|
|
4260
|
-
return await printLoop();
|
|
4261
|
-
} else {
|
|
5058
|
+
// 如果没有有效的模板,报错并返回 false
|
|
5059
|
+
if (0 === defaultContext.printTemplateList.length) {
|
|
4262
5060
|
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error(`${receiptNameDisplay} 没有有效的模板`);
|
|
4263
|
-
|
|
5061
|
+
breakPrint = true;
|
|
5062
|
+
return;
|
|
5063
|
+
}
|
|
5064
|
+
// 如果只有一条模板,直接选中
|
|
5065
|
+
if (1 === defaultContext.printTemplateList.length) {
|
|
5066
|
+
defaultContext.printTemplate = defaultContext.printTemplateList[0];
|
|
5067
|
+
return;
|
|
4264
5068
|
}
|
|
5069
|
+
// 如果有多条模板,弹出选择框
|
|
5070
|
+
if (defaultContext.printTemplateList.length > 1) return new Promise((resolve)=>{
|
|
5071
|
+
createPrintTemplate({
|
|
5072
|
+
printTemplateList: defaultContext.printTemplateList,
|
|
5073
|
+
onTemplateConfirm: async (template, operation)=>{
|
|
5074
|
+
await templateConfirm(template, operation);
|
|
5075
|
+
resolve(); // 用户选择完成后解析Promise
|
|
5076
|
+
}
|
|
5077
|
+
});
|
|
5078
|
+
});
|
|
4265
5079
|
};
|
|
4266
5080
|
/**
|
|
4267
|
-
*
|
|
4268
|
-
*/ const templateConfirm = async (template)=>{
|
|
4269
|
-
defaultContext.printTemplate = template;
|
|
4270
|
-
|
|
4271
|
-
|
|
5081
|
+
* 3.模板选择
|
|
5082
|
+
*/ const templateConfirm = async (template, operation)=>{
|
|
5083
|
+
if (template) defaultContext.printTemplate = template;
|
|
5084
|
+
if ("cancel" === operation) {
|
|
5085
|
+
breakPrint = true;
|
|
5086
|
+
return;
|
|
5087
|
+
}
|
|
4272
5088
|
};
|
|
4273
|
-
/**
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
if (defaultContext.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) {
|
|
4277
|
-
//5
|
|
5089
|
+
/** 5.组织单据分单 */ const splitReceiptFn = async ()=>{
|
|
5090
|
+
if (defaultContext.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) //5
|
|
5091
|
+
{
|
|
4278
5092
|
if (!defaultContext?.printParams?.dataSourceContent && (defaultContext?.receiptInfo?.invoiceFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO || defaultContext?.receiptInfo?.invoiceFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.ISSUE)) await receiptSplitResultFn();
|
|
4279
|
-
|
|
5093
|
+
}
|
|
5094
|
+
};
|
|
5095
|
+
/**
|
|
5096
|
+
* 5.单据分单接口
|
|
5097
|
+
*/ const receiptSplitResultFn = async ()=>{
|
|
5098
|
+
const [err, res] = await splitReceipt({
|
|
5099
|
+
receiptId: defaultContext?.printParams?.receiptId,
|
|
5100
|
+
bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
|
|
5101
|
+
bizIds: defaultContext?.printParams?.bizIds
|
|
5102
|
+
});
|
|
5103
|
+
if (err) {
|
|
5104
|
+
breakPrint = true;
|
|
5105
|
+
return;
|
|
5106
|
+
}
|
|
5107
|
+
if (res?.success) {
|
|
5108
|
+
if (res.data?.receiptDataSourceList && res.data?.receiptDataSourceList.length > 0) defaultContext.splitResult = res.data?.receiptDataSourceList;
|
|
5109
|
+
}
|
|
5110
|
+
};
|
|
5111
|
+
/** 6.组织票据分单 */ const splitInvoiceFn = async ()=>{
|
|
5112
|
+
if (defaultContext.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) //6
|
|
5113
|
+
{
|
|
4280
5114
|
if (defaultContext?.printParams?.invoiceInfo?.invoiceAllotId && defaultContext?.receiptInfo?.invoiceFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && defaultContext?.receiptInfo?.receiptPrintCategCode !== constant_RECEIPT_PRINT_CATEG_CODE.NO_PRINT) {
|
|
4281
|
-
const
|
|
5115
|
+
const interfaceId = defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId;
|
|
5116
|
+
if (!interfaceId) {
|
|
5117
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("单据未配置票据接口,无法开票!");
|
|
5118
|
+
breakPrint = true;
|
|
5119
|
+
return;
|
|
5120
|
+
}
|
|
5121
|
+
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4282
5122
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4283
5123
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4284
5124
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV001,
|
|
@@ -4287,6 +5127,10 @@ const createPrint = ()=>{
|
|
|
4287
5127
|
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId
|
|
4288
5128
|
}
|
|
4289
5129
|
});
|
|
5130
|
+
if (err) {
|
|
5131
|
+
breakPrint = true;
|
|
5132
|
+
return;
|
|
5133
|
+
}
|
|
4290
5134
|
if (res?.success) {
|
|
4291
5135
|
defaultContext.receiptAllotInfo = res?.data?.bizOutputParam ?? [];
|
|
4292
5136
|
await invoiceSplitResultFn();
|
|
@@ -4295,44 +5139,44 @@ const createPrint = ()=>{
|
|
|
4295
5139
|
}
|
|
4296
5140
|
};
|
|
4297
5141
|
/**
|
|
4298
|
-
*
|
|
4299
|
-
*/ const receiptSplitResultFn = async ()=>{
|
|
4300
|
-
const [, res] = await splitReceipt({
|
|
4301
|
-
receiptId: defaultContext?.printParams?.receiptId,
|
|
4302
|
-
bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
|
|
4303
|
-
bizIds: defaultContext?.printParams?.bizIds
|
|
4304
|
-
});
|
|
4305
|
-
if (res?.success) defaultContext.splitResult = res.data?.receiptDataSourceList ?? [];
|
|
4306
|
-
};
|
|
4307
|
-
/**
|
|
4308
|
-
* 票据分单
|
|
5142
|
+
* 6.票据分单
|
|
4309
5143
|
*/ const invoiceSplitResultFn = async ()=>{
|
|
4310
5144
|
// 票据操作类型代码---1开具
|
|
4311
5145
|
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.ISSUE) {
|
|
4312
5146
|
const invoiceInfo = (defaultContext?.receiptAllotInfo ?? [])[0];
|
|
4313
5147
|
if (invoiceInfo?.invoiceMediaTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_MEDIA_TYPE_CODE.ELECTRONIC && (defaultContext?.splitResult?.length ?? 0) < (invoiceInfo?.residueCount ?? 0)) {
|
|
4314
5148
|
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error(`当前票据数量不足,所需票据张数[${defaultContext?.splitResult?.length}],剩余张数[${invoiceInfo?.residueCount}]!`);
|
|
4315
|
-
|
|
5149
|
+
breakPrint = true;
|
|
5150
|
+
return;
|
|
4316
5151
|
}
|
|
4317
|
-
const
|
|
5152
|
+
const invoiceList = (defaultContext?.splitResult ?? []).map((item)=>({
|
|
5153
|
+
receiptSort: item.receiptSort,
|
|
5154
|
+
receiptSplitResultId: item.receiptSplitResultId,
|
|
5155
|
+
invoiceAmt: defaultContext?.printParams?.invoiceInfo?.invoiceAmt
|
|
5156
|
+
}));
|
|
5157
|
+
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4318
5158
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4319
5159
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4320
5160
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV101,
|
|
4321
5161
|
params: {
|
|
4322
|
-
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId,
|
|
4323
|
-
invoiceUsageCode: defaultContext?.printParams?.invoiceInfo?.invoiceUsageCode,
|
|
4324
|
-
orgIssueFlag: defaultContext?.printParams?.invoiceInfo?.orgIssueFlag,
|
|
5162
|
+
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId ?? void 0,
|
|
5163
|
+
invoiceUsageCode: defaultContext?.printParams?.invoiceInfo?.invoiceUsageCode ?? void 0,
|
|
5164
|
+
orgIssueFlag: defaultContext?.printParams?.invoiceInfo?.orgIssueFlag ?? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO,
|
|
4325
5165
|
issueOrgName: defaultContext?.printParams?.invoiceInfo?.issueOrgName,
|
|
4326
5166
|
socialCreditNo: defaultContext?.printParams?.invoiceInfo?.socialCreditNo,
|
|
4327
5167
|
invoiceMemo: defaultContext?.printParams?.invoiceInfo?.invoiceMemo,
|
|
4328
|
-
invoiceList:
|
|
5168
|
+
invoiceList: invoiceList ?? []
|
|
4329
5169
|
}
|
|
4330
5170
|
});
|
|
4331
|
-
if (
|
|
5171
|
+
if (err) {
|
|
5172
|
+
breakPrint = true;
|
|
5173
|
+
return;
|
|
5174
|
+
}
|
|
5175
|
+
if (res?.success) defaultContext.splitResult = res.data?.bizOutputParam ?? [];
|
|
4332
5176
|
}
|
|
4333
5177
|
// 票据操作类型代码---6重开
|
|
4334
5178
|
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.REOPEN) {
|
|
4335
|
-
const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
5179
|
+
const [error, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4336
5180
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4337
5181
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4338
5182
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV104,
|
|
@@ -4341,11 +5185,15 @@ const createPrint = ()=>{
|
|
|
4341
5185
|
invoiceIds: defaultContext?.printParams?.invoiceInfo?.invoiceIds
|
|
4342
5186
|
}
|
|
4343
5187
|
});
|
|
4344
|
-
if (
|
|
5188
|
+
if (error) {
|
|
5189
|
+
breakPrint = true;
|
|
5190
|
+
return;
|
|
5191
|
+
}
|
|
5192
|
+
if (res?.success) defaultContext.splitResult = res.data?.bizOutputParam ?? [];
|
|
4345
5193
|
}
|
|
4346
5194
|
// 票据操作类型代码---5换开
|
|
4347
5195
|
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.CHANGE) {
|
|
4348
|
-
const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
5196
|
+
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4349
5197
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4350
5198
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4351
5199
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV103,
|
|
@@ -4354,11 +5202,15 @@ const createPrint = ()=>{
|
|
|
4354
5202
|
invoiceIds: defaultContext?.printParams?.invoiceInfo?.invoiceIds
|
|
4355
5203
|
}
|
|
4356
5204
|
});
|
|
4357
|
-
if (
|
|
5205
|
+
if (err) {
|
|
5206
|
+
breakPrint = true;
|
|
5207
|
+
return;
|
|
5208
|
+
}
|
|
5209
|
+
if (res?.success) defaultContext.splitResult = res.data?.bizOutputParam ?? [];
|
|
4358
5210
|
}
|
|
4359
5211
|
// 票据操作类型代码---3红冲
|
|
4360
|
-
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.
|
|
4361
|
-
const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
5212
|
+
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.RED) {
|
|
5213
|
+
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4362
5214
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4363
5215
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4364
5216
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV102,
|
|
@@ -4367,14 +5219,18 @@ const createPrint = ()=>{
|
|
|
4367
5219
|
invoiceUsageCode: defaultContext?.printParams?.invoiceInfo?.invoiceUsageCode,
|
|
4368
5220
|
bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
|
|
4369
5221
|
oldBizId: defaultContext?.printParams?.invoiceInfo?.oldBizId,
|
|
4370
|
-
redBizId: defaultContext?.printParams?.bizIds,
|
|
5222
|
+
redBizId: defaultContext?.printParams?.bizIds ?? defaultContext?.printParams?.bizIds[0],
|
|
4371
5223
|
onlyRedFlag: defaultContext?.printParams?.invoiceInfo?.onlyRedFlag
|
|
4372
5224
|
}
|
|
4373
5225
|
});
|
|
4374
|
-
if (
|
|
5226
|
+
if (err) {
|
|
5227
|
+
breakPrint = true;
|
|
5228
|
+
return;
|
|
5229
|
+
}
|
|
5230
|
+
if (res?.success) defaultContext.splitResult = res.data?.bizOutputParam ?? [];
|
|
4375
5231
|
}
|
|
4376
5232
|
};
|
|
4377
|
-
/**
|
|
5233
|
+
/** 7.循环打印 */ const printLoop = async ()=>{
|
|
4378
5234
|
// 修改这里:使用 Promise.all 等待所有异步操作完成
|
|
4379
5235
|
const results = await Promise.all((defaultContext?.splitResult || []).map(async (item)=>await printReceiptFn(item)));
|
|
4380
5236
|
// 检查结果数组中是否所有项都是 undefined
|
|
@@ -4866,6 +5722,8 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
4866
5722
|
dataSearchBizIdTypeCode: props.dataSearchBizIdTypeCode || '',
|
|
4867
5723
|
keyWord: value,
|
|
4868
5724
|
sysMenuId: menuId || '',
|
|
5725
|
+
pageNumber: 1,
|
|
5726
|
+
pageSize: 100,
|
|
4869
5727
|
hospitalId: currentOrg?.orgId || '',
|
|
4870
5728
|
...params
|
|
4871
5729
|
});
|
|
@@ -4925,7 +5783,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
|
|
|
4925
5783
|
const dict_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dict_selectvue_type_script_setup_true_lang_ts, [
|
|
4926
5784
|
[
|
|
4927
5785
|
'__scopeId',
|
|
4928
|
-
"data-v-
|
|
5786
|
+
"data-v-04804e6c"
|
|
4929
5787
|
]
|
|
4930
5788
|
]);
|
|
4931
5789
|
/* ESM default export */ const dict_select = dict_select_exports_;
|
|
@@ -5727,8 +6585,8 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
5727
6585
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>__props.bannerConfig?.bizId, ()=>{});
|
|
5728
6586
|
__expose({
|
|
5729
6587
|
searchRef: searchRef,
|
|
5730
|
-
invoiceRef:
|
|
5731
|
-
bannerRef:
|
|
6588
|
+
invoiceRef: invoiceRef,
|
|
6589
|
+
bannerRef: bannerRef
|
|
5732
6590
|
});
|
|
5733
6591
|
return (_ctx, _cache)=>{
|
|
5734
6592
|
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
@@ -6119,13 +6977,13 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
|
6119
6977
|
};
|
|
6120
6978
|
}
|
|
6121
6979
|
});
|
|
6122
|
-
const
|
|
6980
|
+
const form_design_render_composables_Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_script_setup_true_lang_tsx, [
|
|
6123
6981
|
[
|
|
6124
6982
|
'__scopeId',
|
|
6125
6983
|
"data-v-7c43a384"
|
|
6126
6984
|
]
|
|
6127
6985
|
]);
|
|
6128
|
-
/* ESM default export */ const
|
|
6986
|
+
/* ESM default export */ const form_design_render_composables_Table = form_design_render_composables_Table_exports_;
|
|
6129
6987
|
/* ESM default export */ const Setvue_type_script_setup_true_lang_tsx_name_Set = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
6130
6988
|
__name: 'Set',
|
|
6131
6989
|
props: {
|
|
@@ -6289,7 +7147,7 @@ const Other_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Othervue_type_
|
|
|
6289
7147
|
const dynamicRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(null);
|
|
6290
7148
|
const components = {
|
|
6291
7149
|
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.COLLAPSE]: Collapse,
|
|
6292
|
-
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.TABLE]:
|
|
7150
|
+
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.TABLE]: form_design_render_composables_Table,
|
|
6293
7151
|
[__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.CONTROL_TYPE_CODE.SET]: Set
|
|
6294
7152
|
};
|
|
6295
7153
|
__expose({
|
|
@@ -6653,4 +7511,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
|
|
|
6653
7511
|
]);
|
|
6654
7512
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
|
6655
7513
|
/** 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 };
|
|
7514
|
+
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 };
|