@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.
Files changed (95) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +85 -85
  2. package/dist/es/components/contract-signing-location/src/template-source.mjs +63 -4
  3. package/dist/es/components/dept-selector/src/dept.mjs +170 -142
  4. package/dist/es/components/index.mjs +1 -0
  5. package/dist/es/components/pro-contract-template-designer/index.mjs +1 -0
  6. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +372 -185
  7. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +59 -42
  8. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +218 -85
  9. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.mjs +5 -0
  10. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.mjs +97 -0
  11. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +914 -853
  12. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +550 -245
  13. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +214 -139
  14. package/dist/es/components/pro-contract-template-designer/src/extensions/template-variable.mjs +53 -35
  15. package/dist/es/components/pro-contract-template-designer/src/types.mjs +15 -2
  16. package/dist/es/components/pro-contract-template-designer/src/utils/advanced-controls.mjs +91 -0
  17. package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +96 -65
  18. package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +23 -16
  19. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  20. package/dist/es/components/pro-selector/src/components/org-tree.mjs +130 -89
  21. package/dist/es/components/pro-selector/src/components/user.mjs +34 -26
  22. package/dist/es/components/pro-selector/src/pro-user.mjs +86 -72
  23. package/dist/es/components/pro-selector/src/types.mjs +4 -1
  24. package/dist/es/components/pro-selector/src/utils/orgTree.mjs +5 -2
  25. package/dist/es/components/pro-selector-group/src/compoents/dept-tree.vue.mjs +92 -65
  26. package/dist/es/components/pro-selector-group/src/compoents/dept.vue.mjs +3 -3
  27. package/dist/es/components/pro-selector-group/src/compoents/role.vue.mjs +98 -73
  28. package/dist/es/components/pro-selector-group/src/compoents/select-box.vue.mjs +12 -9
  29. package/dist/es/components/pro-selector-group/src/compoents/user.vue.mjs +101 -72
  30. package/dist/es/components/pro-selector-group/src/hooks/useApi.mjs +39 -22
  31. package/dist/es/components/pro-selector-group/src/index.vue.mjs +105 -83
  32. package/dist/es/components/pro-selector-group/src/utils/index.mjs +36 -0
  33. package/dist/es/components/role-selector/src/role.mjs +134 -120
  34. package/dist/es/index.mjs +50 -49
  35. package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
  36. package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
  37. package/dist/lib/components/dept-selector/src/dept.cjs +1 -1
  38. package/dist/lib/components/index.cjs +1 -1
  39. package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
  40. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +2 -1
  41. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
  42. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
  43. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.cjs +1 -0
  44. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.cjs +1 -0
  45. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  46. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
  47. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
  48. package/dist/lib/components/pro-contract-template-designer/src/extensions/template-variable.cjs +1 -1
  49. package/dist/lib/components/pro-contract-template-designer/src/types.cjs +1 -1
  50. package/dist/lib/components/pro-contract-template-designer/src/utils/advanced-controls.cjs +1 -0
  51. package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
  52. package/dist/lib/components/pro-contract-template-designer/src/utils/template-tool-icons.cjs +1 -1
  53. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  54. package/dist/lib/components/pro-selector/src/components/org-tree.cjs +1 -1
  55. package/dist/lib/components/pro-selector/src/components/user.cjs +1 -1
  56. package/dist/lib/components/pro-selector/src/pro-user.cjs +1 -1
  57. package/dist/lib/components/pro-selector/src/types.cjs +1 -1
  58. package/dist/lib/components/pro-selector/src/utils/orgTree.cjs +1 -1
  59. package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.vue.cjs +1 -1
  60. package/dist/lib/components/pro-selector-group/src/compoents/dept.vue.cjs +1 -1
  61. package/dist/lib/components/pro-selector-group/src/compoents/role.vue.cjs +1 -1
  62. package/dist/lib/components/pro-selector-group/src/compoents/select-box.vue.cjs +1 -1
  63. package/dist/lib/components/pro-selector-group/src/compoents/user.vue.cjs +1 -1
  64. package/dist/lib/components/pro-selector-group/src/hooks/useApi.cjs +1 -1
  65. package/dist/lib/components/pro-selector-group/src/index.vue.cjs +1 -1
  66. package/dist/lib/components/pro-selector-group/src/utils/index.cjs +1 -0
  67. package/dist/lib/components/role-selector/src/role.cjs +1 -1
  68. package/dist/lib/index.cjs +1 -1
  69. package/dist/theme/dept-selector.css +1 -1
  70. package/dist/theme/icon.css +1 -1
  71. package/dist/theme/index.css +1 -1
  72. package/dist/theme/pro-selector-group.css +1 -1
  73. package/dist/theme/pro-selector.css +1 -1
  74. package/dist/theme/role-selector.css +1 -1
  75. package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +3 -3
  76. package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
  77. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +1 -0
  78. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +3 -0
  79. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.d.ts +7 -1
  80. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.d.ts +14 -0
  81. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +13 -1
  82. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +11 -1
  83. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +4 -0
  84. package/dist/types/components/pro-contract-template-designer/src/extensions/template-variable.d.ts +11 -1
  85. package/dist/types/components/pro-contract-template-designer/src/types.d.ts +131 -2
  86. package/dist/types/components/pro-contract-template-designer/src/utils/advanced-controls.d.ts +15 -0
  87. package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +10 -2
  88. package/dist/types/components/pro-selector/index.d.ts +9 -0
  89. package/dist/types/components/pro-selector/src/components/user.d.ts +9 -0
  90. package/dist/types/components/pro-selector/src/types.d.ts +2 -0
  91. package/dist/types/components/pro-selector/src/utils/orgTree.d.ts +4 -1
  92. package/dist/types/components/pro-selector-group/src/compoents/select-box.vue.d.ts +4 -4
  93. package/dist/types/components/pro-selector-group/src/hooks/useApi.d.ts +6 -1
  94. package/dist/types/components/pro-selector-group/src/utils/index.d.ts +8 -0
  95. 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, createVNode as l, defineComponent as u, ref as d, watch as f } from "vue";
7
- import { Empty as p, FormItemRest as m, InputSearch as h, Tree as g, message as _ } from "ant-design-vue";
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 v = e("dept-selector"), y = /* @__PURE__ */ u({
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: u }) {
14
- let y = d(!0), b = d(!0), x = d([]), S = d([]), C = d([]), w = d(!1), T = d(e.isBuiltInRequest ? {
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), E = d(""), D = d([]), O = d([]), k = d(e.treeData), A = d(!1), j = d("");
19
- if (e.isBuiltInRequest) {
20
- if (!e.http) throw Error("请传入http实例");
21
- e.http.get(`${e.prefix}${r}`).then((e) => {
22
- e.status === 0 && (k.value = e.data, e.data && e.data.length > 0 && (x.value = [e.data[0].id]));
23
- });
24
- }
25
- let M = (e) => typeof e == "object" && !!e && T.value.key in e && e[T.value.key] !== void 0 && e[T.value.key] !== null, N = () => {
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
- if (!Array.isArray(e.modelValue)) return;
28
- let t = e.modelValue.map((e) => e[T.value.key]);
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
- } : C.value = t, x.value = t;
33
- } else {
34
- if (Array.isArray(e.modelValue)) return;
35
- if (M(e.modelValue)) {
36
- let t = e.modelValue[T.value.key];
37
- S.value = [t], x.value = [t];
38
- } else S.value = [], x.value = [];
39
- }
40
- }, P = (t) => {
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
- f(() => e.visible, () => {
45
- e.visible && N();
46
- }, { immediate: !0 }), f(() => e.modelValue, (e) => {
47
- k.value.length > 0 && N(), A.value || (Array.isArray(e) ? O.value = [...e] : M(e) ? O.value = [e] : O.value = []);
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
- }), f(k, () => {
52
- k.value.length > 0 && N();
61
+ }), p(j, () => {
62
+ e.visible && z();
53
63
  }, {
54
64
  immediate: !0,
55
65
  deep: !0
56
66
  });
57
- function F(e) {
67
+ function B(e) {
58
68
  let t = (e, n) => {
59
69
  for (let r of e) {
60
- if (r[T.value.key] === n) return 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(k.value, e);
78
+ return t(j.value, e);
69
79
  }
70
- function I(e) {
71
- return e ? e.map((e) => F(e)).filter(Boolean) : [];
80
+ function V(e) {
81
+ return e ? e.map((e) => B(e)).filter(Boolean) : [];
72
82
  }
73
- f(C, () => {
74
- e.type === "checkbox" && (y.value ? D.value = I(C.value.checked) : D.value = I(C.value), P("watch checkedKeys..."));
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
- }), f(S, () => {
79
- e.type === "radio" && (D.value = I(S.value), P("watch selectedKeys..."));
88
+ }), p(T, () => {
89
+ e.type === "radio" && (k.value = V(T.value));
80
90
  }, {
81
91
  immediate: !0,
82
92
  deep: !0
83
- }), f(() => e.treeData, () => {
84
- e.isBuiltInRequest || (k.value = e.treeData);
85
- });
86
- let L = () => {
87
- A.value = !0;
88
- }, R = () => {
89
- A.value = !0;
90
- }, z = () => {
91
- i("update:visible", !1), i("cancel");
92
- }, B = () => {
93
- if (!D.value.length) {
94
- _.warn("请选择部门");
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
- O.value = [...D.value], e.type === "radio" ? D.value.length > 0 && S.value.length > 0 ? i("update:modelValue", {
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 = C.value.indexOf(e);
109
- n !== -1 && C.value.splice(n, 1), C.value = C.value.filter((e) => e !== t[T.value.key]), H(t.children).forEach((e) => {
110
- let t = C.value.indexOf(e);
111
- t !== -1 && C.value.splice(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
- }, H = (e) => {
123
+ }, G = (e = []) => {
115
124
  let t = [], n = (e) => {
116
- for (let r of e) t.push(r[T.value.key]), r.children && r.children.length && n(r.children);
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
- }, U = c(() => O.value.map((e) => ({
120
- label: e[T.value.title],
121
- value: e[T.value.key],
128
+ }, K = c(() => A.value.map((e) => ({
129
+ label: e[O.value.title],
130
+ value: e[O.value.key],
122
131
  closable: !0
123
- }))), W = (t, n) => {
124
- let r = O.value.filter((e, t) => t !== n);
125
- O.value = r, e.type === "radio" ? i("update:modelValue", null) : i("update:modelValue", r.map((e) => ({
126
- [T.value.key]: e[T.value.key],
127
- [T.value.title]: e[T.value.title]
128
- })));
129
- }, G = () => {
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
- }, K = () => l(s, null, [l(t, {
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: z,
141
- onOnConfirm: B
142
- }, { default: () => [l("div", { class: v.e("modal-content") }, [X(), Q()], 2)] }, 8, [
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
- ])]), q = (e, t) => {
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[T.value.key] === e)) {
152
- n = i[T.value.key];
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 q(e, i.children) && (n = q(e, i.children));
175
+ } else X(e, i.children) && (n = X(e, i.children));
155
176
  }
156
177
  return n;
157
- }, J = (e) => {
178
+ }, Z = (e) => {
158
179
  if (!e.trim()) {
159
- x.value = [], j.value = "", b.value = !0;
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[T.value.title]?.includes(r)) {
165
- let n = q(e[T.value.key], k.value);
166
- for (; n;) t.add(n), n = q(n, k.value);
167
- t.add(e[T.value.key]);
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(k.value, e), x.value = Array.from(t), j.value = e, b.value = !0;
173
- }, Y = (e) => {
174
- let t = e[T.value.title] || "";
175
- if (!j.value) return l("span", null, [t]);
176
- let n = t.indexOf(j.value);
177
- if (n === -1) return l("span", null, [t]);
178
- let r = t.substring(0, n), i = t.substring(n, n + j.value.length), a = t.substring(n + j.value.length);
179
- return l("span", null, [
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
- l("span", { style: "color: #f50; font-weight: bold" }, [i]),
202
+ u("span", { class: x.e("search-highlight") }, [i], 2),
182
203
  a
183
204
  ]);
184
- }, X = () => l("div", { class: v.e("modal-content-left") }, [l(m, null, { default: () => [l(h, {
185
- placeholder: "请输入部门名称",
186
- onSearch: J,
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"])] }), k.value.length > 0 ? l(g, {
190
- expandedKeys: x.value,
191
- "onUpdate:expandedKeys": (e) => x.value = e,
192
- selectedKeys: S.value,
193
- "onUpdate:selectedKeys": (e) => S.value = e,
194
- checkedKeys: C.value,
195
- "onUpdate:checkedKeys": (e) => C.value = e,
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: y.value,
226
+ checkStrictly: S.value,
198
227
  "show-icon": !0,
199
- autoExpandParent: b.value,
228
+ autoExpandParent: C.value,
200
229
  blockNode: !0,
201
230
  defaultExpandAll: !0,
202
- fieldNames: T.value,
203
- "show-line": w.value,
204
- "tree-data": k.value,
205
- onCheck: L,
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) => Z(e),
210
- title: Y,
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
- ]) : l(p, {
232
- description: "暂无数据",
233
- image: p.PRESENTED_IMAGE_SIMPLE
234
- }, null, 8, ["image"])], 2), Z = (e) => l(n, {
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"]), Q = () => l("div", { class: v.e("modal-content-right") }, [D.value.length > 0 ? D.value.map((e) => l("div", { class: v.e("modal-content-right-item") }, [l("div", { class: v.e("modal-content-right-item-label") }, [Z(e), l("span", null, [e[T.value.title]])], 2), l("div", {
238
- class: v.e("modal-content-right-item-del"),
239
- onClick: () => V(e)
240
- }, [l(n, {
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)) : l(p, {
271
+ }, null)], 10, ["onClick"])], 2)) : u(g, {
244
272
  description: "暂无数据",
245
- image: p.PRESENTED_IMAGE_SIMPLE
273
+ image: g.PRESENTED_IMAGE_SIMPLE
246
274
  }, null, 8, ["image"])], 2);
247
- return () => l("div", { class: v.b() }, [e.hideSlot ? null : u.default?.() ? u.default() : l("div", null, [l(o, {
248
- modelValue: U.value,
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: W,
253
- onAdd: G,
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
- ])]), K()], 2);
290
+ ])]), Y()], 2);
263
291
  }
264
292
  });
265
293
  //#endregion
266
- export { y as default };
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";