@ibiz-template/vue3-components 0.7.41-alpha.122 → 0.7.41-alpha.124
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/chart-D8ak71ob.js +1 -0
- package/dist/index-BApiCD3N.js +339 -0
- package/dist/{index.es-i_3v13Rd.js → index.es-16xILT5D.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-CgYOgqC_.js → wang-editor-BjVpWCI4.js} +1 -1
- package/dist/{xlsx-util-B2yu2RZe.js → xlsx-util-BJgXbQ94.js} +1 -1
- package/es/common/data-import/data-import.mjs +1 -1
- package/es/control/chart/chart.mjs +30 -20
- package/es/control/data-view/data-view.mjs +27 -12
- package/es/control/data-view/data-view.util.mjs +43 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +2 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.mjs +2 -1
- package/es/control/grid/grid/grid-control.util.mjs +8 -7
- package/es/control/grid/grid/grid.mjs +32 -30
- package/es/control/list/list.mjs +10 -2
- package/es/control/tree/tree.mjs +12 -3
- package/es/control/tree-grid/tree-grid.mjs +33 -29
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +32 -27
- package/es/editor/autocomplete/autocomplete-editor.controller.mjs +1 -2
- package/es/editor/data-picker/picker-editor.controller.mjs +1 -2
- package/es/editor/list-box/list-box-picker-editor.controller.mjs +2 -5
- package/es/editor/map-picker/map-picker-editor.controller.mjs +1 -1
- package/es/editor/text-box/input/input.mjs +1 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.mjs +1 -1
- package/es/panel-component/global-search/global-search.controller.mjs +1 -4
- package/es/panel-component/user-action/user-action.mjs +3 -3
- package/es/panel-component/user-message/user-message.mjs +1 -1
- package/es/util/ai-chat-util/ai-chat-util.mjs +11 -0
- package/es/view/403-view/403-view.mjs +1 -1
- package/es/view/404-view/404-view.mjs +1 -1
- package/es/view/login-view/login-view.mjs +2 -3
- package/es/view/share-view/share-view.mjs +1 -1
- package/es/view/unauthorized-view/unauthorized-view.mjs +1 -1
- package/es/web-app/guard/auth-guard/auth-guard.mjs +3 -1
- package/es/web-app/guard/auth-guard/dyna-auth-guard.mjs +7 -1
- package/lib/common/data-import/data-import.cjs +1 -1
- package/lib/control/chart/chart.cjs +29 -19
- package/lib/control/data-view/data-view.cjs +25 -10
- package/lib/control/data-view/data-view.util.cjs +45 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +2 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.cjs +2 -1
- package/lib/control/grid/grid/grid-control.util.cjs +8 -7
- package/lib/control/grid/grid/grid.cjs +32 -30
- package/lib/control/list/list.cjs +8 -0
- package/lib/control/tree/tree.cjs +11 -2
- package/lib/control/tree-grid/tree-grid.cjs +32 -28
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +31 -26
- package/lib/editor/autocomplete/autocomplete-editor.controller.cjs +1 -2
- package/lib/editor/data-picker/picker-editor.controller.cjs +1 -2
- package/lib/editor/list-box/list-box-picker-editor.controller.cjs +2 -5
- package/lib/editor/map-picker/map-picker-editor.controller.cjs +1 -1
- package/lib/editor/text-box/input/input.cjs +1 -1
- package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +1 -1
- package/lib/panel-component/global-search/global-search.controller.cjs +1 -4
- package/lib/panel-component/user-action/user-action.cjs +3 -3
- package/lib/panel-component/user-message/user-message.cjs +1 -1
- package/lib/util/ai-chat-util/ai-chat-util.cjs +11 -0
- package/lib/view/403-view/403-view.cjs +1 -1
- package/lib/view/404-view/404-view.cjs +1 -1
- package/lib/view/login-view/login-view.cjs +2 -3
- package/lib/view/share-view/share-view.cjs +1 -1
- package/lib/view/unauthorized-view/unauthorized-view.cjs +1 -1
- package/lib/web-app/guard/auth-guard/auth-guard.cjs +3 -1
- package/lib/web-app/guard/auth-guard/dyna-auth-guard.cjs +7 -1
- package/package.json +5 -5
- package/src/common/data-import/data-import.tsx +1 -1
- package/src/control/chart/chart.tsx +42 -36
- package/src/control/data-view/data-view.tsx +32 -15
- package/src/control/data-view/data-view.util.ts +68 -0
- package/src/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.tsx +3 -1
- package/src/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.tsx +3 -0
- package/src/control/grid/grid/grid-control.util.ts +12 -11
- package/src/control/grid/grid/grid.tsx +46 -35
- package/src/control/list/list.tsx +20 -1
- package/src/control/tree/tree.tsx +18 -4
- package/src/control/tree-grid/tree-grid.tsx +46 -33
- package/src/control/tree-grid-ex/tree-grid-ex.tsx +45 -25
- package/src/editor/autocomplete/autocomplete-editor.controller.ts +1 -2
- package/src/editor/data-picker/picker-editor.controller.ts +1 -2
- package/src/editor/list-box/list-box-picker-editor.controller.ts +2 -6
- package/src/editor/map-picker/map-picker-editor.controller.ts +1 -1
- package/src/editor/text-box/input/input.tsx +1 -1
- package/src/panel-component/auth-userinfo/auth-userinfo.tsx +1 -1
- package/src/panel-component/global-search/global-search.controller.ts +1 -5
- package/src/panel-component/user-action/user-action.tsx +3 -3
- package/src/panel-component/user-message/user-message.tsx +1 -1
- package/src/util/ai-chat-util/ai-chat-util.ts +17 -0
- package/src/view/403-view/403-view.tsx +1 -1
- package/src/view/404-view/404-view.tsx +1 -4
- package/src/view/login-view/login-view.tsx +3 -3
- package/src/view/share-view/share-view.tsx +1 -1
- package/src/view/unauthorized-view/unauthorized-view.tsx +1 -4
- package/src/web-app/guard/auth-guard/auth-guard.ts +3 -4
- package/src/web-app/guard/auth-guard/dyna-auth-guard.ts +18 -1
- package/dist/chart-De-66DWN.js +0 -1
- package/dist/index-BXO4Omap.js +0 -339
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ref, onBeforeUnmount } from 'vue';
|
|
2
|
+
import { IDEDataView } from '@ibiz/model-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 数据视图骨架屏 hook
|
|
6
|
+
*
|
|
7
|
+
* 配置了卡片宽度且为 flex 布局时,按容器宽度计算单行最大骨架卡片数,否则使用默认数量
|
|
8
|
+
*
|
|
9
|
+
* @author zhangpingchuan
|
|
10
|
+
*/
|
|
11
|
+
export const useDataViewSkeleton = ({
|
|
12
|
+
model,
|
|
13
|
+
}: {
|
|
14
|
+
model: IDEDataView;
|
|
15
|
+
}): {
|
|
16
|
+
setSkeletonContentRef: (el: unknown) => void;
|
|
17
|
+
calcSkeletonCount: (defaultCount: number) => number;
|
|
18
|
+
} => {
|
|
19
|
+
// 骨架屏内容容器元素与宽度(用于按卡片宽度计算单行最大卡片数)
|
|
20
|
+
let skeletonContentEl: HTMLElement | undefined;
|
|
21
|
+
const skeletonContainerWidth = ref(0);
|
|
22
|
+
let skeletonResizeObserver: ResizeObserver | undefined;
|
|
23
|
+
|
|
24
|
+
// 函数式 ref:骨架屏内容容器挂载/卸载时测量宽度并监听尺寸变化
|
|
25
|
+
const setSkeletonContentRef = (el: unknown) => {
|
|
26
|
+
skeletonResizeObserver?.disconnect();
|
|
27
|
+
skeletonResizeObserver = undefined;
|
|
28
|
+
skeletonContentEl = (el as HTMLElement) || undefined;
|
|
29
|
+
if (skeletonContentEl) {
|
|
30
|
+
const update = () => {
|
|
31
|
+
skeletonContainerWidth.value = skeletonContentEl!.clientWidth;
|
|
32
|
+
};
|
|
33
|
+
update();
|
|
34
|
+
skeletonResizeObserver = new ResizeObserver(update);
|
|
35
|
+
skeletonResizeObserver.observe(skeletonContentEl);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
onBeforeUnmount(() => {
|
|
40
|
+
skeletonResizeObserver?.disconnect();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// 配置了卡片宽度且为 flex 布局时,按容器宽度计算骨架屏卡片数量,否则用默认数量
|
|
44
|
+
const calcSkeletonCount = (defaultCount: number): number => {
|
|
45
|
+
const { cardWidth, cardColXS, cardColSM, cardColMD, cardColLG } = model;
|
|
46
|
+
if (
|
|
47
|
+
!cardWidth ||
|
|
48
|
+
!skeletonContainerWidth.value ||
|
|
49
|
+
cardColXS ||
|
|
50
|
+
cardColSM ||
|
|
51
|
+
cardColMD ||
|
|
52
|
+
cardColLG
|
|
53
|
+
) {
|
|
54
|
+
return defaultCount;
|
|
55
|
+
}
|
|
56
|
+
// n * cardWidth + (n - 1) * gap <= containerWidth
|
|
57
|
+
let gap = 0;
|
|
58
|
+
if (skeletonContentEl) {
|
|
59
|
+
gap = Number.parseFloat(getComputedStyle(skeletonContentEl).gap) || 0;
|
|
60
|
+
}
|
|
61
|
+
const count = Math.floor(
|
|
62
|
+
(skeletonContainerWidth.value + gap) / (cardWidth + gap),
|
|
63
|
+
);
|
|
64
|
+
return Math.max(1, count);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return { setSkeletonContentRef, calcSkeletonCount };
|
|
68
|
+
};
|
|
@@ -345,8 +345,10 @@ export const RepeaterGrid: ReturnType<typeof defineComponent> = defineComponent(
|
|
|
345
345
|
<el-table-column type='index' width={66} align='center'>
|
|
346
346
|
{{
|
|
347
347
|
default: (opts: IData) => {
|
|
348
|
+
const rowEnableDelete =
|
|
349
|
+
this.controller.getRowEnableDelete(opts.row);
|
|
348
350
|
const { $index } = opts;
|
|
349
|
-
if (!this.controller.enableDelete) {
|
|
351
|
+
if (!this.controller.enableDelete || !rowEnableDelete) {
|
|
350
352
|
return <span>{$index + 1}</span>;
|
|
351
353
|
}
|
|
352
354
|
return [
|
|
@@ -407,6 +407,8 @@ export const RepeaterGrid2: ReturnType<typeof defineComponent> =
|
|
|
407
407
|
<el-table-column width={80} align='center'>
|
|
408
408
|
{{
|
|
409
409
|
default: (opts: IData) => {
|
|
410
|
+
const rowEnableDelete =
|
|
411
|
+
this.controller.getRowEnableDelete(opts.row);
|
|
410
412
|
const { $index } = opts;
|
|
411
413
|
return (
|
|
412
414
|
<div class={this.ns.b('action-group')}>
|
|
@@ -434,6 +436,7 @@ export const RepeaterGrid2: ReturnType<typeof defineComponent> =
|
|
|
434
436
|
></ion-icon>
|
|
435
437
|
)}
|
|
436
438
|
{this.controller.enableDelete &&
|
|
439
|
+
rowEnableDelete &&
|
|
437
440
|
!isEmpty &&
|
|
438
441
|
this.renderRemoveBtn($index)}
|
|
439
442
|
</div>
|
|
@@ -191,10 +191,21 @@ export function useITableEvent(c: GridController): {
|
|
|
191
191
|
|
|
192
192
|
// 所有表格列
|
|
193
193
|
const allGridColumns: IDEGridColumn[] = [];
|
|
194
|
+
const headerCellClassNameMap: Map<string, string> = new Map();
|
|
194
195
|
recursiveIterate(
|
|
195
196
|
c.model,
|
|
196
197
|
(column: IDEGridColumn) => {
|
|
197
198
|
allGridColumns.push(column);
|
|
199
|
+
if (
|
|
200
|
+
column.codeName &&
|
|
201
|
+
column.headerSysCss &&
|
|
202
|
+
column.headerSysCss.cssName
|
|
203
|
+
) {
|
|
204
|
+
headerCellClassNameMap.set(
|
|
205
|
+
column.codeName,
|
|
206
|
+
column.headerSysCss.cssName,
|
|
207
|
+
);
|
|
208
|
+
}
|
|
198
209
|
},
|
|
199
210
|
{ childrenFields: ['degridColumns'] },
|
|
200
211
|
);
|
|
@@ -581,17 +592,7 @@ export function useITableEvent(c: GridController): {
|
|
|
581
592
|
_rowIndex: number;
|
|
582
593
|
_columnIndex: number;
|
|
583
594
|
}): string {
|
|
584
|
-
|
|
585
|
-
return gridColumn.codeName === column.property;
|
|
586
|
-
});
|
|
587
|
-
if (
|
|
588
|
-
columnModel &&
|
|
589
|
-
columnModel.headerSysCss &&
|
|
590
|
-
columnModel.headerSysCss.cssName
|
|
591
|
-
) {
|
|
592
|
-
return columnModel.headerSysCss.cssName;
|
|
593
|
-
}
|
|
594
|
-
return '';
|
|
595
|
+
return headerCellClassNameMap.get(column.property) || '';
|
|
595
596
|
}
|
|
596
597
|
|
|
597
598
|
watch(
|
|
@@ -462,6 +462,46 @@ export const GridControl = defineComponent({
|
|
|
462
462
|
const { headerCssVars } = useGridHeaderStyle(tableRef, ns);
|
|
463
463
|
const { cleanup = NOOP, setDragEvent } = useGridDraggable(tableRef, ns, c);
|
|
464
464
|
|
|
465
|
+
// 子类类名透传
|
|
466
|
+
const childClass = [
|
|
467
|
+
{
|
|
468
|
+
class: semanticClass('body.row'),
|
|
469
|
+
selector: '.el-table__row',
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
class: semanticClass('header.row'),
|
|
473
|
+
selector: '.el-table__header tr',
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
class: semanticClass('body.cell'),
|
|
477
|
+
selector: '.el-table__body .el-table__cell',
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
class: semanticClass('header.cell'),
|
|
481
|
+
selector: '.el-table__header .el-table__cell',
|
|
482
|
+
},
|
|
483
|
+
];
|
|
484
|
+
|
|
485
|
+
// 子类样式透传
|
|
486
|
+
const childStyle = [
|
|
487
|
+
{
|
|
488
|
+
class: semanticStyle('body.row'),
|
|
489
|
+
selector: '.el-table__row',
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
class: semanticStyle('header.row'),
|
|
493
|
+
selector: '.el-table__header tr',
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
class: semanticStyle('body.cell'),
|
|
497
|
+
selector: '.el-table__body .el-table__cell',
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
class: semanticStyle('header.cell'),
|
|
501
|
+
selector: '.el-table__header .el-table__cell',
|
|
502
|
+
},
|
|
503
|
+
];
|
|
504
|
+
|
|
465
505
|
c.evt.on('onLoadSuccess', () => {
|
|
466
506
|
if (setDragEvent) {
|
|
467
507
|
setDragEvent();
|
|
@@ -706,6 +746,8 @@ export const GridControl = defineComponent({
|
|
|
706
746
|
isLodeMoreDisabled,
|
|
707
747
|
semanticClass,
|
|
708
748
|
semanticStyle,
|
|
749
|
+
childClass,
|
|
750
|
+
childStyle,
|
|
709
751
|
pageSemantic,
|
|
710
752
|
onRowClick,
|
|
711
753
|
spanMethod,
|
|
@@ -777,44 +819,13 @@ export const GridControl = defineComponent({
|
|
|
777
819
|
onHeaderDragend={this.headerDragend}
|
|
778
820
|
default-expand-all={defaultExpandAll}
|
|
779
821
|
show-header={!this.c.state.hideHeader}
|
|
780
|
-
row-class-name={
|
|
781
|
-
return [
|
|
782
|
-
this.handleRowClassName(event),
|
|
783
|
-
this.semanticClass('body.row', { event }),
|
|
784
|
-
].join(' ');
|
|
785
|
-
}}
|
|
786
|
-
header-row-class-name={(...args: IData[]) =>
|
|
787
|
-
this.semanticClass('header.row', { args })
|
|
788
|
-
}
|
|
789
|
-
row-style={(...args: IData[]) =>
|
|
790
|
-
this.semanticStyle('body.row', { args })
|
|
791
|
-
}
|
|
792
|
-
header-row-style={(...args: IData[]) =>
|
|
793
|
-
this.semanticStyle('header.row', { args })
|
|
794
|
-
}
|
|
822
|
+
row-class-name={this.handleRowClassName}
|
|
795
823
|
highlight-current-row={state.singleSelect}
|
|
796
824
|
expandRowKeys={this.c.state.expandRowKeys}
|
|
797
825
|
onSelectionChange={this.onSelectionChange}
|
|
798
|
-
cell-class-name={
|
|
799
|
-
|
|
800
|
-
}
|
|
801
|
-
header-cell-class-name={(data: {
|
|
802
|
-
_row: IData;
|
|
803
|
-
column: IData;
|
|
804
|
-
_rowIndex: number;
|
|
805
|
-
_columnIndex: number;
|
|
806
|
-
}) => {
|
|
807
|
-
return [
|
|
808
|
-
this.handleHeaderCellClassName(data),
|
|
809
|
-
this.semanticClass('header.cell', { event: data }),
|
|
810
|
-
].join(' ');
|
|
811
|
-
}}
|
|
812
|
-
cell-style={(...args: IData[]) =>
|
|
813
|
-
this.semanticStyle('body.cell', { args })
|
|
814
|
-
}
|
|
815
|
-
header-cell-style={(...args: IData[]) =>
|
|
816
|
-
this.semanticStyle('header.cell', { args })
|
|
817
|
-
}
|
|
826
|
+
header-cell-class-name={this.handleHeaderCellClassName}
|
|
827
|
+
v-child-class={this.childClass}
|
|
828
|
+
v-child-style={this.childStyle}
|
|
818
829
|
onExpandChange={(row: IData, expanded: boolean) =>
|
|
819
830
|
this.c.expandChange(row, expanded)
|
|
820
831
|
}
|
|
@@ -8,7 +8,16 @@ import {
|
|
|
8
8
|
hasEmptyPanelRenderer,
|
|
9
9
|
useControlPopoverzIndex,
|
|
10
10
|
} from '@ibiz-template/vue3-util';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
h,
|
|
13
|
+
ref,
|
|
14
|
+
VNode,
|
|
15
|
+
watch,
|
|
16
|
+
PropType,
|
|
17
|
+
computed,
|
|
18
|
+
defineComponent,
|
|
19
|
+
resolveComponent,
|
|
20
|
+
} from 'vue';
|
|
12
21
|
import { IDEList, ILayoutPanel, IUIActionGroupDetail } from '@ibiz/model-core';
|
|
13
22
|
import { isNil, debounce } from 'lodash-es';
|
|
14
23
|
import {
|
|
@@ -17,6 +26,7 @@ import {
|
|
|
17
26
|
IDragChangeInfo,
|
|
18
27
|
IControlProvider,
|
|
19
28
|
IMDControlGroupState,
|
|
29
|
+
getMDCtrlItemProvider,
|
|
20
30
|
} from '@ibiz-template/runtime';
|
|
21
31
|
import draggable from 'vuedraggable';
|
|
22
32
|
import { showTitle } from '@ibiz-template/core';
|
|
@@ -394,6 +404,15 @@ export const ListControl = defineComponent({
|
|
|
394
404
|
};
|
|
395
405
|
|
|
396
406
|
const renderItem = (item: IData) => {
|
|
407
|
+
// 多数据部件项绘制器
|
|
408
|
+
const provider = getMDCtrlItemProvider(c.model);
|
|
409
|
+
if (provider)
|
|
410
|
+
return h(resolveComponent(provider.component), {
|
|
411
|
+
data: item,
|
|
412
|
+
controller: c,
|
|
413
|
+
onClick: (): Promise<void> => c.onRowClick(item),
|
|
414
|
+
onDblclick: (): Promise<void> => c.onDbRowClick(item),
|
|
415
|
+
});
|
|
397
416
|
const cardStyle = ns.cssVarBlock({
|
|
398
417
|
'item-bg-color': `${item.bgcolor || ''}`,
|
|
399
418
|
'text-color': `${item.fontcolor || ''}`,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* eslint-disable no-nested-ternary */
|
|
2
2
|
import {
|
|
3
|
-
useControlController,
|
|
4
3
|
useNamespace,
|
|
5
4
|
useSemanticNode,
|
|
5
|
+
useControlController,
|
|
6
6
|
} from '@ibiz-template/vue3-util';
|
|
7
7
|
import {
|
|
8
|
+
h,
|
|
8
9
|
ref,
|
|
9
10
|
Ref,
|
|
10
11
|
VNode,
|
|
@@ -1092,11 +1093,24 @@ export const TreeControl = defineComponent({
|
|
|
1092
1093
|
if (this.newNodeKey === data._id) return this.renderNewNode();
|
|
1093
1094
|
|
|
1094
1095
|
const nodeData = this.findNodeData(data._uuid, this.c)!;
|
|
1095
|
-
if (!nodeData)
|
|
1096
|
-
return null;
|
|
1097
|
-
}
|
|
1096
|
+
if (!nodeData) return null;
|
|
1098
1097
|
const nodeModel = this.c.getNodeModel(nodeData._nodeId)!;
|
|
1099
1098
|
|
|
1099
|
+
// 通过适配器绘制
|
|
1100
|
+
const provider = this.c.nodeProvider[nodeData._nodeId];
|
|
1101
|
+
if (provider)
|
|
1102
|
+
return h(resolveComponent(provider.component), {
|
|
1103
|
+
data: nodeData,
|
|
1104
|
+
model: nodeModel,
|
|
1105
|
+
controller: this.c,
|
|
1106
|
+
onDblclick: (evt: MouseEvent) =>
|
|
1107
|
+
this.onNodeDbClick(nodeData, evt),
|
|
1108
|
+
onClick: (evt: MouseEvent) =>
|
|
1109
|
+
this.onNodeClick(nodeData, data, evt),
|
|
1110
|
+
onContextmenu: (evt: MouseEvent) =>
|
|
1111
|
+
this.onNodeContextmenu(nodeData, evt),
|
|
1112
|
+
});
|
|
1113
|
+
|
|
1100
1114
|
// 绘制编辑项
|
|
1101
1115
|
if (this.editingNodeKey === nodeData._id) {
|
|
1102
1116
|
return (
|
|
@@ -109,6 +109,46 @@ export const TreeGridControl = defineComponent({
|
|
|
109
109
|
const ns2 = useNamespace(`control-${c.model.controlType!.toLowerCase()}`);
|
|
110
110
|
const { semanticClass, semanticStyle } = useSemanticNode(c);
|
|
111
111
|
|
|
112
|
+
// 子类类名透传
|
|
113
|
+
const childClass = [
|
|
114
|
+
{
|
|
115
|
+
class: semanticClass('body.row'),
|
|
116
|
+
selector: '.el-table__row',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
class: semanticClass('header.row'),
|
|
120
|
+
selector: '.el-table__header tr',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
class: semanticClass('body.cell'),
|
|
124
|
+
selector: '.el-table__body .el-table__cell',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
class: semanticClass('header.cell'),
|
|
128
|
+
selector: '.el-table__header .el-table__cell',
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
// 子类样式透传
|
|
133
|
+
const childStyle = [
|
|
134
|
+
{
|
|
135
|
+
class: semanticStyle('body.row'),
|
|
136
|
+
selector: '.el-table__row',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
class: semanticStyle('header.row'),
|
|
140
|
+
selector: '.el-table__header tr',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
class: semanticStyle('body.cell'),
|
|
144
|
+
selector: '.el-table__body .el-table__cell',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
class: semanticStyle('header.cell'),
|
|
148
|
+
selector: '.el-table__header .el-table__cell',
|
|
149
|
+
},
|
|
150
|
+
];
|
|
151
|
+
|
|
112
152
|
const {
|
|
113
153
|
tableRef,
|
|
114
154
|
onRowClick,
|
|
@@ -323,6 +363,8 @@ export const TreeGridControl = defineComponent({
|
|
|
323
363
|
semanticClass,
|
|
324
364
|
semanticStyle,
|
|
325
365
|
pageSemantic,
|
|
366
|
+
childClass,
|
|
367
|
+
childStyle,
|
|
326
368
|
loadData,
|
|
327
369
|
onRowClick,
|
|
328
370
|
renderColumn,
|
|
@@ -383,39 +425,10 @@ export const TreeGridControl = defineComponent({
|
|
|
383
425
|
onExpandChange={(row: IData, expanded: boolean) =>
|
|
384
426
|
this.c.expandChange(row, expanded)
|
|
385
427
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
].join(' ');
|
|
391
|
-
}}
|
|
392
|
-
header-row-class-name={(...args: IData[]) =>
|
|
393
|
-
this.semanticClass('header.row', { args })
|
|
394
|
-
}
|
|
395
|
-
row-style={(...args: IData[]) =>
|
|
396
|
-
this.semanticStyle('body.row', { args })
|
|
397
|
-
}
|
|
398
|
-
header-row-style={(...args: IData[]) =>
|
|
399
|
-
this.semanticStyle('header.row', { args })
|
|
400
|
-
}
|
|
401
|
-
cell-class-name={(...args: IData[]) =>
|
|
402
|
-
this.semanticClass('body.cell', { args })
|
|
403
|
-
}
|
|
404
|
-
header-cell-class-name={(data: {
|
|
405
|
-
_row: IData;
|
|
406
|
-
column: IData;
|
|
407
|
-
_rowIndex: number;
|
|
408
|
-
_columnIndex: number;
|
|
409
|
-
}) => {
|
|
410
|
-
return [
|
|
411
|
-
this.handleHeaderCellClassName(data),
|
|
412
|
-
this.semanticClass('header.cell', { event: data }),
|
|
413
|
-
].join(' ');
|
|
414
|
-
}}
|
|
415
|
-
cell-style={(...args: IData[]) =>
|
|
416
|
-
this.semanticStyle('body.cell', { args })
|
|
417
|
-
}
|
|
418
|
-
header-cell-style={this.semanticStyle('header.cell')}
|
|
428
|
+
v-child-class={this.childClass}
|
|
429
|
+
v-child-style={this.childStyle}
|
|
430
|
+
row-class-name={this.handleRowClassName}
|
|
431
|
+
header-cell-class-name={this.handleHeaderCellClassName}
|
|
419
432
|
tree-props={{ children: 'children', hasChildren: 'hasChildren' }}
|
|
420
433
|
data={
|
|
421
434
|
this.c.state.showTreeGrid ? state.treeGirdData : this.tableData
|
|
@@ -83,6 +83,46 @@ export const TreeGridExControl = defineComponent({
|
|
|
83
83
|
const ns = useNamespace(`control-${c.model.controlType!.toLowerCase()}`);
|
|
84
84
|
const { semanticClass, semanticStyle } = useSemanticNode(c);
|
|
85
85
|
|
|
86
|
+
// 子类类名透传
|
|
87
|
+
const childClass = [
|
|
88
|
+
{
|
|
89
|
+
class: semanticClass('body.row'),
|
|
90
|
+
selector: '.el-table__row',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
class: semanticClass('header.row'),
|
|
94
|
+
selector: '.el-table__header tr',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
class: semanticClass('body.cell'),
|
|
98
|
+
selector: '.el-table__body .el-table__cell',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
class: semanticClass('header.cell'),
|
|
102
|
+
selector: '.el-table__header .el-table__cell',
|
|
103
|
+
},
|
|
104
|
+
];
|
|
105
|
+
|
|
106
|
+
// 子类样式透传
|
|
107
|
+
const childStyle = [
|
|
108
|
+
{
|
|
109
|
+
class: semanticStyle('body.row'),
|
|
110
|
+
selector: '.el-table__row',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
class: semanticStyle('header.row'),
|
|
114
|
+
selector: '.el-table__header tr',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
class: semanticStyle('body.cell'),
|
|
118
|
+
selector: '.el-table__body .el-table__cell',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
class: semanticStyle('header.cell'),
|
|
122
|
+
selector: '.el-table__header .el-table__cell',
|
|
123
|
+
},
|
|
124
|
+
];
|
|
125
|
+
|
|
86
126
|
const renderNoData = (): VNode | false => {
|
|
87
127
|
// 未加载不显示无数据
|
|
88
128
|
const { isLoaded } = c.state;
|
|
@@ -280,6 +320,8 @@ export const TreeGridExControl = defineComponent({
|
|
|
280
320
|
tableRefreshKey,
|
|
281
321
|
semanticClass,
|
|
282
322
|
semanticStyle,
|
|
323
|
+
childClass,
|
|
324
|
+
childStyle,
|
|
283
325
|
loadData,
|
|
284
326
|
onRowClick,
|
|
285
327
|
renderNoData,
|
|
@@ -385,31 +427,9 @@ export const TreeGridExControl = defineComponent({
|
|
|
385
427
|
lazy
|
|
386
428
|
onRowClick={this.onRowClick}
|
|
387
429
|
onExpandChange={this.onExpandChange}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
this.semanticClass('body.row', { event }),
|
|
392
|
-
].join(' ');
|
|
393
|
-
}}
|
|
394
|
-
header-row-class-name={(...args: IData[]) =>
|
|
395
|
-
this.semanticClass('header.row', { args })
|
|
396
|
-
}
|
|
397
|
-
row-style={(...args: IData[]) =>
|
|
398
|
-
this.semanticStyle('body.row', { args })
|
|
399
|
-
}
|
|
400
|
-
header-row-style={(...args: IData[]) =>
|
|
401
|
-
this.semanticStyle('header.row', { args })
|
|
402
|
-
}
|
|
403
|
-
cell-class-name={(...args: IData[]) =>
|
|
404
|
-
this.semanticClass('body.cell', { args })
|
|
405
|
-
}
|
|
406
|
-
header-cell-class-name={(...args: IData[]) =>
|
|
407
|
-
this.semanticClass('header.cell', { args })
|
|
408
|
-
}
|
|
409
|
-
cell-style={(...args: IData[]) =>
|
|
410
|
-
this.semanticStyle('body.cell', { args })
|
|
411
|
-
}
|
|
412
|
-
header-cell-style={this.semanticStyle('header.cell')}
|
|
430
|
+
v-child-class={this.childClass}
|
|
431
|
+
v-child-style={this.childStyle}
|
|
432
|
+
row-class-name={this.handleRowClassName}
|
|
413
433
|
load={this.loadData}
|
|
414
434
|
{...renderAttrs(this.c.model, {
|
|
415
435
|
...this.c.getEventArgs(),
|
|
@@ -110,9 +110,8 @@ export class AutoCompleteEditorController extends EditorController<IAutoComplete
|
|
|
110
110
|
},
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
|
-
if (this.deACMode
|
|
113
|
+
if (this.deACMode)
|
|
114
114
|
this.acItemProvider = await getAcItemProvider(this.deACMode);
|
|
115
|
-
}
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
117
|
}
|
|
@@ -231,9 +231,8 @@ export class PickerEditorController extends EditorController<IPicker> {
|
|
|
231
231
|
},
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
if (this.deACMode
|
|
234
|
+
if (this.deACMode)
|
|
235
235
|
this.acItemProvider = await getAcItemProvider(this.deACMode);
|
|
236
|
-
}
|
|
237
236
|
}
|
|
238
237
|
}
|
|
239
238
|
}
|
|
@@ -71,12 +71,8 @@ export class ListBoxPickerEditorController extends EditorController<IListBoxPick
|
|
|
71
71
|
this.model.appDataEntityId,
|
|
72
72
|
this.context.srfappid,
|
|
73
73
|
);
|
|
74
|
-
if (this.deACMode)
|
|
75
|
-
|
|
76
|
-
if (this.deACMode.itemSysPFPluginId) {
|
|
77
|
-
this.acItemProvider = await getAcItemProvider(this.deACMode);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
74
|
+
if (this.deACMode)
|
|
75
|
+
this.acItemProvider = await getAcItemProvider(this.deACMode);
|
|
80
76
|
}
|
|
81
77
|
}
|
|
82
78
|
}
|
|
@@ -23,7 +23,7 @@ export class MapPickerEditorController extends EditorController<IMapPicker> {
|
|
|
23
23
|
* @type {string}
|
|
24
24
|
* @memberof MapPickerEditorController
|
|
25
25
|
*/
|
|
26
|
-
public markerIcon: string =
|
|
26
|
+
public markerIcon: string = ibiz.config.imageAssets.poiMarker;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* @description 默认中心点坐标
|
|
@@ -573,7 +573,7 @@ export const IBizInput = defineComponent({
|
|
|
573
573
|
title={ibiz.i18n.t('editor.textBox.openAiChat')}
|
|
574
574
|
onClick={this.onClick}
|
|
575
575
|
>
|
|
576
|
-
<ion-icon src=
|
|
576
|
+
<ion-icon src={ibiz.config.imageAssets.chat} />
|
|
577
577
|
</div>
|
|
578
578
|
) : null}
|
|
579
579
|
</div>
|
|
@@ -112,7 +112,7 @@ export const AuthUserinfo = defineComponent({
|
|
|
112
112
|
<el-avatar
|
|
113
113
|
class={[this.ns.b('avatar'), this.semanticClass('avatar')]}
|
|
114
114
|
style={this.semanticStyle('avatar')}
|
|
115
|
-
src=
|
|
115
|
+
src={ibiz.config.imageAssets.userAvatar}
|
|
116
116
|
/>
|
|
117
117
|
|
|
118
118
|
<div
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getControl,
|
|
4
4
|
getDeACMode,
|
|
5
|
-
IAcItemProvider,
|
|
6
5
|
getAcItemProvider,
|
|
7
6
|
OpenAppViewCommand,
|
|
8
7
|
calcDeCodeNameById,
|
|
@@ -206,10 +205,7 @@ export class GlobalSearchController extends PanelItemController<IPanelRawItem> {
|
|
|
206
205
|
func.appId,
|
|
207
206
|
);
|
|
208
207
|
if (deACMode) {
|
|
209
|
-
|
|
210
|
-
if (deACMode.itemSysPFPluginId) {
|
|
211
|
-
acItemProvider = await getAcItemProvider(deACMode);
|
|
212
|
-
}
|
|
208
|
+
const acItemProvider = await getAcItemProvider(deACMode);
|
|
213
209
|
this.state.items.push({
|
|
214
210
|
deACMode,
|
|
215
211
|
acItemProvider,
|
|
@@ -42,9 +42,9 @@ export const UserAction = defineComponent({
|
|
|
42
42
|
|
|
43
43
|
// 图片配置
|
|
44
44
|
const imgConfig: IData = {
|
|
45
|
-
SETTING: { imagePath:
|
|
46
|
-
HELPER: { imagePath:
|
|
47
|
-
CUSTOM: { imagePath:
|
|
45
|
+
SETTING: { imagePath: ibiz.config.imageAssets.setting },
|
|
46
|
+
HELPER: { imagePath: ibiz.config.imageAssets.helper },
|
|
47
|
+
CUSTOM: { imagePath: ibiz.config.imageAssets.customWorkbench },
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
let sysImage = props.modelData.sysImage;
|
|
@@ -50,7 +50,7 @@ export const UserMessage = defineComponent({
|
|
|
50
50
|
const currentTab = ref<string>('notification');
|
|
51
51
|
// 图片有配置拿配置,没配置取默认图片
|
|
52
52
|
const sysImage = props.modelData.sysImage || {
|
|
53
|
-
imagePath:
|
|
53
|
+
imagePath: ibiz.config.imageAssets.message,
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
// 气泡控制
|
|
@@ -285,6 +285,14 @@ export class AIChatUtil implements IApiAIChatUtil {
|
|
|
285
285
|
} else {
|
|
286
286
|
chatOptions.chunkEntity = ibiz.config.common.aiChunkEntity;
|
|
287
287
|
}
|
|
288
|
+
// 计算会话主题模式
|
|
289
|
+
if (editorParams.topiccaptioncomputedmode) {
|
|
290
|
+
chatOptions.captionComputedMode = editorParams.topiccaptioncomputedmode;
|
|
291
|
+
} else {
|
|
292
|
+
chatOptions.captionComputedMode =
|
|
293
|
+
ibiz.config.common.aiChatTopicCaptionComputedMode;
|
|
294
|
+
}
|
|
295
|
+
|
|
288
296
|
// 智能体选项(由内部获取,优化打开速度)
|
|
289
297
|
chatOptions.fetchAgentList = (query?: string) => {
|
|
290
298
|
return this.getAIAgentList(context, { ...params, query }, editorParams);
|
|
@@ -1021,6 +1029,15 @@ export class AIChatUtil implements IApiAIChatUtil {
|
|
|
1021
1029
|
} else {
|
|
1022
1030
|
chatOptions.chunkEntity = ibiz.config.common.aiChunkEntity;
|
|
1023
1031
|
}
|
|
1032
|
+
// 计算会话主题模式
|
|
1033
|
+
if (params.hasOwnProperty('topiccaptioncomputedmode')) {
|
|
1034
|
+
chatOptions.captionComputedMode = params.topiccaptioncomputedmode;
|
|
1035
|
+
delete params.topiccaptioncomputedmode;
|
|
1036
|
+
} else {
|
|
1037
|
+
chatOptions.captionComputedMode =
|
|
1038
|
+
ibiz.config.common.aiChatTopicCaptionComputedMode;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1024
1041
|
// 智能体选项(由内部获取,优化打开速度)
|
|
1025
1042
|
chatOptions.fetchAgentList = (query?: string) => {
|
|
1026
1043
|
return this.getAIAgentList(context, { ...params, query });
|
|
@@ -27,7 +27,7 @@ export const View403 = defineComponent({
|
|
|
27
27
|
<div class={[this.ns.b(), this.ns.is('top', this.isTop)]}>
|
|
28
28
|
<img
|
|
29
29
|
class={this.ns.b('img')}
|
|
30
|
-
src={
|
|
30
|
+
src={ibiz.config.imageAssets.noPermission}
|
|
31
31
|
/>
|
|
32
32
|
<div class={this.ns.b('text')}>
|
|
33
33
|
<div class={this.ns.be('text', 'text1')}>
|