@cmstops/pro-compo 3.9.1-rc.1 → 3.9.1-rc.11
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/README.md +103 -76
- package/dist/index.css +49 -4
- package/dist/index.min.css +1 -1
- package/es/baseFilter/component.js +71 -14
- package/es/config.js +1 -1
- 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/docHistory/component.js +41 -12
- 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/hooks/useAttachement.js +2 -9
- package/es/hooks/usePopper.d.ts +1 -1
- package/es/hooks/usePopper.js +3 -3
- package/es/hooks/useUpload.d.ts +50 -2
- package/es/hooks/useUpload.js +43 -4
- package/es/index.css +49 -4
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/selectAddTo/component.d.ts +0 -0
- package/es/selectAddTo/component.js +125 -0
- package/es/selectAddTo/component.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/selectAddTo/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
- package/es/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +169 -0
- package/es/selectAddTo/components/ViewAllColumn/columnTree/index.d.ts +0 -0
- package/es/selectAddTo/components/ViewAllColumn/index.d.ts +0 -0
- package/es/selectAddTo/components/ViewAllColumn/index.js +209 -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.d.ts +144 -0
- package/es/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +193 -0
- package/es/selectAddTo/components/ViewAllColumn/types/index.d.ts +59 -0
- package/es/selectAddTo/index.d.ts +2 -0
- package/es/selectAddTo/index.js +7 -0
- package/es/selectAddTo/script/api.d.ts +18 -0
- package/es/selectAddTo/script/api.js +30 -0
- package/es/selectAddTo/script/index.d.ts +2 -0
- package/es/selectAddTo/script/useSelectAddToState.d.ts +21 -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.d.ts +1 -0
- package/es/selectAddTo/style/index.js +1 -0
- package/es/selectAddTo/style/index.less +3 -0
- package/es/selectAddTo/types/index.d.ts +42 -0
- package/es/selectResourceModal/__demo__/module/DivWrapper.d.ts +268 -0
- package/es/selectResourceModal/__demo__/module/basic.d.ts +299 -0
- package/es/selectResourceModal/components/List/ListLocal/index.js +8 -3
- package/es/selectResourceModal/components/List/ListNormal/Filter.js +201 -89
- package/es/selectResourceModal/components/List/ListNormal/index.js +23 -7
- package/es/selectResourceModal/hooks/useResponsiveFilter.d.ts +21 -0
- package/es/selectResourceModal/hooks/useResponsiveFilter.js +142 -0
- package/es/selectResourceModal/scripts/useCompoLf.js +1 -1
- package/es/selectResourceModal/style/index.css +45 -4
- package/es/selectResourceModal/style/index.less +14 -0
- package/es/selectResourceModal/style/list.less +40 -4
- package/es/selectThumb/component.js +16 -27
- package/es/style.css +57 -0
- package/es/typeIcons/component.js +1 -1
- package/es/utils/index.js +6 -6
- package/lib/baseFilter/component.js +69 -12
- package/lib/config.js +1 -1
- 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/docHistory/component.js +39 -10
- 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/hooks/useAttachement.js +2 -9
- package/lib/hooks/usePopper.js +3 -3
- package/lib/hooks/useUpload.js +43 -3
- package/lib/index.css +49 -4
- package/lib/index.js +2 -0
- package/lib/selectAddTo/component.js +126 -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/index.js +210 -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 +8 -0
- package/lib/selectAddTo/script/api.js +35 -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/components/List/ListLocal/index.js +6 -1
- package/lib/selectResourceModal/components/List/ListNormal/Filter.js +198 -86
- package/lib/selectResourceModal/components/List/ListNormal/index.js +22 -6
- package/lib/selectResourceModal/hooks/useResponsiveFilter.js +144 -0
- package/lib/selectResourceModal/scripts/useCompoLf.js +1 -1
- package/lib/selectResourceModal/style/index.css +45 -4
- package/lib/selectResourceModal/style/index.less +14 -0
- package/lib/selectResourceModal/style/list.less +40 -4
- package/lib/selectThumb/component.js +16 -27
- package/lib/typeIcons/component.js +1 -1
- package/lib/utils/index.js +6 -6
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
var request = require("../../utils/request.js");
|
|
4
|
+
function getCategoryMediaNew(BASE_API, params) {
|
|
5
|
+
return request(BASE_API, {
|
|
6
|
+
url: `/poplar/v3/s/documents`,
|
|
7
|
+
method: "get",
|
|
8
|
+
params
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function getPoliticals(BASE_API, params) {
|
|
12
|
+
return request(BASE_API, {
|
|
13
|
+
url: "/poplar/v2/politics/list",
|
|
14
|
+
method: "get",
|
|
15
|
+
params
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function getMlists(BASE_API, params) {
|
|
19
|
+
return request(BASE_API, {
|
|
20
|
+
url: `/poplar/v2/mlists`,
|
|
21
|
+
method: "get",
|
|
22
|
+
params
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function getConfigurationNew(BASE_API, params) {
|
|
26
|
+
return request(BASE_API, {
|
|
27
|
+
url: "/poplar/v2/configuration",
|
|
28
|
+
method: "get",
|
|
29
|
+
params
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.getCategoryMediaNew = getCategoryMediaNew;
|
|
33
|
+
exports.getConfigurationNew = getConfigurationNew;
|
|
34
|
+
exports.getMlists = getMlists;
|
|
35
|
+
exports.getPoliticals = getPoliticals;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
var vue = require("vue");
|
|
4
|
+
var api = require("./api.js");
|
|
5
|
+
var config = require("../../config.js");
|
|
6
|
+
var user = require("../../hooks/user.js");
|
|
7
|
+
const useSelectAddToState = (props, emit) => {
|
|
8
|
+
const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
|
|
9
|
+
const visible = vue.computed({
|
|
10
|
+
get() {
|
|
11
|
+
return props.visible;
|
|
12
|
+
},
|
|
13
|
+
set(value) {
|
|
14
|
+
setVisible(value);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const selectedData = vue.ref([]);
|
|
18
|
+
const configData = vue.ref({});
|
|
19
|
+
const { userInfo, getUserInfoHandle } = user["default"](BASE_API);
|
|
20
|
+
const title = vue.computed(() => {
|
|
21
|
+
const titleMap = {
|
|
22
|
+
"series:video_album": "\u6DFB\u52A0\u81F3\u89C6\u9891\u5408\u96C6",
|
|
23
|
+
"series:special_v3": "\u6DFB\u52A0\u81F3\u4E13\u9898",
|
|
24
|
+
"series:audio_album": "\u6DFB\u52A0\u81F3\u97F3\u9891\u5408\u96C6",
|
|
25
|
+
"series:article_album": "\u6DFB\u52A0\u81F3\u653F\u60C5\u4EBA\u7269\u76F8\u5173\u62A5\u9053"
|
|
26
|
+
};
|
|
27
|
+
return titleMap[props.typeKey || ""] || "";
|
|
28
|
+
});
|
|
29
|
+
const hasSelected = vue.computed(() => selectedData.value.length > 0);
|
|
30
|
+
const typeDataController = vue.computed(() => {
|
|
31
|
+
if (!props.typeData)
|
|
32
|
+
return {};
|
|
33
|
+
try {
|
|
34
|
+
return JSON.parse(JSON.stringify(props.typeData));
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.warn("Failed to parse typeData:", e);
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const setVisible = (bool) => {
|
|
41
|
+
emit("update:visible", bool);
|
|
42
|
+
};
|
|
43
|
+
const selectedDataChangeHandle = (data) => {
|
|
44
|
+
selectedData.value = data;
|
|
45
|
+
};
|
|
46
|
+
const handleOk = () => {
|
|
47
|
+
setVisible(false);
|
|
48
|
+
};
|
|
49
|
+
const handleCancel = () => {
|
|
50
|
+
setVisible(false);
|
|
51
|
+
};
|
|
52
|
+
const comfirm = () => {
|
|
53
|
+
emit("comfirm", JSON.parse(JSON.stringify(selectedData.value)));
|
|
54
|
+
};
|
|
55
|
+
const HandleOpen = () => {
|
|
56
|
+
selectedData.value = props.defaultSelectedData || [];
|
|
57
|
+
};
|
|
58
|
+
const HandleClose = () => {
|
|
59
|
+
selectedData.value = [];
|
|
60
|
+
};
|
|
61
|
+
const tabsChange = () => {
|
|
62
|
+
selectedData.value = [];
|
|
63
|
+
};
|
|
64
|
+
const loadConfig = async () => {
|
|
65
|
+
var _a;
|
|
66
|
+
try {
|
|
67
|
+
const res = await api.getConfigurationNew(BASE_API, {
|
|
68
|
+
module: "third_party_services"
|
|
69
|
+
});
|
|
70
|
+
if (res.code === 0 && ((_a = res.message) == null ? void 0 : _a.length)) {
|
|
71
|
+
res.message.forEach((item) => {
|
|
72
|
+
configData.value[item.key] = JSON.parse(item.value);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error("Failed to load configuration:", error);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const checkServiceEnable = (key) => {
|
|
80
|
+
const data = configData.value[key];
|
|
81
|
+
if (!data)
|
|
82
|
+
return false;
|
|
83
|
+
if (!data.enable && typeof data.enable !== "undefined")
|
|
84
|
+
return false;
|
|
85
|
+
return true;
|
|
86
|
+
};
|
|
87
|
+
return {
|
|
88
|
+
visible,
|
|
89
|
+
title,
|
|
90
|
+
selectedData,
|
|
91
|
+
hasSelected,
|
|
92
|
+
typeDataController,
|
|
93
|
+
userInfo,
|
|
94
|
+
configData,
|
|
95
|
+
setVisible,
|
|
96
|
+
selectedDataChangeHandle,
|
|
97
|
+
handleOk,
|
|
98
|
+
handleCancel,
|
|
99
|
+
comfirm,
|
|
100
|
+
HandleOpen,
|
|
101
|
+
HandleClose,
|
|
102
|
+
tabsChange,
|
|
103
|
+
loadConfig,
|
|
104
|
+
checkServiceEnable,
|
|
105
|
+
getUserInfoHandle
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
exports.useSelectAddToState = useSelectAddToState;
|
|
@@ -23,6 +23,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
23
23
|
var _a;
|
|
24
24
|
return (_a = userInfo == null ? void 0 : userInfo.value) == null ? void 0 : _a.repository_id;
|
|
25
25
|
});
|
|
26
|
+
const { template, initTemplate } = useUpload.useUploadConfig();
|
|
26
27
|
const { list, uploadFile, reTranscode, transcodingFile, removeRecord } = useUpload["default"]();
|
|
27
28
|
function handleChange(file) {
|
|
28
29
|
if (!baseAPI || !repoId.value)
|
|
@@ -32,7 +33,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
32
33
|
file.file,
|
|
33
34
|
0,
|
|
34
35
|
repoId.value,
|
|
35
|
-
(media) => transcodingFile(baseAPI, media, repoId.value)
|
|
36
|
+
(media) => transcodingFile(baseAPI, media, repoId.value),
|
|
37
|
+
{ template: template.value }
|
|
36
38
|
);
|
|
37
39
|
}
|
|
38
40
|
async function handleOptions(e) {
|
|
@@ -55,6 +57,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
55
57
|
removeRecord(e.item);
|
|
56
58
|
}
|
|
57
59
|
}
|
|
60
|
+
vue.onMounted(() => {
|
|
61
|
+
initTemplate(baseAPI);
|
|
62
|
+
});
|
|
58
63
|
return (_ctx, _cache) => {
|
|
59
64
|
return vue.openBlock(), vue.createBlock(ListWraper, null, {
|
|
60
65
|
"footer-extra": vue.withCtx(() => [
|
|
@@ -7,38 +7,66 @@ var useAttachement = require("../../../../hooks/useAttachement.js");
|
|
|
7
7
|
var typeMap = require("../../../../utils/typeMap.js");
|
|
8
8
|
var selectionApis = require("../../../scripts/selectionApis.js");
|
|
9
9
|
var resource = require("../../../../utils/resource.js");
|
|
10
|
+
var useResponsiveFilter = require("../../../hooks/useResponsiveFilter.js");
|
|
10
11
|
const _hoisted_1 = { class: "list-filter-wrapper" };
|
|
11
12
|
const _hoisted_2 = { class: "list-filter" };
|
|
12
|
-
const _hoisted_3 = { class: "
|
|
13
|
-
const _hoisted_4 = {
|
|
13
|
+
const _hoisted_3 = { class: "more-btn" };
|
|
14
|
+
const _hoisted_4 = { class: "right-prefix" };
|
|
14
15
|
const _hoisted_5 = {
|
|
15
16
|
class: "filter-item",
|
|
16
17
|
style: { "width": "200px" }
|
|
17
18
|
};
|
|
18
|
-
const _hoisted_6 = {
|
|
19
|
+
const _hoisted_6 = {
|
|
20
|
+
class: "filter-item",
|
|
21
|
+
style: { "width": "180px" }
|
|
22
|
+
};
|
|
19
23
|
const _hoisted_7 = {
|
|
24
|
+
class: "filter-item",
|
|
25
|
+
style: { "width": "170px" }
|
|
26
|
+
};
|
|
27
|
+
const _hoisted_8 = {
|
|
28
|
+
class: "filter-item",
|
|
29
|
+
style: { "width": "240px" }
|
|
30
|
+
};
|
|
31
|
+
const _hoisted_9 = {
|
|
32
|
+
class: "filter-item",
|
|
33
|
+
style: { "width": "240px" }
|
|
34
|
+
};
|
|
35
|
+
const _hoisted_10 = {
|
|
20
36
|
key: 0,
|
|
21
37
|
class: "filter-item"
|
|
22
38
|
};
|
|
23
|
-
const
|
|
24
|
-
const
|
|
39
|
+
const _hoisted_11 = { class: "filter-extra" };
|
|
40
|
+
const _hoisted_12 = { class: "filter-item" };
|
|
41
|
+
const _hoisted_13 = {
|
|
25
42
|
key: 0,
|
|
26
43
|
class: "list-filter-tags"
|
|
27
44
|
};
|
|
28
|
-
const
|
|
45
|
+
const _hoisted_14 = ["onClick"];
|
|
29
46
|
const _sfc_main = vue.defineComponent({
|
|
30
47
|
__name: "Filter",
|
|
31
48
|
props: {
|
|
49
|
+
smallScreen: { type: Boolean },
|
|
32
50
|
disableUploadBy: { type: Boolean }
|
|
33
51
|
},
|
|
34
52
|
emits: ["upload", "change"],
|
|
35
53
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
54
|
+
var _a, _b, _c;
|
|
36
55
|
const props = __props;
|
|
37
56
|
const emits = __emit;
|
|
38
57
|
const userInfo = vue.inject("userInfo");
|
|
39
58
|
const baseAPI = vue.inject("baseAPI");
|
|
40
59
|
const filterOptions = vue.inject("filterOptions");
|
|
41
60
|
const domainId = vue.computed(() => userInfo == null ? void 0 : userInfo.value.domain_id);
|
|
61
|
+
const filterItemsRef = vue.ref();
|
|
62
|
+
const {
|
|
63
|
+
moreBtnRef,
|
|
64
|
+
popperPanelRef,
|
|
65
|
+
hiddenElementList,
|
|
66
|
+
visible,
|
|
67
|
+
show,
|
|
68
|
+
hide
|
|
69
|
+
} = useResponsiveFilter.useResponsiveFilter(filterItemsRef);
|
|
42
70
|
const { options, loading, load, loadMore, handleSearch } = useSelection({
|
|
43
71
|
labelStr: "alias",
|
|
44
72
|
valueStr: "id",
|
|
@@ -58,7 +86,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
58
86
|
});
|
|
59
87
|
const resourceSource = typeMap.RESOURCE_SOURCE_OPTIONS;
|
|
60
88
|
const resourceCatalog = typeMap.RESOURCE_CATALOG_OPTIONS;
|
|
61
|
-
const { tree
|
|
89
|
+
const { tree } = useAttachement.useDirectory({
|
|
62
90
|
BASE_API: baseAPI
|
|
63
91
|
});
|
|
64
92
|
const originFilter = {
|
|
@@ -72,7 +100,17 @@ const _sfc_main = vue.defineComponent({
|
|
|
72
100
|
sf: "",
|
|
73
101
|
directory_id: void 0
|
|
74
102
|
};
|
|
75
|
-
|
|
103
|
+
if ((_a = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _a.mediaTypeStrict) {
|
|
104
|
+
originFilter.catalog = filterOptions.value.mediaType.split(",");
|
|
105
|
+
}
|
|
106
|
+
const filter = vue.ref(
|
|
107
|
+
JSON.parse(
|
|
108
|
+
JSON.stringify({
|
|
109
|
+
...originFilter,
|
|
110
|
+
catalog: ((_c = (_b = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _b.mediaType) == null ? void 0 : _c.split(",")) || []
|
|
111
|
+
})
|
|
112
|
+
)
|
|
113
|
+
);
|
|
76
114
|
const handleReset = () => {
|
|
77
115
|
filter.value = JSON.parse(JSON.stringify(originFilter));
|
|
78
116
|
};
|
|
@@ -117,82 +155,114 @@ const _sfc_main = vue.defineComponent({
|
|
|
117
155
|
filter.value.keyword = val;
|
|
118
156
|
filter.value.precise_keyword = "";
|
|
119
157
|
}
|
|
158
|
+
filter.value.sf = "";
|
|
120
159
|
}
|
|
121
160
|
});
|
|
122
|
-
vue.watch(
|
|
123
|
-
() => searchType.value,
|
|
124
|
-
() => {
|
|
125
|
-
searchInput.value = filter.value.keyword || filter.value.precise_keyword;
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
161
|
const isEmpty = vue.computed(() => {
|
|
129
|
-
return Object.keys(
|
|
162
|
+
return Object.keys(originFilter).every((key) => {
|
|
163
|
+
if (key === "catalog") {
|
|
164
|
+
const currentCatalog = filter.value[key] || [];
|
|
165
|
+
const originCatalog = originFilter[key] || [];
|
|
166
|
+
return currentCatalog.length === originCatalog.length && currentCatalog.every((v) => originCatalog.includes(v));
|
|
167
|
+
}
|
|
130
168
|
return filter.value[key] === originFilter[key];
|
|
131
169
|
});
|
|
132
170
|
});
|
|
133
171
|
vue.watch(
|
|
134
172
|
() => filter.value,
|
|
135
|
-
() => {
|
|
136
|
-
const result = { ...
|
|
173
|
+
(val) => {
|
|
174
|
+
const result = { ...val };
|
|
137
175
|
Object.keys(result).forEach((key) => {
|
|
138
176
|
if (props.disableUploadBy && key === "upload_by")
|
|
139
177
|
delete result[key];
|
|
140
|
-
if (
|
|
141
|
-
|
|
178
|
+
if (result[key] === "" || result[key] === null || result[key] === void 0) {
|
|
179
|
+
if (key !== "catalog") {
|
|
180
|
+
delete result[key];
|
|
181
|
+
}
|
|
182
|
+
}
|
|
142
183
|
});
|
|
143
|
-
if (
|
|
144
|
-
result.catalog
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
{ deep: true, immediate: true }
|
|
150
|
-
);
|
|
151
|
-
vue.watch(
|
|
152
|
-
() => filterOptions == null ? void 0 : filterOptions.value,
|
|
153
|
-
() => {
|
|
154
|
-
var _a;
|
|
155
|
-
if ((_a = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _a.mediaType) {
|
|
156
|
-
filter.value.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType.split(",");
|
|
157
|
-
if (filterOptions == null ? void 0 : filterOptions.value.mediaTypeStrict) {
|
|
158
|
-
originFilter.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType.split(",");
|
|
184
|
+
if (result.catalog && Array.isArray(result.catalog)) {
|
|
185
|
+
if (result.catalog.length > 0) {
|
|
186
|
+
result.catalog = result.catalog.join(",");
|
|
187
|
+
} else {
|
|
188
|
+
delete result.catalog;
|
|
159
189
|
}
|
|
160
190
|
}
|
|
191
|
+
emits("change", result);
|
|
161
192
|
},
|
|
162
|
-
{
|
|
193
|
+
{ deep: true, immediate: true }
|
|
163
194
|
);
|
|
164
195
|
vue.onMounted(() => {
|
|
165
196
|
load();
|
|
166
197
|
});
|
|
167
198
|
__expose({
|
|
168
|
-
|
|
199
|
+
filter,
|
|
200
|
+
handleReset
|
|
169
201
|
});
|
|
170
202
|
return (_ctx, _cache) => {
|
|
171
|
-
var
|
|
203
|
+
var _a2;
|
|
172
204
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
205
|
+
vue.createCommentVNode(" Use filterItemsRef's parentElement as the container for boundary checks "),
|
|
173
206
|
vue.createElementVNode("div", _hoisted_2, [
|
|
174
|
-
vue.
|
|
207
|
+
vue.createCommentVNode(" Filter Items Container "),
|
|
208
|
+
vue.createElementVNode("div", {
|
|
209
|
+
id: "resource-filter-pannel",
|
|
210
|
+
ref_key: "filterItemsRef",
|
|
211
|
+
ref: filterItemsRef,
|
|
212
|
+
class: "filter-list"
|
|
213
|
+
}, [
|
|
214
|
+
vue.createCommentVNode(" More Filters Button and Popper Panel "),
|
|
215
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
216
|
+
vue.createElementVNode("div", {
|
|
217
|
+
ref_key: "moreBtnRef",
|
|
218
|
+
ref: moreBtnRef
|
|
219
|
+
}, [
|
|
220
|
+
vue.withDirectives(vue.createVNode(vue.unref(webVue.Button), {
|
|
221
|
+
style: { marginRight: "10px" },
|
|
222
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => vue.unref(visible) ? vue.unref(hide)() : vue.unref(show)(), ["stop"]))
|
|
223
|
+
}, {
|
|
224
|
+
default: vue.withCtx(() => [
|
|
225
|
+
vue.createElementVNode("span", _hoisted_4, [
|
|
226
|
+
_cache[11] || (_cache[11] = vue.createTextVNode(" \u66F4\u591A ")),
|
|
227
|
+
vue.createVNode(vue.unref(icon.IconCaretDown))
|
|
228
|
+
])
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
}, 512), [
|
|
232
|
+
[vue.vShow, vue.unref(hiddenElementList).length]
|
|
233
|
+
])
|
|
234
|
+
], 512),
|
|
235
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
236
|
+
ref_key: "popperPanelRef",
|
|
237
|
+
ref: popperPanelRef,
|
|
238
|
+
class: "filter-pannel",
|
|
239
|
+
onClick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
240
|
+
}, ["stop"]))
|
|
241
|
+
}, null, 512), [
|
|
242
|
+
[vue.vShow, vue.unref(visible)]
|
|
243
|
+
])
|
|
244
|
+
]),
|
|
175
245
|
vue.createCommentVNode(" \u5173\u952E\u8BCD "),
|
|
176
|
-
vue.createElementVNode("div",
|
|
246
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
177
247
|
vue.createVNode(vue.unref(webVue.Input), {
|
|
178
248
|
modelValue: searchInput.value,
|
|
179
|
-
"onUpdate:modelValue": _cache[
|
|
249
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => searchInput.value = $event),
|
|
180
250
|
"allow-clear": "",
|
|
181
251
|
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"
|
|
182
252
|
}, {
|
|
183
253
|
prepend: vue.withCtx(() => [
|
|
184
254
|
vue.createVNode(vue.unref(webVue.Dropdown), {
|
|
185
|
-
onSelect: _cache[
|
|
255
|
+
onSelect: _cache[2] || (_cache[2] = (e) => searchType.value = e)
|
|
186
256
|
}, {
|
|
187
257
|
content: vue.withCtx(() => [
|
|
188
258
|
vue.createVNode(vue.unref(webVue.Doption), { value: 0 }, {
|
|
189
|
-
default: vue.withCtx(() => _cache[
|
|
259
|
+
default: vue.withCtx(() => _cache[12] || (_cache[12] = [
|
|
190
260
|
vue.createTextVNode("\u7CBE\u51C6\u641C")
|
|
191
261
|
])),
|
|
192
262
|
_: 1
|
|
193
263
|
}),
|
|
194
264
|
vue.createVNode(vue.unref(webVue.Doption), { value: 1 }, {
|
|
195
|
-
default: vue.withCtx(() => _cache[
|
|
265
|
+
default: vue.withCtx(() => _cache[13] || (_cache[13] = [
|
|
196
266
|
vue.createTextVNode("\u6A21\u7CCA\u641C")
|
|
197
267
|
])),
|
|
198
268
|
_: 1
|
|
@@ -212,15 +282,39 @@ const _sfc_main = vue.defineComponent({
|
|
|
212
282
|
_: 1
|
|
213
283
|
}, 8, ["modelValue"])
|
|
214
284
|
]),
|
|
285
|
+
vue.createCommentVNode(" \u76EE\u5F55 "),
|
|
286
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
287
|
+
vue.createVNode(vue.unref(webVue.TreeSelect), {
|
|
288
|
+
modelValue: filter.value.directory_id,
|
|
289
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.directory_id = $event),
|
|
290
|
+
data: vue.unref(tree),
|
|
291
|
+
"popup-container": "#resource-filter-pannel",
|
|
292
|
+
placeholder: "\u8BF7\u9009\u62E9\u76EE\u5F55",
|
|
293
|
+
"field-names": {
|
|
294
|
+
title: "alias",
|
|
295
|
+
key: "id"
|
|
296
|
+
},
|
|
297
|
+
"allow-clear": "",
|
|
298
|
+
"allow-search": "",
|
|
299
|
+
"filter-tree-node": (searchValue, nodeData) => {
|
|
300
|
+
console.log(nodeData);
|
|
301
|
+
if (!nodeData.alias)
|
|
302
|
+
return false;
|
|
303
|
+
return nodeData.alias.toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
|
304
|
+
}
|
|
305
|
+
}, null, 8, ["modelValue", "data", "filter-tree-node"])
|
|
306
|
+
]),
|
|
215
307
|
vue.createCommentVNode(" \u7D20\u6750\u7C7B\u578B "),
|
|
216
|
-
vue.createElementVNode("div",
|
|
308
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
217
309
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
218
310
|
modelValue: filter.value.catalog,
|
|
219
|
-
"onUpdate:modelValue": _cache[
|
|
220
|
-
disabled: (
|
|
311
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.catalog = $event),
|
|
312
|
+
disabled: (_a2 = vue.unref(filterOptions)) == null ? void 0 : _a2.mediaTypeStrict,
|
|
313
|
+
"popup-container": "#resource-filter-pannel",
|
|
221
314
|
"allow-clear": "",
|
|
222
315
|
placeholder: "\u7C7B\u578B",
|
|
223
|
-
multiple: ""
|
|
316
|
+
multiple: "",
|
|
317
|
+
"max-tag-count": 1
|
|
224
318
|
}, {
|
|
225
319
|
default: vue.withCtx(() => [
|
|
226
320
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(resourceCatalog), (item) => {
|
|
@@ -234,30 +328,23 @@ const _sfc_main = vue.defineComponent({
|
|
|
234
328
|
_: 1
|
|
235
329
|
}, 8, ["modelValue", "disabled"])
|
|
236
330
|
]),
|
|
237
|
-
vue.createCommentVNode(" \u76EE\u5F55 "),
|
|
238
|
-
vue.createVNode(vue.unref(webVue.TreeSelect), {
|
|
239
|
-
modelValue: filter.value.directory_id,
|
|
240
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => filter.value.directory_id = $event),
|
|
241
|
-
data: vue.unref(tree),
|
|
242
|
-
"load-more": vue.unref(loadDirMore),
|
|
243
|
-
placeholder: "\u8BF7\u9009\u62E9\u76EE\u5F55",
|
|
244
|
-
style: { "width": "180px" },
|
|
245
|
-
"allow-clear": ""
|
|
246
|
-
}, null, 8, ["modelValue", "data", "load-more"]),
|
|
247
331
|
vue.createCommentVNode(" \u65F6\u95F4\u8303\u56F4 "),
|
|
248
|
-
vue.
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
332
|
+
vue.createElementVNode("div", _hoisted_8, [
|
|
333
|
+
vue.createVNode(vue.unref(webVue.RangePicker), {
|
|
334
|
+
modelValue: rangeTime.value,
|
|
335
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => rangeTime.value = $event),
|
|
336
|
+
"allow-clear": "",
|
|
337
|
+
"popup-container": "#resource-filter-pannel"
|
|
338
|
+
}, null, 8, ["modelValue"])
|
|
339
|
+
]),
|
|
254
340
|
vue.createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u6765\u6E90 "),
|
|
255
|
-
vue.createElementVNode("div",
|
|
341
|
+
vue.createElementVNode("div", _hoisted_9, [
|
|
256
342
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
257
343
|
modelValue: filter.value.source,
|
|
258
|
-
"onUpdate:modelValue": _cache[
|
|
344
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => filter.value.source = $event),
|
|
259
345
|
"allow-clear": "",
|
|
260
|
-
placeholder: "\u6765\u6E90"
|
|
346
|
+
placeholder: "\u6765\u6E90",
|
|
347
|
+
"popup-container": "#resource-filter-pannel"
|
|
261
348
|
}, {
|
|
262
349
|
default: vue.withCtx(() => [
|
|
263
350
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(resourceSource), (item) => {
|
|
@@ -272,14 +359,15 @@ const _sfc_main = vue.defineComponent({
|
|
|
272
359
|
}, 8, ["modelValue"])
|
|
273
360
|
]),
|
|
274
361
|
vue.createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u4EBA "),
|
|
275
|
-
!_ctx.disableUploadBy ? (vue.openBlock(), vue.createElementBlock("div",
|
|
362
|
+
!_ctx.disableUploadBy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
|
|
276
363
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
277
364
|
modelValue: filter.value.upload_by,
|
|
278
|
-
"onUpdate:modelValue": _cache[
|
|
365
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => filter.value.upload_by = $event),
|
|
279
366
|
"allow-clear": "",
|
|
280
367
|
placeholder: "\u4E0A\u4F20\u4EBA",
|
|
281
368
|
loading: vue.unref(loading),
|
|
282
369
|
"allow-search": "",
|
|
370
|
+
"popup-container": "#resource-filter-pannel",
|
|
283
371
|
onSearch: vue.unref(handleSearch),
|
|
284
372
|
onDropdownReachBottom: vue.unref(loadMore)
|
|
285
373
|
}, {
|
|
@@ -294,40 +382,64 @@ const _sfc_main = vue.defineComponent({
|
|
|
294
382
|
]),
|
|
295
383
|
_: 1
|
|
296
384
|
}, 8, ["modelValue", "loading", "onSearch", "onDropdownReachBottom"])
|
|
297
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
385
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
386
|
+
], 512),
|
|
387
|
+
vue.createElementVNode("div", _hoisted_11, [
|
|
388
|
+
vue.createCommentVNode(" \u91CD\u7F6E\u6309\u94AE - Wrap in filter-item to be managed by the hook "),
|
|
389
|
+
vue.withDirectives(vue.createElementVNode("div", _hoisted_12, [
|
|
390
|
+
_ctx.smallScreen ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
|
|
391
|
+
key: 0,
|
|
392
|
+
type: "text",
|
|
393
|
+
onClick: handleReset
|
|
394
|
+
}, {
|
|
395
|
+
icon: vue.withCtx(() => [
|
|
396
|
+
vue.createVNode(vue.unref(icon.IconRefresh))
|
|
397
|
+
]),
|
|
398
|
+
_: 1
|
|
399
|
+
})) : (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
|
|
400
|
+
key: 1,
|
|
401
|
+
type: "text",
|
|
402
|
+
onClick: handleReset
|
|
403
|
+
}, {
|
|
404
|
+
default: vue.withCtx(() => _cache[14] || (_cache[14] = [
|
|
405
|
+
vue.createTextVNode(" \u91CD\u7F6E ")
|
|
406
|
+
])),
|
|
407
|
+
_: 1
|
|
408
|
+
}))
|
|
409
|
+
], 512), [
|
|
410
|
+
[vue.vShow, !isEmpty.value]
|
|
411
|
+
]),
|
|
412
|
+
_ctx.smallScreen ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
|
|
413
|
+
key: 0,
|
|
414
|
+
type: "primary",
|
|
415
|
+
onClick: _cache[9] || (_cache[9] = ($event) => emits("upload"))
|
|
302
416
|
}, {
|
|
303
|
-
|
|
304
|
-
vue.
|
|
305
|
-
])
|
|
417
|
+
icon: vue.withCtx(() => [
|
|
418
|
+
vue.createVNode(vue.unref(icon.IconUpload))
|
|
419
|
+
]),
|
|
306
420
|
_: 1
|
|
307
|
-
})) : vue.
|
|
308
|
-
|
|
309
|
-
vue.createElementVNode("div", _hoisted_8, [
|
|
310
|
-
vue.createVNode(vue.unref(webVue.Button), {
|
|
421
|
+
})) : (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
|
|
422
|
+
key: 1,
|
|
311
423
|
type: "primary",
|
|
312
|
-
onClick: _cache[
|
|
424
|
+
onClick: _cache[10] || (_cache[10] = ($event) => emits("upload"))
|
|
313
425
|
}, {
|
|
314
426
|
icon: vue.withCtx(() => [
|
|
315
427
|
vue.createVNode(vue.unref(icon.IconUpload))
|
|
316
428
|
]),
|
|
317
429
|
default: vue.withCtx(() => [
|
|
318
|
-
_cache[
|
|
430
|
+
_cache[15] || (_cache[15] = vue.createTextVNode(" \u4E0A\u4F20 "))
|
|
319
431
|
]),
|
|
320
432
|
_: 1
|
|
321
|
-
})
|
|
433
|
+
}))
|
|
322
434
|
])
|
|
323
435
|
]),
|
|
324
|
-
searchInput.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
436
|
+
searchInput.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
|
|
325
437
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(resource.keywordsSelection), (item) => {
|
|
326
438
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
327
439
|
key: item.value,
|
|
328
440
|
class: vue.normalizeClass(["list-filter-tag", { active: filter.value.sf === item.value }]),
|
|
329
441
|
onClick: ($event) => filter.value.sf = item.value
|
|
330
|
-
}, vue.toDisplayString(item.name), 11,
|
|
442
|
+
}, vue.toDisplayString(item.name), 11, _hoisted_14);
|
|
331
443
|
}), 128))
|
|
332
444
|
])) : vue.createCommentVNode("v-if", true)
|
|
333
445
|
]);
|