@cmstops/pro-compo 0.1.27 → 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.
- package/dist/index.css +72 -55
- package/dist/index.min.css +1 -1
- package/es/contentDetailList/components/Content/DocItem/index.js +1 -1
- package/es/contentDetailList/components/Content/DocMpItem/index.js +1 -1
- package/es/contentDetailList/components/Content/KongoNavItem/index.js +1 -1
- package/es/contentDetailList/components/Content/MaccountItem/index.js +1 -1
- package/es/contentDetailList/style/index.css +0 -48
- package/es/contentDetailList/style/index.less +0 -1
- package/es/contentModal/component.js +165 -5
- package/es/contentModal/components/CompoList/index.js +13 -6
- package/es/contentModal/components/ContentList/MediaFilter/index.js +112 -0
- package/es/contentModal/components/ContentList/index.d.ts +0 -0
- package/es/contentModal/components/ContentList/index.js +269 -0
- package/es/contentModal/components/LiveList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/LiveList/MediaFilter/index.js +74 -0
- package/es/contentModal/components/LiveList/index.d.ts +0 -0
- package/es/contentModal/components/LiveList/index.js +227 -0
- package/es/contentModal/components/MpAccountList/MpAccountFilter/index.d.ts +0 -0
- package/es/contentModal/components/MpAccountList/MpAccountFilter/index.js +62 -0
- package/es/contentModal/components/MpAccountList/index.d.ts +0 -0
- package/es/contentModal/components/MpAccountList/index.js +222 -0
- package/es/contentModal/components/MpContentList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/MpContentList/MediaFilter/index.js +85 -0
- package/es/contentModal/components/MpContentList/index.d.ts +0 -0
- package/es/contentModal/components/MpContentList/index.js +214 -0
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +176 -12
- package/es/contentModal/components/ViewAllColumn/index.js +33 -14
- package/es/contentModal/images/user.js +2 -0
- package/es/contentModal/script/api.d.ts +3 -0
- package/es/contentModal/script/api.js +22 -1
- package/es/contentModal/style/ViewAllColumn.less +51 -31
- package/es/contentModal/style/index.css +21 -7
- package/es/dataTags/component.d.ts +0 -0
- package/es/{contentDetailList/components/DocTags/index.js → dataTags/component.js} +9 -7
- package/es/dataTags/index.d.ts +2 -0
- package/es/dataTags/index.js +7 -0
- package/es/dataTags/style/css.js +1 -0
- package/es/dataTags/style/index.css +51 -0
- package/es/dataTags/style/index.d.ts +1 -0
- package/es/dataTags/style/index.js +1 -0
- package/{lib/contentDetailList/style/DocTags.less → es/dataTags/style/index.less} +12 -8
- package/es/emptyData/component.js +5 -5
- package/es/index.css +72 -55
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.less +1 -0
- package/es/utils/typeMap.d.ts +6 -15
- package/es/utils/typeMap.js +21 -1
- package/lib/contentDetailList/components/Content/DocItem/index.js +4 -4
- package/lib/contentDetailList/components/Content/DocMpItem/index.js +2 -2
- package/lib/contentDetailList/components/Content/KongoNavItem/index.js +2 -2
- package/lib/contentDetailList/components/Content/MaccountItem/index.js +2 -2
- package/lib/contentDetailList/style/index.css +0 -48
- package/lib/contentDetailList/style/index.less +0 -1
- package/lib/contentModal/component.js +165 -5
- package/lib/contentModal/components/CompoList/index.js +15 -8
- package/lib/contentModal/components/ContentList/MediaFilter/index.js +113 -0
- package/lib/contentModal/components/ContentList/index.js +270 -0
- package/lib/contentModal/components/LiveList/MediaFilter/index.js +75 -0
- package/lib/contentModal/components/LiveList/index.js +228 -0
- package/lib/contentModal/components/MpAccountList/MpAccountFilter/index.js +63 -0
- package/lib/contentModal/components/MpAccountList/index.js +223 -0
- package/lib/contentModal/components/MpContentList/MediaFilter/index.js +86 -0
- package/lib/contentModal/components/MpContentList/index.js +215 -0
- package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +175 -11
- package/lib/contentModal/components/ViewAllColumn/index.js +33 -14
- package/lib/contentModal/images/user.js +3 -0
- package/lib/contentModal/script/api.js +24 -0
- package/lib/contentModal/style/ViewAllColumn.less +51 -31
- package/lib/contentModal/style/index.css +21 -7
- package/lib/{contentDetailList/components/DocTags/index.js → dataTags/component.js} +9 -7
- package/lib/dataTags/index.js +8 -0
- package/lib/dataTags/style/css.js +2 -0
- package/lib/dataTags/style/index.css +51 -0
- package/lib/dataTags/style/index.js +2 -0
- package/{es/contentDetailList/style/DocTags.less → lib/dataTags/style/index.less} +12 -8
- package/lib/emptyData/component.js +4 -4
- package/lib/index.css +72 -55
- package/lib/index.js +2 -0
- package/lib/index.less +1 -0
- package/lib/utils/typeMap.js +22 -0
- package/package.json +1 -1
- /package/es/{contentDetailList/components/DocTags → contentModal/components/ContentList/MediaFilter}/index.d.ts +0 -0
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
var vue = require("vue");
|
|
3
3
|
var webVue = require("@arco-design/web-vue");
|
|
4
4
|
var index = require("./components/ViewAllColumn/index.js");
|
|
5
|
-
var index$
|
|
5
|
+
var index$3 = require("./components/CompoList/index.js");
|
|
6
|
+
var index$5 = require("./components/MpAccountList/index.js");
|
|
7
|
+
var index$2 = require("./components/ContentList/index.js");
|
|
8
|
+
var index$4 = require("./components/LiveList/index.js");
|
|
9
|
+
var index$6 = require("./components/MpContentList/index.js");
|
|
6
10
|
var index$1 = require("./components/storeBox/index.js");
|
|
7
11
|
require("../typeIcons/style/index.js");
|
|
8
12
|
var config = require("../config.js");
|
|
@@ -59,6 +63,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
59
63
|
const HandleClose = () => {
|
|
60
64
|
selectedData.value = [];
|
|
61
65
|
};
|
|
66
|
+
const tabsChange = () => {
|
|
67
|
+
selectedData.value = [];
|
|
68
|
+
};
|
|
62
69
|
vue.onMounted(() => {
|
|
63
70
|
if (props.userStore) {
|
|
64
71
|
userInfo.value = { BASE_API, ...props.userStore };
|
|
@@ -87,7 +94,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
87
94
|
default: vue.withCtx(() => [
|
|
88
95
|
vue.createVNode(vue.unref(webVue.Tabs), {
|
|
89
96
|
class: "content-tabs",
|
|
90
|
-
justify: ""
|
|
97
|
+
justify: "",
|
|
98
|
+
onTabClick: tabsChange
|
|
91
99
|
}, {
|
|
92
100
|
default: vue.withCtx(() => [
|
|
93
101
|
typeDataController.value.addDoc ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
|
|
@@ -128,9 +136,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
128
136
|
]),
|
|
129
137
|
_: 1
|
|
130
138
|
})) : vue.createCommentVNode("v-if", true),
|
|
131
|
-
typeDataController.value.
|
|
139
|
+
typeDataController.value.addContentList ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
|
|
132
140
|
key: "2",
|
|
133
|
-
title: "\
|
|
141
|
+
title: "\u9891\u9053"
|
|
134
142
|
}, {
|
|
135
143
|
default: vue.withCtx(() => [
|
|
136
144
|
vue.unref(userInfo) && vue.unref(userInfo).repository_id ? (vue.openBlock(), vue.createBlock(index$2, {
|
|
@@ -139,8 +147,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
139
147
|
"default-selected-data": selectedData.value,
|
|
140
148
|
"outside-select-data": _ctx.outsideSelectData || [],
|
|
141
149
|
"type-data": typeDataController.value,
|
|
142
|
-
columns: typeDataController.value.compoType,
|
|
143
150
|
"user-info": vue.unref(userInfo),
|
|
151
|
+
type: typeDataController.value.contentListType,
|
|
144
152
|
onChange: selectedDataChangeHandle
|
|
145
153
|
}, {
|
|
146
154
|
store: vue.withCtx(() => [
|
|
@@ -162,6 +170,158 @@ const _sfc_main = vue.defineComponent({
|
|
|
162
170
|
}, 8, ["disabled"])
|
|
163
171
|
]),
|
|
164
172
|
_: 1
|
|
173
|
+
}, 8, ["max-select", "default-selected-data", "outside-select-data", "type-data", "user-info", "type"])) : vue.createCommentVNode("v-if", true)
|
|
174
|
+
]),
|
|
175
|
+
_: 1
|
|
176
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
177
|
+
typeDataController.value.addCompo ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
|
|
178
|
+
key: "5",
|
|
179
|
+
title: "\u7EC4\u4EF6"
|
|
180
|
+
}, {
|
|
181
|
+
default: vue.withCtx(() => [
|
|
182
|
+
vue.unref(userInfo) && vue.unref(userInfo).repository_id ? (vue.openBlock(), vue.createBlock(index$3, {
|
|
183
|
+
key: 0,
|
|
184
|
+
"max-select": _ctx.maxSelect,
|
|
185
|
+
"default-selected-data": selectedData.value,
|
|
186
|
+
"outside-select-data": _ctx.outsideSelectData || [],
|
|
187
|
+
"type-data": typeDataController.value,
|
|
188
|
+
columns: typeDataController.value.compoType,
|
|
189
|
+
"user-info": vue.unref(userInfo),
|
|
190
|
+
onChange: selectedDataChangeHandle
|
|
191
|
+
}, {
|
|
192
|
+
store: vue.withCtx(() => [
|
|
193
|
+
vue.createVNode(index$1, {
|
|
194
|
+
selectData: selectedData.value,
|
|
195
|
+
"onUpdate:selectData": _cache[2] || (_cache[2] = ($event) => selectedData.value = $event)
|
|
196
|
+
}, null, 8, ["selectData"])
|
|
197
|
+
]),
|
|
198
|
+
options: vue.withCtx(() => [
|
|
199
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
200
|
+
type: "primary",
|
|
201
|
+
disabled: !hasSelected.value,
|
|
202
|
+
onClick: comfirm
|
|
203
|
+
}, {
|
|
204
|
+
default: vue.withCtx(() => [
|
|
205
|
+
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
206
|
+
]),
|
|
207
|
+
_: 1
|
|
208
|
+
}, 8, ["disabled"])
|
|
209
|
+
]),
|
|
210
|
+
_: 1
|
|
211
|
+
}, 8, ["max-select", "default-selected-data", "outside-select-data", "type-data", "columns", "user-info"])) : vue.createCommentVNode("v-if", true)
|
|
212
|
+
]),
|
|
213
|
+
_: 1
|
|
214
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
215
|
+
typeDataController.value.addCompo ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
|
|
216
|
+
key: "6",
|
|
217
|
+
title: "\u4E92\u52A8\u76F4\u64AD"
|
|
218
|
+
}, {
|
|
219
|
+
default: vue.withCtx(() => [
|
|
220
|
+
vue.unref(userInfo) && vue.unref(userInfo).repository_id ? (vue.openBlock(), vue.createBlock(index$4, {
|
|
221
|
+
key: 0,
|
|
222
|
+
"max-select": _ctx.maxSelect,
|
|
223
|
+
"default-selected-data": selectedData.value,
|
|
224
|
+
"outside-select-data": _ctx.outsideSelectData || [],
|
|
225
|
+
"type-data": typeDataController.value,
|
|
226
|
+
columns: typeDataController.value.compoType,
|
|
227
|
+
"user-info": vue.unref(userInfo),
|
|
228
|
+
onChange: selectedDataChangeHandle
|
|
229
|
+
}, {
|
|
230
|
+
store: vue.withCtx(() => [
|
|
231
|
+
vue.createVNode(index$1, {
|
|
232
|
+
selectData: selectedData.value,
|
|
233
|
+
"onUpdate:selectData": _cache[3] || (_cache[3] = ($event) => selectedData.value = $event)
|
|
234
|
+
}, null, 8, ["selectData"])
|
|
235
|
+
]),
|
|
236
|
+
options: vue.withCtx(() => [
|
|
237
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
238
|
+
type: "primary",
|
|
239
|
+
disabled: !hasSelected.value,
|
|
240
|
+
onClick: comfirm
|
|
241
|
+
}, {
|
|
242
|
+
default: vue.withCtx(() => [
|
|
243
|
+
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
244
|
+
]),
|
|
245
|
+
_: 1
|
|
246
|
+
}, 8, ["disabled"])
|
|
247
|
+
]),
|
|
248
|
+
_: 1
|
|
249
|
+
}, 8, ["max-select", "default-selected-data", "outside-select-data", "type-data", "columns", "user-info"])) : vue.createCommentVNode("v-if", true)
|
|
250
|
+
]),
|
|
251
|
+
_: 1
|
|
252
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
253
|
+
typeDataController.value.addMpAccount ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
|
|
254
|
+
key: "7",
|
|
255
|
+
title: "\u516C\u4F17\u53F7"
|
|
256
|
+
}, {
|
|
257
|
+
default: vue.withCtx(() => [
|
|
258
|
+
vue.unref(userInfo) && vue.unref(userInfo).repository_id ? (vue.openBlock(), vue.createBlock(index$5, {
|
|
259
|
+
key: 0,
|
|
260
|
+
"max-select": _ctx.maxSelect,
|
|
261
|
+
"default-selected-data": selectedData.value,
|
|
262
|
+
"outside-select-data": _ctx.outsideSelectData || [],
|
|
263
|
+
"type-data": typeDataController.value,
|
|
264
|
+
columns: typeDataController.value.MpAccountType,
|
|
265
|
+
"user-info": vue.unref(userInfo),
|
|
266
|
+
onChange: selectedDataChangeHandle
|
|
267
|
+
}, {
|
|
268
|
+
store: vue.withCtx(() => [
|
|
269
|
+
vue.createVNode(index$1, {
|
|
270
|
+
selectData: selectedData.value,
|
|
271
|
+
"onUpdate:selectData": _cache[4] || (_cache[4] = ($event) => selectedData.value = $event)
|
|
272
|
+
}, null, 8, ["selectData"])
|
|
273
|
+
]),
|
|
274
|
+
options: vue.withCtx(() => [
|
|
275
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
276
|
+
type: "primary",
|
|
277
|
+
disabled: !hasSelected.value,
|
|
278
|
+
onClick: comfirm
|
|
279
|
+
}, {
|
|
280
|
+
default: vue.withCtx(() => [
|
|
281
|
+
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
282
|
+
]),
|
|
283
|
+
_: 1
|
|
284
|
+
}, 8, ["disabled"])
|
|
285
|
+
]),
|
|
286
|
+
_: 1
|
|
287
|
+
}, 8, ["max-select", "default-selected-data", "outside-select-data", "type-data", "columns", "user-info"])) : vue.createCommentVNode("v-if", true)
|
|
288
|
+
]),
|
|
289
|
+
_: 1
|
|
290
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
291
|
+
typeDataController.value.addMpContent ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
|
|
292
|
+
key: "8",
|
|
293
|
+
title: "\u516C\u4F17\u53F7\u5185\u5BB9"
|
|
294
|
+
}, {
|
|
295
|
+
default: vue.withCtx(() => [
|
|
296
|
+
vue.unref(userInfo) && vue.unref(userInfo).repository_id ? (vue.openBlock(), vue.createBlock(index$6, {
|
|
297
|
+
key: 0,
|
|
298
|
+
"max-select": _ctx.maxSelect,
|
|
299
|
+
"default-selected-data": selectedData.value,
|
|
300
|
+
"outside-select-data": _ctx.outsideSelectData || [],
|
|
301
|
+
"type-data": typeDataController.value,
|
|
302
|
+
columns: typeDataController.value.MpAccountType,
|
|
303
|
+
"user-info": vue.unref(userInfo),
|
|
304
|
+
onChange: selectedDataChangeHandle
|
|
305
|
+
}, {
|
|
306
|
+
store: vue.withCtx(() => [
|
|
307
|
+
vue.createVNode(index$1, {
|
|
308
|
+
selectData: selectedData.value,
|
|
309
|
+
"onUpdate:selectData": _cache[5] || (_cache[5] = ($event) => selectedData.value = $event)
|
|
310
|
+
}, null, 8, ["selectData"])
|
|
311
|
+
]),
|
|
312
|
+
options: vue.withCtx(() => [
|
|
313
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
314
|
+
type: "primary",
|
|
315
|
+
disabled: !hasSelected.value,
|
|
316
|
+
onClick: comfirm
|
|
317
|
+
}, {
|
|
318
|
+
default: vue.withCtx(() => [
|
|
319
|
+
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
320
|
+
]),
|
|
321
|
+
_: 1
|
|
322
|
+
}, 8, ["disabled"])
|
|
323
|
+
]),
|
|
324
|
+
_: 1
|
|
165
325
|
}, 8, ["max-select", "default-selected-data", "outside-select-data", "type-data", "columns", "user-info"])) : vue.createCommentVNode("v-if", true)
|
|
166
326
|
]),
|
|
167
327
|
_: 1
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
var vue = require("vue");
|
|
3
3
|
var webVue = require("@arco-design/web-vue");
|
|
4
4
|
var component = require("../../../typeIcons/component.js");
|
|
5
|
-
var index
|
|
5
|
+
var index = require("./CompoFilter/index.js");
|
|
6
6
|
var batch = require("../../../hooks/batch.js");
|
|
7
7
|
var api = require("../../script/api.js");
|
|
8
8
|
var typeMap = require("../../../utils/typeMap.js");
|
|
9
|
-
var index = require("../../../utils/index.js");
|
|
9
|
+
var index$1 = require("../../../utils/index.js");
|
|
10
10
|
const _hoisted_1 = { class: "view-all-column-container" };
|
|
11
11
|
const _hoisted_2 = { class: "content-table-view" };
|
|
12
12
|
const _hoisted_3 = { class: "title-span" };
|
|
@@ -27,7 +27,13 @@ const _sfc_main = vue.defineComponent({
|
|
|
27
27
|
emits: ["change"],
|
|
28
28
|
setup(__props, { emit }) {
|
|
29
29
|
const props = __props;
|
|
30
|
-
const columnIdMap =
|
|
30
|
+
const columnIdMap = (compo) => {
|
|
31
|
+
if ((compo == null ? void 0 : compo.term_switch) === 1) {
|
|
32
|
+
return "PC\u6A21\u5757";
|
|
33
|
+
}
|
|
34
|
+
const _type = typeMap.compoColumnsMap();
|
|
35
|
+
return _type[compo.columns];
|
|
36
|
+
};
|
|
31
37
|
const _maxSelect = props.maxSelect || 100;
|
|
32
38
|
const selectedData = vue.ref([]);
|
|
33
39
|
const tempSelectedData = vue.computed(() => {
|
|
@@ -132,7 +138,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
132
138
|
let params = {
|
|
133
139
|
rid: props.userInfo.repository_id,
|
|
134
140
|
state: 1,
|
|
135
|
-
group_type: 2
|
|
141
|
+
group_type: 2,
|
|
142
|
+
terminal: "pc"
|
|
136
143
|
};
|
|
137
144
|
if (filter.value) {
|
|
138
145
|
params = { ...params, ...filter.value };
|
|
@@ -149,7 +156,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
149
156
|
v.channel_type = 1;
|
|
150
157
|
v.target_id = v.id;
|
|
151
158
|
v.target_type = 6;
|
|
152
|
-
v.pub_time =
|
|
159
|
+
v.pub_time = v.publish_at;
|
|
153
160
|
v.update_time = v.updated_at;
|
|
154
161
|
v.pub_user_alias = v.publish_user_alias;
|
|
155
162
|
v.creator_alias = v.creator_alias || v.author_alias;
|
|
@@ -187,7 +194,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
187
194
|
});
|
|
188
195
|
return (_ctx, _cache) => {
|
|
189
196
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
190
|
-
vue.createVNode(index
|
|
197
|
+
vue.createVNode(index, {
|
|
191
198
|
group_id: group_id.value,
|
|
192
199
|
"onUpdate:group_id": _cache[0] || (_cache[0] = ($event) => group_id.value = $event),
|
|
193
200
|
groups: groupData.value,
|
|
@@ -225,10 +232,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
225
232
|
])
|
|
226
233
|
]),
|
|
227
234
|
type: vue.withCtx(({ record }) => [
|
|
228
|
-
vue.createElementVNode("span", null, vue.toDisplayString(
|
|
235
|
+
vue.createElementVNode("span", null, vue.toDisplayString(columnIdMap(record)), 1)
|
|
229
236
|
]),
|
|
230
237
|
pub_time: vue.withCtx(({ record }) => [
|
|
231
|
-
vue.createElementVNode("span", null, vue.toDisplayString(record.pub_time), 1)
|
|
238
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(index$1.timeFormat)(record.pub_time)), 1)
|
|
232
239
|
]),
|
|
233
240
|
_: 1
|
|
234
241
|
}, 8, ["data", "loading", "onCellMouseEnter", "onCellMouseLeave"])
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
groups: {},
|
|
12
|
+
type: {}
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:group_id", "search"],
|
|
15
|
+
setup(__props, { emit }) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const filter = vue.ref({ keyword: "", relation_type: "" });
|
|
18
|
+
const groupId = vue.computed({
|
|
19
|
+
get() {
|
|
20
|
+
return props.group_id;
|
|
21
|
+
},
|
|
22
|
+
set(val) {
|
|
23
|
+
emit("update:group_id", val);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const typeOptions = vue.computed(() => {
|
|
27
|
+
const arr = Object.keys(typeMap.contentList_relation_type_map).map((key) => {
|
|
28
|
+
return {
|
|
29
|
+
label: typeMap.contentList_relation_type_map[key],
|
|
30
|
+
value: key
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
return [{ value: "", label: "\u5168\u90E8\u7C7B\u578B" }, ...arr].filter((item) => {
|
|
34
|
+
if (props.type === "all")
|
|
35
|
+
return true;
|
|
36
|
+
const arr2 = props.type.split(",");
|
|
37
|
+
filter.value.relation_type = props.type;
|
|
38
|
+
if (item.key === "all") {
|
|
39
|
+
item.value = props.type;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
return arr2.includes(item.value);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
const groupOptions = vue.computed(() => {
|
|
46
|
+
const arr = props.groups.map((item) => {
|
|
47
|
+
return {
|
|
48
|
+
label: item.alias || item.title,
|
|
49
|
+
value: item.id
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
return [{ value: "all", label: "\u5168\u90E8\u9891\u9053" }, ...arr];
|
|
53
|
+
});
|
|
54
|
+
const handleSearch = () => {
|
|
55
|
+
emit("search", filter.value);
|
|
56
|
+
};
|
|
57
|
+
vue.watch(filter.value, () => {
|
|
58
|
+
handleSearch();
|
|
59
|
+
});
|
|
60
|
+
return (_ctx, _cache) => {
|
|
61
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
62
|
+
vue.createVNode(vue.unref(webVue.Space), { size: "large" }, {
|
|
63
|
+
default: vue.withCtx(() => [
|
|
64
|
+
vue.createVNode(vue.unref(webVue.Select), {
|
|
65
|
+
modelValue: groupId.value,
|
|
66
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => groupId.value = $event),
|
|
67
|
+
class: "filter-item",
|
|
68
|
+
placeholder: "\u6A21\u5757"
|
|
69
|
+
}, {
|
|
70
|
+
default: vue.withCtx(() => [
|
|
71
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(groupOptions.value, (item) => {
|
|
72
|
+
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
|
|
73
|
+
key: item.value,
|
|
74
|
+
label: item.label,
|
|
75
|
+
value: item.value
|
|
76
|
+
}, null, 8, ["label", "value"]);
|
|
77
|
+
}), 128))
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
}, 8, ["modelValue"]),
|
|
81
|
+
vue.createVNode(vue.unref(webVue.Select), {
|
|
82
|
+
modelValue: filter.value.relation_type,
|
|
83
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.relation_type = $event),
|
|
84
|
+
class: "filter-item",
|
|
85
|
+
placeholder: "\u7C7B\u578B"
|
|
86
|
+
}, {
|
|
87
|
+
default: vue.withCtx(() => [
|
|
88
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(typeOptions.value, (item) => {
|
|
89
|
+
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
|
|
90
|
+
key: item.value,
|
|
91
|
+
label: item.label,
|
|
92
|
+
value: item.value
|
|
93
|
+
}, null, 8, ["label", "value"]);
|
|
94
|
+
}), 128))
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["modelValue"]),
|
|
98
|
+
vue.createVNode(vue.unref(webVue.Input), {
|
|
99
|
+
modelValue: filter.value.keyword,
|
|
100
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.keyword = $event),
|
|
101
|
+
class: "filter-item",
|
|
102
|
+
"allow-clear": "",
|
|
103
|
+
placeholder: "\u8F93\u5165\u5185\u5BB9\u6807\u9898",
|
|
104
|
+
onPressEnter: handleSearch
|
|
105
|
+
}, null, 8, ["modelValue"])
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
})
|
|
109
|
+
]);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
module.exports = _sfc_main;
|
|
@@ -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;
|