n20-common-lib 1.3.76 → 1.3.78
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/package.json +1 -1
- package/src/components/ApprovalButtons/index.vue +44 -25
- package/src/components/ApprovalButtons/setCarboncopyProp.vue +9 -9
- package/src/components/ApprovalCard/index.vue +8 -7
- package/src/components/ApprovalRecord/approvalImgPro/index.vue +8 -7
- package/src/components/ApprovalRecord/flowDialog.vue +2 -2
- package/src/components/ApprovalRecord/index.vue +5 -5
- package/src/components/Button/button-group.vue +18 -17
- package/src/components/ChildRange/index.vue +2 -2
- package/src/components/ContentLoading/index.vue +4 -3
- package/src/components/ContentNull/index.vue +1 -1
- package/src/components/DatePicker/por.vue +12 -11
- package/src/components/Diff/index.vue +2 -1
- package/src/components/EventBubble/demo/a.vue +1 -1
- package/src/components/EventBubble/demo/c.vue +4 -2
- package/src/components/Expandable/index.vue +1 -1
- package/src/components/FileExportAsync/index.vue +12 -11
- package/src/components/FileImport/index.vue +6 -5
- package/src/components/FileUploadTable/index.vue +46 -45
- package/src/components/Filters/form-item-input.vue +1 -1
- package/src/components/Filters/index.vue +7 -5
- package/src/components/Filters/indexO.vue +5 -4
- package/src/components/InputNumber/index.vue +3 -2
- package/src/components/InputSearch/index.vue +1 -0
- package/src/components/Layout/HeaderWrap/changePwd.vue +20 -19
- package/src/components/Layout/HeaderWrap/index.vue +36 -90
- package/src/components/Layout/HeaderWrap/noticePop.vue +16 -15
- package/src/components/Layout/HeaderWrap/switchUser.vue +6 -6
- package/src/components/Layout/TabsNav/index.vue +6 -21
- package/src/components/Layout/index.vue +2 -1
- package/src/components/LoginTemporary/form.vue +34 -33
- package/src/components/LoginTemporary/index.vue +7 -6
- package/src/components/LoginTemporary/qrcode.vue +3 -2
- package/src/components/LoginTemporary/retrievePw.vue +32 -31
- package/src/components/MicroFrame/index.vue +1 -0
- package/src/components/MoreTab/index.vue +9 -4
- package/src/components/NavMenu/index.vue +1 -0
- package/src/components/PageHeader/index.vue +2 -1
- package/src/components/PageLayout/page.vue +1 -0
- package/src/components/Pagination/index.vue +5 -4
- package/src/components/SecondaryTab/index.vue +1 -0
- package/src/components/SelectLazy/index.vue +1 -0
- package/src/components/SelectTree/SelectTreeLazy.vue +1 -0
- package/src/components/SelectTree/index.vue +1 -0
- package/src/components/ShowColumn/index.vue +14 -13
- package/src/components/Sifting/index.vue +5 -4
- package/src/components/Stamp/index.vue +8 -7
- package/src/components/Statis/index.vue +20 -13
- package/src/components/Statis/statisItem.vue +3 -2
- package/src/components/Statis/statisPopover.vue +1 -0
- package/src/components/Step/index.vue +1 -0
- package/src/components/Suspend/index.vue +1 -0
- package/src/components/Table/index.vue +1 -0
- package/src/components/Table/indexO.vue +1 -0
- package/src/components/TableOperateColumn/OperateBtns.vue +1 -0
- package/src/components/TableOperateColumn/index.vue +1 -0
- package/src/components/Task/index.vue +1 -0
- package/src/components/TertiaryTab/index.vue +1 -0
- package/src/components/TimePicker/index.vue +1 -0
- package/src/components/Upload/index.vue +7 -6
- package/src/components/Upload/uploadMsg.vue +9 -8
- package/src/index.js +2 -1
- package/src/utils/axios.js +9 -8
- package/src/utils/i18n/index.js +8 -1
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script>
|
|
47
|
+
import { $lc } from '../../utils/i18n/index'
|
|
47
48
|
import auth from '../../utils/auth'
|
|
48
49
|
import uploadMsg from './uploadMsg.vue'
|
|
49
50
|
export default {
|
|
@@ -71,7 +72,7 @@ export default {
|
|
|
71
72
|
},
|
|
72
73
|
placeholder: {
|
|
73
74
|
type: String,
|
|
74
|
-
default: '请选择'
|
|
75
|
+
default: $lc('请选择')
|
|
75
76
|
},
|
|
76
77
|
msgType: {
|
|
77
78
|
type: String,
|
|
@@ -185,7 +186,7 @@ export default {
|
|
|
185
186
|
sizeNum = parseFloat(size)
|
|
186
187
|
}
|
|
187
188
|
if (file.size > sizeNum) {
|
|
188
|
-
this.$message.error('文件大小不能超过 ' + size + ' !')
|
|
189
|
+
this.$message.error($lc('文件大小不能超过 ') + size + ' !')
|
|
189
190
|
return false
|
|
190
191
|
}
|
|
191
192
|
}
|
|
@@ -196,7 +197,7 @@ export default {
|
|
|
196
197
|
ftB = ftB + '/*'
|
|
197
198
|
ftA = file.name.match(/\.[^.]+$/)?.[0] || '.' + ftA
|
|
198
199
|
if (!(accept.includes(ftB) || accept.includes(ftA))) {
|
|
199
|
-
this.$message.error('文件格式错误 !')
|
|
200
|
+
this.$message.error($lc('文件格式错误 !'))
|
|
200
201
|
return false
|
|
201
202
|
}
|
|
202
203
|
}
|
|
@@ -234,7 +235,7 @@ export default {
|
|
|
234
235
|
if (this.msgType === 'dialog') {
|
|
235
236
|
this.percent = 100
|
|
236
237
|
this.percentType = 'success'
|
|
237
|
-
this.percentMsg = response.msg || '上传成功!'
|
|
238
|
+
this.percentMsg = response.msg || $lc('上传成功!')
|
|
238
239
|
} else if (this.msgType === 'message') {
|
|
239
240
|
if (!this.onSuccess) {
|
|
240
241
|
this.$message({
|
|
@@ -252,12 +253,12 @@ export default {
|
|
|
252
253
|
|
|
253
254
|
if (this.msgType === 'dialog') {
|
|
254
255
|
this.percentType = 'exception'
|
|
255
|
-
this.percentMsg = err?.msg || '上传失败!'
|
|
256
|
+
this.percentMsg = err?.msg || $lc('上传失败!')
|
|
256
257
|
} else if (this.msgType === 'message') {
|
|
257
258
|
if (!this.onError) {
|
|
258
259
|
this.$message({
|
|
259
260
|
type: 'error',
|
|
260
|
-
message: err?.msg || '上传失败',
|
|
261
|
+
message: err?.msg || $lc('上传失败'),
|
|
261
262
|
showClose: true
|
|
262
263
|
})
|
|
263
264
|
}
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
<!-- 错误数据行提示 -->
|
|
9
9
|
<template v-if="validateResult">
|
|
10
10
|
<div>
|
|
11
|
-
<span class="m-r"
|
|
11
|
+
<span class="m-r">{{ '导入统计' | $lc }}</span>
|
|
12
12
|
<span>共计导入{{ validateResult.totalNum }}条, </span>
|
|
13
13
|
<span class="m-r-s">
|
|
14
|
-
其中有效数据
|
|
14
|
+
{{ '其中有效数据' | $lc }}
|
|
15
15
|
<span class="color-primary">{{ validateResult.successNum }}</span
|
|
16
16
|
>条,
|
|
17
17
|
</span>
|
|
18
18
|
<span>
|
|
19
|
-
无效数据
|
|
19
|
+
{{ '无效数据' | $lc }}
|
|
20
20
|
<span class="color-danger">{{ validateResult.errorList.length }}</span
|
|
21
|
-
|
|
21
|
+
>{{ '条。' | $lc }}
|
|
22
22
|
</span>
|
|
23
23
|
</div>
|
|
24
24
|
<template v-if="validateResult.errorList.length">
|
|
25
|
-
<div class="m-t m-b"
|
|
25
|
+
<div class="m-t m-b">{{ '无效数据详情' | $lc }}</div>
|
|
26
26
|
<el-table :data="errorList">
|
|
27
27
|
<el-table-column v-for="column in columnsList" :key="column.prop" :prop="column.prop" :label="column.label">
|
|
28
28
|
<template slot-scope="scope">
|
|
@@ -31,21 +31,22 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
</el-table-column>
|
|
33
33
|
</el-table>
|
|
34
|
-
<div class="color-warning m-t-s"
|
|
34
|
+
<div class="color-warning m-t-s">{{ '上述数据输入有误,请修改导入文件中相关信息!' | $lc }}</div>
|
|
35
35
|
</template>
|
|
36
36
|
<span slot="footer">
|
|
37
|
-
<el-button type="primary" @click="progressV = false"
|
|
37
|
+
<el-button type="primary" @click="progressV = false">{{ '确定' | $lc }}</el-button>
|
|
38
38
|
</span>
|
|
39
39
|
</template>
|
|
40
40
|
</el-dialog>
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script>
|
|
44
|
+
import { $lc } from '../../utils/i18n/index'
|
|
44
45
|
export default {
|
|
45
46
|
props: {
|
|
46
47
|
title: {
|
|
47
48
|
type: String,
|
|
48
|
-
default: '提示'
|
|
49
|
+
default: $lc('提示')
|
|
49
50
|
},
|
|
50
51
|
visible: {
|
|
51
52
|
type: Boolean,
|
package/src/index.js
CHANGED
|
@@ -89,7 +89,7 @@ import { has as isHas } from './directives/VHas/index.js'
|
|
|
89
89
|
import { hasG as isHasG } from './directives/VHas/index.js'
|
|
90
90
|
|
|
91
91
|
/** 国际化 */
|
|
92
|
-
import i18n from './utils/i18n'
|
|
92
|
+
import i18n, { $l } from './utils/i18n'
|
|
93
93
|
|
|
94
94
|
/** 修正ElementUI的问题 */
|
|
95
95
|
import repairEl from './utils/repairElementUI'
|
|
@@ -208,6 +208,7 @@ export {
|
|
|
208
208
|
isHasG,
|
|
209
209
|
dayjs,
|
|
210
210
|
numerify,
|
|
211
|
+
$l,
|
|
211
212
|
tipShow,
|
|
212
213
|
tipHide,
|
|
213
214
|
// 组件
|
package/src/utils/axios.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _axios from 'axios'
|
|
2
2
|
import ElementUI from 'element-ui'
|
|
3
3
|
import auth from './auth'
|
|
4
|
+
import { $lc } from './i18n/index'
|
|
4
5
|
const _Loading = ElementUI.Loading
|
|
5
6
|
const _Message = ElementUI.Message
|
|
6
7
|
|
|
@@ -24,7 +25,7 @@ function showLoading(opt) {
|
|
|
24
25
|
if (loadingCount === 0 && !document.querySelector('.xhr-loading-top')) {
|
|
25
26
|
loadingBox = _Loading.service({
|
|
26
27
|
lock: true,
|
|
27
|
-
text: '加载中',
|
|
28
|
+
text: $lc('加载中'),
|
|
28
29
|
background: 'rgba(0, 0, 0, 0.1)',
|
|
29
30
|
customClass: 'xhr-loading-top'
|
|
30
31
|
})
|
|
@@ -65,26 +66,26 @@ axios.interceptors.request.use((opt) => {
|
|
|
65
66
|
function errorFn(status, msg, noMsg) {
|
|
66
67
|
if (status === 401 || msg.includes('401')) {
|
|
67
68
|
if (navigator.userAgent.indexOf('NSTC-WebEntry') > -1) {
|
|
68
|
-
showMsg('超时未操作,请重新登录!')
|
|
69
|
+
showMsg($lc('超时未操作,请重新登录!'))
|
|
69
70
|
setTimeout(() => {
|
|
70
71
|
localStorage.clear()
|
|
71
72
|
sessionStorage.clear()
|
|
72
73
|
window.top.webQuit()
|
|
73
74
|
}, 3000)
|
|
74
75
|
} else {
|
|
75
|
-
noMsg || showMsg('超时未操作,请重新登录!')
|
|
76
|
+
noMsg || showMsg($lc('超时未操作,请重新登录!'))
|
|
76
77
|
setTimeout(() => {
|
|
77
78
|
auth.removeToken()
|
|
78
79
|
}, 1000)
|
|
79
80
|
}
|
|
80
81
|
} else if (status === 400 || msg.includes('400')) {
|
|
81
|
-
noMsg || showMsg('400,参数错误!')
|
|
82
|
+
noMsg || showMsg($lc('400,参数错误!'))
|
|
82
83
|
} else if (status === 404 || msg.includes('404')) {
|
|
83
|
-
noMsg || showMsg('404,网络连接失败!')
|
|
84
|
+
noMsg || showMsg($lc('404,网络连接失败!'))
|
|
84
85
|
} else if (status === 500 || msg.includes('500')) {
|
|
85
|
-
noMsg || showMsg('500,服务器链接失败!')
|
|
86
|
+
noMsg || showMsg($lc('500,服务器链接失败!'))
|
|
86
87
|
} else if (status === 'ECONNABORTED' && msg.includes('timeout')) {
|
|
87
|
-
showMsg('请求超时')
|
|
88
|
+
showMsg($lc('请求超时'))
|
|
88
89
|
} else if (status >= 900 || status === -1) {
|
|
89
90
|
noMsg || showMsg(msg)
|
|
90
91
|
} else {
|
|
@@ -134,7 +135,7 @@ function request(opt) {
|
|
|
134
135
|
if (opt.responseType === 'blob') {
|
|
135
136
|
let filename = getFilename(res.headers['content-disposition'])
|
|
136
137
|
filename && res.data && (res.data.name = filename.replace(/"/g, ''))
|
|
137
|
-
res.data.size === 0 ? reject(opt.url + '请求返回文件大小0KB') : resolve(res.data)
|
|
138
|
+
res.data.size === 0 ? reject(opt.url + $lc('请求返回文件大小0KB')) : resolve(res.data)
|
|
138
139
|
} else {
|
|
139
140
|
if (typeof res.data === 'object' && res.data.data === undefined) {
|
|
140
141
|
res.data.data = {}
|
package/src/utils/i18n/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import zhHk from './cn2hk.json' // 简体繁体映射
|
|
|
8
8
|
|
|
9
9
|
let pageLang = window.localStorage.getItem('pageLang') // 当前页面的语言
|
|
10
10
|
let $i18n_map_root = undefined // 全局的国际化
|
|
11
|
+
import i18n_map_corelib from '../../i18n.json'
|
|
11
12
|
|
|
12
13
|
export function $l(zh, map = {}) {
|
|
13
14
|
if (!pageLang || pageLang === 'zh-cn') {
|
|
@@ -32,6 +33,10 @@ function cn2hk(zh = '') {
|
|
|
32
33
|
return _zh
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
export function $lc(zh, map) {
|
|
37
|
+
return $l(zh, map || i18n_map_corelib)
|
|
38
|
+
}
|
|
39
|
+
|
|
35
40
|
const directive = {}
|
|
36
41
|
directive.install = (Vue, map = {}) => {
|
|
37
42
|
if (pageLang === 'en') {
|
|
@@ -42,9 +47,11 @@ directive.install = (Vue, map = {}) => {
|
|
|
42
47
|
|
|
43
48
|
$i18n_map_root = map
|
|
44
49
|
|
|
45
|
-
Vue.prototype.$i18n_map_root = $i18n_map_root
|
|
46
50
|
Vue.prototype.$l = $l
|
|
47
51
|
Vue.filter('$l', $l)
|
|
52
|
+
|
|
53
|
+
Vue.prototype.$lc = $lc
|
|
54
|
+
Vue.filter('$lc', $lc)
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
export default directive
|