lyflowchart 1.0.115 → 1.0.130
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-DZfXupU3.js +48 -0
- package/dist/ApprovalEditorModal-DZfXupU3.js.map +1 -0
- package/dist/CancelModal-BUi3ieI8.js +61 -0
- package/dist/CancelModal-BUi3ieI8.js.map +1 -0
- package/dist/Cell_click_approve-CBh0j--6.js +244 -0
- package/dist/Cell_click_approve-CBh0j--6.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-CuUNtG9u.js +18 -0
- package/dist/approval-CuUNtG9u.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 +48 -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-CctSle2c.js +1629 -0
- package/dist/core-CctSle2c.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,2408 @@
|
|
|
1
|
+
import { On as e } from "./viewer-Dv3kQsMf.js";
|
|
2
|
+
import { _ as t, f as n, l as r, o as i, p as a, r as o, s, v as c } from "./init-plugin-fQTSQzui.js";
|
|
3
|
+
import { E as l, T as u, a as d, f, i as p, k as m, m as h, n as g, r as _, s as v, t as y, v as b } from "./utils-CLet2gLV.js";
|
|
4
|
+
import { r as x } from "./settingsState-CI81PG-i.js";
|
|
5
|
+
import { t as S } from "./JsonTags-BbWLqghI.js";
|
|
6
|
+
import { n as C, t as w } from "./ActionsConfig-BuvSvRbv.js";
|
|
7
|
+
import { Fragment as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createTextVNode as j, createVNode as M, defineComponent as N, nextTick as P, normalizeClass as F, normalizeStyle as I, onMounted as L, onUnmounted as R, openBlock as z, reactive as B, ref as V, renderList as H, resolveComponent as U, toDisplayString as W, watch as G, withCtx as K, withKeys as q, withModifiers as J } from "vue";
|
|
8
|
+
import { CheckOutlined as Y, CloseCircleOutlined as X, CloseOutlined as ee, EditOutlined as Z, LeftSquareOutlined as te, LeftSquareTwoTone as ne, PlusOutlined as re, RightSquareOutlined as ie, RightSquareTwoTone as ae } from "@ant-design/icons-vue";
|
|
9
|
+
import { message as Q } from "ant-design-vue";
|
|
10
|
+
import { cloneDeep as $, debounce as oe, isEqual as se } from "lodash";
|
|
11
|
+
import { useI18n as ce } from "vue-i18n";
|
|
12
|
+
//#region src/components/approval/components/approvalPageConfig/JsonInput.vue?vue&type=script&lang.ts
|
|
13
|
+
var le = N({
|
|
14
|
+
name: "JsonInput",
|
|
15
|
+
props: {
|
|
16
|
+
value: {
|
|
17
|
+
type: [
|
|
18
|
+
String,
|
|
19
|
+
Number,
|
|
20
|
+
Boolean,
|
|
21
|
+
Object,
|
|
22
|
+
Array
|
|
23
|
+
],
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
placeholder: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "输入值"
|
|
29
|
+
},
|
|
30
|
+
style: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => ({})
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ["update:value"],
|
|
36
|
+
setup(e, { emit: t }) {
|
|
37
|
+
return {
|
|
38
|
+
displayValue: E(() => {
|
|
39
|
+
let t = e.value;
|
|
40
|
+
if (typeof t == "string") return t;
|
|
41
|
+
if (t == null) return "";
|
|
42
|
+
try {
|
|
43
|
+
return JSON.stringify(t);
|
|
44
|
+
} catch {
|
|
45
|
+
return String(t);
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
valueType: E(() => {
|
|
49
|
+
let t = e.value;
|
|
50
|
+
return t === null ? "null" : t === void 0 || t === "" ? "" : typeof t;
|
|
51
|
+
}),
|
|
52
|
+
updateValue: (e) => {
|
|
53
|
+
if (e === "" || e == null) {
|
|
54
|
+
t("update:value", "");
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
t("update:value", JSON.parse(e));
|
|
59
|
+
} catch {
|
|
60
|
+
t("update:value", e);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}), ue = {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "json-type"
|
|
68
|
+
};
|
|
69
|
+
function de(e, t, n, r, i, a) {
|
|
70
|
+
let o = U("a-input");
|
|
71
|
+
return z(), D(o, {
|
|
72
|
+
value: e.displayValue,
|
|
73
|
+
placeholder: e.placeholder,
|
|
74
|
+
style: I(e.style),
|
|
75
|
+
"onUpdate:value": e.updateValue
|
|
76
|
+
}, {
|
|
77
|
+
addonAfter: K(() => [e.valueType ? (z(), k("span", ue, W(e.valueType), 1)) : O("", !0)]),
|
|
78
|
+
_: 1
|
|
79
|
+
}, 8, [
|
|
80
|
+
"value",
|
|
81
|
+
"placeholder",
|
|
82
|
+
"style",
|
|
83
|
+
"onUpdate:value"
|
|
84
|
+
]);
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/components/approval/components/approvalPageConfig/ConditionFieldMulType.vue?vue&type=script&lang.ts
|
|
88
|
+
var fe = N({
|
|
89
|
+
name: "ConditionFieldMulType",
|
|
90
|
+
components: {
|
|
91
|
+
JsonTags: S,
|
|
92
|
+
JsonInput: /* @__PURE__ */ c(le, [["render", de], ["__scopeId", "data-v-903e450b"]])
|
|
93
|
+
},
|
|
94
|
+
props: {
|
|
95
|
+
value: {
|
|
96
|
+
type: Array,
|
|
97
|
+
default: () => []
|
|
98
|
+
},
|
|
99
|
+
batch_form_key_path: {
|
|
100
|
+
type: Array,
|
|
101
|
+
default: []
|
|
102
|
+
},
|
|
103
|
+
source_type: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: null
|
|
106
|
+
},
|
|
107
|
+
operator: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: null
|
|
110
|
+
},
|
|
111
|
+
formData: {
|
|
112
|
+
type: Object,
|
|
113
|
+
default: () => ({})
|
|
114
|
+
},
|
|
115
|
+
style: {
|
|
116
|
+
type: Object,
|
|
117
|
+
default: () => ({})
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
emits: ["update:value"],
|
|
121
|
+
setup(e, { emit: t }) {
|
|
122
|
+
let n = E(() => h(e.operator) ?? 0), r = E(() => {
|
|
123
|
+
let { width: t, ...n } = e.style || {};
|
|
124
|
+
return {
|
|
125
|
+
...n,
|
|
126
|
+
flex: 1,
|
|
127
|
+
minWidth: 0
|
|
128
|
+
};
|
|
129
|
+
}), i = (e) => {
|
|
130
|
+
if (e === "" || e == null) {
|
|
131
|
+
t("update:value", []);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
t("update:value", [e]);
|
|
135
|
+
}, a = (n, r) => {
|
|
136
|
+
let i = Array.isArray(e.value) ? e.value : [], a = [i[0], i[1]];
|
|
137
|
+
a[n] = r === "" || r == null ? null : r, a[0] === null && a[1] === null ? t("update:value", []) : t("update:value", a);
|
|
138
|
+
}, o = (e) => {
|
|
139
|
+
e?.length > 0 ? t("update:value", e) : t("update:value", null);
|
|
140
|
+
}, s = (e) => {
|
|
141
|
+
t("update:value", e);
|
|
142
|
+
}, c = (e, t) => {
|
|
143
|
+
if (!e) return [];
|
|
144
|
+
let n = 0, r = [];
|
|
145
|
+
for (let i of e) {
|
|
146
|
+
n += 1;
|
|
147
|
+
let e = {
|
|
148
|
+
key: i.key,
|
|
149
|
+
label: i.group_name || "分组" + n,
|
|
150
|
+
children: []
|
|
151
|
+
}, a = null;
|
|
152
|
+
t[0] === i.key && (a = t.slice(1));
|
|
153
|
+
for (let t of i.children) {
|
|
154
|
+
if (!t.key) continue;
|
|
155
|
+
let n = {
|
|
156
|
+
key: t.key,
|
|
157
|
+
label: t.label
|
|
158
|
+
};
|
|
159
|
+
if (t.type === "remotetablepro") {
|
|
160
|
+
if (a && a[0] === t.key) {
|
|
161
|
+
let r = c(t.children, a.slice(1));
|
|
162
|
+
r.length > 0 && (n.children = r, e.children.push(n));
|
|
163
|
+
}
|
|
164
|
+
} else if (t.type === "formtemplate") {
|
|
165
|
+
if (a && a[0] === t.key) {
|
|
166
|
+
let r = c(t.form?.dynamicFieldList, a.slice(1));
|
|
167
|
+
r.length > 0 && (n.children = r, e.children.push(n));
|
|
168
|
+
}
|
|
169
|
+
} else e.children.push(n);
|
|
170
|
+
}
|
|
171
|
+
e.children.length > 0 && r.push(e);
|
|
172
|
+
}
|
|
173
|
+
return r;
|
|
174
|
+
};
|
|
175
|
+
return {
|
|
176
|
+
handleSelectChange: o,
|
|
177
|
+
options: E(() => {
|
|
178
|
+
if (e.source_type === "global") return b;
|
|
179
|
+
if (e.source_type === "form") return c(e.formData?.dynamicFieldList || [], e.batch_form_key_path || []);
|
|
180
|
+
}),
|
|
181
|
+
handleInputChange: s,
|
|
182
|
+
paramsCount: n,
|
|
183
|
+
halfStyle: r,
|
|
184
|
+
handleSingleChange: i,
|
|
185
|
+
handleBetweenChange: a
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/components/approval/components/approvalPageConfig/ConditionFieldMulType.vue
|
|
191
|
+
function pe(e, t, n, r, i, a) {
|
|
192
|
+
let o = U("a-cascader"), s = U("JsonInput"), c = U("JsonTags");
|
|
193
|
+
return e.source_type && e.source_type !== "fixed" ? (z(), D(o, {
|
|
194
|
+
key: 0,
|
|
195
|
+
value: e.value,
|
|
196
|
+
"field-names": {
|
|
197
|
+
label: "label",
|
|
198
|
+
value: "key",
|
|
199
|
+
children: "children"
|
|
200
|
+
},
|
|
201
|
+
options: e.options,
|
|
202
|
+
placeholder: "请选择字段",
|
|
203
|
+
onChange: e.handleSelectChange,
|
|
204
|
+
onClear: t[0] ||= (t) => e.handleSelectChange(null),
|
|
205
|
+
"default-value": [],
|
|
206
|
+
style: I(e.style),
|
|
207
|
+
size: "small"
|
|
208
|
+
}, null, 8, [
|
|
209
|
+
"value",
|
|
210
|
+
"options",
|
|
211
|
+
"onChange",
|
|
212
|
+
"style"
|
|
213
|
+
])) : e.paramsCount === 1 ? (z(), D(s, {
|
|
214
|
+
key: 1,
|
|
215
|
+
value: e.value?.[0],
|
|
216
|
+
"onUpdate:value": e.handleSingleChange,
|
|
217
|
+
style: I(e.style),
|
|
218
|
+
size: "small",
|
|
219
|
+
placeholder: "输入值"
|
|
220
|
+
}, null, 8, [
|
|
221
|
+
"value",
|
|
222
|
+
"onUpdate:value",
|
|
223
|
+
"style"
|
|
224
|
+
])) : e.paramsCount === 2 ? (z(), k("div", {
|
|
225
|
+
key: 2,
|
|
226
|
+
class: "between-inputs",
|
|
227
|
+
style: I(e.style)
|
|
228
|
+
}, [
|
|
229
|
+
M(s, {
|
|
230
|
+
value: e.value?.[0],
|
|
231
|
+
"onUpdate:value": t[1] ||= (t) => e.handleBetweenChange(0, t),
|
|
232
|
+
style: I(e.halfStyle),
|
|
233
|
+
size: "small",
|
|
234
|
+
placeholder: "起始值"
|
|
235
|
+
}, null, 8, ["value", "style"]),
|
|
236
|
+
t[3] ||= A("span", { class: "between-separator" }, "~", -1),
|
|
237
|
+
M(s, {
|
|
238
|
+
value: e.value?.[1],
|
|
239
|
+
"onUpdate:value": t[2] ||= (t) => e.handleBetweenChange(1, t),
|
|
240
|
+
style: I(e.halfStyle),
|
|
241
|
+
size: "small",
|
|
242
|
+
placeholder: "结束值"
|
|
243
|
+
}, null, 8, ["value", "style"])
|
|
244
|
+
], 4)) : (z(), D(c, {
|
|
245
|
+
key: 3,
|
|
246
|
+
value: e.value || [],
|
|
247
|
+
"onUpdate:value": e.handleInputChange,
|
|
248
|
+
style: I(e.style),
|
|
249
|
+
size: "small",
|
|
250
|
+
placeholder: "输入值"
|
|
251
|
+
}, null, 8, [
|
|
252
|
+
"value",
|
|
253
|
+
"onUpdate:value",
|
|
254
|
+
"style"
|
|
255
|
+
]));
|
|
256
|
+
}
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/components/approval/components/approvalPageConfig/BaseConditions.vue?vue&type=script&lang.ts
|
|
259
|
+
var me = N({
|
|
260
|
+
name: "BasicQueryConditions",
|
|
261
|
+
components: {
|
|
262
|
+
JsonTags: S,
|
|
263
|
+
ConditionFieldMulType: /* @__PURE__ */ c(fe, [["render", pe], ["__scopeId", "data-v-33c78a2c"]]),
|
|
264
|
+
PlusOutlined: re
|
|
265
|
+
},
|
|
266
|
+
props: {
|
|
267
|
+
dataSource: {
|
|
268
|
+
type: Object,
|
|
269
|
+
required: !0
|
|
270
|
+
},
|
|
271
|
+
modelType: {
|
|
272
|
+
type: String,
|
|
273
|
+
required: !0
|
|
274
|
+
},
|
|
275
|
+
formData: {
|
|
276
|
+
type: Object,
|
|
277
|
+
default: () => ({})
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
emits: ["update:dataSource"],
|
|
281
|
+
setup(e, { emit: t }) {
|
|
282
|
+
let n = r(), i = V([]), a = () => ({
|
|
283
|
+
field_name: "",
|
|
284
|
+
operator: void 0,
|
|
285
|
+
class_name: void 0,
|
|
286
|
+
value_type: "fixed",
|
|
287
|
+
value: [],
|
|
288
|
+
format: "input"
|
|
289
|
+
}), o = (e) => !Array.isArray(e) || e.length === 0 || Array.isArray(e[0]) ? e : [e], s = () => {
|
|
290
|
+
t("update:dataSource", [...o(e.dataSource) || [], [a()]]);
|
|
291
|
+
}, c = (t) => {
|
|
292
|
+
e.dataSource.splice(t, 1);
|
|
293
|
+
}, l = (t) => {
|
|
294
|
+
let n = e.dataSource?.[t];
|
|
295
|
+
n && n.push(a());
|
|
296
|
+
}, u = (t, n) => {
|
|
297
|
+
e.dataSource?.[t]?.splice(n, 1);
|
|
298
|
+
}, d = Object.entries(n).map(([e, t]) => ({
|
|
299
|
+
label: `${t} (${e})`,
|
|
300
|
+
value: e
|
|
301
|
+
}));
|
|
302
|
+
return G(() => e.modelType, async (e) => {
|
|
303
|
+
i.value = await f(e);
|
|
304
|
+
}, { immediate: !0 }), L(() => {
|
|
305
|
+
if (e.dataSource?.length > 0) {
|
|
306
|
+
if (!Array.isArray(e.dataSource[0])) {
|
|
307
|
+
let t = [...e.dataSource];
|
|
308
|
+
e.dataSource.splice(0, e.dataSource.length, t);
|
|
309
|
+
}
|
|
310
|
+
for (let t of e.dataSource) for (let e of t) e.value_type ||= "fixed";
|
|
311
|
+
}
|
|
312
|
+
}), {
|
|
313
|
+
addGroup: s,
|
|
314
|
+
removeGroup: c,
|
|
315
|
+
addCondition: l,
|
|
316
|
+
removeCondition: u,
|
|
317
|
+
columnNameList: i,
|
|
318
|
+
operatorOptions: d
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
}), he = { class: "group-header" }, ge = { class: "group-title" }, _e = { class: "item-index" }, ve = { class: "config-body" }, ye = { class: "condition-value" }, be = { class: "condition-value-type" }, xe = { class: "condition-value-input" }, Se = { class: "config-actions" }, Ce = {
|
|
322
|
+
key: 0,
|
|
323
|
+
class: "group-or"
|
|
324
|
+
};
|
|
325
|
+
function we(e, t, n, r, i, a) {
|
|
326
|
+
let o = U("a-button"), s = U("column-name-field"), c = U("a-form-item"), l = U("a-col"), u = U("a-select"), d = U("a-select-option"), f = U("a-row"), p = U("ConditionFieldMulType"), m = U("a-form"), h = U("delete-outlined"), g = U("plus-outlined");
|
|
327
|
+
return z(), k("div", null, [(z(!0), k(T, null, H(e.dataSource, (n, r) => (z(), k("div", {
|
|
328
|
+
key: r,
|
|
329
|
+
class: "condition-group"
|
|
330
|
+
}, [
|
|
331
|
+
A("div", he, [A("span", ge, "条件组 " + W(r + 1), 1), M(o, {
|
|
332
|
+
type: "link",
|
|
333
|
+
danger: "",
|
|
334
|
+
size: "small",
|
|
335
|
+
onClick: (t) => e.removeGroup(r)
|
|
336
|
+
}, {
|
|
337
|
+
default: K(() => [...t[0] ||= [j(" 删除条件组 ", -1)]]),
|
|
338
|
+
_: 1
|
|
339
|
+
}, 8, ["onClick"])]),
|
|
340
|
+
(z(!0), k(T, null, H(n, (n, i) => (z(), k("div", {
|
|
341
|
+
key: i,
|
|
342
|
+
class: "condition-item"
|
|
343
|
+
}, [
|
|
344
|
+
A("div", _e, "(" + W(i + 1) + ")", 1),
|
|
345
|
+
A("div", ve, [M(m, { layout: "vertical" }, {
|
|
346
|
+
default: K(() => [M(f, { gutter: 16 }, {
|
|
347
|
+
default: K(() => [
|
|
348
|
+
M(l, { span: 8 }, {
|
|
349
|
+
default: K(() => [M(c, { label: "字段" }, {
|
|
350
|
+
default: K(() => [M(s, {
|
|
351
|
+
value: n.field_name,
|
|
352
|
+
"onUpdate:value": (e) => n.field_name = e,
|
|
353
|
+
columnNameList: e.columnNameList
|
|
354
|
+
}, null, 8, [
|
|
355
|
+
"value",
|
|
356
|
+
"onUpdate:value",
|
|
357
|
+
"columnNameList"
|
|
358
|
+
])]),
|
|
359
|
+
_: 2
|
|
360
|
+
}, 1024)]),
|
|
361
|
+
_: 2
|
|
362
|
+
}, 1024),
|
|
363
|
+
M(l, { span: 8 }, {
|
|
364
|
+
default: K(() => [M(c, { label: "运算符" }, {
|
|
365
|
+
default: K(() => [M(u, {
|
|
366
|
+
"show-search": "",
|
|
367
|
+
value: n.operator,
|
|
368
|
+
"onUpdate:value": (e) => n.operator = e,
|
|
369
|
+
placeholder: "请选择运算符",
|
|
370
|
+
options: e.operatorOptions
|
|
371
|
+
}, null, 8, [
|
|
372
|
+
"value",
|
|
373
|
+
"onUpdate:value",
|
|
374
|
+
"options"
|
|
375
|
+
])]),
|
|
376
|
+
_: 2
|
|
377
|
+
}, 1024)]),
|
|
378
|
+
_: 2
|
|
379
|
+
}, 1024),
|
|
380
|
+
M(l, { span: 8 }, {
|
|
381
|
+
default: K(() => [M(c, { label: "数据类型" }, {
|
|
382
|
+
default: K(() => [M(u, {
|
|
383
|
+
"show-search": "",
|
|
384
|
+
value: n.class_name,
|
|
385
|
+
"onUpdate:value": (e) => n.class_name = e,
|
|
386
|
+
placeholder: "请选择数据类型"
|
|
387
|
+
}, {
|
|
388
|
+
default: K(() => [
|
|
389
|
+
M(d, { value: "int" }, {
|
|
390
|
+
default: K(() => [...t[1] ||= [j("整数(int)", -1)]]),
|
|
391
|
+
_: 1
|
|
392
|
+
}),
|
|
393
|
+
M(d, { value: "float" }, {
|
|
394
|
+
default: K(() => [...t[2] ||= [j("浮点数(float)", -1)]]),
|
|
395
|
+
_: 1
|
|
396
|
+
}),
|
|
397
|
+
M(d, { value: "str" }, {
|
|
398
|
+
default: K(() => [...t[3] ||= [j("字符串(str)", -1)]]),
|
|
399
|
+
_: 1
|
|
400
|
+
}),
|
|
401
|
+
M(d, { value: "bool" }, {
|
|
402
|
+
default: K(() => [...t[4] ||= [j("布尔值(bool)", -1)]]),
|
|
403
|
+
_: 1
|
|
404
|
+
}),
|
|
405
|
+
M(d, { value: "date" }, {
|
|
406
|
+
default: K(() => [...t[5] ||= [j("日期(date)", -1)]]),
|
|
407
|
+
_: 1
|
|
408
|
+
}),
|
|
409
|
+
M(d, { value: "datetime" }, {
|
|
410
|
+
default: K(() => [...t[6] ||= [j("日期时间(datetime)", -1)]]),
|
|
411
|
+
_: 1
|
|
412
|
+
}),
|
|
413
|
+
M(d, { value: "time" }, {
|
|
414
|
+
default: K(() => [...t[7] ||= [j("时间(time)", -1)]]),
|
|
415
|
+
_: 1
|
|
416
|
+
})
|
|
417
|
+
]),
|
|
418
|
+
_: 1
|
|
419
|
+
}, 8, ["value", "onUpdate:value"])]),
|
|
420
|
+
_: 2
|
|
421
|
+
}, 1024)]),
|
|
422
|
+
_: 2
|
|
423
|
+
}, 1024)
|
|
424
|
+
]),
|
|
425
|
+
_: 2
|
|
426
|
+
}, 1024), M(c, { label: "比较值" }, {
|
|
427
|
+
default: K(() => [A("div", ye, [A("div", be, [M(u, {
|
|
428
|
+
value: n.value_type,
|
|
429
|
+
"onUpdate:value": (e) => n.value_type = e,
|
|
430
|
+
placeholder: "请选择",
|
|
431
|
+
style: { width: "100px" },
|
|
432
|
+
size: "small"
|
|
433
|
+
}, {
|
|
434
|
+
default: K(() => [M(d, { value: "global" }, {
|
|
435
|
+
default: K(() => [...t[8] ||= [j("全局字段", -1)]]),
|
|
436
|
+
_: 1
|
|
437
|
+
}), M(d, { value: "fixed" }, {
|
|
438
|
+
default: K(() => [...t[9] ||= [j("固定值", -1)]]),
|
|
439
|
+
_: 1
|
|
440
|
+
})]),
|
|
441
|
+
_: 1
|
|
442
|
+
}, 8, ["value", "onUpdate:value"])]), A("div", xe, [M(p, {
|
|
443
|
+
value: n.value,
|
|
444
|
+
"onUpdate:value": (e) => n.value = e,
|
|
445
|
+
source_type: n.value_type,
|
|
446
|
+
operator: n.operator,
|
|
447
|
+
"form-data": e.formData,
|
|
448
|
+
style: { width: "480px" }
|
|
449
|
+
}, null, 8, [
|
|
450
|
+
"value",
|
|
451
|
+
"onUpdate:value",
|
|
452
|
+
"source_type",
|
|
453
|
+
"operator",
|
|
454
|
+
"form-data"
|
|
455
|
+
])])])]),
|
|
456
|
+
_: 2
|
|
457
|
+
}, 1024)]),
|
|
458
|
+
_: 2
|
|
459
|
+
}, 1024)]),
|
|
460
|
+
A("div", Se, [M(h, {
|
|
461
|
+
onClick: (t) => e.removeCondition(r, i),
|
|
462
|
+
class: "delete-icon"
|
|
463
|
+
}, null, 8, ["onClick"])])
|
|
464
|
+
]))), 128)),
|
|
465
|
+
M(o, {
|
|
466
|
+
type: "link",
|
|
467
|
+
onClick: (t) => e.addCondition(r)
|
|
468
|
+
}, {
|
|
469
|
+
default: K(() => [...t[10] ||= [j(" 添加条件 ", -1)]]),
|
|
470
|
+
_: 1
|
|
471
|
+
}, 8, ["onClick"]),
|
|
472
|
+
r < e.dataSource.length - 1 ? (z(), k("div", Ce, [...t[11] ||= [A("span", null, "或", -1)]])) : O("", !0)
|
|
473
|
+
]))), 128)), M(o, {
|
|
474
|
+
type: "dashed",
|
|
475
|
+
block: "",
|
|
476
|
+
onClick: e.addGroup
|
|
477
|
+
}, {
|
|
478
|
+
default: K(() => [M(g), t[12] ||= j(" 添加条件组(组与组之间为“或”关系,组内条件为“与”关系) ", -1)]),
|
|
479
|
+
_: 1
|
|
480
|
+
}, 8, ["onClick"])]);
|
|
481
|
+
}
|
|
482
|
+
var Te = /* @__PURE__ */ c(me, [["render", we], ["__scopeId", "data-v-b0aa1e4b"]]), Ee = N({
|
|
483
|
+
name: "BaseColumns",
|
|
484
|
+
props: { value: {
|
|
485
|
+
type: String,
|
|
486
|
+
default: () => {}
|
|
487
|
+
} },
|
|
488
|
+
components: {},
|
|
489
|
+
emits: ["update:value", "change"],
|
|
490
|
+
setup(e, { emit: t }) {
|
|
491
|
+
let n = V(!1), r = V(e.value);
|
|
492
|
+
return {
|
|
493
|
+
onEdit: n,
|
|
494
|
+
tmpValue: r,
|
|
495
|
+
edit: () => {
|
|
496
|
+
r.value = e.value, n.value = !0;
|
|
497
|
+
},
|
|
498
|
+
save: () => {
|
|
499
|
+
t("update:value", r.value), n.value = !1, P(() => {
|
|
500
|
+
t("change", r.value);
|
|
501
|
+
});
|
|
502
|
+
},
|
|
503
|
+
cancel: () => {
|
|
504
|
+
n.value = !1;
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
}), De = { class: "editable-cell" }, Oe = {
|
|
509
|
+
key: 0,
|
|
510
|
+
class: "editable-cell-input-wrapper"
|
|
511
|
+
}, ke = {
|
|
512
|
+
key: 1,
|
|
513
|
+
class: "editable-cell-text-wrapper"
|
|
514
|
+
};
|
|
515
|
+
function Ae(e, t, n, r, i, a) {
|
|
516
|
+
let o = U("a-input"), s = U("check-outlined"), c = U("edit-outlined");
|
|
517
|
+
return z(), k("div", De, [e.onEdit ? (z(), k("div", Oe, [M(o, {
|
|
518
|
+
value: e.tmpValue,
|
|
519
|
+
"onUpdate:value": t[0] ||= (t) => e.tmpValue = t,
|
|
520
|
+
size: "small",
|
|
521
|
+
onPressEnter: t[1] ||= (t) => e.save(),
|
|
522
|
+
onKeyup: t[2] ||= q((t) => e.cancel(), ["esc"])
|
|
523
|
+
}, null, 8, ["value"]), M(s, {
|
|
524
|
+
class: "editable-cell-icon-check",
|
|
525
|
+
onClick: t[3] ||= (t) => e.save()
|
|
526
|
+
})])) : (z(), k("div", ke, [j(W(e.value || " ") + " ", 1), M(c, {
|
|
527
|
+
class: "editable-cell-icon",
|
|
528
|
+
onClick: t[4] ||= (t) => e.edit()
|
|
529
|
+
})]))]);
|
|
530
|
+
}
|
|
531
|
+
var je = /* @__PURE__ */ c(Ee, [["render", Ae], ["__scopeId", "data-v-85d6a01a"]]), Me = N({
|
|
532
|
+
name: "BaseColumns",
|
|
533
|
+
props: {
|
|
534
|
+
dataSource: {
|
|
535
|
+
type: Array,
|
|
536
|
+
default: () => {}
|
|
537
|
+
},
|
|
538
|
+
modelType: {
|
|
539
|
+
type: String,
|
|
540
|
+
required: !0
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
components: {
|
|
544
|
+
LeftSquareOutlined: te,
|
|
545
|
+
LeftSquareTwoTone: ne,
|
|
546
|
+
RightSquareOutlined: ie,
|
|
547
|
+
RightSquareTwoTone: ae,
|
|
548
|
+
CheckOutlined: Y,
|
|
549
|
+
EditOutlined: Z,
|
|
550
|
+
cellEdit: je
|
|
551
|
+
},
|
|
552
|
+
emits: ["update:dataSource"],
|
|
553
|
+
setup(e, { emit: n }) {
|
|
554
|
+
let { t: r } = ce(), a = V(0), s = t().currentOrg, c = V([]), l = V([]), d = V([]), f = V([]), p = V({}), h = V({}), g = [{
|
|
555
|
+
title: r("列名称"),
|
|
556
|
+
dataIndex: "title",
|
|
557
|
+
key: "title",
|
|
558
|
+
width: 200
|
|
559
|
+
}], _ = [{
|
|
560
|
+
title: r("参数"),
|
|
561
|
+
dataIndex: "name",
|
|
562
|
+
checked: !0,
|
|
563
|
+
width: 200,
|
|
564
|
+
ellipsis: !0
|
|
565
|
+
}, {
|
|
566
|
+
title: r("名称"),
|
|
567
|
+
dataIndex: "verbose_name",
|
|
568
|
+
checked: !0,
|
|
569
|
+
width: 150,
|
|
570
|
+
ellipsis: !0
|
|
571
|
+
}], v = [
|
|
572
|
+
{
|
|
573
|
+
title: r("列名称"),
|
|
574
|
+
dataIndex: "title",
|
|
575
|
+
key: "title",
|
|
576
|
+
rowDrag: !0,
|
|
577
|
+
width: 200,
|
|
578
|
+
fixed: "left"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
title: r("参数"),
|
|
582
|
+
dataIndex: "dataIndex",
|
|
583
|
+
width: 200,
|
|
584
|
+
fixed: "left",
|
|
585
|
+
ellipsis: !0
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
title: r("默认排序"),
|
|
589
|
+
dataIndex: "defaultSort",
|
|
590
|
+
width: 240,
|
|
591
|
+
ellipsis: !0
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
title: r("冻结列"),
|
|
595
|
+
dataIndex: "fixed",
|
|
596
|
+
key: "fixed",
|
|
597
|
+
width: 150
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
title: "行高",
|
|
601
|
+
dataIndex: "autoHeight",
|
|
602
|
+
width: 80,
|
|
603
|
+
key: "autoHeight"
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
title: "列宽",
|
|
607
|
+
dataIndex: "autoWidth",
|
|
608
|
+
width: 80,
|
|
609
|
+
key: "autoWidth"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
title: "合计",
|
|
613
|
+
dataIndex: "approve_summary",
|
|
614
|
+
width: 80,
|
|
615
|
+
key: "approve_summary"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
title: "超宽省略",
|
|
619
|
+
dataIndex: "ellipsis",
|
|
620
|
+
width: 80,
|
|
621
|
+
key: "ellipsis"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
title: "列组件",
|
|
625
|
+
dataIndex: "cellComponent",
|
|
626
|
+
width: 200,
|
|
627
|
+
key: "cellComponent"
|
|
628
|
+
}
|
|
629
|
+
], y = oe(() => {
|
|
630
|
+
a.value = window.innerHeight - 165;
|
|
631
|
+
}, 200), b = () => {
|
|
632
|
+
n("update:dataSource", d.value);
|
|
633
|
+
};
|
|
634
|
+
function x(e, t) {
|
|
635
|
+
e.disabled = !1, e.name != null && t.has(e.name) && (e.disabled = !0), e.children && Array.isArray(e.children) && e.children.forEach((e) => {
|
|
636
|
+
x(e, t);
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
let S = (e) => {
|
|
640
|
+
e.forEach((e) => {
|
|
641
|
+
p.value[e.name] = e, Array.isArray(e.children) && S(e.children);
|
|
642
|
+
});
|
|
643
|
+
}, C = () => {
|
|
644
|
+
let e = /* @__PURE__ */ new Set();
|
|
645
|
+
function t(n) {
|
|
646
|
+
n.forEach((n) => {
|
|
647
|
+
e.add(n.dataIndex), n.children && Array.isArray(n.children) && t(n.children);
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
t(d.value), l.value.forEach((t) => {
|
|
651
|
+
x(t, e);
|
|
652
|
+
}), l.value = [].concat(l.value);
|
|
653
|
+
};
|
|
654
|
+
L(async () => {
|
|
655
|
+
if (window.addEventListener("resize", y), y(), d.value = e.dataSource || [], e.modelType) {
|
|
656
|
+
let t = e.modelType.split("-"), n = `${t[0]}/obtain_${t[1]}_column_data`;
|
|
657
|
+
l.value = m(await i({
|
|
658
|
+
org_id: s?.id,
|
|
659
|
+
is_base_column: !0
|
|
660
|
+
}, n, !1, { skip_error: !0 }) || []), S(l.value);
|
|
661
|
+
}
|
|
662
|
+
U(), C(), b();
|
|
663
|
+
}), R(() => {
|
|
664
|
+
window.removeEventListener("resize", y);
|
|
665
|
+
});
|
|
666
|
+
let w = (e) => {
|
|
667
|
+
if (e.record.disabled) return { style: { background: "#cbcbcb" } };
|
|
668
|
+
}, T = B({
|
|
669
|
+
type: "checkbox",
|
|
670
|
+
onChange: (e) => {
|
|
671
|
+
c.value = e;
|
|
672
|
+
},
|
|
673
|
+
getCheckboxProps: (e) => ({
|
|
674
|
+
disabled: e.disabled,
|
|
675
|
+
name: e.name
|
|
676
|
+
})
|
|
677
|
+
}), E = B({
|
|
678
|
+
type: "checkbox",
|
|
679
|
+
onChange: (e) => {
|
|
680
|
+
f.value = e;
|
|
681
|
+
},
|
|
682
|
+
getCheckboxProps: (e) => ({
|
|
683
|
+
disabled: e.dataIndex === "index" || e.dataIndex === "action",
|
|
684
|
+
name: e.dataIndex
|
|
685
|
+
})
|
|
686
|
+
}), D = (e, t) => {
|
|
687
|
+
let n = {};
|
|
688
|
+
return Object.keys(t).forEach((r) => {
|
|
689
|
+
e[r] !== void 0 && (n[t[r]] = e[r]);
|
|
690
|
+
}), n;
|
|
691
|
+
}, O = (e) => {
|
|
692
|
+
e.forEach((e) => {
|
|
693
|
+
if (c.value.indexOf(e.name) > -1) {
|
|
694
|
+
let t = {};
|
|
695
|
+
t = D(e, {
|
|
696
|
+
verbose_name: "title",
|
|
697
|
+
name: "dataIndex",
|
|
698
|
+
cell_component: "cellComponent",
|
|
699
|
+
filterMultiple: "filterMultiple",
|
|
700
|
+
contentMap: "contentMap",
|
|
701
|
+
colorMap: "colorMap",
|
|
702
|
+
filters: "filters",
|
|
703
|
+
sorter: "sorter",
|
|
704
|
+
summary: "approve_summary",
|
|
705
|
+
cellSummaryComponent: "cellSummaryComponent"
|
|
706
|
+
}), t.fixed = void 0, t.autoHeight = !1, t.autoWidth = !1, t.width = 150, t.resizable = !0, e.disabled = !0, e.cellComponent ? t.ellipsis = !1 : t.ellipsis = !0, d.value.push(t);
|
|
707
|
+
}
|
|
708
|
+
e.children && Array.isArray(e.children) && O(e.children);
|
|
709
|
+
});
|
|
710
|
+
}, k = () => {
|
|
711
|
+
O(l.value), c.value.length = 0, l.value = [].concat(l.value), d.value = [].concat(d.value), b();
|
|
712
|
+
}, A = (e) => {
|
|
713
|
+
e.forEach((e) => {
|
|
714
|
+
f.value.indexOf(e.name) > -1 && (e.disabled = !1), e.children && Array.isArray(e.children) && A(e.children);
|
|
715
|
+
});
|
|
716
|
+
}, j = () => {
|
|
717
|
+
d.value = d.value.filter((e) => f.value.indexOf(e.dataIndex) == -1), A(l.value), f.value.length = 0, d.value = [].concat(d.value), l.value = [].concat(l.value), b(), U();
|
|
718
|
+
}, M = (e, t) => {
|
|
719
|
+
let n, r = (e, t, i) => {
|
|
720
|
+
for (let a of t) if (a.dataIndex === i) return n = e, n;
|
|
721
|
+
else if (a.children && a.children.length > 0 && (n = r(a.dataIndex, a.children, i), n !== void 0)) return n;
|
|
722
|
+
};
|
|
723
|
+
return r(null, e, t);
|
|
724
|
+
}, N = ({ record: e, preTargetInfo: t, nextTargetInfo: n }) => new Promise((r, i) => {
|
|
725
|
+
if (t) {
|
|
726
|
+
let n = M(d.value, e.dataIndex);
|
|
727
|
+
t.record.dataIndex == n || n == M(d.value, t.record.dataIndex) ? r(!0) : i();
|
|
728
|
+
} else M(d.value, e.dataIndex) == M(d.value, n.record.dataIndex) ? r(!0) : i();
|
|
729
|
+
}).then(() => {
|
|
730
|
+
setTimeout(() => {
|
|
731
|
+
b();
|
|
732
|
+
}, 200);
|
|
733
|
+
}), P = () => {
|
|
734
|
+
d.value = [].concat(d.value), b();
|
|
735
|
+
}, F = (e) => {
|
|
736
|
+
P();
|
|
737
|
+
}, I = (e, t) => {
|
|
738
|
+
let n = e;
|
|
739
|
+
return t.forEach((e) => {
|
|
740
|
+
!Array.isArray(n) && n.children && (n = n.children), n = n[e];
|
|
741
|
+
}), n;
|
|
742
|
+
}, z = (e) => {
|
|
743
|
+
let t = p.value[e.dataIndex];
|
|
744
|
+
if (t) {
|
|
745
|
+
let n = {
|
|
746
|
+
filters: "filters",
|
|
747
|
+
sorter: "sorter",
|
|
748
|
+
summary: "summary",
|
|
749
|
+
cellSummaryComponent: "cellSummaryComponent"
|
|
750
|
+
}, r = D(t, n), i = D(e, Object.values(n).reduce((e, t) => (e[t] = t, e), {})), a = se(r, i);
|
|
751
|
+
return a || console.log(`${e.dataIndex} 字段配置不一致`, r, i), a;
|
|
752
|
+
}
|
|
753
|
+
return !0;
|
|
754
|
+
}, H = (e) => {
|
|
755
|
+
let t = {};
|
|
756
|
+
return e.forEach((e) => {
|
|
757
|
+
z(e) || (t[e.dataIndex] = e), e.children && Array.isArray(e.children) && Object.assign(t, H(e.children));
|
|
758
|
+
}), t;
|
|
759
|
+
}, U = () => {
|
|
760
|
+
h.value = H(d.value);
|
|
761
|
+
}, W = (e) => {
|
|
762
|
+
G(e), b(), U();
|
|
763
|
+
}, G = (e) => {
|
|
764
|
+
let t = p.value[e.dataIndex];
|
|
765
|
+
if (t) {
|
|
766
|
+
let n = D(t, {
|
|
767
|
+
filterMultiple: "filterMultiple",
|
|
768
|
+
contentMap: "contentMap",
|
|
769
|
+
colorMap: "colorMap",
|
|
770
|
+
filters: "filters",
|
|
771
|
+
sorter: "sorter",
|
|
772
|
+
summary: "summary",
|
|
773
|
+
cellSummaryComponent: "cellSummaryComponent"
|
|
774
|
+
});
|
|
775
|
+
Object.assign(e, n);
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
return {
|
|
779
|
+
selectedRowKeys: c,
|
|
780
|
+
allColumnsData: l,
|
|
781
|
+
columns: _,
|
|
782
|
+
rowSelection: T,
|
|
783
|
+
baseColumns: v,
|
|
784
|
+
baseColumnList: d,
|
|
785
|
+
baseRowSelection: E,
|
|
786
|
+
baseSelectKeys: f,
|
|
787
|
+
defaultColumns: g,
|
|
788
|
+
cellComponentList: o(),
|
|
789
|
+
customCell: w,
|
|
790
|
+
goRight: k,
|
|
791
|
+
goLeft: j,
|
|
792
|
+
onRowDragEnd: N,
|
|
793
|
+
changeBaseColumnList: P,
|
|
794
|
+
updateBaseColumn: G,
|
|
795
|
+
getRawRecord: I,
|
|
796
|
+
changedFields: h,
|
|
797
|
+
updateAllBaseColumn: () => {
|
|
798
|
+
Object.values(h.value).forEach((e) => {
|
|
799
|
+
G(e);
|
|
800
|
+
}), b(), U();
|
|
801
|
+
},
|
|
802
|
+
handleUpdateBaseColumn: W,
|
|
803
|
+
copyClick: (e) => {
|
|
804
|
+
e.column.key !== "operation" && (u(e.text), e.hidePopup());
|
|
805
|
+
},
|
|
806
|
+
changeCellComponent: F,
|
|
807
|
+
height: a,
|
|
808
|
+
emitData: b,
|
|
809
|
+
fieldMap: p
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
}), Ne = { class: "column-title-container" }, Pe = { class: "column-title" }, Fe = { style: { width: "30px" } }, Ie = { class: "column-title-container" }, Le = { class: "column-title" }, Re = { class: "base-column-table" }, ze = {
|
|
813
|
+
key: 1,
|
|
814
|
+
class: "default-sort-tip"
|
|
815
|
+
};
|
|
816
|
+
function Be(e, t, n, r, i, a) {
|
|
817
|
+
let o = U("copy-outlined"), s = U("a-button"), c = U("a-space-compact"), l = U("s-table"), u = U("a-col"), d = U("left-square-outlined"), f = U("left-square-two-tone"), p = U("right-square-outlined"), m = U("right-square-two-tone"), h = U("cell-edit"), g = U("WarningOutlined"), _ = U("a-select-option"), v = U("a-select"), y = U("a-input-number"), b = U("a-row"), x = U("a-radio-button"), S = U("a-radio-group"), C = U("a-switch"), w = U("a-layout-sider"), E = U("a-layout");
|
|
818
|
+
return z(), D(E, { class: "antTabs" }, {
|
|
819
|
+
default: K(() => [M(w, {
|
|
820
|
+
width: "100%",
|
|
821
|
+
style: I({
|
|
822
|
+
backgroundColor: "white",
|
|
823
|
+
overflowY: "auto",
|
|
824
|
+
height: e.height + "px"
|
|
825
|
+
})
|
|
826
|
+
}, {
|
|
827
|
+
default: K(() => [M(b, { style: { height: "100%" } }, {
|
|
828
|
+
default: K(() => [
|
|
829
|
+
M(u, { span: 6 }, {
|
|
830
|
+
default: K(() => [A("div", Ne, [A("div", Pe, W(e.$t("可选列")), 1)]), M(l, {
|
|
831
|
+
selectedRowKeys: e.selectedRowKeys,
|
|
832
|
+
"onUpdate:selectedRowKeys": t[0] ||= (t) => e.selectedRowKeys = t,
|
|
833
|
+
autoRowHeight: !0,
|
|
834
|
+
bordered: !0,
|
|
835
|
+
columns: e.columns,
|
|
836
|
+
customCell: e.customCell,
|
|
837
|
+
"data-source": e.allColumnsData,
|
|
838
|
+
scroll: { y: e.height - 90 },
|
|
839
|
+
indentSize: 0,
|
|
840
|
+
pagination: !1,
|
|
841
|
+
"row-selection": e.rowSelection,
|
|
842
|
+
rowHeight: 30,
|
|
843
|
+
rowKey: "name",
|
|
844
|
+
size: "small",
|
|
845
|
+
wrapText: !0,
|
|
846
|
+
sticky: "",
|
|
847
|
+
stripe: "",
|
|
848
|
+
"summary-fixed": ""
|
|
849
|
+
}, {
|
|
850
|
+
bodyCell: K(({ column: e, index: t, text: n, record: r }) => [A("span", null, W(n), 1)]),
|
|
851
|
+
contextmenuPopup: K((t) => [M(c, { direction: "vertical" }, {
|
|
852
|
+
default: K(() => [M(s, {
|
|
853
|
+
block: "",
|
|
854
|
+
size: "small",
|
|
855
|
+
type: "text",
|
|
856
|
+
onClick: (n) => e.copyClick(t, "cell")
|
|
857
|
+
}, {
|
|
858
|
+
icon: K(() => [M(o)]),
|
|
859
|
+
default: K(() => [j(" " + W(e.$t("复制")), 1)]),
|
|
860
|
+
_: 1
|
|
861
|
+
}, 8, ["onClick"])]),
|
|
862
|
+
_: 2
|
|
863
|
+
}, 1024)]),
|
|
864
|
+
_: 1
|
|
865
|
+
}, 8, [
|
|
866
|
+
"selectedRowKeys",
|
|
867
|
+
"columns",
|
|
868
|
+
"customCell",
|
|
869
|
+
"data-source",
|
|
870
|
+
"scroll",
|
|
871
|
+
"row-selection"
|
|
872
|
+
])]),
|
|
873
|
+
_: 1
|
|
874
|
+
}),
|
|
875
|
+
M(u, { span: 1 }, {
|
|
876
|
+
default: K(() => [A("div", { style: I({
|
|
877
|
+
display: "flex",
|
|
878
|
+
alignItems: "center",
|
|
879
|
+
justifyContent: "center",
|
|
880
|
+
height: e.height + "px"
|
|
881
|
+
}) }, [A("div", Fe, [
|
|
882
|
+
e.baseSelectKeys.length === 0 ? (z(), D(d, {
|
|
883
|
+
key: 0,
|
|
884
|
+
style: {
|
|
885
|
+
color: "#999999",
|
|
886
|
+
"font-size": "25px"
|
|
887
|
+
}
|
|
888
|
+
})) : O("", !0),
|
|
889
|
+
e.baseSelectKeys.length > 0 ? (z(), D(f, {
|
|
890
|
+
key: 1,
|
|
891
|
+
style: { "font-size": "25px" },
|
|
892
|
+
onClick: e.goLeft
|
|
893
|
+
}, null, 8, ["onClick"])) : O("", !0),
|
|
894
|
+
e.selectedRowKeys.length === 0 ? (z(), D(p, {
|
|
895
|
+
key: 2,
|
|
896
|
+
style: {
|
|
897
|
+
color: "#999999",
|
|
898
|
+
"font-size": "25px"
|
|
899
|
+
}
|
|
900
|
+
})) : O("", !0),
|
|
901
|
+
e.selectedRowKeys.length > 0 ? (z(), D(m, {
|
|
902
|
+
key: 3,
|
|
903
|
+
style: { "font-size": "25px" },
|
|
904
|
+
onClick: e.goRight
|
|
905
|
+
}, null, 8, ["onClick"])) : O("", !0)
|
|
906
|
+
])], 4)]),
|
|
907
|
+
_: 1
|
|
908
|
+
}),
|
|
909
|
+
M(u, {
|
|
910
|
+
span: 17,
|
|
911
|
+
class: "base-column-content"
|
|
912
|
+
}, {
|
|
913
|
+
default: K(() => [A("div", Ie, [A("div", Le, W(e.$t("列设置")), 1)]), A("div", Re, [M(l, {
|
|
914
|
+
bordered: !0,
|
|
915
|
+
columns: e.baseColumns,
|
|
916
|
+
rowHeight: 30,
|
|
917
|
+
"data-source": e.baseColumnList,
|
|
918
|
+
"row-selection": e.baseRowSelection,
|
|
919
|
+
selectedRowKeys: e.baseSelectKeys,
|
|
920
|
+
"onUpdate:selectedRowKeys": t[1] ||= (t) => e.baseSelectKeys = t,
|
|
921
|
+
"expand-row-by-click": "",
|
|
922
|
+
onRowDragEnd: e.onRowDragEnd,
|
|
923
|
+
"row-key": "dataIndex",
|
|
924
|
+
pagination: !1,
|
|
925
|
+
size: "small",
|
|
926
|
+
scroll: {
|
|
927
|
+
y: e.height - 100,
|
|
928
|
+
x: "100%"
|
|
929
|
+
}
|
|
930
|
+
}, {
|
|
931
|
+
bodyCell: K(({ column: n, index: r, text: i, record: a, recordIndexs: o }) => [
|
|
932
|
+
n.dataIndex === "title" ? (z(), D(h, {
|
|
933
|
+
key: 0,
|
|
934
|
+
value: e.getRawRecord(e.baseColumnList, o).title,
|
|
935
|
+
"onUpdate:value": (t) => e.getRawRecord(e.baseColumnList, o).title = t,
|
|
936
|
+
onChange: e.emitData
|
|
937
|
+
}, null, 8, [
|
|
938
|
+
"value",
|
|
939
|
+
"onUpdate:value",
|
|
940
|
+
"onChange"
|
|
941
|
+
])) : O("", !0),
|
|
942
|
+
n.dataIndex === "dataIndex" ? (z(), k(T, { key: 1 }, [j(W(i) + " ", 1), e.fieldMap && !e.fieldMap[i] ? (z(), D(g, {
|
|
943
|
+
key: 0,
|
|
944
|
+
title: "列参数不存在",
|
|
945
|
+
style: { color: "#faad14" }
|
|
946
|
+
})) : O("", !0)], 64)) : O("", !0),
|
|
947
|
+
n.dataIndex === "defaultSort" ? (z(), k(T, { key: 2 }, [a.sorter ? (z(), D(b, {
|
|
948
|
+
key: 0,
|
|
949
|
+
gutter: 8
|
|
950
|
+
}, {
|
|
951
|
+
default: K(() => [M(u, { span: 12 }, {
|
|
952
|
+
default: K(() => [M(v, {
|
|
953
|
+
value: a.defaultSortOrder,
|
|
954
|
+
"onUpdate:value": (e) => a.defaultSortOrder = e,
|
|
955
|
+
onChange: e.changeBaseColumnList,
|
|
956
|
+
style: { width: "100%" },
|
|
957
|
+
size: "small",
|
|
958
|
+
allowClear: ""
|
|
959
|
+
}, {
|
|
960
|
+
default: K(() => [M(_, {
|
|
961
|
+
key: "ascend",
|
|
962
|
+
value: "ascend"
|
|
963
|
+
}, {
|
|
964
|
+
default: K(() => [j(W(e.$t("升序")), 1)]),
|
|
965
|
+
_: 1
|
|
966
|
+
}), M(_, {
|
|
967
|
+
key: "descend",
|
|
968
|
+
value: "descend"
|
|
969
|
+
}, {
|
|
970
|
+
default: K(() => [j(W(e.$t("降序")), 1)]),
|
|
971
|
+
_: 1
|
|
972
|
+
})]),
|
|
973
|
+
_: 1
|
|
974
|
+
}, 8, [
|
|
975
|
+
"value",
|
|
976
|
+
"onUpdate:value",
|
|
977
|
+
"onChange"
|
|
978
|
+
])]),
|
|
979
|
+
_: 2
|
|
980
|
+
}, 1024), M(u, { span: 12 }, {
|
|
981
|
+
default: K(() => [a.defaultSortOrder ? (z(), D(y, {
|
|
982
|
+
key: 0,
|
|
983
|
+
size: "small",
|
|
984
|
+
value: a.defaultSortIndex,
|
|
985
|
+
"onUpdate:value": (e) => a.defaultSortIndex = e,
|
|
986
|
+
precision: 0,
|
|
987
|
+
onClick: e.changeBaseColumnList,
|
|
988
|
+
placeholder: "序号",
|
|
989
|
+
style: { width: "100%" },
|
|
990
|
+
min: 1
|
|
991
|
+
}, null, 8, [
|
|
992
|
+
"value",
|
|
993
|
+
"onUpdate:value",
|
|
994
|
+
"onClick"
|
|
995
|
+
])) : O("", !0)]),
|
|
996
|
+
_: 2
|
|
997
|
+
}, 1024)]),
|
|
998
|
+
_: 2
|
|
999
|
+
}, 1024)) : (z(), k("div", ze, " 不支持排序 "))], 64)) : O("", !0),
|
|
1000
|
+
n.dataIndex === "fixed" ? (z(), k(T, { key: 3 }, [a?.is_children ? O("", !0) : (z(), D(S, {
|
|
1001
|
+
key: 0,
|
|
1002
|
+
value: a.fixed,
|
|
1003
|
+
"onUpdate:value": (e) => a.fixed = e,
|
|
1004
|
+
size: "small",
|
|
1005
|
+
onClick: e.changeBaseColumnList
|
|
1006
|
+
}, {
|
|
1007
|
+
default: K(() => [
|
|
1008
|
+
M(x, { value: "left" }, {
|
|
1009
|
+
default: K(() => [...t[2] ||= [j(W("左"), -1)]]),
|
|
1010
|
+
_: 1
|
|
1011
|
+
}),
|
|
1012
|
+
M(x, { value: void 0 }, {
|
|
1013
|
+
default: K(() => [...t[3] ||= [j(W("不固定"), -1)]]),
|
|
1014
|
+
_: 1
|
|
1015
|
+
}),
|
|
1016
|
+
M(x, { value: "right" }, {
|
|
1017
|
+
default: K(() => [...t[4] ||= [j(W("右"), -1)]]),
|
|
1018
|
+
_: 1
|
|
1019
|
+
})
|
|
1020
|
+
]),
|
|
1021
|
+
_: 1
|
|
1022
|
+
}, 8, [
|
|
1023
|
+
"value",
|
|
1024
|
+
"onUpdate:value",
|
|
1025
|
+
"onClick"
|
|
1026
|
+
]))], 64)) : O("", !0),
|
|
1027
|
+
n.dataIndex === "autoHeight" ? (z(), k(T, { key: 4 }, [a.children && a.children.length > 0 ? O("", !0) : (z(), D(C, {
|
|
1028
|
+
key: 0,
|
|
1029
|
+
checked: a.autoHeight,
|
|
1030
|
+
"onUpdate:checked": (e) => a.autoHeight = e,
|
|
1031
|
+
"checked-value": !0,
|
|
1032
|
+
"un-checked-value": !1,
|
|
1033
|
+
"checked-children": "自动",
|
|
1034
|
+
"un-checked-children": "固定",
|
|
1035
|
+
onClick: e.changeBaseColumnList
|
|
1036
|
+
}, null, 8, [
|
|
1037
|
+
"checked",
|
|
1038
|
+
"onUpdate:checked",
|
|
1039
|
+
"onClick"
|
|
1040
|
+
]))], 64)) : O("", !0),
|
|
1041
|
+
n.dataIndex === "autoWidth" ? (z(), k(T, { key: 5 }, [!(a.children && a.children.length > 0) && a?.resizable ? (z(), D(C, {
|
|
1042
|
+
key: 0,
|
|
1043
|
+
checked: a.autoWidth,
|
|
1044
|
+
"onUpdate:checked": (e) => a.autoWidth = e,
|
|
1045
|
+
"checked-value": !0,
|
|
1046
|
+
"un-checked-value": !1,
|
|
1047
|
+
"checked-children": e.$t("自动"),
|
|
1048
|
+
"un-checked-children": e.$t("固定"),
|
|
1049
|
+
onClick: e.changeBaseColumnList
|
|
1050
|
+
}, null, 8, [
|
|
1051
|
+
"checked",
|
|
1052
|
+
"onUpdate:checked",
|
|
1053
|
+
"checked-children",
|
|
1054
|
+
"un-checked-children",
|
|
1055
|
+
"onClick"
|
|
1056
|
+
])) : O("", !0)], 64)) : O("", !0),
|
|
1057
|
+
n.dataIndex === "approve_summary" ? (z(), D(C, {
|
|
1058
|
+
key: 6,
|
|
1059
|
+
checked: a.approve_summary,
|
|
1060
|
+
"onUpdate:checked": (e) => a.approve_summary = e,
|
|
1061
|
+
"checked-value": !0,
|
|
1062
|
+
"un-checked-value": !1,
|
|
1063
|
+
onClick: e.changeBaseColumnList
|
|
1064
|
+
}, null, 8, [
|
|
1065
|
+
"checked",
|
|
1066
|
+
"onUpdate:checked",
|
|
1067
|
+
"onClick"
|
|
1068
|
+
])) : O("", !0),
|
|
1069
|
+
n.dataIndex === "ellipsis" ? (z(), k(T, { key: 7 }, [!(a.children && a.children.length > 0) && a?.resizable ? (z(), D(C, {
|
|
1070
|
+
key: 0,
|
|
1071
|
+
checked: a.ellipsis,
|
|
1072
|
+
"onUpdate:checked": (e) => a.ellipsis = e,
|
|
1073
|
+
"checked-value": !0,
|
|
1074
|
+
"un-checked-value": !1,
|
|
1075
|
+
"checked-children": e.$t("开启"),
|
|
1076
|
+
"un-checked-children": e.$t("关闭"),
|
|
1077
|
+
onClick: e.changeBaseColumnList
|
|
1078
|
+
}, null, 8, [
|
|
1079
|
+
"checked",
|
|
1080
|
+
"onUpdate:checked",
|
|
1081
|
+
"checked-children",
|
|
1082
|
+
"un-checked-children",
|
|
1083
|
+
"onClick"
|
|
1084
|
+
])) : O("", !0)], 64)) : O("", !0),
|
|
1085
|
+
n.dataIndex === "cellComponent" ? (z(), D(v, {
|
|
1086
|
+
key: 8,
|
|
1087
|
+
value: a.cellComponent,
|
|
1088
|
+
"onUpdate:value": (e) => a.cellComponent = e,
|
|
1089
|
+
"allow-clear": !0,
|
|
1090
|
+
dropdownMatchSelectWidth: !1,
|
|
1091
|
+
placeholder: e.$t("请选择"),
|
|
1092
|
+
"show-search": !0,
|
|
1093
|
+
size: "small",
|
|
1094
|
+
style: { width: "180px" },
|
|
1095
|
+
onChange: (t) => e.changeCellComponent(a)
|
|
1096
|
+
}, {
|
|
1097
|
+
default: K(() => [(z(!0), k(T, null, H(e.cellComponentList, (t) => (z(), D(_, {
|
|
1098
|
+
key: t.cellComponent,
|
|
1099
|
+
value: t.cellComponent
|
|
1100
|
+
}, {
|
|
1101
|
+
default: K(() => [j(W(e.$t(t.name) + "(" + t.cellComponent + ")"), 1)]),
|
|
1102
|
+
_: 2
|
|
1103
|
+
}, 1032, ["value"]))), 128))]),
|
|
1104
|
+
_: 1
|
|
1105
|
+
}, 8, [
|
|
1106
|
+
"value",
|
|
1107
|
+
"onUpdate:value",
|
|
1108
|
+
"placeholder",
|
|
1109
|
+
"onChange"
|
|
1110
|
+
])) : O("", !0),
|
|
1111
|
+
n.dataIndex === "action" ? (z(), k(T, { key: 9 }, [e.changedFields[a.dataIndex] ? (z(), D(s, {
|
|
1112
|
+
key: 0,
|
|
1113
|
+
type: "link",
|
|
1114
|
+
onClick: (t) => e.handleUpdateBaseColumn(e.getRawRecord(e.baseColumnList, o))
|
|
1115
|
+
}, {
|
|
1116
|
+
default: K(() => [j(W(e.$t("更新")), 1)]),
|
|
1117
|
+
_: 1
|
|
1118
|
+
}, 8, ["onClick"])) : O("", !0)], 64)) : O("", !0)
|
|
1119
|
+
]),
|
|
1120
|
+
contextmenuPopup: K((t) => [M(c, { direction: "vertical" }, {
|
|
1121
|
+
default: K(() => [M(s, {
|
|
1122
|
+
block: "",
|
|
1123
|
+
size: "small",
|
|
1124
|
+
type: "text",
|
|
1125
|
+
onClick: (n) => e.copyClick(t, "cell")
|
|
1126
|
+
}, {
|
|
1127
|
+
icon: K(() => [M(o)]),
|
|
1128
|
+
default: K(() => [j(" " + W(e.$t("复制")), 1)]),
|
|
1129
|
+
_: 1
|
|
1130
|
+
}, 8, ["onClick"])]),
|
|
1131
|
+
_: 2
|
|
1132
|
+
}, 1024)]),
|
|
1133
|
+
_: 1
|
|
1134
|
+
}, 8, [
|
|
1135
|
+
"columns",
|
|
1136
|
+
"data-source",
|
|
1137
|
+
"row-selection",
|
|
1138
|
+
"selectedRowKeys",
|
|
1139
|
+
"onRowDragEnd",
|
|
1140
|
+
"scroll"
|
|
1141
|
+
])])]),
|
|
1142
|
+
_: 1
|
|
1143
|
+
})
|
|
1144
|
+
]),
|
|
1145
|
+
_: 1
|
|
1146
|
+
})]),
|
|
1147
|
+
_: 1
|
|
1148
|
+
}, 8, ["style"])]),
|
|
1149
|
+
_: 1
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
var Ve = /* @__PURE__ */ c(Me, [["render", Be], ["__scopeId", "data-v-c244ceb9"]]), He = N({
|
|
1153
|
+
name: "OperatorSelect",
|
|
1154
|
+
props: { record: {
|
|
1155
|
+
type: Object,
|
|
1156
|
+
required: !0
|
|
1157
|
+
} },
|
|
1158
|
+
emits: ["change"],
|
|
1159
|
+
setup(e, { emit: t }) {
|
|
1160
|
+
let r = n();
|
|
1161
|
+
return {
|
|
1162
|
+
changeOperatorList: (e) => {
|
|
1163
|
+
t("change", e);
|
|
1164
|
+
},
|
|
1165
|
+
operator_list: E(() => {
|
|
1166
|
+
let t = [];
|
|
1167
|
+
return e.record.options && e.record.options.length > 0 ? (t = [
|
|
1168
|
+
"in",
|
|
1169
|
+
"notin",
|
|
1170
|
+
"eq",
|
|
1171
|
+
"not_eq"
|
|
1172
|
+
], e.record.class_name == "str" ? t.push("is_or_not_blank_or_null") : t.push("is_or_not_null")) : t = e.record.type == "remoteselectpro" ? r.remote : r[e.record.class_name] || [], t;
|
|
1173
|
+
}),
|
|
1174
|
+
get_operator_type_map: l
|
|
1175
|
+
};
|
|
1176
|
+
}
|
|
1177
|
+
});
|
|
1178
|
+
//#endregion
|
|
1179
|
+
//#region src/components/approval/components/approvalPageConfig/operatorSelect.vue
|
|
1180
|
+
function Ue(e, t, n, r, i, a) {
|
|
1181
|
+
let o = U("a-select-option"), s = U("a-select");
|
|
1182
|
+
return z(), D(s, {
|
|
1183
|
+
value: e.record.operator_list,
|
|
1184
|
+
"onUpdate:value": t[0] ||= (t) => e.record.operator_list = t,
|
|
1185
|
+
"allow-clear": !0,
|
|
1186
|
+
dropdownMatchSelectWidth: !1,
|
|
1187
|
+
placeholder: "请选择",
|
|
1188
|
+
"show-search": !0,
|
|
1189
|
+
size: "small",
|
|
1190
|
+
mode: "tags",
|
|
1191
|
+
maxTagCount: "responsive",
|
|
1192
|
+
style: { width: "100%" },
|
|
1193
|
+
onChange: t[1] ||= (t) => e.changeOperatorList(e.record)
|
|
1194
|
+
}, {
|
|
1195
|
+
default: K(() => [(z(!0), k(T, null, H(e.operator_list, (t) => (z(), D(o, { value: t }, {
|
|
1196
|
+
default: K(() => [j(W(e.get_operator_type_map(e.record.format, t)) + "(" + W(t) + ") ", 1)]),
|
|
1197
|
+
_: 2
|
|
1198
|
+
}, 1032, ["value"]))), 256))]),
|
|
1199
|
+
_: 1
|
|
1200
|
+
}, 8, ["value"]);
|
|
1201
|
+
}
|
|
1202
|
+
var We = /* @__PURE__ */ c(He, [["render", Ue]]), Ge = N({
|
|
1203
|
+
name: "DefaultOperatorSelect",
|
|
1204
|
+
props: { record: {
|
|
1205
|
+
type: Object,
|
|
1206
|
+
required: !0
|
|
1207
|
+
} },
|
|
1208
|
+
emits: ["change"],
|
|
1209
|
+
setup(e, { emit: t }) {
|
|
1210
|
+
return {
|
|
1211
|
+
changeDefaultOperator: (e) => {
|
|
1212
|
+
t("change", e);
|
|
1213
|
+
},
|
|
1214
|
+
operator_list: E(() => e.record.operator_list),
|
|
1215
|
+
get_operator_type_map: l
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
//#endregion
|
|
1220
|
+
//#region src/components/approval/components/approvalPageConfig/defaultOperatorSelect.vue
|
|
1221
|
+
function Ke(e, t, n, r, i, a) {
|
|
1222
|
+
let o = U("a-select-option"), s = U("a-select");
|
|
1223
|
+
return z(), D(s, {
|
|
1224
|
+
value: e.record.default_operator,
|
|
1225
|
+
"onUpdate:value": t[0] ||= (t) => e.record.default_operator = t,
|
|
1226
|
+
"allow-clear": !0,
|
|
1227
|
+
dropdownMatchSelectWidth: !1,
|
|
1228
|
+
placeholder: "请选择",
|
|
1229
|
+
"show-search": !0,
|
|
1230
|
+
size: "small",
|
|
1231
|
+
style: { width: "100%" },
|
|
1232
|
+
onChange: t[1] ||= (t) => e.changeDefaultOperator(e.record)
|
|
1233
|
+
}, {
|
|
1234
|
+
default: K(() => [(z(!0), k(T, null, H(e.record.operator_list, (t) => (z(), D(o, { value: t }, {
|
|
1235
|
+
default: K(() => [j(W(e.get_operator_type_map(e.record.format, t)) + "(" + W(t) + ") ", 1)]),
|
|
1236
|
+
_: 2
|
|
1237
|
+
}, 1032, ["value"]))), 256))]),
|
|
1238
|
+
_: 1
|
|
1239
|
+
}, 8, ["value"]);
|
|
1240
|
+
}
|
|
1241
|
+
var qe = /* @__PURE__ */ c(Ge, [["render", Ke]]), Je = [{
|
|
1242
|
+
title: "参数",
|
|
1243
|
+
dataIndex: "name",
|
|
1244
|
+
checked: !0,
|
|
1245
|
+
width: 250,
|
|
1246
|
+
ellipsis: !0
|
|
1247
|
+
}, {
|
|
1248
|
+
title: "名称",
|
|
1249
|
+
dataIndex: "verbose_name",
|
|
1250
|
+
checked: !0,
|
|
1251
|
+
width: 100,
|
|
1252
|
+
ellipsis: !0
|
|
1253
|
+
}], Ye = [
|
|
1254
|
+
{
|
|
1255
|
+
title: "列名称",
|
|
1256
|
+
dataIndex: "label",
|
|
1257
|
+
key: "label",
|
|
1258
|
+
rowDrag: !0,
|
|
1259
|
+
width: 100
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
title: "查询参数",
|
|
1263
|
+
dataIndex: "field_name",
|
|
1264
|
+
key: "field_name",
|
|
1265
|
+
width: 20,
|
|
1266
|
+
ellipsis: !0
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
title: "数值类型",
|
|
1270
|
+
dataIndex: "class_name",
|
|
1271
|
+
key: "class_name",
|
|
1272
|
+
width: 10
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
title: "表单类型",
|
|
1276
|
+
dataIndex: "type",
|
|
1277
|
+
key: "type",
|
|
1278
|
+
width: 100
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
title: "可选比较操作符",
|
|
1282
|
+
dataIndex: "operator_list",
|
|
1283
|
+
key: "operator_list",
|
|
1284
|
+
width: 250
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
title: "默认比较操作符",
|
|
1288
|
+
dataIndex: "default_operator",
|
|
1289
|
+
key: "default_operator",
|
|
1290
|
+
width: 100
|
|
1291
|
+
}
|
|
1292
|
+
], Xe = N({
|
|
1293
|
+
name: "BaseSearch",
|
|
1294
|
+
props: {
|
|
1295
|
+
record: {
|
|
1296
|
+
type: Object,
|
|
1297
|
+
default: () => {}
|
|
1298
|
+
},
|
|
1299
|
+
modelType: {
|
|
1300
|
+
type: String,
|
|
1301
|
+
default: () => ""
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
components: {
|
|
1305
|
+
CloseCircleOutlined: X,
|
|
1306
|
+
LeftSquareOutlined: te,
|
|
1307
|
+
LeftSquareTwoTone: ne,
|
|
1308
|
+
RightSquareOutlined: ie,
|
|
1309
|
+
RightSquareTwoTone: ae,
|
|
1310
|
+
CheckOutlined: Y,
|
|
1311
|
+
EditOutlined: Z,
|
|
1312
|
+
OperatorSelect: We,
|
|
1313
|
+
DefaultOperatorSelect: qe,
|
|
1314
|
+
cellEdit: je
|
|
1315
|
+
},
|
|
1316
|
+
emits: ["update:record"],
|
|
1317
|
+
setup(e, { emit: r }) {
|
|
1318
|
+
let o = n(), s = a(), c = V(0), l = t().currentOrg, u = V([]), d = B({}), f = V([]), p = V([]), m = V([]), h = V([]), g = V({}), _ = V({}), v = () => {
|
|
1319
|
+
let e = [];
|
|
1320
|
+
e = $(p.value), e.forEach((e) => {
|
|
1321
|
+
delete e.dataIndex;
|
|
1322
|
+
}), r("update:record", e);
|
|
1323
|
+
}, y = oe(() => {
|
|
1324
|
+
c.value = window.innerHeight - 165;
|
|
1325
|
+
}, 200);
|
|
1326
|
+
function b(e, t) {
|
|
1327
|
+
e.name != null && t.has(e.name) ? e.disabled = !0 : e.disabled = !1, e.children && Array.isArray(e.children) && e.children.forEach((e) => {
|
|
1328
|
+
b(e, t);
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
function x(e, t = /* @__PURE__ */ new Set(), n = []) {
|
|
1332
|
+
let r = [];
|
|
1333
|
+
return e.forEach((e, i) => {
|
|
1334
|
+
let a = [...n, i], o = e.name, s = e.type;
|
|
1335
|
+
if (!t.has(o) && s !== "json") {
|
|
1336
|
+
t.add(o);
|
|
1337
|
+
let n = { ...e };
|
|
1338
|
+
n.children && Array.isArray(n.children) && (n.children = x(n.children, t, a)), r.push(n);
|
|
1339
|
+
} else e.children && Array.isArray(e.children) && x(e.children, t, a);
|
|
1340
|
+
}), r;
|
|
1341
|
+
}
|
|
1342
|
+
let S = () => {
|
|
1343
|
+
let e = /* @__PURE__ */ new Set();
|
|
1344
|
+
h.value.length = 0, p.value.forEach((t) => {
|
|
1345
|
+
e.add(t.field_name);
|
|
1346
|
+
}), f.value.forEach((t) => {
|
|
1347
|
+
b(t, e);
|
|
1348
|
+
}), f.value = [].concat(f.value), p.value = [].concat(p.value);
|
|
1349
|
+
};
|
|
1350
|
+
L(async () => {
|
|
1351
|
+
window.addEventListener("resize", y), y();
|
|
1352
|
+
let t = $(e.record) || [];
|
|
1353
|
+
if (t.forEach((e) => {
|
|
1354
|
+
e.operator_list ||= [], !e.dataIndex && e.field_name && (e.dataIndex = e.field_name);
|
|
1355
|
+
}), p.value = t, console.log(p.value), e.modelType) {
|
|
1356
|
+
let t = e.modelType.split("-"), n = `${t[0]}/obtain_${t[1]}_column_data`;
|
|
1357
|
+
f.value = x(await i({ org_id: l?.id }, n, !1, { skip_error: !0 }) || []), G(f.value);
|
|
1358
|
+
}
|
|
1359
|
+
J(), S();
|
|
1360
|
+
}), R(() => {
|
|
1361
|
+
window.removeEventListener("resize", y);
|
|
1362
|
+
});
|
|
1363
|
+
let C = (e) => {
|
|
1364
|
+
if (e.record.disabled) return { style: { background: "#cbcbcb" } };
|
|
1365
|
+
}, w = B({
|
|
1366
|
+
type: "checkbox",
|
|
1367
|
+
onChange: (e) => {
|
|
1368
|
+
m.value = e;
|
|
1369
|
+
},
|
|
1370
|
+
getCheckboxProps: (e) => ({
|
|
1371
|
+
disabled: e.children !== void 0,
|
|
1372
|
+
name: e.dataIndex
|
|
1373
|
+
})
|
|
1374
|
+
}), T = B({
|
|
1375
|
+
type: "checkbox",
|
|
1376
|
+
onChange: (e) => {
|
|
1377
|
+
u.value = e;
|
|
1378
|
+
},
|
|
1379
|
+
getCheckboxProps: (e) => ({
|
|
1380
|
+
disabled: e.disabled,
|
|
1381
|
+
name: e.name
|
|
1382
|
+
})
|
|
1383
|
+
}), E = (e, t) => {
|
|
1384
|
+
let n, r = (e, t, i) => {
|
|
1385
|
+
for (let a of t) if (a.dataIndex === i) return n = e, n;
|
|
1386
|
+
else if (a.children && a.children.length > 0 && (n = r(a.dataIndex, a.children, i), n !== void 0)) return n;
|
|
1387
|
+
};
|
|
1388
|
+
return r(null, e, t);
|
|
1389
|
+
}, D = ({ record: e, insertToRowKey: t }) => new Promise((n, r) => {
|
|
1390
|
+
let i = E(p.value, e.dataIndex);
|
|
1391
|
+
i != null && t != null || i == null && t == null ? n(!0) : r();
|
|
1392
|
+
}).then(() => {
|
|
1393
|
+
setTimeout(() => {
|
|
1394
|
+
v();
|
|
1395
|
+
}, 200);
|
|
1396
|
+
}), O = (e) => {
|
|
1397
|
+
e.forEach((e) => {
|
|
1398
|
+
m.value.indexOf(e.name) > -1 && (e.disabled = !1), e.children && Array.isArray(e.children) && O(e.children);
|
|
1399
|
+
});
|
|
1400
|
+
}, k = () => {
|
|
1401
|
+
let e = p.value.filter((e) => m.value.indexOf(e.dataIndex) == -1);
|
|
1402
|
+
O(f.value), m.value.length = 0, p.value = [].concat(e), f.value = [].concat(f.value), v(), J();
|
|
1403
|
+
}, A = (e) => {
|
|
1404
|
+
e.forEach((e) => {
|
|
1405
|
+
if (u.value.indexOf(e.name) > -1) {
|
|
1406
|
+
e.disabled = !0;
|
|
1407
|
+
let t = {};
|
|
1408
|
+
t.field_name = e.name, t.label = e.verbose_name, t.dataIndex = e.name, t.required_condition = e.required_condition, t.allowClear = !0, Object.assign(t, e.advanced_search_component), e?.options && e.options.length > 0 ? (t.options = e.options, t.operator_list = [
|
|
1409
|
+
"eq",
|
|
1410
|
+
"in",
|
|
1411
|
+
"notin"
|
|
1412
|
+
], e.type === "boolean" ? t.class_name = "bool" : t.class_name = e.type, t.format = "choices") : e.type == "int" ? (t.format = "input", t.operator_list = o[e.type], t.class_name = "int") : e.type == "float" ? (t.format = "input", t.operator_list = o[e.type], t.class_name = "float") : e.type == "str" ? (t.format = "input", t.operator_list = o[e.type], t.class_name = "str") : e.type == "remote" ? (t.format = "remote", t.operator_list = o[e.type], t.class_name = "int", t.postUrl = e.postUrl) : e.type == "datetime" ? (t.format = "input", t.operator_list = o[e.type], t.class_name = "datetime") : e.type == "date" ? (t.format = "input", t.operator_list = o[e.type], t.class_name = "date") : e.type == "time" ? (t.format = "input", t.operator_list = o[e.type], t.class_name = "time") : (t.format = "input", t.operator_list = o.str, t.class_name = "str"), p.value.push(t);
|
|
1413
|
+
}
|
|
1414
|
+
e.children && Array.isArray(e.children) && A(e.children);
|
|
1415
|
+
});
|
|
1416
|
+
}, j = () => {
|
|
1417
|
+
A(f.value), u.value.length = 0, f.value = [].concat(f.value), p.value = [].concat(p.value), v();
|
|
1418
|
+
}, M = (e) => {
|
|
1419
|
+
delete d[e];
|
|
1420
|
+
}, N = (e) => {
|
|
1421
|
+
d[e] = e;
|
|
1422
|
+
}, P = (e) => {
|
|
1423
|
+
delete d[e];
|
|
1424
|
+
let t = [];
|
|
1425
|
+
p.value.forEach((n) => {
|
|
1426
|
+
e == n.dataIndex && (t = n.children);
|
|
1427
|
+
}), p.value = p.value.filter((t) => t.dataIndex !== e), p.value.length > 0 && p.value[p.value.length - 1].children.push(...t), p.value = [].concat(p.value), v();
|
|
1428
|
+
}, F = () => {
|
|
1429
|
+
p.value = [].concat(p.value), v();
|
|
1430
|
+
}, I = (e) => e?.children && e.children.length >= 0 ? [] : e?.options && e.options.length > 0 ? [{
|
|
1431
|
+
name: "下拉选框",
|
|
1432
|
+
value: "select"
|
|
1433
|
+
}] : s[e.class_name] ? s[e.class_name].type : [], z = (e) => {
|
|
1434
|
+
e.operator_list.includes(e.default_operator) || (e.default_operator = null), e.default_operator ||= e.operator_list?.[0], v();
|
|
1435
|
+
}, H = (e) => {
|
|
1436
|
+
v();
|
|
1437
|
+
}, U = (e, t) => {
|
|
1438
|
+
let n = e;
|
|
1439
|
+
return t.forEach((e) => {
|
|
1440
|
+
!Array.isArray(n) && n.children && (n = n.children), n = n[e];
|
|
1441
|
+
}), n;
|
|
1442
|
+
}, W = (e, t) => {
|
|
1443
|
+
let n = {};
|
|
1444
|
+
return Object.keys(t).forEach((r) => {
|
|
1445
|
+
e[r] !== void 0 && (n[t[r]] = e[r]);
|
|
1446
|
+
}), n;
|
|
1447
|
+
}, G = (e) => {
|
|
1448
|
+
e.forEach((e) => {
|
|
1449
|
+
g.value[e.name] = e, Array.isArray(e.children) && G(e.children);
|
|
1450
|
+
});
|
|
1451
|
+
}, K = (e) => {
|
|
1452
|
+
let t = g.value[e.field_name];
|
|
1453
|
+
if (t) {
|
|
1454
|
+
let n = {
|
|
1455
|
+
options: "options",
|
|
1456
|
+
required_condition: "required_condition"
|
|
1457
|
+
}, r = W(t, n), i = W(e, Object.values(n).reduce((e, t) => (e[t] = t, e), {})), a = se(r, i);
|
|
1458
|
+
return a || console.log(`${e.field_name} 字段配置不一致`, r, i), a;
|
|
1459
|
+
}
|
|
1460
|
+
return !0;
|
|
1461
|
+
}, q = (e) => {
|
|
1462
|
+
let t = {};
|
|
1463
|
+
return e.forEach((e) => {
|
|
1464
|
+
K(e) || (t[e.field_name] = e);
|
|
1465
|
+
let n = e.children || e.group;
|
|
1466
|
+
Array.isArray(n) && Object.assign(t, q(n));
|
|
1467
|
+
}), t;
|
|
1468
|
+
}, J = () => {
|
|
1469
|
+
_.value = q(p.value);
|
|
1470
|
+
}, Y = (e) => {
|
|
1471
|
+
X(e), v(), J();
|
|
1472
|
+
}, X = (e) => {
|
|
1473
|
+
let t = g.value[e.field_name];
|
|
1474
|
+
if (t) {
|
|
1475
|
+
let n = W(t, {
|
|
1476
|
+
options: "options",
|
|
1477
|
+
required_condition: "required_condition"
|
|
1478
|
+
});
|
|
1479
|
+
Object.assign(e, n);
|
|
1480
|
+
}
|
|
1481
|
+
};
|
|
1482
|
+
return {
|
|
1483
|
+
selectedRowKeys: u,
|
|
1484
|
+
dataSource: f,
|
|
1485
|
+
columns: Je,
|
|
1486
|
+
baseColumns: Ye,
|
|
1487
|
+
baseDataSource: p,
|
|
1488
|
+
open: d,
|
|
1489
|
+
rowSelection: T,
|
|
1490
|
+
baseRowSelection: w,
|
|
1491
|
+
baseSelectedRowKeys: m,
|
|
1492
|
+
baseExpandedRowKeys: h,
|
|
1493
|
+
emitData: v,
|
|
1494
|
+
customCell: C,
|
|
1495
|
+
toLeft: k,
|
|
1496
|
+
toRight: j,
|
|
1497
|
+
baseRowDragEnd: D,
|
|
1498
|
+
cancel: M,
|
|
1499
|
+
handleDelete: N,
|
|
1500
|
+
deleteRecord: P,
|
|
1501
|
+
changeBase: F,
|
|
1502
|
+
getType: I,
|
|
1503
|
+
changeOperatorList: z,
|
|
1504
|
+
changeDefaultOperator: H,
|
|
1505
|
+
changedFields: _,
|
|
1506
|
+
updateAllBaseSearch: () => {
|
|
1507
|
+
Object.values(_.value).forEach((e) => {
|
|
1508
|
+
X(e);
|
|
1509
|
+
}), v(), J();
|
|
1510
|
+
},
|
|
1511
|
+
handleUpdateBaseColumn: Y,
|
|
1512
|
+
getRawRecord: U,
|
|
1513
|
+
height: c,
|
|
1514
|
+
fieldMap: g
|
|
1515
|
+
};
|
|
1516
|
+
}
|
|
1517
|
+
}), Ze = { style: { width: "30px" } };
|
|
1518
|
+
function Qe(e, t, n, r, i, a) {
|
|
1519
|
+
let o = U("s-table"), s = U("a-col"), c = U("left-square-outlined"), l = U("left-square-two-tone"), u = U("right-square-outlined"), d = U("right-square-two-tone"), f = U("cell-edit"), p = U("WarningOutlined"), m = U("a-select-option"), h = U("a-select"), g = U("OperatorSelect"), _ = U("DefaultOperatorSelect"), v = U("a-button"), y = U("a-row");
|
|
1520
|
+
return z(), D(y, {
|
|
1521
|
+
class: "antTabs",
|
|
1522
|
+
style: I({ height: e.height + "px" })
|
|
1523
|
+
}, {
|
|
1524
|
+
default: K(() => [
|
|
1525
|
+
M(s, {
|
|
1526
|
+
span: 7,
|
|
1527
|
+
style: { height: "100%" }
|
|
1528
|
+
}, {
|
|
1529
|
+
default: K(() => [t[3] ||= A("div", { class: "column-title-container" }, [A("div", { class: "column-title" }, "基础数据")], -1), M(o, {
|
|
1530
|
+
selectedRowKeys: e.selectedRowKeys,
|
|
1531
|
+
"onUpdate:selectedRowKeys": t[0] ||= (t) => e.selectedRowKeys = t,
|
|
1532
|
+
autoRowHeight: !0,
|
|
1533
|
+
bordered: !0,
|
|
1534
|
+
columns: e.columns,
|
|
1535
|
+
customCell: e.customCell,
|
|
1536
|
+
"data-source": e.dataSource,
|
|
1537
|
+
scroll: { y: e.height - 90 },
|
|
1538
|
+
indentSize: 0,
|
|
1539
|
+
pagination: !1,
|
|
1540
|
+
"row-selection": e.rowSelection,
|
|
1541
|
+
rowHeight: 30,
|
|
1542
|
+
rowKey: "name",
|
|
1543
|
+
size: "small",
|
|
1544
|
+
wrapText: !0,
|
|
1545
|
+
sticky: "",
|
|
1546
|
+
stripe: "",
|
|
1547
|
+
"summary-fixed": ""
|
|
1548
|
+
}, {
|
|
1549
|
+
bodyCell: K(({ column: e, index: t, text: n, record: r }) => [A("span", null, W(n), 1)]),
|
|
1550
|
+
_: 1
|
|
1551
|
+
}, 8, [
|
|
1552
|
+
"selectedRowKeys",
|
|
1553
|
+
"columns",
|
|
1554
|
+
"customCell",
|
|
1555
|
+
"data-source",
|
|
1556
|
+
"scroll",
|
|
1557
|
+
"row-selection"
|
|
1558
|
+
])]),
|
|
1559
|
+
_: 1
|
|
1560
|
+
}),
|
|
1561
|
+
M(s, { span: 1 }, {
|
|
1562
|
+
default: K(() => [A("div", { style: I({
|
|
1563
|
+
display: "flex",
|
|
1564
|
+
alignItems: "center",
|
|
1565
|
+
justifyContent: "center",
|
|
1566
|
+
height: e.height + "px"
|
|
1567
|
+
}) }, [A("div", Ze, [
|
|
1568
|
+
e.baseSelectedRowKeys.length === 0 ? (z(), D(c, {
|
|
1569
|
+
key: 0,
|
|
1570
|
+
style: {
|
|
1571
|
+
color: "#999999",
|
|
1572
|
+
"font-size": "25px"
|
|
1573
|
+
}
|
|
1574
|
+
})) : O("", !0),
|
|
1575
|
+
e.baseSelectedRowKeys.length > 0 ? (z(), D(l, {
|
|
1576
|
+
key: 1,
|
|
1577
|
+
style: { "font-size": "25px" },
|
|
1578
|
+
onClick: e.toLeft
|
|
1579
|
+
}, null, 8, ["onClick"])) : O("", !0),
|
|
1580
|
+
e.selectedRowKeys.length === 0 ? (z(), D(u, {
|
|
1581
|
+
key: 2,
|
|
1582
|
+
style: {
|
|
1583
|
+
color: "#999999",
|
|
1584
|
+
"font-size": "25px"
|
|
1585
|
+
}
|
|
1586
|
+
})) : O("", !0),
|
|
1587
|
+
e.selectedRowKeys.length > 0 ? (z(), D(d, {
|
|
1588
|
+
key: 3,
|
|
1589
|
+
style: { "font-size": "25px" },
|
|
1590
|
+
onClick: e.toRight
|
|
1591
|
+
}, null, 8, ["onClick"])) : O("", !0)
|
|
1592
|
+
])], 4)]),
|
|
1593
|
+
_: 1
|
|
1594
|
+
}),
|
|
1595
|
+
M(s, { span: 16 }, {
|
|
1596
|
+
default: K(() => [t[5] ||= A("div", { class: "column-title-container" }, [A("div", { class: "column-title" }, "基础列设置")], -1), M(o, {
|
|
1597
|
+
bordered: !0,
|
|
1598
|
+
columns: e.baseColumns,
|
|
1599
|
+
rowHeight: 30,
|
|
1600
|
+
"data-source": e.baseDataSource,
|
|
1601
|
+
"row-selection": e.baseRowSelection,
|
|
1602
|
+
selectedRowKeys: e.baseSelectedRowKeys,
|
|
1603
|
+
"onUpdate:selectedRowKeys": t[1] ||= (t) => e.baseSelectedRowKeys = t,
|
|
1604
|
+
"expand-row-by-click": "",
|
|
1605
|
+
onRowDragEnd: e.baseRowDragEnd,
|
|
1606
|
+
"row-key": "dataIndex",
|
|
1607
|
+
pagination: !1,
|
|
1608
|
+
expandedRowKeys: e.baseExpandedRowKeys,
|
|
1609
|
+
"onUpdate:expandedRowKeys": t[2] ||= (t) => e.baseExpandedRowKeys = t,
|
|
1610
|
+
"default-expand-all-rows": !0,
|
|
1611
|
+
scroll: { y: e.height - 90 },
|
|
1612
|
+
size: "small"
|
|
1613
|
+
}, {
|
|
1614
|
+
bodyCell: K(({ column: n, index: r, text: i, record: a, recordIndexs: o }) => [
|
|
1615
|
+
n.dataIndex === "label" ? (z(), D(f, {
|
|
1616
|
+
key: 0,
|
|
1617
|
+
value: e.getRawRecord(e.baseDataSource, o).label,
|
|
1618
|
+
"onUpdate:value": (t) => e.getRawRecord(e.baseDataSource, o).label = t,
|
|
1619
|
+
onChange: e.emitData
|
|
1620
|
+
}, null, 8, [
|
|
1621
|
+
"value",
|
|
1622
|
+
"onUpdate:value",
|
|
1623
|
+
"onChange"
|
|
1624
|
+
])) : O("", !0),
|
|
1625
|
+
n.dataIndex === "field_name" ? (z(), k(T, { key: 1 }, [j(W(i) + " ", 1), e.fieldMap && !e.fieldMap[i] ? (z(), D(p, {
|
|
1626
|
+
key: 0,
|
|
1627
|
+
title: "查询参数不存在",
|
|
1628
|
+
style: { color: "#faad14" }
|
|
1629
|
+
})) : O("", !0)], 64)) : O("", !0),
|
|
1630
|
+
n.dataIndex === "type" ? (z(), D(h, {
|
|
1631
|
+
key: 2,
|
|
1632
|
+
value: a.type,
|
|
1633
|
+
"onUpdate:value": (e) => a.type = e,
|
|
1634
|
+
"allow-clear": !0,
|
|
1635
|
+
dropdownMatchSelectWidth: !1,
|
|
1636
|
+
placeholder: "请选择",
|
|
1637
|
+
"show-search": !0,
|
|
1638
|
+
size: "small",
|
|
1639
|
+
style: { width: "100%" },
|
|
1640
|
+
onChange: e.changeBase
|
|
1641
|
+
}, {
|
|
1642
|
+
default: K(() => [(z(!0), k(T, null, H(e.getType(a), (e) => (z(), D(m, {
|
|
1643
|
+
key: e.value,
|
|
1644
|
+
value: e.value
|
|
1645
|
+
}, {
|
|
1646
|
+
default: K(() => [j(W(e.name), 1)]),
|
|
1647
|
+
_: 2
|
|
1648
|
+
}, 1032, ["value"]))), 128))]),
|
|
1649
|
+
_: 2
|
|
1650
|
+
}, 1032, [
|
|
1651
|
+
"value",
|
|
1652
|
+
"onUpdate:value",
|
|
1653
|
+
"onChange"
|
|
1654
|
+
])) : O("", !0),
|
|
1655
|
+
n.dataIndex === "operator_list" ? (z(), k(T, { key: 3 }, [!a.children || a.children.length === 0 ? (z(), D(g, {
|
|
1656
|
+
key: 0,
|
|
1657
|
+
record: a,
|
|
1658
|
+
onChange: e.changeOperatorList
|
|
1659
|
+
}, null, 8, ["record", "onChange"])) : O("", !0)], 64)) : O("", !0),
|
|
1660
|
+
n.dataIndex === "default_operator" ? (z(), k(T, { key: 4 }, [!a.children || a.children.length === 0 ? (z(), D(_, {
|
|
1661
|
+
key: 0,
|
|
1662
|
+
record: a,
|
|
1663
|
+
onChange: e.changeDefaultOperator
|
|
1664
|
+
}, null, 8, ["record", "onChange"])) : O("", !0)], 64)) : O("", !0),
|
|
1665
|
+
n.dataIndex === "action" ? (z(), k(T, { key: 5 }, [e.changedFields[a.field_name] ? (z(), D(v, {
|
|
1666
|
+
key: 0,
|
|
1667
|
+
type: "link",
|
|
1668
|
+
onClick: (t) => e.handleUpdateBaseColumn(e.getRawRecord(e.baseDataSource, o))
|
|
1669
|
+
}, {
|
|
1670
|
+
default: K(() => [...t[4] ||= [j(" 更新 ", -1)]]),
|
|
1671
|
+
_: 1
|
|
1672
|
+
}, 8, ["onClick"])) : O("", !0)], 64)) : O("", !0)
|
|
1673
|
+
]),
|
|
1674
|
+
_: 1
|
|
1675
|
+
}, 8, [
|
|
1676
|
+
"columns",
|
|
1677
|
+
"data-source",
|
|
1678
|
+
"row-selection",
|
|
1679
|
+
"selectedRowKeys",
|
|
1680
|
+
"onRowDragEnd",
|
|
1681
|
+
"expandedRowKeys",
|
|
1682
|
+
"scroll"
|
|
1683
|
+
])]),
|
|
1684
|
+
_: 1
|
|
1685
|
+
})
|
|
1686
|
+
]),
|
|
1687
|
+
_: 1
|
|
1688
|
+
}, 8, ["style"]);
|
|
1689
|
+
}
|
|
1690
|
+
var $e = /* @__PURE__ */ c(Xe, [["render", Qe], ["__scopeId", "data-v-2b292566"]]), et = {
|
|
1691
|
+
tables: "左侧栏表格",
|
|
1692
|
+
data_list: "右侧栏表格"
|
|
1693
|
+
}, tt = "未保存页面配置,需保存后才能同步", nt = N({
|
|
1694
|
+
name: "configSync",
|
|
1695
|
+
props: {
|
|
1696
|
+
dataSource: {
|
|
1697
|
+
type: Object,
|
|
1698
|
+
required: !0
|
|
1699
|
+
},
|
|
1700
|
+
tableType: {
|
|
1701
|
+
type: String,
|
|
1702
|
+
default: "tables"
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1705
|
+
setup(e) {
|
|
1706
|
+
let t = x(), n = V(!1), r = V(!1), a = V([]), o = V([]), c = V([]), l = V({}), u = p.map((e) => ({
|
|
1707
|
+
label: d[e] || e,
|
|
1708
|
+
value: e
|
|
1709
|
+
})), f = V([...y, ...p]), m = E(() => y.every((e) => f.value.includes(e))), h = E(() => !m.value && y.some((e) => f.value.includes(e))), b = (e) => {
|
|
1710
|
+
e ? f.value = [...new Set([...f.value, ...y])] : f.value = f.value.filter((e) => !y.includes(e));
|
|
1711
|
+
}, S = V("standard"), C = Object.keys(_).map((e) => ({
|
|
1712
|
+
label: _[e],
|
|
1713
|
+
value: e
|
|
1714
|
+
})), w = E(() => S.value === "append" ? "目标节点没有该表格时,把该表的全部配置完整追加进去(未勾选的配置块也会一并写入)" : "目标节点没有该表格时,忽略这个同步项"), T = E(() => et[e.tableType] || e.tableType), D = E(() => o.value.map((e) => l.value[e]).filter((e) => !!e)), O = () => {
|
|
1715
|
+
let e = t.selectNode, n = s();
|
|
1716
|
+
return !e?.id || !e?.state || !n ? null : {
|
|
1717
|
+
org_id: Number(n),
|
|
1718
|
+
node_id: Number(e.id),
|
|
1719
|
+
menu_flag: e.state,
|
|
1720
|
+
name: e.name || e.state
|
|
1721
|
+
};
|
|
1722
|
+
}, k = E(() => O()), A = E(() => !!e.dataSource?.id && !!k.value && D.value.length > 0 && f.value.length > 0), j = V([]), M = V({}), N = V({}), P = V(""), F = (e, n, r) => {
|
|
1723
|
+
let i = [];
|
|
1724
|
+
for (let a of e || []) {
|
|
1725
|
+
let e = a.is_flow_node ? `flow_node_${n}_${a.id}` : `flow_org_${n}_${a.id}`, o = !!a.is_flow_node && a.menu_flag === t.selectNode?.state && `${a.org_id ?? n}` == `${s() ?? ""}`;
|
|
1726
|
+
if (o && (P.value = e), a.is_flow_node && o) continue;
|
|
1727
|
+
let c = F(a.children || [], n, r);
|
|
1728
|
+
if (a.is_flow_node) {
|
|
1729
|
+
let t = a.page_setting_saved !== !1, o = {
|
|
1730
|
+
key: e,
|
|
1731
|
+
title: a.name,
|
|
1732
|
+
selectable: !1,
|
|
1733
|
+
unsaved: !t
|
|
1734
|
+
};
|
|
1735
|
+
t || (o.disabled = !0), c.length > 0 && (o.children = c), i.push(o), l.value[e] = {
|
|
1736
|
+
key: e,
|
|
1737
|
+
org_id: Number(a.org_id ?? n),
|
|
1738
|
+
org_name: r,
|
|
1739
|
+
node_id: Number(a.id),
|
|
1740
|
+
menu_flag: a.menu_flag,
|
|
1741
|
+
name: a.name,
|
|
1742
|
+
page_setting_saved: t
|
|
1743
|
+
};
|
|
1744
|
+
continue;
|
|
1745
|
+
}
|
|
1746
|
+
c.length !== 0 && i.push({
|
|
1747
|
+
key: e,
|
|
1748
|
+
title: a.name,
|
|
1749
|
+
selectable: !1,
|
|
1750
|
+
children: c
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
return i;
|
|
1754
|
+
}, I = (e, t, n = []) => {
|
|
1755
|
+
for (let r of e) {
|
|
1756
|
+
if (r.key === t) return n;
|
|
1757
|
+
if (r.children?.length) {
|
|
1758
|
+
let e = I(r.children, t, [...n, r.key]);
|
|
1759
|
+
if (e) return e;
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
return null;
|
|
1763
|
+
}, R = (e, t) => {
|
|
1764
|
+
for (let n of e) {
|
|
1765
|
+
if (n.key === t) {
|
|
1766
|
+
let e = [], t = (n) => {
|
|
1767
|
+
for (let r of n) l.value[r.key]?.page_setting_saved && e.push(r.key), r.children?.length && t(r.children);
|
|
1768
|
+
};
|
|
1769
|
+
return t(n.children || []), e;
|
|
1770
|
+
}
|
|
1771
|
+
if (n.children?.length) {
|
|
1772
|
+
let e = R(n.children, t);
|
|
1773
|
+
if (e !== null) return e;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
return null;
|
|
1777
|
+
}, z = () => {
|
|
1778
|
+
l.value = {}, P.value = "", a.value = j.value.map((e) => {
|
|
1779
|
+
let t = `${e.id}`.replace("org_", ""), n = `org_${t}`, r = M.value[t], i = r ? F(r, t, e.name) : [];
|
|
1780
|
+
return {
|
|
1781
|
+
key: n,
|
|
1782
|
+
title: e.name,
|
|
1783
|
+
selectable: !1,
|
|
1784
|
+
isLeaf: !!r && i.length === 0,
|
|
1785
|
+
children: i
|
|
1786
|
+
};
|
|
1787
|
+
}), o.value = o.value.filter((e) => !!l.value[e]);
|
|
1788
|
+
}, B = async (e) => {
|
|
1789
|
+
let t = e.replace("org_", "");
|
|
1790
|
+
if (!(M.value[t] || N.value[e])) {
|
|
1791
|
+
N.value = {
|
|
1792
|
+
...N.value,
|
|
1793
|
+
[e]: !0
|
|
1794
|
+
};
|
|
1795
|
+
try {
|
|
1796
|
+
let e = await i({ org_id: t }, "/approve/query_org_flow_tree");
|
|
1797
|
+
M.value = {
|
|
1798
|
+
...M.value,
|
|
1799
|
+
[t]: e?.data || []
|
|
1800
|
+
}, z();
|
|
1801
|
+
} catch (e) {
|
|
1802
|
+
Q.error(e?.message || "加载该组织下的流程节点失败");
|
|
1803
|
+
} finally {
|
|
1804
|
+
let t = { ...N.value };
|
|
1805
|
+
delete t[e], N.value = t;
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
}, H = async () => {
|
|
1809
|
+
n.value = !0;
|
|
1810
|
+
try {
|
|
1811
|
+
j.value = (await i({}, "/approve/query_sync_org_list"))?.data || [], z(), await U();
|
|
1812
|
+
} catch (e) {
|
|
1813
|
+
Q.error(e?.message || "加载组织列表失败");
|
|
1814
|
+
} finally {
|
|
1815
|
+
n.value = !1;
|
|
1816
|
+
}
|
|
1817
|
+
}, U = async () => {
|
|
1818
|
+
let e = `${s() ?? ""}`;
|
|
1819
|
+
if (!e) return;
|
|
1820
|
+
let t = `org_${e}`;
|
|
1821
|
+
if (!j.value.some((e) => `${e.id}` === t)) return;
|
|
1822
|
+
c.value = [...new Set([...c.value, t])], await B(t);
|
|
1823
|
+
let n = Object.values(l.value).filter((t) => `${t.org_id}` === e && t.page_setting_saved);
|
|
1824
|
+
if (n.length > 0) {
|
|
1825
|
+
let e = n.map((e) => e.key);
|
|
1826
|
+
o.value = [...new Set([...o.value, ...e])];
|
|
1827
|
+
let t = new Set(c.value);
|
|
1828
|
+
for (let e of n) for (let n of I(a.value, e.key) || []) t.add(n);
|
|
1829
|
+
c.value = [...t];
|
|
1830
|
+
}
|
|
1831
|
+
};
|
|
1832
|
+
G(() => t.selectNode?.state, () => {
|
|
1833
|
+
j.value.length > 0 && z();
|
|
1834
|
+
});
|
|
1835
|
+
let W = 0;
|
|
1836
|
+
return L(() => {
|
|
1837
|
+
H();
|
|
1838
|
+
}), {
|
|
1839
|
+
treeLoading: n,
|
|
1840
|
+
syncing: r,
|
|
1841
|
+
treeData: a,
|
|
1842
|
+
checkedKeys: o,
|
|
1843
|
+
expandedKeys: c,
|
|
1844
|
+
tableFieldOptions: u,
|
|
1845
|
+
fields: f,
|
|
1846
|
+
baseChecked: m,
|
|
1847
|
+
baseIndeterminate: h,
|
|
1848
|
+
toggleBase: b,
|
|
1849
|
+
syncMode: S,
|
|
1850
|
+
syncModeOptions: C,
|
|
1851
|
+
syncModeTip: w,
|
|
1852
|
+
tableTypeText: T,
|
|
1853
|
+
sourceInfo: k,
|
|
1854
|
+
targets: D,
|
|
1855
|
+
canSync: A,
|
|
1856
|
+
handleCheck: (e) => {
|
|
1857
|
+
let t = Array.isArray(e) ? e : e?.checked || [];
|
|
1858
|
+
o.value = t.filter((e) => !!l.value[e]);
|
|
1859
|
+
let n = ++W, r = t.filter((e) => e.startsWith("org_") && !M.value[e.replace("org_", "")]);
|
|
1860
|
+
r.length !== 0 && Promise.all(r.map((e) => B(e))).then(() => {
|
|
1861
|
+
if (n !== W) return;
|
|
1862
|
+
let e = [];
|
|
1863
|
+
for (let n of r) {
|
|
1864
|
+
if (!t.includes(n)) continue;
|
|
1865
|
+
let r = R(a.value, n) || [];
|
|
1866
|
+
e.push(...r);
|
|
1867
|
+
}
|
|
1868
|
+
e.length > 0 && (o.value = [...new Set([...o.value, ...e])]);
|
|
1869
|
+
});
|
|
1870
|
+
},
|
|
1871
|
+
handleExpand: (e) => {
|
|
1872
|
+
let t = Array.isArray(e) ? e : [];
|
|
1873
|
+
c.value = t;
|
|
1874
|
+
for (let e of t) e.startsWith("org_") && B(e);
|
|
1875
|
+
},
|
|
1876
|
+
removeTarget: (e) => {
|
|
1877
|
+
o.value = o.value.filter((t) => t !== e);
|
|
1878
|
+
},
|
|
1879
|
+
handleSync: async () => {
|
|
1880
|
+
if (!e.dataSource?.id) {
|
|
1881
|
+
Q.warning("当前表格没有「表格标识」,请先在「基础属性」里设置后再同步");
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
let t = O();
|
|
1885
|
+
if (!t) {
|
|
1886
|
+
Q.warning("未识别当前流程节点,请先在左侧重新选择流程节点");
|
|
1887
|
+
return;
|
|
1888
|
+
}
|
|
1889
|
+
if (D.value.length === 0) {
|
|
1890
|
+
Q.warning("请选择目标流程节点");
|
|
1891
|
+
return;
|
|
1892
|
+
}
|
|
1893
|
+
let n = D.value.filter((e) => !e.page_setting_saved).map((e) => e.name);
|
|
1894
|
+
if (n.length > 0) {
|
|
1895
|
+
Q.warning(`${n.join("、")} 未保存页面配置,需保存后才能同步`);
|
|
1896
|
+
return;
|
|
1897
|
+
}
|
|
1898
|
+
if (f.value.length === 0) {
|
|
1899
|
+
Q.warning("请选择要同步的配置项");
|
|
1900
|
+
return;
|
|
1901
|
+
}
|
|
1902
|
+
let { data: a, fields: o, skipped: s } = v(e.dataSource, f.value, S.value);
|
|
1903
|
+
if (s.length > 0 && Q.warning(`当前表格没有配置:${s.map((e) => d[e] || g[e] || e).join("、")},已跳过`), o.length === 0) {
|
|
1904
|
+
Q.warning("所选配置项在当前表格中都不存在,没有可同步的内容");
|
|
1905
|
+
return;
|
|
1906
|
+
}
|
|
1907
|
+
r.value = !0;
|
|
1908
|
+
try {
|
|
1909
|
+
let n = (await i({
|
|
1910
|
+
sync_mode: S.value,
|
|
1911
|
+
source: t,
|
|
1912
|
+
targets: D.value.map((e) => ({
|
|
1913
|
+
org_id: e.org_id,
|
|
1914
|
+
node_id: e.node_id,
|
|
1915
|
+
menu_flag: e.menu_flag,
|
|
1916
|
+
name: e.name
|
|
1917
|
+
})),
|
|
1918
|
+
items: [{
|
|
1919
|
+
type: e.tableType,
|
|
1920
|
+
table_id: e.dataSource.id,
|
|
1921
|
+
fields: o,
|
|
1922
|
+
data: a
|
|
1923
|
+
}]
|
|
1924
|
+
}, "/approve/sync_page_setting"))?.targets || [], r = n.filter((e) => (e.detail || []).some((e) => e.skipped)).map((e) => e.name);
|
|
1925
|
+
r.length > 0 && Q.warning(`${r.join("、")} 没有该表格,已忽略`);
|
|
1926
|
+
let s = n.length - r.length;
|
|
1927
|
+
s > 0 && Q.success(`已同步到 ${s} 个流程节点`);
|
|
1928
|
+
} catch (e) {
|
|
1929
|
+
(!e || e.success !== !1) && Q.error(e?.message || "同步失败");
|
|
1930
|
+
} finally {
|
|
1931
|
+
r.value = !1;
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
UNSAVED_HINT: tt
|
|
1935
|
+
};
|
|
1936
|
+
}
|
|
1937
|
+
}), rt = { class: "config-sync" }, it = { class: "sync-body" }, at = { class: "sync-panel sync-panel-tree" }, ot = { class: "sync-tree-wrap" }, st = { class: "sync-panel sync-panel-field" }, ct = { class: "sync-source" }, lt = { class: "sync-section" }, ut = { class: "sync-mode-tip" }, dt = { class: "sync-section" }, ft = { class: "sync-section" }, pt = { class: "sync-targets" }, mt = { class: "sync-targets-title" }, ht = {
|
|
1938
|
+
key: 0,
|
|
1939
|
+
class: "sync-targets-list"
|
|
1940
|
+
}, gt = { class: "sync-actions" };
|
|
1941
|
+
function _t(e, t, n, r, i, a) {
|
|
1942
|
+
let o = U("exclamation-circle-outlined"), s = U("a-tooltip"), c = U("a-tree"), l = U("a-empty"), u = U("a-spin"), d = U("a-radio"), f = U("a-radio-group"), p = U("a-checkbox"), m = U("a-checkbox-group"), h = U("a-tag"), g = U("a-button");
|
|
1943
|
+
return z(), k("div", rt, [A("div", it, [A("div", at, [t[3] ||= A("div", { class: "sync-panel-header" }, [A("span", { class: "sync-panel-title" }, "目标流程节点"), A("span", { class: "sync-panel-tip" }, " 勾选组织/流程组织即选中其下全部流程节点;未保存页面配置的节点置灰不可选 ")], -1), M(u, { spinning: e.treeLoading }, {
|
|
1944
|
+
default: K(() => [A("div", ot, [e.treeData.length > 0 ? (z(), D(c, {
|
|
1945
|
+
key: 0,
|
|
1946
|
+
checkable: "",
|
|
1947
|
+
selectable: !1,
|
|
1948
|
+
"show-line": { showLeafIcon: !1 },
|
|
1949
|
+
"checked-keys": e.checkedKeys,
|
|
1950
|
+
"expanded-keys": e.expandedKeys,
|
|
1951
|
+
"tree-data": e.treeData,
|
|
1952
|
+
onCheck: e.handleCheck,
|
|
1953
|
+
onExpand: e.handleExpand
|
|
1954
|
+
}, {
|
|
1955
|
+
title: K(({ title: n, dataRef: r }) => [A("span", null, W(n), 1), r.unsaved ? (z(), D(s, {
|
|
1956
|
+
key: 0,
|
|
1957
|
+
title: e.UNSAVED_HINT
|
|
1958
|
+
}, {
|
|
1959
|
+
default: K(() => [M(o, {
|
|
1960
|
+
class: "sync-unsaved-icon",
|
|
1961
|
+
onClick: t[0] ||= J(() => {}, ["stop"])
|
|
1962
|
+
})]),
|
|
1963
|
+
_: 1
|
|
1964
|
+
}, 8, ["title"])) : O("", !0)]),
|
|
1965
|
+
_: 1
|
|
1966
|
+
}, 8, [
|
|
1967
|
+
"checked-keys",
|
|
1968
|
+
"expanded-keys",
|
|
1969
|
+
"tree-data",
|
|
1970
|
+
"onCheck",
|
|
1971
|
+
"onExpand"
|
|
1972
|
+
])) : e.treeLoading ? O("", !0) : (z(), D(l, {
|
|
1973
|
+
key: 1,
|
|
1974
|
+
description: "没有可同步的流程节点"
|
|
1975
|
+
}))])]),
|
|
1976
|
+
_: 1
|
|
1977
|
+
}, 8, ["spinning"])]), A("div", st, [
|
|
1978
|
+
t[14] ||= A("div", { class: "sync-panel-header" }, [A("span", { class: "sync-panel-title" }, "同步项"), A("span", { class: "sync-panel-tip" }, "勾选需要同步过去的配置块")], -1),
|
|
1979
|
+
A("div", ct, [
|
|
1980
|
+
A("div", null, "来源:" + W(e.tableTypeText) + "「" + W(e.dataSource?.title || "-") + "」", 1),
|
|
1981
|
+
A("div", null, [j(" 类型:" + W(e.tableType) + " 表格标识: ", 1), A("span", { class: F({ "sync-error-text": !e.dataSource?.id }) }, W(e.dataSource?.id || "未设置"), 3)]),
|
|
1982
|
+
A("div", null, [t[4] ||= j(" 来源节点: ", -1), A("span", { class: F({ "sync-error-text": !e.sourceInfo }) }, W(e.sourceInfo ? `${e.sourceInfo.name}(组织 ${e.sourceInfo.org_id} / 节点 ${e.sourceInfo.node_id})` : "未识别,请先在左侧重新选择流程节点"), 3)])
|
|
1983
|
+
]),
|
|
1984
|
+
A("div", lt, [
|
|
1985
|
+
t[7] ||= A("div", { class: "sync-section-title" }, "同步类型", -1),
|
|
1986
|
+
M(f, {
|
|
1987
|
+
value: e.syncMode,
|
|
1988
|
+
"onUpdate:value": t[1] ||= (t) => e.syncMode = t
|
|
1989
|
+
}, {
|
|
1990
|
+
default: K(() => [M(d, { value: "standard" }, {
|
|
1991
|
+
default: K(() => [...t[5] ||= [j("标准同步", -1)]]),
|
|
1992
|
+
_: 1
|
|
1993
|
+
}), M(d, { value: "append" }, {
|
|
1994
|
+
default: K(() => [...t[6] ||= [j("自动追加配置", -1)]]),
|
|
1995
|
+
_: 1
|
|
1996
|
+
})]),
|
|
1997
|
+
_: 1
|
|
1998
|
+
}, 8, ["value"]),
|
|
1999
|
+
A("div", ut, W(e.syncModeTip), 1)
|
|
2000
|
+
]),
|
|
2001
|
+
A("div", dt, [
|
|
2002
|
+
t[9] ||= A("div", { class: "sync-section-title" }, "基础配置", -1),
|
|
2003
|
+
M(p, {
|
|
2004
|
+
checked: e.baseChecked,
|
|
2005
|
+
indeterminate: e.baseIndeterminate,
|
|
2006
|
+
"onUpdate:checked": e.toggleBase
|
|
2007
|
+
}, {
|
|
2008
|
+
default: K(() => [...t[8] ||= [j(" 随同步写入基础配置 ", -1)]]),
|
|
2009
|
+
_: 1
|
|
2010
|
+
}, 8, [
|
|
2011
|
+
"checked",
|
|
2012
|
+
"indeterminate",
|
|
2013
|
+
"onUpdate:checked"
|
|
2014
|
+
]),
|
|
2015
|
+
t[10] ||= A("div", { class: "sync-mode-tip" }, "含:名称、是否为标准模型查询、列表URL、模型、查询参数", -1)
|
|
2016
|
+
]),
|
|
2017
|
+
A("div", ft, [t[11] ||= A("div", { class: "sync-section-title" }, "表格配置块", -1), M(m, {
|
|
2018
|
+
value: e.fields,
|
|
2019
|
+
"onUpdate:value": t[2] ||= (t) => e.fields = t,
|
|
2020
|
+
options: e.tableFieldOptions,
|
|
2021
|
+
class: "sync-options"
|
|
2022
|
+
}, null, 8, ["value", "options"])]),
|
|
2023
|
+
A("div", pt, [A("div", mt, "已选目标:" + W(e.targets.length) + " 个节点", 1), e.targets.length > 0 ? (z(), k("div", ht, [(z(!0), k(T, null, H(e.targets, (t) => (z(), D(h, {
|
|
2024
|
+
key: t.key,
|
|
2025
|
+
closable: "",
|
|
2026
|
+
onClose: (n) => e.removeTarget(t.key)
|
|
2027
|
+
}, {
|
|
2028
|
+
default: K(() => [j(W(t.org_name) + " / " + W(t.name), 1)]),
|
|
2029
|
+
_: 2
|
|
2030
|
+
}, 1032, ["onClose"]))), 128))])) : O("", !0)]),
|
|
2031
|
+
A("div", gt, [M(g, {
|
|
2032
|
+
type: "primary",
|
|
2033
|
+
loading: e.syncing,
|
|
2034
|
+
disabled: !e.canSync,
|
|
2035
|
+
onClick: e.handleSync
|
|
2036
|
+
}, {
|
|
2037
|
+
default: K(() => [...t[12] ||= [j(" 同步 ", -1)]]),
|
|
2038
|
+
_: 1
|
|
2039
|
+
}, 8, [
|
|
2040
|
+
"loading",
|
|
2041
|
+
"disabled",
|
|
2042
|
+
"onClick"
|
|
2043
|
+
]), t[13] ||= A("span", { class: "sync-actions-tip" }, " 同步只写入目标节点,当前节点不会被修改,同步后需在目标节点重新进入页面查看 ", -1)])
|
|
2044
|
+
])])]);
|
|
2045
|
+
}
|
|
2046
|
+
var vt = /* @__PURE__ */ c(nt, [["render", _t], ["__scopeId", "data-v-79b74022"]]), yt = N({
|
|
2047
|
+
name: "ConfirmInput",
|
|
2048
|
+
components: {
|
|
2049
|
+
EditOutlined: Z,
|
|
2050
|
+
CheckOutlined: Y,
|
|
2051
|
+
CloseOutlined: ee
|
|
2052
|
+
},
|
|
2053
|
+
props: { value: {
|
|
2054
|
+
type: String,
|
|
2055
|
+
required: !0
|
|
2056
|
+
} },
|
|
2057
|
+
emits: ["update:value", "change"],
|
|
2058
|
+
setup(e, { emit: t }) {
|
|
2059
|
+
let n = V(!1), r = V(""), i = V(null);
|
|
2060
|
+
return G(() => e.value, () => {
|
|
2061
|
+
n.value = !1;
|
|
2062
|
+
}), {
|
|
2063
|
+
isEditing: n,
|
|
2064
|
+
editedValue: r,
|
|
2065
|
+
inputRef: i,
|
|
2066
|
+
handleEdit: async () => {
|
|
2067
|
+
n.value = !0, r.value = e.value, await P(), i.value?.focus();
|
|
2068
|
+
},
|
|
2069
|
+
handleConfirm: () => {
|
|
2070
|
+
r.value !== e.value && t("update:value", r.value), n.value = !1, P(() => {
|
|
2071
|
+
t("change", r.value);
|
|
2072
|
+
});
|
|
2073
|
+
},
|
|
2074
|
+
handleCancel: () => {
|
|
2075
|
+
n.value = !1;
|
|
2076
|
+
}
|
|
2077
|
+
};
|
|
2078
|
+
}
|
|
2079
|
+
}), bt = { class: "confirm-input-wrapper" }, xt = { class: "display-span" };
|
|
2080
|
+
function St(e, t, n, r, i, a) {
|
|
2081
|
+
let o = U("edit-outlined"), s = U("a-input"), c = U("check-outlined"), l = U("close-outlined");
|
|
2082
|
+
return z(), k("div", bt, [e.isEditing ? (z(), k(T, { key: 1 }, [
|
|
2083
|
+
M(s, {
|
|
2084
|
+
ref: "inputRef",
|
|
2085
|
+
value: e.editedValue,
|
|
2086
|
+
"onUpdate:value": t[0] ||= (t) => e.editedValue = t,
|
|
2087
|
+
size: "small",
|
|
2088
|
+
style: { "flex-grow": "1" },
|
|
2089
|
+
onPressEnter: e.handleConfirm
|
|
2090
|
+
}, null, 8, ["value", "onPressEnter"]),
|
|
2091
|
+
M(c, {
|
|
2092
|
+
class: "action-icon",
|
|
2093
|
+
onClick: e.handleConfirm
|
|
2094
|
+
}, null, 8, ["onClick"]),
|
|
2095
|
+
M(l, {
|
|
2096
|
+
class: "action-icon",
|
|
2097
|
+
onClick: e.handleCancel
|
|
2098
|
+
}, null, 8, ["onClick"])
|
|
2099
|
+
], 64)) : (z(), k(T, { key: 0 }, [A("span", xt, W(e.value || "\xA0"), 1), M(o, {
|
|
2100
|
+
class: "edit-icon",
|
|
2101
|
+
onClick: e.handleEdit
|
|
2102
|
+
}, null, 8, ["onClick"])], 64))]);
|
|
2103
|
+
}
|
|
2104
|
+
//#endregion
|
|
2105
|
+
//#region src/components/approval/components/approvalPageConfig/tableConfig.vue?vue&type=script&lang.ts
|
|
2106
|
+
var Ct = N({
|
|
2107
|
+
name: "tableConfig",
|
|
2108
|
+
components: {
|
|
2109
|
+
BaseConditions: Te,
|
|
2110
|
+
ButtonConfig: w,
|
|
2111
|
+
ColumnConfig: Ve,
|
|
2112
|
+
searchConfig: $e,
|
|
2113
|
+
configSync: vt,
|
|
2114
|
+
confirmInput: /* @__PURE__ */ c(yt, [["render", St], ["__scopeId", "data-v-aa92417a"]]),
|
|
2115
|
+
JsonText: C
|
|
2116
|
+
},
|
|
2117
|
+
props: {
|
|
2118
|
+
dataSource: {
|
|
2119
|
+
type: Object,
|
|
2120
|
+
required: !0
|
|
2121
|
+
},
|
|
2122
|
+
hasId: {
|
|
2123
|
+
type: Boolean,
|
|
2124
|
+
default: !1
|
|
2125
|
+
},
|
|
2126
|
+
tableType: {
|
|
2127
|
+
type: String,
|
|
2128
|
+
default: "tables"
|
|
2129
|
+
},
|
|
2130
|
+
formData: {
|
|
2131
|
+
type: Object,
|
|
2132
|
+
default: () => ({})
|
|
2133
|
+
},
|
|
2134
|
+
eventBus: { type: Object }
|
|
2135
|
+
},
|
|
2136
|
+
emits: ["update:dataSource", "change_id"],
|
|
2137
|
+
setup(e, { emit: t }) {
|
|
2138
|
+
let n = V("1"), r = V(!1), a = V(null), o = V(!1), s = V(null), c = (t) => {
|
|
2139
|
+
e.dataSource.is_normal_model = t;
|
|
2140
|
+
}, l = V([]), u = async () => {
|
|
2141
|
+
let e = (await i({}, "sys/base_model_list", !1, { skip_error: !0 }))?.data;
|
|
2142
|
+
e && e.length > 0 && (l.value = e.map((e) => ({
|
|
2143
|
+
label: `${e.name}(${e.value})`,
|
|
2144
|
+
value: e.value
|
|
2145
|
+
})));
|
|
2146
|
+
};
|
|
2147
|
+
return L(() => {
|
|
2148
|
+
u();
|
|
2149
|
+
}), {
|
|
2150
|
+
activeKey: n,
|
|
2151
|
+
showColumnConfig: r,
|
|
2152
|
+
handleIsNormalModelChange: c,
|
|
2153
|
+
handleModelTypeChange: (n) => {
|
|
2154
|
+
e.dataSource.modelType = n;
|
|
2155
|
+
let r = n.split("-"), i = r[0], a = r[1];
|
|
2156
|
+
e.dataSource.list_url = `/${i}/query_${a}_list`, e.dataSource.id = n, t("change_id", e.dataSource);
|
|
2157
|
+
},
|
|
2158
|
+
handleListUrlChange: (t) => {
|
|
2159
|
+
e.dataSource.modelType = null;
|
|
2160
|
+
},
|
|
2161
|
+
modelTypeOptions: l,
|
|
2162
|
+
ColumnConfigDataSource: a,
|
|
2163
|
+
openColumnConfig: () => {
|
|
2164
|
+
a.value = $(e.dataSource.columns || []), r.value = !0;
|
|
2165
|
+
},
|
|
2166
|
+
confirmColumnConfig: () => {
|
|
2167
|
+
t("update:dataSource", {
|
|
2168
|
+
...e.dataSource,
|
|
2169
|
+
columns: a.value
|
|
2170
|
+
}), r.value = !1, e.eventBus && e.eventBus.emit("saveConfig");
|
|
2171
|
+
},
|
|
2172
|
+
showSearchConfig: o,
|
|
2173
|
+
SearchConfigDataSource: s,
|
|
2174
|
+
openSearchConfig: () => {
|
|
2175
|
+
s.value = $(e.dataSource.search_config || []), o.value = !0;
|
|
2176
|
+
},
|
|
2177
|
+
confirmSearchConfig: () => {
|
|
2178
|
+
t("update:dataSource", {
|
|
2179
|
+
...e.dataSource,
|
|
2180
|
+
search_config: s.value
|
|
2181
|
+
}), o.value = !1, e.eventBus && e.eventBus.emit("saveConfig");
|
|
2182
|
+
},
|
|
2183
|
+
filterOption: (e, t) => {
|
|
2184
|
+
let n = e.toLowerCase(), r = t.label?.toLowerCase() || "", i = t.value?.toLowerCase() || "";
|
|
2185
|
+
return r.includes(n) || i.includes(n);
|
|
2186
|
+
},
|
|
2187
|
+
isMySendChange: (t) => {
|
|
2188
|
+
typeof e.dataSource.query_params != "object" && (e.dataSource.query_params = {}), t ? e.dataSource.query_params.is_my_send = !0 : delete e.dataSource.query_params.is_my_send;
|
|
2189
|
+
},
|
|
2190
|
+
handleChangeId: (n) => {
|
|
2191
|
+
e.dataSource.id = n, t("change_id", e.dataSource);
|
|
2192
|
+
}
|
|
2193
|
+
};
|
|
2194
|
+
}
|
|
2195
|
+
}), wt = /* @__PURE__ */ e({ default: () => Dt }), Tt = { key: 1 };
|
|
2196
|
+
function Et(e, t, n, r, i, a) {
|
|
2197
|
+
let o = U("a-button"), s = U("a-space"), c = U("confirm-input"), l = U("a-form-item"), u = U("a-input"), d = U("a-switch"), f = U("a-select"), p = U("json-text"), m = U("a-form"), h = U("a-tab-pane"), g = U("BaseConditions"), _ = U("ButtonConfig"), v = U("config-sync"), y = U("a-tabs"), b = U("ColumnConfig"), x = U("a-modal"), S = U("search-config");
|
|
2198
|
+
return z(), k(T, null, [
|
|
2199
|
+
M(y, {
|
|
2200
|
+
activeKey: e.activeKey,
|
|
2201
|
+
"onUpdate:activeKey": t[10] ||= (t) => e.activeKey = t
|
|
2202
|
+
}, {
|
|
2203
|
+
rightExtra: K(() => [M(s, { size: 20 }, {
|
|
2204
|
+
default: K(() => [M(o, {
|
|
2205
|
+
type: "primary",
|
|
2206
|
+
onClick: e.openColumnConfig
|
|
2207
|
+
}, {
|
|
2208
|
+
default: K(() => [...t[15] ||= [j(" 列配置 ", -1)]]),
|
|
2209
|
+
_: 1
|
|
2210
|
+
}, 8, ["onClick"]), M(o, {
|
|
2211
|
+
type: "primary",
|
|
2212
|
+
onClick: e.openSearchConfig
|
|
2213
|
+
}, {
|
|
2214
|
+
default: K(() => [...t[16] ||= [j(" 查询配置 ", -1)]]),
|
|
2215
|
+
_: 1
|
|
2216
|
+
}, 8, ["onClick"])]),
|
|
2217
|
+
_: 1
|
|
2218
|
+
})]),
|
|
2219
|
+
default: K(() => [
|
|
2220
|
+
M(h, {
|
|
2221
|
+
key: "1",
|
|
2222
|
+
tab: "基础属性"
|
|
2223
|
+
}, {
|
|
2224
|
+
default: K(() => [M(m, { model: e.dataSource }, {
|
|
2225
|
+
default: K(() => [
|
|
2226
|
+
M(l, { label: "表格标识" }, {
|
|
2227
|
+
default: K(() => [M(c, {
|
|
2228
|
+
value: e.dataSource.id,
|
|
2229
|
+
"onUpdate:value": e.handleChangeId
|
|
2230
|
+
}, null, 8, ["value", "onUpdate:value"])]),
|
|
2231
|
+
_: 1
|
|
2232
|
+
}),
|
|
2233
|
+
M(l, { label: "名称" }, {
|
|
2234
|
+
default: K(() => [M(u, {
|
|
2235
|
+
value: e.dataSource.title,
|
|
2236
|
+
"onUpdate:value": t[0] ||= (t) => e.dataSource.title = t
|
|
2237
|
+
}, null, 8, ["value"])]),
|
|
2238
|
+
_: 1
|
|
2239
|
+
}),
|
|
2240
|
+
M(l, { label: "组名" }, {
|
|
2241
|
+
default: K(() => [M(u, {
|
|
2242
|
+
value: e.dataSource.group_title,
|
|
2243
|
+
"onUpdate:value": t[1] ||= (t) => e.dataSource.group_title = t
|
|
2244
|
+
}, null, 8, ["value"])]),
|
|
2245
|
+
_: 1
|
|
2246
|
+
}),
|
|
2247
|
+
M(l, { label: "是否隐藏" }, {
|
|
2248
|
+
default: K(() => [M(d, {
|
|
2249
|
+
checked: e.dataSource.is_hidden,
|
|
2250
|
+
"onUpdate:checked": t[2] ||= (t) => e.dataSource.is_hidden = t
|
|
2251
|
+
}, null, 8, ["checked"])]),
|
|
2252
|
+
_: 1
|
|
2253
|
+
}),
|
|
2254
|
+
M(l, { label: "是否为标准模型查询" }, {
|
|
2255
|
+
default: K(() => [M(d, {
|
|
2256
|
+
checked: e.dataSource.is_normal_model,
|
|
2257
|
+
"onUpdate:checked": t[3] ||= (t) => e.dataSource.is_normal_model = t
|
|
2258
|
+
}, null, 8, ["checked"])]),
|
|
2259
|
+
_: 1
|
|
2260
|
+
}),
|
|
2261
|
+
M(l, { label: "是否为多选" }, {
|
|
2262
|
+
default: K(() => [M(d, {
|
|
2263
|
+
checked: e.dataSource.rowSelectionType || "checkbox",
|
|
2264
|
+
"onUpdate:checked": t[4] ||= (t) => e.dataSource.rowSelectionType = t,
|
|
2265
|
+
checkedValue: "checkbox",
|
|
2266
|
+
"un-checked-value": "radio"
|
|
2267
|
+
}, {
|
|
2268
|
+
checkedChildren: K(() => [...t[17] ||= [j("多选", -1)]]),
|
|
2269
|
+
unCheckedChildren: K(() => [...t[18] ||= [j("单选", -1)]]),
|
|
2270
|
+
_: 1
|
|
2271
|
+
}, 8, ["checked"])]),
|
|
2272
|
+
_: 1
|
|
2273
|
+
}),
|
|
2274
|
+
e.dataSource.is_normal_model ? (z(), D(l, {
|
|
2275
|
+
key: 0,
|
|
2276
|
+
label: "模型"
|
|
2277
|
+
}, {
|
|
2278
|
+
default: K(() => [M(f, {
|
|
2279
|
+
value: e.dataSource.modelType,
|
|
2280
|
+
onChange: e.handleModelTypeChange,
|
|
2281
|
+
"show-search": "",
|
|
2282
|
+
options: e.modelTypeOptions,
|
|
2283
|
+
"filter-option": e.filterOption
|
|
2284
|
+
}, null, 8, [
|
|
2285
|
+
"value",
|
|
2286
|
+
"onChange",
|
|
2287
|
+
"options",
|
|
2288
|
+
"filter-option"
|
|
2289
|
+
])]),
|
|
2290
|
+
_: 1
|
|
2291
|
+
})) : O("", !0),
|
|
2292
|
+
M(l, { label: "列表URL" }, {
|
|
2293
|
+
default: K(() => [e.dataSource.is_normal_model ? (z(), k("span", Tt, W(e.dataSource.list_url), 1)) : (z(), D(u, {
|
|
2294
|
+
key: 0,
|
|
2295
|
+
value: e.dataSource.list_url,
|
|
2296
|
+
"onUpdate:value": t[5] ||= (t) => e.dataSource.list_url = t,
|
|
2297
|
+
onChange: e.handleListUrlChange
|
|
2298
|
+
}, null, 8, ["value", "onChange"]))]),
|
|
2299
|
+
_: 1
|
|
2300
|
+
}),
|
|
2301
|
+
M(l, { label: "查询参数" }, {
|
|
2302
|
+
default: K(() => [M(l, { label: "我发起的审批" }, {
|
|
2303
|
+
default: K(() => [M(d, {
|
|
2304
|
+
checked: e.dataSource.query_params?.is_my_send,
|
|
2305
|
+
onChange: e.isMySendChange
|
|
2306
|
+
}, null, 8, ["checked", "onChange"])]),
|
|
2307
|
+
_: 1
|
|
2308
|
+
}), M(p, {
|
|
2309
|
+
value: e.dataSource.query_params,
|
|
2310
|
+
"onUpdate:value": t[6] ||= (t) => e.dataSource.query_params = t,
|
|
2311
|
+
rows: 3
|
|
2312
|
+
}, null, 8, ["value"])]),
|
|
2313
|
+
_: 1
|
|
2314
|
+
})
|
|
2315
|
+
]),
|
|
2316
|
+
_: 1
|
|
2317
|
+
}, 8, ["model"])]),
|
|
2318
|
+
_: 1
|
|
2319
|
+
}),
|
|
2320
|
+
M(h, {
|
|
2321
|
+
key: "3",
|
|
2322
|
+
tab: "基础查询条件"
|
|
2323
|
+
}, {
|
|
2324
|
+
default: K(() => [M(g, {
|
|
2325
|
+
"model-type": e.dataSource.modelType,
|
|
2326
|
+
"data-source": e.dataSource.base_conditions,
|
|
2327
|
+
"onUpdate:dataSource": t[7] ||= (t) => e.dataSource.base_conditions = t,
|
|
2328
|
+
formData: e.formData
|
|
2329
|
+
}, null, 8, [
|
|
2330
|
+
"model-type",
|
|
2331
|
+
"data-source",
|
|
2332
|
+
"formData"
|
|
2333
|
+
])]),
|
|
2334
|
+
_: 1
|
|
2335
|
+
}),
|
|
2336
|
+
M(h, {
|
|
2337
|
+
key: "5",
|
|
2338
|
+
tab: "底部按钮配置"
|
|
2339
|
+
}, {
|
|
2340
|
+
default: K(() => [M(_, {
|
|
2341
|
+
"data-source": e.dataSource.actions,
|
|
2342
|
+
"onUpdate:dataSource": t[8] ||= (t) => e.dataSource.actions = t
|
|
2343
|
+
}, null, 8, ["data-source"])]),
|
|
2344
|
+
_: 1
|
|
2345
|
+
}),
|
|
2346
|
+
M(h, {
|
|
2347
|
+
key: "6",
|
|
2348
|
+
tab: "行按钮配置"
|
|
2349
|
+
}, {
|
|
2350
|
+
default: K(() => [M(_, {
|
|
2351
|
+
"data-source": e.dataSource.row_actions,
|
|
2352
|
+
"onUpdate:dataSource": t[9] ||= (t) => e.dataSource.row_actions = t
|
|
2353
|
+
}, null, 8, ["data-source"])]),
|
|
2354
|
+
_: 1
|
|
2355
|
+
}),
|
|
2356
|
+
M(h, {
|
|
2357
|
+
key: "7",
|
|
2358
|
+
tab: "配置同步"
|
|
2359
|
+
}, {
|
|
2360
|
+
default: K(() => [e.activeKey === "7" ? (z(), D(v, {
|
|
2361
|
+
key: 0,
|
|
2362
|
+
"data-source": e.dataSource,
|
|
2363
|
+
"table-type": e.tableType
|
|
2364
|
+
}, null, 8, ["data-source", "table-type"])) : O("", !0)]),
|
|
2365
|
+
_: 1
|
|
2366
|
+
})
|
|
2367
|
+
]),
|
|
2368
|
+
_: 1
|
|
2369
|
+
}, 8, ["activeKey"]),
|
|
2370
|
+
M(x, {
|
|
2371
|
+
visible: e.showColumnConfig,
|
|
2372
|
+
"onUpdate:visible": t[12] ||= (t) => e.showColumnConfig = t,
|
|
2373
|
+
title: "列配置",
|
|
2374
|
+
width: "100%",
|
|
2375
|
+
"wrap-class-name": "full-modal",
|
|
2376
|
+
destroyOnClose: !0,
|
|
2377
|
+
onOk: e.confirmColumnConfig
|
|
2378
|
+
}, {
|
|
2379
|
+
default: K(() => [e.showColumnConfig ? (z(), D(b, {
|
|
2380
|
+
key: 0,
|
|
2381
|
+
"data-source": e.ColumnConfigDataSource,
|
|
2382
|
+
"onUpdate:dataSource": t[11] ||= (t) => e.ColumnConfigDataSource = t,
|
|
2383
|
+
"model-type": e.dataSource.modelType
|
|
2384
|
+
}, null, 8, ["data-source", "model-type"])) : O("", !0)]),
|
|
2385
|
+
_: 1
|
|
2386
|
+
}, 8, ["visible", "onOk"]),
|
|
2387
|
+
M(x, {
|
|
2388
|
+
visible: e.showSearchConfig,
|
|
2389
|
+
"onUpdate:visible": t[14] ||= (t) => e.showSearchConfig = t,
|
|
2390
|
+
title: "查询配置",
|
|
2391
|
+
width: "100%",
|
|
2392
|
+
"wrap-class-name": "full-modal",
|
|
2393
|
+
destroyOnClose: !0,
|
|
2394
|
+
onOk: e.confirmSearchConfig
|
|
2395
|
+
}, {
|
|
2396
|
+
default: K(() => [e.showSearchConfig ? (z(), D(S, {
|
|
2397
|
+
key: 0,
|
|
2398
|
+
record: e.SearchConfigDataSource,
|
|
2399
|
+
"onUpdate:record": t[13] ||= (t) => e.SearchConfigDataSource = t,
|
|
2400
|
+
"model-type": e.dataSource.modelType
|
|
2401
|
+
}, null, 8, ["record", "model-type"])) : O("", !0)]),
|
|
2402
|
+
_: 1
|
|
2403
|
+
}, 8, ["visible", "onOk"])
|
|
2404
|
+
], 64);
|
|
2405
|
+
}
|
|
2406
|
+
var Dt = /* @__PURE__ */ c(Ct, [["render", Et], ["__scopeId", "data-v-dad950db"]]);
|
|
2407
|
+
//#endregion
|
|
2408
|
+
export { wt as n, Te as r, Dt as t };
|