@gct-paas/core-web 0.1.6-dev.4 → 0.1.6-dev.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 (144) hide show
  1. package/dist/ColorPicker-DGQQb8I7.js +1 -0
  2. package/dist/{_plugin-vue_export-helper-59SbqtUR.js → _plugin-vue_export-helper-C9hXqKoS.js} +1 -1
  3. package/dist/{de_DE-BnwOalCV.js → de_DE-B3f8kAv-.js} +1 -1
  4. package/dist/diagram-config-item-C5Ha2XJq.js +1 -0
  5. package/dist/diagram-config-item-reverse-ChoxnW-Z.js +1 -0
  6. package/dist/diagram-config-item-virtual-Cbmggfwt.js +1 -0
  7. package/dist/{en_US-6Hw6WWah.js → en_US-BSG3Kz6v.js} +1 -1
  8. package/dist/{es_ES-tAqXFGrR.js → es_ES-BGP8IOmQ.js} +1 -1
  9. package/dist/{fr_FR-BkDgVS_P.js → fr_FR-Y-6CzjUq.js} +1 -1
  10. package/dist/hooks-yX21uJ6d.js +1 -0
  11. package/dist/index.min.css +1 -1
  12. package/dist/{ja_JP-AsmV92nC.js → ja_JP-CDlH1v8M.js} +1 -1
  13. package/dist/loader.esm.min.js +1 -1
  14. package/dist/{monaco-editor-CgESUPw_.js → monaco-editor-BTqXEIZI.js} +1 -1
  15. package/dist/{pt_PT-CCVWOJzE.js → pt_PT-N-iIoE2_.js} +1 -1
  16. package/dist/relationship-diagram-config-DstwwXCO.js +1 -0
  17. package/dist/{ru_RU-w4sUgbzL.js → ru_RU--ESLRHrj.js} +1 -1
  18. package/dist/template-1ZQd8Z1w.js +1 -0
  19. package/dist/{tr_TR-CGZch3eB.js → tr_TR-BOIykdZO.js} +1 -1
  20. package/dist/{vi_VN-DONxIDR7.js → vi_VN-CmVoM2Rw.js} +1 -1
  21. package/dist/{zh_CN-BxdD8hqG.js → zh_CN-DhsO5Qwx.js} +1 -1
  22. package/dist/{zh_TW-D5Y8j-oG.js → zh_TW-DWdp2kVo.js} +1 -1
  23. package/es/components/UserPick/src/user-pick.vue_vue_type_script_setup_true_lang.mjs +2 -2
  24. package/es/components/base-button/base-button.vue.mjs +1 -1
  25. package/es/components/field-cascader/src/hooks.d.ts +1 -0
  26. package/es/components/label-design/modal/template.vue_vue_type_script_setup_true_lang.mjs +2 -2
  27. package/es/components/label-design/panels/modals/diff-modal.vue_vue_type_script_setup_true_lang.mjs +2 -2
  28. package/es/components/label-design/panels/panel.vue_vue_type_script_setup_true_lang.mjs +1 -1
  29. package/es/components/label-design/panels/widget/controls/labelTemplate.vue.mjs +2 -2
  30. package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_script_setup_true_lang.mjs +1 -16
  31. package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_style_index_0_scoped_c628d318_lang.css +10 -0
  32. package/es/components/label-design/stage/stage.vue.d.ts +9 -0
  33. package/es/components/label-design/stage/stage.vue.mjs +2 -2
  34. package/es/components/label-design/stage/stage.vue_vue_type_script_setup_true_lang.mjs +2 -1
  35. package/es/components/label-design/stage/{stage.vue_vue_type_style_index_0_scoped_53b1f897_lang.css → stage.vue_vue_type_style_index_0_scoped_9275e9fb_lang.css} +8 -8
  36. package/es/components/layout/view-container/view-container.d.ts +1 -11
  37. package/es/components/layout/view-container/view-container.mjs +10 -14
  38. package/es/create-app-vue.mjs +4 -2
  39. package/es/index.d.ts +4 -1
  40. package/es/index.mjs +31 -25
  41. package/es/modules/category/category-modal.vue.d.ts +11 -0
  42. package/es/modules/category/category-modal.vue.mjs +7 -0
  43. package/es/modules/category/category-modal.vue_vue_type_script_setup_true_name_category-modal_lang.mjs +53 -0
  44. package/es/modules/category/category-modal.vue_vue_type_style_index_0_scoped_b560615c_lang.css +67 -0
  45. package/es/modules/category/category-sider.vue.d.ts +337 -0
  46. package/es/modules/category/category-sider.vue.mjs +7 -0
  47. package/es/modules/category/category-sider.vue_vue_type_script_setup_true_name_category-sider_lang.mjs +239 -0
  48. package/es/modules/category/category-sider.vue_vue_type_style_index_0_scoped_5af8c1ba_lang.css +211 -0
  49. package/es/modules/category/hooks/useCategory.d.ts +20 -0
  50. package/es/modules/category/hooks/useCategory.mjs +139 -0
  51. package/es/modules/category/index.d.ts +2 -0
  52. package/es/modules/category/index.mjs +2 -0
  53. package/es/modules/category/type.d.ts +8 -0
  54. package/es/modules/color-picker/src/color-editor.vue.mjs +1 -1
  55. package/es/modules/gct-form/controller/form-item-basic/form-item-basic.controller.mjs +2 -0
  56. package/es/modules/gct-form/controller/gct-form/gct-form.controller.mjs +1 -0
  57. package/es/modules/gct-table/controller/gct-table/gct-table.controller.mjs +1 -0
  58. package/es/modules/gct-table/controller/table-item/table-item.controller.mjs +2 -0
  59. package/es/modules/gct-table/controller/table-row/table-row.controller.mjs +3 -0
  60. package/es/modules/global-modal/src/components/ModalWrapper.vue_vue_type_script_lang.mjs +1 -4
  61. package/es/modules/print-tmpl/icon-print-folder.svg.mjs +4 -0
  62. package/es/modules/print-tmpl/icon-print-printer.svg.mjs +4 -0
  63. package/es/modules/print-tmpl/index.d.ts +2 -0
  64. package/es/modules/print-tmpl/index.mjs +1 -0
  65. package/es/modules/print-tmpl/print-tmpl-modal.vue.d.ts +31 -0
  66. package/es/modules/print-tmpl/print-tmpl-modal.vue.mjs +7 -0
  67. package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_script_setup_true_name_print-tmpl-modal_lang.mjs +593 -0
  68. package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_style_index_0_scoped_c60841b8_lang.css +143 -0
  69. package/es/modules/relationship-diagram-config/cache.controller.d.ts +70 -0
  70. package/es/modules/relationship-diagram-config/cache.controller.mjs +128 -0
  71. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.css +123 -0
  72. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.d.ts +381 -0
  73. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.mjs +98 -0
  74. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.css +71 -0
  75. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.d.ts +28 -0
  76. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.mjs +53 -0
  77. package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.d.ts +27 -0
  78. package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.mjs +2 -0
  79. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.css +107 -0
  80. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.d.ts +34 -0
  81. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.mjs +198 -0
  82. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.css +68 -0
  83. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.d.ts +31 -0
  84. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.mjs +53 -0
  85. package/es/modules/relationship-diagram-config/components/index.d.ts +5 -0
  86. package/es/modules/relationship-diagram-config/components/index.mjs +5 -0
  87. package/es/modules/relationship-diagram-config/constant/index.d.ts +72 -0
  88. package/es/modules/relationship-diagram-config/constant/index.mjs +70 -0
  89. package/es/modules/relationship-diagram-config/hooks/index.d.ts +10 -0
  90. package/es/modules/relationship-diagram-config/hooks/index.mjs +19 -0
  91. package/es/modules/relationship-diagram-config/index.d.ts +6 -0
  92. package/es/modules/relationship-diagram-config/index.mjs +28 -0
  93. package/es/modules/relationship-diagram-config/interface/i-link-provider/i-link-provider.d.ts +57 -0
  94. package/es/modules/relationship-diagram-config/interface/i-node-provider/i-node-provider.d.ts +18 -0
  95. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-link/i-relationship-diagram-link.d.ts +80 -0
  96. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-node/i-relationship-diagram-node.d.ts +82 -0
  97. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-options/i-relationship-diagram-options.d.ts +51 -0
  98. package/es/modules/relationship-diagram-config/interface/i-rule-config/i-rule-config.d.ts +135 -0
  99. package/es/modules/relationship-diagram-config/interface/index.d.ts +6 -0
  100. package/es/modules/relationship-diagram-config/link.controller.d.ts +75 -0
  101. package/es/modules/relationship-diagram-config/link.controller.mjs +121 -0
  102. package/es/modules/relationship-diagram-config/node.controller.d.ts +102 -0
  103. package/es/modules/relationship-diagram-config/node.controller.mjs +189 -0
  104. package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.d.ts +23 -0
  105. package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.mjs +33 -0
  106. package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.d.ts +1 -0
  107. package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.mjs +27 -0
  108. package/es/modules/relationship-diagram-config/plumb-plugin/index.d.ts +3 -0
  109. package/es/modules/relationship-diagram-config/plumb-plugin/index.mjs +2 -0
  110. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.css +132 -0
  111. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.d.ts +21 -0
  112. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.mjs +184 -0
  113. package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.d.ts +14 -0
  114. package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.mjs +17 -0
  115. package/es/modules/relationship-diagram-config/providers/index.d.ts +5 -0
  116. package/es/modules/relationship-diagram-config/providers/index.mjs +5 -0
  117. package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.d.ts +14 -0
  118. package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.mjs +17 -0
  119. package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.d.ts +16 -0
  120. package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.mjs +26 -0
  121. package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.d.ts +14 -0
  122. package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.mjs +17 -0
  123. package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.d.ts +119 -0
  124. package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.mjs +199 -0
  125. package/es/modules/relationship-diagram-config/relationship-diagram-config.css +113 -0
  126. package/es/modules/relationship-diagram-config/relationship-diagram-config.d.ts +102 -0
  127. package/es/modules/relationship-diagram-config/relationship-diagram-config.mjs +104 -0
  128. package/es/modules/relationship-diagram-config/relationship-diagram-config.state.d.ts +44 -0
  129. package/es/modules/relationship-diagram-config/relationship-diagram-config.state.mjs +46 -0
  130. package/es/modules/relationship-diagram-config/utils/index.d.ts +1 -0
  131. package/es/modules/relationship-diagram-config/utils/register/register.d.ts +71 -0
  132. package/es/modules/relationship-diagram-config/utils/register/register.mjs +81 -0
  133. package/es/utils/recursive.mjs +1 -0
  134. package/package.json +10 -9
  135. package/dist/components-4-8OfvJi.js +0 -1
  136. package/dist/template-Cf-wq8-9.js +0 -1
  137. package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_style_index_0_scoped_992e00bb_lang.css +0 -10
  138. /package/dist/{JsBarcode-DlXSdlvD.js → JsBarcode-DY53cVJ6.js} +0 -0
  139. /package/dist/{cropper-tw7tUDDe.js → cropper-DK_hFgpO.js} +0 -0
  140. /package/dist/{icon-next-picker-B_S_yInJ.js → icon-next-picker-DYiHqnNR.js} +0 -0
  141. /package/dist/{objectSpread2-DxfE1S3_.js → objectSpread2-DARadIQB.js} +0 -0
  142. /package/dist/{overlayscrollbars-vue-DtKFrHnA.js → overlayscrollbars-vue-Df-3wShc.js} +0 -0
  143. /package/dist/{rich-editor-K2Pv0Uja.js → rich-editor-DVOriJH0.js} +0 -0
  144. /package/dist/{useMonacoEditor-BO2ALW-7.js → useMonacoEditor-DqSQTg7b.js} +0 -0
@@ -0,0 +1,593 @@
1
+ import category_sider_default from "../category/category-sider.vue.mjs";
2
+ import "../category/index.mjs";
3
+ import icon_print_folder_default from "./icon-print-folder.svg.mjs";
4
+ import icon_print_printer_default from "./icon-print-printer.svg.mjs";
5
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, onMounted, openBlock, ref, renderList, resolveComponent, toDisplayString, unref, watch, withCtx, withKeys } from "vue";
6
+ import { isNil } from "lodash-es";
7
+ import { FormDesignEnum, PrintModeEnums, PrintTypeEnum, t, useModal, useNamespace } from "@gct-paas/core";
8
+ import { VxeColumn, VxeTable } from "vxe-table";
9
+ //#region src/modules/print-tmpl/print-tmpl-modal.vue?vue&type=script&setup=true&name=print-tmpl-modal&lang.ts
10
+ var _hoisted_1 = {
11
+ key: 0,
12
+ class: "px-2"
13
+ };
14
+ var _hoisted_2 = {
15
+ key: 1,
16
+ class: "font-bold mb-3"
17
+ };
18
+ var _hoisted_3 = {
19
+ key: 2,
20
+ class: "gct-print-tmpl-modal-wrap ks-col"
21
+ };
22
+ var _hoisted_4 = { class: "print-tmpl-vxe-table-wrapper" };
23
+ var _hoisted_5 = { class: "print-tmpl-vxe-table-area" };
24
+ var _hoisted_6 = { class: "ks-row" };
25
+ var _hoisted_7 = { class: "gct-text-overflow" };
26
+ var _hoisted_8 = {
27
+ key: 0,
28
+ class: "gct-custom-tag ml4px"
29
+ };
30
+ var _hoisted_9 = { class: "ks-row" };
31
+ var _hoisted_10 = ["title"];
32
+ var _hoisted_11 = { class: "pt-12px" };
33
+ var _hoisted_12 = {
34
+ key: 3,
35
+ class: "gct-print-tmpl-modal-right btw-visible flex flex-col h-full px-2 py-3"
36
+ };
37
+ var _hoisted_13 = { class: "print-tmpl-vxe-table-wrapper" };
38
+ var _hoisted_14 = { class: "print-tmpl-vxe-table-area" };
39
+ var _hoisted_15 = { class: "tmpl-path" };
40
+ var _hoisted_16 = ["src"];
41
+ var _hoisted_17 = ["src"];
42
+ var _hoisted_18 = { class: "pt-12px" };
43
+ var print_tmpl_modal_vue_vue_type_script_setup_true_name_print_tmpl_modal_lang_default = /* @__PURE__ */ defineComponent({
44
+ __name: "print-tmpl-modal",
45
+ props: {
46
+ selected: {},
47
+ modal: {},
48
+ moduleType: {},
49
+ printMode: {},
50
+ className: {},
51
+ isRdo: {
52
+ type: Boolean,
53
+ default: false
54
+ },
55
+ multiple: { type: Boolean },
56
+ categoryTitle: { default: void 0 },
57
+ queryParams: {},
58
+ btwForceVisible: {
59
+ type: Boolean,
60
+ default: false
61
+ },
62
+ ignoreCase: {},
63
+ modelKey: {}
64
+ },
65
+ setup(__props) {
66
+ const props = __props;
67
+ const ns = useNamespace("print-tmpl-modal");
68
+ const selectedVal = ref([]);
69
+ const tableRef = ref();
70
+ const btwTableRef = ref();
71
+ const pageForm = ref({
72
+ pageNo: 1,
73
+ pageSize: 20
74
+ });
75
+ const btwPageForm = ref({
76
+ pageNo: 1,
77
+ pageSize: 20
78
+ });
79
+ const activeTabKey = ref("design");
80
+ const total = ref(0);
81
+ const isLoading = ref(false);
82
+ const btwTotal = ref(0);
83
+ const isBtwLoading = ref(false);
84
+ const isBtwTableVisible = computed(() => props.printMode === PrintModeEnums.Server || props.btwForceVisible);
85
+ const categorySiderModule = computed(() => props.moduleType);
86
+ const firstCategoryValue = ref(computed(() => {
87
+ return Array.isArray(props.selected) ? props.selected?.[0]?.categoryId : props.selected?.categoryId;
88
+ }).value || "");
89
+ const formData = ref({
90
+ categoryId: firstCategoryValue.value,
91
+ name: ""
92
+ });
93
+ const btwFormData = ref({ name: "" });
94
+ const btwSearchValCache = ref("");
95
+ const labelRegex = /(?<!\\)\\(?!\\)/g;
96
+ const paginationAttr = computed(() => {
97
+ return {
98
+ current: pageForm.value.pageNo,
99
+ pageSize: pageForm.value.pageSize,
100
+ total: total.value,
101
+ showSizeChanger: true,
102
+ pageSizeOptions: [
103
+ "10",
104
+ "20",
105
+ "30"
106
+ ],
107
+ showTotal: (total) => t("sys.component.table.total", { total })
108
+ };
109
+ });
110
+ const btwPaginationAttr = computed(() => {
111
+ return {
112
+ current: btwPageForm.value.pageNo,
113
+ pageSize: btwPageForm.value.pageSize,
114
+ total: btwTotal.value,
115
+ showSizeChanger: true,
116
+ pageSizeOptions: [
117
+ "10",
118
+ "20",
119
+ "30"
120
+ ],
121
+ showTotal: (total) => t("sys.component.table.total", { total })
122
+ };
123
+ });
124
+ const tableData = ref([]);
125
+ const btwTableData = ref([]);
126
+ const moduleType2titleMap = {
127
+ [PrintTypeEnum.LABEL]: t("sys.pageDesigner.label"),
128
+ [PrintTypeEnum.RECEIPT]: t("sys.pageDesigner.document"),
129
+ [FormDesignEnum.EDHR]: "DHR",
130
+ [FormDesignEnum.ONLINE_FORM]: t("sys.pageDesigner.fieldCmp.online_form")
131
+ };
132
+ onMounted(() => {
133
+ nextTick(() => {
134
+ if (props.selected) if (Array.isArray(props.selected)) {
135
+ setSelectRow(props.selected);
136
+ selectedVal.value = [...props.selected];
137
+ } else {
138
+ setSelectRow([props.selected]);
139
+ selectedVal.value = [{ ...props.selected }];
140
+ }
141
+ });
142
+ });
143
+ const setSelectRow = (rows) => {
144
+ const $table = tableRef.value;
145
+ if ($table) $table.setCheckboxRow(rows, true);
146
+ };
147
+ const filterName = (row) => {
148
+ return row.children || !props.isRdo ? row.name : row.version;
149
+ };
150
+ const isFormDesignModule = computed(() => {
151
+ return [FormDesignEnum.EDHR, FormDesignEnum.ONLINE_FORM].includes(props.moduleType);
152
+ });
153
+ const computedTitle = computed(() => {
154
+ return moduleType2titleMap[props.moduleType];
155
+ });
156
+ const categoryTitle = computed(() => {
157
+ if (props.categoryTitle || !isNil(props.categoryTitle)) return props.categoryTitle;
158
+ return t("sys.categoryOfSth", { sth: computedTitle.value });
159
+ });
160
+ const queryTableData = (data) => {
161
+ formData.value.categoryId = data?.key;
162
+ };
163
+ const radioChangeEvent = (params) => {
164
+ selectedVal.value = [{ ...params.row }];
165
+ };
166
+ const checkboxChangeEvent = ({ checked, row }) => {
167
+ if (checked) selectedVal.value?.push(row);
168
+ else selectedVal.value = selectedVal.value?.filter((e) => e.id !== row.id);
169
+ };
170
+ function handleSizeChange(current, pageSize) {
171
+ pageForm.value.pageNo = current;
172
+ pageForm.value.pageSize = pageSize;
173
+ getDataSource();
174
+ }
175
+ function handleBtwSizeChange(current, pageSize) {
176
+ btwPageForm.value.pageNo = current;
177
+ btwPageForm.value.pageSize = pageSize;
178
+ getBtwDataSource();
179
+ }
180
+ const getCategoryData = () => {};
181
+ const onSave = () => {
182
+ return {
183
+ ok: true,
184
+ params: { selected: selectedVal.value }
185
+ };
186
+ };
187
+ useModal(() => Promise.resolve(onSave()));
188
+ const getDataSource = async () => {
189
+ formData.value.name = formData.value.name.trim();
190
+ const API = _api.apaas.printDesigner.getRdoPageBaseList;
191
+ isLoading.value = true;
192
+ const res = await API({
193
+ ...formData.value,
194
+ ...pageForm.value,
195
+ ...props.queryParams || {},
196
+ moduleType: props.moduleType,
197
+ modelKey: props.modelKey
198
+ }) || {};
199
+ isLoading.value = false;
200
+ tableData.value = firstCategoryValue.value ? res.data?.map((e) => {
201
+ let item;
202
+ if (props.isRdo) item = {
203
+ ...e,
204
+ children: e.children?.map((f) => {
205
+ return {
206
+ ...f,
207
+ id: f.baseId + ":" + f.id,
208
+ categoryId: e.categoryId
209
+ };
210
+ })
211
+ };
212
+ else {
213
+ delete e.children;
214
+ item = {
215
+ ...e,
216
+ id: e.baseId + ":" + e.id,
217
+ categoryId: formData.value.categoryId
218
+ };
219
+ }
220
+ return item;
221
+ }) || [] : [];
222
+ total.value = res.totalCount;
223
+ await nextTick();
224
+ const checkedVal = tree2list(tableData.value || []).find((i) => i.id == props.selected?.id);
225
+ console.log(tableRef.value, "tableRef.value");
226
+ checkedVal && tableRef.value?.setRadioRow(checkedVal);
227
+ props.isRdo && tableRef.value?.setAllTreeExpand(true);
228
+ };
229
+ const getBtwDataSource = async () => {
230
+ btwFormData.value.name = btwFormData.value.name.trim();
231
+ isBtwLoading.value = true;
232
+ _api.apaas.label.getBtwPageList({
233
+ ...btwFormData.value,
234
+ ...btwPageForm.value
235
+ }).then(async (res) => {
236
+ res?.data?.forEach((item) => {
237
+ if (item?.fullPath) {
238
+ const pathArr = item.fullPath?.split("/");
239
+ pathArr.pop();
240
+ pathArr.shift();
241
+ item.tmplPath = pathArr;
242
+ }
243
+ });
244
+ btwTableData.value = res.data || [];
245
+ btwTotal.value = res.totalCount;
246
+ await nextTick();
247
+ const checkedVal = tree2list(btwTableData.value || []).find((i) => i.id == props.selected?.id);
248
+ checkedVal && btwTableRef.value?.setRadioRow(checkedVal);
249
+ }).finally(() => {
250
+ isBtwLoading.value = false;
251
+ });
252
+ };
253
+ const handleBtwSearchChange = (e) => {
254
+ const val = e.target.value;
255
+ if (!val || val.length < btwSearchValCache.value.length) getBtwDataSource();
256
+ btwSearchValCache.value = val;
257
+ };
258
+ const tree2list = (arr) => {
259
+ let cloneTree = JSON.parse(JSON.stringify(arr));
260
+ function iteration(tree, level) {
261
+ let temp = [];
262
+ for (const i of tree) {
263
+ i.level = level;
264
+ temp.push(i);
265
+ if (i.children?.length) temp = [...temp, ...iteration(i.children, level + 1)];
266
+ }
267
+ return temp;
268
+ }
269
+ return iteration(cloneTree, 1);
270
+ };
271
+ watch(() => formData.value.categoryId, (val) => {
272
+ if (val) getDataSource();
273
+ else {
274
+ tableData.value = [];
275
+ total.value = 0;
276
+ }
277
+ }, { immediate: true });
278
+ watch(() => activeTabKey.value, () => {
279
+ if (activeTabKey.value === "btw") {
280
+ btwTableData.value = [];
281
+ btwPageForm.value.pageNo = 1;
282
+ getBtwDataSource();
283
+ } else {
284
+ tableData.value = [];
285
+ pageForm.value.pageNo = 1;
286
+ getDataSource();
287
+ }
288
+ });
289
+ watch(() => selectedVal.value, () => {
290
+ if (!props?.multiple && props.modal?.state) props.modal.state.okDisabled = !selectedVal.value.length;
291
+ }, { immediate: true });
292
+ return (_ctx, _cache) => {
293
+ const _component_a_tab_pane = resolveComponent("a-tab-pane");
294
+ const _component_a_tabs = resolveComponent("a-tabs");
295
+ const _component_a_input = resolveComponent("a-input");
296
+ const _component_a_form_item = resolveComponent("a-form-item");
297
+ const _component_a_form = resolveComponent("a-form");
298
+ const _component_a_tooltip = resolveComponent("a-tooltip");
299
+ const _component_a_pagination = resolveComponent("a-pagination");
300
+ return openBlock(), createElementBlock("div", { class: normalizeClass(["gct-print-tmpl-modal ks-column", isBtwTableVisible.value ? "px-2 pt-4" : "p-4"]) }, [
301
+ isBtwTableVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_a_tabs, {
302
+ "active-key": activeTabKey.value,
303
+ "onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => activeTabKey.value = $event)
304
+ }, {
305
+ default: withCtx(() => [createVNode(_component_a_tab_pane, {
306
+ key: "design",
307
+ tab: categoryTitle.value
308
+ }, null, 8, ["tab"]), createVNode(_component_a_tab_pane, {
309
+ key: "btw",
310
+ tab: ".btw 标签模板 "
311
+ })]),
312
+ _: 1
313
+ }, 8, ["active-key"])])) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(categoryTitle.value), 1)),
314
+ !isBtwTableVisible.value || isBtwTableVisible.value && activeTabKey.value === "design" ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", { class: normalizeClass(["gct-print-tmpl-modal-left", isBtwTableVisible.value ? "btw-visible" : ""]) }, [createVNode(unref(category_sider_default), {
315
+ value: firstCategoryValue.value,
316
+ "onUpdate:value": _cache[1] || (_cache[1] = ($event) => firstCategoryValue.value = $event),
317
+ class: normalizeClass([unref(ns).e("sider")]),
318
+ "sider-title": "",
319
+ module: categorySiderModule.value,
320
+ "need-folder-icon": !isFormDesignModule.value,
321
+ readonly: "",
322
+ "has-title": false,
323
+ draggable: false,
324
+ "is-tree": isFormDesignModule.value,
325
+ "ignore-case": __props.ignoreCase,
326
+ onChangeValue: queryTableData,
327
+ onChangeCategory: getCategoryData
328
+ }, null, 8, [
329
+ "value",
330
+ "class",
331
+ "module",
332
+ "need-folder-icon",
333
+ "is-tree",
334
+ "ignore-case"
335
+ ])], 2), createElementVNode("div", { class: normalizeClass(["gct-print-tmpl-modal-right flex flex-col h-full px-16px py-12px", isBtwTableVisible.value ? "btw-visible" : ""]) }, [createVNode(_component_a_form, { model: formData.value }, {
336
+ default: withCtx(() => [createVNode(_component_a_form_item, { label: "" }, {
337
+ default: withCtx(() => [createVNode(_component_a_input, {
338
+ value: formData.value.name,
339
+ "onUpdate:value": _cache[2] || (_cache[2] = ($event) => formData.value.name = $event),
340
+ class: "gct-print-tmpl-input",
341
+ style: { "width": "224px" },
342
+ placeholder: unref(t)("sys.searchNameOfSth", { sth: computedTitle.value }),
343
+ clearable: "",
344
+ onKeyup: _cache[3] || (_cache[3] = withKeys(($event) => getDataSource(), ["enter"])),
345
+ onChange: _cache[4] || (_cache[4] = () => {
346
+ !formData.value.name && getDataSource();
347
+ })
348
+ }, {
349
+ prefix: withCtx(() => [..._cache[7] || (_cache[7] = [createElementVNode("i", { class: "iconfont icon-sousuo1" }, null, -1)])]),
350
+ _: 1
351
+ }, 8, ["value", "placeholder"])]),
352
+ _: 1
353
+ })]),
354
+ _: 1
355
+ }, 8, ["model"]), createElementVNode("div", _hoisted_4, [createElementVNode("div", _hoisted_5, [createVNode(unref(VxeTable), {
356
+ ref_key: "tableRef",
357
+ ref: tableRef,
358
+ class: normalizeClass(["select-none", {
359
+ vxetable: true,
360
+ default: true
361
+ }]),
362
+ data: tableData.value,
363
+ height: "100%",
364
+ "min-height": "88",
365
+ loading: isLoading.value,
366
+ "loading-config": { text: " " },
367
+ "column-config": { resizable: true },
368
+ "tree-config": {},
369
+ "row-config": {
370
+ isHover: true,
371
+ keyField: "id"
372
+ },
373
+ "checkbox-config": __props.multiple ? {
374
+ highlight: true,
375
+ trigger: "row",
376
+ reserve: true,
377
+ checkStrictly: true
378
+ } : {},
379
+ "radio-config": __props.multiple ? {} : {
380
+ highlight: true,
381
+ trigger: "row",
382
+ reserve: true
383
+ },
384
+ onCheckboxChange: checkboxChangeEvent,
385
+ onRadioChange: radioChangeEvent
386
+ }, {
387
+ default: withCtx(() => [
388
+ __props.multiple ? (openBlock(), createBlock(unref(VxeColumn), {
389
+ key: 0,
390
+ type: "checkbox",
391
+ width: "40"
392
+ })) : (openBlock(), createBlock(unref(VxeColumn), {
393
+ key: 1,
394
+ type: "radio",
395
+ width: "40",
396
+ resizable: false
397
+ })),
398
+ createVNode(unref(VxeColumn), {
399
+ field: "name",
400
+ title: unref(t)("sys.name"),
401
+ "show-overflow": "",
402
+ "tree-node": __props.isRdo
403
+ }, {
404
+ default: withCtx((scope) => [createElementVNode("div", _hoisted_6, [createVNode(_component_a_tooltip, null, {
405
+ title: withCtx(() => [createTextVNode(toDisplayString(filterName(scope?.row || {})), 1)]),
406
+ default: withCtx(() => [createElementVNode("div", _hoisted_7, toDisplayString(filterName(scope?.row || {})), 1)]),
407
+ _: 2
408
+ }, 1024), !!scope?.row?.default && __props.isRdo ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString(unref(t)("sys.default")), 1)) : createCommentVNode("", true)])]),
409
+ _: 1
410
+ }, 8, ["title", "tree-node"]),
411
+ createVNode(unref(VxeColumn), {
412
+ field: "description",
413
+ title: unref(t)("sys.description"),
414
+ "show-overflow": ""
415
+ }, {
416
+ default: withCtx((scope) => [createElementVNode("div", _hoisted_9, [createElementVNode("span", {
417
+ class: "gct-text-overflow",
418
+ title: scope?.row?.description
419
+ }, toDisplayString(scope?.row?.description), 9, _hoisted_10)])]),
420
+ _: 1
421
+ }, 8, ["title"]),
422
+ createVNode(unref(VxeColumn), {
423
+ field: "modifyUserName",
424
+ title: unref(t)("sys.appDesigner.modifier"),
425
+ width: "120",
426
+ "show-overflow": ""
427
+ }, null, 8, ["title"]),
428
+ createVNode(unref(VxeColumn), {
429
+ field: "modifyTime",
430
+ title: unref(t)("sys.appDesigner.modificationTime"),
431
+ width: "185"
432
+ }, null, 8, ["title"])
433
+ ]),
434
+ _: 1
435
+ }, 8, [
436
+ "data",
437
+ "loading",
438
+ "checkbox-config",
439
+ "radio-config"
440
+ ])]), createElementVNode("div", _hoisted_11, [createVNode(_component_a_pagination, mergeProps(paginationAttr.value, {
441
+ class: "pagination-total-left",
442
+ onChange: handleSizeChange
443
+ }), null, 16)])])], 2)])) : createCommentVNode("", true),
444
+ isBtwTableVisible.value && activeTabKey.value === "btw" ? (openBlock(), createElementBlock("div", _hoisted_12, [createVNode(_component_a_form, { model: btwFormData.value }, {
445
+ default: withCtx(() => [createVNode(_component_a_form_item, { label: "" }, {
446
+ default: withCtx(() => [createVNode(_component_a_input, {
447
+ value: btwFormData.value.name,
448
+ "onUpdate:value": _cache[5] || (_cache[5] = ($event) => btwFormData.value.name = $event),
449
+ class: "gct-print-tmpl-input",
450
+ style: { "width": "224px" },
451
+ placeholder: unref(t)("sys.searchNameOfSth", { sth: "标签" }),
452
+ clearable: "",
453
+ onKeyup: _cache[6] || (_cache[6] = withKeys(($event) => getBtwDataSource(), ["enter"])),
454
+ onChange: handleBtwSearchChange
455
+ }, {
456
+ prefix: withCtx(() => [..._cache[8] || (_cache[8] = [createElementVNode("i", { class: "iconfont icon-sousuo1" }, null, -1)])]),
457
+ _: 1
458
+ }, 8, ["value", "placeholder"])]),
459
+ _: 1
460
+ })]),
461
+ _: 1
462
+ }, 8, ["model"]), createElementVNode("div", _hoisted_13, [createElementVNode("div", _hoisted_14, [createVNode(unref(VxeTable), {
463
+ ref_key: "btwTableRef",
464
+ ref: btwTableRef,
465
+ class: normalizeClass(["select-none", {
466
+ vxetable: true,
467
+ default: true
468
+ }]),
469
+ data: btwTableData.value,
470
+ height: "100%",
471
+ "min-height": "88",
472
+ loading: isBtwLoading.value,
473
+ "loading-config": { text: " " },
474
+ "column-config": { resizable: true },
475
+ "tree-config": {},
476
+ "row-config": {
477
+ isHover: true,
478
+ keyField: "id"
479
+ },
480
+ "checkbox-config": __props.multiple ? {
481
+ highlight: true,
482
+ trigger: "row",
483
+ reserve: true,
484
+ checkStrictly: true
485
+ } : {},
486
+ "radio-config": __props.multiple ? {} : {
487
+ highlight: true,
488
+ trigger: "row",
489
+ reserve: true
490
+ },
491
+ onCheckboxChange: checkboxChangeEvent,
492
+ onRadioChange: radioChangeEvent
493
+ }, {
494
+ default: withCtx(() => [
495
+ __props.multiple ? (openBlock(), createBlock(unref(VxeColumn), {
496
+ key: 0,
497
+ type: "checkbox",
498
+ width: "40"
499
+ })) : (openBlock(), createBlock(unref(VxeColumn), {
500
+ key: 1,
501
+ type: "radio",
502
+ width: "40",
503
+ resizable: false
504
+ })),
505
+ createVNode(unref(VxeColumn), {
506
+ field: "name",
507
+ title: "标签模板名称",
508
+ "min-width": "120",
509
+ "show-overflow": ""
510
+ }),
511
+ createVNode(unref(VxeColumn), {
512
+ field: "modelName",
513
+ title: "关联模型",
514
+ width: "120",
515
+ "show-overflow": ""
516
+ }),
517
+ createVNode(unref(VxeColumn), {
518
+ field: "tmplPath",
519
+ title: "BarTender " + unref(t)("sys.labelTmplPath"),
520
+ "min-width": "220",
521
+ "show-overflow": ""
522
+ }, {
523
+ default: withCtx((scope) => [createElementVNode("span", _hoisted_15, [
524
+ createElementVNode("img", {
525
+ width: "16",
526
+ height: "16",
527
+ src: unref(icon_print_printer_default)
528
+ }, null, 8, _hoisted_16),
529
+ createElementVNode("span", null, toDisplayString(scope?.row?.printName), 1),
530
+ (openBlock(true), createElementBlock(Fragment, null, renderList(scope?.row?.tmplPath || [], (item, index) => {
531
+ return openBlock(), createElementBlock(Fragment, { key: index }, [
532
+ _cache[9] || (_cache[9] = createTextVNode(" /", -1)),
533
+ createElementVNode("img", {
534
+ width: "16",
535
+ height: "16",
536
+ class: "ml-3px mr-2px",
537
+ src: unref(icon_print_folder_default)
538
+ }, null, 8, _hoisted_17),
539
+ createElementVNode("span", null, toDisplayString(item?.replace(labelRegex, "/")), 1),
540
+ index === 0 ? (openBlock(), createElementBlock("span", {
541
+ key: 0,
542
+ class: normalizeClass(["btw-label-tag", scope?.row?.pathType === "common" ? "common" : "local"])
543
+ }, toDisplayString(scope?.row?.pathType === "common" ? unref(t)("sys.shared") : unref(t)("sys.local")), 3)) : createCommentVNode("", true)
544
+ ], 64);
545
+ }), 128))
546
+ ])]),
547
+ _: 1
548
+ }, 8, ["title"]),
549
+ createVNode(unref(VxeColumn), {
550
+ field: "macAddress",
551
+ title: unref(t)("sys.macAddress"),
552
+ width: "175",
553
+ "show-overflow": ""
554
+ }, null, 8, ["title"]),
555
+ createVNode(unref(VxeColumn), {
556
+ field: "createUserName",
557
+ title: unref(t)("sys.creator"),
558
+ width: "120",
559
+ "show-overflow": ""
560
+ }, null, 8, ["title"]),
561
+ createVNode(unref(VxeColumn), {
562
+ field: "createTime",
563
+ title: unref(t)("sys.createTime"),
564
+ width: "185"
565
+ }, null, 8, ["title"]),
566
+ createVNode(unref(VxeColumn), {
567
+ field: "modifyUserName",
568
+ title: unref(t)("sys.appDesigner.modifier"),
569
+ width: "120",
570
+ "show-overflow": ""
571
+ }, null, 8, ["title"]),
572
+ createVNode(unref(VxeColumn), {
573
+ field: "modifyTime",
574
+ title: unref(t)("sys.appDesigner.modificationTime"),
575
+ width: "185"
576
+ }, null, 8, ["title"])
577
+ ]),
578
+ _: 1
579
+ }, 8, [
580
+ "data",
581
+ "loading",
582
+ "checkbox-config",
583
+ "radio-config"
584
+ ])]), createElementVNode("div", _hoisted_18, [createVNode(_component_a_pagination, mergeProps(btwPaginationAttr.value, {
585
+ class: "pagination-total-left",
586
+ onChange: handleBtwSizeChange
587
+ }), null, 16)])])])) : createCommentVNode("", true)
588
+ ], 2);
589
+ };
590
+ }
591
+ });
592
+ //#endregion
593
+ export { print_tmpl_modal_vue_vue_type_script_setup_true_name_print_tmpl_modal_lang_default as default };