vue2-client 1.6.49 → 1.7.0
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/.env +15 -15
- package/CHANGELOG.md +628 -625
- package/index.js +30 -30
- package/package.json +81 -81
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +316 -316
- package/src/base-client/components/common/CitySelect/CitySelect.vue +247 -247
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +667 -667
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +733 -733
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +468 -462
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +508 -508
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +146 -140
- 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/Upload/Upload.vue +168 -168
- package/src/base-client/components/common/XAddForm/XAddForm.vue +325 -325
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +279 -279
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XForm/XForm.vue +180 -180
- package/src/base-client/components/common/XForm/XFormItem.vue +513 -513
- package/src/base-client/components/common/XForm/XTreeSelect.vue +184 -184
- package/src/base-client/components/common/XFormCol/XFormCol.vue +38 -38
- package/src/base-client/components/common/XFormTable/XFormTable.vue +344 -336
- package/src/base-client/components/common/XFormTable/index.md +97 -97
- package/src/base-client/components/common/XImportExcel/XImportExcel.vue +132 -132
- package/src/base-client/components/common/XTable/XTable.vue +506 -506
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +111 -111
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +231 -231
- 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 +76 -76
- 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/Ellipsis.vue +65 -65
- 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/exception/ExceptionPage.vue +70 -70
- 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/CreateQueryConfig.js +307 -307
- package/src/config/default/admin.config.js +18 -18
- package/src/config/replacer/resolve.config.js +67 -67
- package/src/layouts/CommonLayout.vue +42 -42
- package/src/layouts/ComponentLayoutOne.vue +47 -47
- package/src/layouts/PageLayout.vue +151 -151
- package/src/layouts/SinglePageView.vue +116 -116
- package/src/layouts/footer/PageFooter.vue +49 -49
- package/src/layouts/header/AdminHeader.vue +134 -134
- package/src/layouts/header/HeaderAvatar.vue +64 -64
- package/src/layouts/header/HeaderNotice.vue +176 -176
- 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 +84 -84
- package/src/pages/login/Login.vue +369 -369
- 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/settings/index.vue +126 -126
- package/src/pages/system/settings/modifyPassword.vue +109 -109
- package/src/router/async/config.async.js +28 -28
- package/src/router/async/router.map.js +66 -68
- 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/common.js +137 -132
- package/src/services/api/commonTempTable.js +10 -10
- package/src/services/api/index.js +17 -17
- package/src/services/api/logininfor/index.js +6 -6
- package/src/services/api/manage.js +8 -8
- package/src/services/apiService.js +14 -14
- package/src/services/user.js +67 -67
- package/src/store/modules/index.js +4 -4
- package/src/theme/default/nprogress.less +76 -76
- package/src/theme/default/style.less +58 -58
- package/src/utils/EncryptUtil.js +53 -53
- 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/map-utils.js +37 -37
- 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 +106 -106
- package/src/pages/system/queryParams/index.vue +0 -43
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-dropdown>
|
|
3
|
-
<div class="header-avatar" style="cursor: pointer">
|
|
4
|
-
<a-avatar class="avatar" size="small" shape="circle" :src="user.avatar"/>
|
|
5
|
-
<span class="name">{{ user.name }}</span>
|
|
6
|
-
</div>
|
|
7
|
-
<a-menu :class="['avatar-menu']" slot="overlay">
|
|
8
|
-
<a-menu-item>
|
|
9
|
-
<a-icon type="user" />
|
|
10
|
-
<span>个人中心</span>
|
|
11
|
-
</a-menu-item>
|
|
12
|
-
<a-menu-item @click="handleToSettings">
|
|
13
|
-
<a-icon type="setting"/>
|
|
14
|
-
<span>设置</span>
|
|
15
|
-
</a-menu-item>
|
|
16
|
-
<a-menu-divider />
|
|
17
|
-
<a-menu-item @click="logout">
|
|
18
|
-
<a-icon style="margin-right: 8px;" type="poweroff" />
|
|
19
|
-
<span>退出登录</span>
|
|
20
|
-
</a-menu-item>
|
|
21
|
-
</a-menu>
|
|
22
|
-
</a-dropdown>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
import { mapGetters } from 'vuex'
|
|
27
|
-
import { logout } from '@vue2-client/services/user'
|
|
28
|
-
|
|
29
|
-
export default {
|
|
30
|
-
name: 'HeaderAvatar',
|
|
31
|
-
computed: {
|
|
32
|
-
...mapGetters('account', ['user'])
|
|
33
|
-
},
|
|
34
|
-
methods: {
|
|
35
|
-
handleToSettings () {
|
|
36
|
-
this.$router.push({ path: '/system/settings' })
|
|
37
|
-
},
|
|
38
|
-
logout () {
|
|
39
|
-
logout().finally(res => {
|
|
40
|
-
location.href = '/login'
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<style lang="less">
|
|
48
|
-
.header-avatar{
|
|
49
|
-
display: inline-flex;
|
|
50
|
-
.avatar, .name{
|
|
51
|
-
align-self: center;
|
|
52
|
-
}
|
|
53
|
-
.avatar{
|
|
54
|
-
margin-right: 8px;
|
|
55
|
-
}
|
|
56
|
-
.name{
|
|
57
|
-
font-weight: 500;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
.avatar-menu{
|
|
61
|
-
width: 150px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-dropdown>
|
|
3
|
+
<div class="header-avatar" style="cursor: pointer">
|
|
4
|
+
<a-avatar class="avatar" size="small" shape="circle" :src="user.avatar"/>
|
|
5
|
+
<span class="name">{{ user.name }}</span>
|
|
6
|
+
</div>
|
|
7
|
+
<a-menu :class="['avatar-menu']" slot="overlay">
|
|
8
|
+
<a-menu-item>
|
|
9
|
+
<a-icon type="user" />
|
|
10
|
+
<span>个人中心</span>
|
|
11
|
+
</a-menu-item>
|
|
12
|
+
<a-menu-item @click="handleToSettings">
|
|
13
|
+
<a-icon type="setting"/>
|
|
14
|
+
<span>设置</span>
|
|
15
|
+
</a-menu-item>
|
|
16
|
+
<a-menu-divider />
|
|
17
|
+
<a-menu-item @click="logout">
|
|
18
|
+
<a-icon style="margin-right: 8px;" type="poweroff" />
|
|
19
|
+
<span>退出登录</span>
|
|
20
|
+
</a-menu-item>
|
|
21
|
+
</a-menu>
|
|
22
|
+
</a-dropdown>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import { mapGetters } from 'vuex'
|
|
27
|
+
import { logout } from '@vue2-client/services/user'
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
name: 'HeaderAvatar',
|
|
31
|
+
computed: {
|
|
32
|
+
...mapGetters('account', ['user'])
|
|
33
|
+
},
|
|
34
|
+
methods: {
|
|
35
|
+
handleToSettings () {
|
|
36
|
+
this.$router.push({ path: '/system/settings' })
|
|
37
|
+
},
|
|
38
|
+
logout () {
|
|
39
|
+
logout().finally(res => {
|
|
40
|
+
location.href = '/login'
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style lang="less">
|
|
48
|
+
.header-avatar{
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
.avatar, .name{
|
|
51
|
+
align-self: center;
|
|
52
|
+
}
|
|
53
|
+
.avatar{
|
|
54
|
+
margin-right: 8px;
|
|
55
|
+
}
|
|
56
|
+
.name{
|
|
57
|
+
font-weight: 500;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
.avatar-menu{
|
|
61
|
+
width: 150px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
</style>
|
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<a-drawer
|
|
4
|
-
:closable="false"
|
|
5
|
-
:visible="institutionDetailVisible"
|
|
6
|
-
:width="screenWidth * 0.5"
|
|
7
|
-
placement="right"
|
|
8
|
-
@close="onClose"
|
|
9
|
-
>
|
|
10
|
-
<institution-detail
|
|
11
|
-
:affirmInstitution="affirmInstitution"
|
|
12
|
-
:institutionId="institution"
|
|
13
|
-
@get_to_be_confirmed="getToBeConfirmed"/>
|
|
14
|
-
</a-drawer>
|
|
15
|
-
<a-dropdown v-model="show" :trigger="['click']">
|
|
16
|
-
<div slot="overlay">
|
|
17
|
-
<a-spin :spinning="loading">
|
|
18
|
-
<a-tabs
|
|
19
|
-
v-model="activeKey"
|
|
20
|
-
:style="{width: '500px'}"
|
|
21
|
-
:tabBarStyle="{textAlign: 'center'}"
|
|
22
|
-
class="dropdown-tabs">
|
|
23
|
-
<a-tab-pane key="1" tab="通知">
|
|
24
|
-
<a-list class="tab-pane">
|
|
25
|
-
</a-list>
|
|
26
|
-
</a-tab-pane>
|
|
27
|
-
<a-tab-pane key="2" tab="消息">
|
|
28
|
-
<a-list class="tab-pane"></a-list>
|
|
29
|
-
</a-tab-pane>
|
|
30
|
-
<a-tab-pane key="3" tab="待办">
|
|
31
|
-
<a-list :data-source="backlog" class="tab-pane" item-layout="horizontal" :pagination="pagination">
|
|
32
|
-
<a-list-item slot="renderItem" slot-scope="item">
|
|
33
|
-
<a v-if="item.type==='制度待确认'" slot="actions" @click="confirm_institution(item)">查看</a>
|
|
34
|
-
<a-list-item-meta :description="item.description" :title="item.title"/>
|
|
35
|
-
</a-list-item>
|
|
36
|
-
</a-list>
|
|
37
|
-
</a-tab-pane>
|
|
38
|
-
</a-tabs>
|
|
39
|
-
</a-spin>
|
|
40
|
-
</div>
|
|
41
|
-
<span class="header-notice" @click="fetchNotice">
|
|
42
|
-
<a-badge :count="backlog.length" class="notice-badge">
|
|
43
|
-
<a-icon :class="['header-notice-icon']" type="bell"/>
|
|
44
|
-
</a-badge>
|
|
45
|
-
</span>
|
|
46
|
-
</a-dropdown>
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
import { post } from '@vue2-client/services/api'
|
|
52
|
-
import InstitutionDetail from './InstitutionDetail'
|
|
53
|
-
import ellipsis from '@vue2-client/components/Ellipsis'
|
|
54
|
-
|
|
55
|
-
export default {
|
|
56
|
-
name: 'HeaderNotice',
|
|
57
|
-
data () {
|
|
58
|
-
return {
|
|
59
|
-
loading: false,
|
|
60
|
-
screenWidth: document.documentElement.clientWidth,
|
|
61
|
-
show: false,
|
|
62
|
-
institutionDetailVisible: false,
|
|
63
|
-
institution: undefined,
|
|
64
|
-
affirmInstitution: undefined,
|
|
65
|
-
backlog: [],
|
|
66
|
-
pagination: {
|
|
67
|
-
onChange: page => {
|
|
68
|
-
console.log(page)
|
|
69
|
-
},
|
|
70
|
-
pageSize: 5
|
|
71
|
-
},
|
|
72
|
-
activeKey: '1'
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
components: { InstitutionDetail },
|
|
76
|
-
computed: {},
|
|
77
|
-
created () {
|
|
78
|
-
this.getToBeConfirmed()
|
|
79
|
-
},
|
|
80
|
-
methods: {
|
|
81
|
-
onClose () {
|
|
82
|
-
this.institutionDetailVisible = false
|
|
83
|
-
this.getToBeConfirmed()
|
|
84
|
-
},
|
|
85
|
-
getToBeConfirmed () {
|
|
86
|
-
this.institutionDetailVisible = false
|
|
87
|
-
try {
|
|
88
|
-
if (this.$login.f.name) {
|
|
89
|
-
post('/api/
|
|
90
|
-
this.backlog = [...res]
|
|
91
|
-
if (this.backlog.length > 0) {
|
|
92
|
-
const key = `open${Date.now()}`
|
|
93
|
-
this.$notification.open({
|
|
94
|
-
key,
|
|
95
|
-
message: `您有${this.backlog.length}条待办需要确认`,
|
|
96
|
-
top: '50px',
|
|
97
|
-
description: <ellipsis length="200">{ this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';') }</ellipsis>,
|
|
98
|
-
icon: <a-icon type="container" style="color: #f5222d"/>,
|
|
99
|
-
btn: h => {
|
|
100
|
-
return h(
|
|
101
|
-
'a-button',
|
|
102
|
-
{
|
|
103
|
-
props: {
|
|
104
|
-
type: 'primary',
|
|
105
|
-
size: 'small',
|
|
106
|
-
},
|
|
107
|
-
on: {
|
|
108
|
-
click: () => this.viewBacklog(key),
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
'查看',
|
|
112
|
-
)
|
|
113
|
-
}
|
|
114
|
-
})
|
|
115
|
-
}
|
|
116
|
-
})
|
|
117
|
-
}
|
|
118
|
-
} catch (e) {
|
|
119
|
-
console.log(e)
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
viewBacklog (key) {
|
|
123
|
-
this.$notification.close(key)
|
|
124
|
-
this.show = true
|
|
125
|
-
this.activeKey = '3'
|
|
126
|
-
},
|
|
127
|
-
confirm_institution (item) {
|
|
128
|
-
this.institutionDetailVisible = true
|
|
129
|
-
this.show = false
|
|
130
|
-
this.institution = item.institution
|
|
131
|
-
this.affirmInstitution = item.id
|
|
132
|
-
},
|
|
133
|
-
fetchNotice () {
|
|
134
|
-
if (this.loading) {
|
|
135
|
-
this.loading = false
|
|
136
|
-
return
|
|
137
|
-
}
|
|
138
|
-
this.loadding = true
|
|
139
|
-
setTimeout(() => {
|
|
140
|
-
this.loadding = false
|
|
141
|
-
}, 1000)
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
</script>
|
|
146
|
-
|
|
147
|
-
<style lang="less">
|
|
148
|
-
.header-notice {
|
|
149
|
-
display: inline-block;
|
|
150
|
-
transition: all 0.3s;
|
|
151
|
-
|
|
152
|
-
span {
|
|
153
|
-
vertical-align: initial;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.notice-badge {
|
|
157
|
-
color: inherit;
|
|
158
|
-
|
|
159
|
-
.header-notice-icon {
|
|
160
|
-
font-size: 16px;
|
|
161
|
-
padding: 4px;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.dropdown-tabs {
|
|
167
|
-
background-color: @base-bg-color;
|
|
168
|
-
box-shadow: 0 2px 8px @shadow-color;
|
|
169
|
-
border-radius: 4px;
|
|
170
|
-
|
|
171
|
-
.tab-pane {
|
|
172
|
-
padding: 0 24px 12px;
|
|
173
|
-
min-height: 250px;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a-drawer
|
|
4
|
+
:closable="false"
|
|
5
|
+
:visible="institutionDetailVisible"
|
|
6
|
+
:width="screenWidth * 0.5"
|
|
7
|
+
placement="right"
|
|
8
|
+
@close="onClose"
|
|
9
|
+
>
|
|
10
|
+
<institution-detail
|
|
11
|
+
:affirmInstitution="affirmInstitution"
|
|
12
|
+
:institutionId="institution"
|
|
13
|
+
@get_to_be_confirmed="getToBeConfirmed"/>
|
|
14
|
+
</a-drawer>
|
|
15
|
+
<a-dropdown v-model="show" :trigger="['click']">
|
|
16
|
+
<div slot="overlay">
|
|
17
|
+
<a-spin :spinning="loading">
|
|
18
|
+
<a-tabs
|
|
19
|
+
v-model="activeKey"
|
|
20
|
+
:style="{width: '500px'}"
|
|
21
|
+
:tabBarStyle="{textAlign: 'center'}"
|
|
22
|
+
class="dropdown-tabs">
|
|
23
|
+
<a-tab-pane key="1" tab="通知">
|
|
24
|
+
<a-list class="tab-pane">
|
|
25
|
+
</a-list>
|
|
26
|
+
</a-tab-pane>
|
|
27
|
+
<a-tab-pane key="2" tab="消息">
|
|
28
|
+
<a-list class="tab-pane"></a-list>
|
|
29
|
+
</a-tab-pane>
|
|
30
|
+
<a-tab-pane key="3" tab="待办">
|
|
31
|
+
<a-list :data-source="backlog" class="tab-pane" item-layout="horizontal" :pagination="pagination">
|
|
32
|
+
<a-list-item slot="renderItem" slot-scope="item">
|
|
33
|
+
<a v-if="item.type==='制度待确认'" slot="actions" @click="confirm_institution(item)">查看</a>
|
|
34
|
+
<a-list-item-meta :description="item.description" :title="item.title"/>
|
|
35
|
+
</a-list-item>
|
|
36
|
+
</a-list>
|
|
37
|
+
</a-tab-pane>
|
|
38
|
+
</a-tabs>
|
|
39
|
+
</a-spin>
|
|
40
|
+
</div>
|
|
41
|
+
<span class="header-notice" @click="fetchNotice">
|
|
42
|
+
<a-badge :count="backlog.length" class="notice-badge">
|
|
43
|
+
<a-icon :class="['header-notice-icon']" type="bell"/>
|
|
44
|
+
</a-badge>
|
|
45
|
+
</span>
|
|
46
|
+
</a-dropdown>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import { post } from '@vue2-client/services/api'
|
|
52
|
+
import InstitutionDetail from './InstitutionDetail'
|
|
53
|
+
import ellipsis from '@vue2-client/components/Ellipsis'
|
|
54
|
+
|
|
55
|
+
export default {
|
|
56
|
+
name: 'HeaderNotice',
|
|
57
|
+
data () {
|
|
58
|
+
return {
|
|
59
|
+
loading: false,
|
|
60
|
+
screenWidth: document.documentElement.clientWidth,
|
|
61
|
+
show: false,
|
|
62
|
+
institutionDetailVisible: false,
|
|
63
|
+
institution: undefined,
|
|
64
|
+
affirmInstitution: undefined,
|
|
65
|
+
backlog: [],
|
|
66
|
+
pagination: {
|
|
67
|
+
onChange: page => {
|
|
68
|
+
console.log(page)
|
|
69
|
+
},
|
|
70
|
+
pageSize: 5
|
|
71
|
+
},
|
|
72
|
+
activeKey: '1'
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
components: { InstitutionDetail },
|
|
76
|
+
computed: {},
|
|
77
|
+
created () {
|
|
78
|
+
this.getToBeConfirmed()
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
onClose () {
|
|
82
|
+
this.institutionDetailVisible = false
|
|
83
|
+
this.getToBeConfirmed()
|
|
84
|
+
},
|
|
85
|
+
getToBeConfirmed () {
|
|
86
|
+
this.institutionDetailVisible = false
|
|
87
|
+
try {
|
|
88
|
+
if (this.$login.f.name) {
|
|
89
|
+
post('/api/system/logic/getTodo', { name: this.$login.f.name }).then(res => {
|
|
90
|
+
this.backlog = [...res]
|
|
91
|
+
if (this.backlog.length > 0) {
|
|
92
|
+
const key = `open${Date.now()}`
|
|
93
|
+
this.$notification.open({
|
|
94
|
+
key,
|
|
95
|
+
message: `您有${this.backlog.length}条待办需要确认`,
|
|
96
|
+
top: '50px',
|
|
97
|
+
description: <ellipsis length="200">{ this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';') }</ellipsis>,
|
|
98
|
+
icon: <a-icon type="container" style="color: #f5222d"/>,
|
|
99
|
+
btn: h => {
|
|
100
|
+
return h(
|
|
101
|
+
'a-button',
|
|
102
|
+
{
|
|
103
|
+
props: {
|
|
104
|
+
type: 'primary',
|
|
105
|
+
size: 'small',
|
|
106
|
+
},
|
|
107
|
+
on: {
|
|
108
|
+
click: () => this.viewBacklog(key),
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
'查看',
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
}
|
|
118
|
+
} catch (e) {
|
|
119
|
+
console.log(e)
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
viewBacklog (key) {
|
|
123
|
+
this.$notification.close(key)
|
|
124
|
+
this.show = true
|
|
125
|
+
this.activeKey = '3'
|
|
126
|
+
},
|
|
127
|
+
confirm_institution (item) {
|
|
128
|
+
this.institutionDetailVisible = true
|
|
129
|
+
this.show = false
|
|
130
|
+
this.institution = item.institution
|
|
131
|
+
this.affirmInstitution = item.id
|
|
132
|
+
},
|
|
133
|
+
fetchNotice () {
|
|
134
|
+
if (this.loading) {
|
|
135
|
+
this.loading = false
|
|
136
|
+
return
|
|
137
|
+
}
|
|
138
|
+
this.loadding = true
|
|
139
|
+
setTimeout(() => {
|
|
140
|
+
this.loadding = false
|
|
141
|
+
}, 1000)
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<style lang="less">
|
|
148
|
+
.header-notice {
|
|
149
|
+
display: inline-block;
|
|
150
|
+
transition: all 0.3s;
|
|
151
|
+
|
|
152
|
+
span {
|
|
153
|
+
vertical-align: initial;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.notice-badge {
|
|
157
|
+
color: inherit;
|
|
158
|
+
|
|
159
|
+
.header-notice-icon {
|
|
160
|
+
font-size: 16px;
|
|
161
|
+
padding: 4px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.dropdown-tabs {
|
|
167
|
+
background-color: @base-bg-color;
|
|
168
|
+
box-shadow: 0 2px 8px @shadow-color;
|
|
169
|
+
border-radius: 4px;
|
|
170
|
+
|
|
171
|
+
.tab-pane {
|
|
172
|
+
padding: 0 24px 12px;
|
|
173
|
+
min-height: 250px;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
</style>
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="header-search">
|
|
3
|
-
<a-icon type="search" class="search-icon" @click="enterSearchMode"/>
|
|
4
|
-
<a-auto-complete
|
|
5
|
-
ref="input"
|
|
6
|
-
:getPopupContainer="e => {return e.parentNode || document.body}"
|
|
7
|
-
:dataSource="dataSource"
|
|
8
|
-
:class="['search-input', searchMode ? 'enter' : 'leave']"
|
|
9
|
-
placeholder="站内搜索"
|
|
10
|
-
@blur="leaveSearchMode"
|
|
11
|
-
>
|
|
12
|
-
</a-auto-complete>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
name: 'HeaderSearch',
|
|
19
|
-
data () {
|
|
20
|
-
return {
|
|
21
|
-
dataSource: ['选项一', '选项二'],
|
|
22
|
-
searchMode: false
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
enterSearchMode () {
|
|
27
|
-
this.searchMode = true
|
|
28
|
-
this.$emit('active', true)
|
|
29
|
-
setTimeout(() => this.$refs.input.focus(), 300)
|
|
30
|
-
},
|
|
31
|
-
leaveSearchMode () {
|
|
32
|
-
this.searchMode = false
|
|
33
|
-
setTimeout(() => this.$emit('active', false), 300)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<style lang="less">
|
|
40
|
-
.header-search{
|
|
41
|
-
.search-icon{
|
|
42
|
-
font-size: 16px;
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
}
|
|
45
|
-
.search-input{
|
|
46
|
-
border: 0;
|
|
47
|
-
border-bottom: 1px solid @border-color-split;
|
|
48
|
-
transition: width 0.3s ease-in-out;
|
|
49
|
-
input{
|
|
50
|
-
border: 0;
|
|
51
|
-
box-shadow: 0 0 0 0;
|
|
52
|
-
}
|
|
53
|
-
&.leave{
|
|
54
|
-
width: 0;
|
|
55
|
-
input{
|
|
56
|
-
display: none;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
&.enter{
|
|
60
|
-
width: 200px;
|
|
61
|
-
input:focus{
|
|
62
|
-
box-shadow: 0 0 0 0;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="header-search">
|
|
3
|
+
<a-icon type="search" class="search-icon" @click="enterSearchMode"/>
|
|
4
|
+
<a-auto-complete
|
|
5
|
+
ref="input"
|
|
6
|
+
:getPopupContainer="e => {return e.parentNode || document.body}"
|
|
7
|
+
:dataSource="dataSource"
|
|
8
|
+
:class="['search-input', searchMode ? 'enter' : 'leave']"
|
|
9
|
+
placeholder="站内搜索"
|
|
10
|
+
@blur="leaveSearchMode"
|
|
11
|
+
>
|
|
12
|
+
</a-auto-complete>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
name: 'HeaderSearch',
|
|
19
|
+
data () {
|
|
20
|
+
return {
|
|
21
|
+
dataSource: ['选项一', '选项二'],
|
|
22
|
+
searchMode: false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
enterSearchMode () {
|
|
27
|
+
this.searchMode = true
|
|
28
|
+
this.$emit('active', true)
|
|
29
|
+
setTimeout(() => this.$refs.input.focus(), 300)
|
|
30
|
+
},
|
|
31
|
+
leaveSearchMode () {
|
|
32
|
+
this.searchMode = false
|
|
33
|
+
setTimeout(() => this.$emit('active', false), 300)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style lang="less">
|
|
40
|
+
.header-search{
|
|
41
|
+
.search-icon{
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
.search-input{
|
|
46
|
+
border: 0;
|
|
47
|
+
border-bottom: 1px solid @border-color-split;
|
|
48
|
+
transition: width 0.3s ease-in-out;
|
|
49
|
+
input{
|
|
50
|
+
border: 0;
|
|
51
|
+
box-shadow: 0 0 0 0;
|
|
52
|
+
}
|
|
53
|
+
&.leave{
|
|
54
|
+
width: 0;
|
|
55
|
+
input{
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
&.enter{
|
|
60
|
+
width: 200px;
|
|
61
|
+
input:focus{
|
|
62
|
+
box-shadow: 0 0 0 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</style>
|