@ibiz-template/vue3-components 0.5.7-alpha.3 → 0.5.7-alpha.5
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--KqYDzjn.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-15YjErDj.js → xlsx-util-74o5wGKy.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/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +236 -0
- package/es/control/dashboard/dashboard-design/dashboard-design.d.ts +2 -0
- package/es/control/form/form-detail/form-button/form-button.mjs +2 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +2124 -0
- package/es/control/grid/grid/grid-control.util.mjs +4 -0
- package/es/control/search-bar/filter-tree/filter-tree.d.ts +45 -14
- package/es/control/search-bar/filter-tree/filter-tree.mjs +42 -21
- package/es/control/search-bar/search-bar.mjs +8 -2
- 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/index.mjs +8 -0
- 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/span/span/span.d.ts +2 -0
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +2 -2
- 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/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.controller.d.ts +46 -0
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.controller.mjs +93 -0
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.css +1 -0
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.d.ts +81 -0
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs +187 -0
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.d.ts +17 -0
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.mjs +22 -0
- package/es/editor/user/ibiz-searchcond-edit/index.d.ts +3 -0
- package/es/editor/user/ibiz-searchcond-edit/index.mjs +5 -0
- package/es/editor/user/index.d.ts +1 -0
- package/es/editor/user/index.mjs +6 -0
- package/es/index.mjs +2 -0
- 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 +4 -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/control/form/form-detail/form-button/form-button.cjs +2 -1
- package/lib/control/grid/grid/grid-control.util.cjs +4 -0
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +41 -20
- package/lib/control/search-bar/search-bar.cjs +8 -2
- package/lib/editor/html/html-editor.controller.cjs +0 -63
- package/lib/editor/html/wang-editor/wang-editor.cjs +1 -1
- package/lib/editor/index.cjs +8 -0
- 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/ibiz-input-number/ibiz-input-number.cjs +2 -2
- 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/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs +189 -0
- package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.controller.cjs +95 -0
- package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.css +1 -0
- package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.cjs +24 -0
- package/lib/editor/user/ibiz-searchcond-edit/index.cjs +11 -0
- package/lib/editor/user/index.cjs +12 -0
- package/lib/index.cjs +4 -0
- 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 +4 -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-5ErnlgZ5.js +0 -2
- package/dist/wang-editor-8iEE3iXJ.js +0 -1
|
@@ -56,6 +56,10 @@ function useITableEvent(c) {
|
|
|
56
56
|
} else if (order === "descending") {
|
|
57
57
|
order1 = "desc";
|
|
58
58
|
}
|
|
59
|
+
const sortQuery = "".concat(fieldName, ",").concat(order1);
|
|
60
|
+
if (sortQuery === c.state.sortQuery) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
59
63
|
c.setSort(fieldName, order1);
|
|
60
64
|
c.load();
|
|
61
65
|
}
|
|
@@ -1,29 +1,60 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IFilterBranchNode, IFilterLeafNode, IFilterNode, SearchBarFilterController } from '@ibiz-template/runtime';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
import './filter-tree.scss';
|
|
4
4
|
export declare const FilterTreeControl: import("vue").DefineComponent<{
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 过滤项控制器集合
|
|
7
|
+
*/
|
|
8
|
+
filterControllers: {
|
|
9
|
+
type: PropType<SearchBarFilterController[]>;
|
|
7
10
|
required: true;
|
|
8
11
|
};
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
/**
|
|
13
|
+
* 过滤项树节点数据集合
|
|
14
|
+
*/
|
|
15
|
+
filterNodes: {
|
|
16
|
+
type: PropType<IFilterNode[]>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 父容器
|
|
21
|
+
*/
|
|
22
|
+
parent: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
required: true;
|
|
11
25
|
};
|
|
12
26
|
}, {
|
|
13
27
|
ns: import("@ibiz-template/core").Namespace;
|
|
14
28
|
renderFilterGroup: (node: IFilterBranchNode) => JSX.Element;
|
|
15
29
|
renderFilterItem: (node: IFilterLeafNode) => JSX.Element;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
30
|
+
onConfirm: () => void;
|
|
31
|
+
onCancel: () => void;
|
|
32
|
+
isInSearchBar: import("vue").ComputedRef<boolean>;
|
|
33
|
+
UiFilterNodes: import("vue").ComputedRef<IFilterNode[]>;
|
|
34
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "confirm")[], "cancel" | "change" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
/**
|
|
36
|
+
* 过滤项控制器集合
|
|
37
|
+
*/
|
|
38
|
+
filterControllers: {
|
|
39
|
+
type: PropType<SearchBarFilterController[]>;
|
|
22
40
|
required: true;
|
|
23
41
|
};
|
|
24
|
-
|
|
25
|
-
|
|
42
|
+
/**
|
|
43
|
+
* 过滤项树节点数据集合
|
|
44
|
+
*/
|
|
45
|
+
filterNodes: {
|
|
46
|
+
type: PropType<IFilterNode[]>;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* 父容器
|
|
51
|
+
*/
|
|
52
|
+
parent: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
required: true;
|
|
26
55
|
};
|
|
27
56
|
}>> & {
|
|
28
|
-
|
|
57
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
58
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
59
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
29
60
|
}, {}, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, resolveComponent, h, createVNode, createTextVNode, defineComponent } from 'vue';
|
|
1
|
+
import { isVNode, computed, resolveComponent, h, createVNode, createTextVNode, defineComponent } from 'vue';
|
|
2
2
|
import { ValueOP } from '@ibiz-template/runtime';
|
|
3
3
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
4
4
|
import './filter-tree.css';
|
|
@@ -50,23 +50,41 @@ const FilterModes = [{
|
|
|
50
50
|
const FilterTreeControl = /* @__PURE__ */ defineComponent({
|
|
51
51
|
name: "IBizFilterTreeControl",
|
|
52
52
|
props: {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
/**
|
|
54
|
+
* 过滤项控制器集合
|
|
55
|
+
*/
|
|
56
|
+
filterControllers: {
|
|
57
|
+
type: Array,
|
|
55
58
|
required: true
|
|
56
59
|
},
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
/**
|
|
61
|
+
* 过滤项树节点数据集合
|
|
62
|
+
*/
|
|
63
|
+
filterNodes: {
|
|
64
|
+
type: Array,
|
|
65
|
+
required: true
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* 父容器
|
|
69
|
+
*/
|
|
70
|
+
parent: {
|
|
71
|
+
type: String,
|
|
72
|
+
required: true
|
|
59
73
|
}
|
|
60
74
|
},
|
|
61
|
-
emits:
|
|
62
|
-
close: () => true
|
|
63
|
-
},
|
|
75
|
+
emits: ["confirm", "cancel", "change"],
|
|
64
76
|
setup(props, {
|
|
65
77
|
emit
|
|
66
78
|
}) {
|
|
67
79
|
const ns = useNamespace("filter-tree");
|
|
80
|
+
const isInSearchBar = computed(() => {
|
|
81
|
+
return props.parent === "search-bar";
|
|
82
|
+
});
|
|
83
|
+
const UiFilterNodes = computed(() => {
|
|
84
|
+
return props.filterNodes;
|
|
85
|
+
});
|
|
68
86
|
const findFilterController = (fieldName, valueOP) => {
|
|
69
|
-
return props.
|
|
87
|
+
return props.filterControllers.find((item) => {
|
|
70
88
|
if (item.fieldName === fieldName) {
|
|
71
89
|
return item.valueOP ? item.valueOP === valueOP : true;
|
|
72
90
|
}
|
|
@@ -84,7 +102,7 @@ const FilterTreeControl = /* @__PURE__ */ defineComponent({
|
|
|
84
102
|
}
|
|
85
103
|
return field.valueOPs;
|
|
86
104
|
};
|
|
87
|
-
props.
|
|
105
|
+
props.filterControllers.forEach((filterC) => {
|
|
88
106
|
let find = allFields.find((x) => x.name === filterC.fieldName);
|
|
89
107
|
if (find === void 0) {
|
|
90
108
|
find = {
|
|
@@ -139,6 +157,7 @@ const FilterTreeControl = /* @__PURE__ */ defineComponent({
|
|
|
139
157
|
editor = h(component, {
|
|
140
158
|
value: node.value,
|
|
141
159
|
controller: filterC.editor,
|
|
160
|
+
data: {},
|
|
142
161
|
onChange: (val) => {
|
|
143
162
|
node.value = val;
|
|
144
163
|
}
|
|
@@ -238,23 +257,26 @@ const FilterTreeControl = /* @__PURE__ */ defineComponent({
|
|
|
238
257
|
}, null)]);
|
|
239
258
|
})])]);
|
|
240
259
|
};
|
|
241
|
-
const
|
|
242
|
-
emit("
|
|
260
|
+
const onConfirm = () => {
|
|
261
|
+
emit("confirm");
|
|
262
|
+
};
|
|
263
|
+
const onCancel = () => {
|
|
264
|
+
emit("cancel");
|
|
243
265
|
};
|
|
244
266
|
return {
|
|
245
267
|
ns,
|
|
246
268
|
renderFilterGroup,
|
|
247
269
|
renderFilterItem,
|
|
248
|
-
|
|
270
|
+
onConfirm,
|
|
271
|
+
onCancel,
|
|
272
|
+
isInSearchBar,
|
|
273
|
+
UiFilterNodes
|
|
249
274
|
};
|
|
250
275
|
},
|
|
251
276
|
render() {
|
|
252
|
-
const {
|
|
253
|
-
state
|
|
254
|
-
} = this.controller;
|
|
255
277
|
return createVNode("div", {
|
|
256
278
|
"class": [this.ns.b()]
|
|
257
|
-
}, [
|
|
279
|
+
}, [this.UiFilterNodes.length > 0 && this.UiFilterNodes.map((node) => {
|
|
258
280
|
if (node.leaf) {
|
|
259
281
|
return this.renderFilterItem(node);
|
|
260
282
|
}
|
|
@@ -263,14 +285,13 @@ const FilterTreeControl = /* @__PURE__ */ defineComponent({
|
|
|
263
285
|
"class": this.ns.b("footer")
|
|
264
286
|
}, [createVNode(resolveComponent("el-button"), {
|
|
265
287
|
"onClick": () => {
|
|
266
|
-
this.
|
|
267
|
-
this.onClose();
|
|
288
|
+
this.onConfirm();
|
|
268
289
|
}
|
|
269
290
|
}, {
|
|
270
|
-
default: () => [
|
|
291
|
+
default: () => [this.isInSearchBar ? "\u641C\u7D22" : "\u786E\u5B9A"]
|
|
271
292
|
}), createVNode(resolveComponent("el-button"), {
|
|
272
293
|
"onClick": () => {
|
|
273
|
-
this.
|
|
294
|
+
this.onCancel();
|
|
274
295
|
}
|
|
275
296
|
}, {
|
|
276
297
|
default: () => [createTextVNode("\u91CD\u7F6E")]
|
|
@@ -55,12 +55,18 @@ const SearchBarControl = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
const showFilter = async () => {
|
|
56
56
|
popover = ibiz.overlay.createPopover(() => {
|
|
57
57
|
return createVNode(resolveComponent("iBizFilterTreeControl"), {
|
|
58
|
-
"
|
|
58
|
+
"filterControllers": c.filterControllers,
|
|
59
|
+
"filterNodes": c.state.filterNodes,
|
|
60
|
+
"parent": "search-bar",
|
|
61
|
+
"onConfirm": () => {
|
|
62
|
+
c.onSearch();
|
|
59
63
|
if (popover) {
|
|
60
64
|
popover.dismiss();
|
|
61
65
|
}
|
|
62
66
|
},
|
|
63
|
-
"
|
|
67
|
+
"onCancel": () => {
|
|
68
|
+
c.resetFilter();
|
|
69
|
+
}
|
|
64
70
|
}, null);
|
|
65
71
|
}, void 0, {
|
|
66
72
|
placement: "bottom-end",
|
|
@@ -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
|
}
|
package/es/editor/index.mjs
CHANGED
|
@@ -26,6 +26,7 @@ import './array/index.mjs';
|
|
|
26
26
|
import './cascader/index.mjs';
|
|
27
27
|
import './color-picker/index.mjs';
|
|
28
28
|
import './preset/index.mjs';
|
|
29
|
+
import './user/ibiz-searchcond-edit/index.mjs';
|
|
29
30
|
import { IBizSpan } from './span/span/span.mjs';
|
|
30
31
|
import { IBizSpanLink } from './span/span-link/span-link.mjs';
|
|
31
32
|
import { IBizInput } from './text-box/input/input.mjs';
|
|
@@ -59,6 +60,7 @@ import { IBizArray } from './array/ibiz-array/ibiz-array.mjs';
|
|
|
59
60
|
import { IBizCascader } from './cascader/ibiz-cascader/ibiz-cascader.mjs';
|
|
60
61
|
import { IBizColorPicker } from './color-picker/ibiz-color-picker/ibiz-color-picker.mjs';
|
|
61
62
|
import { IBizPresetRawitem } from './preset/preset-rawitem/ibiz-preset-rawitem/ibiz-preset-rawitem.mjs';
|
|
63
|
+
import { IBizSearchCondEdit } from './user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs';
|
|
62
64
|
import { SpanEditorProvider } from './span/span-editor.provider.mjs';
|
|
63
65
|
import { TextBoxEditorProvider } from './text-box/text-box-editor.provider.mjs';
|
|
64
66
|
import { DropDownListEditorProvider } from './dropdown-list/dropdown-list-editor.provider.mjs';
|
|
@@ -83,6 +85,7 @@ import { MarkDownEditorProvider } from './markdown/markdown-editor.provider.mjs'
|
|
|
83
85
|
import { ArrayEditorProvider } from './array/array-editor.provider.mjs';
|
|
84
86
|
import { CascaderEditorProvider } from './cascader/cascader-editor.provider.mjs';
|
|
85
87
|
import { ColorPickerEditorProvider } from './color-picker/color-picker-editor.provider.mjs';
|
|
88
|
+
import { SearchCondEditEditorProvider } from './user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.mjs';
|
|
86
89
|
|
|
87
90
|
"use strict";
|
|
88
91
|
const IBizEditor = {
|
|
@@ -121,6 +124,7 @@ const IBizEditor = {
|
|
|
121
124
|
v.component(IBizCascader.name, IBizCascader);
|
|
122
125
|
v.component(IBizColorPicker.name, IBizColorPicker);
|
|
123
126
|
v.component(IBizPresetRawitem.name, IBizPresetRawitem);
|
|
127
|
+
v.component(IBizSearchCondEdit.name, IBizSearchCondEdit);
|
|
124
128
|
v.component(
|
|
125
129
|
"IBizHtml",
|
|
126
130
|
defineAsyncComponent(() => import('./html/wang-editor/wang-editor.mjs'))
|
|
@@ -285,6 +289,10 @@ const IBizEditor = {
|
|
|
285
289
|
"COLORPICKER",
|
|
286
290
|
() => new ColorPickerEditorProvider()
|
|
287
291
|
);
|
|
292
|
+
registerEditorProvider(
|
|
293
|
+
"PICKER_searchCondEdit",
|
|
294
|
+
() => new SearchCondEditEditorProvider()
|
|
295
|
+
);
|
|
288
296
|
registerEditorProvider(
|
|
289
297
|
"FIELD_IMAGE_PICTURE_ONE",
|
|
290
298
|
() => new FileUploaderEditorProvider("PICTURE_ONE")
|
|
@@ -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 };
|
|
@@ -50,6 +50,8 @@ export declare const IBizSpan: import("vue").DefineComponent<{
|
|
|
50
50
|
id?: string | undefined;
|
|
51
51
|
name?: string | undefined;
|
|
52
52
|
userParam?: Record<string, string> | undefined;
|
|
53
|
+
modelId?: string | undefined;
|
|
54
|
+
modelType?: string | undefined;
|
|
53
55
|
} | undefined;
|
|
54
56
|
data?: IData | undefined;
|
|
55
57
|
tooltip?: string | undefined;
|
|
@@ -36,8 +36,8 @@ const IBizInputNumber = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
});
|
|
37
37
|
watch(() => props.value, (newVal, oldVal) => {
|
|
38
38
|
if (newVal !== oldVal) {
|
|
39
|
-
const number = newVal != null && !Object.is(newVal, "") ? Number(newVal) :
|
|
40
|
-
currentVal.value = Number.isNaN(number) ?
|
|
39
|
+
const number = newVal != null && !Object.is(newVal, "") ? Number(newVal) : null;
|
|
40
|
+
currentVal.value = Number.isNaN(number) ? null : number;
|
|
41
41
|
}
|
|
42
42
|
}, {
|
|
43
43
|
immediate: true
|
|
@@ -28,30 +28,4 @@ export declare class UploadEditorController extends EditorController<IFileUpload
|
|
|
28
28
|
*/
|
|
29
29
|
exportParams?: IParams;
|
|
30
30
|
protected onInit(): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* 计算文件的上传路径和下载路径
|
|
33
|
-
* 下载路径文件id用%fileId%占位,替换即可
|
|
34
|
-
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
35
|
-
*
|
|
36
|
-
* @author lxm
|
|
37
|
-
* @date 2022-11-17 13:11:43
|
|
38
|
-
* @param {IData} data
|
|
39
|
-
* @returns {*} {{ uploadUrl: string; downloadUrl: string }}
|
|
40
|
-
*/
|
|
41
|
-
calcBaseUrl(data: IData): {
|
|
42
|
-
uploadUrl: string;
|
|
43
|
-
downloadUrl: string;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* 请求url获取文件流,并用JS触发文件下载
|
|
47
|
-
*
|
|
48
|
-
* @author lxm
|
|
49
|
-
* @date 2022-11-17 14:11:09
|
|
50
|
-
* @param {string} url
|
|
51
|
-
* @param {IData} file
|
|
52
|
-
*/
|
|
53
|
-
fileDownload(file: {
|
|
54
|
-
url: string;
|
|
55
|
-
name: string;
|
|
56
|
-
}): void;
|
|
57
31
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { RuntimeModelError
|
|
2
|
-
import { EditorController
|
|
3
|
-
import qs from 'qs';
|
|
1
|
+
import { RuntimeModelError } from '@ibiz-template/core';
|
|
2
|
+
import { EditorController } from '@ibiz-template/runtime';
|
|
4
3
|
|
|
5
4
|
"use strict";
|
|
6
5
|
var __defProp = Object.defineProperty;
|
|
@@ -77,67 +76,6 @@ class UploadEditorController extends EditorController {
|
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
|
-
/**
|
|
81
|
-
* 计算文件的上传路径和下载路径
|
|
82
|
-
* 下载路径文件id用%fileId%占位,替换即可
|
|
83
|
-
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
84
|
-
*
|
|
85
|
-
* @author lxm
|
|
86
|
-
* @date 2022-11-17 13:11:43
|
|
87
|
-
* @param {IData} data
|
|
88
|
-
* @returns {*} {{ uploadUrl: string; downloadUrl: string }}
|
|
89
|
-
*/
|
|
90
|
-
calcBaseUrl(data) {
|
|
91
|
-
let uploadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.uploadFileUrl);
|
|
92
|
-
let downloadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.downloadFileUrl, "/%fileId%");
|
|
93
|
-
let uploadParams = {};
|
|
94
|
-
let exportParams = {};
|
|
95
|
-
if (this.uploadParams) {
|
|
96
|
-
uploadParams = convertNavData(
|
|
97
|
-
this.uploadParams,
|
|
98
|
-
data,
|
|
99
|
-
this.params,
|
|
100
|
-
this.context
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
if (this.exportParams) {
|
|
104
|
-
exportParams = convertNavData(
|
|
105
|
-
this.exportParams,
|
|
106
|
-
data,
|
|
107
|
-
this.params,
|
|
108
|
-
this.context
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
uploadUrl += qs.stringify(uploadParams, { addQueryPrefix: true });
|
|
112
|
-
downloadUrl += qs.stringify(exportParams, { addQueryPrefix: true });
|
|
113
|
-
return { uploadUrl, downloadUrl };
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* 请求url获取文件流,并用JS触发文件下载
|
|
117
|
-
*
|
|
118
|
-
* @author lxm
|
|
119
|
-
* @date 2022-11-17 14:11:09
|
|
120
|
-
* @param {string} url
|
|
121
|
-
* @param {IData} file
|
|
122
|
-
*/
|
|
123
|
-
fileDownload(file) {
|
|
124
|
-
ibiz.net.request(file.url, {
|
|
125
|
-
method: "get",
|
|
126
|
-
responseType: "blob",
|
|
127
|
-
baseURL: ""
|
|
128
|
-
// 已经有baseURL了,这里无需再写
|
|
129
|
-
}).then((response) => {
|
|
130
|
-
if (response.status !== 200) {
|
|
131
|
-
throw new RuntimeError("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
|
|
132
|
-
}
|
|
133
|
-
if (!response.data) {
|
|
134
|
-
throw new RuntimeError("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
|
|
135
|
-
} else {
|
|
136
|
-
const fileName = file.name;
|
|
137
|
-
downloadFileFromBlob(response.data, fileName);
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
79
|
}
|
|
142
80
|
|
|
143
81
|
export { UploadEditorController };
|