system-clients 3.3.1 → 3.3.2-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 +104 -104
- package/src/LodopFuncs.js +71 -103
- package/src/components/Main.vue +14 -22
- 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 +44 -35
- package/src/components/server/ModifyPw.vue +0 -1
- 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 +22 -21
- package/src/filiale/chengtou/Login.vue +22 -21
- package/src/filiale/dongguan/Login.vue +22 -21
- package/src/filiale/dongguan/Main.vue +3 -5
- package/src/filiale/furuike/Login.vue +23 -24
- package/src/filiale/furuike/Main.vue +26 -39
- package/src/filiale/gehua/Main.vue +3 -5
- package/src/filiale/konggang/Login.vue +22 -21
- package/src/filiale/qianneng/Login.vue +22 -21
- package/src/filiale/qianneng/Main.vue +3 -5
- package/src/filiale/qianneng/ModifyPw.vue +0 -1
- package/src/filiale/rizhao/Login.vue +21 -20
- package/src/filiale/rizhao/Main.vue +3 -3
- package/src/filiale/shiquan/Login.vue +22 -21
- package/src/filiale/tianyi/Login.vue +22 -21
- package/src/filiale/tongchuan/Login.vue +22 -21
- package/src/filiale/tongchuan/Main.vue +6 -8
- package/src/filiale/weinan/Main.vue +6 -7
- package/src/filiale/wenxi/Login.vue +22 -21
- package/src/filiale/wenxi/Main.vue +3 -5
- package/src/filiale/wuhai/Main.vue +3 -6
- package/src/filiale/yuchuan/Login.vue +23 -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/stores/AppData.js +1 -1
- package/build.gradle +0 -6
- package/src/filiale/ruihua/Login.vue +0 -549
- package/src/filiale/ruihua/system.js +0 -5
|
@@ -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
|
|
package/src/stores/AppData.js
CHANGED
|
@@ -9,7 +9,7 @@ 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
13
|
res.data.singleValues.forEach((item) => {
|
|
14
14
|
this.singleValues[item.name] = item.value
|
|
15
15
|
})
|