@cmstops/pro-compo 3.9.2-alpha.2 → 3.9.2-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.min.js.map +1 -1
- package/es/baseFilter/component.js +71 -14
- package/es/contentDetailList/component.js +24 -0
- package/es/contentDetailList/components/Content/index.js +2 -1
- package/es/contentDetailList/components/Doc/index.js +6 -0
- package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.js +4 -2
- package/es/contentModal/component.js +16 -8
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
- package/es/contentModal/components/storeBox/index.js +4 -2
- package/es/dataTags/component.js +10 -5
- package/es/docHistory/component.js +43 -13
- package/es/docHistory/scripts/diff.js +4 -3
- package/es/docHistory/style/index.css +4 -0
- package/es/docHistory/style/index.less +5 -0
- package/es/docPreview/component.js +10 -5
- package/es/editMetaInfo/components/metaInfoForm.js +4 -2
- package/es/hooks/useUpload.js +43 -4
- package/es/imageCrop/component.js +4 -2
- package/es/importData/component.js +6 -3
- package/es/index.css +4 -0
- package/es/index.js +1 -0
- package/es/mediaFilter/components/DocFilter.js +2 -1
- package/es/resourceGridList/component.js +4 -2
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
- package/es/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
- package/es/selectAddTo/component.js +126 -0
- package/es/selectAddTo/component.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +169 -0
- package/es/selectAddTo/components/ViewAllColumn/columnTree/index.js +151 -0
- package/es/selectAddTo/components/ViewAllColumn/index.js +203 -0
- package/es/selectAddTo/components/ViewAllColumn/index.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +78 -0
- package/es/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +193 -0
- package/es/selectAddTo/index.js +16 -0
- package/es/selectAddTo/script/api.js +36 -0
- package/es/selectAddTo/script/useSelectAddToState.js +106 -0
- package/es/selectAddTo/style/css.js +1 -0
- package/es/selectAddTo/style/index.css +3 -0
- package/es/selectAddTo/style/index.js +1 -0
- package/es/selectAddTo/style/index.less +3 -0
- package/es/selectResourceModal/component.js +10 -5
- package/es/selectResourceModal/components/List/ListLocal/Upload.js +2 -1
- package/es/selectResourceModal/components/List/ListLocal/index.js +8 -3
- package/es/selectResourceModal/components/List/ListNormal/Filter.js +45 -22
- package/es/selectResourceModal/components/List/ListNormal/index.js +0 -1
- package/es/selectResourceModal/components/List/ListSystem/Filter.js +2 -1
- package/es/selectResourceModal/hooks/useResponsiveFilter.js +1 -1
- package/es/style.css +57 -0
- package/es/typeIcons/component.js +1 -1
- package/es/userAvater/component.js +2 -1
- package/es/userDirector/component.js +2 -1
- package/es/utils/index.js +6 -6
- package/lib/baseFilter/component.js +69 -12
- package/lib/contentDetailList/component.js +24 -0
- package/lib/contentDetailList/components/Content/index.js +2 -1
- package/lib/contentDetailList/components/Doc/index.js +6 -0
- package/lib/contentDetailList/components/ShowQRCode/QrcodeView/index.js +4 -2
- package/lib/contentModal/component.js +16 -8
- package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
- package/lib/contentModal/components/storeBox/index.js +4 -2
- package/lib/dataTags/component.js +10 -5
- package/lib/docHistory/component.js +41 -11
- package/lib/docHistory/scripts/diff.js +4 -3
- package/lib/docHistory/style/index.css +4 -0
- package/lib/docHistory/style/index.less +5 -0
- package/lib/docPreview/component.js +10 -5
- package/lib/editMetaInfo/components/metaInfoForm.js +4 -2
- package/lib/hooks/useUpload.js +43 -3
- package/lib/imageCrop/component.js +4 -2
- package/lib/importData/component.js +6 -3
- package/lib/index.css +4 -0
- package/lib/index.js +2 -0
- package/lib/mediaFilter/components/DocFilter.js +2 -1
- package/lib/resourceGridList/component.js +4 -2
- package/lib/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
- package/lib/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
- package/lib/selectAddTo/component.js +127 -0
- package/lib/selectAddTo/component.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +170 -0
- package/lib/selectAddTo/components/ViewAllColumn/columnTree/index.js +152 -0
- package/lib/selectAddTo/components/ViewAllColumn/index.js +204 -0
- package/lib/selectAddTo/components/ViewAllColumn/index.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +80 -0
- package/lib/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +195 -0
- package/lib/selectAddTo/index.js +18 -0
- package/lib/selectAddTo/script/api.js +42 -0
- package/lib/selectAddTo/script/useSelectAddToState.js +108 -0
- package/lib/selectAddTo/style/css.js +2 -0
- package/lib/selectAddTo/style/index.css +3 -0
- package/lib/selectAddTo/style/index.js +2 -0
- package/lib/selectAddTo/style/index.less +3 -0
- package/lib/selectResourceModal/component.js +10 -5
- package/lib/selectResourceModal/components/List/ListLocal/Upload.js +2 -1
- package/lib/selectResourceModal/components/List/ListLocal/index.js +6 -1
- package/lib/selectResourceModal/components/List/ListNormal/Filter.js +44 -21
- package/lib/selectResourceModal/components/List/ListNormal/index.js +0 -1
- package/lib/selectResourceModal/components/List/ListSystem/Filter.js +2 -1
- package/lib/selectResourceModal/hooks/useResponsiveFilter.js +1 -1
- package/lib/typeIcons/component.js +1 -1
- package/lib/userAvater/component.js +2 -1
- package/lib/userDirector/component.js +2 -1
- package/lib/utils/index.js +6 -6
- package/package.json +1 -1
- package/es/appCenter/component.d.ts +0 -0
- package/es/appCenter/index.d.ts +0 -2
- package/es/appCenter/script/api.d.ts +0 -11
- package/es/appCenter/script/apps.d.ts +0 -14
- package/es/appCenter/script/permissionMap.d.ts +0 -6
- package/es/appCenter/script/routeMap.d.ts +0 -4
- package/es/appCenter/style/index.d.ts +0 -1
- package/es/baseFilter/component.d.ts +0 -0
- package/es/baseFilter/components/FilterGroup.d.ts +0 -0
- package/es/baseFilter/components/filterItem.d.ts +0 -0
- package/es/baseFilter/index.d.ts +0 -2
- package/es/baseFilter/style/index.d.ts +0 -1
- package/es/baseFilter/useCalcWidth.d.ts +0 -16
- package/es/colorPalette/component.d.ts +0 -0
- package/es/colorPalette/components/colorPicker.d.ts +0 -0
- package/es/colorPalette/index.d.ts +0 -2
- package/es/colorPalette/style/index.d.ts +0 -1
- package/es/components.d.ts +0 -5
- package/es/config.d.ts +0 -4
- package/es/contentDetailList/__demo__/matrix/platform.d.ts +0 -36
- package/es/contentDetailList/component.d.ts +0 -0
- package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocMpItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/GroupPieceItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/courseItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/funhdItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/index.d.ts +0 -0
- package/es/contentDetailList/components/CustomWrp/CustomItem.d.ts +0 -0
- package/es/contentDetailList/components/CustomWrp/index.d.ts +0 -0
- package/es/contentDetailList/components/Doc/index.d.ts +0 -0
- package/es/contentDetailList/components/Records/MatrixItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Records/index.d.ts +0 -0
- package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.d.ts +0 -0
- package/es/contentDetailList/components/ShowQRCode/index.d.ts +0 -0
- package/es/contentDetailList/index.d.ts +0 -2
- package/es/contentDetailList/script/api.d.ts +0 -6
- package/es/contentDetailList/style/index.d.ts +0 -1
- package/es/contentModal/component.d.ts +0 -0
- package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
- package/es/contentModal/components/CompoList/index.d.ts +0 -0
- package/es/contentModal/components/ContentList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/ContentList/index.d.ts +0 -0
- package/es/contentModal/components/Dejin/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/Dejin/index.d.ts +0 -0
- package/es/contentModal/components/EqxiuList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/EqxiuList/index.d.ts +0 -0
- package/es/contentModal/components/LiveList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/LiveList/index.d.ts +0 -0
- package/es/contentModal/components/MpAccountList/MpAccountFilter/index.d.ts +0 -0
- package/es/contentModal/components/MpAccountList/index.d.ts +0 -0
- package/es/contentModal/components/MpContentList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/MpContentList/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
- package/es/contentModal/components/storeBox/index.d.ts +0 -0
- package/es/contentModal/index.d.ts +0 -2
- package/es/contentModal/script/api.d.ts +0 -18
- package/es/contentModal/style/index.d.ts +0 -1
- package/es/dataTags/component.d.ts +0 -0
- package/es/dataTags/index.d.ts +0 -2
- package/es/dataTags/style/index.d.ts +0 -1
- package/es/docHistory/component.d.ts +0 -0
- package/es/docHistory/components/DocDiffPanel/index.d.ts +0 -0
- package/es/docHistory/components/DocHistoryList/index.d.ts +0 -0
- package/es/docHistory/index.d.ts +0 -2
- package/es/docHistory/scripts/diff.d.ts +0 -1
- package/es/docHistory/scripts/useDocHistory.d.ts +0 -10
- package/es/docHistory/style/index.d.ts +0 -1
- package/es/docPreview/component.d.ts +0 -0
- package/es/docPreview/components/PreviewIframe.d.ts +0 -0
- package/es/docPreview/index.d.ts +0 -2
- package/es/docPreview/scripts/api.d.ts +0 -1
- package/es/docPreview/scripts/hook.d.ts +0 -33
- package/es/docPreview/style/index.d.ts +0 -1
- package/es/editMetaInfo/component.d.ts +0 -0
- package/es/editMetaInfo/components/metaInfoForm.d.ts +0 -0
- package/es/editMetaInfo/index.d.ts +0 -2
- package/es/editMetaInfo/script/api.d.ts +0 -6
- package/es/editMetaInfo/script/restaurants.d.ts +0 -4
- package/es/editMetaInfo/style/index.d.ts +0 -1
- package/es/emptyData/component.d.ts +0 -0
- package/es/emptyData/index.d.ts +0 -2
- package/es/emptyData/style/index.d.ts +0 -1
- package/es/emptyData/svg/add.d.ts +0 -0
- package/es/hooks/assets.d.ts +0 -1
- package/es/hooks/batch.d.ts +0 -8
- package/es/hooks/dialogVisible.d.ts +0 -8
- package/es/hooks/source.d.ts +0 -9
- package/es/hooks/toggle.d.ts +0 -6
- package/es/hooks/useAttachement.d.ts +0 -53
- package/es/hooks/useLocalStorage.d.ts +0 -10
- package/es/hooks/useMediaContext.d.ts +0 -12
- package/es/hooks/usePopper.d.ts +0 -8
- package/es/hooks/useSelection.d.ts +0 -30
- package/es/hooks/useUpload.d.ts +0 -30
- package/es/hooks/user.d.ts +0 -9
- package/es/imageCrop/component.d.ts +0 -0
- package/es/imageCrop/index.d.ts +0 -2
- package/es/imageCrop/script/api.d.ts +0 -1
- package/es/imageCrop/style/index.d.ts +0 -1
- package/es/importData/component.d.ts +0 -0
- package/es/importData/index.d.ts +0 -2
- package/es/importData/style/index.d.ts +0 -1
- package/es/index.d.ts +0 -30
- package/es/mediaFilter/component.d.ts +0 -0
- package/es/mediaFilter/components/DocFilter.d.ts +0 -0
- package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
- package/es/mediaFilter/components/FilterItem.d.ts +0 -0
- package/es/mediaFilter/components/MpAccountFilter.d.ts +0 -0
- package/es/mediaFilter/components/MpContentFilter.d.ts +0 -0
- package/es/mediaFilter/index.d.ts +0 -3
- package/es/mediaFilter/script/optionsGetter.d.ts +0 -26
- package/es/mediaFilter/script/types.d.ts +0 -16
- package/es/mediaFilter/style/index.d.ts +0 -1
- package/es/mediaView/component.d.ts +0 -0
- package/es/mediaView/index.d.ts +0 -2
- package/es/mediaView/style/index.d.ts +0 -1
- package/es/messageBox/component.d.ts +0 -0
- package/es/messageBox/index.d.ts +0 -2
- package/es/messageBox/list.d.ts +0 -0
- package/es/messageBox/script/api.d.ts +0 -6
- package/es/messageBox/style/index.d.ts +0 -1
- package/es/previousVersion/component.d.ts +0 -0
- package/es/previousVersion/index.d.ts +0 -2
- package/es/previousVersion/script/api.d.ts +0 -15
- package/es/previousVersion/script/tool.d.ts +0 -6
- package/es/previousVersion/style/index.d.ts +0 -1
- package/es/resourceGridList/component.d.ts +0 -0
- package/es/resourceGridList/components/FileTypeThumb/index.d.ts +0 -0
- package/es/resourceGridList/index.d.ts +0 -2
- package/es/resourceGridList/style/index.d.ts +0 -1
- package/es/resourceModal/component.d.ts +0 -0
- package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceFilter.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
- package/es/resourceModal/index.d.ts +0 -2
- package/es/resourceModal/script/api.d.ts +0 -25
- package/es/resourceModal/script/mediaSelection.d.ts +0 -14
- package/es/resourceModal/style/index.d.ts +0 -1
- package/es/selectAvatarList/component.d.ts +0 -0
- package/es/selectAvatarList/index.d.ts +0 -2
- package/es/selectAvatarList/style/index.d.ts +0 -1
- package/es/selectGategory/component.d.ts +0 -0
- package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
- package/es/selectGategory/index.d.ts +0 -2
- package/es/selectGategory/script/api.d.ts +0 -6
- package/es/selectGategory/style/index.d.ts +0 -1
- package/es/selectResourceModal/__demo__/module/DivWrapper.d.ts +0 -268
- package/es/selectResourceModal/__demo__/module/basic.d.ts +0 -299
- package/es/selectResourceModal/component.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListAi/index.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListCardWrapper.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListLocal/Upload.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListLocal/index.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListNormal/Filter.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListNormal/index.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListSystem/Filter.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListSystem/SubList.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListSystem/index.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListVideo/index.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListWraper.d.ts +0 -0
- package/es/selectResourceModal/components/ListSelected/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListTabs/index.d.ts +0 -0
- package/es/selectResourceModal/hooks/useResponsiveFilter.d.ts +0 -21
- package/es/selectResourceModal/index.d.ts +0 -2
- package/es/selectResourceModal/scripts/selectionApis.d.ts +0 -2
- package/es/selectResourceModal/scripts/useCompoLf.d.ts +0 -27
- package/es/selectResourceModal/scripts/useResourceSelect.d.ts +0 -7
- package/es/selectResourceModal/scripts/useTabFilter.d.ts +0 -22
- package/es/selectResourceModal/style/index.d.ts +0 -1
- package/es/selectThumb/component.d.ts +0 -0
- package/es/selectThumb/components/card.d.ts +0 -0
- package/es/selectThumb/components/colorPalette.d.ts +0 -0
- package/es/selectThumb/components/colorPicker.d.ts +0 -0
- package/es/selectThumb/index.d.ts +0 -2
- package/es/selectThumb/style/index.d.ts +0 -1
- package/es/thumbCard/component.d.ts +0 -0
- package/es/thumbCard/components/ThumbUploading/index.d.ts +0 -0
- package/es/thumbCard/index.d.ts +0 -2
- package/es/thumbCard/style/index.d.ts +0 -1
- package/es/typeIcons/component.d.ts +0 -0
- package/es/typeIcons/index.d.ts +0 -2
- package/es/typeIcons/style/index.d.ts +0 -1
- package/es/uploadBefore/component.d.ts +0 -0
- package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
- package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
- package/es/uploadBefore/index.d.ts +0 -2
- package/es/uploadBefore/script/api.d.ts +0 -16
- package/es/uploadBefore/script/fileTypeAdapter.d.ts +0 -39
- package/es/uploadBefore/script/fileUpload.d.ts +0 -7
- package/es/uploadBefore/script/uploadHooks.d.ts +0 -96
- package/es/uploadBefore/style/index.d.ts +0 -1
- package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
- package/es/uploadStep/component.d.ts +0 -0
- package/es/uploadStep/index.d.ts +0 -2
- package/es/uploadStep/script/fileTypeAdapter.d.ts +0 -20
- package/es/uploadStep/style/index.d.ts +0 -1
- package/es/userAvater/component.d.ts +0 -0
- package/es/userAvater/index.d.ts +0 -2
- package/es/userAvater/script/api.d.ts +0 -8
- package/es/userAvater/style/index.d.ts +0 -1
- package/es/userDirector/component.d.ts +0 -0
- package/es/userDirector/components/userTree.d.ts +0 -0
- package/es/userDirector/index.d.ts +0 -2
- package/es/userDirector/script/api.d.ts +0 -10
- package/es/userDirector/style/index.d.ts +0 -1
- package/es/utils/auth.d.ts +0 -5
- package/es/utils/date.d.ts +0 -3
- package/es/utils/doc.d.ts +0 -76
- package/es/utils/filter.d.ts +0 -21
- package/es/utils/index.d.ts +0 -17
- package/es/utils/request.d.ts +0 -9
- package/es/utils/resource.d.ts +0 -4
- package/es/utils/transcodeMedia.d.ts +0 -13
- package/es/utils/tusUpload.d.ts +0 -16
- package/es/utils/typeMap.d.ts +0 -185
- package/es/utils/uploadCatalog.d.ts +0 -1
- package/es/videoThumb/component.d.ts +0 -0
- package/es/videoThumb/index.d.ts +0 -2
- package/es/videoThumb/scripts/api.d.ts +0 -9
- package/es/videoThumb/scripts/useVideoThumbs.d.ts +0 -12
- package/es/videoThumb/style/index.d.ts +0 -1
package/es/hooks/useUpload.js
CHANGED
|
@@ -73,7 +73,7 @@ function useUpload(options) {
|
|
|
73
73
|
list.value = originList;
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
const uploadFile = (BASE_API, file, dir = 0, repoId, callback) => {
|
|
76
|
+
const uploadFile = (BASE_API, file, dir = 0, repoId, callback, upOptions) => {
|
|
77
77
|
const newFile = {
|
|
78
78
|
id: file.id || generateUUID(),
|
|
79
79
|
sig_id: file.sig_id || generateUUID(),
|
|
@@ -93,18 +93,24 @@ function useUpload(options) {
|
|
|
93
93
|
};
|
|
94
94
|
const uploading = upload.start(progress);
|
|
95
95
|
uploading.then(async (url) => {
|
|
96
|
+
var _a;
|
|
96
97
|
if (options == null ? void 0 : options.noAddMedia) {
|
|
97
98
|
recordTaskStatusChange({ ...newFile, status: 0, url }, 1);
|
|
98
99
|
callback && callback({ ...newFile, url }, "success");
|
|
99
100
|
return;
|
|
100
101
|
}
|
|
102
|
+
const params = {};
|
|
103
|
+
if ((_a = upOptions == null ? void 0 : upOptions.template) == null ? void 0 : _a.watermark) {
|
|
104
|
+
params.watermark = upOptions.template.watermark.default;
|
|
105
|
+
}
|
|
101
106
|
const { code, message } = await addMedia(BASE_API, {
|
|
102
107
|
url,
|
|
103
108
|
size: newFile.size,
|
|
104
109
|
directory_id: dir,
|
|
105
110
|
repository_id: repoId,
|
|
106
111
|
catalog: newFile.type,
|
|
107
|
-
alias: newFile.name
|
|
112
|
+
alias: newFile.name,
|
|
113
|
+
...params
|
|
108
114
|
});
|
|
109
115
|
if (code !== 0) {
|
|
110
116
|
console.log("\u{1F525}\u{1F525}\u{1F525}\u{1F525}\u{1F525} \u4E0A\u4F20\u5931\u8D25\uFF1A", newFile.name, code, message);
|
|
@@ -194,9 +200,16 @@ function getConfiguration(BASE_API, params) {
|
|
|
194
200
|
params
|
|
195
201
|
});
|
|
196
202
|
}
|
|
203
|
+
function getWatermarkTemplate(BASE_API) {
|
|
204
|
+
return request(BASE_API, {
|
|
205
|
+
url: `/poplar/v2/material/image/watermark`,
|
|
206
|
+
method: "get"
|
|
207
|
+
});
|
|
208
|
+
}
|
|
197
209
|
function useUploadConfig() {
|
|
198
210
|
const { get, set, remove } = useLocalstorage("LOCAL_UPLOAD_CONFIG");
|
|
199
211
|
const config = ref(get() || {});
|
|
212
|
+
const template = ref({});
|
|
200
213
|
async function initUploadConfig(BASE_API, domainId) {
|
|
201
214
|
if (config.value.size_config_enabled != null)
|
|
202
215
|
return;
|
|
@@ -245,11 +258,37 @@ function useUploadConfig() {
|
|
|
245
258
|
);
|
|
246
259
|
return false;
|
|
247
260
|
}
|
|
261
|
+
async function initTemplate(BASE_API) {
|
|
262
|
+
try {
|
|
263
|
+
const { code, message } = await getWatermarkTemplate(BASE_API);
|
|
264
|
+
if (code !== 0)
|
|
265
|
+
return;
|
|
266
|
+
if (message) {
|
|
267
|
+
let defaultWaterMark;
|
|
268
|
+
if (Array.isArray(message.images)) {
|
|
269
|
+
message.images.forEach((item) => {
|
|
270
|
+
if (message.default === item.id)
|
|
271
|
+
defaultWaterMark = item;
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
template.value = {
|
|
275
|
+
watermark: {
|
|
276
|
+
default: defaultWaterMark,
|
|
277
|
+
images: message.images
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
} catch (e) {
|
|
282
|
+
console.error(e);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
248
285
|
window.addEventListener("beforeunload", remove, false);
|
|
249
286
|
return {
|
|
250
287
|
config,
|
|
288
|
+
template,
|
|
251
289
|
checkFileSizeOutLimit,
|
|
252
|
-
initUploadConfig
|
|
290
|
+
initUploadConfig,
|
|
291
|
+
initTemplate
|
|
253
292
|
};
|
|
254
293
|
}
|
|
255
|
-
export { addMedia, useUpload as default, getMediaDetails, getSize, reTranscodeMedia, useUploadConfig };
|
|
294
|
+
export { addMedia, useUpload as default, getMediaDetails, getSize, getWatermarkTemplate, reTranscodeMedia, useUploadConfig };
|
|
@@ -419,7 +419,8 @@ const _sfc_main = defineComponent({
|
|
|
419
419
|
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
420
420
|
createTextVNode("\u53D6\u6D88")
|
|
421
421
|
])),
|
|
422
|
-
_: 1
|
|
422
|
+
_: 1,
|
|
423
|
+
__: [5]
|
|
423
424
|
}),
|
|
424
425
|
withDirectives(createVNode(unref(Button), {
|
|
425
426
|
size: "medium",
|
|
@@ -430,7 +431,8 @@ const _sfc_main = defineComponent({
|
|
|
430
431
|
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
431
432
|
createTextVNode("\u88C1\u526A")
|
|
432
433
|
])),
|
|
433
|
-
_: 1
|
|
434
|
+
_: 1,
|
|
435
|
+
__: [6]
|
|
434
436
|
}, 8, ["loading"]), [
|
|
435
437
|
[vShow, !croppering.value]
|
|
436
438
|
])
|
|
@@ -105,7 +105,8 @@ const _sfc_main = defineComponent({
|
|
|
105
105
|
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
106
106
|
createTextVNode("\u4E0B\u8F7D\u6A21\u677F")
|
|
107
107
|
])),
|
|
108
|
-
_: 1
|
|
108
|
+
_: 1,
|
|
109
|
+
__: [1]
|
|
109
110
|
}, 8, ["href"])
|
|
110
111
|
]),
|
|
111
112
|
_cache[6] || (_cache[6] = createElementVNode("h3", null, "\u4E0A\u4F20\u6587\u4EF6", -1)),
|
|
@@ -126,7 +127,8 @@ const _sfc_main = defineComponent({
|
|
|
126
127
|
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
127
128
|
createTextVNode(" \u4E0B\u8F7D\u5BFC\u5165\u7ED3\u679C ")
|
|
128
129
|
])),
|
|
129
|
-
_: 1
|
|
130
|
+
_: 1,
|
|
131
|
+
__: [3]
|
|
130
132
|
}, 8, ["href"])
|
|
131
133
|
])) : createCommentVNode("v-if", true),
|
|
132
134
|
importPercent.value === 1 && ((_b = importData.value) == null ? void 0 : _b.success_count) === void 0 ? (openBlock(), createElementBlock("p", _hoisted_5, " \u5BFC\u5165\u5931\u8D25\uFF0C" + toDisplayString(importErrorInfo.value), 1)) : createCommentVNode("v-if", true)
|
|
@@ -157,7 +159,8 @@ const _sfc_main = defineComponent({
|
|
|
157
159
|
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
158
160
|
createTextVNode("\u5F00\u59CB\u5BFC\u5165")
|
|
159
161
|
])),
|
|
160
|
-
_: 1
|
|
162
|
+
_: 1,
|
|
163
|
+
__: [4]
|
|
161
164
|
}, 8, ["loading"])) : createCommentVNode("v-if", true)
|
|
162
165
|
]),
|
|
163
166
|
_: 1
|
package/es/index.css
CHANGED
package/es/index.js
CHANGED
|
@@ -28,3 +28,4 @@ export { default as docPreview } from "./docPreview/index.js";
|
|
|
28
28
|
export { default as docHistory } from "./docHistory/index.js";
|
|
29
29
|
export { default as videoThumb } from "./videoThumb/index.js";
|
|
30
30
|
export { default as importData } from "./importData/index.js";
|
|
31
|
+
export { default as selectAddTo } from "./selectAddTo/index.js";
|
|
@@ -204,7 +204,8 @@ const _sfc_main = defineComponent({
|
|
|
204
204
|
createElementVNode("div", { class: "transcoding-progress" }, "\u8F6C\u7801\u4E2D\u2026")
|
|
205
205
|
], -1)
|
|
206
206
|
])),
|
|
207
|
-
_: 1
|
|
207
|
+
_: 1,
|
|
208
|
+
__: [1]
|
|
208
209
|
})) : createCommentVNode("v-if", true)
|
|
209
210
|
], 10, _hoisted_10)
|
|
210
211
|
]);
|
|
@@ -221,7 +222,8 @@ const _sfc_main = defineComponent({
|
|
|
221
222
|
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
222
223
|
createTextVNode("\u52A0\u8F7D\u66F4\u591A\u2026 ")
|
|
223
224
|
])),
|
|
224
|
-
_: 1
|
|
225
|
+
_: 1,
|
|
226
|
+
__: [2]
|
|
225
227
|
})) : (openBlock(), createElementBlock("div", _hoisted_13, "\u6CA1\u6709\u66F4\u591A\u4E86\u2026"))
|
|
226
228
|
])) : createCommentVNode("v-if", true),
|
|
227
229
|
!((_d = _ctx.fileList) == null ? void 0 : _d.length) && !((_e = _ctx.folderList) == null ? void 0 : _e.length) ? (openBlock(), createElementBlock("div", _hoisted_14, _cache[3] || (_cache[3] = [
|
|
@@ -177,7 +177,8 @@ const _sfc_main = defineComponent({
|
|
|
177
177
|
createElementVNode("div", { class: "transcoding-progress" }, "\u8F6C\u7801\u4E2D\u2026")
|
|
178
178
|
], -1)
|
|
179
179
|
])),
|
|
180
|
-
_: 1
|
|
180
|
+
_: 1,
|
|
181
|
+
__: [1]
|
|
181
182
|
})) : createCommentVNode("v-if", true)
|
|
182
183
|
], 2)
|
|
183
184
|
]);
|
|
@@ -194,7 +195,8 @@ const _sfc_main = defineComponent({
|
|
|
194
195
|
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
195
196
|
createTextVNode("\u52A0\u8F7D\u66F4\u591A\u2026 ")
|
|
196
197
|
])),
|
|
197
|
-
_: 1
|
|
198
|
+
_: 1,
|
|
199
|
+
__: [2]
|
|
198
200
|
}, 8, ["onClick"])) : (openBlock(), createElementBlock("div", _hoisted_13, "\u6CA1\u6709\u66F4\u591A\u4E86\u2026"))
|
|
199
201
|
])) : createCommentVNode("v-if", true),
|
|
200
202
|
!_ctx.fileList.length && !_ctx.folderList.length ? (openBlock(), createElementBlock("div", _hoisted_14, _cache[3] || (_cache[3] = [
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent, onMounted, resolveComponent, openBlock, createBlock, unref, withCtx, createTextVNode, toDisplayString, createVNode, isRef, createCommentVNode } from "vue";
|
|
2
|
+
import { Modal, Tabs, Button } from "@arco-design/web-vue";
|
|
3
|
+
import ViewAllColumn from "./components/ViewAllColumn/index.js";
|
|
4
|
+
import "../typeIcons/style/index.js";
|
|
5
|
+
import { useSelectAddToState } from "./script/useSelectAddToState.js";
|
|
6
|
+
import "./component.vue_vue_type_style_index_0_scoped_true_lang.js";
|
|
7
|
+
import _export_sfc from "../_virtual/plugin-vue_export-helper.js";
|
|
8
|
+
const _sfc_main = defineComponent({
|
|
9
|
+
...{ name: "selectAddTo" },
|
|
10
|
+
__name: "component",
|
|
11
|
+
props: {
|
|
12
|
+
BASE_API: {},
|
|
13
|
+
visible: { type: Boolean },
|
|
14
|
+
title: {},
|
|
15
|
+
outsideSelectData: {},
|
|
16
|
+
defaultSelectedData: {},
|
|
17
|
+
maxSelect: {},
|
|
18
|
+
typeData: {},
|
|
19
|
+
userStore: {},
|
|
20
|
+
compoFilter: { type: Boolean, default: false },
|
|
21
|
+
typeKey: {},
|
|
22
|
+
rid: {}
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:visible", "comfirm"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const emit = __emit;
|
|
27
|
+
const props = __props;
|
|
28
|
+
const {
|
|
29
|
+
visible,
|
|
30
|
+
title,
|
|
31
|
+
selectedData,
|
|
32
|
+
hasSelected,
|
|
33
|
+
typeDataController,
|
|
34
|
+
userInfo,
|
|
35
|
+
handleOk,
|
|
36
|
+
handleCancel,
|
|
37
|
+
comfirm,
|
|
38
|
+
HandleOpen,
|
|
39
|
+
HandleClose,
|
|
40
|
+
tabsChange,
|
|
41
|
+
selectedDataChangeHandle,
|
|
42
|
+
loadConfig,
|
|
43
|
+
getUserInfoHandle
|
|
44
|
+
} = useSelectAddToState(props, emit);
|
|
45
|
+
onMounted(() => {
|
|
46
|
+
if (props.userStore) {
|
|
47
|
+
userInfo.value = { BASE_API: props.BASE_API, ...props.userStore };
|
|
48
|
+
} else {
|
|
49
|
+
getUserInfoHandle();
|
|
50
|
+
}
|
|
51
|
+
loadConfig();
|
|
52
|
+
});
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
const _component_storeBox = resolveComponent("storeBox");
|
|
55
|
+
return openBlock(), createBlock(unref(Modal), {
|
|
56
|
+
footer: false,
|
|
57
|
+
"mask-closable": false,
|
|
58
|
+
visible: unref(visible),
|
|
59
|
+
"body-class": "add-content-modal-body",
|
|
60
|
+
"modal-class": "add-content-modal-wrapper",
|
|
61
|
+
"title-align": "start",
|
|
62
|
+
"unmount-on-close": "",
|
|
63
|
+
width: "1020px",
|
|
64
|
+
onCancel: unref(handleCancel),
|
|
65
|
+
onClose: unref(HandleClose),
|
|
66
|
+
onOk: unref(handleOk),
|
|
67
|
+
onOpen: unref(HandleOpen)
|
|
68
|
+
}, {
|
|
69
|
+
title: withCtx(() => [
|
|
70
|
+
createTextVNode(toDisplayString(unref(title)), 1)
|
|
71
|
+
]),
|
|
72
|
+
default: withCtx(() => [
|
|
73
|
+
createVNode(unref(Tabs), {
|
|
74
|
+
class: "content-tabs",
|
|
75
|
+
justify: "",
|
|
76
|
+
"lazy-load": "",
|
|
77
|
+
onTabClick: unref(tabsChange)
|
|
78
|
+
}, {
|
|
79
|
+
default: withCtx(() => {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
return [
|
|
82
|
+
_ctx.rid ? (openBlock(), createBlock(ViewAllColumn, {
|
|
83
|
+
key: 0,
|
|
84
|
+
rid: _ctx.rid,
|
|
85
|
+
"default-selected-data": unref(selectedData),
|
|
86
|
+
"max-select": _ctx.maxSelect,
|
|
87
|
+
"user-info": unref(userInfo),
|
|
88
|
+
"type-key": _ctx.typeKey || "",
|
|
89
|
+
"type-data": unref(typeDataController),
|
|
90
|
+
series: ((_a = unref(typeDataController)) == null ? void 0 : _a.docSeries) || "all",
|
|
91
|
+
banner: ((_b = unref(typeDataController)) == null ? void 0 : _b.docBanner) || "all",
|
|
92
|
+
onChange: unref(selectedDataChangeHandle)
|
|
93
|
+
}, {
|
|
94
|
+
store: withCtx(() => [
|
|
95
|
+
createVNode(_component_storeBox, {
|
|
96
|
+
selectData: unref(selectedData),
|
|
97
|
+
"onUpdate:selectData": _cache[0] || (_cache[0] = ($event) => isRef(selectedData) ? selectedData.value = $event : null)
|
|
98
|
+
}, null, 8, ["selectData"])
|
|
99
|
+
]),
|
|
100
|
+
options: withCtx(() => [
|
|
101
|
+
createVNode(unref(Button), {
|
|
102
|
+
disabled: !unref(hasSelected),
|
|
103
|
+
type: "primary",
|
|
104
|
+
onClick: unref(comfirm)
|
|
105
|
+
}, {
|
|
106
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
107
|
+
createTextVNode(" \u6DFB\u52A0 ")
|
|
108
|
+
])),
|
|
109
|
+
_: 1,
|
|
110
|
+
__: [1]
|
|
111
|
+
}, 8, ["disabled", "onClick"])
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
}, 8, ["rid", "default-selected-data", "max-select", "user-info", "type-key", "type-data", "series", "banner", "onChange"])) : createCommentVNode("v-if", true)
|
|
115
|
+
];
|
|
116
|
+
}),
|
|
117
|
+
_: 1
|
|
118
|
+
}, 8, ["onTabClick"])
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
}, 8, ["visible", "onCancel", "onClose", "onOk", "onOpen"]);
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
var _selectAddTo = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4e1a01f6"]]);
|
|
126
|
+
export { _selectAddTo as default };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createElementVNode, toDisplayString, createBlock, createCommentVNode } from "vue";
|
|
2
|
+
import { Space, Input, Select, Option, Tooltip } from "@arco-design/web-vue";
|
|
3
|
+
import { IconInfoCircle } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
const _hoisted_1 = { class: "media-filter-container" };
|
|
5
|
+
const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "5px" } };
|
|
6
|
+
const _hoisted_3 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "sort-button"
|
|
9
|
+
};
|
|
10
|
+
const _sfc_main = defineComponent({
|
|
11
|
+
...{ name: "MediaFilter" },
|
|
12
|
+
__name: "index",
|
|
13
|
+
props: {
|
|
14
|
+
groupId: {},
|
|
15
|
+
tree: { default: () => [] },
|
|
16
|
+
series: { default: "all" },
|
|
17
|
+
banner: { default: "all" },
|
|
18
|
+
height: {},
|
|
19
|
+
userInfo: {},
|
|
20
|
+
typeKey: {}
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:group_id", "search"],
|
|
23
|
+
setup(__props, { emit: __emit }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const column_id = ref("all");
|
|
26
|
+
const emit = __emit;
|
|
27
|
+
const filter = ref({
|
|
28
|
+
keywords: "",
|
|
29
|
+
type: "",
|
|
30
|
+
cover_type: "",
|
|
31
|
+
banner: "",
|
|
32
|
+
sort: -1,
|
|
33
|
+
order: "create_time",
|
|
34
|
+
wordState: "precision"
|
|
35
|
+
});
|
|
36
|
+
const wordStateOptions = [
|
|
37
|
+
{
|
|
38
|
+
value: "precision",
|
|
39
|
+
label: "\u7CBE\u51C6\u641C",
|
|
40
|
+
desc: "\u4F1A\u4EE5\u8F93\u5165\u7684\u5B8C\u6574\u5173\u952E\u8BCD\u201C\u6210\u957F\u201D\u8FDB\u884C\u641C\u7D22\uFF0C\u641C\u7D22\u7ED3\u679C\u5173\u8054\u6027\u66F4\u9AD8\uFF0C\u4F46\u641C\u7D22\u7ED3\u679C\u66F4\u5C11"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: "blur",
|
|
44
|
+
label: "\u6A21\u7CCA\u641C",
|
|
45
|
+
desc: "\u4F1A\u5C06\u8F93\u5165\u5185\u5BB9\u5206\u8BCD\uFF0C\u4F8B\u5982\u201C\u6210\u957F\u201D\u4F1A\u5206\u4E3A\u201C\u6210\u201D\u3001\u201C\u957F\u201D\u3001\u201C\u6210\u957F\u201D\uFF0C\u5185\u5BB9\u5305\u542B\u4E09\u4E2A\u8BCD\u4E2D\u4EFB\u610F\u4E00\u4E2A\u5747\u4F1A\u663E\u793A\u51FA\u6765\uFF0C\u641C\u7D22\u5185\u5BB9\u66F4\u52A0\u4E30\u5BCC"
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
const sortMethodOptions = computed(() => {
|
|
49
|
+
return [
|
|
50
|
+
{ value: "pub_time", label: "\u53D1\u5E03\u65F6\u95F4" },
|
|
51
|
+
{ value: "create_time", label: "\u521B\u5EFA\u65F6\u95F4" }
|
|
52
|
+
];
|
|
53
|
+
});
|
|
54
|
+
const checkout = (type) => {
|
|
55
|
+
filter.value.wordState = type;
|
|
56
|
+
};
|
|
57
|
+
const handleSearch = () => {
|
|
58
|
+
const params = JSON.parse(JSON.stringify(filter.value));
|
|
59
|
+
if (filter.value.wordState === "precision") {
|
|
60
|
+
params.precise_kw = params.keywords;
|
|
61
|
+
delete params.keywords;
|
|
62
|
+
}
|
|
63
|
+
delete params.wordState;
|
|
64
|
+
emit("search", params);
|
|
65
|
+
};
|
|
66
|
+
watch(
|
|
67
|
+
() => filter.value,
|
|
68
|
+
() => {
|
|
69
|
+
handleSearch();
|
|
70
|
+
},
|
|
71
|
+
{ deep: true }
|
|
72
|
+
);
|
|
73
|
+
watch(
|
|
74
|
+
() => props.groupId,
|
|
75
|
+
(val) => {
|
|
76
|
+
column_id.value = val;
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
watch(
|
|
80
|
+
() => props.banner,
|
|
81
|
+
(val) => {
|
|
82
|
+
filter.value.banner = val === "all" ? "" : val;
|
|
83
|
+
},
|
|
84
|
+
{ immediate: true }
|
|
85
|
+
);
|
|
86
|
+
watch(
|
|
87
|
+
() => column_id.value,
|
|
88
|
+
(val) => {
|
|
89
|
+
emit("update:group_id", val);
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
return (_ctx, _cache) => {
|
|
93
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
94
|
+
createVNode(unref(Space), { size: "small" }, {
|
|
95
|
+
default: withCtx(() => [
|
|
96
|
+
createVNode(unref(Input), {
|
|
97
|
+
modelValue: filter.value.keywords,
|
|
98
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.keywords = $event),
|
|
99
|
+
"allow-clear": "",
|
|
100
|
+
class: "filter-item keyword",
|
|
101
|
+
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9\u6807\u9898",
|
|
102
|
+
style: { width: "240px" },
|
|
103
|
+
onPressEnter: handleSearch
|
|
104
|
+
}, {
|
|
105
|
+
prepend: withCtx(() => [
|
|
106
|
+
createVNode(unref(Select), {
|
|
107
|
+
modelValue: filter.value.wordState,
|
|
108
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.wordState = $event),
|
|
109
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
110
|
+
onSelect: checkout
|
|
111
|
+
}, {
|
|
112
|
+
default: withCtx(() => [
|
|
113
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(wordStateOptions, (item, index) => {
|
|
114
|
+
return createVNode(unref(Option), {
|
|
115
|
+
key: index,
|
|
116
|
+
value: item.value,
|
|
117
|
+
label: item.label
|
|
118
|
+
}, {
|
|
119
|
+
default: withCtx(() => [
|
|
120
|
+
createElementVNode("div", _hoisted_2, [
|
|
121
|
+
createElementVNode("span", null, toDisplayString(item.label), 1),
|
|
122
|
+
createVNode(unref(Tooltip), {
|
|
123
|
+
effect: "dark",
|
|
124
|
+
content: item.desc,
|
|
125
|
+
position: "right"
|
|
126
|
+
}, {
|
|
127
|
+
default: withCtx(() => [
|
|
128
|
+
createVNode(unref(IconInfoCircle))
|
|
129
|
+
]),
|
|
130
|
+
_: 2
|
|
131
|
+
}, 1032, ["content"])
|
|
132
|
+
])
|
|
133
|
+
]),
|
|
134
|
+
_: 2
|
|
135
|
+
}, 1032, ["value", "label"]);
|
|
136
|
+
}), 64))
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
}, 8, ["modelValue"])
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
}, 8, ["modelValue"])
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
}),
|
|
146
|
+
_ctx.typeKey && _ctx.typeKey !== "ZQ" ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
147
|
+
createVNode(unref(Select), {
|
|
148
|
+
modelValue: filter.value.order,
|
|
149
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.order = $event),
|
|
150
|
+
class: "filter-item",
|
|
151
|
+
placeholder: "\u53D1\u5E03\u65F6\u95F4"
|
|
152
|
+
}, {
|
|
153
|
+
default: withCtx(() => [
|
|
154
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(sortMethodOptions.value, (item) => {
|
|
155
|
+
return openBlock(), createBlock(unref(Option), {
|
|
156
|
+
key: item.value,
|
|
157
|
+
label: item.label,
|
|
158
|
+
value: item.value
|
|
159
|
+
}, null, 8, ["label", "value"]);
|
|
160
|
+
}), 128))
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
}, 8, ["modelValue"])
|
|
164
|
+
])) : createCommentVNode("v-if", true)
|
|
165
|
+
]);
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, createCommentVNode, normalizeStyle, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { Popover, InputSearch, Scrollbar, Tree, Button } from "@arco-design/web-vue";
|
|
3
|
+
import { IconDragDotVertical, IconCaretRight } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import { getCategoryPath } from "../../../script/api.js";
|
|
5
|
+
const _hoisted_1 = { class: "column-selection-container" };
|
|
6
|
+
const _hoisted_2 = { class: "search-column" };
|
|
7
|
+
const _sfc_main = defineComponent({
|
|
8
|
+
...{ name: "columnTree" },
|
|
9
|
+
__name: "index",
|
|
10
|
+
props: {
|
|
11
|
+
column_id: {},
|
|
12
|
+
tree: {},
|
|
13
|
+
height: {},
|
|
14
|
+
userInfo: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:column_id"],
|
|
17
|
+
setup(__props, { emit: __emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const emit = __emit;
|
|
20
|
+
const treeOptions = {
|
|
21
|
+
title: "alias",
|
|
22
|
+
isLeaf: "leaf"
|
|
23
|
+
};
|
|
24
|
+
const selectAlias = ref("\u5168\u90E8\u5185\u5BB9");
|
|
25
|
+
const lastSearchKey = ref(window.localStorage.getItem("lastSearchKey") || "");
|
|
26
|
+
const searchKey = ref("");
|
|
27
|
+
const aTreeRef = ref();
|
|
28
|
+
const treeData = computed(() => {
|
|
29
|
+
if (!searchKey.value)
|
|
30
|
+
return props.tree;
|
|
31
|
+
return searchData(searchKey.value);
|
|
32
|
+
});
|
|
33
|
+
const searchData = (keyword) => {
|
|
34
|
+
const loop = (data) => {
|
|
35
|
+
const result = [];
|
|
36
|
+
data.forEach((item) => {
|
|
37
|
+
var _a;
|
|
38
|
+
if ((_a = item.alias) == null ? void 0 : _a.includes(keyword)) {
|
|
39
|
+
result.push({ ...item });
|
|
40
|
+
} else if (item.children) {
|
|
41
|
+
const filterData = loop(item.children);
|
|
42
|
+
if (filterData.length) {
|
|
43
|
+
result.push({
|
|
44
|
+
...item,
|
|
45
|
+
children: filterData
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
return loop(props.tree);
|
|
53
|
+
};
|
|
54
|
+
const clickLastItem = () => {
|
|
55
|
+
aTreeRef.value.selectNode(lastSearchKey.value, true);
|
|
56
|
+
};
|
|
57
|
+
watch(
|
|
58
|
+
() => props.column_id,
|
|
59
|
+
(val) => {
|
|
60
|
+
setSelectAlias(val);
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
const setSelectAlias = async (id) => {
|
|
64
|
+
if (id === "all") {
|
|
65
|
+
selectAlias.value = "\u5168\u90E8\u5185\u5BB9";
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const { code, message } = await getCategoryPath(props.userInfo.BASE_API, {
|
|
69
|
+
repo: props.userInfo.repository_id,
|
|
70
|
+
category: id
|
|
71
|
+
});
|
|
72
|
+
if (code === 0) {
|
|
73
|
+
const pathArr = [];
|
|
74
|
+
for (const i of message) {
|
|
75
|
+
pathArr.push(i.category_alias);
|
|
76
|
+
}
|
|
77
|
+
selectAlias.value = pathArr.join("/");
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const AddColumnSelected = (selectedKeys, data) => {
|
|
81
|
+
lastSearchKey.value = selectedKeys[0];
|
|
82
|
+
window.localStorage.setItem("lastSearchKey", lastSearchKey.value);
|
|
83
|
+
emit("update:column_id", data.node.id);
|
|
84
|
+
};
|
|
85
|
+
return (_ctx, _cache) => {
|
|
86
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
87
|
+
createVNode(unref(Popover), {
|
|
88
|
+
"content-style": { minWidth: "120px" },
|
|
89
|
+
"content-class": "column-selection-popover-content",
|
|
90
|
+
position: "bottom",
|
|
91
|
+
trigger: "click"
|
|
92
|
+
}, {
|
|
93
|
+
content: withCtx(() => [
|
|
94
|
+
createElementVNode("div", _hoisted_2, [
|
|
95
|
+
createVNode(unref(InputSearch), {
|
|
96
|
+
modelValue: searchKey.value,
|
|
97
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchKey.value = $event),
|
|
98
|
+
placeholder: "\u8BF7\u8F93\u5165\u680F\u76EE\u540D\u79F0"
|
|
99
|
+
}, null, 8, ["modelValue"])
|
|
100
|
+
]),
|
|
101
|
+
lastSearchKey.value ? (openBlock(), createElementBlock("div", {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "last-search-key",
|
|
104
|
+
onClick: clickLastItem
|
|
105
|
+
}, "\u4E0A\u4E00\u6B21\u9009\u62E9 ")) : createCommentVNode("v-if", true),
|
|
106
|
+
createElementVNode("div", {
|
|
107
|
+
style: normalizeStyle({ minHeight: props.height + "px" }),
|
|
108
|
+
class: "column-selection-main"
|
|
109
|
+
}, [
|
|
110
|
+
createElementVNode("div", {
|
|
111
|
+
style: normalizeStyle({ height: props.height + "px" }),
|
|
112
|
+
class: "column-v"
|
|
113
|
+
}, [
|
|
114
|
+
createVNode(unref(Scrollbar), {
|
|
115
|
+
"outer-class": "column-outer-scrollbar",
|
|
116
|
+
style: { "height": "100%", "overflow": "auto" }
|
|
117
|
+
}, {
|
|
118
|
+
default: withCtx(() => [
|
|
119
|
+
createVNode(unref(Tree), {
|
|
120
|
+
ref_key: "aTreeRef",
|
|
121
|
+
ref: aTreeRef,
|
|
122
|
+
data: treeData.value,
|
|
123
|
+
"default-expand-all": false,
|
|
124
|
+
"field-names": treeOptions,
|
|
125
|
+
"block-node": "",
|
|
126
|
+
"check-strictly": "",
|
|
127
|
+
onSelect: AddColumnSelected
|
|
128
|
+
}, null, 8, ["data"])
|
|
129
|
+
]),
|
|
130
|
+
_: 1
|
|
131
|
+
})
|
|
132
|
+
], 4)
|
|
133
|
+
], 4)
|
|
134
|
+
]),
|
|
135
|
+
default: withCtx(() => [
|
|
136
|
+
createVNode(unref(Button), { class: "button" }, {
|
|
137
|
+
default: withCtx(() => [
|
|
138
|
+
createVNode(unref(IconDragDotVertical)),
|
|
139
|
+
createTextVNode(" " + toDisplayString(selectAlias.value) + " ", 1),
|
|
140
|
+
createVNode(unref(IconCaretRight))
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
})
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
})
|
|
147
|
+
]);
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
export { _sfc_main as default };
|