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