free-fe-core-modules 0.0.1
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 +7 -0
- package/components/.gitkeep +0 -0
- package/components/Basic/BreadCrumbs.vue +87 -0
- package/components/Basic/EIcon.vue +84 -0
- package/components/Basic/LeveledMenus.vue +92 -0
- package/components/Basic/SummaryHead.vue +312 -0
- package/components/Dialog/BasicDialog.vue +442 -0
- package/components/Dialog/index.js +38 -0
- package/components/Dialog/index1.js +49 -0
- package/components/FloatingWindow/index.vue +140 -0
- package/components/SelectLocales/index.vue +47 -0
- package/components/SlidingCarousel/index.vue +86 -0
- package/components/SlidingNews/index.vue +138 -0
- package/components/StickyButtons/index.vue +98 -0
- package/components/ThemeSwitch/index.vue +77 -0
- package/field-components/Display/index.js +3 -0
- package/field-components/Fields/AgreementCheck.vue +161 -0
- package/field-components/Fields/ApiCall.vue +139 -0
- package/field-components/Fields/Boolean.vue +112 -0
- package/field-components/Fields/Category.vue +33 -0
- package/field-components/Fields/Check.vue +131 -0
- package/field-components/Fields/Customize.vue +103 -0
- package/field-components/Fields/Date.vue +142 -0
- package/field-components/Fields/DateRange.vue +199 -0
- package/field-components/Fields/DynamicList.vue +575 -0
- package/field-components/Fields/FieldEditor.vue +379 -0
- package/field-components/Fields/File.vue +382 -0
- package/field-components/Fields/FileList.vue +405 -0
- package/field-components/Fields/FileListCombined.vue +142 -0
- package/field-components/Fields/FixedList.vue +372 -0
- package/field-components/Fields/Image.vue +328 -0
- package/field-components/Fields/ImageList.vue +285 -0
- package/field-components/Fields/ImageListCombined.vue +76 -0
- package/field-components/Fields/InputFieldList.vue +299 -0
- package/field-components/Fields/Labels.vue +182 -0
- package/field-components/Fields/MixedTable.vue +367 -0
- package/field-components/Fields/Number.vue +247 -0
- package/field-components/Fields/Password.vue +79 -0
- package/field-components/Fields/Permission.vue +83 -0
- package/field-components/Fields/PermissionEditor.vue +205 -0
- package/field-components/Fields/QueryFilters.vue +162 -0
- package/field-components/Fields/RadioList.vue +81 -0
- package/field-components/Fields/Rich.vue +369 -0
- package/field-components/Fields/Search.vue +499 -0
- package/field-components/Fields/Select.vue +376 -0
- package/field-components/Fields/SelectionChain.vue +198 -0
- package/field-components/Fields/Separator.vue +26 -0
- package/field-components/Fields/SingleList.vue +125 -0
- package/field-components/Fields/Static.vue +22 -0
- package/field-components/Fields/String.vue +185 -0
- package/field-components/Fields/Text.vue +89 -0
- package/field-components/Fields/Time.vue +160 -0
- package/field-components/Fields/TimeRange.vue +348 -0
- package/field-components/Fields/UltimateFile.vue +100 -0
- package/field-components/Fields/Year.vue +124 -0
- package/field-components/Fields/YearRange.vue +188 -0
- package/field-components/Fields/components/FieldTypeOptions.vue +248 -0
- package/field-components/Fields/index.js +117 -0
- package/field-components/components/FieldComponents.vue +246 -0
- package/field-components/index.js +13 -0
- package/field-components/style.sass +11 -0
- package/free-fields/AutoHide.js +66 -0
- package/free-fields/CenterContent.js +15 -0
- package/free-fields/Draggable.js +30 -0
- package/free-fields/Droppable.js +114 -0
- package/free-fields/EditableString.js +63 -0
- package/free-fields/FieldCategory.js +83 -0
- package/free-fields/FieldTypeSelect.js +94 -0
- package/free-fields/fieldEditors/arrayEditor.js +3 -0
- package/free-fields/fieldEditors/boolEditor.js +22 -0
- package/free-fields/fieldEditors/dateEditor.js +23 -0
- package/free-fields/fieldEditors/datetimeEditor.js +23 -0
- package/free-fields/fieldEditors/index.js +21 -0
- package/free-fields/fieldEditors/jsonEditor.js +371 -0
- package/free-fields/fieldEditors/labeledField.js +74 -0
- package/free-fields/fieldEditors/numberEditor.js +51 -0
- package/free-fields/fieldEditors/objectEditor.js +3 -0
- package/free-fields/fieldEditors/selectEditor.js +0 -0
- package/free-fields/fieldEditors/stringEditor.js +49 -0
- package/free-fields/fieldEditors/textEditor.js +50 -0
- package/free-fields/fieldEditors/timeEditor.js +23 -0
- package/free-fields/index.js +402 -0
- package/i18n/en-us/index.js +73 -0
- package/i18n/fields/en-us/index.js +9 -0
- package/i18n/fields/zh-cn/index.js +9 -0
- package/i18n/zh-cn/index.js +73 -0
- package/index.js +367 -0
- package/package.json +11 -0
- package/router/dict/api.js +18 -0
- package/router/dict/data.js +48 -0
- package/router/dict/index.js +7 -0
- package/router/error/api.js +14 -0
- package/router/error/data.js +33 -0
- package/router/error/index.js +9 -0
- package/router/index.js +13 -0
- package/router/menu/api.js +24 -0
- package/router/menu/data.js +85 -0
- package/router/menu/index.js +7 -0
- package/router/system/api.js +10 -0
- package/router/system/data.js +46 -0
- package/router/system/index.js +7 -0
- package/stores/index.js +17 -0
- package/stores/module-mourning/actions.js +3 -0
- package/stores/module-mourning/getters.js +1 -0
- package/stores/module-mourning/index.js +11 -0
- package/stores/module-mourning/state.js +3 -0
- package/stores/mourning.js +3 -0
- package/view/dict/index.vue +284 -0
- package/view/error/list.vue +197 -0
- package/view/menu/index.vue +332 -0
- package/view/mourning/mourning.vue +45 -0
- package/view/system/index.vue +149 -0
package/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-breadcrumbs separator=" > " class="breadcrumbs">
|
|
3
|
+
<q-breadcrumbs-el
|
|
4
|
+
v-for="(item, index) in meta"
|
|
5
|
+
:key="index"
|
|
6
|
+
@click="Bread(index)"
|
|
7
|
+
:label="item.title || item"
|
|
8
|
+
:class="{'cursor-pointer':!!item.route}"
|
|
9
|
+
/>
|
|
10
|
+
<q-space></q-space>
|
|
11
|
+
<q-btn v-if="meta.length > 0 && canBack"
|
|
12
|
+
flat icon="keyboard_arrow_left" @click="back">{{backText}}</q-btn>
|
|
13
|
+
</q-breadcrumbs>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import { defineComponent } from 'vue';
|
|
18
|
+
import { mapWritableState } from 'pinia';
|
|
19
|
+
import useAppStore from '@/stores/app';
|
|
20
|
+
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
name: 'BreadCrumbs',
|
|
23
|
+
props: {
|
|
24
|
+
canBack: { type: Boolean, default: true },
|
|
25
|
+
backText: { type: String, default: '返回' },
|
|
26
|
+
},
|
|
27
|
+
data() {
|
|
28
|
+
return {
|
|
29
|
+
nextFlag: false,
|
|
30
|
+
whiteList: [],
|
|
31
|
+
crumbNames: [],
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
computed: {
|
|
35
|
+
...mapWritableState(useAppStore, ['crumbs']),
|
|
36
|
+
meta() {
|
|
37
|
+
let mt = [];
|
|
38
|
+
if (this.crumbs && this.crumbs.length) {
|
|
39
|
+
mt = this.crumbs;
|
|
40
|
+
} else if (this.$route.meta && this.$route.meta.length) {
|
|
41
|
+
mt = this.$route.meta;
|
|
42
|
+
} else {
|
|
43
|
+
for (let i = 0; i < this.$route.matched.length; i += 1) {
|
|
44
|
+
const rm = this.$route.matched[i];
|
|
45
|
+
if (rm.meta && rm.meta.length) mt = rm.meta;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return mt.map(m => {
|
|
50
|
+
if(typeof m === 'string') return this.$t(m);
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
...m,
|
|
54
|
+
...(m.title ? {title: this.$t(m.title)} : {}),
|
|
55
|
+
};
|
|
56
|
+
}) || [];
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
created() {
|
|
60
|
+
this.crumbs = undefined;
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
Bread(index) {
|
|
64
|
+
if (index === this.meta.length - 1 || index < 0 || !this.meta[index].route) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
this.$router.push(this.meta[index].route);
|
|
69
|
+
// const backIndex = this.meta.length - 1 - index;
|
|
70
|
+
// window.history.go(-backIndex);
|
|
71
|
+
},
|
|
72
|
+
back() {
|
|
73
|
+
const URL = this.$route.fullPath.indexOf('?') === -1
|
|
74
|
+
? this.$route.fullPath
|
|
75
|
+
: this.$route.fullPath.split('?')[0];
|
|
76
|
+
if (this.whiteList.indexOf(URL) === -1) {
|
|
77
|
+
window.history.go(-1);
|
|
78
|
+
} else {
|
|
79
|
+
// this.$store.state.watchData.refreshFlag = true;
|
|
80
|
+
window.history.go(-1);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
beforeUnmount() {
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
</script>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span class="e-icon justify-center items-center">
|
|
3
|
+
<q-icon
|
|
4
|
+
v-if="isIcon"
|
|
5
|
+
class="full-width full-height"
|
|
6
|
+
:name="name"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
></q-icon>
|
|
9
|
+
<q-img
|
|
10
|
+
v-else
|
|
11
|
+
class="full-width full-height"
|
|
12
|
+
style="display: block;"
|
|
13
|
+
:src="imgPath"
|
|
14
|
+
v-bind="$attrs"
|
|
15
|
+
round
|
|
16
|
+
>
|
|
17
|
+
<slot></slot>
|
|
18
|
+
<template v-slot:error v-if="!hideError">
|
|
19
|
+
<div class="error-slot column absolute-full justify-center text-center">
|
|
20
|
+
<span class="no-picture-text full-width">{{noImageText}}</span>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
</q-img>
|
|
24
|
+
<!-- <q-icon v-else :name="ctx.config.defaultIcon">he</q-icon> -->
|
|
25
|
+
</span>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
import { defineComponent } from 'vue';
|
|
30
|
+
|
|
31
|
+
export default defineComponent({
|
|
32
|
+
name: 'EIcon',
|
|
33
|
+
props: {
|
|
34
|
+
name: { type: String, default: '' },
|
|
35
|
+
relative: { type: Boolean, default: true },
|
|
36
|
+
thumb: { type: Boolean, default: false },
|
|
37
|
+
noImageText: { type: String, default: '暂无图片' },
|
|
38
|
+
hideError: { type: Boolean, default: false },
|
|
39
|
+
defaultSize: { type: String, default: '@2x' },
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
isIcon() {
|
|
43
|
+
return this.name && (typeof this.name === 'string') && (this.name.startsWith('img:') || this.name.indexOf('/') < 0);
|
|
44
|
+
},
|
|
45
|
+
imgPath() {
|
|
46
|
+
if (typeof this.name !== 'string' || !this.name) return '';
|
|
47
|
+
|
|
48
|
+
if (this.name.startsWith('data:')) return this.name;
|
|
49
|
+
|
|
50
|
+
if (this.name.startsWith('http://')) return this.name;
|
|
51
|
+
|
|
52
|
+
if (this.name.startsWith('https://')) return this.name;
|
|
53
|
+
|
|
54
|
+
// TODO:默认使用二倍图?
|
|
55
|
+
if (this.relative) return `images/${this.name}${this.defaultSize}.png`;
|
|
56
|
+
return this.thumb
|
|
57
|
+
? this.$options.filters.serverThumb(this.name)
|
|
58
|
+
: this.$options.filters.serverImage(this.name);
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style lang="sass" scoped>
|
|
65
|
+
.e-icon
|
|
66
|
+
display: inline-block
|
|
67
|
+
position: relative
|
|
68
|
+
font-size: 24px
|
|
69
|
+
max-width: 100%
|
|
70
|
+
max-height: 100%
|
|
71
|
+
min-height: 24px
|
|
72
|
+
min-width: 24px
|
|
73
|
+
.q-icon
|
|
74
|
+
width: 24px
|
|
75
|
+
height: 24px
|
|
76
|
+
.error-slot
|
|
77
|
+
background: $grey-4
|
|
78
|
+
margin: 0
|
|
79
|
+
padding: 0
|
|
80
|
+
.no-picture-text
|
|
81
|
+
position: absolute
|
|
82
|
+
top: 50%
|
|
83
|
+
transform: translateY(-50%)
|
|
84
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="leveled-menu">
|
|
3
|
+
<slot name="top"></slot>
|
|
4
|
+
<span v-for="(m,index) in menus" :key="index">
|
|
5
|
+
<q-expansion-item
|
|
6
|
+
v-if="!m.Sub || m.Sub.length <= 0"
|
|
7
|
+
clickable
|
|
8
|
+
class="simple"
|
|
9
|
+
:class="group"
|
|
10
|
+
:to="m.Route"
|
|
11
|
+
expand-icon-class="simple-expand-icon"
|
|
12
|
+
:ref="`menuItem_${group}_index`"
|
|
13
|
+
>
|
|
14
|
+
<template v-slot:header>
|
|
15
|
+
<div class="header row full-width">
|
|
16
|
+
<q-item-section v-if="showIcon && m.Icon" avatar>
|
|
17
|
+
<q-icon class="leaf-icon" :name="m.Icon"></q-icon>
|
|
18
|
+
</q-item-section>
|
|
19
|
+
<q-item-section>
|
|
20
|
+
<div class="q-item__label leaf-label">{{$t(m.Label)}}</div>
|
|
21
|
+
</q-item-section>
|
|
22
|
+
<q-item-section side
|
|
23
|
+
class="leaf-expand-icon">
|
|
24
|
+
<q-icon
|
|
25
|
+
v-if="leafIcon"
|
|
26
|
+
:name="leafIcon"
|
|
27
|
+
></q-icon>
|
|
28
|
+
</q-item-section>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
</q-expansion-item>
|
|
32
|
+
|
|
33
|
+
<q-expansion-item
|
|
34
|
+
v-if="m.Sub && m.Sub.length > 0"
|
|
35
|
+
:value="m.Sub.filter(s => $route.fullPath.startsWith(s.Route)).length > 0"
|
|
36
|
+
exact
|
|
37
|
+
class="expansion"
|
|
38
|
+
:class="group"
|
|
39
|
+
:dense-toggle="dense"
|
|
40
|
+
expand-icon-class="expansion-icon"
|
|
41
|
+
:expand-icon="expandIcon"
|
|
42
|
+
:expanded-icon="expandedIcon"
|
|
43
|
+
:group="group"
|
|
44
|
+
:content-inset-level="inset ? insetLevel || (showIcon ? 0.6 : 0.4) : undefined"
|
|
45
|
+
expand-separator
|
|
46
|
+
:icon="(showIcon && m.Icon) ? m.Icon : undefined"
|
|
47
|
+
:label="$t(m.Label)"
|
|
48
|
+
:to="m.Route"
|
|
49
|
+
:ref="`menuItem_${group}_index`"
|
|
50
|
+
>
|
|
51
|
+
<leveled-menus
|
|
52
|
+
:menus="m.Sub"
|
|
53
|
+
:group="`${group}_${index}`"
|
|
54
|
+
:showIcon="showIcon"
|
|
55
|
+
:insetLevel="insetLevel"
|
|
56
|
+
:dense="dense"
|
|
57
|
+
:leafIcon="leafIcon"
|
|
58
|
+
:leafExpandedIcon="leafExpandedIcon"
|
|
59
|
+
:expandedIcon="expandedIcon"
|
|
60
|
+
:expandIcon="expandIcon"
|
|
61
|
+
></leveled-menus>
|
|
62
|
+
</q-expansion-item>
|
|
63
|
+
</span>
|
|
64
|
+
<slot name="bottom"></slot>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script>
|
|
69
|
+
import { defineComponent } from 'vue';
|
|
70
|
+
|
|
71
|
+
export default defineComponent({
|
|
72
|
+
name: 'LeveledMenus',
|
|
73
|
+
props: {
|
|
74
|
+
group: { type: String, default: 'DEFAULT' },
|
|
75
|
+
menus: { type: Array },
|
|
76
|
+
showIcon: { type: Boolean, default: true },
|
|
77
|
+
inset: { type: Boolean, default: true },
|
|
78
|
+
insetLevel: { type: Number, default: 0 },
|
|
79
|
+
dense: { type: Boolean, default: false },
|
|
80
|
+
leafIcon: { type: String, default: undefined },
|
|
81
|
+
leafExpandedIcon: { type: String, default: undefined },
|
|
82
|
+
expandIcon: { type: String, default: undefined },
|
|
83
|
+
expandedIcon: { type: String, default: undefined },
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<style lang="sass">
|
|
89
|
+
.leveled-menu
|
|
90
|
+
.simple-expand-icon
|
|
91
|
+
display: none
|
|
92
|
+
</style>
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="summary-head-wrapper">
|
|
3
|
+
<div
|
|
4
|
+
v-for="(item, i) in data"
|
|
5
|
+
:key="i"
|
|
6
|
+
:class="
|
|
7
|
+
(item.is_count ? 'summary-head-count ' : '') +
|
|
8
|
+
(item.is_title
|
|
9
|
+
? 'summary-head-title summary-head-item'
|
|
10
|
+
: 'summary-head-item') +
|
|
11
|
+
((i < data.length && data[i + 1] && data[i + 1].button) ? ' last-summary' : '')
|
|
12
|
+
"
|
|
13
|
+
:style="'width: 20%;'"
|
|
14
|
+
>
|
|
15
|
+
<e-icon
|
|
16
|
+
v-if="item.icon && !item.button"
|
|
17
|
+
:relative="item.relative"
|
|
18
|
+
class="summary-head-icon"
|
|
19
|
+
:name="item.icon"
|
|
20
|
+
/>
|
|
21
|
+
<div>
|
|
22
|
+
<div v-if="item.is_title" class="title">{{ item.title }}</div>
|
|
23
|
+
<div
|
|
24
|
+
v-if="item.is_title"
|
|
25
|
+
:class="'fund' + (has_multiple_head ? ' ' : ' single-fund')"
|
|
26
|
+
>
|
|
27
|
+
{{ item.fund }}
|
|
28
|
+
<span
|
|
29
|
+
v-if="has_multiple_head"
|
|
30
|
+
class="fund-selection-icon el-icon-caret-bottom"
|
|
31
|
+
></span>
|
|
32
|
+
</div>
|
|
33
|
+
<q-btn
|
|
34
|
+
flat
|
|
35
|
+
round
|
|
36
|
+
class="summary-head-btn"
|
|
37
|
+
v-if="item.button"
|
|
38
|
+
@click="button_clicked(item)">
|
|
39
|
+
|
|
40
|
+
<e-icon
|
|
41
|
+
v-if="item.icon && item.button"
|
|
42
|
+
class="summary-head-btn-icon"
|
|
43
|
+
:relative="item.relative"
|
|
44
|
+
:name="item.icon"
|
|
45
|
+
/>
|
|
46
|
+
<span class="text">{{ item.text }}</span>
|
|
47
|
+
</q-btn>
|
|
48
|
+
<span
|
|
49
|
+
v-if="typeof item.number !== 'undefined'"
|
|
50
|
+
:class="
|
|
51
|
+
item.number && Number(item.number).toString() !== 'NaN'
|
|
52
|
+
? 'summary-head-number is-number highlight'
|
|
53
|
+
: 'summary-head-number'
|
|
54
|
+
"
|
|
55
|
+
:style="
|
|
56
|
+
item.action || item.event || item.route ? 'cursor: pointer;' : ''
|
|
57
|
+
"
|
|
58
|
+
@click="button_clicked(item)"
|
|
59
|
+
>{{ filteredValue(item) }}
|
|
60
|
+
<span v-if="item.warning" style="display: none;" class="warning">{{
|
|
61
|
+
item.warning
|
|
62
|
+
}}</span>
|
|
63
|
+
<span
|
|
64
|
+
v-if="item.unit && item.number && Number(item.number).toString() !== 'NaN'"
|
|
65
|
+
class="unit"
|
|
66
|
+
>{{ item.unit }}</span
|
|
67
|
+
>
|
|
68
|
+
</span>
|
|
69
|
+
<div v-if="item.text && !item.button" class="summary-head-label">
|
|
70
|
+
{{ item.text }}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<script>
|
|
78
|
+
import { defineComponent } from 'vue';
|
|
79
|
+
import mixins from 'free-fe-mixins';
|
|
80
|
+
|
|
81
|
+
export default defineComponent({
|
|
82
|
+
name: 'SummaryHead',
|
|
83
|
+
mixins: [mixins.ArrayDataMixin],
|
|
84
|
+
props: {
|
|
85
|
+
has_multiple_head: { type: Boolean, default: false },
|
|
86
|
+
},
|
|
87
|
+
created() {
|
|
88
|
+
this.Bus?.$on('update_summary_head', this.refreshData);
|
|
89
|
+
},
|
|
90
|
+
methods: {
|
|
91
|
+
filteredValue(item) {
|
|
92
|
+
// use filter to the summary value
|
|
93
|
+
if (item && item.filters) {
|
|
94
|
+
let filters = [];
|
|
95
|
+
if (Array.isArray(item.filters)) {
|
|
96
|
+
filters = filters.concat(item.filters);
|
|
97
|
+
} else if (typeof item.filters === 'string') {
|
|
98
|
+
filters.push(item.filters);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
for (let j = 0; j < filters.length; j += 1) {
|
|
102
|
+
const f = filters[j];
|
|
103
|
+
|
|
104
|
+
const filterFunc = this.$options.filters[f];
|
|
105
|
+
if (filterFunc) {
|
|
106
|
+
item.number = filterFunc(
|
|
107
|
+
item.number,
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// remove the filter to avoid filter multiple times
|
|
113
|
+
delete item.filters;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return item.number;
|
|
117
|
+
},
|
|
118
|
+
button_clicked(item) {
|
|
119
|
+
Promise.resolve(typeof item.action === 'function' ? item.action(item) : '').then(() => {
|
|
120
|
+
if (item.event) {
|
|
121
|
+
if (item.event_params) {
|
|
122
|
+
this.Bus?.$emit(item.event, item.event_params);
|
|
123
|
+
} else {
|
|
124
|
+
this.Bus?.$emit(item.event);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (item.route) {
|
|
129
|
+
// const rParams = { name: item.route };
|
|
130
|
+
|
|
131
|
+
// if (item.route_query) rParams.query = item.route_query;
|
|
132
|
+
// if (item.route_params) rParams.params = item.route_params;
|
|
133
|
+
|
|
134
|
+
this.$router.push(item.route);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
beforeUnmount() {
|
|
140
|
+
this.Bus?.$off('update_summary_head', this.refreshData);
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
146
|
+
.summary-head-wrapper {
|
|
147
|
+
display: inline-flex;
|
|
148
|
+
align-items: flex-start;
|
|
149
|
+
/*justify-content: center;*/
|
|
150
|
+
height: 118px;
|
|
151
|
+
width: 100%;
|
|
152
|
+
// background: rgba(255, 255, 255, 1);
|
|
153
|
+
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.12);
|
|
154
|
+
border-radius: 6px;
|
|
155
|
+
// border: 1px solid rgba(208, 208, 208, 1);
|
|
156
|
+
|
|
157
|
+
.summary-head-item {
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
justify-content: center;
|
|
161
|
+
height: 100%;
|
|
162
|
+
min-width: 120px;
|
|
163
|
+
text-align: center;
|
|
164
|
+
/*margin: 0 auto;*/
|
|
165
|
+
/*margin-left: 37px;*/
|
|
166
|
+
/*margin-right: 5px;*/
|
|
167
|
+
|
|
168
|
+
.title {
|
|
169
|
+
margin: 8px;
|
|
170
|
+
height: 24px;
|
|
171
|
+
max-width: 90%;
|
|
172
|
+
font-size: 18px;
|
|
173
|
+
font-weight: bold;
|
|
174
|
+
// color: rgba(113, 152, 200, 1);
|
|
175
|
+
line-height: 24px;
|
|
176
|
+
-webkit-background-clip: text;
|
|
177
|
+
background-clip: text;
|
|
178
|
+
text-align: center;
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
/*white-space: nowrap;*/
|
|
181
|
+
text-overflow: ellipsis;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.fund {
|
|
185
|
+
position: relative;
|
|
186
|
+
height: 34px;
|
|
187
|
+
min-width: 140px;
|
|
188
|
+
margin: 0 2px;
|
|
189
|
+
// background: rgba(255, 255, 255, 1);
|
|
190
|
+
border-radius: 18px;
|
|
191
|
+
// border: 1px solid rgba(151, 151, 151, 1);
|
|
192
|
+
|
|
193
|
+
font-size: 12px;
|
|
194
|
+
color: rgba(74, 74, 74, 1);
|
|
195
|
+
line-height: 34px;
|
|
196
|
+
text-align: center;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
/*white-space: nowrap;*/
|
|
199
|
+
text-overflow: ellipsis;
|
|
200
|
+
|
|
201
|
+
.fund-selection-icon {
|
|
202
|
+
display: inline;
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: 10px;
|
|
205
|
+
right: 5px;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.single-fund {
|
|
210
|
+
border-width: 0;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.summary-head-icon {
|
|
214
|
+
display: inline-block;
|
|
215
|
+
// height: 36px;
|
|
216
|
+
// width: 36px;
|
|
217
|
+
margin: 0 5px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.summary-head-number {
|
|
221
|
+
height: 34px;
|
|
222
|
+
/*font-size:28px;*/
|
|
223
|
+
font-size: 2.2vw;
|
|
224
|
+
font-weight: normal;
|
|
225
|
+
line-height: 34px;
|
|
226
|
+
text-align: center;
|
|
227
|
+
|
|
228
|
+
.warning {
|
|
229
|
+
font-size: 12px;
|
|
230
|
+
color: rgba(199, 199, 199, 1);
|
|
231
|
+
line-height: 16px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.unit {
|
|
235
|
+
height: 16px;
|
|
236
|
+
font-size: 12px;
|
|
237
|
+
line-height: 16px;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.summary-head-label {
|
|
242
|
+
height: 16px;
|
|
243
|
+
font-size: 12px;
|
|
244
|
+
// color: rgba(155, 155, 155, 1);
|
|
245
|
+
line-height: 16px;
|
|
246
|
+
text-align: center;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.summary-head-btn {
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
|
|
252
|
+
.summary-head-btn-icon {
|
|
253
|
+
display: block;
|
|
254
|
+
width: 52px;
|
|
255
|
+
height: 52px;
|
|
256
|
+
margin: 7px auto;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.text {
|
|
260
|
+
// font-size: 12px;
|
|
261
|
+
// color: rgba(0, 138, 183, 1);
|
|
262
|
+
line-height: 16px;
|
|
263
|
+
text-align: center;
|
|
264
|
+
margin: 0 auto;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.summary-head-title:after,
|
|
270
|
+
.summary-head-count:after {
|
|
271
|
+
position: absolute;
|
|
272
|
+
content: '';
|
|
273
|
+
display: inline-block;
|
|
274
|
+
width: 1px;
|
|
275
|
+
height: 80px;
|
|
276
|
+
// background: rgba(216, 216, 216, 1);
|
|
277
|
+
border-radius: 2px;
|
|
278
|
+
left: 16.67%;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
@media screen and (min-width: 1240px) {
|
|
283
|
+
.summary-head-wrapper {
|
|
284
|
+
.summary-head-item {
|
|
285
|
+
.summary-head-number {
|
|
286
|
+
font-size: 28px;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@media screen and (max-width: 1080px) {
|
|
293
|
+
.summary-head-wrapper {
|
|
294
|
+
.summary-head-item {
|
|
295
|
+
.summary-head-number {
|
|
296
|
+
font-size: 22px;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.summary-head-wrapper {
|
|
303
|
+
.summary-head-count {
|
|
304
|
+
.summary-head-number {
|
|
305
|
+
font-size: 40px;
|
|
306
|
+
font-weight: normal;
|
|
307
|
+
color: rgba(245, 166, 35, 1);
|
|
308
|
+
line-height: 49px;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
</style>
|