@cmstops/pro-compo 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +26 -4
- package/dist/index.min.css +1 -1
- package/es/appCenter/component.js +2 -1
- package/es/config.d.ts +2 -0
- package/es/config.js +3 -0
- package/es/contentModal/component.d.ts +0 -0
- package/es/contentModal/component.js +175 -0
- package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
- package/es/contentModal/components/CompoList/CompoFilter/index.js +103 -0
- package/es/contentModal/components/CompoList/index.d.ts +0 -0
- package/es/contentModal/components/CompoList/index.js +234 -0
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +44 -0
- package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/columnTree/index.js +101 -0
- package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/index.js +277 -0
- package/es/contentModal/components/storeBox/index.d.ts +0 -0
- package/es/contentModal/components/storeBox/index.js +107 -0
- package/es/contentModal/index.d.ts +2 -0
- package/es/contentModal/index.js +7 -0
- package/es/contentModal/script/api.d.ts +10 -0
- package/es/contentModal/script/api.js +45 -0
- package/es/contentModal/style/MediaFilter.less +8 -0
- package/es/contentModal/style/ViewAllColumn.less +33 -0
- package/es/contentModal/style/columnTree.less +9 -0
- package/es/contentModal/style/css.js +5 -0
- package/es/contentModal/style/index.css +13 -0
- package/es/contentModal/style/index.d.ts +5 -0
- package/es/contentModal/style/index.js +5 -0
- package/es/contentModal/style/index.less +16 -0
- package/es/contentModal/style/storeBox.less +45 -0
- package/es/hooks/batch.d.ts +8 -0
- package/es/hooks/batch.js +26 -0
- package/es/hooks/user.d.ts +11 -0
- package/es/hooks/user.js +46 -0
- package/es/index.css +26 -4
- package/es/index.d.ts +4 -1
- package/es/index.js +4 -1
- package/es/index.less +4 -1
- package/es/messageBox/component.js +2 -1
- package/es/messageBox/list.js +4 -4
- package/es/resourceModal/component.d.ts +0 -0
- package/es/resourceModal/component.js +14 -0
- package/es/resourceModal/index.d.ts +2 -0
- package/es/resourceModal/index.js +7 -0
- package/es/style.css +5 -0
- package/es/typeIcons/component.d.ts +0 -0
- package/es/typeIcons/component.js +62 -0
- package/es/typeIcons/index.d.ts +2 -0
- package/es/typeIcons/index.js +7 -0
- package/es/typeIcons/style/css.js +1 -0
- package/es/typeIcons/style/index.css +5 -0
- package/es/typeIcons/style/index.d.ts +1 -0
- package/es/typeIcons/style/index.js +1 -0
- package/es/typeIcons/style/index.less +5 -0
- package/es/uploadStep/component.d.ts +0 -0
- package/es/uploadStep/component.js +14 -0
- package/es/uploadStep/index.d.ts +2 -0
- package/es/uploadStep/index.js +7 -0
- package/es/uploadStep/style/css.js +1 -0
- package/es/uploadStep/style/index.d.ts +1 -0
- package/es/uploadStep/style/index.js +1 -0
- package/es/userAvater/component.js +3 -3
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +7 -0
- package/es/utils/request.js +3 -4
- package/es/utils/typeMap.d.ts +116 -0
- package/es/utils/typeMap.js +22 -0
- package/lib/appCenter/component.js +2 -1
- package/lib/config.js +6 -0
- package/lib/contentModal/component.js +176 -0
- package/lib/contentModal/components/CompoList/CompoFilter/index.js +104 -0
- package/lib/contentModal/components/CompoList/index.js +235 -0
- package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +45 -0
- package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +102 -0
- package/lib/contentModal/components/ViewAllColumn/index.js +278 -0
- package/lib/contentModal/components/storeBox/index.js +108 -0
- package/lib/contentModal/index.js +8 -0
- package/lib/contentModal/script/api.js +52 -0
- package/lib/contentModal/style/MediaFilter.less +8 -0
- package/lib/contentModal/style/ViewAllColumn.less +33 -0
- package/lib/contentModal/style/columnTree.less +9 -0
- package/lib/contentModal/style/css.js +6 -0
- package/lib/contentModal/style/index.css +13 -0
- package/lib/contentModal/style/index.js +6 -0
- package/lib/contentModal/style/index.less +16 -0
- package/lib/contentModal/style/storeBox.less +45 -0
- package/lib/hooks/batch.js +27 -0
- package/lib/hooks/user.js +49 -0
- package/lib/index.css +26 -4
- package/lib/index.js +14 -8
- package/lib/index.less +4 -1
- package/lib/messageBox/component.js +2 -1
- package/lib/messageBox/list.js +4 -4
- package/lib/resourceModal/component.js +15 -0
- package/lib/resourceModal/index.js +8 -0
- package/lib/resourceModal/style/index.css +4 -0
- package/lib/resourceModal/style/index.less +4 -0
- package/lib/typeIcons/component.js +63 -0
- package/lib/{button → typeIcons}/index.js +2 -2
- package/lib/typeIcons/style/css.js +2 -0
- package/lib/typeIcons/style/index.css +5 -0
- package/lib/typeIcons/style/index.js +2 -0
- package/lib/typeIcons/style/index.less +5 -0
- package/lib/uploadStep/component.js +15 -0
- package/lib/uploadStep/index.js +8 -0
- package/lib/uploadStep/style/css.js +2 -0
- package/lib/uploadStep/style/index.css +4 -0
- package/lib/uploadStep/style/index.js +2 -0
- package/lib/uploadStep/style/index.less +4 -0
- package/lib/userAvater/component.js +3 -3
- package/lib/utils/index.js +13 -0
- package/lib/utils/request.js +3 -4
- package/lib/utils/typeMap.js +25 -0
- package/package.json +4 -2
- package/es/_virtual/plugin-vue_export-helper.js +0 -7
- package/es/button/component.d.ts +0 -24
- package/es/button/component.js +0 -43
- package/es/button/index.d.ts +0 -103
- package/es/button/index.js +0 -7
- package/lib/_virtual/plugin-vue_export-helper.js +0 -8
- package/lib/button/component.js +0 -44
- /package/es/{button → resourceModal}/style/css.js +0 -0
- /package/es/{button → resourceModal}/style/index.css +0 -0
- /package/es/{button → resourceModal}/style/index.d.ts +0 -0
- /package/es/{button → resourceModal}/style/index.js +0 -0
- /package/es/{button → resourceModal}/style/index.less +0 -0
- /package/{lib/button → es/uploadStep}/style/index.css +0 -0
- /package/{lib/button → es/uploadStep}/style/index.less +0 -0
- /package/lib/{button → resourceModal}/style/css.js +0 -0
- /package/lib/{button → resourceModal}/style/index.js +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, normalizeStyle, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { Popover, Scrollbar, Tree, Button } from "@arco-design/web-vue";
|
|
3
|
+
import { IconDragDotVertical, IconCaretRight } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import { getCategoryPath } from "../../../script/api.js";
|
|
5
|
+
const _hoisted_1 = { class: "column-selection-container" };
|
|
6
|
+
const _sfc_main = defineComponent({
|
|
7
|
+
...{ name: "columnTree" },
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
column_id: {},
|
|
11
|
+
tree: {},
|
|
12
|
+
height: {},
|
|
13
|
+
userInfo: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:column_id"],
|
|
16
|
+
setup(__props, { emit }) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const selectAlais = ref("");
|
|
19
|
+
const treeOptions = {
|
|
20
|
+
title: "alias",
|
|
21
|
+
isLeaf: "leaf"
|
|
22
|
+
};
|
|
23
|
+
watch(
|
|
24
|
+
() => props.column_id,
|
|
25
|
+
(val) => {
|
|
26
|
+
setSelectAlais(val);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
const setSelectAlais = async (id) => {
|
|
30
|
+
if (id === "all") {
|
|
31
|
+
selectAlais.value = "\u5168\u90E8\u5185\u5BB9";
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const { code, message } = await getCategoryPath(props.userInfo.BASE_API, {
|
|
35
|
+
repo: props.userInfo.repository_id,
|
|
36
|
+
category: id
|
|
37
|
+
});
|
|
38
|
+
if (code === 0) {
|
|
39
|
+
const pathArr = [];
|
|
40
|
+
for (const i of message) {
|
|
41
|
+
pathArr.push(i.category_alias);
|
|
42
|
+
}
|
|
43
|
+
selectAlais.value = pathArr.join("/");
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const AddColumnSelected = (selectedKeys, data) => {
|
|
47
|
+
emit("update:column_id", data.node.id);
|
|
48
|
+
};
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
51
|
+
createVNode(unref(Popover), {
|
|
52
|
+
position: "bottom",
|
|
53
|
+
"content-class": "column-selection-popover-content",
|
|
54
|
+
"content-style": { minWidth: "120px" },
|
|
55
|
+
trigger: "click"
|
|
56
|
+
}, {
|
|
57
|
+
content: withCtx(() => [
|
|
58
|
+
createElementVNode("div", {
|
|
59
|
+
class: "column-selection-main",
|
|
60
|
+
style: normalizeStyle({ minHeight: props.height + "px" })
|
|
61
|
+
}, [
|
|
62
|
+
createElementVNode("div", {
|
|
63
|
+
class: "column-v",
|
|
64
|
+
style: normalizeStyle({ height: props.height + "px" })
|
|
65
|
+
}, [
|
|
66
|
+
createVNode(unref(Scrollbar), {
|
|
67
|
+
"outer-class": "column-outer-scrollbar",
|
|
68
|
+
style: { "height": "100%", "overflow": "auto" }
|
|
69
|
+
}, {
|
|
70
|
+
default: withCtx(() => [
|
|
71
|
+
createVNode(unref(Tree), {
|
|
72
|
+
"block-node": "",
|
|
73
|
+
data: props.tree,
|
|
74
|
+
"check-strictly": "",
|
|
75
|
+
"default-expand-all": false,
|
|
76
|
+
"field-names": treeOptions,
|
|
77
|
+
onSelect: AddColumnSelected
|
|
78
|
+
}, null, 8, ["data"])
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
})
|
|
82
|
+
], 4)
|
|
83
|
+
], 4)
|
|
84
|
+
]),
|
|
85
|
+
default: withCtx(() => [
|
|
86
|
+
createVNode(unref(Button), { class: "button" }, {
|
|
87
|
+
default: withCtx(() => [
|
|
88
|
+
createVNode(unref(IconDragDotVertical)),
|
|
89
|
+
createTextVNode(toDisplayString(selectAlais.value), 1),
|
|
90
|
+
createVNode(unref(IconCaretRight))
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
})
|
|
94
|
+
]),
|
|
95
|
+
_: 1
|
|
96
|
+
})
|
|
97
|
+
]);
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, createVNode, createElementVNode, unref, withCtx, withModifiers, createBlock, toDisplayString, renderSlot, withDirectives, vShow } from "vue";
|
|
2
|
+
import { Table, Checkbox, Pagination, 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 { getCategoryMediaNew, checkCommitFulfillment, getCategoryCategoriesTree } 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: "ViewAllColumn" },
|
|
16
|
+
__name: "index",
|
|
17
|
+
props: {
|
|
18
|
+
maxSelect: {},
|
|
19
|
+
defaultSelectedData: {},
|
|
20
|
+
typeData: {},
|
|
21
|
+
series: {},
|
|
22
|
+
banner: {},
|
|
23
|
+
userInfo: {}
|
|
24
|
+
},
|
|
25
|
+
emits: ["change"],
|
|
26
|
+
setup(__props, { emit }) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const _maxSelect = props.maxSelect || 100;
|
|
29
|
+
const selectedData = ref([]);
|
|
30
|
+
const tempSelectedData = computed(() => {
|
|
31
|
+
return props.defaultSelectedData || [];
|
|
32
|
+
});
|
|
33
|
+
watch(
|
|
34
|
+
() => tempSelectedData.value,
|
|
35
|
+
(val) => {
|
|
36
|
+
selectedData.value = val;
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
const importantBanner = computed(() => {
|
|
40
|
+
return props.banner !== "all";
|
|
41
|
+
});
|
|
42
|
+
const {
|
|
43
|
+
isItemChecked,
|
|
44
|
+
hoverBatchBox,
|
|
45
|
+
tableCellMouseEnter,
|
|
46
|
+
tableCellMouseLeave
|
|
47
|
+
} = useTableBatch();
|
|
48
|
+
const clickCheckbox = (e, record) => {
|
|
49
|
+
e.stopPropagation();
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
selectData(record);
|
|
52
|
+
};
|
|
53
|
+
const selectTableCell = (record) => {
|
|
54
|
+
selectData(record);
|
|
55
|
+
};
|
|
56
|
+
const selectData = (record) => {
|
|
57
|
+
if (importantBanner.value) {
|
|
58
|
+
const {
|
|
59
|
+
cover: { banner }
|
|
60
|
+
} = record;
|
|
61
|
+
if (!banner) {
|
|
62
|
+
return Message.warning({ content: "\u8BE5\u5185\u5BB9\u4E0D\u5177\u5907\u72EC\u7ACB\u8F6E\u64AD\u56FE" });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
addDataToSelectedList(record);
|
|
66
|
+
};
|
|
67
|
+
const addDataToSelectedList = async (record) => {
|
|
68
|
+
const index = selectedData.value.findIndex((v) => v.id === record.id);
|
|
69
|
+
if (selectedData.value.length < _maxSelect) {
|
|
70
|
+
if (index === -1) {
|
|
71
|
+
if (await checkCommitFulfillment(props.userInfo.BASE_API, record)) {
|
|
72
|
+
selectedData.value.push(record);
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
selectedData.value.splice(index, 1);
|
|
76
|
+
}
|
|
77
|
+
emitChange();
|
|
78
|
+
} else {
|
|
79
|
+
if (index === -1) {
|
|
80
|
+
selectedData.value.splice(selectedData.value.length - 1, 1);
|
|
81
|
+
selectedData.value.push(record);
|
|
82
|
+
} else {
|
|
83
|
+
selectedData.value.splice(index, 1);
|
|
84
|
+
}
|
|
85
|
+
emitChange();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const emitChange = () => {
|
|
89
|
+
emit("change", selectedData.value);
|
|
90
|
+
};
|
|
91
|
+
const group_id = ref(0);
|
|
92
|
+
const categoryCascaderData = ref([]);
|
|
93
|
+
const listMinHeight = ref(0);
|
|
94
|
+
const scrollPercent = { y: "100%" };
|
|
95
|
+
const search = () => {
|
|
96
|
+
};
|
|
97
|
+
const pageChangeHandle = (index) => {
|
|
98
|
+
page.value.index = index;
|
|
99
|
+
loadData();
|
|
100
|
+
};
|
|
101
|
+
watch(
|
|
102
|
+
() => group_id.value,
|
|
103
|
+
() => {
|
|
104
|
+
page.value.index = 1;
|
|
105
|
+
loadData();
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
const loadColumnTreeNode = async () => {
|
|
109
|
+
const { code, message } = await getCategoryCategoriesTree(
|
|
110
|
+
props.userInfo.BASE_API,
|
|
111
|
+
{ repo_id: props.userInfo.repository_id }
|
|
112
|
+
);
|
|
113
|
+
if (code === 0) {
|
|
114
|
+
const arr = [
|
|
115
|
+
{ id: "all", alias: "\u5168\u90E8\u5185\u5BB9", children: [], leaf: true }
|
|
116
|
+
].concat(message || []);
|
|
117
|
+
if (arr[0]) {
|
|
118
|
+
group_id.value = arr[0].id;
|
|
119
|
+
}
|
|
120
|
+
const styleLength = arr.length > 10 ? 10 : arr.length;
|
|
121
|
+
listMinHeight.value = (styleLength + 1) * 32;
|
|
122
|
+
categoryCascaderData.value = arr;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const page = ref({
|
|
126
|
+
index: 1,
|
|
127
|
+
size: 30,
|
|
128
|
+
total: 0
|
|
129
|
+
});
|
|
130
|
+
const columns = [
|
|
131
|
+
{
|
|
132
|
+
title: "\u6807\u9898",
|
|
133
|
+
dataIndex: "title",
|
|
134
|
+
slotName: "title"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
title: "\u7C7B\u578B",
|
|
138
|
+
dataIndex: "series",
|
|
139
|
+
slotName: "series"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
title: "\u7F16\u8F91",
|
|
143
|
+
dataIndex: "duty_editor",
|
|
144
|
+
slotName: "duty_editor"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
title: "\u53D1\u5E03\u65F6\u95F4",
|
|
148
|
+
dataIndex: "pub_time",
|
|
149
|
+
slotName: "pub_time"
|
|
150
|
+
}
|
|
151
|
+
];
|
|
152
|
+
const mediaFileData = ref([]);
|
|
153
|
+
const filter = ref(null);
|
|
154
|
+
const importantSeries = computed(() => {
|
|
155
|
+
return props.series !== "all";
|
|
156
|
+
});
|
|
157
|
+
const dataLoading = ref(false);
|
|
158
|
+
const loadData = async () => {
|
|
159
|
+
const dir_id = group_id.value;
|
|
160
|
+
if (!dir_id)
|
|
161
|
+
return;
|
|
162
|
+
const params = {
|
|
163
|
+
limit: page.value.size,
|
|
164
|
+
offset: page.value.size * (page.value.index - 1),
|
|
165
|
+
where: ["state:15|19"]
|
|
166
|
+
};
|
|
167
|
+
if (importantSeries.value) {
|
|
168
|
+
params.where.push(`series:${props.series.replace(/,/g, "|")}`);
|
|
169
|
+
}
|
|
170
|
+
if (dir_id !== "all") {
|
|
171
|
+
params.where.push(`category:${dir_id}`);
|
|
172
|
+
}
|
|
173
|
+
if (filter.value) {
|
|
174
|
+
const _filter = filter.value;
|
|
175
|
+
params.order = _filter.order;
|
|
176
|
+
params.sort = _filter.sort;
|
|
177
|
+
if (_filter.where) {
|
|
178
|
+
params.where = [...params.where, ..._filter.where];
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
params.where = params.where.join(",");
|
|
182
|
+
dataLoading.value = true;
|
|
183
|
+
const { code, message } = await getCategoryMediaNew(
|
|
184
|
+
props.userInfo.BASE_API,
|
|
185
|
+
params
|
|
186
|
+
);
|
|
187
|
+
dataLoading.value = false;
|
|
188
|
+
if (code === 0) {
|
|
189
|
+
mediaFileData.value = message.data.map((v) => {
|
|
190
|
+
v.catalog = "doc";
|
|
191
|
+
v.target_id = v.id;
|
|
192
|
+
v.target_type = 3;
|
|
193
|
+
v.pub_time = v.created_at;
|
|
194
|
+
v.update_time = v.updated_at;
|
|
195
|
+
v.pub_user_alias = v.author_alias;
|
|
196
|
+
return v;
|
|
197
|
+
}) || [];
|
|
198
|
+
page.value.total = message.total || message.count;
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
onMounted(() => {
|
|
202
|
+
loadColumnTreeNode();
|
|
203
|
+
loadData();
|
|
204
|
+
});
|
|
205
|
+
return (_ctx, _cache) => {
|
|
206
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
207
|
+
createVNode(_sfc_main$1, {
|
|
208
|
+
group_id: group_id.value,
|
|
209
|
+
"onUpdate:group_id": _cache[0] || (_cache[0] = ($event) => group_id.value = $event),
|
|
210
|
+
tree: categoryCascaderData.value,
|
|
211
|
+
series: props.series,
|
|
212
|
+
banner: _ctx.banner,
|
|
213
|
+
height: listMinHeight.value,
|
|
214
|
+
"user-info": props.userInfo,
|
|
215
|
+
onSearch: search
|
|
216
|
+
}, null, 8, ["group_id", "tree", "series", "banner", "height", "user-info"]),
|
|
217
|
+
createElementVNode("div", _hoisted_2, [
|
|
218
|
+
createVNode(unref(Table), {
|
|
219
|
+
columns,
|
|
220
|
+
scroll: scrollPercent,
|
|
221
|
+
pagination: false,
|
|
222
|
+
bordered: false,
|
|
223
|
+
data: mediaFileData.value,
|
|
224
|
+
onCellMouseEnter: unref(tableCellMouseEnter),
|
|
225
|
+
onCellMouseLeave: unref(tableCellMouseLeave),
|
|
226
|
+
onRowClick: selectTableCell
|
|
227
|
+
}, {
|
|
228
|
+
title: withCtx(({ record }) => [
|
|
229
|
+
createElementVNode("span", _hoisted_3, [
|
|
230
|
+
unref(hoverBatchBox)(selectedData.value, record) ? (openBlock(), createElementBlock("span", {
|
|
231
|
+
key: 0,
|
|
232
|
+
onClick: withModifiers(($event) => clickCheckbox($event, record), ["stop"])
|
|
233
|
+
}, [
|
|
234
|
+
createVNode(unref(Checkbox), {
|
|
235
|
+
class: "icon",
|
|
236
|
+
"model-value": unref(isItemChecked)(selectedData.value, record)
|
|
237
|
+
}, null, 8, ["model-value"])
|
|
238
|
+
], 8, _hoisted_4)) : (openBlock(), createBlock(_sfc_main$2, {
|
|
239
|
+
key: 1,
|
|
240
|
+
class: "icon",
|
|
241
|
+
doc: "",
|
|
242
|
+
type: record.series
|
|
243
|
+
}, null, 8, ["type"])),
|
|
244
|
+
createElementVNode("span", _hoisted_5, toDisplayString(record.title || record.alias || "--"), 1)
|
|
245
|
+
])
|
|
246
|
+
]),
|
|
247
|
+
series: withCtx(({ record }) => [
|
|
248
|
+
createElementVNode("span", null, toDisplayString(record.series), 1)
|
|
249
|
+
]),
|
|
250
|
+
duty_editor: withCtx(({ record }) => [
|
|
251
|
+
createElementVNode("span", null, toDisplayString(record.duty_editor || "--"), 1)
|
|
252
|
+
]),
|
|
253
|
+
pub_time: withCtx(({ record }) => [
|
|
254
|
+
createElementVNode("span", null, toDisplayString(record.pub_time), 1)
|
|
255
|
+
]),
|
|
256
|
+
_: 1
|
|
257
|
+
}, 8, ["data", "onCellMouseEnter", "onCellMouseLeave"])
|
|
258
|
+
]),
|
|
259
|
+
createElementVNode("div", _hoisted_6, [
|
|
260
|
+
createElementVNode("div", _hoisted_7, [
|
|
261
|
+
renderSlot(_ctx.$slots, "store"),
|
|
262
|
+
withDirectives(createVNode(unref(Pagination), {
|
|
263
|
+
current: page.value.index,
|
|
264
|
+
"page-size": page.value.size,
|
|
265
|
+
total: page.value.total,
|
|
266
|
+
onChange: pageChangeHandle
|
|
267
|
+
}, null, 8, ["current", "page-size", "total"]), [
|
|
268
|
+
[vShow, mediaFileData.value.length > 0]
|
|
269
|
+
])
|
|
270
|
+
]),
|
|
271
|
+
renderSlot(_ctx.$slots, "options")
|
|
272
|
+
])
|
|
273
|
+
]);
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, toDisplayString, createTextVNode } from "vue";
|
|
2
|
+
import { Popover, Scrollbar, Button, Badge } from "@arco-design/web-vue";
|
|
3
|
+
import { IconCloseCircle } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import _sfc_main$1 from "../../../typeIcons/component.js";
|
|
5
|
+
const _hoisted_1 = { class: "add-content-selected-store-box" };
|
|
6
|
+
const _hoisted_2 = { class: "batch-section-popover-main" };
|
|
7
|
+
const _hoisted_3 = { class: "left" };
|
|
8
|
+
const _hoisted_4 = { class: "title" };
|
|
9
|
+
const _hoisted_5 = { class: "options" };
|
|
10
|
+
const _sfc_main = defineComponent({
|
|
11
|
+
...{ name: "storeBox" },
|
|
12
|
+
__name: "index",
|
|
13
|
+
props: {
|
|
14
|
+
selectData: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:selectData"],
|
|
17
|
+
setup(__props, { emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const remove = (item, index) => {
|
|
20
|
+
const arr = props.selectData;
|
|
21
|
+
arr.splice(index, 1);
|
|
22
|
+
emit("update:selectData", arr);
|
|
23
|
+
};
|
|
24
|
+
const clear = () => {
|
|
25
|
+
emit("update:selectData", []);
|
|
26
|
+
};
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
29
|
+
createVNode(unref(Popover), {
|
|
30
|
+
position: "tl",
|
|
31
|
+
"content-class": "selected-store-box-popover-content",
|
|
32
|
+
"content-style": { width: "290px" },
|
|
33
|
+
"arrow-style": { display: "none" },
|
|
34
|
+
trigger: "click"
|
|
35
|
+
}, {
|
|
36
|
+
content: withCtx(() => [
|
|
37
|
+
createElementVNode("div", _hoisted_2, [
|
|
38
|
+
createVNode(unref(Scrollbar), {
|
|
39
|
+
"outer-class": "batch-section-scrollbar",
|
|
40
|
+
style: { "height": "100%", "overflow": "auto" }
|
|
41
|
+
}, {
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.selectData, (item, index) => {
|
|
44
|
+
return openBlock(), createElementBlock("div", {
|
|
45
|
+
key: index,
|
|
46
|
+
class: "item"
|
|
47
|
+
}, [
|
|
48
|
+
createElementVNode("div", _hoisted_3, [
|
|
49
|
+
createVNode(_sfc_main$1, {
|
|
50
|
+
class: "icon",
|
|
51
|
+
doc: "",
|
|
52
|
+
type: item.series
|
|
53
|
+
}, null, 8, ["type"]),
|
|
54
|
+
createElementVNode("span", _hoisted_4, toDisplayString(item.alias || item.title), 1)
|
|
55
|
+
]),
|
|
56
|
+
createVNode(unref(Button), {
|
|
57
|
+
class: "close-btn",
|
|
58
|
+
type: "text",
|
|
59
|
+
shape: "circle",
|
|
60
|
+
size: "mini",
|
|
61
|
+
onClick: ($event) => remove(item, index)
|
|
62
|
+
}, {
|
|
63
|
+
icon: withCtx(() => [
|
|
64
|
+
createVNode(unref(IconCloseCircle), { size: "14" })
|
|
65
|
+
]),
|
|
66
|
+
_: 2
|
|
67
|
+
}, 1032, ["onClick"])
|
|
68
|
+
]);
|
|
69
|
+
}), 128))
|
|
70
|
+
]),
|
|
71
|
+
_: 1
|
|
72
|
+
})
|
|
73
|
+
]),
|
|
74
|
+
createElementVNode("div", _hoisted_5, [
|
|
75
|
+
createVNode(unref(Button), {
|
|
76
|
+
type: "text",
|
|
77
|
+
onClick: clear
|
|
78
|
+
}, {
|
|
79
|
+
default: withCtx(() => [
|
|
80
|
+
createTextVNode("\u6E05\u7A7A")
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
})
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
default: withCtx(() => [
|
|
87
|
+
createVNode(unref(Badge), {
|
|
88
|
+
count: props.selectData.length
|
|
89
|
+
}, {
|
|
90
|
+
default: withCtx(() => [
|
|
91
|
+
createVNode(unref(Button), { class: "button" }, {
|
|
92
|
+
default: withCtx(() => [
|
|
93
|
+
createTextVNode("\u5DF2\u9009\u6570\u636E")
|
|
94
|
+
]),
|
|
95
|
+
_: 1
|
|
96
|
+
})
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["count"])
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
})
|
|
103
|
+
]);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Params {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export declare function getCategoryCategoriesTree(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
5
|
+
export declare function getCategoryPath(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
6
|
+
export declare function getCategoryMediaNew(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
7
|
+
export declare function checkCommitFulfillment(BASE_API: string, params?: Params): Promise<boolean>;
|
|
8
|
+
export declare function searchMlists(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
9
|
+
export declare function getCategorylistsGroups(BASE_API: string, params?: Params): Promise<import("axios").AxiosResponse<any>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import request from "../../utils/request.js";
|
|
2
|
+
function getCategoryCategoriesTree(BASE_API, params) {
|
|
3
|
+
return request(BASE_API, {
|
|
4
|
+
url: `/poplar/v3/categories`,
|
|
5
|
+
method: "get",
|
|
6
|
+
params
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function getCategoryPath(BASE_API, params) {
|
|
10
|
+
return request(BASE_API, {
|
|
11
|
+
url: `/poplar/v2/repo/${params == null ? void 0 : params.repo}/category/${params == null ? void 0 : params.category}/path`,
|
|
12
|
+
method: "get"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function getCategoryMediaNew(BASE_API, params) {
|
|
16
|
+
return request(BASE_API, {
|
|
17
|
+
url: `/poplar/v3/s/documents`,
|
|
18
|
+
method: "get",
|
|
19
|
+
params
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function checkCommitFulfillment(BASE_API, params) {
|
|
23
|
+
return request(BASE_API, {
|
|
24
|
+
url: `/poplar/v2/doc/new/${params == null ? void 0 : params.hash_id}`,
|
|
25
|
+
method: "get"
|
|
26
|
+
}).then((resp) => {
|
|
27
|
+
const content = resp.message;
|
|
28
|
+
return Promise.resolve(!content.payload.includes("image_over_limit.jpg"));
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function searchMlists(BASE_API, params) {
|
|
32
|
+
return request(BASE_API, {
|
|
33
|
+
url: `/poplar/v3/mobile_list`,
|
|
34
|
+
method: "get",
|
|
35
|
+
params
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async function getCategorylistsGroups(BASE_API, params) {
|
|
39
|
+
return request(BASE_API, {
|
|
40
|
+
url: `/poplar/v2/listgroups`,
|
|
41
|
+
method: "get",
|
|
42
|
+
params
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export { checkCommitFulfillment, getCategoryCategoriesTree, getCategoryMediaNew, getCategoryPath, getCategorylistsGroups, searchMlists };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.view-all-column-container {
|
|
2
|
+
height: 100%;
|
|
3
|
+
.content-table-view {
|
|
4
|
+
height: calc(100% - 110px);
|
|
5
|
+
.title-span {
|
|
6
|
+
width: 100%;
|
|
7
|
+
display: block;
|
|
8
|
+
text-overflow: ellipsis;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
.icon {
|
|
12
|
+
width: 20px;
|
|
13
|
+
height: 25px;
|
|
14
|
+
margin-right: 8px;
|
|
15
|
+
font-size: 18px;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
text-align: center;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.bottom-view {
|
|
23
|
+
height: 60px;
|
|
24
|
+
margin: 0px 15px;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
.left {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.add-content-modal-wrapper .arco-modal-header {
|
|
2
|
+
border-bottom: none;
|
|
3
|
+
}
|
|
4
|
+
.add-content-modal-body {
|
|
5
|
+
padding: 0;
|
|
6
|
+
height: 70vh;
|
|
7
|
+
}
|
|
8
|
+
.add-content-modal-body .content-tabs {
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
.add-content-modal-body .arco-tabs-content {
|
|
12
|
+
padding-top: 0;
|
|
13
|
+
}
|