@ibiz-template/vue3-components 0.7.41-alpha.35 → 0.7.41-alpha.37

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 (35) hide show
  1. package/dist/index-Dds3BDDF.js +11 -0
  2. package/dist/index.min.css +1 -1
  3. package/dist/index.system.min.js +1 -1
  4. package/dist/{wang-editor-ChCpoajm.js → wang-editor-4cJ6X_hb.js} +1 -1
  5. package/dist/{xlsx-util-SpNblJva.js → xlsx-util-DZ5-cWNj.js} +1 -1
  6. package/es/common/rawitem/rawitem.mjs +3 -1
  7. package/es/control/calendar/calendar.mjs +33 -8
  8. package/es/control/drtab/drtab-control.util.mjs +1 -1
  9. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.mjs +30 -0
  10. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +114 -85
  11. package/es/control/tab-exp-panel/tab-exp-panel.mjs +4 -17
  12. package/es/control/tree/tree.mjs +3 -2
  13. package/es/editor/text-box/input/input.css +1 -1
  14. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.mjs +1 -1
  15. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.mjs +6 -1
  16. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.mjs +54 -0
  17. package/es/util/fullscreen/fullscreen-util.mjs +1 -1
  18. package/es/util/modal-util/modal-util.mjs +10 -0
  19. package/lib/common/rawitem/rawitem.cjs +3 -1
  20. package/lib/control/calendar/calendar.cjs +32 -7
  21. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  22. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.cjs +32 -0
  23. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +113 -84
  24. package/lib/control/tab-exp-panel/tab-exp-panel.cjs +3 -16
  25. package/lib/control/tree/tree.cjs +3 -2
  26. package/lib/editor/text-box/input/input.css +1 -1
  27. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.util.cjs +1 -1
  28. package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.cjs +6 -1
  29. package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.cjs +54 -0
  30. package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
  31. package/lib/util/modal-util/modal-util.cjs +10 -0
  32. package/package.json +6 -6
  33. package/dist/index-BGdJyfPK.js +0 -11
  34. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.33_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.35_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
  35. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.33_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.35_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
@@ -4,6 +4,7 @@ var vue = require('vue');
4
4
  var vue3Util = require('@ibiz-template/vue3-util');
5
5
  var runtime = require('@ibiz-template/runtime');
6
6
  var dayjs = require('dayjs');
7
+ var lodashEs = require('lodash-es');
7
8
  var core = require('@ibiz-template/core');
8
9
  var index = require('./components/custom-calendar/index.cjs');
9
10
  var calendarUtil = require('./calendar-util.cjs');
@@ -82,6 +83,13 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
82
83
  const curPopover = vue.ref();
83
84
  const showDateRange = vue.ref(c.controlParams.showmode === "daterange");
84
85
  const showDateList = vue.ref(c.controlParams.showmode === "expand");
86
+ const infiniteScroll = vue.ref();
87
+ const disabledLodeMore = vue.computed(() => {
88
+ if (c.model.calendarStyle !== "TIMELINE" || c.state.isLoading)
89
+ return true;
90
+ const result = !Object.values(c.loadMoreItems).some((item) => item.curPage < item.totalPage);
91
+ return result;
92
+ });
85
93
  const monthLegendClick = (_item) => {
86
94
  Object.assign(_item, {
87
95
  isShow: !_item.isShow
@@ -118,6 +126,17 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
118
126
  vue.watch(() => UIStore.theme, () => {
119
127
  calcLegend();
120
128
  });
129
+ const handleScrollLoad = async () => {
130
+ if (!infiniteScroll.value || disabledLodeMore.value)
131
+ return;
132
+ const scrollTop = infiniteScroll.value.scrollTop;
133
+ const scrollHeight = infiniteScroll.value.scrollHeight;
134
+ const clientHeight = infiniteScroll.value.clientHeight;
135
+ if (scrollHeight - scrollTop - clientHeight < 10)
136
+ await c.load({
137
+ isLoadMore: true
138
+ });
139
+ };
121
140
  const popoverValue = vue.ref("");
122
141
  const selectDate = (tag) => {
123
142
  if (!calendarRef.value)
@@ -374,15 +393,18 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
374
393
  ns,
375
394
  curPopover,
376
395
  calendarRef,
377
- showDateRange,
378
- showDateList,
379
- popoverValue,
380
396
  legendItems,
397
+ popoverValue,
398
+ showDateList,
399
+ showDateRange,
400
+ infiniteScroll,
401
+ disabledLodeMore,
381
402
  selectDate,
382
403
  calcItemStyle,
404
+ handleScrollLoad,
405
+ monthLegendClick,
383
406
  calcCalendarItems,
384
- onNodeContextmenu,
385
- monthLegendClick
407
+ onNodeContextmenu
386
408
  };
387
409
  },
388
410
  render() {
@@ -650,14 +672,17 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
650
672
  };
651
673
  const renderTimeLine = () => {
652
674
  return vue.createVNode("div", {
653
- "class": this.ns.b("timeline-content")
675
+ "ref": "infiniteScroll",
676
+ "class": this.ns.b("timeline-content"),
677
+ "onScroll": lodashEs.debounce(this.handleScrollLoad, 300)
654
678
  }, [vue.createVNode(vue.resolveComponent("el-timeline"), null, {
655
679
  default: () => [this.c.state.items.length > 0 ? this.c.state.items.map((item) => {
656
680
  var _a;
657
681
  const model = (_a = this.c.model.sysCalendarItems) == null ? void 0 : _a.find((calendarItems) => {
658
682
  return item.itemType === calendarItems.itemType;
659
683
  });
660
- const temptime = item.beginTime ? dayjs(item.beginTime).format(this.c.timelineCaptionFormat) : item.beginTime;
684
+ const time = item[this.c.groupTimeField];
685
+ const temptime = time ? dayjs(time).format(this.c.timelineCaptionFormat) : time;
661
686
  return vue.createVNode(vue.resolveComponent("el-timeline-item"), {
662
687
  "key": item.id,
663
688
  "placement": "top",
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var vue = require('vue');
4
- var namespace = require('../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.33_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');
4
+ var namespace = require('../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.35_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
5
 
6
6
  "use strict";
7
7
  function useAppDRTab(c, controlRef, counterData) {
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+
5
+ "use strict";
6
+ function useLoadMore(initItems, chunkSize) {
7
+ let totalItems = [];
8
+ let page = 1;
9
+ const renderItems = vue.ref([]);
10
+ const updateTotalItems = (items) => {
11
+ page = 1;
12
+ totalItems = items != null ? items : [];
13
+ renderItems.value = totalItems.slice(0, chunkSize);
14
+ };
15
+ updateTotalItems(initItems);
16
+ const loadMore = () => {
17
+ if (renderItems.value.length >= totalItems.length) {
18
+ return;
19
+ }
20
+ page += 1;
21
+ const start = (page - 1) * chunkSize;
22
+ const end = page * chunkSize;
23
+ renderItems.value.push(...totalItems.slice(start, end));
24
+ };
25
+ return {
26
+ renderItems,
27
+ loadMore,
28
+ updateTotalItems
29
+ };
30
+ }
31
+
32
+ exports.useLoadMore = useLoadMore;
@@ -6,6 +6,7 @@ var runtime = require('@ibiz-template/runtime');
6
6
  var qxUtil = require('qx-util');
7
7
  var vue3Util = require('@ibiz-template/vue3-util');
8
8
  var core = require('@ibiz-template/core');
9
+ var formMdctrlRepeater_util = require('../form-mdctrl-repeater.util.cjs');
9
10
  require('./repeater-grid.css');
10
11
 
11
12
  "use strict";
@@ -26,14 +27,21 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
26
27
  setup(props, {
27
28
  emit
28
29
  }) {
30
+ var _a, _b;
29
31
  const ns = vue3Util.useNamespace("repeater-grid");
30
32
  const formItems = [];
31
33
  const tableRef = vue.ref();
32
34
  const tableKey = vue.ref(qxUtil.createUUID());
35
+ const chunkSize = ((_a = props.controller.model.ctrlParams) == null ? void 0 : _a.chunkSize) ? Number((_b = props.controller.model.ctrlParams) == null ? void 0 : _b.chunkSize) : 100;
36
+ const {
37
+ renderItems,
38
+ loadMore,
39
+ updateTotalItems
40
+ } = formMdctrlRepeater_util.useLoadMore(props.controller.value, chunkSize);
33
41
  core.recursiveIterate(props.controller.repeatedForm, (item) => {
34
- var _a;
42
+ var _a2;
35
43
  if (item.detailType === "FORMITEM") {
36
- if (((_a = item.editor) == null ? void 0 : _a.editorType) !== "HIDDEN") {
44
+ if (((_a2 = item.editor) == null ? void 0 : _a2.editorType) !== "HIDDEN") {
37
45
  formItems.push(item);
38
46
  }
39
47
  }
@@ -87,14 +95,15 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
87
95
  });
88
96
  }
89
97
  }
98
+ updateTotalItems(newVal || []);
90
99
  }, {
91
100
  immediate: true,
92
101
  deep: true
93
102
  });
94
103
  let sortable;
95
104
  const rowDrop = () => {
96
- var _a, _b;
97
- const wrapper = (_b = (_a = tableRef.value) == null ? void 0 : _a.$el) == null ? void 0 : _b.querySelector(".el-table__body-wrapper tbody");
105
+ var _a2, _b2;
106
+ const wrapper = (_b2 = (_a2 = tableRef.value) == null ? void 0 : _a2.$el) == null ? void 0 : _b2.querySelector(".el-table__body-wrapper tbody");
98
107
  if (!wrapper || !props.controller.enableSort)
99
108
  return;
100
109
  sortable = sortable_esm.default.create(wrapper, {
@@ -154,12 +163,19 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
154
163
  tableRef,
155
164
  tableKey,
156
165
  formItems,
166
+ renderItems,
157
167
  formControllers,
158
- renderRemoveBtn
168
+ renderRemoveBtn,
169
+ loadMore
159
170
  };
160
171
  },
161
172
  render() {
173
+ var _a;
162
174
  let _slot3;
175
+ const tableHeight = (_a = this.controller.model.layoutPos) == null ? void 0 : _a.height;
176
+ const heightObject = tableHeight ? {
177
+ height: tableHeight
178
+ } : {};
163
179
  return vue.createVNode("div", {
164
180
  "class": this.ns.b()
165
181
  }, [this.controller.enableCreate && vue.createVNode(vue.resolveComponent("el-button"), {
@@ -169,104 +185,117 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
169
185
  }
170
186
  }, _isSlot(_slot3 = ibiz.i18n.t("app.add")) ? _slot3 : {
171
187
  default: () => [_slot3]
172
- }), vue.createVNode(vue.resolveComponent("el-table"), {
188
+ }), vue.createVNode(vue.resolveComponent("el-table"), vue.mergeProps({
173
189
  "ref": "tableRef",
174
190
  "key": this.tableKey,
175
191
  "show-header": true,
176
192
  "class": this.ns.e("table"),
177
- "data": this.controller.value,
193
+ "data": this.renderItems,
178
194
  "cell-class-name": ({
179
195
  columnIndex
180
196
  }) => {
181
197
  const shouldShowIndex = this.controller.enableSort ? columnIndex === 1 : columnIndex === 0;
182
198
  return shouldShowIndex ? this.ns.b("index") : "";
183
199
  }
184
- }, {
185
- default: () => [this.controller.enableSort && vue.createVNode(vue.resolveComponent("el-table-column"), {
186
- "width": 26,
187
- "type": "default"
188
- }, {
189
- default: () => vue.createVNode("svg", {
190
- "viewBox": "0 0 16 16",
191
- "xmlns": "http://www.w3.org/2000/svg",
192
- "height": "1em",
193
- "width": "1em",
194
- "class": this.ns.e("drag-icon"),
195
- "preserveAspectRatio": "xMidYMid meet",
196
- "focusable": "false"
197
- }, [vue.createVNode("g", {
198
- "stroke-width": "1",
199
- "fill-rule": "evenodd"
200
- }, [vue.createVNode("g", {
201
- "transform": "translate(5 1)",
202
- "fill-rule": "nonzero"
203
- }, [vue.createVNode("path", {
204
- "d": "M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"
205
- }, null)])])])
206
- }), vue.createVNode(vue.resolveComponent("el-table-column"), {
207
- "type": "index",
208
- "width": 66,
209
- "align": "center"
210
- }, {
211
- default: (opts) => {
212
- const {
213
- $index
214
- } = opts;
215
- if (!this.controller.enableDelete) {
216
- return vue.createVNode("span", null, [$index + 1]);
217
- }
218
- return [this.renderRemoveBtn($index), vue.createVNode("span", {
219
- "class": this.ns.be("index", "text")
220
- }, [$index + 1])];
221
- }
222
- }), this.formItems.length > 0 && this.formItems.map((item) => {
223
- const width = item.labelWidth;
224
- let columnWidth = "";
225
- if (typeof width === "number") {
226
- columnWidth = "".concat(width, "px");
227
- }
228
- return vue.createVNode(vue.resolveComponent("el-table-column"), {
229
- "label": item.caption,
230
- "prop": item.id,
231
- "width": columnWidth,
200
+ }, heightObject), {
201
+ default: () => {
202
+ return [this.controller.enableSort && vue.createVNode(vue.resolveComponent("el-table-column"), {
203
+ "width": 26,
204
+ "type": "default"
205
+ }, {
206
+ default: () => vue.createVNode("svg", {
207
+ "viewBox": "0 0 16 16",
208
+ "xmlns": "http://www.w3.org/2000/svg",
209
+ "height": "1em",
210
+ "width": "1em",
211
+ "class": this.ns.e("drag-icon"),
212
+ "preserveAspectRatio": "xMidYMid meet",
213
+ "focusable": "false"
214
+ }, [vue.createVNode("g", {
215
+ "stroke-width": "1",
216
+ "fill-rule": "evenodd"
217
+ }, [vue.createVNode("g", {
218
+ "transform": "translate(5 1)",
219
+ "fill-rule": "nonzero"
220
+ }, [vue.createVNode("path", {
221
+ "d": "M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"
222
+ }, null)])])])
223
+ }), vue.createVNode(vue.resolveComponent("el-table-column"), {
224
+ "type": "index",
225
+ "width": 66,
232
226
  "align": "center"
233
227
  }, {
234
228
  default: (opts) => {
235
229
  const {
236
230
  $index
237
231
  } = opts;
238
- const formC = vue.toRaw(this.formControllers[$index]);
239
- if (!formC || !formC.state.isLoaded) {
240
- return vue.createVNode("div", null, [ibiz.i18n.t("control.form.repeaterGrid.absentOrLoad")]);
232
+ if (!this.controller.enableDelete) {
233
+ return vue.createVNode("span", null, [$index + 1]);
241
234
  }
242
- const formItemC = formC.formItems.find((x) => x.name === item.id);
243
- let editor = null;
244
- if (!formItemC.editorProvider) {
245
- editor = vue.createVNode(vue.resolveComponent("not-supported-editor"), {
246
- "modelData": item.editor
247
- }, null);
248
- } else {
249
- const component = vue.resolveComponent(formItemC.editorProvider.formEditor);
250
- editor = vue.h(component, {
251
- value: formItemC.value,
252
- data: formItemC.data,
253
- controller: formItemC.editor,
254
- disabled: formItemC.state.disabled,
255
- readonly: formItemC.state.readonly,
256
- onChange: (val, name) => {
257
- formItemC.setDataValue(val, name);
258
- }
259
- });
235
+ return [this.renderRemoveBtn($index), vue.createVNode("span", {
236
+ "class": this.ns.be("index", "text")
237
+ }, [$index + 1])];
238
+ }
239
+ }), this.formItems.length > 0 && this.formItems.map((item) => {
240
+ const width = item.labelWidth;
241
+ let widthName = "width";
242
+ let columnWidth = "";
243
+ if (typeof width === "number") {
244
+ if (width === 1) {
245
+ widthName = "min-width";
260
246
  }
261
- return vue.createVNode(vue.resolveComponent("iBizGridEditItem"), {
262
- "error": formItemC.state.error,
263
- "required": formItemC.state.required
264
- }, _isSlot(editor) ? editor : {
265
- default: () => [editor]
266
- });
247
+ columnWidth = "".concat(width, "px");
267
248
  }
268
- });
269
- })]
249
+ return vue.createVNode(vue.resolveComponent("el-table-column"), vue.mergeProps({
250
+ "label": item.caption,
251
+ "prop": item.id
252
+ }, {
253
+ [widthName]: columnWidth
254
+ }, {
255
+ "align": "center"
256
+ }), {
257
+ default: (opts) => {
258
+ const {
259
+ $index
260
+ } = opts;
261
+ const formC = vue.toRaw(this.formControllers[$index]);
262
+ if (!formC || !formC.state.isLoaded) {
263
+ return vue.createVNode("div", null, [ibiz.i18n.t("control.form.repeaterGrid.absentOrLoad")]);
264
+ }
265
+ const formItemC = formC.formItems.find((x) => x.name === item.id);
266
+ let editor = null;
267
+ if (!formItemC.editorProvider) {
268
+ editor = vue.createVNode(vue.resolveComponent("not-supported-editor"), {
269
+ "modelData": item.editor
270
+ }, null);
271
+ } else {
272
+ const component = vue.resolveComponent(formItemC.editorProvider.formEditor);
273
+ editor = vue.h(component, {
274
+ value: formItemC.value,
275
+ data: formItemC.data,
276
+ controller: formItemC.editor,
277
+ disabled: formItemC.state.disabled,
278
+ readonly: formItemC.state.readonly,
279
+ onChange: (val, name) => {
280
+ formItemC.setDataValue(val, name);
281
+ }
282
+ });
283
+ }
284
+ return vue.createVNode(vue.resolveComponent("iBizGridEditItem"), {
285
+ "error": formItemC.state.error,
286
+ "required": formItemC.state.required
287
+ }, _isSlot(editor) ? editor : {
288
+ default: () => [editor]
289
+ });
290
+ }
291
+ });
292
+ })];
293
+ },
294
+ append: () => {
295
+ return [tableHeight && vue.withDirectives(vue.createVNode("div", {
296
+ "infinite-scroll-distance": 20
297
+ }, null), [[vue.resolveDirective("infinite-scroll"), () => this.loadMore()]])];
298
+ }
270
299
  })]);
271
300
  }
272
301
  });
@@ -54,19 +54,6 @@ const TabExpPanelControl = /* @__PURE__ */ vue.defineComponent({
54
54
  var _a;
55
55
  const c = vue3Util.useControlController((...args) => new runtime.TabExpPanelController(...args));
56
56
  const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
57
- const counterData = vue.ref({});
58
- const fn = (counter) => {
59
- counterData.value = counter;
60
- };
61
- c.evt.on("onCreated", () => {
62
- if (c.counter) {
63
- c.counter.onChange(fn, true);
64
- }
65
- });
66
- vue.onUnmounted(() => {
67
- var _a2;
68
- (_a2 = c.counter) == null ? void 0 : _a2.offChange(fn);
69
- });
70
57
  const handleTabChange = () => {
71
58
  c.handleTabChange();
72
59
  };
@@ -100,7 +87,6 @@ const TabExpPanelControl = /* @__PURE__ */ vue.defineComponent({
100
87
  c,
101
88
  ns,
102
89
  tabPosition,
103
- counterData,
104
90
  handleTabChange
105
91
  };
106
92
  },
@@ -108,7 +94,8 @@ const TabExpPanelControl = /* @__PURE__ */ vue.defineComponent({
108
94
  let _slot;
109
95
  const {
110
96
  isCreated,
111
- tabPages
97
+ tabPages,
98
+ counterData
112
99
  } = this.c.state;
113
100
  return vue.createVNode(vue.resolveComponent("iBizControlBase"), {
114
101
  "controller": this.c
@@ -119,7 +106,7 @@ const TabExpPanelControl = /* @__PURE__ */ vue.defineComponent({
119
106
  "tabPosition": this.tabPosition,
120
107
  "onTabChange": this.handleTabChange
121
108
  }, _isSlot(_slot = tabPages.map((tab) => {
122
- const counterNum = tab.counterId ? this.counterData[tab.counterId] : void 0;
109
+ const counterNum = tab.counterId ? counterData[tab.counterId] : void 0;
123
110
  return vue.createVNode(vue.resolveComponent("el-tab-pane"), {
124
111
  "class": [this.ns.e("tab-item")],
125
112
  "label": tab.caption,
@@ -899,10 +899,11 @@ const TreeControl = /* @__PURE__ */ vue.defineComponent({
899
899
  }, [nodeData._text])];
900
900
  }
901
901
  return vue.createVNode("div", {
902
+ "class": [this.ns.b("node"), nodeData._disableSelect ? this.ns.bm("node", "disabled") : "", (_b = nodeModel.sysCss) == null ? void 0 : _b.cssName],
903
+ "title": nodeData._text,
902
904
  "onDblclick": (evt) => this.onNodeDbClick(nodeData, evt),
903
905
  "onClick": (evt) => this.onNodeClick(nodeData, data, evt),
904
- "onContextmenu": (evt) => this.onNodeContextmenu(nodeData, evt),
905
- "class": [this.ns.b("node"), nodeData._disableSelect ? this.ns.bm("node", "disabled") : "", (_b = nodeModel.sysCss) == null ? void 0 : _b.cssName]
906
+ "onContextmenu": (evt) => this.onNodeContextmenu(nodeData, evt)
906
907
  }, [content, this.renderCounter(nodeModel), this.renderContextMenu(nodeModel, nodeData)]);
907
908
  }
908
909
  }), !this.newNodeData && this.renderNewNode(), this.c.state.enableNavView && this.c.state.showNavIcon ? !this.c.state.showNavView ? vue.createVNode("ion-icon", {
@@ -1 +1 @@
1
- .ibiz-input{width:100%;height:100%;font-size:var(--ibiz-form-item-font-size);font-weight:var(--ibiz-form-item-regular);--ibiz-input-min-height:var(--ibiz-editor-default-line-height);--ibiz-input-ai-chat-bottom-tight:10px}.ibiz-input__ai-chat{display:flex;align-items:center;justify-content:center;position:absolute;right:var(--ibiz-spacing-base-tight);bottom:var(--ibiz-input-ai-chat-bottom-tight);width:calc(var(--ibiz-width-icon-medium) + 2 * var(--ibiz-spacing-tight));height:calc(var(--ibiz-width-icon-medium) + 2 * var(--ibiz-spacing-tight));padding:var(--ibiz-spacing-tight);font-size:var(--ibiz-width-icon-medium);color:var(--ibiz-color-primary-text);cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:var(--ibiz-border-radius-circle)}.ibiz-input__ai-chat:hover{color:var(--ibiz-color-primary-hover-text);background-color:var(--ibiz-color-primary-hover)}.ibiz-input .el-input .el-input__inner{height:100%}.ibiz-input .el-input .el-input__inner::-moz-placeholder{color:var(--ibiz-form-item-placeholder-color)}.ibiz-input .el-input .el-input__inner::placeholder{color:var(--ibiz-form-item-placeholder-color)}.ibiz-input .el-textarea .el-textarea__inner{height:100%}.ibiz-input .el-textarea .el-textarea__inner::-moz-placeholder{color:var(--ibiz-form-item-placeholder-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .el-textarea .el-textarea__inner::placeholder{color:var(--ibiz-form-item-placeholder-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .el-input__count{bottom:0}.ibiz-input .ibiz-input-input{height:100%}.ibiz-input .ibiz-input-input .el-input__wrapper{width:100%;min-height:var(--ibiz-input-min-height)}.ibiz-input--readonly{height:auto;overflow:auto;line-height:var(--ibiz-input-min-height);color:var(--ibiz-form-item-readonly-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .el-input__suffix .ibiz-input__unit{font-style:normal}.ibiz-input .el-textarea__inner{min-height:32px!important}.ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default.is-textarea{padding:var(--ibiz-form-item-hover-edit-padding);overflow:hidden}.ibiz-form-item .ibiz-input.is-show-default.is-textarea .ibiz-input-form-default-content{display:block}.ibiz-form-item .ibiz-input.is-show-default.is-textarea .ibiz-input-input{display:none}.ibiz-form-item .ibiz-input.is-show-default:hover .ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default:hover .ibiz-input-input{display:inline-flex}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-form-default-content{display:flex;align-items:center;width:100%;padding:var(--ibiz-form-item-hover-edit-padding);font-family:Arial,sans-serif;font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-text-color);word-wrap:break-word;white-space:pre-wrap}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-input{display:none;font-family:Arial,sans-serif}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-input.el-textarea .el-textarea__inner{word-wrap:break-word;white-space:pre-wrap}.ibiz-form-item .ibiz-input.is-show-default.is-editable .ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default.is-editable .ibiz-input-input{display:inline-flex}
1
+ .ibiz-input{width:100%;height:100%;font-size:var(--ibiz-form-item-font-size);font-weight:var(--ibiz-form-item-regular);--ibiz-input-min-height:var(--ibiz-editor-default-line-height);--ibiz-input-ai-chat-bottom-tight:10px}.ibiz-input__ai-chat{display:flex;align-items:center;justify-content:center;position:absolute;right:var(--ibiz-spacing-base-tight);bottom:var(--ibiz-input-ai-chat-bottom-tight);width:calc(var(--ibiz-width-icon-medium) + 2 * var(--ibiz-spacing-tight));height:calc(var(--ibiz-width-icon-medium) + 2 * var(--ibiz-spacing-tight));padding:var(--ibiz-spacing-tight);font-size:var(--ibiz-width-icon-medium);color:var(--ibiz-color-primary-text);cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:var(--ibiz-border-radius-circle)}.ibiz-input__ai-chat:hover{color:var(--ibiz-color-primary-hover-text);background-color:var(--ibiz-color-primary-hover)}.ibiz-input .el-input .el-input__inner{height:100%}.ibiz-input .el-input .el-input__inner::-moz-placeholder{color:var(--ibiz-form-item-placeholder-color)}.ibiz-input .el-input .el-input__inner::placeholder{color:var(--ibiz-form-item-placeholder-color)}.ibiz-input .el-textarea .el-textarea__inner{height:100%}.ibiz-input .el-textarea .el-textarea__inner::-moz-placeholder{color:var(--ibiz-form-item-placeholder-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .el-textarea .el-textarea__inner::placeholder{color:var(--ibiz-form-item-placeholder-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .el-input__count{bottom:0}.ibiz-input .ibiz-input-input{height:100%}.ibiz-input .ibiz-input-input .el-input__wrapper{width:100%;min-height:var(--ibiz-input-min-height)}.ibiz-input--readonly{height:auto;overflow:auto;line-height:var(--ibiz-input-min-height);color:var(--ibiz-form-item-readonly-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .el-input__suffix .ibiz-input__unit{font-style:normal}.ibiz-input .el-textarea__inner{min-height:32px!important}.ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default.is-textarea{overflow:hidden}.ibiz-form-item .ibiz-input.is-show-default.is-textarea .ibiz-input-form-default-content{display:block}.ibiz-form-item .ibiz-input.is-show-default.is-textarea .ibiz-input-input{display:none}.ibiz-form-item .ibiz-input.is-show-default:hover .ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default:hover .ibiz-input-input{display:inline-flex}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-form-default-content{display:flex;align-items:center;width:100%;padding:var(--ibiz-form-item-hover-edit-padding);font-family:Arial,sans-serif;font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-text-color);word-wrap:break-word;white-space:pre-wrap}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-input{display:none;font-family:Arial,sans-serif}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-input.el-textarea .el-textarea__inner{word-wrap:break-word;white-space:pre-wrap}.ibiz-form-item .ibiz-input.is-show-default.is-editable .ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default.is-editable .ibiz-input-input{display:inline-flex}
@@ -73,7 +73,7 @@ function getViewInfoByViewStack(viewName, context) {
73
73
  const indexViewName = getAppIndexViewName(context);
74
74
  if (view) {
75
75
  let isEmbed = false;
76
- if (view.parentView && view.parentView.model.codeName !== indexViewName) {
76
+ if (view.parentView && view.parentView.model.codeName !== indexViewName && view.parentView.model.viewType !== "APPINDEXVIEW") {
77
77
  isEmbed = true;
78
78
  }
79
79
  const data = view.state.srfactiveviewdata;
@@ -38,6 +38,10 @@ const InternalMessageJSON = /* @__PURE__ */ vue.defineComponent({
38
38
  const url = ibiz.env.isMob ? props.message.mobile_url : props.message.url;
39
39
  return url || ((_a = jsonContent.value) == null ? void 0 : _a.redirecturl);
40
40
  });
41
+ const isWFMessage = vue.computed(() => {
42
+ var _a;
43
+ return (_a = jsonContent.value) == null ? void 0 : _a.todoid;
44
+ });
41
45
  const toolbarItems = vue.computed(() => {
42
46
  if (!redirectUrl.value) {
43
47
  return void 0;
@@ -59,6 +63,7 @@ const InternalMessageJSON = /* @__PURE__ */ vue.defineComponent({
59
63
  jsonContent,
60
64
  toolbarItems,
61
65
  redirectUrl,
66
+ isWFMessage,
62
67
  onToolbarClick
63
68
  };
64
69
  },
@@ -98,7 +103,7 @@ const InternalMessageJSON = /* @__PURE__ */ vue.defineComponent({
98
103
  "class": [this.ns.b()],
99
104
  "message": this.message,
100
105
  "provider": this.provider,
101
- "clickable": !!this.redirectUrl,
106
+ "clickable": !!this.redirectUrl || !!this.isWFMessage,
102
107
  "toolbarItems": this.toolbarItems,
103
108
  "onToolbarClick": this.onToolbarClick,
104
109
  "onClose": () => this.$emit("close")
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var core = require('@ibiz-template/core');
4
+ var runtime = require('@ibiz-template/runtime');
3
5
  var internalMessageJson = require('./internal-message-json.cjs');
4
6
  require('../common/index.cjs');
5
7
  var internalMessageDefault_provider = require('../common/internal-message-default/internal-message-default.provider.cjs');
@@ -15,8 +17,39 @@ class InternalMessageJSONtProvider extends internalMessageDefault_provider.Inter
15
17
  constructor() {
16
18
  super(...arguments);
17
19
  __publicField(this, "component", internalMessageJson.InternalMessageJSON);
20
+ // 待办
21
+ __publicField(this, "PREKEY_WFINST", "WFINST__");
22
+ // 已完成
23
+ __publicField(this, "PREKEY_TODOHIS", "TODOHIS__");
24
+ // 抄送
25
+ __publicField(this, "PREKEY_CARBONCOPY", "CARBONCOPY__");
26
+ }
27
+ /**
28
+ * 计算工作流参数
29
+ * @param json
30
+ * @returns
31
+ */
32
+ computeWFParams(json) {
33
+ switch (json.todostate) {
34
+ case "ACTIVE":
35
+ return {
36
+ preKey: "",
37
+ subType: "Todo"
38
+ };
39
+ case "COMPLETED":
40
+ return {
41
+ preKey: this.PREKEY_TODOHIS,
42
+ subType: "Done"
43
+ };
44
+ default:
45
+ return {
46
+ preKey: "",
47
+ subType: ""
48
+ };
49
+ }
18
50
  }
19
51
  async onClick(message, event) {
52
+ var _a;
20
53
  const result = await super.onClick(message, event);
21
54
  if (!result && message.content_type === "JSON" && message.content) {
22
55
  const json = JSON.parse(message.content);
@@ -24,6 +57,27 @@ class InternalMessageJSONtProvider extends internalMessageDefault_provider.Inter
24
57
  this.openRedirectView(message, json.redirecturl);
25
58
  return true;
26
59
  }
60
+ if (json.todoid && json.biztype) {
61
+ if (ibiz.env.isPortalApp) {
62
+ ibiz.log.error("\u95E8\u6237\u5E94\u7528\u6682\u4E0D\u652F\u6301\u8DF3\u8F6C\u5DE5\u4F5C\u6D41");
63
+ } else {
64
+ const mainApp = ibiz.hub.getApp();
65
+ const { preKey, subType } = this.computeWFParams(json);
66
+ const res = await ibiz.net.post(
67
+ "/systodos/".concat(preKey).concat(json.todoid, "/getlinkurl"),
68
+ {
69
+ srfapptype: "pc",
70
+ srfapp: mainApp.model.codeName,
71
+ todosubtype: subType,
72
+ todourltype: "RouterUrl"
73
+ }
74
+ );
75
+ if (res.data && res.data.linkurl) {
76
+ const context = core.IBizContext.create(((_a = ibiz.appData) == null ? void 0 : _a.context) || {});
77
+ await runtime.toLocalOpenWFRedirectView(context, res.data.linkurl);
78
+ }
79
+ }
80
+ }
27
81
  }
28
82
  return true;
29
83
  }
@@ -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.33_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.35_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";
@@ -33,6 +33,16 @@ class ModalUtil {
33
33
  ElementPlus.ElMessageBox.confirm(params.desc, params.title, params).then(() => resolve(true)).catch(() => resolve(false));
34
34
  });
35
35
  }
36
+ async extendConfirm(params) {
37
+ return new Promise((resolve) => {
38
+ ElementPlus.ElMessageBox.confirm(params.desc, params.title, {
39
+ ...params,
40
+ ...params.options
41
+ }).then(() => resolve("yes")).catch(
42
+ (action) => resolve(action === "cancel" ? "no" : "cancel")
43
+ );
44
+ });
45
+ }
36
46
  }
37
47
 
38
48
  exports.ModalUtil = ModalUtil;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.41-alpha.35",
3
+ "version": "0.7.41-alpha.37",
4
4
  "description": "web端组件库(vue3)",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -32,14 +32,14 @@
32
32
  "@floating-ui/dom": "^1.5.3",
33
33
  "@ibiz-template-plugin/ai-chat": "^0.0.32",
34
34
  "@ibiz-template-plugin/gantt": "0.1.8-alpha.316",
35
- "@ibiz-template-plugin/bi-report": "0.0.29",
35
+ "@ibiz-template-plugin/bi-report": "0.0.30",
36
36
  "@ibiz-template-plugin/data-view": "0.0.6",
37
- "@ibiz-template/core": "0.7.41-alpha.33",
37
+ "@ibiz-template/core": "0.7.41-alpha.35",
38
38
  "@ibiz-template/devtool": "0.0.13",
39
- "@ibiz-template/model-helper": "0.7.41-alpha.34",
40
- "@ibiz-template/runtime": "0.7.41-alpha.34",
39
+ "@ibiz-template/model-helper": "0.7.41-alpha.36",
40
+ "@ibiz-template/runtime": "0.7.41-alpha.36",
41
41
  "@ibiz-template/theme": "0.7.39",
42
- "@ibiz-template/vue3-util": "0.7.41-alpha.34",
42
+ "@ibiz-template/vue3-util": "0.7.41-alpha.36",
43
43
  "@ibiz-template/web-theme": "3.9.0",
44
44
  "@ibiz/model-core": "^0.1.83",
45
45
  "@imengyu/vue3-context-menu": "^1.3.5",