@ibiz-template/vue3-components 0.7.41-alpha.113 → 0.7.41-alpha.115

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.
Files changed (82) hide show
  1. package/dist/{index-BLBroBhu.js → index-B3O6yu1f.js} +1 -1
  2. package/dist/index-B4MZRULw.js +339 -0
  3. package/dist/{index-C-9vEACb.js → index-qO4rCmKY.js} +1 -1
  4. package/dist/{index.es-BU8Fy5we.js → index.es-D9o2oz4Y.js} +1 -1
  5. package/dist/index.min.css +1 -1
  6. package/dist/index.system.min.js +1 -1
  7. package/dist/{wang-editor-9zdglekK.js → wang-editor-4yBz8Mkf.js} +1 -1
  8. package/dist/{xlsx-util-DrUAhpzt.js → xlsx-util-3sCwAhs0.js} +1 -1
  9. package/es/common/button-list/button-list.mjs +6 -1
  10. package/es/common/data-import/data-import.mjs +14 -8
  11. package/es/control/calendar/components/calendar-user2/calendar-user2.mjs +2 -2
  12. package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +1 -2
  13. package/es/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.mjs +2 -0
  14. package/es/control/drtab/drtab-control.util.mjs +1 -1
  15. package/es/control/drtab/drtab.controller.mjs +73 -13
  16. package/es/control/drtab/drtab.mjs +1 -1
  17. package/es/control/drtab/flow-drtab.css +1 -1
  18. package/es/control/drtab/flow-drtab.mjs +28 -18
  19. package/es/control/exp-bar/render-util.mjs +2 -2
  20. package/es/control/medit-view-panel/medit-view-panel.mjs +1 -1
  21. package/es/control/toolbar/toolbar.mjs +3 -0
  22. package/es/control/tree/tree.mjs +1 -1
  23. package/es/control/tree-grid-ex/tree-grid-ex.mjs +1 -0
  24. package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.mjs +2 -1
  25. package/es/locale/en/index.mjs +1 -0
  26. package/es/locale/zh-CN/index.mjs +1 -0
  27. package/es/panel-component/global-search/global-search.mjs +2 -1
  28. package/es/panel-component/nav-tabs/nav-tabs.mjs +12 -3
  29. package/es/panel-component/short-cut/short-cut.mjs +2 -1
  30. package/es/panel-component/user-message/user-message.mjs +1 -0
  31. package/es/util/ai-chat-util/ai-chat-util.mjs +18 -2
  32. package/es/util/fullscreen/fullscreen-util.mjs +1 -1
  33. package/lib/common/button-list/button-list.cjs +6 -1
  34. package/lib/common/data-import/data-import.cjs +14 -8
  35. package/lib/control/calendar/components/calendar-user2/calendar-user2.cjs +2 -2
  36. package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +1 -2
  37. package/lib/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.cjs +2 -0
  38. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  39. package/lib/control/drtab/drtab.cjs +1 -1
  40. package/lib/control/drtab/drtab.controller.cjs +73 -13
  41. package/lib/control/drtab/flow-drtab.cjs +28 -18
  42. package/lib/control/drtab/flow-drtab.css +1 -1
  43. package/lib/control/exp-bar/render-util.cjs +2 -2
  44. package/lib/control/medit-view-panel/medit-view-panel.cjs +1 -1
  45. package/lib/control/toolbar/toolbar.cjs +3 -0
  46. package/lib/control/tree/tree.cjs +1 -1
  47. package/lib/control/tree-grid-ex/tree-grid-ex.cjs +1 -0
  48. package/lib/editor/date-picker/ibiz-date-picker/ibiz-date-picker.cjs +2 -1
  49. package/lib/locale/en/index.cjs +1 -0
  50. package/lib/locale/zh-CN/index.cjs +1 -0
  51. package/lib/panel-component/global-search/global-search.cjs +2 -1
  52. package/lib/panel-component/nav-tabs/nav-tabs.cjs +12 -3
  53. package/lib/panel-component/short-cut/short-cut.cjs +2 -1
  54. package/lib/panel-component/user-message/user-message.cjs +1 -0
  55. package/lib/util/ai-chat-util/ai-chat-util.cjs +18 -2
  56. package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
  57. package/package.json +6 -6
  58. package/src/common/button-list/button-list.tsx +4 -1
  59. package/src/common/data-import/data-import.tsx +20 -9
  60. package/src/control/calendar/components/calendar-user2/calendar-user2.tsx +2 -2
  61. package/src/control/calendar/components/custom-calendar/custom-calendar.tsx +1 -1
  62. package/src/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.tsx +2 -0
  63. package/src/control/drtab/drtab.controller.ts +86 -20
  64. package/src/control/drtab/drtab.tsx +1 -1
  65. package/src/control/drtab/flow-drtab.scss +21 -0
  66. package/src/control/drtab/flow-drtab.tsx +40 -16
  67. package/src/control/exp-bar/render-util.tsx +3 -3
  68. package/src/control/medit-view-panel/medit-view-panel.tsx +1 -1
  69. package/src/control/toolbar/toolbar.tsx +1 -0
  70. package/src/control/tree/tree.tsx +1 -1
  71. package/src/control/tree-grid-ex/tree-grid-ex.tsx +1 -0
  72. package/src/editor/date-picker/ibiz-date-picker/ibiz-date-picker.tsx +1 -0
  73. package/src/locale/en/index.ts +1 -0
  74. package/src/locale/zh-CN/index.ts +1 -0
  75. package/src/panel-component/global-search/global-search.tsx +1 -0
  76. package/src/panel-component/nav-tabs/nav-tabs.tsx +9 -0
  77. package/src/panel-component/short-cut/short-cut.tsx +1 -0
  78. package/src/panel-component/user-message/user-message.tsx +1 -0
  79. package/src/util/ai-chat-util/ai-chat-util.ts +20 -2
  80. package/dist/index-CkG9L_La.js +0 -339
  81. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.117_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.119_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  82. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.117_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.119_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -227,15 +227,24 @@ const NavTabs = /* @__PURE__ */ vue.defineComponent({
227
227
  }, [vue.createVNode("span", {
228
228
  "class": [this.ns.em("item", "captioninfo"), this.semanticClass("item.captioninfo", {
229
229
  item: msg
230
- })]
230
+ })],
231
+ "style": this.semanticStyle("item.captioninfo", {
232
+ item: msg
233
+ })
231
234
  }, [msg.caption]), msg.dataInfo && vue.createVNode("span", {
232
235
  "class": [this.ns.em("item", "captiondivider"), this.semanticClass("item.captiondivider", {
233
236
  item: msg
234
- })]
237
+ })],
238
+ "style": this.semanticStyle("item.captiondivider", {
239
+ item: msg
240
+ })
235
241
  }, [vue.createTextVNode("\xA0-\xA0")]), msg.dataInfo && vue.createVNode("span", {
236
242
  "class": [this.ns.em("item", "datainfo"), this.semanticClass("item.datainfo", {
237
243
  item: msg
238
- })]
244
+ })],
245
+ "style": this.semanticStyle("item.datainfo", {
246
+ item: msg
247
+ })
239
248
  }, [msg.dataInfo])])]);
240
249
  }
241
250
  });
@@ -219,7 +219,8 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
219
219
  "placement": "top-start",
220
220
  "trigger": "click",
221
221
  "width": "auto",
222
- "popper-class": [ns.e("popover"), semanticClass("popup")]
222
+ "popper-class": [ns.e("popover"), semanticClass("popup")],
223
+ "popper-style": semanticStyle("popup")
223
224
  }, {
224
225
  reference: () => {
225
226
  return vue.createVNode("div", {
@@ -106,6 +106,7 @@ const UserMessage = /* @__PURE__ */ vue.defineComponent({
106
106
  }, [vue.createVNode(vue.resolveComponent("el-popover"), {
107
107
  "ref": "popoverRef",
108
108
  "popper-class": [this.ns.b("popover"), this.semanticClass("popup")],
109
+ "popper-style": this.semanticStyle("popup"),
109
110
  "placement": "bottom",
110
111
  "trigger": "click",
111
112
  "visible": this.showPopover,
@@ -105,7 +105,10 @@ class AIChatUtil {
105
105
  params,
106
106
  data
107
107
  ) : void 0;
108
- chatOptions.autoQuestion = editorParams.autoquestion !== "false";
108
+ chatOptions.autoQuestion = ibiz.config.common.aiAutoQuestion;
109
+ if (editorParams.autoquestion) {
110
+ chatOptions.autoQuestion = editorParams.autoquestion !== "false";
111
+ }
109
112
  chatOptions.autoFill = editorParams.autofill === "true";
110
113
  chatOptions.appendCurResource = editorParams.srfaiappendresource ? core.StringUtil.fill(editorParams.srfaiappendresource, context, params, data) : void 0;
111
114
  if (editorParams.srfmode) {
@@ -509,6 +512,11 @@ class AIChatUtil {
509
512
  );
510
513
  }
511
514
  };
515
+ let uploadMaxSize = ibiz.config.common.aiUploadMaxSize;
516
+ if (editorParams.srfuploadmaxsize) {
517
+ uploadMaxSize = Number(editorParams.srfuploadmaxsize);
518
+ }
519
+ chatOptions.uploader.maxSize = uploadMaxSize;
512
520
  chatOptions.extendToolbarClick = async (event, source, context2, params2, data2) => {
513
521
  var _a2, _b, _c;
514
522
  const { id: id2, isPluginApp } = source;
@@ -664,10 +672,12 @@ class AIChatUtil {
664
672
  );
665
673
  delete params.srfaiappendcurcontent;
666
674
  }
675
+ let autoQuestion = ibiz.config.common.aiAutoQuestion;
667
676
  if (params.hasOwnProperty("autoquestion")) {
668
- chatOptions.autoQuestion = params.autoquestion !== "false";
677
+ autoQuestion = params.autoquestion !== "false";
669
678
  delete params.autoquestion;
670
679
  }
680
+ chatOptions.autoQuestion = autoQuestion;
671
681
  if (params.hasOwnProperty("srfaiappendresource")) {
672
682
  chatOptions.appendCurResource = core.StringUtil.fill(
673
683
  params.srfaiappendresource,
@@ -1086,6 +1096,12 @@ class AIChatUtil {
1086
1096
  );
1087
1097
  }
1088
1098
  };
1099
+ let uploadMaxSize = ibiz.config.common.aiUploadMaxSize;
1100
+ if (params.hasOwnProperty("srfuploadmaxsize")) {
1101
+ uploadMaxSize = Number(params.srfuploadmaxsize);
1102
+ delete params.srfuploadmaxsize;
1103
+ }
1104
+ chatOptions.uploader.maxSize = uploadMaxSize;
1089
1105
  chatOptions.extendToolbarClick = async (event, source, context2, params2, data2) => {
1090
1106
  var _a2, _b, _c;
1091
1107
  const { id: id2, isPluginApp } = source;
@@ -2,7 +2,7 @@
2
2
 
3
3
  var vue = require('vue');
4
4
  var ElementPlus = require('element-plus');
5
- var namespace = require('../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.117_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs');
5
+ var namespace = require('../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.119_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs');
6
6
  var fullscreenToolbar = require('../../common/fullscreen-toolbar/fullscreen-toolbar.cjs');
7
7
 
8
8
  "use strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.41-alpha.113",
3
+ "version": "0.7.41-alpha.115",
4
4
  "description": "web端组件库(vue3)",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -31,16 +31,16 @@
31
31
  "dependencies": {
32
32
  "@amap/amap-jsapi-loader": "^1.0.1",
33
33
  "@floating-ui/dom": "^1.5.3",
34
- "@ibiz-template-plugin/ai-chat": "^0.0.87",
34
+ "@ibiz-template-plugin/ai-chat": "^0.0.89",
35
35
  "@ibiz-template-plugin/gantt": "0.1.8-alpha.468",
36
36
  "@ibiz-template-plugin/bi-report": "0.0.32",
37
37
  "@ibiz-template-plugin/data-view": "0.0.7",
38
- "@ibiz-template/core": "0.7.41-alpha.117",
38
+ "@ibiz-template/core": "0.7.41-alpha.119",
39
39
  "@ibiz-template/devtool": "0.0.16",
40
- "@ibiz-template/model-helper": "0.7.41-alpha.118",
41
- "@ibiz-template/runtime": "0.7.41-alpha.118",
40
+ "@ibiz-template/model-helper": "0.7.41-alpha.121",
41
+ "@ibiz-template/runtime": "0.7.41-alpha.121",
42
42
  "@ibiz-template/theme": "0.7.39",
43
- "@ibiz-template/vue3-util": "0.7.41-alpha.118",
43
+ "@ibiz-template/vue3-util": "0.7.41-alpha.121",
44
44
  "@ibiz-template/web-theme": "3.16.0",
45
45
  "@ibiz/model-core": "^0.1.89",
46
46
  "@imengyu/vue3-context-menu": "^1.3.5",
@@ -253,7 +253,10 @@ export const IBizButtonList = defineComponent({
253
253
  },
254
254
  ],
255
255
  }}
256
- popper-style={`z-index: ${zIndex.zIndex}`}
256
+ popper-style={{
257
+ zIndex: zIndex.zIndex,
258
+ ...props.semantic.semanticStyle('popup', { model: detail }),
259
+ }}
257
260
  >
258
261
  {{
259
262
  reference: () => {
@@ -1,12 +1,11 @@
1
1
  import { IAppDataEntity, IAppDEDataImport } from '@ibiz/model-core';
2
2
  import { useNamespace } from '@ibiz-template/vue3-util';
3
3
  import { defineComponent, ref, PropType } from 'vue';
4
-
5
- import './data-import.scss';
6
4
  import {
7
- downloadImportTemplate,
8
5
  selectAndImport,
6
+ downloadImportTemplate,
9
7
  } from '@ibiz-template/runtime';
8
+ import './data-import.scss';
10
9
 
11
10
  export const DataImport = defineComponent({
12
11
  name: 'DataImport',
@@ -46,6 +45,11 @@ export const DataImport = defineComponent({
46
45
 
47
46
  const isLoading = ref(false);
48
47
 
48
+ const importTemplName =
49
+ ibiz.config.common.importTemplNameMode === 'custom'
50
+ ? `${props.dataImport?.name}${ibiz.i18n.t('component.dataImport.template')}`
51
+ : `${props.appDataEntity.logicName}${ibiz.i18n.t('component.dataImport.templateFile')}`;
52
+
49
53
  const onCancelButtonClick = () => {
50
54
  props.dismiss();
51
55
  };
@@ -57,11 +61,18 @@ export const DataImport = defineComponent({
57
61
  props.dataImport,
58
62
  props.context,
59
63
  props.params,
64
+ ibiz.config.common.importTemplNameMode === 'custom'
65
+ ? importTemplName
66
+ : undefined,
60
67
  );
61
68
  };
62
69
 
63
70
  const selectFile = async () => {
64
71
  isLoading.value = true;
72
+ // 重置提示信息
73
+ errorMessage.value = '';
74
+ message.value.message = '';
75
+ message.value.state = 'ready';
65
76
  const result = await selectAndImport({
66
77
  appDataEntity: props.appDataEntity,
67
78
  dataImport: props.dataImport,
@@ -101,12 +112,13 @@ export const DataImport = defineComponent({
101
112
 
102
113
  return {
103
114
  ns,
104
- onLinkClick,
105
- selectFile,
106
- onCancelButtonClick,
107
- isLoading,
108
115
  message,
116
+ isLoading,
109
117
  errorMessage,
118
+ importTemplName,
119
+ selectFile,
120
+ onLinkClick,
121
+ onCancelButtonClick,
110
122
  };
111
123
  },
112
124
  render() {
@@ -149,8 +161,7 @@ export const DataImport = defineComponent({
149
161
  </div>
150
162
  <div class={this.ns.e('template-link')} onClick={this.onLinkClick}>
151
163
  <ion-icon class={this.ns.e('link-icon')} name='link' />
152
- {this.appDataEntity.logicName}
153
- {ibiz.i18n.t('component.dataImport.templateFile')}
164
+ {this.importTemplName}
154
165
  </div>
155
166
  </div>
156
167
  <div class={this.ns.e('button-bar')}>
@@ -157,7 +157,7 @@ export const CalendarUser2 = defineComponent({
157
157
  class={[
158
158
  this.ns.e('legend'),
159
159
  this.ns.em('header', 'legend'),
160
- this.semanticStyle('legend'),
160
+ this.semanticClass('legend'),
161
161
  ]}
162
162
  style={this.semanticStyle('legend')}
163
163
  >
@@ -168,7 +168,7 @@ export const CalendarUser2 = defineComponent({
168
168
  class={[
169
169
  this.ns.e('legend-item'),
170
170
  this.ns.em('legend', 'item'),
171
- this.semanticStyle('legend.item'),
171
+ this.semanticClass('legend.item'),
172
172
  ]}
173
173
  style={this.semanticStyle('legend.item')}
174
174
  onClick={() => this.$emit('legendClick', legend)}
@@ -171,7 +171,7 @@ export const CustomCalendar = defineComponent({
171
171
  */
172
172
  const renderDay = () => {
173
173
  return (
174
- <div class={ns.e('calendar-day')} style={props.semanticStyle('day')}>
174
+ <div class={ns.e('calendar-day')}>
175
175
  {slots?.header ? (
176
176
  <div
177
177
  class={[
@@ -170,6 +170,7 @@ export const AppMenuPortletControl = defineComponent({
170
170
  content = (
171
171
  <el-collapse
172
172
  class={[this.ns.e('content'), this.semanticClass('content')]}
173
+ style={this.semanticStyle('content')}
173
174
  v-model={this.defaultOpens}
174
175
  >
175
176
  {model.appMenuItems.map(item => {
@@ -185,6 +186,7 @@ export const AppMenuPortletControl = defineComponent({
185
186
  return (
186
187
  <iBizControlBase
187
188
  class={[this.ns.b(), this.semanticClass('root')]}
189
+ style={this.semanticStyle('root')}
188
190
  controller={this.c}
189
191
  >
190
192
  {content}
@@ -19,7 +19,11 @@ import {
19
19
  calcItemVisible,
20
20
  } from '@ibiz-template/runtime';
21
21
  import { getNestedRoutePath } from '@ibiz-template/vue3-util';
22
- import { IDEDRCtrlItem, IDEDRTab } from '@ibiz/model-core';
22
+ import {
23
+ IAppDETabExplorerView,
24
+ IDEDRCtrlItem,
25
+ IDEDRTab,
26
+ } from '@ibiz/model-core';
23
27
  import { Router } from 'vue-router';
24
28
  import { isNil } from 'ramda';
25
29
 
@@ -57,6 +61,13 @@ export class DRTabController
57
61
  */
58
62
  srfCacheKeyTempl: string = '';
59
63
 
64
+ /**
65
+ * @description 显示位置
66
+ * @type {(string | undefined)}
67
+ * @memberof DRTabController
68
+ */
69
+ tabPosition: string | undefined;
70
+
60
71
  /**
61
72
  * 导航占位控制器
62
73
  *
@@ -103,6 +114,16 @@ export class DRTabController
103
114
  return `${userId}_${this.view.model.codeName}_${this.model.codeName}`;
104
115
  }
105
116
 
117
+ /**
118
+ * @description 是否启用折叠
119
+ * @readonly
120
+ * @type {boolean}
121
+ * @memberof DRTabController
122
+ */
123
+ get enableCollapse(): boolean {
124
+ return this.controlParams.enablecollapse === 'true';
125
+ }
126
+
106
127
  /**
107
128
  * 是否启用锚点栏
108
129
  *
@@ -114,7 +135,7 @@ export class DRTabController
114
135
  if (this.controlParams.enablenavbar) {
115
136
  return this.controlParams.enablenavbar === 'true';
116
137
  }
117
- return (ibiz.config as IData).drtab.enableNavbar;
138
+ return ibiz.config.drtab.enableNavbar;
118
139
  }
119
140
 
120
141
  /**
@@ -126,8 +147,8 @@ export class DRTabController
126
147
  */
127
148
  get navbarpos(): string {
128
149
  return (
129
- (this.controlParams.navbarpos as string)?.toLowerCase() ||
130
- ((ibiz.config as IData).drtab.navbarPos as string).toLowerCase()
150
+ this.controlParams.navbarpos?.toLowerCase() ||
151
+ ibiz.config.drtab.navbarPos.toLowerCase()
131
152
  );
132
153
  }
133
154
 
@@ -139,9 +160,7 @@ export class DRTabController
139
160
  * @memberof DRTabController
140
161
  */
141
162
  get navbarwidth(): string | number {
142
- return (
143
- this.controlParams.navbarwidth || (ibiz.config as IData).drtab.navbarWidth
144
- );
163
+ return this.controlParams.navbarwidth || ibiz.config.drtab.navbarWidth;
145
164
  }
146
165
 
147
166
  /**
@@ -182,6 +201,8 @@ export class DRTabController
182
201
  super.initState();
183
202
  this.state.drTabPages = [];
184
203
  this.state.showMore = false;
204
+ this.state.expandedKeys = [];
205
+ this.state.expViewParams = {};
185
206
  // 未配置时默认隐藏编辑项
186
207
  this.state.hideEditItem = !!this.model.hideEditItem;
187
208
  }
@@ -193,6 +214,9 @@ export class DRTabController
193
214
  * @memberof DRTabController
194
215
  */
195
216
  async onCreated(): Promise<void> {
217
+ this.tabPosition = (
218
+ this.view.model as IAppDETabExplorerView
219
+ ).tabLayout?.toLowerCase();
196
220
  await super.onCreated();
197
221
  await this.initCounter();
198
222
  this.srfCacheKeyTempl = this.controlParams.srfcachekeytempl || '';
@@ -425,7 +449,7 @@ export class DRTabController
425
449
  testScriptCode,
426
450
  counterMode,
427
451
  } = item;
428
- drTabPages.push({
452
+ const drTabPage: IDRTabPagesState = {
429
453
  tag: item.id!,
430
454
  caption: item.caption,
431
455
  sysImage: item.sysImage,
@@ -437,7 +461,15 @@ export class DRTabController
437
461
  testAppDELogicId,
438
462
  testScriptCode,
439
463
  counterMode,
440
- });
464
+ };
465
+ if (this.tabPosition === 'flow_noheader' || this.tabPosition === 'flow') {
466
+ const { context, params } = this.prepareParams(item);
467
+ Object.assign(drTabPage, {
468
+ context,
469
+ params,
470
+ });
471
+ }
472
+ drTabPages.push(drTabPage);
441
473
  });
442
474
  this.state.drTabPages = drTabPages;
443
475
  this.state.defaultName = drTabPages[0].tag;
@@ -450,6 +482,9 @@ export class DRTabController
450
482
  this.state.activeName = activeName;
451
483
  }
452
484
  }
485
+ // 折叠模式下默认展开所有项
486
+ if (this.enableCollapse)
487
+ this.state.expandedKeys = this.state.drTabPages.map(tab => tab.tag);
453
488
  // 路由模式下,且有子路由的时候不需要navpos跳转路由,只要做呈现
454
489
  const isRoutePushed = !!this.routeDepth && hasSubRoute(this.routeDepth);
455
490
  this.handleTabChange(isRoutePushed);
@@ -518,15 +553,15 @@ export class DRTabController
518
553
  /**
519
554
  * 准备参数
520
555
  *
521
- * @param {IDEDRCtrlItem} drTabPages 关系分页
556
+ * @param {IDEDRCtrlItem} drTabPage 关系分页
522
557
  * @return {*}
523
558
  * @memberof DRTabController
524
559
  */
525
- prepareParams(drTabPages: IDEDRCtrlItem): {
560
+ prepareParams(drTabPage: IDEDRCtrlItem): {
526
561
  context: IContext;
527
562
  params: IParams;
528
563
  } {
529
- const { navigateContexts, navigateParams } = drTabPages;
564
+ const { navigateContexts, navigateParams } = drTabPage;
530
565
  const model = {
531
566
  navContexts: navigateContexts,
532
567
  navParams: navigateParams,
@@ -538,9 +573,13 @@ export class DRTabController
538
573
  };
539
574
  const { resultContext, resultParams } = calcNavParams(model, originParams);
540
575
  const context = Object.assign(this.context.clone(), resultContext, {
541
- currentSrfNav: drTabPages.id,
576
+ currentSrfNav: drTabPage.id,
542
577
  });
543
- const params = { ...this.params, ...resultParams };
578
+ const params = {
579
+ ...this.params,
580
+ ...resultParams,
581
+ ...this.state.expViewParams,
582
+ };
544
583
  return { context, params };
545
584
  }
546
585
 
@@ -549,22 +588,22 @@ export class DRTabController
549
588
  *
550
589
  * @author lxm
551
590
  * @date 2023-12-21 05:40:07
552
- * @param {IDEDRCtrlItem} drTabPages
591
+ * @param {IDEDRCtrlItem} drTabPage
553
592
  * @param {boolean} [isRoutePushed=false]
554
593
  * @return {*} {Promise<void>}
555
594
  */
556
595
  async openNavPosView(
557
- drTabPages: IDEDRCtrlItem,
596
+ drTabPage: IDEDRCtrlItem,
558
597
  isRoutePushed = false,
559
598
  navViewKey?: string,
560
599
  ): Promise<void> {
561
- const { context, params } = this.prepareParams(drTabPages);
562
- if (!drTabPages.appViewId) return;
600
+ const { context, params } = this.prepareParams(drTabPage);
601
+ if (!drTabPage.appViewId) return;
563
602
  this.navPos?.openView({
564
- key: navViewKey || drTabPages.id!,
603
+ key: navViewKey || drTabPage.id!,
565
604
  context,
566
605
  params,
567
- viewId: drTabPages.appViewId,
606
+ viewId: drTabPage.appViewId,
568
607
  isRoutePushed,
569
608
  });
570
609
  }
@@ -600,6 +639,19 @@ export class DRTabController
600
639
  * @return {*} {Promise<void>}
601
640
  */
602
641
  async refresh(): Promise<void> {
642
+ if (this.tabPosition === 'flow_noheader' || this.tabPosition === 'flow') {
643
+ this.state.drTabPages.forEach((tabPageState: IDRTabPagesState) => {
644
+ const dedrtabPage = this.model.dedrtabPages?.find(
645
+ item => item.id === tabPageState.tag,
646
+ );
647
+ if (dedrtabPage) {
648
+ const { context, params } = this.prepareParams(dedrtabPage);
649
+ tabPageState.context = context;
650
+ tabPageState.params = params;
651
+ }
652
+ });
653
+ return;
654
+ }
603
655
  const { activeName } = this.state;
604
656
  const drBarItem = this.model.dedrtabPages?.find(
605
657
  item => item.id === activeName,
@@ -660,4 +712,18 @@ export class DRTabController
660
712
  page.caption = ibiz.i18n.t(page.capLanguageRes.lanResTag, page.caption);
661
713
  });
662
714
  }
715
+
716
+ /**
717
+ * @description 折叠改变
718
+ * @param {string} id
719
+ * @memberof DRTabController
720
+ */
721
+ onCollapseChange(id: string): void {
722
+ const index = this.state.expandedKeys.findIndex(key => key === id);
723
+ if (index > -1) {
724
+ this.state.expandedKeys.splice(index, 1);
725
+ } else {
726
+ this.state.expandedKeys.push(id);
727
+ }
728
+ }
663
729
  }
@@ -319,7 +319,7 @@ export const DRTabControl = defineComponent({
319
319
  style={this.semanticStyle('root')}
320
320
  semanticClass={this.semanticClass}
321
321
  semanticStyle={this.semanticStyle}
322
- pagesstate={this.visibleItems as IData[]}
322
+ pagesState={this.visibleItems as IData[]}
323
323
  drtabpages={this.modelData.dedrtabPages}
324
324
  context={this.c.context}
325
325
  params={this.c.params}
@@ -46,6 +46,12 @@ $control-drtab-flow-item-counter: (
46
46
  overflow: hidden;
47
47
  background-color: getCssVar('control-drtab-flow', 'bg-color');
48
48
 
49
+ @include e('icon') {
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ }
54
+
49
55
  @include e('container') {
50
56
  height: 100%;
51
57
  overflow: auto;
@@ -55,6 +61,21 @@ $control-drtab-flow-item-counter: (
55
61
  background-color: getCssVar('control-drtab-flow-item', 'bg-color');
56
62
  border-radius: getCssVar('control-drtab-flow-item', 'border-radius');
57
63
 
64
+ @include when('enable-collapse') {
65
+ .#{bem('flow-drtab', 'tab-item', 'label')} {
66
+ cursor: pointer;
67
+ }
68
+ }
69
+
70
+ @include when('collapse') {
71
+ .#{bem('flow-drtab', 'icon', 'collapse')} {
72
+ transform: rotate(-90deg);
73
+ }
74
+ .#{bem('flow-drtab', 'tab-item', 'tab-view')} {
75
+ display: none;
76
+ }
77
+ }
78
+
58
79
  @include m('label') {
59
80
  display: flex;
60
81
  gap: getCssVar('control-drtab-flow-item', 'gap');