@kg-ui/kg-ui-plus 0.0.1 → 0.0.3
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/README.md +3 -3
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +16 -0
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +4 -0
- package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +26 -0
- package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue2.mjs +49 -0
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue2.mjs +94 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue2.mjs +33 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue2.mjs +140 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +131 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/index.vue2.mjs +21 -0
- package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/dialogue/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue/index.vue2.mjs +131 -0
- package/dist/es/KgCopilot/dialogue/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/dialogue/mdInCode.mjs +56 -0
- package/dist/es/KgCopilot/dialogue/readMd.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue/readMd.vue2.mjs +87 -0
- package/dist/es/KgCopilot/dialogue/readMd.vue3.mjs +4 -0
- package/dist/es/KgCopilot/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/index.vue2.mjs +49 -0
- package/dist/es/KgCopilot/index.vue3.mjs +4 -0
- package/dist/es/_virtual/___vite-browser-external.mjs +6 -0
- package/dist/es/_virtual/__vite-browser-external.mjs +4 -0
- package/dist/es/_virtual/_commonjsHelpers.mjs +34 -0
- package/dist/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/dist/es/_virtual/index.mjs +13 -0
- package/dist/es/api/project.mjs +51 -0
- package/dist/es/directives/heighlight/index.mjs +69 -0
- package/dist/es/directives/index.mjs +4 -0
- package/dist/es/home/LFilter/FilterArea.vue.mjs +7 -0
- package/dist/es/home/LFilter/FilterArea.vue2.mjs +507 -0
- package/dist/es/home/LFilter/FilterArea.vue3.mjs +4 -0
- package/dist/es/home/LFilter/FilterHead.vue.mjs +129 -0
- package/dist/es/home/LFilter/FilterHead.vue2.mjs +4 -0
- package/dist/es/home/LFilter/FilterItem.vue.mjs +7 -0
- package/dist/es/home/LFilter/FilterItem.vue2.mjs +114 -0
- package/dist/es/home/LFilter/FilterItem.vue3.mjs +4 -0
- package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +7 -0
- package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +171 -0
- package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +4 -0
- package/dist/es/home/LFilter/index.vue.mjs +17 -0
- package/dist/es/home/LFilter/index.vue2.mjs +4 -0
- package/dist/es/home/LProject/index.vue.mjs +7 -0
- package/dist/es/home/LProject/index.vue2.mjs +70 -0
- package/dist/es/home/LProject/index.vue3.mjs +4 -0
- package/dist/es/home/index.vue.mjs +7 -0
- package/dist/es/home/index.vue2.mjs +80 -0
- package/dist/es/home/index.vue3.mjs +4 -0
- package/dist/es/index.mjs +26 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/circle-plus.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/close.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/promotion.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/warning-bold.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/add-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/check-fill.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/more-2-fill.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs +70 -0
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +16 -0
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +36 -0
- package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +48 -0
- package/dist/es/node_modules/.pnpm/dompurify@3.0.10/node_modules/dompurify/dist/purify.es.mjs +949 -0
- package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +22 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +4 -0
- package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +72 -0
- package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +6 -0
- package/dist/es/node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs +320 -0
- package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +14 -0
- package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +19 -0
- package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +11 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +21 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +48 -0
- package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +8 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/core.mjs +5 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/apache.mjs +91 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/bash.mjs +377 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/basic.mjs +221 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/c.mjs +280 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/css.mjs +732 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dart.mjs +247 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/django.mjs +47 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dns.mjs +71 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dos.mjs +160 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dust.mjs +38 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/erlang.mjs +176 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/go.mjs +135 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/http.mjs +89 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/java.mjs +254 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/javascript.mjs +698 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/json.mjs +40 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/markdown.mjs +227 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/nginx.mjs +144 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/php.mjs +589 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/python.mjs +414 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/ruby.mjs +414 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/stylus.mjs +766 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/swift.mjs +832 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/typescript.mjs +788 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/xml.mjs +227 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/lib/core.mjs +1580 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/paraiso-light.css.mjs +4 -0
- package/dist/es/node_modules/.pnpm/marked@12.0.1/node_modules/marked/lib/marked.esm.mjs +2045 -0
- package/dist/es/node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.mjs +514 -0
- package/dist/es/node_modules/.pnpm/pinyin-match@1.2.4/node_modules/pinyin-match/es/main.mjs +124 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.mjs +22 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.mjs +14 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.mjs +199 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +262 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.mjs +196 -0
- package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +54 -0
- package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +115 -0
- package/dist/es/store/index.mjs +8 -0
- package/dist/es/store/modules/copilot.mjs +111 -0
- package/dist/es/store/modules/filters.mjs +346 -0
- package/dist/es/store/modules/types.mjs +19 -0
- package/dist/es/style/index.scss.mjs +4 -0
- package/dist/es/style/tailwind.css.mjs +4 -0
- package/dist/es/style.css +1 -0
- package/dist/es/utils/home.mjs +129 -0
- package/dist/es/utils/http/index.mjs +90 -0
- package/dist/es/utils/message.mjs +42 -0
- package/package.json +23 -32
@@ -0,0 +1,507 @@
|
|
1
|
+
import { defineComponent, getCurrentInstance, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, unref, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createVNode, toDisplayString, createCommentVNode, createTextVNode, withDirectives, vShow, pushScopeId, popScopeId } from "vue";
|
2
|
+
import { storeToRefs } from "pinia";
|
3
|
+
import { isAllEmpty as B, delay as I } from "../../node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs";
|
4
|
+
import { EnumFilterKind, EnumEffectPanel } from "../../store/modules/types.mjs";
|
5
|
+
import { useFilterStoreHook } from "../../store/modules/filters.mjs";
|
6
|
+
import data from "../../node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs";
|
7
|
+
import data$1 from "../../node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs";
|
8
|
+
import data$2 from "../../node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/add-line.mjs";
|
9
|
+
import { checkFilterShow_xinyuan, checkFilterShow, checkFilterShow_letter } from "../../utils/home.mjs";
|
10
|
+
import FilterItem from "./FilterItem.vue.mjs";
|
11
|
+
import FilterItemIcon from "./FilterItemIcon.vue.mjs";
|
12
|
+
const _withScopeId = (n) => (pushScopeId("data-v-58c97571"), n = n(), popScopeId(), n);
|
13
|
+
const _hoisted_1 = { id: "filterWrap" };
|
14
|
+
const _hoisted_2 = { key: 0 };
|
15
|
+
const _hoisted_3 = { class: "flex flex-1 align-middle justify-items-start flex-wrap" };
|
16
|
+
const _hoisted_4 = ["onMouseenter", "onMouseleave"];
|
17
|
+
const _hoisted_5 = {
|
18
|
+
class: "truncate cursor-pointer",
|
19
|
+
style: { "width": "90%" }
|
20
|
+
};
|
21
|
+
const _hoisted_6 = { class: "flex flex-1 flex-col" };
|
22
|
+
const _hoisted_7 = {
|
23
|
+
key: 0,
|
24
|
+
class: "letterWrap flex justify-start items-center px-2 p-2"
|
25
|
+
};
|
26
|
+
const _hoisted_8 = ["onMouseenter"];
|
27
|
+
const _hoisted_9 = { class: "flex flex-wrap" };
|
28
|
+
const _hoisted_10 = ["id"];
|
29
|
+
const _hoisted_11 = {
|
30
|
+
key: 1,
|
31
|
+
class: "flex flex-1 justify-center mb-3"
|
32
|
+
};
|
33
|
+
const _hoisted_12 = {
|
34
|
+
key: 0,
|
35
|
+
class: "flex mr-3 my-1"
|
36
|
+
};
|
37
|
+
const _hoisted_13 = {
|
38
|
+
key: 0,
|
39
|
+
class: "flex-1"
|
40
|
+
};
|
41
|
+
const _hoisted_14 = ["onClick"];
|
42
|
+
const _hoisted_15 = { class: "arrow-down inline-block" };
|
43
|
+
const _hoisted_16 = {
|
44
|
+
key: 1,
|
45
|
+
class: "flex-1 ml-2"
|
46
|
+
};
|
47
|
+
const _hoisted_17 = ["onClick"];
|
48
|
+
const _hoisted_18 = { class: "arrow-down inline-block" };
|
49
|
+
const _hoisted_19 = { key: 0 };
|
50
|
+
const _hoisted_20 = {
|
51
|
+
class: "highOptionWrap flex align-middle justify-items-start flex-wrap relative",
|
52
|
+
style: { "max-height": "45px" }
|
53
|
+
};
|
54
|
+
const _hoisted_21 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", {
|
55
|
+
class: "flex rowTitle cursor-pointer px-3 text-sm truncate",
|
56
|
+
style: { "background-color": "#ececea", "height": "45px", "line-height": "45px" }
|
57
|
+
}, " 高级选项: ", -1));
|
58
|
+
const _hoisted_22 = {
|
59
|
+
class: "flex flex-1 flex-wrap items-center gap-y-4 p-2",
|
60
|
+
style: { "height": "45px", "overflow": "hidden" }
|
61
|
+
};
|
62
|
+
const _hoisted_23 = ["onMouseenter", "onMouseleave"];
|
63
|
+
const _hoisted_24 = { class: "downRowTitle" };
|
64
|
+
const _hoisted_25 = { class: "flex items-center mr-2 mr-auto" };
|
65
|
+
const _hoisted_26 = { class: "arrow-down" };
|
66
|
+
const _hoisted_27 = {
|
67
|
+
class: "flex justify-between",
|
68
|
+
style: { "max-height": "40vh" }
|
69
|
+
};
|
70
|
+
const _hoisted_28 = { class: "flex flex-1 flex-col" };
|
71
|
+
const _hoisted_29 = { class: "flex flex-wrap gap-x-8 gap-y-6 py-5 px-1" };
|
72
|
+
const _hoisted_30 = { key: 0 };
|
73
|
+
const _hoisted_31 = {
|
74
|
+
key: 0,
|
75
|
+
class: "flex flex-1 justify-center mb-3"
|
76
|
+
};
|
77
|
+
const _hoisted_32 = ["onClick"];
|
78
|
+
const _hoisted_33 = { class: "arrow-down inline-block" };
|
79
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
80
|
+
__name: "FilterArea",
|
81
|
+
setup(__props) {
|
82
|
+
const { proxy } = getCurrentInstance();
|
83
|
+
const filterStore = useFilterStoreHook();
|
84
|
+
const {
|
85
|
+
selProject,
|
86
|
+
selFilterIds,
|
87
|
+
filterList,
|
88
|
+
mappingData_selAll,
|
89
|
+
mappingData_selAll_xinyuan,
|
90
|
+
selFilter_maxRowIndex,
|
91
|
+
selFilter_rootIdArr,
|
92
|
+
effectPanel
|
93
|
+
} = storeToRefs(filterStore);
|
94
|
+
const { selFilters } = filterStore;
|
95
|
+
const showList = computed(() => {
|
96
|
+
const filterArr = filterList.value.filter((f) => {
|
97
|
+
const fitlerArr = f.childAppCategoryList || [];
|
98
|
+
let curRowIncludeSel = false;
|
99
|
+
fitlerArr.forEach((f2) => {
|
100
|
+
f2.isMapShow = f2.kind === EnumFilterKind.XinYuan ? checkFilterShow_xinyuan(
|
101
|
+
f2,
|
102
|
+
selFilterIds.value,
|
103
|
+
selFilter_rootIdArr.value,
|
104
|
+
mappingData_selAll_xinyuan.value
|
105
|
+
) : checkFilterShow(
|
106
|
+
f2,
|
107
|
+
filterList.value,
|
108
|
+
selFilterIds.value,
|
109
|
+
selFilter_maxRowIndex.value,
|
110
|
+
selFilter_rootIdArr.value,
|
111
|
+
mappingData_selAll.value
|
112
|
+
);
|
113
|
+
if (selFilterIds.value.includes(f2.id))
|
114
|
+
curRowIncludeSel = true;
|
115
|
+
});
|
116
|
+
return !curRowIncludeSel;
|
117
|
+
});
|
118
|
+
filterArr.forEach((f) => {
|
119
|
+
var _a;
|
120
|
+
if (!f.collapse) {
|
121
|
+
(_a = f.childAppCategoryList) == null ? void 0 : _a.forEach((suf) => {
|
122
|
+
suf.isMapShow = suf.isMapShow && checkFilterShow_letter(suf, f.selLetter);
|
123
|
+
});
|
124
|
+
}
|
125
|
+
});
|
126
|
+
return filterArr;
|
127
|
+
});
|
128
|
+
const getFilterRowIndex = (rowFilter) => {
|
129
|
+
return filterList.value.findIndex((obj) => obj.id === rowFilter.id);
|
130
|
+
};
|
131
|
+
const clickFilter = (filter) => {
|
132
|
+
filter.collapse = true;
|
133
|
+
filter.selLetter = "所有";
|
134
|
+
};
|
135
|
+
const getRowSelFitler = (rootFilter = {}) => {
|
136
|
+
var _a, _b, _c;
|
137
|
+
const str = (_c = (_b = (_a = rootFilter == null ? void 0 : rootFilter.childAppCategoryList) == null ? void 0 : _a.filter((f) => {
|
138
|
+
return selFilterIds.value.includes(f.id);
|
139
|
+
})) == null ? void 0 : _b.map((f) => {
|
140
|
+
return f.name;
|
141
|
+
})) == null ? void 0 : _c.join("、");
|
142
|
+
return str ? ": " + str : "";
|
143
|
+
};
|
144
|
+
const handleHoverRowFilter = (filter, isHover, index) => {
|
145
|
+
filter.isEdit = isHover;
|
146
|
+
I(310).then(() => {
|
147
|
+
const el = document.querySelector(".subFilterWrap" + index);
|
148
|
+
el == null ? void 0 : el.focus();
|
149
|
+
});
|
150
|
+
};
|
151
|
+
const handleTriggerCollapse = (filter) => {
|
152
|
+
filter.collapse = !filter.collapse;
|
153
|
+
filter.selLetter = "所有";
|
154
|
+
};
|
155
|
+
const handleMultipleSel = (filter, open) => {
|
156
|
+
filter.selLetter = "所有";
|
157
|
+
if (open) {
|
158
|
+
if (filter.collapse)
|
159
|
+
handleTriggerCollapse(filter);
|
160
|
+
}
|
161
|
+
filter.multipleSel = open;
|
162
|
+
};
|
163
|
+
const handleMultipleSel_ok = (filter) => {
|
164
|
+
const selRowIds = [];
|
165
|
+
filter.childAppCategoryList.forEach((f) => {
|
166
|
+
var _a;
|
167
|
+
const el = "subFilter" + f.id;
|
168
|
+
if ((_a = proxy.$refs[el][0]) == null ? void 0 : _a.checkOut) {
|
169
|
+
selRowIds.push(f.id);
|
170
|
+
}
|
171
|
+
});
|
172
|
+
selFilters(filter.childAppCategoryList, selRowIds);
|
173
|
+
handleMultipleSel(filter, false);
|
174
|
+
};
|
175
|
+
const A_Z = computed(() => {
|
176
|
+
const uppercaseLetters = [];
|
177
|
+
uppercaseLetters.push("所有");
|
178
|
+
for (let i = 65; i <= 90; i++) {
|
179
|
+
const uppercaseLetter = String.fromCharCode(i);
|
180
|
+
uppercaseLetters.push(uppercaseLetter);
|
181
|
+
}
|
182
|
+
uppercaseLetters.push("其他");
|
183
|
+
return uppercaseLetters;
|
184
|
+
});
|
185
|
+
const handleHoverLetterFilter = (filter, letter) => {
|
186
|
+
filter.selLetter = letter;
|
187
|
+
};
|
188
|
+
const isIconRow = (rowF) => {
|
189
|
+
let boo = false;
|
190
|
+
if (rowF == null ? void 0 : rowF.childAppCategoryList) {
|
191
|
+
rowF == null ? void 0 : rowF.childAppCategoryList.forEach((f) => {
|
192
|
+
if (f.icon) {
|
193
|
+
boo = true;
|
194
|
+
return false;
|
195
|
+
}
|
196
|
+
});
|
197
|
+
}
|
198
|
+
return boo;
|
199
|
+
};
|
200
|
+
return (_ctx, _cache) => {
|
201
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
202
|
+
const _component_el_button = resolveComponent("el-button");
|
203
|
+
const _component_IconifyIconOffline = resolveComponent("IconifyIconOffline");
|
204
|
+
const _component_el_scrollbar = resolveComponent("el-scrollbar");
|
205
|
+
const _component_el_popover = resolveComponent("el-popover");
|
206
|
+
return openBlock(), createBlock(Transition, { name: "fade" }, {
|
207
|
+
default: withCtx(() => {
|
208
|
+
var _a;
|
209
|
+
return [
|
210
|
+
!((_a = unref(selProject)) == null ? void 0 : _a.collapse) ? (openBlock(), createElementBlock("div", {
|
211
|
+
key: 0,
|
212
|
+
class: normalizeClass(["filterAreaWrap bg-white mt-1", {
|
213
|
+
activePanel: unref(effectPanel) === unref(EnumEffectPanel).Category,
|
214
|
+
filterWrap: true
|
215
|
+
}])
|
216
|
+
}, [
|
217
|
+
createElementVNode("div", _hoisted_1, [
|
218
|
+
unref(B)(unref(selProject)) ? (openBlock(), createElementBlock("div", _hoisted_2, "空")) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
219
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(showList), (filter, rowIndex) => {
|
220
|
+
var _a2, _b;
|
221
|
+
return openBlock(), createElementBlock(Fragment, {
|
222
|
+
key: filter.id
|
223
|
+
}, [
|
224
|
+
rowIndex < 4 ? (openBlock(), createElementBlock("div", {
|
225
|
+
key: 0,
|
226
|
+
class: normalizeClass(["flex justify-between gap-x-5 rowWrap", {
|
227
|
+
multiple: filter.multipleSel,
|
228
|
+
xinyuan: filter.kind === unref(EnumFilterKind).XinYuan,
|
229
|
+
zhuti: filter.kind === unref(EnumFilterKind).ZhuTi,
|
230
|
+
huati: filter.kind === unref(EnumFilterKind).HuaTi
|
231
|
+
}])
|
232
|
+
}, [
|
233
|
+
createElementVNode("div", _hoisted_3, [
|
234
|
+
createElementVNode("div", {
|
235
|
+
class: "flex-bc rowTitle frontRowTitle px-3 py-1 text-sm font-black font-bold truncate",
|
236
|
+
onMouseenter: ($event) => handleHoverRowFilter(filter, true, rowIndex),
|
237
|
+
onMouseleave: ($event) => handleHoverRowFilter(filter, false, rowIndex)
|
238
|
+
}, [
|
239
|
+
createElementVNode("div", _hoisted_5, [
|
240
|
+
createVNode(_component_el_tooltip, {
|
241
|
+
class: "box-item",
|
242
|
+
content: filter.name,
|
243
|
+
placement: "bottom-end"
|
244
|
+
}, {
|
245
|
+
default: withCtx(() => [
|
246
|
+
createElementVNode("strong", null, toDisplayString(filter.name) + ": ", 1)
|
247
|
+
]),
|
248
|
+
_: 2
|
249
|
+
}, 1032, ["content"])
|
250
|
+
])
|
251
|
+
], 40, _hoisted_4),
|
252
|
+
createElementVNode("div", _hoisted_6, [
|
253
|
+
!filter.collapse ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
254
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(A_Z), (letter) => {
|
255
|
+
return openBlock(), createElementBlock("div", {
|
256
|
+
key: letter,
|
257
|
+
class: normalizeClass(["letter", { active: filter.selLetter === letter }]),
|
258
|
+
onMouseenter: ($event) => handleHoverLetterFilter(filter, letter)
|
259
|
+
}, toDisplayString(letter), 43, _hoisted_8);
|
260
|
+
}), 128))
|
261
|
+
])) : createCommentVNode("", true),
|
262
|
+
createElementVNode("div", _hoisted_9, [
|
263
|
+
createElementVNode("div", {
|
264
|
+
class: normalizeClass(["fWrap overflow-hidden flex flex-wrap content-start gap-x-10 gap-y-2 px-2 py-1", {
|
265
|
+
more: !filter.collapse,
|
266
|
+
iconRow: isIconRow(filter)
|
267
|
+
}])
|
268
|
+
}, [
|
269
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filter.childAppCategoryList, (subFilter) => {
|
270
|
+
return openBlock(), createElementBlock(Fragment, {
|
271
|
+
key: subFilter.id
|
272
|
+
}, [
|
273
|
+
subFilter.isMapShow ? (openBlock(), createElementBlock("div", {
|
274
|
+
key: 0,
|
275
|
+
class: "flex justify-center",
|
276
|
+
id: subFilter.id
|
277
|
+
}, [
|
278
|
+
!subFilter.icon ? (openBlock(), createBlock(FilterItem, {
|
279
|
+
key: 0,
|
280
|
+
ref_for: true,
|
281
|
+
ref: "subFilter" + subFilter.id,
|
282
|
+
subFilter,
|
283
|
+
multipleSel: filter.multipleSel,
|
284
|
+
rowIndex: getFilterRowIndex(filter),
|
285
|
+
checkout_prop: unref(selFilterIds).includes(subFilter.id)
|
286
|
+
}, null, 8, ["subFilter", "multipleSel", "rowIndex", "checkout_prop"])) : (openBlock(), createBlock(FilterItemIcon, {
|
287
|
+
key: 1,
|
288
|
+
ref_for: true,
|
289
|
+
ref: "subFilter" + subFilter.id,
|
290
|
+
subFilter,
|
291
|
+
multipleSel: filter.multipleSel,
|
292
|
+
rowIndex: getFilterRowIndex(filter),
|
293
|
+
checkout_prop: unref(selFilterIds).includes(subFilter.id)
|
294
|
+
}, null, 8, ["subFilter", "multipleSel", "rowIndex", "checkout_prop"]))
|
295
|
+
], 8, _hoisted_10)) : createCommentVNode("", true)
|
296
|
+
], 64);
|
297
|
+
}), 128))
|
298
|
+
], 2)
|
299
|
+
]),
|
300
|
+
filter.multipleSel ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
301
|
+
createVNode(_component_el_button, {
|
302
|
+
size: "small",
|
303
|
+
onClick: ($event) => handleMultipleSel(filter, false)
|
304
|
+
}, {
|
305
|
+
default: withCtx(() => [
|
306
|
+
createTextVNode("取消")
|
307
|
+
]),
|
308
|
+
_: 2
|
309
|
+
}, 1032, ["onClick"]),
|
310
|
+
createVNode(_component_el_button, {
|
311
|
+
size: "small",
|
312
|
+
onClick: ($event) => handleMultipleSel_ok(filter)
|
313
|
+
}, {
|
314
|
+
default: withCtx(() => [
|
315
|
+
createTextVNode("确定")
|
316
|
+
]),
|
317
|
+
_: 2
|
318
|
+
}, 1032, ["onClick"])
|
319
|
+
])) : createCommentVNode("", true)
|
320
|
+
])
|
321
|
+
]),
|
322
|
+
!filter.multipleSel ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
323
|
+
((_a2 = filter.childAppCategoryList) == null ? void 0 : _a2.length) && filter.childAppCategoryList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
324
|
+
createElementVNode("div", {
|
325
|
+
class: "flex hover:text-red-600 items-center p-1 border cursor-pointer text-xs inline-block border-[#ddd] text-[#333]",
|
326
|
+
style: { "flex-grow": "1", "height": "24px" },
|
327
|
+
onClick: ($event) => handleTriggerCollapse(filter)
|
328
|
+
}, [
|
329
|
+
createTextVNode(toDisplayString(filter.collapse ? "更多" : "收起") + " ", 1),
|
330
|
+
createElementVNode("span", _hoisted_15, [
|
331
|
+
createVNode(_component_IconifyIconOffline, {
|
332
|
+
style: { "width": "20px", "height": "20px" },
|
333
|
+
icon: filter.collapse ? unref(data) : unref(data$1),
|
334
|
+
class: "dark:text-white"
|
335
|
+
}, null, 8, ["icon"])
|
336
|
+
])
|
337
|
+
], 8, _hoisted_14)
|
338
|
+
])) : createCommentVNode("", true),
|
339
|
+
((_b = filter.childAppCategoryList) == null ? void 0 : _b.length) && filter.childAppCategoryList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_16, [
|
340
|
+
createElementVNode("div", {
|
341
|
+
class: "flex hover:text-red-600 items-center p-1 border cursor-pointer text-xs inline-block border-[#ddd] text-[#333]",
|
342
|
+
style: { "flex-grow": "1", "height": "24px" },
|
343
|
+
onClick: ($event) => handleMultipleSel(filter, true)
|
344
|
+
}, [
|
345
|
+
createTextVNode(toDisplayString("多选") + " "),
|
346
|
+
createElementVNode("span", _hoisted_18, [
|
347
|
+
createVNode(_component_IconifyIconOffline, {
|
348
|
+
style: { "width": "20px", "height": "20px" },
|
349
|
+
icon: unref(data$2),
|
350
|
+
class: "dark:text-white"
|
351
|
+
}, null, 8, ["icon"])
|
352
|
+
])
|
353
|
+
], 8, _hoisted_17)
|
354
|
+
])) : createCommentVNode("", true)
|
355
|
+
])) : createCommentVNode("", true)
|
356
|
+
], 2)) : createCommentVNode("", true)
|
357
|
+
], 64);
|
358
|
+
}), 128)),
|
359
|
+
unref(showList).length > 4 ? (openBlock(), createElementBlock("div", _hoisted_19, [
|
360
|
+
createElementVNode("div", _hoisted_20, [
|
361
|
+
_hoisted_21,
|
362
|
+
createElementVNode("div", _hoisted_22, [
|
363
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(showList).slice(4), (filter, rowIndex) => {
|
364
|
+
return openBlock(), createElementBlock("div", {
|
365
|
+
key: filter.id,
|
366
|
+
class: "flex flex-wrap items-center",
|
367
|
+
onMouseenter: ($event) => handleHoverRowFilter(filter, true, rowIndex + 4),
|
368
|
+
onMouseleave: ($event) => handleHoverRowFilter(filter, false, rowIndex + 4)
|
369
|
+
}, [
|
370
|
+
createVNode(_component_el_popover, {
|
371
|
+
placement: "bottom-start",
|
372
|
+
width: "100%",
|
373
|
+
teleported: false,
|
374
|
+
tabindex: rowIndex,
|
375
|
+
"popper-class": [
|
376
|
+
"subFilterWrap" + (rowIndex + 4),
|
377
|
+
"subFilterWrap",
|
378
|
+
{ multiple: filter.multipleSel }
|
379
|
+
],
|
380
|
+
"show-arrow": false,
|
381
|
+
"show-after": 300,
|
382
|
+
"popper-options": {
|
383
|
+
modifiers: [
|
384
|
+
{
|
385
|
+
name: "computeStyles",
|
386
|
+
options: {
|
387
|
+
roundOffsets: ({ x, y }) => ({
|
388
|
+
x: Math.round(x - 8),
|
389
|
+
y: Math.round(y - 12)
|
390
|
+
})
|
391
|
+
}
|
392
|
+
}
|
393
|
+
]
|
394
|
+
},
|
395
|
+
onHide: ($event) => handleMultipleSel(filter, false)
|
396
|
+
}, {
|
397
|
+
reference: withCtx(() => [
|
398
|
+
createElementVNode("div", {
|
399
|
+
class: normalizeClass(["flex bottomRowTitle flex-wrap items-center border py-1 px-2 text-xs cursor-pointer relative mr-3", {
|
400
|
+
multiple: filter.multipleSel,
|
401
|
+
xinyuan: filter.kind === unref(EnumFilterKind).XinYuan,
|
402
|
+
zhuti: filter.kind === unref(EnumFilterKind).ZhuTi,
|
403
|
+
huati: filter.kind === unref(EnumFilterKind).HuaTi
|
404
|
+
}])
|
405
|
+
}, [
|
406
|
+
createElementVNode("span", _hoisted_24, toDisplayString(filter.name) + toDisplayString(getRowSelFitler(filter)), 1),
|
407
|
+
createElementVNode("div", _hoisted_25, [
|
408
|
+
createElementVNode("span", _hoisted_26, [
|
409
|
+
createVNode(_component_IconifyIconOffline, {
|
410
|
+
style: { "width": "20px", "height": "20px" },
|
411
|
+
icon: filter.isEdit ? unref(data$1) : unref(data),
|
412
|
+
class: "dark:text-white"
|
413
|
+
}, null, 8, ["icon"])
|
414
|
+
])
|
415
|
+
])
|
416
|
+
], 2)
|
417
|
+
]),
|
418
|
+
default: withCtx(() => [
|
419
|
+
createVNode(_component_el_scrollbar, null, {
|
420
|
+
default: withCtx(() => {
|
421
|
+
var _a2;
|
422
|
+
return [
|
423
|
+
createElementVNode("div", _hoisted_27, [
|
424
|
+
createElementVNode("div", _hoisted_28, [
|
425
|
+
createElementVNode("div", _hoisted_29, [
|
426
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filter.childAppCategoryList, (subFilter) => {
|
427
|
+
return openBlock(), createElementBlock(Fragment, {
|
428
|
+
key: subFilter.id
|
429
|
+
}, [
|
430
|
+
subFilter.isMapShow ? (openBlock(), createElementBlock("div", _hoisted_30, [
|
431
|
+
createVNode(FilterItem, {
|
432
|
+
ref_for: true,
|
433
|
+
ref: "subFilter" + subFilter.id,
|
434
|
+
subFilter,
|
435
|
+
multipleSel: filter.multipleSel,
|
436
|
+
rowIndex: getFilterRowIndex(filter),
|
437
|
+
checkout_prop: unref(selFilterIds).includes(subFilter.id),
|
438
|
+
onClickF: ($event) => clickFilter(filter)
|
439
|
+
}, null, 8, ["subFilter", "multipleSel", "rowIndex", "checkout_prop", "onClickF"])
|
440
|
+
])) : createCommentVNode("", true)
|
441
|
+
], 64);
|
442
|
+
}), 128))
|
443
|
+
]),
|
444
|
+
filter.multipleSel ? (openBlock(), createElementBlock("div", _hoisted_31, [
|
445
|
+
createVNode(_component_el_button, {
|
446
|
+
size: "small",
|
447
|
+
onClick: ($event) => handleMultipleSel(filter, false)
|
448
|
+
}, {
|
449
|
+
default: withCtx(() => [
|
450
|
+
createTextVNode("取消")
|
451
|
+
]),
|
452
|
+
_: 2
|
453
|
+
}, 1032, ["onClick"]),
|
454
|
+
createVNode(_component_el_button, {
|
455
|
+
size: "small",
|
456
|
+
onClick: ($event) => handleMultipleSel_ok(filter)
|
457
|
+
}, {
|
458
|
+
default: withCtx(() => [
|
459
|
+
createTextVNode("确定")
|
460
|
+
]),
|
461
|
+
_: 2
|
462
|
+
}, 1032, ["onClick"])
|
463
|
+
])) : createCommentVNode("", true)
|
464
|
+
]),
|
465
|
+
((_a2 = filter.childAppCategoryList) == null ? void 0 : _a2.length) && filter.childAppCategoryList.length > 1 ? withDirectives((openBlock(), createElementBlock("div", {
|
466
|
+
key: 0,
|
467
|
+
class: "flex ml-auto mr-3 mt-3 hover:text-red-600 items-center p-1 border cursor-pointer text-xs inline-block border-[#ddd] text-[#333]",
|
468
|
+
style: { "height": "24px" },
|
469
|
+
onClick: ($event) => handleMultipleSel(filter, true)
|
470
|
+
}, [
|
471
|
+
createTextVNode(toDisplayString("多选") + " "),
|
472
|
+
createElementVNode("span", _hoisted_33, [
|
473
|
+
createVNode(_component_IconifyIconOffline, {
|
474
|
+
style: { "width": "20px", "height": "20px" },
|
475
|
+
icon: unref(data$2),
|
476
|
+
class: "dark:text-white"
|
477
|
+
}, null, 8, ["icon"])
|
478
|
+
])
|
479
|
+
], 8, _hoisted_32)), [
|
480
|
+
[vShow, !filter.multipleSel]
|
481
|
+
]) : createCommentVNode("", true)
|
482
|
+
])
|
483
|
+
];
|
484
|
+
}),
|
485
|
+
_: 2
|
486
|
+
}, 1024)
|
487
|
+
]),
|
488
|
+
_: 2
|
489
|
+
}, 1032, ["tabindex", "popper-class", "popper-options", "onHide"])
|
490
|
+
], 40, _hoisted_23);
|
491
|
+
}), 128))
|
492
|
+
])
|
493
|
+
])
|
494
|
+
])) : createCommentVNode("", true)
|
495
|
+
], 64))
|
496
|
+
])
|
497
|
+
], 2)) : createCommentVNode("", true)
|
498
|
+
];
|
499
|
+
}),
|
500
|
+
_: 1
|
501
|
+
});
|
502
|
+
};
|
503
|
+
}
|
504
|
+
});
|
505
|
+
export {
|
506
|
+
_sfc_main as default
|
507
|
+
};
|
@@ -0,0 +1,129 @@
|
|
1
|
+
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, Fragment, renderList, unref, createTextVNode, toDisplayString } from "vue";
|
2
|
+
import { useFilterStoreHook } from "../../store/modules/filters.mjs";
|
3
|
+
import { storeToRefs } from "pinia";
|
4
|
+
import { isAllEmpty as B } from "../../node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs";
|
5
|
+
import data from "../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/close.mjs";
|
6
|
+
import data$1 from "../../node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs";
|
7
|
+
import data$2 from "../../node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs";
|
8
|
+
const _hoisted_1 = { class: "flex justify-between p-1 bg-white text-xs text-[#666]" };
|
9
|
+
const _hoisted_2 = { style: { "max-width": "calc(100% - 300px)" } };
|
10
|
+
const _hoisted_3 = { class: "flex items-center align-middle justify-items-start flex-wrap" };
|
11
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode("span", { class: "mr-1 p-2" }, [
|
12
|
+
/* @__PURE__ */ createTextVNode("全部结果 "),
|
13
|
+
/* @__PURE__ */ createElementVNode("span", null, ">")
|
14
|
+
], -1);
|
15
|
+
const _hoisted_5 = ["onClick"];
|
16
|
+
const _hoisted_6 = { class: "flex items-center" };
|
17
|
+
const _hoisted_7 = { class: "mr-1" };
|
18
|
+
const _hoisted_8 = { class: "text-[#e4393c] flex items-center" };
|
19
|
+
const _hoisted_9 = {
|
20
|
+
class: "truncate",
|
21
|
+
style: { "max-width": "8rem" }
|
22
|
+
};
|
23
|
+
const _hoisted_10 = { class: "flex items-center" };
|
24
|
+
const _hoisted_11 = { class: "arrow-down inline-block" };
|
25
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
26
|
+
__name: "FilterHead",
|
27
|
+
setup(__props) {
|
28
|
+
const filterStore = useFilterStoreHook();
|
29
|
+
const { selProject, selFilterIds, filterList } = storeToRefs(filterStore);
|
30
|
+
const { selFilters, collapseFilter } = filterStore;
|
31
|
+
const filterTags = computed(() => {
|
32
|
+
const tags = [];
|
33
|
+
filterList.value.forEach((rowFilter) => {
|
34
|
+
const rowName = rowFilter.name;
|
35
|
+
const rowId = rowFilter.id;
|
36
|
+
const subFilters = rowFilter.childAppCategoryList || [];
|
37
|
+
const value = [];
|
38
|
+
subFilters.forEach((f) => {
|
39
|
+
if (selFilterIds.value.includes(f.id)) {
|
40
|
+
value.push({
|
41
|
+
name: f.name,
|
42
|
+
id: f.id
|
43
|
+
});
|
44
|
+
}
|
45
|
+
});
|
46
|
+
if (!B(value)) {
|
47
|
+
tags.push({
|
48
|
+
name: rowName,
|
49
|
+
id: rowId,
|
50
|
+
value
|
51
|
+
});
|
52
|
+
}
|
53
|
+
});
|
54
|
+
return tags;
|
55
|
+
});
|
56
|
+
const handleTriggerCollapse = () => {
|
57
|
+
collapseFilter(selProject.value, !selProject.value.collapse);
|
58
|
+
};
|
59
|
+
return (_ctx, _cache) => {
|
60
|
+
var _a, _b;
|
61
|
+
const _component_IconifyIconOffline = resolveComponent("IconifyIconOffline");
|
62
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
63
|
+
const _component_el_scrollbar = resolveComponent("el-scrollbar");
|
64
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
65
|
+
createElementVNode("div", _hoisted_2, [
|
66
|
+
createVNode(_component_el_scrollbar, null, {
|
67
|
+
default: withCtx(() => [
|
68
|
+
createElementVNode("div", _hoisted_3, [
|
69
|
+
_hoisted_4,
|
70
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filterTags), (tag) => {
|
71
|
+
return openBlock(), createElementBlock("div", {
|
72
|
+
class: "flex items-center hover:border-[red] hover:!bg-[white] bg-[#f3f3f3] border-[#DDD] border mr-3 px-2 py-1 cursor-pointer",
|
73
|
+
key: tag.id,
|
74
|
+
onClick: ($event) => unref(selFilters)(
|
75
|
+
tag.value.map((v) => v.id),
|
76
|
+
[]
|
77
|
+
)
|
78
|
+
}, [
|
79
|
+
createVNode(_component_el_tooltip, null, {
|
80
|
+
content: withCtx(() => [
|
81
|
+
createTextVNode(toDisplayString(tag.value.map((item) => item.name).join("、")), 1)
|
82
|
+
]),
|
83
|
+
default: withCtx(() => [
|
84
|
+
createElementVNode("div", _hoisted_6, [
|
85
|
+
createElementVNode("div", _hoisted_7, toDisplayString(tag.name) + ":", 1),
|
86
|
+
createElementVNode("div", _hoisted_8, [
|
87
|
+
createElementVNode("span", _hoisted_9, toDisplayString(tag.value.map((item) => item.name).join("、")), 1),
|
88
|
+
createVNode(_component_IconifyIconOffline, {
|
89
|
+
class: "ml-3 mr-1",
|
90
|
+
icon: unref(data)
|
91
|
+
}, null, 8, ["icon"])
|
92
|
+
])
|
93
|
+
])
|
94
|
+
]),
|
95
|
+
_: 2
|
96
|
+
}, 1024)
|
97
|
+
], 8, _hoisted_5);
|
98
|
+
}), 128))
|
99
|
+
])
|
100
|
+
]),
|
101
|
+
_: 1
|
102
|
+
})
|
103
|
+
]),
|
104
|
+
createElementVNode("div", {
|
105
|
+
class: "flex-auto",
|
106
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(collapseFilter)(unref(selProject), false))
|
107
|
+
}),
|
108
|
+
createElementVNode("div", _hoisted_10, [
|
109
|
+
createElementVNode("div", {
|
110
|
+
class: "flex justify-center items-center p-1 ml-2 mr-2 cursor-pointer hover:text-red-600 text-xs inline-block text-[#333]",
|
111
|
+
onClick: handleTriggerCollapse
|
112
|
+
}, [
|
113
|
+
createTextVNode(toDisplayString(((_a = unref(selProject)) == null ? void 0 : _a.collapse) ? "展示筛选" : "收起筛选") + " ", 1),
|
114
|
+
createElementVNode("span", _hoisted_11, [
|
115
|
+
createVNode(_component_IconifyIconOffline, {
|
116
|
+
style: { "width": "20px", "height": "20px" },
|
117
|
+
icon: ((_b = unref(selProject)) == null ? void 0 : _b.collapse) ? unref(data$1) : unref(data$2),
|
118
|
+
class: "dark:text-white"
|
119
|
+
}, null, 8, ["icon"])
|
120
|
+
])
|
121
|
+
])
|
122
|
+
])
|
123
|
+
]);
|
124
|
+
};
|
125
|
+
}
|
126
|
+
});
|
127
|
+
export {
|
128
|
+
_sfc_main as default
|
129
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import _sfc_main from "./FilterItem.vue2.mjs";
|
2
|
+
import "./FilterItem.vue3.mjs";
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
4
|
+
const FilterItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0b91dded"]]);
|
5
|
+
export {
|
6
|
+
FilterItem as default
|
7
|
+
};
|