cloud-web-corejs 1.1.0-dev.35 → 1.1.0-dev.37
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
CHANGED
|
@@ -277,12 +277,12 @@
|
|
|
277
277
|
|
|
278
278
|
<script>
|
|
279
279
|
import {mixins} from "./mixins";
|
|
280
|
-
import userDialog from './talkUserDialog.vue';
|
|
281
280
|
|
|
282
281
|
export default {
|
|
283
282
|
mixins: [mixins],
|
|
284
283
|
components: {
|
|
285
|
-
|
|
284
|
+
// 选人弹窗同步引入会把 tableForm 焊进 onlineTalk;仅打开选人时再拉
|
|
285
|
+
userDialog: () => import('./talkUserDialog.vue'),
|
|
286
286
|
privateProfileDialog: () => import('../../components/VabUpload/privateProfileDialog')
|
|
287
287
|
},
|
|
288
288
|
data() {
|
|
@@ -288,18 +288,11 @@
|
|
|
288
288
|
<script>
|
|
289
289
|
import { mapGetters } from "vuex";
|
|
290
290
|
import variables from "@base/styles/variables.scss";
|
|
291
|
-
import userInfo from "@base/views/user/user/info.vue";
|
|
292
|
-
import userFormInfo from "@base/views/user/user/form_info.vue";
|
|
293
|
-
import onlineTalk from "@base/components/onlineTalk";
|
|
294
291
|
import { getToken } from "@base/utils/auth";
|
|
295
292
|
import indexUtil from "@base/utils/index.js";
|
|
296
293
|
import langTool from "../langTool.vue";
|
|
297
294
|
import { initPddLog } from "@base/utils/pddLog";
|
|
298
|
-
|
|
299
|
-
import extractedCodeCreateDialog from "../extractedCode/createDialog.vue";
|
|
300
|
-
import extractedCodeQueryDialog from "../extractedCode/queryDialog.vue";
|
|
301
295
|
import { getBdFlag } from "@base/api/user";
|
|
302
|
-
import createCompanyDialog from "@base/layout/components/createCompany/createCompanyDialog.vue";
|
|
303
296
|
|
|
304
297
|
export default {
|
|
305
298
|
props: {
|
|
@@ -309,13 +302,17 @@ export default {
|
|
|
309
302
|
},
|
|
310
303
|
},
|
|
311
304
|
components: {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
305
|
+
// 个人设置 / 在线沟通 / 提取码 / 建企业 首屏菜单用不到。同步 import 会把
|
|
306
|
+
// onlineTalk → talkUserDialog → tableForm 整条链焊进 Sidebar 异步包,
|
|
307
|
+
// 发布环境首次进入时左边菜单明显慢于首页。
|
|
308
|
+
userInfo: () => import("@base/views/user/user/info.vue"),
|
|
309
|
+
userFormInfo: () => import("@base/views/user/user/form_info.vue"),
|
|
310
|
+
onlineTalk: () => import("@base/components/onlineTalk"),
|
|
315
311
|
langTool,
|
|
316
|
-
extractedCodeCreateDialog,
|
|
317
|
-
extractedCodeQueryDialog,
|
|
318
|
-
createCompanyDialog
|
|
312
|
+
extractedCodeCreateDialog: () => import("../extractedCode/createDialog.vue"),
|
|
313
|
+
extractedCodeQueryDialog: () => import("../extractedCode/queryDialog.vue"),
|
|
314
|
+
createCompanyDialog: () =>
|
|
315
|
+
import("@base/layout/components/createCompany/createCompanyDialog.vue"),
|
|
319
316
|
},
|
|
320
317
|
data() {
|
|
321
318
|
return {
|
|
@@ -389,15 +386,19 @@ export default {
|
|
|
389
386
|
filterText(val) {
|
|
390
387
|
this.$refs.tree.filter(val);
|
|
391
388
|
},
|
|
389
|
+
sidebarRouters() {
|
|
390
|
+
this.filterRoute();
|
|
391
|
+
},
|
|
392
392
|
},
|
|
393
393
|
created() {
|
|
394
394
|
indexUtil.initI18nMessage("menus");
|
|
395
|
+
// generateRoutes2 在 next() 之前已经写入。放 created 而不是 mounted+100ms,
|
|
396
|
+
// 第一次 render 就带菜单项;也不用 immediate watcher(会早于 created,
|
|
397
|
+
// filterRoute 里的 $router.push 不安全)。
|
|
398
|
+
this.filterRoute();
|
|
395
399
|
},
|
|
396
400
|
mounted() {
|
|
397
401
|
this.getUserInfo();
|
|
398
|
-
setTimeout(() => {
|
|
399
|
-
this.filterRoute();
|
|
400
|
-
}, 100);
|
|
401
402
|
this.countHeight();
|
|
402
403
|
let query = this.$route.query;
|
|
403
404
|
if (query && query.flag == 1) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webpack async chunk load error helpers.
|
|
3
|
+
*
|
|
4
|
+
* Keep this module dependency-free so dialogs and route loaders can share the
|
|
5
|
+
* same detection without pulling UI code into a chunk.
|
|
6
|
+
*/
|
|
7
|
+
export function isChunkLoadError(error) {
|
|
8
|
+
const name = (error && error.name) || "";
|
|
9
|
+
const message = (error && error.message) || String(error || "");
|
|
10
|
+
return (
|
|
11
|
+
name === "ChunkLoadError"
|
|
12
|
+
|| /Loading (CSS )?chunk .* failed/i.test(message)
|
|
13
|
+
|| /ChunkLoadError/i.test(message)
|
|
14
|
+
|| /Failed to fetch dynamically imported module/i.test(message)
|
|
15
|
+
|| /页面资源加载失败/i.test(message)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function getChunkLoadErrorMessage(error, resourceName = "页面资源") {
|
|
20
|
+
if (isChunkLoadError(error)) {
|
|
21
|
+
return `${resourceName}加载失败,可能系统已发布新版本,请刷新页面后重试`;
|
|
22
|
+
}
|
|
23
|
+
return `${resourceName}加载失败,请稍后重试`;
|
|
24
|
+
}
|
|
@@ -162,9 +162,12 @@ import positionDialog from '../../../../views/user/position/dialog.vue';
|
|
|
162
162
|
import scriptDescriptionDialog from '@base/components/scriptDescription/dialog'
|
|
163
163
|
|
|
164
164
|
// import designer from '../../../../views/user/form/vform/designer.vue';
|
|
165
|
-
import itemList from "./itemList";
|
|
166
|
-
import formTypeEditDialog from "../../../../views/user/form/form_type/editDialog";
|
|
167
|
-
import { workflowDesignerUrl } from "@base/utils/featureResources";
|
|
165
|
+
import itemList from "./itemList";
|
|
166
|
+
import formTypeEditDialog from "../../../../views/user/form/form_type/editDialog";
|
|
167
|
+
import { workflowDesignerUrl } from "@base/utils/featureResources";
|
|
168
|
+
import { getChunkLoadErrorMessage } from "@base/utils/chunkLoadError";
|
|
169
|
+
|
|
170
|
+
const loadDesigner = () => import('../../../../views/user/form/vform/designer.vue');
|
|
168
171
|
|
|
169
172
|
export default {
|
|
170
173
|
name: 'form_template:list',
|
|
@@ -175,7 +178,7 @@ export default {
|
|
|
175
178
|
scriptDescriptionDialog,
|
|
176
179
|
itemList,
|
|
177
180
|
formTypeEditDialog,
|
|
178
|
-
designer:
|
|
181
|
+
designer: loadDesigner
|
|
179
182
|
},
|
|
180
183
|
data() {
|
|
181
184
|
return {
|
|
@@ -184,7 +187,8 @@ export default {
|
|
|
184
187
|
showEdit: false,
|
|
185
188
|
vxeOption: {},
|
|
186
189
|
formData: {},
|
|
187
|
-
showDesingerDialog: false,
|
|
190
|
+
showDesingerDialog: false,
|
|
191
|
+
designerLoading: false,
|
|
188
192
|
formCode: null,
|
|
189
193
|
templateId: null,
|
|
190
194
|
|
|
@@ -251,9 +255,25 @@ export default {
|
|
|
251
255
|
this.showItemEdit = false;
|
|
252
256
|
this.$openEditView('showEdit');
|
|
253
257
|
},
|
|
254
|
-
openDesingerDialog(row) {
|
|
255
|
-
this.
|
|
256
|
-
this.
|
|
258
|
+
async openDesingerDialog(row) {
|
|
259
|
+
if (this.designerLoading) return;
|
|
260
|
+
this.designerLoading = true;
|
|
261
|
+
const loading = this.$loading({
|
|
262
|
+
lock: true,
|
|
263
|
+
text: this.$t1("表单设计器加载中..."),
|
|
264
|
+
background: "rgba(255, 255, 255, 0.65)"
|
|
265
|
+
});
|
|
266
|
+
try {
|
|
267
|
+
await loadDesigner();
|
|
268
|
+
this.formCode = row.formCode;
|
|
269
|
+
this.showDesingerDialog = true;
|
|
270
|
+
} catch (error) {
|
|
271
|
+
console.error("[form-template] 表单设计器加载失败:", error);
|
|
272
|
+
this.$message.error(getChunkLoadErrorMessage(error, "表单设计器"));
|
|
273
|
+
} finally {
|
|
274
|
+
loading.close();
|
|
275
|
+
this.designerLoading = false;
|
|
276
|
+
}
|
|
257
277
|
},
|
|
258
278
|
closeFormDesignwinEvent(done) {
|
|
259
279
|
this.$baseConfirm('请确认"已保存"报表模板,是否继续关闭?').then(() => {
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script>
|
|
44
|
-
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
44
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
45
|
+
import { getChunkLoadErrorMessage } from "@base/utils/chunkLoadError";
|
|
45
46
|
export default {
|
|
46
47
|
name: "wfContentDialog",
|
|
47
48
|
props: {
|
|
@@ -56,8 +57,9 @@ export default {
|
|
|
56
57
|
param: {},
|
|
57
58
|
wfContent: null,
|
|
58
59
|
remoteView: null,
|
|
59
|
-
showWfContent: false,
|
|
60
|
-
showWfDialog: true,
|
|
60
|
+
showWfContent: false,
|
|
61
|
+
showWfDialog: true,
|
|
62
|
+
contentLoading: false,
|
|
61
63
|
};
|
|
62
64
|
},
|
|
63
65
|
created() {
|
|
@@ -89,43 +91,66 @@ export default {
|
|
|
89
91
|
this.$emit("close");
|
|
90
92
|
},
|
|
91
93
|
// 异步:await 之后才置 showWfContent(见方法末尾),否则弹窗先开出空壳
|
|
92
|
-
async openWfDialog() {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
94
|
+
async openWfDialog() {
|
|
95
|
+
if (this.contentLoading) return;
|
|
96
|
+
this.contentLoading = true;
|
|
97
|
+
this.showWfContent = false;
|
|
98
|
+
this.wfContent = null;
|
|
99
|
+
this.remoteView = null;
|
|
100
|
+
const loading = this.$loading({
|
|
101
|
+
lock: true,
|
|
102
|
+
text: this.$t1("待办详情加载中..."),
|
|
103
|
+
background: "rgba(255, 255, 255, 0.65)"
|
|
104
|
+
});
|
|
105
|
+
try {
|
|
106
|
+
let id = this.option.objId;
|
|
107
|
+
let wfDataId = !id || typeof id == "object" ? 0 : Number(id);
|
|
108
|
+
let param = this.option.param || {};
|
|
109
|
+
if (this.option.url == "form") {
|
|
110
|
+
let formCode = null;
|
|
111
|
+
if (this.option.formCode) {
|
|
112
|
+
formCode = this.option.formCode;
|
|
113
|
+
} else {
|
|
114
|
+
formCode = this.option.objTypeCode.substr(9);
|
|
115
|
+
}
|
|
116
|
+
this.param = Object.assign(param, {
|
|
117
|
+
formCode: formCode,
|
|
118
|
+
dataId: wfDataId,
|
|
119
|
+
});
|
|
120
|
+
// 路径是常量,用字面量 import:生成普通 ImportDependency,不参与 views context
|
|
121
|
+
this.wfContent = (
|
|
122
|
+
await import("@base/views/user/form/vform/render.vue")
|
|
123
|
+
).default;
|
|
124
|
+
} else {
|
|
125
|
+
this.param = Object.assign(param, {
|
|
126
|
+
_dataId: wfDataId,
|
|
127
|
+
});
|
|
128
|
+
let url = this.option.url + ".vue";
|
|
129
|
+
const res = await loadViewComponentAsync(url);
|
|
130
|
+
if (res.error) throw res.error;
|
|
131
|
+
this.remoteView =
|
|
132
|
+
res.kind === "remote"
|
|
133
|
+
? {
|
|
134
|
+
owner: res.owner,
|
|
135
|
+
targetPath: res.targetPath,
|
|
136
|
+
bizParams: this.param,
|
|
137
|
+
viewMeta: { visibleKey: "showWfContent", defaultShowWfContent: true, viewType: 1 },
|
|
138
|
+
}
|
|
139
|
+
: null;
|
|
140
|
+
this.wfContent = res.component;
|
|
141
|
+
if (!this.wfContent && !this.remoteView) {
|
|
142
|
+
throw new Error("待办详情组件不存在或未正确配置");
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
this.showWfContent = true;
|
|
146
|
+
} catch (error) {
|
|
147
|
+
console.error("[wf-content-dialog] 待办详情加载失败:", error);
|
|
148
|
+
this.$message.error(getChunkLoadErrorMessage(error, "待办详情"));
|
|
149
|
+
this.wfClose();
|
|
150
|
+
} finally {
|
|
151
|
+
loading.close();
|
|
152
|
+
this.contentLoading = false;
|
|
153
|
+
}
|
|
129
154
|
},
|
|
130
155
|
},
|
|
131
156
|
};
|