vue2-client 1.4.20 → 1.4.21
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 +388 -388
- 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/CreateQuery.vue +595 -595
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
- 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/XAddForm/XAddForm.vue +354 -354
- 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 +365 -365
- 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/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/replacer/resolve.config.js +67 -67
- package/src/layouts/AdminLayout.vue +174 -174
- package/src/layouts/SinglePageView.vue +88 -88
- 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/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 +65 -65
- package/src/pages/login/Login.vue +351 -342
- 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/pages/system/ticket/index.vue +475 -474
- package/src/router/async/config.async.js +27 -27
- package/src/router/async/router.map.js +65 -65
- 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/commonTempTable.js +10 -10
- package/src/services/api/index.js +17 -17
- package/src/services/api/manage.js +8 -8
- package/src/services/apiService.js +14 -14
- 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 +103 -103
- 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/routerUtil.js +364 -364
- package/src/utils/theme-color-replacer-extend.js +91 -91
- package/src/utils/themeUtil.js +100 -100
- package/src/utils/util.js +230 -230
|
@@ -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>
|
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-dropdown v-model="show" :trigger="['click']">
|
|
3
|
-
<div slot="overlay">
|
|
4
|
-
<a-spin :spinning="loading">
|
|
5
|
-
<a-tabs
|
|
6
|
-
v-model="activeKey"
|
|
7
|
-
:style="{width: '297px'}"
|
|
8
|
-
:tabBarStyle="{textAlign: 'center'}"
|
|
9
|
-
class="dropdown-tabs">
|
|
10
|
-
<a-tab-pane key="1" tab="通知">
|
|
11
|
-
<a-list class="tab-pane">
|
|
12
|
-
</a-list>
|
|
13
|
-
</a-tab-pane>
|
|
14
|
-
<a-tab-pane key="2" tab="消息">
|
|
15
|
-
<a-list class="tab-pane"></a-list>
|
|
16
|
-
</a-tab-pane>
|
|
17
|
-
<a-tab-pane key="3" tab="待办">
|
|
18
|
-
<a-list :data-source="backlog" class="tab-pane" item-layout="horizontal">
|
|
19
|
-
<a-list-item slot="renderItem" slot-scope="item">
|
|
20
|
-
<a v-if="item.type==='制度待确认'" slot="actions" @click="confirm_institution(item)">查看</a>
|
|
21
|
-
<a-list-item-meta :description="item.description" :title="item.title"/>
|
|
22
|
-
</a-list-item>
|
|
23
|
-
</a-list>
|
|
24
|
-
</a-tab-pane>
|
|
25
|
-
<a-drawer
|
|
26
|
-
:closable="false"
|
|
27
|
-
:visible="institutionDetailVisible"
|
|
28
|
-
:width="screenWidth * 0.5"
|
|
29
|
-
placement="right"
|
|
30
|
-
@close="onClose"
|
|
31
|
-
>
|
|
32
|
-
<institution-detail
|
|
33
|
-
:affirmInstitution="affirmInstitution"
|
|
34
|
-
:institutionId="institution"
|
|
35
|
-
@get_to_be_confirmed="getToBeConfirmed"/>
|
|
36
|
-
</a-drawer>
|
|
37
|
-
</a-tabs>
|
|
38
|
-
</a-spin>
|
|
39
|
-
</div>
|
|
40
|
-
<span class="header-notice" @click="fetchNotice">
|
|
41
|
-
<a-badge :count="backlog.length" class="notice-badge">
|
|
42
|
-
<a-icon :class="['header-notice-icon']" type="bell"/>
|
|
43
|
-
</a-badge>
|
|
44
|
-
</span>
|
|
45
|
-
</a-dropdown>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<script>
|
|
49
|
-
import { post } from '@vue2-client/services/api'
|
|
50
|
-
import InstitutionDetail from './InstitutionDetail'
|
|
51
|
-
|
|
52
|
-
export default {
|
|
53
|
-
name: 'HeaderNotice',
|
|
54
|
-
data () {
|
|
55
|
-
return {
|
|
56
|
-
loading: false,
|
|
57
|
-
screenWidth: document.documentElement.clientWidth,
|
|
58
|
-
show: false,
|
|
59
|
-
institutionDetailVisible: false,
|
|
60
|
-
institution: undefined,
|
|
61
|
-
affirmInstitution: undefined,
|
|
62
|
-
backlog: [],
|
|
63
|
-
activeKey: '1'
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
components: { InstitutionDetail },
|
|
67
|
-
computed: {},
|
|
68
|
-
created () {
|
|
69
|
-
this.getToBeConfirmed()
|
|
70
|
-
},
|
|
71
|
-
methods: {
|
|
72
|
-
onClose () {
|
|
73
|
-
this.institutionDetailVisible = false
|
|
74
|
-
this.getToBeConfirmed()
|
|
75
|
-
},
|
|
76
|
-
getToBeConfirmed () {
|
|
77
|
-
this.institutionDetailVisible = false
|
|
78
|
-
try {
|
|
79
|
-
if (this.$login.f.name) {
|
|
80
|
-
post('/api/af-system/logic/getTodo', { name: this.$login.f.name }).then(res => {
|
|
81
|
-
this.backlog = [...res]
|
|
82
|
-
if (this.backlog.length > 0) {
|
|
83
|
-
const key = `open${Date.now()}`
|
|
84
|
-
this.$notification.open({
|
|
85
|
-
key,
|
|
86
|
-
message: `您有${this.backlog.length}条待办需要确认`,
|
|
87
|
-
top: '50px',
|
|
88
|
-
description: this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';'),
|
|
89
|
-
icon: <a-icon type="container" style="color: #f5222d"/>,
|
|
90
|
-
btn: h => {
|
|
91
|
-
return h(
|
|
92
|
-
'a-button',
|
|
93
|
-
{
|
|
94
|
-
props: {
|
|
95
|
-
type: 'primary',
|
|
96
|
-
size: 'small',
|
|
97
|
-
},
|
|
98
|
-
on: {
|
|
99
|
-
click: () => this.viewBacklog(key),
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
'查看',
|
|
103
|
-
)
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
}
|
|
109
|
-
} catch (e) {
|
|
110
|
-
console.log(e)
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
viewBacklog (key) {
|
|
114
|
-
this.$notification.close(key)
|
|
115
|
-
this.show = true
|
|
116
|
-
this.activeKey = '3'
|
|
117
|
-
},
|
|
118
|
-
confirm_institution (item) {
|
|
119
|
-
this.institutionDetailVisible = true
|
|
120
|
-
this.show = false
|
|
121
|
-
this.institution = item.institution
|
|
122
|
-
this.affirmInstitution = item.id
|
|
123
|
-
},
|
|
124
|
-
fetchNotice () {
|
|
125
|
-
if (this.loading) {
|
|
126
|
-
this.loading = false
|
|
127
|
-
return
|
|
128
|
-
}
|
|
129
|
-
this.loadding = true
|
|
130
|
-
setTimeout(() => {
|
|
131
|
-
this.loadding = false
|
|
132
|
-
}, 1000)
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
</script>
|
|
137
|
-
|
|
138
|
-
<style lang="less">
|
|
139
|
-
.header-notice {
|
|
140
|
-
display: inline-block;
|
|
141
|
-
transition: all 0.3s;
|
|
142
|
-
|
|
143
|
-
span {
|
|
144
|
-
vertical-align: initial;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.notice-badge {
|
|
148
|
-
color: inherit;
|
|
149
|
-
|
|
150
|
-
.header-notice-icon {
|
|
151
|
-
font-size: 16px;
|
|
152
|
-
padding: 4px;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.dropdown-tabs {
|
|
158
|
-
background-color: @base-bg-color;
|
|
159
|
-
box-shadow: 0 2px 8px @shadow-color;
|
|
160
|
-
border-radius: 4px;
|
|
161
|
-
|
|
162
|
-
.tab-pane {
|
|
163
|
-
padding: 0 24px 12px;
|
|
164
|
-
min-height: 250px;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-dropdown v-model="show" :trigger="['click']">
|
|
3
|
+
<div slot="overlay">
|
|
4
|
+
<a-spin :spinning="loading">
|
|
5
|
+
<a-tabs
|
|
6
|
+
v-model="activeKey"
|
|
7
|
+
:style="{width: '297px'}"
|
|
8
|
+
:tabBarStyle="{textAlign: 'center'}"
|
|
9
|
+
class="dropdown-tabs">
|
|
10
|
+
<a-tab-pane key="1" tab="通知">
|
|
11
|
+
<a-list class="tab-pane">
|
|
12
|
+
</a-list>
|
|
13
|
+
</a-tab-pane>
|
|
14
|
+
<a-tab-pane key="2" tab="消息">
|
|
15
|
+
<a-list class="tab-pane"></a-list>
|
|
16
|
+
</a-tab-pane>
|
|
17
|
+
<a-tab-pane key="3" tab="待办">
|
|
18
|
+
<a-list :data-source="backlog" class="tab-pane" item-layout="horizontal">
|
|
19
|
+
<a-list-item slot="renderItem" slot-scope="item">
|
|
20
|
+
<a v-if="item.type==='制度待确认'" slot="actions" @click="confirm_institution(item)">查看</a>
|
|
21
|
+
<a-list-item-meta :description="item.description" :title="item.title"/>
|
|
22
|
+
</a-list-item>
|
|
23
|
+
</a-list>
|
|
24
|
+
</a-tab-pane>
|
|
25
|
+
<a-drawer
|
|
26
|
+
:closable="false"
|
|
27
|
+
:visible="institutionDetailVisible"
|
|
28
|
+
:width="screenWidth * 0.5"
|
|
29
|
+
placement="right"
|
|
30
|
+
@close="onClose"
|
|
31
|
+
>
|
|
32
|
+
<institution-detail
|
|
33
|
+
:affirmInstitution="affirmInstitution"
|
|
34
|
+
:institutionId="institution"
|
|
35
|
+
@get_to_be_confirmed="getToBeConfirmed"/>
|
|
36
|
+
</a-drawer>
|
|
37
|
+
</a-tabs>
|
|
38
|
+
</a-spin>
|
|
39
|
+
</div>
|
|
40
|
+
<span class="header-notice" @click="fetchNotice">
|
|
41
|
+
<a-badge :count="backlog.length" class="notice-badge">
|
|
42
|
+
<a-icon :class="['header-notice-icon']" type="bell"/>
|
|
43
|
+
</a-badge>
|
|
44
|
+
</span>
|
|
45
|
+
</a-dropdown>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script>
|
|
49
|
+
import { post } from '@vue2-client/services/api'
|
|
50
|
+
import InstitutionDetail from './InstitutionDetail'
|
|
51
|
+
|
|
52
|
+
export default {
|
|
53
|
+
name: 'HeaderNotice',
|
|
54
|
+
data () {
|
|
55
|
+
return {
|
|
56
|
+
loading: false,
|
|
57
|
+
screenWidth: document.documentElement.clientWidth,
|
|
58
|
+
show: false,
|
|
59
|
+
institutionDetailVisible: false,
|
|
60
|
+
institution: undefined,
|
|
61
|
+
affirmInstitution: undefined,
|
|
62
|
+
backlog: [],
|
|
63
|
+
activeKey: '1'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
components: { InstitutionDetail },
|
|
67
|
+
computed: {},
|
|
68
|
+
created () {
|
|
69
|
+
this.getToBeConfirmed()
|
|
70
|
+
},
|
|
71
|
+
methods: {
|
|
72
|
+
onClose () {
|
|
73
|
+
this.institutionDetailVisible = false
|
|
74
|
+
this.getToBeConfirmed()
|
|
75
|
+
},
|
|
76
|
+
getToBeConfirmed () {
|
|
77
|
+
this.institutionDetailVisible = false
|
|
78
|
+
try {
|
|
79
|
+
if (this.$login.f.name) {
|
|
80
|
+
post('/api/af-system/logic/getTodo', { name: this.$login.f.name }).then(res => {
|
|
81
|
+
this.backlog = [...res]
|
|
82
|
+
if (this.backlog.length > 0) {
|
|
83
|
+
const key = `open${Date.now()}`
|
|
84
|
+
this.$notification.open({
|
|
85
|
+
key,
|
|
86
|
+
message: `您有${this.backlog.length}条待办需要确认`,
|
|
87
|
+
top: '50px',
|
|
88
|
+
description: this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';'),
|
|
89
|
+
icon: <a-icon type="container" style="color: #f5222d"/>,
|
|
90
|
+
btn: h => {
|
|
91
|
+
return h(
|
|
92
|
+
'a-button',
|
|
93
|
+
{
|
|
94
|
+
props: {
|
|
95
|
+
type: 'primary',
|
|
96
|
+
size: 'small',
|
|
97
|
+
},
|
|
98
|
+
on: {
|
|
99
|
+
click: () => this.viewBacklog(key),
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
'查看',
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
}
|
|
109
|
+
} catch (e) {
|
|
110
|
+
console.log(e)
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
viewBacklog (key) {
|
|
114
|
+
this.$notification.close(key)
|
|
115
|
+
this.show = true
|
|
116
|
+
this.activeKey = '3'
|
|
117
|
+
},
|
|
118
|
+
confirm_institution (item) {
|
|
119
|
+
this.institutionDetailVisible = true
|
|
120
|
+
this.show = false
|
|
121
|
+
this.institution = item.institution
|
|
122
|
+
this.affirmInstitution = item.id
|
|
123
|
+
},
|
|
124
|
+
fetchNotice () {
|
|
125
|
+
if (this.loading) {
|
|
126
|
+
this.loading = false
|
|
127
|
+
return
|
|
128
|
+
}
|
|
129
|
+
this.loadding = true
|
|
130
|
+
setTimeout(() => {
|
|
131
|
+
this.loadding = false
|
|
132
|
+
}, 1000)
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
</script>
|
|
137
|
+
|
|
138
|
+
<style lang="less">
|
|
139
|
+
.header-notice {
|
|
140
|
+
display: inline-block;
|
|
141
|
+
transition: all 0.3s;
|
|
142
|
+
|
|
143
|
+
span {
|
|
144
|
+
vertical-align: initial;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.notice-badge {
|
|
148
|
+
color: inherit;
|
|
149
|
+
|
|
150
|
+
.header-notice-icon {
|
|
151
|
+
font-size: 16px;
|
|
152
|
+
padding: 4px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.dropdown-tabs {
|
|
158
|
+
background-color: @base-bg-color;
|
|
159
|
+
box-shadow: 0 2px 8px @shadow-color;
|
|
160
|
+
border-radius: 4px;
|
|
161
|
+
|
|
162
|
+
.tab-pane {
|
|
163
|
+
padding: 0 24px 12px;
|
|
164
|
+
min-height: 250px;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
</style>
|