n20-common-lib 1.2.39 → 1.2.42
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 +2 -2
- package/package.json +88 -88
- package/src/_qiankun/index.js +113 -113
- package/src/_qiankun/postMessage.js +48 -48
- package/src/assets/css/_coreLib.scss +35 -35
- package/src/assets/css/cl-anchor.scss +23 -23
- package/src/assets/css/cl-approve-card.scss +58 -58
- package/src/assets/css/cl-dialog.scss +99 -99
- package/src/assets/css/cl-drag-list.scss +22 -22
- package/src/assets/css/cl-empty.scss +10 -10
- package/src/assets/css/cl-expandable-pane.scss +26 -26
- package/src/assets/css/cl-expandable.scss +24 -24
- package/src/assets/css/cl-file-upload-table.scss +11 -11
- package/src/assets/css/cl-filter.scss +4 -4
- package/src/assets/css/cl-flow-step.scss +185 -185
- package/src/assets/css/cl-footer-box.scss +10 -10
- package/src/assets/css/cl-form-item.scss +612 -612
- package/src/assets/css/cl-general-card.scss +11 -11
- package/src/assets/css/cl-layout-aside.scss +92 -92
- package/src/assets/css/cl-layout-content.scss +16 -16
- package/src/assets/css/cl-layout-header.scss +73 -73
- package/src/assets/css/cl-layout-tabs.scss +87 -87
- package/src/assets/css/cl-layout.scss +97 -97
- package/src/assets/css/cl-login-temporary.scss +37 -37
- package/src/assets/css/cl-message.scss +75 -75
- package/src/assets/css/cl-more-tab.scss +98 -98
- package/src/assets/css/cl-nav-menu.scss +5 -5
- package/src/assets/css/cl-pagination.scss +128 -128
- package/src/assets/css/cl-secondary-tab.scss +53 -53
- package/src/assets/css/cl-showcolumn.scss +23 -23
- package/src/assets/css/cl-sifting.scss +51 -51
- package/src/assets/css/cl-statis.scss +42 -42
- package/src/assets/css/cl-step.scss +73 -73
- package/src/assets/css/cl-suspend.scss +19 -19
- package/src/assets/css/cl-tertiary-tab.scss +54 -54
- package/src/assets/css/cl-upload.scss +41 -41
- package/src/assets/css/cl-worn-pagination.scss +50 -50
- package/src/assets/css/el-button.scss +173 -173
- package/src/assets/css/el-table.scss +79 -79
- package/src/assets/css/element-variables.scss +1061 -1061
- package/src/assets/css/element.dev.scss +21 -21
- package/src/assets/css/font-icon.scss +27 -27
- package/src/assets/css/index.dev.scss +4 -4
- package/src/assets/css/index.scss +11 -11
- package/src/assets/css/normalize.scss +726 -726
- package/src/assets/css/rootvar.scss +139 -139
- package/src/assets/css/select.scss +25 -25
- package/src/assets/css/title-pop.scss +4 -4
- package/src/assets/getJsonc.js +50 -50
- package/src/assets/realUrl.js +12 -12
- package/src/components/Anchor/AnchorItem.vue +29 -29
- package/src/components/Anchor/index.vue +185 -185
- package/src/components/ApprovalButtons/index.vue +233 -233
- package/src/components/ApprovalCard/index.vue +128 -128
- package/src/components/ApprovalRecord/approvalImg.vue +44 -44
- package/src/components/ApprovalRecord/flowDialog.vue +45 -45
- package/src/components/ApprovalRecord/index.vue +59 -59
- package/src/components/Button/button-group.vue +150 -150
- package/src/components/Button/icon-group-button.vue +61 -61
- package/src/components/Button/index.vue +56 -56
- package/src/components/CascaderArea/index.vue +103 -103
- package/src/components/ContentLoading/index.vue +41 -41
- package/src/components/ContentNull/index.vue +19 -19
- package/src/components/DatePicker/index.vue +27 -27
- package/src/components/DatePicker/por.vue +169 -169
- package/src/components/Dialog/index.vue +26 -26
- package/src/components/Dialog/indexO.vue +116 -116
- package/src/components/DragList/index.vue +75 -75
- package/src/components/Empty/img/abnormal.svg +108 -108
- package/src/components/Empty/img/dispose.svg +71 -71
- package/src/components/Empty/img/empty.svg +57 -57
- package/src/components/Empty/img/general.svg +58 -58
- package/src/components/Empty/img/lock.svg +57 -57
- package/src/components/Empty/img/network.svg +59 -59
- package/src/components/Empty/img/relevant.svg +68 -68
- package/src/components/Empty/img/search.svg +72 -72
- package/src/components/Empty/index.vue +92 -92
- package/src/components/Expandable/index.vue +49 -49
- package/src/components/Expandable/main.vue +52 -52
- package/src/components/FileExportAsync/index.vue +178 -178
- package/src/components/FileUploadTable/index.vue +484 -484
- package/src/components/Filters/index.vue +371 -371
- package/src/components/Filters/indexO.vue +104 -104
- package/src/components/FlowStep/index.vue +68 -68
- package/src/components/FooterBox/index.vue +21 -21
- package/src/components/GeneralCard/index.vue +15 -15
- package/src/components/InputNumber/index.vue +169 -169
- package/src/components/InputNumber/numberRange.vue +47 -47
- package/src/components/InputSearch/index.vue +75 -75
- package/src/components/Layout/AsideNav/index.vue +120 -119
- package/src/components/Layout/AsideNav/menuItem.vue +34 -34
- package/src/components/Layout/AsideNav/submenuTitle.vue +26 -26
- package/src/components/Layout/HeaderWrap/changePwd.vue +215 -215
- package/src/components/Layout/HeaderWrap/index.vue +371 -371
- package/src/components/Layout/HeaderWrap/noticePop.vue +316 -316
- package/src/components/Layout/SubContent/index.vue +127 -127
- package/src/components/Layout/TabsNav/index.vue +170 -170
- package/src/components/Layout/index.vue +518 -518
- package/src/components/Layout/utils.js +12 -12
- package/src/components/LoginTemporary/form.vue +570 -570
- package/src/components/LoginTemporary/index.vue +139 -139
- package/src/components/LoginTemporary/retrievePw.vue +372 -372
- package/src/components/MicroApp/index.js +67 -67
- package/src/components/MicroFrame/index.vue +95 -95
- package/src/components/MoreTab/index.vue +232 -232
- package/src/components/NavMenu/index.vue +60 -60
- package/src/components/PageLayout/page.vue +15 -15
- package/src/components/Pagination/index.vue +165 -165
- package/src/components/SecondaryTab/index.vue +58 -58
- package/src/components/SelectLazy/index.vue +75 -75
- package/src/components/SelectTree/SelectTreeLazy.vue +241 -241
- package/src/components/SelectTree/index.vue +205 -205
- package/src/components/ShowColumn/index.vue +213 -213
- package/src/components/Sifting/index.vue +99 -99
- package/src/components/Statis/index.vue +97 -97
- package/src/components/Statis/statisItem.vue +54 -54
- package/src/components/Statis/statisPopover.vue +55 -55
- package/src/components/Step/index.vue +38 -38
- package/src/components/Suspend/index.vue +72 -72
- package/src/components/Table/index.vue +209 -209
- package/src/components/Table/indexO.vue +149 -149
- package/src/components/Task/index.vue +26 -26
- package/src/components/TertiaryTab/index.vue +63 -63
- package/src/components/TimePicker/index.vue +28 -28
- package/src/components/Upload/index.vue +242 -242
- package/src/components/WornPagination/index.vue +73 -73
- package/src/directives/VClickOutside/index.js +19 -19
- package/src/directives/VHas/index.js +58 -58
- package/src/directives/VMove/index.js +42 -42
- package/src/directives/VTitle/index.js +69 -69
- package/src/directives/VTitle/tooltip.vue +21 -21
- package/src/index.js +232 -232
- package/src/plugins/CompatibleOld/index.js +57 -57
- package/src/plugins/Print/index.js +4 -4
- package/src/plugins/Print/print-js/.babelrc +12 -12
- package/src/plugins/Print/print-js/LICENSE +21 -21
- package/src/plugins/Print/print-js/README.md +98 -98
- package/src/plugins/Print/print-js/dist/print.css +96 -96
- package/src/plugins/Print/print-js/dist/print.js +990 -990
- package/src/plugins/Print/print-js/package.json +60 -60
- package/src/plugins/Print/print-js/src/index.d.ts +45 -45
- package/src/plugins/Print/print-js/src/index.js +10 -10
- package/src/plugins/Print/print-js/src/js/browser.js +33 -33
- package/src/plugins/Print/print-js/src/js/functions.js +103 -103
- package/src/plugins/Print/print-js/src/js/html.js +70 -70
- package/src/plugins/Print/print-js/src/js/image.js +48 -48
- package/src/plugins/Print/print-js/src/js/init.js +168 -168
- package/src/plugins/Print/print-js/src/js/json.js +109 -109
- package/src/plugins/Print/print-js/src/js/modal.js +62 -62
- package/src/plugins/Print/print-js/src/js/pdf.js +62 -62
- package/src/plugins/Print/print-js/src/js/print.js +102 -102
- package/src/plugins/Print/print-js/src/js/raw-html.js +15 -15
- package/src/plugins/Print/print-js/src/sass/index.scss +13 -13
- package/src/plugins/Print/print-js/src/sass/modules/_colors.scss +9 -9
- package/src/plugins/Print/print-js/src/sass/partials/_modal.scss +40 -40
- package/src/plugins/Print/print-js/src/sass/partials/_spinner.scss +45 -45
- package/src/plugins/Print/print.js +2 -2
- package/src/plugins/Print/print.scss +1 -1
- package/src/plugins/SetMenuTree/index.vue +41 -41
- package/src/plugins/SetMenuTree/logoIcon.vue +37 -37
- package/src/plugins/SetMenuTree/setmenutree.vue +427 -427
- package/src/plugins/SetMenuTree/utils.js +74 -74
- package/src/plugins/Sign/InfosecNetSignCNGAgent.min.js +2000 -2000
- package/src/plugins/Sign/index.js +65 -65
- package/src/plugins/Sign/sign.js +1 -1
- package/src/plugins/setTabsForSub.js +2 -2
- package/src/utils/auth.js +53 -53
- package/src/utils/axios.js +203 -203
- package/src/utils/downloadBlob.js +19 -19
- package/src/utils/forEachs.js +16 -16
- package/src/utils/getScrollContainer.js +43 -43
- package/src/utils/i18n/cn2hk.json +1270 -1270
- package/src/utils/i18n/index.js +50 -50
- package/src/utils/list2tree.js +36 -36
- package/src/utils/msgboxPor.js +26 -26
- package/src/utils/print.js +161 -161
- package/src/utils/relaNo.js +72 -72
- package/src/utils/repairElementUI.js +95 -66
- package/src/utils/urlToGo.js +82 -82
- package/style/css/normalize.scss +726 -0
- package/style/index.css +3 -3
- package/style/index.css.map +1 -1
- package/style/pageDemo/demo-1.vue +131 -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 +606 -0
- package/src/components/NstcG6Components/NstcDialog/NstcDialog.vue +0 -185
|
@@ -1,371 +1,371 @@
|
|
|
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
|
-
<el-tooltip content="帮助文档">
|
|
17
|
-
<span class="set-user-btn n20-icon-xinxitishi" @click="openHelp"></span>
|
|
18
|
-
</el-tooltip>
|
|
19
|
-
|
|
20
|
-
<el-dropdown
|
|
21
|
-
class="m-l-m"
|
|
22
|
-
trigger="click"
|
|
23
|
-
placement="bottom"
|
|
24
|
-
size="medium"
|
|
25
|
-
@command="setUserFn"
|
|
26
|
-
>
|
|
27
|
-
<span class="set-user-btn el-icon-setting"></span>
|
|
28
|
-
|
|
29
|
-
<el-dropdown-menu slot="dropdown">
|
|
30
|
-
<el-dropdown-item icon="el-icon-document" command="setLang"
|
|
31
|
-
>{{ '语言切换' | $l(i18n) }}
|
|
32
|
-
</el-dropdown-item>
|
|
33
|
-
<el-dropdown-item icon="el-icon-document" command="dowApp">{{
|
|
34
|
-
'客户端下载' | $l(i18n)
|
|
35
|
-
}}</el-dropdown-item>
|
|
36
|
-
<el-dropdown-item
|
|
37
|
-
v-if="false"
|
|
38
|
-
icon="el-icon-document"
|
|
39
|
-
command="setStyle"
|
|
40
|
-
>{{ '主题设置' | $l(i18n) }}</el-dropdown-item
|
|
41
|
-
>
|
|
42
|
-
</el-dropdown-menu>
|
|
43
|
-
</el-dropdown>
|
|
44
|
-
|
|
45
|
-
<el-badge :hidden="noticeNum === 0" :value="noticeNum">
|
|
46
|
-
<span v-popover:noticePop class="news-btn el-icon-bell"></span>
|
|
47
|
-
</el-badge>
|
|
48
|
-
|
|
49
|
-
<el-dropdown
|
|
50
|
-
class="user-info-drop"
|
|
51
|
-
trigger="click"
|
|
52
|
-
placement="bottom-end"
|
|
53
|
-
size="medium"
|
|
54
|
-
@command="setUserFn"
|
|
55
|
-
@visible-change="setUserVisible"
|
|
56
|
-
>
|
|
57
|
-
<img class="user-info-btn" :src="headerUserUrl" />
|
|
58
|
-
|
|
59
|
-
<el-dropdown-menu slot="dropdown">
|
|
60
|
-
<div
|
|
61
|
-
class="user-info-name flex-box p-l p-r p-t-s p-b-s"
|
|
62
|
-
style="max-width: 300px"
|
|
63
|
-
>
|
|
64
|
-
<span class="pointer" @click="goMdmUser">{{
|
|
65
|
-
userInfo.userName
|
|
66
|
-
}}</span>
|
|
67
|
-
<div class="flex-column flex-l">
|
|
68
|
-
<span
|
|
69
|
-
v-title="userInfo.companyName"
|
|
70
|
-
class="
|
|
71
|
-
flex-item
|
|
72
|
-
text-ellipsis
|
|
73
|
-
m-l m-b-ss
|
|
74
|
-
font-size-small
|
|
75
|
-
color-primary
|
|
76
|
-
"
|
|
77
|
-
:show-overflow-tooltip="true"
|
|
78
|
-
>{{ userInfo.companyName }}</span
|
|
79
|
-
>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
<div
|
|
83
|
-
v-for="(item, i) in rolesList"
|
|
84
|
-
:key="i"
|
|
85
|
-
class="text-ellipsis m-l color-ccc"
|
|
86
|
-
>
|
|
87
|
-
{{ item.name }}
|
|
88
|
-
</div>
|
|
89
|
-
<el-dropdown-item command="changePassword" divided>{{
|
|
90
|
-
'修改密码' | $l(i18n)
|
|
91
|
-
}}</el-dropdown-item>
|
|
92
|
-
<el-dropdown-item
|
|
93
|
-
v-if="customOpt.mydeal !== false"
|
|
94
|
-
command="myDeal"
|
|
95
|
-
divided
|
|
96
|
-
>{{ '我的交易' | $l(i18n) }}</el-dropdown-item
|
|
97
|
-
>
|
|
98
|
-
<el-dropdown-item
|
|
99
|
-
v-if="customOpt.agency && customOpt.agency.show"
|
|
100
|
-
command="myAgency"
|
|
101
|
-
divided
|
|
102
|
-
>
|
|
103
|
-
<div class="flex-box flex-v">
|
|
104
|
-
<span>{{ '工作代理' | $l(i18n) }}</span>
|
|
105
|
-
<el-badge
|
|
106
|
-
v-if="customOpt.agency.underway"
|
|
107
|
-
class="m-l-auto font-size-small color-primary"
|
|
108
|
-
is-dot
|
|
109
|
-
type="primary"
|
|
110
|
-
style="line-height: initial"
|
|
111
|
-
>进行中</el-badge
|
|
112
|
-
>
|
|
113
|
-
</div>
|
|
114
|
-
</el-dropdown-item>
|
|
115
|
-
<el-divider class="m-t-s m-b-s" />
|
|
116
|
-
<div class="user-log-time p-l p-r p-b-s">
|
|
117
|
-
<i
|
|
118
|
-
class="el-icon-s-help m-r-s"
|
|
119
|
-
style="color: var(--color-success)"
|
|
120
|
-
></i>
|
|
121
|
-
<span style="color: var(--color-text-placeholder)"
|
|
122
|
-
>{{ '登录时长' | $l(i18n) }} {{ durationTime }}</span
|
|
123
|
-
>
|
|
124
|
-
</div>
|
|
125
|
-
<el-dropdown-item command="logOut">{{
|
|
126
|
-
'退出登录' | $l(i18n)
|
|
127
|
-
}}</el-dropdown-item>
|
|
128
|
-
</el-dropdown-menu>
|
|
129
|
-
</el-dropdown>
|
|
130
|
-
|
|
131
|
-
<dialogWrap
|
|
132
|
-
:title="'语言切换' | $l(i18n)"
|
|
133
|
-
:visible.sync="langV"
|
|
134
|
-
append-to-body
|
|
135
|
-
width="560px"
|
|
136
|
-
>
|
|
137
|
-
<div class="b-center">
|
|
138
|
-
<el-radio-group v-model="langVal" @change="setLang">
|
|
139
|
-
<el-radio label="zh-cn" border>{{ '中文简体' | $l(i18n) }}</el-radio>
|
|
140
|
-
<el-radio label="zh-hk" border>{{ '中文繁体' | $l(i18n) }}</el-radio>
|
|
141
|
-
<el-radio label="en" border>{{ '英文' | $l(i18n) }}</el-radio>
|
|
142
|
-
</el-radio-group>
|
|
143
|
-
</div>
|
|
144
|
-
</dialogWrap>
|
|
145
|
-
<dialogWrap
|
|
146
|
-
:title="'修改密码' | $l(i18n)"
|
|
147
|
-
:visible.sync="cpwdV"
|
|
148
|
-
append-to-body
|
|
149
|
-
width="400px"
|
|
150
|
-
>
|
|
151
|
-
<changePwd :visible.sync="cpwdV" />
|
|
152
|
-
</dialogWrap>
|
|
153
|
-
<!-- 消息/通知 -->
|
|
154
|
-
<el-popover
|
|
155
|
-
ref="noticePop"
|
|
156
|
-
trigger="click"
|
|
157
|
-
width="400"
|
|
158
|
-
@after-enter="$refs.noticeContent.show()"
|
|
159
|
-
>
|
|
160
|
-
<noticePop ref="noticeContent" :num.sync="noticeNum" />
|
|
161
|
-
</el-popover>
|
|
162
|
-
</div>
|
|
163
|
-
</template>
|
|
164
|
-
|
|
165
|
-
<script>
|
|
166
|
-
import dialogWrap from '../../Dialog/index.vue'
|
|
167
|
-
import changePwd from './changePwd.vue'
|
|
168
|
-
import noticePop from './noticePop.vue'
|
|
169
|
-
import axios from '../../../utils/axios'
|
|
170
|
-
|
|
171
|
-
import getJsonc from '../../../assets/getJsonc'
|
|
172
|
-
import realUrl from '../../../assets/realUrl'
|
|
173
|
-
import auth from '../../../utils/auth'
|
|
174
|
-
import { linkPush } from '../../../utils/urlToGo'
|
|
175
|
-
import dayjs from 'dayjs'
|
|
176
|
-
import duration from 'dayjs/plugin/duration'
|
|
177
|
-
dayjs.extend(duration)
|
|
178
|
-
|
|
179
|
-
const prefix =
|
|
180
|
-
window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || process.env.BASE_URL || '/'
|
|
181
|
-
|
|
182
|
-
const i18n = {
|
|
183
|
-
语言切换: {
|
|
184
|
-
en: 'Language switching'
|
|
185
|
-
},
|
|
186
|
-
客户端下载: {
|
|
187
|
-
en: 'Client download'
|
|
188
|
-
},
|
|
189
|
-
主题设置: {
|
|
190
|
-
en: 'Theme setting'
|
|
191
|
-
},
|
|
192
|
-
修改密码: {
|
|
193
|
-
en: 'Change Password'
|
|
194
|
-
},
|
|
195
|
-
我的交易: {
|
|
196
|
-
en: 'My deal'
|
|
197
|
-
},
|
|
198
|
-
工作代理: {
|
|
199
|
-
en: 'My agency'
|
|
200
|
-
},
|
|
201
|
-
登录时长: {
|
|
202
|
-
en: 'Login duration'
|
|
203
|
-
},
|
|
204
|
-
退出登录: {
|
|
205
|
-
en: 'LogOut'
|
|
206
|
-
},
|
|
207
|
-
小时: {
|
|
208
|
-
en: ':'
|
|
209
|
-
},
|
|
210
|
-
分: {
|
|
211
|
-
en: ':'
|
|
212
|
-
},
|
|
213
|
-
秒: {
|
|
214
|
-
en: ':'
|
|
215
|
-
},
|
|
216
|
-
'确定退出,将清除未提交的临时操作,是否继续?': {
|
|
217
|
-
en: 'Are you sure to exit? Uncommitted temporary operations will be cleared. Do you want to continue?'
|
|
218
|
-
},
|
|
219
|
-
退出提示: {
|
|
220
|
-
en: 'Exit Tips'
|
|
221
|
-
},
|
|
222
|
-
中文简体: {
|
|
223
|
-
en: 'Chinese Simplified'
|
|
224
|
-
},
|
|
225
|
-
中文繁体: {
|
|
226
|
-
en: 'Chinese Traditional'
|
|
227
|
-
},
|
|
228
|
-
英文: {
|
|
229
|
-
en: 'English'
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export default {
|
|
234
|
-
components: {
|
|
235
|
-
dialogWrap,
|
|
236
|
-
changePwd,
|
|
237
|
-
noticePop
|
|
238
|
-
},
|
|
239
|
-
inject: {
|
|
240
|
-
customOpt: {
|
|
241
|
-
type: Object,
|
|
242
|
-
default: () => ({})
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
data() {
|
|
246
|
-
return {
|
|
247
|
-
show: false,
|
|
248
|
-
headerLogoUrl: undefined,
|
|
249
|
-
headerLogoWidth: undefined,
|
|
250
|
-
headerLogoHeight: undefined,
|
|
251
|
-
headerTitle: undefined,
|
|
252
|
-
headerUserUrl: undefined,
|
|
253
|
-
userInfo: {},
|
|
254
|
-
durationTime: '00小时00分00秒',
|
|
255
|
-
cpwdV: false,
|
|
256
|
-
langV: false,
|
|
257
|
-
langVal: window.localStorage.getItem('pageLang') || 'zh-cn',
|
|
258
|
-
noticeNum: 0,
|
|
259
|
-
rolesList: [],
|
|
260
|
-
i18n
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
created() {
|
|
264
|
-
getJsonc('/server-config.jsonc').then(({ _layoutData = {} }) => {
|
|
265
|
-
this.show = true
|
|
266
|
-
|
|
267
|
-
this.headerLogoUrl = realUrl(_layoutData.headerLogoUrl)
|
|
268
|
-
this.headerUserUrl = realUrl(_layoutData.headerUserUrl)
|
|
269
|
-
this.headerLogoWidth = _layoutData.headerLogoWidth
|
|
270
|
-
this.headerLogoHeight = _layoutData.headerLogoHeight
|
|
271
|
-
this.headerTitle = _layoutData.headerTitle
|
|
272
|
-
})
|
|
273
|
-
},
|
|
274
|
-
methods: {
|
|
275
|
-
// 跳转打主数据人员页面
|
|
276
|
-
goMdmUser() {
|
|
277
|
-
linkPush('/mdm/personnel')
|
|
278
|
-
},
|
|
279
|
-
setUserVisible(v) {
|
|
280
|
-
if (v) {
|
|
281
|
-
let loginTime = sessionStorage.getItem('loginTime')
|
|
282
|
-
if (loginTime) {
|
|
283
|
-
this.durationTime = dayjs.duration(Date.now() - loginTime).format(
|
|
284
|
-
`HH${this.$l('小时', this.i18n)}
|
|
285
|
-
mm${this.$l('分', this.i18n)}
|
|
286
|
-
ss${this.$l('秒', this.i18n)}`
|
|
287
|
-
)
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
let userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
|
|
291
|
-
this.userInfo = {
|
|
292
|
-
userName: userInfo.uname,
|
|
293
|
-
companyName: userInfo.cltName
|
|
294
|
-
}
|
|
295
|
-
this.rolesList = userInfo.roles || []
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
// 打开帮助文档
|
|
299
|
-
openHelp() {
|
|
300
|
-
axios
|
|
301
|
-
.get(`/bems/1.0/userManual`, {}, { responseType: 'blob' })
|
|
302
|
-
.then((res) => {
|
|
303
|
-
if (!res.size) {
|
|
304
|
-
this.$message.error('暂无帮助文档,请联系管理员!')
|
|
305
|
-
return
|
|
306
|
-
}
|
|
307
|
-
let url = window.URL.createObjectURL(res)
|
|
308
|
-
let win = window.open(url, '帮助文档')
|
|
309
|
-
setTimeout(function () {
|
|
310
|
-
win.document.title = '帮助文档'
|
|
311
|
-
}, 1000)
|
|
312
|
-
})
|
|
313
|
-
},
|
|
314
|
-
setUserFn(c) {
|
|
315
|
-
switch (c) {
|
|
316
|
-
case 'setLang':
|
|
317
|
-
// this.setLang()
|
|
318
|
-
this.langV = true
|
|
319
|
-
break
|
|
320
|
-
case 'dowApp':
|
|
321
|
-
this.dowApp()
|
|
322
|
-
break
|
|
323
|
-
case 'changePassword':
|
|
324
|
-
this.changePassword()
|
|
325
|
-
break
|
|
326
|
-
case 'logOut':
|
|
327
|
-
this.logOut()
|
|
328
|
-
break
|
|
329
|
-
default:
|
|
330
|
-
this.$emit('custom-event', { type: c })
|
|
331
|
-
break
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
setLang() {
|
|
335
|
-
this.langV = false
|
|
336
|
-
window.localStorage.setItem('pageLang', this.langVal)
|
|
337
|
-
window.location.reload()
|
|
338
|
-
},
|
|
339
|
-
dowApp() {
|
|
340
|
-
// alert('客户端下载')
|
|
341
|
-
let name = 'download.exe'
|
|
342
|
-
let aDom = document.createElement('a')
|
|
343
|
-
aDom.href = `${prefix}server-assets/${name}`
|
|
344
|
-
aDom.download = name
|
|
345
|
-
aDom.click()
|
|
346
|
-
|
|
347
|
-
this.$nextTick(() => {
|
|
348
|
-
aDom = undefined
|
|
349
|
-
})
|
|
350
|
-
},
|
|
351
|
-
changePassword() {
|
|
352
|
-
// alert('修改密码')
|
|
353
|
-
this.cpwdV = true
|
|
354
|
-
},
|
|
355
|
-
logOut() {
|
|
356
|
-
// alert('退出登录')
|
|
357
|
-
this.$confirm(
|
|
358
|
-
this.$l('退出将清除未保存的临时操作,请确认是否继续?', this.i18n),
|
|
359
|
-
this.$l('退出提示', this.i18n),
|
|
360
|
-
{
|
|
361
|
-
confirmButtonText: this.$l('确定'),
|
|
362
|
-
cancelButtonText: this.$l('取消'),
|
|
363
|
-
type: 'warning'
|
|
364
|
-
}
|
|
365
|
-
).then(() => {
|
|
366
|
-
auth.removeToken()
|
|
367
|
-
})
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
</script>
|
|
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
|
+
<el-tooltip content="帮助文档">
|
|
17
|
+
<span class="set-user-btn n20-icon-xinxitishi" @click="openHelp"></span>
|
|
18
|
+
</el-tooltip>
|
|
19
|
+
|
|
20
|
+
<el-dropdown
|
|
21
|
+
class="m-l-m"
|
|
22
|
+
trigger="click"
|
|
23
|
+
placement="bottom"
|
|
24
|
+
size="medium"
|
|
25
|
+
@command="setUserFn"
|
|
26
|
+
>
|
|
27
|
+
<span class="set-user-btn el-icon-setting"></span>
|
|
28
|
+
|
|
29
|
+
<el-dropdown-menu slot="dropdown">
|
|
30
|
+
<el-dropdown-item icon="el-icon-document" command="setLang"
|
|
31
|
+
>{{ '语言切换' | $l(i18n) }}
|
|
32
|
+
</el-dropdown-item>
|
|
33
|
+
<el-dropdown-item icon="el-icon-document" command="dowApp">{{
|
|
34
|
+
'客户端下载' | $l(i18n)
|
|
35
|
+
}}</el-dropdown-item>
|
|
36
|
+
<el-dropdown-item
|
|
37
|
+
v-if="false"
|
|
38
|
+
icon="el-icon-document"
|
|
39
|
+
command="setStyle"
|
|
40
|
+
>{{ '主题设置' | $l(i18n) }}</el-dropdown-item
|
|
41
|
+
>
|
|
42
|
+
</el-dropdown-menu>
|
|
43
|
+
</el-dropdown>
|
|
44
|
+
|
|
45
|
+
<el-badge :hidden="noticeNum === 0" :value="noticeNum">
|
|
46
|
+
<span v-popover:noticePop class="news-btn el-icon-bell"></span>
|
|
47
|
+
</el-badge>
|
|
48
|
+
|
|
49
|
+
<el-dropdown
|
|
50
|
+
class="user-info-drop"
|
|
51
|
+
trigger="click"
|
|
52
|
+
placement="bottom-end"
|
|
53
|
+
size="medium"
|
|
54
|
+
@command="setUserFn"
|
|
55
|
+
@visible-change="setUserVisible"
|
|
56
|
+
>
|
|
57
|
+
<img class="user-info-btn" :src="headerUserUrl" />
|
|
58
|
+
|
|
59
|
+
<el-dropdown-menu slot="dropdown">
|
|
60
|
+
<div
|
|
61
|
+
class="user-info-name flex-box p-l p-r p-t-s p-b-s"
|
|
62
|
+
style="max-width: 300px"
|
|
63
|
+
>
|
|
64
|
+
<span class="pointer" @click="goMdmUser">{{
|
|
65
|
+
userInfo.userName
|
|
66
|
+
}}</span>
|
|
67
|
+
<div class="flex-column flex-l">
|
|
68
|
+
<span
|
|
69
|
+
v-title="userInfo.companyName"
|
|
70
|
+
class="
|
|
71
|
+
flex-item
|
|
72
|
+
text-ellipsis
|
|
73
|
+
m-l m-b-ss
|
|
74
|
+
font-size-small
|
|
75
|
+
color-primary
|
|
76
|
+
"
|
|
77
|
+
:show-overflow-tooltip="true"
|
|
78
|
+
>{{ userInfo.companyName }}</span
|
|
79
|
+
>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div
|
|
83
|
+
v-for="(item, i) in rolesList"
|
|
84
|
+
:key="i"
|
|
85
|
+
class="text-ellipsis m-l color-ccc"
|
|
86
|
+
>
|
|
87
|
+
{{ item.name }}
|
|
88
|
+
</div>
|
|
89
|
+
<el-dropdown-item command="changePassword" divided>{{
|
|
90
|
+
'修改密码' | $l(i18n)
|
|
91
|
+
}}</el-dropdown-item>
|
|
92
|
+
<el-dropdown-item
|
|
93
|
+
v-if="customOpt.mydeal !== false"
|
|
94
|
+
command="myDeal"
|
|
95
|
+
divided
|
|
96
|
+
>{{ '我的交易' | $l(i18n) }}</el-dropdown-item
|
|
97
|
+
>
|
|
98
|
+
<el-dropdown-item
|
|
99
|
+
v-if="customOpt.agency && customOpt.agency.show"
|
|
100
|
+
command="myAgency"
|
|
101
|
+
divided
|
|
102
|
+
>
|
|
103
|
+
<div class="flex-box flex-v">
|
|
104
|
+
<span>{{ '工作代理' | $l(i18n) }}</span>
|
|
105
|
+
<el-badge
|
|
106
|
+
v-if="customOpt.agency.underway"
|
|
107
|
+
class="m-l-auto font-size-small color-primary"
|
|
108
|
+
is-dot
|
|
109
|
+
type="primary"
|
|
110
|
+
style="line-height: initial"
|
|
111
|
+
>进行中</el-badge
|
|
112
|
+
>
|
|
113
|
+
</div>
|
|
114
|
+
</el-dropdown-item>
|
|
115
|
+
<el-divider class="m-t-s m-b-s" />
|
|
116
|
+
<div class="user-log-time p-l p-r p-b-s">
|
|
117
|
+
<i
|
|
118
|
+
class="el-icon-s-help m-r-s"
|
|
119
|
+
style="color: var(--color-success)"
|
|
120
|
+
></i>
|
|
121
|
+
<span style="color: var(--color-text-placeholder)"
|
|
122
|
+
>{{ '登录时长' | $l(i18n) }} {{ durationTime }}</span
|
|
123
|
+
>
|
|
124
|
+
</div>
|
|
125
|
+
<el-dropdown-item command="logOut">{{
|
|
126
|
+
'退出登录' | $l(i18n)
|
|
127
|
+
}}</el-dropdown-item>
|
|
128
|
+
</el-dropdown-menu>
|
|
129
|
+
</el-dropdown>
|
|
130
|
+
|
|
131
|
+
<dialogWrap
|
|
132
|
+
:title="'语言切换' | $l(i18n)"
|
|
133
|
+
:visible.sync="langV"
|
|
134
|
+
append-to-body
|
|
135
|
+
width="560px"
|
|
136
|
+
>
|
|
137
|
+
<div class="b-center">
|
|
138
|
+
<el-radio-group v-model="langVal" @change="setLang">
|
|
139
|
+
<el-radio label="zh-cn" border>{{ '中文简体' | $l(i18n) }}</el-radio>
|
|
140
|
+
<el-radio label="zh-hk" border>{{ '中文繁体' | $l(i18n) }}</el-radio>
|
|
141
|
+
<el-radio label="en" border>{{ '英文' | $l(i18n) }}</el-radio>
|
|
142
|
+
</el-radio-group>
|
|
143
|
+
</div>
|
|
144
|
+
</dialogWrap>
|
|
145
|
+
<dialogWrap
|
|
146
|
+
:title="'修改密码' | $l(i18n)"
|
|
147
|
+
:visible.sync="cpwdV"
|
|
148
|
+
append-to-body
|
|
149
|
+
width="400px"
|
|
150
|
+
>
|
|
151
|
+
<changePwd :visible.sync="cpwdV" />
|
|
152
|
+
</dialogWrap>
|
|
153
|
+
<!-- 消息/通知 -->
|
|
154
|
+
<el-popover
|
|
155
|
+
ref="noticePop"
|
|
156
|
+
trigger="click"
|
|
157
|
+
width="400"
|
|
158
|
+
@after-enter="$refs.noticeContent.show()"
|
|
159
|
+
>
|
|
160
|
+
<noticePop ref="noticeContent" :num.sync="noticeNum" />
|
|
161
|
+
</el-popover>
|
|
162
|
+
</div>
|
|
163
|
+
</template>
|
|
164
|
+
|
|
165
|
+
<script>
|
|
166
|
+
import dialogWrap from '../../Dialog/index.vue'
|
|
167
|
+
import changePwd from './changePwd.vue'
|
|
168
|
+
import noticePop from './noticePop.vue'
|
|
169
|
+
import axios from '../../../utils/axios'
|
|
170
|
+
|
|
171
|
+
import getJsonc from '../../../assets/getJsonc'
|
|
172
|
+
import realUrl from '../../../assets/realUrl'
|
|
173
|
+
import auth from '../../../utils/auth'
|
|
174
|
+
import { linkPush } from '../../../utils/urlToGo'
|
|
175
|
+
import dayjs from 'dayjs'
|
|
176
|
+
import duration from 'dayjs/plugin/duration'
|
|
177
|
+
dayjs.extend(duration)
|
|
178
|
+
|
|
179
|
+
const prefix =
|
|
180
|
+
window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || process.env.BASE_URL || '/'
|
|
181
|
+
|
|
182
|
+
const i18n = {
|
|
183
|
+
语言切换: {
|
|
184
|
+
en: 'Language switching'
|
|
185
|
+
},
|
|
186
|
+
客户端下载: {
|
|
187
|
+
en: 'Client download'
|
|
188
|
+
},
|
|
189
|
+
主题设置: {
|
|
190
|
+
en: 'Theme setting'
|
|
191
|
+
},
|
|
192
|
+
修改密码: {
|
|
193
|
+
en: 'Change Password'
|
|
194
|
+
},
|
|
195
|
+
我的交易: {
|
|
196
|
+
en: 'My deal'
|
|
197
|
+
},
|
|
198
|
+
工作代理: {
|
|
199
|
+
en: 'My agency'
|
|
200
|
+
},
|
|
201
|
+
登录时长: {
|
|
202
|
+
en: 'Login duration'
|
|
203
|
+
},
|
|
204
|
+
退出登录: {
|
|
205
|
+
en: 'LogOut'
|
|
206
|
+
},
|
|
207
|
+
小时: {
|
|
208
|
+
en: ':'
|
|
209
|
+
},
|
|
210
|
+
分: {
|
|
211
|
+
en: ':'
|
|
212
|
+
},
|
|
213
|
+
秒: {
|
|
214
|
+
en: ':'
|
|
215
|
+
},
|
|
216
|
+
'确定退出,将清除未提交的临时操作,是否继续?': {
|
|
217
|
+
en: 'Are you sure to exit? Uncommitted temporary operations will be cleared. Do you want to continue?'
|
|
218
|
+
},
|
|
219
|
+
退出提示: {
|
|
220
|
+
en: 'Exit Tips'
|
|
221
|
+
},
|
|
222
|
+
中文简体: {
|
|
223
|
+
en: 'Chinese Simplified'
|
|
224
|
+
},
|
|
225
|
+
中文繁体: {
|
|
226
|
+
en: 'Chinese Traditional'
|
|
227
|
+
},
|
|
228
|
+
英文: {
|
|
229
|
+
en: 'English'
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export default {
|
|
234
|
+
components: {
|
|
235
|
+
dialogWrap,
|
|
236
|
+
changePwd,
|
|
237
|
+
noticePop
|
|
238
|
+
},
|
|
239
|
+
inject: {
|
|
240
|
+
customOpt: {
|
|
241
|
+
type: Object,
|
|
242
|
+
default: () => ({})
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
data() {
|
|
246
|
+
return {
|
|
247
|
+
show: false,
|
|
248
|
+
headerLogoUrl: undefined,
|
|
249
|
+
headerLogoWidth: undefined,
|
|
250
|
+
headerLogoHeight: undefined,
|
|
251
|
+
headerTitle: undefined,
|
|
252
|
+
headerUserUrl: undefined,
|
|
253
|
+
userInfo: {},
|
|
254
|
+
durationTime: '00小时00分00秒',
|
|
255
|
+
cpwdV: false,
|
|
256
|
+
langV: false,
|
|
257
|
+
langVal: window.localStorage.getItem('pageLang') || 'zh-cn',
|
|
258
|
+
noticeNum: 0,
|
|
259
|
+
rolesList: [],
|
|
260
|
+
i18n
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
created() {
|
|
264
|
+
getJsonc('/server-config.jsonc').then(({ _layoutData = {} }) => {
|
|
265
|
+
this.show = true
|
|
266
|
+
|
|
267
|
+
this.headerLogoUrl = realUrl(_layoutData.headerLogoUrl)
|
|
268
|
+
this.headerUserUrl = realUrl(_layoutData.headerUserUrl)
|
|
269
|
+
this.headerLogoWidth = _layoutData.headerLogoWidth
|
|
270
|
+
this.headerLogoHeight = _layoutData.headerLogoHeight
|
|
271
|
+
this.headerTitle = _layoutData.headerTitle
|
|
272
|
+
})
|
|
273
|
+
},
|
|
274
|
+
methods: {
|
|
275
|
+
// 跳转打主数据人员页面
|
|
276
|
+
goMdmUser() {
|
|
277
|
+
linkPush('/mdm/personnel')
|
|
278
|
+
},
|
|
279
|
+
setUserVisible(v) {
|
|
280
|
+
if (v) {
|
|
281
|
+
let loginTime = sessionStorage.getItem('loginTime')
|
|
282
|
+
if (loginTime) {
|
|
283
|
+
this.durationTime = dayjs.duration(Date.now() - loginTime).format(
|
|
284
|
+
`HH${this.$l('小时', this.i18n)}
|
|
285
|
+
mm${this.$l('分', this.i18n)}
|
|
286
|
+
ss${this.$l('秒', this.i18n)}`
|
|
287
|
+
)
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
let userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
|
|
291
|
+
this.userInfo = {
|
|
292
|
+
userName: userInfo.uname,
|
|
293
|
+
companyName: userInfo.cltName
|
|
294
|
+
}
|
|
295
|
+
this.rolesList = userInfo.roles || []
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
// 打开帮助文档
|
|
299
|
+
openHelp() {
|
|
300
|
+
axios
|
|
301
|
+
.get(`/bems/1.0/userManual`, {}, { responseType: 'blob' })
|
|
302
|
+
.then((res) => {
|
|
303
|
+
if (!res.size) {
|
|
304
|
+
this.$message.error('暂无帮助文档,请联系管理员!')
|
|
305
|
+
return
|
|
306
|
+
}
|
|
307
|
+
let url = window.URL.createObjectURL(res)
|
|
308
|
+
let win = window.open(url, '帮助文档')
|
|
309
|
+
setTimeout(function () {
|
|
310
|
+
win.document.title = '帮助文档'
|
|
311
|
+
}, 1000)
|
|
312
|
+
})
|
|
313
|
+
},
|
|
314
|
+
setUserFn(c) {
|
|
315
|
+
switch (c) {
|
|
316
|
+
case 'setLang':
|
|
317
|
+
// this.setLang()
|
|
318
|
+
this.langV = true
|
|
319
|
+
break
|
|
320
|
+
case 'dowApp':
|
|
321
|
+
this.dowApp()
|
|
322
|
+
break
|
|
323
|
+
case 'changePassword':
|
|
324
|
+
this.changePassword()
|
|
325
|
+
break
|
|
326
|
+
case 'logOut':
|
|
327
|
+
this.logOut()
|
|
328
|
+
break
|
|
329
|
+
default:
|
|
330
|
+
this.$emit('custom-event', { type: c })
|
|
331
|
+
break
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
setLang() {
|
|
335
|
+
this.langV = false
|
|
336
|
+
window.localStorage.setItem('pageLang', this.langVal)
|
|
337
|
+
window.location.reload()
|
|
338
|
+
},
|
|
339
|
+
dowApp() {
|
|
340
|
+
// alert('客户端下载')
|
|
341
|
+
let name = 'download.exe'
|
|
342
|
+
let aDom = document.createElement('a')
|
|
343
|
+
aDom.href = `${prefix}server-assets/${name}`
|
|
344
|
+
aDom.download = name
|
|
345
|
+
aDom.click()
|
|
346
|
+
|
|
347
|
+
this.$nextTick(() => {
|
|
348
|
+
aDom = undefined
|
|
349
|
+
})
|
|
350
|
+
},
|
|
351
|
+
changePassword() {
|
|
352
|
+
// alert('修改密码')
|
|
353
|
+
this.cpwdV = true
|
|
354
|
+
},
|
|
355
|
+
logOut() {
|
|
356
|
+
// alert('退出登录')
|
|
357
|
+
this.$confirm(
|
|
358
|
+
this.$l('退出将清除未保存的临时操作,请确认是否继续?', this.i18n),
|
|
359
|
+
this.$l('退出提示', this.i18n),
|
|
360
|
+
{
|
|
361
|
+
confirmButtonText: this.$l('确定'),
|
|
362
|
+
cancelButtonText: this.$l('取消'),
|
|
363
|
+
type: 'warning'
|
|
364
|
+
}
|
|
365
|
+
).then(() => {
|
|
366
|
+
auth.removeToken()
|
|
367
|
+
})
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
</script>
|