cloud-web-corejs 1.0.269 → 1.0.271
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/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +29 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +3 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +20 -10
- package/src/views/user/wf/wf_manage/list.vue +17 -0
package/package.json
CHANGED
|
@@ -8,12 +8,31 @@
|
|
|
8
8
|
:parent-list="parentList"
|
|
9
9
|
:index-of-parent-list="indexOfParentList"
|
|
10
10
|
>
|
|
11
|
+
<el-dropdown
|
|
12
|
+
v-if="field.options.exportItemConditionEnabled"
|
|
13
|
+
trigger="hover"
|
|
14
|
+
:disabled="field.options.disabled"
|
|
15
|
+
>
|
|
16
|
+
<el-button :type="field.options.type" class="button-sty" size="mini">
|
|
17
|
+
<span>{{ getI18nLabel(field.options.label) }}</span
|
|
18
|
+
><span class="line"></span> <i class="el-icon-arrow-down el-icon--right"></i>
|
|
19
|
+
</el-button>
|
|
20
|
+
<el-dropdown-menu slot="dropdown">
|
|
21
|
+
<el-dropdown-item icon="el-icon-upload2" @click.native="toConditionExport">
|
|
22
|
+
{{ getI18nLabel("条件导出") }}
|
|
23
|
+
</el-dropdown-item>
|
|
24
|
+
<el-dropdown-item icon="el-icon-upload2" @click.native="toSelectedExport">
|
|
25
|
+
{{ getI18nLabel("选择导出") }}
|
|
26
|
+
</el-dropdown-item>
|
|
27
|
+
</el-dropdown-menu>
|
|
28
|
+
</el-dropdown>
|
|
11
29
|
<el-button
|
|
30
|
+
v-else
|
|
12
31
|
:type="field.options.type"
|
|
13
32
|
class="button-sty"
|
|
14
33
|
size="mini"
|
|
15
34
|
icon="el-icon-upload2"
|
|
16
|
-
@click="
|
|
35
|
+
@click="toSelectedExport"
|
|
17
36
|
:disabled="field.options.disabled"
|
|
18
37
|
>{{ getI18nLabel(field.options.label) }}
|
|
19
38
|
</el-button>
|
|
@@ -24,6 +43,7 @@ import emitter from "../../../utils/emitter";
|
|
|
24
43
|
import i18n from "../../../utils/i18n";
|
|
25
44
|
import fieldMixin from "./fieldMixin";
|
|
26
45
|
import StaticContentWrapper from "./static-content-wrapper.vue";
|
|
46
|
+
import { EXPORT_TYPE } from "../../../../excelExport/exportType";
|
|
27
47
|
|
|
28
48
|
export default {
|
|
29
49
|
name: "select-export-item-button-widget",
|
|
@@ -66,6 +86,14 @@ export default {
|
|
|
66
86
|
},
|
|
67
87
|
|
|
68
88
|
methods: {
|
|
89
|
+
/** 明细·条件导出:按当前搜索条件导出,无需勾选。仅在开启「支持条件导出」时可达。 */
|
|
90
|
+
toConditionExport() {
|
|
91
|
+
this.toDo(EXPORT_TYPE.ITEM_CONDITION);
|
|
92
|
+
},
|
|
93
|
+
/** 明细·选择导出:以勾选行为范围,历史默认行为。 */
|
|
94
|
+
toSelectedExport() {
|
|
95
|
+
this.toDo(EXPORT_TYPE.ITEM_SELECTED);
|
|
96
|
+
},
|
|
69
97
|
toDo(type = null) {
|
|
70
98
|
if (this.designState) {
|
|
71
99
|
return;
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
<el-form-item label="表格唯一名称">
|
|
10
10
|
<el-input v-model="optionModel.tableRef"></el-input>
|
|
11
11
|
</el-form-item>
|
|
12
|
+
<el-form-item label="支持条件导出">
|
|
13
|
+
<el-switch v-model="optionModel.exportItemConditionEnabled"></el-switch>
|
|
14
|
+
</el-form-item>
|
|
12
15
|
<el-form-item label="导出列表显示图片">
|
|
13
16
|
<el-switch
|
|
14
17
|
v-model="optionModel.showImageAtTable"
|
|
@@ -22,6 +22,11 @@ import {
|
|
|
22
22
|
} from "../../../../components/xform/utils/util";
|
|
23
23
|
import { tableTreeMixins } from "../../../../mixins/tableTree/index.js";
|
|
24
24
|
import { applyColumnLabelIcon } from "../../../../components/xform/utils/tableColumnHelper";
|
|
25
|
+
import {
|
|
26
|
+
EXPORT_TYPE,
|
|
27
|
+
isItemExport,
|
|
28
|
+
requiresCheckedRows,
|
|
29
|
+
} from "../../../../components/excelExport/exportType";
|
|
25
30
|
|
|
26
31
|
let modules = {};
|
|
27
32
|
const baseRefUtil = {
|
|
@@ -1505,8 +1510,10 @@ modules = {
|
|
|
1505
1510
|
let originOption = $grid.params.originOption;
|
|
1506
1511
|
let formData = {};
|
|
1507
1512
|
|
|
1508
|
-
|
|
1509
|
-
|
|
1513
|
+
// 明细·选择导出已按勾选行 id 精确定位,再叠加主表搜索条件既无意义、又可能
|
|
1514
|
+
// 与明细口径的字段名冲突造成双重过滤,故只有它排除搜索条件;
|
|
1515
|
+
// 明细·条件导出与主表条件导出一样,必须带上搜索条件。
|
|
1516
|
+
if (customParam?.exportParam?.type !== EXPORT_TYPE.ITEM_SELECTED) {
|
|
1510
1517
|
formData = tableOption.param ? tableOption.param() || {} : {};
|
|
1511
1518
|
}
|
|
1512
1519
|
const queryParams = Object.assign({}, formData);
|
|
@@ -1960,7 +1967,8 @@ modules = {
|
|
|
1960
1967
|
let scriptCode = this.getScriptCode();
|
|
1961
1968
|
let accessParam = {};
|
|
1962
1969
|
let otherParam = {};
|
|
1963
|
-
|
|
1970
|
+
let exportType = customParam?.exportParam?.type;
|
|
1971
|
+
if (isItemExport(exportType)) {
|
|
1964
1972
|
let $grid = this.getGridTable();
|
|
1965
1973
|
let originOption = $grid.params.originOption;
|
|
1966
1974
|
let exportItemConfig = originOption.exportItemConfig || {};
|
|
@@ -1980,14 +1988,16 @@ modules = {
|
|
|
1980
1988
|
otherParam.attachmentType = result;
|
|
1981
1989
|
}
|
|
1982
1990
|
}
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1991
|
+
if (exportItemConfig.param) {
|
|
1992
|
+
accessParam = exportItemConfig.param() || {};
|
|
1993
|
+
}
|
|
1994
|
+
// 只有选择模式以勾选行 id 为过滤条件;条件模式下由搜索条件 + exportItemParam 决定范围,
|
|
1995
|
+
// 写入空的 ids 会被后端当成"无匹配"。
|
|
1996
|
+
if (requiresCheckedRows(exportType)) {
|
|
1997
|
+
accessParam.ids = $grid.getCheckboxRecords(true).map((item) => {
|
|
1998
|
+
return item.id;
|
|
1999
|
+
});
|
|
1989
2000
|
}
|
|
1990
|
-
accessParam.ids = ids;
|
|
1991
2001
|
} else {
|
|
1992
2002
|
accessParam = this.getAccessParam() || {};
|
|
1993
2003
|
let attachmentType = this.getAttachmentType();
|
|
@@ -312,6 +312,18 @@
|
|
|
312
312
|
</el-select>
|
|
313
313
|
</template>
|
|
314
314
|
</vxe-form-item>
|
|
315
|
+
<vxe-form-item
|
|
316
|
+
:title="$t1('禁用用户') + ':'"
|
|
317
|
+
field="disabledUserName"
|
|
318
|
+
>
|
|
319
|
+
<template v-slot>
|
|
320
|
+
<el-input
|
|
321
|
+
v-model="formData2.disabledUserName"
|
|
322
|
+
size="small"
|
|
323
|
+
clearable
|
|
324
|
+
/>
|
|
325
|
+
</template>
|
|
326
|
+
</vxe-form-item>
|
|
315
327
|
</vxe-form>
|
|
316
328
|
</template>
|
|
317
329
|
</vxe-grid>
|
|
@@ -925,6 +937,11 @@ export default {
|
|
|
925
937
|
field: "candidateNames",
|
|
926
938
|
width: 150,
|
|
927
939
|
},
|
|
940
|
+
{
|
|
941
|
+
title: this.$t1("禁用用户"),
|
|
942
|
+
field: "disabledUserNames",
|
|
943
|
+
width: 200,
|
|
944
|
+
},
|
|
928
945
|
{
|
|
929
946
|
title: this.$t1("流程状态"),
|
|
930
947
|
field: "stat",
|