@cmstops/pro-compo 0.1.44 → 0.1.46
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/es/contentModal/component.js +40 -1
- package/es/contentModal/components/EqxiuList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/EqxiuList/MediaFilter/index.js +79 -0
- package/es/contentModal/components/EqxiuList/index.d.ts +0 -0
- package/es/contentModal/components/EqxiuList/index.js +229 -0
- package/es/contentModal/script/api.d.ts +1 -0
- package/es/contentModal/script/api.js +8 -1
- package/es/selectThumb/component.js +1 -2
- package/lib/contentModal/component.js +40 -1
- package/lib/contentModal/components/EqxiuList/MediaFilter/index.js +80 -0
- package/lib/contentModal/components/EqxiuList/index.js +230 -0
- package/lib/contentModal/script/api.js +8 -0
- package/lib/selectThumb/component.js +1 -2
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import _sfc_main$4 from "./components/CompoList/index.js";
|
|
|
5
5
|
import _sfc_main$6 from "./components/MpAccountList/index.js";
|
|
6
6
|
import _sfc_main$3 from "./components/ContentList/index.js";
|
|
7
7
|
import _sfc_main$5 from "./components/LiveList/index.js";
|
|
8
|
+
import _sfc_main$8 from "./components/EqxiuList/index.js";
|
|
8
9
|
import _sfc_main$7 from "./components/MpContentList/index.js";
|
|
9
10
|
import _sfc_main$2 from "./components/storeBox/index.js";
|
|
10
11
|
import "../typeIcons/style/index.js";
|
|
@@ -329,7 +330,45 @@ const _sfc_main = defineComponent({
|
|
|
329
330
|
}, 8, ["columns", "default-selected-data", "max-select", "outside-select-data", "type-data", "user-info"])) : createCommentVNode("v-if", true)
|
|
330
331
|
]),
|
|
331
332
|
_: 1
|
|
332
|
-
}, 8, ["title"])) : createCommentVNode("v-if", true)
|
|
333
|
+
}, 8, ["title"])) : createCommentVNode("v-if", true),
|
|
334
|
+
typeDataController.value.addEqxiu ? (openBlock(), createBlock(unref(TabPane), {
|
|
335
|
+
key: "9",
|
|
336
|
+
title: "\u4E92\u52A8\u8FD0\u8425"
|
|
337
|
+
}, {
|
|
338
|
+
default: withCtx(() => [
|
|
339
|
+
unref(userInfo) && unref(userInfo).repository_id ? (openBlock(), createBlock(_sfc_main$8, {
|
|
340
|
+
key: 0,
|
|
341
|
+
columns: typeDataController.value.compoType,
|
|
342
|
+
"default-selected-data": selectedData.value,
|
|
343
|
+
"max-select": _ctx.maxSelect,
|
|
344
|
+
"outside-select-data": _ctx.outsideSelectData || [],
|
|
345
|
+
"type-data": typeDataController.value,
|
|
346
|
+
"user-info": unref(userInfo),
|
|
347
|
+
onChange: selectedDataChangeHandle
|
|
348
|
+
}, {
|
|
349
|
+
store: withCtx(() => [
|
|
350
|
+
createVNode(_sfc_main$2, {
|
|
351
|
+
selectData: selectedData.value,
|
|
352
|
+
"onUpdate:selectData": _cache[6] || (_cache[6] = ($event) => selectedData.value = $event)
|
|
353
|
+
}, null, 8, ["selectData"])
|
|
354
|
+
]),
|
|
355
|
+
options: withCtx(() => [
|
|
356
|
+
createVNode(unref(Button), {
|
|
357
|
+
disabled: !hasSelected.value,
|
|
358
|
+
type: "primary",
|
|
359
|
+
onClick: comfirm
|
|
360
|
+
}, {
|
|
361
|
+
default: withCtx(() => [
|
|
362
|
+
createTextVNode(" \u6DFB\u52A0 ")
|
|
363
|
+
]),
|
|
364
|
+
_: 1
|
|
365
|
+
}, 8, ["disabled"])
|
|
366
|
+
]),
|
|
367
|
+
_: 1
|
|
368
|
+
}, 8, ["columns", "default-selected-data", "max-select", "outside-select-data", "type-data", "user-info"])) : createCommentVNode("v-if", true)
|
|
369
|
+
]),
|
|
370
|
+
_: 1
|
|
371
|
+
})) : createCommentVNode("v-if", true)
|
|
333
372
|
]),
|
|
334
373
|
_: 1
|
|
335
374
|
})
|
|
File without changes
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock } from "vue";
|
|
2
|
+
import { Space, Select, Option, Input } from "@arco-design/web-vue";
|
|
3
|
+
const _hoisted_1 = { class: "media-filter-container" };
|
|
4
|
+
const _sfc_main = defineComponent({
|
|
5
|
+
...{ name: "MediaFilter" },
|
|
6
|
+
__name: "index",
|
|
7
|
+
emits: ["update:group_id", "search"],
|
|
8
|
+
setup(__props, { emit: __emit }) {
|
|
9
|
+
const emit = __emit;
|
|
10
|
+
const filter = ref({ type: "", name: "" });
|
|
11
|
+
const typeOptions = ref([
|
|
12
|
+
{
|
|
13
|
+
value: "",
|
|
14
|
+
label: "\u5168\u90E8"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
value: "hd",
|
|
18
|
+
label: "\u4E92\u52A8"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
value: "h5",
|
|
22
|
+
label: "H5"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: "lc",
|
|
26
|
+
label: "\u957F\u9875"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: "design",
|
|
30
|
+
label: "\u6D77\u62A5"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: "form",
|
|
34
|
+
label: "\u8868\u5355"
|
|
35
|
+
}
|
|
36
|
+
]);
|
|
37
|
+
const handleSearch = () => {
|
|
38
|
+
emit("search", filter.value);
|
|
39
|
+
};
|
|
40
|
+
watch(filter.value, () => {
|
|
41
|
+
handleSearch();
|
|
42
|
+
});
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
45
|
+
createVNode(unref(Space), { size: "large" }, {
|
|
46
|
+
default: withCtx(() => [
|
|
47
|
+
createVNode(unref(Select), {
|
|
48
|
+
modelValue: filter.value.type,
|
|
49
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.type = $event),
|
|
50
|
+
class: "filter-item",
|
|
51
|
+
placeholder: "\u6D3B\u52A8\u7C7B\u578B"
|
|
52
|
+
}, {
|
|
53
|
+
default: withCtx(() => [
|
|
54
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(typeOptions.value, (item) => {
|
|
55
|
+
return openBlock(), createBlock(unref(Option), {
|
|
56
|
+
key: item.value,
|
|
57
|
+
label: item.label,
|
|
58
|
+
value: item.value
|
|
59
|
+
}, null, 8, ["label", "value"]);
|
|
60
|
+
}), 128))
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
}, 8, ["modelValue"]),
|
|
64
|
+
createVNode(unref(Input), {
|
|
65
|
+
modelValue: filter.value.name,
|
|
66
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.name = $event),
|
|
67
|
+
class: "filter-item",
|
|
68
|
+
"allow-clear": "",
|
|
69
|
+
placeholder: "\u8F93\u5165\u5185\u5BB9\u6807\u9898",
|
|
70
|
+
onPressEnter: handleSearch
|
|
71
|
+
}, null, 8, ["modelValue"])
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
})
|
|
75
|
+
]);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, createVNode, createElementVNode, unref, withCtx, withModifiers, createBlock, toDisplayString, renderSlot } from "vue";
|
|
2
|
+
import { Table, Checkbox, Message } from "@arco-design/web-vue";
|
|
3
|
+
import _sfc_main$2 from "../../../typeIcons/component.js";
|
|
4
|
+
import _sfc_main$1 from "./MediaFilter/index.js";
|
|
5
|
+
import useTableBatch from "../../../hooks/batch.js";
|
|
6
|
+
import { getEqxiuList } from "../../script/api.js";
|
|
7
|
+
const _hoisted_1 = { class: "view-all-column-container" };
|
|
8
|
+
const _hoisted_2 = { class: "content-table-view" };
|
|
9
|
+
const _hoisted_3 = { class: "title-span" };
|
|
10
|
+
const _hoisted_4 = ["onClick"];
|
|
11
|
+
const _hoisted_5 = { class: "title" };
|
|
12
|
+
const _hoisted_6 = { class: "bottom-view" };
|
|
13
|
+
const _hoisted_7 = { class: "left" };
|
|
14
|
+
const _sfc_main = defineComponent({
|
|
15
|
+
...{ name: "LiveList" },
|
|
16
|
+
__name: "index",
|
|
17
|
+
props: {
|
|
18
|
+
maxSelect: {},
|
|
19
|
+
outsideSelectData: {},
|
|
20
|
+
defaultSelectedData: {},
|
|
21
|
+
userInfo: {}
|
|
22
|
+
},
|
|
23
|
+
emits: ["change"],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const emit = __emit;
|
|
26
|
+
const props = __props;
|
|
27
|
+
const typeMap = ref({
|
|
28
|
+
hd: "\u4E92\u52A8",
|
|
29
|
+
h5: "H5",
|
|
30
|
+
lc: "\u957F\u9875",
|
|
31
|
+
design: "\u6D77\u62A5",
|
|
32
|
+
form: "\u8868\u5355"
|
|
33
|
+
});
|
|
34
|
+
const _maxSelect = props.maxSelect || 100;
|
|
35
|
+
const selectedData = ref([]);
|
|
36
|
+
const group_id = ref("all");
|
|
37
|
+
const mediaFileData = ref([]);
|
|
38
|
+
const dataLoading = ref(false);
|
|
39
|
+
const page = ref({
|
|
40
|
+
index: 1,
|
|
41
|
+
size: 100,
|
|
42
|
+
total: 0
|
|
43
|
+
});
|
|
44
|
+
const filter = ref(null);
|
|
45
|
+
const columns = [
|
|
46
|
+
{
|
|
47
|
+
title: "\u6807\u9898",
|
|
48
|
+
dataIndex: "title",
|
|
49
|
+
slotName: "title"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
title: "\u7C7B\u578B",
|
|
53
|
+
dataIndex: "type",
|
|
54
|
+
slotName: "type",
|
|
55
|
+
width: 150
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
title: "\u53D1\u5E03\u65F6\u95F4",
|
|
59
|
+
dataIndex: "publishTime",
|
|
60
|
+
slotName: "publishTime",
|
|
61
|
+
width: 300
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
const scrollPercent = { y: "100%" };
|
|
65
|
+
const tempSelectedData = computed(() => {
|
|
66
|
+
return props.defaultSelectedData || [];
|
|
67
|
+
});
|
|
68
|
+
const search = (_filter) => {
|
|
69
|
+
if (_filter.name || _filter.type) {
|
|
70
|
+
filter.value = { ..._filter };
|
|
71
|
+
} else {
|
|
72
|
+
filter.value = null;
|
|
73
|
+
}
|
|
74
|
+
page.value.index = 1;
|
|
75
|
+
loadData();
|
|
76
|
+
};
|
|
77
|
+
const loadData = async () => {
|
|
78
|
+
const gid = group_id.value;
|
|
79
|
+
if (!gid)
|
|
80
|
+
return;
|
|
81
|
+
let params = {
|
|
82
|
+
page_size: page.value.size,
|
|
83
|
+
page_no: page.value.index
|
|
84
|
+
};
|
|
85
|
+
if (filter.value) {
|
|
86
|
+
params = { ...params, ...filter.value };
|
|
87
|
+
}
|
|
88
|
+
if (gid !== "all") {
|
|
89
|
+
params.gid = gid;
|
|
90
|
+
}
|
|
91
|
+
dataLoading.value = true;
|
|
92
|
+
const { code, message } = await getEqxiuList(props.userInfo.BASE_API, params);
|
|
93
|
+
dataLoading.value = false;
|
|
94
|
+
if (code === 0) {
|
|
95
|
+
const { count, data } = message;
|
|
96
|
+
mediaFileData.value = data.map((v) => {
|
|
97
|
+
v.catalog = "doc";
|
|
98
|
+
v.id = v.ID || v.id;
|
|
99
|
+
v.target_id = v.ID || v.id;
|
|
100
|
+
v.target_type = 3;
|
|
101
|
+
v.pub_time = v.updateTime;
|
|
102
|
+
v.update_time = v.updateTime;
|
|
103
|
+
return v;
|
|
104
|
+
}) || [];
|
|
105
|
+
page.value.total = count || 0;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const clickCheckbox = (e, record) => {
|
|
109
|
+
e.stopPropagation();
|
|
110
|
+
e.preventDefault();
|
|
111
|
+
selectData(record);
|
|
112
|
+
};
|
|
113
|
+
const selectTableCell = (record) => {
|
|
114
|
+
selectData(record);
|
|
115
|
+
};
|
|
116
|
+
const selectData = (record) => {
|
|
117
|
+
if (checkSameAdd(record)) {
|
|
118
|
+
Message.warning({ content: "\u8BF7\u52FF\u6DFB\u52A0\u91CD\u590D\u6570\u636E", duration: 3e3 });
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
addDataToSelectedList(record);
|
|
122
|
+
};
|
|
123
|
+
const checkSameAdd = (record) => {
|
|
124
|
+
const selected = props.outsideSelectData;
|
|
125
|
+
if (!selected.length)
|
|
126
|
+
return false;
|
|
127
|
+
return selected.map((row) => row.id).includes(record.id);
|
|
128
|
+
};
|
|
129
|
+
const addDataToSelectedList = async (record) => {
|
|
130
|
+
const index = selectedData.value.findIndex((v) => v.id === record.id);
|
|
131
|
+
if (selectedData.value.length < _maxSelect) {
|
|
132
|
+
if (index === -1) {
|
|
133
|
+
selectedData.value.push(record);
|
|
134
|
+
} else {
|
|
135
|
+
selectedData.value.splice(index, 1);
|
|
136
|
+
}
|
|
137
|
+
emitChange();
|
|
138
|
+
} else {
|
|
139
|
+
if (index === -1) {
|
|
140
|
+
selectedData.value.splice(selectedData.value.length - 1, 1);
|
|
141
|
+
selectedData.value.push(record);
|
|
142
|
+
} else {
|
|
143
|
+
selectedData.value.splice(index, 1);
|
|
144
|
+
}
|
|
145
|
+
Message.warning({ content: "\u5DF2\u8FBE\u5230\u9009\u62E9\u6570\u91CF\u7684\u4E0A\u9650", duration: 3e3 });
|
|
146
|
+
emitChange();
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const emitChange = () => {
|
|
150
|
+
emit("change", selectedData.value);
|
|
151
|
+
};
|
|
152
|
+
const {
|
|
153
|
+
isItemChecked,
|
|
154
|
+
hoverBatchBox,
|
|
155
|
+
tableCellMouseEnter,
|
|
156
|
+
tableCellMouseLeave
|
|
157
|
+
} = useTableBatch();
|
|
158
|
+
watch(
|
|
159
|
+
() => tempSelectedData.value,
|
|
160
|
+
(val) => {
|
|
161
|
+
selectedData.value = val;
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
watch(
|
|
165
|
+
() => group_id.value,
|
|
166
|
+
() => {
|
|
167
|
+
loadData();
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
onMounted(() => {
|
|
171
|
+
loadData();
|
|
172
|
+
});
|
|
173
|
+
return (_ctx, _cache) => {
|
|
174
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
175
|
+
createVNode(_sfc_main$1, {
|
|
176
|
+
group_id: group_id.value,
|
|
177
|
+
"onUpdate:group_id": _cache[0] || (_cache[0] = ($event) => group_id.value = $event),
|
|
178
|
+
onSearch: search
|
|
179
|
+
}, null, 8, ["group_id"]),
|
|
180
|
+
createElementVNode("div", _hoisted_2, [
|
|
181
|
+
createVNode(unref(Table), {
|
|
182
|
+
columns,
|
|
183
|
+
scroll: scrollPercent,
|
|
184
|
+
pagination: false,
|
|
185
|
+
bordered: false,
|
|
186
|
+
data: mediaFileData.value,
|
|
187
|
+
loading: dataLoading.value,
|
|
188
|
+
onCellMouseEnter: unref(tableCellMouseEnter),
|
|
189
|
+
onCellMouseLeave: unref(tableCellMouseLeave),
|
|
190
|
+
onRowClick: selectTableCell
|
|
191
|
+
}, {
|
|
192
|
+
title: withCtx(({ record }) => [
|
|
193
|
+
createElementVNode("span", _hoisted_3, [
|
|
194
|
+
unref(hoverBatchBox)(selectedData.value, record) ? (openBlock(), createElementBlock("span", {
|
|
195
|
+
key: 0,
|
|
196
|
+
onClick: withModifiers(($event) => clickCheckbox($event, record), ["stop"])
|
|
197
|
+
}, [
|
|
198
|
+
createVNode(unref(Checkbox), {
|
|
199
|
+
class: "icon",
|
|
200
|
+
"model-value": unref(isItemChecked)(selectedData.value, record)
|
|
201
|
+
}, null, 8, ["model-value"])
|
|
202
|
+
], 8, _hoisted_4)) : (openBlock(), createBlock(_sfc_main$2, {
|
|
203
|
+
key: 1,
|
|
204
|
+
class: "icon",
|
|
205
|
+
type: record.series
|
|
206
|
+
}, null, 8, ["type"])),
|
|
207
|
+
createElementVNode("span", _hoisted_5, toDisplayString(record.title || record.alias || "--"), 1)
|
|
208
|
+
])
|
|
209
|
+
]),
|
|
210
|
+
type: withCtx(({ record }) => [
|
|
211
|
+
createElementVNode("span", null, toDisplayString(typeMap.value[record.type] || "--"), 1)
|
|
212
|
+
]),
|
|
213
|
+
publishTime: withCtx(({ record }) => [
|
|
214
|
+
createElementVNode("span", null, toDisplayString(record.publishTime), 1)
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}, 8, ["data", "loading", "onCellMouseEnter", "onCellMouseLeave"])
|
|
218
|
+
]),
|
|
219
|
+
createElementVNode("div", _hoisted_6, [
|
|
220
|
+
createElementVNode("div", _hoisted_7, [
|
|
221
|
+
renderSlot(_ctx.$slots, "store")
|
|
222
|
+
]),
|
|
223
|
+
renderSlot(_ctx.$slots, "options")
|
|
224
|
+
])
|
|
225
|
+
]);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
export { _sfc_main as default };
|
|
@@ -9,5 +9,6 @@ export declare function searchMlists(BASE_API: string, params?: Params): import(
|
|
|
9
9
|
export declare function getCategorylistsGroups(BASE_API: string, params?: Params): Promise<import("axios").AxiosResponse<any>>;
|
|
10
10
|
export declare function searchMpaccount(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
11
11
|
export declare function getBroadcastList(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
12
|
+
export declare function getEqxiuList(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
12
13
|
export declare function getMpContentList(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
13
14
|
export {};
|
|
@@ -56,6 +56,13 @@ function getBroadcastList(BASE_API, params) {
|
|
|
56
56
|
params
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
+
function getEqxiuList(BASE_API, params) {
|
|
60
|
+
return request(BASE_API, {
|
|
61
|
+
url: "/poplar/v3/eqxiu/creation/list",
|
|
62
|
+
method: "get",
|
|
63
|
+
params
|
|
64
|
+
});
|
|
65
|
+
}
|
|
59
66
|
function getMpContentList(BASE_API, params) {
|
|
60
67
|
return request(BASE_API, {
|
|
61
68
|
url: "/poplar/v3/mp/media/list",
|
|
@@ -63,4 +70,4 @@ function getMpContentList(BASE_API, params) {
|
|
|
63
70
|
params
|
|
64
71
|
});
|
|
65
72
|
}
|
|
66
|
-
export { checkCommitFulfillment, getBroadcastList, getCategoryCategoriesTree, getCategoryMediaNew, getCategoryPath, getCategorylistsGroups, getMpContentList, searchMlists, searchMpaccount };
|
|
73
|
+
export { checkCommitFulfillment, getBroadcastList, getCategoryCategoriesTree, getCategoryMediaNew, getCategoryPath, getCategorylistsGroups, getEqxiuList, getMpContentList, searchMlists, searchMpaccount };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, provide, computed, watch, openBlock, createElementBlock, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock, createVNode, unref, withCtx, createElementVNode, withDirectives, vShow } from "vue";
|
|
1
|
+
import { defineComponent, ref, provide, computed, watch, nextTick, openBlock, createElementBlock, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock, createVNode, unref, withCtx, createElementVNode, withDirectives, vShow } from "vue";
|
|
2
2
|
import { RadioGroup, Radio, Switch } from "@arco-design/web-vue";
|
|
3
|
-
import { nextTick } from "process";
|
|
4
3
|
import { docThumbObjMap, docThumbArrMap, docThumbRatioMap } from "../utils/doc.js";
|
|
5
4
|
import _sfc_main$3 from "../resourceModal/component.js";
|
|
6
5
|
import _sfc_main$4 from "../imageCrop/component.js";
|
|
@@ -6,6 +6,7 @@ var index$3 = require("./components/CompoList/index.js");
|
|
|
6
6
|
var index$5 = require("./components/MpAccountList/index.js");
|
|
7
7
|
var index$2 = require("./components/ContentList/index.js");
|
|
8
8
|
var index$4 = require("./components/LiveList/index.js");
|
|
9
|
+
var index$7 = require("./components/EqxiuList/index.js");
|
|
9
10
|
var index$6 = require("./components/MpContentList/index.js");
|
|
10
11
|
var index$1 = require("./components/storeBox/index.js");
|
|
11
12
|
require("../typeIcons/style/index.js");
|
|
@@ -330,7 +331,45 @@ const _sfc_main = vue.defineComponent({
|
|
|
330
331
|
}, 8, ["columns", "default-selected-data", "max-select", "outside-select-data", "type-data", "user-info"])) : vue.createCommentVNode("v-if", true)
|
|
331
332
|
]),
|
|
332
333
|
_: 1
|
|
333
|
-
}, 8, ["title"])) : vue.createCommentVNode("v-if", true)
|
|
334
|
+
}, 8, ["title"])) : vue.createCommentVNode("v-if", true),
|
|
335
|
+
typeDataController.value.addEqxiu ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
|
|
336
|
+
key: "9",
|
|
337
|
+
title: "\u4E92\u52A8\u8FD0\u8425"
|
|
338
|
+
}, {
|
|
339
|
+
default: vue.withCtx(() => [
|
|
340
|
+
vue.unref(userInfo) && vue.unref(userInfo).repository_id ? (vue.openBlock(), vue.createBlock(index$7, {
|
|
341
|
+
key: 0,
|
|
342
|
+
columns: typeDataController.value.compoType,
|
|
343
|
+
"default-selected-data": selectedData.value,
|
|
344
|
+
"max-select": _ctx.maxSelect,
|
|
345
|
+
"outside-select-data": _ctx.outsideSelectData || [],
|
|
346
|
+
"type-data": typeDataController.value,
|
|
347
|
+
"user-info": vue.unref(userInfo),
|
|
348
|
+
onChange: selectedDataChangeHandle
|
|
349
|
+
}, {
|
|
350
|
+
store: vue.withCtx(() => [
|
|
351
|
+
vue.createVNode(index$1, {
|
|
352
|
+
selectData: selectedData.value,
|
|
353
|
+
"onUpdate:selectData": _cache[6] || (_cache[6] = ($event) => selectedData.value = $event)
|
|
354
|
+
}, null, 8, ["selectData"])
|
|
355
|
+
]),
|
|
356
|
+
options: vue.withCtx(() => [
|
|
357
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
358
|
+
disabled: !hasSelected.value,
|
|
359
|
+
type: "primary",
|
|
360
|
+
onClick: comfirm
|
|
361
|
+
}, {
|
|
362
|
+
default: vue.withCtx(() => [
|
|
363
|
+
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
}, 8, ["disabled"])
|
|
367
|
+
]),
|
|
368
|
+
_: 1
|
|
369
|
+
}, 8, ["columns", "default-selected-data", "max-select", "outside-select-data", "type-data", "user-info"])) : vue.createCommentVNode("v-if", true)
|
|
370
|
+
]),
|
|
371
|
+
_: 1
|
|
372
|
+
})) : vue.createCommentVNode("v-if", true)
|
|
334
373
|
]),
|
|
335
374
|
_: 1
|
|
336
375
|
})
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var webVue = require("@arco-design/web-vue");
|
|
4
|
+
const _hoisted_1 = { class: "media-filter-container" };
|
|
5
|
+
const _sfc_main = vue.defineComponent({
|
|
6
|
+
...{ name: "MediaFilter" },
|
|
7
|
+
__name: "index",
|
|
8
|
+
emits: ["update:group_id", "search"],
|
|
9
|
+
setup(__props, { emit: __emit }) {
|
|
10
|
+
const emit = __emit;
|
|
11
|
+
const filter = vue.ref({ type: "", name: "" });
|
|
12
|
+
const typeOptions = vue.ref([
|
|
13
|
+
{
|
|
14
|
+
value: "",
|
|
15
|
+
label: "\u5168\u90E8"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
value: "hd",
|
|
19
|
+
label: "\u4E92\u52A8"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
value: "h5",
|
|
23
|
+
label: "H5"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
value: "lc",
|
|
27
|
+
label: "\u957F\u9875"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
value: "design",
|
|
31
|
+
label: "\u6D77\u62A5"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
value: "form",
|
|
35
|
+
label: "\u8868\u5355"
|
|
36
|
+
}
|
|
37
|
+
]);
|
|
38
|
+
const handleSearch = () => {
|
|
39
|
+
emit("search", filter.value);
|
|
40
|
+
};
|
|
41
|
+
vue.watch(filter.value, () => {
|
|
42
|
+
handleSearch();
|
|
43
|
+
});
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
46
|
+
vue.createVNode(vue.unref(webVue.Space), { size: "large" }, {
|
|
47
|
+
default: vue.withCtx(() => [
|
|
48
|
+
vue.createVNode(vue.unref(webVue.Select), {
|
|
49
|
+
modelValue: filter.value.type,
|
|
50
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.type = $event),
|
|
51
|
+
class: "filter-item",
|
|
52
|
+
placeholder: "\u6D3B\u52A8\u7C7B\u578B"
|
|
53
|
+
}, {
|
|
54
|
+
default: vue.withCtx(() => [
|
|
55
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(typeOptions.value, (item) => {
|
|
56
|
+
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
|
|
57
|
+
key: item.value,
|
|
58
|
+
label: item.label,
|
|
59
|
+
value: item.value
|
|
60
|
+
}, null, 8, ["label", "value"]);
|
|
61
|
+
}), 128))
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, ["modelValue"]),
|
|
65
|
+
vue.createVNode(vue.unref(webVue.Input), {
|
|
66
|
+
modelValue: filter.value.name,
|
|
67
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.name = $event),
|
|
68
|
+
class: "filter-item",
|
|
69
|
+
"allow-clear": "",
|
|
70
|
+
placeholder: "\u8F93\u5165\u5185\u5BB9\u6807\u9898",
|
|
71
|
+
onPressEnter: handleSearch
|
|
72
|
+
}, null, 8, ["modelValue"])
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
})
|
|
76
|
+
]);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,230 @@
|
|
|
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 api = require("../../script/api.js");
|
|
8
|
+
const _hoisted_1 = { class: "view-all-column-container" };
|
|
9
|
+
const _hoisted_2 = { class: "content-table-view" };
|
|
10
|
+
const _hoisted_3 = { class: "title-span" };
|
|
11
|
+
const _hoisted_4 = ["onClick"];
|
|
12
|
+
const _hoisted_5 = { class: "title" };
|
|
13
|
+
const _hoisted_6 = { class: "bottom-view" };
|
|
14
|
+
const _hoisted_7 = { class: "left" };
|
|
15
|
+
const _sfc_main = vue.defineComponent({
|
|
16
|
+
...{ name: "LiveList" },
|
|
17
|
+
__name: "index",
|
|
18
|
+
props: {
|
|
19
|
+
maxSelect: {},
|
|
20
|
+
outsideSelectData: {},
|
|
21
|
+
defaultSelectedData: {},
|
|
22
|
+
userInfo: {}
|
|
23
|
+
},
|
|
24
|
+
emits: ["change"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const emit = __emit;
|
|
27
|
+
const props = __props;
|
|
28
|
+
const typeMap = vue.ref({
|
|
29
|
+
hd: "\u4E92\u52A8",
|
|
30
|
+
h5: "H5",
|
|
31
|
+
lc: "\u957F\u9875",
|
|
32
|
+
design: "\u6D77\u62A5",
|
|
33
|
+
form: "\u8868\u5355"
|
|
34
|
+
});
|
|
35
|
+
const _maxSelect = props.maxSelect || 100;
|
|
36
|
+
const selectedData = vue.ref([]);
|
|
37
|
+
const group_id = vue.ref("all");
|
|
38
|
+
const mediaFileData = vue.ref([]);
|
|
39
|
+
const dataLoading = vue.ref(false);
|
|
40
|
+
const page = vue.ref({
|
|
41
|
+
index: 1,
|
|
42
|
+
size: 100,
|
|
43
|
+
total: 0
|
|
44
|
+
});
|
|
45
|
+
const filter = vue.ref(null);
|
|
46
|
+
const columns = [
|
|
47
|
+
{
|
|
48
|
+
title: "\u6807\u9898",
|
|
49
|
+
dataIndex: "title",
|
|
50
|
+
slotName: "title"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: "\u7C7B\u578B",
|
|
54
|
+
dataIndex: "type",
|
|
55
|
+
slotName: "type",
|
|
56
|
+
width: 150
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: "\u53D1\u5E03\u65F6\u95F4",
|
|
60
|
+
dataIndex: "publishTime",
|
|
61
|
+
slotName: "publishTime",
|
|
62
|
+
width: 300
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
const scrollPercent = { y: "100%" };
|
|
66
|
+
const tempSelectedData = vue.computed(() => {
|
|
67
|
+
return props.defaultSelectedData || [];
|
|
68
|
+
});
|
|
69
|
+
const search = (_filter) => {
|
|
70
|
+
if (_filter.name || _filter.type) {
|
|
71
|
+
filter.value = { ..._filter };
|
|
72
|
+
} else {
|
|
73
|
+
filter.value = null;
|
|
74
|
+
}
|
|
75
|
+
page.value.index = 1;
|
|
76
|
+
loadData();
|
|
77
|
+
};
|
|
78
|
+
const loadData = async () => {
|
|
79
|
+
const gid = group_id.value;
|
|
80
|
+
if (!gid)
|
|
81
|
+
return;
|
|
82
|
+
let params = {
|
|
83
|
+
page_size: page.value.size,
|
|
84
|
+
page_no: page.value.index
|
|
85
|
+
};
|
|
86
|
+
if (filter.value) {
|
|
87
|
+
params = { ...params, ...filter.value };
|
|
88
|
+
}
|
|
89
|
+
if (gid !== "all") {
|
|
90
|
+
params.gid = gid;
|
|
91
|
+
}
|
|
92
|
+
dataLoading.value = true;
|
|
93
|
+
const { code, message } = await api.getEqxiuList(props.userInfo.BASE_API, params);
|
|
94
|
+
dataLoading.value = false;
|
|
95
|
+
if (code === 0) {
|
|
96
|
+
const { count, data } = message;
|
|
97
|
+
mediaFileData.value = data.map((v) => {
|
|
98
|
+
v.catalog = "doc";
|
|
99
|
+
v.id = v.ID || v.id;
|
|
100
|
+
v.target_id = v.ID || v.id;
|
|
101
|
+
v.target_type = 3;
|
|
102
|
+
v.pub_time = v.updateTime;
|
|
103
|
+
v.update_time = v.updateTime;
|
|
104
|
+
return v;
|
|
105
|
+
}) || [];
|
|
106
|
+
page.value.total = count || 0;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const clickCheckbox = (e, record) => {
|
|
110
|
+
e.stopPropagation();
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
selectData(record);
|
|
113
|
+
};
|
|
114
|
+
const selectTableCell = (record) => {
|
|
115
|
+
selectData(record);
|
|
116
|
+
};
|
|
117
|
+
const selectData = (record) => {
|
|
118
|
+
if (checkSameAdd(record)) {
|
|
119
|
+
webVue.Message.warning({ content: "\u8BF7\u52FF\u6DFB\u52A0\u91CD\u590D\u6570\u636E", duration: 3e3 });
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
addDataToSelectedList(record);
|
|
123
|
+
};
|
|
124
|
+
const checkSameAdd = (record) => {
|
|
125
|
+
const selected = props.outsideSelectData;
|
|
126
|
+
if (!selected.length)
|
|
127
|
+
return false;
|
|
128
|
+
return selected.map((row) => row.id).includes(record.id);
|
|
129
|
+
};
|
|
130
|
+
const addDataToSelectedList = async (record) => {
|
|
131
|
+
const index2 = selectedData.value.findIndex((v) => v.id === record.id);
|
|
132
|
+
if (selectedData.value.length < _maxSelect) {
|
|
133
|
+
if (index2 === -1) {
|
|
134
|
+
selectedData.value.push(record);
|
|
135
|
+
} else {
|
|
136
|
+
selectedData.value.splice(index2, 1);
|
|
137
|
+
}
|
|
138
|
+
emitChange();
|
|
139
|
+
} else {
|
|
140
|
+
if (index2 === -1) {
|
|
141
|
+
selectedData.value.splice(selectedData.value.length - 1, 1);
|
|
142
|
+
selectedData.value.push(record);
|
|
143
|
+
} else {
|
|
144
|
+
selectedData.value.splice(index2, 1);
|
|
145
|
+
}
|
|
146
|
+
webVue.Message.warning({ content: "\u5DF2\u8FBE\u5230\u9009\u62E9\u6570\u91CF\u7684\u4E0A\u9650", duration: 3e3 });
|
|
147
|
+
emitChange();
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const emitChange = () => {
|
|
151
|
+
emit("change", selectedData.value);
|
|
152
|
+
};
|
|
153
|
+
const {
|
|
154
|
+
isItemChecked,
|
|
155
|
+
hoverBatchBox,
|
|
156
|
+
tableCellMouseEnter,
|
|
157
|
+
tableCellMouseLeave
|
|
158
|
+
} = batch();
|
|
159
|
+
vue.watch(
|
|
160
|
+
() => tempSelectedData.value,
|
|
161
|
+
(val) => {
|
|
162
|
+
selectedData.value = val;
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
vue.watch(
|
|
166
|
+
() => group_id.value,
|
|
167
|
+
() => {
|
|
168
|
+
loadData();
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
vue.onMounted(() => {
|
|
172
|
+
loadData();
|
|
173
|
+
});
|
|
174
|
+
return (_ctx, _cache) => {
|
|
175
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
176
|
+
vue.createVNode(index, {
|
|
177
|
+
group_id: group_id.value,
|
|
178
|
+
"onUpdate:group_id": _cache[0] || (_cache[0] = ($event) => group_id.value = $event),
|
|
179
|
+
onSearch: search
|
|
180
|
+
}, null, 8, ["group_id"]),
|
|
181
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
182
|
+
vue.createVNode(vue.unref(webVue.Table), {
|
|
183
|
+
columns,
|
|
184
|
+
scroll: scrollPercent,
|
|
185
|
+
pagination: false,
|
|
186
|
+
bordered: false,
|
|
187
|
+
data: mediaFileData.value,
|
|
188
|
+
loading: dataLoading.value,
|
|
189
|
+
onCellMouseEnter: vue.unref(tableCellMouseEnter),
|
|
190
|
+
onCellMouseLeave: vue.unref(tableCellMouseLeave),
|
|
191
|
+
onRowClick: selectTableCell
|
|
192
|
+
}, {
|
|
193
|
+
title: vue.withCtx(({ record }) => [
|
|
194
|
+
vue.createElementVNode("span", _hoisted_3, [
|
|
195
|
+
vue.unref(hoverBatchBox)(selectedData.value, record) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
196
|
+
key: 0,
|
|
197
|
+
onClick: vue.withModifiers(($event) => clickCheckbox($event, record), ["stop"])
|
|
198
|
+
}, [
|
|
199
|
+
vue.createVNode(vue.unref(webVue.Checkbox), {
|
|
200
|
+
class: "icon",
|
|
201
|
+
"model-value": vue.unref(isItemChecked)(selectedData.value, record)
|
|
202
|
+
}, null, 8, ["model-value"])
|
|
203
|
+
], 8, _hoisted_4)) : (vue.openBlock(), vue.createBlock(component, {
|
|
204
|
+
key: 1,
|
|
205
|
+
class: "icon",
|
|
206
|
+
type: record.series
|
|
207
|
+
}, null, 8, ["type"])),
|
|
208
|
+
vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(record.title || record.alias || "--"), 1)
|
|
209
|
+
])
|
|
210
|
+
]),
|
|
211
|
+
type: vue.withCtx(({ record }) => [
|
|
212
|
+
vue.createElementVNode("span", null, vue.toDisplayString(typeMap.value[record.type] || "--"), 1)
|
|
213
|
+
]),
|
|
214
|
+
publishTime: vue.withCtx(({ record }) => [
|
|
215
|
+
vue.createElementVNode("span", null, vue.toDisplayString(record.publishTime), 1)
|
|
216
|
+
]),
|
|
217
|
+
_: 1
|
|
218
|
+
}, 8, ["data", "loading", "onCellMouseEnter", "onCellMouseLeave"])
|
|
219
|
+
]),
|
|
220
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
221
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
222
|
+
vue.renderSlot(_ctx.$slots, "store")
|
|
223
|
+
]),
|
|
224
|
+
vue.renderSlot(_ctx.$slots, "options")
|
|
225
|
+
])
|
|
226
|
+
]);
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
module.exports = _sfc_main;
|
|
@@ -58,6 +58,13 @@ function getBroadcastList(BASE_API, params) {
|
|
|
58
58
|
params
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
+
function getEqxiuList(BASE_API, params) {
|
|
62
|
+
return request(BASE_API, {
|
|
63
|
+
url: "/poplar/v3/eqxiu/creation/list",
|
|
64
|
+
method: "get",
|
|
65
|
+
params
|
|
66
|
+
});
|
|
67
|
+
}
|
|
61
68
|
function getMpContentList(BASE_API, params) {
|
|
62
69
|
return request(BASE_API, {
|
|
63
70
|
url: "/poplar/v3/mp/media/list",
|
|
@@ -71,6 +78,7 @@ exports.getCategoryCategoriesTree = getCategoryCategoriesTree;
|
|
|
71
78
|
exports.getCategoryMediaNew = getCategoryMediaNew;
|
|
72
79
|
exports.getCategoryPath = getCategoryPath;
|
|
73
80
|
exports.getCategorylistsGroups = getCategorylistsGroups;
|
|
81
|
+
exports.getEqxiuList = getEqxiuList;
|
|
74
82
|
exports.getMpContentList = getMpContentList;
|
|
75
83
|
exports.searchMlists = searchMlists;
|
|
76
84
|
exports.searchMpaccount = searchMpaccount;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var vue = require("vue");
|
|
3
3
|
var webVue = require("@arco-design/web-vue");
|
|
4
|
-
var process = require("process");
|
|
5
4
|
var doc = require("../utils/doc.js");
|
|
6
5
|
var component = require("../resourceModal/component.js");
|
|
7
6
|
var component$1 = require("../imageCrop/component.js");
|
|
@@ -90,7 +89,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
90
89
|
if (n)
|
|
91
90
|
return;
|
|
92
91
|
refreshCrop.value = false;
|
|
93
|
-
|
|
92
|
+
vue.nextTick(() => refreshCrop.value = true);
|
|
94
93
|
}
|
|
95
94
|
);
|
|
96
95
|
const loadData = (value) => {
|