cloud-web-corejs 1.0.54-dev.391 → 1.0.54-dev.392
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
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
:data="fieldTreeData"
|
|
63
63
|
:filter-node-method="filterNode"
|
|
64
64
|
@node-click="insertField"
|
|
65
|
+
default-expand-all
|
|
65
66
|
>
|
|
66
67
|
<template #default="{ node, data }">
|
|
67
68
|
<span class="custom-tree-node">
|
|
@@ -292,15 +293,6 @@ export default {
|
|
|
292
293
|
handleTableConfigData(widget, callback) {
|
|
293
294
|
callback(widget);
|
|
294
295
|
},
|
|
295
|
-
initFields() {
|
|
296
|
-
let option = this.option;
|
|
297
|
-
let formCode = option.formCode;
|
|
298
|
-
if (formCode) {
|
|
299
|
-
this.getReportTemplate(formCode, () => {
|
|
300
|
-
this.loadFieldListToTree();
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
296
|
initHandleFields() {
|
|
305
297
|
let option = this.option;
|
|
306
298
|
let formWidgetNames = option.formWidgetNames || [];
|
|
@@ -353,11 +345,11 @@ export default {
|
|
|
353
345
|
}
|
|
354
346
|
});
|
|
355
347
|
},
|
|
356
|
-
|
|
348
|
+
getReportTemplate(formCode, callback) {
|
|
357
349
|
let url, data;
|
|
358
350
|
url = USER_PREFIX + `/formTemplate/getByFormCode`;
|
|
359
351
|
data = { stringOne: formCode };
|
|
360
|
-
|
|
352
|
+
return this.$http({
|
|
361
353
|
// aes: true,
|
|
362
354
|
url: url,
|
|
363
355
|
method: `post`,
|
|
@@ -365,7 +357,7 @@ export default {
|
|
|
365
357
|
isLoading: true,
|
|
366
358
|
// loadingTarget: document.body,
|
|
367
359
|
// modalStrictly: true,
|
|
368
|
-
success:
|
|
360
|
+
success: (res) => {
|
|
369
361
|
let formTemplate = res.objx || {};
|
|
370
362
|
this.targetFormTemplate = formTemplate;
|
|
371
363
|
this.targetFormJson = formTemplate.formViewContent
|
|
@@ -616,30 +608,37 @@ export default {
|
|
|
616
608
|
|
|
617
609
|
// 打开编辑公式弹窗
|
|
618
610
|
editFormula() {
|
|
611
|
+
this.formula = this.option.formula ?? null;
|
|
619
612
|
this.fieldTreeData.length = 0;
|
|
620
613
|
// 初始化字段树
|
|
621
614
|
|
|
622
615
|
// this.loadFieldListToTree();
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
616
|
+
|
|
617
|
+
let option = this.option;
|
|
618
|
+
let formCode = option.formCode;
|
|
619
|
+
if (formCode) {
|
|
620
|
+
this.getReportTemplate(formCode, () => {
|
|
621
|
+
this.loadFieldListToTree();
|
|
622
|
+
console.log("设计器字段===>", this.fieldTreeData);
|
|
623
|
+
|
|
624
|
+
// 加载当前字段计算公式tags
|
|
625
|
+
this.refreshFormula();
|
|
626
|
+
const code = this.formula;
|
|
627
|
+
this.formulaDialogVisible = true;
|
|
628
|
+
|
|
629
|
+
//==== codeMirror 挂载视图 ====
|
|
630
|
+
this.$nextTick(() => {
|
|
631
|
+
this.codeMirror = new EditorView({
|
|
632
|
+
state: EditorState.create({
|
|
633
|
+
doc: code,
|
|
634
|
+
extensions: [basicSetup, javascript(), [baseTheme, [], placeholders]],
|
|
635
|
+
}),
|
|
636
|
+
parent: this.$refs.cmRef,
|
|
637
|
+
});
|
|
638
|
+
console.log("编辑器实例==>", this.codeMirror);
|
|
639
|
+
});
|
|
640
640
|
});
|
|
641
|
-
|
|
642
|
-
});
|
|
641
|
+
}
|
|
643
642
|
},
|
|
644
643
|
|
|
645
644
|
// 保存计算公式
|