@cmstops/pro-compo 3.9.1-rc.0 → 3.9.1-rc.2

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 (239) hide show
  1. package/es/hooks/useAttachement.js +42 -2
  2. package/es/selectResourceModal/components/List/ListNormal/Filter.js +32 -13
  3. package/es/selectResourceModal/scripts/useCompoLf.js +1 -1
  4. package/lib/hooks/useAttachement.js +42 -0
  5. package/lib/selectResourceModal/components/List/ListNormal/Filter.js +31 -12
  6. package/lib/selectResourceModal/scripts/useCompoLf.js +1 -1
  7. package/package.json +1 -1
  8. package/es/appCenter/component.d.ts +0 -0
  9. package/es/appCenter/index.d.ts +0 -2
  10. package/es/appCenter/script/api.d.ts +0 -11
  11. package/es/appCenter/script/apps.d.ts +0 -14
  12. package/es/appCenter/script/permissionMap.d.ts +0 -6
  13. package/es/appCenter/script/routeMap.d.ts +0 -4
  14. package/es/appCenter/style/index.d.ts +0 -1
  15. package/es/baseFilter/component.d.ts +0 -0
  16. package/es/baseFilter/components/FilterGroup.d.ts +0 -0
  17. package/es/baseFilter/components/filterItem.d.ts +0 -0
  18. package/es/baseFilter/index.d.ts +0 -2
  19. package/es/baseFilter/style/index.d.ts +0 -1
  20. package/es/baseFilter/useCalcWidth.d.ts +0 -16
  21. package/es/colorPalette/component.d.ts +0 -0
  22. package/es/colorPalette/components/colorPicker.d.ts +0 -0
  23. package/es/colorPalette/index.d.ts +0 -2
  24. package/es/colorPalette/style/index.d.ts +0 -1
  25. package/es/components.d.ts +0 -5
  26. package/es/config.d.ts +0 -4
  27. package/es/contentDetailList/__demo__/matrix/platform.d.ts +0 -36
  28. package/es/contentDetailList/component.d.ts +0 -0
  29. package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
  30. package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
  31. package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
  32. package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
  33. package/es/contentDetailList/components/Content/DocMpItem/index.d.ts +0 -0
  34. package/es/contentDetailList/components/Content/GroupPieceItem/index.d.ts +0 -0
  35. package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
  36. package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
  37. package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
  38. package/es/contentDetailList/components/Content/courseItem/index.d.ts +0 -0
  39. package/es/contentDetailList/components/Content/funhdItem/index.d.ts +0 -0
  40. package/es/contentDetailList/components/Content/index.d.ts +0 -0
  41. package/es/contentDetailList/components/CustomWrp/CustomItem.d.ts +0 -0
  42. package/es/contentDetailList/components/CustomWrp/index.d.ts +0 -0
  43. package/es/contentDetailList/components/Doc/index.d.ts +0 -0
  44. package/es/contentDetailList/components/Records/MatrixItem/index.d.ts +0 -0
  45. package/es/contentDetailList/components/Records/index.d.ts +0 -0
  46. package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.d.ts +0 -0
  47. package/es/contentDetailList/components/ShowQRCode/index.d.ts +0 -0
  48. package/es/contentDetailList/index.d.ts +0 -2
  49. package/es/contentDetailList/script/api.d.ts +0 -6
  50. package/es/contentDetailList/style/index.d.ts +0 -1
  51. package/es/contentModal/component.d.ts +0 -0
  52. package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
  53. package/es/contentModal/components/CompoList/index.d.ts +0 -0
  54. package/es/contentModal/components/ContentList/MediaFilter/index.d.ts +0 -0
  55. package/es/contentModal/components/ContentList/index.d.ts +0 -0
  56. package/es/contentModal/components/Dejin/MediaFilter/index.d.ts +0 -0
  57. package/es/contentModal/components/Dejin/index.d.ts +0 -0
  58. package/es/contentModal/components/EqxiuList/MediaFilter/index.d.ts +0 -0
  59. package/es/contentModal/components/EqxiuList/index.d.ts +0 -0
  60. package/es/contentModal/components/LiveList/MediaFilter/index.d.ts +0 -0
  61. package/es/contentModal/components/LiveList/index.d.ts +0 -0
  62. package/es/contentModal/components/MpAccountList/MpAccountFilter/index.d.ts +0 -0
  63. package/es/contentModal/components/MpAccountList/index.d.ts +0 -0
  64. package/es/contentModal/components/MpContentList/MediaFilter/index.d.ts +0 -0
  65. package/es/contentModal/components/MpContentList/index.d.ts +0 -0
  66. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
  67. package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
  68. package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
  69. package/es/contentModal/components/storeBox/index.d.ts +0 -0
  70. package/es/contentModal/index.d.ts +0 -2
  71. package/es/contentModal/script/api.d.ts +0 -18
  72. package/es/contentModal/style/index.d.ts +0 -1
  73. package/es/dataTags/component.d.ts +0 -0
  74. package/es/dataTags/index.d.ts +0 -2
  75. package/es/dataTags/style/index.d.ts +0 -1
  76. package/es/docHistory/component.d.ts +0 -0
  77. package/es/docHistory/components/DocDiffPanel/index.d.ts +0 -0
  78. package/es/docHistory/components/DocHistoryList/index.d.ts +0 -0
  79. package/es/docHistory/index.d.ts +0 -2
  80. package/es/docHistory/scripts/diff.d.ts +0 -1
  81. package/es/docHistory/scripts/useDocHistory.d.ts +0 -10
  82. package/es/docHistory/style/index.d.ts +0 -1
  83. package/es/docPreview/component.d.ts +0 -0
  84. package/es/docPreview/components/PreviewIframe.d.ts +0 -0
  85. package/es/docPreview/index.d.ts +0 -2
  86. package/es/docPreview/scripts/api.d.ts +0 -1
  87. package/es/docPreview/scripts/hook.d.ts +0 -33
  88. package/es/docPreview/style/index.d.ts +0 -1
  89. package/es/editMetaInfo/component.d.ts +0 -0
  90. package/es/editMetaInfo/components/metaInfoForm.d.ts +0 -0
  91. package/es/editMetaInfo/index.d.ts +0 -2
  92. package/es/editMetaInfo/script/api.d.ts +0 -6
  93. package/es/editMetaInfo/script/restaurants.d.ts +0 -4
  94. package/es/editMetaInfo/style/index.d.ts +0 -1
  95. package/es/emptyData/component.d.ts +0 -0
  96. package/es/emptyData/index.d.ts +0 -2
  97. package/es/emptyData/style/index.d.ts +0 -1
  98. package/es/emptyData/svg/add.d.ts +0 -0
  99. package/es/hooks/assets.d.ts +0 -1
  100. package/es/hooks/batch.d.ts +0 -8
  101. package/es/hooks/dialogVisible.d.ts +0 -8
  102. package/es/hooks/source.d.ts +0 -9
  103. package/es/hooks/toggle.d.ts +0 -6
  104. package/es/hooks/useAttachement.d.ts +0 -34
  105. package/es/hooks/useLocalStorage.d.ts +0 -10
  106. package/es/hooks/useMediaContext.d.ts +0 -12
  107. package/es/hooks/usePopper.d.ts +0 -8
  108. package/es/hooks/useSelection.d.ts +0 -30
  109. package/es/hooks/useUpload.d.ts +0 -30
  110. package/es/hooks/user.d.ts +0 -9
  111. package/es/imageCrop/component.d.ts +0 -0
  112. package/es/imageCrop/index.d.ts +0 -2
  113. package/es/imageCrop/script/api.d.ts +0 -1
  114. package/es/imageCrop/style/index.d.ts +0 -1
  115. package/es/importData/component.d.ts +0 -0
  116. package/es/importData/index.d.ts +0 -2
  117. package/es/importData/style/index.d.ts +0 -1
  118. package/es/index.d.ts +0 -30
  119. package/es/mediaFilter/component.d.ts +0 -0
  120. package/es/mediaFilter/components/DocFilter.d.ts +0 -0
  121. package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
  122. package/es/mediaFilter/components/FilterItem.d.ts +0 -0
  123. package/es/mediaFilter/components/MpAccountFilter.d.ts +0 -0
  124. package/es/mediaFilter/components/MpContentFilter.d.ts +0 -0
  125. package/es/mediaFilter/index.d.ts +0 -3
  126. package/es/mediaFilter/script/optionsGetter.d.ts +0 -26
  127. package/es/mediaFilter/script/types.d.ts +0 -16
  128. package/es/mediaFilter/style/index.d.ts +0 -1
  129. package/es/mediaView/component.d.ts +0 -0
  130. package/es/mediaView/index.d.ts +0 -2
  131. package/es/mediaView/style/index.d.ts +0 -1
  132. package/es/messageBox/component.d.ts +0 -0
  133. package/es/messageBox/index.d.ts +0 -2
  134. package/es/messageBox/list.d.ts +0 -0
  135. package/es/messageBox/script/api.d.ts +0 -6
  136. package/es/messageBox/style/index.d.ts +0 -1
  137. package/es/previousVersion/component.d.ts +0 -0
  138. package/es/previousVersion/index.d.ts +0 -2
  139. package/es/previousVersion/script/api.d.ts +0 -15
  140. package/es/previousVersion/script/tool.d.ts +0 -6
  141. package/es/previousVersion/style/index.d.ts +0 -1
  142. package/es/resourceGridList/component.d.ts +0 -0
  143. package/es/resourceGridList/components/FileTypeThumb/index.d.ts +0 -0
  144. package/es/resourceGridList/index.d.ts +0 -2
  145. package/es/resourceGridList/style/index.d.ts +0 -1
  146. package/es/resourceModal/component.d.ts +0 -0
  147. package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
  148. package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
  149. package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
  150. package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
  151. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceFilter.d.ts +0 -0
  152. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.d.ts +0 -0
  153. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/index.d.ts +0 -0
  154. package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
  155. package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
  156. package/es/resourceModal/index.d.ts +0 -2
  157. package/es/resourceModal/script/api.d.ts +0 -25
  158. package/es/resourceModal/script/mediaSelection.d.ts +0 -14
  159. package/es/resourceModal/style/index.d.ts +0 -1
  160. package/es/selectAvatarList/component.d.ts +0 -0
  161. package/es/selectAvatarList/index.d.ts +0 -2
  162. package/es/selectAvatarList/style/index.d.ts +0 -1
  163. package/es/selectGategory/component.d.ts +0 -0
  164. package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
  165. package/es/selectGategory/index.d.ts +0 -2
  166. package/es/selectGategory/script/api.d.ts +0 -6
  167. package/es/selectGategory/style/index.d.ts +0 -1
  168. package/es/selectResourceModal/component.d.ts +0 -0
  169. package/es/selectResourceModal/components/List/ListAi/index.d.ts +0 -0
  170. package/es/selectResourceModal/components/List/ListCardWrapper.d.ts +0 -0
  171. package/es/selectResourceModal/components/List/ListLocal/Upload.d.ts +0 -0
  172. package/es/selectResourceModal/components/List/ListLocal/index.d.ts +0 -0
  173. package/es/selectResourceModal/components/List/ListNormal/Filter.d.ts +0 -0
  174. package/es/selectResourceModal/components/List/ListNormal/index.d.ts +0 -0
  175. package/es/selectResourceModal/components/List/ListSystem/Filter.d.ts +0 -0
  176. package/es/selectResourceModal/components/List/ListSystem/SubList.d.ts +0 -0
  177. package/es/selectResourceModal/components/List/ListSystem/index.d.ts +0 -0
  178. package/es/selectResourceModal/components/List/ListVideo/index.d.ts +0 -0
  179. package/es/selectResourceModal/components/List/ListWraper.d.ts +0 -0
  180. package/es/selectResourceModal/components/ListSelected/index.d.ts +0 -0
  181. package/es/selectResourceModal/components/ListTabs/index.d.ts +0 -0
  182. package/es/selectResourceModal/index.d.ts +0 -2
  183. package/es/selectResourceModal/scripts/selectionApis.d.ts +0 -2
  184. package/es/selectResourceModal/scripts/useCompoLf.d.ts +0 -27
  185. package/es/selectResourceModal/scripts/useResourceSelect.d.ts +0 -7
  186. package/es/selectResourceModal/scripts/useTabFilter.d.ts +0 -22
  187. package/es/selectResourceModal/style/index.d.ts +0 -1
  188. package/es/selectThumb/component.d.ts +0 -0
  189. package/es/selectThumb/components/card.d.ts +0 -0
  190. package/es/selectThumb/components/colorPalette.d.ts +0 -0
  191. package/es/selectThumb/components/colorPicker.d.ts +0 -0
  192. package/es/selectThumb/index.d.ts +0 -2
  193. package/es/selectThumb/style/index.d.ts +0 -1
  194. package/es/thumbCard/component.d.ts +0 -0
  195. package/es/thumbCard/components/ThumbUploading/index.d.ts +0 -0
  196. package/es/thumbCard/index.d.ts +0 -2
  197. package/es/thumbCard/style/index.d.ts +0 -1
  198. package/es/typeIcons/component.d.ts +0 -0
  199. package/es/typeIcons/index.d.ts +0 -2
  200. package/es/typeIcons/style/index.d.ts +0 -1
  201. package/es/uploadBefore/component.d.ts +0 -0
  202. package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
  203. package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
  204. package/es/uploadBefore/index.d.ts +0 -2
  205. package/es/uploadBefore/script/api.d.ts +0 -16
  206. package/es/uploadBefore/script/fileTypeAdapter.d.ts +0 -39
  207. package/es/uploadBefore/script/fileUpload.d.ts +0 -7
  208. package/es/uploadBefore/script/uploadHooks.d.ts +0 -96
  209. package/es/uploadBefore/style/index.d.ts +0 -1
  210. package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
  211. package/es/uploadStep/component.d.ts +0 -0
  212. package/es/uploadStep/index.d.ts +0 -2
  213. package/es/uploadStep/script/fileTypeAdapter.d.ts +0 -20
  214. package/es/uploadStep/style/index.d.ts +0 -1
  215. package/es/userAvater/component.d.ts +0 -0
  216. package/es/userAvater/index.d.ts +0 -2
  217. package/es/userAvater/script/api.d.ts +0 -8
  218. package/es/userAvater/style/index.d.ts +0 -1
  219. package/es/userDirector/component.d.ts +0 -0
  220. package/es/userDirector/components/userTree.d.ts +0 -0
  221. package/es/userDirector/index.d.ts +0 -2
  222. package/es/userDirector/script/api.d.ts +0 -10
  223. package/es/userDirector/style/index.d.ts +0 -1
  224. package/es/utils/auth.d.ts +0 -5
  225. package/es/utils/date.d.ts +0 -3
  226. package/es/utils/doc.d.ts +0 -76
  227. package/es/utils/filter.d.ts +0 -21
  228. package/es/utils/index.d.ts +0 -17
  229. package/es/utils/request.d.ts +0 -9
  230. package/es/utils/resource.d.ts +0 -4
  231. package/es/utils/transcodeMedia.d.ts +0 -13
  232. package/es/utils/tusUpload.d.ts +0 -16
  233. package/es/utils/typeMap.d.ts +0 -185
  234. package/es/utils/uploadCatalog.d.ts +0 -1
  235. package/es/videoThumb/component.d.ts +0 -0
  236. package/es/videoThumb/index.d.ts +0 -2
  237. package/es/videoThumb/scripts/api.d.ts +0 -9
  238. package/es/videoThumb/scripts/useVideoThumbs.d.ts +0 -12
  239. package/es/videoThumb/style/index.d.ts +0 -1
@@ -1,4 +1,4 @@
1
- import { ref, computed } from "vue";
1
+ import { ref, computed, onMounted } from "vue";
2
2
  import request from "../utils/request.js";
3
3
  function getAttachmentsAll(BASE_API, query) {
4
4
  return request(BASE_API, {
@@ -108,4 +108,44 @@ function getSysRsPage(BASE_API, params) {
108
108
  params
109
109
  });
110
110
  }
111
- export { useAttachement as default, getAttachmentsAll, getAttachmentsMy, getAttachmentsMyMessage, getSysRsByTag, getSysRsPage };
111
+ function getDirectory(BASE_API, params) {
112
+ return request(BASE_API, {
113
+ url: "/poplar/v3/directory/tree",
114
+ method: "get",
115
+ params
116
+ });
117
+ }
118
+ function useDirectory(options) {
119
+ const tree = ref([]);
120
+ async function loadDirTree(parent_id) {
121
+ const params = parent_id ? { parent_id } : {};
122
+ const { code, message } = await getDirectory(options.BASE_API, params);
123
+ if (code === 0) {
124
+ if (!Array.isArray(message.data))
125
+ return [];
126
+ return message.data;
127
+ }
128
+ return [];
129
+ }
130
+ async function init() {
131
+ const result = await loadDirTree();
132
+ if (!Array.isArray(result))
133
+ return;
134
+ tree.value = result;
135
+ }
136
+ async function loadMore(target) {
137
+ const children = await loadDirTree(target.key);
138
+ target.children = children;
139
+ if (children.length === 0)
140
+ target.isLeaf = true;
141
+ }
142
+ onMounted(() => {
143
+ init();
144
+ });
145
+ return {
146
+ tree,
147
+ init,
148
+ loadMore
149
+ };
150
+ }
151
+ export { useAttachement as default, getAttachmentsAll, getAttachmentsMy, getAttachmentsMyMessage, getDirectory, getSysRsByTag, getSysRsPage, useDirectory };
@@ -1,7 +1,8 @@
1
1
  import { defineComponent, inject, computed, ref, watch, onMounted, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode, unref, withCtx, createTextVNode, toDisplayString, Fragment, renderList, createBlock, normalizeClass } from "vue";
2
- import { Input, Dropdown, Doption, Button, Select, Option, RangePicker } from "@arco-design/web-vue";
2
+ import { Input, Dropdown, Doption, Button, TreeSelect, Select, Option, RangePicker } from "@arco-design/web-vue";
3
3
  import { IconUpload } from "@arco-design/web-vue/es/icon";
4
4
  import useSelection from "../../../../hooks/useSelection.js";
5
+ import { useDirectory } from "../../../../hooks/useAttachement.js";
5
6
  import { RESOURCE_SOURCE_OPTIONS, RESOURCE_CATALOG_OPTIONS } from "../../../../utils/typeMap.js";
6
7
  import { getAccountList } from "../../../scripts/selectionApis.js";
7
8
  import { keywordsSelection } from "../../../../utils/resource.js";
@@ -11,7 +12,7 @@ const _hoisted_3 = { class: "filter-list" };
11
12
  const _hoisted_4 = { style: { "width": "200px" } };
12
13
  const _hoisted_5 = {
13
14
  class: "filter-item",
14
- style: { "width": "200px" }
15
+ style: { "width": "170px" }
15
16
  };
16
17
  const _hoisted_6 = { class: "filter-item" };
17
18
  const _hoisted_7 = {
@@ -56,6 +57,9 @@ const _sfc_main = defineComponent({
56
57
  });
57
58
  const resourceSource = RESOURCE_SOURCE_OPTIONS;
58
59
  const resourceCatalog = RESOURCE_CATALOG_OPTIONS;
60
+ const { tree } = useDirectory({
61
+ BASE_API: baseAPI
62
+ });
59
63
  const originFilter = {
60
64
  catalog: [],
61
65
  source: "",
@@ -64,7 +68,8 @@ const _sfc_main = defineComponent({
64
68
  keyword: "",
65
69
  precise_keyword: "",
66
70
  upload_by: null,
67
- sf: ""
71
+ sf: "",
72
+ directory_id: void 0
68
73
  };
69
74
  const filter = ref(JSON.parse(JSON.stringify(originFilter)));
70
75
  const handleReset = () => {
@@ -180,13 +185,13 @@ const _sfc_main = defineComponent({
180
185
  }, {
181
186
  content: withCtx(() => [
182
187
  createVNode(unref(Doption), { value: 0 }, {
183
- default: withCtx(() => _cache[7] || (_cache[7] = [
188
+ default: withCtx(() => _cache[8] || (_cache[8] = [
184
189
  createTextVNode("\u7CBE\u51C6\u641C")
185
190
  ])),
186
191
  _: 1
187
192
  }),
188
193
  createVNode(unref(Doption), { value: 1 }, {
189
- default: withCtx(() => _cache[8] || (_cache[8] = [
194
+ default: withCtx(() => _cache[9] || (_cache[9] = [
190
195
  createTextVNode("\u6A21\u7CCA\u641C")
191
196
  ])),
192
197
  _: 1
@@ -206,15 +211,29 @@ const _sfc_main = defineComponent({
206
211
  _: 1
207
212
  }, 8, ["modelValue"])
208
213
  ]),
214
+ createCommentVNode(" \u76EE\u5F55 "),
215
+ createVNode(unref(TreeSelect), {
216
+ modelValue: filter.value.directory_id,
217
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.directory_id = $event),
218
+ data: unref(tree),
219
+ placeholder: "\u8BF7\u9009\u62E9\u76EE\u5F55",
220
+ style: { "width": "120px" },
221
+ "field-names": {
222
+ title: "alias",
223
+ key: "id"
224
+ },
225
+ "allow-clear": ""
226
+ }, null, 8, ["modelValue", "data"]),
209
227
  createCommentVNode(" \u7D20\u6750\u7C7B\u578B "),
210
228
  createElementVNode("div", _hoisted_5, [
211
229
  createVNode(unref(Select), {
212
230
  modelValue: filter.value.catalog,
213
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.catalog = $event),
231
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => filter.value.catalog = $event),
214
232
  disabled: (_a = unref(filterOptions)) == null ? void 0 : _a.mediaTypeStrict,
215
233
  "allow-clear": "",
216
234
  placeholder: "\u7C7B\u578B",
217
- multiple: ""
235
+ multiple: "",
236
+ "max-tag-count": 1
218
237
  }, {
219
238
  default: withCtx(() => [
220
239
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(resourceCatalog), (item) => {
@@ -231,7 +250,7 @@ const _sfc_main = defineComponent({
231
250
  createCommentVNode(" \u65F6\u95F4\u8303\u56F4 "),
232
251
  createVNode(unref(RangePicker), {
233
252
  modelValue: rangeTime.value,
234
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => rangeTime.value = $event),
253
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => rangeTime.value = $event),
235
254
  "allow-clear": "",
236
255
  style: { "width": "240px" }
237
256
  }, null, 8, ["modelValue"]),
@@ -239,7 +258,7 @@ const _sfc_main = defineComponent({
239
258
  createElementVNode("div", _hoisted_6, [
240
259
  createVNode(unref(Select), {
241
260
  modelValue: filter.value.source,
242
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.source = $event),
261
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.source = $event),
243
262
  "allow-clear": "",
244
263
  placeholder: "\u6765\u6E90"
245
264
  }, {
@@ -259,7 +278,7 @@ const _sfc_main = defineComponent({
259
278
  !_ctx.disableUploadBy ? (openBlock(), createElementBlock("div", _hoisted_7, [
260
279
  createVNode(unref(Select), {
261
280
  modelValue: filter.value.upload_by,
262
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.upload_by = $event),
281
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => filter.value.upload_by = $event),
263
282
  "allow-clear": "",
264
283
  placeholder: "\u4E0A\u4F20\u4EBA",
265
284
  loading: unref(loading),
@@ -284,7 +303,7 @@ const _sfc_main = defineComponent({
284
303
  type: "text",
285
304
  onClick: handleReset
286
305
  }, {
287
- default: withCtx(() => _cache[9] || (_cache[9] = [
306
+ default: withCtx(() => _cache[10] || (_cache[10] = [
288
307
  createTextVNode(" \u91CD\u7F6E ")
289
308
  ])),
290
309
  _: 1
@@ -293,13 +312,13 @@ const _sfc_main = defineComponent({
293
312
  createElementVNode("div", _hoisted_8, [
294
313
  createVNode(unref(Button), {
295
314
  type: "primary",
296
- onClick: _cache[6] || (_cache[6] = ($event) => emits("upload"))
315
+ onClick: _cache[7] || (_cache[7] = ($event) => emits("upload"))
297
316
  }, {
298
317
  icon: withCtx(() => [
299
318
  createVNode(unref(IconUpload))
300
319
  ]),
301
320
  default: withCtx(() => [
302
- _cache[10] || (_cache[10] = createTextVNode(" \u4E0A\u4F20 "))
321
+ _cache[11] || (_cache[11] = createTextVNode(" \u4E0A\u4F20 "))
303
322
  ]),
304
323
  _: 1
305
324
  })
@@ -7,7 +7,7 @@ function useCompoentLifycycle(props, emits, handler) {
7
7
  return {
8
8
  class: "resource-select-drawer",
9
9
  header: false,
10
- width: "1024px",
10
+ width: "85vw",
11
11
  footer: false,
12
12
  unmountOnClose: true
13
13
  };
@@ -110,9 +110,51 @@ function getSysRsPage(BASE_API, params) {
110
110
  params
111
111
  });
112
112
  }
113
+ function getDirectory(BASE_API, params) {
114
+ return request(BASE_API, {
115
+ url: "/poplar/v3/directory/tree",
116
+ method: "get",
117
+ params
118
+ });
119
+ }
120
+ function useDirectory(options) {
121
+ const tree = vue.ref([]);
122
+ async function loadDirTree(parent_id) {
123
+ const params = parent_id ? { parent_id } : {};
124
+ const { code, message } = await getDirectory(options.BASE_API, params);
125
+ if (code === 0) {
126
+ if (!Array.isArray(message.data))
127
+ return [];
128
+ return message.data;
129
+ }
130
+ return [];
131
+ }
132
+ async function init() {
133
+ const result = await loadDirTree();
134
+ if (!Array.isArray(result))
135
+ return;
136
+ tree.value = result;
137
+ }
138
+ async function loadMore(target) {
139
+ const children = await loadDirTree(target.key);
140
+ target.children = children;
141
+ if (children.length === 0)
142
+ target.isLeaf = true;
143
+ }
144
+ vue.onMounted(() => {
145
+ init();
146
+ });
147
+ return {
148
+ tree,
149
+ init,
150
+ loadMore
151
+ };
152
+ }
113
153
  exports["default"] = useAttachement;
114
154
  exports.getAttachmentsAll = getAttachmentsAll;
115
155
  exports.getAttachmentsMy = getAttachmentsMy;
116
156
  exports.getAttachmentsMyMessage = getAttachmentsMyMessage;
157
+ exports.getDirectory = getDirectory;
117
158
  exports.getSysRsByTag = getSysRsByTag;
118
159
  exports.getSysRsPage = getSysRsPage;
160
+ exports.useDirectory = useDirectory;
@@ -3,6 +3,7 @@ var vue = require("vue");
3
3
  var webVue = require("@arco-design/web-vue");
4
4
  var icon = require("@arco-design/web-vue/es/icon");
5
5
  var useSelection = require("../../../../hooks/useSelection.js");
6
+ var useAttachement = require("../../../../hooks/useAttachement.js");
6
7
  var typeMap = require("../../../../utils/typeMap.js");
7
8
  var selectionApis = require("../../../scripts/selectionApis.js");
8
9
  var resource = require("../../../../utils/resource.js");
@@ -12,7 +13,7 @@ const _hoisted_3 = { class: "filter-list" };
12
13
  const _hoisted_4 = { style: { "width": "200px" } };
13
14
  const _hoisted_5 = {
14
15
  class: "filter-item",
15
- style: { "width": "200px" }
16
+ style: { "width": "170px" }
16
17
  };
17
18
  const _hoisted_6 = { class: "filter-item" };
18
19
  const _hoisted_7 = {
@@ -57,6 +58,9 @@ const _sfc_main = vue.defineComponent({
57
58
  });
58
59
  const resourceSource = typeMap.RESOURCE_SOURCE_OPTIONS;
59
60
  const resourceCatalog = typeMap.RESOURCE_CATALOG_OPTIONS;
61
+ const { tree } = useAttachement.useDirectory({
62
+ BASE_API: baseAPI
63
+ });
60
64
  const originFilter = {
61
65
  catalog: [],
62
66
  source: "",
@@ -65,7 +69,8 @@ const _sfc_main = vue.defineComponent({
65
69
  keyword: "",
66
70
  precise_keyword: "",
67
71
  upload_by: null,
68
- sf: ""
72
+ sf: "",
73
+ directory_id: void 0
69
74
  };
70
75
  const filter = vue.ref(JSON.parse(JSON.stringify(originFilter)));
71
76
  const handleReset = () => {
@@ -181,13 +186,13 @@ const _sfc_main = vue.defineComponent({
181
186
  }, {
182
187
  content: vue.withCtx(() => [
183
188
  vue.createVNode(vue.unref(webVue.Doption), { value: 0 }, {
184
- default: vue.withCtx(() => _cache[7] || (_cache[7] = [
189
+ default: vue.withCtx(() => _cache[8] || (_cache[8] = [
185
190
  vue.createTextVNode("\u7CBE\u51C6\u641C")
186
191
  ])),
187
192
  _: 1
188
193
  }),
189
194
  vue.createVNode(vue.unref(webVue.Doption), { value: 1 }, {
190
- default: vue.withCtx(() => _cache[8] || (_cache[8] = [
195
+ default: vue.withCtx(() => _cache[9] || (_cache[9] = [
191
196
  vue.createTextVNode("\u6A21\u7CCA\u641C")
192
197
  ])),
193
198
  _: 1
@@ -207,15 +212,29 @@ const _sfc_main = vue.defineComponent({
207
212
  _: 1
208
213
  }, 8, ["modelValue"])
209
214
  ]),
215
+ vue.createCommentVNode(" \u76EE\u5F55 "),
216
+ vue.createVNode(vue.unref(webVue.TreeSelect), {
217
+ modelValue: filter.value.directory_id,
218
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.directory_id = $event),
219
+ data: vue.unref(tree),
220
+ placeholder: "\u8BF7\u9009\u62E9\u76EE\u5F55",
221
+ style: { "width": "120px" },
222
+ "field-names": {
223
+ title: "alias",
224
+ key: "id"
225
+ },
226
+ "allow-clear": ""
227
+ }, null, 8, ["modelValue", "data"]),
210
228
  vue.createCommentVNode(" \u7D20\u6750\u7C7B\u578B "),
211
229
  vue.createElementVNode("div", _hoisted_5, [
212
230
  vue.createVNode(vue.unref(webVue.Select), {
213
231
  modelValue: filter.value.catalog,
214
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.catalog = $event),
232
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => filter.value.catalog = $event),
215
233
  disabled: (_a = vue.unref(filterOptions)) == null ? void 0 : _a.mediaTypeStrict,
216
234
  "allow-clear": "",
217
235
  placeholder: "\u7C7B\u578B",
218
- multiple: ""
236
+ multiple: "",
237
+ "max-tag-count": 1
219
238
  }, {
220
239
  default: vue.withCtx(() => [
221
240
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(resourceCatalog), (item) => {
@@ -232,7 +251,7 @@ const _sfc_main = vue.defineComponent({
232
251
  vue.createCommentVNode(" \u65F6\u95F4\u8303\u56F4 "),
233
252
  vue.createVNode(vue.unref(webVue.RangePicker), {
234
253
  modelValue: rangeTime.value,
235
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => rangeTime.value = $event),
254
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => rangeTime.value = $event),
236
255
  "allow-clear": "",
237
256
  style: { "width": "240px" }
238
257
  }, null, 8, ["modelValue"]),
@@ -240,7 +259,7 @@ const _sfc_main = vue.defineComponent({
240
259
  vue.createElementVNode("div", _hoisted_6, [
241
260
  vue.createVNode(vue.unref(webVue.Select), {
242
261
  modelValue: filter.value.source,
243
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.source = $event),
262
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.source = $event),
244
263
  "allow-clear": "",
245
264
  placeholder: "\u6765\u6E90"
246
265
  }, {
@@ -260,7 +279,7 @@ const _sfc_main = vue.defineComponent({
260
279
  !_ctx.disableUploadBy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
261
280
  vue.createVNode(vue.unref(webVue.Select), {
262
281
  modelValue: filter.value.upload_by,
263
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.upload_by = $event),
282
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => filter.value.upload_by = $event),
264
283
  "allow-clear": "",
265
284
  placeholder: "\u4E0A\u4F20\u4EBA",
266
285
  loading: vue.unref(loading),
@@ -285,7 +304,7 @@ const _sfc_main = vue.defineComponent({
285
304
  type: "text",
286
305
  onClick: handleReset
287
306
  }, {
288
- default: vue.withCtx(() => _cache[9] || (_cache[9] = [
307
+ default: vue.withCtx(() => _cache[10] || (_cache[10] = [
289
308
  vue.createTextVNode(" \u91CD\u7F6E ")
290
309
  ])),
291
310
  _: 1
@@ -294,13 +313,13 @@ const _sfc_main = vue.defineComponent({
294
313
  vue.createElementVNode("div", _hoisted_8, [
295
314
  vue.createVNode(vue.unref(webVue.Button), {
296
315
  type: "primary",
297
- onClick: _cache[6] || (_cache[6] = ($event) => emits("upload"))
316
+ onClick: _cache[7] || (_cache[7] = ($event) => emits("upload"))
298
317
  }, {
299
318
  icon: vue.withCtx(() => [
300
319
  vue.createVNode(vue.unref(icon.IconUpload))
301
320
  ]),
302
321
  default: vue.withCtx(() => [
303
- _cache[10] || (_cache[10] = vue.createTextVNode(" \u4E0A\u4F20 "))
322
+ _cache[11] || (_cache[11] = vue.createTextVNode(" \u4E0A\u4F20 "))
304
323
  ]),
305
324
  _: 1
306
325
  })
@@ -8,7 +8,7 @@ function useCompoentLifycycle(props, emits, handler) {
8
8
  return {
9
9
  class: "resource-select-drawer",
10
10
  header: false,
11
- width: "1024px",
11
+ width: "85vw",
12
12
  footer: false,
13
13
  unmountOnClose: true
14
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "3.9.1-rc.0",
3
+ "version": "3.9.1-rc.2",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",
File without changes
@@ -1,2 +0,0 @@
1
- declare const appCenter: any;
2
- export default appCenter;
@@ -1,11 +0,0 @@
1
- interface Params {
2
- repo_id?: string;
3
- app_id?: number;
4
- [key: string]: any;
5
- }
6
- export declare function getUserRepoActs(BASE_API: string): Promise<import("axios").AxiosResponse<any, any>>;
7
- export declare function getPubApps(BASE_API: string, params: Params): Promise<import("axios").AxiosResponse<any, any>>;
8
- export declare function getResentApp(BASE_API: string, params: Params): Promise<import("axios").AxiosResponse<any, any>>;
9
- export declare function setResentApp(BASE_API: string, params: Params): Promise<import("axios").AxiosResponse<any, any>>;
10
- export declare function getBtnSlot(BASE_API: string, params: Params): Promise<import("axios").AxiosResponse<any, any>>;
11
- export {};
@@ -1,14 +0,0 @@
1
- declare const _default: {
2
- alias: string;
3
- actions: {
4
- id: number;
5
- key: string;
6
- alias: string;
7
- brief: string;
8
- real: string;
9
- type: number;
10
- icon: string;
11
- target_url: string;
12
- }[];
13
- }[];
14
- export default _default;
@@ -1,6 +0,0 @@
1
- declare type PermissionItem = {
2
- key: string;
3
- real: string | string[];
4
- };
5
- export default function permissionMap(permissions: string[], item: PermissionItem, hideList?: string[]): boolean;
6
- export {};
@@ -1,4 +0,0 @@
1
- export default function routeMap(BASE_API: string, rid: string | null | undefined, listType: string, app?: {
2
- type: number;
3
- setting?: any;
4
- } | null): Promise<void>;
@@ -1 +0,0 @@
1
- import './index.less';
File without changes
File without changes
File without changes
@@ -1,2 +0,0 @@
1
- declare const baseFilter: any;
2
- export default baseFilter;
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,16 +0,0 @@
1
- import { Ref } from 'vue';
2
- /**
3
- * @deprecated 改为其他方式实现
4
- * @param filterItemsRef
5
- * @param dpPannelRef
6
- * @param moreBtnRef
7
- * @returns
8
- */
9
- export default function useCalcWidth(filterItemsRef: Ref<HTMLElement | undefined>, dpPannelRef: Ref<HTMLElement | undefined>, moreBtnRef: Ref<HTMLElement | undefined>): {
10
- pannelArray: Ref<string, string>;
11
- popperShowFlag: Ref<boolean, boolean>;
12
- showPopper: () => void;
13
- initDocWidthListener: () => void;
14
- initPopper: () => void;
15
- checkOverflow: () => void;
16
- };
File without changes
File without changes
@@ -1,2 +0,0 @@
1
- declare const colorPalette: any;
2
- export default colorPalette;
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,5 +0,0 @@
1
- import type { App } from 'vue';
2
- declare const Components: {
3
- install: (app: App) => void;
4
- };
5
- export default Components;
package/es/config.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare const DEFAULT_BASE_API: any;
2
- export declare const DEFAULT_BASE_ACCOUNT_HOST: any;
3
- export declare const DEFAULT_UPLOAD_CHUNK_SIZE: number;
4
- export declare const DEFAULT_UPLOAD_URL: string;
@@ -1,36 +0,0 @@
1
- declare const platform: ({
2
- id: number;
3
- key: string;
4
- name: string;
5
- indexUrl: string;
6
- isDataAsync: boolean;
7
- type: string[];
8
- pfIcon?: undefined;
9
- } | {
10
- id: number;
11
- key: string;
12
- name: string;
13
- indexUrl: string;
14
- pfIcon: string;
15
- isDataAsync: boolean;
16
- type: string[];
17
- })[];
18
- export declare function getPlatformInfoById(id: number): any;
19
- export declare const accounts: {
20
- id: number;
21
- createdAt: string;
22
- updatedAt: string;
23
- deletedAt: null;
24
- thirdId: string;
25
- authorId: string;
26
- platformAccountId: string;
27
- avatar: string;
28
- name: string;
29
- platformId: number;
30
- cookie: string;
31
- token: string;
32
- lastRequestAt: number;
33
- lastSyncAt: number;
34
- state: number;
35
- }[];
36
- export default platform;
File without changes
File without changes
@@ -1,2 +0,0 @@
1
- declare const contentDetailList: any;
2
- export default contentDetailList;
@@ -1,6 +0,0 @@
1
- interface Params {
2
- [key: string]: any;
3
- }
4
- export declare function generateDocPreviewLink(BASE_API: string, query?: Params): Promise<import("axios").AxiosResponse<any, any>>;
5
- export declare function getDocDetailsNew(BASE_API: string, query?: Params): Promise<import("axios").AxiosResponse<any, any>>;
6
- export {};
@@ -1 +0,0 @@
1
- import './index.less';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes