@cmstops/pro-compo 0.1.9 → 0.1.11
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 +949 -0
- package/dist/index.min.css +1 -1
- package/es/_virtual/plugin-vue_export-helper.js +7 -0
- package/es/config.d.ts +2 -0
- package/es/config.js +5 -3
- package/es/contentDetailList/component.d.ts +0 -0
- package/es/contentDetailList/component.js +89 -0
- package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/CompoItem/index.js +76 -0
- package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/ContentListItem/index.js +99 -0
- package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.js +71 -0
- package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/index.js +199 -0
- package/es/contentDetailList/components/Content/KongoNavItem/DocTags/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/KongoNavItem/DocTags/index.js +184 -0
- package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/KongoNavItem/index.js +131 -0
- package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/LiveItem/index.js +82 -0
- package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/MaccountItem/index.js +84 -0
- package/es/contentDetailList/components/Content/MaccountItem/temp/user.js +2 -0
- package/es/contentDetailList/components/Content/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/index.js +308 -0
- package/es/contentDetailList/components/Doc/index.d.ts +0 -0
- package/es/contentDetailList/components/Doc/index.js +58 -0
- package/es/contentDetailList/index.d.ts +2 -0
- package/es/contentDetailList/index.js +7 -0
- package/es/contentDetailList/scripts/data.d.ts +254 -0
- package/es/contentDetailList/scripts/index.d.ts +58 -0
- package/es/contentDetailList/scripts/index.js +137 -0
- package/es/contentDetailList/style/ComoItem.less +106 -0
- package/es/contentDetailList/style/Content.less +49 -0
- package/es/contentDetailList/style/ContentListItem.less +131 -0
- package/es/contentDetailList/style/Doc.less +8 -0
- package/es/contentDetailList/style/DocItem.less +145 -0
- package/es/contentDetailList/style/DocTags.less +63 -0
- package/es/contentDetailList/style/KongoNavItem.less +110 -0
- package/es/contentDetailList/style/LiveItem.less +115 -0
- package/es/contentDetailList/style/MaccountItem.less +114 -0
- package/es/contentDetailList/style/css.js +1 -0
- package/es/contentDetailList/style/index.css +683 -0
- package/es/contentDetailList/style/index.d.ts +1 -0
- package/es/contentDetailList/style/index.js +1 -0
- package/es/contentDetailList/style/index.less +9 -0
- package/es/contentModal/component.js +2 -1
- package/es/contentModal/components/CompoList/CompoFilter/index.js +3 -2
- package/es/contentModal/components/CompoList/index.js +3 -2
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
- package/es/contentModal/components/ViewAllColumn/columnTree/index.js +2 -1
- package/es/contentModal/components/ViewAllColumn/index.js +2 -1
- package/es/contentModal/components/storeBox/index.js +2 -1
- package/es/emptyData/component.d.ts +0 -0
- package/es/emptyData/component.js +48 -0
- package/es/emptyData/index.d.ts +2 -0
- package/es/emptyData/index.js +7 -0
- package/es/emptyData/style/css.js +1 -0
- package/es/emptyData/style/index.css +26 -0
- package/es/emptyData/style/index.d.ts +1 -0
- package/es/emptyData/style/index.js +1 -0
- package/es/emptyData/style/index.less +30 -0
- package/es/hooks/toggle.d.ts +6 -0
- package/es/hooks/toggle.js +9 -0
- package/es/hooks/user.js +2 -0
- package/es/index.css +949 -0
- package/es/index.d.ts +6 -0
- package/es/index.js +6 -0
- package/es/index.less +6 -0
- package/es/mediaFilter/component.d.ts +0 -0
- package/es/mediaFilter/component.js +41 -0
- package/es/mediaFilter/components/DocFilter.d.ts +0 -0
- package/es/mediaFilter/components/DocFilter.js +251 -0
- package/es/mediaFilter/components/DocFilter.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
- package/es/mediaFilter/components/FilterGroup.js +187 -0
- package/es/mediaFilter/components/FilterGroup.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/mediaFilter/components/FilterItem.d.ts +0 -0
- package/es/mediaFilter/components/FilterItem.js +116 -0
- package/es/mediaFilter/components/FilterItem.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/mediaFilter/components/MediaFilter.js +8 -0
- package/es/mediaFilter/components/MpAccountFilter.js +8 -0
- package/es/mediaFilter/components/MpContentFilter.js +8 -0
- package/es/mediaFilter/index.d.ts +2 -0
- package/es/mediaFilter/index.js +7 -0
- package/es/mediaFilter/script/optionsGetter.d.ts +26 -0
- package/es/mediaFilter/script/optionsGetter.js +82 -0
- package/es/mediaFilter/style/css.js +1 -0
- package/es/mediaFilter/style/index.css +4 -0
- package/es/mediaFilter/style/index.d.ts +1 -0
- package/es/mediaFilter/style/index.js +1 -0
- package/es/mediaFilter/style/index.less +4 -0
- package/es/messageBox/list.js +2 -1
- package/es/previousVersion/component.js +2 -1
- package/es/previousVersion/style/index.less +1 -0
- package/es/resourceModal/component.js +2 -1
- package/es/resourceModal/components/MediaPreviewer/index.js +2 -1
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +5 -3
- package/es/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.js +2 -1
- package/es/resourceModal/components/MediaSelection/index.js +3 -2
- package/es/resourceModal/script/filter.d.ts +1 -0
- package/es/resourceModal/script/filter.js +15 -2
- package/es/selectAvatarList/component.d.ts +0 -0
- package/es/selectAvatarList/component.js +77 -0
- package/es/selectAvatarList/index.d.ts +2 -0
- package/es/selectAvatarList/index.js +7 -0
- package/es/selectAvatarList/style/css.js +1 -0
- package/es/selectAvatarList/style/index.css +4 -0
- package/es/selectAvatarList/style/index.d.ts +1 -0
- package/es/selectAvatarList/style/index.js +1 -0
- package/es/selectAvatarList/style/index.less +4 -0
- package/es/selectGategory/component.js +5 -12
- package/es/selectGategory/components/ColumnSelection/index.js +5 -1
- package/es/style.css +89 -0
- package/es/uploadBefore/component.d.ts +0 -0
- package/es/uploadBefore/component.js +81 -0
- package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
- package/es/uploadBefore/components/UploadBefore.js +228 -0
- package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
- package/es/uploadBefore/components/UploadForClick.js +28 -0
- package/es/uploadBefore/index.d.ts +2 -0
- package/es/uploadBefore/index.js +7 -0
- package/es/uploadBefore/script/api.d.ts +16 -0
- package/es/uploadBefore/script/api.js +27 -0
- package/es/uploadBefore/script/fileTypeAdapter.d.ts +39 -0
- package/es/uploadBefore/script/fileTypeAdapter.js +48 -0
- package/es/uploadBefore/script/fileUpload.d.ts +7 -0
- package/es/uploadBefore/script/fileUpload.js +39 -0
- package/es/uploadBefore/script/uploadHooks.d.ts +55 -0
- package/es/uploadBefore/script/uploadHooks.js +33 -0
- package/es/uploadBefore/style/css.js +1 -0
- package/es/uploadBefore/style/index.css +111 -0
- package/es/uploadBefore/style/index.d.ts +1 -0
- package/es/uploadBefore/style/index.js +1 -0
- package/es/uploadBefore/style/index.less +144 -0
- package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
- package/es/uploadStep/component.js +139 -4
- package/es/uploadStep/script/fileTypeAdapter.d.ts +20 -0
- package/es/uploadStep/style/index.css +113 -0
- package/es/uploadStep/style/index.less +148 -0
- package/es/userDirector/component.d.ts +0 -0
- package/es/userDirector/component.js +200 -0
- package/es/userDirector/index.d.ts +2 -0
- package/es/userDirector/index.js +7 -0
- package/es/userDirector/script/api.d.ts +9 -0
- package/es/userDirector/script/api.js +32 -0
- package/es/userDirector/style/css.js +1 -0
- package/es/userDirector/style/index.css +8 -0
- package/es/userDirector/style/index.d.ts +1 -0
- package/es/userDirector/style/index.js +1 -0
- package/es/userDirector/style/index.less +8 -0
- package/es/utils/doc.d.ts +18 -16
- package/es/utils/doc.js +52 -0
- package/es/utils/index.d.ts +8 -0
- package/es/utils/index.js +22 -1
- package/es/utils/tusUpload.d.ts +8 -0
- package/es/utils/tusUpload.js +52 -0
- package/lib/_virtual/plugin-vue_export-helper.js +8 -0
- package/lib/config.js +6 -2
- package/lib/contentDetailList/component.js +90 -0
- package/lib/contentDetailList/components/Content/CompoItem/index.js +77 -0
- package/lib/contentDetailList/components/Content/ContentListItem/index.js +100 -0
- package/lib/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.js +72 -0
- package/lib/contentDetailList/components/Content/DocItem/index.js +200 -0
- package/lib/contentDetailList/components/Content/KongoNavItem/DocTags/index.js +185 -0
- package/lib/contentDetailList/components/Content/KongoNavItem/index.js +132 -0
- package/lib/contentDetailList/components/Content/LiveItem/index.js +83 -0
- package/lib/contentDetailList/components/Content/MaccountItem/index.js +85 -0
- package/lib/contentDetailList/components/Content/MaccountItem/temp/user.js +3 -0
- package/lib/contentDetailList/components/Content/index.js +313 -0
- package/lib/contentDetailList/components/Doc/index.js +59 -0
- package/lib/contentDetailList/index.js +8 -0
- package/lib/contentDetailList/scripts/index.js +153 -0
- package/lib/contentDetailList/style/ComoItem.less +106 -0
- package/lib/contentDetailList/style/Content.less +49 -0
- package/lib/contentDetailList/style/ContentListItem.less +131 -0
- package/lib/contentDetailList/style/Doc.less +8 -0
- package/lib/contentDetailList/style/DocItem.less +145 -0
- package/lib/contentDetailList/style/DocTags.less +63 -0
- package/lib/contentDetailList/style/KongoNavItem.less +110 -0
- package/lib/contentDetailList/style/LiveItem.less +115 -0
- package/lib/contentDetailList/style/MaccountItem.less +114 -0
- package/lib/contentDetailList/style/css.js +2 -0
- package/lib/contentDetailList/style/index.css +683 -0
- package/lib/contentDetailList/style/index.js +2 -0
- package/lib/contentDetailList/style/index.less +9 -0
- package/lib/contentModal/component.js +2 -1
- package/lib/contentModal/components/CompoList/CompoFilter/index.js +3 -2
- package/lib/contentModal/components/CompoList/index.js +3 -2
- package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
- package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +2 -1
- package/lib/contentModal/components/ViewAllColumn/index.js +2 -1
- package/lib/contentModal/components/storeBox/index.js +2 -1
- package/lib/emptyData/component.js +49 -0
- package/lib/emptyData/index.js +8 -0
- package/lib/emptyData/style/css.js +2 -0
- package/lib/emptyData/style/index.css +26 -0
- package/lib/emptyData/style/index.js +2 -0
- package/lib/emptyData/style/index.less +30 -0
- package/lib/hooks/toggle.js +11 -0
- package/lib/hooks/user.js +2 -0
- package/lib/index.css +949 -0
- package/lib/index.js +12 -0
- package/lib/index.less +6 -0
- package/lib/mediaFilter/component.js +42 -0
- package/lib/mediaFilter/components/DocFilter.js +252 -0
- package/lib/mediaFilter/components/DocFilter.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/mediaFilter/components/FilterGroup.js +188 -0
- package/lib/mediaFilter/components/FilterGroup.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/mediaFilter/components/FilterItem.js +117 -0
- package/lib/mediaFilter/components/FilterItem.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/mediaFilter/components/MediaFilter.js +9 -0
- package/lib/mediaFilter/components/MpAccountFilter.js +9 -0
- package/lib/mediaFilter/components/MpContentFilter.js +9 -0
- package/lib/mediaFilter/index.js +8 -0
- package/lib/mediaFilter/script/optionsGetter.js +88 -0
- package/lib/mediaFilter/style/css.js +2 -0
- package/lib/mediaFilter/style/index.css +4 -0
- package/lib/mediaFilter/style/index.js +2 -0
- package/lib/mediaFilter/style/index.less +4 -0
- package/lib/messageBox/list.js +2 -1
- package/lib/previousVersion/component.js +2 -1
- package/lib/previousVersion/style/index.less +1 -0
- package/lib/resourceModal/component.js +2 -1
- package/lib/resourceModal/components/MediaPreviewer/index.js +2 -1
- package/lib/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
- package/lib/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +5 -3
- package/lib/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
- package/lib/resourceModal/components/MediaSelection/ToolbarSearch/index.js +2 -1
- package/lib/resourceModal/components/MediaSelection/index.js +3 -2
- package/lib/resourceModal/script/filter.js +14 -0
- package/lib/selectAvatarList/component.js +78 -0
- package/lib/selectAvatarList/index.js +8 -0
- package/lib/selectAvatarList/style/css.js +2 -0
- package/lib/selectAvatarList/style/index.css +4 -0
- package/lib/selectAvatarList/style/index.js +2 -0
- package/lib/selectAvatarList/style/index.less +4 -0
- package/lib/selectGategory/component.js +4 -11
- package/lib/selectGategory/components/ColumnSelection/index.js +5 -1
- package/lib/uploadBefore/component.js +82 -0
- package/lib/uploadBefore/components/UploadBefore.js +229 -0
- package/lib/uploadBefore/components/UploadForClick.js +29 -0
- package/lib/uploadBefore/index.js +8 -0
- package/lib/uploadBefore/script/api.js +32 -0
- package/lib/uploadBefore/script/fileTypeAdapter.js +53 -0
- package/lib/uploadBefore/script/fileUpload.js +42 -0
- package/lib/uploadBefore/script/uploadHooks.js +36 -0
- package/lib/uploadBefore/style/css.js +2 -0
- package/lib/uploadBefore/style/index.css +111 -0
- package/lib/uploadBefore/style/index.js +2 -0
- package/lib/uploadBefore/style/index.less +144 -0
- package/lib/uploadStep/component.js +138 -3
- package/lib/uploadStep/style/index.css +113 -0
- package/lib/uploadStep/style/index.less +148 -0
- package/lib/userDirector/component.js +201 -0
- package/lib/userDirector/index.js +8 -0
- package/lib/userDirector/script/api.js +38 -0
- package/lib/userDirector/style/css.js +2 -0
- package/lib/userDirector/style/index.css +8 -0
- package/lib/userDirector/style/index.js +2 -0
- package/lib/userDirector/style/index.less +8 -0
- package/lib/utils/doc.js +59 -0
- package/lib/utils/index.js +23 -0
- package/lib/utils/tusUpload.js +75 -0
- package/package.json +8 -1
package/es/index.d.ts
CHANGED
|
@@ -8,3 +8,9 @@ export { default as contentModal } from './contentModal';
|
|
|
8
8
|
export { default as resourceModal } from './resourceModal';
|
|
9
9
|
export { default as previousVersion } from './previousVersion';
|
|
10
10
|
export { default as selectGategory } from './selectGategory';
|
|
11
|
+
export { default as uploadBefore } from './uploadBefore';
|
|
12
|
+
export { default as contentDetailList } from './contentDetailList';
|
|
13
|
+
export { default as emptyData } from './emptyData';
|
|
14
|
+
export { default as mediaFilter } from './mediaFilter';
|
|
15
|
+
export { default as selectAvatarList } from './selectAvatarList';
|
|
16
|
+
export { default as userDirector } from './userDirector';
|
package/es/index.js
CHANGED
|
@@ -8,3 +8,9 @@ export { default as contentModal } from "./contentModal/index.js";
|
|
|
8
8
|
export { default as resourceModal } from "./resourceModal/index.js";
|
|
9
9
|
export { default as previousVersion } from "./previousVersion/index.js";
|
|
10
10
|
export { default as selectGategory } from "./selectGategory/index.js";
|
|
11
|
+
export { default as uploadBefore } from "./uploadBefore/index.js";
|
|
12
|
+
export { default as contentDetailList } from "./contentDetailList/index.js";
|
|
13
|
+
export { default as emptyData } from "./emptyData/index.js";
|
|
14
|
+
export { default as mediaFilter } from "./mediaFilter/index.js";
|
|
15
|
+
export { default as selectAvatarList } from "./selectAvatarList/index.js";
|
|
16
|
+
export { default as userDirector } from "./userDirector/index.js";
|
package/es/index.less
CHANGED
|
@@ -8,3 +8,9 @@
|
|
|
8
8
|
@import './resourceModal/style/index.less';
|
|
9
9
|
@import './previousVersion/style/index.less';
|
|
10
10
|
@import './selectGategory/style/index.less';
|
|
11
|
+
@import './uploadBefore/style/index.less';
|
|
12
|
+
@import './contentDetailList/style/index.less';
|
|
13
|
+
@import './emptyData/style/index.less';
|
|
14
|
+
@import './mediaFilter/style/index.less';
|
|
15
|
+
@import './selectAvatarList/style/index.less';
|
|
16
|
+
@import './userDirector/style/index.less';
|
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createBlock, createCommentVNode } from "vue";
|
|
2
|
+
import { DEFAULT_BASE_API } from "../config.js";
|
|
3
|
+
import DocFilter from "./components/DocFilter.js";
|
|
4
|
+
import MedFilter from "./components/MediaFilter.js";
|
|
5
|
+
import MpaFilter from "./components/MpAccountFilter.js";
|
|
6
|
+
import MpcFilter from "./components/MpContentFilter.js";
|
|
7
|
+
const _hoisted_1 = { class: "filter-wrp" };
|
|
8
|
+
const _sfc_main = defineComponent({
|
|
9
|
+
...{ name: "mediaFilter" },
|
|
10
|
+
__name: "component",
|
|
11
|
+
props: {
|
|
12
|
+
filterType: {},
|
|
13
|
+
docFilterKeys: {},
|
|
14
|
+
docFilterType: {},
|
|
15
|
+
BASE_API: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["search", "change"],
|
|
18
|
+
setup(__props, { emit: __emit }) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const emits = __emit;
|
|
21
|
+
props.BASE_API || DEFAULT_BASE_API;
|
|
22
|
+
function handleFilterChange(params) {
|
|
23
|
+
emits("change", params);
|
|
24
|
+
}
|
|
25
|
+
function handleFilterSearch(params) {
|
|
26
|
+
emits("search", params);
|
|
27
|
+
}
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
30
|
+
_ctx.filterType === "DOC" ? (openBlock(), createBlock(DocFilter, {
|
|
31
|
+
key: 0,
|
|
32
|
+
"filter-keys": _ctx.docFilterKeys,
|
|
33
|
+
"filter-type": _ctx.docFilterType,
|
|
34
|
+
onSearch: handleFilterSearch,
|
|
35
|
+
onChange: handleFilterChange
|
|
36
|
+
}, null, 8, ["filter-keys", "filter-type"])) : _ctx.filterType === "MEDIA" ? (openBlock(), createBlock(MedFilter, { key: 1 })) : _ctx.filterType === "MP_ACOUNT" ? (openBlock(), createBlock(MpaFilter, { key: 2 })) : _ctx.filterType === "MP_CONTENT" ? (openBlock(), createBlock(MpcFilter, { key: 3 })) : createCommentVNode("v-if", true)
|
|
37
|
+
]);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createBlock, withCtx, createVNode, unref, createElementBlock, Fragment, renderList, createCommentVNode, withModifiers, createTextVNode, normalizeClass, createElementVNode, toDisplayString, renderSlot } from "vue";
|
|
2
|
+
import { InputSearch, RangePicker, Select, Option, Button, Dropdown, Dgroup, Doption } from "@arco-design/web-vue";
|
|
3
|
+
import { IconRefresh, IconCheck } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import { typeOptions, stateOptions, docThumbTypeMap } from "../../utils/doc.js";
|
|
5
|
+
import { useHighLevelSearch, getProvalTypeOptions, getApprovalStateOptions } from "../script/optionsGetter.js";
|
|
6
|
+
import FilterGroup from "./FilterGroup.js";
|
|
7
|
+
import FilterItem from "./FilterItem.js";
|
|
8
|
+
import "./DocFilter.vue_vue_type_style_index_0_scoped_true_lang.js";
|
|
9
|
+
import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
|
|
10
|
+
const _hoisted_1 = { class: "label" };
|
|
11
|
+
const _hoisted_2 = { class: "label" };
|
|
12
|
+
const _sfc_main = defineComponent({
|
|
13
|
+
__name: "DocFilter",
|
|
14
|
+
props: {
|
|
15
|
+
filterKeys: { default: () => ["keywords", "doc_type"] },
|
|
16
|
+
filterType: { default: "APV" }
|
|
17
|
+
},
|
|
18
|
+
emits: ["search", "change"],
|
|
19
|
+
setup(__props, { emit: __emit }) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const emits = __emit;
|
|
22
|
+
const { highLevelSearchOptions, showHighLevelSearch, sortOptions } = useHighLevelSearch(props.filterType);
|
|
23
|
+
const filter = ref({
|
|
24
|
+
keywords: "",
|
|
25
|
+
doc_type: "",
|
|
26
|
+
doc_state: "",
|
|
27
|
+
doc_thumb: "",
|
|
28
|
+
pub_time: "",
|
|
29
|
+
doc_banner: "",
|
|
30
|
+
apv_state: "",
|
|
31
|
+
apv_type: "",
|
|
32
|
+
order: highLevelSearchOptions.value.length > 0 ? highLevelSearchOptions.value[0].value : "",
|
|
33
|
+
sort: -1,
|
|
34
|
+
meta: {}
|
|
35
|
+
});
|
|
36
|
+
if (props.filterType === "MINE") {
|
|
37
|
+
choseMeta(filter.value.order);
|
|
38
|
+
}
|
|
39
|
+
const bannerOptions = [
|
|
40
|
+
{ value: "", label: "\u5168\u90E8" },
|
|
41
|
+
{ value: "0", label: "\u65E0\u72EC\u7ACB\u8F6E\u64AD" },
|
|
42
|
+
{ value: "1", label: "\u6709\u72EC\u7ACB\u8F6E\u64AD" }
|
|
43
|
+
];
|
|
44
|
+
const selectorsLeft = [
|
|
45
|
+
{ key: "doc_type", label: "\u7A3F\u4EF6\u7C7B\u578B", pos: "left", options: typeOptions() },
|
|
46
|
+
{ key: "doc_state", label: "\u7A3F\u4EF6\u72B6\u6001", pos: "left", options: stateOptions() },
|
|
47
|
+
{ key: "doc_thumb", label: "\u5C01\u9762\u7C7B\u578B", pos: "left", options: docThumbTypeMap() },
|
|
48
|
+
{ key: "pub_time", label: "\u53D1\u5E03\u65F6\u95F4", pos: "left", isDatePicker: true },
|
|
49
|
+
{ key: "doc_banner", label: "\u72EC\u7ACB\u8F6E\u64AD", pos: "left", options: bannerOptions },
|
|
50
|
+
{ key: "apv_type", label: "\u5BA1\u6279\u7C7B\u578B", pos: "left", options: getProvalTypeOptions() },
|
|
51
|
+
{ key: "apv_state", label: "\u5BA1\u6838\u72B6\u6001", pos: "left", options: getApprovalStateOptions() }
|
|
52
|
+
];
|
|
53
|
+
const calculateRules = computed(() => {
|
|
54
|
+
return selectorsLeft.filter((item) => {
|
|
55
|
+
if (props.filterKeys.includes(item.key))
|
|
56
|
+
return true;
|
|
57
|
+
return false;
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
const showReset = computed(() => {
|
|
61
|
+
return calculateRules.value.some((item) => {
|
|
62
|
+
return filter.value[item.key] !== "";
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
function reset() {
|
|
66
|
+
const excludeColumn = ["order", "sort", "meta", "keywords"];
|
|
67
|
+
Object.keys(filter.value).forEach((key) => {
|
|
68
|
+
if (excludeColumn.includes(key))
|
|
69
|
+
return;
|
|
70
|
+
filter.value[key] = "";
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function handleSearch() {
|
|
74
|
+
emits("search", filter.value);
|
|
75
|
+
}
|
|
76
|
+
watch(
|
|
77
|
+
() => filter.value,
|
|
78
|
+
(n) => {
|
|
79
|
+
const ret = {};
|
|
80
|
+
calculateRules.value.forEach((item) => {
|
|
81
|
+
ret[item.key] = n[item.key];
|
|
82
|
+
});
|
|
83
|
+
ret.keywords = n.keywords;
|
|
84
|
+
ret.highSearch = {
|
|
85
|
+
order: n.order,
|
|
86
|
+
sort: n.sort,
|
|
87
|
+
meta: n.meta
|
|
88
|
+
};
|
|
89
|
+
emits("change", ret);
|
|
90
|
+
},
|
|
91
|
+
{ deep: true }
|
|
92
|
+
);
|
|
93
|
+
const currentChose = computed(() => {
|
|
94
|
+
return highLevelSearchOptions.value.find(
|
|
95
|
+
(item) => item.value === filter.value.order
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
function choseOrder(e) {
|
|
99
|
+
filter.value.order = e;
|
|
100
|
+
if (props.filterType === "MINE")
|
|
101
|
+
choseMeta(e);
|
|
102
|
+
}
|
|
103
|
+
function choseMeta(e) {
|
|
104
|
+
const v = highLevelSearchOptions.value.find((item) => item.value === e);
|
|
105
|
+
if (!v)
|
|
106
|
+
return;
|
|
107
|
+
filter.value.meta = {
|
|
108
|
+
from: `${v.key}_from`,
|
|
109
|
+
to: `${v.key}_to`
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function choseSort(e) {
|
|
113
|
+
filter.value.sort = e;
|
|
114
|
+
}
|
|
115
|
+
return (_ctx, _cache) => {
|
|
116
|
+
return openBlock(), createBlock(FilterGroup, null, {
|
|
117
|
+
search: withCtx(() => [
|
|
118
|
+
createVNode(unref(InputSearch), {
|
|
119
|
+
modelValue: filter.value.keywords,
|
|
120
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.keywords = $event),
|
|
121
|
+
"allow-clear": "",
|
|
122
|
+
size: "medium",
|
|
123
|
+
placeholder: "\u8BF7\u8F93\u5165\u6807\u9898\u5173\u952E\u5B57",
|
|
124
|
+
onSearch: handleSearch
|
|
125
|
+
}, null, 8, ["modelValue"])
|
|
126
|
+
]),
|
|
127
|
+
left: withCtx(() => [
|
|
128
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(calculateRules.value, (item) => {
|
|
129
|
+
return openBlock(), createBlock(FilterItem, {
|
|
130
|
+
key: item.key,
|
|
131
|
+
value: filter.value[item.key],
|
|
132
|
+
"onUpdate:value": ($event) => filter.value[item.key] = $event,
|
|
133
|
+
label: item.label,
|
|
134
|
+
"date-picker": !!item.isDatePicker,
|
|
135
|
+
options: item.options
|
|
136
|
+
}, {
|
|
137
|
+
default: withCtx(() => [
|
|
138
|
+
createCommentVNode(" \u65E5\u671F\u9009\u62E9\u5668 "),
|
|
139
|
+
item.isDatePicker ? (openBlock(), createBlock(unref(RangePicker), {
|
|
140
|
+
key: 0,
|
|
141
|
+
modelValue: filter.value[item.key],
|
|
142
|
+
"onUpdate:modelValue": ($event) => filter.value[item.key] = $event,
|
|
143
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
144
|
+
}, ["stop"]))
|
|
145
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
146
|
+
createCommentVNode(" \u666E\u901A\u9009\u62E9\u5668 "),
|
|
147
|
+
createVNode(unref(Select), {
|
|
148
|
+
modelValue: filter.value[item.key],
|
|
149
|
+
"onUpdate:modelValue": ($event) => filter.value[item.key] = $event,
|
|
150
|
+
bordered: false,
|
|
151
|
+
style: { "width": "120px" },
|
|
152
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
153
|
+
}, ["stop"]))
|
|
154
|
+
}, {
|
|
155
|
+
default: withCtx(() => [
|
|
156
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.options, (opt) => {
|
|
157
|
+
return openBlock(), createBlock(unref(Option), {
|
|
158
|
+
key: opt.value,
|
|
159
|
+
label: opt.label,
|
|
160
|
+
value: opt.value
|
|
161
|
+
}, null, 8, ["label", "value"]);
|
|
162
|
+
}), 128))
|
|
163
|
+
]),
|
|
164
|
+
_: 2
|
|
165
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
166
|
+
], 64))
|
|
167
|
+
]),
|
|
168
|
+
_: 2
|
|
169
|
+
}, 1032, ["value", "onUpdate:value", "label", "date-picker", "options"]);
|
|
170
|
+
}), 128)),
|
|
171
|
+
createCommentVNode(" \u91CD\u7F6E "),
|
|
172
|
+
showReset.value ? (openBlock(), createBlock(unref(Button), {
|
|
173
|
+
key: 0,
|
|
174
|
+
type: "text",
|
|
175
|
+
onClick: reset
|
|
176
|
+
}, {
|
|
177
|
+
icon: withCtx(() => [
|
|
178
|
+
createVNode(unref(IconRefresh))
|
|
179
|
+
]),
|
|
180
|
+
default: withCtx(() => [
|
|
181
|
+
createTextVNode(" \u91CD\u7F6E ")
|
|
182
|
+
]),
|
|
183
|
+
_: 1
|
|
184
|
+
})) : createCommentVNode("v-if", true)
|
|
185
|
+
]),
|
|
186
|
+
right: withCtx(() => [
|
|
187
|
+
unref(showHighLevelSearch) ? (openBlock(), createBlock(unref(Dropdown), { key: 0 }, {
|
|
188
|
+
content: withCtx(() => [
|
|
189
|
+
createVNode(unref(Dgroup), { title: "order" }, {
|
|
190
|
+
default: withCtx(() => [
|
|
191
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(highLevelSearchOptions), (item) => {
|
|
192
|
+
return openBlock(), createBlock(unref(Doption), {
|
|
193
|
+
key: item.value,
|
|
194
|
+
class: normalizeClass({ active: item.value === filter.value.order, dop: true }),
|
|
195
|
+
onClick: ($event) => choseOrder(item.value)
|
|
196
|
+
}, {
|
|
197
|
+
default: withCtx(() => [
|
|
198
|
+
createElementVNode("span", _hoisted_1, [
|
|
199
|
+
createTextVNode(toDisplayString(item.label) + " ", 1),
|
|
200
|
+
item.value === filter.value.order ? (openBlock(), createBlock(unref(IconCheck), { key: 0 })) : createCommentVNode("v-if", true)
|
|
201
|
+
])
|
|
202
|
+
]),
|
|
203
|
+
_: 2
|
|
204
|
+
}, 1032, ["class", "onClick"]);
|
|
205
|
+
}), 128))
|
|
206
|
+
]),
|
|
207
|
+
_: 1
|
|
208
|
+
}),
|
|
209
|
+
createVNode(unref(Dgroup), { title: "sort" }, {
|
|
210
|
+
default: withCtx(() => [
|
|
211
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortOptions), (item) => {
|
|
212
|
+
return openBlock(), createBlock(unref(Doption), {
|
|
213
|
+
key: item.value,
|
|
214
|
+
class: normalizeClass({ active: item.value === filter.value.sort, dop: true }),
|
|
215
|
+
onClick: ($event) => choseSort(item.value)
|
|
216
|
+
}, {
|
|
217
|
+
default: withCtx(() => [
|
|
218
|
+
createElementVNode("span", _hoisted_2, [
|
|
219
|
+
createTextVNode(toDisplayString(item.label) + " ", 1),
|
|
220
|
+
item.value === filter.value.sort ? (openBlock(), createBlock(unref(IconCheck), { key: 0 })) : createCommentVNode("v-if", true)
|
|
221
|
+
])
|
|
222
|
+
]),
|
|
223
|
+
_: 2
|
|
224
|
+
}, 1032, ["class", "onClick"]);
|
|
225
|
+
}), 128))
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
})
|
|
229
|
+
]),
|
|
230
|
+
default: withCtx(() => [
|
|
231
|
+
createVNode(unref(Button), { text: "text" }, {
|
|
232
|
+
default: withCtx(() => {
|
|
233
|
+
var _a;
|
|
234
|
+
return [
|
|
235
|
+
createTextVNode(toDisplayString((_a = currentChose.value) == null ? void 0 : _a.label), 1)
|
|
236
|
+
];
|
|
237
|
+
}),
|
|
238
|
+
_: 1
|
|
239
|
+
})
|
|
240
|
+
]),
|
|
241
|
+
_: 1
|
|
242
|
+
})) : createCommentVNode("v-if", true),
|
|
243
|
+
renderSlot(_ctx.$slots, "right", {}, void 0, true)
|
|
244
|
+
]),
|
|
245
|
+
_: 3
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
var DocFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-10378a8c"]]);
|
|
251
|
+
export { DocFilter as default };
|
|
File without changes
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, onMounted, openBlock, createElementBlock, createElementVNode, renderSlot, withDirectives, createVNode, unref, withModifiers, withCtx, createTextVNode, vShow } from "vue";
|
|
2
|
+
import { Button } from "@arco-design/web-vue";
|
|
3
|
+
import { IconCaretDown } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import { createPopper } from "@popperjs/core";
|
|
5
|
+
import "./FilterGroup.vue_vue_type_style_index_0_scoped_true_lang.js";
|
|
6
|
+
import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
|
|
7
|
+
const _hoisted_1 = { class: "filter-view-container" };
|
|
8
|
+
const _hoisted_2 = { class: "filter-search" };
|
|
9
|
+
const _hoisted_3 = { class: "more-btn" };
|
|
10
|
+
const _hoisted_4 = { class: "right-prefix" };
|
|
11
|
+
const _hoisted_5 = { class: "filter-content" };
|
|
12
|
+
const _hoisted_6 = { class: "right" };
|
|
13
|
+
const _hoisted_7 = {
|
|
14
|
+
ref: "tempNode",
|
|
15
|
+
style: { "display": "none" }
|
|
16
|
+
};
|
|
17
|
+
const _sfc_main = defineComponent({
|
|
18
|
+
__name: "FilterGroup",
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const documentWidth = ref(0);
|
|
21
|
+
const overflowWidth = ref(0);
|
|
22
|
+
watch(
|
|
23
|
+
() => documentWidth.value,
|
|
24
|
+
(n) => checkOverflow()
|
|
25
|
+
);
|
|
26
|
+
watch(
|
|
27
|
+
() => overflowWidth.value,
|
|
28
|
+
(n) => setPannelItem()
|
|
29
|
+
);
|
|
30
|
+
const initDocWidthListener = function() {
|
|
31
|
+
window.onresize = (() => {
|
|
32
|
+
return () => {
|
|
33
|
+
documentWidth.value = document.body.clientWidth;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
};
|
|
37
|
+
const filterItemsRef = ref();
|
|
38
|
+
const moreBtnRef = ref();
|
|
39
|
+
const dpPannelRef = ref();
|
|
40
|
+
const initPopper = function() {
|
|
41
|
+
createPopper(moreBtnRef.value, dpPannelRef.value, {
|
|
42
|
+
placement: "bottom-start",
|
|
43
|
+
modifiers: [{ name: "offset", options: { offset: [-40, 10] } }]
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const popperShowFlag = ref(false);
|
|
47
|
+
function showPopper() {
|
|
48
|
+
popperShowFlag.value = true;
|
|
49
|
+
window.onclick = hidePopper;
|
|
50
|
+
}
|
|
51
|
+
function hidePopper() {
|
|
52
|
+
popperShowFlag.value = false;
|
|
53
|
+
}
|
|
54
|
+
const itemNodeArr = ref([]);
|
|
55
|
+
const itemWidthArr = ref([]);
|
|
56
|
+
const itemArr = ref([]);
|
|
57
|
+
function checkOverflow() {
|
|
58
|
+
if (!filterItemsRef.value)
|
|
59
|
+
return;
|
|
60
|
+
const parent = filterItemsRef.value.parentNode;
|
|
61
|
+
if (!itemNodeArr.value.length) {
|
|
62
|
+
itemNodeArr.value = mapNodes(filterItemsRef.value.childNodes);
|
|
63
|
+
itemWidthArr.value = itemNodeArr.value.map((node) => node.clientWidth + 10);
|
|
64
|
+
itemArr.value = itemWidthArr.value.map((_, idx) => idx);
|
|
65
|
+
}
|
|
66
|
+
const parentWidth = parent.clientWidth;
|
|
67
|
+
const leftWidth = getArrWidth(itemWidthArr.value);
|
|
68
|
+
const rightWidth = parent.childNodes[parent.childNodes.length - 1].clientWidth;
|
|
69
|
+
overflowWidth.value = leftWidth + rightWidth - parentWidth;
|
|
70
|
+
}
|
|
71
|
+
function mapNodes(nodes) {
|
|
72
|
+
const nodeArr = [];
|
|
73
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
74
|
+
const element = nodes[i];
|
|
75
|
+
nodeArr.push(element);
|
|
76
|
+
}
|
|
77
|
+
return nodeArr.filter((item) => item.clientWidth);
|
|
78
|
+
}
|
|
79
|
+
function getArrWidth(arr) {
|
|
80
|
+
return arr.reduce((prev, cur) => prev + cur, 0);
|
|
81
|
+
}
|
|
82
|
+
const pannelArray = ref("");
|
|
83
|
+
watch(
|
|
84
|
+
() => pannelArray.value,
|
|
85
|
+
(n, o) => refreshPannel(n, o)
|
|
86
|
+
);
|
|
87
|
+
function refreshPannel(newStr, oldStr) {
|
|
88
|
+
const nArr = newStr ? newStr.split(",") : [];
|
|
89
|
+
const oArr = oldStr ? oldStr.split(",") : [];
|
|
90
|
+
if (nArr.length && nArr.length > oArr.length) {
|
|
91
|
+
diff(nArr, oArr).forEach((index) => inNode(parseInt(index, 10)));
|
|
92
|
+
} else if (nArr.length >= 0 && nArr.length < oArr.length) {
|
|
93
|
+
diff(oArr, nArr).forEach((index) => outNode(parseInt(index, 10)));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const diff = (arr1, arr2) => {
|
|
97
|
+
const diff2 = [];
|
|
98
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
99
|
+
const item = arr1[i];
|
|
100
|
+
if (!arr2.includes(item))
|
|
101
|
+
diff2.push(item);
|
|
102
|
+
}
|
|
103
|
+
return diff2;
|
|
104
|
+
};
|
|
105
|
+
function inNode(index) {
|
|
106
|
+
var _a, _b, _c;
|
|
107
|
+
const node = mapNodes((_a = filterItemsRef.value) == null ? void 0 : _a.childNodes)[index];
|
|
108
|
+
const temp = document.createElement("div");
|
|
109
|
+
temp.style.width = `${itemWidthArr.value[index]}px`;
|
|
110
|
+
temp.style.position = "absolute";
|
|
111
|
+
temp.style.left = `${50}px`;
|
|
112
|
+
(_b = filterItemsRef.value) == null ? void 0 : _b.replaceChild(temp, node);
|
|
113
|
+
(_c = dpPannelRef.value) == null ? void 0 : _c.appendChild(node);
|
|
114
|
+
}
|
|
115
|
+
function outNode(index) {
|
|
116
|
+
var _a;
|
|
117
|
+
const node = itemNodeArr.value[index];
|
|
118
|
+
(_a = filterItemsRef.value) == null ? void 0 : _a.replaceChild(
|
|
119
|
+
node,
|
|
120
|
+
mapNodes(filterItemsRef.value.childNodes)[index]
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
function setPannelItem() {
|
|
124
|
+
let inPannelNum = 0;
|
|
125
|
+
if (overflowWidth.value > 0) {
|
|
126
|
+
const avgWidth = 120;
|
|
127
|
+
inPannelNum = Math.ceil((overflowWidth.value + 200) / avgWidth);
|
|
128
|
+
}
|
|
129
|
+
pannelArray.value = itemArr.value.slice(0, inPannelNum).join(",");
|
|
130
|
+
}
|
|
131
|
+
onMounted(() => {
|
|
132
|
+
initDocWidthListener();
|
|
133
|
+
initPopper();
|
|
134
|
+
setTimeout(() => checkOverflow());
|
|
135
|
+
});
|
|
136
|
+
return (_ctx, _cache) => {
|
|
137
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
138
|
+
createElementVNode("div", _hoisted_2, [
|
|
139
|
+
renderSlot(_ctx.$slots, "search", {}, void 0, true)
|
|
140
|
+
]),
|
|
141
|
+
createElementVNode("div", _hoisted_3, [
|
|
142
|
+
createElementVNode("div", {
|
|
143
|
+
ref_key: "moreBtnRef",
|
|
144
|
+
ref: moreBtnRef
|
|
145
|
+
}, [
|
|
146
|
+
withDirectives(createVNode(unref(Button), {
|
|
147
|
+
onClick: withModifiers(showPopper, ["stop"])
|
|
148
|
+
}, {
|
|
149
|
+
default: withCtx(() => [
|
|
150
|
+
createElementVNode("span", _hoisted_4, [
|
|
151
|
+
createTextVNode(" \u66F4\u591A\u7B5B\u9009 "),
|
|
152
|
+
createVNode(unref(IconCaretDown))
|
|
153
|
+
])
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 8, ["onClick"]), [
|
|
157
|
+
[vShow, pannelArray.value]
|
|
158
|
+
])
|
|
159
|
+
], 512),
|
|
160
|
+
withDirectives(createElementVNode("div", {
|
|
161
|
+
id: "dpPannelRef",
|
|
162
|
+
ref_key: "dpPannelRef",
|
|
163
|
+
ref: dpPannelRef,
|
|
164
|
+
class: "filter-pannel"
|
|
165
|
+
}, null, 512), [
|
|
166
|
+
[vShow, popperShowFlag.value]
|
|
167
|
+
])
|
|
168
|
+
]),
|
|
169
|
+
createElementVNode("div", _hoisted_5, [
|
|
170
|
+
createElementVNode("div", {
|
|
171
|
+
ref_key: "filterItemsRef",
|
|
172
|
+
ref: filterItemsRef,
|
|
173
|
+
class: "left"
|
|
174
|
+
}, [
|
|
175
|
+
renderSlot(_ctx.$slots, "left", {}, void 0, true)
|
|
176
|
+
], 512),
|
|
177
|
+
createElementVNode("div", _hoisted_6, [
|
|
178
|
+
renderSlot(_ctx.$slots, "right", {}, void 0, true)
|
|
179
|
+
])
|
|
180
|
+
]),
|
|
181
|
+
createElementVNode("div", _hoisted_7, null, 512)
|
|
182
|
+
]);
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
var FilterGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-017dcf0e"]]);
|
|
187
|
+
export { FilterGroup as default };
|
|
File without changes
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, createCommentVNode, withDirectives, createBlock, createTextVNode, toDisplayString, vShow, renderSlot } from "vue";
|
|
2
|
+
import { ButtonGroup, Button } from "@arco-design/web-vue";
|
|
3
|
+
import { IconCaretDown } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import "./FilterItem.vue_vue_type_style_index_0_scoped_true_lang.js";
|
|
5
|
+
import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
|
|
6
|
+
const _hoisted_1 = { class: "filter-item-view" };
|
|
7
|
+
const _hoisted_2 = { class: "show-view" };
|
|
8
|
+
const _hoisted_3 = { class: "right-prefix" };
|
|
9
|
+
const _hoisted_4 = { class: "right-prefix" };
|
|
10
|
+
const _hoisted_5 = { class: "right-prefix" };
|
|
11
|
+
const _hoisted_6 = { class: "select-view" };
|
|
12
|
+
const _sfc_main = defineComponent({
|
|
13
|
+
__name: "FilterItem",
|
|
14
|
+
props: {
|
|
15
|
+
value: { default: "" },
|
|
16
|
+
allValue: { default: "" },
|
|
17
|
+
label: { default: "" },
|
|
18
|
+
options: { default: () => [] },
|
|
19
|
+
icon: { default: "" },
|
|
20
|
+
rightIcon: { default: "" },
|
|
21
|
+
datePicker: { type: Boolean, default: false },
|
|
22
|
+
backgroundColor: { default: "none" }
|
|
23
|
+
},
|
|
24
|
+
setup(__props) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const hasValue = computed(() => {
|
|
27
|
+
if (props.allValue !== "" && props.value === props.allValue)
|
|
28
|
+
return false;
|
|
29
|
+
if (Array.isArray(props.value))
|
|
30
|
+
return props.value.length > 0;
|
|
31
|
+
return props.value;
|
|
32
|
+
});
|
|
33
|
+
const valueItem = computed(() => {
|
|
34
|
+
return props.options.find((item) => item.value === props.value);
|
|
35
|
+
});
|
|
36
|
+
const arrValue = computed(() => {
|
|
37
|
+
if (!Array.isArray(props.value))
|
|
38
|
+
return "";
|
|
39
|
+
return props.value.map((item) => {
|
|
40
|
+
if (props.datePicker)
|
|
41
|
+
return timeFilter(item);
|
|
42
|
+
return item.alias || item.title || item.label;
|
|
43
|
+
}).join(" / ");
|
|
44
|
+
});
|
|
45
|
+
function timeFilter(timeValue) {
|
|
46
|
+
if (!timeValue)
|
|
47
|
+
return "";
|
|
48
|
+
if (typeof timeValue === "number" && String(timeValue).length === 10) {
|
|
49
|
+
timeValue *= 1e3;
|
|
50
|
+
}
|
|
51
|
+
const date = new Date(timeValue);
|
|
52
|
+
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
|
|
53
|
+
}
|
|
54
|
+
return (_ctx, _cache) => {
|
|
55
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
56
|
+
createElementVNode("div", _hoisted_2, [
|
|
57
|
+
createVNode(unref(ButtonGroup), {
|
|
58
|
+
type: "primary",
|
|
59
|
+
size: "medium"
|
|
60
|
+
}, {
|
|
61
|
+
default: withCtx(() => [
|
|
62
|
+
createCommentVNode(" \u666E\u901A\u503C "),
|
|
63
|
+
valueItem.value ? withDirectives((openBlock(), createBlock(unref(Button), {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "hasvalue-btn"
|
|
66
|
+
}, {
|
|
67
|
+
default: withCtx(() => [
|
|
68
|
+
createElementVNode("span", _hoisted_3, [
|
|
69
|
+
createTextVNode(toDisplayString(valueItem.value.label) + " ", 1),
|
|
70
|
+
createVNode(unref(IconCaretDown))
|
|
71
|
+
])
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
}, 512)), [
|
|
75
|
+
[vShow, hasValue.value]
|
|
76
|
+
]) : createCommentVNode("v-if", true),
|
|
77
|
+
createCommentVNode(" \u6570\u7EC4\u503C "),
|
|
78
|
+
arrValue.value ? withDirectives((openBlock(), createBlock(unref(Button), {
|
|
79
|
+
key: 1,
|
|
80
|
+
class: "hasvalue-btn"
|
|
81
|
+
}, {
|
|
82
|
+
default: withCtx(() => [
|
|
83
|
+
createElementVNode("span", _hoisted_4, [
|
|
84
|
+
createTextVNode(toDisplayString(arrValue.value) + " ", 1),
|
|
85
|
+
createVNode(unref(IconCaretDown))
|
|
86
|
+
])
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 512)), [
|
|
90
|
+
[vShow, hasValue.value]
|
|
91
|
+
]) : createCommentVNode("v-if", true),
|
|
92
|
+
createCommentVNode(" \u672A\u8FDB\u884C\u9009\u62E9\u65F6\u5C55\u793A "),
|
|
93
|
+
withDirectives(createVNode(unref(Button), { type: "secondary" }, {
|
|
94
|
+
default: withCtx(() => [
|
|
95
|
+
createElementVNode("span", _hoisted_5, [
|
|
96
|
+
createTextVNode(toDisplayString(_ctx.label) + " ", 1),
|
|
97
|
+
createVNode(unref(IconCaretDown))
|
|
98
|
+
])
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 512), [
|
|
102
|
+
[vShow, !hasValue.value]
|
|
103
|
+
])
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
})
|
|
107
|
+
]),
|
|
108
|
+
createElementVNode("div", _hoisted_6, [
|
|
109
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
110
|
+
])
|
|
111
|
+
]);
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
var FilterItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-197080c1"]]);
|
|
116
|
+
export { FilterItem as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { openBlock, createElementBlock } from "vue";
|
|
2
|
+
import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
|
|
3
|
+
const _sfc_main = {};
|
|
4
|
+
function _sfc_render(_ctx, _cache) {
|
|
5
|
+
return openBlock(), createElementBlock("div", null, " \u7D20\u6750\u7B5B\u9009\u7EC4\u4EF6 ");
|
|
6
|
+
}
|
|
7
|
+
var MedFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
8
|
+
export { MedFilter as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { openBlock, createElementBlock } from "vue";
|
|
2
|
+
import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
|
|
3
|
+
const _sfc_main = {};
|
|
4
|
+
function _sfc_render(_ctx, _cache) {
|
|
5
|
+
return openBlock(), createElementBlock("div", null, " \u516C\u4F17\u53F7\u8D26\u53F7\u7B5B\u9009\u7EC4\u4EF6 ");
|
|
6
|
+
}
|
|
7
|
+
var MpaFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
8
|
+
export { MpaFilter as default };
|