@ibiz-template/vue3-components 0.7.41-alpha.33 → 0.7.41-alpha.34
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-y6lsqs4n.js → index-BFGNWF-0.js} +1 -1
- package/dist/{index-BsKD1A4D.js → index-BiFsbM1Y.js} +1 -1
- package/dist/index-Cvz1NuFN.js +11 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-CYWOJCad.js → wang-editor-B4ClR4_m.js} +1 -1
- package/dist/{xlsx-util-D2V8VJ2T.js → xlsx-util-DIeV3Kl6.js} +1 -1
- package/es/control/app-menu/app-menu.mjs +3 -22
- package/es/control/calendar/calendar.mjs +2 -1
- package/es/control/tree/tree.mjs +3 -16
- package/es/locale/en/index.mjs +10 -0
- package/es/locale/zh-CN/index.mjs +10 -0
- package/es/panel-component/user-message/async-action/async-action-result/async-action-result.css +1 -0
- package/es/panel-component/user-message/async-action/async-action-result/async-action-result.mjs +161 -9
- package/lib/control/app-menu/app-menu.cjs +2 -21
- package/lib/control/calendar/calendar.cjs +2 -1
- package/lib/control/tree/tree.cjs +3 -16
- package/lib/locale/en/index.cjs +10 -0
- package/lib/locale/zh-CN/index.cjs +10 -0
- package/lib/panel-component/user-message/async-action/async-action-result/async-action-result.cjs +160 -8
- package/lib/panel-component/user-message/async-action/async-action-result/async-action-result.css +1 -0
- package/package.json +5 -5
- package/dist/index-BA-hBsSe.js +0 -11
package/lib/panel-component/user-message/async-action/async-action-result/async-action-result.cjs
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./async-action-result.css');
|
|
5
6
|
var lodashEs = require('lodash-es');
|
|
6
7
|
|
|
7
8
|
"use strict";
|
|
9
|
+
function _isSlot(s) {
|
|
10
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
11
|
+
}
|
|
8
12
|
const AsyncActionResult = /* @__PURE__ */ vue.defineComponent({
|
|
9
13
|
name: "IBizAsyncActionResult",
|
|
10
14
|
props: {
|
|
@@ -18,22 +22,170 @@ const AsyncActionResult = /* @__PURE__ */ vue.defineComponent({
|
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
24
|
setup(props) {
|
|
21
|
-
const ns = vue3Util.useNamespace("async-action-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const ns = vue3Util.useNamespace("async-action-result");
|
|
26
|
+
const finishedStates = [30, 40];
|
|
27
|
+
const info = vue.reactive({
|
|
28
|
+
title: props.asyncAction.asyncacitonname,
|
|
29
|
+
beginTime: props.asyncAction.begintime,
|
|
30
|
+
endTime: props.asyncAction.endtime,
|
|
31
|
+
actionState: finishedStates.includes(props.asyncAction.actionstate),
|
|
32
|
+
message: ibiz.i18n.t("panelComponent.userMessage.asyncActionResult.noMessage"),
|
|
33
|
+
isJSON: false
|
|
27
34
|
});
|
|
35
|
+
const onClose = () => {
|
|
36
|
+
props.modal.dismiss();
|
|
37
|
+
};
|
|
38
|
+
if (lodashEs.isObject(props.asyncAction.actionresult)) {
|
|
39
|
+
info.message = JSON.stringify(props.asyncAction.actionresult, null, 2);
|
|
40
|
+
info.isJSON = true;
|
|
41
|
+
} else if (props.asyncAction.actionresult) {
|
|
42
|
+
info.message = "".concat(props.asyncAction.actionresult);
|
|
43
|
+
}
|
|
44
|
+
const renderJSONObject = (obj, depth) => {
|
|
45
|
+
if (obj === null) {
|
|
46
|
+
return vue.createVNode("span", {
|
|
47
|
+
"class": ns.be("content", "json-null")
|
|
48
|
+
}, [vue.createTextVNode("null")]);
|
|
49
|
+
}
|
|
50
|
+
if (typeof obj === "boolean") {
|
|
51
|
+
return vue.createVNode("span", {
|
|
52
|
+
"class": ns.be("content", "json-boolean")
|
|
53
|
+
}, [obj.toString()]);
|
|
54
|
+
}
|
|
55
|
+
if (typeof obj === "number") {
|
|
56
|
+
return vue.createVNode("span", {
|
|
57
|
+
"class": ns.be("content", "json-number")
|
|
58
|
+
}, [obj.toString()]);
|
|
59
|
+
}
|
|
60
|
+
if (typeof obj === "string") {
|
|
61
|
+
return vue.createVNode("span", {
|
|
62
|
+
"class": ns.be("content", "json-string")
|
|
63
|
+
}, [vue.createTextVNode('"'), obj, vue.createTextVNode('"')]);
|
|
64
|
+
}
|
|
65
|
+
if (Array.isArray(obj)) {
|
|
66
|
+
if (obj.length === 0) {
|
|
67
|
+
return vue.createVNode("span", null, [vue.createTextVNode("[]")]);
|
|
68
|
+
}
|
|
69
|
+
const items2 = obj.map((item, index) => vue.createVNode("div", {
|
|
70
|
+
"key": index,
|
|
71
|
+
"class": ns.be("content", "json-indent"),
|
|
72
|
+
"style": {
|
|
73
|
+
paddingLeft: "".concat((depth + 1) * 20, "px")
|
|
74
|
+
}
|
|
75
|
+
}, [renderJSONObject(item, depth + 1), index < obj.length - 1 ? "," : ""]));
|
|
76
|
+
return vue.createVNode("div", {
|
|
77
|
+
"class": ns.be("content", "json-array")
|
|
78
|
+
}, [vue.createVNode("span", null, [vue.createTextVNode("[")]), items2, vue.createVNode("div", {
|
|
79
|
+
"style": {
|
|
80
|
+
paddingLeft: "".concat(depth * 20, "px")
|
|
81
|
+
}
|
|
82
|
+
}, null), vue.createVNode("span", {
|
|
83
|
+
"style": {
|
|
84
|
+
paddingLeft: "".concat(depth * 20, "px")
|
|
85
|
+
}
|
|
86
|
+
}, [vue.createTextVNode("]")])]);
|
|
87
|
+
}
|
|
88
|
+
const keys = Object.keys(obj);
|
|
89
|
+
if (keys.length === 0) {
|
|
90
|
+
return vue.createVNode("span", null, ["{}"]);
|
|
91
|
+
}
|
|
92
|
+
const items = keys.map((key, index) => vue.createVNode("div", {
|
|
93
|
+
"key": key,
|
|
94
|
+
"class": ns.be("content", "json-indent"),
|
|
95
|
+
"style": {
|
|
96
|
+
paddingLeft: "".concat((depth + 1) * 20, "px")
|
|
97
|
+
}
|
|
98
|
+
}, [vue.createVNode("span", {
|
|
99
|
+
"class": ns.be("content", "json-key")
|
|
100
|
+
}, [vue.createTextVNode('"'), key, vue.createTextVNode('"')]), vue.createTextVNode(":"), " ", renderJSONObject(obj[key], depth + 1), index < keys.length - 1 ? "," : ""]));
|
|
101
|
+
return vue.createVNode("div", {
|
|
102
|
+
"class": ns.be("content", "json-object")
|
|
103
|
+
}, [vue.createVNode("span", null, ["{"]), items, vue.createVNode("div", {
|
|
104
|
+
"style": {
|
|
105
|
+
paddingLeft: "".concat(depth * 20, "px")
|
|
106
|
+
}
|
|
107
|
+
}, null), vue.createVNode("span", {
|
|
108
|
+
"style": {
|
|
109
|
+
paddingLeft: "".concat(depth * 20, "px")
|
|
110
|
+
}
|
|
111
|
+
}, ["}"])]);
|
|
112
|
+
};
|
|
113
|
+
const renderJSON = (jsonStr) => {
|
|
114
|
+
try {
|
|
115
|
+
const obj = JSON.parse(jsonStr);
|
|
116
|
+
return renderJSONObject(obj, 0);
|
|
117
|
+
} catch (e) {
|
|
118
|
+
return vue.createVNode("span", null, [jsonStr]);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
28
121
|
return {
|
|
29
122
|
ns,
|
|
30
|
-
|
|
123
|
+
info,
|
|
124
|
+
onClose,
|
|
125
|
+
renderJSON
|
|
31
126
|
};
|
|
32
127
|
},
|
|
33
128
|
render() {
|
|
129
|
+
let _slot;
|
|
34
130
|
return vue.createVNode("div", {
|
|
35
131
|
"class": [this.ns.b()]
|
|
36
|
-
}, [
|
|
132
|
+
}, [vue.createVNode("div", {
|
|
133
|
+
"class": this.ns.b("header")
|
|
134
|
+
}, [vue.createVNode("div", {
|
|
135
|
+
"class": this.ns.e("title")
|
|
136
|
+
}, [this.info.title]), vue.createVNode("div", {
|
|
137
|
+
"class": this.ns.b("toolbar")
|
|
138
|
+
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
139
|
+
"onClick": this.onClose
|
|
140
|
+
}, _isSlot(_slot = ibiz.i18n.t("app.close")) ? _slot : {
|
|
141
|
+
default: () => [_slot]
|
|
142
|
+
})])]), vue.createVNode("div", {
|
|
143
|
+
"class": this.ns.b("content")
|
|
144
|
+
}, [vue.createVNode(vue.resolveComponent("el-row"), null, {
|
|
145
|
+
default: () => [vue.createVNode(vue.resolveComponent("el-col"), {
|
|
146
|
+
"span": 12
|
|
147
|
+
}, {
|
|
148
|
+
default: () => [vue.createVNode(vue.resolveComponent("el-form-item"), {
|
|
149
|
+
"label": ibiz.i18n.t("panelComponent.userMessage.asyncActionResult.taskName")
|
|
150
|
+
}, {
|
|
151
|
+
default: () => [this.info.title]
|
|
152
|
+
})]
|
|
153
|
+
}), vue.createVNode(vue.resolveComponent("el-col"), {
|
|
154
|
+
"span": 12
|
|
155
|
+
}, {
|
|
156
|
+
default: () => [vue.createVNode(vue.resolveComponent("el-form-item"), {
|
|
157
|
+
"label": ibiz.i18n.t("panelComponent.userMessage.asyncActionResult.taskState")
|
|
158
|
+
}, {
|
|
159
|
+
default: () => [this.info.actionState ? ibiz.i18n.t("panelComponent.userMessage.asyncActionResult.finished") : ibiz.i18n.t("panelComponent.userMessage.asyncActionResult.processing")]
|
|
160
|
+
})]
|
|
161
|
+
}), vue.createVNode(vue.resolveComponent("el-col"), {
|
|
162
|
+
"span": 12
|
|
163
|
+
}, {
|
|
164
|
+
default: () => [vue.createVNode(vue.resolveComponent("el-form-item"), {
|
|
165
|
+
"label": ibiz.i18n.t("panelComponent.userMessage.asyncActionResult.beginTime")
|
|
166
|
+
}, {
|
|
167
|
+
default: () => [this.info.beginTime]
|
|
168
|
+
})]
|
|
169
|
+
}), vue.createVNode(vue.resolveComponent("el-col"), {
|
|
170
|
+
"span": 12
|
|
171
|
+
}, {
|
|
172
|
+
default: () => [vue.createVNode(vue.resolveComponent("el-form-item"), {
|
|
173
|
+
"label": ibiz.i18n.t("panelComponent.userMessage.asyncActionResult.endTime")
|
|
174
|
+
}, {
|
|
175
|
+
default: () => [this.info.endTime]
|
|
176
|
+
})]
|
|
177
|
+
}), vue.createVNode(vue.resolveComponent("el-col"), {
|
|
178
|
+
"span": 24
|
|
179
|
+
}, {
|
|
180
|
+
default: () => [vue.createVNode(vue.resolveComponent("el-form-item"), {
|
|
181
|
+
"label": ibiz.i18n.t("panelComponent.userMessage.asyncActionResult.exeResult")
|
|
182
|
+
}, {
|
|
183
|
+
default: () => [vue.createVNode("div", {
|
|
184
|
+
"class": this.ns.be("content", "json-container")
|
|
185
|
+
}, [this.renderJSON(this.info.message)])]
|
|
186
|
+
})]
|
|
187
|
+
})]
|
|
188
|
+
})])]);
|
|
37
189
|
}
|
|
38
190
|
});
|
|
39
191
|
|
package/lib/panel-component/user-message/async-action/async-action-result/async-action-result.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-async-action-result{height:100%;display:flex;flex-flow:column nowrap;padding:var(--ibiz-spacing-tight)}.ibiz-async-action-result__title{font-size:var(--ibiz-font-size-header-5);font-weight:var(--ibiz-font-weight-bold)}.ibiz-async-action-result-header{display:flex;align-items:center;justify-content:space-between;height:48px;padding:var(--ibiz-spacing-tight);border-bottom:1px solid var(--ibiz-color-border)}.ibiz-async-action-result-content{padding:var(--ibiz-spacing-tight)}.ibiz-async-action-result-content .el-form-item__content,.ibiz-async-action-result-content .el-form-item__label{font-weight:var(--ibiz-font-weight-bold)}.ibiz-async-action-result-content__json-container{width:100%;max-height:400px;padding:12px;overflow-y:auto;font-family:Monaco,Menlo,"Ubuntu Mono",monospace;font-size:13px;line-height:1.5;word-break:break-word;white-space:pre-wrap;background-color:var(--ibiz-color-bg-0);border:1px solid var(--ibiz-color-border);border-radius:4px}.ibiz-async-action-result-content__json-container::-webkit-scrollbar{width:6px;height:6px}.ibiz-async-action-result-content__json-container::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.ibiz-async-action-result-content__json-container::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.ibiz-async-action-result-content__json-container::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.ibiz-async-action-result-content__json-key{font-weight:700;color:#d73a49}.ibiz-async-action-result-content__json-string{color:#032f62}.ibiz-async-action-result-content__json-number{color:#005cc5}.ibiz-async-action-result-content__json-boolean{color:#d73a49}.ibiz-async-action-result-content__json-null{color:#d73a49}.ibiz-async-action-result-content__json-array{display:inline-block}.ibiz-async-action-result-content__json-object{display:inline-block}.ibiz-async-action-result-content__json-indent{display:block}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.34",
|
|
4
4
|
"description": "web端组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"@floating-ui/dom": "^1.5.3",
|
|
33
33
|
"@ibiz-template-plugin/ai-chat": "^0.0.32",
|
|
34
34
|
"@ibiz-template-plugin/gantt": "0.1.8-alpha.316",
|
|
35
|
-
"@ibiz-template-plugin/bi-report": "0.0.
|
|
35
|
+
"@ibiz-template-plugin/bi-report": "0.0.29",
|
|
36
36
|
"@ibiz-template-plugin/data-view": "0.0.6",
|
|
37
37
|
"@ibiz-template/core": "0.7.41-alpha.33",
|
|
38
38
|
"@ibiz-template/devtool": "0.0.13",
|
|
39
|
-
"@ibiz-template/model-helper": "0.7.41-alpha.
|
|
40
|
-
"@ibiz-template/runtime": "0.7.41-alpha.
|
|
39
|
+
"@ibiz-template/model-helper": "0.7.41-alpha.34",
|
|
40
|
+
"@ibiz-template/runtime": "0.7.41-alpha.34",
|
|
41
41
|
"@ibiz-template/theme": "0.7.39",
|
|
42
|
-
"@ibiz-template/vue3-util": "0.7.41-alpha.
|
|
42
|
+
"@ibiz-template/vue3-util": "0.7.41-alpha.34",
|
|
43
43
|
"@ibiz-template/web-theme": "3.9.0",
|
|
44
44
|
"@ibiz/model-core": "^0.1.83",
|
|
45
45
|
"@imengyu/vue3-context-menu": "^1.3.5",
|