n20-common-lib 2.22.52 → 2.22.53
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/AIButton/index.vue +6 -5
- package/src/components/ApprovalButtons/index.vue +3 -3
- package/src/components/ApprovalButtons/indexApp.vue +10 -29
- package/src/components/ApprovalButtons/selectSpr.vue +1 -1
- package/src/components/ApprovalButtons/showAppOpi.vue +5 -5
- package/src/components/ApprovalButtons/showOtherAttr.vue +2 -2
- package/src/components/ApprovalButtons/showOtherAttrNew.vue +8 -6
- package/src/components/ApprovalCard/index.vue +6 -6
- package/src/components/ApprovalCard/indexApp.vue +2 -2
- package/src/components/ApprovalRecord/approvalImg.vue +1 -1
- package/src/components/ApprovalRecord/approvalImgPro/child.vue +3 -3
- package/src/components/ApprovalRecord/approvalImgPro/index.vue +3 -3
- package/src/components/AttachmentPass/index.vue +7 -7
- package/src/components/DateChoose/index.vue +41 -36
- package/src/components/DatePicker/index.vue +2 -2
- package/src/components/DateSelect/busiDate.vue +5 -4
- package/src/components/DateSelect/index.vue +9 -8
- package/src/components/DateSelect/quarterDatePicker.vue +12 -11
- package/src/components/Diff/index.vue +2 -1
- package/src/components/DynamicField/DynamicField.vue +1 -1
- package/src/components/DynamicField/DynamicFieldMixin.js +3 -2
- package/src/components/DynamicField/DynamicFieldOptions.vue +80 -58
- package/src/components/DynamicField/DynamicTable.vue +4 -4
- package/src/components/DynamicField/contentPop.vue +8 -6
- package/src/components/DynamicField/tableList.vue +7 -5
- package/src/components/DynamicField/tableView.vue +20 -6
- package/src/components/ElectronicArchive/index.vue +18 -16
- package/src/components/EventBubble/demo/c.vue +2 -1
- package/src/components/FileExportAsync/index.vue +11 -10
- package/src/components/FileImport/index.vue +2 -1
- package/src/components/FileUploadTable/FileUploadTableV3.vue +10 -11
- package/src/components/FileUploadTable/aiCheckDialog.vue +13 -11
- package/src/components/FileUploadTable/index.vue +15 -14
- package/src/components/Filters/indexO.vue +3 -2
- package/src/components/HandlingAdvice/index.vue +4 -3
- package/src/components/InputNumber/index.vue +2 -1
- package/src/components/Layout/HeaderWrap/changePwd.vue +8 -7
- package/src/components/Layout/HeaderWrap/index.vue +11 -10
- package/src/components/Layout/HeaderWrap/indexN.vue +21 -20
- package/src/components/Layout/HeaderWrap/noticePop.vue +8 -7
- package/src/components/Layout/HeaderWrap/switchUser.vue +1 -1
- package/src/components/Layout/index.vue +2 -1
- package/src/components/Layout/indexN.vue +2 -1
- package/src/components/LoginSetting/index.vue +14 -13
- package/src/components/LoginSetting/indexN.vue +11 -10
- package/src/components/LoginSetting/setItem.vue +22 -21
- package/src/components/LoginTemporary/form.vue +17 -16
- package/src/components/LoginTemporary/index.vue +5 -4
- package/src/components/LoginTemporary/indexN.vue +20 -19
- package/src/components/LoginTemporary/retrievePw.vue +11 -10
- package/src/components/PageHeader/index.vue +2 -1
- package/src/components/SelectDatePickerPro/busiDate.vue +6 -4
- package/src/components/SelectDatePickerPro/halfYearPicker.vue +3 -2
- package/src/components/SelectDatePickerPro/index.vue +13 -11
- package/src/components/SelectDatePickerPro/quarterDatePicker.vue +6 -4
- package/src/components/SelectTree/pro.vue +1 -1
- package/src/components/ShowColumn/index.vue +13 -12
- package/src/components/Stamp/index.vue +8 -7
- package/src/components/Statis/index.vue +9 -8
- package/src/components/Statis/statisItem.vue +4 -3
- package/src/components/Table/indexO.vue +2 -1
- package/src/components/TablePro/filterContent.vue +2 -2
- package/src/components/TablePro/filterContent_tree.vue +6 -5
- package/src/components/TablePro/index.js +2 -1
- package/src/components/TablePro/index.vue +2 -1
- package/src/components/TableTransfer/index.vue +2 -1
- package/src/components/Upload/index.vue +9 -8
- package/src/components/Upload/uploadMsg.vue +2 -1
- package/src/components/WornPagination/index.vue +3 -1
- package/src/components/operatingStatus/index.vue +9 -7
- package/src/i18n.json +5800 -714
- package/src/index.js +2 -2
- package/src/plugins/SetMenuTree/index.vue +1 -1
- package/src/plugins/SetMenuTree/setmenutree.vue +36 -34
- package/src/plugins/Sign/CaMap.js +12 -11
- package/src/plugins/Sign/Itrus/index.js +58 -56
- package/src/plugins/Sign/Itrus/sign_3720.js +53 -51
- package/src/plugins/Sign/NetSM3/index.js +12 -10
- package/src/plugins/Sign/NetV3/index.js +20 -18
- package/src/plugins/Sign/SkfSign/index.js +12 -10
- package/src/plugins/Sign/bjca/XTXSAB.js +17 -16
- package/src/plugins/Sign/bjca/index.js +19 -17
- package/src/plugins/Sign/cfca/index.js +11 -9
- package/src/plugins/Sign/codeMap.js +151 -150
- package/src/plugins/Sign/hnca/index.js +51 -49
- package/src/plugins/Sign/index.js +6 -4
- package/src/plugins/Sign/kySign/index.js +11 -9
- package/src/plugins/Sign/netca/index.js +9 -7
- package/src/plugins/Sign/netca/netca.base.1.1.0.js +29 -28
- package/src/plugins/Sign/sdca/index.js +17 -15
- package/src/plugins/Sign/sign.js +10 -8
- package/src/plugins/Sign/signV3/sign.js +14 -12
- package/src/plugins/Sign/sign_back.js +11 -9
- package/src/utils/amountInWords.js +8 -6
- package/src/utils/axios.js +9 -8
- package/src/utils/relaNo.js +3 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { $lc } from '../../../utils/i18n/index.js'
|
|
1
2
|
/**
|
|
2
3
|
* 山地CA
|
|
3
4
|
* by 2025-1-2
|
|
@@ -6,19 +7,20 @@
|
|
|
6
7
|
import axios from 'axios'
|
|
7
8
|
import { Message } from 'element-ui'
|
|
8
9
|
|
|
10
|
+
|
|
9
11
|
async function getKeyExist() {
|
|
10
12
|
const { data } = await axios.get('http://127.0.0.1:8090/keyExist')
|
|
11
13
|
if (data.code !== 200) {
|
|
12
|
-
Message.warning(
|
|
13
|
-
throw new Error(
|
|
14
|
+
Message.warning($lc("Ukey不存在!"))
|
|
15
|
+
throw new Error($lc("Ukey不存在!"))
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
async function getCertSN() {
|
|
18
20
|
const { data } = await axios.get('http://127.0.0.1:8090/getCertSN')
|
|
19
21
|
if (data.code !== 200) {
|
|
20
|
-
Message.warning(
|
|
21
|
-
throw new Error(
|
|
22
|
+
Message.warning($lc("获取证书序列号失败!"))
|
|
23
|
+
throw new Error($lc("获取证书序列号失败!"))
|
|
22
24
|
}
|
|
23
25
|
return data.msg
|
|
24
26
|
}
|
|
@@ -28,17 +30,17 @@ async function performSign(plain) {
|
|
|
28
30
|
if (data.code !== 200) {
|
|
29
31
|
switch (data.msg) {
|
|
30
32
|
case '0x000000A0':
|
|
31
|
-
Message.warning(
|
|
32
|
-
throw new Error(
|
|
33
|
+
Message.warning($lc("ukey密码错误"))
|
|
34
|
+
throw new Error($lc("ukey密码错误"))
|
|
33
35
|
case '0x000000A4':
|
|
34
|
-
Message.warning(
|
|
35
|
-
throw new Error(
|
|
36
|
+
Message.warning($lc("ukey被锁,请用管理员工具解锁"))
|
|
37
|
+
throw new Error($lc("ukey被锁,请用管理员工具解锁"))
|
|
36
38
|
case '0x00005001':
|
|
37
|
-
Message.warning(
|
|
38
|
-
throw new Error(
|
|
39
|
+
Message.warning($lc("未输入ukey密码"))
|
|
40
|
+
throw new Error($lc("未输入ukey密码"))
|
|
39
41
|
default:
|
|
40
|
-
Message.warning(
|
|
41
|
-
throw new Error(
|
|
42
|
+
Message.warning($lc("获取ukey异常"))
|
|
43
|
+
throw new Error($lc("获取ukey异常"))
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
return data.msg
|
|
@@ -58,7 +60,7 @@ export async function getSign(plain, dn) {
|
|
|
58
60
|
dn = getDN()
|
|
59
61
|
}
|
|
60
62
|
if (!dn) {
|
|
61
|
-
Message.error(
|
|
63
|
+
Message.error($lc("签名参数DN错误!"))
|
|
62
64
|
return false
|
|
63
65
|
}
|
|
64
66
|
let plainText = typeof plain === 'object' ? JSON.stringify(plain) : plain
|
|
@@ -66,8 +68,8 @@ export async function getSign(plain, dn) {
|
|
|
66
68
|
await getKeyExist()
|
|
67
69
|
const certSN = await getCertSN()
|
|
68
70
|
if (certSN !== dn) {
|
|
69
|
-
Message.warning(
|
|
70
|
-
throw new Error(
|
|
71
|
+
Message.warning($lc("当前Ukey不匹配!"))
|
|
72
|
+
throw new Error($lc("当前Ukey不匹配!"))
|
|
71
73
|
}
|
|
72
74
|
return performSign(plainText)
|
|
73
75
|
}
|
package/src/plugins/Sign/sign.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { $lc } from '../../utils/i18n/index.js'
|
|
1
2
|
// Attached方式签名
|
|
2
3
|
import { Message, Notification } from 'element-ui'
|
|
3
4
|
import { IWSAgent } from './InfosecNetSignCNGAgent.min.js'
|
|
4
5
|
|
|
6
|
+
|
|
5
7
|
const {
|
|
6
8
|
IWSASetTimeOut,
|
|
7
9
|
IWSAAttachedSign,
|
|
@@ -36,14 +38,14 @@ export function availableSign(fn, url) {
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
function checkAvailable(fn, url, count) {
|
|
39
|
-
let name = window.NetSignDownloadName ||
|
|
41
|
+
let name = window.NetSignDownloadName || $lc("NetSignCNG签名助手")
|
|
40
42
|
let available = IWSAGetAvailable()
|
|
41
43
|
if (available) {
|
|
42
44
|
fn && fn(available)
|
|
43
45
|
} else if (count == 10) {
|
|
44
46
|
fn && fn(available)
|
|
45
47
|
Notification({
|
|
46
|
-
title:
|
|
48
|
+
title: $lc("提示"),
|
|
47
49
|
dangerouslyUseHTMLString: true,
|
|
48
50
|
message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="${url}" download>下载安装</a>${name}</div>`,
|
|
49
51
|
duration: 5000
|
|
@@ -67,7 +69,7 @@ export function verifySign(signedMsg) {
|
|
|
67
69
|
if (errorCode === 0 || errorCode === '0') {
|
|
68
70
|
plainText = PlainText
|
|
69
71
|
} else {
|
|
70
|
-
Message.error(
|
|
72
|
+
Message.error($lc("签名解签失败!"))
|
|
71
73
|
}
|
|
72
74
|
})
|
|
73
75
|
return plainText
|
|
@@ -97,22 +99,22 @@ export function getCertInfo(dn) {
|
|
|
97
99
|
dn = getDN()
|
|
98
100
|
}
|
|
99
101
|
if (!dn) {
|
|
100
|
-
Message.error(
|
|
102
|
+
Message.error($lc("没有获取到签名参数DN!"))
|
|
101
103
|
return false
|
|
102
104
|
}
|
|
103
105
|
return new Promise((resolve, reject) => {
|
|
104
106
|
let certInfo
|
|
105
107
|
IWSAGetAllCertsListInfoByCertDN('', 'Sign', parseCA(dn), 0, (dnList) => {
|
|
106
108
|
if (!dn) {
|
|
107
|
-
Message.error(
|
|
109
|
+
Message.error($lc("没有获取到签名参数DN!"))
|
|
108
110
|
reject()
|
|
109
111
|
}
|
|
110
112
|
if (!dnList) {
|
|
111
|
-
Message.error(
|
|
113
|
+
Message.error($lc("没有获取到证书列表!"))
|
|
112
114
|
reject()
|
|
113
115
|
}
|
|
114
116
|
if (dnList.length === 0) {
|
|
115
|
-
Message.error(
|
|
117
|
+
Message.error($lc("获取到的证书列表为空!"))
|
|
116
118
|
reject()
|
|
117
119
|
}
|
|
118
120
|
|
|
@@ -138,7 +140,7 @@ export async function performSign(plain, index) {
|
|
|
138
140
|
if (errorCode === 0 || errorCode === '0') {
|
|
139
141
|
resolve(signedData)
|
|
140
142
|
} else {
|
|
141
|
-
Message.error(
|
|
143
|
+
Message.error($lc("签名失败!"))
|
|
142
144
|
reject(errorCode)
|
|
143
145
|
}
|
|
144
146
|
})
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { $lc } from '../../../utils/i18n/index.js'
|
|
1
2
|
// Attached方式签名
|
|
2
3
|
import { Message, MessageBox,Notification } from 'element-ui'
|
|
3
4
|
import { IWSAgent } from './InfosecNetSignCNGAgent.min.js'
|
|
4
5
|
|
|
6
|
+
|
|
5
7
|
const {
|
|
6
8
|
IWSASetTimeOut,
|
|
7
9
|
IWSADetachedSign,
|
|
@@ -38,14 +40,14 @@ export function availableSign(fn, url) {
|
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
function checkAvailable(fn, url, count) {
|
|
41
|
-
let name = window.NetSignDownloadName ||
|
|
43
|
+
let name = window.NetSignDownloadName || $lc("NetSignCNG签名助手")
|
|
42
44
|
let available = IWSAGetAvailable()
|
|
43
45
|
if (available) {
|
|
44
46
|
fn && fn(available)
|
|
45
47
|
} else if (count == 10) {
|
|
46
48
|
fn && fn(available)
|
|
47
49
|
Notification({
|
|
48
|
-
title:
|
|
50
|
+
title: $lc("提示"),
|
|
49
51
|
dangerouslyUseHTMLString: true,
|
|
50
52
|
message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="${url}" download>下载安装</a>${name}</div>`,
|
|
51
53
|
duration: 5000
|
|
@@ -69,7 +71,7 @@ export function verifySign(signedMsg) {
|
|
|
69
71
|
if (errorCode === 0 || errorCode === '0') {
|
|
70
72
|
plainText = PlainText
|
|
71
73
|
} else {
|
|
72
|
-
Message.error(
|
|
74
|
+
Message.error($lc("签名解签失败!"))
|
|
73
75
|
}
|
|
74
76
|
})
|
|
75
77
|
return plainText
|
|
@@ -93,9 +95,9 @@ export async function getSign(plain, dn) {
|
|
|
93
95
|
document.documentElement.dataset.osType === 'kylin'||certType==='SM3'
|
|
94
96
|
) {
|
|
95
97
|
// 签名
|
|
96
|
-
return await MessageBox.prompt(
|
|
97
|
-
confirmButtonText:
|
|
98
|
-
cancelButtonText:
|
|
98
|
+
return await MessageBox.prompt($lc("请输入PIN码"), $lc("提示"), {
|
|
99
|
+
confirmButtonText: $lc("确定"),
|
|
100
|
+
cancelButtonText: $lc("取消"),
|
|
99
101
|
closeOnClickModal: false,
|
|
100
102
|
inputType: 'password'
|
|
101
103
|
}).then(({ value }) => {
|
|
@@ -117,7 +119,7 @@ export function getCertInfo(dn) {
|
|
|
117
119
|
dn = getDN()
|
|
118
120
|
}
|
|
119
121
|
if (!dn) {
|
|
120
|
-
Message.error(
|
|
122
|
+
Message.error($lc("没有获取到签名参数DN!"))
|
|
121
123
|
return false
|
|
122
124
|
}
|
|
123
125
|
if (
|
|
@@ -133,15 +135,15 @@ export function getCertInfo(dn) {
|
|
|
133
135
|
let certInfo
|
|
134
136
|
IWSAGetAllCertsListInfo('infosec.sm2', 'Sign', 0, (dnList) => {
|
|
135
137
|
if (!dn) {
|
|
136
|
-
Message.error(
|
|
138
|
+
Message.error($lc("没有获取到签名参数DN!"))
|
|
137
139
|
reject()
|
|
138
140
|
}
|
|
139
141
|
if (!dnList) {
|
|
140
|
-
Message.error(
|
|
142
|
+
Message.error($lc("没有获取到证书列表!"))
|
|
141
143
|
reject()
|
|
142
144
|
}
|
|
143
145
|
if (dnList.length === 0) {
|
|
144
|
-
Message.error(
|
|
146
|
+
Message.error($lc("用户证书信息与当前用户不匹配!"))
|
|
145
147
|
reject()
|
|
146
148
|
}
|
|
147
149
|
|
|
@@ -195,7 +197,7 @@ export async function performSign(plain, index) {
|
|
|
195
197
|
if (errorCode === 0 || errorCode === '0') {
|
|
196
198
|
resolve(signedData)
|
|
197
199
|
} else {
|
|
198
|
-
Message.error(
|
|
200
|
+
Message.error($lc("签名失败!"))
|
|
199
201
|
reject(errorCode)
|
|
200
202
|
}
|
|
201
203
|
})
|
|
@@ -220,7 +222,7 @@ async function performSignSkf(plainText, value) {
|
|
|
220
222
|
if (errorCode === 0 || errorCode === '0') {
|
|
221
223
|
resolve(signedData)
|
|
222
224
|
} else {
|
|
223
|
-
Message.error(
|
|
225
|
+
Message.error($lc("签名失败!"))
|
|
224
226
|
reject()
|
|
225
227
|
}
|
|
226
228
|
})
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { $lc } from '../../utils/i18n/index.js'
|
|
1
2
|
// Attached方式签名
|
|
2
3
|
import { Message, Notification } from 'element-ui'
|
|
3
4
|
import { IWSAgent } from './InfosecNetSignCNGAgent.min.js'
|
|
4
5
|
|
|
6
|
+
|
|
5
7
|
const {
|
|
6
8
|
IWSASetTimeOut,
|
|
7
9
|
IWSAAttachedSign,
|
|
@@ -35,14 +37,14 @@ export function availableSign(fn, url) {
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
function checkAvailable(fn, url, count) {
|
|
38
|
-
let name = window.NetSignDownloadName ||
|
|
40
|
+
let name = window.NetSignDownloadName || $lc("NetSignCNG签名助手")
|
|
39
41
|
let available = IWSAGetAvailable()
|
|
40
42
|
if (available) {
|
|
41
43
|
fn && fn(available)
|
|
42
44
|
} else if (count == 10) {
|
|
43
45
|
fn && fn(available)
|
|
44
46
|
Notification({
|
|
45
|
-
title:
|
|
47
|
+
title: $lc("提示"),
|
|
46
48
|
dangerouslyUseHTMLString: true,
|
|
47
49
|
message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="${url}" download>下载安装</a>${name}</div>`,
|
|
48
50
|
duration: 5000
|
|
@@ -62,7 +64,7 @@ export function verifySign(signedMsg) {
|
|
|
62
64
|
if (errorCode === 0 || errorCode === '0') {
|
|
63
65
|
plainText = PlainText
|
|
64
66
|
} else {
|
|
65
|
-
Message.error(
|
|
67
|
+
Message.error($lc("签名解签失败!"))
|
|
66
68
|
}
|
|
67
69
|
})
|
|
68
70
|
return plainText
|
|
@@ -74,16 +76,16 @@ export async function getSign(plain, dn) {
|
|
|
74
76
|
if (index === -1 || ['dnListEmpty', 'dnIsEmpty', 'Empty'].includes(index)) {
|
|
75
77
|
switch (index) {
|
|
76
78
|
case 'dnListEmpty':
|
|
77
|
-
Message.warning(
|
|
79
|
+
Message.warning($lc("没有匹配到证书!"))
|
|
78
80
|
break
|
|
79
81
|
case 'dnIsEmpty':
|
|
80
|
-
Message.warning(
|
|
82
|
+
Message.warning($lc("DN参数为空!"))
|
|
81
83
|
break
|
|
82
84
|
case 'Empty':
|
|
83
|
-
Message.warning(
|
|
85
|
+
Message.warning($lc("当前Ukey不匹配!"))
|
|
84
86
|
break
|
|
85
87
|
default:
|
|
86
|
-
Message.warning(
|
|
88
|
+
Message.warning($lc("没有匹配到证书!"))
|
|
87
89
|
}
|
|
88
90
|
return ''
|
|
89
91
|
}
|
|
@@ -106,7 +108,7 @@ export function getCertInfo(dn) {
|
|
|
106
108
|
dn = getDN()
|
|
107
109
|
}
|
|
108
110
|
if (!dn) {
|
|
109
|
-
Message.error(
|
|
111
|
+
Message.error($lc("签名参数DN错误!"))
|
|
110
112
|
return false
|
|
111
113
|
}
|
|
112
114
|
return new Promise((resolve, reject) => {
|
|
@@ -131,7 +133,7 @@ export async function performSign(plain, index) {
|
|
|
131
133
|
if (errorCode === 0 || errorCode === '0') {
|
|
132
134
|
resolve(signedData)
|
|
133
135
|
} else {
|
|
134
|
-
Message.error(
|
|
136
|
+
Message.error($lc("签名失败!"))
|
|
135
137
|
reject()
|
|
136
138
|
}
|
|
137
139
|
})
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import { $lc } from './i18n/index.js'
|
|
1
2
|
import Nzh from 'nzh'
|
|
2
3
|
|
|
4
|
+
|
|
3
5
|
export const convert = (
|
|
4
6
|
money,
|
|
5
7
|
options = {
|
|
6
|
-
ch:
|
|
7
|
-
ch_u:
|
|
8
|
-
ch_f:
|
|
9
|
-
ch_d:
|
|
10
|
-
m_u:
|
|
8
|
+
ch: $lc("零壹贰叁肆伍陆柒捌玖"), // 数字字符
|
|
9
|
+
ch_u: $lc("个拾佰仟万亿兆京"), // 数位单位字符,万以下十进制,万以上万进制,个位不能省略
|
|
10
|
+
ch_f: $lc("负"), // 负字符
|
|
11
|
+
ch_d: $lc("点"), // 小数点字符
|
|
12
|
+
m_u: $lc("元角分厘"), // 金额单位
|
|
11
13
|
m_t: '', // 金额前缀
|
|
12
|
-
m_z:
|
|
14
|
+
m_z: $lc("整") // 金额无小数后缀
|
|
13
15
|
}
|
|
14
16
|
) => {
|
|
15
17
|
if (money === undefined || money === null) {
|
package/src/utils/axios.js
CHANGED
|
@@ -2,6 +2,7 @@ import _axios from 'axios'
|
|
|
2
2
|
import ElementUI from 'element-ui'
|
|
3
3
|
import auth from './auth'
|
|
4
4
|
import { $lc } from './i18n/index'
|
|
5
|
+
|
|
5
6
|
const _Loading = ElementUI.Loading
|
|
6
7
|
const _Message = ElementUI.Message
|
|
7
8
|
|
|
@@ -54,7 +55,7 @@ function showLoading(opt) {
|
|
|
54
55
|
if (loadingCount === 0 && !document.querySelector('.xhr-loading-top:not(.el-loading-fade-leave-active)')) {
|
|
55
56
|
loadingBox = _Loading.service({
|
|
56
57
|
lock: true,
|
|
57
|
-
text: $lc(
|
|
58
|
+
text: $lc("加载中"),
|
|
58
59
|
background: 'rgba(0, 0, 0, 0.1)',
|
|
59
60
|
customClass: 'xhr-loading-top'
|
|
60
61
|
})
|
|
@@ -94,7 +95,7 @@ axios.interceptors.request.use((opt) => {
|
|
|
94
95
|
|
|
95
96
|
function errorFn(status, msg, noMsg, res) {
|
|
96
97
|
if (status === 401 || msg === 'Request failed with status code 401') {
|
|
97
|
-
noMsg || showMsg($lc(
|
|
98
|
+
noMsg || showMsg($lc("超时未操作,请重新登录!"))
|
|
98
99
|
setTimeout(() => {
|
|
99
100
|
if (navigator.userAgent.includes('NSTC-WebEntry')) {
|
|
100
101
|
localStorage.clear()
|
|
@@ -104,15 +105,15 @@ function errorFn(status, msg, noMsg, res) {
|
|
|
104
105
|
}
|
|
105
106
|
}, 1000)
|
|
106
107
|
} else if (status === 400) {
|
|
107
|
-
noMsg || showMsg($lc(
|
|
108
|
+
noMsg || showMsg($lc("400,参数错误!"))
|
|
108
109
|
} else if (status === 404 || msg === 'Request failed with status code 404') {
|
|
109
|
-
noMsg || showMsg($lc(
|
|
110
|
+
noMsg || showMsg($lc("404,网络连接失败!"))
|
|
110
111
|
} else if (status === 500) {
|
|
111
|
-
noMsg || showMsg($lc(
|
|
112
|
+
noMsg || showMsg($lc("500,服务器链接失败!"))
|
|
112
113
|
} else if (status === 'ECONNABORTED' && msg.includes('timeout')) {
|
|
113
|
-
noMsg || showMsg($lc(
|
|
114
|
+
noMsg || showMsg($lc("请求超时"))
|
|
114
115
|
} else if (msg === 'Network Error') {
|
|
115
|
-
noMsg || showMsg($lc(
|
|
116
|
+
noMsg || showMsg($lc("请求错误"))
|
|
116
117
|
} else if (status >= 900 || status === -1) {
|
|
117
118
|
noMsg || showMsg(msg)
|
|
118
119
|
} else {
|
|
@@ -218,7 +219,7 @@ function request(opt) {
|
|
|
218
219
|
res.data.name = filename
|
|
219
220
|
}
|
|
220
221
|
if (res.data.size === 0) {
|
|
221
|
-
reject({ code: 404, msg: opt.url + $lc(
|
|
222
|
+
reject({ code: 404, msg: opt.url + $lc("请求返回文件大小0KB") })
|
|
222
223
|
} else {
|
|
223
224
|
resolve(res.data)
|
|
224
225
|
}
|
package/src/utils/relaNo.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { $lc } from './i18n/index.js'
|
|
1
2
|
import forEachs from './forEachs'
|
|
2
3
|
import { getItem } from './storageEdit'
|
|
3
4
|
|
|
5
|
+
|
|
4
6
|
const name = process.env.VUE_APP_RelaAppNo || process.env.VUE_APP_NAME
|
|
5
7
|
|
|
6
8
|
let relaObj = undefined
|
|
@@ -19,7 +21,7 @@ export function setRela() {
|
|
|
19
21
|
relaObj = relaNos.find((r) => r.appNo === name) || { appNo: name, relaNos: [] }
|
|
20
22
|
let relaNosG = getItem('relaNosGlobal')
|
|
21
23
|
|
|
22
|
-
console.log({ relaObj, relaNosGlobal: relaNosG },
|
|
24
|
+
console.log({ relaObj, relaNosGlobal: relaNosG }, $lc("has权限列表"))
|
|
23
25
|
return
|
|
24
26
|
}
|
|
25
27
|
/* 兼容旧门户 */
|