@ibiz-template/vue3-components 0.7.41-alpha.36 → 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-BIllIvre.js → wang-editor-4cJ6X_hb.js} +1 -1
- package/dist/{xlsx-util-CxXULY47.js → xlsx-util-DZ5-cWNj.js} +1 -1
- package/es/control/calendar/calendar.mjs +33 -8
- 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/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.provider.mjs +2 -2
- package/lib/control/calendar/calendar.cjs +32 -7
- 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/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.provider.cjs +2 -2
- package/package.json +4 -4
- package/dist/index-CCKb6xlM.js +0 -11
|
@@ -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",
|
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,
|
|
@@ -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;
|
|
@@ -66,8 +66,8 @@ class InternalMessageJSONtProvider extends InternalMessageDefaultProvider {
|
|
|
66
66
|
{
|
|
67
67
|
srfapptype: "pc",
|
|
68
68
|
srfapp: mainApp.model.codeName,
|
|
69
|
-
todosubtype: subType
|
|
70
|
-
|
|
69
|
+
todosubtype: subType,
|
|
70
|
+
todourltype: "RouterUrl"
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
if (res.data && res.data.linkurl) {
|
|
@@ -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
|
-
"
|
|
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
|
|
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",
|
package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.cjs
ADDED
|
@@ -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;
|