@cmstops/pro-compo 0.1.8 → 0.1.9
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 +857 -0
- package/dist/index.min.css +1 -1
- package/es/appCenter/script/routeMap.d.ts +1 -1
- package/es/config.d.ts +1 -1
- package/es/config.js +2 -2
- package/es/contentModal/component.js +5 -2
- package/es/contentModal/components/CompoList/index.js +12 -1
- package/es/contentModal/components/storeBox/index.js +1 -1
- package/es/index.css +857 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/es/index.less +2 -0
- package/es/previousVersion/component.d.ts +0 -0
- package/es/previousVersion/component.js +378 -0
- package/es/previousVersion/index.d.ts +2 -0
- package/es/previousVersion/index.js +7 -0
- package/es/previousVersion/script/api.d.ts +15 -0
- package/es/previousVersion/script/api.js +39 -0
- package/es/previousVersion/script/tool.d.ts +6 -0
- package/es/previousVersion/script/tool.js +22 -0
- package/es/previousVersion/style/css.js +1 -0
- package/es/previousVersion/style/index.css +166 -0
- package/es/previousVersion/style/index.d.ts +1 -0
- package/es/previousVersion/style/index.js +1 -0
- package/es/previousVersion/style/index.less +208 -0
- package/es/resourceModal/assets/images/unknown.js +2 -0
- package/es/resourceModal/assets/selection/null.js +2 -0
- package/es/resourceModal/component.js +65 -4
- package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
- package/es/resourceModal/components/MediaPreviewer/index.js +69 -0
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +111 -0
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +85 -0
- package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/index.js +171 -0
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.js +211 -0
- package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/index.js +272 -0
- package/es/resourceModal/script/api.d.ts +8 -0
- package/es/resourceModal/script/api.js +30 -0
- package/es/resourceModal/script/filter.d.ts +8 -0
- package/es/resourceModal/script/filter.js +22 -0
- package/es/resourceModal/script/mediaSelection.d.ts +10 -0
- package/es/resourceModal/style/DocAiMediaSelected.less +56 -0
- package/es/resourceModal/style/FileTypeThumb.less +183 -0
- package/es/resourceModal/style/MainContent.less +200 -0
- package/es/resourceModal/style/MediaPreviewer.less +71 -0
- package/es/resourceModal/style/MediaSelection.less +59 -0
- package/es/resourceModal/style/ToolbarSearch.less +40 -0
- package/es/resourceModal/style/index.css +514 -3
- package/es/resourceModal/style/index.less +16 -3
- package/es/selectGategory/component.d.ts +0 -0
- package/es/selectGategory/component.js +95 -0
- package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
- package/es/selectGategory/components/ColumnSelection/index.js +273 -0
- package/es/selectGategory/index.d.ts +2 -0
- package/es/selectGategory/index.js +7 -0
- package/es/selectGategory/script/api.d.ts +6 -0
- package/es/selectGategory/script/api.js +15 -0
- package/es/selectGategory/style/ColumnSelection.less +190 -0
- package/es/selectGategory/style/css.js +1 -0
- package/es/selectGategory/style/index.css +180 -0
- package/es/selectGategory/style/index.d.ts +1 -0
- package/es/selectGategory/style/index.js +1 -0
- package/es/selectGategory/style/index.less +40 -0
- package/es/utils/doc.d.ts +69 -0
- package/es/utils/typeMap.js +2 -1
- package/lib/config.js +2 -2
- package/lib/contentModal/component.js +5 -2
- package/lib/contentModal/components/CompoList/index.js +11 -0
- package/lib/contentModal/components/storeBox/index.js +1 -1
- package/lib/index.css +857 -0
- package/lib/index.js +4 -0
- package/lib/index.less +2 -0
- package/lib/previousVersion/component.js +379 -0
- package/lib/previousVersion/index.js +8 -0
- package/lib/previousVersion/script/api.js +43 -0
- package/lib/previousVersion/script/tool.js +24 -0
- package/lib/previousVersion/style/css.js +2 -0
- package/lib/previousVersion/style/index.css +166 -0
- package/lib/previousVersion/style/index.js +2 -0
- package/lib/previousVersion/style/index.less +208 -0
- package/lib/resourceModal/assets/images/unknown.js +3 -0
- package/lib/resourceModal/assets/selection/null.js +3 -0
- package/lib/resourceModal/component.js +64 -3
- package/lib/resourceModal/components/MediaPreviewer/index.js +70 -0
- package/lib/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +112 -0
- package/lib/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +86 -0
- package/lib/resourceModal/components/MediaSelection/MainContent/index.js +172 -0
- package/lib/resourceModal/components/MediaSelection/ToolbarSearch/index.js +212 -0
- package/lib/resourceModal/components/MediaSelection/index.js +273 -0
- package/lib/resourceModal/script/api.js +35 -0
- package/lib/resourceModal/script/filter.js +25 -0
- package/lib/resourceModal/style/DocAiMediaSelected.less +56 -0
- package/lib/resourceModal/style/FileTypeThumb.less +183 -0
- package/lib/resourceModal/style/MainContent.less +200 -0
- package/lib/resourceModal/style/MediaPreviewer.less +71 -0
- package/lib/resourceModal/style/MediaSelection.less +59 -0
- package/lib/resourceModal/style/ToolbarSearch.less +40 -0
- package/lib/resourceModal/style/index.css +514 -3
- package/lib/resourceModal/style/index.less +16 -3
- package/lib/selectGategory/component.js +96 -0
- package/lib/selectGategory/components/ColumnSelection/index.js +274 -0
- package/lib/selectGategory/index.js +8 -0
- package/lib/selectGategory/script/api.js +18 -0
- package/lib/selectGategory/style/ColumnSelection.less +190 -0
- package/lib/selectGategory/style/css.js +2 -0
- package/lib/selectGategory/style/index.css +180 -0
- package/lib/selectGategory/style/index.js +2 -0
- package/lib/selectGategory/style/index.less +40 -0
- package/lib/utils/typeMap.js +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, normalizeClass, createCommentVNode } from "vue";
|
|
2
|
+
import { Scrollbar } from "@arco-design/web-vue";
|
|
3
|
+
import _sfc_main$1 from "../MainContent/FileTypeThumb/index.js";
|
|
4
|
+
const _hoisted_1 = { class: "doc-ai-media-selected" };
|
|
5
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("div", { class: "thumb_type" }, "\u5C01\u9762\u56FE", -1);
|
|
6
|
+
const _hoisted_3 = { class: "thumb-list" };
|
|
7
|
+
const _hoisted_4 = { class: "thumb-item" };
|
|
8
|
+
const _hoisted_5 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "gif_covers"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", {
|
|
13
|
+
class: "thumb_type",
|
|
14
|
+
style: { "margin-top": "0px" }
|
|
15
|
+
}, "\u5C01\u9762\u52A8\u56FE", -1);
|
|
16
|
+
const _hoisted_7 = { class: "thumb-list" };
|
|
17
|
+
const _hoisted_8 = { class: "thumb-item" };
|
|
18
|
+
const _sfc_main = defineComponent({
|
|
19
|
+
__name: "index",
|
|
20
|
+
props: {
|
|
21
|
+
selectedMax: {},
|
|
22
|
+
ai_static_covers: {},
|
|
23
|
+
ai_gif_covers: {},
|
|
24
|
+
preview: { type: Boolean },
|
|
25
|
+
addType: {}
|
|
26
|
+
},
|
|
27
|
+
emits: ["add"],
|
|
28
|
+
setup(__props, { emit }) {
|
|
29
|
+
const add = (itemData) => {
|
|
30
|
+
if (selectedUrl.value.includes(itemData.url)) {
|
|
31
|
+
selectedUrl.value = [];
|
|
32
|
+
emit("add", null);
|
|
33
|
+
} else {
|
|
34
|
+
selectedUrl.value = [itemData.url];
|
|
35
|
+
emit("add", itemData);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const selectedUrl = ref([]);
|
|
39
|
+
return (_ctx, _cache) => {
|
|
40
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
41
|
+
createVNode(unref(Scrollbar), { class: "doc-ai-media-selected-scrollbar" }, {
|
|
42
|
+
default: withCtx(() => {
|
|
43
|
+
var _a;
|
|
44
|
+
return [
|
|
45
|
+
_hoisted_2,
|
|
46
|
+
createElementVNode("div", _hoisted_3, [
|
|
47
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.ai_static_covers, (item) => {
|
|
48
|
+
return openBlock(), createElementBlock("div", {
|
|
49
|
+
key: item,
|
|
50
|
+
class: "thumb-wrap"
|
|
51
|
+
}, [
|
|
52
|
+
createElementVNode("div", _hoisted_4, [
|
|
53
|
+
createElementVNode("div", {
|
|
54
|
+
class: normalizeClass(["pic", { active: selectedUrl.value.includes(item) }])
|
|
55
|
+
}, [
|
|
56
|
+
createVNode(_sfc_main$1, {
|
|
57
|
+
preview: _ctx.preview,
|
|
58
|
+
"add-type": _ctx.addType,
|
|
59
|
+
"item-data": {
|
|
60
|
+
catalog: "image",
|
|
61
|
+
alias: item,
|
|
62
|
+
thumb: item,
|
|
63
|
+
url: item,
|
|
64
|
+
realUrl: item
|
|
65
|
+
},
|
|
66
|
+
onAdd: add
|
|
67
|
+
}, null, 8, ["preview", "add-type", "item-data"])
|
|
68
|
+
], 2)
|
|
69
|
+
])
|
|
70
|
+
]);
|
|
71
|
+
}), 128))
|
|
72
|
+
]),
|
|
73
|
+
((_a = _ctx.ai_gif_covers) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
74
|
+
_hoisted_6,
|
|
75
|
+
createElementVNode("div", _hoisted_7, [
|
|
76
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.ai_gif_covers, (item) => {
|
|
77
|
+
return openBlock(), createElementBlock("div", {
|
|
78
|
+
key: item,
|
|
79
|
+
class: "thumb-wrap"
|
|
80
|
+
}, [
|
|
81
|
+
createElementVNode("div", _hoisted_8, [
|
|
82
|
+
createElementVNode("div", {
|
|
83
|
+
class: normalizeClass(["pic", { active: selectedUrl.value.includes(item) }])
|
|
84
|
+
}, [
|
|
85
|
+
createVNode(_sfc_main$1, {
|
|
86
|
+
preview: _ctx.preview,
|
|
87
|
+
"add-type": _ctx.addType,
|
|
88
|
+
"item-data": {
|
|
89
|
+
catalog: "image",
|
|
90
|
+
alias: item,
|
|
91
|
+
thumb: item,
|
|
92
|
+
url: item,
|
|
93
|
+
realUrl: item
|
|
94
|
+
},
|
|
95
|
+
onAdd: add
|
|
96
|
+
}, null, 8, ["preview", "add-type", "item-data"])
|
|
97
|
+
], 2)
|
|
98
|
+
])
|
|
99
|
+
]);
|
|
100
|
+
}), 128))
|
|
101
|
+
])
|
|
102
|
+
])) : createCommentVNode("v-if", true)
|
|
103
|
+
];
|
|
104
|
+
}),
|
|
105
|
+
_: 1
|
|
106
|
+
})
|
|
107
|
+
]);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, openBlock, createElementBlock, Fragment, createElementVNode, normalizeStyle, normalizeClass, createVNode, Transition, withCtx, withModifiers, unref, createBlock, createCommentVNode } from "vue";
|
|
2
|
+
import { Divider } from "@arco-design/web-vue";
|
|
3
|
+
import { IconEye, IconPlus } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import _sfc_main$1 from "../../../MediaPreviewer/index.js";
|
|
5
|
+
const _hoisted_1 = { class: "file-type-thumb" };
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "mask"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = ["onClick"];
|
|
11
|
+
const _hoisted_4 = ["onClick"];
|
|
12
|
+
const _hoisted_5 = ["onClick"];
|
|
13
|
+
const _sfc_main = defineComponent({
|
|
14
|
+
__name: "index",
|
|
15
|
+
props: {
|
|
16
|
+
itemData: {},
|
|
17
|
+
preview: { type: Boolean },
|
|
18
|
+
addType: {}
|
|
19
|
+
},
|
|
20
|
+
emits: ["add"],
|
|
21
|
+
setup(__props, { emit }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const visible = ref(false);
|
|
24
|
+
const previewType = computed(() => props.itemData.catalog);
|
|
25
|
+
const previewUrl = computed(() => props.itemData.url || "");
|
|
26
|
+
const openPreview = () => visible.value = true;
|
|
27
|
+
const closePreviewer = (val) => visible.value = val;
|
|
28
|
+
const add = () => {
|
|
29
|
+
if (props.addType === "copper")
|
|
30
|
+
;
|
|
31
|
+
emit("add", props.itemData);
|
|
32
|
+
};
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
35
|
+
createElementVNode("div", _hoisted_1, [
|
|
36
|
+
_ctx.itemData.thumb ? (openBlock(), createElementBlock("div", {
|
|
37
|
+
key: 0,
|
|
38
|
+
class: "pic",
|
|
39
|
+
style: normalizeStyle({ "background-image": "url(" + _ctx.itemData.thumb + ")" })
|
|
40
|
+
}, null, 4)) : (openBlock(), createElementBlock("div", {
|
|
41
|
+
key: 1,
|
|
42
|
+
class: normalizeClass(["pic", `${_ctx.itemData.catalog} ${_ctx.itemData.series}`])
|
|
43
|
+
}, null, 2)),
|
|
44
|
+
createVNode(Transition, { name: "el-fade-in" }, {
|
|
45
|
+
default: withCtx(() => [
|
|
46
|
+
_ctx.preview ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
47
|
+
createElementVNode("span", {
|
|
48
|
+
class: "half",
|
|
49
|
+
onClick: withModifiers(openPreview, ["stop"])
|
|
50
|
+
}, [
|
|
51
|
+
createVNode(unref(IconEye), {
|
|
52
|
+
"stroke-width": 6,
|
|
53
|
+
size: 20
|
|
54
|
+
})
|
|
55
|
+
], 8, _hoisted_3),
|
|
56
|
+
createVNode(unref(Divider), { direction: "vertical" }),
|
|
57
|
+
createElementVNode("span", {
|
|
58
|
+
class: "half",
|
|
59
|
+
onClick: withModifiers(add, ["stop"])
|
|
60
|
+
}, [
|
|
61
|
+
createVNode(unref(IconPlus), {
|
|
62
|
+
"stroke-width": 6,
|
|
63
|
+
size: 20
|
|
64
|
+
})
|
|
65
|
+
], 8, _hoisted_4)
|
|
66
|
+
])) : (openBlock(), createElementBlock("div", {
|
|
67
|
+
key: 1,
|
|
68
|
+
class: "transparent",
|
|
69
|
+
onClick: withModifiers(add, ["stop"])
|
|
70
|
+
}, null, 8, _hoisted_5))
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
})
|
|
74
|
+
]),
|
|
75
|
+
visible.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
76
|
+
key: 0,
|
|
77
|
+
type: previewType.value,
|
|
78
|
+
url: previewUrl.value,
|
|
79
|
+
onClose: closePreviewer
|
|
80
|
+
}, null, 8, ["type", "url"])) : createCommentVNode("v-if", true)
|
|
81
|
+
], 64);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createElementVNode, createCommentVNode, withDirectives, createElementBlock, Fragment, renderList, createVNode, toDisplayString, vShow, normalizeClass, createTextVNode } from "vue";
|
|
2
|
+
import _imports_0 from "../../../assets/selection/null.js";
|
|
3
|
+
import { Scrollbar, Tooltip, Button } from "@arco-design/web-vue";
|
|
4
|
+
import _sfc_main$2 from "../../../../typeIcons/component.js";
|
|
5
|
+
import _sfc_main$1 from "./FileTypeThumb/index.js";
|
|
6
|
+
const _hoisted_1 = { class: "file-wrap" };
|
|
7
|
+
const _hoisted_2 = { class: "folder-list clearfix" };
|
|
8
|
+
const _hoisted_3 = ["onClick"];
|
|
9
|
+
const _hoisted_4 = { class: "wrap" };
|
|
10
|
+
const _hoisted_5 = { class: "thumb" };
|
|
11
|
+
const _hoisted_6 = { class: "file-list clearfix" };
|
|
12
|
+
const _hoisted_7 = { class: "thumb-wrap" };
|
|
13
|
+
const _hoisted_8 = /* @__PURE__ */ createElementVNode("div", { class: "transcoding-in-progress grid-mode" }, [
|
|
14
|
+
/* @__PURE__ */ createElementVNode("div", { class: "transcoding-progress" }, "\u8F6C\u7801\u4E2D\u2026")
|
|
15
|
+
], -1);
|
|
16
|
+
const _hoisted_9 = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "load_more_title"
|
|
19
|
+
};
|
|
20
|
+
const _hoisted_10 = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "nomore_tips"
|
|
23
|
+
};
|
|
24
|
+
const _hoisted_11 = {
|
|
25
|
+
key: 1,
|
|
26
|
+
class: "null-file"
|
|
27
|
+
};
|
|
28
|
+
const _hoisted_12 = /* @__PURE__ */ createElementVNode("img", {
|
|
29
|
+
class: "null-pic",
|
|
30
|
+
src: _imports_0
|
|
31
|
+
}, null, -1);
|
|
32
|
+
const _hoisted_13 = /* @__PURE__ */ createElementVNode("p", null, "\u6682\u65E0\u7D20\u6750", -1);
|
|
33
|
+
const _hoisted_14 = [
|
|
34
|
+
_hoisted_12,
|
|
35
|
+
_hoisted_13
|
|
36
|
+
];
|
|
37
|
+
const _sfc_main = defineComponent({
|
|
38
|
+
__name: "index",
|
|
39
|
+
props: {
|
|
40
|
+
folderList: {},
|
|
41
|
+
fileList: {},
|
|
42
|
+
fileListCount: {},
|
|
43
|
+
isOver: { type: Boolean },
|
|
44
|
+
preview: { type: Boolean },
|
|
45
|
+
addType: {},
|
|
46
|
+
changeDirectory: { type: Function },
|
|
47
|
+
loadFileMore: { type: Function }
|
|
48
|
+
},
|
|
49
|
+
emits: ["add"],
|
|
50
|
+
setup(__props, { emit }) {
|
|
51
|
+
const add = (itemData) => {
|
|
52
|
+
if (selectedData.value.includes(itemData)) {
|
|
53
|
+
selectedData.value = [];
|
|
54
|
+
emit("add", null);
|
|
55
|
+
} else {
|
|
56
|
+
selectedData.value = [itemData];
|
|
57
|
+
emit("add", itemData);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const selectedData = ref([]);
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
return openBlock(), createBlock(unref(Scrollbar), { class: "dialog-media-selection-scroll" }, {
|
|
63
|
+
default: withCtx(() => [
|
|
64
|
+
createElementVNode("div", _hoisted_1, [
|
|
65
|
+
createCommentVNode(" \u6587\u4EF6\u5939 "),
|
|
66
|
+
withDirectives(createElementVNode("div", _hoisted_2, [
|
|
67
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.folderList, (item, index) => {
|
|
68
|
+
return openBlock(), createElementBlock("div", {
|
|
69
|
+
key: index,
|
|
70
|
+
class: "item folder-item",
|
|
71
|
+
onClick: ($event) => _ctx.changeDirectory(item)
|
|
72
|
+
}, [
|
|
73
|
+
createElementVNode("div", _hoisted_4, [
|
|
74
|
+
createVNode(unref(Tooltip), {
|
|
75
|
+
"open-delay": 500,
|
|
76
|
+
class: "item",
|
|
77
|
+
effect: "dark",
|
|
78
|
+
content: item.alias,
|
|
79
|
+
placement: "top"
|
|
80
|
+
}, {
|
|
81
|
+
default: withCtx(() => [
|
|
82
|
+
createElementVNode("div", _hoisted_5, [
|
|
83
|
+
createElementVNode("h4", null, toDisplayString(item.alias), 1)
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
_: 2
|
|
87
|
+
}, 1032, ["content"])
|
|
88
|
+
])
|
|
89
|
+
], 8, _hoisted_3);
|
|
90
|
+
}), 128))
|
|
91
|
+
], 512), [
|
|
92
|
+
[vShow, _ctx.folderList.length !== 0]
|
|
93
|
+
]),
|
|
94
|
+
createCommentVNode(" \u6587\u4EF6 "),
|
|
95
|
+
createElementVNode("div", _hoisted_6, [
|
|
96
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fileList, (item, index) => {
|
|
97
|
+
return openBlock(), createElementBlock("div", {
|
|
98
|
+
key: index,
|
|
99
|
+
class: "item"
|
|
100
|
+
}, [
|
|
101
|
+
createElementVNode("div", {
|
|
102
|
+
class: normalizeClass(["shadow-wrap", { active: selectedData.value.includes(item) }])
|
|
103
|
+
}, [
|
|
104
|
+
createElementVNode("div", _hoisted_7, [
|
|
105
|
+
createVNode(_sfc_main$1, {
|
|
106
|
+
preview: _ctx.preview,
|
|
107
|
+
"add-type": _ctx.addType,
|
|
108
|
+
"item-data": item,
|
|
109
|
+
onAdd: add
|
|
110
|
+
}, null, 8, ["preview", "add-type", "item-data"])
|
|
111
|
+
]),
|
|
112
|
+
createElementVNode("h4", null, [
|
|
113
|
+
createVNode(_sfc_main$2, {
|
|
114
|
+
class: "icon",
|
|
115
|
+
type: item.catalog,
|
|
116
|
+
doc: item.catalog !== "image",
|
|
117
|
+
resource: item.catalog === "image"
|
|
118
|
+
}, null, 8, ["type", "doc", "resource"]),
|
|
119
|
+
createVNode(unref(Tooltip), {
|
|
120
|
+
"open-delay": 500,
|
|
121
|
+
effect: "dark",
|
|
122
|
+
content: item.alias,
|
|
123
|
+
placement: "top"
|
|
124
|
+
}, {
|
|
125
|
+
default: withCtx(() => [
|
|
126
|
+
createElementVNode("span", null, toDisplayString(item.alias), 1)
|
|
127
|
+
]),
|
|
128
|
+
_: 2
|
|
129
|
+
}, 1032, ["content"])
|
|
130
|
+
]),
|
|
131
|
+
createElementVNode("p", null, toDisplayString(item.updated_at), 1),
|
|
132
|
+
createCommentVNode(" \u89C6\u9891\u8F6C\u7801\u8FDB\u5EA6 "),
|
|
133
|
+
item.task ? (openBlock(), createBlock(unref(Tooltip), {
|
|
134
|
+
key: 0,
|
|
135
|
+
"open-delay": 2e3,
|
|
136
|
+
effect: "dark",
|
|
137
|
+
content: "\u8F6C\u7801\u4E2D\uFF0C\u6682\u4E0D\u53EF\u7528",
|
|
138
|
+
placement: "bottom"
|
|
139
|
+
}, {
|
|
140
|
+
default: withCtx(() => [
|
|
141
|
+
_hoisted_8
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
})) : createCommentVNode("v-if", true)
|
|
145
|
+
], 2)
|
|
146
|
+
]);
|
|
147
|
+
}), 128))
|
|
148
|
+
]),
|
|
149
|
+
_ctx.fileListCount ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
150
|
+
!_ctx.isOver ? (openBlock(), createBlock(unref(Button), {
|
|
151
|
+
key: 0,
|
|
152
|
+
type: "text",
|
|
153
|
+
size: "small",
|
|
154
|
+
class: "loadmore_tips",
|
|
155
|
+
onClick: _ctx.loadFileMore
|
|
156
|
+
}, {
|
|
157
|
+
default: withCtx(() => [
|
|
158
|
+
createTextVNode("\u52A0\u8F7D\u66F4\u591A\u2026")
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
}, 8, ["onClick"])) : (openBlock(), createElementBlock("div", _hoisted_10, "\u6CA1\u6709\u66F4\u591A\u4E86\u2026"))
|
|
162
|
+
])) : createCommentVNode("v-if", true),
|
|
163
|
+
!_ctx.fileList.length && !_ctx.folderList.length ? (openBlock(), createElementBlock("div", _hoisted_11, _hoisted_14)) : createCommentVNode("v-if", true)
|
|
164
|
+
])
|
|
165
|
+
]),
|
|
166
|
+
_: 1
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, computed, onMounted, openBlock, createElementBlock, createElementVNode, renderSlot, createVNode, unref, withCtx, Fragment, renderList, createBlock, withDirectives, createTextVNode, vShow, createCommentVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
|
+
import { Input, RangePicker, Select, Option, Button } from "@arco-design/web-vue";
|
|
3
|
+
import { IconRefresh, IconUpload } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import { rateOptions, keywordsSelection } from "../../../script/filter.js";
|
|
5
|
+
import { getAccountList } from "../../../script/api.js";
|
|
6
|
+
const _hoisted_1 = { class: "toolbar-search-container" };
|
|
7
|
+
const _hoisted_2 = { class: "top-container" };
|
|
8
|
+
const _hoisted_3 = { class: "filter-content" };
|
|
9
|
+
const _hoisted_4 = { class: "filter-left" };
|
|
10
|
+
const _hoisted_5 = { class: "filter-right" };
|
|
11
|
+
const _hoisted_6 = { class: "keywordsSelection" };
|
|
12
|
+
const _hoisted_7 = ["onClick"];
|
|
13
|
+
const _sfc_main = defineComponent({
|
|
14
|
+
...{ name: "ToolbarSearch" },
|
|
15
|
+
__name: "index",
|
|
16
|
+
props: {
|
|
17
|
+
activeMediaType: {},
|
|
18
|
+
base_api: {}
|
|
19
|
+
},
|
|
20
|
+
emits: ["search"],
|
|
21
|
+
setup(__props, { expose: __expose, emit }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const filter = ref({
|
|
24
|
+
keyword: "",
|
|
25
|
+
upload_by: "",
|
|
26
|
+
sf: "",
|
|
27
|
+
uploadTime: null,
|
|
28
|
+
wh_rate: ""
|
|
29
|
+
});
|
|
30
|
+
const peopleOptions = ref([]);
|
|
31
|
+
const limit = ref(10);
|
|
32
|
+
const noMore = ref(false);
|
|
33
|
+
const loadUploadPeopleData = async (isMore) => {
|
|
34
|
+
var _a, _b, _c, _d;
|
|
35
|
+
if (noMore.value)
|
|
36
|
+
return;
|
|
37
|
+
const query = {
|
|
38
|
+
limit: limit.value,
|
|
39
|
+
offset: peopleOptions.value.length
|
|
40
|
+
};
|
|
41
|
+
const res = await getAccountList(props.base_api, 1, query);
|
|
42
|
+
if (res && res.code !== 0)
|
|
43
|
+
return;
|
|
44
|
+
if (res && res.message) {
|
|
45
|
+
if (((_b = (_a = res.message) == null ? void 0 : _a.users) == null ? void 0 : _b.length) < limit.value)
|
|
46
|
+
noMore.value = true;
|
|
47
|
+
if (isMore) {
|
|
48
|
+
peopleOptions.value = peopleOptions.value.concat(
|
|
49
|
+
((_c = res.message) == null ? void 0 : _c.users) || []
|
|
50
|
+
);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
peopleOptions.value = ((_d = res.message) == null ? void 0 : _d.users) || [];
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
watch(
|
|
57
|
+
() => filter.value,
|
|
58
|
+
() => contentSearch(),
|
|
59
|
+
{ deep: true }
|
|
60
|
+
);
|
|
61
|
+
const contentSearch = () => {
|
|
62
|
+
if (filter.value.keyword === "" && filter.value.upload_by === "" && filter.value.sf === "" && filter.value.wh_rate === "" && filter.value.uploadTime === null) {
|
|
63
|
+
emit("search", null);
|
|
64
|
+
} else {
|
|
65
|
+
const filterObj = {
|
|
66
|
+
...filter.value,
|
|
67
|
+
created_begin: filter.value.uploadTime && filter.value.uploadTime.length ? filter.value.uploadTime[0] / 1e3 : null,
|
|
68
|
+
created_end: filter.value.uploadTime && filter.value.uploadTime.length ? filter.value.uploadTime[1] / 1e3 : null
|
|
69
|
+
};
|
|
70
|
+
delete filterObj.uploadTime;
|
|
71
|
+
emit("search", { ...filterObj });
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const clearKeyword = () => {
|
|
75
|
+
filter.value.keyword = "";
|
|
76
|
+
filter.value.sf = "";
|
|
77
|
+
};
|
|
78
|
+
const clearDatePicker = () => {
|
|
79
|
+
filter.value.uploadTime = null;
|
|
80
|
+
};
|
|
81
|
+
const changeCurrentSelection = (item) => {
|
|
82
|
+
filter.value.sf = item;
|
|
83
|
+
};
|
|
84
|
+
const showReset = computed(
|
|
85
|
+
() => filter.value.keyword || filter.value.upload_by || filter.value.sf || filter.value.uploadTime || filter.value.wh_rate
|
|
86
|
+
);
|
|
87
|
+
const reset = () => {
|
|
88
|
+
filter.value = {
|
|
89
|
+
keyword: "",
|
|
90
|
+
upload_by: "",
|
|
91
|
+
sf: "",
|
|
92
|
+
uploadTime: null,
|
|
93
|
+
wh_rate: ""
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
onMounted(() => {
|
|
97
|
+
loadUploadPeopleData();
|
|
98
|
+
});
|
|
99
|
+
__expose({ reset });
|
|
100
|
+
return (_ctx, _cache) => {
|
|
101
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
102
|
+
createElementVNode("div", _hoisted_2, [
|
|
103
|
+
renderSlot(_ctx.$slots, "other"),
|
|
104
|
+
createElementVNode("div", _hoisted_3, [
|
|
105
|
+
createElementVNode("div", _hoisted_4, [
|
|
106
|
+
createVNode(unref(Input), {
|
|
107
|
+
modelValue: filter.value.keyword,
|
|
108
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.keyword = $event),
|
|
109
|
+
class: "filter-item",
|
|
110
|
+
"allow-clear": "",
|
|
111
|
+
placeholder: "\u8F93\u5165\u7D20\u6750\u6807\u9898\u641C\u7D22",
|
|
112
|
+
onClear: clearKeyword
|
|
113
|
+
}, null, 8, ["modelValue"]),
|
|
114
|
+
createVNode(unref(RangePicker), {
|
|
115
|
+
modelValue: filter.value.uploadTime,
|
|
116
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.uploadTime = $event),
|
|
117
|
+
class: "filter-item",
|
|
118
|
+
style: { "width": "240px" },
|
|
119
|
+
"value-format": "timestamp",
|
|
120
|
+
"default-value": ["00:00:00", "23:59:59"],
|
|
121
|
+
onClear: clearDatePicker
|
|
122
|
+
}, null, 8, ["modelValue"]),
|
|
123
|
+
createVNode(unref(Select), {
|
|
124
|
+
modelValue: filter.value.upload_by,
|
|
125
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.upload_by = $event),
|
|
126
|
+
label: filter.value.upload_by === "\u5168\u90E8\u4EBA\u5458" ? "" : filter.value.upload_by,
|
|
127
|
+
class: "filter-item",
|
|
128
|
+
placeholder: "\u4E0A\u4F20\u4EBA",
|
|
129
|
+
"allow-search": "",
|
|
130
|
+
onDropdownReachBottom: _cache[3] || (_cache[3] = ($event) => loadUploadPeopleData(true))
|
|
131
|
+
}, {
|
|
132
|
+
default: withCtx(() => [
|
|
133
|
+
createVNode(unref(Option), {
|
|
134
|
+
label: "\u5168\u90E8\u4EBA\u5458",
|
|
135
|
+
value: ""
|
|
136
|
+
}),
|
|
137
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(peopleOptions.value, (item) => {
|
|
138
|
+
return openBlock(), createBlock(unref(Option), {
|
|
139
|
+
key: item.id,
|
|
140
|
+
label: item.alias,
|
|
141
|
+
value: item.id
|
|
142
|
+
}, null, 8, ["label", "value"]);
|
|
143
|
+
}), 128))
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
}, 8, ["modelValue", "label"]),
|
|
147
|
+
createVNode(unref(Select), {
|
|
148
|
+
modelValue: filter.value.wh_rate,
|
|
149
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.wh_rate = $event),
|
|
150
|
+
class: "filter-item",
|
|
151
|
+
placeholder: "\u56FE\u7247\u6BD4\u4F8B"
|
|
152
|
+
}, {
|
|
153
|
+
default: withCtx(() => [
|
|
154
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(rateOptions), (item) => {
|
|
155
|
+
return openBlock(), createBlock(unref(Option), {
|
|
156
|
+
key: item.value,
|
|
157
|
+
label: item.label,
|
|
158
|
+
value: item.value
|
|
159
|
+
}, null, 8, ["label", "value"]);
|
|
160
|
+
}), 128))
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
}, 8, ["modelValue"]),
|
|
164
|
+
withDirectives(createVNode(unref(Button), {
|
|
165
|
+
type: "text",
|
|
166
|
+
size: "medium",
|
|
167
|
+
onClick: reset
|
|
168
|
+
}, {
|
|
169
|
+
icon: withCtx(() => [
|
|
170
|
+
createVNode(unref(IconRefresh))
|
|
171
|
+
]),
|
|
172
|
+
default: withCtx(() => [
|
|
173
|
+
createTextVNode("\u91CD\u7F6E\u7B5B\u9009")
|
|
174
|
+
]),
|
|
175
|
+
_: 1
|
|
176
|
+
}, 512), [
|
|
177
|
+
[vShow, showReset.value]
|
|
178
|
+
])
|
|
179
|
+
]),
|
|
180
|
+
createElementVNode("div", _hoisted_5, [
|
|
181
|
+
createVNode(unref(Button), {
|
|
182
|
+
type: "secondary",
|
|
183
|
+
size: "medium"
|
|
184
|
+
}, {
|
|
185
|
+
icon: withCtx(() => [
|
|
186
|
+
createVNode(unref(IconUpload))
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
})
|
|
190
|
+
])
|
|
191
|
+
])
|
|
192
|
+
]),
|
|
193
|
+
createCommentVNode(" \u68C0\u7D22\u7B5B\u9009 "),
|
|
194
|
+
withDirectives(createElementVNode("div", null, [
|
|
195
|
+
createElementVNode("div", _hoisted_6, [
|
|
196
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(keywordsSelection), (item, i) => {
|
|
197
|
+
return openBlock(), createElementBlock("div", {
|
|
198
|
+
key: i,
|
|
199
|
+
class: normalizeClass(["selection-item", { active: filter.value.sf === item.value }]),
|
|
200
|
+
onClick: ($event) => changeCurrentSelection(item.value)
|
|
201
|
+
}, toDisplayString(item.name), 11, _hoisted_7);
|
|
202
|
+
}), 128))
|
|
203
|
+
])
|
|
204
|
+
], 512), [
|
|
205
|
+
[vShow, props.activeMediaType !== "ai" && filter.value.keyword]
|
|
206
|
+
])
|
|
207
|
+
]);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
export { _sfc_main as default };
|
|
File without changes
|