@cmstops/pro-compo 3.9.2-alpha.12 → 3.9.2-alpha.13
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/es/index.js +1 -0
- package/es/selectAddTo/component.js +178 -0
- package/es/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +165 -0
- package/es/selectAddTo/components/ViewAllColumn/columnTree/index.js +151 -0
- package/es/selectAddTo/components/ViewAllColumn/index.js +436 -0
- package/es/selectAddTo/components/ViewAllColumn/index.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/selectAddTo/index.js +16 -0
- package/es/selectAddTo/script/api.js +36 -0
- package/es/style.css +16 -0
- package/lib/index.js +2 -0
- package/lib/selectAddTo/component.js +179 -0
- package/lib/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +166 -0
- package/lib/selectAddTo/components/ViewAllColumn/columnTree/index.js +152 -0
- package/lib/selectAddTo/components/ViewAllColumn/index.js +437 -0
- package/lib/selectAddTo/components/ViewAllColumn/index.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/selectAddTo/index.js +18 -0
- package/lib/selectAddTo/script/api.js +42 -0
- package/package.json +1 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var webVue = require("@arco-design/web-vue");
|
|
4
|
+
var index = require("./components/ViewAllColumn/index.js");
|
|
5
|
+
require("../typeIcons/style/index.js");
|
|
6
|
+
var api = require("./script/api.js");
|
|
7
|
+
var config = require("../config.js");
|
|
8
|
+
var user = require("../hooks/user.js");
|
|
9
|
+
const _sfc_main = vue.defineComponent({
|
|
10
|
+
...{ name: "selectAddTo" },
|
|
11
|
+
__name: "component",
|
|
12
|
+
props: {
|
|
13
|
+
BASE_API: {},
|
|
14
|
+
visible: { type: Boolean },
|
|
15
|
+
title: {},
|
|
16
|
+
outsideSelectData: {},
|
|
17
|
+
defaultSelectedData: {},
|
|
18
|
+
maxSelect: {},
|
|
19
|
+
typeData: {},
|
|
20
|
+
userStore: {},
|
|
21
|
+
compoFilter: { type: Boolean, default: false },
|
|
22
|
+
typeKey: {}
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:visible", "comfirm"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
var _a, _b, _c;
|
|
27
|
+
const emit = __emit;
|
|
28
|
+
const props = __props;
|
|
29
|
+
const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
|
|
30
|
+
const visible = vue.computed({
|
|
31
|
+
get() {
|
|
32
|
+
return props.visible;
|
|
33
|
+
},
|
|
34
|
+
set(value) {
|
|
35
|
+
setVisible(value);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const title = vue.computed(() => {
|
|
39
|
+
let title2 = "";
|
|
40
|
+
switch (props.typeKey) {
|
|
41
|
+
case "series:video_album":
|
|
42
|
+
title2 = "\u6DFB\u52A0\u81F3\u89C6\u9891\u5408\u96C6";
|
|
43
|
+
break;
|
|
44
|
+
case "series:special_v3":
|
|
45
|
+
title2 = "\u6DFB\u52A0\u81F3\u4E13\u9898";
|
|
46
|
+
break;
|
|
47
|
+
case "series:audio_album":
|
|
48
|
+
title2 = "\u6DFB\u52A0\u81F3\u97F3\u9891\u5408\u96C6";
|
|
49
|
+
break;
|
|
50
|
+
case "series:article_album":
|
|
51
|
+
title2 = "\u6DFB\u52A0\u81F3\u653F\u60C5\u4EBA\u7269\u76F8\u5173\u62A5\u9053";
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
return title2;
|
|
55
|
+
});
|
|
56
|
+
((_c = (_b = (_a = window.situoyun) == null ? void 0 : _a.config) == null ? void 0 : _b.oem_config) == null ? void 0 : _c.mp_name) || "\u516C\u4F17\u53F7";
|
|
57
|
+
const selectedData = vue.ref([]);
|
|
58
|
+
const hasSelected = vue.computed(() => {
|
|
59
|
+
return selectedData.value.length > 0;
|
|
60
|
+
});
|
|
61
|
+
const typeDataController = vue.computed(() => {
|
|
62
|
+
const ret = JSON.parse(JSON.stringify(props.typeData));
|
|
63
|
+
return ret;
|
|
64
|
+
});
|
|
65
|
+
const setVisible = (bool) => {
|
|
66
|
+
emit("update:visible", bool);
|
|
67
|
+
};
|
|
68
|
+
const selectedDataChangeHandle = (data) => {
|
|
69
|
+
selectedData.value = data;
|
|
70
|
+
};
|
|
71
|
+
const handleOk = () => {
|
|
72
|
+
setVisible(false);
|
|
73
|
+
};
|
|
74
|
+
const handleCancel = () => {
|
|
75
|
+
setVisible(false);
|
|
76
|
+
};
|
|
77
|
+
const comfirm = () => {
|
|
78
|
+
emit("comfirm", JSON.parse(JSON.stringify(selectedData.value)));
|
|
79
|
+
};
|
|
80
|
+
const { userInfo, getUserInfoHandle } = user["default"](BASE_API);
|
|
81
|
+
const HandleOpen = () => {
|
|
82
|
+
selectedData.value = props.defaultSelectedData || [];
|
|
83
|
+
};
|
|
84
|
+
const HandleClose = () => {
|
|
85
|
+
selectedData.value = [];
|
|
86
|
+
};
|
|
87
|
+
const tabsChange = () => {
|
|
88
|
+
selectedData.value = [];
|
|
89
|
+
};
|
|
90
|
+
const configData = vue.ref({});
|
|
91
|
+
const loadConfig = async () => {
|
|
92
|
+
var _a2;
|
|
93
|
+
const res = await api.getConfigurationNew(BASE_API, {
|
|
94
|
+
module: "third_party_services"
|
|
95
|
+
});
|
|
96
|
+
if (res.code === 0 && ((_a2 = res.message) == null ? void 0 : _a2.length)) {
|
|
97
|
+
res.message.forEach((item) => {
|
|
98
|
+
configData.value[item.key] = JSON.parse(item.value);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
vue.onMounted(() => {
|
|
103
|
+
if (props.userStore) {
|
|
104
|
+
userInfo.value = { BASE_API, ...props.userStore };
|
|
105
|
+
} else {
|
|
106
|
+
getUserInfoHandle();
|
|
107
|
+
}
|
|
108
|
+
loadConfig();
|
|
109
|
+
});
|
|
110
|
+
return (_ctx, _cache) => {
|
|
111
|
+
const _component_storeBox = vue.resolveComponent("storeBox");
|
|
112
|
+
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Modal), {
|
|
113
|
+
footer: false,
|
|
114
|
+
"mask-closable": false,
|
|
115
|
+
visible: visible.value,
|
|
116
|
+
"body-class": "add-content-modal-body",
|
|
117
|
+
"modal-class": "add-content-modal-wrapper",
|
|
118
|
+
"title-align": "start",
|
|
119
|
+
"unmount-on-close": "",
|
|
120
|
+
width: "1020px",
|
|
121
|
+
onCancel: handleCancel,
|
|
122
|
+
onClose: HandleClose,
|
|
123
|
+
onOk: handleOk,
|
|
124
|
+
onOpen: HandleOpen
|
|
125
|
+
}, {
|
|
126
|
+
title: vue.withCtx(() => [
|
|
127
|
+
vue.createTextVNode(vue.toDisplayString(title.value), 1)
|
|
128
|
+
]),
|
|
129
|
+
default: vue.withCtx(() => [
|
|
130
|
+
vue.createVNode(vue.unref(webVue.Tabs), {
|
|
131
|
+
class: "content-tabs",
|
|
132
|
+
justify: "",
|
|
133
|
+
"lazy-load": "",
|
|
134
|
+
onTabClick: tabsChange
|
|
135
|
+
}, {
|
|
136
|
+
default: vue.withCtx(() => [
|
|
137
|
+
vue.createCommentVNode(" \u680F\u76EE\u7A3F\u4EF6 "),
|
|
138
|
+
vue.unref(userInfo) && vue.unref(userInfo).repository_id ? (vue.openBlock(), vue.createBlock(index, {
|
|
139
|
+
key: 0,
|
|
140
|
+
banner: typeDataController.value.docBanner,
|
|
141
|
+
"default-selected-data": selectedData.value,
|
|
142
|
+
"max-select": _ctx.maxSelect,
|
|
143
|
+
series: typeDataController.value.docSeries,
|
|
144
|
+
"type-data": typeDataController.value,
|
|
145
|
+
"user-info": vue.unref(userInfo),
|
|
146
|
+
typeKey: _ctx.typeKey,
|
|
147
|
+
onChange: selectedDataChangeHandle
|
|
148
|
+
}, {
|
|
149
|
+
store: vue.withCtx(() => [
|
|
150
|
+
vue.createVNode(_component_storeBox, {
|
|
151
|
+
selectData: selectedData.value,
|
|
152
|
+
"onUpdate:selectData": _cache[0] || (_cache[0] = ($event) => selectedData.value = $event)
|
|
153
|
+
}, null, 8, ["selectData"])
|
|
154
|
+
]),
|
|
155
|
+
options: vue.withCtx(() => [
|
|
156
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
157
|
+
disabled: !hasSelected.value,
|
|
158
|
+
type: "primary",
|
|
159
|
+
onClick: comfirm
|
|
160
|
+
}, {
|
|
161
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
162
|
+
vue.createTextVNode("\u6DFB\u52A0 ")
|
|
163
|
+
])),
|
|
164
|
+
_: 1,
|
|
165
|
+
__: [1]
|
|
166
|
+
}, 8, ["disabled"])
|
|
167
|
+
]),
|
|
168
|
+
_: 1
|
|
169
|
+
}, 8, ["banner", "default-selected-data", "max-select", "series", "type-data", "user-info", "typeKey"])) : vue.createCommentVNode("v-if", true)
|
|
170
|
+
]),
|
|
171
|
+
_: 1
|
|
172
|
+
})
|
|
173
|
+
]),
|
|
174
|
+
_: 1
|
|
175
|
+
}, 8, ["visible"]);
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,166 @@
|
|
|
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: "media-filter-container" };
|
|
6
|
+
const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "5px" } };
|
|
7
|
+
const _hoisted_3 = { class: "sort-button" };
|
|
8
|
+
const _sfc_main = vue.defineComponent({
|
|
9
|
+
...{ name: "MediaFilter" },
|
|
10
|
+
__name: "index",
|
|
11
|
+
props: {
|
|
12
|
+
groupId: {},
|
|
13
|
+
tree: { default: () => [] },
|
|
14
|
+
series: { default: "all" },
|
|
15
|
+
banner: { default: "all" },
|
|
16
|
+
height: {},
|
|
17
|
+
userInfo: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:group_id", "search"],
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const column_id = vue.ref("all");
|
|
23
|
+
const emit = __emit;
|
|
24
|
+
const filter = vue.ref({
|
|
25
|
+
keywords: "",
|
|
26
|
+
type: "",
|
|
27
|
+
cover_type: "",
|
|
28
|
+
banner: "",
|
|
29
|
+
sort: -1,
|
|
30
|
+
order: "create_time",
|
|
31
|
+
wordState: "precision"
|
|
32
|
+
});
|
|
33
|
+
const wordStateOptions = [
|
|
34
|
+
{
|
|
35
|
+
value: "precision",
|
|
36
|
+
label: "\u7CBE\u51C6\u641C",
|
|
37
|
+
desc: "\u4F1A\u4EE5\u8F93\u5165\u7684\u5B8C\u6574\u5173\u952E\u8BCD\u201C\u6210\u957F\u201D\u8FDB\u884C\u641C\u7D22\uFF0C\u641C\u7D22\u7ED3\u679C\u5173\u8054\u6027\u66F4\u9AD8\uFF0C\u4F46\u641C\u7D22\u7ED3\u679C\u66F4\u5C11"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
value: "blur",
|
|
41
|
+
label: "\u6A21\u7CCA\u641C",
|
|
42
|
+
desc: "\u4F1A\u5C06\u8F93\u5165\u5185\u5BB9\u5206\u8BCD\uFF0C\u4F8B\u5982\u201C\u6210\u957F\u201D\u4F1A\u5206\u4E3A\u201C\u6210\u201D\u3001\u201C\u957F\u201D\u3001\u201C\u6210\u957F\u201D\uFF0C\u5185\u5BB9\u5305\u542B\u4E09\u4E2A\u8BCD\u4E2D\u4EFB\u610F\u4E00\u4E2A\u5747\u4F1A\u663E\u793A\u51FA\u6765\uFF0C\u641C\u7D22\u5185\u5BB9\u66F4\u52A0\u4E30\u5BCC"
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
const sortMethodOptions = vue.computed(() => {
|
|
46
|
+
return [
|
|
47
|
+
{ value: "pub_time", label: "\u53D1\u5E03\u65F6\u95F4" },
|
|
48
|
+
{ value: "create_time", label: "\u521B\u5EFA\u65F6\u95F4" }
|
|
49
|
+
];
|
|
50
|
+
});
|
|
51
|
+
const checkout = (type) => {
|
|
52
|
+
filter.value.wordState = type;
|
|
53
|
+
};
|
|
54
|
+
const handleSearch = () => {
|
|
55
|
+
const params = JSON.parse(JSON.stringify(filter.value));
|
|
56
|
+
if (filter.value.wordState === "precision") {
|
|
57
|
+
params.precise_kw = params.keywords;
|
|
58
|
+
delete params.keywords;
|
|
59
|
+
}
|
|
60
|
+
delete params.wordState;
|
|
61
|
+
emit("search", params);
|
|
62
|
+
};
|
|
63
|
+
vue.watch(
|
|
64
|
+
() => filter.value,
|
|
65
|
+
() => {
|
|
66
|
+
handleSearch();
|
|
67
|
+
},
|
|
68
|
+
{ deep: true }
|
|
69
|
+
);
|
|
70
|
+
vue.watch(
|
|
71
|
+
() => props.groupId,
|
|
72
|
+
(val) => {
|
|
73
|
+
column_id.value = val;
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
vue.watch(
|
|
77
|
+
() => props.banner,
|
|
78
|
+
(val) => {
|
|
79
|
+
filter.value.banner = val === "all" ? "" : val;
|
|
80
|
+
},
|
|
81
|
+
{ immediate: true }
|
|
82
|
+
);
|
|
83
|
+
vue.watch(
|
|
84
|
+
() => column_id.value,
|
|
85
|
+
(val) => {
|
|
86
|
+
emit("update:group_id", val);
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
return (_ctx, _cache) => {
|
|
90
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
91
|
+
vue.createVNode(vue.unref(webVue.Space), { size: "small" }, {
|
|
92
|
+
default: vue.withCtx(() => [
|
|
93
|
+
vue.createVNode(vue.unref(webVue.Input), {
|
|
94
|
+
modelValue: filter.value.keywords,
|
|
95
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.keywords = $event),
|
|
96
|
+
"allow-clear": "",
|
|
97
|
+
class: "filter-item keyword",
|
|
98
|
+
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9\u6807\u9898",
|
|
99
|
+
style: { width: "240px" },
|
|
100
|
+
onPressEnter: handleSearch
|
|
101
|
+
}, {
|
|
102
|
+
prepend: vue.withCtx(() => [
|
|
103
|
+
vue.createVNode(vue.unref(webVue.Select), {
|
|
104
|
+
modelValue: filter.value.wordState,
|
|
105
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.wordState = $event),
|
|
106
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
107
|
+
onSelect: checkout
|
|
108
|
+
}, {
|
|
109
|
+
default: vue.withCtx(() => [
|
|
110
|
+
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(wordStateOptions, (item, index) => {
|
|
111
|
+
return vue.createVNode(vue.unref(webVue.Option), {
|
|
112
|
+
key: index,
|
|
113
|
+
value: item.value,
|
|
114
|
+
label: item.label
|
|
115
|
+
}, {
|
|
116
|
+
default: vue.withCtx(() => [
|
|
117
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
118
|
+
vue.createElementVNode("span", null, vue.toDisplayString(item.label), 1),
|
|
119
|
+
vue.createVNode(vue.unref(webVue.Tooltip), {
|
|
120
|
+
effect: "dark",
|
|
121
|
+
content: item.desc,
|
|
122
|
+
position: "right"
|
|
123
|
+
}, {
|
|
124
|
+
default: vue.withCtx(() => [
|
|
125
|
+
vue.createVNode(vue.unref(icon.IconInfoCircle))
|
|
126
|
+
]),
|
|
127
|
+
_: 2
|
|
128
|
+
}, 1032, ["content"])
|
|
129
|
+
])
|
|
130
|
+
]),
|
|
131
|
+
_: 2
|
|
132
|
+
}, 1032, ["value", "label"]);
|
|
133
|
+
}), 64))
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
}, 8, ["modelValue"])
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
}, 8, ["modelValue"])
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
}),
|
|
143
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
144
|
+
vue.createVNode(vue.unref(webVue.Select), {
|
|
145
|
+
modelValue: filter.value.order,
|
|
146
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.order = $event),
|
|
147
|
+
class: "filter-item",
|
|
148
|
+
placeholder: "\u53D1\u5E03\u65F6\u95F4"
|
|
149
|
+
}, {
|
|
150
|
+
default: vue.withCtx(() => [
|
|
151
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sortMethodOptions.value, (item) => {
|
|
152
|
+
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
|
|
153
|
+
key: item.value,
|
|
154
|
+
label: item.label,
|
|
155
|
+
value: item.value
|
|
156
|
+
}, null, 8, ["label", "value"]);
|
|
157
|
+
}), 128))
|
|
158
|
+
]),
|
|
159
|
+
_: 1
|
|
160
|
+
}, 8, ["modelValue"])
|
|
161
|
+
])
|
|
162
|
+
]);
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,152 @@
|
|
|
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 api = require("../../../script/api.js");
|
|
6
|
+
const _hoisted_1 = { class: "column-selection-container" };
|
|
7
|
+
const _hoisted_2 = { class: "search-column" };
|
|
8
|
+
const _sfc_main = vue.defineComponent({
|
|
9
|
+
...{ name: "columnTree" },
|
|
10
|
+
__name: "index",
|
|
11
|
+
props: {
|
|
12
|
+
column_id: {},
|
|
13
|
+
tree: {},
|
|
14
|
+
height: {},
|
|
15
|
+
userInfo: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:column_id"],
|
|
18
|
+
setup(__props, { emit: __emit }) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const emit = __emit;
|
|
21
|
+
const treeOptions = {
|
|
22
|
+
title: "alias",
|
|
23
|
+
isLeaf: "leaf"
|
|
24
|
+
};
|
|
25
|
+
const selectAlias = vue.ref("\u5168\u90E8\u5185\u5BB9");
|
|
26
|
+
const lastSearchKey = vue.ref(window.localStorage.getItem("lastSearchKey") || "");
|
|
27
|
+
const searchKey = vue.ref("");
|
|
28
|
+
const aTreeRef = vue.ref();
|
|
29
|
+
const treeData = vue.computed(() => {
|
|
30
|
+
if (!searchKey.value)
|
|
31
|
+
return props.tree;
|
|
32
|
+
return searchData(searchKey.value);
|
|
33
|
+
});
|
|
34
|
+
const searchData = (keyword) => {
|
|
35
|
+
const loop = (data) => {
|
|
36
|
+
const result = [];
|
|
37
|
+
data.forEach((item) => {
|
|
38
|
+
var _a;
|
|
39
|
+
if ((_a = item.alias) == null ? void 0 : _a.includes(keyword)) {
|
|
40
|
+
result.push({ ...item });
|
|
41
|
+
} else if (item.children) {
|
|
42
|
+
const filterData = loop(item.children);
|
|
43
|
+
if (filterData.length) {
|
|
44
|
+
result.push({
|
|
45
|
+
...item,
|
|
46
|
+
children: filterData
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return result;
|
|
52
|
+
};
|
|
53
|
+
return loop(props.tree);
|
|
54
|
+
};
|
|
55
|
+
const clickLastItem = () => {
|
|
56
|
+
aTreeRef.value.selectNode(lastSearchKey.value, true);
|
|
57
|
+
};
|
|
58
|
+
vue.watch(
|
|
59
|
+
() => props.column_id,
|
|
60
|
+
(val) => {
|
|
61
|
+
setSelectAlias(val);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
const setSelectAlias = async (id) => {
|
|
65
|
+
if (id === "all") {
|
|
66
|
+
selectAlias.value = "\u5168\u90E8\u5185\u5BB9";
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const { code, message } = await api.getCategoryPath(props.userInfo.BASE_API, {
|
|
70
|
+
repo: props.userInfo.repository_id,
|
|
71
|
+
category: id
|
|
72
|
+
});
|
|
73
|
+
if (code === 0) {
|
|
74
|
+
const pathArr = [];
|
|
75
|
+
for (const i of message) {
|
|
76
|
+
pathArr.push(i.category_alias);
|
|
77
|
+
}
|
|
78
|
+
selectAlias.value = pathArr.join("/");
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const AddColumnSelected = (selectedKeys, data) => {
|
|
82
|
+
lastSearchKey.value = selectedKeys[0];
|
|
83
|
+
window.localStorage.setItem("lastSearchKey", lastSearchKey.value);
|
|
84
|
+
emit("update:column_id", data.node.id);
|
|
85
|
+
};
|
|
86
|
+
return (_ctx, _cache) => {
|
|
87
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
88
|
+
vue.createVNode(vue.unref(webVue.Popover), {
|
|
89
|
+
"content-style": { minWidth: "120px" },
|
|
90
|
+
"content-class": "column-selection-popover-content",
|
|
91
|
+
position: "bottom",
|
|
92
|
+
trigger: "click"
|
|
93
|
+
}, {
|
|
94
|
+
content: vue.withCtx(() => [
|
|
95
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
96
|
+
vue.createVNode(vue.unref(webVue.InputSearch), {
|
|
97
|
+
modelValue: searchKey.value,
|
|
98
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchKey.value = $event),
|
|
99
|
+
placeholder: "\u8BF7\u8F93\u5165\u680F\u76EE\u540D\u79F0"
|
|
100
|
+
}, null, 8, ["modelValue"])
|
|
101
|
+
]),
|
|
102
|
+
lastSearchKey.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
103
|
+
key: 0,
|
|
104
|
+
class: "last-search-key",
|
|
105
|
+
onClick: clickLastItem
|
|
106
|
+
}, "\u4E0A\u4E00\u6B21\u9009\u62E9 ")) : vue.createCommentVNode("v-if", true),
|
|
107
|
+
vue.createElementVNode("div", {
|
|
108
|
+
style: vue.normalizeStyle({ minHeight: props.height + "px" }),
|
|
109
|
+
class: "column-selection-main"
|
|
110
|
+
}, [
|
|
111
|
+
vue.createElementVNode("div", {
|
|
112
|
+
style: vue.normalizeStyle({ height: props.height + "px" }),
|
|
113
|
+
class: "column-v"
|
|
114
|
+
}, [
|
|
115
|
+
vue.createVNode(vue.unref(webVue.Scrollbar), {
|
|
116
|
+
"outer-class": "column-outer-scrollbar",
|
|
117
|
+
style: { "height": "100%", "overflow": "auto" }
|
|
118
|
+
}, {
|
|
119
|
+
default: vue.withCtx(() => [
|
|
120
|
+
vue.createVNode(vue.unref(webVue.Tree), {
|
|
121
|
+
ref_key: "aTreeRef",
|
|
122
|
+
ref: aTreeRef,
|
|
123
|
+
data: treeData.value,
|
|
124
|
+
"default-expand-all": false,
|
|
125
|
+
"field-names": treeOptions,
|
|
126
|
+
"block-node": "",
|
|
127
|
+
"check-strictly": "",
|
|
128
|
+
onSelect: AddColumnSelected
|
|
129
|
+
}, null, 8, ["data"])
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
})
|
|
133
|
+
], 4)
|
|
134
|
+
], 4)
|
|
135
|
+
]),
|
|
136
|
+
default: vue.withCtx(() => [
|
|
137
|
+
vue.createVNode(vue.unref(webVue.Button), { class: "button" }, {
|
|
138
|
+
default: vue.withCtx(() => [
|
|
139
|
+
vue.createVNode(vue.unref(icon.IconDragDotVertical)),
|
|
140
|
+
vue.createTextVNode(" " + vue.toDisplayString(selectAlias.value) + " ", 1),
|
|
141
|
+
vue.createVNode(vue.unref(icon.IconCaretRight))
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
})
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
})
|
|
148
|
+
]);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
module.exports = _sfc_main;
|