@cmstops/pro-compo 0.1.8 → 0.1.9

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 (114) hide show
  1. package/dist/index.css +857 -0
  2. package/dist/index.min.css +1 -1
  3. package/es/appCenter/script/routeMap.d.ts +1 -1
  4. package/es/config.d.ts +1 -1
  5. package/es/config.js +2 -2
  6. package/es/contentModal/component.js +5 -2
  7. package/es/contentModal/components/CompoList/index.js +12 -1
  8. package/es/contentModal/components/storeBox/index.js +1 -1
  9. package/es/index.css +857 -0
  10. package/es/index.d.ts +2 -0
  11. package/es/index.js +2 -0
  12. package/es/index.less +2 -0
  13. package/es/previousVersion/component.d.ts +0 -0
  14. package/es/previousVersion/component.js +378 -0
  15. package/es/previousVersion/index.d.ts +2 -0
  16. package/es/previousVersion/index.js +7 -0
  17. package/es/previousVersion/script/api.d.ts +15 -0
  18. package/es/previousVersion/script/api.js +39 -0
  19. package/es/previousVersion/script/tool.d.ts +6 -0
  20. package/es/previousVersion/script/tool.js +22 -0
  21. package/es/previousVersion/style/css.js +1 -0
  22. package/es/previousVersion/style/index.css +166 -0
  23. package/es/previousVersion/style/index.d.ts +1 -0
  24. package/es/previousVersion/style/index.js +1 -0
  25. package/es/previousVersion/style/index.less +208 -0
  26. package/es/resourceModal/assets/images/unknown.js +2 -0
  27. package/es/resourceModal/assets/selection/null.js +2 -0
  28. package/es/resourceModal/component.js +65 -4
  29. package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
  30. package/es/resourceModal/components/MediaPreviewer/index.js +69 -0
  31. package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
  32. package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +111 -0
  33. package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
  34. package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +85 -0
  35. package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
  36. package/es/resourceModal/components/MediaSelection/MainContent/index.js +171 -0
  37. package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
  38. package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.js +211 -0
  39. package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
  40. package/es/resourceModal/components/MediaSelection/index.js +272 -0
  41. package/es/resourceModal/script/api.d.ts +8 -0
  42. package/es/resourceModal/script/api.js +30 -0
  43. package/es/resourceModal/script/filter.d.ts +8 -0
  44. package/es/resourceModal/script/filter.js +22 -0
  45. package/es/resourceModal/script/mediaSelection.d.ts +10 -0
  46. package/es/resourceModal/style/DocAiMediaSelected.less +56 -0
  47. package/es/resourceModal/style/FileTypeThumb.less +183 -0
  48. package/es/resourceModal/style/MainContent.less +200 -0
  49. package/es/resourceModal/style/MediaPreviewer.less +71 -0
  50. package/es/resourceModal/style/MediaSelection.less +59 -0
  51. package/es/resourceModal/style/ToolbarSearch.less +40 -0
  52. package/es/resourceModal/style/index.css +514 -3
  53. package/es/resourceModal/style/index.less +16 -3
  54. package/es/selectGategory/component.d.ts +0 -0
  55. package/es/selectGategory/component.js +95 -0
  56. package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
  57. package/es/selectGategory/components/ColumnSelection/index.js +273 -0
  58. package/es/selectGategory/index.d.ts +2 -0
  59. package/es/selectGategory/index.js +7 -0
  60. package/es/selectGategory/script/api.d.ts +6 -0
  61. package/es/selectGategory/script/api.js +15 -0
  62. package/es/selectGategory/style/ColumnSelection.less +190 -0
  63. package/es/selectGategory/style/css.js +1 -0
  64. package/es/selectGategory/style/index.css +180 -0
  65. package/es/selectGategory/style/index.d.ts +1 -0
  66. package/es/selectGategory/style/index.js +1 -0
  67. package/es/selectGategory/style/index.less +40 -0
  68. package/es/utils/doc.d.ts +69 -0
  69. package/es/utils/typeMap.js +2 -1
  70. package/lib/config.js +2 -2
  71. package/lib/contentModal/component.js +5 -2
  72. package/lib/contentModal/components/CompoList/index.js +11 -0
  73. package/lib/contentModal/components/storeBox/index.js +1 -1
  74. package/lib/index.css +857 -0
  75. package/lib/index.js +4 -0
  76. package/lib/index.less +2 -0
  77. package/lib/previousVersion/component.js +379 -0
  78. package/lib/previousVersion/index.js +8 -0
  79. package/lib/previousVersion/script/api.js +43 -0
  80. package/lib/previousVersion/script/tool.js +24 -0
  81. package/lib/previousVersion/style/css.js +2 -0
  82. package/lib/previousVersion/style/index.css +166 -0
  83. package/lib/previousVersion/style/index.js +2 -0
  84. package/lib/previousVersion/style/index.less +208 -0
  85. package/lib/resourceModal/assets/images/unknown.js +3 -0
  86. package/lib/resourceModal/assets/selection/null.js +3 -0
  87. package/lib/resourceModal/component.js +64 -3
  88. package/lib/resourceModal/components/MediaPreviewer/index.js +70 -0
  89. package/lib/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +112 -0
  90. package/lib/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +86 -0
  91. package/lib/resourceModal/components/MediaSelection/MainContent/index.js +172 -0
  92. package/lib/resourceModal/components/MediaSelection/ToolbarSearch/index.js +212 -0
  93. package/lib/resourceModal/components/MediaSelection/index.js +273 -0
  94. package/lib/resourceModal/script/api.js +35 -0
  95. package/lib/resourceModal/script/filter.js +25 -0
  96. package/lib/resourceModal/style/DocAiMediaSelected.less +56 -0
  97. package/lib/resourceModal/style/FileTypeThumb.less +183 -0
  98. package/lib/resourceModal/style/MainContent.less +200 -0
  99. package/lib/resourceModal/style/MediaPreviewer.less +71 -0
  100. package/lib/resourceModal/style/MediaSelection.less +59 -0
  101. package/lib/resourceModal/style/ToolbarSearch.less +40 -0
  102. package/lib/resourceModal/style/index.css +514 -3
  103. package/lib/resourceModal/style/index.less +16 -3
  104. package/lib/selectGategory/component.js +96 -0
  105. package/lib/selectGategory/components/ColumnSelection/index.js +274 -0
  106. package/lib/selectGategory/index.js +8 -0
  107. package/lib/selectGategory/script/api.js +18 -0
  108. package/lib/selectGategory/style/ColumnSelection.less +190 -0
  109. package/lib/selectGategory/style/css.js +2 -0
  110. package/lib/selectGategory/style/index.css +180 -0
  111. package/lib/selectGategory/style/index.js +2 -0
  112. package/lib/selectGategory/style/index.less +40 -0
  113. package/lib/utils/typeMap.js +2 -1
  114. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -8,6 +8,8 @@ var index$3 = require("./typeIcons/index.js");
8
8
  var index$4 = require("./uploadStep/index.js");
9
9
  var index$5 = require("./contentModal/index.js");
10
10
  var index$6 = require("./resourceModal/index.js");
11
+ var index$7 = require("./previousVersion/index.js");
12
+ var index$8 = require("./selectGategory/index.js");
11
13
  exports["default"] = components;
12
14
  exports.appCenter = index;
13
15
  exports.messageBox = index$1;
@@ -16,3 +18,5 @@ exports.typeIcons = index$3;
16
18
  exports.uploadStep = index$4;
17
19
  exports.contentModal = index$5;
18
20
  exports.resourceModal = index$6;
21
+ exports.previousVersion = index$7;
22
+ exports.selectGategory = index$8;
package/lib/index.less CHANGED
@@ -6,3 +6,5 @@
6
6
  @import './uploadStep/style/index.less';
7
7
  @import './contentModal/style/index.less';
8
8
  @import './resourceModal/style/index.less';
9
+ @import './previousVersion/style/index.less';
10
+ @import './selectGategory/style/index.less';
@@ -0,0 +1,379 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var icon = require("@arco-design/web-vue/es/icon");
5
+ var config = require("../config.js");
6
+ var auth = require("../utils/auth.js");
7
+ var user = require("../hooks/user.js");
8
+ var api = require("./script/api.js");
9
+ const _hoisted_1 = { class: "select-view" };
10
+ const _hoisted_2 = { class: "view-line line1" };
11
+ const _hoisted_3 = ["onClick"];
12
+ const _hoisted_4 = { class: "alias" };
13
+ const _hoisted_5 = { class: "icon" };
14
+ const _hoisted_6 = { class: "view-line line2" };
15
+ const _hoisted_7 = ["onClick"];
16
+ const _hoisted_8 = { class: "alias" };
17
+ const _hoisted_9 = { class: "icon" };
18
+ const _hoisted_10 = { class: "view-line line3" };
19
+ const _hoisted_11 = ["onClick"];
20
+ const _hoisted_12 = { class: "alias" };
21
+ const _hoisted_13 = { class: "icon" };
22
+ const _hoisted_14 = ["onClick"];
23
+ const _hoisted_15 = ["onClick"];
24
+ const _hoisted_16 = {
25
+ key: 0,
26
+ class: "temp-view"
27
+ };
28
+ const _hoisted_17 = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, "\u5DF2\u9009\u62E9\uFF1A", -1);
29
+ const _hoisted_18 = { class: "select-ul" };
30
+ const _sfc_main = vue.defineComponent({
31
+ ...{ name: "previousVersion" },
32
+ __name: "component",
33
+ props: {
34
+ BASE_API: {},
35
+ visible: { type: Boolean },
36
+ title: {},
37
+ targetArr: {}
38
+ },
39
+ emits: ["update:visible", "cancel"],
40
+ setup(__props, { emit }) {
41
+ const props = __props;
42
+ const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
43
+ const title = props.title || "\u4E0A\u7248";
44
+ const targetArr = vue.computed(() => {
45
+ return props.targetArr || [];
46
+ });
47
+ const batch = vue.computed(() => {
48
+ return targetArr.value.length > 1;
49
+ });
50
+ const dialogVisible = vue.computed({
51
+ get() {
52
+ return props.visible;
53
+ },
54
+ set(value) {
55
+ emit("cancel", value);
56
+ emit("update:visible", value);
57
+ }
58
+ });
59
+ const loading = vue.ref(false);
60
+ const cancelHandle = () => {
61
+ emit("cancel", false);
62
+ emit("update:visible", false);
63
+ };
64
+ const repoId = auth.getRID() || 4;
65
+ let channelList = [];
66
+ const line1Array = vue.ref([]);
67
+ const line2Array = vue.ref([]);
68
+ const line3Array = vue.ref([]);
69
+ const activeData = vue.reactive({
70
+ line1Active: -1,
71
+ line2Active: -1,
72
+ line3Active: -1
73
+ });
74
+ const selectList = vue.reactive([]);
75
+ const addHandle = (item) => {
76
+ if (selectList.length > 0 && batch.value) {
77
+ webVue.Notification.warning({
78
+ content: "\u6279\u91CF\u7A3F\u4EF6\u53EA\u5141\u8BB8\u9009\u62E9\u4E00\u4E2A\u53D1\u5E03\u9891\u9053",
79
+ closable: true,
80
+ title: "\u63D0\u793A",
81
+ duration: 1e5
82
+ });
83
+ } else {
84
+ selectList.push({
85
+ alias: item.alias,
86
+ list_id: item.id,
87
+ relation_type: item.relation_type
88
+ });
89
+ }
90
+ };
91
+ const removeHandle = (id) => {
92
+ const index = selectList.findIndex((item) => item.list_id === id);
93
+ selectList.splice(index, 1);
94
+ };
95
+ const confirmHandle = async () => {
96
+ var _a;
97
+ let media_ids = [];
98
+ if (batch.value) {
99
+ media_ids = targetArr.value.map((item) => item.id);
100
+ } else {
101
+ media_ids = [parseInt(((_a = targetArr.value[0]) == null ? void 0 : _a.id) || "", 10)];
102
+ }
103
+ const to_category = {
104
+ lists: [],
105
+ medias: []
106
+ };
107
+ const to_mobile = {
108
+ data: []
109
+ };
110
+ const to_matrix = {
111
+ account_ids: [],
112
+ media_ids
113
+ };
114
+ selectList.forEach((v) => {
115
+ media_ids.forEach((media_id) => {
116
+ to_mobile.data.push({
117
+ list_id: v.list_id,
118
+ target_id: media_id,
119
+ target_type: 3,
120
+ relation_type: 5
121
+ });
122
+ });
123
+ });
124
+ const params = {
125
+ to_category,
126
+ to_mobile,
127
+ to_matrix,
128
+ repo_id: repoId
129
+ };
130
+ const { code } = await api.submitTo(BASE_API, params);
131
+ if (code === 0) {
132
+ webVue.Notification.success({
133
+ title: "\u6210\u529F",
134
+ content: "\u63D0\u4EA4\u6210\u529F"
135
+ });
136
+ }
137
+ webVue.Notification.success("\u6267\u884C\u5B8C\u6BD5");
138
+ };
139
+ const filterHandle = (dirType, arrData) => {
140
+ let target = targetArr.value[0];
141
+ if (batch.value) {
142
+ target = { series: "all" };
143
+ }
144
+ if (dirType === "contentList") {
145
+ arrData = arrData.filter((item) => {
146
+ return ![1, 2, 3, 4].includes(item.relation_type);
147
+ });
148
+ }
149
+ if (dirType === "componentList") {
150
+ const arr = ["tv", "radio"];
151
+ arrData = arrData.filter((item) => {
152
+ if (!["svideo", "all"].includes(target.series))
153
+ arr.push("svideo");
154
+ if (!["special_v3", "all"].includes(target.series))
155
+ arr.push("special");
156
+ return !arr.includes(item.columns);
157
+ });
158
+ }
159
+ return arrData;
160
+ };
161
+ const getMList = async (line2Item) => {
162
+ loading.value = true;
163
+ const params = {
164
+ rid: repoId,
165
+ cid: line2Item.channel_id,
166
+ gid: line2Item.id
167
+ };
168
+ const res = await api.getMlists(BASE_API, params);
169
+ line3Array.value = res.message.map((x) => {
170
+ x.icon = "iconfont icon-pailie-";
171
+ if (x.location)
172
+ x.icon = "iconfont icon-shouping";
173
+ x.catalog = "contentList";
174
+ x.channel_type = 1;
175
+ x.leaf = true;
176
+ x.select = true;
177
+ return x;
178
+ }) || [];
179
+ line3Array.value = filterHandle(line2Item.catalog, line3Array.value);
180
+ activeHandle(0, "line3");
181
+ loading.value = false;
182
+ };
183
+ const getListGroup = async (line1Item) => {
184
+ loading.value = true;
185
+ const params = {
186
+ rid: repoId,
187
+ cid: line1Item.channel_id,
188
+ group_type: line1Item.id,
189
+ offset: 0,
190
+ limit: 100,
191
+ less: true
192
+ };
193
+ const res = await api.getCategorylistsGroups(BASE_API, params);
194
+ line2Array.value = res.message.map((x) => {
195
+ if (x.list_count === 0) {
196
+ x.leaf = true;
197
+ }
198
+ x.icon = "iconfont icon-tuceng";
199
+ x.catalog = line1Item.id === 0 ? "contentList" : "componentList";
200
+ x.channel_type = 1;
201
+ return x;
202
+ }) || [];
203
+ activeHandle(0, "line2");
204
+ };
205
+ const getChannelsData = () => {
206
+ loading.value = true;
207
+ user.getChannels(BASE_API, { repository_id: repoId }).then((res) => {
208
+ channelList = res.message.map((item) => {
209
+ if (item.platform_type === "default_pc") {
210
+ line1Array.value = [
211
+ {
212
+ alias: "\u7248\u9762\u9009\u62E9",
213
+ icon: "iconfont icon-zichanku-",
214
+ id: 0,
215
+ channel_id: item.id,
216
+ FK: "contentList",
217
+ key: "pc_content"
218
+ }
219
+ ];
220
+ }
221
+ if (item.platform_type === "default_wap") {
222
+ line1Array.value = [
223
+ {
224
+ alias: "\u7248\u9762\u9009\u62E9",
225
+ icon: "iconfont icon-zichanku-",
226
+ id: 0,
227
+ channel_id: item.id,
228
+ key: "app_content",
229
+ FK: "contentList"
230
+ },
231
+ {
232
+ alias: "\u7EC4\u4EF6\u9009\u62E9",
233
+ icon: "iconfont icon-tubiaozhizuomoban-",
234
+ id: 2,
235
+ channel_id: item.id,
236
+ key: "app_component",
237
+ FK: "componentList"
238
+ }
239
+ ];
240
+ }
241
+ return item;
242
+ });
243
+ channelList = channelList.filter((v) => v.platform_type === "default_wap");
244
+ activeHandle(0, "line1");
245
+ });
246
+ };
247
+ const activeHandle = (index, type) => {
248
+ if (type === "line1") {
249
+ activeData.line1Active = index;
250
+ getListGroup(line1Array.value[index]);
251
+ } else if (type === "line2") {
252
+ activeData.line2Active = index;
253
+ getMList(line2Array.value[index]);
254
+ } else if (type === "line3") {
255
+ activeData.line3Active = index;
256
+ }
257
+ };
258
+ vue.watch(
259
+ dialogVisible,
260
+ () => {
261
+ if (dialogVisible.value) {
262
+ getChannelsData();
263
+ selectList.splice(0, selectList.length);
264
+ }
265
+ },
266
+ { immediate: true }
267
+ );
268
+ return (_ctx, _cache) => {
269
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Modal), {
270
+ visible: dialogVisible.value,
271
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => dialogVisible.value = $event),
272
+ class: "previous-version",
273
+ "title-align": "start",
274
+ "body-class": "previous-version-modal-body",
275
+ width: "60%",
276
+ title: vue.unref(title),
277
+ onCancel: cancelHandle,
278
+ onOk: confirmHandle
279
+ }, {
280
+ default: vue.withCtx(() => [
281
+ vue.createVNode(vue.unref(webVue.Spin), {
282
+ style: { "width": "100%", "height": "100%" },
283
+ loading: loading.value
284
+ }, {
285
+ default: vue.withCtx(() => [
286
+ vue.createElementVNode("section", _hoisted_1, [
287
+ vue.createElementVNode("section", _hoisted_2, [
288
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(line1Array.value, (line1Item, index) => {
289
+ return vue.openBlock(), vue.createElementBlock("section", {
290
+ key: index,
291
+ class: vue.normalizeClass([{ active: index === activeData.line1Active }, "row"]),
292
+ onClick: ($event) => activeHandle(index, "line1")
293
+ }, [
294
+ vue.createElementVNode("div", _hoisted_4, [
295
+ vue.createElementVNode("span", _hoisted_5, [
296
+ vue.createVNode(vue.unref(icon.IconApps))
297
+ ]),
298
+ vue.createElementVNode("span", null, vue.toDisplayString(line1Item.alias), 1)
299
+ ])
300
+ ], 10, _hoisted_3);
301
+ }), 128))
302
+ ]),
303
+ vue.createElementVNode("section", _hoisted_6, [
304
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(line2Array.value, (line2Item, index) => {
305
+ return vue.openBlock(), vue.createElementBlock("section", {
306
+ key: index,
307
+ class: vue.normalizeClass([{ active: index === activeData.line2Active }, "row"]),
308
+ onClick: ($event) => activeHandle(index, "line2")
309
+ }, [
310
+ vue.createElementVNode("div", _hoisted_8, [
311
+ vue.createElementVNode("span", _hoisted_9, [
312
+ vue.createVNode(vue.unref(icon.IconList))
313
+ ]),
314
+ vue.createElementVNode("span", null, vue.toDisplayString(line2Item.alias), 1)
315
+ ])
316
+ ], 10, _hoisted_7);
317
+ }), 128))
318
+ ]),
319
+ vue.createElementVNode("section", _hoisted_10, [
320
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(line3Array.value, (line3Item, index) => {
321
+ return vue.openBlock(), vue.createElementBlock("section", {
322
+ key: line3Item.id,
323
+ class: vue.normalizeClass(["row", { active: index === activeData.line3Active }]),
324
+ onClick: ($event) => activeHandle(index, "line3")
325
+ }, [
326
+ vue.createElementVNode("div", _hoisted_12, [
327
+ vue.createElementVNode("span", _hoisted_13, [
328
+ vue.createVNode(vue.unref(icon.IconCopy))
329
+ ]),
330
+ vue.createElementVNode("span", null, vue.toDisplayString(line3Item.alias), 1)
331
+ ]),
332
+ selectList.findIndex((si) => line3Item.id === si.list_id) === -1 ? (vue.openBlock(), vue.createElementBlock("span", {
333
+ key: 0,
334
+ class: "right",
335
+ onClick: ($event) => addHandle(line3Item)
336
+ }, [
337
+ vue.createVNode(vue.unref(icon.IconPlusCircle))
338
+ ], 8, _hoisted_14)) : (vue.openBlock(), vue.createElementBlock("span", {
339
+ key: 1,
340
+ class: "right",
341
+ onClick: ($event) => removeHandle(line3Item.icon)
342
+ }, [
343
+ vue.createVNode(vue.unref(icon.IconMinusCircle))
344
+ ], 8, _hoisted_15))
345
+ ], 10, _hoisted_11);
346
+ }), 128))
347
+ ])
348
+ ]),
349
+ selectList.length > 0 ? (vue.openBlock(), vue.createElementBlock("section", _hoisted_16, [
350
+ _hoisted_17,
351
+ vue.createElementVNode("div", _hoisted_18, [
352
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(selectList, (select) => {
353
+ return vue.openBlock(), vue.createElementBlock("div", {
354
+ key: select.list_id,
355
+ class: "select-li"
356
+ }, [
357
+ vue.createVNode(vue.unref(webVue.Tag), {
358
+ closable: "",
359
+ onClose: ($event) => removeHandle(select.list_id)
360
+ }, {
361
+ default: vue.withCtx(() => [
362
+ vue.createTextVNode(vue.toDisplayString(select.alias), 1)
363
+ ]),
364
+ _: 2
365
+ }, 1032, ["onClose"])
366
+ ]);
367
+ }), 128))
368
+ ])
369
+ ])) : vue.createCommentVNode("v-if", true)
370
+ ]),
371
+ _: 1
372
+ }, 8, ["loading"])
373
+ ]),
374
+ _: 1
375
+ }, 8, ["visible", "title"]);
376
+ };
377
+ }
378
+ });
379
+ module.exports = _sfc_main;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var component = require("./component.js");
3
+ const previousVersion = Object.assign(component, {
4
+ install: (app) => {
5
+ app.component(component.name, component);
6
+ }
7
+ });
8
+ module.exports = previousVersion;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var request = require("../../utils/request.js");
4
+ var tool = require("./tool.js");
5
+ async function getCategorylistsGroups(BASE_API, params, data = {
6
+ repeatReport: false
7
+ }) {
8
+ const res = await request(BASE_API, {
9
+ url: `/poplar/v2/listgroups`,
10
+ method: "get",
11
+ params
12
+ });
13
+ const { groups, count } = res.message;
14
+ const resData = { ...res.message, count };
15
+ resData.message = groups;
16
+ if (data.repeatReport) {
17
+ tool.repeatReport(groups, "alias");
18
+ }
19
+ return Promise.resolve(resData);
20
+ }
21
+ async function getMlists(BASE_API, params, data = {
22
+ repeatReport: false
23
+ }) {
24
+ const res = await request(BASE_API, {
25
+ url: `/poplar/v2/mlists`,
26
+ method: "get",
27
+ params
28
+ });
29
+ if (data.repeatReport) {
30
+ tool.repeatReport(res.message, "alias");
31
+ }
32
+ return Promise.resolve(res);
33
+ }
34
+ function submitTo(BASE_API, data) {
35
+ return request(BASE_API, {
36
+ url: "/poplar/v2/submitto",
37
+ method: "post",
38
+ data
39
+ });
40
+ }
41
+ exports.getCategorylistsGroups = getCategorylistsGroups;
42
+ exports.getMlists = getMlists;
43
+ exports.submitTo = submitTo;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var webVue = require("@arco-design/web-vue");
4
+ function repeatReport(array, field) {
5
+ const obj = array.reduce((pre, next) => {
6
+ const attr = field ? next[field] : next;
7
+ if (attr in pre) {
8
+ pre[attr]++;
9
+ } else {
10
+ pre[attr] = 1;
11
+ }
12
+ return pre;
13
+ }, {});
14
+ Object.entries(obj).forEach((v) => {
15
+ const attr = v[0];
16
+ const count = v[1];
17
+ if (count > 1) {
18
+ webVue.Message.info({
19
+ content: `\u5DF2\u5B58\u5728${count}\u4E2A\u3010${attr}\u3011`
20
+ });
21
+ }
22
+ });
23
+ }
24
+ exports.repeatReport = repeatReport;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ require("./index.css");
@@ -0,0 +1,166 @@
1
+ .previous-version-modal-body {
2
+ padding: 0;
3
+ }
4
+ .tooltip-button {
5
+ height: auto;
6
+ padding: 20px;
7
+ }
8
+ .content-main {
9
+ display: flex;
10
+ flex-direction: column;
11
+ }
12
+ .content-main .select-view {
13
+ display: flex;
14
+ flex-wrap: nowrap;
15
+ height: calc(60vh - 106px);
16
+ overflow-x: auto;
17
+ }
18
+ .content-main .select-view .col-view {
19
+ flex-shrink: 0;
20
+ height: 100%;
21
+ overflow: auto;
22
+ border-right: 1px solid #ebeef5;
23
+ }
24
+ .content-main .select-view .col-view .row {
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: space-between;
28
+ padding: 14px 20px 14px 24px;
29
+ cursor: pointer;
30
+ }
31
+ .content-main .select-view .col-view .row.active,
32
+ .content-main .select-view .col-view .row:hover {
33
+ background-color: #f2f3f5;
34
+ }
35
+ .content-main .select-view .col-view .row .left,
36
+ .content-main .select-view .col-view .row .right {
37
+ display: flex;
38
+ align-items: center;
39
+ }
40
+ .content-main .select-view .col-view .row .left {
41
+ margin-right: 20px;
42
+ }
43
+ .content-main .select-view .col-view .row .img-icon {
44
+ width: 20px;
45
+ margin-right: 10px;
46
+ border-radius: 50%;
47
+ }
48
+ .content-main .select-view .col-view .row .icon {
49
+ margin-right: 10px;
50
+ }
51
+ .content-main .select-view .col-view .row .alias {
52
+ display: inline-block;
53
+ max-width: 150px;
54
+ overflow: hidden;
55
+ white-space: nowrap;
56
+ text-overflow: ellipsis;
57
+ }
58
+ .content-main .temp-view {
59
+ flex-shrink: 0;
60
+ max-height: 150px;
61
+ padding: 16px 24px;
62
+ border-top: 1px solid #ebeef5;
63
+ }
64
+ .content-main .temp-view .title {
65
+ padding-bottom: 12px;
66
+ font-weight: 500;
67
+ }
68
+ .content-main .temp-view .select-ul {
69
+ display: flex;
70
+ flex-wrap: wrap;
71
+ align-items: center;
72
+ }
73
+ .content-main .temp-view .select-ul .select-li {
74
+ margin-bottom: 12px;
75
+ padding: 2px 8px;
76
+ color: #1d2129;
77
+ background-color: #f2f3f5;
78
+ }
79
+ .content-main .temp-view .select-ul .select-li + .select-li {
80
+ margin-left: 15px;
81
+ }
82
+ .previous-version .select-view {
83
+ display: flex;
84
+ flex-wrap: nowrap;
85
+ height: calc(60vh - 106px);
86
+ overflow-x: auto;
87
+ }
88
+ .previous-version .select-view .view-line {
89
+ flex-shrink: 0;
90
+ height: 100%;
91
+ overflow-y: auto;
92
+ border-right: 1px solid #ebeef5;
93
+ }
94
+ .previous-version .select-view .view-line.line1 {
95
+ width: 150px;
96
+ }
97
+ .previous-version .select-view .view-line.line2 {
98
+ width: 170px;
99
+ }
100
+ .previous-version .select-view .view-line.line3 {
101
+ width: 196px;
102
+ }
103
+ .previous-version .select-view .view-line .row {
104
+ display: flex;
105
+ align-items: center;
106
+ justify-content: space-between;
107
+ padding: 14px 20px 14px 24px;
108
+ cursor: pointer;
109
+ }
110
+ .previous-version .select-view .view-line .row.active,
111
+ .previous-version .select-view .view-line .row:hover {
112
+ background-color: #f2f3f5;
113
+ }
114
+ .previous-version .select-view .view-line .row .left,
115
+ .previous-version .select-view .view-line .row .right {
116
+ display: flex;
117
+ align-items: center;
118
+ }
119
+ .previous-version .select-view .view-line .row .left {
120
+ margin-right: 20px;
121
+ }
122
+ .previous-version .select-view .view-line .row .right {
123
+ font-size: 18px;
124
+ }
125
+ .previous-version .select-view .view-line .row .img-icon {
126
+ width: 20px;
127
+ margin-right: 10px;
128
+ border-radius: 50%;
129
+ }
130
+ .previous-version .select-view .view-line .row .icon {
131
+ margin-right: 10px;
132
+ }
133
+ .previous-version .select-view .view-line .row .alias {
134
+ display: inline-block;
135
+ max-width: 150px;
136
+ overflow: hidden;
137
+ white-space: nowrap;
138
+ text-overflow: ellipsis;
139
+ }
140
+ .previous-version .select-view .view-line .row .alias .icon {
141
+ margin-right: 5px;
142
+ }
143
+ .previous-version .temp-view {
144
+ flex-shrink: 0;
145
+ max-height: 150px;
146
+ padding: 16px 24px;
147
+ border-top: 1px solid #ebeef5;
148
+ }
149
+ .previous-version .temp-view .title {
150
+ padding-bottom: 12px;
151
+ font-weight: 500;
152
+ }
153
+ .previous-version .temp-view .select-ul {
154
+ display: flex;
155
+ flex-wrap: wrap;
156
+ align-items: center;
157
+ }
158
+ .previous-version .temp-view .select-ul .select-li {
159
+ margin-bottom: 12px;
160
+ padding: 2px 8px;
161
+ color: #1d2129;
162
+ background-color: #f2f3f5;
163
+ }
164
+ .previous-version .temp-view .select-ul .select-li + .select-li {
165
+ margin-left: 15px;
166
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ require("./index.less");