system-clients 3.3.3 → 3.3.4-v3
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.info +1 -0
- package/package.json +103 -103
- package/src/LodopFuncs.js +71 -103
- package/src/components/Main.vue +15 -27
- package/src/components/Util.js +15 -0
- package/src/components/equipment/PcAdd.vue +1 -1
- package/src/components/equipment/PcList.vue +3 -3
- package/src/components/equipment/PhoneAdd.vue +1 -1
- package/src/components/equipment/PhoneList.vue +2 -2
- package/src/components/equipment/PosAdd.vue +11 -7
- package/src/components/equipment/PosList.vue +5 -3
- package/src/components/equipment/PosManage.vue +1 -1
- package/src/components/equipment/PosParamAdd.vue +2 -2
- package/src/components/equipment/PosParamList.vue +2 -2
- package/src/components/materialManage/materialList.vue +1 -1
- package/src/components/parammanage/ParamPage.vue +12 -12
- package/src/components/parammanage/ParamPages.vue +2 -2
- package/src/components/parammanage/SinglePage.vue +8 -8
- package/src/components/parammanage/SinglePages.vue +2 -2
- package/src/components/server/AddChangeMsg.vue +1 -1
- package/src/components/server/ChangeDeclare.vue +1 -1
- package/src/components/server/Login.vue +51 -67
- package/src/components/server/ModifyPw.vue +105 -35
- package/src/components/server/PcdBuildingSelect.vue +6 -8
- package/src/components/server/ResSelect.vue +0 -3
- package/src/components/server/ResSelectGroup.vue +1 -1
- package/src/components/server/RoleSelector.vue +2 -3
- package/src/components/server/TestResSelectGroup.vue +1 -1
- package/src/filiale/baole/Login.vue +24 -21
- package/src/filiale/chengtou/Login.vue +24 -21
- package/src/filiale/dongguan/Login.vue +24 -21
- package/src/filiale/dongguan/Main.vue +3 -5
- package/src/filiale/furuike/Login.vue +25 -24
- package/src/filiale/furuike/Main.vue +26 -39
- package/src/filiale/gehua/Main.vue +3 -5
- package/src/filiale/konggang/Login.vue +24 -21
- package/src/filiale/qianneng/Login.vue +24 -21
- package/src/filiale/qianneng/Main.vue +3 -5
- package/src/filiale/qianneng/ModifyPw.vue +105 -32
- package/src/filiale/rizhao/Login.vue +23 -20
- package/src/filiale/rizhao/Main.vue +3 -3
- package/src/filiale/shiquan/Login.vue +24 -21
- package/src/filiale/tianyi/Login.vue +24 -21
- package/src/filiale/tongchuan/Login.vue +24 -21
- package/src/filiale/tongchuan/Main.vue +6 -8
- package/src/filiale/weinan/Main.vue +6 -7
- package/src/filiale/wenxi/Login.vue +24 -21
- package/src/filiale/wenxi/Main.vue +3 -5
- package/src/filiale/wuhai/Main.vue +3 -6
- package/src/filiale/yuchuan/Login.vue +25 -22
- package/src/filiale/yuchuan/Main.vue +3 -5
- package/src/filiale/zhoukou/Main.vue +3 -5
- package/src/plugins/EncryptUtil.js +1 -1
- package/src/plugins/GetLoginInfoService.js +85 -20
- package/src/plugins/validation.js +12 -8
- package/src/stores/AppData.js +2 -1
- package/src/util/password-validation.js +185 -0
- package/build.gradle +0 -6
- package/src/filiale/ruihua/Login.vue +0 -576
- package/src/filiale/ruihua/system.js +0 -5
- package/static/ruihua/logo.jpg +0 -0
|
@@ -2,21 +2,36 @@ import Vue from 'vue'
|
|
|
2
2
|
import {HttpResetClass} from 'vue-client'
|
|
3
3
|
import cryptJS from './EncryptUtil'
|
|
4
4
|
|
|
5
|
-
let loginGen = async function (
|
|
6
|
-
let data = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (getLogin.data) {
|
|
5
|
+
let loginGen = async function (name, password, cue) {
|
|
6
|
+
let data = {name: name, password: password}
|
|
7
|
+
data = '$' + cryptJS.RSAEncrypt(JSON.stringify(data))
|
|
8
|
+
const getLogin = await Vue.resetpost('/rs/logic/getLogin', data, {resolveMsg: null, rejectMsg: null})
|
|
9
|
+
if (getLogin.data.states === '登录成功') {
|
|
11
10
|
//获取jwt
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
Vue.$login.jwt = getLogin.data.jwt
|
|
12
|
+
Vue.$login.jwtNew = getLogin.data.jwtNew
|
|
13
|
+
if (getLogin.data.s) {
|
|
14
|
+
Vue.$login['v3-session-key'] = cryptJS.RSADecrypt(getLogin.data.s)
|
|
15
|
+
}
|
|
16
|
+
// 调用远程登录服务,获取所有有权访问的功能
|
|
17
|
+
data = {username: name, password: password}
|
|
18
|
+
data = cryptJS.RSAEncrypt(JSON.stringify(data))
|
|
19
|
+
const resource = await Vue.resetpost(`/rs/user/userLogin/客服系统`, data, {
|
|
20
|
+
resolveMsg: null,
|
|
21
|
+
rejectMsg: null
|
|
22
|
+
})
|
|
23
|
+
// 兼容旧版ldao
|
|
24
|
+
if ((JSON.stringify(resource.data).startsWith("{") || JSON.stringify(resource.data).startsWith("[")) && resource.data.code && resource.data.msg && resource.data.code !== 200) {
|
|
25
|
+
throw {status: 555, data: resource.data.msg}
|
|
26
|
+
}
|
|
27
|
+
console.log('登陆获取Util', JSON.stringify(resource.data))
|
|
28
|
+
|
|
29
|
+
// 兼容旧版ldao,旧版不返回code
|
|
30
|
+
if ((JSON.stringify(resource.data).startsWith("{") || JSON.stringify(resource.data).startsWith("[")) && resource.data.code && resource.data.msg) {
|
|
31
|
+
Vue.$login.f = resource.data.data
|
|
32
|
+
} else {
|
|
33
|
+
Vue.$login.f = resource.data
|
|
18
34
|
}
|
|
19
|
-
Vue.$login.jwtNew = getLogin.data.access_token
|
|
20
35
|
// 把登录用户添加到cookie里
|
|
21
36
|
Vue.cookie.set('loginId', Vue.$login.f.id)
|
|
22
37
|
try {
|
|
@@ -24,7 +39,8 @@ let loginGen = async function (username, password, cue) {
|
|
|
24
39
|
let hasRight = await Vue.resetpost(`/rs/search`, {
|
|
25
40
|
source: "tool.getFullTree(this.getRights().where(row.getType() == $function$))",
|
|
26
41
|
userid: Vue.$login.f.id
|
|
27
|
-
}, {
|
|
42
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
43
|
+
console.log('有权限功能返回数据', JSON.stringify(hasRight.data))
|
|
28
44
|
//准备替换功能树
|
|
29
45
|
var fun = []
|
|
30
46
|
hasRight.data[0].children[0].children.forEach((item) => {
|
|
@@ -34,6 +50,8 @@ let loginGen = async function (username, password, cue) {
|
|
|
34
50
|
})
|
|
35
51
|
}
|
|
36
52
|
})
|
|
53
|
+
// console.log('替换前', JSON.stringify(Vue.$login.f.functions))
|
|
54
|
+
// console.log('替换后', JSON.stringify(fun))
|
|
37
55
|
Vue.$login.f.functions = fun
|
|
38
56
|
} catch (error) {
|
|
39
57
|
}
|
|
@@ -84,6 +102,21 @@ let loginGen = async function (username, password, cue) {
|
|
|
84
102
|
Vue.$login.f.f_installman = []
|
|
85
103
|
console.log('安装人模块', error)
|
|
86
104
|
}
|
|
105
|
+
// 获取换表员
|
|
106
|
+
// try {
|
|
107
|
+
// let getChangeMeterman = await Vue.resetpost('/rs/search', {
|
|
108
|
+
// source: 'this.getParentByType($organization$).getChildByName($换表员$).getUsers()',
|
|
109
|
+
// userid: Vue.$login.f.id
|
|
110
|
+
// }, {resolveMsg: null, rejectMsg: null})
|
|
111
|
+
// let changemeterman = []
|
|
112
|
+
// for (let i = 0; i < getChangeMeterman.data.length; i++) {
|
|
113
|
+
// changemeterman.push(getChangeMeterman.data[i])
|
|
114
|
+
// }
|
|
115
|
+
// Vue.$login.f.f_changemeterman = changemeterman
|
|
116
|
+
// }catch (error) {
|
|
117
|
+
// Vue.$login.f.f_changemeterman = []
|
|
118
|
+
// console.log('换表员模块',error)
|
|
119
|
+
// }
|
|
87
120
|
// 获取资源服务权限
|
|
88
121
|
try {
|
|
89
122
|
let getLic = await Vue.resetpost('/rs/search', {
|
|
@@ -101,6 +134,37 @@ let loginGen = async function (username, password, cue) {
|
|
|
101
134
|
Vue.$login.f.f_gasman = []
|
|
102
135
|
console.log('资源服务权限', error)
|
|
103
136
|
}
|
|
137
|
+
// // 票据使用人
|
|
138
|
+
// try {
|
|
139
|
+
// let getPaperUseman = await Vue.resetpost('/rs/search', {
|
|
140
|
+
// source: 'this.getParentByType($organization$).getChildByName($票据使用人$).getUsers()',
|
|
141
|
+
// userid: Vue.$login.f.id
|
|
142
|
+
// }, {resolveMsg: null, rejectMsg: null})
|
|
143
|
+
// let perperuseman = []
|
|
144
|
+
// for (let i = 0; i < getPaperUseman.data.length; i++) {
|
|
145
|
+
// perperuseman.push(getPaperUseman.data[i])
|
|
146
|
+
// }
|
|
147
|
+
// Vue.$login.f.f_paperUseman = perperuseman
|
|
148
|
+
// }catch (error) {
|
|
149
|
+
// Vue.$login.f.f_paperUseman = []
|
|
150
|
+
// console.log('票据使用人模块',error)
|
|
151
|
+
//
|
|
152
|
+
// }
|
|
153
|
+
// // 票据分配人
|
|
154
|
+
// try {
|
|
155
|
+
// let getPaperAllotman = await Vue.resetpost('/rs/search', {
|
|
156
|
+
// source: 'this.getParentByType($organization$).getChildByName($票据分配人$).getUsers()',
|
|
157
|
+
// userid: Vue.$login.f.id
|
|
158
|
+
// }, {resolveMsg: null, rejectMsg: null})
|
|
159
|
+
// let paperallotman = []
|
|
160
|
+
// for (let i = 0; i < getPaperAllotman.data.length; i++) {
|
|
161
|
+
// paperallotman.push(getPaperAllotman.data[i])
|
|
162
|
+
// }
|
|
163
|
+
// Vue.$login.f.f_paperAllotman = paperallotman
|
|
164
|
+
// }catch (error) {
|
|
165
|
+
// Vue.$login.f.f_paperAllotman = []
|
|
166
|
+
// console.log('票据分配人模块',error)
|
|
167
|
+
// }
|
|
104
168
|
// TODO 处理界面细节
|
|
105
169
|
try {
|
|
106
170
|
let viewDetails = await Vue.resetpost('rs/search', {
|
|
@@ -144,10 +208,7 @@ let loginGen = async function (username, password, cue) {
|
|
|
144
208
|
}
|
|
145
209
|
|
|
146
210
|
} else {
|
|
147
|
-
let error = {status: 401, data:
|
|
148
|
-
if (getLogin.data.code !== 500) {
|
|
149
|
-
error = {status: getLogin.data.code, data: getLogin.data.msg}
|
|
150
|
-
}
|
|
211
|
+
let error = {status: 401, data: getLogin.data.states}
|
|
151
212
|
// 抛出错误
|
|
152
213
|
throw error
|
|
153
214
|
}
|
|
@@ -161,7 +222,7 @@ let GetLoginInfoService = {
|
|
|
161
222
|
//构建时间开关
|
|
162
223
|
versionTime: true,
|
|
163
224
|
//
|
|
164
|
-
SinglePageToken
|
|
225
|
+
SinglePageToken: {},
|
|
165
226
|
//登录信息展示开关
|
|
166
227
|
depPrompt: true,
|
|
167
228
|
install(Vue, options) {
|
|
@@ -181,7 +242,11 @@ let GetLoginInfoService = {
|
|
|
181
242
|
if (cue === undefined || cue === null || cue === '') {
|
|
182
243
|
cue = true
|
|
183
244
|
}
|
|
184
|
-
Vue.$login.SinglePageToken = cryptJS.AESEncrypt(JSON.stringify({
|
|
245
|
+
Vue.$login.SinglePageToken = cryptJS.AESEncrypt(JSON.stringify({
|
|
246
|
+
name,
|
|
247
|
+
password,
|
|
248
|
+
now: Date.now()
|
|
249
|
+
}), "3KMKqvgwR8ULbR8Z")
|
|
185
250
|
return loginGen(name, password, cue)
|
|
186
251
|
},
|
|
187
252
|
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
2
|
import Validator from 'vue-validator'
|
|
3
|
+
import { isStrongPassword } from '../util/password-validation'
|
|
4
|
+
|
|
3
5
|
Vue.use(Validator)
|
|
4
|
-
|
|
6
|
+
|
|
7
|
+
// 密码强度验证器(必须为大小写字母、阿拉伯数字、特殊字符)
|
|
5
8
|
Vue.validator('strongpassword', function (val) {
|
|
6
|
-
return
|
|
7
|
-
})
|
|
9
|
+
return isStrongPassword(val)
|
|
10
|
+
})
|
|
11
|
+
|
|
8
12
|
Vue.validator('chinesePassword', function (val) {
|
|
9
|
-
var testBealoon=/.*?[\u4E00-\u9FFF]+.*$/.test(val)
|
|
10
13
|
return !(/.*?[\u4E00-\u9FFF]+.*$/.test(val))
|
|
11
|
-
})
|
|
12
|
-
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
// 强密码校验:12-16位,含大小写、数字、特殊字符,并排除常见弱口令与连续模式
|
|
13
17
|
Vue.validator('numbersAndLetter8to16', function (val) {
|
|
14
|
-
return
|
|
15
|
-
})
|
|
18
|
+
return isStrongPassword(val)
|
|
19
|
+
})
|
package/src/stores/AppData.js
CHANGED
|
@@ -9,7 +9,8 @@ let GetAppDataService = {
|
|
|
9
9
|
|
|
10
10
|
// 开启卡监听
|
|
11
11
|
load () {
|
|
12
|
-
return Vue.resetpost('
|
|
12
|
+
return Vue.resetpost('rs/logic/getInitData', {data: {f_filialeids: Vue.$login.f.orgid}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
13
|
+
console.warn("getInitData",JSON.stringify(res),res.data)
|
|
13
14
|
res.data.singleValues.forEach((item) => {
|
|
14
15
|
this.singleValues[item.name] = item.value
|
|
15
16
|
})
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
const REG_STRONG_PWD =
|
|
2
|
+
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*(),.?":{}|<>~`+=_\\-])[A-Za-z\d!@#$%^&*(),.?":{}|<>~`+=_\\-]{12,16}$/
|
|
3
|
+
|
|
4
|
+
const COMMON_PASSWORDS = [
|
|
5
|
+
'password',
|
|
6
|
+
'password123',
|
|
7
|
+
'123456',
|
|
8
|
+
'12345678',
|
|
9
|
+
'qwerty',
|
|
10
|
+
'abc123',
|
|
11
|
+
'Password1',
|
|
12
|
+
'password1',
|
|
13
|
+
'123456789',
|
|
14
|
+
'welcome',
|
|
15
|
+
'admin',
|
|
16
|
+
'letmein',
|
|
17
|
+
'monkey',
|
|
18
|
+
'dragon',
|
|
19
|
+
'master',
|
|
20
|
+
'superman',
|
|
21
|
+
'qwerty123',
|
|
22
|
+
'admin123',
|
|
23
|
+
'root',
|
|
24
|
+
'pass',
|
|
25
|
+
'test',
|
|
26
|
+
'guest',
|
|
27
|
+
'user',
|
|
28
|
+
'000000',
|
|
29
|
+
'111111',
|
|
30
|
+
'666666',
|
|
31
|
+
'888888',
|
|
32
|
+
'999999',
|
|
33
|
+
'iloveyou',
|
|
34
|
+
'welcome123',
|
|
35
|
+
'password!',
|
|
36
|
+
'Passw0rd!',
|
|
37
|
+
'Passw0rd',
|
|
38
|
+
'Password!',
|
|
39
|
+
'passw0rd',
|
|
40
|
+
'P@ssw0rd',
|
|
41
|
+
'P@ssword',
|
|
42
|
+
'Password@123'
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
export const PASSWORD_RULE_HINT = '密码长度须为 12-16 位,包含大小写字母、数字与特殊符号。'
|
|
46
|
+
|
|
47
|
+
export const PASSWORD_DEFAULT_ERROR = '新密码必须包含大小写字母、数字和特殊字符,且长度为12-16位'
|
|
48
|
+
|
|
49
|
+
function hasConsecutiveNumbers (password) {
|
|
50
|
+
for (let i = 0; i <= password.length - 3; i++) {
|
|
51
|
+
const substr = password.substring(i, i + 3)
|
|
52
|
+
if (/^\d{3,}$/.test(substr)) {
|
|
53
|
+
const digits = substr.split('').map(Number)
|
|
54
|
+
let isConsecutive = true
|
|
55
|
+
for (let j = 1; j < digits.length; j++) {
|
|
56
|
+
if (digits[j] !== digits[j - 1] + 1) {
|
|
57
|
+
isConsecutive = false
|
|
58
|
+
break
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (isConsecutive) return true
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return false
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function hasConsecutiveLetters (password) {
|
|
68
|
+
const lowerPassword = password.toLowerCase()
|
|
69
|
+
for (let i = 0; i <= lowerPassword.length - 3; i++) {
|
|
70
|
+
const substr = lowerPassword.substring(i, i + 3)
|
|
71
|
+
if (/^[a-z]{3,}$/.test(substr)) {
|
|
72
|
+
let isConsecutive = true
|
|
73
|
+
for (let j = 1; j < substr.length; j++) {
|
|
74
|
+
if (substr.charCodeAt(j) !== substr.charCodeAt(j - 1) + 1) {
|
|
75
|
+
isConsecutive = false
|
|
76
|
+
break
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (isConsecutive) return true
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return false
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function hasRepeatedChars (password) {
|
|
86
|
+
return /(.)\1{2,}/.test(password)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function hasKeyboardPattern (password) {
|
|
90
|
+
const keyboardRows = ['qwertyuiop', 'asdfghjkl', 'zxcvbnm', '1234567890']
|
|
91
|
+
const lowerPassword = password.toLowerCase()
|
|
92
|
+
|
|
93
|
+
for (const row of keyboardRows) {
|
|
94
|
+
for (let i = 0; i <= row.length - 3; i++) {
|
|
95
|
+
const pattern = row.substring(i, i + 3)
|
|
96
|
+
if (lowerPassword.includes(pattern)) {
|
|
97
|
+
return true
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return false
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function validateStrongPassword (password) {
|
|
105
|
+
const result = {
|
|
106
|
+
isValid: true,
|
|
107
|
+
errors: []
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (!password) {
|
|
111
|
+
result.isValid = false
|
|
112
|
+
result.errors.push('不能为空')
|
|
113
|
+
return result
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (!REG_STRONG_PWD.test(password)) {
|
|
117
|
+
result.isValid = false
|
|
118
|
+
result.errors.push('密码长度须为12-16位,且包含大写字母、小写字母、数字和特殊字符')
|
|
119
|
+
return result
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (COMMON_PASSWORDS.includes(password) || COMMON_PASSWORDS.includes(password.toLowerCase())) {
|
|
123
|
+
result.isValid = false
|
|
124
|
+
result.errors.push('不能使用常见密码')
|
|
125
|
+
return result
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (hasConsecutiveNumbers(password)) {
|
|
129
|
+
result.isValid = false
|
|
130
|
+
result.errors.push('不能包含连续数字')
|
|
131
|
+
return result
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (hasConsecutiveLetters(password)) {
|
|
135
|
+
result.isValid = false
|
|
136
|
+
result.errors.push('不能包含连续字母')
|
|
137
|
+
return result
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (hasRepeatedChars(password)) {
|
|
141
|
+
result.isValid = false
|
|
142
|
+
result.errors.push('不能包含3个或以上相同字符')
|
|
143
|
+
return result
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (hasKeyboardPattern(password)) {
|
|
147
|
+
result.isValid = false
|
|
148
|
+
result.errors.push('不能包含键盘连续按键模式')
|
|
149
|
+
return result
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return result
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function isStrongPassword (password) {
|
|
156
|
+
return validateStrongPassword(password).isValid
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function getPasswordStrength (password) {
|
|
160
|
+
if (!password) {
|
|
161
|
+
return {
|
|
162
|
+
label: '未输入',
|
|
163
|
+
type: 'default',
|
|
164
|
+
desc: '请输入密码以查看强度',
|
|
165
|
+
visible: false
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const { isValid, errors } = validateStrongPassword(password)
|
|
170
|
+
if (isValid) {
|
|
171
|
+
return {
|
|
172
|
+
label: '强',
|
|
173
|
+
type: 'success',
|
|
174
|
+
desc: '密码满足复杂度要求',
|
|
175
|
+
visible: true
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return {
|
|
180
|
+
label: '弱',
|
|
181
|
+
type: 'error',
|
|
182
|
+
desc: errors[0] || '密码不满足安全要求',
|
|
183
|
+
visible: true
|
|
184
|
+
}
|
|
185
|
+
}
|