@cmstops/pro-compo 0.3.68 → 0.3.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/index.css +125 -79
  2. package/dist/index.min.css +1 -1
  3. package/es/baseFilter/component.js +6 -1
  4. package/es/config.js +1 -1
  5. package/es/hooks/useAttachement.d.ts +14 -6
  6. package/es/hooks/useAttachement.js +15 -1
  7. package/es/hooks/useLocalStorage.d.ts +1 -0
  8. package/es/hooks/useLocalStorage.js +2 -1
  9. package/es/index.css +125 -79
  10. package/es/selectResourceModal/assets/images/sys_load_more.js +2 -0
  11. package/es/selectResourceModal/component.js +72 -173
  12. package/es/selectResourceModal/components/List/ListAi/index.js +53 -0
  13. package/es/selectResourceModal/components/{ListCardWrapper/index.js → List/ListCardWrapper.js} +13 -11
  14. package/es/selectResourceModal/components/List/ListLocal/index.js +92 -0
  15. package/es/selectResourceModal/components/{ListFilter/index.js → List/ListNormal/Filter.js} +14 -14
  16. package/es/selectResourceModal/components/List/ListNormal/index.d.ts +0 -0
  17. package/es/selectResourceModal/components/List/ListNormal/index.js +76 -0
  18. package/es/selectResourceModal/components/List/ListSystem/Filter.d.ts +0 -0
  19. package/es/selectResourceModal/components/List/ListSystem/Filter.js +141 -0
  20. package/es/selectResourceModal/components/List/ListSystem/SubList.d.ts +0 -0
  21. package/es/selectResourceModal/components/List/ListSystem/SubList.js +67 -0
  22. package/es/selectResourceModal/components/List/ListSystem/index.d.ts +0 -0
  23. package/es/selectResourceModal/components/List/ListSystem/index.js +108 -0
  24. package/es/selectResourceModal/components/List/ListVideo/index.d.ts +0 -0
  25. package/es/selectResourceModal/components/List/ListVideo/index.js +19 -0
  26. package/es/selectResourceModal/components/List/ListWraper.d.ts +0 -0
  27. package/es/selectResourceModal/components/List/ListWraper.js +60 -0
  28. package/es/selectResourceModal/components/ListTabs/index.js +9 -18
  29. package/es/selectResourceModal/{components/ListFilter/scripts/api.d.ts → scripts/selectionApis.d.ts} +1 -0
  30. package/es/selectResourceModal/scripts/selectionApis.js +15 -0
  31. package/es/selectResourceModal/scripts/useCompoLf.d.ts +21 -0
  32. package/es/selectResourceModal/scripts/useCompoLf.js +34 -0
  33. package/es/selectResourceModal/scripts/useResourceSelect.js +7 -3
  34. package/es/selectResourceModal/scripts/useTabFilter.d.ts +22 -0
  35. package/es/selectResourceModal/scripts/useTabFilter.js +46 -0
  36. package/es/selectResourceModal/style/index.css +125 -79
  37. package/es/selectResourceModal/style/index.less +3 -32
  38. package/es/selectResourceModal/style/list.less +166 -0
  39. package/es/selectThumb/component.js +25 -13
  40. package/es/utils/filter.js +0 -1
  41. package/es/videoThumb/component.js +2 -1
  42. package/lib/baseFilter/component.js +6 -1
  43. package/lib/config.js +1 -1
  44. package/lib/hooks/useAttachement.js +16 -0
  45. package/lib/hooks/useLocalStorage.js +2 -1
  46. package/lib/index.css +125 -79
  47. package/lib/selectResourceModal/assets/images/sys_load_more.js +3 -0
  48. package/lib/selectResourceModal/component.js +72 -173
  49. package/lib/selectResourceModal/components/List/ListAi/index.js +54 -0
  50. package/lib/selectResourceModal/components/{ListCardWrapper/index.js → List/ListCardWrapper.js} +12 -10
  51. package/lib/selectResourceModal/components/List/ListLocal/index.js +93 -0
  52. package/lib/selectResourceModal/components/{ListFilter/index.js → List/ListNormal/Filter.js} +15 -15
  53. package/lib/selectResourceModal/components/List/ListNormal/index.js +77 -0
  54. package/lib/selectResourceModal/components/List/ListSystem/Filter.js +142 -0
  55. package/lib/selectResourceModal/components/List/ListSystem/SubList.js +68 -0
  56. package/lib/selectResourceModal/components/List/ListSystem/index.js +109 -0
  57. package/lib/selectResourceModal/components/List/ListVideo/index.js +20 -0
  58. package/lib/selectResourceModal/components/List/ListWraper.js +61 -0
  59. package/lib/selectResourceModal/components/ListTabs/index.js +8 -17
  60. package/lib/selectResourceModal/{components/ListFilter/scripts/api.js → scripts/selectionApis.js} +8 -1
  61. package/lib/selectResourceModal/scripts/useCompoLf.js +35 -0
  62. package/lib/selectResourceModal/scripts/useResourceSelect.js +7 -3
  63. package/lib/selectResourceModal/scripts/useTabFilter.js +47 -0
  64. package/lib/selectResourceModal/style/index.css +125 -79
  65. package/lib/selectResourceModal/style/index.less +3 -32
  66. package/lib/selectResourceModal/style/list.less +166 -0
  67. package/lib/selectThumb/component.js +25 -13
  68. package/lib/utils/filter.js +0 -1
  69. package/lib/videoThumb/component.js +2 -1
  70. package/package.json +1 -1
  71. package/es/selectResourceModal/components/ListContent/index.js +0 -46
  72. package/es/selectResourceModal/components/ListContentLocal/index.js +0 -93
  73. package/es/selectResourceModal/components/ListFilter/scripts/api.js +0 -9
  74. package/es/selectResourceModal/style/listContent.less +0 -5
  75. package/es/selectResourceModal/style/listContentLocal.less +0 -26
  76. package/es/selectResourceModal/style/listFilter.less +0 -41
  77. package/lib/selectResourceModal/components/ListContent/index.js +0 -47
  78. package/lib/selectResourceModal/components/ListContentLocal/index.js +0 -94
  79. package/lib/selectResourceModal/style/listContent.less +0 -5
  80. package/lib/selectResourceModal/style/listContentLocal.less +0 -26
  81. package/lib/selectResourceModal/style/listFilter.less +0 -41
  82. /package/es/selectResourceModal/components/{ListCardWrapper → List/ListAi}/index.d.ts +0 -0
  83. /package/es/selectResourceModal/components/{ListContent/index.d.ts → List/ListCardWrapper.d.ts} +0 -0
  84. /package/es/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.d.ts +0 -0
  85. /package/es/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.js +0 -0
  86. /package/es/selectResourceModal/components/{ListContentLocal → List/ListLocal}/index.d.ts +0 -0
  87. /package/es/selectResourceModal/components/{ListFilter/index.d.ts → List/ListNormal/Filter.d.ts} +0 -0
  88. /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 "../../../hooks/useSelection.js";
5
- import { RESOURCE_SOURCE_OPTIONS, RESOURCE_CATALOG_OPTIONS } from "../../../utils/typeMap.js";
6
- import { getAccountList } from "./scripts/api.js";
7
- import { keywordsSelection } from "../../../utils/resource.js";
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: "index",
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
- () => props.filterOptions,
141
+ () => filterOptions == null ? void 0 : filterOptions.value,
142
142
  () => {
143
143
  var _a;
144
- if ((_a = props.filterOptions) == null ? void 0 : _a.mediaType) {
145
- filter.value.catalog = props.filterOptions.mediaType;
146
- if (props.filterOptions.mediaTypeStrict) {
147
- originFilter.catalog = props.filterOptions.mediaType;
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 = _ctx.filterOptions) == null ? void 0 : _a.mediaTypeStrict,
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,76 @@
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
+ loading: unref(loading),
36
+ "is-empty": unref(list).length === 0
37
+ }, {
38
+ "footer-extra": withCtx(() => [
39
+ renderSlot(_ctx.$slots, "footer-extra")
40
+ ]),
41
+ header: withCtx(() => [
42
+ createVNode(_sfc_main$2, {
43
+ onChange: unref(changeFilter),
44
+ onUpload: _cache[0] || (_cache[0] = ($event) => emits("change-tab", "local"))
45
+ }, null, 8, ["onChange"])
46
+ ]),
47
+ footer: withCtx(() => [
48
+ createVNode(unref(Pagination), {
49
+ current: unref(pageIdx),
50
+ "onUpdate:current": _cache[1] || (_cache[1] = ($event) => isRef(pageIdx) ? pageIdx.value = $event : null),
51
+ total: unref(total),
52
+ "page-size": unref(limit),
53
+ "show-total": "",
54
+ "show-page-size": "",
55
+ "base-size": 3,
56
+ "buffer-size": 1,
57
+ onChange: _cache[2] || (_cache[2] = (e) => unref(changePage)((e - 1) * unref(limit))),
58
+ onPageSizeChange: unref(changeSize)
59
+ }, null, 8, ["current", "total", "page-size", "onPageSizeChange"])
60
+ ]),
61
+ default: withCtx(() => [
62
+ createElementVNode("div", _hoisted_1, [
63
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (item) => {
64
+ return renderSlot(_ctx.$slots, "item", {
65
+ key: item.id,
66
+ item
67
+ });
68
+ }), 128))
69
+ ])
70
+ ]),
71
+ _: 3
72
+ }, 8, ["loading", "is-empty"]);
73
+ };
74
+ }
75
+ });
76
+ export { _sfc_main as default };
@@ -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 };
@@ -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 };
@@ -0,0 +1,108 @@
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
+ loading: loading.value,
64
+ "is-empty": isEmpty.value
65
+ }, {
66
+ "footer-extra": withCtx(() => [
67
+ renderSlot(_ctx.$slots, "footer-extra")
68
+ ]),
69
+ header: withCtx(() => [
70
+ createCommentVNode(" \u5207\u6362\u573A\u666F "),
71
+ createVNode(_sfc_main$2, {
72
+ onChange: handleSearch,
73
+ onChangeScen: handleChangeScen
74
+ })
75
+ ]),
76
+ default: withCtx(() => [
77
+ (openBlock(true), createElementBlock(Fragment, null, renderList(scenList.value, (sceniro) => {
78
+ return openBlock(), createElementBlock(Fragment, {
79
+ key: sceniro.classify_id
80
+ }, [
81
+ sceniro.data && sceniro.data.length > 0 ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
82
+ createElementVNode("div", _hoisted_2, [
83
+ _hoisted_3,
84
+ createTextVNode(" " + toDisplayString(sceniro.scenario_name), 1)
85
+ ]),
86
+ createCommentVNode(" \u5185\u7F6E\u7D20\u6750 - \u573A\u666F\u5217\u8868 "),
87
+ createVNode(_sfc_main$3, {
88
+ "outside-filter": outsideFilter.value,
89
+ sceniro,
90
+ onConfirm: handleConfirm
91
+ }, {
92
+ item: withCtx(({ item }) => [
93
+ renderSlot(_ctx.$slots, "item", { item })
94
+ ]),
95
+ _: 2
96
+ }, 1032, ["outside-filter", "sceniro"])
97
+ ], 512)), [
98
+ [vShow, [sceniro.classify_id, ""].includes(choseScen.value)]
99
+ ]) : createCommentVNode("v-if", true)
100
+ ], 64);
101
+ }), 128))
102
+ ]),
103
+ _: 3
104
+ }, 8, ["loading", "is-empty"]);
105
+ };
106
+ }
107
+ });
108
+ export { _sfc_main as default };
@@ -0,0 +1,19 @@
1
+ import { defineComponent, inject, openBlock, createBlock, withCtx, unref, normalizeProps, mergeProps, createCommentVNode } from "vue";
2
+ import videoThumb from "../../../../videoThumb/index.js";
3
+ import _sfc_main$1 from "../ListWraper.js";
4
+ const _sfc_main = defineComponent({
5
+ __name: "index",
6
+ setup(__props) {
7
+ const videoThumbOptions = inject("videoThumbOptions");
8
+ return (_ctx, _cache) => {
9
+ return openBlock(), createBlock(_sfc_main$1, null, {
10
+ "footer-extra": withCtx(() => []),
11
+ default: withCtx(() => [
12
+ unref(videoThumbOptions) ? (openBlock(), createBlock(unref(videoThumb), normalizeProps(mergeProps({ key: 0 }, unref(videoThumbOptions))), null, 16)) : createCommentVNode("v-if", true)
13
+ ]),
14
+ _: 1
15
+ });
16
+ };
17
+ }
18
+ });
19
+ export { _sfc_main as default };
@@ -0,0 +1,60 @@
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
+ isEmpty: { type: Boolean },
23
+ loading: { type: Boolean }
24
+ },
25
+ setup(__props) {
26
+ return (_ctx, _cache) => {
27
+ return openBlock(), createElementBlock("div", _hoisted_1, [
28
+ _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_2, [
29
+ renderSlot(_ctx.$slots, "header")
30
+ ])) : createCommentVNode("v-if", true),
31
+ createElementVNode("div", _hoisted_3, [
32
+ _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_4, [
33
+ createVNode(unref(Spin), {
34
+ tip: "\u7D20\u6750\u52A0\u8F7D\u4E2D",
35
+ loading: true
36
+ })
37
+ ])) : _ctx.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_5, [
38
+ createVNode(_sfc_main$1, { type: "empty" })
39
+ ])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
40
+ createCommentVNode(" \u5185\u5BB9\u6837\u5F0F\u4E00\uFF1A\u6805\u683C\u6837\u5F0F\uFF0C\u5916\u90E8 props \u4F20 list "),
41
+ createVNode(unref(Scrollbar), {
42
+ "outer-style": { height: "100%" },
43
+ style: { "height": "100%", "overflow": "auto" }
44
+ }, {
45
+ default: withCtx(() => [
46
+ renderSlot(_ctx.$slots, "default")
47
+ ]),
48
+ _: 3
49
+ })
50
+ ], 2112))
51
+ ]),
52
+ createElementVNode("div", _hoisted_6, [
53
+ renderSlot(_ctx.$slots, "footer"),
54
+ renderSlot(_ctx.$slots, "footer-extra")
55
+ ])
56
+ ]);
57
+ };
58
+ }
59
+ });
60
+ export { _sfc_main as default };