@cmstops/pro-compo 3.9.2-alpha.21 → 3.9.2-alpha.23
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/MediaFilter/index.js +6 -177
- package/es/contentModal/components/ViewAllColumn/index.js +0 -1
- package/es/contentModal/script/api.js +1 -7
- package/es/selectAddTo/component.js +23 -102
- 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 +1 -4
- package/es/selectAddTo/components/ViewAllColumn/index.js +21 -18
- package/es/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +31 -7
- package/es/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +3 -14
- package/es/selectAddTo/index.js +1 -10
- package/es/selectAddTo/script/api.js +1 -14
- package/es/selectAddTo/script/useSelectAddToState.js +16 -67
- package/es/selectThumb/component.js +9 -9
- package/es/style.css +24 -18
- package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +5 -176
- package/lib/contentModal/components/ViewAllColumn/index.js +0 -1
- package/lib/contentModal/script/api.js +0 -7
- package/lib/index.js +1 -1
- package/lib/selectAddTo/component.js +22 -101
- 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 +1 -4
- package/lib/selectAddTo/components/ViewAllColumn/index.js +20 -17
- package/lib/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +34 -6
- package/lib/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +3 -14
- package/lib/selectAddTo/index.js +2 -12
- package/lib/selectAddTo/script/api.js +0 -15
- package/lib/selectAddTo/script/useSelectAddToState.js +16 -67
- package/lib/selectThumb/component.js +9 -9
- package/package.json +1 -1
- package/es/contentModal/components/ViewAllColumn/columnTree/index.js +0 -151
- package/es/selectAddTo/components/ViewAllColumn/columnTree/index.js +0 -151
- package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +0 -152
- package/lib/selectAddTo/components/ViewAllColumn/columnTree/index.js +0 -152
|
@@ -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,100 +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
|
-
title: vue.withCtx(() => [
|
|
71
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(title)), 1)
|
|
72
|
-
]),
|
|
73
|
-
default: vue.withCtx(() => [
|
|
74
|
-
vue.createVNode(vue.unref(webVue.Tabs), {
|
|
75
|
-
class: "content-tabs",
|
|
76
|
-
justify: "",
|
|
77
|
-
"lazy-load": "",
|
|
78
|
-
onTabClick: vue.unref(tabsChange)
|
|
79
|
-
}, {
|
|
80
|
-
default: vue.withCtx(() => {
|
|
81
|
-
var _a, _b;
|
|
82
|
-
return [
|
|
83
|
-
_ctx.rid ? (vue.openBlock(), vue.createBlock(index, {
|
|
84
|
-
key: 0,
|
|
85
|
-
rid: _ctx.rid,
|
|
86
|
-
"default-selected-data": vue.unref(selectedData),
|
|
87
|
-
"max-select": _ctx.maxSelect,
|
|
88
|
-
"user-info": vue.unref(userInfo),
|
|
89
|
-
"type-key": _ctx.typeKey || "",
|
|
90
|
-
"type-data": vue.unref(typeDataController),
|
|
91
|
-
series: ((_a = vue.unref(typeDataController)) == null ? void 0 : _a.docSeries) || "all",
|
|
92
|
-
banner: ((_b = vue.unref(typeDataController)) == null ? void 0 : _b.docBanner) || "all",
|
|
93
|
-
onChange: vue.unref(selectedDataChangeHandle)
|
|
94
|
-
}, {
|
|
95
|
-
store: vue.withCtx(() => [
|
|
96
|
-
vue.createVNode(_component_storeBox, {
|
|
97
|
-
selectData: vue.unref(selectedData),
|
|
98
|
-
"onUpdate:selectData": _cache[0] || (_cache[0] = ($event) => vue.isRef(selectedData) ? selectedData.value = $event : null)
|
|
99
|
-
}, null, 8, ["selectData"])
|
|
100
|
-
]),
|
|
101
|
-
options: vue.withCtx(() => [
|
|
102
|
-
vue.createVNode(vue.unref(webVue.Button), {
|
|
103
|
-
disabled: !vue.unref(hasSelected),
|
|
104
|
-
type: "primary",
|
|
105
|
-
onClick: vue.unref(comfirm)
|
|
106
|
-
}, {
|
|
107
|
-
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
108
|
-
vue.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"])) : vue.createCommentVNode("v-if", true)
|
|
116
|
-
];
|
|
117
|
-
}),
|
|
118
|
-
_: 1
|
|
119
|
-
}, 8, ["onTabClick"])
|
|
120
|
-
]),
|
|
121
|
-
_: 1
|
|
122
|
-
}, 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"]);
|
|
123
44
|
};
|
|
124
45
|
}
|
|
125
46
|
});
|
|
126
|
-
var _selectAddTo = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["__scopeId", "data-v-
|
|
47
|
+
var _selectAddTo = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["__scopeId", "data-v-7f81762c"]]);
|
|
127
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"],
|
|
@@ -149,7 +146,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
149
146
|
modelValue: filter.value.order,
|
|
150
147
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.order = $event),
|
|
151
148
|
class: "filter-item",
|
|
152
|
-
placeholder: "\
|
|
149
|
+
placeholder: "\u521B\u5EFA\u65F6\u95F4"
|
|
153
150
|
}, {
|
|
154
151
|
default: vue.withCtx(() => [
|
|
155
152
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sortMethodOptions.value, (item) => {
|
|
@@ -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: {}
|
|
@@ -63,12 +59,14 @@ const _sfc_main = vue.defineComponent({
|
|
|
63
59
|
search,
|
|
64
60
|
pageChangeHandle,
|
|
65
61
|
loadData,
|
|
66
|
-
loadMore
|
|
62
|
+
loadMore,
|
|
63
|
+
filter
|
|
67
64
|
} = useViewAllColumnState.useViewAllColumnState(props, emit);
|
|
68
65
|
const { columns, politicalColumns } = useTableColumns.useTableColumns(
|
|
69
66
|
props,
|
|
70
67
|
selectedData,
|
|
71
|
-
isItemChecked
|
|
68
|
+
isItemChecked,
|
|
69
|
+
filter
|
|
72
70
|
);
|
|
73
71
|
vue.onMounted(() => {
|
|
74
72
|
loadData();
|
|
@@ -95,17 +93,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
95
93
|
onCellMouseEnter: vue.unref(tableCellMouseEnter),
|
|
96
94
|
onCellMouseLeave: vue.unref(tableCellMouseLeave),
|
|
97
95
|
onRowClick: vue.unref(selectTableCell)
|
|
98
|
-
}, {
|
|
96
|
+
}, vue.createSlots({
|
|
99
97
|
"expand-icon": vue.withCtx(({ expanded }) => [
|
|
100
98
|
!expanded ? (vue.openBlock(), vue.createBlock(vue.unref(icon.IconRight), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(icon.IconDown), { key: 1 }))
|
|
101
99
|
]),
|
|
102
|
-
selectTitle: vue.withCtx(() => [
|
|
103
|
-
vue.createVNode(vue.unref(webVue.Checkbox), {
|
|
104
|
-
"model-value": vue.unref(selectedData).length === vue.unref(mediaFileData).length,
|
|
105
|
-
class: "icon",
|
|
106
|
-
onChange: vue.unref(selectTableAll)
|
|
107
|
-
}, null, 8, ["model-value", "onChange"])
|
|
108
|
-
]),
|
|
109
100
|
select: vue.withCtx(({ record }) => [
|
|
110
101
|
vue.createVNode(vue.unref(webVue.Checkbox), {
|
|
111
102
|
"model-value": vue.unref(isItemChecked)(vue.unref(selectedData), record),
|
|
@@ -135,8 +126,20 @@ const _sfc_main = vue.defineComponent({
|
|
|
135
126
|
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(index$1.timeFormat)(record.pub_time)), 1)
|
|
136
127
|
])
|
|
137
128
|
]),
|
|
138
|
-
_:
|
|
139
|
-
},
|
|
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"])
|
|
140
143
|
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
141
144
|
vue.createVNode(vue.unref(webVue.Table), {
|
|
142
145
|
bordered: false,
|
|
@@ -206,5 +209,5 @@ const _sfc_main = vue.defineComponent({
|
|
|
206
209
|
};
|
|
207
210
|
}
|
|
208
211
|
});
|
|
209
|
-
var ViewAllColumn = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["__scopeId", "data-v-
|
|
212
|
+
var ViewAllColumn = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["__scopeId", "data-v-01c2d0b8"]]);
|
|
210
213
|
module.exports = ViewAllColumn;
|
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
var vue = require("vue");
|
|
4
4
|
var webVue = require("@arco-design/web-vue");
|
|
5
|
-
|
|
5
|
+
var dayjs = require("dayjs");
|
|
6
|
+
function _interopDefaultLegacy(e) {
|
|
7
|
+
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
8
|
+
}
|
|
9
|
+
var dayjs__default = /* @__PURE__ */ _interopDefaultLegacy(dayjs);
|
|
10
|
+
const useTableColumns = (props, selectedData, isItemChecked, filter) => {
|
|
6
11
|
const columns = vue.ref([
|
|
7
12
|
{
|
|
8
|
-
title: "
|
|
13
|
+
title: "",
|
|
9
14
|
dataIndex: "select",
|
|
10
15
|
slotName: "select",
|
|
11
16
|
width: 40,
|
|
12
17
|
titleSlotName: "selectTitle",
|
|
13
18
|
render: ({ record }) => {
|
|
14
19
|
if (props.typeKey === "series:special_v3") {
|
|
15
|
-
if (record.isLeaf) {
|
|
20
|
+
if (record.isLeaf && record.parentId) {
|
|
16
21
|
return vue.h(webVue.Checkbox, {
|
|
17
22
|
modelValue: isItemChecked.value(selectedData.value, record),
|
|
18
23
|
class: "icon"
|
|
@@ -39,10 +44,33 @@ const useTableColumns = (props, selectedData, isItemChecked) => {
|
|
|
39
44
|
width: 100
|
|
40
45
|
},
|
|
41
46
|
{
|
|
42
|
-
title:
|
|
43
|
-
|
|
47
|
+
title: vue.computed(() => {
|
|
48
|
+
var _a;
|
|
49
|
+
return ((_a = filter.value) == null ? void 0 : _a.order) === "pub_time" ? "\u53D1\u5E03\u65F6\u95F4" : "\u521B\u5EFA\u65F6\u95F4";
|
|
50
|
+
}),
|
|
51
|
+
dataIndex: vue.computed(
|
|
52
|
+
() => {
|
|
53
|
+
var _a;
|
|
54
|
+
return ((_a = filter.value) == null ? void 0 : _a.order) === "pub_time" ? "pub_time" : "created_at";
|
|
55
|
+
}
|
|
56
|
+
),
|
|
44
57
|
slotName: "pub_time",
|
|
45
|
-
width: 150
|
|
58
|
+
width: 150,
|
|
59
|
+
render: ({ record }) => {
|
|
60
|
+
var _a;
|
|
61
|
+
if (((_a = filter.value) == null ? void 0 : _a.order) === "pub_time") {
|
|
62
|
+
const raw2 = record.pub_time;
|
|
63
|
+
if (!raw2)
|
|
64
|
+
return "--";
|
|
65
|
+
const d2 = typeof raw2 === "number" || /^\d+$/.test(raw2) ? dayjs__default["default"].unix(Number(raw2)) : dayjs__default["default"](raw2);
|
|
66
|
+
return d2.isValid() ? d2.format("YYYY-M-D HH:mm") : raw2;
|
|
67
|
+
}
|
|
68
|
+
const raw = record.created_at;
|
|
69
|
+
if (!raw)
|
|
70
|
+
return "--";
|
|
71
|
+
const d = dayjs__default["default"](raw);
|
|
72
|
+
return d.isValid() ? d.format("YYYY-M-D HH:mm") : raw;
|
|
73
|
+
}
|
|
46
74
|
}
|
|
47
75
|
]);
|
|
48
76
|
const politicalColumns = vue.ref([
|
|
@@ -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,14 +23,11 @@ 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) {
|
|
29
|
+
selectData(record);
|
|
30
|
+
}
|
|
35
31
|
};
|
|
36
32
|
const selectTableAll = (checked) => {
|
|
37
33
|
if (checked) {
|
|
@@ -43,12 +39,6 @@ const useViewAllColumnState = (props, emit) => {
|
|
|
43
39
|
emitChange();
|
|
44
40
|
};
|
|
45
41
|
const selectData = (record) => {
|
|
46
|
-
if (importantBanner.value) {
|
|
47
|
-
const { cover } = record;
|
|
48
|
-
if (!(cover == null ? void 0 : cover.banner)) {
|
|
49
|
-
return webVue.Message.warning({ content: "\u8BE5\u5185\u5BB9\u4E0D\u5177\u5907\u72EC\u7ACB\u8F6E\u64AD\u56FE" });
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
42
|
addDataToSelectedList(record);
|
|
53
43
|
return true;
|
|
54
44
|
};
|
|
@@ -170,7 +160,6 @@ const useViewAllColumnState = (props, emit) => {
|
|
|
170
160
|
);
|
|
171
161
|
}, 2e3);
|
|
172
162
|
} catch (error) {
|
|
173
|
-
console.error("Failed to load more data:", error);
|
|
174
163
|
done([]);
|
|
175
164
|
}
|
|
176
165
|
};
|
package/lib/selectAddTo/index.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
2
|
var component = require("./component.js");
|
|
4
|
-
var index = require("./components/ViewAllColumn/index.js");
|
|
5
|
-
var index$1 = require("./components/ViewAllColumn/MediaFilter/index.js");
|
|
6
|
-
var index$2 = require("./components/ViewAllColumn/columnTree/index.js");
|
|
7
3
|
const selectAddTo = Object.assign(component, {
|
|
8
4
|
install: (app) => {
|
|
9
|
-
app.component(
|
|
10
|
-
app.component("ViewAllColumn", index);
|
|
11
|
-
app.component("MediaFilter", index$1);
|
|
12
|
-
app.component("ColumnTree", index$2);
|
|
5
|
+
app.component(component.name, component);
|
|
13
6
|
}
|
|
14
7
|
});
|
|
15
|
-
exports
|
|
16
|
-
exports.MediaFilter = index$1;
|
|
17
|
-
exports.ColumnTree = index$2;
|
|
18
|
-
exports["default"] = selectAddTo;
|
|
8
|
+
module.exports = selectAddTo;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
var request = require("../../utils/request.js");
|
|
4
|
-
function getCategoryPath(BASE_API, params) {
|
|
5
|
-
return request(BASE_API, {
|
|
6
|
-
url: `/poplar/v2/repo/${params == null ? void 0 : params.repo}/category/${params == null ? void 0 : params.category}/path`,
|
|
7
|
-
method: "get"
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
4
|
function getCategoryMediaNew(BASE_API, params) {
|
|
11
5
|
return request(BASE_API, {
|
|
12
6
|
url: `/poplar/v3/s/documents`,
|
|
@@ -28,15 +22,6 @@ function getMlists(BASE_API, params) {
|
|
|
28
22
|
params
|
|
29
23
|
});
|
|
30
24
|
}
|
|
31
|
-
function getConfigurationNew(BASE_API, params) {
|
|
32
|
-
return request(BASE_API, {
|
|
33
|
-
url: "/poplar/v2/configuration",
|
|
34
|
-
method: "get",
|
|
35
|
-
params
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
25
|
exports.getCategoryMediaNew = getCategoryMediaNew;
|
|
39
|
-
exports.getCategoryPath = getCategoryPath;
|
|
40
|
-
exports.getConfigurationNew = getConfigurationNew;
|
|
41
26
|
exports.getMlists = getMlists;
|
|
42
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;
|
|
@@ -517,15 +517,15 @@ const _sfc_main = vue.defineComponent({
|
|
|
517
517
|
}), 128))
|
|
518
518
|
]),
|
|
519
519
|
_: 1
|
|
520
|
-
}, 8, ["modelValue"])
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
520
|
+
}, 8, ["modelValue"]),
|
|
521
|
+
hasCover.value ? (vue.openBlock(), vue.createBlock(colorPalette, {
|
|
522
|
+
key: 0,
|
|
523
|
+
"style-data": styleData.value,
|
|
524
|
+
model: "cover",
|
|
525
|
+
style: { "margin-top": "10px" },
|
|
526
|
+
onChange: colorChange
|
|
527
|
+
}, null, 8, ["style-data"])) : vue.createCommentVNode("v-if", true)
|
|
528
|
+
], 64)) : vue.createCommentVNode("v-if", true)
|
|
529
529
|
])
|
|
530
530
|
], 2),
|
|
531
531
|
_ctx.mode === "doc" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|