cloud-web-corejs-haier 1.0.3 → 1.0.4
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 +2 -1
- package/src/components/table/index.js +1 -1
- package/src/components/table/vxeFilter/mixin.js +1 -1
- package/src/components/vb-tabs/x-tabs.vue +30 -13
- package/src/components/xform/form-designer/designer.js +1 -1
- package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +419 -0
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +71 -50
- package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +8 -10
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +102 -73
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +19 -1
- package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +40 -28
- package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +13 -2
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +9 -2
- package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +133 -0
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +2 -1
- package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +962 -0
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +19 -10
- package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +15 -6
- package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
- package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +7 -0
- package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +44 -27
- package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +19 -11
- package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +19 -1
- package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +11 -7
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +11 -8
- package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +41 -13
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +106 -76
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +13 -263
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +47 -81
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +31 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +54 -23
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +8 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +37 -16
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +42 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +5 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +57 -34
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +84 -53
- package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +35 -44
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +77 -3
- package/src/components/xform/form-render/container-item/containerItemMixin.js +2 -2
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
- package/src/components/xform/form-render/container-item/tab-item.vue +64 -32
- package/src/components/xform/form-render/container-item/tree-item.vue +32 -11
- package/src/components/xform/form-render/index.vue +69 -23
- package/src/components/xform/form-render/indexMixin.js +18 -17
- package/src/components/xform/lang/zh-CN.js +8 -2
- package/src/components/xform/mixins/scriptHttp.js +1 -1
- package/src/components/xform/utils/formula-util.js +306 -5
- package/src/components/xform/utils/util.js +1 -1
- package/src/components/xform/utils/vue2js-generator.js +2 -2
- package/src/mixins/selectDialog/index.js +1 -1
- package/src/store/getters.js +23 -23
- package/src/store/modules/user.js +30 -30
- package/src/utils/request.js +1 -1
- package/src/utils/vab.js +1 -1
- package/src/views/user/form/vform/render.vue +54 -36
- package/src/views/user/form/view/list.vue +126 -11
- package/src/views/user/outLink/form_view.vue +4 -4
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
<div
|
|
4
|
+
class="designer-view"
|
|
5
|
+
:class="[
|
|
6
|
+
layoutType === 'H5' ? 'h5-layout' : layoutType === 'Pad' ? 'pad-layout' : '',
|
|
7
|
+
]"
|
|
8
|
+
>
|
|
9
|
+
<v-form-render
|
|
10
|
+
:form-json.sync="formJson"
|
|
11
|
+
:form-data="formData"
|
|
12
|
+
:option-data="optionData"
|
|
13
|
+
ref="vFormRef"
|
|
14
|
+
:reportTemplate.sync="formTemplate"
|
|
15
|
+
:conditionParam.sync="conditionParam"
|
|
16
|
+
:formInsData.sync="formInsData"
|
|
17
|
+
v-if="showRender"
|
|
18
|
+
visible-key="showRender"
|
|
19
|
+
:visiable.sync="showRender"
|
|
20
|
+
:parent-target="_self"
|
|
21
|
+
@reload="$baseReload()"
|
|
22
|
+
:dataId.sync="dataId"
|
|
23
|
+
:param="param"
|
|
24
|
+
v-bind="$attrs"
|
|
25
|
+
@openCopyEditTab="openCopyEditTab"
|
|
26
|
+
/>
|
|
9
27
|
</div>
|
|
10
28
|
</div>
|
|
11
|
-
|
|
12
29
|
</template>
|
|
13
30
|
<script>
|
|
14
|
-
import {loadExtension} from
|
|
31
|
+
import { loadExtension } from "@base/components/xform/extension/extension-loader";
|
|
15
32
|
|
|
16
|
-
loadExtension()
|
|
17
|
-
import VFormRender from
|
|
33
|
+
loadExtension();
|
|
34
|
+
import VFormRender from "@base/components/xform/form-render/index.vue";
|
|
18
35
|
import scriptHttpMixin from "@base/components/xform/mixins/scriptHttp";
|
|
19
36
|
|
|
20
|
-
|
|
21
37
|
export default {
|
|
22
|
-
name:
|
|
38
|
+
name: "vform_render",
|
|
23
39
|
mixins: [scriptHttpMixin],
|
|
24
40
|
components: {
|
|
25
|
-
VFormRender
|
|
41
|
+
VFormRender,
|
|
26
42
|
},
|
|
27
|
-
props: [
|
|
43
|
+
props: ["object_foreign_id", "dataId", "param"],
|
|
28
44
|
data() {
|
|
29
45
|
return {
|
|
30
46
|
formJson: {},
|
|
@@ -35,7 +51,7 @@ export default {
|
|
|
35
51
|
formCode: null,
|
|
36
52
|
layoutType: null,
|
|
37
53
|
conditionParam: null,
|
|
38
|
-
formInsData: null
|
|
54
|
+
formInsData: null,
|
|
39
55
|
};
|
|
40
56
|
},
|
|
41
57
|
created() {
|
|
@@ -47,7 +63,7 @@ export default {
|
|
|
47
63
|
let code = this.$attrs.formCode;
|
|
48
64
|
if (!code) {
|
|
49
65
|
var hash = window.location.hash;
|
|
50
|
-
let str =
|
|
66
|
+
let str = "#/report/xform/render/";
|
|
51
67
|
if (hash.indexOf(str) == 0) {
|
|
52
68
|
code = hash.slice(str.length);
|
|
53
69
|
}
|
|
@@ -61,12 +77,12 @@ export default {
|
|
|
61
77
|
let param = {
|
|
62
78
|
objTypeCode: this.$attrs.objTypeCode,
|
|
63
79
|
objId: this.$attrs.objId,
|
|
64
|
-
taskId: this.$attrs.taskId
|
|
80
|
+
taskId: this.$attrs.taskId,
|
|
65
81
|
};
|
|
66
82
|
this.conditionParam = param;
|
|
67
83
|
let url, data;
|
|
68
84
|
url = USER_PREFIX + `/formTemplate/getByFormCode`;
|
|
69
|
-
data = {stringOne: this.formCode};
|
|
85
|
+
data = { stringOne: this.formCode };
|
|
70
86
|
this.$http({
|
|
71
87
|
aes: true,
|
|
72
88
|
url: url,
|
|
@@ -75,26 +91,28 @@ export default {
|
|
|
75
91
|
// isLoading: true,
|
|
76
92
|
// loadingTarget: document.body,
|
|
77
93
|
// modalStrictly: true,
|
|
78
|
-
success: async res => {
|
|
94
|
+
success: async (res) => {
|
|
79
95
|
let formTemplate = res.objx || {};
|
|
80
96
|
this.formTemplate = formTemplate;
|
|
81
|
-
this.formJson = formTemplate.formViewContent
|
|
82
|
-
|
|
97
|
+
this.formJson = formTemplate.formViewContent
|
|
98
|
+
? JSON.parse(formTemplate.formViewContent)
|
|
99
|
+
: {};
|
|
100
|
+
this.layoutType = this.formJson.formConfig.layoutType;
|
|
83
101
|
this.getFormInsData2();
|
|
84
|
-
}
|
|
102
|
+
},
|
|
85
103
|
});
|
|
86
104
|
},
|
|
87
105
|
getReqParam(item, dataId, billData) {
|
|
88
106
|
let param = {};
|
|
89
107
|
if (item.accessParam) {
|
|
90
108
|
if (typeof item.accessParam === "string") {
|
|
91
|
-
let n = new Function(
|
|
109
|
+
let n = new Function("billData", item.accessParam);
|
|
92
110
|
param = n.call(this, billData);
|
|
93
111
|
} else {
|
|
94
|
-
param = item.accessParam
|
|
112
|
+
param = item.accessParam;
|
|
95
113
|
}
|
|
96
114
|
} else {
|
|
97
|
-
param = {id: dataId}
|
|
115
|
+
param = { id: dataId };
|
|
98
116
|
}
|
|
99
117
|
return param;
|
|
100
118
|
},
|
|
@@ -103,13 +121,13 @@ export default {
|
|
|
103
121
|
let formConfig = this.formJson.formConfig;
|
|
104
122
|
let dataId = this.dataId;
|
|
105
123
|
if (formConfig.onBeforeCreated) {
|
|
106
|
-
let n = new Function(
|
|
124
|
+
let n = new Function("dataId", "formCode", "done", formConfig.onBeforeCreated);
|
|
107
125
|
let toDo = function (res) {
|
|
108
126
|
let formData = res && res.objx ? res.objx : {};
|
|
109
127
|
that.formData = formData;
|
|
110
128
|
that.formInsData = formData;
|
|
111
129
|
that.showRender = true;
|
|
112
|
-
}
|
|
130
|
+
};
|
|
113
131
|
n.call(this, dataId, this.formCode, toDo);
|
|
114
132
|
} else {
|
|
115
133
|
this.formData = this.$attrs.formData ?? {};
|
|
@@ -121,25 +139,25 @@ export default {
|
|
|
121
139
|
let getConfig = formConfig.getConfig || {};
|
|
122
140
|
let dataId = this.dataId;
|
|
123
141
|
if (dataId) {
|
|
124
|
-
let reqParam = {id: dataId};
|
|
125
|
-
let accessParamArguments = [{name: "id", value: dataId}]
|
|
142
|
+
let reqParam = { id: dataId };
|
|
143
|
+
let accessParamArguments = [{ name: "id", value: dataId }];
|
|
126
144
|
this.scriptHttp({
|
|
127
145
|
options: getConfig,
|
|
128
146
|
params: reqParam,
|
|
129
147
|
targetFormTemplate: this.formTemplate,
|
|
130
148
|
accessParamArguments: accessParamArguments,
|
|
131
|
-
success: res => {
|
|
149
|
+
success: (res) => {
|
|
132
150
|
let formData = res.objx || {};
|
|
133
151
|
this.formData = formData;
|
|
134
152
|
this.formInsData = res.objx;
|
|
135
153
|
this.showRender = true;
|
|
136
|
-
}
|
|
137
|
-
})
|
|
154
|
+
},
|
|
155
|
+
});
|
|
138
156
|
}
|
|
139
157
|
},
|
|
140
|
-
openCopyEditTab(formData){
|
|
141
|
-
this.$emit("openCopyEditTab",formData)
|
|
142
|
-
}
|
|
143
|
-
}
|
|
158
|
+
openCopyEditTab(formData) {
|
|
159
|
+
this.$emit("openCopyEditTab", formData);
|
|
160
|
+
},
|
|
161
|
+
},
|
|
144
162
|
};
|
|
145
163
|
</script>
|
|
@@ -1,42 +1,70 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="containt">
|
|
3
3
|
<template v-if="layoutType == 'PC'">
|
|
4
|
-
<x-tabs ref="xTabs" v-model="activeName" class="tab-box">
|
|
4
|
+
<x-tabs ref="xTabs" v-model="activeName" class="tab-box" :tabNameEnable="true">
|
|
5
5
|
<el-tab-pane :label="$t2('常规')" name="first">
|
|
6
6
|
<vFormRender
|
|
7
|
+
ref="edit"
|
|
7
8
|
:formCode.sync="formCode1"
|
|
8
9
|
:dataId.sync="dataId"
|
|
9
10
|
:param="param"
|
|
10
11
|
:formData="formData"
|
|
11
12
|
v-if="showEdit"
|
|
12
13
|
visible-key="showEdit"
|
|
14
|
+
:visiable.sync="showEdit"
|
|
13
15
|
:parent-target="_self"
|
|
14
16
|
@reload="reload"
|
|
15
17
|
@openCopyEditTab="openCopyEditTab"
|
|
16
18
|
></vFormRender>
|
|
17
19
|
</el-tab-pane>
|
|
18
|
-
<el-tab-pane :label="$t2('列表')" name="second">
|
|
20
|
+
<el-tab-pane :label="$t2(formConfig.customListTabLabel || '列表')" name="second">
|
|
19
21
|
<div class="grid-height">
|
|
20
22
|
<vFormRender
|
|
23
|
+
ref="list"
|
|
21
24
|
:formCode="formCode"
|
|
22
25
|
style="height: 100%"
|
|
23
26
|
v-if="showRender"
|
|
24
27
|
visible-key="showRender"
|
|
28
|
+
:visiable.sync="showRender"
|
|
25
29
|
:parent-target="_self"
|
|
26
30
|
@reload="$reloadHandle"
|
|
27
31
|
:openEditDialog="openEditDialog"
|
|
28
32
|
></vFormRender>
|
|
29
33
|
</div>
|
|
30
34
|
</el-tab-pane>
|
|
35
|
+
<el-tab-pane
|
|
36
|
+
v-for="(item, index) in otherTabList"
|
|
37
|
+
:key="index"
|
|
38
|
+
:label="$t2(item.label)"
|
|
39
|
+
:name="`otherTab${index}`"
|
|
40
|
+
>
|
|
41
|
+
<div class="grid-height">
|
|
42
|
+
<vFormRender
|
|
43
|
+
:ref="`list${index}`"
|
|
44
|
+
:formCode.sync="item.formCode"
|
|
45
|
+
:dataId.sync="item.dataId"
|
|
46
|
+
:param="item.param"
|
|
47
|
+
v-if="item.showContent"
|
|
48
|
+
:parent-target="_self"
|
|
49
|
+
@reload="
|
|
50
|
+
(...args) => {
|
|
51
|
+
reloadAutoContent(...args);
|
|
52
|
+
}
|
|
53
|
+
"
|
|
54
|
+
:openEditDialog="openEditDialog1"
|
|
55
|
+
></vFormRender>
|
|
56
|
+
</div>
|
|
57
|
+
</el-tab-pane>
|
|
31
58
|
<template #editTab="{ tab, index, reloadTabContent }">
|
|
32
59
|
<el-tab-pane
|
|
33
|
-
:key="tab.
|
|
34
|
-
:label="tab.data[
|
|
35
|
-
:name="tab.
|
|
60
|
+
:key="tab.tabName"
|
|
61
|
+
:label="tab.data[tab.tabLabelField]"
|
|
62
|
+
:name="tab.tabName"
|
|
36
63
|
:closable="true"
|
|
37
64
|
>
|
|
38
65
|
<vFormRender
|
|
39
|
-
|
|
66
|
+
ref="multiEdit"
|
|
67
|
+
:formCode.sync="tab.formCode"
|
|
40
68
|
:dataId.sync="tab.dataId"
|
|
41
69
|
:param="tab.param"
|
|
42
70
|
v-if="tab.showContent"
|
|
@@ -103,8 +131,7 @@ export default {
|
|
|
103
131
|
return {
|
|
104
132
|
activeName: "second",
|
|
105
133
|
showEdit: false,
|
|
106
|
-
|
|
107
|
-
formJson: {},
|
|
134
|
+
formJson: { formConfig: {} },
|
|
108
135
|
formConfig: {},
|
|
109
136
|
showRender: false,
|
|
110
137
|
formTemplate: null,
|
|
@@ -119,12 +146,30 @@ export default {
|
|
|
119
146
|
param: {},
|
|
120
147
|
multiTabLabelField: null,
|
|
121
148
|
formData: null,
|
|
149
|
+
otherTabList: [],
|
|
122
150
|
};
|
|
123
151
|
},
|
|
152
|
+
watch: {
|
|
153
|
+
activeName(val) {
|
|
154
|
+
if (
|
|
155
|
+
this.formJson.formConfig.otherTabEnabled &&
|
|
156
|
+
this.otherTabList.length > 0 &&
|
|
157
|
+
val.startsWith("otherTab")
|
|
158
|
+
) {
|
|
159
|
+
let num = Number(val.substring("otherTab".length));
|
|
160
|
+
this.otherTabList[num].showContent = true;
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
},
|
|
124
164
|
created() {
|
|
125
165
|
this.initParam();
|
|
126
166
|
this.getReportTemplate();
|
|
127
167
|
},
|
|
168
|
+
provide() {
|
|
169
|
+
return {
|
|
170
|
+
_self: this,
|
|
171
|
+
};
|
|
172
|
+
},
|
|
128
173
|
methods: {
|
|
129
174
|
initParam() {
|
|
130
175
|
let path = this.$route.path;
|
|
@@ -135,7 +180,7 @@ export default {
|
|
|
135
180
|
},
|
|
136
181
|
getReportTemplate() {
|
|
137
182
|
this.$http({
|
|
138
|
-
aes: true,
|
|
183
|
+
// aes: true,
|
|
139
184
|
url: USER_PREFIX + `/formTemplate/getByFormCode`,
|
|
140
185
|
method: `post`,
|
|
141
186
|
data: { stringOne: this.formCode },
|
|
@@ -149,6 +194,7 @@ export default {
|
|
|
149
194
|
? JSON.parse(formTemplate.formViewContent)
|
|
150
195
|
: {};
|
|
151
196
|
this.formJson = formJson;
|
|
197
|
+
this.formConfig = formJson.formConfig || {};
|
|
152
198
|
this.layoutType = formJson.formConfig?.layoutType;
|
|
153
199
|
let addFormCode = formJson.formConfig?.addFormCode ?? null;
|
|
154
200
|
let formCode2 = formJson.formConfig?.editFormCode ?? null;
|
|
@@ -158,16 +204,48 @@ export default {
|
|
|
158
204
|
}
|
|
159
205
|
this.addFormCode = addFormCode;
|
|
160
206
|
this.multiTabLabelField = formJson.formConfig?.multiTabLabelField;
|
|
207
|
+
this.initOtherTabList();
|
|
161
208
|
},
|
|
162
209
|
});
|
|
163
210
|
},
|
|
211
|
+
openOtherTab(row, param, option) {
|
|
212
|
+
let dataId = row && row.id ? row.id : null;
|
|
213
|
+
let formCode = option.formCode;
|
|
214
|
+
let otherTab = this.otherTabList.find((item) => item.formCode == formCode);
|
|
215
|
+
let otherTabIndex = this.otherTabList.findIndex(
|
|
216
|
+
(item) => item.formCode == formCode
|
|
217
|
+
);
|
|
218
|
+
this.activeName = `otherTab${otherTabIndex}`;
|
|
219
|
+
|
|
220
|
+
otherTab.dataId = dataId;
|
|
221
|
+
otherTab.param = param;
|
|
222
|
+
this.$nextTick(() => {
|
|
223
|
+
otherTab.showContent = false;
|
|
224
|
+
this.$nextTick(() => {
|
|
225
|
+
otherTab.showContent = true;
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
},
|
|
164
229
|
openEditDialog(row, param, option) {
|
|
230
|
+
if (option?.otherTab) {
|
|
231
|
+
this.openOtherTab(row, param, option);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
165
234
|
if (this.layoutType == "H5") {
|
|
166
235
|
this.openEditH5Dialog(row);
|
|
167
236
|
return;
|
|
168
237
|
}
|
|
169
238
|
let formConfig = this.formJson.formConfig;
|
|
170
|
-
let
|
|
239
|
+
let tabLabelField = option?.multiTabLabelField || formConfig.multiTabLabelField;
|
|
240
|
+
let multiTabEnabled = false;
|
|
241
|
+
if (tabLabelField) {
|
|
242
|
+
if (option?.multiTabEnabled) {
|
|
243
|
+
multiTabEnabled = true;
|
|
244
|
+
} else if (formConfig.multiTabEnabled && option?.multiTabEnabled !== false) {
|
|
245
|
+
multiTabEnabled = true;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
171
249
|
let dataId = row && row.id ? row.id : null;
|
|
172
250
|
this.dataId = dataId;
|
|
173
251
|
let formCode = null;
|
|
@@ -180,11 +258,13 @@ export default {
|
|
|
180
258
|
this.$refs.xTabs.openEditTab(row, param, {
|
|
181
259
|
tabParam: {
|
|
182
260
|
formCode,
|
|
261
|
+
tabLabelField,
|
|
262
|
+
tabName: formCode + dataId,
|
|
183
263
|
},
|
|
184
264
|
});
|
|
185
265
|
} else {
|
|
186
266
|
this.formCode1 = formCode;
|
|
187
|
-
this.activeName = "first";
|
|
267
|
+
this.activeName = option.activeName || "first";
|
|
188
268
|
this.showEdit = false;
|
|
189
269
|
this.showEditDialog = true;
|
|
190
270
|
this.param = param;
|
|
@@ -192,6 +272,9 @@ export default {
|
|
|
192
272
|
this.$openEditView("showEdit");
|
|
193
273
|
}
|
|
194
274
|
},
|
|
275
|
+
openEditDialog1(row, param, option) {
|
|
276
|
+
this.openEditDialog(row, param, { multiTabEnabled: false, ...option });
|
|
277
|
+
},
|
|
195
278
|
openEditH5Dialog(row) {
|
|
196
279
|
this.formCode1 = this.addFormCode;
|
|
197
280
|
this.dataId = row && row.id ? row.id : null;
|
|
@@ -221,6 +304,38 @@ export default {
|
|
|
221
304
|
this.formData = {};
|
|
222
305
|
this.$reloadHandle(...arguments);
|
|
223
306
|
},
|
|
307
|
+
initOtherTabList() {
|
|
308
|
+
if (!this.formJson.formConfig.otherTabEnabled) return;
|
|
309
|
+
this.otherTabList = this.formJson.formConfig.otherTabList
|
|
310
|
+
.filter((item) => !!item.formCode && !!item.label)
|
|
311
|
+
.map((item) => {
|
|
312
|
+
return {
|
|
313
|
+
label: item.label,
|
|
314
|
+
formCode: item.formCode,
|
|
315
|
+
showContent: false,
|
|
316
|
+
dataId: null,
|
|
317
|
+
param: null,
|
|
318
|
+
};
|
|
319
|
+
});
|
|
320
|
+
},
|
|
321
|
+
reloadAutoContent(target, param, tab) {
|
|
322
|
+
let updateParam =
|
|
323
|
+
param != null && param.updateParam != null ? param.updateParam : {};
|
|
324
|
+
for (let key in updateParam) {
|
|
325
|
+
target.$emit("update:" + key, updateParam[key]);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (!tab) {
|
|
329
|
+
let activeName = this.activeName;
|
|
330
|
+
tab = this.tabs.find((item) => item.label == activeName);
|
|
331
|
+
}
|
|
332
|
+
if (tab) {
|
|
333
|
+
tab.showContent = false;
|
|
334
|
+
setTimeout(() => {
|
|
335
|
+
tab.showContent = true;
|
|
336
|
+
}, 200);
|
|
337
|
+
}
|
|
338
|
+
},
|
|
224
339
|
},
|
|
225
340
|
};
|
|
226
341
|
</script>
|
|
@@ -100,8 +100,8 @@ export default {
|
|
|
100
100
|
'/user/form/view/list.vue',
|
|
101
101
|
'/user/form/view/edit.vue'
|
|
102
102
|
]
|
|
103
|
-
this.initUserInfo(() => {
|
|
104
|
-
this.initI18n();
|
|
103
|
+
this.initUserInfo(async () => {
|
|
104
|
+
await this.initI18n();
|
|
105
105
|
if (urlArr.includes(url)) {
|
|
106
106
|
this.wfContent = require('@base/views' + url).default;
|
|
107
107
|
} else if (url.startsWith(t)) {
|
|
@@ -123,11 +123,11 @@ export default {
|
|
|
123
123
|
let i18nLang = this.$route.query.i18nLang || "zh";
|
|
124
124
|
return i18nLang;
|
|
125
125
|
},
|
|
126
|
-
|
|
126
|
+
initI18n() {
|
|
127
127
|
let lang = this.getI18nLang();
|
|
128
128
|
this.$i18n.locale = lang // 设置给本地的i18n插件
|
|
129
129
|
localStorage.setItem("i18n-lang", lang);
|
|
130
|
-
|
|
130
|
+
return indexUtil.initI18nMessage("business", lang, true);
|
|
131
131
|
},
|
|
132
132
|
login() {
|
|
133
133
|
let token = this.$route.query.access_token;
|