@cmstops/pro-compo 3.9.1-rc.14 → 3.9.1-rc.16
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/components/ViewAllColumn/index.js +0 -1
- package/es/selectAddTo/component.js +23 -103
- package/es/selectAddTo/components/SelectAddToView.js +91 -0
- package/es/selectAddTo/components/SelectAddToView.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +0 -3
- package/es/selectAddTo/components/ViewAllColumn/index.js +17 -16
- package/es/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +1 -1
- package/es/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +0 -13
- package/es/selectAddTo/script/api.js +1 -8
- package/es/selectAddTo/script/useSelectAddToState.js +16 -67
- package/es/style.css +18 -12
- package/lib/contentModal/components/ViewAllColumn/index.js +0 -1
- package/lib/selectAddTo/component.js +22 -102
- package/lib/selectAddTo/components/SelectAddToView.js +92 -0
- package/lib/selectAddTo/components/SelectAddToView.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +0 -3
- package/lib/selectAddTo/components/ViewAllColumn/index.js +16 -15
- package/lib/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +1 -1
- package/lib/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +0 -13
- package/lib/selectAddTo/script/api.js +0 -8
- package/lib/selectAddTo/script/useSelectAddToState.js +16 -67
- package/package.json +1 -1
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
import
|
|
3
|
-
import ViewAllColumn from "./components/ViewAllColumn/index.js";
|
|
4
|
-
import "../typeIcons/style/index.js";
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref } from "vue";
|
|
2
|
+
import SelectAddToView from "./components/SelectAddToView.js";
|
|
5
3
|
import { useSelectAddToState } from "./script/useSelectAddToState.js";
|
|
6
4
|
import "./component.vue_vue_type_style_index_0_scoped_true_lang.js";
|
|
7
5
|
import _export_sfc from "../_virtual/plugin-vue_export-helper.js";
|
|
8
6
|
const _sfc_main = defineComponent({
|
|
9
|
-
...{ name: "
|
|
7
|
+
...{ name: "SelectAddTo" },
|
|
10
8
|
__name: "component",
|
|
11
9
|
props: {
|
|
12
|
-
BASE_API: {},
|
|
13
10
|
visible: { type: Boolean },
|
|
14
|
-
|
|
15
|
-
outsideSelectData: {},
|
|
16
|
-
defaultSelectedData: {},
|
|
11
|
+
rid: {},
|
|
17
12
|
maxSelect: {},
|
|
18
|
-
typeData: {},
|
|
19
13
|
userStore: {},
|
|
20
|
-
|
|
21
|
-
typeKey: {}
|
|
22
|
-
rid: {}
|
|
14
|
+
BASE_API: {},
|
|
15
|
+
typeKey: {}
|
|
23
16
|
},
|
|
24
17
|
emits: ["update:visible", "comfirm"],
|
|
25
18
|
setup(__props, { emit: __emit }) {
|
|
@@ -27,101 +20,28 @@ const _sfc_main = defineComponent({
|
|
|
27
20
|
const props = __props;
|
|
28
21
|
const {
|
|
29
22
|
visible,
|
|
30
|
-
title,
|
|
31
23
|
selectedData,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
comfirm,
|
|
38
|
-
HandleOpen,
|
|
39
|
-
HandleClose,
|
|
40
|
-
tabsChange,
|
|
41
|
-
selectedDataChangeHandle,
|
|
42
|
-
loadConfig,
|
|
43
|
-
getUserInfoHandle
|
|
24
|
+
onOk,
|
|
25
|
+
onCancel,
|
|
26
|
+
onComfirm,
|
|
27
|
+
onClose,
|
|
28
|
+
onSelectedDataChange
|
|
44
29
|
} = useSelectAddToState(props, emit);
|
|
45
|
-
onMounted(() => {
|
|
46
|
-
if (props.userStore) {
|
|
47
|
-
userInfo.value = { BASE_API: props.BASE_API, ...props.userStore };
|
|
48
|
-
} else {
|
|
49
|
-
getUserInfoHandle();
|
|
50
|
-
}
|
|
51
|
-
loadConfig();
|
|
52
|
-
});
|
|
53
30
|
return (_ctx, _cache) => {
|
|
54
|
-
|
|
55
|
-
return openBlock(), createBlock(unref(Modal), {
|
|
56
|
-
footer: false,
|
|
57
|
-
"mask-closable": false,
|
|
31
|
+
return openBlock(), createBlock(SelectAddToView, {
|
|
58
32
|
visible: unref(visible),
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, {
|
|
70
|
-
title: withCtx(() => [
|
|
71
|
-
createTextVNode(toDisplayString(unref(title)), 1)
|
|
72
|
-
]),
|
|
73
|
-
default: withCtx(() => [
|
|
74
|
-
createVNode(unref(Tabs), {
|
|
75
|
-
class: "content-tabs",
|
|
76
|
-
justify: "",
|
|
77
|
-
"lazy-load": "",
|
|
78
|
-
onTabClick: unref(tabsChange)
|
|
79
|
-
}, {
|
|
80
|
-
default: withCtx(() => {
|
|
81
|
-
var _a, _b;
|
|
82
|
-
return [
|
|
83
|
-
_ctx.rid ? (openBlock(), createBlock(ViewAllColumn, {
|
|
84
|
-
key: 0,
|
|
85
|
-
rid: _ctx.rid,
|
|
86
|
-
"default-selected-data": unref(selectedData),
|
|
87
|
-
"max-select": _ctx.maxSelect,
|
|
88
|
-
"user-info": unref(userInfo),
|
|
89
|
-
"type-key": _ctx.typeKey || "",
|
|
90
|
-
"type-data": unref(typeDataController),
|
|
91
|
-
series: ((_a = unref(typeDataController)) == null ? void 0 : _a.docSeries) || "all",
|
|
92
|
-
banner: ((_b = unref(typeDataController)) == null ? void 0 : _b.docBanner) || "all",
|
|
93
|
-
onChange: unref(selectedDataChangeHandle)
|
|
94
|
-
}, {
|
|
95
|
-
store: withCtx(() => [
|
|
96
|
-
createVNode(_component_storeBox, {
|
|
97
|
-
selectData: unref(selectedData),
|
|
98
|
-
"onUpdate:selectData": _cache[0] || (_cache[0] = ($event) => isRef(selectedData) ? selectedData.value = $event : null)
|
|
99
|
-
}, null, 8, ["selectData"])
|
|
100
|
-
]),
|
|
101
|
-
options: withCtx(() => [
|
|
102
|
-
createVNode(unref(Button), {
|
|
103
|
-
disabled: !unref(hasSelected),
|
|
104
|
-
type: "primary",
|
|
105
|
-
onClick: unref(comfirm)
|
|
106
|
-
}, {
|
|
107
|
-
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
108
|
-
createTextVNode(" \u6DFB\u52A0 ")
|
|
109
|
-
])),
|
|
110
|
-
_: 1,
|
|
111
|
-
__: [1]
|
|
112
|
-
}, 8, ["disabled", "onClick"])
|
|
113
|
-
]),
|
|
114
|
-
_: 1
|
|
115
|
-
}, 8, ["rid", "default-selected-data", "max-select", "user-info", "type-key", "type-data", "series", "banner", "onChange"])) : createCommentVNode("v-if", true)
|
|
116
|
-
];
|
|
117
|
-
}),
|
|
118
|
-
_: 1
|
|
119
|
-
}, 8, ["onTabClick"])
|
|
120
|
-
]),
|
|
121
|
-
_: 1
|
|
122
|
-
}, 8, ["visible", "onCancel", "onClose", "onOk", "onOpen"]);
|
|
33
|
+
rid: props.rid,
|
|
34
|
+
"selected-data": unref(selectedData),
|
|
35
|
+
"max-select": props.maxSelect,
|
|
36
|
+
"type-key": props.typeKey,
|
|
37
|
+
onCancel: unref(onCancel),
|
|
38
|
+
onClose: unref(onClose),
|
|
39
|
+
onOk: unref(onOk),
|
|
40
|
+
onSelectedChange: unref(onSelectedDataChange),
|
|
41
|
+
onComfirm: unref(onComfirm)
|
|
42
|
+
}, null, 8, ["visible", "rid", "selected-data", "max-select", "type-key", "onCancel", "onClose", "onOk", "onSelectedChange", "onComfirm"]);
|
|
123
43
|
};
|
|
124
44
|
}
|
|
125
45
|
});
|
|
126
|
-
var _selectAddTo = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
46
|
+
var _selectAddTo = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7f81762c"]]);
|
|
127
47
|
export { _selectAddTo as default };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createTextVNode, createVNode, createCommentVNode } from "vue";
|
|
2
|
+
import { Modal, Button } from "@arco-design/web-vue";
|
|
3
|
+
import ViewAllColumn from "./ViewAllColumn/index.js";
|
|
4
|
+
import _sfc_main$1 from "../../contentModal/components/storeBox/index.js";
|
|
5
|
+
import "./SelectAddToView.vue_vue_type_style_index_0_scoped_true_lang.js";
|
|
6
|
+
import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
|
|
7
|
+
const _sfc_main = defineComponent({
|
|
8
|
+
__name: "SelectAddToView",
|
|
9
|
+
props: {
|
|
10
|
+
visible: { type: Boolean },
|
|
11
|
+
rid: {},
|
|
12
|
+
selectedData: {},
|
|
13
|
+
maxSelect: {},
|
|
14
|
+
typeKey: {}
|
|
15
|
+
},
|
|
16
|
+
emits: [
|
|
17
|
+
"cancel",
|
|
18
|
+
"close",
|
|
19
|
+
"ok",
|
|
20
|
+
"open",
|
|
21
|
+
"selected-change",
|
|
22
|
+
"comfirm"
|
|
23
|
+
],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const emit = __emit;
|
|
27
|
+
const hasSelected = computed(
|
|
28
|
+
() => props.selectedData && props.selectedData.length > 0
|
|
29
|
+
);
|
|
30
|
+
function handleComfirm() {
|
|
31
|
+
emit("comfirm");
|
|
32
|
+
}
|
|
33
|
+
function handleSelectedDataChange(val) {
|
|
34
|
+
emit("selected-change", val);
|
|
35
|
+
}
|
|
36
|
+
return (_ctx, _cache) => {
|
|
37
|
+
return openBlock(), createBlock(unref(Modal), {
|
|
38
|
+
footer: false,
|
|
39
|
+
"mask-closable": false,
|
|
40
|
+
visible: _ctx.visible,
|
|
41
|
+
"body-style": { maxHeight: "700px" },
|
|
42
|
+
"body-class": "add-content-modal-body",
|
|
43
|
+
"modal-class": "add-content-modal-wrapper",
|
|
44
|
+
"title-align": "start",
|
|
45
|
+
"unmount-on-close": "",
|
|
46
|
+
width: "1020px",
|
|
47
|
+
onCancel: _cache[1] || (_cache[1] = () => emit("cancel")),
|
|
48
|
+
onClose: _cache[2] || (_cache[2] = () => emit("close")),
|
|
49
|
+
onOk: _cache[3] || (_cache[3] = () => emit("ok"))
|
|
50
|
+
}, {
|
|
51
|
+
title: withCtx(() => _cache[4] || (_cache[4] = [
|
|
52
|
+
createTextVNode("\u9009\u62E9\u6DFB\u52A0")
|
|
53
|
+
])),
|
|
54
|
+
default: withCtx(() => [
|
|
55
|
+
_ctx.rid ? (openBlock(), createBlock(ViewAllColumn, {
|
|
56
|
+
key: 0,
|
|
57
|
+
rid: _ctx.rid,
|
|
58
|
+
"default-selected-data": _ctx.selectedData,
|
|
59
|
+
"max-select": _ctx.maxSelect,
|
|
60
|
+
"type-key": _ctx.typeKey || "",
|
|
61
|
+
onChange: handleSelectedDataChange
|
|
62
|
+
}, {
|
|
63
|
+
store: withCtx(() => [
|
|
64
|
+
createVNode(_sfc_main$1, {
|
|
65
|
+
selectData: _ctx.selectedData,
|
|
66
|
+
"onUpdate:selectData": _cache[0] || (_cache[0] = (val) => emit("selected-change", val))
|
|
67
|
+
}, null, 8, ["selectData"])
|
|
68
|
+
]),
|
|
69
|
+
options: withCtx(() => [
|
|
70
|
+
createVNode(unref(Button), {
|
|
71
|
+
disabled: !hasSelected.value,
|
|
72
|
+
type: "primary",
|
|
73
|
+
onClick: handleComfirm
|
|
74
|
+
}, {
|
|
75
|
+
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
76
|
+
createTextVNode(" \u6DFB\u52A0 ")
|
|
77
|
+
])),
|
|
78
|
+
_: 1,
|
|
79
|
+
__: [5]
|
|
80
|
+
}, 8, ["disabled"])
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
}, 8, ["rid", "default-selected-data", "max-select", "type-key"])) : createCommentVNode("v-if", true)
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}, 8, ["visible"]);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
var SelectAddToView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-00adfb7c"]]);
|
|
91
|
+
export { SelectAddToView as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, openBlock, createElementBlock, createVNode, unref, isRef, withCtx, createBlock, createElementVNode, toDisplayString, renderSlot, withDirectives, vShow } from "vue";
|
|
1
|
+
import { defineComponent, ref, onMounted, openBlock, createElementBlock, createVNode, unref, isRef, createSlots, withCtx, createBlock, createElementVNode, toDisplayString, renderSlot, withDirectives, vShow } from "vue";
|
|
2
2
|
import { IconRight, IconDown } from "@arco-design/web-vue/es/icon";
|
|
3
3
|
import { Table, Checkbox, Pagination } from "@arco-design/web-vue";
|
|
4
4
|
import _sfc_main$2 from "../../../typeIcons/component.js";
|
|
@@ -32,11 +32,7 @@ const _sfc_main = defineComponent({
|
|
|
32
32
|
...{ name: "ViewAllColumn" },
|
|
33
33
|
__name: "index",
|
|
34
34
|
props: {
|
|
35
|
-
maxSelect: {},
|
|
36
35
|
defaultSelectedData: {},
|
|
37
|
-
typeData: {},
|
|
38
|
-
series: {},
|
|
39
|
-
banner: {},
|
|
40
36
|
userInfo: {},
|
|
41
37
|
typeKey: {},
|
|
42
38
|
rid: {}
|
|
@@ -96,17 +92,10 @@ const _sfc_main = defineComponent({
|
|
|
96
92
|
onCellMouseEnter: unref(tableCellMouseEnter),
|
|
97
93
|
onCellMouseLeave: unref(tableCellMouseLeave),
|
|
98
94
|
onRowClick: unref(selectTableCell)
|
|
99
|
-
}, {
|
|
95
|
+
}, createSlots({
|
|
100
96
|
"expand-icon": withCtx(({ expanded }) => [
|
|
101
97
|
!expanded ? (openBlock(), createBlock(unref(IconRight), { key: 0 })) : (openBlock(), createBlock(unref(IconDown), { key: 1 }))
|
|
102
98
|
]),
|
|
103
|
-
selectTitle: withCtx(() => [
|
|
104
|
-
createVNode(unref(Checkbox), {
|
|
105
|
-
"model-value": unref(selectedData).length === unref(mediaFileData).length,
|
|
106
|
-
class: "icon",
|
|
107
|
-
onChange: unref(selectTableAll)
|
|
108
|
-
}, null, 8, ["model-value", "onChange"])
|
|
109
|
-
]),
|
|
110
99
|
select: withCtx(({ record }) => [
|
|
111
100
|
createVNode(unref(Checkbox), {
|
|
112
101
|
"model-value": unref(isItemChecked)(unref(selectedData), record),
|
|
@@ -136,8 +125,20 @@ const _sfc_main = defineComponent({
|
|
|
136
125
|
createElementVNode("span", null, toDisplayString(unref(timeFormat)(record.pub_time)), 1)
|
|
137
126
|
])
|
|
138
127
|
]),
|
|
139
|
-
_:
|
|
140
|
-
},
|
|
128
|
+
_: 2
|
|
129
|
+
}, [
|
|
130
|
+
_ctx.typeKey !== "series:special_v3" ? {
|
|
131
|
+
name: "selectTitle",
|
|
132
|
+
fn: withCtx(() => [
|
|
133
|
+
createVNode(unref(Checkbox), {
|
|
134
|
+
"model-value": unref(selectedData).length === unref(mediaFileData).length,
|
|
135
|
+
class: "icon",
|
|
136
|
+
onChange: unref(selectTableAll)
|
|
137
|
+
}, null, 8, ["model-value", "onChange"])
|
|
138
|
+
]),
|
|
139
|
+
key: "0"
|
|
140
|
+
} : void 0
|
|
141
|
+
]), 1032, ["columns", "data", "loading", "load-more", "onCellMouseEnter", "onCellMouseLeave", "onRowClick"])
|
|
141
142
|
])) : (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
142
143
|
createVNode(unref(Table), {
|
|
143
144
|
bordered: false,
|
|
@@ -207,5 +208,5 @@ const _sfc_main = defineComponent({
|
|
|
207
208
|
};
|
|
208
209
|
}
|
|
209
210
|
});
|
|
210
|
-
var ViewAllColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
211
|
+
var ViewAllColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-01c2d0b8"]]);
|
|
211
212
|
export { ViewAllColumn as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ref, computed, watch } from "vue";
|
|
2
|
-
import { Message } from "@arco-design/web-vue";
|
|
3
2
|
import { DEFAULT_BASE_API } from "../../../../config.js";
|
|
4
3
|
import { getCategoryMediaNew, getPoliticals, getMlists } from "../../../script/api.js";
|
|
5
4
|
import useTableBatch from "../../../../hooks/batch.js";
|
|
@@ -22,11 +21,6 @@ const useViewAllColumnState = (props, emit) => {
|
|
|
22
21
|
selectedData.value = val;
|
|
23
22
|
}
|
|
24
23
|
);
|
|
25
|
-
const importantBanner = computed(() => {
|
|
26
|
-
if (!props.banner || props.banner === "all")
|
|
27
|
-
return false;
|
|
28
|
-
return !!props.banner;
|
|
29
|
-
});
|
|
30
24
|
const { isItemChecked, tableCellMouseEnter, tableCellMouseLeave } = useTableBatch();
|
|
31
25
|
const selectTableCell = (record) => {
|
|
32
26
|
if (props.typeKey === "series:special_v3" ? record.isLeaf && record.parentId : true) {
|
|
@@ -43,12 +37,6 @@ const useViewAllColumnState = (props, emit) => {
|
|
|
43
37
|
emitChange();
|
|
44
38
|
};
|
|
45
39
|
const selectData = (record) => {
|
|
46
|
-
if (importantBanner.value) {
|
|
47
|
-
const { cover } = record;
|
|
48
|
-
if (!(cover == null ? void 0 : cover.banner)) {
|
|
49
|
-
return Message.warning({ content: "\u8BE5\u5185\u5BB9\u4E0D\u5177\u5907\u72EC\u7ACB\u8F6E\u64AD\u56FE" });
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
40
|
addDataToSelectedList(record);
|
|
53
41
|
return true;
|
|
54
42
|
};
|
|
@@ -170,7 +158,6 @@ const useViewAllColumnState = (props, emit) => {
|
|
|
170
158
|
);
|
|
171
159
|
}, 2e3);
|
|
172
160
|
} catch (error) {
|
|
173
|
-
console.error("Failed to load more data:", error);
|
|
174
161
|
done([]);
|
|
175
162
|
}
|
|
176
163
|
};
|
|
@@ -20,11 +20,4 @@ function getMlists(BASE_API, params) {
|
|
|
20
20
|
params
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
return request(BASE_API, {
|
|
25
|
-
url: "/poplar/v2/configuration",
|
|
26
|
-
method: "get",
|
|
27
|
-
params
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
export { getCategoryMediaNew, getConfigurationNew, getMlists, getPoliticals };
|
|
23
|
+
export { getCategoryMediaNew, getMlists, getPoliticals };
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { computed, ref } from "vue";
|
|
2
|
-
import { getConfigurationNew } from "./api.js";
|
|
3
2
|
import { DEFAULT_BASE_API } from "../../config.js";
|
|
4
|
-
import useLoadUserInfo from "../../hooks/user.js";
|
|
5
3
|
const useSelectAddToState = (props, emit) => {
|
|
6
|
-
|
|
4
|
+
props.BASE_API || DEFAULT_BASE_API;
|
|
7
5
|
const visible = computed({
|
|
8
6
|
get() {
|
|
9
7
|
return props.visible;
|
|
10
8
|
},
|
|
11
9
|
set(value) {
|
|
12
|
-
|
|
10
|
+
emit("update:visible", value);
|
|
13
11
|
}
|
|
14
12
|
});
|
|
15
13
|
const selectedData = ref([]);
|
|
16
|
-
const configData = ref({});
|
|
17
|
-
const { userInfo, getUserInfoHandle } = useLoadUserInfo(BASE_API);
|
|
18
14
|
const title = computed(() => {
|
|
19
15
|
const titleMap = {
|
|
20
16
|
"series:video_album": "\u6DFB\u52A0\u81F3\u89C6\u9891\u5408\u96C6",
|
|
@@ -25,82 +21,35 @@ const useSelectAddToState = (props, emit) => {
|
|
|
25
21
|
return titleMap[props.typeKey || ""] || "";
|
|
26
22
|
});
|
|
27
23
|
const hasSelected = computed(() => selectedData.value.length > 0);
|
|
28
|
-
const
|
|
29
|
-
if (!props.typeData)
|
|
30
|
-
return {};
|
|
31
|
-
try {
|
|
32
|
-
return JSON.parse(JSON.stringify(props.typeData));
|
|
33
|
-
} catch (e) {
|
|
34
|
-
console.warn("Failed to parse typeData:", e);
|
|
35
|
-
return {};
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
const setVisible = (bool) => {
|
|
39
|
-
emit("update:visible", bool);
|
|
40
|
-
};
|
|
41
|
-
const selectedDataChangeHandle = (data) => {
|
|
24
|
+
const onSelectedDataChange = (data) => {
|
|
42
25
|
selectedData.value = data;
|
|
43
26
|
};
|
|
44
|
-
const
|
|
45
|
-
|
|
27
|
+
const onOk = () => {
|
|
28
|
+
visible.value = false;
|
|
46
29
|
};
|
|
47
|
-
const
|
|
48
|
-
|
|
30
|
+
const onCancel = () => {
|
|
31
|
+
visible.value = false;
|
|
49
32
|
};
|
|
50
|
-
const
|
|
33
|
+
const onComfirm = () => {
|
|
51
34
|
emit("comfirm", JSON.parse(JSON.stringify(selectedData.value)));
|
|
52
35
|
};
|
|
53
|
-
const
|
|
54
|
-
selectedData.value = props.defaultSelectedData || [];
|
|
55
|
-
};
|
|
56
|
-
const HandleClose = () => {
|
|
36
|
+
const onClose = () => {
|
|
57
37
|
selectedData.value = [];
|
|
58
38
|
};
|
|
59
|
-
const
|
|
39
|
+
const onTabChange = () => {
|
|
60
40
|
selectedData.value = [];
|
|
61
41
|
};
|
|
62
|
-
const loadConfig = async () => {
|
|
63
|
-
var _a;
|
|
64
|
-
try {
|
|
65
|
-
const res = await getConfigurationNew(BASE_API, {
|
|
66
|
-
module: "third_party_services"
|
|
67
|
-
});
|
|
68
|
-
if (res.code === 0 && ((_a = res.message) == null ? void 0 : _a.length)) {
|
|
69
|
-
res.message.forEach((item) => {
|
|
70
|
-
configData.value[item.key] = JSON.parse(item.value);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
} catch (error) {
|
|
74
|
-
console.error("Failed to load configuration:", error);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
const checkServiceEnable = (key) => {
|
|
78
|
-
const data = configData.value[key];
|
|
79
|
-
if (!data)
|
|
80
|
-
return false;
|
|
81
|
-
if (!data.enable && typeof data.enable !== "undefined")
|
|
82
|
-
return false;
|
|
83
|
-
return true;
|
|
84
|
-
};
|
|
85
42
|
return {
|
|
86
43
|
visible,
|
|
87
44
|
title,
|
|
88
45
|
selectedData,
|
|
89
46
|
hasSelected,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
handleCancel,
|
|
97
|
-
comfirm,
|
|
98
|
-
HandleOpen,
|
|
99
|
-
HandleClose,
|
|
100
|
-
tabsChange,
|
|
101
|
-
loadConfig,
|
|
102
|
-
checkServiceEnable,
|
|
103
|
-
getUserInfoHandle
|
|
47
|
+
onSelectedDataChange,
|
|
48
|
+
onOk,
|
|
49
|
+
onCancel,
|
|
50
|
+
onComfirm,
|
|
51
|
+
onClose,
|
|
52
|
+
onTabChange
|
|
104
53
|
};
|
|
105
54
|
};
|
|
106
55
|
export { useSelectAddToState };
|
package/es/style.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.content-tabs[data-v-
|
|
1
|
+
.content-tabs[data-v-7f81762c] .arco-tabs-content {
|
|
2
2
|
padding: 0;
|
|
3
3
|
}
|
|
4
|
-
.add-content-modal-body[data-v-
|
|
4
|
+
.add-content-modal-body[data-v-7f81762c] {
|
|
5
5
|
padding: 0;
|
|
6
6
|
}
|
|
7
7
|
.type-icons-container {
|
|
@@ -10,54 +10,60 @@
|
|
|
10
10
|
line-height: 12px;
|
|
11
11
|
font-size: 18px;
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.content-tabs[data-v-00adfb7c] .arco-tabs-content {
|
|
14
|
+
padding: 0;
|
|
15
|
+
}
|
|
16
|
+
.add-content-modal-body[data-v-00adfb7c] {
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
.view-all-column-container[data-v-01c2d0b8] {
|
|
14
20
|
display: flex;
|
|
15
21
|
flex-direction: column;
|
|
16
22
|
height: 100%;
|
|
17
23
|
}
|
|
18
|
-
.content-table-view[data-v-
|
|
24
|
+
.content-table-view[data-v-01c2d0b8] {
|
|
19
25
|
flex: 1;
|
|
20
26
|
overflow: auto;
|
|
21
27
|
margin: 16px 0;
|
|
22
28
|
}
|
|
23
|
-
.bottom-view[data-v-
|
|
29
|
+
.bottom-view[data-v-01c2d0b8] {
|
|
24
30
|
display: flex;
|
|
25
31
|
justify-content: space-between;
|
|
26
32
|
align-items: center;
|
|
27
33
|
padding: 16px 0;
|
|
28
34
|
}
|
|
29
|
-
.bottom-view .left[data-v-
|
|
35
|
+
.bottom-view .left[data-v-01c2d0b8] {
|
|
30
36
|
display: flex;
|
|
31
37
|
align-items: center;
|
|
32
38
|
gap: 16px;
|
|
33
39
|
}
|
|
34
|
-
.title-span[data-v-
|
|
40
|
+
.title-span[data-v-01c2d0b8] {
|
|
35
41
|
display: flex;
|
|
36
42
|
align-items: center;
|
|
37
43
|
gap: 8px;
|
|
38
44
|
}
|
|
39
|
-
.title-span .icon[data-v-
|
|
45
|
+
.title-span .icon[data-v-01c2d0b8] {
|
|
40
46
|
font-size: 16px;
|
|
41
47
|
}
|
|
42
|
-
.title-span .title[data-v-
|
|
48
|
+
.title-span .title[data-v-01c2d0b8] {
|
|
43
49
|
flex: 1;
|
|
44
50
|
overflow: hidden;
|
|
45
51
|
text-overflow: ellipsis;
|
|
46
52
|
white-space: nowrap;
|
|
47
53
|
}
|
|
48
|
-
.pic-thumb-img[data-v-
|
|
54
|
+
.pic-thumb-img[data-v-01c2d0b8] {
|
|
49
55
|
width: 80px;
|
|
50
56
|
height: 80px;
|
|
51
57
|
object-fit: cover;
|
|
52
58
|
border-radius: 4px;
|
|
53
59
|
}
|
|
54
|
-
.pic-thumb-img.placeholder[data-v-
|
|
60
|
+
.pic-thumb-img.placeholder[data-v-01c2d0b8] {
|
|
55
61
|
background-color: #f5f5f5;
|
|
56
62
|
display: flex;
|
|
57
63
|
align-items: center;
|
|
58
64
|
justify-content: center;
|
|
59
65
|
}
|
|
60
|
-
.pic-thumb-img.placeholder .placeholder-text[data-v-
|
|
66
|
+
.pic-thumb-img.placeholder .placeholder-text[data-v-01c2d0b8] {
|
|
61
67
|
color: #999;
|
|
62
68
|
font-size: 12px;
|
|
63
69
|
}
|
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var vue = require("vue");
|
|
3
|
-
var
|
|
4
|
-
var index = require("./components/ViewAllColumn/index.js");
|
|
5
|
-
require("../typeIcons/style/index.js");
|
|
3
|
+
var SelectAddToView = require("./components/SelectAddToView.js");
|
|
6
4
|
var useSelectAddToState = require("./script/useSelectAddToState.js");
|
|
7
5
|
require("./component.vue_vue_type_style_index_0_scoped_true_lang.js");
|
|
8
6
|
var pluginVue_exportHelper = require("../_virtual/plugin-vue_export-helper.js");
|
|
9
7
|
const _sfc_main = vue.defineComponent({
|
|
10
|
-
...{ name: "
|
|
8
|
+
...{ name: "SelectAddTo" },
|
|
11
9
|
__name: "component",
|
|
12
10
|
props: {
|
|
13
|
-
BASE_API: {},
|
|
14
11
|
visible: { type: Boolean },
|
|
15
|
-
|
|
16
|
-
outsideSelectData: {},
|
|
17
|
-
defaultSelectedData: {},
|
|
12
|
+
rid: {},
|
|
18
13
|
maxSelect: {},
|
|
19
|
-
typeData: {},
|
|
20
14
|
userStore: {},
|
|
21
|
-
|
|
22
|
-
typeKey: {}
|
|
23
|
-
rid: {}
|
|
15
|
+
BASE_API: {},
|
|
16
|
+
typeKey: {}
|
|
24
17
|
},
|
|
25
18
|
emits: ["update:visible", "comfirm"],
|
|
26
19
|
setup(__props, { emit: __emit }) {
|
|
@@ -28,101 +21,28 @@ const _sfc_main = vue.defineComponent({
|
|
|
28
21
|
const props = __props;
|
|
29
22
|
const {
|
|
30
23
|
visible,
|
|
31
|
-
title,
|
|
32
24
|
selectedData,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
comfirm,
|
|
39
|
-
HandleOpen,
|
|
40
|
-
HandleClose,
|
|
41
|
-
tabsChange,
|
|
42
|
-
selectedDataChangeHandle,
|
|
43
|
-
loadConfig,
|
|
44
|
-
getUserInfoHandle
|
|
25
|
+
onOk,
|
|
26
|
+
onCancel,
|
|
27
|
+
onComfirm,
|
|
28
|
+
onClose,
|
|
29
|
+
onSelectedDataChange
|
|
45
30
|
} = useSelectAddToState.useSelectAddToState(props, emit);
|
|
46
|
-
vue.onMounted(() => {
|
|
47
|
-
if (props.userStore) {
|
|
48
|
-
userInfo.value = { BASE_API: props.BASE_API, ...props.userStore };
|
|
49
|
-
} else {
|
|
50
|
-
getUserInfoHandle();
|
|
51
|
-
}
|
|
52
|
-
loadConfig();
|
|
53
|
-
});
|
|
54
31
|
return (_ctx, _cache) => {
|
|
55
|
-
|
|
56
|
-
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Modal), {
|
|
57
|
-
footer: false,
|
|
58
|
-
"mask-closable": false,
|
|
32
|
+
return vue.openBlock(), vue.createBlock(SelectAddToView, {
|
|
59
33
|
visible: vue.unref(visible),
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, {
|
|
71
|
-
title: vue.withCtx(() => [
|
|
72
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(title)), 1)
|
|
73
|
-
]),
|
|
74
|
-
default: vue.withCtx(() => [
|
|
75
|
-
vue.createVNode(vue.unref(webVue.Tabs), {
|
|
76
|
-
class: "content-tabs",
|
|
77
|
-
justify: "",
|
|
78
|
-
"lazy-load": "",
|
|
79
|
-
onTabClick: vue.unref(tabsChange)
|
|
80
|
-
}, {
|
|
81
|
-
default: vue.withCtx(() => {
|
|
82
|
-
var _a, _b;
|
|
83
|
-
return [
|
|
84
|
-
_ctx.rid ? (vue.openBlock(), vue.createBlock(index, {
|
|
85
|
-
key: 0,
|
|
86
|
-
rid: _ctx.rid,
|
|
87
|
-
"default-selected-data": vue.unref(selectedData),
|
|
88
|
-
"max-select": _ctx.maxSelect,
|
|
89
|
-
"user-info": vue.unref(userInfo),
|
|
90
|
-
"type-key": _ctx.typeKey || "",
|
|
91
|
-
"type-data": vue.unref(typeDataController),
|
|
92
|
-
series: ((_a = vue.unref(typeDataController)) == null ? void 0 : _a.docSeries) || "all",
|
|
93
|
-
banner: ((_b = vue.unref(typeDataController)) == null ? void 0 : _b.docBanner) || "all",
|
|
94
|
-
onChange: vue.unref(selectedDataChangeHandle)
|
|
95
|
-
}, {
|
|
96
|
-
store: vue.withCtx(() => [
|
|
97
|
-
vue.createVNode(_component_storeBox, {
|
|
98
|
-
selectData: vue.unref(selectedData),
|
|
99
|
-
"onUpdate:selectData": _cache[0] || (_cache[0] = ($event) => vue.isRef(selectedData) ? selectedData.value = $event : null)
|
|
100
|
-
}, null, 8, ["selectData"])
|
|
101
|
-
]),
|
|
102
|
-
options: vue.withCtx(() => [
|
|
103
|
-
vue.createVNode(vue.unref(webVue.Button), {
|
|
104
|
-
disabled: !vue.unref(hasSelected),
|
|
105
|
-
type: "primary",
|
|
106
|
-
onClick: vue.unref(comfirm)
|
|
107
|
-
}, {
|
|
108
|
-
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
109
|
-
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
110
|
-
])),
|
|
111
|
-
_: 1,
|
|
112
|
-
__: [1]
|
|
113
|
-
}, 8, ["disabled", "onClick"])
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
}, 8, ["rid", "default-selected-data", "max-select", "user-info", "type-key", "type-data", "series", "banner", "onChange"])) : vue.createCommentVNode("v-if", true)
|
|
117
|
-
];
|
|
118
|
-
}),
|
|
119
|
-
_: 1
|
|
120
|
-
}, 8, ["onTabClick"])
|
|
121
|
-
]),
|
|
122
|
-
_: 1
|
|
123
|
-
}, 8, ["visible", "onCancel", "onClose", "onOk", "onOpen"]);
|
|
34
|
+
rid: props.rid,
|
|
35
|
+
"selected-data": vue.unref(selectedData),
|
|
36
|
+
"max-select": props.maxSelect,
|
|
37
|
+
"type-key": props.typeKey,
|
|
38
|
+
onCancel: vue.unref(onCancel),
|
|
39
|
+
onClose: vue.unref(onClose),
|
|
40
|
+
onOk: vue.unref(onOk),
|
|
41
|
+
onSelectedChange: vue.unref(onSelectedDataChange),
|
|
42
|
+
onComfirm: vue.unref(onComfirm)
|
|
43
|
+
}, null, 8, ["visible", "rid", "selected-data", "max-select", "type-key", "onCancel", "onClose", "onOk", "onSelectedChange", "onComfirm"]);
|
|
124
44
|
};
|
|
125
45
|
}
|
|
126
46
|
});
|
|
127
|
-
var _selectAddTo = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["__scopeId", "data-v-
|
|
47
|
+
var _selectAddTo = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["__scopeId", "data-v-7f81762c"]]);
|
|
128
48
|
module.exports = _selectAddTo;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var webVue = require("@arco-design/web-vue");
|
|
4
|
+
var index = require("./ViewAllColumn/index.js");
|
|
5
|
+
var index$1 = require("../../contentModal/components/storeBox/index.js");
|
|
6
|
+
require("./SelectAddToView.vue_vue_type_style_index_0_scoped_true_lang.js");
|
|
7
|
+
var pluginVue_exportHelper = require("../../_virtual/plugin-vue_export-helper.js");
|
|
8
|
+
const _sfc_main = vue.defineComponent({
|
|
9
|
+
__name: "SelectAddToView",
|
|
10
|
+
props: {
|
|
11
|
+
visible: { type: Boolean },
|
|
12
|
+
rid: {},
|
|
13
|
+
selectedData: {},
|
|
14
|
+
maxSelect: {},
|
|
15
|
+
typeKey: {}
|
|
16
|
+
},
|
|
17
|
+
emits: [
|
|
18
|
+
"cancel",
|
|
19
|
+
"close",
|
|
20
|
+
"ok",
|
|
21
|
+
"open",
|
|
22
|
+
"selected-change",
|
|
23
|
+
"comfirm"
|
|
24
|
+
],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const emit = __emit;
|
|
28
|
+
const hasSelected = vue.computed(
|
|
29
|
+
() => props.selectedData && props.selectedData.length > 0
|
|
30
|
+
);
|
|
31
|
+
function handleComfirm() {
|
|
32
|
+
emit("comfirm");
|
|
33
|
+
}
|
|
34
|
+
function handleSelectedDataChange(val) {
|
|
35
|
+
emit("selected-change", val);
|
|
36
|
+
}
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Modal), {
|
|
39
|
+
footer: false,
|
|
40
|
+
"mask-closable": false,
|
|
41
|
+
visible: _ctx.visible,
|
|
42
|
+
"body-style": { maxHeight: "700px" },
|
|
43
|
+
"body-class": "add-content-modal-body",
|
|
44
|
+
"modal-class": "add-content-modal-wrapper",
|
|
45
|
+
"title-align": "start",
|
|
46
|
+
"unmount-on-close": "",
|
|
47
|
+
width: "1020px",
|
|
48
|
+
onCancel: _cache[1] || (_cache[1] = () => emit("cancel")),
|
|
49
|
+
onClose: _cache[2] || (_cache[2] = () => emit("close")),
|
|
50
|
+
onOk: _cache[3] || (_cache[3] = () => emit("ok"))
|
|
51
|
+
}, {
|
|
52
|
+
title: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
53
|
+
vue.createTextVNode("\u9009\u62E9\u6DFB\u52A0")
|
|
54
|
+
])),
|
|
55
|
+
default: vue.withCtx(() => [
|
|
56
|
+
_ctx.rid ? (vue.openBlock(), vue.createBlock(index, {
|
|
57
|
+
key: 0,
|
|
58
|
+
rid: _ctx.rid,
|
|
59
|
+
"default-selected-data": _ctx.selectedData,
|
|
60
|
+
"max-select": _ctx.maxSelect,
|
|
61
|
+
"type-key": _ctx.typeKey || "",
|
|
62
|
+
onChange: handleSelectedDataChange
|
|
63
|
+
}, {
|
|
64
|
+
store: vue.withCtx(() => [
|
|
65
|
+
vue.createVNode(index$1, {
|
|
66
|
+
selectData: _ctx.selectedData,
|
|
67
|
+
"onUpdate:selectData": _cache[0] || (_cache[0] = (val) => emit("selected-change", val))
|
|
68
|
+
}, null, 8, ["selectData"])
|
|
69
|
+
]),
|
|
70
|
+
options: vue.withCtx(() => [
|
|
71
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
72
|
+
disabled: !hasSelected.value,
|
|
73
|
+
type: "primary",
|
|
74
|
+
onClick: handleComfirm
|
|
75
|
+
}, {
|
|
76
|
+
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
|
|
77
|
+
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
78
|
+
])),
|
|
79
|
+
_: 1,
|
|
80
|
+
__: [5]
|
|
81
|
+
}, 8, ["disabled"])
|
|
82
|
+
]),
|
|
83
|
+
_: 1
|
|
84
|
+
}, 8, ["rid", "default-selected-data", "max-select", "type-key"])) : vue.createCommentVNode("v-if", true)
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 8, ["visible"]);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
var SelectAddToView = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["__scopeId", "data-v-00adfb7c"]]);
|
|
92
|
+
module.exports = SelectAddToView;
|
|
@@ -14,10 +14,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
14
14
|
props: {
|
|
15
15
|
groupId: {},
|
|
16
16
|
tree: { default: () => [] },
|
|
17
|
-
series: { default: "all" },
|
|
18
|
-
banner: { default: "all" },
|
|
19
17
|
height: {},
|
|
20
|
-
userInfo: {},
|
|
21
18
|
typeKey: {}
|
|
22
19
|
},
|
|
23
20
|
emits: ["update:group_id", "search"],
|
|
@@ -33,11 +33,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
33
33
|
...{ name: "ViewAllColumn" },
|
|
34
34
|
__name: "index",
|
|
35
35
|
props: {
|
|
36
|
-
maxSelect: {},
|
|
37
36
|
defaultSelectedData: {},
|
|
38
|
-
typeData: {},
|
|
39
|
-
series: {},
|
|
40
|
-
banner: {},
|
|
41
37
|
userInfo: {},
|
|
42
38
|
typeKey: {},
|
|
43
39
|
rid: {}
|
|
@@ -97,17 +93,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
97
93
|
onCellMouseEnter: vue.unref(tableCellMouseEnter),
|
|
98
94
|
onCellMouseLeave: vue.unref(tableCellMouseLeave),
|
|
99
95
|
onRowClick: vue.unref(selectTableCell)
|
|
100
|
-
}, {
|
|
96
|
+
}, vue.createSlots({
|
|
101
97
|
"expand-icon": vue.withCtx(({ expanded }) => [
|
|
102
98
|
!expanded ? (vue.openBlock(), vue.createBlock(vue.unref(icon.IconRight), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(icon.IconDown), { key: 1 }))
|
|
103
99
|
]),
|
|
104
|
-
selectTitle: vue.withCtx(() => [
|
|
105
|
-
vue.createVNode(vue.unref(webVue.Checkbox), {
|
|
106
|
-
"model-value": vue.unref(selectedData).length === vue.unref(mediaFileData).length,
|
|
107
|
-
class: "icon",
|
|
108
|
-
onChange: vue.unref(selectTableAll)
|
|
109
|
-
}, null, 8, ["model-value", "onChange"])
|
|
110
|
-
]),
|
|
111
100
|
select: vue.withCtx(({ record }) => [
|
|
112
101
|
vue.createVNode(vue.unref(webVue.Checkbox), {
|
|
113
102
|
"model-value": vue.unref(isItemChecked)(vue.unref(selectedData), record),
|
|
@@ -137,8 +126,20 @@ const _sfc_main = vue.defineComponent({
|
|
|
137
126
|
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(index$1.timeFormat)(record.pub_time)), 1)
|
|
138
127
|
])
|
|
139
128
|
]),
|
|
140
|
-
_:
|
|
141
|
-
},
|
|
129
|
+
_: 2
|
|
130
|
+
}, [
|
|
131
|
+
_ctx.typeKey !== "series:special_v3" ? {
|
|
132
|
+
name: "selectTitle",
|
|
133
|
+
fn: vue.withCtx(() => [
|
|
134
|
+
vue.createVNode(vue.unref(webVue.Checkbox), {
|
|
135
|
+
"model-value": vue.unref(selectedData).length === vue.unref(mediaFileData).length,
|
|
136
|
+
class: "icon",
|
|
137
|
+
onChange: vue.unref(selectTableAll)
|
|
138
|
+
}, null, 8, ["model-value", "onChange"])
|
|
139
|
+
]),
|
|
140
|
+
key: "0"
|
|
141
|
+
} : void 0
|
|
142
|
+
]), 1032, ["columns", "data", "loading", "load-more", "onCellMouseEnter", "onCellMouseLeave", "onRowClick"])
|
|
142
143
|
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
143
144
|
vue.createVNode(vue.unref(webVue.Table), {
|
|
144
145
|
bordered: false,
|
|
@@ -208,5 +209,5 @@ const _sfc_main = vue.defineComponent({
|
|
|
208
209
|
};
|
|
209
210
|
}
|
|
210
211
|
});
|
|
211
|
-
var ViewAllColumn = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["__scopeId", "data-v-
|
|
212
|
+
var ViewAllColumn = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["__scopeId", "data-v-01c2d0b8"]]);
|
|
212
213
|
module.exports = ViewAllColumn;
|
|
@@ -10,7 +10,7 @@ var dayjs__default = /* @__PURE__ */ _interopDefaultLegacy(dayjs);
|
|
|
10
10
|
const useTableColumns = (props, selectedData, isItemChecked, filter) => {
|
|
11
11
|
const columns = vue.ref([
|
|
12
12
|
{
|
|
13
|
-
title: "
|
|
13
|
+
title: "",
|
|
14
14
|
dataIndex: "select",
|
|
15
15
|
slotName: "select",
|
|
16
16
|
width: 40,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
var vue = require("vue");
|
|
4
|
-
var webVue = require("@arco-design/web-vue");
|
|
5
4
|
var config = require("../../../../config.js");
|
|
6
5
|
var api = require("../../../script/api.js");
|
|
7
6
|
var batch = require("../../../../hooks/batch.js");
|
|
@@ -24,11 +23,6 @@ const useViewAllColumnState = (props, emit) => {
|
|
|
24
23
|
selectedData.value = val;
|
|
25
24
|
}
|
|
26
25
|
);
|
|
27
|
-
const importantBanner = vue.computed(() => {
|
|
28
|
-
if (!props.banner || props.banner === "all")
|
|
29
|
-
return false;
|
|
30
|
-
return !!props.banner;
|
|
31
|
-
});
|
|
32
26
|
const { isItemChecked, tableCellMouseEnter, tableCellMouseLeave } = batch();
|
|
33
27
|
const selectTableCell = (record) => {
|
|
34
28
|
if (props.typeKey === "series:special_v3" ? record.isLeaf && record.parentId : true) {
|
|
@@ -45,12 +39,6 @@ const useViewAllColumnState = (props, emit) => {
|
|
|
45
39
|
emitChange();
|
|
46
40
|
};
|
|
47
41
|
const selectData = (record) => {
|
|
48
|
-
if (importantBanner.value) {
|
|
49
|
-
const { cover } = record;
|
|
50
|
-
if (!(cover == null ? void 0 : cover.banner)) {
|
|
51
|
-
return webVue.Message.warning({ content: "\u8BE5\u5185\u5BB9\u4E0D\u5177\u5907\u72EC\u7ACB\u8F6E\u64AD\u56FE" });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
42
|
addDataToSelectedList(record);
|
|
55
43
|
return true;
|
|
56
44
|
};
|
|
@@ -172,7 +160,6 @@ const useViewAllColumnState = (props, emit) => {
|
|
|
172
160
|
);
|
|
173
161
|
}, 2e3);
|
|
174
162
|
} catch (error) {
|
|
175
|
-
console.error("Failed to load more data:", error);
|
|
176
163
|
done([]);
|
|
177
164
|
}
|
|
178
165
|
};
|
|
@@ -22,14 +22,6 @@ function getMlists(BASE_API, params) {
|
|
|
22
22
|
params
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function getConfigurationNew(BASE_API, params) {
|
|
26
|
-
return request(BASE_API, {
|
|
27
|
-
url: "/poplar/v2/configuration",
|
|
28
|
-
method: "get",
|
|
29
|
-
params
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
25
|
exports.getCategoryMediaNew = getCategoryMediaNew;
|
|
33
|
-
exports.getConfigurationNew = getConfigurationNew;
|
|
34
26
|
exports.getMlists = getMlists;
|
|
35
27
|
exports.getPoliticals = getPoliticals;
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
var vue = require("vue");
|
|
4
|
-
var api = require("./api.js");
|
|
5
4
|
var config = require("../../config.js");
|
|
6
|
-
var user = require("../../hooks/user.js");
|
|
7
5
|
const useSelectAddToState = (props, emit) => {
|
|
8
|
-
|
|
6
|
+
props.BASE_API || config.DEFAULT_BASE_API;
|
|
9
7
|
const visible = vue.computed({
|
|
10
8
|
get() {
|
|
11
9
|
return props.visible;
|
|
12
10
|
},
|
|
13
11
|
set(value) {
|
|
14
|
-
|
|
12
|
+
emit("update:visible", value);
|
|
15
13
|
}
|
|
16
14
|
});
|
|
17
15
|
const selectedData = vue.ref([]);
|
|
18
|
-
const configData = vue.ref({});
|
|
19
|
-
const { userInfo, getUserInfoHandle } = user["default"](BASE_API);
|
|
20
16
|
const title = vue.computed(() => {
|
|
21
17
|
const titleMap = {
|
|
22
18
|
"series:video_album": "\u6DFB\u52A0\u81F3\u89C6\u9891\u5408\u96C6",
|
|
@@ -27,82 +23,35 @@ const useSelectAddToState = (props, emit) => {
|
|
|
27
23
|
return titleMap[props.typeKey || ""] || "";
|
|
28
24
|
});
|
|
29
25
|
const hasSelected = vue.computed(() => selectedData.value.length > 0);
|
|
30
|
-
const
|
|
31
|
-
if (!props.typeData)
|
|
32
|
-
return {};
|
|
33
|
-
try {
|
|
34
|
-
return JSON.parse(JSON.stringify(props.typeData));
|
|
35
|
-
} catch (e) {
|
|
36
|
-
console.warn("Failed to parse typeData:", e);
|
|
37
|
-
return {};
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const setVisible = (bool) => {
|
|
41
|
-
emit("update:visible", bool);
|
|
42
|
-
};
|
|
43
|
-
const selectedDataChangeHandle = (data) => {
|
|
26
|
+
const onSelectedDataChange = (data) => {
|
|
44
27
|
selectedData.value = data;
|
|
45
28
|
};
|
|
46
|
-
const
|
|
47
|
-
|
|
29
|
+
const onOk = () => {
|
|
30
|
+
visible.value = false;
|
|
48
31
|
};
|
|
49
|
-
const
|
|
50
|
-
|
|
32
|
+
const onCancel = () => {
|
|
33
|
+
visible.value = false;
|
|
51
34
|
};
|
|
52
|
-
const
|
|
35
|
+
const onComfirm = () => {
|
|
53
36
|
emit("comfirm", JSON.parse(JSON.stringify(selectedData.value)));
|
|
54
37
|
};
|
|
55
|
-
const
|
|
56
|
-
selectedData.value = props.defaultSelectedData || [];
|
|
57
|
-
};
|
|
58
|
-
const HandleClose = () => {
|
|
38
|
+
const onClose = () => {
|
|
59
39
|
selectedData.value = [];
|
|
60
40
|
};
|
|
61
|
-
const
|
|
41
|
+
const onTabChange = () => {
|
|
62
42
|
selectedData.value = [];
|
|
63
43
|
};
|
|
64
|
-
const loadConfig = async () => {
|
|
65
|
-
var _a;
|
|
66
|
-
try {
|
|
67
|
-
const res = await api.getConfigurationNew(BASE_API, {
|
|
68
|
-
module: "third_party_services"
|
|
69
|
-
});
|
|
70
|
-
if (res.code === 0 && ((_a = res.message) == null ? void 0 : _a.length)) {
|
|
71
|
-
res.message.forEach((item) => {
|
|
72
|
-
configData.value[item.key] = JSON.parse(item.value);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
} catch (error) {
|
|
76
|
-
console.error("Failed to load configuration:", error);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
const checkServiceEnable = (key) => {
|
|
80
|
-
const data = configData.value[key];
|
|
81
|
-
if (!data)
|
|
82
|
-
return false;
|
|
83
|
-
if (!data.enable && typeof data.enable !== "undefined")
|
|
84
|
-
return false;
|
|
85
|
-
return true;
|
|
86
|
-
};
|
|
87
44
|
return {
|
|
88
45
|
visible,
|
|
89
46
|
title,
|
|
90
47
|
selectedData,
|
|
91
48
|
hasSelected,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
handleCancel,
|
|
99
|
-
comfirm,
|
|
100
|
-
HandleOpen,
|
|
101
|
-
HandleClose,
|
|
102
|
-
tabsChange,
|
|
103
|
-
loadConfig,
|
|
104
|
-
checkServiceEnable,
|
|
105
|
-
getUserInfoHandle
|
|
49
|
+
onSelectedDataChange,
|
|
50
|
+
onOk,
|
|
51
|
+
onCancel,
|
|
52
|
+
onComfirm,
|
|
53
|
+
onClose,
|
|
54
|
+
onTabChange
|
|
106
55
|
};
|
|
107
56
|
};
|
|
108
57
|
exports.useSelectAddToState = useSelectAddToState;
|