cloud-web-corejs 1.0.268 → 1.0.270
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/excelExport/exportFieldDialog.vue +375 -367
- package/src/components/excelExport/exportType.js +49 -0
- package/src/components/excelExport/mixins.js +1153 -1144
- package/src/components/table/config.js +6 -4
- package/src/components/table/index.js +78 -22
- package/src/components/table/state.js +42 -0
- package/src/components/table/vxeFilter/index.js +4 -2
- package/src/components/table/vxeFilter/mixin.js +10 -4
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +2 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/afterColumnsCreated-editor.vue +30 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -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 +32 -2
- package/src/views/user/wf/wf_manage/list.vue +17 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 导出模式常量与判定。
|
|
3
|
+
*
|
|
4
|
+
* 导出的 type 此前以字面量散落在 excelExport 与 xform 两侧共 6 处,且存在三种**互不相同**
|
|
5
|
+
* 的分组口径(是否需要勾选行 / 是否走前端行导出 / 列取自哪一套),改一处漏一处就会出现
|
|
6
|
+
* "表头是主表列、数据是明细行"这类错位。统一收敛到这里,新增模式只需扩这三个谓词。
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const EXPORT_TYPE = {
|
|
10
|
+
/** 主表·条件导出:按当前搜索条件后端分页拉全量。 */
|
|
11
|
+
CONDITION: null,
|
|
12
|
+
/** 主表·选择导出:导出前端已勾选行。 */
|
|
13
|
+
SELECTED: "selected",
|
|
14
|
+
/** 主表·当前页导出:当前无调用方,保留常量仅为兼容外部调用。 */
|
|
15
|
+
CURRENT: "current",
|
|
16
|
+
/** 明细·选择导出:以勾选行 id 为过滤条件,后端分页拉明细行。 */
|
|
17
|
+
ITEM_SELECTED: "exportItem",
|
|
18
|
+
/** 明细·条件导出:以当前搜索条件为过滤条件,后端分页拉明细行。 */
|
|
19
|
+
ITEM_CONDITION: "exportItemQuery",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 是否明细导出:列取自 `exportItemConfig.columns` 而非表格列。
|
|
24
|
+
* @param {String|null} type 导出模式。
|
|
25
|
+
* @returns {Boolean}
|
|
26
|
+
*/
|
|
27
|
+
export function isItemExport(type) {
|
|
28
|
+
return (
|
|
29
|
+
type === EXPORT_TYPE.ITEM_SELECTED || type === EXPORT_TYPE.ITEM_CONDITION
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 是否前端行导出:直接取表格里的行一次性上送,不发分页请求。
|
|
35
|
+
* @param {String|null} type 导出模式。
|
|
36
|
+
* @returns {Boolean}
|
|
37
|
+
*/
|
|
38
|
+
export function isRowExport(type) {
|
|
39
|
+
return type === EXPORT_TYPE.SELECTED || type === EXPORT_TYPE.CURRENT;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 是否必须先勾选行:空勾选要拦截,且以勾选行 id 作为查询条件。
|
|
44
|
+
* @param {String|null} type 导出模式。
|
|
45
|
+
* @returns {Boolean}
|
|
46
|
+
*/
|
|
47
|
+
export function requiresCheckedRows(type) {
|
|
48
|
+
return type === EXPORT_TYPE.SELECTED || type === EXPORT_TYPE.ITEM_SELECTED;
|
|
49
|
+
}
|