@cmstops/pro-compo 0.3.67 → 0.3.69
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 +139 -79
- package/dist/index.min.css +1 -1
- package/es/baseFilter/component.js +6 -1
- package/es/config.js +1 -1
- package/es/contentDetailList/components/CustomWrp/CustomItem.js +15 -9
- package/es/contentDetailList/style/CustomItem.less +18 -0
- package/es/contentDetailList/style/index.css +14 -0
- package/es/contentDetailList/style/index.less +1 -0
- package/es/hooks/useAttachement.d.ts +14 -6
- package/es/hooks/useAttachement.js +15 -1
- package/es/hooks/useLocalStorage.d.ts +1 -0
- package/es/hooks/useLocalStorage.js +2 -1
- package/es/index.css +139 -79
- package/es/selectResourceModal/assets/images/sys_load_more.js +2 -0
- package/es/selectResourceModal/component.js +71 -170
- package/es/selectResourceModal/components/{ListCardWrapper/index.js → List/ListCardWrapper.js} +13 -11
- package/es/selectResourceModal/components/List/ListLocal/index.js +92 -0
- package/es/selectResourceModal/components/{ListFilter/index.js → List/ListNormal/Filter.js} +14 -14
- package/es/selectResourceModal/components/List/ListNormal/index.js +77 -0
- package/es/selectResourceModal/components/List/ListSystem/Filter.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListSystem/Filter.js +141 -0
- package/es/selectResourceModal/components/List/ListSystem/SubList.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListSystem/SubList.js +67 -0
- package/es/selectResourceModal/components/List/ListSystem/index.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListSystem/index.js +109 -0
- package/es/selectResourceModal/components/List/ListWraper.d.ts +0 -0
- package/es/selectResourceModal/components/List/ListWraper.js +61 -0
- package/es/selectResourceModal/components/ListTabs/index.js +9 -18
- package/es/selectResourceModal/{components/ListFilter/scripts/api.d.ts → scripts/selectionApis.d.ts} +1 -0
- package/es/selectResourceModal/scripts/selectionApis.js +15 -0
- package/es/selectResourceModal/scripts/useCompoLf.d.ts +21 -0
- package/es/selectResourceModal/scripts/useCompoLf.js +32 -0
- package/es/selectResourceModal/scripts/useResourceSelect.js +7 -3
- package/es/selectResourceModal/scripts/useTabFilter.d.ts +21 -0
- package/es/selectResourceModal/scripts/useTabFilter.js +37 -0
- package/es/selectResourceModal/style/index.css +125 -79
- package/es/selectResourceModal/style/index.less +3 -32
- package/es/selectResourceModal/style/list.less +163 -0
- package/es/selectThumb/component.js +25 -13
- package/es/utils/filter.js +0 -1
- package/lib/baseFilter/component.js +6 -1
- package/lib/config.js +1 -1
- package/lib/contentDetailList/components/CustomWrp/CustomItem.js +14 -8
- package/lib/contentDetailList/style/CustomItem.less +18 -0
- package/lib/contentDetailList/style/index.css +14 -0
- package/lib/contentDetailList/style/index.less +1 -0
- package/lib/hooks/useAttachement.js +16 -0
- package/lib/hooks/useLocalStorage.js +2 -1
- package/lib/index.css +139 -79
- package/lib/selectResourceModal/assets/images/sys_load_more.js +3 -0
- package/lib/selectResourceModal/component.js +71 -170
- package/lib/selectResourceModal/components/{ListCardWrapper/index.js → List/ListCardWrapper.js} +12 -10
- package/lib/selectResourceModal/components/List/ListLocal/index.js +93 -0
- package/lib/selectResourceModal/components/{ListFilter/index.js → List/ListNormal/Filter.js} +15 -15
- package/lib/selectResourceModal/components/List/ListNormal/index.js +78 -0
- package/lib/selectResourceModal/components/List/ListSystem/Filter.js +142 -0
- package/lib/selectResourceModal/components/List/ListSystem/SubList.js +68 -0
- package/lib/selectResourceModal/components/List/ListSystem/index.js +110 -0
- package/lib/selectResourceModal/components/List/ListWraper.js +62 -0
- package/lib/selectResourceModal/components/ListTabs/index.js +8 -17
- package/lib/selectResourceModal/{components/ListFilter/scripts/api.js → scripts/selectionApis.js} +8 -1
- package/lib/selectResourceModal/scripts/useCompoLf.js +33 -0
- package/lib/selectResourceModal/scripts/useResourceSelect.js +7 -3
- package/lib/selectResourceModal/scripts/useTabFilter.js +38 -0
- package/lib/selectResourceModal/style/index.css +125 -79
- package/lib/selectResourceModal/style/index.less +3 -32
- package/lib/selectResourceModal/style/list.less +163 -0
- package/lib/selectThumb/component.js +25 -13
- package/lib/utils/filter.js +0 -1
- package/package.json +3 -3
- package/es/selectResourceModal/components/ListContent/index.js +0 -46
- package/es/selectResourceModal/components/ListContentLocal/index.js +0 -93
- package/es/selectResourceModal/components/ListFilter/scripts/api.js +0 -9
- package/es/selectResourceModal/style/listContent.less +0 -5
- package/es/selectResourceModal/style/listContentLocal.less +0 -26
- package/es/selectResourceModal/style/listFilter.less +0 -41
- package/lib/selectResourceModal/components/ListContent/index.js +0 -47
- package/lib/selectResourceModal/components/ListContentLocal/index.js +0 -94
- package/lib/selectResourceModal/style/listContent.less +0 -5
- package/lib/selectResourceModal/style/listContentLocal.less +0 -26
- package/lib/selectResourceModal/style/listFilter.less +0 -41
- /package/es/selectResourceModal/components/{ListCardWrapper/index.d.ts → List/ListCardWrapper.d.ts} +0 -0
- /package/es/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.d.ts +0 -0
- /package/es/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.js +0 -0
- /package/es/selectResourceModal/components/{ListContent → List/ListLocal}/index.d.ts +0 -0
- /package/es/selectResourceModal/components/{ListContentLocal/index.d.ts → List/ListNormal/Filter.d.ts} +0 -0
- /package/es/selectResourceModal/components/{ListFilter → List/ListNormal}/index.d.ts +0 -0
- /package/lib/selectResourceModal/components/{ListContentLocal/components → List/ListLocal}/Upload.js +0 -0
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var vue = require("vue");
|
|
3
3
|
var webVue = require("@arco-design/web-vue");
|
|
4
|
-
var index$
|
|
4
|
+
var index$2 = require("../emptyData/index.js");
|
|
5
5
|
var index = require("./components/ListTabs/index.js");
|
|
6
|
-
var index$1 = require("./components/
|
|
7
|
-
var
|
|
8
|
-
var index$4 = require("./components/ListSelected/index.js");
|
|
9
|
-
var index$3 = require("./components/ListContentLocal/index.js");
|
|
10
|
-
var useAttachement = require("../hooks/useAttachement.js");
|
|
11
|
-
var config = require("../config.js");
|
|
6
|
+
var index$1 = require("./components/ListSelected/index.js");
|
|
7
|
+
var ListCardWrapper = require("./components/List/ListCardWrapper.js");
|
|
12
8
|
var useResourceSelect = require("./scripts/useResourceSelect.js");
|
|
9
|
+
var useTabFilter = require("./scripts/useTabFilter.js");
|
|
10
|
+
var useCompoLf = require("./scripts/useCompoLf.js");
|
|
13
11
|
const _hoisted_1 = { class: "resource-select-wrap" };
|
|
14
12
|
const _hoisted_2 = { class: "resource-select-main" };
|
|
15
13
|
const _hoisted_3 = {
|
|
@@ -17,13 +15,6 @@ const _hoisted_3 = {
|
|
|
17
15
|
class: "resource-select-container"
|
|
18
16
|
};
|
|
19
17
|
const _hoisted_4 = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "resource-select-filter"
|
|
22
|
-
};
|
|
23
|
-
const _hoisted_5 = { class: "resource-select-content" };
|
|
24
|
-
const _hoisted_6 = { class: "resource-select-footer" };
|
|
25
|
-
const _hoisted_7 = { class: "footer-left" };
|
|
26
|
-
const _hoisted_8 = {
|
|
27
18
|
key: 0,
|
|
28
19
|
class: "footer-right"
|
|
29
20
|
};
|
|
@@ -36,180 +27,90 @@ const _sfc_main = vue.defineComponent({
|
|
|
36
27
|
userInfo: {},
|
|
37
28
|
maxcount: {},
|
|
38
29
|
wrap: {},
|
|
39
|
-
filterOptions: {}
|
|
30
|
+
filterOptions: {},
|
|
31
|
+
tabKeys: {},
|
|
32
|
+
mediaUseType: {}
|
|
40
33
|
},
|
|
41
34
|
emits: ["update:visible", "submit"],
|
|
42
35
|
setup(__props, { emit: __emit }) {
|
|
43
36
|
const props = __props;
|
|
44
37
|
const emits = __emit;
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
const { selected, selectedKeys, disableSelect, handleSelect, handleClear } = useResourceSelect.useResourceSelect(props);
|
|
39
|
+
const { activeKey, activeComponent, tabKeyList } = useTabFilter(props);
|
|
40
|
+
const { wrapProps, close, submit } = useCompoLf(props, emits);
|
|
41
|
+
const handleOptions = (options, handleOptions2) => {
|
|
42
|
+
const { key, meta } = options;
|
|
43
|
+
if (key === "select-one") {
|
|
44
|
+
if (Array.isArray(meta))
|
|
45
|
+
submit(meta);
|
|
46
|
+
else
|
|
47
|
+
submit([meta]);
|
|
48
|
+
close();
|
|
49
|
+
return;
|
|
54
50
|
}
|
|
55
|
-
|
|
56
|
-
bodyClass: "resource-select-modal-body",
|
|
57
|
-
width: "986px",
|
|
58
|
-
closable: false,
|
|
59
|
-
hideTitle: false,
|
|
60
|
-
footer: false
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
const activeKey = vue.ref("all");
|
|
64
|
-
vue.provide("filterOptions", vue.computed(() => props.filterOptions));
|
|
65
|
-
vue.provide("userInfo", vue.computed(() => props.userInfo));
|
|
66
|
-
vue.provide("baseAPI", BASE_API);
|
|
67
|
-
const {
|
|
68
|
-
list,
|
|
69
|
-
total,
|
|
70
|
-
limit,
|
|
71
|
-
pageIdx,
|
|
72
|
-
loading,
|
|
73
|
-
changeKey,
|
|
74
|
-
changeFilter,
|
|
75
|
-
changePage,
|
|
76
|
-
changeSize
|
|
77
|
-
} = useAttachement["default"]({ key: "all", BASE_API });
|
|
78
|
-
const {
|
|
79
|
-
selected,
|
|
80
|
-
selectedKeys,
|
|
81
|
-
disableSelect,
|
|
82
|
-
handleSelect,
|
|
83
|
-
handleClear
|
|
84
|
-
} = useResourceSelect.useResourceSelect(props);
|
|
85
|
-
function handleClose() {
|
|
86
|
-
handleClear();
|
|
87
|
-
emits("update:visible", false);
|
|
88
|
-
}
|
|
89
|
-
const handleSubmit = (data) => {
|
|
90
|
-
emits("submit", JSON.parse(JSON.stringify(data)));
|
|
91
|
-
};
|
|
92
|
-
const handleSelectOne = (params) => {
|
|
93
|
-
if (Array.isArray(params))
|
|
94
|
-
handleSubmit(params);
|
|
95
|
-
else
|
|
96
|
-
handleSubmit([params]);
|
|
97
|
-
handleClose();
|
|
51
|
+
handleOptions2 && handleOptions2(options);
|
|
98
52
|
};
|
|
99
53
|
function handleConfirm() {
|
|
100
|
-
|
|
54
|
+
submit(selected.value);
|
|
101
55
|
}
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
activeKey.value = "local";
|
|
56
|
+
function handelChangeTab(tabKey) {
|
|
57
|
+
activeKey.value = tabKey;
|
|
105
58
|
}
|
|
106
|
-
const FilterRef = vue.ref();
|
|
107
|
-
vue.watch(
|
|
108
|
-
() => props.visible,
|
|
109
|
-
() => {
|
|
110
|
-
if (props.visible) {
|
|
111
|
-
activeKey.value = "all";
|
|
112
|
-
changeKey("all");
|
|
113
|
-
if (FilterRef.value)
|
|
114
|
-
FilterRef.value.resetFilter();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
59
|
return (_ctx, _cache) => {
|
|
119
60
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
120
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.wrap === "drawer" ? vue.unref(webVue.Drawer) : vue.unref(webVue.Modal)), vue.mergeProps({ visible: _ctx.visible }, wrapProps
|
|
61
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.wrap === "drawer" ? vue.unref(webVue.Drawer) : vue.unref(webVue.Modal)), vue.mergeProps({ visible: _ctx.visible }, vue.unref(wrapProps)), {
|
|
121
62
|
default: vue.withCtx(() => [
|
|
122
63
|
vue.createElementVNode("div", _hoisted_2, [
|
|
123
64
|
_ctx.userInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
124
65
|
vue.createCommentVNode(" \u5934\u90E8 "),
|
|
125
66
|
vue.createVNode(index, {
|
|
126
|
-
"model-value": activeKey
|
|
127
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeKey.value = $event),
|
|
128
|
-
|
|
129
|
-
onClose:
|
|
130
|
-
}, null, 8, ["model-value", "
|
|
131
|
-
vue.createCommentVNode(" \
|
|
132
|
-
|
|
133
|
-
vue.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
]),
|
|
159
|
-
vue.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
})
|
|
170
|
-
]),
|
|
171
|
-
vue.createCommentVNode(" \u5E95\u90E8 "),
|
|
172
|
-
vue.createElementVNode("div", _hoisted_6, [
|
|
173
|
-
vue.createElementVNode("div", _hoisted_7, [
|
|
174
|
-
activeKey.value !== "local" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Pagination), {
|
|
175
|
-
key: 0,
|
|
176
|
-
current: vue.unref(pageIdx),
|
|
177
|
-
"onUpdate:current": _cache[1] || (_cache[1] = ($event) => vue.isRef(pageIdx) ? pageIdx.value = $event : null),
|
|
178
|
-
total: vue.unref(total),
|
|
179
|
-
"page-size": vue.unref(limit),
|
|
180
|
-
"show-total": "",
|
|
181
|
-
"show-page-size": "",
|
|
182
|
-
"base-size": 3,
|
|
183
|
-
"buffer-size": 1,
|
|
184
|
-
onChange: _cache[2] || (_cache[2] = (e) => vue.unref(changePage)((e - 1) * vue.unref(limit))),
|
|
185
|
-
onPageSizeChange: vue.unref(changeSize)
|
|
186
|
-
}, null, 8, ["current", "total", "page-size", "onPageSizeChange"])) : vue.createCommentVNode("v-if", true)
|
|
67
|
+
"model-value": vue.unref(activeKey),
|
|
68
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(activeKey) ? activeKey.value = $event : null),
|
|
69
|
+
tabList: vue.unref(tabKeyList),
|
|
70
|
+
onClose: vue.unref(close)
|
|
71
|
+
}, null, 8, ["model-value", "tabList", "onClose"]),
|
|
72
|
+
vue.createCommentVNode(" \u5217\u8868\u5206\u53D1\u5668 "),
|
|
73
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(activeComponent)), {
|
|
74
|
+
"active-key": vue.unref(activeKey),
|
|
75
|
+
onChangeTab: handelChangeTab
|
|
76
|
+
}, {
|
|
77
|
+
item: vue.withCtx(({ item, onOptions }) => [
|
|
78
|
+
vue.createVNode(ListCardWrapper, {
|
|
79
|
+
item,
|
|
80
|
+
"select-keys": vue.unref(selectedKeys),
|
|
81
|
+
disable: vue.unref(disableSelect),
|
|
82
|
+
onSelect: vue.unref(handleSelect),
|
|
83
|
+
onOptions: (e) => handleOptions(e, onOptions)
|
|
84
|
+
}, null, 8, ["item", "select-keys", "disable", "onSelect", "onOptions"])
|
|
85
|
+
]),
|
|
86
|
+
"footer-extra": vue.withCtx(() => [
|
|
87
|
+
vue.unref(selected).length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
88
|
+
vue.createVNode(index$1, {
|
|
89
|
+
maxcount: _ctx.maxcount,
|
|
90
|
+
selected: vue.unref(selected),
|
|
91
|
+
onRemove: vue.unref(handleSelect),
|
|
92
|
+
onClear: vue.unref(handleClear)
|
|
93
|
+
}, null, 8, ["maxcount", "selected", "onRemove", "onClear"]),
|
|
94
|
+
vue.createVNode(vue.unref(webVue.Button), { onClick: vue.unref(close) }, {
|
|
95
|
+
default: vue.withCtx(() => [
|
|
96
|
+
vue.createTextVNode("\u53D6\u6D88")
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["onClick"]),
|
|
100
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
101
|
+
type: "primary",
|
|
102
|
+
onClick: handleConfirm
|
|
103
|
+
}, {
|
|
104
|
+
default: vue.withCtx(() => [
|
|
105
|
+
vue.createTextVNode(" \u786E\u5B9A ")
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
})
|
|
109
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
187
110
|
]),
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
selected: vue.unref(selected),
|
|
192
|
-
onRemove: vue.unref(handleSelect),
|
|
193
|
-
onClear: vue.unref(handleClear)
|
|
194
|
-
}, null, 8, ["maxcount", "selected", "onRemove", "onClear"]),
|
|
195
|
-
vue.createVNode(vue.unref(webVue.Button), { onClick: handleClose }, {
|
|
196
|
-
default: vue.withCtx(() => [
|
|
197
|
-
vue.createTextVNode("\u53D6\u6D88")
|
|
198
|
-
]),
|
|
199
|
-
_: 1
|
|
200
|
-
}),
|
|
201
|
-
vue.createVNode(vue.unref(webVue.Button), {
|
|
202
|
-
type: "primary",
|
|
203
|
-
onClick: handleConfirm
|
|
204
|
-
}, {
|
|
205
|
-
default: vue.withCtx(() => [
|
|
206
|
-
vue.createTextVNode("\u786E\u5B9A")
|
|
207
|
-
]),
|
|
208
|
-
_: 1
|
|
209
|
-
})
|
|
210
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
211
|
-
])
|
|
212
|
-
])) : (vue.openBlock(), vue.createBlock(vue.unref(index$5), {
|
|
111
|
+
_: 1
|
|
112
|
+
}, 40, ["active-key"]))
|
|
113
|
+
])) : (vue.openBlock(), vue.createBlock(vue.unref(index$2), {
|
|
213
114
|
key: 1,
|
|
214
115
|
type: "empty",
|
|
215
116
|
customTip: "\u6682\u65E0\u6743\u9650"
|
package/lib/selectResourceModal/components/{ListCardWrapper/index.js → List/ListCardWrapper.js}
RENAMED
|
@@ -7,12 +7,9 @@ const _hoisted_3 = {
|
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "check-box active"
|
|
9
9
|
};
|
|
10
|
-
const _hoisted_4 = {
|
|
11
|
-
key: 1,
|
|
12
|
-
class: "check-box"
|
|
13
|
-
};
|
|
10
|
+
const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "check-box" }, null, -1);
|
|
14
11
|
const _sfc_main = vue.defineComponent({
|
|
15
|
-
__name: "
|
|
12
|
+
__name: "ListCardWrapper",
|
|
16
13
|
props: {
|
|
17
14
|
item: {},
|
|
18
15
|
extraKeys: {},
|
|
@@ -24,6 +21,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
24
21
|
const props = __props;
|
|
25
22
|
const emits = __emit;
|
|
26
23
|
const filterOptions = vue.inject("filterOptions");
|
|
24
|
+
const resourceKey = vue.computed(() => props.item.id || props.item.url);
|
|
27
25
|
const selectedOrder = vue.computed(() => {
|
|
28
26
|
var _a;
|
|
29
27
|
const result = {};
|
|
@@ -45,7 +43,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
45
43
|
return true;
|
|
46
44
|
});
|
|
47
45
|
const handlersKey = vue.computed(() => {
|
|
48
|
-
var _a;
|
|
46
|
+
var _a, _b;
|
|
49
47
|
if (props.item.status === 2) {
|
|
50
48
|
return [
|
|
51
49
|
{ label: "\u91CD\u65B0\u4E0A\u4F20", key: "reupload" },
|
|
@@ -55,13 +53,13 @@ const _sfc_main = vue.defineComponent({
|
|
|
55
53
|
if (props.item.status === 3) {
|
|
56
54
|
return [{ label: "\u91CD\u65B0\u8F6C\u7801", key: "retranscode" }];
|
|
57
55
|
}
|
|
58
|
-
if (((_a = props.selectKeys) == null ? void 0 : _a.length) > 0 || props.disable || !canIUse.value) {
|
|
56
|
+
if (((_a = props.selectKeys) == null ? void 0 : _a.length) && ((_b = props.selectKeys) == null ? void 0 : _b.length) > 0 || props.disable || !canIUse.value) {
|
|
59
57
|
return [];
|
|
60
58
|
}
|
|
61
59
|
return [{ label: "\u9009\u7528", key: "select-one" }].concat(props.extraKeys || []);
|
|
62
60
|
});
|
|
63
61
|
function handleCheck() {
|
|
64
|
-
if (!canIUse.value && !selectedOrder.value[
|
|
62
|
+
if (!canIUse.value && !selectedOrder.value[resourceKey.value])
|
|
65
63
|
return;
|
|
66
64
|
emits("select", props.item);
|
|
67
65
|
}
|
|
@@ -71,7 +69,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
71
69
|
onClick: vue.withModifiers(handleCheck, ["stop"])
|
|
72
70
|
}, [
|
|
73
71
|
vue.createElementVNode("div", {
|
|
74
|
-
class: vue.normalizeClass(["card-wrapper", { disable: !canIUse.value, active: selectedOrder.value[
|
|
72
|
+
class: vue.normalizeClass(["card-wrapper", { disable: !canIUse.value, active: selectedOrder.value[resourceKey.value] }])
|
|
75
73
|
}, [
|
|
76
74
|
vue.createVNode(vue.unref(index), {
|
|
77
75
|
url: _ctx.item.url,
|
|
@@ -92,7 +90,11 @@ const _sfc_main = vue.defineComponent({
|
|
|
92
90
|
class: "check-box-wrapper",
|
|
93
91
|
onClick: vue.withModifiers(handleCheck, ["stop"])
|
|
94
92
|
}, [
|
|
95
|
-
|
|
93
|
+
vue.createCommentVNode(" \u5DF2\u9009 "),
|
|
94
|
+
selectedOrder.value[resourceKey.value] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, vue.toDisplayString(selectedOrder.value[resourceKey.value]), 1)) : canIUse.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
95
|
+
vue.createCommentVNode(" \u662F\u5426\u53EF\u4EE5\u9009\u62E9 "),
|
|
96
|
+
_hoisted_4
|
|
97
|
+
], 64)) : vue.createCommentVNode("v-if", true)
|
|
96
98
|
])
|
|
97
99
|
]);
|
|
98
100
|
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var Upload = require("./Upload.js");
|
|
4
|
+
var useUpload = require("../../../../hooks/useUpload.js");
|
|
5
|
+
var ListWraper = require("../ListWraper.js");
|
|
6
|
+
const _hoisted_1 = { class: "list-upload" };
|
|
7
|
+
const _hoisted_2 = { class: "list-content" };
|
|
8
|
+
const _hoisted_3 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "list-tips"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_4 = { class: "list-item-grid" };
|
|
13
|
+
const _sfc_main = vue.defineComponent({
|
|
14
|
+
__name: "index",
|
|
15
|
+
props: {
|
|
16
|
+
selectKeys: {},
|
|
17
|
+
disable: { type: Boolean }
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const userInfo = vue.inject("userInfo");
|
|
21
|
+
const baseAPI = vue.inject("baseAPI");
|
|
22
|
+
const repoId = vue.computed(() => {
|
|
23
|
+
var _a;
|
|
24
|
+
return (_a = userInfo == null ? void 0 : userInfo.value) == null ? void 0 : _a.repository_id;
|
|
25
|
+
});
|
|
26
|
+
const { list, uploadFile, reTranscode, transcodingFile, removeRecord } = useUpload["default"]();
|
|
27
|
+
function handleChange(file) {
|
|
28
|
+
if (!baseAPI || !repoId.value)
|
|
29
|
+
return;
|
|
30
|
+
uploadFile(
|
|
31
|
+
baseAPI,
|
|
32
|
+
file.file,
|
|
33
|
+
0,
|
|
34
|
+
repoId.value,
|
|
35
|
+
(media) => transcodingFile(baseAPI, media, repoId.value)
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
async function handleOptions(e) {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
if (e.key === "reupload") {
|
|
41
|
+
if (!e.item || !((_a = e.item) == null ? void 0 : _a.originFile))
|
|
42
|
+
return;
|
|
43
|
+
e.item.originFile.sig_id = e.item.sig_id;
|
|
44
|
+
e.item.originFile.id = e.item.id;
|
|
45
|
+
handleChange({ file: e.item.originFile });
|
|
46
|
+
} else if (e.key === "retranscode") {
|
|
47
|
+
if (!baseAPI || !((_b = e.item) == null ? void 0 : _b.mediaFile))
|
|
48
|
+
return;
|
|
49
|
+
if (!await reTranscode(baseAPI, e.item.mediaFile))
|
|
50
|
+
return;
|
|
51
|
+
transcodingFile(baseAPI, e.item.mediaFile, repoId.value);
|
|
52
|
+
} else if (e.key === "remove") {
|
|
53
|
+
if (!e.item)
|
|
54
|
+
return;
|
|
55
|
+
removeRecord(e.item);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return (_ctx, _cache) => {
|
|
59
|
+
return vue.openBlock(), vue.createBlock(ListWraper, null, {
|
|
60
|
+
"footer-extra": vue.withCtx(() => [
|
|
61
|
+
vue.renderSlot(_ctx.$slots, "footer-extra")
|
|
62
|
+
]),
|
|
63
|
+
default: vue.withCtx(() => {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
return [
|
|
66
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
67
|
+
vue.createVNode(Upload, { onChange: handleChange })
|
|
68
|
+
]),
|
|
69
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
70
|
+
((_a = vue.unref(list)) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, " \u5DF2\u4E0A\u4F20 " + vue.toDisplayString((_b = vue.unref(list)) == null ? void 0 : _b.length) + " \u4E2A\u7D20\u6750 ", 1)) : vue.createCommentVNode("v-if", true),
|
|
71
|
+
vue.createCommentVNode(" \u4E0A\u4F20\u5217\u8868 "),
|
|
72
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
73
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(list), (item) => {
|
|
74
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
75
|
+
key: item.sig_id
|
|
76
|
+
}, [
|
|
77
|
+
vue.createCommentVNode(" \n onOptions \u7528\u4E8E\u5904\u7406\u5361\u7247\u91CC\u5916\u90E8\u4E0D\u80FD\u6355\u83B7\u7684\u64CD\u4F5C\n 1. \u6BD4\u5982\u5916\u90E8\u65E0\u6CD5\u5904\u7406\u9700\u8981\u91CD\u65B0\u4E0A\u4F20/\u8F6C\u7801/\u5220\u9664\u7684\u903B\u8F91 \n 2. \u90A3\u4E48\u5C31\u5C06\u5904\u7406\u7684\u65B9\u6CD5\u4E5F\u4E00\u540C\u629B\u51FA\uFF0C\u7531\u5916\u90E8\u8C03\u7528\n "),
|
|
78
|
+
vue.renderSlot(_ctx.$slots, "item", {
|
|
79
|
+
item,
|
|
80
|
+
onOptions: handleOptions
|
|
81
|
+
})
|
|
82
|
+
], 64);
|
|
83
|
+
}), 128))
|
|
84
|
+
])
|
|
85
|
+
])
|
|
86
|
+
];
|
|
87
|
+
}),
|
|
88
|
+
_: 3
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
module.exports = _sfc_main;
|
package/lib/selectResourceModal/components/{ListFilter/index.js → List/ListNormal/Filter.js}
RENAMED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
var vue = require("vue");
|
|
3
3
|
var webVue = require("@arco-design/web-vue");
|
|
4
4
|
var icon = require("@arco-design/web-vue/es/icon");
|
|
5
|
-
var useSelection = require("
|
|
6
|
-
var typeMap = require("
|
|
7
|
-
var
|
|
8
|
-
var resource = require("
|
|
5
|
+
var useSelection = require("../../../../hooks/useSelection.js");
|
|
6
|
+
var typeMap = require("../../../../utils/typeMap.js");
|
|
7
|
+
var selectionApis = require("../../../scripts/selectionApis.js");
|
|
8
|
+
var resource = require("../../../../utils/resource.js");
|
|
9
9
|
const _hoisted_1 = { class: "list-filter-wrapper" };
|
|
10
10
|
const _hoisted_2 = { class: "list-filter" };
|
|
11
11
|
const _hoisted_3 = { class: "filter-list" };
|
|
@@ -23,10 +23,9 @@ const _hoisted_9 = {
|
|
|
23
23
|
};
|
|
24
24
|
const _hoisted_10 = ["onClick"];
|
|
25
25
|
const _sfc_main = vue.defineComponent({
|
|
26
|
-
__name: "
|
|
26
|
+
__name: "Filter",
|
|
27
27
|
props: {
|
|
28
|
-
disableUploadBy: { type: Boolean }
|
|
29
|
-
filterOptions: {}
|
|
28
|
+
disableUploadBy: { type: Boolean }
|
|
30
29
|
},
|
|
31
30
|
emits: ["upload", "change"],
|
|
32
31
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -34,6 +33,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
34
33
|
const emits = __emit;
|
|
35
34
|
const userInfo = vue.inject("userInfo");
|
|
36
35
|
const baseAPI = vue.inject("baseAPI");
|
|
36
|
+
const filterOptions = vue.inject("filterOptions");
|
|
37
37
|
const domainId = vue.computed(() => userInfo == null ? void 0 : userInfo.value.domain_id);
|
|
38
38
|
const { options, loading, load, loadMore, handleSearch } = useSelection({
|
|
39
39
|
labelStr: "alias",
|
|
@@ -43,7 +43,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
43
43
|
return Promise.reject(new Error("baseAPI \u4E0D\u5B58\u5728"));
|
|
44
44
|
if (!domainId.value)
|
|
45
45
|
return Promise.reject(new Error("domainId \u4E0D\u5B58\u5728"));
|
|
46
|
-
const { code, message } = await
|
|
46
|
+
const { code, message } = await selectionApis.getAccountList(baseAPI, domainId.value, {
|
|
47
47
|
...pageInfo,
|
|
48
48
|
keywords: keyword
|
|
49
49
|
});
|
|
@@ -139,13 +139,13 @@ const _sfc_main = vue.defineComponent({
|
|
|
139
139
|
{ deep: true, immediate: true }
|
|
140
140
|
);
|
|
141
141
|
vue.watch(
|
|
142
|
-
() =>
|
|
142
|
+
() => filterOptions == null ? void 0 : filterOptions.value,
|
|
143
143
|
() => {
|
|
144
144
|
var _a;
|
|
145
|
-
if ((_a =
|
|
146
|
-
filter.value.catalog =
|
|
147
|
-
if (
|
|
148
|
-
originFilter.catalog =
|
|
145
|
+
if ((_a = filterOptions == null ? void 0 : filterOptions.value) == null ? void 0 : _a.mediaType) {
|
|
146
|
+
filter.value.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType;
|
|
147
|
+
if (filterOptions == null ? void 0 : filterOptions.value.mediaTypeStrict) {
|
|
148
|
+
originFilter.catalog = filterOptions == null ? void 0 : filterOptions.value.mediaType;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
},
|
|
@@ -207,7 +207,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
207
207
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
208
208
|
modelValue: filter.value.catalog,
|
|
209
209
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.catalog = $event),
|
|
210
|
-
disabled: (_a =
|
|
210
|
+
disabled: (_a = vue.unref(filterOptions)) == null ? void 0 : _a.mediaTypeStrict,
|
|
211
211
|
"allow-clear": "",
|
|
212
212
|
placeholder: "\u7C7B\u578B"
|
|
213
213
|
}, {
|
|
@@ -280,7 +280,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
280
280
|
onClick: handleReset
|
|
281
281
|
}, {
|
|
282
282
|
default: vue.withCtx(() => [
|
|
283
|
-
vue.createTextVNode("\u91CD\u7F6E")
|
|
283
|
+
vue.createTextVNode(" \u91CD\u7F6E ")
|
|
284
284
|
]),
|
|
285
285
|
_: 1
|
|
286
286
|
})) : vue.createCommentVNode("v-if", true)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var webVue = require("@arco-design/web-vue");
|
|
4
|
+
var ListWraper = require("../ListWraper.js");
|
|
5
|
+
var useAttachement = require("../../../../hooks/useAttachement.js");
|
|
6
|
+
var Filter = require("./Filter.js");
|
|
7
|
+
const _hoisted_1 = { class: "list-item-grid" };
|
|
8
|
+
const _sfc_main = vue.defineComponent({
|
|
9
|
+
__name: "index",
|
|
10
|
+
props: {
|
|
11
|
+
activeKey: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["change-tab"],
|
|
14
|
+
setup(__props, { emit: __emit }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const emits = __emit;
|
|
17
|
+
const BASE_API = vue.inject("baseAPI");
|
|
18
|
+
const {
|
|
19
|
+
list,
|
|
20
|
+
total,
|
|
21
|
+
limit,
|
|
22
|
+
pageIdx,
|
|
23
|
+
loading,
|
|
24
|
+
changeFilter,
|
|
25
|
+
changePage,
|
|
26
|
+
changeSize,
|
|
27
|
+
loadData,
|
|
28
|
+
changeKey
|
|
29
|
+
} = useAttachement["default"]({ key: props.activeKey, BASE_API });
|
|
30
|
+
vue.watch(() => props.activeKey, changeKey);
|
|
31
|
+
vue.onMounted(() => {
|
|
32
|
+
loadData();
|
|
33
|
+
});
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return vue.openBlock(), vue.createBlock(ListWraper, {
|
|
36
|
+
list: vue.unref(list),
|
|
37
|
+
loading: vue.unref(loading),
|
|
38
|
+
"is-empty": vue.unref(list).length === 0
|
|
39
|
+
}, {
|
|
40
|
+
"footer-extra": vue.withCtx(() => [
|
|
41
|
+
vue.renderSlot(_ctx.$slots, "footer-extra")
|
|
42
|
+
]),
|
|
43
|
+
header: vue.withCtx(() => [
|
|
44
|
+
vue.createVNode(Filter, {
|
|
45
|
+
onChange: vue.unref(changeFilter),
|
|
46
|
+
onUpload: _cache[0] || (_cache[0] = ($event) => emits("change-tab", "local"))
|
|
47
|
+
}, null, 8, ["onChange"])
|
|
48
|
+
]),
|
|
49
|
+
footer: vue.withCtx(() => [
|
|
50
|
+
vue.createVNode(vue.unref(webVue.Pagination), {
|
|
51
|
+
current: vue.unref(pageIdx),
|
|
52
|
+
"onUpdate:current": _cache[1] || (_cache[1] = ($event) => vue.isRef(pageIdx) ? pageIdx.value = $event : null),
|
|
53
|
+
total: vue.unref(total),
|
|
54
|
+
"page-size": vue.unref(limit),
|
|
55
|
+
"show-total": "",
|
|
56
|
+
"show-page-size": "",
|
|
57
|
+
"base-size": 3,
|
|
58
|
+
"buffer-size": 1,
|
|
59
|
+
onChange: _cache[2] || (_cache[2] = (e) => vue.unref(changePage)((e - 1) * vue.unref(limit))),
|
|
60
|
+
onPageSizeChange: vue.unref(changeSize)
|
|
61
|
+
}, null, 8, ["current", "total", "page-size", "onPageSizeChange"])
|
|
62
|
+
]),
|
|
63
|
+
default: vue.withCtx(() => [
|
|
64
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
65
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(list), (item) => {
|
|
66
|
+
return vue.renderSlot(_ctx.$slots, "item", {
|
|
67
|
+
key: item.id,
|
|
68
|
+
item
|
|
69
|
+
});
|
|
70
|
+
}), 128))
|
|
71
|
+
])
|
|
72
|
+
]),
|
|
73
|
+
_: 3
|
|
74
|
+
}, 8, ["list", "loading", "is-empty"]);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
module.exports = _sfc_main;
|