@guodun/antdv 1.4.4 → 1.4.6
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/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +85 -85
- package/dist/es/components/contract-signing-location/src/template-source.mjs +63 -4
- package/dist/es/components/dept-selector/src/dept.mjs +170 -142
- package/dist/es/components/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +372 -185
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +59 -42
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +218 -85
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.mjs +97 -0
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +914 -853
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +550 -245
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +214 -139
- package/dist/es/components/pro-contract-template-designer/src/extensions/template-variable.mjs +53 -35
- package/dist/es/components/pro-contract-template-designer/src/types.mjs +15 -2
- package/dist/es/components/pro-contract-template-designer/src/utils/advanced-controls.mjs +91 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +96 -65
- package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +23 -16
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/components/pro-selector/src/components/org-tree.mjs +130 -89
- package/dist/es/components/pro-selector/src/components/user.mjs +34 -26
- package/dist/es/components/pro-selector/src/pro-user.mjs +86 -72
- package/dist/es/components/pro-selector/src/types.mjs +4 -1
- package/dist/es/components/pro-selector/src/utils/orgTree.mjs +5 -2
- package/dist/es/components/pro-selector-group/src/compoents/dept-tree.vue.mjs +92 -65
- package/dist/es/components/pro-selector-group/src/compoents/dept.vue.mjs +3 -3
- package/dist/es/components/pro-selector-group/src/compoents/role.vue.mjs +98 -73
- package/dist/es/components/pro-selector-group/src/compoents/select-box.vue.mjs +12 -9
- package/dist/es/components/pro-selector-group/src/compoents/user.vue.mjs +101 -72
- package/dist/es/components/pro-selector-group/src/hooks/useApi.mjs +39 -22
- package/dist/es/components/pro-selector-group/src/index.vue.mjs +105 -83
- package/dist/es/components/pro-selector-group/src/utils/index.mjs +36 -0
- package/dist/es/components/role-selector/src/role.mjs +134 -120
- package/dist/es/index.mjs +50 -49
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
- package/dist/lib/components/dept-selector/src/dept.cjs +1 -1
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +2 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/extensions/template-variable.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/types.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/advanced-controls.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-tool-icons.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/components/pro-selector/src/components/org-tree.cjs +1 -1
- package/dist/lib/components/pro-selector/src/components/user.cjs +1 -1
- package/dist/lib/components/pro-selector/src/pro-user.cjs +1 -1
- package/dist/lib/components/pro-selector/src/types.cjs +1 -1
- package/dist/lib/components/pro-selector/src/utils/orgTree.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/role.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/select-box.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/user.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/hooks/useApi.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/index.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/utils/index.cjs +1 -0
- package/dist/lib/components/role-selector/src/role.cjs +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/dept-selector.css +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/theme/pro-selector-group.css +1 -1
- package/dist/theme/pro-selector.css +1 -1
- package/dist/theme/role-selector.css +1 -1
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +3 -3
- package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.d.ts +7 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.d.ts +14 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +13 -1
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +11 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +4 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/template-variable.d.ts +11 -1
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +131 -2
- package/dist/types/components/pro-contract-template-designer/src/utils/advanced-controls.d.ts +15 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +10 -2
- package/dist/types/components/pro-selector/index.d.ts +9 -0
- package/dist/types/components/pro-selector/src/components/user.d.ts +9 -0
- package/dist/types/components/pro-selector/src/types.d.ts +2 -0
- package/dist/types/components/pro-selector/src/utils/orgTree.d.ts +4 -1
- package/dist/types/components/pro-selector-group/src/compoents/select-box.vue.d.ts +4 -4
- package/dist/types/components/pro-selector-group/src/hooks/useApi.d.ts +6 -1
- package/dist/types/components/pro-selector-group/src/utils/index.d.ts +8 -0
- package/package.json +5 -3
|
@@ -3,61 +3,71 @@ import t from "../../pro-modal/index.mjs";
|
|
|
3
3
|
import n from "../../icon/index.mjs";
|
|
4
4
|
import { GET_DEPT_TREE_URL as r, deptSelectorEmits as i, deptSelectorProps as a } from "./types.mjs";
|
|
5
5
|
import o from "../../pro-dynamic-tags/index.mjs";
|
|
6
|
-
import { Fragment as s, computed as c,
|
|
7
|
-
import { Empty as
|
|
6
|
+
import { Fragment as s, computed as c, createTextVNode as l, createVNode as u, defineComponent as d, ref as f, watch as p } from "vue";
|
|
7
|
+
import { Alert as m, Button as h, Empty as g, FormItemRest as _, InputSearch as v, Spin as y, Tree as b, message as ee } from "ant-design-vue";
|
|
8
8
|
//#region src/components/dept-selector/src/dept.tsx
|
|
9
|
-
var
|
|
9
|
+
var x = e("dept-selector"), S = /* @__PURE__ */ d({
|
|
10
10
|
name: "KDeptSelector",
|
|
11
11
|
props: a,
|
|
12
12
|
emits: i,
|
|
13
|
-
setup(e, { emit: i, attrs: a, slots:
|
|
14
|
-
let
|
|
13
|
+
setup(e, { emit: i, attrs: a, slots: d }) {
|
|
14
|
+
let S = f(!0), C = f(!0), w = f([]), T = f([]), E = f([]), D = f(!1), O = f(e.isBuiltInRequest ? {
|
|
15
15
|
children: "children",
|
|
16
16
|
title: "deptName",
|
|
17
17
|
key: "id"
|
|
18
|
-
} : e.fieldNames),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
} : e.fieldNames), k = f([]), A = f([]), j = f(e.treeData), M = f(""), N = f(!1), P = f(""), F = async () => {
|
|
19
|
+
if (e.isBuiltInRequest) {
|
|
20
|
+
if (!e.http) {
|
|
21
|
+
P.value = "缺少部门数据请求实例";
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
N.value = !0, P.value = "";
|
|
25
|
+
try {
|
|
26
|
+
let t = await e.http.get(`${e.prefix}${r}`);
|
|
27
|
+
if (t?.status !== 0 || !Array.isArray(t.data)) {
|
|
28
|
+
P.value = "部门数据加载失败,请重试";
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
j.value = t.data, t.data[0] && (w.value = [t.data[0][O.value.key]]);
|
|
32
|
+
} catch {
|
|
33
|
+
P.value = "部门数据加载失败,请重试";
|
|
34
|
+
} finally {
|
|
35
|
+
N.value = !1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}, I = (e) => typeof e == "object" && !!e && O.value.key in e && e[O.value.key] !== void 0 && e[O.value.key] !== null, L = () => {
|
|
26
39
|
if (e.type === "checkbox") {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
y.value ? C.value = {
|
|
40
|
+
let t = Array.isArray(e.modelValue) ? e.modelValue.map((e) => e[O.value.key]) : [];
|
|
41
|
+
S.value ? E.value = {
|
|
30
42
|
checked: t,
|
|
31
43
|
halfChecked: []
|
|
32
|
-
} :
|
|
33
|
-
} else {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (A.value) return A.value = !1;
|
|
42
|
-
e.type === "radio" ? D.value.length > 0 && (E.value = D.value[0][T.value.title] || "") : E.value = D.value.map((e) => e[T.value.title]).join(",");
|
|
44
|
+
} : E.value = t, w.value = t;
|
|
45
|
+
} else if (!Array.isArray(e.modelValue) && I(e.modelValue)) {
|
|
46
|
+
let t = e.modelValue[O.value.key];
|
|
47
|
+
T.value = [t], w.value = [t];
|
|
48
|
+
} else T.value = [], w.value = [];
|
|
49
|
+
}, R = (t = e.modelValue) => {
|
|
50
|
+
Array.isArray(t) ? A.value = t.filter(I).map((e) => ({ ...e })) : I(t) ? A.value = [{ ...t }] : A.value = [];
|
|
51
|
+
}, z = () => {
|
|
52
|
+
L(), k.value = A.value.map((e) => ({ ...e }));
|
|
43
53
|
};
|
|
44
|
-
|
|
45
|
-
e
|
|
46
|
-
}, { immediate: !0 }),
|
|
47
|
-
|
|
54
|
+
p(() => e.visible, (e) => {
|
|
55
|
+
R(), e && z();
|
|
56
|
+
}, { immediate: !0 }), p(() => e.modelValue, (t) => {
|
|
57
|
+
R(t), e.visible && z();
|
|
48
58
|
}, {
|
|
49
59
|
immediate: !0,
|
|
50
60
|
deep: !0
|
|
51
|
-
}),
|
|
52
|
-
|
|
61
|
+
}), p(j, () => {
|
|
62
|
+
e.visible && z();
|
|
53
63
|
}, {
|
|
54
64
|
immediate: !0,
|
|
55
65
|
deep: !0
|
|
56
66
|
});
|
|
57
|
-
function
|
|
67
|
+
function B(e) {
|
|
58
68
|
let t = (e, n) => {
|
|
59
69
|
for (let r of e) {
|
|
60
|
-
if (r[
|
|
70
|
+
if (r[O.value.key] === n) return r;
|
|
61
71
|
if (r.children && r.children.length) {
|
|
62
72
|
let e = t(r.children, n);
|
|
63
73
|
if (e) return e;
|
|
@@ -65,70 +75,77 @@ var v = e("dept-selector"), y = /* @__PURE__ */ u({
|
|
|
65
75
|
}
|
|
66
76
|
return null;
|
|
67
77
|
};
|
|
68
|
-
return t(
|
|
78
|
+
return t(j.value, e);
|
|
69
79
|
}
|
|
70
|
-
function
|
|
71
|
-
return e ? e.map((e) =>
|
|
80
|
+
function V(e) {
|
|
81
|
+
return e ? e.map((e) => B(e)).filter(Boolean) : [];
|
|
72
82
|
}
|
|
73
|
-
|
|
74
|
-
e.type === "checkbox" && (
|
|
83
|
+
p(E, () => {
|
|
84
|
+
e.type === "checkbox" && (S.value ? k.value = V(E.value?.checked || []) : k.value = V(E.value));
|
|
75
85
|
}, {
|
|
76
86
|
immediate: !0,
|
|
77
87
|
deep: !0
|
|
78
|
-
}),
|
|
79
|
-
e.type === "radio" && (
|
|
88
|
+
}), p(T, () => {
|
|
89
|
+
e.type === "radio" && (k.value = V(T.value));
|
|
80
90
|
}, {
|
|
81
91
|
immediate: !0,
|
|
82
92
|
deep: !0
|
|
83
|
-
}),
|
|
84
|
-
e.isBuiltInRequest || (
|
|
85
|
-
});
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
}), p(() => e.treeData, (t) => {
|
|
94
|
+
e.isBuiltInRequest || (j.value = t || []);
|
|
95
|
+
}, { deep: !0 }), e.isBuiltInRequest && F();
|
|
96
|
+
let H = () => {
|
|
97
|
+
z(), i("update:visible", !1), i("cancel");
|
|
98
|
+
}, U = () => {
|
|
99
|
+
if (!k.value.length) {
|
|
100
|
+
ee.warn("请选择部门");
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
A.value = [...k.value], e.type === "radio" ? k.value.length > 0 && T.value.length > 0 ? i("update:modelValue", {
|
|
104
|
+
[O.value.key]: T.value[0],
|
|
105
|
+
[O.value.title]: k.value[0][O.value.title]
|
|
106
|
+
}) : i("update:modelValue", null) : i("update:modelValue", k.value.map((e) => ({
|
|
107
|
+
[O.value.key]: e[O.value.key],
|
|
108
|
+
[O.value.title]: e[O.value.title]
|
|
109
|
+
}))), i("update:visible", !1), i("confirm", k.value);
|
|
110
|
+
}, W = (t) => {
|
|
111
|
+
if (e.type === "radio") {
|
|
112
|
+
k.value = [], T.value = [];
|
|
95
113
|
return;
|
|
96
114
|
}
|
|
97
|
-
|
|
98
|
-
[T.value.key]: S.value[0],
|
|
99
|
-
[T.value.title]: D.value[0][T.value.title]
|
|
100
|
-
}) : i("update:modelValue", null) : i("update:modelValue", D.value.map((e) => ({
|
|
101
|
-
[T.value.key]: e[T.value.key],
|
|
102
|
-
[T.value.title]: e[T.value.title]
|
|
103
|
-
}))), i("update:visible", !1), i("confirm", D.value), P("handleConfirm ...");
|
|
104
|
-
}, V = (t) => {
|
|
105
|
-
if (A.value = !0, e.type === "radio") return D.value = [], S.value = [], !1;
|
|
106
|
-
if (y.value) C.value.checked = C.value.checked.filter((e) => e !== t[T.value.key]);
|
|
115
|
+
if (S.value) E.value.checked = E.value.checked.filter((e) => e !== t[O.value.key]);
|
|
107
116
|
else {
|
|
108
|
-
let e = t.parentId, n =
|
|
109
|
-
n !== -1 &&
|
|
110
|
-
let t =
|
|
111
|
-
t !== -1 &&
|
|
117
|
+
let e = t.parentId, n = E.value.indexOf(e);
|
|
118
|
+
n !== -1 && E.value.splice(n, 1), E.value = E.value.filter((e) => e !== t[O.value.key]), G(t.children).forEach((e) => {
|
|
119
|
+
let t = E.value.indexOf(e);
|
|
120
|
+
t !== -1 && E.value.splice(t, 1);
|
|
112
121
|
});
|
|
113
122
|
}
|
|
114
|
-
},
|
|
123
|
+
}, G = (e = []) => {
|
|
115
124
|
let t = [], n = (e) => {
|
|
116
|
-
for (let r of e) t.push(r[
|
|
125
|
+
for (let r of e) t.push(r[O.value.key]), r.children && r.children.length && n(r.children);
|
|
117
126
|
};
|
|
118
127
|
return n(e), t;
|
|
119
|
-
},
|
|
120
|
-
label: e[
|
|
121
|
-
value: e[
|
|
128
|
+
}, K = c(() => A.value.map((e) => ({
|
|
129
|
+
label: e[O.value.title],
|
|
130
|
+
value: e[O.value.key],
|
|
122
131
|
closable: !0
|
|
123
|
-
}))),
|
|
124
|
-
let r =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
}))), q = (t, n) => {
|
|
133
|
+
let r = A.value.filter((e, t) => t !== n);
|
|
134
|
+
if (A.value = r, k.value = r.map((e) => ({ ...e })), e.type === "radio") i("update:modelValue", null), T.value = [];
|
|
135
|
+
else {
|
|
136
|
+
i("update:modelValue", r.map((e) => ({
|
|
137
|
+
[O.value.key]: e[O.value.key],
|
|
138
|
+
[O.value.title]: e[O.value.title]
|
|
139
|
+
})));
|
|
140
|
+
let e = r.map((e) => e[O.value.key]);
|
|
141
|
+
E.value = S.value ? {
|
|
142
|
+
checked: e,
|
|
143
|
+
halfChecked: []
|
|
144
|
+
} : e;
|
|
145
|
+
}
|
|
146
|
+
}, J = () => {
|
|
130
147
|
i("update:visible", !0);
|
|
131
|
-
},
|
|
148
|
+
}, Y = () => u(s, null, [u(t, {
|
|
132
149
|
modelValue: e.visible,
|
|
133
150
|
modalProps: {
|
|
134
151
|
cancelText: "取消",
|
|
@@ -137,77 +154,87 @@ var v = e("dept-selector"), y = /* @__PURE__ */ u({
|
|
|
137
154
|
...a
|
|
138
155
|
},
|
|
139
156
|
title: "选择部门",
|
|
140
|
-
onOnCancel:
|
|
141
|
-
onOnConfirm:
|
|
142
|
-
|
|
157
|
+
onOnCancel: H,
|
|
158
|
+
onOnConfirm: U,
|
|
159
|
+
"onUpdate:modelValue": (e) => {
|
|
160
|
+
e || z(), i("update:visible", e);
|
|
161
|
+
}
|
|
162
|
+
}, { default: () => [u("div", { class: x.e("modal-content") }, [te(), ne()], 2)] }, 8, [
|
|
143
163
|
"modelValue",
|
|
144
164
|
"modalProps",
|
|
145
165
|
"onOnCancel",
|
|
146
|
-
"onOnConfirm"
|
|
147
|
-
|
|
166
|
+
"onOnConfirm",
|
|
167
|
+
"onUpdate:modelValue"
|
|
168
|
+
])]), X = (e, t) => {
|
|
148
169
|
let n;
|
|
149
170
|
for (let r = 0; r < t.length; r++) {
|
|
150
171
|
let i = t[r];
|
|
151
|
-
if (i.children) if (i.children.some((t) => t[
|
|
152
|
-
n = i[
|
|
172
|
+
if (i.children) if (i.children.some((t) => t[O.value.key] === e)) {
|
|
173
|
+
n = i[O.value.key];
|
|
153
174
|
break;
|
|
154
|
-
} else
|
|
175
|
+
} else X(e, i.children) && (n = X(e, i.children));
|
|
155
176
|
}
|
|
156
177
|
return n;
|
|
157
|
-
},
|
|
178
|
+
}, Z = (e) => {
|
|
158
179
|
if (!e.trim()) {
|
|
159
|
-
|
|
180
|
+
w.value = [], M.value = "", C.value = !0;
|
|
160
181
|
return;
|
|
161
182
|
}
|
|
162
183
|
let t = /* @__PURE__ */ new Set(), n = (e, r) => {
|
|
163
184
|
e.forEach((e) => {
|
|
164
|
-
if (e[
|
|
165
|
-
let n =
|
|
166
|
-
for (; n;) t.add(n), n =
|
|
167
|
-
t.add(e[
|
|
185
|
+
if (e[O.value.title]?.includes(r)) {
|
|
186
|
+
let n = X(e[O.value.key], j.value);
|
|
187
|
+
for (; n;) t.add(n), n = X(n, j.value);
|
|
188
|
+
t.add(e[O.value.key]);
|
|
168
189
|
}
|
|
169
190
|
e.children && e.children.length > 0 && n(e.children, r);
|
|
170
191
|
});
|
|
171
192
|
};
|
|
172
|
-
n(
|
|
173
|
-
},
|
|
174
|
-
let t = e[
|
|
175
|
-
if (!
|
|
176
|
-
let n = t.indexOf(
|
|
177
|
-
if (n === -1) return
|
|
178
|
-
let r = t.substring(0, n), i = t.substring(n, n +
|
|
179
|
-
return
|
|
193
|
+
n(j.value, e), w.value = Array.from(t), M.value = e, C.value = !0;
|
|
194
|
+
}, Q = (e) => {
|
|
195
|
+
let t = e[O.value.title] || "";
|
|
196
|
+
if (!M.value) return u("span", null, [t]);
|
|
197
|
+
let n = t.indexOf(M.value);
|
|
198
|
+
if (n === -1) return u("span", null, [t]);
|
|
199
|
+
let r = t.substring(0, n), i = t.substring(n, n + M.value.length), a = t.substring(n + M.value.length);
|
|
200
|
+
return u("span", null, [
|
|
180
201
|
r,
|
|
181
|
-
|
|
202
|
+
u("span", { class: x.e("search-highlight") }, [i], 2),
|
|
182
203
|
a
|
|
183
204
|
]);
|
|
184
|
-
},
|
|
185
|
-
placeholder: "
|
|
186
|
-
onSearch:
|
|
205
|
+
}, te = () => u("div", { class: x.e("modal-content-left") }, [u(_, null, { default: () => [u(v, {
|
|
206
|
+
placeholder: "搜索部门",
|
|
207
|
+
onSearch: Z,
|
|
187
208
|
style: { marginBottom: "10px" },
|
|
188
209
|
allowClear: !0
|
|
189
|
-
}, null, 8, ["onSearch", "allowClear"])] }),
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
210
|
+
}, null, 8, ["onSearch", "allowClear"])] }), P.value ? u(m, {
|
|
211
|
+
type: "error",
|
|
212
|
+
showIcon: !0,
|
|
213
|
+
message: P.value
|
|
214
|
+
}, { action: () => u(h, {
|
|
215
|
+
type: "link",
|
|
216
|
+
size: "small",
|
|
217
|
+
onClick: F
|
|
218
|
+
}, { default: () => [l("重试")] }, 8, ["onClick"]) }, 8, ["showIcon", "message"]) : j.value.length > 0 ? u(y, { spinning: N.value }, { default: () => [u(b, {
|
|
219
|
+
expandedKeys: w.value,
|
|
220
|
+
"onUpdate:expandedKeys": (e) => w.value = e,
|
|
221
|
+
selectedKeys: T.value,
|
|
222
|
+
"onUpdate:selectedKeys": (e) => T.value = e,
|
|
223
|
+
checkedKeys: E.value,
|
|
224
|
+
"onUpdate:checkedKeys": (e) => E.value = e,
|
|
196
225
|
checkable: e.type === "checkbox",
|
|
197
|
-
checkStrictly:
|
|
226
|
+
checkStrictly: S.value,
|
|
198
227
|
"show-icon": !0,
|
|
199
|
-
autoExpandParent:
|
|
228
|
+
autoExpandParent: C.value,
|
|
200
229
|
blockNode: !0,
|
|
201
230
|
defaultExpandAll: !0,
|
|
202
|
-
fieldNames:
|
|
203
|
-
"show-line":
|
|
204
|
-
"tree-data":
|
|
205
|
-
|
|
206
|
-
onSelect: R,
|
|
207
|
-
class: v.e("modal-content-left-tree")
|
|
231
|
+
fieldNames: O.value,
|
|
232
|
+
"show-line": D.value,
|
|
233
|
+
"tree-data": j.value,
|
|
234
|
+
class: x.e("modal-content-left-tree")
|
|
208
235
|
}, {
|
|
209
|
-
icon: (e) =>
|
|
210
|
-
title:
|
|
236
|
+
icon: (e) => $(e),
|
|
237
|
+
title: Q,
|
|
211
238
|
_: 1
|
|
212
239
|
}, 8, [
|
|
213
240
|
"expandedKeys",
|
|
@@ -225,32 +252,33 @@ var v = e("dept-selector"), y = /* @__PURE__ */ u({
|
|
|
225
252
|
"fieldNames",
|
|
226
253
|
"show-line",
|
|
227
254
|
"tree-data",
|
|
228
|
-
"onCheck",
|
|
229
|
-
"onSelect",
|
|
230
255
|
"class"
|
|
231
|
-
]) :
|
|
232
|
-
description: "
|
|
233
|
-
image:
|
|
234
|
-
}, null, 8, ["image"])], 2),
|
|
256
|
+
])] }, 8, ["spinning"]) : u(y, { spinning: N.value }, { default: () => [u(g, {
|
|
257
|
+
description: "暂无部门",
|
|
258
|
+
image: g.PRESENTED_IMAGE_SIMPLE
|
|
259
|
+
}, null, 8, ["image"])] }, 8, ["spinning"])], 2), $ = (e) => u(n, {
|
|
235
260
|
name: e.parentId === "0" ? "qiye" : "bumen",
|
|
236
261
|
size: 16
|
|
237
|
-
}, null, 8, ["name"]),
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}, [
|
|
262
|
+
}, null, 8, ["name"]), ne = () => u("div", { class: x.e("modal-content-right") }, [k.value.length > 0 ? k.value.map((e) => u("div", {
|
|
263
|
+
key: e[O.value.key],
|
|
264
|
+
class: x.e("modal-content-right-item")
|
|
265
|
+
}, [u("div", { class: x.e("modal-content-right-item-label") }, [$(e), u("span", null, [e[O.value.title]])], 2), u("div", {
|
|
266
|
+
class: x.e("modal-content-right-item-del"),
|
|
267
|
+
onClick: () => W(e)
|
|
268
|
+
}, [u(n, {
|
|
241
269
|
name: "shanchu",
|
|
242
270
|
size: 16
|
|
243
|
-
}, null)], 10, ["onClick"])], 2)) :
|
|
271
|
+
}, null)], 10, ["onClick"])], 2)) : u(g, {
|
|
244
272
|
description: "暂无数据",
|
|
245
|
-
image:
|
|
273
|
+
image: g.PRESENTED_IMAGE_SIMPLE
|
|
246
274
|
}, null, 8, ["image"])], 2);
|
|
247
|
-
return () =>
|
|
248
|
-
modelValue:
|
|
275
|
+
return () => u("div", { class: x.b() }, [e.hideSlot ? null : d.default?.() ? d.default() : u("div", null, [u(o, {
|
|
276
|
+
modelValue: K.value,
|
|
249
277
|
showAdd: !0,
|
|
250
278
|
addText: "选择部门",
|
|
251
279
|
closable: !0,
|
|
252
|
-
onClose:
|
|
253
|
-
onAdd:
|
|
280
|
+
onClose: q,
|
|
281
|
+
onAdd: J,
|
|
254
282
|
customStyle: {
|
|
255
283
|
width: "100%",
|
|
256
284
|
minHeight: "30px"
|
|
@@ -259,8 +287,8 @@ var v = e("dept-selector"), y = /* @__PURE__ */ u({
|
|
|
259
287
|
"modelValue",
|
|
260
288
|
"onClose",
|
|
261
289
|
"onAdd"
|
|
262
|
-
])]),
|
|
290
|
+
])]), Y()], 2);
|
|
263
291
|
}
|
|
264
292
|
});
|
|
265
293
|
//#endregion
|
|
266
|
-
export {
|
|
294
|
+
export { S as default };
|
|
@@ -58,6 +58,7 @@ import "./contract-signing-location/src/constants.mjs";
|
|
|
58
58
|
import "./contract-signing-location/src/coordinates.mjs";
|
|
59
59
|
import "./pro-contract-template-designer/src/types.mjs";
|
|
60
60
|
import "./pro-contract-template-designer/src/utils/signing-placement.mjs";
|
|
61
|
+
import "./pro-contract-template-designer/src/utils/advanced-controls.mjs";
|
|
61
62
|
import "./pro-contract-template-designer/src/composables/use-template-designer.mjs";
|
|
62
63
|
import "./pro-contract-template-designer/src/utils/image-url.mjs";
|
|
63
64
|
import "./pro-contract-template-designer/src/utils/template-renderer.mjs";
|
|
@@ -3,6 +3,7 @@ import "./src/constants.mjs";
|
|
|
3
3
|
import "../contract-signing-location/src/constants.mjs";
|
|
4
4
|
import "./src/types.mjs";
|
|
5
5
|
import "./src/utils/signing-placement.mjs";
|
|
6
|
+
import "./src/utils/advanced-controls.mjs";
|
|
6
7
|
import "./src/composables/use-template-designer.mjs";
|
|
7
8
|
import "./src/utils/image-url.mjs";
|
|
8
9
|
import "./src/utils/template-renderer.mjs";
|