@ibiz-template/vue3-components 0.5.7-alpha.2 → 0.5.7-alpha.4
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/ibiz-markdown-editor-anJxfRF1.js +1 -0
- package/dist/index-knHzHtox.js +2 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-R2mUYWuB.js +1 -0
- package/dist/{xlsx-util-BE5Eyj1T.js → xlsx-util-kzUgnbtt.js} +1 -1
- package/es/common/data-import2/data-import2.mjs +7 -1
- package/es/common/doing-notice/doing-notice.css +1 -0
- package/es/common/doing-notice/doing-notice.d.ts +19 -0
- package/es/common/doing-notice/doing-notice.mjs +38 -0
- package/es/common/index.d.ts +1 -0
- package/es/common/index.mjs +3 -1
- package/es/common/view-message/view-message.css +1 -0
- package/es/common/view-message/view-message.d.ts +1 -0
- package/es/common/view-message/view-message.mjs +2 -0
- package/es/control/drbar/drbar.controller.d.ts +8 -1
- package/es/control/drbar/drbar.controller.mjs +17 -6
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.mjs +4 -3
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +6 -1
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +46 -38
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +4 -5
- package/es/editor/html/html-editor.controller.d.ts +0 -26
- package/es/editor/html/html-editor.controller.mjs +1 -64
- package/es/editor/html/wang-editor/wang-editor.mjs +1 -1
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +5 -17
- package/es/editor/markdown/markdown-editor.controller.d.ts +0 -26
- package/es/editor/markdown/markdown-editor.controller.mjs +2 -64
- package/es/editor/text-box/input/input.mjs +3 -0
- package/es/editor/upload/upload-editor.controller.d.ts +0 -26
- package/es/editor/upload/upload-editor.controller.mjs +2 -64
- package/es/editor/upload/use/use-ibiz-upload.mjs +6 -1
- package/es/editor/upload/use/use-iview-upload.mjs +7 -2
- package/es/index.mjs +2 -0
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/panel-button/index.d.ts +1 -0
- package/es/panel-component/panel-button/panel-button.d.ts +1 -0
- package/es/panel-component/panel-button/panel-button.mjs +4 -1
- package/es/panel-component/user-message/async-action/async-action/async-action.d.ts +18 -4
- package/es/panel-component/user-message/async-action/async-action/async-action.mjs +34 -15
- package/es/panel-component/user-message/async-action/async-action/async-action.provider.d.ts +35 -2
- package/es/panel-component/user-message/async-action/async-action/async-action.provider.mjs +9 -2
- package/es/panel-component/user-message/async-action/async-action-tab/async-action-tab.d.ts +11 -51
- package/es/panel-component/user-message/async-action/async-action-tab/async-action-tab.mjs +22 -44
- package/es/panel-component/user-message/index.d.ts +1 -0
- package/es/panel-component/user-message/index.mjs +7 -0
- package/es/panel-component/user-message/internal-message/index.d.ts +2 -0
- package/es/panel-component/user-message/internal-message/index.mjs +2 -0
- package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.css +1 -1
- package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.mjs +6 -5
- package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.provider.d.ts +19 -3
- package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.provider.mjs +9 -3
- package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.css +1 -0
- package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.d.ts +35 -0
- package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.mjs +80 -0
- package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.d.ts +40 -0
- package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.mjs +55 -0
- package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.css +1 -1
- package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.d.ts +10 -1
- package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.mjs +18 -34
- package/es/panel-component/user-message/user-message.d.ts +1 -0
- package/es/panel-component/user-message/user-message.mjs +6 -1
- package/es/panel-component/view-message/index.d.ts +24 -0
- package/es/panel-component/view-message/index.mjs +15 -0
- package/es/panel-component/view-message/view-message.d.ts +26 -0
- package/es/panel-component/view-message/view-message.mjs +46 -0
- package/es/panel-component/view-message/view-message.provider.d.ts +15 -0
- package/es/panel-component/view-message/view-message.provider.mjs +21 -0
- package/es/util/app-popover/app-popover-component.d.ts +4 -2
- package/es/util/app-popover/app-popover-component.mjs +6 -2
- package/es/util/index.d.ts +1 -0
- package/es/util/index.mjs +1 -0
- package/es/util/notice-util/notice-util.d.ts +13 -0
- package/es/util/notice-util/notice-util.mjs +62 -0
- package/es/util/open-view-util/open-view-util.d.ts +10 -9
- package/es/util/open-view-util/open-view-util.mjs +6 -6
- package/es/util/overlay-controller/overlay-controller.d.ts +3 -2
- package/lib/common/data-import2/data-import2.cjs +7 -1
- package/lib/common/doing-notice/doing-notice.cjs +40 -0
- package/lib/common/doing-notice/doing-notice.css +1 -0
- package/lib/common/index.cjs +3 -0
- package/lib/common/view-message/view-message.cjs +2 -0
- package/lib/common/view-message/view-message.css +1 -0
- package/lib/control/drbar/drbar.controller.cjs +17 -6
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.cjs +4 -3
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +6 -1
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +45 -37
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +4 -5
- package/lib/editor/html/html-editor.controller.cjs +0 -63
- package/lib/editor/html/wang-editor/wang-editor.cjs +1 -1
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +5 -17
- package/lib/editor/markdown/markdown-editor.controller.cjs +0 -62
- package/lib/editor/text-box/input/input.cjs +3 -0
- package/lib/editor/upload/upload-editor.controller.cjs +0 -62
- package/lib/editor/upload/use/use-ibiz-upload.cjs +6 -1
- package/lib/editor/upload/use/use-iview-upload.cjs +7 -2
- package/lib/index.cjs +4 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/panel-button/panel-button.cjs +4 -1
- package/lib/panel-component/user-message/async-action/async-action/async-action.cjs +34 -15
- package/lib/panel-component/user-message/async-action/async-action/async-action.provider.cjs +9 -2
- package/lib/panel-component/user-message/async-action/async-action-tab/async-action-tab.cjs +20 -42
- package/lib/panel-component/user-message/index.cjs +7 -0
- package/lib/panel-component/user-message/internal-message/index.cjs +4 -0
- package/lib/panel-component/user-message/internal-message/internal-message-default/internal-message-default.cjs +6 -5
- package/lib/panel-component/user-message/internal-message/internal-message-default/internal-message-default.css +1 -1
- package/lib/panel-component/user-message/internal-message/internal-message-default/internal-message-default.provider.cjs +9 -3
- package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.cjs +82 -0
- package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.css +1 -0
- package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.cjs +57 -0
- package/lib/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.cjs +17 -33
- package/lib/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.css +1 -1
- package/lib/panel-component/user-message/user-message.cjs +5 -0
- package/lib/panel-component/view-message/index.cjs +20 -0
- package/lib/panel-component/view-message/view-message.cjs +48 -0
- package/lib/panel-component/view-message/view-message.provider.cjs +23 -0
- package/lib/util/app-popover/app-popover-component.cjs +6 -2
- package/lib/util/index.cjs +2 -0
- package/lib/util/notice-util/notice-util.cjs +64 -0
- package/lib/util/open-view-util/open-view-util.cjs +6 -6
- package/package.json +6 -6
- package/dist/ibiz-markdown-editor-RaswfMqH.js +0 -1
- package/dist/index-p-YChWUE.js +0 -2
- package/dist/wang-editor-8iEE3iXJ.js +0 -1
|
@@ -280,7 +280,13 @@ const DataImport2 = /* @__PURE__ */ defineComponent({
|
|
|
280
280
|
Authorization: "Bearer ".concat(getCookie(CoreConst.TOKEN))
|
|
281
281
|
});
|
|
282
282
|
const UploadUrl = computed(() => {
|
|
283
|
-
let
|
|
283
|
+
let uploadFileUrl;
|
|
284
|
+
if (ibiz.env.uploadFileUrl.indexOf("{cat}") !== -1) {
|
|
285
|
+
uploadFileUrl = ibiz.env.uploadFileUrl.replace("/{cat}", "/temp");
|
|
286
|
+
} else {
|
|
287
|
+
uploadFileUrl = "".concat(ibiz.env.uploadFileUrl, "/temp");
|
|
288
|
+
}
|
|
289
|
+
let uploadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(uploadFileUrl);
|
|
284
290
|
uploadUrl += qs.stringify({
|
|
285
291
|
preview: true
|
|
286
292
|
}, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-async-action-notice.el-notification{width:auto}.ibiz-async-action-notice.el-notification .el-notification__group{margin:0}.ibiz-async-action-notice.el-notification .el-notification__closeBtn{top:5px;right:5px}.ibiz-doing-notice__text{margin-right:8px}.ibiz-doing-notice__num{margin:0 8px;font-size:18px;font-weight:700;color:var(--ibiz-color-danger)}.ibiz-doing-notice__loading-icon{width:18px;height:18px;margin-right:6px;vertical-align:middle;animation:loading-rotate 2s linear infinite}.ibiz-doing-notice__loading-icon .path{stroke:var(--ibiz-color-primary);stroke-dasharray:90,150;stroke-dashoffset:0;stroke-linecap:round;stroke-width:2;animation:loading-dash 1.5s ease-in-out infinite}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import './doing-notice.scss';
|
|
3
|
+
export declare const DoingNotice: import("vue").DefineComponent<{
|
|
4
|
+
info: {
|
|
5
|
+
type: PropType<{
|
|
6
|
+
num: number;
|
|
7
|
+
}>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
12
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
info: {
|
|
14
|
+
type: PropType<{
|
|
15
|
+
num: number;
|
|
16
|
+
}>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createTextVNode, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './doing-notice.css';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const DoingNotice = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "DoingNotice",
|
|
8
|
+
props: {
|
|
9
|
+
info: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup() {
|
|
15
|
+
const ns = useNamespace("doing-notice");
|
|
16
|
+
return {
|
|
17
|
+
ns
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
render() {
|
|
21
|
+
return createVNode("div", {
|
|
22
|
+
"class": [this.ns.b()]
|
|
23
|
+
}, [createVNode("span", {
|
|
24
|
+
"class": this.ns.e("text")
|
|
25
|
+
}, [createTextVNode("\u6709"), createVNode("span", {
|
|
26
|
+
"class": this.ns.e("num")
|
|
27
|
+
}, [this.info.num]), createTextVNode("\u4E2A\u5F02\u6B65\u64CD\u4F5C\u6B63\u5728\u6267\u884C\uFF0C\u8BF7\u7A0D\u540E")]), createVNode("svg", {
|
|
28
|
+
"class": this.ns.e("loading-icon"),
|
|
29
|
+
"viewBox": "-10, -10, 50, 50"
|
|
30
|
+
}, [createVNode("path", {
|
|
31
|
+
"class": "path",
|
|
32
|
+
"d": "M 30 15 L 28 17 M 25.61 25.61 A 15 15, 0, 0, 1, 15 30 A 15 15, 0, 1, 1, 27.99 7.5 L 15 15",
|
|
33
|
+
"style": "stroke-width: 4px; fill: rgba(0, 0, 0, 0)"
|
|
34
|
+
}, null)])]);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export { DoingNotice };
|
package/es/common/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './split/split';
|
|
|
7
7
|
export * from './split-trigger/split-trigger';
|
|
8
8
|
export * from './sort-bar/sort-bar';
|
|
9
9
|
export type { MapOptions } from './map-chart/map-chart.util';
|
|
10
|
+
export { DoingNotice } from './doing-notice/doing-notice';
|
|
10
11
|
export declare const IBizCommonComponents: {
|
|
11
12
|
install: (v: App) => void;
|
|
12
13
|
};
|
package/es/common/index.mjs
CHANGED
|
@@ -16,12 +16,14 @@ import { DataImport2 } from './data-import2/data-import2.mjs';
|
|
|
16
16
|
import { DataImport2Table } from './data-import2-table/data-import2-table.mjs';
|
|
17
17
|
import { DataImport2Select } from './data-import2-select/data-import2-select.mjs';
|
|
18
18
|
import { IBizGridSetting } from './grid-setting/grid-setting.mjs';
|
|
19
|
+
import { DoingNotice } from './doing-notice/doing-notice.mjs';
|
|
19
20
|
|
|
20
21
|
"use strict";
|
|
21
22
|
const IBizCommonComponents = {
|
|
22
23
|
install: (v) => {
|
|
23
24
|
v.component(IBizControlBase.name, IBizControlBase);
|
|
24
25
|
v.component(IBizIcon.name, IBizIcon);
|
|
26
|
+
v.component(DoingNotice.name, DoingNotice);
|
|
25
27
|
v.component(IBizRow.name, IBizRow);
|
|
26
28
|
v.component(IBizCol.name, IBizCol);
|
|
27
29
|
v.component(IBizRouterView.name, IBizRouterView);
|
|
@@ -52,4 +54,4 @@ const IBizCommonComponents = {
|
|
|
52
54
|
}
|
|
53
55
|
};
|
|
54
56
|
|
|
55
|
-
export { IBizActionToolbar, IBizCol, IBizCommonComponents, IBizRawItem, IBizRow, IBizSortBar, IBizSplit, IBizSplitTrigger, IBizCommonComponents as default };
|
|
57
|
+
export { DoingNotice, IBizActionToolbar, IBizCol, IBizCommonComponents, IBizRawItem, IBizRow, IBizSortBar, IBizSplit, IBizSplitTrigger, IBizCommonComponents as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-view-message__alert.is-no-title.el-alert .el-alert__description{margin:0}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './view-message.css';
|
|
3
4
|
|
|
4
5
|
"use strict";
|
|
5
6
|
const ViewMessage = /* @__PURE__ */ defineComponent({
|
|
@@ -37,6 +38,7 @@ const ViewMessage = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
return createVNode(resolveComponent("el-alert"), {
|
|
38
39
|
"type": this.getType(message.messageType),
|
|
39
40
|
"title": message.title,
|
|
41
|
+
"class": [this.ns.e("alert"), this.ns.is("no-title", !message.title)],
|
|
40
42
|
"description": message.message,
|
|
41
43
|
"closable": message.removeMode !== 0
|
|
42
44
|
}, null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ControlController, IDRBarController, IDRBarEvent, IDRBarState, IDRBarItemsState, IEditFormController, IPanelItemNavPosController, AppCounter } from '@ibiz-template/runtime';
|
|
1
|
+
import { ControlController, IDRBarController, IDRBarEvent, IDRBarState, IDRBarItemsState, IEditFormController, IPanelItemNavPosController, AppCounter, IPanelItemController } from '@ibiz-template/runtime';
|
|
2
2
|
import { IDEDRBar, IDEDRBarItem } from '@ibiz/model-core';
|
|
3
3
|
import { Router } from 'vue-router';
|
|
4
4
|
/**
|
|
@@ -24,6 +24,13 @@ export declare class DRBarController extends ControlController<IDEDRBar, IDRBarS
|
|
|
24
24
|
* @memberof DRBarController
|
|
25
25
|
*/
|
|
26
26
|
get navPos(): IPanelItemNavPosController;
|
|
27
|
+
/**
|
|
28
|
+
* 导航视图容器控制器
|
|
29
|
+
* @return {*}
|
|
30
|
+
* @author: zhujiamin
|
|
31
|
+
* @Date: 2024-01-25 16:03:00
|
|
32
|
+
*/
|
|
33
|
+
get viewNavPos(): IPanelItemController | undefined;
|
|
27
34
|
/**
|
|
28
35
|
* 表单部件
|
|
29
36
|
*
|
|
@@ -35,6 +35,16 @@ class DRBarController extends ControlController {
|
|
|
35
35
|
var _a;
|
|
36
36
|
return (_a = this.view.layoutPanel) == null ? void 0 : _a.panelItems.nav_pos;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* 导航视图容器控制器
|
|
40
|
+
* @return {*}
|
|
41
|
+
* @author: zhujiamin
|
|
42
|
+
* @Date: 2024-01-25 16:03:00
|
|
43
|
+
*/
|
|
44
|
+
get viewNavPos() {
|
|
45
|
+
var _a;
|
|
46
|
+
return (_a = this.view.layoutPanel) == null ? void 0 : _a.panelItems.view_nav_pos;
|
|
47
|
+
}
|
|
38
48
|
/**
|
|
39
49
|
* 表单部件
|
|
40
50
|
*
|
|
@@ -269,18 +279,18 @@ class DRBarController extends ControlController {
|
|
|
269
279
|
viewForm.state.visible = true;
|
|
270
280
|
viewForm.state.keepAlive = true;
|
|
271
281
|
}
|
|
272
|
-
if (this.
|
|
273
|
-
this.
|
|
274
|
-
this.
|
|
282
|
+
if (this.viewNavPos) {
|
|
283
|
+
this.viewNavPos.state.visible = false;
|
|
284
|
+
this.viewNavPos.state.keepAlive = true;
|
|
275
285
|
}
|
|
276
286
|
} else {
|
|
277
287
|
if (viewForm) {
|
|
278
288
|
viewForm.state.visible = false;
|
|
279
289
|
viewForm.state.keepAlive = true;
|
|
280
290
|
}
|
|
281
|
-
if (this.
|
|
282
|
-
this.
|
|
283
|
-
this.
|
|
291
|
+
if (this.viewNavPos) {
|
|
292
|
+
this.viewNavPos.state.visible = true;
|
|
293
|
+
this.viewNavPos.state.keepAlive = true;
|
|
284
294
|
}
|
|
285
295
|
}
|
|
286
296
|
}
|
|
@@ -335,6 +345,7 @@ class DRBarController extends ControlController {
|
|
|
335
345
|
doDefaultSelect() {
|
|
336
346
|
var _a;
|
|
337
347
|
if (!this.state.hideEditItem && !this.state.srfnav) {
|
|
348
|
+
this.setVisible("form");
|
|
338
349
|
return;
|
|
339
350
|
}
|
|
340
351
|
if (this.isCreate) {
|
|
@@ -31,13 +31,14 @@ const TreeGridExUAColumn = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
};
|
|
32
32
|
},
|
|
33
33
|
render() {
|
|
34
|
-
var _a, _b
|
|
34
|
+
var _a, _b;
|
|
35
|
+
const uiactionGroup = this.controller.getUIActionGroup(this.row);
|
|
35
36
|
return createVNode("div", {
|
|
36
37
|
"class": [this.ns.b(), (_a = this.controller.model.cellSysCss) == null ? void 0 : _a.cssName],
|
|
37
38
|
"onDblclick": this.onStopPropagation,
|
|
38
39
|
"onClick": this.onStopPropagation
|
|
39
|
-
}, [((
|
|
40
|
-
"action-details":
|
|
40
|
+
}, [((_b = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _b.length) && createVNode(resolveComponent("iBizActionToolbar"), {
|
|
41
|
+
"action-details": uiactionGroup.uiactionGroupDetails,
|
|
41
42
|
"actions-state": this.row.columnActionsStates[this.controller.model.codeName],
|
|
42
43
|
"onActionClick": this.onActionClick
|
|
43
44
|
}, null)]);
|
|
@@ -18,6 +18,7 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
const isShowAll = ref(true);
|
|
19
19
|
const isEditable = ref(false);
|
|
20
20
|
const editorRef = ref();
|
|
21
|
+
const isLoaded = ref(false);
|
|
21
22
|
const showFormDefaultContent = computed(() => {
|
|
22
23
|
if (props.controlParams && props.controlParams.editmode === "hover") {
|
|
23
24
|
return true;
|
|
@@ -107,6 +108,7 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
107
108
|
const res = await c.getServiceData(trimQuery, props.data);
|
|
108
109
|
if (res) {
|
|
109
110
|
items.value = res.data;
|
|
111
|
+
isLoaded.value = true;
|
|
110
112
|
if (cb && cb instanceof Function) {
|
|
111
113
|
cb(items.value);
|
|
112
114
|
}
|
|
@@ -159,13 +161,16 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
159
161
|
onMounted(() => {
|
|
160
162
|
watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
161
163
|
if (newVal !== oldVal) {
|
|
162
|
-
if (
|
|
164
|
+
if (!isLoaded.value && editorRef.value) {
|
|
163
165
|
await onSearch("");
|
|
164
166
|
}
|
|
165
167
|
const curItem = items.value.find((item) => Object.is(item[c.keyName], newVal));
|
|
166
168
|
if (curItem) {
|
|
167
169
|
curValue.value = curItem[c.textName];
|
|
168
170
|
}
|
|
171
|
+
if (newVal === null) {
|
|
172
|
+
emit("change", null);
|
|
173
|
+
}
|
|
169
174
|
}
|
|
170
175
|
}, {
|
|
171
176
|
immediate: true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, ref, computed, watch, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
1
|
+
import { isVNode, ref, computed, watch, onMounted, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { getDataPickerProps, getEditorEmits, useNamespace, renderString } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { isNil, clone } from 'ramda';
|
|
4
4
|
import './ibiz-picker-dropdown.css';
|
|
@@ -22,6 +22,9 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
const refValue = ref("");
|
|
23
23
|
const isEditable = ref(false);
|
|
24
24
|
const editorRef = ref();
|
|
25
|
+
const loading = ref(false);
|
|
26
|
+
let waitQuery = null;
|
|
27
|
+
const isLoaded = ref(false);
|
|
25
28
|
const showFormDefaultContent = computed(() => {
|
|
26
29
|
if (props.controlParams && props.controlParams.editmode === "hover") {
|
|
27
30
|
return true;
|
|
@@ -55,16 +58,50 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
55
58
|
}, {
|
|
56
59
|
immediate: true
|
|
57
60
|
});
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
const onSearch = async (query) => {
|
|
62
|
+
if (!shouldLoad.value) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (c.model.appDataEntityId && loading.value === false) {
|
|
66
|
+
loading.value = true;
|
|
67
|
+
try {
|
|
68
|
+
let trimQuery = "";
|
|
69
|
+
if (query !== props.value) {
|
|
70
|
+
trimQuery = query.trim();
|
|
71
|
+
}
|
|
72
|
+
const res = await c.getServiceData(trimQuery, props.data);
|
|
73
|
+
if (res) {
|
|
74
|
+
items.value = res.data;
|
|
75
|
+
}
|
|
76
|
+
} finally {
|
|
77
|
+
loading.value = false;
|
|
78
|
+
isLoaded.value = true;
|
|
79
|
+
if (waitQuery != null) {
|
|
80
|
+
const selfQuery = waitQuery;
|
|
81
|
+
waitQuery = null;
|
|
82
|
+
await onSearch(selfQuery);
|
|
83
|
+
}
|
|
63
84
|
}
|
|
85
|
+
} else {
|
|
86
|
+
waitQuery = query;
|
|
64
87
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
};
|
|
89
|
+
onMounted(() => {
|
|
90
|
+
watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
91
|
+
if (newVal !== oldVal) {
|
|
92
|
+
if (!isLoaded.value && editorRef.value) {
|
|
93
|
+
shouldLoad.value = true;
|
|
94
|
+
await onSearch("");
|
|
95
|
+
}
|
|
96
|
+
refValue.value = newVal;
|
|
97
|
+
if (newVal === null) {
|
|
98
|
+
emit("change", null);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
immediate: true,
|
|
103
|
+
deep: true
|
|
104
|
+
});
|
|
68
105
|
});
|
|
69
106
|
const setEditable = (flag) => {
|
|
70
107
|
if (flag) {
|
|
@@ -75,7 +112,6 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
75
112
|
}, 100);
|
|
76
113
|
}
|
|
77
114
|
};
|
|
78
|
-
const loading = ref(false);
|
|
79
115
|
const onACSelect = async (data) => {
|
|
80
116
|
const dataItems = await c.calcFillDataItems(data);
|
|
81
117
|
if (dataItems.length) {
|
|
@@ -105,34 +141,6 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
105
141
|
}
|
|
106
142
|
shouldLoad.value = false;
|
|
107
143
|
};
|
|
108
|
-
let waitQuery = null;
|
|
109
|
-
const onSearch = async (query) => {
|
|
110
|
-
if (!shouldLoad.value) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
if (c.model.appDataEntityId && loading.value === false) {
|
|
114
|
-
loading.value = true;
|
|
115
|
-
try {
|
|
116
|
-
let trimQuery = "";
|
|
117
|
-
if (query !== props.value) {
|
|
118
|
-
trimQuery = query.trim();
|
|
119
|
-
}
|
|
120
|
-
const res = await c.getServiceData(trimQuery, props.data);
|
|
121
|
-
if (res) {
|
|
122
|
-
items.value = res.data;
|
|
123
|
-
}
|
|
124
|
-
} finally {
|
|
125
|
-
loading.value = false;
|
|
126
|
-
if (waitQuery != null) {
|
|
127
|
-
const selfQuery = waitQuery;
|
|
128
|
-
waitQuery = null;
|
|
129
|
-
await onSearch(selfQuery);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
} else {
|
|
133
|
-
waitQuery = query;
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
144
|
const onOpenChange = (isOpen) => {
|
|
137
145
|
if (isOpen) {
|
|
138
146
|
items.value = [];
|
|
@@ -13,7 +13,6 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
setup(props, {
|
|
14
14
|
emit
|
|
15
15
|
}) {
|
|
16
|
-
var _a;
|
|
17
16
|
const ns = useNamespace("dropdown");
|
|
18
17
|
const c = props.controller;
|
|
19
18
|
const items = ref([]);
|
|
@@ -23,7 +22,7 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
23
22
|
const treeNodes = ref([]);
|
|
24
23
|
const isEditable = ref(false);
|
|
25
24
|
const editorRef = ref();
|
|
26
|
-
const editorItems =
|
|
25
|
+
const editorItems = c.model.editorItems;
|
|
27
26
|
const isLoading = ref(false);
|
|
28
27
|
let editorState = "";
|
|
29
28
|
let funcs;
|
|
@@ -103,15 +102,15 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
103
102
|
};
|
|
104
103
|
const curValue = computed({
|
|
105
104
|
get() {
|
|
106
|
-
var
|
|
105
|
+
var _a, _b;
|
|
107
106
|
if (!isLoadedCodeList.value) {
|
|
108
|
-
return "";
|
|
107
|
+
return c.multiple ? [] : "";
|
|
109
108
|
}
|
|
110
109
|
if (editorItems && editorItems.length > 0 && !c.multiple) {
|
|
111
110
|
return props.data[editorItems[0].id];
|
|
112
111
|
}
|
|
113
112
|
if (props.value) {
|
|
114
|
-
return c.multiple ? (
|
|
113
|
+
return c.multiple ? (_a = props.value) == null ? void 0 : _a.toString().split(",") : props.value.toString();
|
|
115
114
|
}
|
|
116
115
|
return (_b = props.value) == null ? void 0 : _b.toString();
|
|
117
116
|
},
|
|
@@ -17,30 +17,4 @@ export declare class HtmlEditorController extends EditorController<IHtml> {
|
|
|
17
17
|
*/
|
|
18
18
|
exportParams?: IParams;
|
|
19
19
|
protected onInit(): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* 计算文件的上传路径和下载路径
|
|
22
|
-
* 下载路径文件id用%fileId%占位,替换即可
|
|
23
|
-
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
24
|
-
*
|
|
25
|
-
* @author lxm
|
|
26
|
-
* @date 2022-11-17 13:11:43
|
|
27
|
-
* @param {IData} data
|
|
28
|
-
* @returns {*} {{ uploadUrl: string; downloadUrl: string }}
|
|
29
|
-
*/
|
|
30
|
-
calcBaseUrl(data: IData): {
|
|
31
|
-
uploadUrl: string;
|
|
32
|
-
downloadUrl: string;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* 请求url获取文件流,并用JS触发文件下载
|
|
36
|
-
*
|
|
37
|
-
* @author lxm
|
|
38
|
-
* @date 2022-11-17 14:11:09
|
|
39
|
-
* @param {string} url
|
|
40
|
-
* @param {IData} file
|
|
41
|
-
*/
|
|
42
|
-
fileDownload(file: {
|
|
43
|
-
url: string;
|
|
44
|
-
name: string;
|
|
45
|
-
}): void;
|
|
46
20
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EditorController, convertNavData } from '@ibiz-template/runtime';
|
|
3
|
-
import qs from 'qs';
|
|
1
|
+
import { EditorController } from '@ibiz-template/runtime';
|
|
4
2
|
|
|
5
3
|
"use strict";
|
|
6
4
|
var __defProp = Object.defineProperty;
|
|
@@ -49,67 +47,6 @@ class HtmlEditorController extends EditorController {
|
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
49
|
}
|
|
52
|
-
/**
|
|
53
|
-
* 计算文件的上传路径和下载路径
|
|
54
|
-
* 下载路径文件id用%fileId%占位,替换即可
|
|
55
|
-
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
56
|
-
*
|
|
57
|
-
* @author lxm
|
|
58
|
-
* @date 2022-11-17 13:11:43
|
|
59
|
-
* @param {IData} data
|
|
60
|
-
* @returns {*} {{ uploadUrl: string; downloadUrl: string }}
|
|
61
|
-
*/
|
|
62
|
-
calcBaseUrl(data) {
|
|
63
|
-
let uploadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.uploadFileUrl);
|
|
64
|
-
let downloadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.downloadFileUrl, "/%fileId%");
|
|
65
|
-
let uploadParams = {};
|
|
66
|
-
let exportParams = {};
|
|
67
|
-
if (this.uploadParams) {
|
|
68
|
-
uploadParams = convertNavData(
|
|
69
|
-
this.uploadParams,
|
|
70
|
-
data,
|
|
71
|
-
this.params,
|
|
72
|
-
this.context
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
if (this.exportParams) {
|
|
76
|
-
exportParams = convertNavData(
|
|
77
|
-
this.exportParams,
|
|
78
|
-
data,
|
|
79
|
-
this.params,
|
|
80
|
-
this.context
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
uploadUrl += qs.stringify(uploadParams, { addQueryPrefix: true });
|
|
84
|
-
downloadUrl += qs.stringify(exportParams, { addQueryPrefix: true });
|
|
85
|
-
return { uploadUrl, downloadUrl };
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* 请求url获取文件流,并用JS触发文件下载
|
|
89
|
-
*
|
|
90
|
-
* @author lxm
|
|
91
|
-
* @date 2022-11-17 14:11:09
|
|
92
|
-
* @param {string} url
|
|
93
|
-
* @param {IData} file
|
|
94
|
-
*/
|
|
95
|
-
fileDownload(file) {
|
|
96
|
-
ibiz.net.request(file.url, {
|
|
97
|
-
method: "get",
|
|
98
|
-
responseType: "blob",
|
|
99
|
-
baseURL: ""
|
|
100
|
-
// 已经有baseURL了,这里无需再写
|
|
101
|
-
}).then((response) => {
|
|
102
|
-
if (response.status !== 200) {
|
|
103
|
-
throw new RuntimeError("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
|
|
104
|
-
}
|
|
105
|
-
if (!response.data) {
|
|
106
|
-
throw new RuntimeError("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
|
|
107
|
-
} else {
|
|
108
|
-
const fileName = file.name;
|
|
109
|
-
downloadFileFromBlob(response.data, fileName);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
50
|
}
|
|
114
51
|
|
|
115
52
|
export { HtmlEditorController };
|
|
@@ -47,7 +47,7 @@ const IBizHtml = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
}
|
|
48
48
|
watch(() => props.data, (newVal) => {
|
|
49
49
|
if (newVal) {
|
|
50
|
-
const urls = c.
|
|
50
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, newVal, c.editorParams);
|
|
51
51
|
uploadUrl.value = urls.uploadUrl;
|
|
52
52
|
downloadUrl.value = urls.downloadUrl;
|
|
53
53
|
}
|
|
@@ -33,7 +33,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
const cssVars = ref({});
|
|
34
34
|
watch(() => props.data, (newVal) => {
|
|
35
35
|
if (newVal && c) {
|
|
36
|
-
const urls = c.
|
|
36
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, newVal, c.editorParams);
|
|
37
37
|
uploadUrl.value = urls.uploadUrl;
|
|
38
38
|
downloadUrl.value = urls.downloadUrl;
|
|
39
39
|
}
|
|
@@ -42,22 +42,10 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
deep: true
|
|
43
43
|
});
|
|
44
44
|
const markDownBox = ref();
|
|
45
|
-
const fileUpload = (file, callback) => {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
url: uploadUrl.value,
|
|
50
|
-
method: "post",
|
|
51
|
-
headers: headers.value,
|
|
52
|
-
data: formData
|
|
53
|
-
}).then((res) => {
|
|
54
|
-
if (res.status === 200 && res.data.fileid) {
|
|
55
|
-
const url = downloadUrl.value.replace("%fileId%", res.data.fileid);
|
|
56
|
-
callback(url);
|
|
57
|
-
}
|
|
58
|
-
}).catch((error) => {
|
|
59
|
-
ibiz.log.error("\u4E0A\u4F20\u51FA\u9519", error);
|
|
60
|
-
});
|
|
45
|
+
const fileUpload = async (file, callback) => {
|
|
46
|
+
const data = await ibiz.util.file.fileUpload(uploadUrl.value, file, headers.value);
|
|
47
|
+
const url = downloadUrl.value.replace("%fileId%", data.fileid);
|
|
48
|
+
callback(url);
|
|
61
49
|
};
|
|
62
50
|
const getCherryHtml = () => {
|
|
63
51
|
var _a;
|
|
@@ -73,30 +73,4 @@ export declare class MarkDownEditorController extends EditorController<IMarkdown
|
|
|
73
73
|
*/
|
|
74
74
|
chatCompletion: boolean;
|
|
75
75
|
protected onInit(): Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* 计算文件的上传路径和下载路径
|
|
78
|
-
* 下载路径文件id用%fileId%占位,替换即可
|
|
79
|
-
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
80
|
-
*
|
|
81
|
-
* @author lxm
|
|
82
|
-
* @date 2022-11-17 13:11:43
|
|
83
|
-
* @param {IData} data
|
|
84
|
-
* @returns {*} {{ uploadUrl: string; downloadUrl: string }}
|
|
85
|
-
*/
|
|
86
|
-
calcBaseUrl(data: IData): {
|
|
87
|
-
uploadUrl: string;
|
|
88
|
-
downloadUrl: string;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* 请求url获取文件流,并用JS触发文件下载
|
|
92
|
-
*
|
|
93
|
-
* @author lxm
|
|
94
|
-
* @date 2022-11-17 14:11:09
|
|
95
|
-
* @param {string} url
|
|
96
|
-
* @param {IData} file
|
|
97
|
-
*/
|
|
98
|
-
fileDownload(file: {
|
|
99
|
-
url: string;
|
|
100
|
-
name: string;
|
|
101
|
-
}): void;
|
|
102
76
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { RuntimeModelError
|
|
2
|
-
import { EditorController, getDeACMode
|
|
3
|
-
import qs from 'qs';
|
|
1
|
+
import { RuntimeModelError } from '@ibiz-template/core';
|
|
2
|
+
import { EditorController, getDeACMode } from '@ibiz-template/runtime';
|
|
4
3
|
|
|
5
4
|
"use strict";
|
|
6
5
|
var __defProp = Object.defineProperty;
|
|
@@ -142,67 +141,6 @@ class MarkDownEditorController extends EditorController {
|
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
|
-
/**
|
|
146
|
-
* 计算文件的上传路径和下载路径
|
|
147
|
-
* 下载路径文件id用%fileId%占位,替换即可
|
|
148
|
-
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
149
|
-
*
|
|
150
|
-
* @author lxm
|
|
151
|
-
* @date 2022-11-17 13:11:43
|
|
152
|
-
* @param {IData} data
|
|
153
|
-
* @returns {*} {{ uploadUrl: string; downloadUrl: string }}
|
|
154
|
-
*/
|
|
155
|
-
calcBaseUrl(data) {
|
|
156
|
-
let uploadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.uploadFileUrl);
|
|
157
|
-
let downloadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.downloadFileUrl, "/%fileId%");
|
|
158
|
-
let uploadParams = {};
|
|
159
|
-
let exportParams = {};
|
|
160
|
-
if (this.uploadParams) {
|
|
161
|
-
uploadParams = convertNavData(
|
|
162
|
-
this.uploadParams,
|
|
163
|
-
data,
|
|
164
|
-
this.params,
|
|
165
|
-
this.context
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
if (this.exportParams) {
|
|
169
|
-
exportParams = convertNavData(
|
|
170
|
-
this.exportParams,
|
|
171
|
-
data,
|
|
172
|
-
this.params,
|
|
173
|
-
this.context
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
uploadUrl += qs.stringify(uploadParams, { addQueryPrefix: true });
|
|
177
|
-
downloadUrl += qs.stringify(exportParams, { addQueryPrefix: true });
|
|
178
|
-
return { uploadUrl, downloadUrl };
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* 请求url获取文件流,并用JS触发文件下载
|
|
182
|
-
*
|
|
183
|
-
* @author lxm
|
|
184
|
-
* @date 2022-11-17 14:11:09
|
|
185
|
-
* @param {string} url
|
|
186
|
-
* @param {IData} file
|
|
187
|
-
*/
|
|
188
|
-
fileDownload(file) {
|
|
189
|
-
ibiz.net.request(file.url, {
|
|
190
|
-
method: "get",
|
|
191
|
-
responseType: "blob",
|
|
192
|
-
baseURL: ""
|
|
193
|
-
// 已经有baseURL了,这里无需再写
|
|
194
|
-
}).then((response) => {
|
|
195
|
-
if (response.status !== 200) {
|
|
196
|
-
throw new RuntimeError("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
|
|
197
|
-
}
|
|
198
|
-
if (!response.data) {
|
|
199
|
-
throw new RuntimeError("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
|
|
200
|
-
} else {
|
|
201
|
-
const fileName = file.name;
|
|
202
|
-
downloadFileFromBlob(response.data, fileName);
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
144
|
}
|
|
207
145
|
|
|
208
146
|
export { MarkDownEditorController };
|