@cmstops/pro-compo 0.3.68 → 0.3.69
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 +125 -79
- package/dist/index.min.css +1 -1
- package/es/baseFilter/component.js +6 -1
- package/es/config.js +1 -1
- package/es/hooks/useAttachement.d.ts +14 -6
- package/es/hooks/useAttachement.js +15 -1
- package/es/hooks/useLocalStorage.d.ts +1 -0
- package/es/hooks/useLocalStorage.js +2 -1
- package/es/index.css +125 -79
- package/es/selectResourceModal/assets/images/sys_load_more.js +2 -0
- package/es/selectResourceModal/component.js +71 -170
- package/es/selectResourceModal/components/{ListCardWrapper/index.js → List/ListCardWrapper.js} +13 -11
- package/es/selectResourceModal/components/List/ListLocal/index.js +92 -0
- package/es/selectResourceModal/components/{ListFilter/index.js → List/ListNormal/Filter.js} +14 -14
- package/es/selectResourceModal/components/List/ListNormal/index.js +77 -0
- package/es/selectResourceModal/components/List/ListSystem/Filter.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListSystem/Filter.js +141 -0
- package/es/selectResourceModal/components/List/ListSystem/SubList.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListSystem/SubList.js +67 -0
- package/es/selectResourceModal/components/List/ListSystem/index.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListSystem/index.js +109 -0
- package/es/selectResourceModal/components/List/ListWraper.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListWraper.js +61 -0
- package/es/selectResourceModal/components/ListTabs/index.js +9 -18
- package/es/selectResourceModal/{components/ListFilter/scripts/api.d.ts → scripts/selectionApis.d.ts} +1 -0
- package/es/selectResourceModal/scripts/selectionApis.js +15 -0
- package/es/selectResourceModal/scripts/useCompoLf.d.ts +21 -0
- package/es/selectResourceModal/scripts/useCompoLf.js +32 -0
- package/es/selectResourceModal/scripts/useResourceSelect.js +7 -3
- package/es/selectResourceModal/scripts/useTabFilter.d.ts +21 -0
- package/es/selectResourceModal/scripts/useTabFilter.js +37 -0
- package/es/selectResourceModal/style/index.css +125 -79
- package/es/selectResourceModal/style/index.less +3 -32
- package/es/selectResourceModal/style/list.less +163 -0
- package/es/selectThumb/component.js +25 -13
- package/es/utils/filter.js +0 -1
- package/lib/baseFilter/component.js +6 -1
- package/lib/config.js +1 -1
- package/lib/hooks/useAttachement.js +16 -0
- package/lib/hooks/useLocalStorage.js +2 -1
- package/lib/index.css +125 -79
- package/lib/selectResourceModal/assets/images/sys_load_more.js +3 -0
- package/lib/selectResourceModal/component.js +71 -170
- package/lib/selectResourceModal/components/{ListCardWrapper/index.js → List/ListCardWrapper.js} +12 -10
- package/lib/selectResourceModal/components/List/ListLocal/index.js +93 -0
- package/lib/selectResourceModal/components/{ListFilter/index.js → List/ListNormal/Filter.js} +15 -15
- package/lib/selectResourceModal/components/List/ListNormal/index.js +78 -0
- package/lib/selectResourceModal/components/List/ListSystem/Filter.js +142 -0
- package/lib/selectResourceModal/components/List/ListSystem/SubList.js +68 -0
- package/lib/selectResourceModal/components/List/ListSystem/index.js +110 -0
- package/lib/selectResourceModal/components/List/ListWraper.js +62 -0
- package/lib/selectResourceModal/components/ListTabs/index.js +8 -17
- package/lib/selectResourceModal/{components/ListFilter/scripts/api.js → scripts/selectionApis.js} +8 -1
- package/lib/selectResourceModal/scripts/useCompoLf.js +33 -0
- package/lib/selectResourceModal/scripts/useResourceSelect.js +7 -3
- package/lib/selectResourceModal/scripts/useTabFilter.js +38 -0
- package/lib/selectResourceModal/style/index.css +125 -79
- package/lib/selectResourceModal/style/index.less +3 -32
- package/lib/selectResourceModal/style/list.less +163 -0
- package/lib/selectThumb/component.js +25 -13
- package/lib/utils/filter.js +0 -1
- package/package.json +1 -1
- package/es/selectResourceModal/components/ListContent/index.js +0 -46
- package/es/selectResourceModal/components/ListContentLocal/index.js +0 -93
- package/es/selectResourceModal/components/ListFilter/scripts/api.js +0 -9
- package/es/selectResourceModal/style/listContent.less +0 -5
- package/es/selectResourceModal/style/listContentLocal.less +0 -26
- package/es/selectResourceModal/style/listFilter.less +0 -41
- package/lib/selectResourceModal/components/ListContent/index.js +0 -47
- package/lib/selectResourceModal/components/ListContentLocal/index.js +0 -94
- package/lib/selectResourceModal/style/listContent.less +0 -5
- package/lib/selectResourceModal/style/listContentLocal.less +0 -26
- package/lib/selectResourceModal/style/listFilter.less +0 -41
- /package/es/selectResourceModal/components/{ListCardWrapper/index.d.ts → List/ListCardWrapper.d.ts} +0 -0
- /package/es/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.d.ts +0 -0
- /package/es/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.js +0 -0
- /package/es/selectResourceModal/components/{ListContent → List/ListLocal}/index.d.ts +0 -0
- /package/es/selectResourceModal/components/{ListContentLocal/index.d.ts → List/ListNormal/Filter.d.ts} +0 -0
- /package/es/selectResourceModal/components/{ListFilter → List/ListNormal}/index.d.ts +0 -0
- /package/lib/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.js +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineComponent, inject, computed, openBlock, createBlock, withCtx, renderSlot, createElementVNode, createVNode, unref, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList } from "vue";
|
|
2
|
+
import _sfc_main$2 from "./Upload.js";
|
|
3
|
+
import useUpload from "../../../../hooks/useUpload.js";
|
|
4
|
+
import _sfc_main$1 from "../ListWraper.js";
|
|
5
|
+
const _hoisted_1 = { class: "list-upload" };
|
|
6
|
+
const _hoisted_2 = { class: "list-content" };
|
|
7
|
+
const _hoisted_3 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "list-tips"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_4 = { class: "list-item-grid" };
|
|
12
|
+
const _sfc_main = defineComponent({
|
|
13
|
+
__name: "index",
|
|
14
|
+
props: {
|
|
15
|
+
selectKeys: {},
|
|
16
|
+
disable: { type: Boolean }
|
|
17
|
+
},
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const userInfo = inject("userInfo");
|
|
20
|
+
const baseAPI = inject("baseAPI");
|
|
21
|
+
const repoId = computed(() => {
|
|
22
|
+
var _a;
|
|
23
|
+
return (_a = userInfo == null ? void 0 : userInfo.value) == null ? void 0 : _a.repository_id;
|
|
24
|
+
});
|
|
25
|
+
const { list, uploadFile, reTranscode, transcodingFile, removeRecord } = useUpload();
|
|
26
|
+
function handleChange(file) {
|
|
27
|
+
if (!baseAPI || !repoId.value)
|
|
28
|
+
return;
|
|
29
|
+
uploadFile(
|
|
30
|
+
baseAPI,
|
|
31
|
+
file.file,
|
|
32
|
+
0,
|
|
33
|
+
repoId.value,
|
|
34
|
+
(media) => transcodingFile(baseAPI, media, repoId.value)
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
async function handleOptions(e) {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
if (e.key === "reupload") {
|
|
40
|
+
if (!e.item || !((_a = e.item) == null ? void 0 : _a.originFile))
|
|
41
|
+
return;
|
|
42
|
+
e.item.originFile.sig_id = e.item.sig_id;
|
|
43
|
+
e.item.originFile.id = e.item.id;
|
|
44
|
+
handleChange({ file: e.item.originFile });
|
|
45
|
+
} else if (e.key === "retranscode") {
|
|
46
|
+
if (!baseAPI || !((_b = e.item) == null ? void 0 : _b.mediaFile))
|
|
47
|
+
return;
|
|
48
|
+
if (!await reTranscode(baseAPI, e.item.mediaFile))
|
|
49
|
+
return;
|
|
50
|
+
transcodingFile(baseAPI, e.item.mediaFile, repoId.value);
|
|
51
|
+
} else if (e.key === "remove") {
|
|
52
|
+
if (!e.item)
|
|
53
|
+
return;
|
|
54
|
+
removeRecord(e.item);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
return openBlock(), createBlock(_sfc_main$1, null, {
|
|
59
|
+
"footer-extra": withCtx(() => [
|
|
60
|
+
renderSlot(_ctx.$slots, "footer-extra")
|
|
61
|
+
]),
|
|
62
|
+
default: withCtx(() => {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
return [
|
|
65
|
+
createElementVNode("div", _hoisted_1, [
|
|
66
|
+
createVNode(_sfc_main$2, { onChange: handleChange })
|
|
67
|
+
]),
|
|
68
|
+
createElementVNode("div", _hoisted_2, [
|
|
69
|
+
((_a = unref(list)) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_3, " \u5DF2\u4E0A\u4F20 " + toDisplayString((_b = unref(list)) == null ? void 0 : _b.length) + " \u4E2A\u7D20\u6750 ", 1)) : createCommentVNode("v-if", true),
|
|
70
|
+
createCommentVNode(" \u4E0A\u4F20\u5217\u8868 "),
|
|
71
|
+
createElementVNode("div", _hoisted_4, [
|
|
72
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (item) => {
|
|
73
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
74
|
+
key: item.sig_id
|
|
75
|
+
}, [
|
|
76
|
+
createCommentVNode(" \n onOptions \u7528\u4E8E\u5904\u7406\u5361\u7247\u91CC\u5916\u90E8\u4E0D\u80FD\u6355\u83B7\u7684\u64CD\u4F5C\n 1. \u6BD4\u5982\u5916\u90E8\u65E0\u6CD5\u5904\u7406\u9700\u8981\u91CD\u65B0\u4E0A\u4F20/\u8F6C\u7801/\u5220\u9664\u7684\u903B\u8F91 \n 2. \u90A3\u4E48\u5C31\u5C06\u5904\u7406\u7684\u65B9\u6CD5\u4E5F\u4E00\u540C\u629B\u51FA\uFF0C\u7531\u5916\u90E8\u8C03\u7528\n "),
|
|
77
|
+
renderSlot(_ctx.$slots, "item", {
|
|
78
|
+
item,
|
|
79
|
+
onOptions: handleOptions
|
|
80
|
+
})
|
|
81
|
+
], 64);
|
|
82
|
+
}), 128))
|
|
83
|
+
])
|
|
84
|
+
])
|
|
85
|
+
];
|
|
86
|
+
}),
|
|
87
|
+
_: 3
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
export { _sfc_main as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
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
2
|
import { Input, Dropdown, Doption, Button, Select, Option, RangePicker } from "@arco-design/web-vue";
|
|
3
3
|
import { IconUpload } from "@arco-design/web-vue/es/icon";
|
|
4
|
-
import useSelection from "
|
|
5
|
-
import { RESOURCE_SOURCE_OPTIONS, RESOURCE_CATALOG_OPTIONS } from "
|
|
6
|
-
import { getAccountList } from "
|
|
7
|
-
import { keywordsSelection } from "
|
|
4
|
+
import useSelection from "../../../../hooks/useSelection.js";
|
|
5
|
+
import { RESOURCE_SOURCE_OPTIONS, RESOURCE_CATALOG_OPTIONS } from "../../../../utils/typeMap.js";
|
|
6
|
+
import { getAccountList } from "../../../scripts/selectionApis.js";
|
|
7
|
+
import { keywordsSelection } from "../../../../utils/resource.js";
|
|
8
8
|
const _hoisted_1 = { class: "list-filter-wrapper" };
|
|
9
9
|
const _hoisted_2 = { class: "list-filter" };
|
|
10
10
|
const _hoisted_3 = { class: "filter-list" };
|
|
@@ -22,10 +22,9 @@ const _hoisted_9 = {
|
|
|
22
22
|
};
|
|
23
23
|
const _hoisted_10 = ["onClick"];
|
|
24
24
|
const _sfc_main = defineComponent({
|
|
25
|
-
__name: "
|
|
25
|
+
__name: "Filter",
|
|
26
26
|
props: {
|
|
27
|
-
disableUploadBy: { type: Boolean }
|
|
28
|
-
filterOptions: {}
|
|
27
|
+
disableUploadBy: { type: Boolean }
|
|
29
28
|
},
|
|
30
29
|
emits: ["upload", "change"],
|
|
31
30
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -33,6 +32,7 @@ const _sfc_main = defineComponent({
|
|
|
33
32
|
const emits = __emit;
|
|
34
33
|
const userInfo = inject("userInfo");
|
|
35
34
|
const baseAPI = inject("baseAPI");
|
|
35
|
+
const filterOptions = inject("filterOptions");
|
|
36
36
|
const domainId = computed(() => userInfo == null ? void 0 : userInfo.value.domain_id);
|
|
37
37
|
const { options, loading, load, loadMore, handleSearch } = useSelection({
|
|
38
38
|
labelStr: "alias",
|
|
@@ -138,13 +138,13 @@ const _sfc_main = defineComponent({
|
|
|
138
138
|
{ deep: true, immediate: true }
|
|
139
139
|
);
|
|
140
140
|
watch(
|
|
141
|
-
() =>
|
|
141
|
+
() => filterOptions == null ? void 0 : filterOptions.value,
|
|
142
142
|
() => {
|
|
143
143
|
var _a;
|
|
144
|
-
if ((_a =
|
|
145
|
-
filter.value.catalog =
|
|
146
|
-
if (
|
|
147
|
-
originFilter.catalog =
|
|
144
|
+
if ((_a = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _a.mediaType) {
|
|
145
|
+
filter.value.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType;
|
|
146
|
+
if (filterOptions == null ? void 0 : filterOptions.value.mediaTypeStrict) {
|
|
147
|
+
originFilter.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
},
|
|
@@ -206,7 +206,7 @@ const _sfc_main = defineComponent({
|
|
|
206
206
|
createVNode(unref(Select), {
|
|
207
207
|
modelValue: filter.value.catalog,
|
|
208
208
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.catalog = $event),
|
|
209
|
-
disabled: (_a =
|
|
209
|
+
disabled: (_a = unref(filterOptions)) == null ? void 0 : _a.mediaTypeStrict,
|
|
210
210
|
"allow-clear": "",
|
|
211
211
|
placeholder: "\u7C7B\u578B"
|
|
212
212
|
}, {
|
|
@@ -279,7 +279,7 @@ const _sfc_main = defineComponent({
|
|
|
279
279
|
onClick: handleReset
|
|
280
280
|
}, {
|
|
281
281
|
default: withCtx(() => [
|
|
282
|
-
createTextVNode("\u91CD\u7F6E")
|
|
282
|
+
createTextVNode(" \u91CD\u7F6E ")
|
|
283
283
|
]),
|
|
284
284
|
_: 1
|
|
285
285
|
})) : createCommentVNode("v-if", true)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent, inject, watch, onMounted, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, isRef, createElementVNode, createElementBlock, Fragment, renderList } from "vue";
|
|
2
|
+
import { Pagination } from "@arco-design/web-vue";
|
|
3
|
+
import _sfc_main$1 from "../ListWraper.js";
|
|
4
|
+
import useAttachement from "../../../../hooks/useAttachement.js";
|
|
5
|
+
import _sfc_main$2 from "./Filter.js";
|
|
6
|
+
const _hoisted_1 = { class: "list-item-grid" };
|
|
7
|
+
const _sfc_main = defineComponent({
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
activeKey: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["change-tab"],
|
|
13
|
+
setup(__props, { emit: __emit }) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const emits = __emit;
|
|
16
|
+
const BASE_API = inject("baseAPI");
|
|
17
|
+
const {
|
|
18
|
+
list,
|
|
19
|
+
total,
|
|
20
|
+
limit,
|
|
21
|
+
pageIdx,
|
|
22
|
+
loading,
|
|
23
|
+
changeFilter,
|
|
24
|
+
changePage,
|
|
25
|
+
changeSize,
|
|
26
|
+
loadData,
|
|
27
|
+
changeKey
|
|
28
|
+
} = useAttachement({ key: props.activeKey, BASE_API });
|
|
29
|
+
watch(() => props.activeKey, changeKey);
|
|
30
|
+
onMounted(() => {
|
|
31
|
+
loadData();
|
|
32
|
+
});
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
35
|
+
list: unref(list),
|
|
36
|
+
loading: unref(loading),
|
|
37
|
+
"is-empty": unref(list).length === 0
|
|
38
|
+
}, {
|
|
39
|
+
"footer-extra": withCtx(() => [
|
|
40
|
+
renderSlot(_ctx.$slots, "footer-extra")
|
|
41
|
+
]),
|
|
42
|
+
header: withCtx(() => [
|
|
43
|
+
createVNode(_sfc_main$2, {
|
|
44
|
+
onChange: unref(changeFilter),
|
|
45
|
+
onUpload: _cache[0] || (_cache[0] = ($event) => emits("change-tab", "local"))
|
|
46
|
+
}, null, 8, ["onChange"])
|
|
47
|
+
]),
|
|
48
|
+
footer: withCtx(() => [
|
|
49
|
+
createVNode(unref(Pagination), {
|
|
50
|
+
current: unref(pageIdx),
|
|
51
|
+
"onUpdate:current": _cache[1] || (_cache[1] = ($event) => isRef(pageIdx) ? pageIdx.value = $event : null),
|
|
52
|
+
total: unref(total),
|
|
53
|
+
"page-size": unref(limit),
|
|
54
|
+
"show-total": "",
|
|
55
|
+
"show-page-size": "",
|
|
56
|
+
"base-size": 3,
|
|
57
|
+
"buffer-size": 1,
|
|
58
|
+
onChange: _cache[2] || (_cache[2] = (e) => unref(changePage)((e - 1) * unref(limit))),
|
|
59
|
+
onPageSizeChange: unref(changeSize)
|
|
60
|
+
}, null, 8, ["current", "total", "page-size", "onPageSizeChange"])
|
|
61
|
+
]),
|
|
62
|
+
default: withCtx(() => [
|
|
63
|
+
createElementVNode("div", _hoisted_1, [
|
|
64
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (item) => {
|
|
65
|
+
return renderSlot(_ctx.$slots, "item", {
|
|
66
|
+
key: item.id,
|
|
67
|
+
item
|
|
68
|
+
});
|
|
69
|
+
}), 128))
|
|
70
|
+
])
|
|
71
|
+
]),
|
|
72
|
+
_: 3
|
|
73
|
+
}, 8, ["list", "loading", "is-empty"]);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { defineComponent, inject, ref, computed, watch, onMounted, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode, unref, withCtx, Fragment, renderList, createBlock, createTextVNode } from "vue";
|
|
2
|
+
import { Input, Select, Option, Button } from "@arco-design/web-vue";
|
|
3
|
+
import { rateOptions } from "../../../../utils/filter.js";
|
|
4
|
+
import useSelection from "../../../../hooks/useSelection.js";
|
|
5
|
+
import { getSysRsClassifyList } from "../../../scripts/selectionApis.js";
|
|
6
|
+
const _hoisted_1 = { class: "list-filter-wrapper" };
|
|
7
|
+
const _hoisted_2 = { class: "list-filter" };
|
|
8
|
+
const _hoisted_3 = { class: "filter-list" };
|
|
9
|
+
const _hoisted_4 = { style: { "width": "200px" } };
|
|
10
|
+
const _hoisted_5 = { class: "filter-item" };
|
|
11
|
+
const _hoisted_6 = {
|
|
12
|
+
class: "filter-item",
|
|
13
|
+
style: { "width": "120px" }
|
|
14
|
+
};
|
|
15
|
+
const _sfc_main = defineComponent({
|
|
16
|
+
__name: "Filter",
|
|
17
|
+
emits: ["change", "changeScen"],
|
|
18
|
+
setup(__props, { emit: __emit }) {
|
|
19
|
+
const emit = __emit;
|
|
20
|
+
const baseAPI = inject("baseAPI");
|
|
21
|
+
const sysTag = inject("mediaUseType");
|
|
22
|
+
const resourceRate = rateOptions.value;
|
|
23
|
+
const { options, loading, load } = useSelection({
|
|
24
|
+
labelStr: "scenario_name",
|
|
25
|
+
valueStr: "classify_id",
|
|
26
|
+
func: async () => {
|
|
27
|
+
if (!baseAPI)
|
|
28
|
+
return Promise.reject(new Error("baseAPI \u4E0D\u5B58\u5728"));
|
|
29
|
+
const { code, message } = await getSysRsClassifyList(
|
|
30
|
+
baseAPI,
|
|
31
|
+
(sysTag == null ? void 0 : sysTag.value) || 1
|
|
32
|
+
);
|
|
33
|
+
if (code !== 0)
|
|
34
|
+
return Promise.reject(new Error(message));
|
|
35
|
+
return message.classifies;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const originFilter = {
|
|
39
|
+
wh_rate: "",
|
|
40
|
+
keyword: "",
|
|
41
|
+
limit: 9
|
|
42
|
+
};
|
|
43
|
+
const filter = ref(JSON.parse(JSON.stringify(originFilter)));
|
|
44
|
+
const classify_id = ref("");
|
|
45
|
+
const changeScen = () => emit("changeScen", classify_id.value);
|
|
46
|
+
const handleReset = () => {
|
|
47
|
+
filter.value = JSON.parse(JSON.stringify(originFilter));
|
|
48
|
+
classify_id.value = "";
|
|
49
|
+
changeScen();
|
|
50
|
+
};
|
|
51
|
+
const isEmpty = computed(() => {
|
|
52
|
+
return Object.keys(filter.value).every((key) => {
|
|
53
|
+
return filter.value[key] === originFilter[key];
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
watch(
|
|
57
|
+
() => filter.value,
|
|
58
|
+
() => {
|
|
59
|
+
const result = { ...filter.value };
|
|
60
|
+
emit("change", result);
|
|
61
|
+
},
|
|
62
|
+
{ deep: true, immediate: true }
|
|
63
|
+
);
|
|
64
|
+
watch(
|
|
65
|
+
() => classify_id.value,
|
|
66
|
+
() => changeScen()
|
|
67
|
+
);
|
|
68
|
+
onMounted(() => {
|
|
69
|
+
load();
|
|
70
|
+
});
|
|
71
|
+
return (_ctx, _cache) => {
|
|
72
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
73
|
+
createElementVNode("div", _hoisted_2, [
|
|
74
|
+
createElementVNode("div", _hoisted_3, [
|
|
75
|
+
createCommentVNode(" \u5173\u952E\u8BCD "),
|
|
76
|
+
createElementVNode("div", _hoisted_4, [
|
|
77
|
+
createVNode(unref(Input), {
|
|
78
|
+
modelValue: filter.value.keyword,
|
|
79
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.keyword = $event),
|
|
80
|
+
"allow-clear": "",
|
|
81
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"
|
|
82
|
+
}, null, 8, ["modelValue"])
|
|
83
|
+
]),
|
|
84
|
+
createCommentVNode(" \u7D20\u6750\u7C7B\u578B "),
|
|
85
|
+
createElementVNode("div", _hoisted_5, [
|
|
86
|
+
createVNode(unref(Select), {
|
|
87
|
+
modelValue: classify_id.value,
|
|
88
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => classify_id.value = $event),
|
|
89
|
+
loading: unref(loading),
|
|
90
|
+
"allow-clear": "",
|
|
91
|
+
placeholder: "\u7C7B\u578B"
|
|
92
|
+
}, {
|
|
93
|
+
default: withCtx(() => [
|
|
94
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(options), (item) => {
|
|
95
|
+
return openBlock(), createBlock(unref(Option), {
|
|
96
|
+
key: item.value,
|
|
97
|
+
label: item.label,
|
|
98
|
+
value: item.value
|
|
99
|
+
}, null, 8, ["label", "value"]);
|
|
100
|
+
}), 128))
|
|
101
|
+
]),
|
|
102
|
+
_: 1
|
|
103
|
+
}, 8, ["modelValue", "loading"])
|
|
104
|
+
]),
|
|
105
|
+
createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u6765\u6E90 "),
|
|
106
|
+
createElementVNode("div", _hoisted_6, [
|
|
107
|
+
createVNode(unref(Select), {
|
|
108
|
+
modelValue: filter.value.wh_rate,
|
|
109
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.wh_rate = $event),
|
|
110
|
+
"allow-clear": "",
|
|
111
|
+
placeholder: "\u56FE\u7247\u6BD4\u4F8B"
|
|
112
|
+
}, {
|
|
113
|
+
default: withCtx(() => [
|
|
114
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(resourceRate), (item) => {
|
|
115
|
+
return openBlock(), createBlock(unref(Option), {
|
|
116
|
+
key: item.value,
|
|
117
|
+
label: item.label,
|
|
118
|
+
value: item.value
|
|
119
|
+
}, null, 8, ["label", "value"]);
|
|
120
|
+
}), 128))
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
}, 8, ["modelValue"])
|
|
124
|
+
]),
|
|
125
|
+
!isEmpty.value ? (openBlock(), createBlock(unref(Button), {
|
|
126
|
+
key: 0,
|
|
127
|
+
type: "text",
|
|
128
|
+
onClick: handleReset
|
|
129
|
+
}, {
|
|
130
|
+
default: withCtx(() => [
|
|
131
|
+
createTextVNode(" \u91CD\u7F6E ")
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
})) : createCommentVNode("v-if", true)
|
|
135
|
+
])
|
|
136
|
+
])
|
|
137
|
+
]);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent, inject, ref, computed, watch, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, renderList, renderSlot, createTextVNode } from "vue";
|
|
2
|
+
import _imports_0 from "../../../assets/images/sys_load_more.js";
|
|
3
|
+
import { getSysRsPage } from "../../../../hooks/useAttachement.js";
|
|
4
|
+
const _hoisted_1 = { class: "list-item-grid" };
|
|
5
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("img", { src: _imports_0 }, null, -1);
|
|
6
|
+
const _sfc_main = defineComponent({
|
|
7
|
+
__name: "SubList",
|
|
8
|
+
props: {
|
|
9
|
+
sceniro: {},
|
|
10
|
+
outsideFilter: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const baseApi = inject("baseAPI");
|
|
15
|
+
const fileList = ref([]);
|
|
16
|
+
const fileCount = ref(0);
|
|
17
|
+
const showMore = computed(
|
|
18
|
+
() => fileList.value.length < props.sceniro.count
|
|
19
|
+
);
|
|
20
|
+
watch(
|
|
21
|
+
() => props.sceniro,
|
|
22
|
+
() => {
|
|
23
|
+
fileList.value = props.sceniro.data;
|
|
24
|
+
fileCount.value = props.sceniro.count;
|
|
25
|
+
},
|
|
26
|
+
{ deep: true, immediate: true }
|
|
27
|
+
);
|
|
28
|
+
const loadMore = async () => {
|
|
29
|
+
const { sceniro } = props;
|
|
30
|
+
const { outsideFilter } = props;
|
|
31
|
+
const res = await getSysRsPage(baseApi, {
|
|
32
|
+
sys_classify: sceniro.classify_id,
|
|
33
|
+
sys_tag: sceniro.sys_tag,
|
|
34
|
+
keyword: outsideFilter.keyword || "",
|
|
35
|
+
wh_rate: outsideFilter.wh_rate || "",
|
|
36
|
+
limit: 10,
|
|
37
|
+
offset: fileList.value.length
|
|
38
|
+
});
|
|
39
|
+
if (res.code !== 0)
|
|
40
|
+
return;
|
|
41
|
+
fileCount.value = res.message.count;
|
|
42
|
+
fileList.value = fileList.value.concat(res.message.data);
|
|
43
|
+
};
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
46
|
+
createCommentVNode(" \u6587\u4EF6 "),
|
|
47
|
+
createElementVNode("div", _hoisted_1, [
|
|
48
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(fileList.value, (item) => {
|
|
49
|
+
return renderSlot(_ctx.$slots, "item", {
|
|
50
|
+
key: item.classify_id,
|
|
51
|
+
item
|
|
52
|
+
});
|
|
53
|
+
}), 128)),
|
|
54
|
+
showMore.value ? (openBlock(), createElementBlock("div", {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "item-load-more",
|
|
57
|
+
onClick: loadMore
|
|
58
|
+
}, [
|
|
59
|
+
_hoisted_2,
|
|
60
|
+
createTextVNode(" \u70B9\u51FB\u52A0\u8F7D\u66F4\u591A ")
|
|
61
|
+
])) : createCommentVNode("v-if", true)
|
|
62
|
+
])
|
|
63
|
+
], 2112);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { defineComponent, inject, ref, computed, onMounted, openBlock, createBlock, withCtx, renderSlot, createCommentVNode, createVNode, createElementBlock, Fragment, renderList, withDirectives, createElementVNode, createTextVNode, toDisplayString, vShow } from "vue";
|
|
2
|
+
import _sfc_main$1 from "../ListWraper.js";
|
|
3
|
+
import _sfc_main$2 from "./Filter.js";
|
|
4
|
+
import _sfc_main$3 from "./SubList.js";
|
|
5
|
+
import { getSysRsByTag } from "../../../../hooks/useAttachement.js";
|
|
6
|
+
const _hoisted_1 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "scen-module"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_2 = { class: "title" };
|
|
11
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("div", { class: "line" }, null, -1);
|
|
12
|
+
const _sfc_main = defineComponent({
|
|
13
|
+
__name: "index",
|
|
14
|
+
emits: ["confirm"],
|
|
15
|
+
setup(__props, { emit: __emit }) {
|
|
16
|
+
const emits = __emit;
|
|
17
|
+
const mediaUseType = inject("mediaUseType");
|
|
18
|
+
const baseApi = inject("baseAPI");
|
|
19
|
+
const scenList = ref([]);
|
|
20
|
+
const choseScen = ref("");
|
|
21
|
+
const outsideFilter = ref(null);
|
|
22
|
+
const loading = ref(true);
|
|
23
|
+
const handleSearch = async (filter) => {
|
|
24
|
+
loading.value = true;
|
|
25
|
+
try {
|
|
26
|
+
outsideFilter.value = filter;
|
|
27
|
+
const res = await getSysRsByTag(baseApi, {
|
|
28
|
+
...filter,
|
|
29
|
+
sys_tag: mediaUseType == null ? void 0 : mediaUseType.value
|
|
30
|
+
});
|
|
31
|
+
if (res.code !== 0)
|
|
32
|
+
return;
|
|
33
|
+
scenList.value = res.message.Results;
|
|
34
|
+
} catch (e) {
|
|
35
|
+
console.log("\u83B7\u53D6\u5185\u7F6E\u7D20\u6750\u5931\u8D25", e);
|
|
36
|
+
} finally {
|
|
37
|
+
loading.value = false;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const handleChangeScen = (scen) => {
|
|
41
|
+
choseScen.value = scen;
|
|
42
|
+
};
|
|
43
|
+
const handleConfirm = (data) => {
|
|
44
|
+
data[0].realUrl = data[0].url;
|
|
45
|
+
emits("confirm", data);
|
|
46
|
+
};
|
|
47
|
+
const isEmpty = computed(() => {
|
|
48
|
+
if (!scenList.value.length)
|
|
49
|
+
return true;
|
|
50
|
+
if (choseScen.value !== "") {
|
|
51
|
+
const scen = scenList.value.find(
|
|
52
|
+
(item) => item.classify_id === choseScen.value
|
|
53
|
+
);
|
|
54
|
+
return scen.data === null;
|
|
55
|
+
}
|
|
56
|
+
return !scenList.value.some((item) => item.data && item.data.length > 0);
|
|
57
|
+
});
|
|
58
|
+
onMounted(() => {
|
|
59
|
+
handleSearch({ sys_tag: (mediaUseType == null ? void 0 : mediaUseType.value) || 1, limit: 9 });
|
|
60
|
+
});
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
63
|
+
list: _ctx.list,
|
|
64
|
+
loading: loading.value,
|
|
65
|
+
"is-empty": isEmpty.value
|
|
66
|
+
}, {
|
|
67
|
+
"footer-extra": withCtx(() => [
|
|
68
|
+
renderSlot(_ctx.$slots, "footer-extra")
|
|
69
|
+
]),
|
|
70
|
+
header: withCtx(() => [
|
|
71
|
+
createCommentVNode(" \u5207\u6362\u573A\u666F "),
|
|
72
|
+
createVNode(_sfc_main$2, {
|
|
73
|
+
onChange: handleSearch,
|
|
74
|
+
onChangeScen: handleChangeScen
|
|
75
|
+
})
|
|
76
|
+
]),
|
|
77
|
+
default: withCtx(() => [
|
|
78
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(scenList.value, (sceniro) => {
|
|
79
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
80
|
+
key: sceniro.classify_id
|
|
81
|
+
}, [
|
|
82
|
+
sceniro.data && sceniro.data.length > 0 ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
|
|
83
|
+
createElementVNode("div", _hoisted_2, [
|
|
84
|
+
_hoisted_3,
|
|
85
|
+
createTextVNode(" " + toDisplayString(sceniro.scenario_name), 1)
|
|
86
|
+
]),
|
|
87
|
+
createCommentVNode(" \u5185\u7F6E\u7D20\u6750 - \u573A\u666F\u5217\u8868 "),
|
|
88
|
+
createVNode(_sfc_main$3, {
|
|
89
|
+
"outside-filter": outsideFilter.value,
|
|
90
|
+
sceniro,
|
|
91
|
+
onConfirm: handleConfirm
|
|
92
|
+
}, {
|
|
93
|
+
item: withCtx(({ item }) => [
|
|
94
|
+
renderSlot(_ctx.$slots, "item", { item })
|
|
95
|
+
]),
|
|
96
|
+
_: 2
|
|
97
|
+
}, 1032, ["outside-filter", "sceniro"])
|
|
98
|
+
], 512)), [
|
|
99
|
+
[vShow, [sceniro.classify_id, ""].includes(choseScen.value)]
|
|
100
|
+
]) : createCommentVNode("v-if", true)
|
|
101
|
+
], 64);
|
|
102
|
+
}), 128))
|
|
103
|
+
]),
|
|
104
|
+
_: 3
|
|
105
|
+
}, 8, ["list", "loading", "is-empty"]);
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode, createVNode, unref, Fragment, withCtx } from "vue";
|
|
2
|
+
import { Spin, Scrollbar } from "@arco-design/web-vue";
|
|
3
|
+
import _sfc_main$1 from "../../../emptyData/component.js";
|
|
4
|
+
const _hoisted_1 = { class: "resource-list" };
|
|
5
|
+
const _hoisted_2 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "resource-list-header"
|
|
8
|
+
};
|
|
9
|
+
const _hoisted_3 = { class: "resource-list-content" };
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "resource-list-content-loading"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_5 = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "resource-list-content-empty"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_6 = { class: "resource-list-footer" };
|
|
19
|
+
const _sfc_main = defineComponent({
|
|
20
|
+
__name: "ListWraper",
|
|
21
|
+
props: {
|
|
22
|
+
list: {},
|
|
23
|
+
isEmpty: { type: Boolean },
|
|
24
|
+
loading: { type: Boolean }
|
|
25
|
+
},
|
|
26
|
+
setup(__props) {
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
29
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
30
|
+
renderSlot(_ctx.$slots, "header")
|
|
31
|
+
])) : createCommentVNode("v-if", true),
|
|
32
|
+
createElementVNode("div", _hoisted_3, [
|
|
33
|
+
_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
34
|
+
createVNode(unref(Spin), {
|
|
35
|
+
tip: "\u7D20\u6750\u52A0\u8F7D\u4E2D",
|
|
36
|
+
loading: true
|
|
37
|
+
})
|
|
38
|
+
])) : _ctx.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
39
|
+
createVNode(_sfc_main$1, { type: "empty" })
|
|
40
|
+
])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
41
|
+
createCommentVNode(" \u5185\u5BB9\u6837\u5F0F\u4E00\uFF1A\u6805\u683C\u6837\u5F0F\uFF0C\u5916\u90E8 props \u4F20 list "),
|
|
42
|
+
createVNode(unref(Scrollbar), {
|
|
43
|
+
"outer-style": { height: "100%" },
|
|
44
|
+
style: { "height": "100%", "overflow": "auto" }
|
|
45
|
+
}, {
|
|
46
|
+
default: withCtx(() => [
|
|
47
|
+
renderSlot(_ctx.$slots, "default")
|
|
48
|
+
]),
|
|
49
|
+
_: 3
|
|
50
|
+
})
|
|
51
|
+
], 2112))
|
|
52
|
+
]),
|
|
53
|
+
createElementVNode("div", _hoisted_6, [
|
|
54
|
+
renderSlot(_ctx.$slots, "footer"),
|
|
55
|
+
renderSlot(_ctx.$slots, "footer-extra")
|
|
56
|
+
])
|
|
57
|
+
]);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
export { _sfc_main as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, createVNode, unref, withCtx } from "vue";
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock } from "vue";
|
|
2
2
|
import { IconClose } from "@arco-design/web-vue/es/icon";
|
|
3
3
|
import { Tabs, Button, TabPane } from "@arco-design/web-vue";
|
|
4
4
|
const _hoisted_1 = { class: "resource-select-header" };
|
|
5
5
|
const _sfc_main = defineComponent({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
-
modelValue: {}
|
|
8
|
+
modelValue: {},
|
|
9
|
+
tabList: {}
|
|
9
10
|
},
|
|
10
11
|
emits: ["update:model-value", "change", "close"],
|
|
11
12
|
setup(__props, { emit: __emit }) {
|
|
@@ -36,22 +37,12 @@ const _sfc_main = defineComponent({
|
|
|
36
37
|
})
|
|
37
38
|
]),
|
|
38
39
|
default: withCtx(() => [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
title: "\u6211\u7684\u7D20\u6750"
|
|
46
|
-
}),
|
|
47
|
-
createVNode(unref(TabPane), {
|
|
48
|
-
key: "remind",
|
|
49
|
-
title: "\u63D0\u9192\u6211\u7684"
|
|
50
|
-
}),
|
|
51
|
-
createVNode(unref(TabPane), {
|
|
52
|
-
key: "local",
|
|
53
|
-
title: "\u672C\u5730\u7D20\u6750"
|
|
54
|
-
})
|
|
40
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.tabList, (tab) => {
|
|
41
|
+
return openBlock(), createBlock(unref(TabPane), {
|
|
42
|
+
key: tab.key,
|
|
43
|
+
title: tab.title
|
|
44
|
+
}, null, 8, ["title"]);
|
|
45
|
+
}), 128))
|
|
55
46
|
]),
|
|
56
47
|
_: 1
|
|
57
48
|
}, 8, ["active-key"])
|