@cmstops/pro-compo 0.3.43 → 0.3.45
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 +38 -2
- package/dist/index.min.css +1 -1
- package/es/hooks/useAttachement.d.ts +5 -0
- package/es/hooks/useLocalStorage.d.ts +8 -0
- package/es/hooks/useLocalStorage.js +31 -0
- package/es/hooks/useUpload.d.ts +2 -1
- package/es/hooks/useUpload.js +48 -11
- package/es/index.css +38 -2
- package/es/selectResourceModal/component.js +176 -43
- package/es/selectResourceModal/components/ListCardWrapper/index.js +9 -7
- package/es/selectResourceModal/components/ListContentLocal/index.js +15 -9
- package/es/selectResourceModal/components/ListSelected/index.js +19 -6
- package/es/selectResourceModal/components/ListTabs/index.js +61 -0
- package/es/selectResourceModal/scripts/useResourceSelect.d.ts +7 -0
- package/es/selectResourceModal/scripts/useResourceSelect.js +25 -0
- package/es/selectResourceModal/style/index.css +30 -1
- package/es/selectResourceModal/style/listCardWrapper.less +25 -1
- package/es/selectResourceModal/style/listSelected.less +9 -0
- package/es/thumbCard/component.js +21 -13
- package/es/thumbCard/style/index.css +8 -1
- package/es/thumbCard/style/index.less +8 -1
- package/es/utils/transcodeMedia.d.ts +13 -0
- package/es/utils/transcodeMedia.js +46 -0
- package/lib/hooks/useLocalStorage.js +34 -0
- package/lib/hooks/useUpload.js +47 -10
- package/lib/index.css +38 -2
- package/lib/selectResourceModal/component.js +174 -41
- package/lib/selectResourceModal/components/ListCardWrapper/index.js +9 -7
- package/lib/selectResourceModal/components/ListContentLocal/index.js +14 -8
- package/lib/selectResourceModal/components/ListSelected/index.js +18 -5
- package/lib/selectResourceModal/components/ListTabs/index.js +62 -0
- package/lib/selectResourceModal/scripts/useResourceSelect.js +27 -0
- package/lib/selectResourceModal/style/index.css +30 -1
- package/lib/selectResourceModal/style/listCardWrapper.less +25 -1
- package/lib/selectResourceModal/style/listSelected.less +9 -0
- package/lib/thumbCard/component.js +19 -11
- package/lib/thumbCard/style/index.css +8 -1
- package/lib/thumbCard/style/index.less +8 -1
- package/lib/utils/transcodeMedia.js +49 -0
- package/package.json +2 -2
- package/es/selectResourceModal/components/Main/index.js +0 -215
- package/lib/selectResourceModal/components/Main/index.js +0 -216
- /package/es/selectResourceModal/components/{Main → ListTabs}/index.d.ts +0 -0
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
.thumb-select-wrapper .thumb-upload-loading {
|
|
13
13
|
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
14
15
|
align-items: center;
|
|
15
16
|
justify-content: center;
|
|
16
17
|
width: 100%;
|
|
@@ -29,6 +30,8 @@
|
|
|
29
30
|
.thumb-select-wrapper .thumb-image img {
|
|
30
31
|
width: 100%;
|
|
31
32
|
height: 100%;
|
|
33
|
+
user-select: none;
|
|
34
|
+
-webkit-user-drag: none;
|
|
32
35
|
}
|
|
33
36
|
.thumb-select-wrapper .thumb-handler-list {
|
|
34
37
|
position: absolute;
|
|
@@ -68,9 +71,13 @@
|
|
|
68
71
|
position: absolute;
|
|
69
72
|
right: 5px;
|
|
70
73
|
bottom: 5px;
|
|
71
|
-
|
|
74
|
+
display: flex;
|
|
75
|
+
gap: 2px;
|
|
76
|
+
align-items: center;
|
|
77
|
+
padding: 2px 5px;
|
|
72
78
|
color: #fff;
|
|
73
79
|
font-size: 12px;
|
|
80
|
+
line-height: 14px;
|
|
74
81
|
background-color: rgba(0, 0, 0, 0.5);
|
|
75
82
|
border-radius: 16px;
|
|
76
83
|
opacity: 1;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
// loading 模式
|
|
14
14
|
.thumb-upload-loading {
|
|
15
15
|
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
16
17
|
align-items: center;
|
|
17
18
|
justify-content: center;
|
|
18
19
|
width: 100%;
|
|
@@ -37,6 +38,8 @@
|
|
|
37
38
|
img {
|
|
38
39
|
width: 100%;
|
|
39
40
|
height: 100%;
|
|
41
|
+
user-select: none;
|
|
42
|
+
-webkit-user-drag: none;
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
|
|
@@ -89,9 +92,13 @@
|
|
|
89
92
|
position: absolute;
|
|
90
93
|
right: 5px;
|
|
91
94
|
bottom: 5px;
|
|
92
|
-
|
|
95
|
+
display: flex;
|
|
96
|
+
gap: 2px;
|
|
97
|
+
align-items: center;
|
|
98
|
+
padding: 2px 5px;
|
|
93
99
|
color: #fff;
|
|
94
100
|
font-size: 12px;
|
|
101
|
+
line-height: 14px;
|
|
95
102
|
background-color: rgba(0, 0, 0, 0.5);
|
|
96
103
|
border-radius: 16px;
|
|
97
104
|
opacity: 1;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
var request = require("./request.js");
|
|
4
|
+
function getTranscodingProgress(BASE_API, id) {
|
|
5
|
+
return request(BASE_API, {
|
|
6
|
+
url: `/poplar/v2/transcoding/progress?id=${id}`,
|
|
7
|
+
method: "get"
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
class TranscodingTask {
|
|
11
|
+
constructor(file) {
|
|
12
|
+
this.file = file;
|
|
13
|
+
this.pollCount = 0;
|
|
14
|
+
}
|
|
15
|
+
start(BASE_API, callback) {
|
|
16
|
+
if (!this.file.id)
|
|
17
|
+
return Promise.reject(new Error("file error"));
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
const handleTranscoding = async () => {
|
|
20
|
+
const { code, message } = await getTranscodingProgress(
|
|
21
|
+
BASE_API,
|
|
22
|
+
this.file.id
|
|
23
|
+
);
|
|
24
|
+
if (code !== 0)
|
|
25
|
+
reject(new Error(message));
|
|
26
|
+
if (message.state === 1) {
|
|
27
|
+
callback(message.progress);
|
|
28
|
+
if (message.progress === 1 && ++this.pollCount === 3) {
|
|
29
|
+
this.abort();
|
|
30
|
+
resolve(false);
|
|
31
|
+
}
|
|
32
|
+
} else if (message.state === 2) {
|
|
33
|
+
this.abort();
|
|
34
|
+
resolve(false);
|
|
35
|
+
} else if (message.state === 3) {
|
|
36
|
+
this.abort();
|
|
37
|
+
resolve(true);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
this.taskInterval = setInterval(handleTranscoding, 5e3);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
abort() {
|
|
44
|
+
clearInterval(this.taskInterval);
|
|
45
|
+
this.taskInterval = null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.TranscodingTask = TranscodingTask;
|
|
49
|
+
exports.getTranscodingProgress = getTranscodingProgress;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmstops/pro-compo",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.45",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@arco-design/web-vue": "~2",
|
|
63
|
-
"@arco-iconbox/vue-cmstop-icons": "^0.0.
|
|
63
|
+
"@arco-iconbox/vue-cmstop-icons": "^0.0.31",
|
|
64
64
|
"@babel/core": "^7.14.6",
|
|
65
65
|
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
|
66
66
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, provide, computed, openBlock, createElementBlock, createCommentVNode, createElementVNode, createVNode, unref, withCtx, withDirectives, vShow, createBlock, createTextVNode } from "vue";
|
|
2
|
-
import { Tabs, Button, TabPane, Scrollbar, Pagination } from "@arco-design/web-vue";
|
|
3
|
-
import { IconClose } from "@arco-design/web-vue/es/icon";
|
|
4
|
-
import emptyData from "../../../emptyData/index.js";
|
|
5
|
-
import _sfc_main$1 from "../ListFilter/index.js";
|
|
6
|
-
import _sfc_main$2 from "../ListContent/index.js";
|
|
7
|
-
import _sfc_main$4 from "../ListSelected/index.js";
|
|
8
|
-
import _sfc_main$3 from "../ListContentLocal/index.js";
|
|
9
|
-
import useAttachement from "../../../hooks/useAttachement.js";
|
|
10
|
-
import { DEFAULT_BASE_API } from "../../../config.js";
|
|
11
|
-
const _hoisted_1 = { class: "resource-select-main" };
|
|
12
|
-
const _hoisted_2 = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "resource-select-container"
|
|
15
|
-
};
|
|
16
|
-
const _hoisted_3 = { class: "resource-select-header" };
|
|
17
|
-
const _hoisted_4 = {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "resource-select-filter"
|
|
20
|
-
};
|
|
21
|
-
const _hoisted_5 = { class: "resource-select-content" };
|
|
22
|
-
const _hoisted_6 = { class: "resource-select-footer" };
|
|
23
|
-
const _hoisted_7 = { class: "footer-left" };
|
|
24
|
-
const _hoisted_8 = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "footer-right"
|
|
27
|
-
};
|
|
28
|
-
const _sfc_main = defineComponent({
|
|
29
|
-
__name: "index",
|
|
30
|
-
props: {
|
|
31
|
-
BASE_API: {},
|
|
32
|
-
userInfo: {},
|
|
33
|
-
maxcount: {},
|
|
34
|
-
filterOptions: {}
|
|
35
|
-
},
|
|
36
|
-
emits: ["close", "submit"],
|
|
37
|
-
setup(__props, { emit: __emit }) {
|
|
38
|
-
const props = __props;
|
|
39
|
-
const emits = __emit;
|
|
40
|
-
const BASE_API = props.BASE_API || DEFAULT_BASE_API;
|
|
41
|
-
const activeKey = ref("all");
|
|
42
|
-
provide("userInfo", computed(() => props.userInfo));
|
|
43
|
-
provide("baseAPI", BASE_API);
|
|
44
|
-
const {
|
|
45
|
-
list,
|
|
46
|
-
total,
|
|
47
|
-
limit,
|
|
48
|
-
loading,
|
|
49
|
-
changeKey,
|
|
50
|
-
changeFilter,
|
|
51
|
-
changePage,
|
|
52
|
-
changeSize
|
|
53
|
-
} = useAttachement({ key: "all", BASE_API });
|
|
54
|
-
const selected = ref([]);
|
|
55
|
-
const selectedKeys = computed(() => selected.value.map((item) => item.id));
|
|
56
|
-
const disableSelect = computed(() => props.maxcount && selected.value.length >= props.maxcount);
|
|
57
|
-
function handleSelect(params) {
|
|
58
|
-
const { id } = params;
|
|
59
|
-
const index = selected.value.findIndex((item) => item.id === id);
|
|
60
|
-
if (index > -1)
|
|
61
|
-
selected.value.splice(index, 1);
|
|
62
|
-
else
|
|
63
|
-
selected.value.push(params);
|
|
64
|
-
}
|
|
65
|
-
function handleClear() {
|
|
66
|
-
selected.value = [];
|
|
67
|
-
}
|
|
68
|
-
function handleClose() {
|
|
69
|
-
handleClear();
|
|
70
|
-
emits("close");
|
|
71
|
-
}
|
|
72
|
-
const handleSelectOne = (params) => {
|
|
73
|
-
if (Array.isArray(params))
|
|
74
|
-
emits("submit", params);
|
|
75
|
-
else
|
|
76
|
-
emits("submit", [params]);
|
|
77
|
-
handleClose();
|
|
78
|
-
};
|
|
79
|
-
function handleConfirm() {
|
|
80
|
-
handleSelectOne(selected.value);
|
|
81
|
-
}
|
|
82
|
-
function handleToUpload() {
|
|
83
|
-
changeKey("local");
|
|
84
|
-
activeKey.value = "local";
|
|
85
|
-
}
|
|
86
|
-
return (_ctx, _cache) => {
|
|
87
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
88
|
-
_ctx.userInfo ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
89
|
-
createCommentVNode(" \u5934\u90E8 "),
|
|
90
|
-
createElementVNode("div", _hoisted_3, [
|
|
91
|
-
createVNode(unref(Tabs), {
|
|
92
|
-
"active-key": activeKey.value,
|
|
93
|
-
"onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => activeKey.value = $event),
|
|
94
|
-
onChange: unref(changeKey)
|
|
95
|
-
}, {
|
|
96
|
-
extra: withCtx(() => [
|
|
97
|
-
createVNode(unref(Button), {
|
|
98
|
-
type: "secondary",
|
|
99
|
-
shape: "round",
|
|
100
|
-
onClick: handleClose
|
|
101
|
-
}, {
|
|
102
|
-
icon: withCtx(() => [
|
|
103
|
-
createVNode(unref(IconClose))
|
|
104
|
-
]),
|
|
105
|
-
_: 1
|
|
106
|
-
})
|
|
107
|
-
]),
|
|
108
|
-
default: withCtx(() => [
|
|
109
|
-
createVNode(unref(TabPane), {
|
|
110
|
-
key: "all",
|
|
111
|
-
title: "\u5168\u90E8\u7D20\u6750"
|
|
112
|
-
}),
|
|
113
|
-
createVNode(unref(TabPane), {
|
|
114
|
-
key: "my",
|
|
115
|
-
title: "\u6211\u7684\u7D20\u6750"
|
|
116
|
-
}),
|
|
117
|
-
createVNode(unref(TabPane), {
|
|
118
|
-
key: "remind",
|
|
119
|
-
title: "\u63D0\u9192\u6211\u7684"
|
|
120
|
-
}),
|
|
121
|
-
createVNode(unref(TabPane), {
|
|
122
|
-
key: "local",
|
|
123
|
-
title: "\u672C\u5730\u7D20\u6750"
|
|
124
|
-
})
|
|
125
|
-
]),
|
|
126
|
-
_: 1
|
|
127
|
-
}, 8, ["active-key", "onChange"])
|
|
128
|
-
]),
|
|
129
|
-
createCommentVNode(" \u7B5B\u9009 "),
|
|
130
|
-
activeKey.value !== "local" ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
131
|
-
createVNode(_sfc_main$1, {
|
|
132
|
-
"disable-upload-by": activeKey.value !== "all",
|
|
133
|
-
filterOptions: _ctx.filterOptions,
|
|
134
|
-
onChange: unref(changeFilter),
|
|
135
|
-
onUpload: handleToUpload
|
|
136
|
-
}, null, 8, ["disable-upload-by", "filterOptions", "onChange"])
|
|
137
|
-
])) : createCommentVNode("v-if", true),
|
|
138
|
-
createCommentVNode(" \u5217\u8868\u90E8\u5206 "),
|
|
139
|
-
createElementVNode("div", _hoisted_5, [
|
|
140
|
-
createVNode(unref(Scrollbar), {
|
|
141
|
-
"outer-style": { height: "100%" },
|
|
142
|
-
style: { "height": "100%", "overflow": "auto" }
|
|
143
|
-
}, {
|
|
144
|
-
default: withCtx(() => [
|
|
145
|
-
withDirectives(createVNode(_sfc_main$2, {
|
|
146
|
-
loading: unref(loading),
|
|
147
|
-
list: unref(list),
|
|
148
|
-
disable: disableSelect.value,
|
|
149
|
-
"select-keys": selectedKeys.value,
|
|
150
|
-
onSelect: handleSelect,
|
|
151
|
-
onSelectOne: handleSelectOne
|
|
152
|
-
}, null, 8, ["loading", "list", "disable", "select-keys"]), [
|
|
153
|
-
[vShow, activeKey.value !== "local"]
|
|
154
|
-
]),
|
|
155
|
-
withDirectives(createVNode(_sfc_main$3, {
|
|
156
|
-
disable: disableSelect.value,
|
|
157
|
-
"select-keys": selectedKeys.value,
|
|
158
|
-
onSelect: handleSelect,
|
|
159
|
-
onSelectOne: handleSelectOne
|
|
160
|
-
}, null, 8, ["disable", "select-keys"]), [
|
|
161
|
-
[vShow, activeKey.value === "local"]
|
|
162
|
-
])
|
|
163
|
-
]),
|
|
164
|
-
_: 1
|
|
165
|
-
})
|
|
166
|
-
]),
|
|
167
|
-
createCommentVNode(" \u5E95\u90E8 "),
|
|
168
|
-
createElementVNode("div", _hoisted_6, [
|
|
169
|
-
createElementVNode("div", _hoisted_7, [
|
|
170
|
-
activeKey.value !== "local" ? (openBlock(), createBlock(unref(Pagination), {
|
|
171
|
-
key: 0,
|
|
172
|
-
total: unref(total),
|
|
173
|
-
"page-size": unref(limit),
|
|
174
|
-
"show-total": "",
|
|
175
|
-
"show-page-size": "",
|
|
176
|
-
"base-size": 3,
|
|
177
|
-
"buffer-size": 1,
|
|
178
|
-
onChange: _cache[1] || (_cache[1] = (e) => unref(changePage)((e - 1) * unref(limit))),
|
|
179
|
-
onPageSizeChange: unref(changeSize)
|
|
180
|
-
}, null, 8, ["total", "page-size", "onPageSizeChange"])) : createCommentVNode("v-if", true)
|
|
181
|
-
]),
|
|
182
|
-
selected.value.length ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
183
|
-
createVNode(_sfc_main$4, {
|
|
184
|
-
maxcount: _ctx.maxcount,
|
|
185
|
-
selected: selected.value,
|
|
186
|
-
onRemove: handleSelect,
|
|
187
|
-
onClear: handleClear
|
|
188
|
-
}, null, 8, ["maxcount", "selected"]),
|
|
189
|
-
createVNode(unref(Button), { onClick: handleClose }, {
|
|
190
|
-
default: withCtx(() => [
|
|
191
|
-
createTextVNode("\u53D6\u6D88")
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
}),
|
|
195
|
-
createVNode(unref(Button), {
|
|
196
|
-
type: "primary",
|
|
197
|
-
onClick: handleConfirm
|
|
198
|
-
}, {
|
|
199
|
-
default: withCtx(() => [
|
|
200
|
-
createTextVNode("\u786E\u5B9A")
|
|
201
|
-
]),
|
|
202
|
-
_: 1
|
|
203
|
-
})
|
|
204
|
-
])) : createCommentVNode("v-if", true)
|
|
205
|
-
])
|
|
206
|
-
])) : (openBlock(), createBlock(unref(emptyData), {
|
|
207
|
-
key: 1,
|
|
208
|
-
type: "empty",
|
|
209
|
-
customTip: "\u6682\u65E0\u6743\u9650"
|
|
210
|
-
}))
|
|
211
|
-
]);
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
export { _sfc_main as default };
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var vue = require("vue");
|
|
3
|
-
var webVue = require("@arco-design/web-vue");
|
|
4
|
-
var icon = require("@arco-design/web-vue/es/icon");
|
|
5
|
-
var index$4 = require("../../../emptyData/index.js");
|
|
6
|
-
var index = require("../ListFilter/index.js");
|
|
7
|
-
var index$1 = require("../ListContent/index.js");
|
|
8
|
-
var index$3 = require("../ListSelected/index.js");
|
|
9
|
-
var index$2 = require("../ListContentLocal/index.js");
|
|
10
|
-
var useAttachement = require("../../../hooks/useAttachement.js");
|
|
11
|
-
var config = require("../../../config.js");
|
|
12
|
-
const _hoisted_1 = { class: "resource-select-main" };
|
|
13
|
-
const _hoisted_2 = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "resource-select-container"
|
|
16
|
-
};
|
|
17
|
-
const _hoisted_3 = { class: "resource-select-header" };
|
|
18
|
-
const _hoisted_4 = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "resource-select-filter"
|
|
21
|
-
};
|
|
22
|
-
const _hoisted_5 = { class: "resource-select-content" };
|
|
23
|
-
const _hoisted_6 = { class: "resource-select-footer" };
|
|
24
|
-
const _hoisted_7 = { class: "footer-left" };
|
|
25
|
-
const _hoisted_8 = {
|
|
26
|
-
key: 0,
|
|
27
|
-
class: "footer-right"
|
|
28
|
-
};
|
|
29
|
-
const _sfc_main = vue.defineComponent({
|
|
30
|
-
__name: "index",
|
|
31
|
-
props: {
|
|
32
|
-
BASE_API: {},
|
|
33
|
-
userInfo: {},
|
|
34
|
-
maxcount: {},
|
|
35
|
-
filterOptions: {}
|
|
36
|
-
},
|
|
37
|
-
emits: ["close", "submit"],
|
|
38
|
-
setup(__props, { emit: __emit }) {
|
|
39
|
-
const props = __props;
|
|
40
|
-
const emits = __emit;
|
|
41
|
-
const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
|
|
42
|
-
const activeKey = vue.ref("all");
|
|
43
|
-
vue.provide("userInfo", vue.computed(() => props.userInfo));
|
|
44
|
-
vue.provide("baseAPI", BASE_API);
|
|
45
|
-
const {
|
|
46
|
-
list,
|
|
47
|
-
total,
|
|
48
|
-
limit,
|
|
49
|
-
loading,
|
|
50
|
-
changeKey,
|
|
51
|
-
changeFilter,
|
|
52
|
-
changePage,
|
|
53
|
-
changeSize
|
|
54
|
-
} = useAttachement["default"]({ key: "all", BASE_API });
|
|
55
|
-
const selected = vue.ref([]);
|
|
56
|
-
const selectedKeys = vue.computed(() => selected.value.map((item) => item.id));
|
|
57
|
-
const disableSelect = vue.computed(() => props.maxcount && selected.value.length >= props.maxcount);
|
|
58
|
-
function handleSelect(params) {
|
|
59
|
-
const { id } = params;
|
|
60
|
-
const index2 = selected.value.findIndex((item) => item.id === id);
|
|
61
|
-
if (index2 > -1)
|
|
62
|
-
selected.value.splice(index2, 1);
|
|
63
|
-
else
|
|
64
|
-
selected.value.push(params);
|
|
65
|
-
}
|
|
66
|
-
function handleClear() {
|
|
67
|
-
selected.value = [];
|
|
68
|
-
}
|
|
69
|
-
function handleClose() {
|
|
70
|
-
handleClear();
|
|
71
|
-
emits("close");
|
|
72
|
-
}
|
|
73
|
-
const handleSelectOne = (params) => {
|
|
74
|
-
if (Array.isArray(params))
|
|
75
|
-
emits("submit", params);
|
|
76
|
-
else
|
|
77
|
-
emits("submit", [params]);
|
|
78
|
-
handleClose();
|
|
79
|
-
};
|
|
80
|
-
function handleConfirm() {
|
|
81
|
-
handleSelectOne(selected.value);
|
|
82
|
-
}
|
|
83
|
-
function handleToUpload() {
|
|
84
|
-
changeKey("local");
|
|
85
|
-
activeKey.value = "local";
|
|
86
|
-
}
|
|
87
|
-
return (_ctx, _cache) => {
|
|
88
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
89
|
-
_ctx.userInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
90
|
-
vue.createCommentVNode(" \u5934\u90E8 "),
|
|
91
|
-
vue.createElementVNode("div", _hoisted_3, [
|
|
92
|
-
vue.createVNode(vue.unref(webVue.Tabs), {
|
|
93
|
-
"active-key": activeKey.value,
|
|
94
|
-
"onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => activeKey.value = $event),
|
|
95
|
-
onChange: vue.unref(changeKey)
|
|
96
|
-
}, {
|
|
97
|
-
extra: vue.withCtx(() => [
|
|
98
|
-
vue.createVNode(vue.unref(webVue.Button), {
|
|
99
|
-
type: "secondary",
|
|
100
|
-
shape: "round",
|
|
101
|
-
onClick: handleClose
|
|
102
|
-
}, {
|
|
103
|
-
icon: vue.withCtx(() => [
|
|
104
|
-
vue.createVNode(vue.unref(icon.IconClose))
|
|
105
|
-
]),
|
|
106
|
-
_: 1
|
|
107
|
-
})
|
|
108
|
-
]),
|
|
109
|
-
default: vue.withCtx(() => [
|
|
110
|
-
vue.createVNode(vue.unref(webVue.TabPane), {
|
|
111
|
-
key: "all",
|
|
112
|
-
title: "\u5168\u90E8\u7D20\u6750"
|
|
113
|
-
}),
|
|
114
|
-
vue.createVNode(vue.unref(webVue.TabPane), {
|
|
115
|
-
key: "my",
|
|
116
|
-
title: "\u6211\u7684\u7D20\u6750"
|
|
117
|
-
}),
|
|
118
|
-
vue.createVNode(vue.unref(webVue.TabPane), {
|
|
119
|
-
key: "remind",
|
|
120
|
-
title: "\u63D0\u9192\u6211\u7684"
|
|
121
|
-
}),
|
|
122
|
-
vue.createVNode(vue.unref(webVue.TabPane), {
|
|
123
|
-
key: "local",
|
|
124
|
-
title: "\u672C\u5730\u7D20\u6750"
|
|
125
|
-
})
|
|
126
|
-
]),
|
|
127
|
-
_: 1
|
|
128
|
-
}, 8, ["active-key", "onChange"])
|
|
129
|
-
]),
|
|
130
|
-
vue.createCommentVNode(" \u7B5B\u9009 "),
|
|
131
|
-
activeKey.value !== "local" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
132
|
-
vue.createVNode(index, {
|
|
133
|
-
"disable-upload-by": activeKey.value !== "all",
|
|
134
|
-
filterOptions: _ctx.filterOptions,
|
|
135
|
-
onChange: vue.unref(changeFilter),
|
|
136
|
-
onUpload: handleToUpload
|
|
137
|
-
}, null, 8, ["disable-upload-by", "filterOptions", "onChange"])
|
|
138
|
-
])) : vue.createCommentVNode("v-if", true),
|
|
139
|
-
vue.createCommentVNode(" \u5217\u8868\u90E8\u5206 "),
|
|
140
|
-
vue.createElementVNode("div", _hoisted_5, [
|
|
141
|
-
vue.createVNode(vue.unref(webVue.Scrollbar), {
|
|
142
|
-
"outer-style": { height: "100%" },
|
|
143
|
-
style: { "height": "100%", "overflow": "auto" }
|
|
144
|
-
}, {
|
|
145
|
-
default: vue.withCtx(() => [
|
|
146
|
-
vue.withDirectives(vue.createVNode(index$1, {
|
|
147
|
-
loading: vue.unref(loading),
|
|
148
|
-
list: vue.unref(list),
|
|
149
|
-
disable: disableSelect.value,
|
|
150
|
-
"select-keys": selectedKeys.value,
|
|
151
|
-
onSelect: handleSelect,
|
|
152
|
-
onSelectOne: handleSelectOne
|
|
153
|
-
}, null, 8, ["loading", "list", "disable", "select-keys"]), [
|
|
154
|
-
[vue.vShow, activeKey.value !== "local"]
|
|
155
|
-
]),
|
|
156
|
-
vue.withDirectives(vue.createVNode(index$2, {
|
|
157
|
-
disable: disableSelect.value,
|
|
158
|
-
"select-keys": selectedKeys.value,
|
|
159
|
-
onSelect: handleSelect,
|
|
160
|
-
onSelectOne: handleSelectOne
|
|
161
|
-
}, null, 8, ["disable", "select-keys"]), [
|
|
162
|
-
[vue.vShow, activeKey.value === "local"]
|
|
163
|
-
])
|
|
164
|
-
]),
|
|
165
|
-
_: 1
|
|
166
|
-
})
|
|
167
|
-
]),
|
|
168
|
-
vue.createCommentVNode(" \u5E95\u90E8 "),
|
|
169
|
-
vue.createElementVNode("div", _hoisted_6, [
|
|
170
|
-
vue.createElementVNode("div", _hoisted_7, [
|
|
171
|
-
activeKey.value !== "local" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Pagination), {
|
|
172
|
-
key: 0,
|
|
173
|
-
total: vue.unref(total),
|
|
174
|
-
"page-size": vue.unref(limit),
|
|
175
|
-
"show-total": "",
|
|
176
|
-
"show-page-size": "",
|
|
177
|
-
"base-size": 3,
|
|
178
|
-
"buffer-size": 1,
|
|
179
|
-
onChange: _cache[1] || (_cache[1] = (e) => vue.unref(changePage)((e - 1) * vue.unref(limit))),
|
|
180
|
-
onPageSizeChange: vue.unref(changeSize)
|
|
181
|
-
}, null, 8, ["total", "page-size", "onPageSizeChange"])) : vue.createCommentVNode("v-if", true)
|
|
182
|
-
]),
|
|
183
|
-
selected.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
184
|
-
vue.createVNode(index$3, {
|
|
185
|
-
maxcount: _ctx.maxcount,
|
|
186
|
-
selected: selected.value,
|
|
187
|
-
onRemove: handleSelect,
|
|
188
|
-
onClear: handleClear
|
|
189
|
-
}, null, 8, ["maxcount", "selected"]),
|
|
190
|
-
vue.createVNode(vue.unref(webVue.Button), { onClick: handleClose }, {
|
|
191
|
-
default: vue.withCtx(() => [
|
|
192
|
-
vue.createTextVNode("\u53D6\u6D88")
|
|
193
|
-
]),
|
|
194
|
-
_: 1
|
|
195
|
-
}),
|
|
196
|
-
vue.createVNode(vue.unref(webVue.Button), {
|
|
197
|
-
type: "primary",
|
|
198
|
-
onClick: handleConfirm
|
|
199
|
-
}, {
|
|
200
|
-
default: vue.withCtx(() => [
|
|
201
|
-
vue.createTextVNode("\u786E\u5B9A")
|
|
202
|
-
]),
|
|
203
|
-
_: 1
|
|
204
|
-
})
|
|
205
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
206
|
-
])
|
|
207
|
-
])) : (vue.openBlock(), vue.createBlock(vue.unref(index$4), {
|
|
208
|
-
key: 1,
|
|
209
|
-
type: "empty",
|
|
210
|
-
customTip: "\u6682\u65E0\u6743\u9650"
|
|
211
|
-
}))
|
|
212
|
-
]);
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
module.exports = _sfc_main;
|
|
File without changes
|