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