lyflowchart 1.0.115 → 1.0.133
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/dist/ActionsConfig-BuvSvRbv.js +395 -0
- package/dist/ActionsConfig-BuvSvRbv.js.map +1 -0
- package/dist/ApprovalEditorModal-suKPJ-vN.js +48 -0
- package/dist/ApprovalEditorModal-suKPJ-vN.js.map +1 -0
- package/dist/CancelModal-BUi3ieI8.js +61 -0
- package/dist/CancelModal-BUi3ieI8.js.map +1 -0
- package/dist/Cell_click_approve-Dr83RkI-.js +244 -0
- package/dist/Cell_click_approve-Dr83RkI-.js.map +1 -0
- package/dist/JsonTags-BbWLqghI.js +66 -0
- package/dist/JsonTags-BbWLqghI.js.map +1 -0
- package/dist/MyProcess-FWGEwQcv.js +26434 -0
- package/dist/MyProcess-FWGEwQcv.js.map +1 -0
- package/dist/MyProcess.vue.d.ts +991 -0
- package/dist/approval-BW2WjPxY.js +167 -0
- package/dist/approval-BW2WjPxY.js.map +1 -0
- package/dist/approval-BaVHder3.js +18 -0
- package/dist/approval-BaVHder3.js.map +1 -0
- package/dist/approvalHistory-B2gpQbFC.js +868 -0
- package/dist/approvalHistory-B2gpQbFC.js.map +1 -0
- package/dist/approvalHistoryViewModal-DgLpv2ot.js +114 -0
- package/dist/approvalHistoryViewModal-DgLpv2ot.js.map +1 -0
- package/dist/approvalPageConfig-D0zPXOUf.js +2437 -0
- package/dist/approvalPageConfig-D0zPXOUf.js.map +1 -0
- package/dist/approveLeftConfig-BOU_UgHp.js +136 -0
- package/dist/approveLeftConfig-BOU_UgHp.js.map +1 -0
- package/dist/codeHistoryViewModal-BfSjIbEU.js +103 -0
- package/dist/codeHistoryViewModal-BfSjIbEU.js.map +1 -0
- package/dist/columnTables-DLwtgcC7.js +1272 -0
- package/dist/columnTables-DLwtgcC7.js.map +1 -0
- package/dist/components/Cell_click_approve.vue.d.ts +5 -0
- package/dist/components/Cell_click_data_source.vue.d.ts +6 -0
- package/dist/components/Process/common/bpmnUtils.d.ts +8 -0
- package/dist/components/Process/common/global.d.ts +16 -0
- package/dist/components/Process/common/index.d.ts +5 -0
- package/dist/components/Process/component/JsonTags2.vue.d.ts +60 -0
- package/dist/components/Process/component/ValueInput2.vue.d.ts +74 -0
- package/dist/components/Process/component/columnNameField2.vue.d.ts +51 -0
- package/dist/components/Process/component/data.d.ts +157 -0
- package/dist/components/Process/customPanel/CustomContextPad.d.ts +31 -0
- package/dist/components/Process/customPanel/CustomPalette.d.ts +89 -0
- package/dist/components/Process/customPanel/customTranslate.d.ts +1 -0
- package/dist/components/Process/customPanel/index.d.ts +8 -0
- package/dist/components/Process/designer.vue.d.ts +589 -0
- package/dist/components/Process/flowable/init.d.ts +1 -0
- package/dist/components/Process/index.vue.d.ts +812 -0
- package/dist/components/Process/lang/zh.d.ts +249 -0
- package/dist/components/Process/panel/ButtonsPanel.vue.d.ts +24 -0
- package/dist/components/Process/panel/PropertiesPanel.vue.d.ts +24 -0
- package/dist/components/Process/panel/commonPanel.vue.d.ts +40 -0
- package/dist/components/Process/panel/conditionPanel.vue.d.ts +271 -0
- package/dist/components/Process/panel/executionListener.vue.d.ts +66 -0
- package/dist/components/Process/panel/formPanel.vue.d.ts +7 -0
- package/dist/components/Process/panel/multiInstance.vue.d.ts +33 -0
- package/dist/components/Process/panel/otherPanel.vue.d.ts +17 -0
- package/dist/components/Process/panel/taskListener.vue.d.ts +64 -0
- package/dist/components/Process/panel/taskPanel.vue.d.ts +254 -0
- package/dist/components/Process/viewer/index.vue.d.ts +41 -0
- package/dist/components/approval/ApprovalEditorModal.vue.d.ts +26 -0
- package/dist/components/approval/CostCompanySelect.vue.d.ts +29 -0
- package/dist/components/approval/CostDepartmentSelect.vue.d.ts +35 -0
- package/dist/components/approval/CreateByCascader.vue.d.ts +27 -0
- package/dist/components/approval/CreateBySelect.vue.d.ts +35 -0
- package/dist/components/approval/PostionCascader.vue.d.ts +26 -0
- package/dist/components/approval/SystemTime.vue.d.ts +38 -0
- package/dist/components/approval/approvalViewId.d.ts +36 -0
- package/dist/components/approval/components/CancelModal.vue.d.ts +25 -0
- package/dist/components/approval/components/FormCodeInput.vue.d.ts +33 -0
- package/dist/components/approval/components/FormContextInput.vue.d.ts +33 -0
- package/dist/components/approval/components/FormFlowOrgInput.vue.d.ts +40 -0
- package/dist/components/approval/components/actionsBar.vue.d.ts +17 -0
- package/dist/components/approval/components/approvalHistory/approvalHistoryViewModal.vue.d.ts +41 -0
- package/dist/components/approval/components/approvalHistory/dataStoreSettingHistory.vue.d.ts +55 -0
- package/dist/components/approval/components/approvalHistory/dataStoreSettingHistoryViewModal.vue.d.ts +41 -0
- package/dist/components/approval/components/approvalHistory/flowHistoryViewModal.vue.d.ts +41 -0
- package/dist/components/approval/components/approvalHistory/flowSettingHistory.vue.d.ts +55 -0
- package/dist/components/approval/components/approvalHistory/index.vue.d.ts +212 -0
- package/dist/components/approval/components/approvalHistory/pageSettingHistory.vue.d.ts +55 -0
- package/dist/components/approval/components/approvalPageConfig/ActionsConfig.vue.d.ts +112 -0
- package/dist/components/approval/components/approvalPageConfig/BaseConditions.vue.d.ts +205 -0
- package/dist/components/approval/components/approvalPageConfig/CodeEditorWraper.vue.d.ts +51 -0
- package/dist/components/approval/components/approvalPageConfig/ColumnConfig.vue.d.ts +145 -0
- package/dist/components/approval/components/approvalPageConfig/ConditionFieldMulType.vue.d.ts +137 -0
- package/dist/components/approval/components/approvalPageConfig/JsonInput.vue.d.ts +38 -0
- package/dist/components/approval/components/approvalPageConfig/JsonTags.vue.d.ts +26 -0
- package/dist/components/approval/components/approvalPageConfig/JsonText.vue.d.ts +36 -0
- package/dist/components/approval/components/approvalPageConfig/approveLeftConfig.vue.d.ts +6 -0
- package/dist/components/approval/components/approvalPageConfig/baseConfig.vue.d.ts +10 -0
- package/dist/components/approval/components/approvalPageConfig/cellEdit.vue.d.ts +23 -0
- package/dist/components/approval/components/approvalPageConfig/configSync.vue.d.ts +76 -0
- package/dist/components/approval/components/approvalPageConfig/confirmInput.vue.d.ts +26 -0
- package/dist/components/approval/components/approvalPageConfig/defaultOperatorSelect.vue.d.ts +18 -0
- package/dist/components/approval/components/approvalPageConfig/index.vue.d.ts +11 -0
- package/dist/components/approval/components/approvalPageConfig/jsonConfig.vue.d.ts +16 -0
- package/dist/components/approval/components/approvalPageConfig/layoutSetting.vue.d.ts +9 -0
- package/dist/components/approval/components/approvalPageConfig/leftColumn.vue.d.ts +1184 -0
- package/dist/components/approval/components/approvalPageConfig/middleColumn.vue.d.ts +145 -0
- package/dist/components/approval/components/approvalPageConfig/operatorSelect.vue.d.ts +18 -0
- package/dist/components/approval/components/approvalPageConfig/searchConfig.vue.d.ts +166 -0
- package/dist/components/approval/components/approvalPageConfig/tableConfig.vue.d.ts +802 -0
- package/dist/components/approval/components/codeHistory/codeHistory.vue.d.ts +53 -0
- package/dist/components/approval/components/codeHistory/codeHistoryViewModal.vue.d.ts +32 -0
- package/dist/components/approval/components/columnDataList.vue.d.ts +454 -0
- package/dist/components/approval/components/columnForm.vue.d.ts +26 -0
- package/dist/components/approval/components/columnTables.vue.d.ts +502 -0
- package/dist/components/approval/components/columnUnknown.vue.d.ts +2 -0
- package/dist/components/approval/components/dataStoreConfig/ConditionConfig.vue.d.ts +199 -0
- package/dist/components/approval/components/dataStoreConfig/ValueInput.vue.d.ts +37 -0
- package/dist/components/approval/components/dataStoreConfig/dataSourceDetial.vue.d.ts +22 -0
- package/dist/components/approval/components/dataStoreConfig/dataStoreConfig.vue.d.ts +554 -0
- package/dist/components/approval/components/dataStoreConfig/dataStoreConfigItem.vue.d.ts +434 -0
- package/dist/components/approval/components/dataStoreConfig/dataStoreTest.vue.d.ts +39 -0
- package/dist/components/approval/components/dataStoreConfig/dataStoreTestsItem.vue.d.ts +17 -0
- package/dist/components/approval/components/dataStoreConfig/formField.vue.d.ts +28 -0
- package/dist/components/approval/components/dataStoreConfig/formFieldMulType.vue.d.ts +96 -0
- package/dist/components/approval/components/dataStoreConfig/selectExcelColumn.vue.d.ts +26 -0
- package/dist/components/approval/components/dataStoreConfig/selectExcelType.vue.d.ts +28 -0
- package/dist/components/approval/components/debugCode/debugCode.vue.d.ts +214 -0
- package/dist/components/approval/components/drawerDataList.vue.d.ts +504 -0
- package/dist/components/approval/components/drawerTablesList.vue.d.ts +551 -0
- package/dist/components/approval/components/flowConfig/flowConfig.vue.d.ts +1097 -0
- package/dist/components/approval/components/flowConfig/selectCcGroup.vue.d.ts +9 -0
- package/dist/components/approval/components/flowConfig/selectUsers.vue.d.ts +9 -0
- package/dist/components/approval/components/modelTablesList.vue.d.ts +551 -0
- package/dist/components/approval/components/pageConfigHistory.vue.d.ts +2 -0
- package/dist/components/approval/components/search.vue.d.ts +238 -0
- package/dist/components/approval/components/searchSummary.vue.d.ts +100 -0
- package/dist/components/approval/components/table.vue.d.ts +416 -0
- package/dist/components/approval/components/tableModal.vue.d.ts +84 -0
- package/dist/components/approval/configs/approval/default.d.ts +11 -0
- package/dist/components/approval/configs/approval/recordActions.d.ts +22 -0
- package/dist/components/approval/core.vue.d.ts +53 -0
- package/dist/components/approval/example_code/example_code.d.ts +11 -0
- package/dist/components/approval/index.d.ts +18 -0
- package/dist/components/approval/index.vue.d.ts +2 -0
- package/dist/components/approval/migrate/index.d.ts +1 -0
- package/dist/components/approval/migrate/v0001.d.ts +2 -0
- package/dist/components/approval/store/context.d.ts +48 -0
- package/dist/components/approval/store/debugCode.d.ts +7 -0
- package/dist/components/approval/store/settingsState.d.ts +15 -0
- package/dist/components/approval/typing.d.ts +210 -0
- package/dist/components/approval/useApprovalRecordActions.d.ts +83 -0
- package/dist/components/approval/utils.d.ts +164 -0
- package/dist/components/approval_for_details.vue.d.ts +9 -0
- package/dist/components/flow/ElInputTag/index.vue.d.ts +46 -0
- package/dist/components/flow/Expression/index.vue.d.ts +48 -0
- package/dist/components/flow/Role/index.vue.d.ts +68 -0
- package/dist/components/flow/User/index.vue.d.ts +76 -0
- package/dist/config/packed-config.d.ts +26 -0
- package/dist/constants.d.ts +1 -0
- package/dist/core-BOc9ch_5.js +1631 -0
- package/dist/core-BOc9ch_5.js.map +1 -0
- package/dist/dataStoreSettingHistoryViewModal-D_so-KLp.js +114 -0
- package/dist/dataStoreSettingHistoryViewModal-D_so-KLp.js.map +1 -0
- package/dist/debugCode-Cm9-WiUG.js +565 -0
- package/dist/debugCode-Cm9-WiUG.js.map +1 -0
- package/dist/debugCode-dD1YnQSD.js +11 -0
- package/dist/debugCode-dD1YnQSD.js.map +1 -0
- package/dist/default-VdDMlY4e.js +560 -0
- package/dist/default-VdDMlY4e.js.map +1 -0
- package/dist/example_code-C_xF8RRG.js +129 -0
- package/dist/example_code-C_xF8RRG.js.map +1 -0
- package/dist/flowHistoryViewModal-D8DJP7Te.js +109 -0
- package/dist/flowHistoryViewModal-D8DJP7Te.js.map +1 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +507 -26691
- package/dist/index.js.map +1 -1
- package/dist/init-plugin-fQTSQzui.js +48 -0
- package/dist/init-plugin-fQTSQzui.js.map +1 -0
- package/dist/init-plugin.d.ts +57 -0
- package/dist/leftColumn-CsPjufue.js +209 -0
- package/dist/leftColumn-CsPjufue.js.map +1 -0
- package/dist/lyflowchart.css +1 -1
- package/dist/middleColumn-C7M6-eVo.js +107 -0
- package/dist/middleColumn-C7M6-eVo.js.map +1 -0
- package/dist/recordActions-BgFlNsGU.js +51 -0
- package/dist/recordActions-BgFlNsGU.js.map +1 -0
- package/dist/settingsState-CI81PG-i.js +19 -0
- package/dist/settingsState-CI81PG-i.js.map +1 -0
- package/dist/style.d.ts +3 -0
- package/dist/styles.d.ts +7 -0
- package/dist/tableConfig-uLXue-BS.js +2408 -0
- package/dist/tableConfig-uLXue-BS.js.map +1 -0
- package/dist/tableModal-BcYfVL02.js +124 -0
- package/dist/tableModal-BcYfVL02.js.map +1 -0
- package/dist/useApprovalRecordActions-BQ6MgV2L.js +843 -0
- package/dist/useApprovalRecordActions-BQ6MgV2L.js.map +1 -0
- package/dist/utils/StrUtil.d.ts +52 -0
- package/dist/utils/function.d.ts +8 -0
- package/dist/utils-CLet2gLV.js +420 -0
- package/dist/utils-CLet2gLV.js.map +1 -0
- package/dist/v0001-OaBeBCXI.js +4 -0
- package/dist/v0001-OaBeBCXI.js.map +1 -0
- package/dist/{Cell_click_data_source-C8WEsBGB.js → viewer-Dv3kQsMf.js} +1839 -2724
- package/dist/viewer-Dv3kQsMf.js.map +1 -0
- package/dist/vue-print-next-HRweUmNi.js +683 -0
- package/dist/vue-print-next-HRweUmNi.js.map +1 -0
- package/package.json +39 -8
- package/dist/Cell_click_data_source-C8WEsBGB.js.map +0 -1
|
@@ -0,0 +1,1272 @@
|
|
|
1
|
+
import { a as e, o as t, v as n } from "./init-plugin-fQTSQzui.js";
|
|
2
|
+
import { C as r, D as i, O as a, _ as o, b as s, g as c, h as l, m as u, o as d, u as f, x as p, y as m } from "./utils-CLet2gLV.js";
|
|
3
|
+
import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as x, createTextVNode as S, createVNode as C, defineComponent as w, normalizeClass as T, onMounted as ee, onUnmounted as te, openBlock as E, reactive as D, ref as O, renderList as k, resolveComponent as A, resolveDynamicComponent as j, toDisplayString as M, unref as N, watch as P, withCtx as F } from "vue";
|
|
4
|
+
import { message as ne } from "ant-design-vue";
|
|
5
|
+
import { cloneDeep as I, debounce as L, isArray as re, isEqual as R } from "lodash";
|
|
6
|
+
import { useI18n as z } from "vue-i18n";
|
|
7
|
+
import B from "moment";
|
|
8
|
+
import ie from "mitt";
|
|
9
|
+
import { useResizeObserver as V } from "@vueuse/core";
|
|
10
|
+
import { defineStore as H } from "pinia";
|
|
11
|
+
//#region src/components/approval/components/searchSummary.vue?vue&type=script&lang.ts
|
|
12
|
+
var U = w({
|
|
13
|
+
name: "searchSummary",
|
|
14
|
+
props: {
|
|
15
|
+
searchConfig: {
|
|
16
|
+
type: Array,
|
|
17
|
+
required: !0
|
|
18
|
+
},
|
|
19
|
+
searchConditions: {
|
|
20
|
+
type: Array,
|
|
21
|
+
required: !0
|
|
22
|
+
},
|
|
23
|
+
eventBus: {
|
|
24
|
+
type: Object,
|
|
25
|
+
required: !1
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:searchConditions"],
|
|
29
|
+
setup(e, { emit: t }) {
|
|
30
|
+
let n = r(), { t: a } = z(), o = (e, t, r) => {
|
|
31
|
+
let i = [], o;
|
|
32
|
+
if (t === "is_or_not_blank_or_null" || t === "is_or_not_null") return a(r === "yes" ? "is_or_not_blank_or_null.yes" : "is_or_not_blank_or_null.no");
|
|
33
|
+
if (t === "_eq") {
|
|
34
|
+
if ([
|
|
35
|
+
"上月",
|
|
36
|
+
"本月",
|
|
37
|
+
"今日",
|
|
38
|
+
"昨日",
|
|
39
|
+
"期初"
|
|
40
|
+
].includes(r)) return a(r);
|
|
41
|
+
} else if (e.options instanceof Array) return r instanceof Array ? (r.forEach((t) => {
|
|
42
|
+
e.options.forEach((e) => {
|
|
43
|
+
t == e.value && i.push(e.label);
|
|
44
|
+
});
|
|
45
|
+
}), `${n[t]} ${i.join(",")}`) : (e.options.forEach((e) => {
|
|
46
|
+
r == e.value && (o = e.label);
|
|
47
|
+
}), `${n[t]} ${o}`);
|
|
48
|
+
else if (e.type == "monthpicker" && e.dateFormat) {
|
|
49
|
+
if (r instanceof Array) {
|
|
50
|
+
let t = [];
|
|
51
|
+
r.forEach((n) => {
|
|
52
|
+
n ? t.push(B(n).format(e.dateFormat)) : t.push(n);
|
|
53
|
+
}), o = t.join(",");
|
|
54
|
+
} else o = B(r).format(e.dateFormat);
|
|
55
|
+
return `${n[t]} ${o}`;
|
|
56
|
+
} else return `${n[t]} ${r}`;
|
|
57
|
+
};
|
|
58
|
+
return {
|
|
59
|
+
dataSource: g(() => {
|
|
60
|
+
let t = {};
|
|
61
|
+
for (let n of e.searchConditions) t[n.field_name] = {
|
|
62
|
+
value: n.value,
|
|
63
|
+
operator: n.operator
|
|
64
|
+
};
|
|
65
|
+
return e.searchConfig?.map((e) => {
|
|
66
|
+
let n = t[e.field_name] || {
|
|
67
|
+
operator: e.default_operator || "eq",
|
|
68
|
+
value: null
|
|
69
|
+
}, r = null;
|
|
70
|
+
return n.value instanceof Array && n.value.length > 0 && !n.value.some((e) => i(e)) && (r = `${e.label}: ${o(e, n.operator, n.value)}`), {
|
|
71
|
+
field_name: e.field_name,
|
|
72
|
+
summary: r
|
|
73
|
+
};
|
|
74
|
+
}).filter((e) => e.summary);
|
|
75
|
+
}),
|
|
76
|
+
handleClose: (n) => {
|
|
77
|
+
t("update:searchConditions", e.searchConditions.filter((e) => e.field_name !== n));
|
|
78
|
+
},
|
|
79
|
+
handleRefresh: () => {
|
|
80
|
+
e.eventBus.emit("refresh");
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
components: {}
|
|
85
|
+
}), W = { class: "search-summary" };
|
|
86
|
+
function G(e, t, n, r, i, a) {
|
|
87
|
+
let o = A("a-tag"), s = A("RedoOutlined"), c = A("a-button");
|
|
88
|
+
return E(), y("span", W, [(E(!0), y(h, null, k(e.dataSource, (t) => (E(), _(o, {
|
|
89
|
+
key: t.field_name,
|
|
90
|
+
color: "green",
|
|
91
|
+
closable: "",
|
|
92
|
+
onClose: (n) => e.handleClose(t.field_name)
|
|
93
|
+
}, {
|
|
94
|
+
default: F(() => [S(M(t.summary), 1)]),
|
|
95
|
+
_: 2
|
|
96
|
+
}, 1032, ["onClose"]))), 128)), C(c, {
|
|
97
|
+
size: "small",
|
|
98
|
+
type: "text",
|
|
99
|
+
onClick: e.handleRefresh
|
|
100
|
+
}, {
|
|
101
|
+
default: F(() => [C(s)]),
|
|
102
|
+
_: 1
|
|
103
|
+
}, 8, ["onClick"])]);
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/components/approval/components/search.vue?vue&type=script&lang.ts
|
|
107
|
+
var K = w({
|
|
108
|
+
name: "Search",
|
|
109
|
+
props: {
|
|
110
|
+
searchConfig: {
|
|
111
|
+
type: Array,
|
|
112
|
+
required: !0
|
|
113
|
+
},
|
|
114
|
+
searchConditions: {
|
|
115
|
+
type: Array,
|
|
116
|
+
required: !0
|
|
117
|
+
},
|
|
118
|
+
eventBus: {
|
|
119
|
+
type: Object,
|
|
120
|
+
required: !1
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
emits: ["update:searchConditions"],
|
|
124
|
+
setup(e, { emit: t }) {
|
|
125
|
+
let n = r(), { t: o } = z(), c = O(!0), l = O({}), d = O({}), f = O({}), p = O([{
|
|
126
|
+
value: "yes",
|
|
127
|
+
label: o("is_or_not_blank_or_null.yes")
|
|
128
|
+
}, {
|
|
129
|
+
value: "no",
|
|
130
|
+
label: o("is_or_not_blank_or_null.no")
|
|
131
|
+
}]);
|
|
132
|
+
return {
|
|
133
|
+
isShowForm: c,
|
|
134
|
+
searchModel: l,
|
|
135
|
+
dataSource: g(() => {
|
|
136
|
+
let t = {};
|
|
137
|
+
for (let n of e.searchConditions) t[n.field_name] = {
|
|
138
|
+
value: n.value,
|
|
139
|
+
operator: n.operator
|
|
140
|
+
};
|
|
141
|
+
return e.searchConfig?.map((e) => {
|
|
142
|
+
let n = t[e.field_name] || {
|
|
143
|
+
operator: e.default_operator || "eq",
|
|
144
|
+
value: null
|
|
145
|
+
}, r = n.value;
|
|
146
|
+
return a(n.value) && u(n.operator, e) === 1 && r instanceof Array && (r = r[0]), d.value[e.field_name] = r, {
|
|
147
|
+
...e,
|
|
148
|
+
value: n.value,
|
|
149
|
+
operator: n.operator,
|
|
150
|
+
model: "default"
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
}),
|
|
154
|
+
onChange: (n, r, o, s = void 0) => {
|
|
155
|
+
let c = I(e.searchConditions), l = e.searchConfig.find((e) => e.field_name === n), d, f, p = c.find((e) => e.field_name === n);
|
|
156
|
+
if (r === "value") if (f = p ? p.operator : l?.default_operator || "eq", s !== void 0) {
|
|
157
|
+
let e = u(o, l);
|
|
158
|
+
if (p) {
|
|
159
|
+
if (d = p.value, i(d) || !(d instanceof Array)) {
|
|
160
|
+
d = [];
|
|
161
|
+
for (let t = 0; t < e; t++) d.push(null);
|
|
162
|
+
}
|
|
163
|
+
d[s] = o;
|
|
164
|
+
} else {
|
|
165
|
+
d = [];
|
|
166
|
+
for (let t = 0; t < e; t++) d.push(null);
|
|
167
|
+
d[s] = o;
|
|
168
|
+
}
|
|
169
|
+
} else a(o) && !(o instanceof Array) && (o = [o]), d = o;
|
|
170
|
+
else if (r === "operator") {
|
|
171
|
+
f = o;
|
|
172
|
+
let e = u(o, l);
|
|
173
|
+
if (e) {
|
|
174
|
+
d = [];
|
|
175
|
+
for (let t = 0; t < e; t++) d.push(null);
|
|
176
|
+
} else d = void 0;
|
|
177
|
+
}
|
|
178
|
+
if (p) p.operator = f, p.value = d;
|
|
179
|
+
else {
|
|
180
|
+
let e = "input", t = "str";
|
|
181
|
+
l && (e = l.format || "input", t = l.class_name || "str"), p = {
|
|
182
|
+
field_name: n,
|
|
183
|
+
value: d,
|
|
184
|
+
operator: f,
|
|
185
|
+
format: e,
|
|
186
|
+
class_name: t
|
|
187
|
+
}, c.push(p);
|
|
188
|
+
}
|
|
189
|
+
t("update:searchConditions", c);
|
|
190
|
+
},
|
|
191
|
+
operator_type_map: n,
|
|
192
|
+
formModel: d,
|
|
193
|
+
is_or_not_blank_or_null_options: p,
|
|
194
|
+
validateInfos: f,
|
|
195
|
+
options_for_date_eq: s,
|
|
196
|
+
handleUpdateSearchConditions: (e) => {
|
|
197
|
+
t("update:searchConditions", e);
|
|
198
|
+
},
|
|
199
|
+
handleRefresh: () => {
|
|
200
|
+
e.eventBus.emit("refresh");
|
|
201
|
+
},
|
|
202
|
+
getValue: (e) => {
|
|
203
|
+
let t = u(e.operator, e), n = e.value;
|
|
204
|
+
if (t == 1) return n instanceof Array ? n[0] || void 0 : n || void 0;
|
|
205
|
+
if (t == 2) if (n instanceof Array) {
|
|
206
|
+
let [e, t] = n;
|
|
207
|
+
return [e, t];
|
|
208
|
+
} else if (n) return [n, null];
|
|
209
|
+
else return [null, null];
|
|
210
|
+
else return n;
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
components: { searchSummary: /* @__PURE__ */ n(U, [["render", G], ["__scopeId", "data-v-af740a0c"]]) }
|
|
215
|
+
}), q = { class: "search-switch" }, J = { class: "expand-btn" }, Y = { class: "btn-content" };
|
|
216
|
+
function X(e, t, n, r, i, a) {
|
|
217
|
+
let o = A("a-button"), s = A("search-summary"), c = A("a-select-option"), l = A("a-select"), u = A("SmallTableSerarchField"), d = A("a-input-group"), f = A("a-form-item"), p = A("a-form");
|
|
218
|
+
return E(), y(h, null, [
|
|
219
|
+
b("span", q, [e.isShowForm ? (E(), _(o, {
|
|
220
|
+
key: 1,
|
|
221
|
+
type: "link",
|
|
222
|
+
size: "small",
|
|
223
|
+
onClick: t[1] ||= (t) => e.isShowForm = !1
|
|
224
|
+
}, {
|
|
225
|
+
default: F(() => [S(M(e.$t("隐藏")), 1)]),
|
|
226
|
+
_: 1
|
|
227
|
+
})) : (E(), _(o, {
|
|
228
|
+
key: 0,
|
|
229
|
+
type: "link",
|
|
230
|
+
size: "small",
|
|
231
|
+
onClick: t[0] ||= (t) => e.isShowForm = !0
|
|
232
|
+
}, {
|
|
233
|
+
default: F(() => [b("span", J, M(e.$t("展开")), 1)]),
|
|
234
|
+
_: 1
|
|
235
|
+
}))]),
|
|
236
|
+
e.isShowForm ? v("", !0) : (E(), _(s, {
|
|
237
|
+
key: 0,
|
|
238
|
+
"search-conditions": e.searchConditions,
|
|
239
|
+
"search-config": e.searchConfig,
|
|
240
|
+
"event-bus": e.eventBus,
|
|
241
|
+
"onUpdate:searchConditions": e.handleUpdateSearchConditions
|
|
242
|
+
}, null, 8, [
|
|
243
|
+
"search-conditions",
|
|
244
|
+
"search-config",
|
|
245
|
+
"event-bus",
|
|
246
|
+
"onUpdate:searchConditions"
|
|
247
|
+
])),
|
|
248
|
+
e.isShowForm ? (E(), y(h, { key: 1 }, [C(p, { layout: "inline" }, {
|
|
249
|
+
default: F(() => [(E(!0), y(h, null, k(e.dataSource, (n, r) => (E(), _(f, {
|
|
250
|
+
key: n.field_name,
|
|
251
|
+
label: n.label
|
|
252
|
+
}, {
|
|
253
|
+
default: F(() => [C(d, {
|
|
254
|
+
compact: "",
|
|
255
|
+
size: "small"
|
|
256
|
+
}, {
|
|
257
|
+
default: F(() => [n.operator_list.length > 0 ? (E(), _(l, {
|
|
258
|
+
key: 0,
|
|
259
|
+
dropdownMatchSelectWidth: !1,
|
|
260
|
+
value: n.operator,
|
|
261
|
+
onChange: (t) => e.onChange(n.field_name, "operator", t),
|
|
262
|
+
size: "small"
|
|
263
|
+
}, {
|
|
264
|
+
default: F(() => [(E(!0), y(h, null, k(n.operator_list, (t) => (E(), _(c, {
|
|
265
|
+
value: t,
|
|
266
|
+
key: t
|
|
267
|
+
}, {
|
|
268
|
+
default: F(() => [S(M(e.operator_type_map[t]), 1)]),
|
|
269
|
+
_: 2
|
|
270
|
+
}, 1032, ["value"]))), 128))]),
|
|
271
|
+
_: 2
|
|
272
|
+
}, 1032, ["value", "onChange"])) : v("", !0), ["is_or_not_blank_or_null", "is_or_not_null"].includes(n.operator) ? (E(), _(u, {
|
|
273
|
+
key: 1,
|
|
274
|
+
is_show_label: !1,
|
|
275
|
+
label: n.field_name,
|
|
276
|
+
value: e.getValue(n),
|
|
277
|
+
field: {
|
|
278
|
+
...n,
|
|
279
|
+
type: "select",
|
|
280
|
+
mode: "default",
|
|
281
|
+
format: "choices",
|
|
282
|
+
class_name: "str",
|
|
283
|
+
placeholder: ""
|
|
284
|
+
},
|
|
285
|
+
formModel: e.formModel,
|
|
286
|
+
options: e.is_or_not_blank_or_null_options,
|
|
287
|
+
validateInfos: e.validateInfos,
|
|
288
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t)
|
|
289
|
+
}, null, 8, [
|
|
290
|
+
"label",
|
|
291
|
+
"value",
|
|
292
|
+
"field",
|
|
293
|
+
"formModel",
|
|
294
|
+
"options",
|
|
295
|
+
"validateInfos",
|
|
296
|
+
"onUpdate:value"
|
|
297
|
+
])) : ["input"].includes(n.format) ? (E(), y(h, { key: 2 }, [n.operator === "between" || n.operator === "notbetween" ? (E(), y(h, { key: 0 }, [n.type === "datepicker" ? (E(), _(u, {
|
|
298
|
+
key: 0,
|
|
299
|
+
is_show_label: !1,
|
|
300
|
+
label: n.field_name,
|
|
301
|
+
value: e.getValue(n),
|
|
302
|
+
field: {
|
|
303
|
+
...n,
|
|
304
|
+
type: "rangepicker",
|
|
305
|
+
format: n.dateFormat
|
|
306
|
+
},
|
|
307
|
+
formModel: e.formModel,
|
|
308
|
+
validateInfos: e.validateInfos,
|
|
309
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t)
|
|
310
|
+
}, null, 8, [
|
|
311
|
+
"label",
|
|
312
|
+
"value",
|
|
313
|
+
"field",
|
|
314
|
+
"formModel",
|
|
315
|
+
"validateInfos",
|
|
316
|
+
"onUpdate:value"
|
|
317
|
+
])) : n.type === "monthpicker" ? (E(), _(u, {
|
|
318
|
+
key: 1,
|
|
319
|
+
is_show_label: !1,
|
|
320
|
+
label: n.field_name,
|
|
321
|
+
value: e.getValue(n),
|
|
322
|
+
field: {
|
|
323
|
+
...n,
|
|
324
|
+
type: "monthrangepicker"
|
|
325
|
+
},
|
|
326
|
+
formModel: e.formModel,
|
|
327
|
+
validateInfos: e.validateInfos,
|
|
328
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t)
|
|
329
|
+
}, null, 8, [
|
|
330
|
+
"label",
|
|
331
|
+
"value",
|
|
332
|
+
"field",
|
|
333
|
+
"formModel",
|
|
334
|
+
"validateInfos",
|
|
335
|
+
"onUpdate:value"
|
|
336
|
+
])) : (E(), y(h, { key: 2 }, [
|
|
337
|
+
C(u, {
|
|
338
|
+
is_show_label: !1,
|
|
339
|
+
label: n.field_name,
|
|
340
|
+
value: n.value?.[0],
|
|
341
|
+
field: n,
|
|
342
|
+
formModel: e.formModel,
|
|
343
|
+
options: n.options,
|
|
344
|
+
validateInfos: e.validateInfos,
|
|
345
|
+
field_width: 70,
|
|
346
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t, 0)
|
|
347
|
+
}, null, 8, [
|
|
348
|
+
"label",
|
|
349
|
+
"value",
|
|
350
|
+
"field",
|
|
351
|
+
"formModel",
|
|
352
|
+
"options",
|
|
353
|
+
"validateInfos",
|
|
354
|
+
"onUpdate:value"
|
|
355
|
+
]),
|
|
356
|
+
t[2] ||= b("span", { class: "range" }, "~", -1),
|
|
357
|
+
C(u, {
|
|
358
|
+
is_show_label: !1,
|
|
359
|
+
label: n.field_name,
|
|
360
|
+
value: n.value?.[1],
|
|
361
|
+
field: n,
|
|
362
|
+
formModel: e.formModel,
|
|
363
|
+
options: n.options,
|
|
364
|
+
validateInfos: e.validateInfos,
|
|
365
|
+
field_width: 70,
|
|
366
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t, 1)
|
|
367
|
+
}, null, 8, [
|
|
368
|
+
"label",
|
|
369
|
+
"value",
|
|
370
|
+
"field",
|
|
371
|
+
"formModel",
|
|
372
|
+
"options",
|
|
373
|
+
"validateInfos",
|
|
374
|
+
"onUpdate:value"
|
|
375
|
+
])
|
|
376
|
+
], 64))], 64)) : n.operator === "_eq" ? (E(), _(u, {
|
|
377
|
+
key: 1,
|
|
378
|
+
is_show_label: !1,
|
|
379
|
+
label: n.field_name,
|
|
380
|
+
value: e.getValue(n),
|
|
381
|
+
field: {
|
|
382
|
+
...n,
|
|
383
|
+
type: "select",
|
|
384
|
+
mode: "default",
|
|
385
|
+
format: "choices",
|
|
386
|
+
class_name: "str",
|
|
387
|
+
placeholder: ""
|
|
388
|
+
},
|
|
389
|
+
formModel: e.formModel,
|
|
390
|
+
options: e.options_for_date_eq,
|
|
391
|
+
validateInfos: e.validateInfos,
|
|
392
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t)
|
|
393
|
+
}, null, 8, [
|
|
394
|
+
"label",
|
|
395
|
+
"value",
|
|
396
|
+
"field",
|
|
397
|
+
"formModel",
|
|
398
|
+
"options",
|
|
399
|
+
"validateInfos",
|
|
400
|
+
"onUpdate:value"
|
|
401
|
+
])) : n.type === "datepicker" || n.type === "monthpicker" ? (E(), _(u, {
|
|
402
|
+
key: 2,
|
|
403
|
+
is_show_label: !1,
|
|
404
|
+
label: n.field_name,
|
|
405
|
+
value: e.getValue(n),
|
|
406
|
+
field: {
|
|
407
|
+
...n,
|
|
408
|
+
format: n.dateFormat
|
|
409
|
+
},
|
|
410
|
+
formModel: e.formModel,
|
|
411
|
+
options: n.options,
|
|
412
|
+
validateInfos: e.validateInfos,
|
|
413
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t)
|
|
414
|
+
}, null, 8, [
|
|
415
|
+
"label",
|
|
416
|
+
"value",
|
|
417
|
+
"field",
|
|
418
|
+
"formModel",
|
|
419
|
+
"options",
|
|
420
|
+
"validateInfos",
|
|
421
|
+
"onUpdate:value"
|
|
422
|
+
])) : (E(), _(u, {
|
|
423
|
+
key: 3,
|
|
424
|
+
is_show_label: !1,
|
|
425
|
+
label: n.field_name,
|
|
426
|
+
value: e.getValue(n),
|
|
427
|
+
field: n,
|
|
428
|
+
formModel: e.formModel,
|
|
429
|
+
options: n.options,
|
|
430
|
+
validateInfos: e.validateInfos,
|
|
431
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t)
|
|
432
|
+
}, null, 8, [
|
|
433
|
+
"label",
|
|
434
|
+
"value",
|
|
435
|
+
"field",
|
|
436
|
+
"formModel",
|
|
437
|
+
"options",
|
|
438
|
+
"validateInfos",
|
|
439
|
+
"onUpdate:value"
|
|
440
|
+
]))], 64)) : ["choices", "remote"].includes(n.format) ? (E(), y(h, { key: 3 }, [n.format === "choices" ? (E(), _(u, {
|
|
441
|
+
key: 0,
|
|
442
|
+
is_show_label: !1,
|
|
443
|
+
label: n.field_name,
|
|
444
|
+
value: e.getValue(n),
|
|
445
|
+
field: n,
|
|
446
|
+
formModel: e.formModel,
|
|
447
|
+
options: n.options,
|
|
448
|
+
validateInfos: e.validateInfos,
|
|
449
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t)
|
|
450
|
+
}, null, 8, [
|
|
451
|
+
"label",
|
|
452
|
+
"value",
|
|
453
|
+
"field",
|
|
454
|
+
"formModel",
|
|
455
|
+
"options",
|
|
456
|
+
"validateInfos",
|
|
457
|
+
"onUpdate:value"
|
|
458
|
+
])) : n.format === "remote" ? (E(), _(u, {
|
|
459
|
+
key: 1,
|
|
460
|
+
is_show_label: !1,
|
|
461
|
+
label: n.field_name,
|
|
462
|
+
value: e.getValue(n),
|
|
463
|
+
field: {
|
|
464
|
+
...n,
|
|
465
|
+
name: n?.field_name
|
|
466
|
+
},
|
|
467
|
+
formModel: e.formModel,
|
|
468
|
+
options: n.options,
|
|
469
|
+
validateInfos: e.validateInfos,
|
|
470
|
+
"onUpdate:value": (t) => e.onChange(n.field_name, "value", t)
|
|
471
|
+
}, null, 8, [
|
|
472
|
+
"label",
|
|
473
|
+
"value",
|
|
474
|
+
"field",
|
|
475
|
+
"formModel",
|
|
476
|
+
"options",
|
|
477
|
+
"validateInfos",
|
|
478
|
+
"onUpdate:value"
|
|
479
|
+
])) : v("", !0)], 64)) : v("", !0)]),
|
|
480
|
+
_: 2
|
|
481
|
+
}, 1024)]),
|
|
482
|
+
_: 2
|
|
483
|
+
}, 1032, ["label"]))), 128))]),
|
|
484
|
+
_: 1
|
|
485
|
+
}), b("div", Y, [C(o, {
|
|
486
|
+
size: "small",
|
|
487
|
+
type: "primary",
|
|
488
|
+
onClick: e.handleRefresh
|
|
489
|
+
}, {
|
|
490
|
+
default: F(() => [...t[3] ||= [S(" 查询 ", -1)]]),
|
|
491
|
+
_: 1
|
|
492
|
+
}, 8, ["onClick"])])], 64)) : v("", !0)
|
|
493
|
+
], 64);
|
|
494
|
+
}
|
|
495
|
+
var Z = /* @__PURE__ */ n(K, [["render", X], ["__scopeId", "data-v-6db64c14"]]), Q = "SET_SEARCH_CONDITIONS", ae = "SET_SELECTED_ROWKEYS", oe = "SET_DATASOURCE", $ = "SET_FORM_MODEL", se = "SET_RAW", ce = "SET_CURRENT_HISTORY_ID", le = "SET_REQUST_HISTORY_ID", ue = "CLEAR_CONTEXT", de = "SET_EDIT", fe = "SET_CURRENT_FLOW_HISTORY_ID", pe = "SET_REQUST_FLOW_HISTORY_ID", me = "SET_GLOBAL_DATA", he = H("approval_context", {
|
|
496
|
+
persist: !1,
|
|
497
|
+
state: () => ({ contexts: null }),
|
|
498
|
+
actions: {
|
|
499
|
+
init(e) {
|
|
500
|
+
return this.contexts ||= {}, this.contexts[e] || (this.contexts[e] = {
|
|
501
|
+
tables: {},
|
|
502
|
+
formModel: null,
|
|
503
|
+
isEdit: !1,
|
|
504
|
+
editState: {},
|
|
505
|
+
globalData: {}
|
|
506
|
+
}), this.contexts[e];
|
|
507
|
+
},
|
|
508
|
+
initTable(e, t) {
|
|
509
|
+
let n = this.init(e);
|
|
510
|
+
return n.tables ||= {}, n.tables[t] || (n.tables[t] = {
|
|
511
|
+
searchConditions: [],
|
|
512
|
+
selectedRowKeys: [],
|
|
513
|
+
selectedRecord: [],
|
|
514
|
+
datasource: []
|
|
515
|
+
}), n.tables[t];
|
|
516
|
+
},
|
|
517
|
+
[Q](e, t, n) {
|
|
518
|
+
let r = this.initTable(e, t);
|
|
519
|
+
r.searchConditions = n;
|
|
520
|
+
},
|
|
521
|
+
[ae](e, t, n, r) {
|
|
522
|
+
let i = this.initTable(e, t);
|
|
523
|
+
i.selectedRowKeys = n, i.selectedRecord = r;
|
|
524
|
+
},
|
|
525
|
+
[oe](e, t, n) {
|
|
526
|
+
let r = this.initTable(e, t);
|
|
527
|
+
r.datasource = n;
|
|
528
|
+
},
|
|
529
|
+
[$](e, t) {
|
|
530
|
+
let n = this.init(e);
|
|
531
|
+
n.formModel = t;
|
|
532
|
+
},
|
|
533
|
+
[me](e, t) {
|
|
534
|
+
let n = this.init(e);
|
|
535
|
+
n.globalData = t;
|
|
536
|
+
},
|
|
537
|
+
[se](e, t) {
|
|
538
|
+
this.init(e), this.contexts[e] = {
|
|
539
|
+
...t,
|
|
540
|
+
current_history_id: this.contexts[e].current_history_id,
|
|
541
|
+
current_flow_history_id: this.contexts[e].current_flow_history_id
|
|
542
|
+
};
|
|
543
|
+
},
|
|
544
|
+
[ce](e, t) {
|
|
545
|
+
this.init(e), this.contexts[e].current_history_id = t;
|
|
546
|
+
},
|
|
547
|
+
[le](e, t) {
|
|
548
|
+
this.init(e), this.contexts[e].request_history_id = t;
|
|
549
|
+
},
|
|
550
|
+
[fe](e, t) {
|
|
551
|
+
this.init(e), this.contexts[e].current_flow_history_id = t;
|
|
552
|
+
},
|
|
553
|
+
[pe](e, t) {
|
|
554
|
+
this.init(e), this.contexts[e].request_flow_history_id = t;
|
|
555
|
+
},
|
|
556
|
+
[de](e, t, n) {
|
|
557
|
+
this.init(e), this.contexts[e].isEdit = t, this.contexts[e].editState = n;
|
|
558
|
+
},
|
|
559
|
+
[ue](e) {
|
|
560
|
+
delete this.contexts[e];
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}), ge = {
|
|
564
|
+
key: 1,
|
|
565
|
+
style: {
|
|
566
|
+
cursor: "pointer",
|
|
567
|
+
padding: "4px 16px"
|
|
568
|
+
}
|
|
569
|
+
}, _e = /* @__PURE__ */ n(/* @__PURE__ */ w({
|
|
570
|
+
name: "actionBar",
|
|
571
|
+
__name: "actionsBar",
|
|
572
|
+
props: {
|
|
573
|
+
actions: {},
|
|
574
|
+
action_width: { default: 70 },
|
|
575
|
+
params: { default: void 0 }
|
|
576
|
+
},
|
|
577
|
+
emits: ["click", "update:action_width"],
|
|
578
|
+
setup(t, { emit: n }) {
|
|
579
|
+
let r = t, i = n, a = O(null), o = O({}), s = O({}), c = g(() => r.actions.filter((e) => !e.is_dropdown));
|
|
580
|
+
V(a, (e) => {
|
|
581
|
+
i("update:action_width", e[0].contentRect.width);
|
|
582
|
+
});
|
|
583
|
+
let l = g(() => {
|
|
584
|
+
let e = {}, t = [];
|
|
585
|
+
for (let n of r.actions) n.is_dropdown && (e[n.group_name] || (e[n.group_name] = {
|
|
586
|
+
name: n.group_name,
|
|
587
|
+
children: []
|
|
588
|
+
}, t.push(e[n.group_name])), e[n.group_name].children.push(n));
|
|
589
|
+
return t;
|
|
590
|
+
}), u = () => {
|
|
591
|
+
let e = I(o.value), t = I(s.value);
|
|
592
|
+
for (let n of r.actions || []) e[n.action_code_id] = !0, t[n.action_code_id] = !1;
|
|
593
|
+
o.value = e, s.value = t;
|
|
594
|
+
}, f = L(async (t) => {
|
|
595
|
+
let n = I(o.value), i = I(s.value);
|
|
596
|
+
for (let a of r.actions || []) {
|
|
597
|
+
if (n[a.action_code_id] = !0, i[a.action_code_id] = !1, a.showCode?.enable && a.showCode?.code) try {
|
|
598
|
+
n[a.action_code_id] = await e(a.showCode?.code, {
|
|
599
|
+
...t,
|
|
600
|
+
settings: a.settings
|
|
601
|
+
});
|
|
602
|
+
} catch (e) {
|
|
603
|
+
console.error(e);
|
|
604
|
+
}
|
|
605
|
+
if (a.disableCode?.enable && a.disableCode?.code) try {
|
|
606
|
+
i[a.action_code_id] = await e(a.disableCode?.code, {
|
|
607
|
+
...t,
|
|
608
|
+
settings: a.settings
|
|
609
|
+
});
|
|
610
|
+
} catch (e) {
|
|
611
|
+
console.error(e);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
o.value = n, s.value = i;
|
|
615
|
+
}, 200);
|
|
616
|
+
P(() => [r.params, r.actions], (e, t) => {
|
|
617
|
+
e ||= [], t ||= [];
|
|
618
|
+
let n = e[0];
|
|
619
|
+
if (n === void 0) {
|
|
620
|
+
u();
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
n ||= {}, f(n);
|
|
624
|
+
}, {
|
|
625
|
+
deep: !0,
|
|
626
|
+
immediate: !0
|
|
627
|
+
});
|
|
628
|
+
let p = async (e) => {
|
|
629
|
+
i("click", e);
|
|
630
|
+
};
|
|
631
|
+
return (e, n) => {
|
|
632
|
+
let r = A("a-button"), i = A("debugCode"), u = A("a-menu-item"), f = A("a-menu"), m = A("DownOutlined"), g = A("a-dropdown");
|
|
633
|
+
return t.actions ? (E(), y("div", {
|
|
634
|
+
key: 0,
|
|
635
|
+
class: "actions",
|
|
636
|
+
ref_key: "rowActionTestRef",
|
|
637
|
+
ref: a
|
|
638
|
+
}, [(E(!0), y(h, null, k(c.value, (e, t) => (E(), _(i, {
|
|
639
|
+
key: t,
|
|
640
|
+
action_code_id: e.action_code_id,
|
|
641
|
+
code: e.code,
|
|
642
|
+
"onUpdate:code": (t) => e.code = t,
|
|
643
|
+
action: e.action,
|
|
644
|
+
"onUpdate:action": (t) => e.action = t,
|
|
645
|
+
showCode: e.showCode,
|
|
646
|
+
"onUpdate:showCode": (t) => e.showCode = t,
|
|
647
|
+
disableCode: e.disableCode,
|
|
648
|
+
"onUpdate:disableCode": (t) => e.disableCode = t,
|
|
649
|
+
options: N(d),
|
|
650
|
+
show: o.value[e.action_code_id]
|
|
651
|
+
}, {
|
|
652
|
+
default: F(() => [C(r, {
|
|
653
|
+
size: "small",
|
|
654
|
+
type: e.type,
|
|
655
|
+
danger: e.danger,
|
|
656
|
+
loading: !!e.loading,
|
|
657
|
+
onClick: (t) => p(e),
|
|
658
|
+
disabled: s.value[e.action_code_id]
|
|
659
|
+
}, {
|
|
660
|
+
default: F(() => [S(M(e.label), 1)]),
|
|
661
|
+
_: 2
|
|
662
|
+
}, 1032, [
|
|
663
|
+
"type",
|
|
664
|
+
"danger",
|
|
665
|
+
"loading",
|
|
666
|
+
"onClick",
|
|
667
|
+
"disabled"
|
|
668
|
+
])]),
|
|
669
|
+
_: 2
|
|
670
|
+
}, 1032, [
|
|
671
|
+
"action_code_id",
|
|
672
|
+
"code",
|
|
673
|
+
"onUpdate:code",
|
|
674
|
+
"action",
|
|
675
|
+
"onUpdate:action",
|
|
676
|
+
"showCode",
|
|
677
|
+
"onUpdate:showCode",
|
|
678
|
+
"disableCode",
|
|
679
|
+
"onUpdate:disableCode",
|
|
680
|
+
"options",
|
|
681
|
+
"show"
|
|
682
|
+
]))), 128)), (E(!0), y(h, null, k(l.value, (e) => (E(), _(g, null, {
|
|
683
|
+
overlay: F(() => [C(f, null, {
|
|
684
|
+
default: F(() => [(E(!0), y(h, null, k(e.children, (e, t) => (E(), _(i, {
|
|
685
|
+
key: t,
|
|
686
|
+
action_code_id: e.action_code_id,
|
|
687
|
+
code: e.code,
|
|
688
|
+
"onUpdate:code": (t) => e.code = t,
|
|
689
|
+
action: e.action,
|
|
690
|
+
"onUpdate:action": (t) => e.action = t,
|
|
691
|
+
showCode: e.showCode,
|
|
692
|
+
"onUpdate:showCode": (t) => e.showCode = t,
|
|
693
|
+
disableCode: e.disableCode,
|
|
694
|
+
"onUpdate:disableCode": (t) => e.disableCode = t,
|
|
695
|
+
options: N(d),
|
|
696
|
+
show: o.value[e.action_code_id]
|
|
697
|
+
}, {
|
|
698
|
+
default: F(() => [C(u, {
|
|
699
|
+
onClick: (t) => p(e),
|
|
700
|
+
disabled: s.value[e.action_code_id]
|
|
701
|
+
}, {
|
|
702
|
+
default: F(() => [S(M(e.label), 1)]),
|
|
703
|
+
_: 2
|
|
704
|
+
}, 1032, ["onClick", "disabled"])]),
|
|
705
|
+
_: 2
|
|
706
|
+
}, 1032, [
|
|
707
|
+
"action_code_id",
|
|
708
|
+
"code",
|
|
709
|
+
"onUpdate:code",
|
|
710
|
+
"action",
|
|
711
|
+
"onUpdate:action",
|
|
712
|
+
"showCode",
|
|
713
|
+
"onUpdate:showCode",
|
|
714
|
+
"disableCode",
|
|
715
|
+
"onUpdate:disableCode",
|
|
716
|
+
"options",
|
|
717
|
+
"show"
|
|
718
|
+
]))), 128))]),
|
|
719
|
+
_: 2
|
|
720
|
+
}, 1024)]),
|
|
721
|
+
default: F(() => [e.name ? (E(), _(r, {
|
|
722
|
+
key: 0,
|
|
723
|
+
size: "small"
|
|
724
|
+
}, {
|
|
725
|
+
default: F(() => [S(M(e.name) + " ", 1), C(m)]),
|
|
726
|
+
_: 2
|
|
727
|
+
}, 1024)) : (E(), y("div", ge, " · · · "))]),
|
|
728
|
+
_: 2
|
|
729
|
+
}, 1024))), 256))], 512)) : v("", !0);
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
}), [["__scopeId", "data-v-f2a8685c"]]), ve = 50, ye = w({
|
|
733
|
+
name: "ApprovalTable",
|
|
734
|
+
props: {
|
|
735
|
+
config: {
|
|
736
|
+
type: Object,
|
|
737
|
+
required: !0
|
|
738
|
+
},
|
|
739
|
+
modelType: {
|
|
740
|
+
type: String,
|
|
741
|
+
required: !1
|
|
742
|
+
},
|
|
743
|
+
eventBus: {
|
|
744
|
+
type: Object,
|
|
745
|
+
required: !1
|
|
746
|
+
},
|
|
747
|
+
approvalConfig: {
|
|
748
|
+
type: Object,
|
|
749
|
+
required: !1
|
|
750
|
+
},
|
|
751
|
+
rowSelectionType: {
|
|
752
|
+
type: String,
|
|
753
|
+
required: !1
|
|
754
|
+
},
|
|
755
|
+
hideAllButtons: {
|
|
756
|
+
type: Boolean,
|
|
757
|
+
default: !1
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
emits: ["selection-change"],
|
|
761
|
+
setup(e, { emit: n }) {
|
|
762
|
+
let r = he(), i = O([]), o = O([]), s = O(!1), c = ie(), u = O([]), d = null, m = O(null), h = O(null), _ = O(null), v = O(null), y = O(null), b = O(null), x = O(70), S = O({}), C = O([]), w = !1, T = !1, E = O([
|
|
763
|
+
"10",
|
|
764
|
+
"20",
|
|
765
|
+
"50",
|
|
766
|
+
"100",
|
|
767
|
+
"200",
|
|
768
|
+
"500",
|
|
769
|
+
"1000",
|
|
770
|
+
"3000",
|
|
771
|
+
"10000",
|
|
772
|
+
"50000",
|
|
773
|
+
"60000",
|
|
774
|
+
"70000"
|
|
775
|
+
]), k = D({
|
|
776
|
+
current: 1,
|
|
777
|
+
pageSize: ve,
|
|
778
|
+
total: 0
|
|
779
|
+
});
|
|
780
|
+
V(m, (e) => {
|
|
781
|
+
h.value = e[0].contentRect.height;
|
|
782
|
+
}), V(_, (e) => {
|
|
783
|
+
v.value = e[0].contentRect.height;
|
|
784
|
+
}), V(y, (e) => {
|
|
785
|
+
b.value = e[0].contentRect.height;
|
|
786
|
+
});
|
|
787
|
+
let A = () => !1, j = (t) => {
|
|
788
|
+
if (!t) return [];
|
|
789
|
+
let n = l(e.modelType), i = r.contexts?.[e.modelType] || {}, o = {};
|
|
790
|
+
for (let t of e.approvalConfig?.columns || []) if (t.type === "form") {
|
|
791
|
+
let e = t.form?.dynamicFieldList;
|
|
792
|
+
if (e) for (let t of e) for (let e of t.children || []) o[e.key] = e.name;
|
|
793
|
+
}
|
|
794
|
+
let s = (e) => {
|
|
795
|
+
let t = e.value;
|
|
796
|
+
if (e.value_type == "global") if (e.value?.length == 2) {
|
|
797
|
+
w = !0;
|
|
798
|
+
let n = i.globalData?.[e.value[0]]?.[e.value[1]];
|
|
799
|
+
t = n ? [n] : null;
|
|
800
|
+
} else t = null;
|
|
801
|
+
else if (e.value_type == "form") if (e.value?.length == 2) {
|
|
802
|
+
T = !0;
|
|
803
|
+
let n = i.formModel?.[o[e.value[1]]];
|
|
804
|
+
t = n ? [n] : null;
|
|
805
|
+
} else t = null;
|
|
806
|
+
else t = p(e.value, n);
|
|
807
|
+
return {
|
|
808
|
+
...e,
|
|
809
|
+
value_type: void 0,
|
|
810
|
+
value: t
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
return (t.length > 0 && Array.isArray(t[0]) ? t : [t]).map((e) => (Array.isArray(e) ? e : [e]).map(s).filter((e) => a(e.value))).filter((e) => e.length > 0);
|
|
814
|
+
}, M = async () => {
|
|
815
|
+
if (!e.config.list_url) return;
|
|
816
|
+
let n = Symbol();
|
|
817
|
+
d = n;
|
|
818
|
+
try {
|
|
819
|
+
s.value = !0;
|
|
820
|
+
let a = [];
|
|
821
|
+
try {
|
|
822
|
+
a = j(e.config.base_conditions);
|
|
823
|
+
} catch (e) {
|
|
824
|
+
console.error(e), ne.error(e instanceof Error ? e.message : String(e));
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
let o = f(u.value), c = [];
|
|
828
|
+
o.length > 0 && c.push({
|
|
829
|
+
op: "and",
|
|
830
|
+
children: o
|
|
831
|
+
}), a.length > 0 && c.push({
|
|
832
|
+
op: "and",
|
|
833
|
+
children: a
|
|
834
|
+
});
|
|
835
|
+
let l = e.config.columns?.map((e) => e.dataIndex), p = [];
|
|
836
|
+
for (let e of C.value) e.order == "descend" ? p.push("-" + e.key) : p.push(e.key);
|
|
837
|
+
let m = await t({
|
|
838
|
+
...e.config.query_params || {},
|
|
839
|
+
current: k.current,
|
|
840
|
+
pageSize: k.pageSize,
|
|
841
|
+
conditions: c,
|
|
842
|
+
column_fields: l,
|
|
843
|
+
sort_fields: p
|
|
844
|
+
}, e.config.list_url);
|
|
845
|
+
if (d !== n) return;
|
|
846
|
+
i.value = m.data, e.modelType && r[oe](e.modelType, e.config.id, i.value), k.current = m.current, k.total = m.total;
|
|
847
|
+
} finally {
|
|
848
|
+
if (d !== n) return;
|
|
849
|
+
s.value = !1;
|
|
850
|
+
}
|
|
851
|
+
}, N = L(M, 500), F = (e, t) => {
|
|
852
|
+
k.current == e && k.pageSize == t || (k.current = e || 1, k.pageSize = t || ve, M());
|
|
853
|
+
}, z = g(() => ({
|
|
854
|
+
type: e.rowSelectionType || e.config.rowSelectionType || "checkbox",
|
|
855
|
+
onChange: (t) => {
|
|
856
|
+
let n = i.value.filter((e) => t.includes(e.id));
|
|
857
|
+
e.modelType && r[ae](e.modelType, e.config.id, t, n);
|
|
858
|
+
}
|
|
859
|
+
}));
|
|
860
|
+
P(o, (e) => {
|
|
861
|
+
n("selection-change", (e || []).length);
|
|
862
|
+
}, {
|
|
863
|
+
deep: !0,
|
|
864
|
+
immediate: !0
|
|
865
|
+
});
|
|
866
|
+
let B = g(() => {
|
|
867
|
+
let t = {};
|
|
868
|
+
for (let e of u.value) ["in", "eq"].includes(e.operator) && (t[e.field_name] = e.value);
|
|
869
|
+
let n = S.value || {}, r = I(e.config.columns || []);
|
|
870
|
+
!r.some((e) => e.autoWidth) && r.length && (r[r.length - 1].autoWidth = !0);
|
|
871
|
+
let i = r.map((e) => e.autoWidth ? {
|
|
872
|
+
...e,
|
|
873
|
+
minWidth: e.width,
|
|
874
|
+
width: void 0,
|
|
875
|
+
filteredValue: t[e.dataIndex] || null,
|
|
876
|
+
sortOrder: n[e.dataIndex] || !1,
|
|
877
|
+
key: e.dataIndex
|
|
878
|
+
} : {
|
|
879
|
+
...e,
|
|
880
|
+
width: e.width,
|
|
881
|
+
minWidth: void 0,
|
|
882
|
+
filteredValue: t[e.dataIndex] || null,
|
|
883
|
+
sortOrder: n[e.dataIndex] || !1,
|
|
884
|
+
key: e.dataIndex
|
|
885
|
+
});
|
|
886
|
+
return e.config.row_actions && e.config.row_actions.length > 0 && !e.hideAllButtons ? [...i, {
|
|
887
|
+
title: "操作",
|
|
888
|
+
dataIndex: "_action",
|
|
889
|
+
width: x.value + 20,
|
|
890
|
+
resizable: !0,
|
|
891
|
+
fixed: "right"
|
|
892
|
+
}] : i;
|
|
893
|
+
}), H = () => {
|
|
894
|
+
M();
|
|
895
|
+
}, U = async (t, n) => {
|
|
896
|
+
if (!t.action) {
|
|
897
|
+
console.error("未定义action");
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
e.eventBus && e.eventBus.emit("run_action", {
|
|
901
|
+
code: t.code,
|
|
902
|
+
action: t,
|
|
903
|
+
params: {
|
|
904
|
+
table_id: e.config.id,
|
|
905
|
+
record: n,
|
|
906
|
+
context: r.contexts?.[e.modelType] || {},
|
|
907
|
+
settings: t.settings
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
}, W = (t, n) => {
|
|
911
|
+
let r = e.config && e.config.row_actions || [];
|
|
912
|
+
if (!r.length) return;
|
|
913
|
+
let i = r.find((e) => e.label === t);
|
|
914
|
+
if (!i) {
|
|
915
|
+
console.warn("cellComponent 触发的行按钮未找到:", t);
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
U(i, n);
|
|
919
|
+
}, G = ({ title: e, record: t }) => {
|
|
920
|
+
W(e, t);
|
|
921
|
+
}, K = async (t) => {
|
|
922
|
+
if (!t.action) {
|
|
923
|
+
console.error("未定义action");
|
|
924
|
+
return;
|
|
925
|
+
}
|
|
926
|
+
e.eventBus && e.eventBus.emit("run_action", {
|
|
927
|
+
code: t.code,
|
|
928
|
+
action: t,
|
|
929
|
+
params: {
|
|
930
|
+
table_id: e.config.id,
|
|
931
|
+
context: r.contexts?.[e.modelType] || {},
|
|
932
|
+
settings: t.settings
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
}, q = g(() => {
|
|
936
|
+
let e = h.value - v.value - b.value - 130;
|
|
937
|
+
return Z.value.length > 0 && (e -= 40), e;
|
|
938
|
+
}), J = async () => {
|
|
939
|
+
await M();
|
|
940
|
+
let t = r.contexts?.[e.modelType]?.tables?.[e.config.id]?.searchConditions;
|
|
941
|
+
t && (u.value = t);
|
|
942
|
+
}, Y = async () => {
|
|
943
|
+
J();
|
|
944
|
+
}, X = async () => {
|
|
945
|
+
await M();
|
|
946
|
+
}, Z = g(() => {
|
|
947
|
+
let e = [], t = 0;
|
|
948
|
+
for (let n of B.value) n.approve_summary && e.push({
|
|
949
|
+
index: t + 1,
|
|
950
|
+
cellSummaryComponent: n.cellSummaryComponent
|
|
951
|
+
}), t++;
|
|
952
|
+
return e;
|
|
953
|
+
});
|
|
954
|
+
return ee(async () => {
|
|
955
|
+
c.on("refresh", H), e.eventBus && (e.eventBus.on("reinit", Y), e.eventBus.on("reload_table", X), e.eventBus.on("cell_execute_row_action", G)), await J();
|
|
956
|
+
let t = e.config.columns.filter((e) => e.sorter && e.defaultSortOrder);
|
|
957
|
+
t.sort((e, t) => (e.defaultSortIndex || 0) - (t.defaultSortIndex || 0));
|
|
958
|
+
for (let e of t) S.value[e.dataIndex] = e.defaultSortOrder, C.value.push({
|
|
959
|
+
key: e.dataIndex,
|
|
960
|
+
order: e.defaultSortOrder
|
|
961
|
+
});
|
|
962
|
+
}), te(() => {
|
|
963
|
+
c.off("refresh", H), e.eventBus && (e.eventBus.off("reinit", Y), e.eventBus.off("reload_table", X), e.eventBus.off("cell_execute_row_action", G));
|
|
964
|
+
}), e.modelType && (P(() => u.value, (t, n) => {
|
|
965
|
+
R(f(t), f(n)) || (r[Q](e.modelType, e.config.id, t), N());
|
|
966
|
+
}, { deep: !0 }), P(() => I(r.contexts[e.modelType]?.globalData), (e, t) => {
|
|
967
|
+
!R(e, t) && w && N();
|
|
968
|
+
}, { deep: !0 }), P(() => I(r.contexts[e.modelType]?.formModel), (e, t) => {
|
|
969
|
+
!R(e, t) && T && N();
|
|
970
|
+
}, { deep: !0 })), {
|
|
971
|
+
dataSource: i,
|
|
972
|
+
selectedRowKeys: o,
|
|
973
|
+
loading: s,
|
|
974
|
+
state: k,
|
|
975
|
+
handlePageChange: F,
|
|
976
|
+
handleRowAction: U,
|
|
977
|
+
callRowActionByTitle: W,
|
|
978
|
+
pageSizeOptions: E,
|
|
979
|
+
columns: B,
|
|
980
|
+
searchConditions: u,
|
|
981
|
+
delayGetDate: N,
|
|
982
|
+
selfEventBus: c,
|
|
983
|
+
row_selection: z,
|
|
984
|
+
handleAction: K,
|
|
985
|
+
searchRef: _,
|
|
986
|
+
actionRef: y,
|
|
987
|
+
searchHeight: v,
|
|
988
|
+
actionHeight: b,
|
|
989
|
+
tableHeight: q,
|
|
990
|
+
rowActionWidth: x,
|
|
991
|
+
context: r,
|
|
992
|
+
summaryColumns: Z,
|
|
993
|
+
preserveRow: A,
|
|
994
|
+
handleChange: (e, t, n, r) => {
|
|
995
|
+
if (r.action !== "paginate") {
|
|
996
|
+
if (r.action === "filter") {
|
|
997
|
+
let e = {};
|
|
998
|
+
for (let t of u.value) e[t.field_name] = t;
|
|
999
|
+
for (let n of Object.keys(t)) {
|
|
1000
|
+
let r = t[n], i = e[n];
|
|
1001
|
+
i ? (r?.length > 1 ? i.operator = "in" : ["in", "eq"].includes(i.operator) || (i.operator = "in"), i.value = r) : e[n] = {
|
|
1002
|
+
field_name: n,
|
|
1003
|
+
operator: "eq",
|
|
1004
|
+
value: r,
|
|
1005
|
+
format: "input",
|
|
1006
|
+
class_name: "str"
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
u.value = Object.values(e), M();
|
|
1010
|
+
} else if (r.action === "sort") {
|
|
1011
|
+
let e = {}, t = [];
|
|
1012
|
+
if (!re(n)) e[n.columnKey] = n.order, t.push({
|
|
1013
|
+
key: n.columnKey,
|
|
1014
|
+
order: n.order
|
|
1015
|
+
});
|
|
1016
|
+
else for (let r of n) e[r.columnKey] = r.order, t.push({
|
|
1017
|
+
key: r.columnKey,
|
|
1018
|
+
order: r.order
|
|
1019
|
+
});
|
|
1020
|
+
S.value = e, C.value = t, M();
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
tableWraperHeight: h,
|
|
1025
|
+
tableWraperRef: m
|
|
1026
|
+
};
|
|
1027
|
+
},
|
|
1028
|
+
components: {
|
|
1029
|
+
Search: Z,
|
|
1030
|
+
actionsBar: _e
|
|
1031
|
+
}
|
|
1032
|
+
}), be = {
|
|
1033
|
+
class: "table-wraper",
|
|
1034
|
+
ref: "tableWraperRef"
|
|
1035
|
+
}, xe = { ref: "searchRef" }, Se = { key: 1 }, Ce = {
|
|
1036
|
+
ref: "actionRef",
|
|
1037
|
+
class: "btn-wraper"
|
|
1038
|
+
}, we = { style: {
|
|
1039
|
+
position: "fixed",
|
|
1040
|
+
width: "0",
|
|
1041
|
+
height: "0",
|
|
1042
|
+
display: "block",
|
|
1043
|
+
overflow: "hidden"
|
|
1044
|
+
} };
|
|
1045
|
+
function Te(e, t, n, r, i, a) {
|
|
1046
|
+
let o = A("Search"), s = A("actions-bar"), c = A("s-table-summary-cell"), l = A("s-table-summary-row"), u = A("s-table");
|
|
1047
|
+
return E(), y("div", be, [
|
|
1048
|
+
b("div", xe, [e.config.search_config ? (E(), _(o, {
|
|
1049
|
+
key: 0,
|
|
1050
|
+
searchConfig: e.config.search_config,
|
|
1051
|
+
searchConditions: e.searchConditions,
|
|
1052
|
+
"onUpdate:searchConditions": t[0] ||= (t) => e.searchConditions = t,
|
|
1053
|
+
"event-bus": e.selfEventBus
|
|
1054
|
+
}, null, 8, [
|
|
1055
|
+
"searchConfig",
|
|
1056
|
+
"searchConditions",
|
|
1057
|
+
"event-bus"
|
|
1058
|
+
])) : v("", !0)], 512),
|
|
1059
|
+
C(u, {
|
|
1060
|
+
columns: e.columns,
|
|
1061
|
+
selectedRowKeys: e.selectedRowKeys,
|
|
1062
|
+
"onUpdate:selectedRowKeys": t[1] ||= (t) => e.selectedRowKeys = t,
|
|
1063
|
+
"data-source": e.dataSource,
|
|
1064
|
+
bordered: !0,
|
|
1065
|
+
size: "small",
|
|
1066
|
+
scroll: {
|
|
1067
|
+
y: e.tableHeight,
|
|
1068
|
+
x: e.config.columns.length * 150
|
|
1069
|
+
},
|
|
1070
|
+
loading: e.loading,
|
|
1071
|
+
pagination: {
|
|
1072
|
+
current: e.state.current,
|
|
1073
|
+
pageSize: e.state.pageSize,
|
|
1074
|
+
total: e.state.total,
|
|
1075
|
+
onChange: e.handlePageChange,
|
|
1076
|
+
showSizeChanger: !0,
|
|
1077
|
+
pageSizeOptions: e.pageSizeOptions
|
|
1078
|
+
},
|
|
1079
|
+
rowKey: "id",
|
|
1080
|
+
rowSelection: e.row_selection,
|
|
1081
|
+
virtual: !0,
|
|
1082
|
+
wrapText: !0,
|
|
1083
|
+
sticky: "",
|
|
1084
|
+
stripe: "",
|
|
1085
|
+
"summary-fixed": "",
|
|
1086
|
+
"table-layout": "auto",
|
|
1087
|
+
preserveRow: e.preserveRow,
|
|
1088
|
+
onChange: e.handleChange
|
|
1089
|
+
}, x({
|
|
1090
|
+
bodyCell: F(({ column: t, index: n, text: r, record: i }) => [t.dataIndex == "index" ? (E(), y(h, { key: 0 }, [S(M(n + 1 + e.state.pageSize * (e.state.current - 1)), 1)], 64)) : t.dataIndex == "_action" ? (E(), _(s, {
|
|
1091
|
+
key: 1,
|
|
1092
|
+
actions: e.config.row_actions,
|
|
1093
|
+
onClick: (t) => e.handleRowAction(t, i),
|
|
1094
|
+
params: {
|
|
1095
|
+
table_id: e.config.id,
|
|
1096
|
+
record: i,
|
|
1097
|
+
context: e.context.contexts[e.modelType]
|
|
1098
|
+
}
|
|
1099
|
+
}, null, 8, [
|
|
1100
|
+
"actions",
|
|
1101
|
+
"onClick",
|
|
1102
|
+
"params"
|
|
1103
|
+
])) : t.cellComponent ? (E(), _(j("Cell_" + t.cellComponent), {
|
|
1104
|
+
key: 2,
|
|
1105
|
+
cmpObj: {
|
|
1106
|
+
column: t || {},
|
|
1107
|
+
index: n,
|
|
1108
|
+
text: r,
|
|
1109
|
+
dataSource: e.dataSource,
|
|
1110
|
+
record: i || {},
|
|
1111
|
+
pageSize: e.state.pageSize ? e.state.pageSize : 500,
|
|
1112
|
+
current: e.state.current ? e.state.current : 1,
|
|
1113
|
+
eventBus: e.eventBus,
|
|
1114
|
+
call_cell_row_action: (t) => e.callRowActionByTitle(t, i)
|
|
1115
|
+
}
|
|
1116
|
+
}, null, 8, ["cmpObj"])) : (E(), y(h, { key: 3 }, [S(M(r), 1)], 64))]),
|
|
1117
|
+
_: 2
|
|
1118
|
+
}, [e.summaryColumns.length > 0 ? {
|
|
1119
|
+
name: "summary",
|
|
1120
|
+
fn: F(() => [C(l, null, {
|
|
1121
|
+
default: F(() => [C(c, { index: 0 }, {
|
|
1122
|
+
default: F(() => [...t[3] ||= [S("合计", -1)]]),
|
|
1123
|
+
_: 1
|
|
1124
|
+
}), (E(!0), y(h, null, k(e.summaryColumns, (e) => (E(), _(c, {
|
|
1125
|
+
key: e.index,
|
|
1126
|
+
index: e.index
|
|
1127
|
+
}, {
|
|
1128
|
+
default: F(({ total: t }) => [e.cellSummaryComponent ? (E(), _(j("CellSummary_" + e.cellSummaryComponent), {
|
|
1129
|
+
key: 0,
|
|
1130
|
+
cmpObj: {
|
|
1131
|
+
item: e,
|
|
1132
|
+
total: t
|
|
1133
|
+
}
|
|
1134
|
+
}, null, 8, ["cmpObj"])) : (E(), y("span", Se, M(e.total_content ? e.total_content(t) : t), 1))]),
|
|
1135
|
+
_: 2
|
|
1136
|
+
}, 1032, ["index"]))), 128))]),
|
|
1137
|
+
_: 1
|
|
1138
|
+
})]),
|
|
1139
|
+
key: "0"
|
|
1140
|
+
} : void 0]), 1032, [
|
|
1141
|
+
"columns",
|
|
1142
|
+
"selectedRowKeys",
|
|
1143
|
+
"data-source",
|
|
1144
|
+
"scroll",
|
|
1145
|
+
"loading",
|
|
1146
|
+
"pagination",
|
|
1147
|
+
"rowSelection",
|
|
1148
|
+
"preserveRow",
|
|
1149
|
+
"onChange"
|
|
1150
|
+
]),
|
|
1151
|
+
b("div", Ce, [e.hideAllButtons ? v("", !0) : (E(), _(s, {
|
|
1152
|
+
key: 0,
|
|
1153
|
+
actions: e.config.actions,
|
|
1154
|
+
onClick: e.handleAction,
|
|
1155
|
+
params: {
|
|
1156
|
+
table_id: e.config.id,
|
|
1157
|
+
context: e.context.contexts[e.modelType]
|
|
1158
|
+
}
|
|
1159
|
+
}, null, 8, [
|
|
1160
|
+
"actions",
|
|
1161
|
+
"onClick",
|
|
1162
|
+
"params"
|
|
1163
|
+
]))], 512),
|
|
1164
|
+
b("div", we, [C(s, {
|
|
1165
|
+
actions: e.config.row_actions,
|
|
1166
|
+
action_width: e.rowActionWidth,
|
|
1167
|
+
"onUpdate:action_width": t[2] ||= (t) => e.rowActionWidth = t
|
|
1168
|
+
}, null, 8, ["actions", "action_width"])])
|
|
1169
|
+
], 512);
|
|
1170
|
+
}
|
|
1171
|
+
var Ee = /* @__PURE__ */ n(ye, [["render", Te], ["__scopeId", "data-v-817da379"]]), De = w({
|
|
1172
|
+
name: "ApprovalColumnTables",
|
|
1173
|
+
props: {
|
|
1174
|
+
columnConfig: {
|
|
1175
|
+
type: Object,
|
|
1176
|
+
required: !0
|
|
1177
|
+
},
|
|
1178
|
+
height: {
|
|
1179
|
+
type: Number,
|
|
1180
|
+
required: !0
|
|
1181
|
+
},
|
|
1182
|
+
eventBus: {
|
|
1183
|
+
type: Object,
|
|
1184
|
+
required: !0
|
|
1185
|
+
},
|
|
1186
|
+
modelType: {
|
|
1187
|
+
type: String,
|
|
1188
|
+
required: !0
|
|
1189
|
+
},
|
|
1190
|
+
approvalConfig: {
|
|
1191
|
+
type: Object,
|
|
1192
|
+
required: !0
|
|
1193
|
+
},
|
|
1194
|
+
groupTitle: {
|
|
1195
|
+
type: String,
|
|
1196
|
+
required: !1
|
|
1197
|
+
},
|
|
1198
|
+
filterTables: {
|
|
1199
|
+
type: Array,
|
|
1200
|
+
default: () => [],
|
|
1201
|
+
required: !1
|
|
1202
|
+
},
|
|
1203
|
+
hideAllButtons: {
|
|
1204
|
+
type: Boolean,
|
|
1205
|
+
default: !1
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
emits: ["selected-counts-change"],
|
|
1209
|
+
setup(e, { emit: t }) {
|
|
1210
|
+
let n = O([]);
|
|
1211
|
+
ee(() => {
|
|
1212
|
+
n.value = e.columnConfig.tables?.map((e, t) => t);
|
|
1213
|
+
});
|
|
1214
|
+
let r = g(() => {
|
|
1215
|
+
let t = e.filterTables.map((e) => e.id);
|
|
1216
|
+
return e.columnConfig.tables.filter((n) => t && t.length > 0 ? t.includes(n.id) : e.groupTitle ? (n.group_title || "未命名") === e.groupTitle : !0);
|
|
1217
|
+
}), i = g(() => {
|
|
1218
|
+
let t = {};
|
|
1219
|
+
for (let n of e.filterTables) t[n.id] = n.isMul ? "checkbox" : "radio";
|
|
1220
|
+
return t;
|
|
1221
|
+
}), a = g(() => {
|
|
1222
|
+
let t = {};
|
|
1223
|
+
for (let n of e.filterTables || []) {
|
|
1224
|
+
let e = c(n);
|
|
1225
|
+
e && (t[n.id] = e);
|
|
1226
|
+
}
|
|
1227
|
+
return t;
|
|
1228
|
+
}), s = D({}), l = (e) => a.value[e] || null, u = (e) => o(l(e)), d = (e) => s[e] || 0;
|
|
1229
|
+
return {
|
|
1230
|
+
activeKey: n,
|
|
1231
|
+
filterTables: r,
|
|
1232
|
+
rowSelectionTypeMap: i,
|
|
1233
|
+
getSelectLimit: l,
|
|
1234
|
+
getSelectLimitText: u,
|
|
1235
|
+
getSelectedCount: d,
|
|
1236
|
+
isSelectCountInvalid: (e) => m(l(e), d(e)),
|
|
1237
|
+
handleSelectionChange: (e, n) => {
|
|
1238
|
+
s[e] = Number(n) || 0, t("selected-counts-change", { ...s });
|
|
1239
|
+
}
|
|
1240
|
+
};
|
|
1241
|
+
},
|
|
1242
|
+
components: { ApprovalTable: Ee }
|
|
1243
|
+
}), Oe = { class: "approval-column-tables" }, ke = { class: "title" }, Ae = { class: "title-text" };
|
|
1244
|
+
function je(e, t, n, r, i, a) {
|
|
1245
|
+
let o = A("ApprovalTable");
|
|
1246
|
+
return E(), y("div", Oe, [(E(!0), y(h, null, k(e.filterTables, (t, n) => (E(), y("div", {
|
|
1247
|
+
key: n,
|
|
1248
|
+
class: "table-item"
|
|
1249
|
+
}, [b("div", ke, [b("span", Ae, M(t.title), 1), e.getSelectLimit(t.id) ? (E(), y("span", {
|
|
1250
|
+
key: 0,
|
|
1251
|
+
class: T(["select-limit", { "is-invalid": e.isSelectCountInvalid(t.id) }])
|
|
1252
|
+
}, " (" + M(e.getSelectLimitText(t.id)) + " · 已选 " + M(e.getSelectedCount(t.id)) + " 条) ", 3)) : v("", !0)]), C(o, {
|
|
1253
|
+
config: t,
|
|
1254
|
+
modelType: e.modelType,
|
|
1255
|
+
eventBus: e.eventBus,
|
|
1256
|
+
approvalConfig: e.approvalConfig,
|
|
1257
|
+
hideAllButtons: e.hideAllButtons,
|
|
1258
|
+
rowSelectionType: e.rowSelectionTypeMap[t.id],
|
|
1259
|
+
onSelectionChange: (n) => e.handleSelectionChange(t.id, n)
|
|
1260
|
+
}, null, 8, [
|
|
1261
|
+
"config",
|
|
1262
|
+
"modelType",
|
|
1263
|
+
"eventBus",
|
|
1264
|
+
"approvalConfig",
|
|
1265
|
+
"hideAllButtons",
|
|
1266
|
+
"rowSelectionType",
|
|
1267
|
+
"onSelectionChange"
|
|
1268
|
+
])]))), 128))]);
|
|
1269
|
+
}
|
|
1270
|
+
var Me = /* @__PURE__ */ n(De, [["render", je], ["__scopeId", "data-v-3e52fe46"]]);
|
|
1271
|
+
//#endregion
|
|
1272
|
+
export { fe as a, $ as c, pe as d, le as f, ue as i, me as l, Ee as n, ce as o, he as p, _e as r, de as s, Me as t, se as u };
|