@cmstops/pro-compo 0.3.67 → 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.
Files changed (88) hide show
  1. package/dist/index.css +139 -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/contentDetailList/components/CustomWrp/CustomItem.js +15 -9
  6. package/es/contentDetailList/style/CustomItem.less +18 -0
  7. package/es/contentDetailList/style/index.css +14 -0
  8. package/es/contentDetailList/style/index.less +1 -0
  9. package/es/hooks/useAttachement.d.ts +14 -6
  10. package/es/hooks/useAttachement.js +15 -1
  11. package/es/hooks/useLocalStorage.d.ts +1 -0
  12. package/es/hooks/useLocalStorage.js +2 -1
  13. package/es/index.css +139 -79
  14. package/es/selectResourceModal/assets/images/sys_load_more.js +2 -0
  15. package/es/selectResourceModal/component.js +71 -170
  16. package/es/selectResourceModal/components/{ListCardWrapper/index.js → List/ListCardWrapper.js} +13 -11
  17. package/es/selectResourceModal/components/List/ListLocal/index.js +92 -0
  18. package/es/selectResourceModal/components/{ListFilter/index.js → List/ListNormal/Filter.js} +14 -14
  19. package/es/selectResourceModal/components/List/ListNormal/index.js +77 -0
  20. package/es/selectResourceModal/components/List/ListSystem/Filter.d.ts +0 -0
  21. package/es/selectResourceModal/components/List/ListSystem/Filter.js +141 -0
  22. package/es/selectResourceModal/components/List/ListSystem/SubList.d.ts +0 -0
  23. package/es/selectResourceModal/components/List/ListSystem/SubList.js +67 -0
  24. package/es/selectResourceModal/components/List/ListSystem/index.d.ts +0 -0
  25. package/es/selectResourceModal/components/List/ListSystem/index.js +109 -0
  26. package/es/selectResourceModal/components/List/ListWraper.d.ts +0 -0
  27. package/es/selectResourceModal/components/List/ListWraper.js +61 -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 +32 -0
  33. package/es/selectResourceModal/scripts/useResourceSelect.js +7 -3
  34. package/es/selectResourceModal/scripts/useTabFilter.d.ts +21 -0
  35. package/es/selectResourceModal/scripts/useTabFilter.js +37 -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 +163 -0
  39. package/es/selectThumb/component.js +25 -13
  40. package/es/utils/filter.js +0 -1
  41. package/lib/baseFilter/component.js +6 -1
  42. package/lib/config.js +1 -1
  43. package/lib/contentDetailList/components/CustomWrp/CustomItem.js +14 -8
  44. package/lib/contentDetailList/style/CustomItem.less +18 -0
  45. package/lib/contentDetailList/style/index.css +14 -0
  46. package/lib/contentDetailList/style/index.less +1 -0
  47. package/lib/hooks/useAttachement.js +16 -0
  48. package/lib/hooks/useLocalStorage.js +2 -1
  49. package/lib/index.css +139 -79
  50. package/lib/selectResourceModal/assets/images/sys_load_more.js +3 -0
  51. package/lib/selectResourceModal/component.js +71 -170
  52. package/lib/selectResourceModal/components/{ListCardWrapper/index.js → List/ListCardWrapper.js} +12 -10
  53. package/lib/selectResourceModal/components/List/ListLocal/index.js +93 -0
  54. package/lib/selectResourceModal/components/{ListFilter/index.js → List/ListNormal/Filter.js} +15 -15
  55. package/lib/selectResourceModal/components/List/ListNormal/index.js +78 -0
  56. package/lib/selectResourceModal/components/List/ListSystem/Filter.js +142 -0
  57. package/lib/selectResourceModal/components/List/ListSystem/SubList.js +68 -0
  58. package/lib/selectResourceModal/components/List/ListSystem/index.js +110 -0
  59. package/lib/selectResourceModal/components/List/ListWraper.js +62 -0
  60. package/lib/selectResourceModal/components/ListTabs/index.js +8 -17
  61. package/lib/selectResourceModal/{components/ListFilter/scripts/api.js → scripts/selectionApis.js} +8 -1
  62. package/lib/selectResourceModal/scripts/useCompoLf.js +33 -0
  63. package/lib/selectResourceModal/scripts/useResourceSelect.js +7 -3
  64. package/lib/selectResourceModal/scripts/useTabFilter.js +38 -0
  65. package/lib/selectResourceModal/style/index.css +125 -79
  66. package/lib/selectResourceModal/style/index.less +3 -32
  67. package/lib/selectResourceModal/style/list.less +163 -0
  68. package/lib/selectThumb/component.js +25 -13
  69. package/lib/utils/filter.js +0 -1
  70. package/package.json +3 -3
  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/index.d.ts → List/ListCardWrapper.d.ts} +0 -0
  83. /package/es/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.d.ts +0 -0
  84. /package/es/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.js +0 -0
  85. /package/es/selectResourceModal/components/{ListContent → List/ListLocal}/index.d.ts +0 -0
  86. /package/es/selectResourceModal/components/{ListContentLocal/index.d.ts → List/ListNormal/Filter.d.ts} +0 -0
  87. /package/es/selectResourceModal/components/{ListFilter → List/ListNormal}/index.d.ts +0 -0
  88. /package/lib/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.js +0 -0
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var filter = require("../../../../utils/filter.js");
5
+ var useSelection = require("../../../../hooks/useSelection.js");
6
+ var selectionApis = require("../../../scripts/selectionApis.js");
7
+ const _hoisted_1 = { class: "list-filter-wrapper" };
8
+ const _hoisted_2 = { class: "list-filter" };
9
+ const _hoisted_3 = { class: "filter-list" };
10
+ const _hoisted_4 = { style: { "width": "200px" } };
11
+ const _hoisted_5 = { class: "filter-item" };
12
+ const _hoisted_6 = {
13
+ class: "filter-item",
14
+ style: { "width": "120px" }
15
+ };
16
+ const _sfc_main = vue.defineComponent({
17
+ __name: "Filter",
18
+ emits: ["change", "changeScen"],
19
+ setup(__props, { emit: __emit }) {
20
+ const emit = __emit;
21
+ const baseAPI = vue.inject("baseAPI");
22
+ const sysTag = vue.inject("mediaUseType");
23
+ const resourceRate = filter.rateOptions.value;
24
+ const { options, loading, load } = useSelection({
25
+ labelStr: "scenario_name",
26
+ valueStr: "classify_id",
27
+ func: async () => {
28
+ if (!baseAPI)
29
+ return Promise.reject(new Error("baseAPI \u4E0D\u5B58\u5728"));
30
+ const { code, message } = await selectionApis.getSysRsClassifyList(
31
+ baseAPI,
32
+ (sysTag == null ? void 0 : sysTag.value) || 1
33
+ );
34
+ if (code !== 0)
35
+ return Promise.reject(new Error(message));
36
+ return message.classifies;
37
+ }
38
+ });
39
+ const originFilter = {
40
+ wh_rate: "",
41
+ keyword: "",
42
+ limit: 9
43
+ };
44
+ const filter$1 = vue.ref(JSON.parse(JSON.stringify(originFilter)));
45
+ const classify_id = vue.ref("");
46
+ const changeScen = () => emit("changeScen", classify_id.value);
47
+ const handleReset = () => {
48
+ filter$1.value = JSON.parse(JSON.stringify(originFilter));
49
+ classify_id.value = "";
50
+ changeScen();
51
+ };
52
+ const isEmpty = vue.computed(() => {
53
+ return Object.keys(filter$1.value).every((key) => {
54
+ return filter$1.value[key] === originFilter[key];
55
+ });
56
+ });
57
+ vue.watch(
58
+ () => filter$1.value,
59
+ () => {
60
+ const result = { ...filter$1.value };
61
+ emit("change", result);
62
+ },
63
+ { deep: true, immediate: true }
64
+ );
65
+ vue.watch(
66
+ () => classify_id.value,
67
+ () => changeScen()
68
+ );
69
+ vue.onMounted(() => {
70
+ load();
71
+ });
72
+ return (_ctx, _cache) => {
73
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
74
+ vue.createElementVNode("div", _hoisted_2, [
75
+ vue.createElementVNode("div", _hoisted_3, [
76
+ vue.createCommentVNode(" \u5173\u952E\u8BCD "),
77
+ vue.createElementVNode("div", _hoisted_4, [
78
+ vue.createVNode(vue.unref(webVue.Input), {
79
+ modelValue: filter$1.value.keyword,
80
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter$1.value.keyword = $event),
81
+ "allow-clear": "",
82
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"
83
+ }, null, 8, ["modelValue"])
84
+ ]),
85
+ vue.createCommentVNode(" \u7D20\u6750\u7C7B\u578B "),
86
+ vue.createElementVNode("div", _hoisted_5, [
87
+ vue.createVNode(vue.unref(webVue.Select), {
88
+ modelValue: classify_id.value,
89
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => classify_id.value = $event),
90
+ loading: vue.unref(loading),
91
+ "allow-clear": "",
92
+ placeholder: "\u7C7B\u578B"
93
+ }, {
94
+ default: vue.withCtx(() => [
95
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(options), (item) => {
96
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
97
+ key: item.value,
98
+ label: item.label,
99
+ value: item.value
100
+ }, null, 8, ["label", "value"]);
101
+ }), 128))
102
+ ]),
103
+ _: 1
104
+ }, 8, ["modelValue", "loading"])
105
+ ]),
106
+ vue.createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u6765\u6E90 "),
107
+ vue.createElementVNode("div", _hoisted_6, [
108
+ vue.createVNode(vue.unref(webVue.Select), {
109
+ modelValue: filter$1.value.wh_rate,
110
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter$1.value.wh_rate = $event),
111
+ "allow-clear": "",
112
+ placeholder: "\u56FE\u7247\u6BD4\u4F8B"
113
+ }, {
114
+ default: vue.withCtx(() => [
115
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(resourceRate), (item) => {
116
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
117
+ key: item.value,
118
+ label: item.label,
119
+ value: item.value
120
+ }, null, 8, ["label", "value"]);
121
+ }), 128))
122
+ ]),
123
+ _: 1
124
+ }, 8, ["modelValue"])
125
+ ]),
126
+ !isEmpty.value ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
127
+ key: 0,
128
+ type: "text",
129
+ onClick: handleReset
130
+ }, {
131
+ default: vue.withCtx(() => [
132
+ vue.createTextVNode(" \u91CD\u7F6E ")
133
+ ]),
134
+ _: 1
135
+ })) : vue.createCommentVNode("v-if", true)
136
+ ])
137
+ ])
138
+ ]);
139
+ };
140
+ }
141
+ });
142
+ module.exports = _sfc_main;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var sys_load_more = require("../../../assets/images/sys_load_more.js");
4
+ var useAttachement = require("../../../../hooks/useAttachement.js");
5
+ const _hoisted_1 = { class: "list-item-grid" };
6
+ const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("img", { src: sys_load_more }, null, -1);
7
+ const _sfc_main = vue.defineComponent({
8
+ __name: "SubList",
9
+ props: {
10
+ sceniro: {},
11
+ outsideFilter: {}
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const baseApi = vue.inject("baseAPI");
16
+ const fileList = vue.ref([]);
17
+ const fileCount = vue.ref(0);
18
+ const showMore = vue.computed(
19
+ () => fileList.value.length < props.sceniro.count
20
+ );
21
+ vue.watch(
22
+ () => props.sceniro,
23
+ () => {
24
+ fileList.value = props.sceniro.data;
25
+ fileCount.value = props.sceniro.count;
26
+ },
27
+ { deep: true, immediate: true }
28
+ );
29
+ const loadMore = async () => {
30
+ const { sceniro } = props;
31
+ const { outsideFilter } = props;
32
+ const res = await useAttachement.getSysRsPage(baseApi, {
33
+ sys_classify: sceniro.classify_id,
34
+ sys_tag: sceniro.sys_tag,
35
+ keyword: outsideFilter.keyword || "",
36
+ wh_rate: outsideFilter.wh_rate || "",
37
+ limit: 10,
38
+ offset: fileList.value.length
39
+ });
40
+ if (res.code !== 0)
41
+ return;
42
+ fileCount.value = res.message.count;
43
+ fileList.value = fileList.value.concat(res.message.data);
44
+ };
45
+ return (_ctx, _cache) => {
46
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
47
+ vue.createCommentVNode(" \u6587\u4EF6 "),
48
+ vue.createElementVNode("div", _hoisted_1, [
49
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fileList.value, (item) => {
50
+ return vue.renderSlot(_ctx.$slots, "item", {
51
+ key: item.classify_id,
52
+ item
53
+ });
54
+ }), 128)),
55
+ showMore.value ? (vue.openBlock(), vue.createElementBlock("div", {
56
+ key: 0,
57
+ class: "item-load-more",
58
+ onClick: loadMore
59
+ }, [
60
+ _hoisted_2,
61
+ vue.createTextVNode(" \u70B9\u51FB\u52A0\u8F7D\u66F4\u591A ")
62
+ ])) : vue.createCommentVNode("v-if", true)
63
+ ])
64
+ ], 2112);
65
+ };
66
+ }
67
+ });
68
+ module.exports = _sfc_main;
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var ListWraper = require("../ListWraper.js");
4
+ var Filter = require("./Filter.js");
5
+ var SubList = require("./SubList.js");
6
+ var useAttachement = require("../../../../hooks/useAttachement.js");
7
+ const _hoisted_1 = {
8
+ key: 0,
9
+ class: "scen-module"
10
+ };
11
+ const _hoisted_2 = { class: "title" };
12
+ const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("div", { class: "line" }, null, -1);
13
+ const _sfc_main = vue.defineComponent({
14
+ __name: "index",
15
+ emits: ["confirm"],
16
+ setup(__props, { emit: __emit }) {
17
+ const emits = __emit;
18
+ const mediaUseType = vue.inject("mediaUseType");
19
+ const baseApi = vue.inject("baseAPI");
20
+ const scenList = vue.ref([]);
21
+ const choseScen = vue.ref("");
22
+ const outsideFilter = vue.ref(null);
23
+ const loading = vue.ref(true);
24
+ const handleSearch = async (filter) => {
25
+ loading.value = true;
26
+ try {
27
+ outsideFilter.value = filter;
28
+ const res = await useAttachement.getSysRsByTag(baseApi, {
29
+ ...filter,
30
+ sys_tag: mediaUseType == null ? void 0 : mediaUseType.value
31
+ });
32
+ if (res.code !== 0)
33
+ return;
34
+ scenList.value = res.message.Results;
35
+ } catch (e) {
36
+ console.log("\u83B7\u53D6\u5185\u7F6E\u7D20\u6750\u5931\u8D25", e);
37
+ } finally {
38
+ loading.value = false;
39
+ }
40
+ };
41
+ const handleChangeScen = (scen) => {
42
+ choseScen.value = scen;
43
+ };
44
+ const handleConfirm = (data) => {
45
+ data[0].realUrl = data[0].url;
46
+ emits("confirm", data);
47
+ };
48
+ const isEmpty = vue.computed(() => {
49
+ if (!scenList.value.length)
50
+ return true;
51
+ if (choseScen.value !== "") {
52
+ const scen = scenList.value.find(
53
+ (item) => item.classify_id === choseScen.value
54
+ );
55
+ return scen.data === null;
56
+ }
57
+ return !scenList.value.some((item) => item.data && item.data.length > 0);
58
+ });
59
+ vue.onMounted(() => {
60
+ handleSearch({ sys_tag: (mediaUseType == null ? void 0 : mediaUseType.value) || 1, limit: 9 });
61
+ });
62
+ return (_ctx, _cache) => {
63
+ return vue.openBlock(), vue.createBlock(ListWraper, {
64
+ list: _ctx.list,
65
+ loading: loading.value,
66
+ "is-empty": isEmpty.value
67
+ }, {
68
+ "footer-extra": vue.withCtx(() => [
69
+ vue.renderSlot(_ctx.$slots, "footer-extra")
70
+ ]),
71
+ header: vue.withCtx(() => [
72
+ vue.createCommentVNode(" \u5207\u6362\u573A\u666F "),
73
+ vue.createVNode(Filter, {
74
+ onChange: handleSearch,
75
+ onChangeScen: handleChangeScen
76
+ })
77
+ ]),
78
+ default: vue.withCtx(() => [
79
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(scenList.value, (sceniro) => {
80
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
81
+ key: sceniro.classify_id
82
+ }, [
83
+ sceniro.data && sceniro.data.length > 0 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
84
+ vue.createElementVNode("div", _hoisted_2, [
85
+ _hoisted_3,
86
+ vue.createTextVNode(" " + vue.toDisplayString(sceniro.scenario_name), 1)
87
+ ]),
88
+ vue.createCommentVNode(" \u5185\u7F6E\u7D20\u6750 - \u573A\u666F\u5217\u8868 "),
89
+ vue.createVNode(SubList, {
90
+ "outside-filter": outsideFilter.value,
91
+ sceniro,
92
+ onConfirm: handleConfirm
93
+ }, {
94
+ item: vue.withCtx(({ item }) => [
95
+ vue.renderSlot(_ctx.$slots, "item", { item })
96
+ ]),
97
+ _: 2
98
+ }, 1032, ["outside-filter", "sceniro"])
99
+ ], 512)), [
100
+ [vue.vShow, [sceniro.classify_id, ""].includes(choseScen.value)]
101
+ ]) : vue.createCommentVNode("v-if", true)
102
+ ], 64);
103
+ }), 128))
104
+ ]),
105
+ _: 3
106
+ }, 8, ["list", "loading", "is-empty"]);
107
+ };
108
+ }
109
+ });
110
+ module.exports = _sfc_main;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var component = require("../../../emptyData/component.js");
5
+ const _hoisted_1 = { class: "resource-list" };
6
+ const _hoisted_2 = {
7
+ key: 0,
8
+ class: "resource-list-header"
9
+ };
10
+ const _hoisted_3 = { class: "resource-list-content" };
11
+ const _hoisted_4 = {
12
+ key: 0,
13
+ class: "resource-list-content-loading"
14
+ };
15
+ const _hoisted_5 = {
16
+ key: 1,
17
+ class: "resource-list-content-empty"
18
+ };
19
+ const _hoisted_6 = { class: "resource-list-footer" };
20
+ const _sfc_main = vue.defineComponent({
21
+ __name: "ListWraper",
22
+ props: {
23
+ list: {},
24
+ isEmpty: { type: Boolean },
25
+ loading: { type: Boolean }
26
+ },
27
+ setup(__props) {
28
+ return (_ctx, _cache) => {
29
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
30
+ _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
31
+ vue.renderSlot(_ctx.$slots, "header")
32
+ ])) : vue.createCommentVNode("v-if", true),
33
+ vue.createElementVNode("div", _hoisted_3, [
34
+ _ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
35
+ vue.createVNode(vue.unref(webVue.Spin), {
36
+ tip: "\u7D20\u6750\u52A0\u8F7D\u4E2D",
37
+ loading: true
38
+ })
39
+ ])) : _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
40
+ vue.createVNode(component, { type: "empty" })
41
+ ])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
42
+ vue.createCommentVNode(" \u5185\u5BB9\u6837\u5F0F\u4E00\uFF1A\u6805\u683C\u6837\u5F0F\uFF0C\u5916\u90E8 props \u4F20 list "),
43
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
44
+ "outer-style": { height: "100%" },
45
+ style: { "height": "100%", "overflow": "auto" }
46
+ }, {
47
+ default: vue.withCtx(() => [
48
+ vue.renderSlot(_ctx.$slots, "default")
49
+ ]),
50
+ _: 3
51
+ })
52
+ ], 2112))
53
+ ]),
54
+ vue.createElementVNode("div", _hoisted_6, [
55
+ vue.renderSlot(_ctx.$slots, "footer"),
56
+ vue.renderSlot(_ctx.$slots, "footer-extra")
57
+ ])
58
+ ]);
59
+ };
60
+ }
61
+ });
62
+ module.exports = _sfc_main;
@@ -6,7 +6,8 @@ const _hoisted_1 = { class: "resource-select-header" };
6
6
  const _sfc_main = vue.defineComponent({
7
7
  __name: "index",
8
8
  props: {
9
- modelValue: {}
9
+ modelValue: {},
10
+ tabList: {}
10
11
  },
11
12
  emits: ["update:model-value", "change", "close"],
12
13
  setup(__props, { emit: __emit }) {
@@ -37,22 +38,12 @@ const _sfc_main = vue.defineComponent({
37
38
  })
38
39
  ]),
39
40
  default: vue.withCtx(() => [
40
- vue.createVNode(vue.unref(webVue.TabPane), {
41
- key: "all",
42
- title: "\u5168\u90E8\u7D20\u6750"
43
- }),
44
- vue.createVNode(vue.unref(webVue.TabPane), {
45
- key: "my",
46
- title: "\u6211\u7684\u7D20\u6750"
47
- }),
48
- vue.createVNode(vue.unref(webVue.TabPane), {
49
- key: "remind",
50
- title: "\u63D0\u9192\u6211\u7684"
51
- }),
52
- vue.createVNode(vue.unref(webVue.TabPane), {
53
- key: "local",
54
- title: "\u672C\u5730\u7D20\u6750"
55
- })
41
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tabList, (tab) => {
42
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
43
+ key: tab.key,
44
+ title: tab.title
45
+ }, null, 8, ["title"]);
46
+ }), 128))
56
47
  ]),
57
48
  _: 1
58
49
  }, 8, ["active-key"])
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- var request = require("../../../../utils/request.js");
3
+ var request = require("../../utils/request.js");
4
4
  function getAccountList(BASE_API, id, query) {
5
5
  return request(BASE_API, {
6
6
  url: `/poplar/v2/accounts/${id}`,
@@ -8,4 +8,11 @@ function getAccountList(BASE_API, id, query) {
8
8
  params: query
9
9
  });
10
10
  }
11
+ function getSysRsClassifyList(BASE_API, sys_tag) {
12
+ return request(BASE_API, {
13
+ url: `/poplar/v3/sys_attachment/scenario_classifies?sys_tag=${sys_tag}`,
14
+ method: "get"
15
+ });
16
+ }
11
17
  exports.getAccountList = getAccountList;
18
+ exports.getSysRsClassifyList = getSysRsClassifyList;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var config = require("../../config.js");
4
+ function useCompoentLifycycle(props, emits) {
5
+ const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
6
+ const wrapProps = vue.computed(() => {
7
+ if (props.wrap === "drawer") {
8
+ return {
9
+ class: "resource-select-drawer",
10
+ header: false,
11
+ width: "1024px",
12
+ footer: false
13
+ };
14
+ }
15
+ return {
16
+ bodyClass: "resource-select-modal-body",
17
+ width: "986px",
18
+ closable: false,
19
+ hideTitle: false,
20
+ footer: false
21
+ };
22
+ });
23
+ vue.provide("baseAPI", BASE_API);
24
+ vue.provide("filterOptions", vue.computed(() => props.filterOptions));
25
+ vue.provide("userInfo", vue.computed(() => props.userInfo));
26
+ vue.provide("mediaUseType", vue.computed(() => props.mediaUseType));
27
+ return {
28
+ wrapProps,
29
+ close: () => emits("update:visible", false),
30
+ submit: (data) => emits("submit", JSON.parse(JSON.stringify(data)))
31
+ };
32
+ }
33
+ module.exports = useCompoentLifycycle;
@@ -3,11 +3,15 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  var vue = require("vue");
4
4
  function useResourceSelect(props) {
5
5
  const selected = vue.ref([]);
6
- const selectedKeys = vue.computed(() => selected.value.map((item) => item.id));
6
+ const selectedKeys = vue.computed(
7
+ () => selected.value.map((item) => item.id || item.url)
8
+ );
7
9
  const disableSelect = vue.computed(() => props.maxcount && selected.value.length >= props.maxcount);
8
10
  function handleSelect(params) {
9
- const { id } = params;
10
- const index = selected.value.findIndex((item) => item.id === id);
11
+ const { id, url } = params;
12
+ const index = selected.value.findIndex((item) => {
13
+ return item.id && item.id === id || item.url === url;
14
+ });
11
15
  if (index > -1)
12
16
  selected.value.splice(index, 1);
13
17
  else
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var index = require("../components/List/ListNormal/index.js");
4
+ var index$2 = require("../components/List/ListSystem/index.js");
5
+ var index$1 = require("../components/List/ListLocal/index.js");
6
+ const DEFAULT_TABS = [
7
+ "all",
8
+ "my",
9
+ "remind",
10
+ "local"
11
+ ].join(",");
12
+ const TAB_DICT = {
13
+ ["all"]: { title: "\u5168\u90E8\u7D20\u6750", component: index, usePage: true },
14
+ ["my"]: { title: "\u6211\u7684\u7D20\u6750", component: index, usePage: true },
15
+ ["remind"]: { title: "\u63D0\u9192\u6211\u7684", component: index, usePage: true },
16
+ ["local"]: { title: "\u672C\u5730\u7D20\u6750", component: index$1, usePage: false },
17
+ ["system"]: { title: "\u5185\u7F6E\u7D20\u6750", component: index$2, usePage: false },
18
+ ["ai"]: { title: "AI\u4F18\u9009", component: index$2, usePage: false },
19
+ ["video"]: { title: "\u89C6\u9891\u5C01\u9762", component: index$2, usePage: false }
20
+ };
21
+ function useTabFilter(props) {
22
+ const activeKey = vue.ref("all");
23
+ const curTab = vue.computed(() => TAB_DICT[activeKey.value]);
24
+ const tabKeyList = vue.computed(() => {
25
+ const keys = (props.tabKeys || DEFAULT_TABS).split(",");
26
+ return keys.map((key) => ({
27
+ key,
28
+ title: TAB_DICT[key].title
29
+ }));
30
+ });
31
+ const activeComponent = vue.computed(() => curTab.value.component);
32
+ return {
33
+ activeKey,
34
+ activeComponent,
35
+ tabKeyList
36
+ };
37
+ }
38
+ module.exports = useTabFilter;