@cmstops/pro-compo 0.1.26 → 0.1.29

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 (97) hide show
  1. package/dist/index.css +100 -65
  2. package/dist/index.min.css +1 -1
  3. package/es/contentDetailList/components/Content/DocItem/index.js +1 -1
  4. package/es/contentDetailList/components/Content/DocMpItem/index.js +1 -1
  5. package/es/contentDetailList/components/Content/KongoNavItem/index.js +3 -3
  6. package/es/contentDetailList/components/Content/MaccountItem/index.js +30 -23
  7. package/es/contentDetailList/style/ComoItem.less +4 -0
  8. package/es/contentDetailList/style/ContentListItem.less +4 -0
  9. package/es/contentDetailList/style/DocItem.less +4 -6
  10. package/es/contentDetailList/style/DocMpItem.less +4 -6
  11. package/es/contentDetailList/style/KongoNavItem.less +4 -0
  12. package/es/contentDetailList/style/LiveItem.less +4 -0
  13. package/es/contentDetailList/style/MaccountItem.less +4 -0
  14. package/es/contentDetailList/style/index.css +28 -58
  15. package/es/contentDetailList/style/index.less +0 -1
  16. package/es/contentModal/component.js +165 -5
  17. package/es/contentModal/components/CompoList/index.js +13 -6
  18. package/es/contentModal/components/ContentList/MediaFilter/index.js +112 -0
  19. package/es/contentModal/components/ContentList/index.d.ts +0 -0
  20. package/es/contentModal/components/ContentList/index.js +269 -0
  21. package/es/contentModal/components/LiveList/MediaFilter/index.d.ts +0 -0
  22. package/es/contentModal/components/LiveList/MediaFilter/index.js +74 -0
  23. package/es/contentModal/components/LiveList/index.d.ts +0 -0
  24. package/es/contentModal/components/LiveList/index.js +227 -0
  25. package/es/contentModal/components/MpAccountList/MpAccountFilter/index.d.ts +0 -0
  26. package/es/contentModal/components/MpAccountList/MpAccountFilter/index.js +62 -0
  27. package/es/contentModal/components/MpAccountList/index.d.ts +0 -0
  28. package/es/contentModal/components/MpAccountList/index.js +222 -0
  29. package/es/contentModal/components/MpContentList/MediaFilter/index.d.ts +0 -0
  30. package/es/contentModal/components/MpContentList/MediaFilter/index.js +85 -0
  31. package/es/contentModal/components/MpContentList/index.d.ts +0 -0
  32. package/es/contentModal/components/MpContentList/index.js +214 -0
  33. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +176 -12
  34. package/es/contentModal/components/ViewAllColumn/index.js +33 -14
  35. package/es/contentModal/images/user.js +2 -0
  36. package/es/contentModal/script/api.d.ts +3 -0
  37. package/es/contentModal/script/api.js +22 -1
  38. package/es/contentModal/style/ViewAllColumn.less +51 -31
  39. package/es/contentModal/style/index.css +21 -7
  40. package/es/dataTags/component.d.ts +0 -0
  41. package/es/{contentDetailList/components/DocTags/index.js → dataTags/component.js} +10 -8
  42. package/es/dataTags/index.d.ts +2 -0
  43. package/es/dataTags/index.js +7 -0
  44. package/es/dataTags/style/css.js +1 -0
  45. package/es/dataTags/style/index.css +51 -0
  46. package/es/dataTags/style/index.d.ts +1 -0
  47. package/es/dataTags/style/index.js +1 -0
  48. package/{lib/contentDetailList/style/DocTags.less → es/dataTags/style/index.less} +12 -8
  49. package/es/emptyData/component.js +5 -5
  50. package/es/index.css +100 -65
  51. package/es/index.d.ts +1 -0
  52. package/es/index.js +1 -0
  53. package/es/index.less +1 -0
  54. package/es/utils/typeMap.d.ts +6 -15
  55. package/es/utils/typeMap.js +21 -1
  56. package/lib/contentDetailList/components/Content/DocItem/index.js +4 -4
  57. package/lib/contentDetailList/components/Content/DocMpItem/index.js +2 -2
  58. package/lib/contentDetailList/components/Content/KongoNavItem/index.js +4 -4
  59. package/lib/contentDetailList/components/Content/MaccountItem/index.js +30 -23
  60. package/lib/contentDetailList/style/ComoItem.less +4 -0
  61. package/lib/contentDetailList/style/ContentListItem.less +4 -0
  62. package/lib/contentDetailList/style/DocItem.less +4 -6
  63. package/lib/contentDetailList/style/DocMpItem.less +4 -6
  64. package/lib/contentDetailList/style/KongoNavItem.less +4 -0
  65. package/lib/contentDetailList/style/LiveItem.less +4 -0
  66. package/lib/contentDetailList/style/MaccountItem.less +4 -0
  67. package/lib/contentDetailList/style/index.css +28 -58
  68. package/lib/contentDetailList/style/index.less +0 -1
  69. package/lib/contentModal/component.js +165 -5
  70. package/lib/contentModal/components/CompoList/index.js +15 -8
  71. package/lib/contentModal/components/ContentList/MediaFilter/index.js +113 -0
  72. package/lib/contentModal/components/ContentList/index.js +270 -0
  73. package/lib/contentModal/components/LiveList/MediaFilter/index.js +75 -0
  74. package/lib/contentModal/components/LiveList/index.js +228 -0
  75. package/lib/contentModal/components/MpAccountList/MpAccountFilter/index.js +63 -0
  76. package/lib/contentModal/components/MpAccountList/index.js +223 -0
  77. package/lib/contentModal/components/MpContentList/MediaFilter/index.js +86 -0
  78. package/lib/contentModal/components/MpContentList/index.js +215 -0
  79. package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +175 -11
  80. package/lib/contentModal/components/ViewAllColumn/index.js +33 -14
  81. package/lib/contentModal/images/user.js +3 -0
  82. package/lib/contentModal/script/api.js +24 -0
  83. package/lib/contentModal/style/ViewAllColumn.less +51 -31
  84. package/lib/contentModal/style/index.css +21 -7
  85. package/lib/{contentDetailList/components/DocTags/index.js → dataTags/component.js} +10 -8
  86. package/lib/dataTags/index.js +8 -0
  87. package/lib/dataTags/style/css.js +2 -0
  88. package/lib/dataTags/style/index.css +51 -0
  89. package/lib/dataTags/style/index.js +2 -0
  90. package/{es/contentDetailList/style/DocTags.less → lib/dataTags/style/index.less} +12 -8
  91. package/lib/emptyData/component.js +4 -4
  92. package/lib/index.css +100 -65
  93. package/lib/index.js +2 -0
  94. package/lib/index.less +1 -0
  95. package/lib/utils/typeMap.js +22 -0
  96. package/package.json +1 -1
  97. /package/es/{contentDetailList/components/DocTags → contentModal/components/ContentList/MediaFilter}/index.d.ts +0 -0
@@ -0,0 +1,270 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var component = require("../../../typeIcons/component.js");
5
+ var index = require("./MediaFilter/index.js");
6
+ var batch = require("../../../hooks/batch.js");
7
+ var index$1 = require("../../../utils/index.js");
8
+ var api = require("../../script/api.js");
9
+ var typeMap = require("../../../utils/typeMap.js");
10
+ const _hoisted_1 = { class: "view-all-column-container" };
11
+ const _hoisted_2 = { class: "content-table-view" };
12
+ const _hoisted_3 = { class: "title-span" };
13
+ const _hoisted_4 = ["onClick"];
14
+ const _hoisted_5 = { class: "title" };
15
+ const _hoisted_6 = { class: "bottom-view" };
16
+ const _hoisted_7 = { class: "left" };
17
+ const _sfc_main = vue.defineComponent({
18
+ ...{ name: "ContentList" },
19
+ __name: "index",
20
+ props: {
21
+ type: { default: "all" },
22
+ maxSelect: {},
23
+ outsideSelectData: {},
24
+ defaultSelectedData: {},
25
+ userInfo: {}
26
+ },
27
+ emits: ["change"],
28
+ setup(__props, { emit }) {
29
+ const props = __props;
30
+ const _maxSelect = props.maxSelect || 100;
31
+ const selectedData = vue.ref([]);
32
+ const groupData = vue.ref([]);
33
+ const group_id = vue.ref("all");
34
+ const mediaFileData = vue.ref([]);
35
+ const dataLoading = vue.ref(false);
36
+ const page = vue.ref({
37
+ index: 1,
38
+ size: 100,
39
+ total: 0
40
+ });
41
+ const filter = vue.ref(null);
42
+ const columns = [
43
+ {
44
+ title: "\u9891\u9053\u6807\u9898",
45
+ dataIndex: "title",
46
+ slotName: "title"
47
+ },
48
+ {
49
+ title: "\u9891\u9053\u7C7B\u578B",
50
+ dataIndex: "relation_type",
51
+ slotName: "relation_type"
52
+ },
53
+ {
54
+ title: "\u521B\u5EFA\u65F6\u95F4",
55
+ dataIndex: "created_at",
56
+ slotName: "created_at"
57
+ }
58
+ ];
59
+ const scrollPercent = { y: "100%" };
60
+ const tempSelectedData = vue.computed(() => {
61
+ return props.defaultSelectedData || [];
62
+ });
63
+ const search = (_filter) => {
64
+ if (_filter.keyword || _filter.relation_type) {
65
+ filter.value = { ..._filter };
66
+ } else {
67
+ filter.value = null;
68
+ }
69
+ page.value.index = 1;
70
+ loadData();
71
+ };
72
+ const loadData = async () => {
73
+ const gid = group_id.value;
74
+ if (!gid)
75
+ return;
76
+ let params = {
77
+ rid: props.userInfo.repository_id,
78
+ state: 1,
79
+ group_type: 0
80
+ };
81
+ if (props.type !== "all") {
82
+ params.relation_type = props.type;
83
+ }
84
+ if (filter.value) {
85
+ params = { ...params, ...filter.value };
86
+ }
87
+ if (gid !== "all") {
88
+ params.gid = gid;
89
+ }
90
+ dataLoading.value = true;
91
+ const { code, message } = await api.searchMlists(props.userInfo.BASE_API, params);
92
+ dataLoading.value = false;
93
+ if (code === 0) {
94
+ mediaFileData.value = message.map((v) => {
95
+ v.catalog = "contentList";
96
+ v.channel_type = 1;
97
+ v.target_id = v.id;
98
+ v.target_type = 6;
99
+ v.pub_time = index$1.dateYYYYDDMMHHmm(v.publish_at);
100
+ v.created_at = index$1.dateYYYYDDMMHHmm(v.created_at);
101
+ v.update_time = v.updated_at;
102
+ v.pub_user_alias = v.publish_user_alias;
103
+ v.creator_alias = v.creator_alias || v.author_alias;
104
+ v._type = 2;
105
+ switch (v.relation_type) {
106
+ case 0:
107
+ v._listType = "putongpindao";
108
+ break;
109
+ case 1:
110
+ v._listType = "lianjiepindao";
111
+ break;
112
+ case 2:
113
+ v._listType = "yinyongpindao";
114
+ break;
115
+ case 3:
116
+ v._listType = "zijipindao";
117
+ break;
118
+ }
119
+ return v;
120
+ }) || [];
121
+ }
122
+ };
123
+ const clickCheckbox = (e, record) => {
124
+ e.stopPropagation();
125
+ e.preventDefault();
126
+ selectData(record);
127
+ };
128
+ const selectTableCell = (record) => {
129
+ selectData(record);
130
+ };
131
+ const selectData = (record) => {
132
+ if (checkSameAdd(record)) {
133
+ webVue.Message.warning({ content: "\u8BF7\u52FF\u6DFB\u52A0\u91CD\u590D\u6570\u636E", duration: 3e3 });
134
+ return;
135
+ }
136
+ addDataToSelectedList(record);
137
+ };
138
+ const checkSameAdd = (record) => {
139
+ const selected = props.outsideSelectData;
140
+ if (!selected.length)
141
+ return false;
142
+ return selected.map((row) => row.id).includes(record.id);
143
+ };
144
+ const addDataToSelectedList = async (record) => {
145
+ const index2 = selectedData.value.findIndex((v) => v.id === record.id);
146
+ if (selectedData.value.length < _maxSelect) {
147
+ if (index2 === -1) {
148
+ selectedData.value.push(record);
149
+ } else {
150
+ selectedData.value.splice(index2, 1);
151
+ }
152
+ emitChange();
153
+ } else {
154
+ if (index2 === -1) {
155
+ selectedData.value.splice(selectedData.value.length - 1, 1);
156
+ selectedData.value.push(record);
157
+ } else {
158
+ selectedData.value.splice(index2, 1);
159
+ }
160
+ webVue.Message.warning({ content: "\u5DF2\u8FBE\u5230\u9009\u62E9\u6570\u91CF\u7684\u4E0A\u9650", duration: 3e3 });
161
+ emitChange();
162
+ }
163
+ };
164
+ const emitChange = () => {
165
+ emit("change", selectedData.value);
166
+ };
167
+ const getGroupData = async () => {
168
+ const params = {
169
+ rid: props.userInfo.repository_id,
170
+ cid: props.userInfo.default_wap_channel_id,
171
+ group_type: 0,
172
+ less: true,
173
+ active: true,
174
+ limit: 100,
175
+ offset: 0
176
+ };
177
+ const { code, message } = await api.getCategorylistsGroups(
178
+ props.userInfo.BASE_API,
179
+ params
180
+ );
181
+ if (code === 0 && message) {
182
+ const { groups } = message;
183
+ groupData.value = groups.map((v) => {
184
+ v._type = 1;
185
+ v.catalog = "group";
186
+ return v;
187
+ });
188
+ loadData();
189
+ }
190
+ };
191
+ const {
192
+ isItemChecked,
193
+ hoverBatchBox,
194
+ tableCellMouseEnter,
195
+ tableCellMouseLeave
196
+ } = batch();
197
+ vue.watch(
198
+ () => tempSelectedData.value,
199
+ (val) => {
200
+ selectedData.value = val;
201
+ }
202
+ );
203
+ vue.watch(
204
+ () => group_id.value,
205
+ () => {
206
+ loadData();
207
+ }
208
+ );
209
+ vue.onMounted(() => {
210
+ getGroupData();
211
+ });
212
+ return (_ctx, _cache) => {
213
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
214
+ vue.createVNode(index, {
215
+ group_id: group_id.value,
216
+ "onUpdate:group_id": _cache[0] || (_cache[0] = ($event) => group_id.value = $event),
217
+ groups: groupData.value,
218
+ type: props.type,
219
+ onSearch: search
220
+ }, null, 8, ["group_id", "groups", "type"]),
221
+ vue.createElementVNode("div", _hoisted_2, [
222
+ vue.createVNode(vue.unref(webVue.Table), {
223
+ columns,
224
+ scroll: scrollPercent,
225
+ pagination: false,
226
+ bordered: false,
227
+ data: mediaFileData.value,
228
+ loading: dataLoading.value,
229
+ onCellMouseEnter: vue.unref(tableCellMouseEnter),
230
+ onCellMouseLeave: vue.unref(tableCellMouseLeave),
231
+ onRowClick: selectTableCell
232
+ }, {
233
+ title: vue.withCtx(({ record }) => [
234
+ vue.createElementVNode("span", _hoisted_3, [
235
+ vue.unref(hoverBatchBox)(selectedData.value, record) ? (vue.openBlock(), vue.createElementBlock("span", {
236
+ key: 0,
237
+ onClick: vue.withModifiers(($event) => clickCheckbox($event, record), ["stop"])
238
+ }, [
239
+ vue.createVNode(vue.unref(webVue.Checkbox), {
240
+ class: "icon",
241
+ "model-value": vue.unref(isItemChecked)(selectedData.value, record)
242
+ }, null, 8, ["model-value"])
243
+ ], 8, _hoisted_4)) : (vue.openBlock(), vue.createBlock(component, {
244
+ key: 1,
245
+ class: "icon",
246
+ type: record.series
247
+ }, null, 8, ["type"])),
248
+ vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(record.title || record.alias || "--"), 1)
249
+ ])
250
+ ]),
251
+ relation_type: vue.withCtx(({ record }) => [
252
+ vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(typeMap.contentList_relation_type_map)[record.relation_type] || "--"), 1)
253
+ ]),
254
+ created_at: vue.withCtx(({ record }) => [
255
+ vue.createElementVNode("span", null, vue.toDisplayString(record.created_at), 1)
256
+ ]),
257
+ _: 1
258
+ }, 8, ["data", "loading", "onCellMouseEnter", "onCellMouseLeave"])
259
+ ]),
260
+ vue.createElementVNode("div", _hoisted_6, [
261
+ vue.createElementVNode("div", _hoisted_7, [
262
+ vue.renderSlot(_ctx.$slots, "store")
263
+ ]),
264
+ vue.renderSlot(_ctx.$slots, "options")
265
+ ])
266
+ ]);
267
+ };
268
+ }
269
+ });
270
+ module.exports = _sfc_main;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var typeMap = require("../../../../utils/typeMap.js");
5
+ const _hoisted_1 = { class: "media-filter-container" };
6
+ const _sfc_main = vue.defineComponent({
7
+ ...{ name: "MediaFilter" },
8
+ __name: "index",
9
+ props: {
10
+ group_id: {}
11
+ },
12
+ emits: ["update:group_id", "search"],
13
+ setup(__props, { emit }) {
14
+ const props = __props;
15
+ const filter = vue.ref({ type: "", name: "" });
16
+ vue.computed({
17
+ get() {
18
+ return props.group_id;
19
+ },
20
+ set(val) {
21
+ emit("update:group_id", val);
22
+ }
23
+ });
24
+ const typeOptions = vue.computed(() => {
25
+ const arr = Object.keys(typeMap.ilive_type_map).map((key) => {
26
+ return {
27
+ label: typeMap.ilive_type_map[key],
28
+ value: key
29
+ };
30
+ });
31
+ return [{ value: "", label: "\u5168\u90E8\u7C7B\u578B" }, ...arr];
32
+ });
33
+ const handleSearch = () => {
34
+ emit("search", filter.value);
35
+ };
36
+ vue.watch(filter.value, () => {
37
+ handleSearch();
38
+ });
39
+ return (_ctx, _cache) => {
40
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
41
+ vue.createVNode(vue.unref(webVue.Space), { size: "large" }, {
42
+ default: vue.withCtx(() => [
43
+ vue.createVNode(vue.unref(webVue.Select), {
44
+ modelValue: filter.value.type,
45
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.type = $event),
46
+ class: "filter-item",
47
+ placeholder: "\u76F4\u64AD\u7C7B\u578B"
48
+ }, {
49
+ default: vue.withCtx(() => [
50
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(typeOptions.value, (item) => {
51
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
52
+ key: item.value,
53
+ label: item.label,
54
+ value: item.value
55
+ }, null, 8, ["label", "value"]);
56
+ }), 128))
57
+ ]),
58
+ _: 1
59
+ }, 8, ["modelValue"]),
60
+ vue.createVNode(vue.unref(webVue.Input), {
61
+ modelValue: filter.value.name,
62
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.name = $event),
63
+ class: "filter-item",
64
+ "allow-clear": "",
65
+ placeholder: "\u8F93\u5165\u5185\u5BB9\u6807\u9898",
66
+ onPressEnter: handleSearch
67
+ }, null, 8, ["modelValue"])
68
+ ]),
69
+ _: 1
70
+ })
71
+ ]);
72
+ };
73
+ }
74
+ });
75
+ module.exports = _sfc_main;
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var component = require("../../../typeIcons/component.js");
5
+ var index = require("./MediaFilter/index.js");
6
+ var batch = require("../../../hooks/batch.js");
7
+ var index$1 = require("../../../utils/index.js");
8
+ var api = require("../../script/api.js");
9
+ var typeMap = require("../../../utils/typeMap.js");
10
+ const _hoisted_1 = { class: "view-all-column-container" };
11
+ const _hoisted_2 = { class: "content-table-view" };
12
+ const _hoisted_3 = { class: "title-span" };
13
+ const _hoisted_4 = ["onClick"];
14
+ const _hoisted_5 = { class: "title" };
15
+ const _hoisted_6 = { class: "bottom-view" };
16
+ const _hoisted_7 = { class: "left" };
17
+ const _sfc_main = vue.defineComponent({
18
+ ...{ name: "LiveList" },
19
+ __name: "index",
20
+ props: {
21
+ maxSelect: {},
22
+ outsideSelectData: {},
23
+ defaultSelectedData: {},
24
+ userInfo: {}
25
+ },
26
+ emits: ["change"],
27
+ setup(__props, { emit }) {
28
+ const props = __props;
29
+ const _maxSelect = props.maxSelect || 100;
30
+ const selectedData = vue.ref([]);
31
+ const group_id = vue.ref("all");
32
+ const mediaFileData = vue.ref([]);
33
+ const dataLoading = vue.ref(false);
34
+ const page = vue.ref({
35
+ index: 1,
36
+ size: 100,
37
+ total: 0
38
+ });
39
+ const filter = vue.ref(null);
40
+ const columns = [
41
+ {
42
+ title: "\u6807\u9898",
43
+ dataIndex: "title",
44
+ slotName: "title"
45
+ },
46
+ {
47
+ title: "\u7C7B\u578B",
48
+ dataIndex: "live_type",
49
+ slotName: "live_type"
50
+ },
51
+ {
52
+ title: "\u53D1\u5E03\u65F6\u95F4",
53
+ dataIndex: "pub_time",
54
+ slotName: "pub_time"
55
+ }
56
+ ];
57
+ const scrollPercent = { y: "100%" };
58
+ const tempSelectedData = vue.computed(() => {
59
+ return props.defaultSelectedData || [];
60
+ });
61
+ const search = (_filter) => {
62
+ if (_filter.name || _filter.type) {
63
+ filter.value = { ..._filter };
64
+ } else {
65
+ filter.value = null;
66
+ }
67
+ page.value.index = 1;
68
+ loadData();
69
+ };
70
+ const loadData = async () => {
71
+ const gid = group_id.value;
72
+ if (!gid)
73
+ return;
74
+ let params = {
75
+ limit: page.value.size,
76
+ offset: page.value.size * (page.value.index - 1),
77
+ now_status: 0
78
+ };
79
+ if (filter.value) {
80
+ params = { ...params, ...filter.value };
81
+ }
82
+ if (gid !== "all") {
83
+ params.gid = gid;
84
+ }
85
+ dataLoading.value = true;
86
+ const { code, message } = await api.getBroadcastList(
87
+ props.userInfo.BASE_API,
88
+ params
89
+ );
90
+ dataLoading.value = false;
91
+ if (code === 0) {
92
+ const { count, list } = message;
93
+ mediaFileData.value = list.map((v) => {
94
+ v.catalog = "ilive";
95
+ v.channel_type = 2;
96
+ v.id = v.ID || v.id;
97
+ v.target_id = v.ID;
98
+ v.target_type = 13;
99
+ v.pub_time = index$1.dateYYYYDDMMHHmm(v.CreatedAt);
100
+ v.update_time = v.UpdatedAt;
101
+ v._type = 3;
102
+ return v;
103
+ }) || [];
104
+ page.value.total = count || 0;
105
+ }
106
+ };
107
+ const clickCheckbox = (e, record) => {
108
+ e.stopPropagation();
109
+ e.preventDefault();
110
+ selectData(record);
111
+ };
112
+ const selectTableCell = (record) => {
113
+ selectData(record);
114
+ };
115
+ const selectData = (record) => {
116
+ if (checkSameAdd(record)) {
117
+ webVue.Message.warning({ content: "\u8BF7\u52FF\u6DFB\u52A0\u91CD\u590D\u6570\u636E", duration: 3e3 });
118
+ return;
119
+ }
120
+ addDataToSelectedList(record);
121
+ };
122
+ const checkSameAdd = (record) => {
123
+ const selected = props.outsideSelectData;
124
+ if (!selected.length)
125
+ return false;
126
+ return selected.map((row) => row.id).includes(record.id);
127
+ };
128
+ const addDataToSelectedList = async (record) => {
129
+ const index2 = selectedData.value.findIndex((v) => v.id === record.id);
130
+ if (selectedData.value.length < _maxSelect) {
131
+ if (index2 === -1) {
132
+ selectedData.value.push(record);
133
+ } else {
134
+ selectedData.value.splice(index2, 1);
135
+ }
136
+ emitChange();
137
+ } else {
138
+ if (index2 === -1) {
139
+ selectedData.value.splice(selectedData.value.length - 1, 1);
140
+ selectedData.value.push(record);
141
+ } else {
142
+ selectedData.value.splice(index2, 1);
143
+ }
144
+ webVue.Message.warning({ content: "\u5DF2\u8FBE\u5230\u9009\u62E9\u6570\u91CF\u7684\u4E0A\u9650", duration: 3e3 });
145
+ emitChange();
146
+ }
147
+ };
148
+ const emitChange = () => {
149
+ emit("change", selectedData.value);
150
+ };
151
+ const {
152
+ isItemChecked,
153
+ hoverBatchBox,
154
+ tableCellMouseEnter,
155
+ tableCellMouseLeave
156
+ } = batch();
157
+ vue.watch(
158
+ () => tempSelectedData.value,
159
+ (val) => {
160
+ selectedData.value = val;
161
+ }
162
+ );
163
+ vue.watch(
164
+ () => group_id.value,
165
+ () => {
166
+ loadData();
167
+ }
168
+ );
169
+ vue.onMounted(() => {
170
+ loadData();
171
+ });
172
+ return (_ctx, _cache) => {
173
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
174
+ vue.createVNode(index, {
175
+ group_id: group_id.value,
176
+ "onUpdate:group_id": _cache[0] || (_cache[0] = ($event) => group_id.value = $event),
177
+ onSearch: search
178
+ }, null, 8, ["group_id"]),
179
+ vue.createElementVNode("div", _hoisted_2, [
180
+ vue.createVNode(vue.unref(webVue.Table), {
181
+ columns,
182
+ scroll: scrollPercent,
183
+ pagination: false,
184
+ bordered: false,
185
+ data: mediaFileData.value,
186
+ loading: dataLoading.value,
187
+ onCellMouseEnter: vue.unref(tableCellMouseEnter),
188
+ onCellMouseLeave: vue.unref(tableCellMouseLeave),
189
+ onRowClick: selectTableCell
190
+ }, {
191
+ title: vue.withCtx(({ record }) => [
192
+ vue.createElementVNode("span", _hoisted_3, [
193
+ vue.unref(hoverBatchBox)(selectedData.value, record) ? (vue.openBlock(), vue.createElementBlock("span", {
194
+ key: 0,
195
+ onClick: vue.withModifiers(($event) => clickCheckbox($event, record), ["stop"])
196
+ }, [
197
+ vue.createVNode(vue.unref(webVue.Checkbox), {
198
+ class: "icon",
199
+ "model-value": vue.unref(isItemChecked)(selectedData.value, record)
200
+ }, null, 8, ["model-value"])
201
+ ], 8, _hoisted_4)) : (vue.openBlock(), vue.createBlock(component, {
202
+ key: 1,
203
+ class: "icon",
204
+ type: record.series
205
+ }, null, 8, ["type"])),
206
+ vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(record.title || record.alias || "--"), 1)
207
+ ])
208
+ ]),
209
+ live_type: vue.withCtx(({ record }) => [
210
+ vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(typeMap.ilive_type_map)[record.live_type] || "--"), 1)
211
+ ]),
212
+ pub_time: vue.withCtx(({ record }) => [
213
+ vue.createElementVNode("span", null, vue.toDisplayString(record.pub_time), 1)
214
+ ]),
215
+ _: 1
216
+ }, 8, ["data", "loading", "onCellMouseEnter", "onCellMouseLeave"])
217
+ ]),
218
+ vue.createElementVNode("div", _hoisted_6, [
219
+ vue.createElementVNode("div", _hoisted_7, [
220
+ vue.renderSlot(_ctx.$slots, "store")
221
+ ]),
222
+ vue.renderSlot(_ctx.$slots, "options")
223
+ ])
224
+ ]);
225
+ };
226
+ }
227
+ });
228
+ module.exports = _sfc_main;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var typeMap = require("../../../../utils/typeMap.js");
5
+ const _hoisted_1 = { class: "media-filter-container" };
6
+ const _sfc_main = vue.defineComponent({
7
+ ...{ name: "MpAccountFilter" },
8
+ __name: "index",
9
+ emits: ["search"],
10
+ setup(__props, { emit }) {
11
+ const filter = vue.ref({ mp_name: "", mp_type: "" });
12
+ const typeOptions = vue.computed(() => {
13
+ const arr = Object.keys(typeMap.mp_type_map).map((key) => {
14
+ return {
15
+ label: typeMap.mp_type_map[key],
16
+ value: key
17
+ };
18
+ });
19
+ return [{ value: "", label: "\u5168\u90E8\u7C7B\u578B" }, ...arr];
20
+ });
21
+ const handleSearch = () => {
22
+ emit("search", filter.value);
23
+ };
24
+ vue.watch(filter.value, () => {
25
+ handleSearch();
26
+ });
27
+ return (_ctx, _cache) => {
28
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
29
+ vue.createVNode(vue.unref(webVue.Space), { size: "large" }, {
30
+ default: vue.withCtx(() => [
31
+ vue.createVNode(vue.unref(webVue.Select), {
32
+ modelValue: filter.value.mp_type,
33
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.mp_type = $event),
34
+ class: "filter-item",
35
+ placeholder: "\u8D26\u53F7\u7C7B\u578B"
36
+ }, {
37
+ default: vue.withCtx(() => [
38
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(typeOptions.value, (item) => {
39
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
40
+ key: item.value,
41
+ label: item.label,
42
+ value: item.value
43
+ }, null, 8, ["label", "value"]);
44
+ }), 128))
45
+ ]),
46
+ _: 1
47
+ }, 8, ["modelValue"]),
48
+ vue.createVNode(vue.unref(webVue.Input), {
49
+ modelValue: filter.value.mp_name,
50
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.mp_name = $event),
51
+ class: "filter-item",
52
+ "allow-clear": "",
53
+ placeholder: "\u8BF7\u8F93\u5165\u516C\u4F17\u53F7\u540D\u79F0",
54
+ onPressEnter: handleSearch
55
+ }, null, 8, ["modelValue"])
56
+ ]),
57
+ _: 1
58
+ })
59
+ ]);
60
+ };
61
+ }
62
+ });
63
+ module.exports = _sfc_main;