cloud-web-corejs 1.0.291 → 1.0.292
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/package.json +1 -1
- package/src/components/wf/wf.js +6 -6
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +3 -3
- package/src/index.js +3 -3
- package/src/layout/components/extractedCode/viewDialog.vue +7 -7
- package/src/store/modules/permission.js +13 -24
- package/src/utils/resolveViewComponent.js +75 -16
- package/src/utils/wf.js +7 -6
- package/src/views/user/file_view_ins/list.vue +3 -3
- package/src/views/user/home/index.vue +7 -6
- package/src/views/user/notify_message/dialog.vue +6 -5
- package/src/views/user/outLink/form_view.vue +2 -2
- package/src/views/user/outLink/index.vue +3 -3
- package/src/views/user/outLink/view.vue +4 -4
- package/src/views/user/wf/iframe/index.vue +3 -3
- package/src/views/user/wf/iframe/index2.vue +3 -3
- package/src/views/user/wf/wf_manage/list.vue +6 -5
- package/src/views/user/wf/wf_manage/list2.vue +6 -5
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +6 -5
package/package.json
CHANGED
package/src/components/wf/wf.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {getToken} from "../../utils/auth";
|
|
3
3
|
import settingConfig from "@/settings.js";
|
|
4
4
|
import {selectDialogMixins} from "../../mixins/selectDialog";
|
|
5
|
-
import {
|
|
5
|
+
import {requireViewAsync} from "@base/utils/resolveViewComponent";
|
|
6
6
|
import {getWfButtonNames, loadWfButtonNames} from "./wfButtonName";
|
|
7
7
|
import {isWfAutoConfirm, loadWfAutoConfirm} from "./wfAutoConfirm";
|
|
8
8
|
import {isWfTransferEnabled, loadWfTransferEnabled} from "./wfTransferEnabled";
|
|
@@ -13,7 +13,7 @@ let configUtil = {
|
|
|
13
13
|
// 归属自己 / 包内组件本地渲染;归属别家子应用(remote)或缺文件时返回 null,
|
|
14
14
|
// 不再抛错崩溃。归属解析见 @base/utils/resolveViewComponent。
|
|
15
15
|
requireView: (url) => {
|
|
16
|
-
return
|
|
16
|
+
return requireViewAsync(url);
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -199,11 +199,11 @@ wfIndexMixin = {
|
|
|
199
199
|
modalStrictly: true,
|
|
200
200
|
});
|
|
201
201
|
},
|
|
202
|
-
openWfModifyDialog() {
|
|
202
|
+
async openWfModifyDialog() {
|
|
203
203
|
let row = this.paramData;
|
|
204
204
|
let url = row.url + ".vue";
|
|
205
205
|
this.showModifyDialog = true;
|
|
206
|
-
this.content = configUtil.requireView(url);
|
|
206
|
+
this.content = await configUtil.requireView(url);
|
|
207
207
|
this.$openEditView("showBillEdit");
|
|
208
208
|
},
|
|
209
209
|
modfyDialogClose() {
|
|
@@ -1990,11 +1990,11 @@ wfModifyMixin = {
|
|
|
1990
1990
|
this.openWfModifyDialog(this.code);
|
|
1991
1991
|
},
|
|
1992
1992
|
methods: {
|
|
1993
|
-
openWfModifyDialog() {
|
|
1993
|
+
async openWfModifyDialog() {
|
|
1994
1994
|
let row = this.paramData;
|
|
1995
1995
|
let url = row.url + ".vue";
|
|
1996
1996
|
this.showModifyDialog = true;
|
|
1997
|
-
this.content = configUtil.requireView(url);
|
|
1997
|
+
this.content = await configUtil.requireView(url);
|
|
1998
1998
|
this.$openEditView("showBillEdit");
|
|
1999
1999
|
},
|
|
2000
2000
|
modfyDialogClose() {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<script>
|
|
41
|
-
import {
|
|
41
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
42
42
|
|
|
43
43
|
export default {
|
|
44
44
|
components: {},
|
|
@@ -136,7 +136,7 @@ export default {
|
|
|
136
136
|
this.initData();
|
|
137
137
|
},
|
|
138
138
|
methods: {
|
|
139
|
-
initData() {
|
|
139
|
+
async initData() {
|
|
140
140
|
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
|
141
141
|
let queryParam = this.$baseLodash.cloneDeep(this.dialogParam);
|
|
142
142
|
let murl = queryParam.urlmobile;
|
|
@@ -188,7 +188,7 @@ export default {
|
|
|
188
188
|
|
|
189
189
|
this.showWfContent = true;
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
const res = await loadViewComponentAsync(url);
|
|
192
192
|
this.remoteView =
|
|
193
193
|
res.kind === "remote"
|
|
194
194
|
? {
|
package/src/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import store from "@base/store";
|
|
|
12
12
|
import router, { resetRouter } from "@base/router";
|
|
13
13
|
import settings from "@/settings";
|
|
14
14
|
import { setToken as setAuthToken } from "@base/utils/auth";
|
|
15
|
-
import {
|
|
15
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
16
16
|
|
|
17
17
|
import "@/icons"; // icon
|
|
18
18
|
import "@base/permission"; // permission control
|
|
@@ -310,7 +310,7 @@ function render(props = {}) {
|
|
|
310
310
|
* 仅 $baseReload / _handleCallback 覆盖为回主应用的动作。个别详情页若有更深的 $parent 依赖,
|
|
311
311
|
* 按对接清单 §5.6 做最小改造。
|
|
312
312
|
*/
|
|
313
|
-
function mountDetailHost(props = {}) {
|
|
313
|
+
async function mountDetailHost(props = {}) {
|
|
314
314
|
if (props.appCode) settings.appCode = props.appCode;
|
|
315
315
|
if (props.token) {
|
|
316
316
|
setAuthToken(props.token);
|
|
@@ -319,7 +319,7 @@ function mountDetailHost(props = {}) {
|
|
|
319
319
|
if (props.lang) i18n.locale = props.lang;
|
|
320
320
|
|
|
321
321
|
const appCode = props.appCode || settings.appCode;
|
|
322
|
-
const resolved =
|
|
322
|
+
const resolved = await loadViewComponentAsync(props.targetPath, { appCode });
|
|
323
323
|
const target = resolved.component;
|
|
324
324
|
const bizParams = props.bizParams || {};
|
|
325
325
|
const viewMeta = props.viewMeta || {};
|
|
@@ -100,7 +100,7 @@ export default {
|
|
|
100
100
|
this.$emit("update:visible", false);
|
|
101
101
|
this.$emit("close");
|
|
102
102
|
},
|
|
103
|
-
openWfDialog() {
|
|
103
|
+
async openWfDialog() {
|
|
104
104
|
let obj = this.extractedRow?.obj;
|
|
105
105
|
if (!obj) return;
|
|
106
106
|
let objType = this.extractedRow.objType;
|
|
@@ -110,27 +110,27 @@ export default {
|
|
|
110
110
|
readonly: true,
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
let
|
|
113
|
+
let loadView;
|
|
114
114
|
if (objType == "FormTemplate") {
|
|
115
|
-
|
|
115
|
+
loadView = () => import("@base/views/bd/setting/form_template/edit.vue");
|
|
116
116
|
wfDataId = obj.formCode;
|
|
117
117
|
this.title = this.$t1("查看表单模板");
|
|
118
118
|
} else if (objType == "FormScript") {
|
|
119
119
|
if (obj.scriptType == 1) {
|
|
120
|
-
|
|
120
|
+
loadView = () => import("@base/views/bd/setting/form_script/edit1.vue");
|
|
121
121
|
} else {
|
|
122
|
-
|
|
122
|
+
loadView = () => import("@base/views/bd/setting/form_script/edit.vue");
|
|
123
123
|
}
|
|
124
124
|
this.title = this.$t1("查看表单脚本");
|
|
125
125
|
} else if (objType == "TableTemplate") {
|
|
126
|
-
|
|
126
|
+
loadView = () => import("@base/views/bd/setting/table_model/edit.vue");
|
|
127
127
|
this.title = this.$t1("查看数据表定义模板");
|
|
128
128
|
}
|
|
129
129
|
this.param = Object.assign(param, {
|
|
130
130
|
_dataId: wfDataId,
|
|
131
131
|
extractedObj: obj,
|
|
132
132
|
});
|
|
133
|
-
this.wfContent =
|
|
133
|
+
this.wfContent = loadView ? (await loadView()).default : null;
|
|
134
134
|
|
|
135
135
|
this.showWfContent = true;
|
|
136
136
|
},
|
|
@@ -14,8 +14,9 @@ import {
|
|
|
14
14
|
getAppRegistry,
|
|
15
15
|
registerSubApps,
|
|
16
16
|
buildSubAppRoutes,
|
|
17
|
-
} from "@base/microRouter";
|
|
18
|
-
import
|
|
17
|
+
} from "@base/microRouter";
|
|
18
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
19
|
+
import MenuFallback from "@base/views/user/menuFallback/index.vue";
|
|
19
20
|
|
|
20
21
|
// qiankun 宿主态(仅 settings.microMainEnabled 的主应用登录后填充)
|
|
21
22
|
let hostRegistryApps = [];
|
|
@@ -108,28 +109,16 @@ let configUtl = {
|
|
|
108
109
|
sidebarRoutes,
|
|
109
110
|
Layout,
|
|
110
111
|
getRouters,
|
|
111
|
-
loadView: function (view) {
|
|
112
|
-
return (resolve) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
} /* else if (view.startsWith(t2)) {
|
|
122
|
-
let path = view.substr(t2.length);
|
|
123
|
-
return require(['@/components' + path], resolve, fail);
|
|
124
|
-
} */
|
|
125
|
-
}
|
|
126
|
-
return require(["@/views" + view], resolve, fail);
|
|
127
|
-
} catch (e) {
|
|
128
|
-
fail(e);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
},
|
|
132
|
-
};
|
|
112
|
+
loadView: function (view) {
|
|
113
|
+
return (resolve) => {
|
|
114
|
+
loadViewComponentAsync(view)
|
|
115
|
+
.then((res) =>
|
|
116
|
+
resolve(res.component || createFallbackComponent(view, res.error))
|
|
117
|
+
)
|
|
118
|
+
.catch((e) => resolve(createFallbackComponent(view, e)));
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
};
|
|
133
122
|
|
|
134
123
|
export const loadView = (view) => {
|
|
135
124
|
// 路由懒加载
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* 因此无需注册表——归属靠访问路径结构 + 本应用 appCode 比较即可;独立运行 /
|
|
19
19
|
* 主应用态(appCode 为空、无 /micro/ 前缀)会自动退化为与历史一致的本地解析。
|
|
20
20
|
*
|
|
21
|
-
* webpack 硬约束:@base/views 与 @/views 两条动态
|
|
21
|
+
* webpack 硬约束:@base/views 与 @/views 两条动态 import 必须保留字面前缀,
|
|
22
22
|
* 不可把前缀变量化,否则 webpack 无法收集 context。包被消费时 @base 指向包内
|
|
23
23
|
* views、@/ 指向消费应用 views——这正是 base / localPrivate 的语义来源。
|
|
24
24
|
*/
|
|
@@ -136,15 +136,62 @@ export function resolveViewPath(rawUrl, options = {}) {
|
|
|
136
136
|
return { kind: "localPrivate", base: false, rel: ensureVue(ensureLeadingSlash(path)) };
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
// ——— 以下为
|
|
140
|
-
|
|
141
|
-
function
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
139
|
+
// ——— 以下为 import 落地层(依赖 webpack context,不进纯函数单测) ———
|
|
140
|
+
|
|
141
|
+
function importBaseView(rel) {
|
|
142
|
+
if (process.env.NODE_ENV === "development") {
|
|
143
|
+
try {
|
|
144
|
+
return Promise.resolve(require("@base/views" + rel));
|
|
145
|
+
} catch (e) {
|
|
146
|
+
return Promise.reject(e);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return import(/* webpackInclude: /\.vue$/ */ `@base/views${rel}`);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function importAppView(rel) {
|
|
153
|
+
if (process.env.NODE_ENV === "development") {
|
|
154
|
+
try {
|
|
155
|
+
return Promise.resolve(require("@/views" + rel));
|
|
156
|
+
} catch (e) {
|
|
157
|
+
return Promise.reject(e);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return import(/* webpackInclude: /\.vue$/ */ `@/views${rel}`);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const viewModuleCache = new Map();
|
|
164
|
+
|
|
165
|
+
function importViewCandidates(base, rel) {
|
|
166
|
+
const load = base ? importBaseView : importAppView;
|
|
167
|
+
const bare = rel.replace(/\.vue$/i, "");
|
|
168
|
+
return load(rel).catch((e) =>
|
|
169
|
+
bare === rel ? Promise.reject(e) : load(bare).catch(() => Promise.reject(e))
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function getViewModule(base, rel) {
|
|
174
|
+
const key = (base ? "@base" : "@") + rel;
|
|
175
|
+
let promise = viewModuleCache.get(key);
|
|
176
|
+
if (!promise) {
|
|
177
|
+
promise = importViewCandidates(base, rel).catch((e) => {
|
|
178
|
+
viewModuleCache.delete(key);
|
|
179
|
+
return Promise.reject(e);
|
|
180
|
+
});
|
|
181
|
+
viewModuleCache.set(key, promise);
|
|
182
|
+
}
|
|
183
|
+
return promise;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function normalizeViewError(e) {
|
|
187
|
+
if (e && e.code === "MODULE_NOT_FOUND") return e;
|
|
188
|
+
const error = new Error(
|
|
189
|
+
"页面资源加载失败,请刷新重试(" + ((e && e.message) || e) + ")"
|
|
190
|
+
);
|
|
191
|
+
error.cause = e;
|
|
192
|
+
error.viewChunkLoadFailed = true;
|
|
193
|
+
return error;
|
|
194
|
+
}
|
|
148
195
|
|
|
149
196
|
/**
|
|
150
197
|
* 惰性读取本应用(渲染方)appCode,避免把 settings 拉进 resolveViewPath 的纯函数单测。
|
|
@@ -177,7 +224,7 @@ function getRendererAppCode() {
|
|
|
177
224
|
* - base / localPrivate:component 为组件对象(require 失败或缺文件时为 null,附 error)
|
|
178
225
|
* - remote / empty / unknown:component 为 null,由调用方决定后续(装载子应用 / 兜底提示)
|
|
179
226
|
*/
|
|
180
|
-
export function
|
|
227
|
+
export async function loadViewComponentAsync(rawUrl, options = {}) {
|
|
181
228
|
const opts = Object.assign({}, options);
|
|
182
229
|
if (opts.appCode == null) opts.appCode = getRendererAppCode();
|
|
183
230
|
|
|
@@ -186,10 +233,10 @@ export function loadViewComponent(rawUrl, options = {}) {
|
|
|
186
233
|
return Object.assign({ component: null }, result);
|
|
187
234
|
}
|
|
188
235
|
try {
|
|
189
|
-
const mod =
|
|
236
|
+
const mod = await getViewModule(result.base, result.rel);
|
|
190
237
|
return Object.assign({ component: mod && mod.default }, result);
|
|
191
238
|
} catch (e) {
|
|
192
|
-
return Object.assign({ component: null, error: e }, result);
|
|
239
|
+
return Object.assign({ component: null, error: normalizeViewError(e) }, result);
|
|
193
240
|
}
|
|
194
241
|
}
|
|
195
242
|
|
|
@@ -198,6 +245,18 @@ export function loadViewComponent(rawUrl, options = {}) {
|
|
|
198
245
|
* 供 components/wf/wf.js、mobile wfModifyDialogMixin.js 的 requireView 平滑替换——
|
|
199
246
|
* 它们历史上返回 require(...).default。remote / 缺文件时返回 null(不再抛错崩溃)。
|
|
200
247
|
*/
|
|
201
|
-
export function
|
|
202
|
-
return
|
|
203
|
-
}
|
|
248
|
+
export function requireViewAsync(rawUrl, options = {}) {
|
|
249
|
+
return loadViewComponentAsync(rawUrl, options).then((result) => result.component);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const ASYNC_MIGRATION_MSG =
|
|
253
|
+
"loadViewComponent / requireViewCompat 已改为异步,请改用 " +
|
|
254
|
+
"loadViewComponentAsync 或 requireViewAsync,并在调用处 await。";
|
|
255
|
+
|
|
256
|
+
export function loadViewComponent() {
|
|
257
|
+
throw new TypeError("[resolveViewComponent] " + ASYNC_MIGRATION_MSG);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export function requireViewCompat() {
|
|
261
|
+
throw new TypeError("[resolveViewComponent] " + ASYNC_MIGRATION_MSG);
|
|
262
|
+
}
|
package/src/utils/wf.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**version-1.0*/
|
|
2
2
|
import {
|
|
3
3
|
getToken
|
|
4
|
-
} from './auth';
|
|
4
|
+
} from './auth';
|
|
5
|
+
import {requireViewAsync} from "@base/utils/resolveViewComponent";
|
|
5
6
|
|
|
6
7
|
let configUtil = {
|
|
7
8
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
8
9
|
getToken,
|
|
9
10
|
requireView: (url) => {
|
|
10
|
-
return
|
|
11
|
+
return requireViewAsync(url);
|
|
11
12
|
}
|
|
12
13
|
};
|
|
13
14
|
|
|
@@ -170,11 +171,11 @@ wfIndexMixin = {
|
|
|
170
171
|
modalStrictly: true
|
|
171
172
|
});
|
|
172
173
|
},
|
|
173
|
-
openWfModifyDialog() {
|
|
174
|
+
async openWfModifyDialog() {
|
|
174
175
|
let row = this.paramData;
|
|
175
176
|
let url = row.url + '.vue';
|
|
176
177
|
this.showModifyDialog = true;
|
|
177
|
-
this.content = configUtil.requireView(url);
|
|
178
|
+
this.content = await configUtil.requireView(url);
|
|
178
179
|
this.$openEditView('showBillEdit');
|
|
179
180
|
},
|
|
180
181
|
modfyDialogClose() {
|
|
@@ -744,11 +745,11 @@ wfModifyMixin = {
|
|
|
744
745
|
this.openWfModifyDialog(this.code);
|
|
745
746
|
},
|
|
746
747
|
methods: {
|
|
747
|
-
openWfModifyDialog() {
|
|
748
|
+
async openWfModifyDialog() {
|
|
748
749
|
let row = this.paramData;
|
|
749
750
|
let url = row.url + '.vue';
|
|
750
751
|
this.showModifyDialog = true;
|
|
751
|
-
this.content = configUtil.requireView(url);
|
|
752
|
+
this.content = await configUtil.requireView(url);
|
|
752
753
|
this.$openEditView('showBillEdit');
|
|
753
754
|
},
|
|
754
755
|
modfyDialogClose() {
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
import ElImageViewer from "@base/components/VabUpload/image-viewer";
|
|
240
240
|
import {treeScollx} from "@base/utils/global";
|
|
241
241
|
import propertiesDialog from './propertiesDialog';
|
|
242
|
-
import {
|
|
242
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
243
243
|
|
|
244
244
|
export default {
|
|
245
245
|
name: 'file_view_ins:list',
|
|
@@ -865,13 +865,13 @@ export default {
|
|
|
865
865
|
this.treeFlag = true;
|
|
866
866
|
}, 200)
|
|
867
867
|
},
|
|
868
|
-
openWfDialog(row) {
|
|
868
|
+
async openWfDialog(row) {
|
|
869
869
|
let url = row.billUrl + '.vue';
|
|
870
870
|
let id = row.billId;
|
|
871
871
|
this.wfDataId = !id || typeof id == 'object' ? 0 : id;
|
|
872
872
|
this.showWfDialog = true;
|
|
873
873
|
this.showWfContent = true;
|
|
874
|
-
|
|
874
|
+
const res = await loadViewComponentAsync(url);
|
|
875
875
|
this.remoteView =
|
|
876
876
|
res.kind === "remote"
|
|
877
877
|
? {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<script>
|
|
14
14
|
import corejsConfig from "@/corejsConfig";
|
|
15
15
|
import settingConfig from "@/settings";
|
|
16
|
-
import {
|
|
16
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
19
|
name: 'home',
|
|
@@ -58,13 +58,14 @@ export default {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
},
|
|
61
|
-
initHome() {
|
|
61
|
+
async initHome() {
|
|
62
62
|
let url = null;
|
|
63
63
|
let userInfo = this.userInfo;
|
|
64
64
|
let flag = userInfo.flag;
|
|
65
65
|
if (flag == 6 || flag == 7 || flag == 8) {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
this.homeContent = (
|
|
67
|
+
await import("@base/views/user/home/dev.vue")
|
|
68
|
+
).default;
|
|
68
69
|
this.showHomeContent = true;
|
|
69
70
|
return
|
|
70
71
|
}
|
|
@@ -72,7 +73,7 @@ export default {
|
|
|
72
73
|
url: USER_PREFIX + '/menu/currentList',
|
|
73
74
|
data: {},
|
|
74
75
|
method: 'post',
|
|
75
|
-
success: res => {
|
|
76
|
+
success: async res => {
|
|
76
77
|
let menus = res.objx || [];
|
|
77
78
|
let homeMenu = menus.find(menu => menu.type == 2 && menu.enabled);
|
|
78
79
|
let menuUrl = homeMenu?.url;
|
|
@@ -88,7 +89,7 @@ export default {
|
|
|
88
89
|
url = defaultHomePage || settingConfig.defaultHomePage || '@base/views/user/home/default.vue'
|
|
89
90
|
}
|
|
90
91
|
// 首页菜单不会归属别的子应用,无需 remote 兜底;归属解析见 @base/utils/resolveViewComponent
|
|
91
|
-
this.homeContent =
|
|
92
|
+
this.homeContent = (await loadViewComponentAsync(url)).component;
|
|
92
93
|
|
|
93
94
|
this.showHomeContent = true;
|
|
94
95
|
this.flag = 1;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
|
-
import {
|
|
42
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
43
43
|
export default {
|
|
44
44
|
props: {},
|
|
45
45
|
data() {
|
|
@@ -80,7 +80,7 @@ export default {
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
open(row, callback) {
|
|
83
|
-
this.notifyMessageRead(row, () => {
|
|
83
|
+
this.notifyMessageRead(row, async () => {
|
|
84
84
|
let turl = row.jumpContent;
|
|
85
85
|
let wfUrl = turl.split("?")[0];
|
|
86
86
|
let param = this.getUrlParam(turl);
|
|
@@ -102,8 +102,9 @@ export default {
|
|
|
102
102
|
formCode: formCode,
|
|
103
103
|
dataId: wfDataId,
|
|
104
104
|
});
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
this.wfContent = (
|
|
106
|
+
await import("@base/views/user/form/vform/render.vue")
|
|
107
|
+
).default;
|
|
107
108
|
} else {
|
|
108
109
|
this.param = Object.assign(param, {
|
|
109
110
|
_dataId: wfDataId,
|
|
@@ -113,7 +114,7 @@ export default {
|
|
|
113
114
|
this.wfDataId = !id || typeof id == "object" ? 0 : id;
|
|
114
115
|
// this.showWfDialog = true;
|
|
115
116
|
this.showWfContent = true;
|
|
116
|
-
|
|
117
|
+
const res = await loadViewComponentAsync(url);
|
|
117
118
|
this.remoteView =
|
|
118
119
|
res.kind === "remote"
|
|
119
120
|
? {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
import indexUtil from "@base/utils/index.js"
|
|
12
|
-
import {
|
|
12
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent"
|
|
13
13
|
import {
|
|
14
14
|
setReportGlobalParam
|
|
15
15
|
} from "@base/components/xform/utils/util";
|
|
@@ -96,7 +96,7 @@ export default {
|
|
|
96
96
|
this.showWfContent = true;
|
|
97
97
|
this.initUserInfo(async () => {
|
|
98
98
|
await this.initI18n();
|
|
99
|
-
|
|
99
|
+
const res = await loadViewComponentAsync(url);
|
|
100
100
|
if (res.kind === "remote") {
|
|
101
101
|
this.$message({ message: "该单据归属子应用 " + res.owner + ",请从对应入口打开", type: "warning" });
|
|
102
102
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
15
|
import { getToken } from "@base/utils/auth";
|
|
16
|
-
import {
|
|
16
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
19
|
name: "outLink",
|
|
@@ -24,11 +24,11 @@ export default {
|
|
|
24
24
|
type: 0,
|
|
25
25
|
};
|
|
26
26
|
},
|
|
27
|
-
mounted() {
|
|
27
|
+
async mounted() {
|
|
28
28
|
let url = this.$route.query.url;
|
|
29
29
|
let route = this.$route.query.route;
|
|
30
30
|
if (route) {
|
|
31
|
-
|
|
31
|
+
const res = await loadViewComponentAsync(route);
|
|
32
32
|
if (res.kind === "remote") {
|
|
33
33
|
this.$message({ message: "该页面归属子应用 " + res.owner + ",请从对应入口打开", type: "warning" });
|
|
34
34
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
import indexUtil from "@base/utils/index.js"
|
|
12
|
-
import {
|
|
12
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent"
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
data() {
|
|
@@ -86,9 +86,9 @@ export default {
|
|
|
86
86
|
this.queryParam = queryParam;
|
|
87
87
|
this.showWfContent = true;
|
|
88
88
|
|
|
89
|
-
this.initUserInfo(() => {
|
|
90
|
-
this.initI18n();
|
|
91
|
-
|
|
89
|
+
this.initUserInfo(async () => {
|
|
90
|
+
await this.initI18n();
|
|
91
|
+
const res = await loadViewComponentAsync(url);
|
|
92
92
|
if (res.kind === "remote") {
|
|
93
93
|
this.$message({ message: "该单据归属子应用 " + res.owner + ",请从对应入口打开", type: "warning" });
|
|
94
94
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script>
|
|
16
|
-
import {
|
|
16
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
17
17
|
export default {
|
|
18
18
|
data() {
|
|
19
19
|
return {
|
|
@@ -28,7 +28,7 @@ export default {
|
|
|
28
28
|
this.initData();
|
|
29
29
|
},
|
|
30
30
|
methods: {
|
|
31
|
-
initData() {
|
|
31
|
+
async initData() {
|
|
32
32
|
let wfDataId = this.$route.query.wfDataId;
|
|
33
33
|
let wfUrl = this.$route.query.wfUrl;
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ export default {
|
|
|
37
37
|
this.wfDataId = !id || typeof id == 'object' ? 0 : id;
|
|
38
38
|
// this.showWfDialog = true;
|
|
39
39
|
this.showWfContent = true;
|
|
40
|
-
|
|
40
|
+
const res = await loadViewComponentAsync(url);
|
|
41
41
|
if (res.kind === "remote") {
|
|
42
42
|
this.$message({ message: "该单据归属子应用 " + res.owner + ",请从对应入口打开", type: "warning" });
|
|
43
43
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
|
-
import {
|
|
15
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
16
16
|
export default {
|
|
17
17
|
data() {
|
|
18
18
|
return {
|
|
@@ -26,7 +26,7 @@ export default {
|
|
|
26
26
|
this.login();
|
|
27
27
|
},
|
|
28
28
|
methods: {
|
|
29
|
-
initData() {
|
|
29
|
+
async initData() {
|
|
30
30
|
let dataId = this.$route.query.dataId;
|
|
31
31
|
let purl = this.$route.query.url;
|
|
32
32
|
let param = this.$route.query.param;
|
|
@@ -35,7 +35,7 @@ export default {
|
|
|
35
35
|
}
|
|
36
36
|
let url = purl + '.vue';
|
|
37
37
|
this.showWfContent = true;
|
|
38
|
-
|
|
38
|
+
const res = await loadViewComponentAsync(url);
|
|
39
39
|
if (res.kind === "remote") {
|
|
40
40
|
this.$message({ message: "该单据归属子应用 " + res.owner + ",请从对应入口打开", type: "warning" });
|
|
41
41
|
}
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
import { treeScollx } from "@base/utils/global.js";
|
|
437
437
|
import wfObjConfigDialog from "../../../../views/user/wf/wf_obj_config/dialog.vue";
|
|
438
438
|
import userDialog from "@base/views/user/user/dialog";
|
|
439
|
-
import {
|
|
439
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
440
440
|
|
|
441
441
|
export default {
|
|
442
442
|
name: "wf_manage:list",
|
|
@@ -650,7 +650,7 @@ export default {
|
|
|
650
650
|
this.vxeOption = opts;
|
|
651
651
|
});
|
|
652
652
|
},
|
|
653
|
-
openEditDialog(row) {
|
|
653
|
+
async openEditDialog(row) {
|
|
654
654
|
/*let a = 1;
|
|
655
655
|
let url = row.url + '.vue';
|
|
656
656
|
let id = row.objId;
|
|
@@ -673,14 +673,15 @@ export default {
|
|
|
673
673
|
formCode: formCode,
|
|
674
674
|
dataId: wfDataId,
|
|
675
675
|
};
|
|
676
|
-
|
|
677
|
-
|
|
676
|
+
this.wfContent = (
|
|
677
|
+
await import("@base/views/user/form/vform/render.vue")
|
|
678
|
+
).default;
|
|
678
679
|
} else {
|
|
679
680
|
this.param = {
|
|
680
681
|
_dataId: wfDataId,
|
|
681
682
|
};
|
|
682
683
|
let url = row.url + ".vue";
|
|
683
|
-
|
|
684
|
+
const res = await loadViewComponentAsync(url);
|
|
684
685
|
this.remoteView =
|
|
685
686
|
res.kind === "remote"
|
|
686
687
|
? {
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
<script>
|
|
324
324
|
import { treeScollx } from "@base/utils/global.js";
|
|
325
325
|
import wfObjConfigDialog from "../wf_obj_config/dialog.vue";
|
|
326
|
-
import {
|
|
326
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
327
327
|
|
|
328
328
|
export default {
|
|
329
329
|
name: "wf_manage:list2",
|
|
@@ -524,7 +524,7 @@ export default {
|
|
|
524
524
|
this.vxeOption = opts;
|
|
525
525
|
});
|
|
526
526
|
},
|
|
527
|
-
openEditDialog(row) {
|
|
527
|
+
async openEditDialog(row) {
|
|
528
528
|
/*let a = 1;
|
|
529
529
|
let url = row.url + '.vue';
|
|
530
530
|
let id = row.objId;
|
|
@@ -547,14 +547,15 @@ export default {
|
|
|
547
547
|
formCode: formCode,
|
|
548
548
|
dataId: wfDataId,
|
|
549
549
|
};
|
|
550
|
-
|
|
551
|
-
|
|
550
|
+
this.wfContent = (
|
|
551
|
+
await import("@base/views/user/form/vform/render.vue")
|
|
552
|
+
).default;
|
|
552
553
|
} else {
|
|
553
554
|
this.param = {
|
|
554
555
|
_dataId: wfDataId,
|
|
555
556
|
};
|
|
556
557
|
let url = row.url + ".vue";
|
|
557
|
-
|
|
558
|
+
const res = await loadViewComponentAsync(url);
|
|
558
559
|
this.remoteView =
|
|
559
560
|
res.kind === "remote"
|
|
560
561
|
? {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script>
|
|
44
|
-
import {
|
|
44
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
45
45
|
import { getChunkLoadErrorMessage } from "@base/utils/chunkLoadError";
|
|
46
46
|
export default {
|
|
47
47
|
name: "wfContentDialog",
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
89
89
|
this.$emit("update:visible", false);
|
|
90
90
|
this.$emit("close");
|
|
91
91
|
},
|
|
92
|
-
openWfDialog() {
|
|
92
|
+
async openWfDialog() {
|
|
93
93
|
try {
|
|
94
94
|
let id = this.option.objId;
|
|
95
95
|
let wfDataId = !id || typeof id == "object" ? 0 : Number(id);
|
|
@@ -105,14 +105,15 @@ export default {
|
|
|
105
105
|
formCode: formCode,
|
|
106
106
|
dataId: wfDataId,
|
|
107
107
|
});
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
this.wfContent = (
|
|
109
|
+
await import("@base/views/user/form/vform/render.vue")
|
|
110
|
+
).default;
|
|
110
111
|
} else {
|
|
111
112
|
this.param = Object.assign(param, {
|
|
112
113
|
_dataId: wfDataId,
|
|
113
114
|
});
|
|
114
115
|
let url = this.option.url + ".vue";
|
|
115
|
-
|
|
116
|
+
const res = await loadViewComponentAsync(url);
|
|
116
117
|
if (res.error) throw res.error;
|
|
117
118
|
this.remoteView =
|
|
118
119
|
res.kind === "remote"
|