@cmstops/pro-compo 0.3.31 → 0.3.32

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.
Files changed (67) hide show
  1. package/dist/index.css +84 -0
  2. package/dist/index.min.css +1 -1
  3. package/es/hooks/useAttachement.d.ts +20 -0
  4. package/es/hooks/useAttachement.js +95 -0
  5. package/es/hooks/useSelection.d.ts +23 -0
  6. package/es/hooks/useSelection.js +59 -0
  7. package/es/index.css +84 -0
  8. package/es/index.d.ts +2 -0
  9. package/es/index.js +2 -0
  10. package/es/index.less +2 -0
  11. package/es/selectResourceModal/component.d.ts +0 -0
  12. package/es/selectResourceModal/component.js +211 -0
  13. package/es/selectResourceModal/components/ListContent/index.d.ts +0 -0
  14. package/es/selectResourceModal/components/ListContent/index.js +92 -0
  15. package/es/selectResourceModal/components/ListFilter/index.d.ts +0 -0
  16. package/es/selectResourceModal/components/ListFilter/index.js +259 -0
  17. package/es/selectResourceModal/components/ListFilter/scripts/api.d.ts +1 -0
  18. package/es/selectResourceModal/components/ListFilter/scripts/api.js +9 -0
  19. package/es/selectResourceModal/components/ListSelected/index.d.ts +0 -0
  20. package/es/selectResourceModal/components/ListSelected/index.js +91 -0
  21. package/es/selectResourceModal/index.d.ts +2 -0
  22. package/es/selectResourceModal/index.js +7 -0
  23. package/es/selectResourceModal/style/css.js +4 -0
  24. package/es/selectResourceModal/style/index.css +31 -0
  25. package/es/selectResourceModal/style/index.d.ts +4 -0
  26. package/es/selectResourceModal/style/index.js +4 -0
  27. package/es/selectResourceModal/style/index.less +39 -0
  28. package/es/selectResourceModal/style/listContent.less +67 -0
  29. package/es/selectResourceModal/style/listFilter.less +17 -0
  30. package/es/selectResourceModal/style/listSelected.less +67 -0
  31. package/es/thumbCard/component.d.ts +0 -0
  32. package/es/thumbCard/component.js +114 -0
  33. package/es/thumbCard/index.d.ts +2 -0
  34. package/es/thumbCard/index.js +7 -0
  35. package/es/thumbCard/style/css.js +1 -0
  36. package/es/thumbCard/style/index.css +53 -0
  37. package/es/thumbCard/style/index.d.ts +1 -0
  38. package/es/thumbCard/style/index.js +1 -0
  39. package/es/thumbCard/style/index.less +70 -0
  40. package/es/utils/typeMap.d.ts +19 -0
  41. package/es/utils/typeMap.js +17 -1
  42. package/lib/hooks/useAttachement.js +100 -0
  43. package/lib/hooks/useSelection.js +60 -0
  44. package/lib/index.css +84 -0
  45. package/lib/index.js +4 -0
  46. package/lib/index.less +2 -0
  47. package/lib/selectResourceModal/component.js +212 -0
  48. package/lib/selectResourceModal/components/ListContent/index.js +93 -0
  49. package/lib/selectResourceModal/components/ListFilter/index.js +260 -0
  50. package/lib/selectResourceModal/components/ListFilter/scripts/api.js +11 -0
  51. package/lib/selectResourceModal/components/ListSelected/index.js +92 -0
  52. package/lib/selectResourceModal/index.js +8 -0
  53. package/lib/selectResourceModal/style/css.js +5 -0
  54. package/lib/selectResourceModal/style/index.css +31 -0
  55. package/lib/selectResourceModal/style/index.js +5 -0
  56. package/lib/selectResourceModal/style/index.less +39 -0
  57. package/lib/selectResourceModal/style/listContent.less +67 -0
  58. package/lib/selectResourceModal/style/listFilter.less +17 -0
  59. package/lib/selectResourceModal/style/listSelected.less +67 -0
  60. package/lib/thumbCard/component.js +115 -0
  61. package/lib/thumbCard/index.js +8 -0
  62. package/lib/thumbCard/style/css.js +2 -0
  63. package/lib/thumbCard/style/index.css +53 -0
  64. package/lib/thumbCard/style/index.js +2 -0
  65. package/lib/thumbCard/style/index.less +70 -0
  66. package/lib/utils/typeMap.js +20 -0
  67. package/package.json +2 -2
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var index$3 = require("../emptyData/index.js");
5
+ var index = require("./components/ListFilter/index.js");
6
+ var index$1 = require("./components/ListContent/index.js");
7
+ var index$2 = require("./components/ListSelected/index.js");
8
+ var useAttachement = require("../hooks/useAttachement.js");
9
+ var config = require("../config.js");
10
+ const _hoisted_1 = {
11
+ key: 0,
12
+ class: "resource-select-container"
13
+ };
14
+ const _hoisted_2 = { class: "resource-select-header" };
15
+ const _hoisted_3 = {
16
+ key: 0,
17
+ class: "resource-select-filter"
18
+ };
19
+ const _hoisted_4 = { class: "resource-select-content" };
20
+ const _hoisted_5 = { class: "resource-select-footer" };
21
+ const _hoisted_6 = { class: "footer-left" };
22
+ const _hoisted_7 = {
23
+ key: 0,
24
+ class: "footer-right"
25
+ };
26
+ const _sfc_main = vue.defineComponent({
27
+ ...{ name: "selectResourceModal" },
28
+ __name: "component",
29
+ props: {
30
+ BASE_API: {},
31
+ visible: { type: Boolean },
32
+ userInfo: {},
33
+ maxcount: {}
34
+ },
35
+ emits: ["update:visible", "submit"],
36
+ setup(__props, { emit: __emit }) {
37
+ const props = __props;
38
+ const emits = __emit;
39
+ const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
40
+ const activeKey = vue.ref("all");
41
+ vue.provide("userInfo", vue.computed(() => props.userInfo));
42
+ vue.provide("baseAPI", BASE_API);
43
+ const {
44
+ list,
45
+ total,
46
+ limit,
47
+ loading,
48
+ changeKey,
49
+ changeFilter,
50
+ changePage,
51
+ changeSize,
52
+ loadData
53
+ } = useAttachement["default"]({ key: "all", BASE_API });
54
+ const selected = vue.ref([]);
55
+ const selectedKeys = vue.computed(() => selected.value.map((item) => item.id));
56
+ const disableSelect = vue.computed(() => props.maxcount && selected.value.length >= props.maxcount);
57
+ function handleSelect(params) {
58
+ const { id } = params;
59
+ const index2 = selected.value.findIndex((item) => item.id === id);
60
+ if (index2 > -1)
61
+ selected.value.splice(index2, 1);
62
+ else
63
+ selected.value.push(params);
64
+ }
65
+ function handleClear() {
66
+ selected.value = [];
67
+ }
68
+ function handleClose() {
69
+ handleClear();
70
+ emits("update:visible", false);
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
+ vue.onMounted(() => {
87
+ loadData();
88
+ });
89
+ return (_ctx, _cache) => {
90
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Drawer), {
91
+ visible: _ctx.visible,
92
+ width: "1024px",
93
+ header: false,
94
+ footer: false
95
+ }, {
96
+ default: vue.withCtx(() => [
97
+ _ctx.userInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
98
+ vue.createCommentVNode(" \u5934\u90E8 "),
99
+ vue.createElementVNode("div", _hoisted_2, [
100
+ vue.createVNode(vue.unref(webVue.Tabs), {
101
+ "active-key": activeKey.value,
102
+ "onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => activeKey.value = $event),
103
+ onChange: vue.unref(changeKey)
104
+ }, {
105
+ extra: vue.withCtx(() => [
106
+ vue.createVNode(vue.unref(webVue.Button), {
107
+ type: "text",
108
+ onClick: handleClose
109
+ }, {
110
+ default: vue.withCtx(() => [
111
+ vue.createTextVNode("\u5173\u95ED")
112
+ ]),
113
+ _: 1
114
+ })
115
+ ]),
116
+ default: vue.withCtx(() => [
117
+ vue.createVNode(vue.unref(webVue.TabPane), {
118
+ key: "all",
119
+ title: "\u5168\u90E8\u7D20\u6750"
120
+ }),
121
+ vue.createVNode(vue.unref(webVue.TabPane), {
122
+ key: "my",
123
+ title: "\u6211\u7684\u7D20\u6750"
124
+ }),
125
+ vue.createVNode(vue.unref(webVue.TabPane), {
126
+ key: "remind",
127
+ title: "\u63D0\u9192\u6211\u7684"
128
+ }),
129
+ vue.createVNode(vue.unref(webVue.TabPane), {
130
+ key: "local",
131
+ title: "\u672C\u5730\u7D20\u6750"
132
+ })
133
+ ]),
134
+ _: 1
135
+ }, 8, ["active-key", "onChange"])
136
+ ]),
137
+ vue.createCommentVNode(" \u7B5B\u9009 "),
138
+ activeKey.value !== "local" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
139
+ vue.createVNode(index, {
140
+ "disable-upload-by": activeKey.value !== "all",
141
+ onChange: vue.unref(changeFilter),
142
+ onUpload: handleToUpload
143
+ }, null, 8, ["disable-upload-by", "onChange"])
144
+ ])) : vue.createCommentVNode("v-if", true),
145
+ vue.createCommentVNode(" \u5217\u8868\u90E8\u5206 "),
146
+ vue.createElementVNode("div", _hoisted_4, [
147
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
148
+ "outer-style": { height: "100%" },
149
+ style: { "height": "100%", "overflow": "auto" }
150
+ }, {
151
+ default: vue.withCtx(() => [
152
+ vue.createVNode(index$1, {
153
+ loading: vue.unref(loading),
154
+ list: vue.unref(list),
155
+ disable: disableSelect.value,
156
+ "select-keys": selectedKeys.value,
157
+ onSelect: handleSelect,
158
+ onSelectOne: handleSelectOne
159
+ }, null, 8, ["loading", "list", "disable", "select-keys"])
160
+ ]),
161
+ _: 1
162
+ })
163
+ ]),
164
+ vue.createCommentVNode(" \u5E95\u90E8 "),
165
+ vue.createElementVNode("div", _hoisted_5, [
166
+ vue.createElementVNode("div", _hoisted_6, [
167
+ activeKey.value !== "local" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Pagination), {
168
+ key: 0,
169
+ total: vue.unref(total),
170
+ "page-size": vue.unref(limit),
171
+ "show-total": "",
172
+ "show-page-size": "",
173
+ onChange: _cache[1] || (_cache[1] = (e) => vue.unref(changePage)((e - 1) * vue.unref(limit))),
174
+ onPageSizeChange: vue.unref(changeSize)
175
+ }, null, 8, ["total", "page-size", "onPageSizeChange"])) : vue.createCommentVNode("v-if", true)
176
+ ]),
177
+ selected.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
178
+ vue.createVNode(index$2, {
179
+ maxcount: _ctx.maxcount,
180
+ selected: selected.value,
181
+ onRemove: handleSelect,
182
+ onClear: handleClear
183
+ }, null, 8, ["maxcount", "selected"]),
184
+ vue.createVNode(vue.unref(webVue.Button), { onClick: handleClose }, {
185
+ default: vue.withCtx(() => [
186
+ vue.createTextVNode("\u53D6\u6D88")
187
+ ]),
188
+ _: 1
189
+ }),
190
+ vue.createVNode(vue.unref(webVue.Button), {
191
+ type: "primary",
192
+ onClick: handleConfirm
193
+ }, {
194
+ default: vue.withCtx(() => [
195
+ vue.createTextVNode("\u786E\u5B9A")
196
+ ]),
197
+ _: 1
198
+ })
199
+ ])) : vue.createCommentVNode("v-if", true)
200
+ ])
201
+ ])) : (vue.openBlock(), vue.createBlock(vue.unref(index$3), {
202
+ key: 1,
203
+ type: "empty",
204
+ customTip: "\u6682\u65E0\u6743\u9650"
205
+ }))
206
+ ]),
207
+ _: 1
208
+ }, 8, ["visible"]);
209
+ };
210
+ }
211
+ });
212
+ module.exports = _sfc_main;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var index$1 = require("../../../emptyData/index.js");
5
+ var index = require("../../../thumbCard/index.js");
6
+ const _hoisted_1 = { class: "card-list-wrapper" };
7
+ const _hoisted_2 = { class: "card-wrapper" };
8
+ const _hoisted_3 = { class: "card-alias" };
9
+ const _hoisted_4 = ["onClick"];
10
+ const _hoisted_5 = {
11
+ key: 0,
12
+ class: "check-box active"
13
+ };
14
+ const _hoisted_6 = {
15
+ key: 1,
16
+ class: "check-box"
17
+ };
18
+ const _sfc_main = vue.defineComponent({
19
+ __name: "index",
20
+ props: {
21
+ loading: { type: Boolean },
22
+ list: {},
23
+ selectKeys: {},
24
+ disable: { type: Boolean }
25
+ },
26
+ emits: ["select", "select-one"],
27
+ setup(__props, { emit: __emit }) {
28
+ const props = __props;
29
+ const emits = __emit;
30
+ const handlersKey = vue.computed(() => {
31
+ var _a;
32
+ if (((_a = props.selectKeys) == null ? void 0 : _a.length) > 0 || props.disable)
33
+ return [];
34
+ return [{ label: "\u9009\u7528", key: "select" }];
35
+ });
36
+ function handleOption(params) {
37
+ const { key, item } = params;
38
+ if (key === "select") {
39
+ emits("select-one", item);
40
+ }
41
+ }
42
+ function handleCheck(params) {
43
+ emits("select", params);
44
+ }
45
+ const selectedOrder = vue.computed(() => {
46
+ var _a;
47
+ const result = {};
48
+ (_a = props.selectKeys) == null ? void 0 : _a.forEach((key, index2) => {
49
+ result[key] = index2 + 1;
50
+ });
51
+ return result;
52
+ });
53
+ return (_ctx, _cache) => {
54
+ var _a, _b;
55
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
56
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
57
+ return vue.openBlock(), vue.createElementBlock("div", {
58
+ key: item.id,
59
+ class: "card-wrapper-image"
60
+ }, [
61
+ vue.createElementVNode("div", _hoisted_2, [
62
+ vue.createVNode(vue.unref(index), {
63
+ url: item.url,
64
+ thumb: item.thumb,
65
+ catalog: item.catalog,
66
+ meta: item,
67
+ "handlers-key": handlersKey.value,
68
+ onHandle: handleOption
69
+ }, null, 8, ["url", "thumb", "catalog", "meta", "handlers-key"])
70
+ ]),
71
+ vue.createElementVNode("div", _hoisted_3, vue.toDisplayString(item.alias), 1),
72
+ vue.createElementVNode("div", {
73
+ class: "check-box-wrapper",
74
+ onClick: () => handleCheck(item)
75
+ }, [
76
+ selectedOrder.value[item.id] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, vue.toDisplayString(selectedOrder.value[item.id]), 1)) : !_ctx.disable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6)) : vue.createCommentVNode("v-if", true)
77
+ ], 8, _hoisted_4)
78
+ ]);
79
+ }), 128)),
80
+ vue.createCommentVNode(" \u7A7A\u72B6\u6001 "),
81
+ ((_a = _ctx.list) == null ? void 0 : _a.length) === 0 && _ctx.loading ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Spin), {
82
+ key: 0,
83
+ loading: true
84
+ })) : !((_b = _ctx.list) == null ? void 0 : _b.length) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1), {
85
+ key: 1,
86
+ type: "empty",
87
+ customTip: "\u6682\u65E0\u6570\u636E"
88
+ })) : vue.createCommentVNode("v-if", true)
89
+ ]);
90
+ };
91
+ }
92
+ });
93
+ module.exports = _sfc_main;
@@ -0,0 +1,260 @@
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 useSelection = require("../../../hooks/useSelection.js");
6
+ var typeMap = require("../../../utils/typeMap.js");
7
+ var api = require("./scripts/api.js");
8
+ const _hoisted_1 = { class: "list-filter-wrapper" };
9
+ const _hoisted_2 = { class: "filter-list" };
10
+ const _hoisted_3 = { style: { "width": "200px" } };
11
+ const _hoisted_4 = { class: "filter-item" };
12
+ const _hoisted_5 = { class: "filter-item" };
13
+ const _hoisted_6 = {
14
+ key: 0,
15
+ class: "filter-item"
16
+ };
17
+ const _hoisted_7 = { class: "filter-extra" };
18
+ const _sfc_main = vue.defineComponent({
19
+ __name: "index",
20
+ props: {
21
+ disableUploadBy: { type: Boolean }
22
+ },
23
+ emits: ["upload", "change"],
24
+ setup(__props, { emit: __emit }) {
25
+ const props = __props;
26
+ const emits = __emit;
27
+ const userInfo = vue.inject("userInfo");
28
+ const baseAPI = vue.inject("baseAPI");
29
+ const domainId = vue.computed(() => userInfo == null ? void 0 : userInfo.value.domain_id);
30
+ const { options, loading, load, loadMore, handleSearch } = useSelection({
31
+ labelStr: "alias",
32
+ valueStr: "id",
33
+ func: async ({ keyword, ...pageInfo }) => {
34
+ if (!baseAPI)
35
+ return Promise.reject(new Error("baseAPI \u4E0D\u5B58\u5728"));
36
+ if (!domainId.value)
37
+ return Promise.reject(new Error("domainId \u4E0D\u5B58\u5728"));
38
+ const { code, message } = await api.getAccountList(baseAPI, domainId.value, {
39
+ ...pageInfo,
40
+ keywords: keyword
41
+ });
42
+ if (code !== 0)
43
+ return Promise.reject(new Error(message));
44
+ return message.users;
45
+ }
46
+ });
47
+ const resourceSource = typeMap.RESOURCE_SOURCE_OPTIONS;
48
+ const resourceCatalog = typeMap.RESOURCE_CATALOG_OPTIONS;
49
+ const originFilter = {
50
+ catalog: "",
51
+ source: "",
52
+ create_begin: "",
53
+ create_end: "",
54
+ keyword: "",
55
+ precise_keyword: "",
56
+ upload_by: null
57
+ };
58
+ const filter = vue.ref(JSON.parse(JSON.stringify(originFilter)));
59
+ const handleReset = () => {
60
+ filter.value = JSON.parse(JSON.stringify(originFilter));
61
+ };
62
+ const rangeTime = vue.computed({
63
+ get() {
64
+ return filter.value.create_begin && filter.value.create_end ? [filter.value.create_begin * 1e3, filter.value.create_end * 1e3] : null;
65
+ },
66
+ set(val) {
67
+ if (val) {
68
+ const [start, end] = val;
69
+ filter.value.create_begin = +new Date(start) / 1e3;
70
+ filter.value.create_end = +new Date(end) / 1e3;
71
+ } else {
72
+ filter.value.create_begin = "";
73
+ filter.value.create_end = "";
74
+ }
75
+ }
76
+ });
77
+ const searchType = vue.ref(0);
78
+ const searchTypeText = vue.computed(() => {
79
+ return searchType.value === 0 ? "\u7CBE\u51C6\u641C" : "\u6A21\u7CCA\u641C";
80
+ });
81
+ const searchInput = vue.computed({
82
+ get() {
83
+ return searchType.value === 0 ? filter.value.precise_keyword : filter.value.keyword;
84
+ },
85
+ set(val) {
86
+ if (searchType.value === 0) {
87
+ filter.value.precise_keyword = val;
88
+ filter.value.keyword = "";
89
+ } else {
90
+ filter.value.keyword = val;
91
+ filter.value.precise_keyword = "";
92
+ }
93
+ }
94
+ });
95
+ const isEmpty = vue.computed(() => {
96
+ return Object.keys(filter.value).every((key) => {
97
+ return !filter.value[key];
98
+ });
99
+ });
100
+ vue.watch(
101
+ () => filter.value,
102
+ () => {
103
+ const result = { ...filter.value };
104
+ Object.keys(result).forEach((key) => {
105
+ if (props.disableUploadBy && key === "upload_by")
106
+ delete result[key];
107
+ if (!result[key])
108
+ delete result[key];
109
+ });
110
+ emits("change", result);
111
+ },
112
+ { deep: true }
113
+ );
114
+ vue.onMounted(() => {
115
+ load();
116
+ });
117
+ return (_ctx, _cache) => {
118
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
119
+ vue.createElementVNode("div", _hoisted_2, [
120
+ vue.createCommentVNode(" \u5173\u952E\u8BCD "),
121
+ vue.createElementVNode("div", _hoisted_3, [
122
+ vue.createVNode(vue.unref(webVue.Input), {
123
+ modelValue: searchInput.value,
124
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchInput.value = $event),
125
+ "allow-clear": "",
126
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"
127
+ }, {
128
+ prepend: vue.withCtx(() => [
129
+ vue.createVNode(vue.unref(webVue.Dropdown), {
130
+ onSelect: _cache[0] || (_cache[0] = (e) => searchType.value = e)
131
+ }, {
132
+ content: vue.withCtx(() => [
133
+ vue.createVNode(vue.unref(webVue.Doption), { value: 0 }, {
134
+ default: vue.withCtx(() => [
135
+ vue.createTextVNode("\u7CBE\u51C6\u641C")
136
+ ]),
137
+ _: 1
138
+ }),
139
+ vue.createVNode(vue.unref(webVue.Doption), { value: 1 }, {
140
+ default: vue.withCtx(() => [
141
+ vue.createTextVNode("\u6A21\u7CCA\u641C")
142
+ ]),
143
+ _: 1
144
+ })
145
+ ]),
146
+ default: vue.withCtx(() => [
147
+ vue.createVNode(vue.unref(webVue.Button), null, {
148
+ default: vue.withCtx(() => [
149
+ vue.createTextVNode(vue.toDisplayString(searchTypeText.value), 1)
150
+ ]),
151
+ _: 1
152
+ })
153
+ ]),
154
+ _: 1
155
+ })
156
+ ]),
157
+ _: 1
158
+ }, 8, ["modelValue"])
159
+ ]),
160
+ vue.createCommentVNode(" \u7D20\u6750\u7C7B\u578B "),
161
+ vue.createElementVNode("div", _hoisted_4, [
162
+ vue.createVNode(vue.unref(webVue.Select), {
163
+ modelValue: filter.value.catalog,
164
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.catalog = $event),
165
+ "allow-clear": "",
166
+ placeholder: "\u7C7B\u578B"
167
+ }, {
168
+ default: vue.withCtx(() => [
169
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(resourceCatalog), (item) => {
170
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
171
+ key: item.value,
172
+ label: item.label,
173
+ value: item.value
174
+ }, null, 8, ["label", "value"]);
175
+ }), 128))
176
+ ]),
177
+ _: 1
178
+ }, 8, ["modelValue"])
179
+ ]),
180
+ vue.createCommentVNode(" \u65F6\u95F4\u8303\u56F4 "),
181
+ vue.createVNode(vue.unref(webVue.RangePicker), {
182
+ modelValue: rangeTime.value,
183
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => rangeTime.value = $event),
184
+ "allow-clear": "",
185
+ style: { "width": "240px" }
186
+ }, null, 8, ["modelValue"]),
187
+ vue.createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u6765\u6E90 "),
188
+ vue.createElementVNode("div", _hoisted_5, [
189
+ vue.createVNode(vue.unref(webVue.Select), {
190
+ modelValue: filter.value.source,
191
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.source = $event),
192
+ "allow-clear": "",
193
+ placeholder: "\u6765\u6E90"
194
+ }, {
195
+ default: vue.withCtx(() => [
196
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(resourceSource), (item) => {
197
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
198
+ key: item.value,
199
+ label: item.label,
200
+ value: item.value
201
+ }, null, 8, ["label", "value"]);
202
+ }), 128))
203
+ ]),
204
+ _: 1
205
+ }, 8, ["modelValue"])
206
+ ]),
207
+ vue.createCommentVNode(" \u7D20\u6750\u4E0A\u4F20\u4EBA "),
208
+ !_ctx.disableUploadBy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
209
+ vue.createVNode(vue.unref(webVue.Select), {
210
+ modelValue: filter.value.upload_by,
211
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.upload_by = $event),
212
+ "allow-clear": "",
213
+ placeholder: "\u4E0A\u4F20\u4EBA",
214
+ loading: vue.unref(loading),
215
+ "allow-search": "",
216
+ onSearch: vue.unref(handleSearch),
217
+ onDropdownReachBottom: vue.unref(loadMore)
218
+ }, {
219
+ default: vue.withCtx(() => [
220
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(options), (item) => {
221
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
222
+ key: item.id,
223
+ label: item.label,
224
+ value: item.value
225
+ }, null, 8, ["label", "value"]);
226
+ }), 128))
227
+ ]),
228
+ _: 1
229
+ }, 8, ["modelValue", "loading", "onSearch", "onDropdownReachBottom"])
230
+ ])) : vue.createCommentVNode("v-if", true),
231
+ !isEmpty.value ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Button), {
232
+ key: 1,
233
+ type: "text",
234
+ onClick: handleReset
235
+ }, {
236
+ default: vue.withCtx(() => [
237
+ vue.createTextVNode("\u91CD\u7F6E")
238
+ ]),
239
+ _: 1
240
+ })) : vue.createCommentVNode("v-if", true)
241
+ ]),
242
+ vue.createElementVNode("div", _hoisted_7, [
243
+ vue.createVNode(vue.unref(webVue.Button), {
244
+ type: "primary",
245
+ onClick: _cache[6] || (_cache[6] = ($event) => emits("upload"))
246
+ }, {
247
+ icon: vue.withCtx(() => [
248
+ vue.createVNode(vue.unref(icon.IconUpload))
249
+ ]),
250
+ default: vue.withCtx(() => [
251
+ vue.createTextVNode(" \u4E0A\u4F20 ")
252
+ ]),
253
+ _: 1
254
+ })
255
+ ])
256
+ ]);
257
+ };
258
+ }
259
+ });
260
+ module.exports = _sfc_main;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var request = require("../../../../utils/request.js");
4
+ function getAccountList(BASE_API, id, query) {
5
+ return request(BASE_API, {
6
+ url: `/poplar/v2/accounts/${id}`,
7
+ method: "get",
8
+ params: query
9
+ });
10
+ }
11
+ exports.getAccountList = getAccountList;
@@ -0,0 +1,92 @@
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
+ const _hoisted_1 = { class: "list-selected-wrapper" };
6
+ const _hoisted_2 = { key: 0 };
7
+ const _hoisted_3 = { class: "list-panel-header" };
8
+ const _hoisted_4 = { class: "header-options" };
9
+ const _hoisted_5 = { class: "list-selected-record" };
10
+ const _hoisted_6 = { class: "item-thumb" };
11
+ const _hoisted_7 = { class: "item-alias" };
12
+ const _sfc_main = vue.defineComponent({
13
+ __name: "index",
14
+ props: {
15
+ selected: {},
16
+ maxcount: {}
17
+ },
18
+ emits: ["remove", "clear"],
19
+ setup(__props, { emit: __emit }) {
20
+ const emits = __emit;
21
+ const visible = vue.ref(false);
22
+ return (_ctx, _cache) => {
23
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
24
+ _ctx.maxcount ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, "\u6700\u591A\u9009\u62E9 " + vue.toDisplayString(_ctx.maxcount) + " \u4E2A\u7D20\u6750\uFF0C ", 1)) : vue.createCommentVNode("v-if", true),
25
+ vue.createVNode(vue.unref(webVue.Popover), {
26
+ "popup-visible": visible.value,
27
+ "onUpdate:popupVisible": _cache[2] || (_cache[2] = ($event) => visible.value = $event),
28
+ trigger: "click",
29
+ "content-class": "list-panel-wrapper"
30
+ }, {
31
+ content: vue.withCtx(() => [
32
+ vue.createCommentVNode(" header "),
33
+ vue.createElementVNode("div", _hoisted_3, [
34
+ vue.createElementVNode("div", null, "\u5DF2\u9009\u62E9 " + vue.toDisplayString(_ctx.selected.length) + " \u4E2A\u7D20\u6750", 1),
35
+ vue.createElementVNode("div", _hoisted_4, [
36
+ vue.createElementVNode("div", {
37
+ onClick: _cache[0] || (_cache[0] = ($event) => emits("clear"))
38
+ }, " \u6E05\u9664 "),
39
+ vue.createElementVNode("div", {
40
+ onClick: _cache[1] || (_cache[1] = ($event) => visible.value = false)
41
+ }, [
42
+ vue.createVNode(vue.unref(icon.IconClose), { size: "14" })
43
+ ])
44
+ ])
45
+ ]),
46
+ vue.createCommentVNode(" content "),
47
+ vue.createElementVNode("div", _hoisted_5, [
48
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
49
+ return vue.openBlock(), vue.createElementBlock("div", {
50
+ key: item.id,
51
+ class: "list-selected-item"
52
+ }, [
53
+ vue.createElementVNode("div", _hoisted_6, [
54
+ ["image", "video"].includes(item.catalog) ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Image), {
55
+ key: 0,
56
+ width: "100%",
57
+ height: "100%",
58
+ src: item.thumb || item.url
59
+ }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
60
+ ["audio"].includes(item.catalog) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
61
+ vue.createTextVNode(" \u97F3\u9891 ")
62
+ ], 64)) : vue.createCommentVNode("v-if", true)
63
+ ]),
64
+ vue.createElementVNode("div", _hoisted_7, vue.toDisplayString(item.alias), 1),
65
+ vue.createVNode(vue.unref(webVue.Button), {
66
+ type: "text",
67
+ onClick: ($event) => emits("remove", item)
68
+ }, {
69
+ icon: vue.withCtx(() => [
70
+ vue.createVNode(vue.unref(icon.IconClose))
71
+ ]),
72
+ _: 2
73
+ }, 1032, ["onClick"])
74
+ ]);
75
+ }), 128))
76
+ ])
77
+ ]),
78
+ default: vue.withCtx(() => [
79
+ vue.createVNode(vue.unref(webVue.Link), null, {
80
+ default: vue.withCtx(() => [
81
+ vue.createTextVNode("\u5DF2\u9009\u62E9 " + vue.toDisplayString(_ctx.selected.length) + " \u4E2A\u7D20\u6750", 1)
82
+ ]),
83
+ _: 1
84
+ })
85
+ ]),
86
+ _: 1
87
+ }, 8, ["popup-visible"])
88
+ ]);
89
+ };
90
+ }
91
+ });
92
+ module.exports = _sfc_main;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var component = require("./component.js");
3
+ const selectResourceModal = Object.assign(component, {
4
+ install: (app) => {
5
+ app.component(component.name, component);
6
+ }
7
+ });
8
+ module.exports = selectResourceModal;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ require("./index.css");
3
+ require("./listContent.css");
4
+ require("./listFilter.css");
5
+ require("./listSelected.css");