cloud-web-corejs 1.0.54-dev.695 → 1.0.54-dev.697
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/jsonImport/exportUtil.js +230 -0
- package/src/components/jsonImport/index.js +42 -15
- package/src/components/wf/wf.js +4 -1
- package/src/components/wf/wfUtil.js +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/save_submit_wf_button-widget.vue +112 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +39 -0
- package/src/components/xform/form-render/indexMixin.js +17 -2
- package/src/components/xform/lang/zh-CN.js +1 -0
- package/src/components/xform/mixins/defaultHandle.js +41 -0
- package/src/layout/components/Sidebar/default.vue +107 -58
- package/src/views/bd/setting/form_script/mixins/list.js +0 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +0 -1
- package/src/views/bd/setting/form_template/mixins/list.js +0 -1
- package/src/views/bd/setting/table_model/mixins/list.js +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
function isNull(val) {
|
|
2
|
+
return val == null || val === "" || val === undefined;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function formatJsonContent(content) {
|
|
6
|
+
if (isNull(content)) return "";
|
|
7
|
+
if (typeof content === "object") {
|
|
8
|
+
try {
|
|
9
|
+
return JSON.stringify(content, null, 2);
|
|
10
|
+
} catch (e) {
|
|
11
|
+
return String(content);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const text = String(content).trim();
|
|
15
|
+
if (!text) return "";
|
|
16
|
+
try {
|
|
17
|
+
return JSON.stringify(JSON.parse(text), null, 2);
|
|
18
|
+
} catch (e) {
|
|
19
|
+
return text;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function parseExportContent(content) {
|
|
24
|
+
if (!content) {
|
|
25
|
+
return { list: [], isArray: true };
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
const parsed = JSON.parse(content);
|
|
29
|
+
if (Array.isArray(parsed)) {
|
|
30
|
+
return { list: parsed, isArray: true };
|
|
31
|
+
}
|
|
32
|
+
return { list: [parsed], isArray: false };
|
|
33
|
+
} catch (e) {
|
|
34
|
+
return { list: [], isArray: true, invalid: true };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function uniqueFileName(fileName, usedNames) {
|
|
39
|
+
if (!usedNames[fileName]) {
|
|
40
|
+
usedNames[fileName] = 1;
|
|
41
|
+
return fileName;
|
|
42
|
+
}
|
|
43
|
+
usedNames[fileName] += 1;
|
|
44
|
+
return `${fileName}_${usedNames[fileName]}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const EXPORT_ARCHIVE_TYPES = {
|
|
48
|
+
FORM_SCRIPT: "formScript",
|
|
49
|
+
FORM_TEMPLATE: "formTemplate",
|
|
50
|
+
TABLE: "table",
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export function getExportArchiveType(url) {
|
|
54
|
+
if (!url) return null;
|
|
55
|
+
if (url.includes("/form_develop/exportFormScript")) {
|
|
56
|
+
return EXPORT_ARCHIVE_TYPES.FORM_SCRIPT;
|
|
57
|
+
}
|
|
58
|
+
if (url.includes("/form_develop/exportFormTemplate")) {
|
|
59
|
+
return EXPORT_ARCHIVE_TYPES.FORM_TEMPLATE;
|
|
60
|
+
}
|
|
61
|
+
if (url.includes("/form_develop/exportSzTaMb")) {
|
|
62
|
+
return EXPORT_ARCHIVE_TYPES.TABLE;
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function getFormScriptArchivePrefix(item) {
|
|
68
|
+
const scriptCode = item.scriptCode || "script";
|
|
69
|
+
const formCode = item.formCode;
|
|
70
|
+
return formCode ? `S-${scriptCode}-${formCode}` : `S-${scriptCode}`;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function processFormScriptArchiveItem(item) {
|
|
74
|
+
const prefix = getFormScriptArchivePrefix(item);
|
|
75
|
+
const extraFiles = [];
|
|
76
|
+
|
|
77
|
+
if (!isNull(item.script)) {
|
|
78
|
+
const formatted = formatJsonContent(item.script);
|
|
79
|
+
item.script = formatted;
|
|
80
|
+
extraFiles.push({
|
|
81
|
+
fileName: `${prefix}-Item`,
|
|
82
|
+
content: formatted,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
mainContent: JSON.stringify(item, null, 2),
|
|
88
|
+
mainFileName: `${prefix}-Source`,
|
|
89
|
+
extraFiles,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function processFormTemplateArchiveItem(item) {
|
|
94
|
+
const formCode = item.formCode || "form";
|
|
95
|
+
const extraFiles = [];
|
|
96
|
+
const usedNames = {};
|
|
97
|
+
|
|
98
|
+
if (!isNull(item.formViewContent)) {
|
|
99
|
+
const formatted = formatJsonContent(item.formViewContent);
|
|
100
|
+
item.formViewContent = formatted;
|
|
101
|
+
extraFiles.push({
|
|
102
|
+
fileName: uniqueFileName(`F-${formCode}-Item`, usedNames),
|
|
103
|
+
content: formatted,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const formScriptDTOs = item.formScriptDTOs || [];
|
|
108
|
+
formScriptDTOs.forEach((scriptItem) => {
|
|
109
|
+
if (!scriptItem || isNull(scriptItem.script)) return;
|
|
110
|
+
const scriptCode = scriptItem.scriptCode || "script";
|
|
111
|
+
const scriptFormCode = scriptItem.formCode || formCode;
|
|
112
|
+
const formatted = formatJsonContent(scriptItem.script);
|
|
113
|
+
scriptItem.script = formatted;
|
|
114
|
+
extraFiles.push({
|
|
115
|
+
fileName: uniqueFileName(
|
|
116
|
+
`FS-${scriptCode}-${scriptFormCode}-Item`,
|
|
117
|
+
usedNames
|
|
118
|
+
),
|
|
119
|
+
content: formatted,
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
mainContent: JSON.stringify(item, null, 2),
|
|
125
|
+
mainFileName: `F-${formCode}-Source`,
|
|
126
|
+
extraFiles,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function processTableArchiveItem(item) {
|
|
131
|
+
const taBm = item.taBm || "table";
|
|
132
|
+
return {
|
|
133
|
+
mainContent: JSON.stringify(item, null, 2),
|
|
134
|
+
mainFileName: `T-${taBm}`,
|
|
135
|
+
extraFiles: [],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function processArchiveExport(content, archiveType) {
|
|
140
|
+
const { list, invalid } = parseExportContent(content);
|
|
141
|
+
if (invalid || !list.length) {
|
|
142
|
+
return { mainContent: content, mainFileName: null, extraFiles: [] };
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const item = list[0];
|
|
146
|
+
switch (archiveType) {
|
|
147
|
+
case EXPORT_ARCHIVE_TYPES.FORM_SCRIPT:
|
|
148
|
+
return processFormScriptArchiveItem(item);
|
|
149
|
+
case EXPORT_ARCHIVE_TYPES.FORM_TEMPLATE:
|
|
150
|
+
return processFormTemplateArchiveItem(item);
|
|
151
|
+
case EXPORT_ARCHIVE_TYPES.TABLE:
|
|
152
|
+
return processTableArchiveItem(item);
|
|
153
|
+
default:
|
|
154
|
+
return { mainContent: content, mainFileName: null, extraFiles: [] };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function getExportExtraConfig(url, options = {}) {
|
|
159
|
+
if (options.extraExport) {
|
|
160
|
+
return options.extraExport;
|
|
161
|
+
}
|
|
162
|
+
if (!url) return null;
|
|
163
|
+
if (url.includes("/form_develop/exportFormScript")) {
|
|
164
|
+
return {
|
|
165
|
+
field: "script",
|
|
166
|
+
getExtraFileName(item) {
|
|
167
|
+
const prefix = getFormScriptArchivePrefix(item);
|
|
168
|
+
return `${prefix}-Item`;
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
if (url.includes("/form_develop/exportFormTemplate")) {
|
|
173
|
+
return {
|
|
174
|
+
field: "formViewContent",
|
|
175
|
+
getExtraFileName(item) {
|
|
176
|
+
return `F-${item.formCode || "form"}-Item`;
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function processExportContent(content, extraConfig) {
|
|
184
|
+
if (!extraConfig) {
|
|
185
|
+
return { mainContent: content, extraFiles: [] };
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const { field, getExtraFileName } = extraConfig;
|
|
189
|
+
const { list, isArray, invalid } = parseExportContent(content);
|
|
190
|
+
|
|
191
|
+
if (invalid || !list.length) {
|
|
192
|
+
return { mainContent: content, extraFiles: [] };
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const extraFiles = [];
|
|
196
|
+
const usedNames = {};
|
|
197
|
+
|
|
198
|
+
list.forEach((item, index) => {
|
|
199
|
+
if (!item || isNull(item[field])) return;
|
|
200
|
+
|
|
201
|
+
const formatted = formatJsonContent(item[field]);
|
|
202
|
+
item[field] = formatted;
|
|
203
|
+
|
|
204
|
+
let fileName = getExtraFileName(item, index);
|
|
205
|
+
if (!fileName) return;
|
|
206
|
+
|
|
207
|
+
fileName = uniqueFileName(fileName, usedNames);
|
|
208
|
+
extraFiles.push({ fileName, content: formatted });
|
|
209
|
+
|
|
210
|
+
if (field === "formViewContent" && Array.isArray(item.formScriptDTOs)) {
|
|
211
|
+
item.formScriptDTOs.forEach((scriptItem) => {
|
|
212
|
+
if (!scriptItem || isNull(scriptItem.script)) return;
|
|
213
|
+
const scriptCode = scriptItem.scriptCode || "script";
|
|
214
|
+
const formCode = scriptItem.formCode || item.formCode || "form";
|
|
215
|
+
const scriptFormatted = formatJsonContent(scriptItem.script);
|
|
216
|
+
scriptItem.script = scriptFormatted;
|
|
217
|
+
extraFiles.push({
|
|
218
|
+
fileName: uniqueFileName(
|
|
219
|
+
`FS-${scriptCode}-${formCode}-Item`,
|
|
220
|
+
usedNames
|
|
221
|
+
),
|
|
222
|
+
content: scriptFormatted,
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
const mainContent = JSON.stringify(isArray ? list : list[0], null, 2);
|
|
229
|
+
return { mainContent, extraFiles };
|
|
230
|
+
}
|
|
@@ -4,6 +4,12 @@ import excelImport from "./index.vue";
|
|
|
4
4
|
import exportDialog from "./exportDialog.vue";
|
|
5
5
|
import { getBdEnv } from "@base/api/user";
|
|
6
6
|
import { encrypt, decrypt } from "@base/utils/aes";
|
|
7
|
+
import {
|
|
8
|
+
getExportArchiveType,
|
|
9
|
+
getExportExtraConfig,
|
|
10
|
+
processArchiveExport,
|
|
11
|
+
processExportContent,
|
|
12
|
+
} from "./exportUtil";
|
|
7
13
|
|
|
8
14
|
import { getToken } from "../../utils/auth";
|
|
9
15
|
|
|
@@ -98,23 +104,35 @@ moudule.install = function (Vue) {
|
|
|
98
104
|
let content = res.objx;
|
|
99
105
|
if (content && content !== "[]") {
|
|
100
106
|
let fileName;
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
const archiveType = options.plaintext
|
|
108
|
+
&& getExportArchiveType(options.url);
|
|
109
|
+
|
|
110
|
+
if (archiveType) {
|
|
111
|
+
const processed = processArchiveExport(content, archiveType);
|
|
112
|
+
content = processed.mainContent;
|
|
113
|
+
fileName = processed.mainFileName || options.fileName;
|
|
114
|
+
downloadTxt(fileName, content);
|
|
115
|
+
downloadExtraFiles(processed.extraFiles);
|
|
103
116
|
} else {
|
|
104
|
-
|
|
105
|
-
.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
content = JSON.stringify(JSON.parse(content), null, 2);
|
|
113
|
-
} catch (e) {
|
|
114
|
-
// content is not valid JSON, keep original
|
|
117
|
+
if (options.fileName) {
|
|
118
|
+
fileName = options.fileName;
|
|
119
|
+
} else {
|
|
120
|
+
let timeStr = res.time
|
|
121
|
+
.replaceAll(":", "")
|
|
122
|
+
.replaceAll("-", "")
|
|
123
|
+
.replaceAll(" ", "");
|
|
124
|
+
fileName = options.title + "(" + timeStr + ")";
|
|
115
125
|
}
|
|
116
|
-
|
|
117
|
-
|
|
126
|
+
const extraConfig = getExportExtraConfig(options.url, options);
|
|
127
|
+
if (extraConfig) {
|
|
128
|
+
const processed = processExportContent(content, extraConfig);
|
|
129
|
+
content = processed.mainContent;
|
|
130
|
+
downloadTxt(fileName, content);
|
|
131
|
+
downloadExtraFiles(processed.extraFiles);
|
|
132
|
+
} else {
|
|
133
|
+
downloadTxt(fileName, content);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
118
136
|
} else {
|
|
119
137
|
this.$baseAlert(this.$t1("不存在需要导出的数据"));
|
|
120
138
|
}
|
|
@@ -152,6 +170,15 @@ moudule.install = function (Vue) {
|
|
|
152
170
|
};
|
|
153
171
|
};
|
|
154
172
|
|
|
173
|
+
function downloadExtraFiles(extraFiles) {
|
|
174
|
+
if (!extraFiles || !extraFiles.length) return;
|
|
175
|
+
extraFiles.forEach((file, index) => {
|
|
176
|
+
setTimeout(() => {
|
|
177
|
+
downloadTxt(file.fileName, file.content);
|
|
178
|
+
}, (index + 1) * 300);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
155
182
|
function downloadTxt(fileName, content) {
|
|
156
183
|
// 创建Blob对象
|
|
157
184
|
const blob = new Blob([content], { type: "text/plain;charset=utf-8" });
|
package/src/components/wf/wf.js
CHANGED
|
@@ -1743,7 +1743,10 @@ wfStartMixin = {
|
|
|
1743
1743
|
(this.wfDefItems = wfDefItems);
|
|
1744
1744
|
this.$set(this.wfStartForm, "modelId", wfDefItems[0].modelId);
|
|
1745
1745
|
if (wfDefItems.length == 1) {
|
|
1746
|
-
if (
|
|
1746
|
+
if (
|
|
1747
|
+
settingConfig.withoutConfrimByOneWf === true ||
|
|
1748
|
+
(this.option && this.option.skipStartConfirm)
|
|
1749
|
+
) {
|
|
1747
1750
|
this.startSubmit();
|
|
1748
1751
|
} else {
|
|
1749
1752
|
let wfStartOperateName =
|
package/src/components/xform/form-designer/form-widget/field-widget/save_submit_wf_button-widget.vue
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<static-content-wrapper
|
|
3
|
+
:designer="designer"
|
|
4
|
+
:field="field"
|
|
5
|
+
:design-state="designState"
|
|
6
|
+
:display-style="field.options.displayStyle"
|
|
7
|
+
:parent-widget="parentWidget"
|
|
8
|
+
:parent-list="parentList"
|
|
9
|
+
:index-of-parent-list="indexOfParentList"
|
|
10
|
+
:sub-form-row-index="subFormRowIndex"
|
|
11
|
+
:sub-form-col-index="subFormColIndex"
|
|
12
|
+
:sub-form-row-id="subFormRowId"
|
|
13
|
+
>
|
|
14
|
+
<el-button
|
|
15
|
+
v-show="isShow"
|
|
16
|
+
class="button-sty"
|
|
17
|
+
:type="field.options.type"
|
|
18
|
+
:size="field.options.size"
|
|
19
|
+
:plain="field.options.plain"
|
|
20
|
+
:round="field.options.round"
|
|
21
|
+
:circle="field.options.circle"
|
|
22
|
+
:icon="field.options.icon"
|
|
23
|
+
:disabled="!designState && field.options.disabled"
|
|
24
|
+
@click="clickHandle"
|
|
25
|
+
>
|
|
26
|
+
{{ getI18nLabel(field.options.label) }}
|
|
27
|
+
</el-button>
|
|
28
|
+
</static-content-wrapper>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
import StaticContentWrapper from "./static-content-wrapper";
|
|
33
|
+
import emitter from "../../../../../components/xform/utils/emitter";
|
|
34
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
35
|
+
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
36
|
+
|
|
37
|
+
export default {
|
|
38
|
+
name: "save_submit_wf_button-widget",
|
|
39
|
+
componentName: "FieldWidget",
|
|
40
|
+
mixins: [emitter, fieldMixin, i18n],
|
|
41
|
+
props: {
|
|
42
|
+
field: Object,
|
|
43
|
+
parentWidget: Object,
|
|
44
|
+
parentList: Array,
|
|
45
|
+
indexOfParentList: Number,
|
|
46
|
+
designer: Object,
|
|
47
|
+
designState: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
subFormRowIndex: {
|
|
52
|
+
type: Number,
|
|
53
|
+
default: -1,
|
|
54
|
+
},
|
|
55
|
+
subFormColIndex: {
|
|
56
|
+
type: Number,
|
|
57
|
+
default: -1,
|
|
58
|
+
},
|
|
59
|
+
subFormRowId: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
components: {
|
|
65
|
+
StaticContentWrapper,
|
|
66
|
+
},
|
|
67
|
+
inject: {
|
|
68
|
+
getHasWf: {
|
|
69
|
+
default: () => () => false,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
computed: {
|
|
73
|
+
isShow() {
|
|
74
|
+
if (this.designState) return true;
|
|
75
|
+
const formRef = this.getFormRef();
|
|
76
|
+
if (!formRef?.formConfig?.wfEnabled) return false;
|
|
77
|
+
if (this.isWfStarted(formRef)) return false;
|
|
78
|
+
return !this.field.options.hidden;
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
created() {
|
|
82
|
+
this.registerToRefList();
|
|
83
|
+
this.initEventHandler();
|
|
84
|
+
this.handleOnCreated();
|
|
85
|
+
},
|
|
86
|
+
mounted() {
|
|
87
|
+
this.handleOnMounted();
|
|
88
|
+
},
|
|
89
|
+
beforeDestroy() {
|
|
90
|
+
this.unregisterFromRefList();
|
|
91
|
+
},
|
|
92
|
+
methods: {
|
|
93
|
+
isWfStarted(formRef) {
|
|
94
|
+
const wfParam = formRef?.wfParam || {};
|
|
95
|
+
return !!(
|
|
96
|
+
wfParam.hasWf ||
|
|
97
|
+
formRef.hasWf ||
|
|
98
|
+
this.getHasWf() ||
|
|
99
|
+
wfParam.wfInfo?.procInstId
|
|
100
|
+
);
|
|
101
|
+
},
|
|
102
|
+
clickHandle() {
|
|
103
|
+
if (this.designState || this.field.options.disabled || !this.isShow) return;
|
|
104
|
+
this.saveAndSubmitWfHandle();
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<style lang="scss" scoped>
|
|
111
|
+
@import "~@/styles/global.scss";
|
|
112
|
+
</style>
|
|
@@ -3976,6 +3976,45 @@ export const businessFields = [
|
|
|
3976
3976
|
tabDeleteEnabled: true,
|
|
3977
3977
|
},
|
|
3978
3978
|
},
|
|
3979
|
+
{
|
|
3980
|
+
type: "save_submit_wf_button",
|
|
3981
|
+
targetType: "button",
|
|
3982
|
+
icon: "button",
|
|
3983
|
+
commonFlag: !0,
|
|
3984
|
+
columnFlag: true,
|
|
3985
|
+
formItemFlag: !1,
|
|
3986
|
+
options: {
|
|
3987
|
+
name: "",
|
|
3988
|
+
label: "保存并提交流程",
|
|
3989
|
+
columnWidth: "200px",
|
|
3990
|
+
size: "",
|
|
3991
|
+
displayStyle: "block",
|
|
3992
|
+
disabled: !1,
|
|
3993
|
+
hidden: !1,
|
|
3994
|
+
type: "success",
|
|
3995
|
+
plain: !1,
|
|
3996
|
+
round: !1,
|
|
3997
|
+
circle: !1,
|
|
3998
|
+
icon: "el-icon-video-play",
|
|
3999
|
+
customClass: "",
|
|
4000
|
+
onCreated: "",
|
|
4001
|
+
onMounted: "",
|
|
4002
|
+
onClick: "this.saveAndSubmitWfHandle();",
|
|
4003
|
+
accessType: "1",
|
|
4004
|
+
saveSubmitWfButton: true,
|
|
4005
|
+
clickBindEvent: null,
|
|
4006
|
+
onBeforeClickButton: null,
|
|
4007
|
+
searchDialogConfig: {
|
|
4008
|
+
...defaultSearchDialogConfig,
|
|
4009
|
+
},
|
|
4010
|
+
...defaultWfConfig,
|
|
4011
|
+
...defaultWidgetShowRuleConfig,
|
|
4012
|
+
hiddenByWf: true,
|
|
4013
|
+
showRuleFlag: 1,
|
|
4014
|
+
showRuleEnabled: 1,
|
|
4015
|
+
showRules: [],
|
|
4016
|
+
},
|
|
4017
|
+
},
|
|
3979
4018
|
{
|
|
3980
4019
|
type: "copy_button",
|
|
3981
4020
|
icon: "button",
|
|
@@ -653,6 +653,10 @@ modules = {
|
|
|
653
653
|
|
|
654
654
|
//处理组件显隐规则
|
|
655
655
|
this.handleWidgetShowRule(widget);
|
|
656
|
+
if (wfParam.hasWf && widget?.options?.saveSubmitWfButton) {
|
|
657
|
+
widget.options.hidden = true;
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
656
660
|
if (wfParam.hasWf) {
|
|
657
661
|
if (!widgetEditOnWf) {
|
|
658
662
|
//有流程,且不匹配流程节点可编辑表单设置信息
|
|
@@ -697,6 +701,10 @@ modules = {
|
|
|
697
701
|
const processWidget = (widget) => {
|
|
698
702
|
if (!widget) return;
|
|
699
703
|
this.handleWidgetShowRule(widget);
|
|
704
|
+
if (wfParam.hasWf && widget?.options?.saveSubmitWfButton) {
|
|
705
|
+
widget.options.hidden = true;
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
700
708
|
if (!wfParam.hasWf || widgetEditOnWf) return;
|
|
701
709
|
this.hanldeWfWidgetNew1(widget);
|
|
702
710
|
if (wfInfo.taskStep === "9999") {
|
|
@@ -828,6 +836,13 @@ modules = {
|
|
|
828
836
|
},
|
|
829
837
|
hanldeWfWidgetNew1(widget) {
|
|
830
838
|
if (!widget) return;
|
|
839
|
+
if (widget?.options?.saveSubmitWfButton) {
|
|
840
|
+
let wfParam = this.wfParam || {};
|
|
841
|
+
if (wfParam.hasWf) {
|
|
842
|
+
widget.options.hidden = true;
|
|
843
|
+
}
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
831
846
|
let flag =
|
|
832
847
|
widget.columnType &&
|
|
833
848
|
["editDelete", "removeTreeRow"].includes(widget.columnType);
|
|
@@ -877,7 +892,7 @@ modules = {
|
|
|
877
892
|
|
|
878
893
|
let handleWfConfigData = (widget, columnOptions) => {
|
|
879
894
|
let options = widget?.options || columnOptions;
|
|
880
|
-
if (!options || !options.wfEdit) return;
|
|
895
|
+
if (!options || !options.wfEdit || options.saveSubmitWfButton) return;
|
|
881
896
|
let wfConfigData = options.wfConfigData || [];
|
|
882
897
|
let flag = false;
|
|
883
898
|
wfConfigData.forEach((item) => {
|
|
@@ -1154,7 +1169,7 @@ modules = {
|
|
|
1154
1169
|
|
|
1155
1170
|
let handleWfConfigData = (widget, columnOptions) => {
|
|
1156
1171
|
let options = widget?.options || columnOptions;
|
|
1157
|
-
if (!options || !options.wfEdit) return;
|
|
1172
|
+
if (!options || !options.wfEdit || options.saveSubmitWfButton) return;
|
|
1158
1173
|
let wfConfigData = options.wfConfigData || [];
|
|
1159
1174
|
let flag = false;
|
|
1160
1175
|
wfConfigData.forEach((item) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import moment from "moment";
|
|
2
2
|
import { saveUserLog } from "@base/api/user";
|
|
3
3
|
import settingConfig from "@/settings";
|
|
4
|
+
import { openStartWfDialog } from "../../../components/wf/wfUtil";
|
|
4
5
|
|
|
5
6
|
let modules = {};
|
|
6
7
|
modules = {
|
|
@@ -109,6 +110,46 @@ modules = {
|
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
112
|
},
|
|
113
|
+
saveAndSubmitWfHandle(option) {
|
|
114
|
+
let formRef = this.getFormRef ? this.getFormRef() : this;
|
|
115
|
+
let formConfig = formRef.formConfig;
|
|
116
|
+
let reportTemplate = formRef.reportTemplate;
|
|
117
|
+
let wfParam = formRef.wfParam || {};
|
|
118
|
+
|
|
119
|
+
if (!formConfig?.wfEnabled) return;
|
|
120
|
+
if (
|
|
121
|
+
formRef.hasWf ||
|
|
122
|
+
wfParam.hasWf ||
|
|
123
|
+
wfParam.wfInfo?.procInstId
|
|
124
|
+
) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
let confirmText =
|
|
129
|
+
option?.confirmText ||
|
|
130
|
+
option?.config?.confirmText ||
|
|
131
|
+
this.$t1("您确定要保存并提交流程吗?");
|
|
132
|
+
|
|
133
|
+
this.saveDefaultHandle({
|
|
134
|
+
...option,
|
|
135
|
+
config: {
|
|
136
|
+
...option?.config,
|
|
137
|
+
successMsg: option?.config?.successMsg ?? true,
|
|
138
|
+
isConfirm: option?.config?.isConfirm ?? true,
|
|
139
|
+
confirmText: option?.config?.confirmText || confirmText,
|
|
140
|
+
success: (res) => {
|
|
141
|
+
openStartWfDialog(formRef, {
|
|
142
|
+
objId: res.objx,
|
|
143
|
+
wfCode: reportTemplate.objTypeCode,
|
|
144
|
+
formCode: reportTemplate.formCode,
|
|
145
|
+
serviceId: reportTemplate.serviceName,
|
|
146
|
+
skipStartConfirm: true,
|
|
147
|
+
});
|
|
148
|
+
option?.config?.success && option.config.success(res);
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
},
|
|
112
153
|
saveDefaultHandle(option) {
|
|
113
154
|
let formRef = this.getFormRef ? this.getFormRef() : this;
|
|
114
155
|
let formConfig = formRef.formConfig;
|
|
@@ -142,9 +142,15 @@
|
|
|
142
142
|
:key="'menuModule' + menuModule.id"
|
|
143
143
|
@click.native="rourteTo(menuModule)"
|
|
144
144
|
>
|
|
145
|
-
<i
|
|
145
|
+
<i
|
|
146
|
+
:class="getMenuClass(menuModule, 1)"
|
|
147
|
+
v-if="menuModule.children.length <= 0"
|
|
148
|
+
></i>
|
|
146
149
|
<template slot="title">
|
|
147
|
-
<i
|
|
150
|
+
<i
|
|
151
|
+
:class="getMenuClass(menuModule, 1)"
|
|
152
|
+
v-if="menuModule.children.length > 0"
|
|
153
|
+
></i>
|
|
148
154
|
<span>{{ getMenuName(menuModule) }}</span>
|
|
149
155
|
</template>
|
|
150
156
|
<component
|
|
@@ -173,7 +179,7 @@
|
|
|
173
179
|
</el-menu-item>
|
|
174
180
|
</component>
|
|
175
181
|
</component>
|
|
176
|
-
<el-menu-item
|
|
182
|
+
<!-- <el-menu-item
|
|
177
183
|
@click.native="openCreateCompanyDialog"
|
|
178
184
|
index="xx"
|
|
179
185
|
v-if="isFormDev"
|
|
@@ -182,7 +188,7 @@
|
|
|
182
188
|
<i :class="getMenuClass({}, 1)"></i>
|
|
183
189
|
<span>新建企业</span>
|
|
184
190
|
</template>
|
|
185
|
-
</el-menu-item>
|
|
191
|
+
</el-menu-item> -->
|
|
186
192
|
</el-scrollbar>
|
|
187
193
|
</el-menu>
|
|
188
194
|
<div class="menu-btn">
|
|
@@ -797,7 +803,7 @@ export default {
|
|
|
797
803
|
if (sh >= 0) {
|
|
798
804
|
$snav.style["margin-top"] = sh1 + "px";
|
|
799
805
|
} else if (sh < 0) {
|
|
800
|
-
let bd = sh1 + sh
|
|
806
|
+
let bd = sh1 + sh;
|
|
801
807
|
|
|
802
808
|
$snav.style["margin-top"] = bd + "px";
|
|
803
809
|
$snav.querySelector(".ico-arrow").style["margin-top"] =
|
|
@@ -1057,30 +1063,49 @@ export default {
|
|
|
1057
1063
|
position: relative;
|
|
1058
1064
|
background-color: rgba(0, 0, 0, 0.2);
|
|
1059
1065
|
word-break: break-word;
|
|
1060
|
-
.el-scrollbar__view >{
|
|
1061
|
-
.el-menu-item{
|
|
1062
|
-
|
|
1066
|
+
.el-scrollbar__view > {
|
|
1067
|
+
.el-menu-item {
|
|
1068
|
+
padding: 0 11px !important;
|
|
1069
|
+
span {
|
|
1070
|
+
font-size: 14px;
|
|
1071
|
+
}
|
|
1063
1072
|
}
|
|
1064
|
-
.el-submenu > .el-submenu__title{
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1073
|
+
.el-submenu > .el-submenu__title {
|
|
1074
|
+
padding: 0 11px !important;
|
|
1075
|
+
span {
|
|
1076
|
+
font-size: 14px;
|
|
1077
|
+
}
|
|
1078
|
+
~ .el-menu {
|
|
1079
|
+
padding: 5px 0;
|
|
1080
|
+
display: grid;
|
|
1081
|
+
> .el-menu-item {
|
|
1082
|
+
span {
|
|
1083
|
+
line-height: 1.4;
|
|
1084
|
+
height: 26px;
|
|
1085
|
+
}
|
|
1070
1086
|
}
|
|
1071
|
-
.el-submenu.is-opened .el-submenu__title{
|
|
1072
|
-
|
|
1073
|
-
|
|
1087
|
+
.el-submenu.is-opened .el-submenu__title {
|
|
1088
|
+
background-color: #fff;
|
|
1089
|
+
opacity: 1;
|
|
1090
|
+
span {
|
|
1091
|
+
color: $baseColor;
|
|
1092
|
+
}
|
|
1093
|
+
i.iconfont {
|
|
1094
|
+
color: $baseColor;
|
|
1095
|
+
}
|
|
1074
1096
|
}
|
|
1075
1097
|
}
|
|
1076
|
-
|
|
1077
1098
|
}
|
|
1078
1099
|
}
|
|
1079
|
-
.el-submenu__title
|
|
1100
|
+
.el-submenu__title,
|
|
1101
|
+
.el-menu-item {
|
|
1080
1102
|
padding: 0 11px;
|
|
1081
1103
|
height: 48px;
|
|
1082
1104
|
line-height: 48px;
|
|
1083
|
-
&:hover
|
|
1105
|
+
&:hover,
|
|
1106
|
+
&.is-active {
|
|
1107
|
+
background-color: rgba(0, 0, 0, 0.29);
|
|
1108
|
+
}
|
|
1084
1109
|
i {
|
|
1085
1110
|
color: #fff;
|
|
1086
1111
|
font-size: 13px;
|
|
@@ -1119,18 +1144,22 @@ export default {
|
|
|
1119
1144
|
&.is-opened .el-submenu__title {
|
|
1120
1145
|
//background-color: rgba(27, 66, 97) !important;
|
|
1121
1146
|
}
|
|
1122
|
-
.el-submenu .el-menu{
|
|
1147
|
+
.el-submenu .el-menu {
|
|
1148
|
+
display: none;
|
|
1149
|
+
}
|
|
1123
1150
|
}
|
|
1124
1151
|
|
|
1125
1152
|
.el-submenu {
|
|
1126
|
-
&.is-opened{
|
|
1127
|
-
> .el-submenu__title{
|
|
1153
|
+
&.is-opened {
|
|
1154
|
+
> .el-submenu__title {
|
|
1155
|
+
background-color: rgba(0, 0, 0, 0.29);
|
|
1156
|
+
}
|
|
1128
1157
|
}
|
|
1129
1158
|
.el-menu {
|
|
1130
1159
|
background: rgba(0, 0, 0, 0.35);
|
|
1131
1160
|
box-shadow: 0px -5px 8px #00000014 inset;
|
|
1132
1161
|
//padding:4px 0;
|
|
1133
|
-
.el-submenu__title{
|
|
1162
|
+
.el-submenu__title {
|
|
1134
1163
|
height: auto;
|
|
1135
1164
|
line-height: 1.4;
|
|
1136
1165
|
font-size: 12px;
|
|
@@ -1164,13 +1193,18 @@ export default {
|
|
|
1164
1193
|
zoom: 0.8;
|
|
1165
1194
|
display: none;
|
|
1166
1195
|
}
|
|
1167
|
-
span{
|
|
1196
|
+
span {
|
|
1197
|
+
height: auto;
|
|
1198
|
+
text-align: left !important;
|
|
1199
|
+
}
|
|
1168
1200
|
&:hover,
|
|
1169
1201
|
&.on {
|
|
1170
1202
|
opacity: 1;
|
|
1171
1203
|
background-color: #fbfdfe !important;
|
|
1172
1204
|
color: $baseColor !important;
|
|
1173
|
-
i.iconfont{
|
|
1205
|
+
i.iconfont {
|
|
1206
|
+
color: $baseColor;
|
|
1207
|
+
}
|
|
1174
1208
|
.el-icon-arrow-right {
|
|
1175
1209
|
color: $baseColor;
|
|
1176
1210
|
}
|
|
@@ -1178,7 +1212,7 @@ export default {
|
|
|
1178
1212
|
}
|
|
1179
1213
|
}
|
|
1180
1214
|
|
|
1181
|
-
.el-menu-item{
|
|
1215
|
+
.el-menu-item {
|
|
1182
1216
|
height: auto;
|
|
1183
1217
|
line-height: 1.4;
|
|
1184
1218
|
padding-left: 33px !important;
|
|
@@ -1201,7 +1235,7 @@ export default {
|
|
|
1201
1235
|
line-height: 20px;
|
|
1202
1236
|
left: 7px;
|
|
1203
1237
|
font-size: 18px;
|
|
1204
|
-
color
|
|
1238
|
+
color: #d0d6db;
|
|
1205
1239
|
}
|
|
1206
1240
|
|
|
1207
1241
|
[class^="el-icon-"] {
|
|
@@ -1214,7 +1248,6 @@ export default {
|
|
|
1214
1248
|
width: 14px;
|
|
1215
1249
|
zoom: 0.8;
|
|
1216
1250
|
display: none;
|
|
1217
|
-
|
|
1218
1251
|
}
|
|
1219
1252
|
|
|
1220
1253
|
&:hover,
|
|
@@ -1223,7 +1256,8 @@ export default {
|
|
|
1223
1256
|
background-color: #fbfdfe !important;
|
|
1224
1257
|
color: $baseColor !important;
|
|
1225
1258
|
|
|
1226
|
-
.el-icon-arrow-right,
|
|
1259
|
+
.el-icon-arrow-right,
|
|
1260
|
+
i.iconfont {
|
|
1227
1261
|
color: $baseColor;
|
|
1228
1262
|
}
|
|
1229
1263
|
}
|
|
@@ -1546,46 +1580,61 @@ export default {
|
|
|
1546
1580
|
// .el-submenu .el-menu {
|
|
1547
1581
|
// height: auto !important;
|
|
1548
1582
|
// }
|
|
1549
|
-
.el-menu--vertical{
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1583
|
+
.el-menu--vertical {
|
|
1584
|
+
> .el-menu--popup {
|
|
1585
|
+
overflow: auto; //不用atuo 超出不出滚动条
|
|
1586
|
+
.el-submenu__title,
|
|
1587
|
+
.el-menu-item {
|
|
1588
|
+
height: auto !important;
|
|
1589
|
+
line-height: 1.4 !important;
|
|
1590
|
+
padding: 8px 0;
|
|
1591
|
+
text-align: left;
|
|
1592
|
+
white-space: normal;
|
|
1593
|
+
word-break: break-word;
|
|
1594
|
+
background: none;
|
|
1595
|
+
i.iconfont {
|
|
1596
|
+
color: #fff;
|
|
1597
|
+
margin-right: 8px;
|
|
1560
1598
|
}
|
|
1561
|
-
}
|
|
1562
|
-
.el-submenu{
|
|
1563
|
-
.el-submenu__title{
|
|
1564
|
-
.el-submenu__icon-arrow{display:none}
|
|
1565
1599
|
}
|
|
1566
|
-
|
|
1567
|
-
|
|
1600
|
+
}
|
|
1601
|
+
.el-submenu {
|
|
1602
|
+
.el-submenu__title {
|
|
1603
|
+
.el-submenu__icon-arrow {
|
|
1604
|
+
display: none;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
&:hover {
|
|
1608
|
+
.el-submenu__title {
|
|
1568
1609
|
background-color: rgba(0, 0, 0, 0.29) !important;
|
|
1569
|
-
i.iconfont{
|
|
1610
|
+
i.iconfont {
|
|
1611
|
+
color: $baseColor;
|
|
1612
|
+
}
|
|
1570
1613
|
}
|
|
1571
1614
|
}
|
|
1572
1615
|
|
|
1573
|
-
&.is-opened{
|
|
1574
|
-
.el-submenu__title{
|
|
1616
|
+
&.is-opened {
|
|
1617
|
+
.el-submenu__title {
|
|
1575
1618
|
background-color: rgba(0, 0, 0, 0.29) !important;
|
|
1576
|
-
i.iconfont{
|
|
1619
|
+
i.iconfont {
|
|
1620
|
+
color: $baseColor;
|
|
1621
|
+
}
|
|
1577
1622
|
}
|
|
1578
1623
|
}
|
|
1579
1624
|
}
|
|
1580
|
-
.el-menu-item{
|
|
1581
|
-
&:hover{
|
|
1582
|
-
|
|
1583
|
-
|
|
1625
|
+
.el-menu-item {
|
|
1626
|
+
&:hover {
|
|
1627
|
+
background-color: rgba(0, 0, 0, 0.29) !important;
|
|
1628
|
+
i.iconfont {
|
|
1629
|
+
color: $baseColor;
|
|
1630
|
+
}
|
|
1584
1631
|
}
|
|
1585
1632
|
|
|
1586
|
-
&.is-opened{
|
|
1587
|
-
|
|
1588
|
-
|
|
1633
|
+
&.is-opened {
|
|
1634
|
+
background-color: rgba(0, 0, 0, 0.29) !important;
|
|
1635
|
+
i.iconfont {
|
|
1636
|
+
color: $baseColor;
|
|
1637
|
+
}
|
|
1589
1638
|
}
|
|
1590
1639
|
}
|
|
1591
1640
|
// .el-menu-item{
|
|
@@ -487,7 +487,6 @@ modules = {
|
|
|
487
487
|
data: [row.id],
|
|
488
488
|
url: USER_PREFIX + "/form_develop/exportFormScript",
|
|
489
489
|
plaintext: 1,
|
|
490
|
-
fileName: `${row.scriptCode} - ${row.formCode}(script)`,
|
|
491
490
|
abcEnabled: true,
|
|
492
491
|
editAuth: this.currentFormType.editAuth,
|
|
493
492
|
selectTypeAuth: this.currentFormType.selectTypeAuth,
|
|
@@ -696,7 +696,6 @@ modules = {
|
|
|
696
696
|
data: [row.id],
|
|
697
697
|
url: USER_PREFIX + "/form_develop/exportFormTemplate",
|
|
698
698
|
plaintext: 1,
|
|
699
|
-
fileName: row.formCode + "(form)",
|
|
700
699
|
abcEnabled: true,
|
|
701
700
|
editAuth: this.currentFormType.editAuth,
|
|
702
701
|
selectTypeAuth: this.currentFormType.selectTypeAuth,
|
|
@@ -450,7 +450,6 @@ modules = {
|
|
|
450
450
|
data: [row.id],
|
|
451
451
|
url: USER_PREFIX + "/form_develop/exportSzTaMb",
|
|
452
452
|
plaintext: 1,
|
|
453
|
-
fileName: row.taBm + "(table)",
|
|
454
453
|
abcEnabled: true,
|
|
455
454
|
editAuth: this.currentFormType.editAuth,
|
|
456
455
|
selectTypeAuth: this.currentFormType.selectTypeAuth,
|