vue2-client 1.4.53 → 1.4.55
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/CHANGELOG.md +472 -463
- package/index.js +30 -30
- package/package.json +1 -1
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +327 -327
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XForm/XForm.vue +274 -274
- package/src/base-client/components/common/XForm/XFormItem.vue +471 -471
- package/src/base-client/components/common/XFormTable/XFormTable.vue +560 -560
- package/src/base-client/components/common/XFormTable/index.md +96 -96
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
- package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
- package/src/base-client/plugins/AppData.js +73 -73
- package/src/base-client/plugins/GetLoginInfoService.js +179 -179
- package/src/base-client/plugins/PagedList.js +177 -177
- package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
- package/src/base-client/plugins/i18n-extend.js +32 -32
- package/src/components/Ellipsis/index.md +38 -38
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/STable/README.md +341 -341
- package/src/components/STable/index.js +318 -318
- package/src/components/Trend/index.md +45 -45
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/checkbox/ImgCheckbox.vue +163 -163
- package/src/components/form/FormRow.vue +52 -52
- package/src/components/index.js +36 -36
- package/src/components/menu/SideMenu.vue +62 -62
- package/src/components/menu/menu.js +273 -273
- package/src/components/page/header/index.less +40 -40
- package/src/components/setting/Setting.vue +235 -235
- package/src/components/table/StandardTable.vue +141 -141
- package/src/components/table/advance/ActionColumns.vue +158 -158
- package/src/components/table/advance/SearchArea.vue +355 -355
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/components/tool/AvatarList.vue +68 -68
- package/src/components/tool/Drawer.vue +142 -142
- package/src/components/tool/TagSelect.vue +83 -83
- package/src/components/transition/PageToggleTransition.vue +97 -97
- package/src/config/default/admin.config.js +18 -18
- package/src/config/default/setting.config.js +44 -44
- package/src/config/replacer/resolve.config.js +67 -67
- package/src/layouts/AdminLayout.vue +174 -174
- package/src/layouts/CommonLayout.vue +42 -42
- package/src/layouts/PageLayout.vue +151 -151
- package/src/layouts/SinglePageView.vue +1 -0
- package/src/layouts/footer/PageFooter.vue +49 -49
- package/src/layouts/header/AdminHeader.vue +104 -104
- package/src/layouts/header/HeaderNotice.vue +167 -167
- package/src/layouts/header/HeaderSearch.vue +67 -67
- package/src/layouts/header/InstitutionDetail.vue +181 -181
- package/src/layouts/header/index.less +92 -92
- package/src/layouts/tabs/TabsHead.vue +190 -190
- package/src/layouts/tabs/TabsView.vue +379 -379
- package/src/mock/goods/index.js +108 -108
- package/src/pages/CreateQueryPage.vue +21 -2
- package/src/pages/ReportView.vue +50 -0
- package/src/pages/login/Login.vue +348 -345
- package/src/pages/report/ReportTable.js +124 -124
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/system/dictionary/index.vue +43 -43
- package/src/pages/system/file/index.vue +317 -317
- package/src/pages/system/monitor/loginInfor/index.vue +36 -36
- package/src/pages/system/monitor/operLog/index.vue +36 -36
- package/src/pages/system/queryParams/index.vue +43 -43
- package/src/router/async/config.async.js +27 -27
- package/src/router/async/router.map.js +2 -0
- package/src/router/index.js +27 -27
- package/src/services/api/DictionaryDetailsViewApi.js +6 -6
- package/src/services/api/LogDetailsViewApi.js +10 -10
- package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
- package/src/services/api/TicketDetailsViewApi.js +34 -34
- package/src/services/api/cas.js +79 -79
- package/src/services/api/commonTempTable.js +10 -10
- package/src/services/api/index.js +17 -17
- package/src/services/api/logininfor/index.js +6 -0
- package/src/services/api/manage.js +8 -8
- package/src/services/apiService.js +13 -13
- package/src/services/user.js +53 -53
- package/src/store/modules/index.js +4 -4
- package/src/theme/default/nprogress.less +76 -76
- package/src/theme/default/style.less +47 -47
- package/src/utils/colors.js +107 -107
- package/src/utils/excel/Blob.js +180 -180
- package/src/utils/excel/Export2Excel.js +141 -141
- package/src/utils/formatter.js +68 -68
- package/src/utils/i18n.js +80 -80
- package/src/utils/theme-color-replacer-extend.js +91 -91
- package/src/utils/themeUtil.js +100 -100
- package/src/utils/util.js +230 -230
- package/vue.config.js +7 -2
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="page-layout">
|
|
3
|
-
<page-header
|
|
4
|
-
ref="pageHeader"
|
|
5
|
-
:style="`margin-top: ${multiPage ? 0 : -24}px`"
|
|
6
|
-
:breadcrumb="breadcrumb"
|
|
7
|
-
:title="pageTitle"
|
|
8
|
-
:logo="logo"
|
|
9
|
-
:avatar="avatar">
|
|
10
|
-
<slot name="action" slot="action"></slot>
|
|
11
|
-
<slot slot="content" name="headerContent"></slot>
|
|
12
|
-
<div slot="content" v-if="!this.$slots.headerContent && desc">
|
|
13
|
-
<p>{{ desc }}</p>
|
|
14
|
-
<div v-if="this.linkList" class="link">
|
|
15
|
-
<template v-for="(link, index) in linkList">
|
|
16
|
-
<a :key="index" :href="link.href"><a-icon :type="link.icon" />{{ link.title }}</a>
|
|
17
|
-
</template>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
<slot v-if="this.$slots.extra" slot="extra" name="extra"></slot>
|
|
21
|
-
</page-header>
|
|
22
|
-
<div ref="page" :class="['page-content', layout, pageWidth]" >
|
|
23
|
-
<slot></slot>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script>
|
|
29
|
-
import PageHeader from '@vue2-client/components/page/header/PageHeader'
|
|
30
|
-
import { mapState, mapMutations } from 'vuex'
|
|
31
|
-
import { getI18nKey } from '@vue2-client/utils/routerUtil'
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
name: 'PageLayout',
|
|
35
|
-
components: { PageHeader },
|
|
36
|
-
// eslint-disable-next-line vue/require-prop-types
|
|
37
|
-
props: ['desc', 'logo', 'title', 'avatar', 'linkList', 'extraImage'],
|
|
38
|
-
data () {
|
|
39
|
-
return {
|
|
40
|
-
page: {},
|
|
41
|
-
pageHeaderHeight: 0
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
watch: {
|
|
45
|
-
$route () {
|
|
46
|
-
this.page = this.$route.meta.page
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
updated () {
|
|
50
|
-
if (!this._inactive) {
|
|
51
|
-
this.updatePageHeight()
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
activated () {
|
|
55
|
-
this.updatePageHeight()
|
|
56
|
-
},
|
|
57
|
-
deactivated () {
|
|
58
|
-
this.updatePageHeight(0)
|
|
59
|
-
},
|
|
60
|
-
mounted () {
|
|
61
|
-
this.updatePageHeight()
|
|
62
|
-
},
|
|
63
|
-
created () {
|
|
64
|
-
this.page = this.$route.meta.page
|
|
65
|
-
},
|
|
66
|
-
beforeDestroy () {
|
|
67
|
-
this.updatePageHeight(0)
|
|
68
|
-
},
|
|
69
|
-
computed: {
|
|
70
|
-
...mapState('setting', ['layout', 'multiPage', 'pageMinHeight', 'pageWidth', 'customTitles']),
|
|
71
|
-
pageTitle () {
|
|
72
|
-
const pageTitle = this.page && this.page.title
|
|
73
|
-
return this.customTitle || (pageTitle && this.$t(pageTitle)) || this.title || this.routeName
|
|
74
|
-
},
|
|
75
|
-
routeName () {
|
|
76
|
-
const route = this.$route
|
|
77
|
-
return this.$t(getI18nKey(route.matched[route.matched.length - 1].path))
|
|
78
|
-
},
|
|
79
|
-
breadcrumb () {
|
|
80
|
-
const page = this.page
|
|
81
|
-
const breadcrumb = page && page.breadcrumb
|
|
82
|
-
if (breadcrumb) {
|
|
83
|
-
const i18nBreadcrumb = []
|
|
84
|
-
breadcrumb.forEach(item => {
|
|
85
|
-
i18nBreadcrumb.push(this.$t(item))
|
|
86
|
-
})
|
|
87
|
-
return i18nBreadcrumb
|
|
88
|
-
} else {
|
|
89
|
-
return this.getRouteBreadcrumb()
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
marginCorrect () {
|
|
93
|
-
return this.multiPage ? 24 : 0
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
methods: {
|
|
97
|
-
...mapMutations('setting', ['correctPageMinHeight']),
|
|
98
|
-
getRouteBreadcrumb () {
|
|
99
|
-
const routes = this.$route.matched
|
|
100
|
-
const path = this.$route.path
|
|
101
|
-
const breadcrumb = []
|
|
102
|
-
routes.filter(item => path.includes(item.path))
|
|
103
|
-
.forEach(route => {
|
|
104
|
-
const path = route.path.length === 0 ? '/home' : route.path
|
|
105
|
-
breadcrumb.push(this.$t(getI18nKey(path)))
|
|
106
|
-
})
|
|
107
|
-
const pageTitle = this.page && this.page.title
|
|
108
|
-
if (this.customTitle || pageTitle) {
|
|
109
|
-
breadcrumb[breadcrumb.length - 1] = this.customTitle || pageTitle
|
|
110
|
-
}
|
|
111
|
-
return breadcrumb
|
|
112
|
-
},
|
|
113
|
-
/**
|
|
114
|
-
* 用于计算页面内容最小高度
|
|
115
|
-
* @param newHeight
|
|
116
|
-
*/
|
|
117
|
-
updatePageHeight (newHeight = this.$refs.pageHeader.$el.offsetHeight + this.marginCorrect) {
|
|
118
|
-
this.correctPageMinHeight(this.pageHeaderHeight - newHeight)
|
|
119
|
-
this.pageHeaderHeight = newHeight
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
</script>
|
|
124
|
-
|
|
125
|
-
<style lang="less">
|
|
126
|
-
.page-header{
|
|
127
|
-
margin: 0 -24px 0;
|
|
128
|
-
}
|
|
129
|
-
.link{
|
|
130
|
-
/*margin-top: 16px;*/
|
|
131
|
-
line-height: 24px;
|
|
132
|
-
a{
|
|
133
|
-
font-size: 14px;
|
|
134
|
-
margin-right: 32px;
|
|
135
|
-
i{
|
|
136
|
-
font-size: 22px;
|
|
137
|
-
margin-right: 8px;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
.page-content{
|
|
142
|
-
position: relative;
|
|
143
|
-
padding: 24px 0 0;
|
|
144
|
-
&.side{
|
|
145
|
-
}
|
|
146
|
-
&.head.fixed{
|
|
147
|
-
margin: 0 auto;
|
|
148
|
-
max-width: 100%;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-layout">
|
|
3
|
+
<page-header
|
|
4
|
+
ref="pageHeader"
|
|
5
|
+
:style="`margin-top: ${multiPage ? 0 : -24}px`"
|
|
6
|
+
:breadcrumb="breadcrumb"
|
|
7
|
+
:title="pageTitle"
|
|
8
|
+
:logo="logo"
|
|
9
|
+
:avatar="avatar">
|
|
10
|
+
<slot name="action" slot="action"></slot>
|
|
11
|
+
<slot slot="content" name="headerContent"></slot>
|
|
12
|
+
<div slot="content" v-if="!this.$slots.headerContent && desc">
|
|
13
|
+
<p>{{ desc }}</p>
|
|
14
|
+
<div v-if="this.linkList" class="link">
|
|
15
|
+
<template v-for="(link, index) in linkList">
|
|
16
|
+
<a :key="index" :href="link.href"><a-icon :type="link.icon" />{{ link.title }}</a>
|
|
17
|
+
</template>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<slot v-if="this.$slots.extra" slot="extra" name="extra"></slot>
|
|
21
|
+
</page-header>
|
|
22
|
+
<div ref="page" :class="['page-content', layout, pageWidth]" >
|
|
23
|
+
<slot></slot>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
import PageHeader from '@vue2-client/components/page/header/PageHeader'
|
|
30
|
+
import { mapState, mapMutations } from 'vuex'
|
|
31
|
+
import { getI18nKey } from '@vue2-client/utils/routerUtil'
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'PageLayout',
|
|
35
|
+
components: { PageHeader },
|
|
36
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
37
|
+
props: ['desc', 'logo', 'title', 'avatar', 'linkList', 'extraImage'],
|
|
38
|
+
data () {
|
|
39
|
+
return {
|
|
40
|
+
page: {},
|
|
41
|
+
pageHeaderHeight: 0
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
watch: {
|
|
45
|
+
$route () {
|
|
46
|
+
this.page = this.$route.meta.page
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
updated () {
|
|
50
|
+
if (!this._inactive) {
|
|
51
|
+
this.updatePageHeight()
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
activated () {
|
|
55
|
+
this.updatePageHeight()
|
|
56
|
+
},
|
|
57
|
+
deactivated () {
|
|
58
|
+
this.updatePageHeight(0)
|
|
59
|
+
},
|
|
60
|
+
mounted () {
|
|
61
|
+
this.updatePageHeight()
|
|
62
|
+
},
|
|
63
|
+
created () {
|
|
64
|
+
this.page = this.$route.meta.page
|
|
65
|
+
},
|
|
66
|
+
beforeDestroy () {
|
|
67
|
+
this.updatePageHeight(0)
|
|
68
|
+
},
|
|
69
|
+
computed: {
|
|
70
|
+
...mapState('setting', ['layout', 'multiPage', 'pageMinHeight', 'pageWidth', 'customTitles']),
|
|
71
|
+
pageTitle () {
|
|
72
|
+
const pageTitle = this.page && this.page.title
|
|
73
|
+
return this.customTitle || (pageTitle && this.$t(pageTitle)) || this.title || this.routeName
|
|
74
|
+
},
|
|
75
|
+
routeName () {
|
|
76
|
+
const route = this.$route
|
|
77
|
+
return this.$t(getI18nKey(route.matched[route.matched.length - 1].path))
|
|
78
|
+
},
|
|
79
|
+
breadcrumb () {
|
|
80
|
+
const page = this.page
|
|
81
|
+
const breadcrumb = page && page.breadcrumb
|
|
82
|
+
if (breadcrumb) {
|
|
83
|
+
const i18nBreadcrumb = []
|
|
84
|
+
breadcrumb.forEach(item => {
|
|
85
|
+
i18nBreadcrumb.push(this.$t(item))
|
|
86
|
+
})
|
|
87
|
+
return i18nBreadcrumb
|
|
88
|
+
} else {
|
|
89
|
+
return this.getRouteBreadcrumb()
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
marginCorrect () {
|
|
93
|
+
return this.multiPage ? 24 : 0
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
methods: {
|
|
97
|
+
...mapMutations('setting', ['correctPageMinHeight']),
|
|
98
|
+
getRouteBreadcrumb () {
|
|
99
|
+
const routes = this.$route.matched
|
|
100
|
+
const path = this.$route.path
|
|
101
|
+
const breadcrumb = []
|
|
102
|
+
routes.filter(item => path.includes(item.path))
|
|
103
|
+
.forEach(route => {
|
|
104
|
+
const path = route.path.length === 0 ? '/home' : route.path
|
|
105
|
+
breadcrumb.push(this.$t(getI18nKey(path)))
|
|
106
|
+
})
|
|
107
|
+
const pageTitle = this.page && this.page.title
|
|
108
|
+
if (this.customTitle || pageTitle) {
|
|
109
|
+
breadcrumb[breadcrumb.length - 1] = this.customTitle || pageTitle
|
|
110
|
+
}
|
|
111
|
+
return breadcrumb
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* 用于计算页面内容最小高度
|
|
115
|
+
* @param newHeight
|
|
116
|
+
*/
|
|
117
|
+
updatePageHeight (newHeight = this.$refs.pageHeader.$el.offsetHeight + this.marginCorrect) {
|
|
118
|
+
this.correctPageMinHeight(this.pageHeaderHeight - newHeight)
|
|
119
|
+
this.pageHeaderHeight = newHeight
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
</script>
|
|
124
|
+
|
|
125
|
+
<style lang="less">
|
|
126
|
+
.page-header{
|
|
127
|
+
margin: 0 -24px 0;
|
|
128
|
+
}
|
|
129
|
+
.link{
|
|
130
|
+
/*margin-top: 16px;*/
|
|
131
|
+
line-height: 24px;
|
|
132
|
+
a{
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
margin-right: 32px;
|
|
135
|
+
i{
|
|
136
|
+
font-size: 22px;
|
|
137
|
+
margin-right: 8px;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
.page-content{
|
|
142
|
+
position: relative;
|
|
143
|
+
padding: 24px 0 0;
|
|
144
|
+
&.side{
|
|
145
|
+
}
|
|
146
|
+
&.head.fixed{
|
|
147
|
+
margin: 0 auto;
|
|
148
|
+
max-width: 100%;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
</style>
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="footer">
|
|
3
|
-
<div class="links">
|
|
4
|
-
<a target="_blank" :key="index" :href="item.link ? item.link : 'javascript: void(0)'" v-for="(item, index) in linkList">
|
|
5
|
-
<a-icon v-if="item.icon" :type="item.icon"/>{{ item.name }}
|
|
6
|
-
</a>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="copyright" v-if="!copyrightStyle">
|
|
9
|
-
Copyright<a-icon type="copyright" />{{ copyright }}
|
|
10
|
-
</div>
|
|
11
|
-
<div class="copyright2" :style="copyrightStyle" v-else>
|
|
12
|
-
{{ copyright }}
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
export default {
|
|
19
|
-
name: 'PageFooter',
|
|
20
|
-
// eslint-disable-next-line vue/require-prop-types
|
|
21
|
-
props: ['copyright', 'linkList', 'copyrightStyle']
|
|
22
|
-
}
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<style lang="less" scoped>
|
|
26
|
-
.footer{
|
|
27
|
-
padding: 48px 16px 24px;
|
|
28
|
-
/*margin: 48px 0 24px;*/
|
|
29
|
-
text-align: center;
|
|
30
|
-
.copyright{
|
|
31
|
-
color: @text-color-second;
|
|
32
|
-
font-size: 14px;
|
|
33
|
-
i {
|
|
34
|
-
margin: 0 4px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
.links{
|
|
38
|
-
margin-bottom: 8px;
|
|
39
|
-
a:not(:last-child) {
|
|
40
|
-
margin-right: 40px;
|
|
41
|
-
}
|
|
42
|
-
a{
|
|
43
|
-
color: @text-color-second;
|
|
44
|
-
-webkit-transition: all .3s;
|
|
45
|
-
transition: all .3s;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="footer">
|
|
3
|
+
<div class="links">
|
|
4
|
+
<a target="_blank" :key="index" :href="item.link ? item.link : 'javascript: void(0)'" v-for="(item, index) in linkList">
|
|
5
|
+
<a-icon v-if="item.icon" :type="item.icon"/>{{ item.name }}
|
|
6
|
+
</a>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="copyright" v-if="!copyrightStyle">
|
|
9
|
+
Copyright<a-icon type="copyright" />{{ copyright }}
|
|
10
|
+
</div>
|
|
11
|
+
<div class="copyright2" :style="copyrightStyle" v-else>
|
|
12
|
+
{{ copyright }}
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: 'PageFooter',
|
|
20
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
21
|
+
props: ['copyright', 'linkList', 'copyrightStyle']
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style lang="less" scoped>
|
|
26
|
+
.footer{
|
|
27
|
+
padding: 48px 16px 24px;
|
|
28
|
+
/*margin: 48px 0 24px;*/
|
|
29
|
+
text-align: center;
|
|
30
|
+
.copyright{
|
|
31
|
+
color: @text-color-second;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
i {
|
|
34
|
+
margin: 0 4px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.links{
|
|
38
|
+
margin-bottom: 8px;
|
|
39
|
+
a:not(:last-child) {
|
|
40
|
+
margin-right: 40px;
|
|
41
|
+
}
|
|
42
|
+
a{
|
|
43
|
+
color: @text-color-second;
|
|
44
|
+
-webkit-transition: all .3s;
|
|
45
|
+
transition: all .3s;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-layout-header :class="[headerTheme, 'admin-header']">
|
|
3
|
-
<div :class="['admin-header-wide', layout, pageWidth]">
|
|
4
|
-
<router-link v-if="isMobile || layout === 'head'" :class="['logo', isMobile ? null : 'pc', headerTheme]" to="/">
|
|
5
|
-
<img src="@vue2-client/assets/img/logo.png" width="32" alt=""/>
|
|
6
|
-
<h1 v-if="!isMobile">{{ systemName }}</h1>
|
|
7
|
-
</router-link>
|
|
8
|
-
<a-divider v-if="isMobile" type="vertical" />
|
|
9
|
-
<a-icon v-if="layout !== 'head'" :type="collapsed ? 'menu-unfold' : 'menu-fold'" class="trigger" @click="toggleCollapse"/>
|
|
10
|
-
<div v-if="layout !== 'side' && !isMobile" :style="`width: ${menuWidth};`" class="admin-header-menu">
|
|
11
|
-
<i-menu :options="menuData" :theme="headerTheme" class="head-menu" mode="horizontal" @select="onSelect"/>
|
|
12
|
-
</div>
|
|
13
|
-
<div :class="['admin-header-right', headerTheme]">
|
|
14
|
-
<header-search class="header-item" @active="val => searchActive = val" />
|
|
15
|
-
<a-tooltip class="header-item" placement="bottom" title="清理查询缓存" >
|
|
16
|
-
<a @click="handleToClearCache">
|
|
17
|
-
<a-icon type="reload" />
|
|
18
|
-
</a>
|
|
19
|
-
</a-tooltip>
|
|
20
|
-
<header-notice class="header-item"/>
|
|
21
|
-
<header-avatar class="header-item"/>
|
|
22
|
-
<a-dropdown class="lang header-item">
|
|
23
|
-
<div>
|
|
24
|
-
<a-icon type="global"/> {{ langAlias }}
|
|
25
|
-
</div>
|
|
26
|
-
<a-menu slot="overlay" :selected-keys="[lang]" @click="val => setLang(val.key)">
|
|
27
|
-
<a-menu-item v-for=" lang in langList" :key="lang.key">{{ lang.key.toLowerCase() + ' ' + lang.name }}</a-menu-item>
|
|
28
|
-
</a-menu>
|
|
29
|
-
</a-dropdown>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</a-layout-header>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
import HeaderSearch from './HeaderSearch'
|
|
37
|
-
import HeaderNotice from './HeaderNotice'
|
|
38
|
-
import HeaderAvatar from './HeaderAvatar'
|
|
39
|
-
import IMenu from '@vue2-client/components/menu/menu'
|
|
40
|
-
import { mapState, mapMutations } from 'vuex'
|
|
41
|
-
import { Modal } from 'ant-design-vue'
|
|
42
|
-
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
43
|
-
|
|
44
|
-
export default {
|
|
45
|
-
name: 'AdminHeader',
|
|
46
|
-
components: { IMenu, HeaderAvatar, HeaderNotice, HeaderSearch },
|
|
47
|
-
// eslint-disable-next-line vue/require-prop-types
|
|
48
|
-
props: ['collapsed', 'menuData'],
|
|
49
|
-
data () {
|
|
50
|
-
return {
|
|
51
|
-
langList: [
|
|
52
|
-
{ key: 'CN', name: '简体中文', alias: '简体' },
|
|
53
|
-
{ key: 'HK', name: '繁體中文', alias: '繁體' },
|
|
54
|
-
{ key: 'US', name: 'English', alias: 'English' }
|
|
55
|
-
],
|
|
56
|
-
searchActive: false
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
computed: {
|
|
60
|
-
...mapState('setting', ['theme', 'isMobile', 'layout', 'systemName', 'lang', 'pageWidth']),
|
|
61
|
-
headerTheme () {
|
|
62
|
-
if (this.layout === 'side' && this.theme.mode === 'dark' && !this.isMobile) {
|
|
63
|
-
return 'light'
|
|
64
|
-
}
|
|
65
|
-
return this.theme.mode
|
|
66
|
-
},
|
|
67
|
-
langAlias () {
|
|
68
|
-
const lang = this.langList.find(item => item.key === this.lang)
|
|
69
|
-
return lang.alias
|
|
70
|
-
},
|
|
71
|
-
menuWidth () {
|
|
72
|
-
const { layout, searchActive } = this
|
|
73
|
-
const headWidth = layout === 'head' ? '100% - 188px' : '100%'
|
|
74
|
-
const extraWidth = searchActive ? '600px' : '400px'
|
|
75
|
-
return `calc(${headWidth} - ${extraWidth})`
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
methods: {
|
|
79
|
-
toggleCollapse () {
|
|
80
|
-
this.$emit('toggleCollapse')
|
|
81
|
-
},
|
|
82
|
-
onSelect (obj) {
|
|
83
|
-
this.$emit('menuSelect', obj)
|
|
84
|
-
},
|
|
85
|
-
handleToClearCache () {
|
|
86
|
-
Modal.confirm({
|
|
87
|
-
title: '信息',
|
|
88
|
-
content: '您确定要清除查询配置缓存吗?',
|
|
89
|
-
onOk: () => {
|
|
90
|
-
indexedDB.clear(() => {
|
|
91
|
-
location.reload()
|
|
92
|
-
})
|
|
93
|
-
},
|
|
94
|
-
onCancel () {}
|
|
95
|
-
})
|
|
96
|
-
},
|
|
97
|
-
...mapMutations('setting', ['setLang'])
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
</script>
|
|
101
|
-
|
|
102
|
-
<style lang="less" scoped>
|
|
103
|
-
@import "index";
|
|
104
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-layout-header :class="[headerTheme, 'admin-header']">
|
|
3
|
+
<div :class="['admin-header-wide', layout, pageWidth]">
|
|
4
|
+
<router-link v-if="isMobile || layout === 'head'" :class="['logo', isMobile ? null : 'pc', headerTheme]" to="/">
|
|
5
|
+
<img src="@vue2-client/assets/img/logo.png" width="32" alt=""/>
|
|
6
|
+
<h1 v-if="!isMobile">{{ systemName }}</h1>
|
|
7
|
+
</router-link>
|
|
8
|
+
<a-divider v-if="isMobile" type="vertical" />
|
|
9
|
+
<a-icon v-if="layout !== 'head'" :type="collapsed ? 'menu-unfold' : 'menu-fold'" class="trigger" @click="toggleCollapse"/>
|
|
10
|
+
<div v-if="layout !== 'side' && !isMobile" :style="`width: ${menuWidth};`" class="admin-header-menu">
|
|
11
|
+
<i-menu :options="menuData" :theme="headerTheme" class="head-menu" mode="horizontal" @select="onSelect"/>
|
|
12
|
+
</div>
|
|
13
|
+
<div :class="['admin-header-right', headerTheme]">
|
|
14
|
+
<header-search class="header-item" @active="val => searchActive = val" />
|
|
15
|
+
<a-tooltip class="header-item" placement="bottom" title="清理查询缓存" >
|
|
16
|
+
<a @click="handleToClearCache">
|
|
17
|
+
<a-icon type="reload" />
|
|
18
|
+
</a>
|
|
19
|
+
</a-tooltip>
|
|
20
|
+
<header-notice class="header-item"/>
|
|
21
|
+
<header-avatar class="header-item"/>
|
|
22
|
+
<a-dropdown class="lang header-item">
|
|
23
|
+
<div>
|
|
24
|
+
<a-icon type="global"/> {{ langAlias }}
|
|
25
|
+
</div>
|
|
26
|
+
<a-menu slot="overlay" :selected-keys="[lang]" @click="val => setLang(val.key)">
|
|
27
|
+
<a-menu-item v-for=" lang in langList" :key="lang.key">{{ lang.key.toLowerCase() + ' ' + lang.name }}</a-menu-item>
|
|
28
|
+
</a-menu>
|
|
29
|
+
</a-dropdown>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</a-layout-header>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import HeaderSearch from './HeaderSearch'
|
|
37
|
+
import HeaderNotice from './HeaderNotice'
|
|
38
|
+
import HeaderAvatar from './HeaderAvatar'
|
|
39
|
+
import IMenu from '@vue2-client/components/menu/menu'
|
|
40
|
+
import { mapState, mapMutations } from 'vuex'
|
|
41
|
+
import { Modal } from 'ant-design-vue'
|
|
42
|
+
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
43
|
+
|
|
44
|
+
export default {
|
|
45
|
+
name: 'AdminHeader',
|
|
46
|
+
components: { IMenu, HeaderAvatar, HeaderNotice, HeaderSearch },
|
|
47
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
48
|
+
props: ['collapsed', 'menuData'],
|
|
49
|
+
data () {
|
|
50
|
+
return {
|
|
51
|
+
langList: [
|
|
52
|
+
{ key: 'CN', name: '简体中文', alias: '简体' },
|
|
53
|
+
{ key: 'HK', name: '繁體中文', alias: '繁體' },
|
|
54
|
+
{ key: 'US', name: 'English', alias: 'English' }
|
|
55
|
+
],
|
|
56
|
+
searchActive: false
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
computed: {
|
|
60
|
+
...mapState('setting', ['theme', 'isMobile', 'layout', 'systemName', 'lang', 'pageWidth']),
|
|
61
|
+
headerTheme () {
|
|
62
|
+
if (this.layout === 'side' && this.theme.mode === 'dark' && !this.isMobile) {
|
|
63
|
+
return 'light'
|
|
64
|
+
}
|
|
65
|
+
return this.theme.mode
|
|
66
|
+
},
|
|
67
|
+
langAlias () {
|
|
68
|
+
const lang = this.langList.find(item => item.key === this.lang)
|
|
69
|
+
return lang.alias
|
|
70
|
+
},
|
|
71
|
+
menuWidth () {
|
|
72
|
+
const { layout, searchActive } = this
|
|
73
|
+
const headWidth = layout === 'head' ? '100% - 188px' : '100%'
|
|
74
|
+
const extraWidth = searchActive ? '600px' : '400px'
|
|
75
|
+
return `calc(${headWidth} - ${extraWidth})`
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
methods: {
|
|
79
|
+
toggleCollapse () {
|
|
80
|
+
this.$emit('toggleCollapse')
|
|
81
|
+
},
|
|
82
|
+
onSelect (obj) {
|
|
83
|
+
this.$emit('menuSelect', obj)
|
|
84
|
+
},
|
|
85
|
+
handleToClearCache () {
|
|
86
|
+
Modal.confirm({
|
|
87
|
+
title: '信息',
|
|
88
|
+
content: '您确定要清除查询配置缓存吗?',
|
|
89
|
+
onOk: () => {
|
|
90
|
+
indexedDB.clear(() => {
|
|
91
|
+
location.reload()
|
|
92
|
+
})
|
|
93
|
+
},
|
|
94
|
+
onCancel () {}
|
|
95
|
+
})
|
|
96
|
+
},
|
|
97
|
+
...mapMutations('setting', ['setLang'])
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<style lang="less" scoped>
|
|
103
|
+
@import "index";
|
|
104
|
+
</style>
|