@ibiz-template/vue3-components 0.7.41-alpha.166 → 0.7.41-alpha.167
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-CCoBeNIV.js → index-DXoEi5m-.js} +28 -28
- package/dist/{index.es-D1vng-7i.js → index.es-nZgG-TGm.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-B0ZpE6o-.js → wang-editor-CK60NH54.js} +1 -1
- package/dist/{xlsx-util-Djaaq9Po.js → xlsx-util-5Xgq-UOe.js} +1 -1
- package/es/panel-component/user-message/async-action/async-action/async-action.provider.mjs +44 -41
- package/es/util/ai-chat-util/ai-chat-util.mjs +152 -47
- package/es/web-app/main.mjs +1 -1
- package/lib/panel-component/user-message/async-action/async-action/async-action.provider.cjs +44 -40
- package/lib/util/ai-chat-util/ai-chat-util.cjs +150 -45
- package/lib/web-app/main.cjs +1 -1
- package/package.json +5 -5
- package/src/panel-component/user-message/async-action/async-action/async-action.provider.ts +58 -42
- package/src/util/ai-chat-util/ai-chat-util.ts +212 -53
- package/src/web-app/main.ts +1 -1
|
@@ -4,8 +4,10 @@ var vue = require('vue');
|
|
|
4
4
|
var qxUtil = require('qx-util');
|
|
5
5
|
var runtime = require('@ibiz-template/runtime');
|
|
6
6
|
var core = require('@ibiz-template/core');
|
|
7
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
8
|
var ramda = require('ramda');
|
|
8
9
|
var aiFeedback = require('./ai-feedback/ai-feedback.cjs');
|
|
10
|
+
var asyncAction_provider = require('../../panel-component/user-message/async-action/async-action/async-action.provider.cjs');
|
|
9
11
|
|
|
10
12
|
"use strict";
|
|
11
13
|
var __defProp = Object.defineProperty;
|
|
@@ -15,7 +17,13 @@ var __publicField = (obj, key, value) => {
|
|
|
15
17
|
return value;
|
|
16
18
|
};
|
|
17
19
|
class AIChatUtil {
|
|
18
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Creates an instance of AIChatUtil.
|
|
22
|
+
* @param {App} App vue App
|
|
23
|
+
* @memberof AIChatUtil
|
|
24
|
+
*/
|
|
25
|
+
constructor(App2) {
|
|
26
|
+
this.App = App2;
|
|
19
27
|
__publicField(this, "TOPIC_CHAT_PREFIX", "topic");
|
|
20
28
|
__publicField(this, "INLINE_CHAT_SUFFIX", "inline");
|
|
21
29
|
__publicField(this, "TEMP_CHAT_SUFFIX", "temp");
|
|
@@ -23,10 +31,19 @@ class AIChatUtil {
|
|
|
23
31
|
__publicField(this, "PRE_ERROR_MESSAGE", "Expected content-type to be text/event-stream, Actual: application/json;charset=UTF-8");
|
|
24
32
|
// 无流内容回来
|
|
25
33
|
__publicField(this, "NONE_ERROR_MESSAGE", "Expected content-type to be text/event-stream, Actual: null");
|
|
26
|
-
//
|
|
27
|
-
__publicField(this, "
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
// 各 asyncActionID 对应的回调集合(同一 ID 可能被多处注册不同回调),回调入参为最新异步作业对象
|
|
35
|
+
__publicField(this, "asyncActionCallBackMap", /* @__PURE__ */ new Map());
|
|
36
|
+
ibiz.mc.command.asyncAction.on((msg) => {
|
|
37
|
+
if (!msg.data || msg.subtype !== "ASYNCACTION")
|
|
38
|
+
return;
|
|
39
|
+
const action = msg.data;
|
|
40
|
+
if (action.actiontype === "ASYNCCHATCOMPLETION")
|
|
41
|
+
return;
|
|
42
|
+
const callbacks = this.asyncActionCallBackMap.get(action.asyncacitonid);
|
|
43
|
+
if (callbacks) {
|
|
44
|
+
callbacks.forEach((cb) => cb(action));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
30
47
|
}
|
|
31
48
|
/**
|
|
32
49
|
* @description 创建 AI 聊天 SSE 流式消息处理回调(提问与恢复会话共用)
|
|
@@ -95,7 +112,7 @@ class AIChatUtil {
|
|
|
95
112
|
};
|
|
96
113
|
}
|
|
97
114
|
/**
|
|
98
|
-
* @description 网络中断(network error)后按 asyncacitonid
|
|
115
|
+
* @description 网络中断(network error)后按 asyncacitonid 自动续传一次;成功返回 true,失败返回 false 交回调用方走既有错误处理
|
|
99
116
|
* @param {any} aiChat 单实例聊天总控
|
|
100
117
|
* @param {IContext} ctx 上下文
|
|
101
118
|
* @param {IParams} param 视图参数
|
|
@@ -107,49 +124,40 @@ class AIChatUtil {
|
|
|
107
124
|
* @memberof AIChatUtil
|
|
108
125
|
*/
|
|
109
126
|
async autoResumeChat(aiChat, ctx, param, deService, state, resumeInfo, onMsg) {
|
|
110
|
-
var _a;
|
|
127
|
+
var _a, _b;
|
|
111
128
|
(_a = state.abortController) == null ? void 0 : _a.abort();
|
|
112
129
|
state.abortController = new AbortController();
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
} catch (resumeError) {
|
|
142
|
-
const resumeMsg = (resumeError == null ? void 0 : resumeError.message) || "";
|
|
143
|
-
if ((resumeError == null ? void 0 : resumeError.name) === "AbortError") {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
if (resumeMsg === this.NONE_ERROR_MESSAGE) {
|
|
147
|
-
aiChat.setActiveAsyncacitonId("");
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
130
|
+
try {
|
|
131
|
+
const resumeRequestData = {
|
|
132
|
+
asyncacitonid: resumeInfo.asyncacitonid
|
|
133
|
+
};
|
|
134
|
+
if (resumeInfo.sessionid) {
|
|
135
|
+
resumeRequestData.sessionid = resumeInfo.sessionid;
|
|
136
|
+
}
|
|
137
|
+
if (resumeInfo.srfaiagent) {
|
|
138
|
+
resumeRequestData.srfaiagent = resumeInfo.srfaiagent;
|
|
139
|
+
}
|
|
140
|
+
if (resumeInfo.srfproject) {
|
|
141
|
+
resumeRequestData.srfproject = resumeInfo.srfproject;
|
|
142
|
+
}
|
|
143
|
+
await deService.aiResumeSse(
|
|
144
|
+
onMsg,
|
|
145
|
+
state.abortController,
|
|
146
|
+
ctx,
|
|
147
|
+
{ srfactag: param.srfactag },
|
|
148
|
+
{ ...resumeRequestData }
|
|
149
|
+
);
|
|
150
|
+
return true;
|
|
151
|
+
} catch (resumeError) {
|
|
152
|
+
if ((resumeError == null ? void 0 : resumeError.name) === "AbortError") {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
(_b = state.abortController) == null ? void 0 : _b.abort();
|
|
156
|
+
if ((resumeError == null ? void 0 : resumeError.message) === this.NONE_ERROR_MESSAGE) {
|
|
157
|
+
aiChat.setActiveAsyncacitonId("");
|
|
150
158
|
}
|
|
159
|
+
return false;
|
|
151
160
|
}
|
|
152
|
-
return false;
|
|
153
161
|
}
|
|
154
162
|
/**
|
|
155
163
|
* 获取AI聊天对象
|
|
@@ -335,6 +343,7 @@ class AIChatUtil {
|
|
|
335
343
|
locale: ibiz.i18n.getLang(),
|
|
336
344
|
enableAIProject: editorParams.srfenableaiprojectselect ? editorParams.srfenableaiprojectselect === "true" : ibiz.config.common.enableAIProjectSelect,
|
|
337
345
|
projectSelectPlaceholder: editorParams.srfprojectselectplaceholder || ibiz.config.common.aiProjectSelectPlaceholder,
|
|
346
|
+
knowledgeBaseView: editorParams.srfaiknowledgebaseview || ibiz.config.common.aiKnowledgeBaseView,
|
|
338
347
|
selectAIProjectId: editorParams.srfselectaiprojectid
|
|
339
348
|
};
|
|
340
349
|
if (editorParams.srfaiappendcurdata) {
|
|
@@ -453,6 +462,16 @@ class AIChatUtil {
|
|
|
453
462
|
editorParams
|
|
454
463
|
);
|
|
455
464
|
};
|
|
465
|
+
chatOptions.openEmbedView = async (ctx, param, viewId, container, selectedData, callback) => {
|
|
466
|
+
await this.openEmbedView(
|
|
467
|
+
ctx,
|
|
468
|
+
param,
|
|
469
|
+
viewId,
|
|
470
|
+
container,
|
|
471
|
+
selectedData,
|
|
472
|
+
callback
|
|
473
|
+
);
|
|
474
|
+
};
|
|
456
475
|
chatOptions.fetchKnowledgeBaseList = (args2 = {}) => {
|
|
457
476
|
return this.getKnowledgeBaseList(context, params, editorParams, args2);
|
|
458
477
|
};
|
|
@@ -486,6 +505,7 @@ class AIChatUtil {
|
|
|
486
505
|
}
|
|
487
506
|
const fileSystemOptions = await this.getAIFileSystemOptions(filePreviewMode);
|
|
488
507
|
chatOptions.fileSystemOptions = fileSystemOptions;
|
|
508
|
+
chatOptions.asyncActionOptions = await this.getAIAsyncActionOptions();
|
|
489
509
|
chatOptions.history = async (ctx, param, other) => {
|
|
490
510
|
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
491
511
|
const historyRequestData = {};
|
|
@@ -1083,8 +1103,11 @@ class AIChatUtil {
|
|
|
1083
1103
|
locale: ibiz.i18n.getLang(),
|
|
1084
1104
|
enableAIProject: params.srfenableaiprojectselect ? params.srfenableaiprojectselect === "true" : ibiz.config.common.enableAIProjectSelect,
|
|
1085
1105
|
projectSelectPlaceholder: params.srfprojectselectplaceholder || ibiz.config.common.aiProjectSelectPlaceholder,
|
|
1106
|
+
knowledgeBaseView: params.srfaiknowledgebaseview || ibiz.config.common.aiKnowledgeBaseView,
|
|
1086
1107
|
selectAIProjectId: params.srfselectaiprojectid
|
|
1087
1108
|
};
|
|
1109
|
+
if (params.hasOwnProperty("srfaiknowledgebaseview"))
|
|
1110
|
+
delete params.srfaiknowledgebaseview;
|
|
1088
1111
|
if (params.hasOwnProperty("srfselectaiprojectid"))
|
|
1089
1112
|
delete params.srfselectaiprojectid;
|
|
1090
1113
|
if (params.hasOwnProperty("srfenableaiprojectselect"))
|
|
@@ -1227,6 +1250,16 @@ class AIChatUtil {
|
|
|
1227
1250
|
} else {
|
|
1228
1251
|
chatOptions.enableWorkSpace = ibiz.config.common.aiEnableWorkSpace;
|
|
1229
1252
|
}
|
|
1253
|
+
chatOptions.openEmbedView = async (ctx, param, viewId, container, selectedData, callback) => {
|
|
1254
|
+
await this.openEmbedView(
|
|
1255
|
+
ctx,
|
|
1256
|
+
param,
|
|
1257
|
+
viewId,
|
|
1258
|
+
container,
|
|
1259
|
+
selectedData,
|
|
1260
|
+
callback
|
|
1261
|
+
);
|
|
1262
|
+
};
|
|
1230
1263
|
chatOptions.fetchAgentList = (args2 = {}) => {
|
|
1231
1264
|
const { query, agentid } = args2;
|
|
1232
1265
|
return this.getAIAgentList(context, {
|
|
@@ -1267,6 +1300,7 @@ class AIChatUtil {
|
|
|
1267
1300
|
}
|
|
1268
1301
|
const fileSystemOptions = await this.getAIFileSystemOptions(filePreviewMode);
|
|
1269
1302
|
chatOptions.fileSystemOptions = fileSystemOptions;
|
|
1303
|
+
chatOptions.asyncActionOptions = await this.getAIAsyncActionOptions();
|
|
1270
1304
|
chatOptions.history = async (ctx, param, other) => {
|
|
1271
1305
|
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
1272
1306
|
const historyRequestData = {};
|
|
@@ -2204,6 +2238,77 @@ class AIChatUtil {
|
|
|
2204
2238
|
};
|
|
2205
2239
|
return fileSystemOptions;
|
|
2206
2240
|
}
|
|
2241
|
+
/**
|
|
2242
|
+
* @description 打开嵌入视图
|
|
2243
|
+
* @private
|
|
2244
|
+
* @param {IContext} context 上下文
|
|
2245
|
+
* @param {IParams} params 视图参数
|
|
2246
|
+
* @param {string} viewId 视图标识
|
|
2247
|
+
* @param {HTMLElement} container 视图挂载容器
|
|
2248
|
+
* @param {IData[]} [selectedData] 选中数据
|
|
2249
|
+
* @param {(result: IModalData) => void} [callback] 回调
|
|
2250
|
+
* @returns {*} {Promise<void>}
|
|
2251
|
+
* @memberof AIChatUtil
|
|
2252
|
+
*/
|
|
2253
|
+
async openEmbedView(context, params, viewId, container, selectedData, callback) {
|
|
2254
|
+
vue.render(null, container);
|
|
2255
|
+
const modal = new runtime.Modal({
|
|
2256
|
+
mode: runtime.ViewMode.EMBED,
|
|
2257
|
+
viewUsage: 2,
|
|
2258
|
+
dismiss: (result) => {
|
|
2259
|
+
callback == null ? void 0 : callback(result);
|
|
2260
|
+
vue.render(null, container);
|
|
2261
|
+
}
|
|
2262
|
+
});
|
|
2263
|
+
const modelData = await ibiz.hub.getAppView(viewId);
|
|
2264
|
+
const vNode = vue.createVNode(vue3Util.IBizViewShell, {
|
|
2265
|
+
modal,
|
|
2266
|
+
modelData,
|
|
2267
|
+
context,
|
|
2268
|
+
params: { ...params, checkstrictly: true },
|
|
2269
|
+
style: {
|
|
2270
|
+
height: "".concat(modelData.height || 400, "px")
|
|
2271
|
+
},
|
|
2272
|
+
state: {
|
|
2273
|
+
selectedData
|
|
2274
|
+
}
|
|
2275
|
+
});
|
|
2276
|
+
vNode.appContext = this.App._context;
|
|
2277
|
+
vue.render(vNode, container);
|
|
2278
|
+
}
|
|
2279
|
+
/**
|
|
2280
|
+
* @description 获取异步行为配置
|
|
2281
|
+
* @returns {*} {Promise<IData>}
|
|
2282
|
+
* @memberof AIChatUtil
|
|
2283
|
+
*/
|
|
2284
|
+
async getAIAsyncActionOptions() {
|
|
2285
|
+
const asyncActionOptions = {};
|
|
2286
|
+
asyncActionOptions.getLastAsyncAction = async (asyncActionID) => {
|
|
2287
|
+
const result = await ibiz.hub.notice.asyncAction.service.get(asyncActionID);
|
|
2288
|
+
if (result.ok && result.data) {
|
|
2289
|
+
return result.data;
|
|
2290
|
+
}
|
|
2291
|
+
return null;
|
|
2292
|
+
};
|
|
2293
|
+
asyncActionOptions.registerCallBack = (asyncActionID, callback) => {
|
|
2294
|
+
let callbacks = this.asyncActionCallBackMap.get(asyncActionID);
|
|
2295
|
+
if (!callbacks) {
|
|
2296
|
+
callbacks = /* @__PURE__ */ new Set();
|
|
2297
|
+
this.asyncActionCallBackMap.set(asyncActionID, callbacks);
|
|
2298
|
+
}
|
|
2299
|
+
callbacks.add(callback);
|
|
2300
|
+
return () => {
|
|
2301
|
+
callbacks.delete(callback);
|
|
2302
|
+
if (!callbacks.size) {
|
|
2303
|
+
this.asyncActionCallBackMap.delete(asyncActionID);
|
|
2304
|
+
}
|
|
2305
|
+
};
|
|
2306
|
+
};
|
|
2307
|
+
asyncActionOptions.onPreview = async (asyncAction, _event) => {
|
|
2308
|
+
return asyncAction_provider.openAsyncActionModal(asyncAction);
|
|
2309
|
+
};
|
|
2310
|
+
return asyncActionOptions;
|
|
2311
|
+
}
|
|
2207
2312
|
}
|
|
2208
2313
|
|
|
2209
2314
|
exports.AIChatUtil = AIChatUtil;
|
package/lib/web-app/main.cjs
CHANGED
|
@@ -91,7 +91,7 @@ async function runApp(plugins, opts) {
|
|
|
91
91
|
ibiz.overlay = new overlayController.OverlayController();
|
|
92
92
|
ibiz.inLineAIUtil = new inlineAiUtil.InLineAIUtil();
|
|
93
93
|
ibiz.screenShotUtil = new screenShotUtil.ScreenShotUtil();
|
|
94
|
-
ibiz.aiChatUtil = new aiChatUtil.AIChatUtil();
|
|
94
|
+
ibiz.aiChatUtil = new aiChatUtil.AIChatUtil(app);
|
|
95
95
|
ibiz.util.text.format = (value, code) => {
|
|
96
96
|
return app.config.globalProperties.$textFormat(value, code);
|
|
97
97
|
};
|
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.167",
|
|
4
4
|
"description": "web端组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
33
33
|
"@floating-ui/dom": "^1.5.3",
|
|
34
|
-
"@ibiz-template-plugin/ai-chat": "^0.0.
|
|
34
|
+
"@ibiz-template-plugin/ai-chat": "^0.0.134",
|
|
35
35
|
"@ibiz-template-plugin/gantt": "0.1.8-alpha.468",
|
|
36
36
|
"@ibiz-template-plugin/bi-report": "0.0.32",
|
|
37
37
|
"@ibiz-template-plugin/data-view": "0.0.8",
|
|
38
38
|
"@ibiz-template/core": "0.7.41-alpha.152",
|
|
39
39
|
"@ibiz-template/devtool": "0.0.18",
|
|
40
|
-
"@ibiz-template/model-helper": "0.7.41-alpha.
|
|
41
|
-
"@ibiz-template/runtime": "0.7.41-alpha.
|
|
40
|
+
"@ibiz-template/model-helper": "0.7.41-alpha.158",
|
|
41
|
+
"@ibiz-template/runtime": "0.7.41-alpha.158",
|
|
42
42
|
"@ibiz-template/theme": "0.7.39",
|
|
43
|
-
"@ibiz-template/vue3-util": "0.7.41-alpha.
|
|
43
|
+
"@ibiz-template/vue3-util": "0.7.41-alpha.158",
|
|
44
44
|
"@ibiz-template/web-theme": "3.16.0",
|
|
45
45
|
"@ibiz/model-core": "^0.1.89",
|
|
46
46
|
"@imengyu/vue3-context-menu": "^1.3.5",
|
|
@@ -7,6 +7,63 @@ import { AsyncActionResult } from '../async-action-result/async-action-result';
|
|
|
7
7
|
import { AsyncDataExport } from '../async-data-export/async-data-export';
|
|
8
8
|
import { AsyncAction } from './async-action';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* 打开异步作业详情弹窗,按作业类型选择对应展示组件
|
|
12
|
+
* @author zk
|
|
13
|
+
* @date 2026-11-19
|
|
14
|
+
* @param {IPortalAsyncAction} asyncAction
|
|
15
|
+
* @return {*} {boolean} 是否打开了弹窗
|
|
16
|
+
*/
|
|
17
|
+
export async function openAsyncActionModal(
|
|
18
|
+
asyncAction: IPortalAsyncAction,
|
|
19
|
+
): Promise<boolean> {
|
|
20
|
+
if (
|
|
21
|
+
isNil(asyncAction.actiontype) ||
|
|
22
|
+
asyncAction.actiontype === 'asyncaction'
|
|
23
|
+
) {
|
|
24
|
+
ibiz.overlay.modal(
|
|
25
|
+
(modal: IModal) => {
|
|
26
|
+
return h(AsyncActionResult, {
|
|
27
|
+
asyncAction,
|
|
28
|
+
modal,
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
{},
|
|
32
|
+
{ width: '80%', height: '80%' },
|
|
33
|
+
);
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
// 导出数据
|
|
37
|
+
if (asyncAction.actiontype === 'DEEXPORTDATA') {
|
|
38
|
+
ibiz.overlay.modal(
|
|
39
|
+
(modal: IModal) => {
|
|
40
|
+
return h(AsyncDataExport, {
|
|
41
|
+
asyncAction,
|
|
42
|
+
modal,
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
{},
|
|
46
|
+
{ width: '80%', height: '80%' },
|
|
47
|
+
);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
// 导入数据,actionresult有值且是对象时才能打开详情页面
|
|
51
|
+
if (isObject(asyncAction.actionresult)) {
|
|
52
|
+
ibiz.overlay.modal(
|
|
53
|
+
(modal: IModal) => {
|
|
54
|
+
return h(AsyncActionPreview, {
|
|
55
|
+
asyncAction,
|
|
56
|
+
modal,
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
{},
|
|
60
|
+
{ width: '80%', height: '80%' },
|
|
61
|
+
);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
|
|
10
67
|
export class AsyncActionProvider implements IAsyncActionProvider {
|
|
11
68
|
component = AsyncAction;
|
|
12
69
|
|
|
@@ -21,47 +78,6 @@ export class AsyncActionProvider implements IAsyncActionProvider {
|
|
|
21
78
|
asyncAction: IPortalAsyncAction,
|
|
22
79
|
_event: MouseEvent,
|
|
23
80
|
): Promise<boolean> {
|
|
24
|
-
|
|
25
|
-
ibiz.overlay.modal(
|
|
26
|
-
(modal: IModal) => {
|
|
27
|
-
return h(AsyncActionResult, {
|
|
28
|
-
asyncAction,
|
|
29
|
-
modal,
|
|
30
|
-
});
|
|
31
|
-
},
|
|
32
|
-
{},
|
|
33
|
-
{ width: '80%', height: '80%' },
|
|
34
|
-
);
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
// 导出数据
|
|
38
|
-
if (asyncAction.actiontype === 'DEEXPORTDATA') {
|
|
39
|
-
ibiz.overlay.modal(
|
|
40
|
-
(modal: IModal) => {
|
|
41
|
-
return h(AsyncDataExport, {
|
|
42
|
-
asyncAction,
|
|
43
|
-
modal,
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
{},
|
|
47
|
-
{ width: '80%', height: '80%' },
|
|
48
|
-
);
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
// 导入数据,actionresult有值且是对象时才能打开详情页面
|
|
52
|
-
if (isObject(asyncAction.actionresult)) {
|
|
53
|
-
ibiz.overlay.modal(
|
|
54
|
-
(modal: IModal) => {
|
|
55
|
-
return h(AsyncActionPreview, {
|
|
56
|
-
asyncAction,
|
|
57
|
-
modal,
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
{},
|
|
61
|
-
{ width: '80%', height: '80%' },
|
|
62
|
-
);
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
return false;
|
|
81
|
+
return openAsyncActionModal(asyncAction);
|
|
66
82
|
}
|
|
67
83
|
}
|