n20-common-lib 1.1.98
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 +27 -0
- package/package.json +87 -0
- package/src/_qiankun/index.js +113 -0
- package/src/_qiankun/postMessage.js +48 -0
- package/src/assets/css/_coreLib.scss +35 -0
- package/src/assets/css/cl-anchor.scss +24 -0
- package/src/assets/css/cl-approve-card.scss +58 -0
- package/src/assets/css/cl-dialog.scss +99 -0
- package/src/assets/css/cl-drag-list.scss +22 -0
- package/src/assets/css/cl-empty.scss +10 -0
- package/src/assets/css/cl-expandable-pane.scss +25 -0
- package/src/assets/css/cl-expandable.scss +23 -0
- package/src/assets/css/cl-file-upload-table.scss +11 -0
- package/src/assets/css/cl-filter.scss +4 -0
- package/src/assets/css/cl-flow-step.scss +186 -0
- package/src/assets/css/cl-footer-box.scss +10 -0
- package/src/assets/css/cl-form-item.scss +322 -0
- package/src/assets/css/cl-general-card.scss +12 -0
- package/src/assets/css/cl-layout-aside.scss +88 -0
- package/src/assets/css/cl-layout-content.scss +16 -0
- package/src/assets/css/cl-layout-header.scss +73 -0
- package/src/assets/css/cl-layout-tabs.scss +87 -0
- package/src/assets/css/cl-layout.scss +97 -0
- package/src/assets/css/cl-login-temporary.scss +37 -0
- package/src/assets/css/cl-message.scss +75 -0
- package/src/assets/css/cl-more-tab.scss +98 -0
- package/src/assets/css/cl-nav-menu.scss +5 -0
- package/src/assets/css/cl-pagination.scss +65 -0
- package/src/assets/css/cl-secondary-tab.scss +39 -0
- package/src/assets/css/cl-showcolumn.scss +23 -0
- package/src/assets/css/cl-sifting.scss +51 -0
- package/src/assets/css/cl-statis.scss +42 -0
- package/src/assets/css/cl-step.scss +73 -0
- package/src/assets/css/cl-suspend.scss +19 -0
- package/src/assets/css/cl-tertiary-tab.scss +9 -0
- package/src/assets/css/cl-upload.scss +41 -0
- package/src/assets/css/cl-worn-pagination.scss +50 -0
- package/src/assets/css/el-button.scss +169 -0
- package/src/assets/css/el-table.scss +79 -0
- package/src/assets/css/element-variables.scss +1061 -0
- package/src/assets/css/element.dev.scss +21 -0
- package/src/assets/css/font-icon.scss +26 -0
- package/src/assets/css/index.dev.scss +4 -0
- package/src/assets/css/index.scss +11 -0
- package/src/assets/css/normalize.scss +723 -0
- package/src/assets/css/rootvar.scss +139 -0
- package/src/assets/css/select.scss +26 -0
- package/src/assets/css/title-pop.scss +4 -0
- package/src/assets/getJsonc.js +50 -0
- package/src/assets/realUrl.js +12 -0
- package/src/components/Anchor/AnchorItem.vue +30 -0
- package/src/components/Anchor/index.vue +185 -0
- package/src/components/ApprovalButtons/index.vue +232 -0
- package/src/components/ApprovalCard/index.vue +128 -0
- package/src/components/ApprovalRecord/approvalImg.vue +39 -0
- package/src/components/ApprovalRecord/index.vue +59 -0
- package/src/components/Button/button-group.vue +150 -0
- package/src/components/Button/icon-group-button.vue +61 -0
- package/src/components/Button/index.vue +56 -0
- package/src/components/ContentLoading/index.vue +41 -0
- package/src/components/ContentNull/index.vue +19 -0
- package/src/components/DatePicker/index.vue +27 -0
- package/src/components/DatePicker/por.vue +169 -0
- package/src/components/Dialog/index.vue +26 -0
- package/src/components/Dialog/indexO.vue +116 -0
- package/src/components/DragList/index.vue +68 -0
- package/src/components/Empty/img/404.png +0 -0
- package/src/components/Empty/img/abnormal.svg +109 -0
- package/src/components/Empty/img/dispose.svg +72 -0
- package/src/components/Empty/img/empty.svg +58 -0
- package/src/components/Empty/img/general.svg +59 -0
- package/src/components/Empty/img/lock.svg +58 -0
- package/src/components/Empty/img/network.svg +60 -0
- package/src/components/Empty/img/relevant.svg +69 -0
- package/src/components/Empty/img/search.svg +73 -0
- package/src/components/Empty/index.vue +92 -0
- package/src/components/Expandable/index.vue +49 -0
- package/src/components/Expandable/main.vue +52 -0
- package/src/components/FileUploadTable/index.vue +484 -0
- package/src/components/Filters/index.vue +358 -0
- package/src/components/Filters/indexO.vue +104 -0
- package/src/components/FlowStep/index.vue +69 -0
- package/src/components/FooterBox/index.vue +21 -0
- package/src/components/GeneralCard/index.vue +15 -0
- package/src/components/InputNumber/index.vue +153 -0
- package/src/components/InputNumber/numberRange.vue +47 -0
- package/src/components/InputSearch/index.vue +75 -0
- package/src/components/Layout/AsideNav/index.vue +144 -0
- package/src/components/Layout/HeaderWrap/changePwd.vue +215 -0
- package/src/components/Layout/HeaderWrap/index.vue +336 -0
- package/src/components/Layout/HeaderWrap/noticePop.vue +300 -0
- package/src/components/Layout/SubContent/index.vue +131 -0
- package/src/components/Layout/TabsNav/index.vue +170 -0
- package/src/components/Layout/index.vue +529 -0
- package/src/components/Layout/utils.js +12 -0
- package/src/components/LoginTemporary/form.vue +511 -0
- package/src/components/LoginTemporary/index.vue +122 -0
- package/src/components/LoginTemporary/qr.png +0 -0
- package/src/components/LoginTemporary/qrcode.vue +90 -0
- package/src/components/LoginTemporary/qrt.png +0 -0
- package/src/components/LoginTemporary/retrievePw.vue +28 -0
- package/src/components/LoginTemporary/utils.js +73 -0
- package/src/components/MicroApp/index.js +67 -0
- package/src/components/MicroFrame/index.vue +95 -0
- package/src/components/MoreTab/index.vue +232 -0
- package/src/components/NavMenu/index.vue +60 -0
- package/src/components/NstcG6Components/NstcApprovel/NstcApprovel.vue +13 -0
- package/src/components/NstcG6Components/NstcDialog/NstcDialog.vue +185 -0
- package/src/components/NstcG6Components/Progress/progress.vue +134 -0
- package/src/components/PageLayout/page.vue +15 -0
- package/src/components/Pagination/index.vue +96 -0
- package/src/components/SecondaryTab/index.vue +58 -0
- package/src/components/SelectLazy/index.vue +75 -0
- package/src/components/SelectTree/SelectTreeLazy.vue +241 -0
- package/src/components/SelectTree/index.vue +208 -0
- package/src/components/ShowColumn/index.vue +188 -0
- package/src/components/Sifting/index.vue +99 -0
- package/src/components/Statis/index.vue +97 -0
- package/src/components/Statis/statisItem.vue +54 -0
- package/src/components/Statis/statisPopover.vue +55 -0
- package/src/components/Step/index.vue +38 -0
- package/src/components/Suspend/index.vue +72 -0
- package/src/components/Table/index.vue +131 -0
- package/src/components/Table/indexO.vue +149 -0
- package/src/components/Task/index.vue +26 -0
- package/src/components/TertiaryTab/index.vue +53 -0
- package/src/components/TimePicker/index.vue +28 -0
- package/src/components/Upload/index.vue +242 -0
- package/src/components/WornPagination/index.vue +73 -0
- package/src/directives/VClickOutside/index.js +19 -0
- package/src/directives/VDrag/index.js +72 -0
- package/src/directives/VHas/index.js +27 -0
- package/src/directives/VMove/index.js +42 -0
- package/src/directives/VTitle/index.js +56 -0
- package/src/directives/VTitle/tooltip.vue +21 -0
- package/src/index.js +225 -0
- package/src/plugins/CompatibleOld/index.js +57 -0
- package/src/plugins/Print/index.js +4 -0
- package/src/plugins/Print/print-js/.babelrc +12 -0
- package/src/plugins/Print/print-js/LICENSE +21 -0
- package/src/plugins/Print/print-js/README.md +98 -0
- package/src/plugins/Print/print-js/dist/print.css +97 -0
- package/src/plugins/Print/print-js/dist/print.js +991 -0
- package/src/plugins/Print/print-js/dist/print.map +1 -0
- package/src/plugins/Print/print-js/package.json +60 -0
- package/src/plugins/Print/print-js/src/index.d.ts +45 -0
- package/src/plugins/Print/print-js/src/index.js +10 -0
- package/src/plugins/Print/print-js/src/js/browser.js +33 -0
- package/src/plugins/Print/print-js/src/js/functions.js +103 -0
- package/src/plugins/Print/print-js/src/js/html.js +70 -0
- package/src/plugins/Print/print-js/src/js/image.js +48 -0
- package/src/plugins/Print/print-js/src/js/init.js +168 -0
- package/src/plugins/Print/print-js/src/js/json.js +109 -0
- package/src/plugins/Print/print-js/src/js/modal.js +62 -0
- package/src/plugins/Print/print-js/src/js/pdf.js +62 -0
- package/src/plugins/Print/print-js/src/js/print.js +102 -0
- package/src/plugins/Print/print-js/src/js/raw-html.js +15 -0
- package/src/plugins/Print/print-js/src/sass/index.scss +14 -0
- package/src/plugins/Print/print-js/src/sass/modules/_colors.scss +10 -0
- package/src/plugins/Print/print-js/src/sass/partials/_modal.scss +41 -0
- package/src/plugins/Print/print-js/src/sass/partials/_spinner.scss +46 -0
- package/src/plugins/Print/print.js +2 -0
- package/src/plugins/Print/print.scss +1 -0
- package/src/plugins/SetMenuTree/index.vue +41 -0
- package/src/plugins/SetMenuTree/logoIcon.vue +37 -0
- package/src/plugins/SetMenuTree/setmenutree.vue +427 -0
- package/src/plugins/SetMenuTree/utils.js +74 -0
- package/src/plugins/Sign/InfosecNetSignCNGAgent.min.js +2000 -0
- package/src/plugins/Sign/index.js +65 -0
- package/src/plugins/Sign/sign.js +1 -0
- package/src/plugins/setTabsForSub.js +2 -0
- package/src/utils/auth.js +53 -0
- package/src/utils/axios.js +203 -0
- package/src/utils/downloadBlob.js +19 -0
- package/src/utils/forEachs.js +16 -0
- package/src/utils/getScrollContainer.js +43 -0
- package/src/utils/i18n/cn2hk.json +1270 -0
- package/src/utils/i18n/index.js +54 -0
- package/src/utils/list2tree.js +36 -0
- package/src/utils/msgboxPor.js +26 -0
- package/src/utils/print.js +161 -0
- package/src/utils/relaNo.js +35 -0
- package/src/utils/repairElementUI.js +66 -0
- package/src/utils/urlToGo.js +82 -0
- package/style/css/normalize.scss +723 -0
- package/style/fonts/element-icons.535877f5.woff +0 -0
- package/style/fonts/element-icons.732389de.ttf +0 -0
- package/style/index.css +3 -0
- package/style/index.css.map +1 -0
- package/style/index.umd.min.js +2 -0
- package/style/index.umd.min.js.map +1 -0
- package/style/pageDemo/demo-1.vue +130 -0
- package/style/pageDemo/demo-2.vue +35 -0
- package/style/pageDemo/demo-3.vue +22 -0
- package/style/pageDemo/seeCode.js +20 -0
- package/style/server-config.jsonc +663 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/* 页头内容 */
|
|
2
|
+
<template>
|
|
3
|
+
<div class="flex-box flex-v p-l-s p-r-s" :class="show && 'header-wrap-show'">
|
|
4
|
+
<img
|
|
5
|
+
class="header-logo"
|
|
6
|
+
:src="headerLogoUrl"
|
|
7
|
+
alt="logo"
|
|
8
|
+
:style="{
|
|
9
|
+
width: headerLogoWidth,
|
|
10
|
+
height: headerLogoHeight
|
|
11
|
+
}"
|
|
12
|
+
/>
|
|
13
|
+
<el-divider direction="vertical" />
|
|
14
|
+
<!-- eslint-disable-next-line vue/no-v-html -->
|
|
15
|
+
<h3 class="header-title" v-html="headerTitle"></h3>
|
|
16
|
+
|
|
17
|
+
<el-dropdown
|
|
18
|
+
class="set-user-drop"
|
|
19
|
+
trigger="click"
|
|
20
|
+
placement="bottom"
|
|
21
|
+
size="medium"
|
|
22
|
+
@command="setUserFn"
|
|
23
|
+
>
|
|
24
|
+
<span class="set-user-btn el-icon-setting"></span>
|
|
25
|
+
|
|
26
|
+
<el-dropdown-menu slot="dropdown">
|
|
27
|
+
<el-dropdown-item icon="el-icon-document" command="setLang"
|
|
28
|
+
>{{ '语言切换' | $l(i18n) }}
|
|
29
|
+
</el-dropdown-item>
|
|
30
|
+
<el-dropdown-item icon="el-icon-document" command="dowApp">{{
|
|
31
|
+
'客户端下载' | $l(i18n)
|
|
32
|
+
}}</el-dropdown-item>
|
|
33
|
+
<el-dropdown-item
|
|
34
|
+
v-if="false"
|
|
35
|
+
icon="el-icon-document"
|
|
36
|
+
command="setStyle"
|
|
37
|
+
>{{ '主题设置' | $l(i18n) }}</el-dropdown-item
|
|
38
|
+
>
|
|
39
|
+
</el-dropdown-menu>
|
|
40
|
+
</el-dropdown>
|
|
41
|
+
|
|
42
|
+
<el-badge :hidden="noticeNum === 0" :value="noticeNum">
|
|
43
|
+
<span v-popover:noticePop class="news-btn el-icon-bell"></span>
|
|
44
|
+
</el-badge>
|
|
45
|
+
|
|
46
|
+
<el-dropdown
|
|
47
|
+
class="user-info-drop"
|
|
48
|
+
trigger="click"
|
|
49
|
+
placement="bottom-end"
|
|
50
|
+
size="medium"
|
|
51
|
+
@command="setUserFn"
|
|
52
|
+
@visible-change="setUserVisible"
|
|
53
|
+
>
|
|
54
|
+
<img class="user-info-btn" :src="headerUserUrl" />
|
|
55
|
+
|
|
56
|
+
<el-dropdown-menu slot="dropdown">
|
|
57
|
+
<div
|
|
58
|
+
class="user-info-name flex-box p-l p-r p-t-s p-b-s"
|
|
59
|
+
style="max-width: 300px"
|
|
60
|
+
>
|
|
61
|
+
<span class="pointer" @click="goMdmUser">{{ userInfo.userName }}</span>
|
|
62
|
+
<div class="flex-column flex-l">
|
|
63
|
+
<span
|
|
64
|
+
v-title="userInfo.companyName"
|
|
65
|
+
class="
|
|
66
|
+
flex-item
|
|
67
|
+
text-ellipsis
|
|
68
|
+
m-l m-b-ss
|
|
69
|
+
font-size-small
|
|
70
|
+
color-primary
|
|
71
|
+
"
|
|
72
|
+
:show-overflow-tooltip="true"
|
|
73
|
+
>{{ userInfo.companyName }}</span
|
|
74
|
+
>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div
|
|
78
|
+
v-for="(item, i) in rolesList"
|
|
79
|
+
:key="i"
|
|
80
|
+
class="text-ellipsis m-l color-ccc"
|
|
81
|
+
>{{ item.name }}</div>
|
|
82
|
+
<el-dropdown-item command="changePassword" divided>{{
|
|
83
|
+
'修改密码' | $l(i18n)
|
|
84
|
+
}}</el-dropdown-item>
|
|
85
|
+
<el-dropdown-item command="myDeal" divided>{{
|
|
86
|
+
'我的交易' | $l(i18n)
|
|
87
|
+
}}</el-dropdown-item>
|
|
88
|
+
<el-divider class="m-t-s m-b-s" />
|
|
89
|
+
<div class="user-log-time p-l p-r p-b-s">
|
|
90
|
+
<i
|
|
91
|
+
class="el-icon-s-help m-r-s"
|
|
92
|
+
style="color: var(--color-success)"
|
|
93
|
+
></i>
|
|
94
|
+
<span style="color: var(--color-text-placeholder)"
|
|
95
|
+
>{{ '登录时长' | $l(i18n) }} {{ durationTime }}</span
|
|
96
|
+
>
|
|
97
|
+
</div>
|
|
98
|
+
<el-dropdown-item command="logOut">{{
|
|
99
|
+
'退出登录' | $l(i18n)
|
|
100
|
+
}}</el-dropdown-item>
|
|
101
|
+
</el-dropdown-menu>
|
|
102
|
+
</el-dropdown>
|
|
103
|
+
|
|
104
|
+
<dialogWrap
|
|
105
|
+
:title="'语言切换' | $l(i18n)"
|
|
106
|
+
:visible.sync="langV"
|
|
107
|
+
append-to-body
|
|
108
|
+
width="560px"
|
|
109
|
+
>
|
|
110
|
+
<div class="b-center">
|
|
111
|
+
<el-radio-group v-model="langVal" @change="setLang">
|
|
112
|
+
<el-radio label="zh-cn" border>{{ '中文简体' | $l(i18n) }}</el-radio>
|
|
113
|
+
<el-radio label="zh-hk" border>{{ '中文繁体' | $l(i18n) }}</el-radio>
|
|
114
|
+
<el-radio label="en" border>{{ '英文' | $l(i18n) }}</el-radio>
|
|
115
|
+
</el-radio-group>
|
|
116
|
+
</div>
|
|
117
|
+
</dialogWrap>
|
|
118
|
+
<dialogWrap
|
|
119
|
+
:title="'修改密码' | $l(i18n)"
|
|
120
|
+
:visible.sync="cpwdV"
|
|
121
|
+
append-to-body
|
|
122
|
+
width="400px"
|
|
123
|
+
>
|
|
124
|
+
<changePwd :visible.sync="cpwdV" />
|
|
125
|
+
</dialogWrap>
|
|
126
|
+
<!-- 消息/通知 -->
|
|
127
|
+
<el-popover
|
|
128
|
+
ref="noticePop"
|
|
129
|
+
trigger="click"
|
|
130
|
+
width="400"
|
|
131
|
+
@after-enter="$refs.noticeContent.show()"
|
|
132
|
+
>
|
|
133
|
+
<noticePop ref="noticeContent" :num.sync="noticeNum" />
|
|
134
|
+
</el-popover>
|
|
135
|
+
</div>
|
|
136
|
+
</template>
|
|
137
|
+
|
|
138
|
+
<script>
|
|
139
|
+
import dialogWrap from '../../Dialog/index.vue'
|
|
140
|
+
import changePwd from './changePwd.vue'
|
|
141
|
+
import noticePop from './noticePop.vue'
|
|
142
|
+
|
|
143
|
+
import getJsonc from '../../../assets/getJsonc'
|
|
144
|
+
import realUrl from '../../../assets/realUrl'
|
|
145
|
+
import auth from '../../../utils/auth'
|
|
146
|
+
import { linkPush } from '../../../utils/urlToGo'
|
|
147
|
+
import dayjs from 'dayjs'
|
|
148
|
+
import duration from 'dayjs/plugin/duration'
|
|
149
|
+
dayjs.extend(duration)
|
|
150
|
+
|
|
151
|
+
const prefix =
|
|
152
|
+
window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || process.env.BASE_URL || '/'
|
|
153
|
+
|
|
154
|
+
const i18n = {
|
|
155
|
+
语言切换: {
|
|
156
|
+
en: 'Language switching'
|
|
157
|
+
},
|
|
158
|
+
客户端下载: {
|
|
159
|
+
en: 'Client download'
|
|
160
|
+
},
|
|
161
|
+
主题设置: {
|
|
162
|
+
en: 'Theme setting'
|
|
163
|
+
},
|
|
164
|
+
修改密码: {
|
|
165
|
+
en: 'Change Password'
|
|
166
|
+
},
|
|
167
|
+
我的交易: {
|
|
168
|
+
en: 'My deal'
|
|
169
|
+
},
|
|
170
|
+
登录时长: {
|
|
171
|
+
en: 'Login duration'
|
|
172
|
+
},
|
|
173
|
+
退出登录: {
|
|
174
|
+
en: 'LogOut'
|
|
175
|
+
},
|
|
176
|
+
小时: {
|
|
177
|
+
en: ':'
|
|
178
|
+
},
|
|
179
|
+
分: {
|
|
180
|
+
en: ':'
|
|
181
|
+
},
|
|
182
|
+
秒: {
|
|
183
|
+
en: ':'
|
|
184
|
+
},
|
|
185
|
+
'确定退出,将清除未提交的临时操作,是否继续?': {
|
|
186
|
+
en: 'Are you sure to exit? Uncommitted temporary operations will be cleared. Do you want to continue?'
|
|
187
|
+
},
|
|
188
|
+
退出提示: {
|
|
189
|
+
en: 'Exit Tips'
|
|
190
|
+
},
|
|
191
|
+
中文简体: {
|
|
192
|
+
en: 'Chinese Simplified'
|
|
193
|
+
},
|
|
194
|
+
中文繁体: {
|
|
195
|
+
en: 'Chinese Traditional'
|
|
196
|
+
},
|
|
197
|
+
英文: {
|
|
198
|
+
en: 'English'
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export default {
|
|
203
|
+
components: {
|
|
204
|
+
dialogWrap,
|
|
205
|
+
changePwd,
|
|
206
|
+
noticePop
|
|
207
|
+
},
|
|
208
|
+
data() {
|
|
209
|
+
return {
|
|
210
|
+
show: false,
|
|
211
|
+
headerLogoUrl: undefined,
|
|
212
|
+
headerLogoWidth: undefined,
|
|
213
|
+
headerLogoHeight: undefined,
|
|
214
|
+
headerTitle: undefined,
|
|
215
|
+
headerUserUrl: undefined,
|
|
216
|
+
userInfo: {},
|
|
217
|
+
durationTime: '00小时00分00秒',
|
|
218
|
+
cpwdV: false,
|
|
219
|
+
langV: false,
|
|
220
|
+
langVal: window.localStorage.getItem('pageLang') || 'zh-cn',
|
|
221
|
+
noticeNum: 0,
|
|
222
|
+
rolesList: [],
|
|
223
|
+
i18n
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
created() {
|
|
227
|
+
getJsonc('/server-config.jsonc').then(({ _layoutData = {} }) => {
|
|
228
|
+
this.show = true
|
|
229
|
+
|
|
230
|
+
this.headerLogoUrl = realUrl(_layoutData.headerLogoUrl)
|
|
231
|
+
this.headerUserUrl = realUrl(_layoutData.headerUserUrl)
|
|
232
|
+
this.headerLogoWidth = _layoutData.headerLogoWidth
|
|
233
|
+
this.headerLogoHeight = _layoutData.headerLogoHeight
|
|
234
|
+
this.headerTitle = _layoutData.headerTitle
|
|
235
|
+
})
|
|
236
|
+
this.getUserRolesList()
|
|
237
|
+
},
|
|
238
|
+
methods: {
|
|
239
|
+
// 跳转打主数据人员页面
|
|
240
|
+
goMdmUser() {
|
|
241
|
+
linkPush('/mdm/personnel')
|
|
242
|
+
},
|
|
243
|
+
setUserVisible(v) {
|
|
244
|
+
if (v) {
|
|
245
|
+
let loginTime = sessionStorage.getItem('loginTime')
|
|
246
|
+
if (loginTime) {
|
|
247
|
+
this.durationTime = dayjs.duration(Date.now() - loginTime).format(
|
|
248
|
+
`HH${this.$l('小时', this.i18n)}
|
|
249
|
+
mm${this.$l('分', this.i18n)}
|
|
250
|
+
ss${this.$l('秒', this.i18n)}`
|
|
251
|
+
)
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
let userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
|
|
255
|
+
this.userInfo = {
|
|
256
|
+
userName: userInfo.uname,
|
|
257
|
+
companyName: userInfo.cltName
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
async getUserRolesList() {
|
|
262
|
+
let userNo = sessionStorage.getItem('userNo')
|
|
263
|
+
const { data } = await this.$axios.get(
|
|
264
|
+
`/bems/prod_1.0/user/api/userController/userCltAdRole/${userNo}`
|
|
265
|
+
)
|
|
266
|
+
this.rolesList = data.roles
|
|
267
|
+
},
|
|
268
|
+
setUserFn(c) {
|
|
269
|
+
switch (c) {
|
|
270
|
+
case 'setLang':
|
|
271
|
+
// this.setLang()
|
|
272
|
+
this.langV = true
|
|
273
|
+
break
|
|
274
|
+
case 'dowApp':
|
|
275
|
+
this.dowApp()
|
|
276
|
+
break
|
|
277
|
+
case 'setStyle':
|
|
278
|
+
this.setStyle()
|
|
279
|
+
break
|
|
280
|
+
case 'changePassword':
|
|
281
|
+
this.changePassword()
|
|
282
|
+
break
|
|
283
|
+
case 'myDeal':
|
|
284
|
+
this.myDeal()
|
|
285
|
+
break
|
|
286
|
+
case 'logOut':
|
|
287
|
+
this.logOut()
|
|
288
|
+
break
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
setLang() {
|
|
292
|
+
this.langV = false
|
|
293
|
+
window.localStorage.setItem('pageLang', this.langVal)
|
|
294
|
+
window.location.reload()
|
|
295
|
+
},
|
|
296
|
+
dowApp() {
|
|
297
|
+
// alert('客户端下载')
|
|
298
|
+
let name = 'download.exe'
|
|
299
|
+
let aDom = document.createElement('a')
|
|
300
|
+
aDom.href = `${prefix}server-assets/${name}`
|
|
301
|
+
aDom.download = name
|
|
302
|
+
aDom.click()
|
|
303
|
+
|
|
304
|
+
this.$nextTick(() => {
|
|
305
|
+
aDom = undefined
|
|
306
|
+
})
|
|
307
|
+
},
|
|
308
|
+
setStyle() {
|
|
309
|
+
// alert('主题设置')
|
|
310
|
+
this.$emit('custom-event', { type: 'setStyle' })
|
|
311
|
+
},
|
|
312
|
+
changePassword() {
|
|
313
|
+
// alert('修改密码')
|
|
314
|
+
this.cpwdV = true
|
|
315
|
+
},
|
|
316
|
+
myDeal() {
|
|
317
|
+
// alert('我的交易')
|
|
318
|
+
this.$emit('custom-event', { type: 'myDeal' })
|
|
319
|
+
},
|
|
320
|
+
logOut() {
|
|
321
|
+
// alert('退出登录')
|
|
322
|
+
this.$confirm(
|
|
323
|
+
this.$l('退出将清除未保存的临时操作,请确认是否继续?', this.i18n),
|
|
324
|
+
this.$l('退出提示', this.i18n),
|
|
325
|
+
{
|
|
326
|
+
confirmButtonText: this.$l('确定'),
|
|
327
|
+
cancelButtonText: this.$l('取消'),
|
|
328
|
+
type: 'warning'
|
|
329
|
+
}
|
|
330
|
+
).then(() => {
|
|
331
|
+
auth.removeToken()
|
|
332
|
+
})
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
</script>
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-tabs :key="showKey" v-model="tabAc" stretch class="header-notice-tabs">
|
|
3
|
+
<el-tab-pane name="notice">
|
|
4
|
+
<el-badge slot="label" :hidden="noticeNum === 0" :value="noticeNum">
|
|
5
|
+
消息中心
|
|
6
|
+
</el-badge>
|
|
7
|
+
|
|
8
|
+
<div v-loading="nLd" class="notice-list p-b-s">
|
|
9
|
+
<div
|
|
10
|
+
v-for="item in noticeList"
|
|
11
|
+
:key="item.id"
|
|
12
|
+
class="flex-box flex-v m-b-ss"
|
|
13
|
+
:class="{
|
|
14
|
+
'notice-item': item.processingLinkkUrl,
|
|
15
|
+
'unread-notice': item.readState === '0'
|
|
16
|
+
}"
|
|
17
|
+
@click="seeDetails(item)"
|
|
18
|
+
>
|
|
19
|
+
<span class="el-icon-bell"></span>
|
|
20
|
+
<span v-title="item.content" class="m-r-auto">{{
|
|
21
|
+
item | ctFilter
|
|
22
|
+
}}</span>
|
|
23
|
+
<span>{{ item.createTime }}</span>
|
|
24
|
+
</div>
|
|
25
|
+
<emptyC
|
|
26
|
+
v-if="!nLd && !noticeList.length"
|
|
27
|
+
type="empty"
|
|
28
|
+
:height="160"
|
|
29
|
+
:width="160"
|
|
30
|
+
>
|
|
31
|
+
<div slot="content">暂无消息</div>
|
|
32
|
+
</emptyC>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="flex-box bd-t flex-v">
|
|
35
|
+
<el-button class="flex-item" type="text" @click="readAll"
|
|
36
|
+
>一键已读</el-button
|
|
37
|
+
>
|
|
38
|
+
<span class="bd-l p-t"></span>
|
|
39
|
+
<el-button class="flex-item" type="text" @click="queryMore"
|
|
40
|
+
>更多</el-button
|
|
41
|
+
>
|
|
42
|
+
</div>
|
|
43
|
+
</el-tab-pane>
|
|
44
|
+
<el-tab-pane name="affiche">
|
|
45
|
+
<el-badge slot="label" :hidden="afficheNum === 0" :value="afficheNum">
|
|
46
|
+
系统公告
|
|
47
|
+
</el-badge>
|
|
48
|
+
|
|
49
|
+
<div v-loading="aLd" class="notice-list p-b-s">
|
|
50
|
+
<div
|
|
51
|
+
v-for="item in afficheList"
|
|
52
|
+
:key="item.ntId"
|
|
53
|
+
:class="[
|
|
54
|
+
'flex-box flex-v m-b-ss notice-item',
|
|
55
|
+
item.readStatus == 0 ? 'noread' : 'read'
|
|
56
|
+
]"
|
|
57
|
+
@click="seeDetailsAffiche(item)"
|
|
58
|
+
>
|
|
59
|
+
<span class="el-icon-chat-dot-square m-r-s"></span>
|
|
60
|
+
<span class="m-r-auto">{{ item.title }}</span>
|
|
61
|
+
<span>{{ item.createDate }}</span>
|
|
62
|
+
</div>
|
|
63
|
+
<emptyC
|
|
64
|
+
v-if="!aLd && !afficheList.length"
|
|
65
|
+
type="empty"
|
|
66
|
+
:height="160"
|
|
67
|
+
:width="160"
|
|
68
|
+
>
|
|
69
|
+
<div slot="content">暂无系统公告</div>
|
|
70
|
+
</emptyC>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="flex-box bd-t flex-v">
|
|
73
|
+
<el-button class="flex-item" type="text" @click="readAllAffiche"
|
|
74
|
+
>一键已读</el-button
|
|
75
|
+
>
|
|
76
|
+
<span class="bd-l p-t"></span>
|
|
77
|
+
<el-button class="flex-item" type="text" @click="queryMoreAffiche"
|
|
78
|
+
>更多</el-button
|
|
79
|
+
>
|
|
80
|
+
</div>
|
|
81
|
+
</el-tab-pane>
|
|
82
|
+
</el-tabs>
|
|
83
|
+
</template>
|
|
84
|
+
|
|
85
|
+
<script>
|
|
86
|
+
import axios from '../../../utils/axios'
|
|
87
|
+
import emptyC from '../../Empty/index.vue'
|
|
88
|
+
export default {
|
|
89
|
+
components: {
|
|
90
|
+
emptyC
|
|
91
|
+
},
|
|
92
|
+
filters: {
|
|
93
|
+
ctFilter(item) {
|
|
94
|
+
let msgT = ''
|
|
95
|
+
switch (item.messageType) {
|
|
96
|
+
case '0':
|
|
97
|
+
msgT = '业务提醒'
|
|
98
|
+
break
|
|
99
|
+
case '1':
|
|
100
|
+
msgT = '异常提醒'
|
|
101
|
+
break
|
|
102
|
+
|
|
103
|
+
default:
|
|
104
|
+
msgT = '其他提醒'
|
|
105
|
+
break
|
|
106
|
+
}
|
|
107
|
+
return `【${msgT}】${item.title}`
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
props: {
|
|
111
|
+
num: {
|
|
112
|
+
type: Number,
|
|
113
|
+
default: 0
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
data() {
|
|
117
|
+
return {
|
|
118
|
+
showKey: 0,
|
|
119
|
+
tabAc: 'notice',
|
|
120
|
+
username: sessionStorage.getItem('userNo'),
|
|
121
|
+
nLd: false,
|
|
122
|
+
aLd: false,
|
|
123
|
+
noticeNum: 0,
|
|
124
|
+
afficheNum: 0,
|
|
125
|
+
noticeList: [],
|
|
126
|
+
noticeTotal: 0,
|
|
127
|
+
afficheList: [],
|
|
128
|
+
afficheTotal: 0
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
computed: {
|
|
132
|
+
numC: {
|
|
133
|
+
get() {
|
|
134
|
+
return this.num
|
|
135
|
+
},
|
|
136
|
+
set(n) {
|
|
137
|
+
this.$emit('update:num', n)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
created() {
|
|
142
|
+
this.getNNum()
|
|
143
|
+
},
|
|
144
|
+
methods: {
|
|
145
|
+
show() {
|
|
146
|
+
this.showKey = this.showKey + 1
|
|
147
|
+
|
|
148
|
+
this.getMsgList()
|
|
149
|
+
this.getAfficheList()
|
|
150
|
+
},
|
|
151
|
+
getNNum() {
|
|
152
|
+
Promise.all([
|
|
153
|
+
axios.get(
|
|
154
|
+
'/bems/wkb/messageCenter/getUnReadTotal/' + this.username,
|
|
155
|
+
null,
|
|
156
|
+
{ loading: false, noMsg: true }
|
|
157
|
+
),
|
|
158
|
+
axios.get('/bems/1.0/notice/notReadCount', null, {
|
|
159
|
+
loading: false,
|
|
160
|
+
noMsg: true
|
|
161
|
+
})
|
|
162
|
+
]).then(([res_1, res_2]) => {
|
|
163
|
+
this.noticeNum = res_1.data.data
|
|
164
|
+
this.afficheNum = res_2.data
|
|
165
|
+
|
|
166
|
+
this.numC = this.noticeNum + this.afficheNum
|
|
167
|
+
})
|
|
168
|
+
},
|
|
169
|
+
getMsgList() {
|
|
170
|
+
this.nLd = true
|
|
171
|
+
axios
|
|
172
|
+
.post(
|
|
173
|
+
'/bems/wkb/messageCenter/getListForPage',
|
|
174
|
+
{
|
|
175
|
+
data: {
|
|
176
|
+
userNo: this.username
|
|
177
|
+
},
|
|
178
|
+
descs: ['create_time'],
|
|
179
|
+
readState: '0', // 请求未读消息不生效
|
|
180
|
+
curentPage: 1,
|
|
181
|
+
pageSize: 10
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
loading: () => {
|
|
185
|
+
this.nLd = false
|
|
186
|
+
},
|
|
187
|
+
noMsg: true
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
.then((res) => {
|
|
191
|
+
this.noticeList = res.records || []
|
|
192
|
+
this.noticeTotal = res.total
|
|
193
|
+
})
|
|
194
|
+
},
|
|
195
|
+
getAfficheList() {
|
|
196
|
+
this.aLd = true
|
|
197
|
+
axios
|
|
198
|
+
.get(
|
|
199
|
+
'/bems/1.0/notice',
|
|
200
|
+
{
|
|
201
|
+
userId: this.username
|
|
202
|
+
// readStatus: '0'
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
loading: () => {
|
|
206
|
+
this.aLd = false
|
|
207
|
+
},
|
|
208
|
+
noMsg: true
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
.then((res) => {
|
|
212
|
+
this.afficheList = res.data || []
|
|
213
|
+
this.afficheTotal = res.total
|
|
214
|
+
})
|
|
215
|
+
},
|
|
216
|
+
seeDetails(item) {
|
|
217
|
+
if (item.processingLinkkUrl) {
|
|
218
|
+
let url = '/' + item.processingLinkkUrl
|
|
219
|
+
url = url.replace('//', '/')
|
|
220
|
+
|
|
221
|
+
let _fromNo = Date.now()
|
|
222
|
+
sessionStorage.setItem(_fromNo, location.href)
|
|
223
|
+
|
|
224
|
+
this.$router.push({
|
|
225
|
+
path: url,
|
|
226
|
+
query: {
|
|
227
|
+
_fromNo
|
|
228
|
+
}
|
|
229
|
+
})
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
seeDetailsAffiche(item) {
|
|
233
|
+
if (this.$route.path === '/notice/views') {
|
|
234
|
+
this.$router.push('/loading')
|
|
235
|
+
setTimeout(() => {
|
|
236
|
+
this.$router.push({
|
|
237
|
+
path: `/notice/views`,
|
|
238
|
+
query: { ntId: item.ntId, status: '1' }
|
|
239
|
+
})
|
|
240
|
+
}, 500)
|
|
241
|
+
} else {
|
|
242
|
+
this.$router.push({
|
|
243
|
+
path: `/notice/views`,
|
|
244
|
+
query: { ntId: item.ntId, status: '1' }
|
|
245
|
+
})
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
readAll() {
|
|
249
|
+
this.$msgboxPor({
|
|
250
|
+
title: '一键已读',
|
|
251
|
+
message: '确定要把所有未读消息标注为已读吗?',
|
|
252
|
+
type: 'warning'
|
|
253
|
+
}).then(() => {
|
|
254
|
+
axios
|
|
255
|
+
.put(
|
|
256
|
+
'/bems/wkb/messageCenter/updateReadStateByUserNo/' + this.username,
|
|
257
|
+
null,
|
|
258
|
+
null,
|
|
259
|
+
{ noMsg: true }
|
|
260
|
+
)
|
|
261
|
+
.then(({ msg }) => {
|
|
262
|
+
this.readAllMsg(msg)
|
|
263
|
+
})
|
|
264
|
+
})
|
|
265
|
+
},
|
|
266
|
+
readAllMsg(msg = '') {
|
|
267
|
+
this.$message({
|
|
268
|
+
message: '消息一键已读成功 ' + msg,
|
|
269
|
+
type: 'success'
|
|
270
|
+
})
|
|
271
|
+
},
|
|
272
|
+
queryMore() {
|
|
273
|
+
this.$router.push({ path: '/notice/list' })
|
|
274
|
+
},
|
|
275
|
+
readAllAffiche() {
|
|
276
|
+
axios
|
|
277
|
+
.post('/bems/1.0/portalNoticeReadRecord', { data: [] })
|
|
278
|
+
.then((res) => {
|
|
279
|
+
this.$message({
|
|
280
|
+
message: '系统公告一键已读成功',
|
|
281
|
+
type: 'success'
|
|
282
|
+
})
|
|
283
|
+
this.getAfficheList()
|
|
284
|
+
})
|
|
285
|
+
},
|
|
286
|
+
queryMoreAffiche() {
|
|
287
|
+
this.$router.push({ path: '/notice/index' })
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
</script>
|
|
292
|
+
|
|
293
|
+
<style>
|
|
294
|
+
.read {
|
|
295
|
+
color: #bac4cf;
|
|
296
|
+
}
|
|
297
|
+
.noread {
|
|
298
|
+
color: black;
|
|
299
|
+
}
|
|
300
|
+
</style>
|