eoss-ui 0.6.66 → 0.6.68
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/lib/button-group.js +108 -106
- package/lib/button.js +108 -106
- package/lib/calogin.js +567 -156
- package/lib/checkbox-group.js +110 -108
- package/lib/config/api.js +1 -0
- package/lib/data-table-form.js +110 -108
- package/lib/data-table.js +113 -111
- package/lib/date-picker.js +108 -106
- package/lib/dialog.js +108 -106
- package/lib/eoss-ui.common.js +956 -516
- package/lib/flow-group.js +108 -106
- package/lib/flow-list.js +199 -207
- package/lib/flow.js +230 -212
- package/lib/form.js +110 -108
- package/lib/handle-user.js +109 -107
- package/lib/handler.js +109 -107
- package/lib/icon.js +109 -107
- package/lib/index.js +1 -1
- package/lib/input-number.js +108 -106
- package/lib/input.js +108 -106
- package/lib/login.js +172 -147
- package/lib/main.js +141 -139
- package/lib/nav.js +108 -106
- package/lib/notify.js +111 -109
- package/lib/page.js +108 -106
- package/lib/pagination.js +108 -106
- package/lib/player.js +108 -106
- package/lib/qr-code.js +108 -106
- package/lib/radio-group.js +110 -108
- package/lib/retrial-auth.js +111 -109
- package/lib/select-ganged.js +110 -108
- package/lib/select.js +110 -108
- package/lib/selector-panel.js +126 -124
- package/lib/selector.js +109 -107
- package/lib/sizer.js +110 -108
- package/lib/steps.js +108 -106
- package/lib/switch.js +108 -106
- package/lib/table-form.js +108 -106
- package/lib/tabs.js +108 -106
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/lib/tips.js +109 -107
- package/lib/tree-group.js +108 -106
- package/lib/tree.js +109 -107
- package/lib/upload.js +118 -116
- package/lib/wujie.js +108 -106
- package/lib/wxlogin.js +108 -106
- package/package.json +2 -2
- package/packages/.DS_Store +0 -0
- package/packages/autocomplete/.DS_Store +0 -0
- package/packages/calogin/.DS_Store +0 -0
- package/packages/calogin/src/main.vue +285 -48
- package/packages/calogin/src/plugin.js +167 -0
- package/packages/date-picker/.DS_Store +0 -0
- package/packages/date-picker/src/.DS_Store +0 -0
- package/packages/flow/.DS_Store +0 -0
- package/packages/flow/src/component/Circulate.vue +6 -1
- package/packages/flow/src/main.vue +6 -0
- package/packages/flow/src/reset.vue +6 -1
- package/packages/flow/src/selectUser.vue +1 -1
- package/packages/flow-list/.DS_Store +0 -0
- package/packages/flow-list/src/main.vue +12 -24
- package/packages/login/.DS_Store +0 -0
- package/packages/login/src/main.vue +28 -7
- package/packages/main/.DS_Store +0 -0
- package/packages/main/src/.DS_Store +0 -0
- package/packages/menu/.DS_Store +0 -0
- package/packages/scrollbar/.DS_Store +0 -0
- package/packages/select/.DS_Store +0 -0
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/login.css +1 -1
- package/packages/theme-chalk/src/.DS_Store +0 -0
- package/packages/theme-chalk/src/login.scss +5 -5
- package/packages/upload/.DS_Store +0 -0
- package/src/.DS_Store +0 -0
- package/src/config/api.js +1 -0
- package/src/index.js +163 -163
- package/src/utils/.DS_Store +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span
|
|
3
|
-
<
|
|
2
|
+
<span>
|
|
3
|
+
<span @click="getCertificate">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</span>
|
|
4
6
|
</span>
|
|
5
7
|
</template>
|
|
6
8
|
|
|
@@ -11,6 +13,10 @@ import caPlugin from './plugin.js';
|
|
|
11
13
|
export default {
|
|
12
14
|
name: 'EsCaLogin',
|
|
13
15
|
props: {
|
|
16
|
+
caModel: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true
|
|
19
|
+
}, // CA登录方式,JIDA-吉大正元,SHU_GUANG-曙光,SICHUAN-四川
|
|
14
20
|
identifyingId: {
|
|
15
21
|
type: String,
|
|
16
22
|
default() {
|
|
@@ -38,7 +44,12 @@ export default {
|
|
|
38
44
|
},
|
|
39
45
|
data() {
|
|
40
46
|
return {
|
|
41
|
-
|
|
47
|
+
userList: [],
|
|
48
|
+
signedData: '', //证书原文
|
|
49
|
+
b64originData: '', //签名原文
|
|
50
|
+
b64SignData: '', //签名结果
|
|
51
|
+
idCard: '',
|
|
52
|
+
certId: ''
|
|
42
53
|
};
|
|
43
54
|
},
|
|
44
55
|
computed: {
|
|
@@ -66,63 +77,289 @@ export default {
|
|
|
66
77
|
methods: {
|
|
67
78
|
init() {
|
|
68
79
|
if (!window.PNXClient) {
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
80
|
+
// 创建 object 元素
|
|
81
|
+
const pnxClientElement = document.createElement('object');
|
|
82
|
+
pnxClientElement.classid = 'clsid:9DD991F7-6FB0-4004-95A4-0A55006A8C42';
|
|
83
|
+
pnxClientElement.width = '0';
|
|
84
|
+
pnxClientElement.height = '0';
|
|
85
|
+
pnxClientElement.id = 'PNXClient';
|
|
86
|
+
pnxClientElement.style.position = 'absolute';
|
|
87
|
+
document.body.appendChild(pnxClientElement);
|
|
78
88
|
}
|
|
79
89
|
},
|
|
80
90
|
getCertificate() {
|
|
91
|
+
this.$emit('click');
|
|
81
92
|
// 检查 PNXClient 是否存在
|
|
82
93
|
if (!window.PNXClient) {
|
|
83
94
|
this.$message.error('控件加载失败,请刷新页面重试!');
|
|
95
|
+
this.$emit('error');
|
|
84
96
|
return;
|
|
85
97
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
caPlugin.clearFilter();
|
|
95
|
-
// 初始化vctk控件
|
|
96
|
-
caPlugin.initialize('', this.param);
|
|
97
|
-
// 控制证书为一个时,不弹出证书选择框
|
|
98
|
-
caPlugin.setChooseSingleCert(1);
|
|
99
|
-
|
|
100
|
-
// 生成签名信息
|
|
101
|
-
this.signedData = caPlugin.p7SignString(this.identifyingId, true, true);
|
|
102
|
-
|
|
103
|
-
//获取错误码
|
|
104
|
-
const errorCode = Number(caPlugin.getLastError());
|
|
105
|
-
if (errorCode !== 0) {
|
|
106
|
-
if (errorCode === 3758096386 || errorCode === 2148532334) {
|
|
107
|
-
this.$message.error('用户取消操作!');
|
|
98
|
+
switch (this.caModel) {
|
|
99
|
+
//吉大正元:
|
|
100
|
+
case 'JIDA':
|
|
101
|
+
try {
|
|
102
|
+
caPlugin.getVersion();
|
|
103
|
+
} catch (e) {
|
|
104
|
+
this.$message.error('未安装控件,请进行安装控件!');
|
|
105
|
+
this.$emit('error');
|
|
108
106
|
return;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
// 清除之前的过滤器
|
|
110
|
+
caPlugin.clearFilter();
|
|
111
|
+
// 初始化vctk控件
|
|
112
|
+
caPlugin.initialize('', this.param);
|
|
113
|
+
// 控制证书为一个时,不弹出证书选择框
|
|
114
|
+
caPlugin.setChooseSingleCert(1);
|
|
115
|
+
|
|
116
|
+
// 生成签名信息
|
|
117
|
+
this.signedData = caPlugin.p7SignString(
|
|
118
|
+
this.identifyingId,
|
|
119
|
+
true,
|
|
120
|
+
true
|
|
112
121
|
);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
122
|
+
|
|
123
|
+
//获取错误码
|
|
124
|
+
const errorCode = Number(caPlugin.getLastError());
|
|
125
|
+
if (errorCode !== 0) {
|
|
126
|
+
if (errorCode === 3758096386 || errorCode === 2148532334) {
|
|
127
|
+
this.$message.error('用户取消操作!');
|
|
128
|
+
this.$emit('error');
|
|
129
|
+
return;
|
|
130
|
+
} else if (errorCode === -536870815 || errorCode === 3758096481) {
|
|
131
|
+
this.$message.error(
|
|
132
|
+
'没有找到有效的证书,如果使用的是KEY,请确认已经插入key!'
|
|
133
|
+
);
|
|
134
|
+
this.$emit('error');
|
|
135
|
+
return;
|
|
136
|
+
} else {
|
|
137
|
+
this.$message.error(caPlugin.getLastErrorMessage());
|
|
138
|
+
this.$emit('error');
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
this.success && this.success(this.signedData);
|
|
143
|
+
return this.signedData;
|
|
144
|
+
} catch (error) {
|
|
145
|
+
// 捕获其他可能的异常
|
|
146
|
+
this.$message.error(`操作失败: ${error.message}`);
|
|
147
|
+
this.$emit('error');
|
|
117
148
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
149
|
+
break;
|
|
150
|
+
//曙光:
|
|
151
|
+
case 'SHU_GUANG':
|
|
152
|
+
caPlugin
|
|
153
|
+
.getMessage({ action: 'SOF_GetUserList' })
|
|
154
|
+
.then((res) => {
|
|
155
|
+
const { retCode, retMsg, retValue } = res;
|
|
156
|
+
if (!retValue || retCode !== 0) {
|
|
157
|
+
this.$message.error(
|
|
158
|
+
retCode !== 0 ? retMsg : '未找到证书,请插入证书UKEY!'
|
|
159
|
+
);
|
|
160
|
+
this.$emit('error');
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const userList = retValue.split('&&&');
|
|
164
|
+
if (userList.length === 1) {
|
|
165
|
+
//如果只有一个证书,直接获取证书信息
|
|
166
|
+
this.certId = userList[0].split('||')[1];
|
|
167
|
+
this.getCertInfo(this.certId);
|
|
168
|
+
} else {
|
|
169
|
+
// 如果有多个证书,弹出选择框
|
|
170
|
+
this.userList = userList.map((item) => {
|
|
171
|
+
const [name, certId] = item.split('||');
|
|
172
|
+
return { label: name, value: certId };
|
|
173
|
+
});
|
|
174
|
+
this.$prompt('', '证书选择', {
|
|
175
|
+
confirmButtonText: '确定',
|
|
176
|
+
cancelButtonText: '取消',
|
|
177
|
+
inputPattern: /^.+$/,
|
|
178
|
+
inputErrorMessage: '请选择证书!',
|
|
179
|
+
selectData: this.userList
|
|
180
|
+
})
|
|
181
|
+
.then((res) => {
|
|
182
|
+
this.certId = res.value;
|
|
183
|
+
this.getCertInfo(this.certId);
|
|
184
|
+
})
|
|
185
|
+
.catch(() => {
|
|
186
|
+
this.$emit('error');
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
})
|
|
190
|
+
.catch((err) => {
|
|
191
|
+
this.$message.error('请检查是否安装并启用证书助手控件!');
|
|
192
|
+
this.$emit('error');
|
|
193
|
+
});
|
|
194
|
+
break;
|
|
195
|
+
//四川:
|
|
196
|
+
case 'SICHUAN':
|
|
197
|
+
this.$message.warning('四川CA登录方式对接中!');
|
|
198
|
+
this.$emit('error');
|
|
199
|
+
break;
|
|
125
200
|
}
|
|
201
|
+
},
|
|
202
|
+
getCertInfo(name) {
|
|
203
|
+
caPlugin
|
|
204
|
+
.getMessage({ action: 'SOF_ExportUserCert', params: [name] })
|
|
205
|
+
.then((res) => {
|
|
206
|
+
const { retCode, retMsg, retValue } = res;
|
|
207
|
+
if (retCode !== 0) {
|
|
208
|
+
this.$message.error(retMsg);
|
|
209
|
+
this.$emit('error');
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
//设置证书原文
|
|
213
|
+
this.signedData = retValue
|
|
214
|
+
.replace('-----BEGIN CERTIFICATE-----', '')
|
|
215
|
+
.replace('-----END CERTIFICATE-----', '');
|
|
216
|
+
caPlugin
|
|
217
|
+
.getMessage({
|
|
218
|
+
action: 'SOF_GetCertInfo',
|
|
219
|
+
params: [retValue, 'SGD_CERT_SUBJECT_SN']
|
|
220
|
+
})
|
|
221
|
+
.then((res) => {
|
|
222
|
+
const { retCode, retMsg, retValue } = res;
|
|
223
|
+
if (retCode !== 0) {
|
|
224
|
+
this.$message.error(retMsg);
|
|
225
|
+
this.$emit('error');
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
this.idCard = caPlugin.base64Decode(retValue);
|
|
229
|
+
caPlugin
|
|
230
|
+
.getMessage({
|
|
231
|
+
action: 'SOF_GenRandom',
|
|
232
|
+
params: [16]
|
|
233
|
+
})
|
|
234
|
+
.then((res) => {
|
|
235
|
+
const { retCode, retMsg, retValue } = res;
|
|
236
|
+
if (retCode !== 0) {
|
|
237
|
+
this.$message.error(retMsg);
|
|
238
|
+
this.$emit('error');
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
this.b64originData = retValue + this.identifyingId;
|
|
242
|
+
caPlugin
|
|
243
|
+
.getMessage({
|
|
244
|
+
action: 'SOF_SignData',
|
|
245
|
+
params: [
|
|
246
|
+
this.certId,
|
|
247
|
+
caPlugin.base64Encode(this.b64originData)
|
|
248
|
+
]
|
|
249
|
+
})
|
|
250
|
+
.then((res) => {
|
|
251
|
+
const { retCode, retMsg, retValue } = res;
|
|
252
|
+
if (retCode !== 0) {
|
|
253
|
+
if (retCode === 184550659) {
|
|
254
|
+
this.cerLogin();
|
|
255
|
+
} else {
|
|
256
|
+
this.$message.error(retMsg);
|
|
257
|
+
this.$emit('error');
|
|
258
|
+
}
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
this.b64SignData = retValue;
|
|
262
|
+
this.success &&
|
|
263
|
+
this.success({
|
|
264
|
+
identifyingId: this.identifyingId,
|
|
265
|
+
signedData: this.signedData, //证书原文
|
|
266
|
+
b64originData: this.b64originData, //签名原文
|
|
267
|
+
b64SignData: this.b64SignData, //签名结果
|
|
268
|
+
idCard: this.idCard,
|
|
269
|
+
certId: this.certId
|
|
270
|
+
});
|
|
271
|
+
})
|
|
272
|
+
.catch((err) => {
|
|
273
|
+
this.$emit('error');
|
|
274
|
+
});
|
|
275
|
+
})
|
|
276
|
+
.catch((err) => {
|
|
277
|
+
this.$emit('error');
|
|
278
|
+
});
|
|
279
|
+
})
|
|
280
|
+
.catch((err) => {
|
|
281
|
+
this.$emit('error');
|
|
282
|
+
});
|
|
283
|
+
})
|
|
284
|
+
.catch((err) => {
|
|
285
|
+
this.$emit('error');
|
|
286
|
+
});
|
|
287
|
+
},
|
|
288
|
+
cerLogin(title = '提示') {
|
|
289
|
+
this.$prompt('输入密码', title, {
|
|
290
|
+
confirmButtonText: '确定',
|
|
291
|
+
cancelButtonText: '取消',
|
|
292
|
+
inputPattern: /^[[\x21-\x7E]{6,16}$/,
|
|
293
|
+
inputErrorMessage: '请输入密码'
|
|
294
|
+
})
|
|
295
|
+
.then(({ value }) => {
|
|
296
|
+
caPlugin
|
|
297
|
+
.getMessage({
|
|
298
|
+
action: 'SOF_Login',
|
|
299
|
+
params: [this.certId, value]
|
|
300
|
+
})
|
|
301
|
+
.then((res) => {
|
|
302
|
+
const { retCode, retMsg, retValue } = res;
|
|
303
|
+
if (retCode !== 0 || retValue === false) {
|
|
304
|
+
if (retValue === false) {
|
|
305
|
+
caPlugin
|
|
306
|
+
.getMessage({
|
|
307
|
+
action: 'SOF_GetPinRetryCount',
|
|
308
|
+
params: [this.certId]
|
|
309
|
+
})
|
|
310
|
+
.then((res) => {
|
|
311
|
+
const { retValue } = res;
|
|
312
|
+
this.cerLogin(
|
|
313
|
+
`登录失败!剩余口令重试次数:${retValue}次`
|
|
314
|
+
);
|
|
315
|
+
});
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
this.$message.error(retMsg);
|
|
319
|
+
this.$emit('error');
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
caPlugin
|
|
323
|
+
.getMessage({
|
|
324
|
+
action: 'SOF_SignData',
|
|
325
|
+
params: [
|
|
326
|
+
this.certId,
|
|
327
|
+
caPlugin.base64Encode(this.b64originData)
|
|
328
|
+
]
|
|
329
|
+
})
|
|
330
|
+
.then((res) => {
|
|
331
|
+
const { retCode, retMsg, retValue } = res;
|
|
332
|
+
if (retCode !== 0) {
|
|
333
|
+
if (retCode === 184550659) {
|
|
334
|
+
this.cerLogin();
|
|
335
|
+
} else {
|
|
336
|
+
this.$message.error(retMsg);
|
|
337
|
+
this.$emit('error');
|
|
338
|
+
}
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
this.b64SignData = retValue;
|
|
342
|
+
this.success &&
|
|
343
|
+
this.success({
|
|
344
|
+
identifyingId: this.identifyingId,
|
|
345
|
+
signedData: this.signedData, //证书原文
|
|
346
|
+
b64originData: this.b64originData, //签名原文
|
|
347
|
+
b64SignData: this.b64SignData, //签名结果
|
|
348
|
+
idCard: this.idCard,
|
|
349
|
+
certId: this.certId
|
|
350
|
+
});
|
|
351
|
+
})
|
|
352
|
+
.catch((err) => {
|
|
353
|
+
this.$emit('error');
|
|
354
|
+
});
|
|
355
|
+
})
|
|
356
|
+
.catch(() => {
|
|
357
|
+
this.$emit('error');
|
|
358
|
+
});
|
|
359
|
+
})
|
|
360
|
+
.catch(() => {
|
|
361
|
+
this.$emit('error');
|
|
362
|
+
});
|
|
126
363
|
}
|
|
127
364
|
}
|
|
128
365
|
};
|
|
@@ -6,6 +6,8 @@ class CA_ExtInterface {
|
|
|
6
6
|
this.currentSessionWSURL = '';
|
|
7
7
|
this.useActioveX = false;
|
|
8
8
|
this.options = {};
|
|
9
|
+
this.webSocket = null;
|
|
10
|
+
this.init();
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -742,6 +744,171 @@ class CA_ExtInterface {
|
|
|
742
744
|
return result.value;
|
|
743
745
|
}
|
|
744
746
|
}
|
|
747
|
+
/*
|
|
748
|
+
*曙光四川CA
|
|
749
|
+
*'SOF_GetUserList' 证书列表
|
|
750
|
+
*'SOF_ExportUserCert' 导出证书
|
|
751
|
+
*'SOF_GetCertInfo': 获取证书信息
|
|
752
|
+
*'SOF_GenRandom': 生成随机数
|
|
753
|
+
*'SOF_SignData': 获取证书签名
|
|
754
|
+
*'SOF_Login': 登录证书
|
|
755
|
+
*'SOF_GetPinRetryCount': 剩余次数
|
|
756
|
+
*/
|
|
757
|
+
/**
|
|
758
|
+
*
|
|
759
|
+
* 获取webSocket消息
|
|
760
|
+
* @returns {string}
|
|
761
|
+
*/
|
|
762
|
+
getMessage({ action, params = [] }) {
|
|
763
|
+
return new Promise((resolve, reject) => {
|
|
764
|
+
var obj = JSON.stringify({
|
|
765
|
+
'action': action,
|
|
766
|
+
'params': params
|
|
767
|
+
});
|
|
768
|
+
if (!this.webSocket) {
|
|
769
|
+
this.webSocket = new WebSocket('wss://localhost:36171');
|
|
770
|
+
this.webSocket.onerror = (event) => {
|
|
771
|
+
this.webSocket = null;
|
|
772
|
+
reject(event);
|
|
773
|
+
};
|
|
774
|
+
this.webSocket.onopen = () => {
|
|
775
|
+
this.webSocket.send(obj);
|
|
776
|
+
};
|
|
777
|
+
} else {
|
|
778
|
+
this.webSocket.send(obj);
|
|
779
|
+
}
|
|
780
|
+
this.webSocket.onclose = (event) => {
|
|
781
|
+
this.webSocket = null;
|
|
782
|
+
};
|
|
783
|
+
this.webSocket.onmessage = (event) => {
|
|
784
|
+
resolve(JSON.parse(event.data));
|
|
785
|
+
};
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
*
|
|
790
|
+
* base64解码
|
|
791
|
+
* @returns {string} base64解码后的字符串
|
|
792
|
+
*/
|
|
793
|
+
base64Decode(res) {
|
|
794
|
+
let _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
795
|
+
let val = '';
|
|
796
|
+
let chr1;
|
|
797
|
+
let chr2;
|
|
798
|
+
let chr3;
|
|
799
|
+
let enc1;
|
|
800
|
+
let enc2;
|
|
801
|
+
let enc3;
|
|
802
|
+
let enc4;
|
|
803
|
+
let i = 0;
|
|
804
|
+
res = res.replace(/[^A-Za-z0-9\+\/\=]/g, '');
|
|
805
|
+
while (i < res.length) {
|
|
806
|
+
enc1 = _keyStr.indexOf(res.charAt(i++));
|
|
807
|
+
enc2 = _keyStr.indexOf(res.charAt(i++));
|
|
808
|
+
enc3 = _keyStr.indexOf(res.charAt(i++));
|
|
809
|
+
enc4 = _keyStr.indexOf(res.charAt(i++));
|
|
810
|
+
chr1 = (enc1 << 2) | (enc2 >> 4);
|
|
811
|
+
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
|
812
|
+
chr3 = ((enc3 & 3) << 6) | enc4;
|
|
813
|
+
val = val + String.fromCharCode(chr1);
|
|
814
|
+
if (enc3 !== 64) {
|
|
815
|
+
val = val + String.fromCharCode(chr2);
|
|
816
|
+
}
|
|
817
|
+
if (enc4 !== 64) {
|
|
818
|
+
val = val + String.fromCharCode(chr3);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
val = this.utf8_decode(val);
|
|
822
|
+
return val;
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
*
|
|
826
|
+
* base64编码
|
|
827
|
+
* @returns {string} base64编码后的字符串
|
|
828
|
+
*/
|
|
829
|
+
base64Encode(res) {
|
|
830
|
+
let _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
831
|
+
let val = '';
|
|
832
|
+
let chr1;
|
|
833
|
+
let chr2;
|
|
834
|
+
let chr3;
|
|
835
|
+
let enc1;
|
|
836
|
+
let enc2;
|
|
837
|
+
let enc3;
|
|
838
|
+
let enc4;
|
|
839
|
+
let i = 0;
|
|
840
|
+
res = this.utf8_encode(res);
|
|
841
|
+
while (i < res.length) {
|
|
842
|
+
chr1 = res.charCodeAt(i++);
|
|
843
|
+
chr2 = res.charCodeAt(i++);
|
|
844
|
+
chr3 = res.charCodeAt(i++);
|
|
845
|
+
enc1 = chr1 >> 2;
|
|
846
|
+
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
|
847
|
+
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
|
848
|
+
enc4 = chr3 & 63;
|
|
849
|
+
if (isNaN(chr2)) {
|
|
850
|
+
enc3 = enc4 = 64;
|
|
851
|
+
} else if (isNaN(chr3)) {
|
|
852
|
+
enc4 = 64;
|
|
853
|
+
}
|
|
854
|
+
val = val + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
|
|
855
|
+
}
|
|
856
|
+
return val;
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
*
|
|
860
|
+
* utf8解码
|
|
861
|
+
* @returns {string} utf8解码后的字符串
|
|
862
|
+
*/
|
|
863
|
+
utf8_decode(utftext) {
|
|
864
|
+
let string = '';
|
|
865
|
+
let i = 0;
|
|
866
|
+
let c = 0;
|
|
867
|
+
// let c1 = 0;
|
|
868
|
+
let c2 = 0;
|
|
869
|
+
let c3 = 0;
|
|
870
|
+
while (i < utftext.length) {
|
|
871
|
+
c = utftext.charCodeAt(i);
|
|
872
|
+
if (c < 128) {
|
|
873
|
+
string += String.fromCharCode(c);
|
|
874
|
+
i++;
|
|
875
|
+
} else if ((c > 191) && (c < 224)) {
|
|
876
|
+
c2 = utftext.charCodeAt(i + 1);
|
|
877
|
+
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
|
878
|
+
i += 2;
|
|
879
|
+
} else {
|
|
880
|
+
c2 = utftext.charCodeAt(i + 1);
|
|
881
|
+
c3 = utftext.charCodeAt(i + 2);
|
|
882
|
+
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
|
883
|
+
i += 3;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
return string;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
*
|
|
890
|
+
* utf8编码
|
|
891
|
+
* @returns {string} utf8编码后的字符串
|
|
892
|
+
*/
|
|
893
|
+
utf8_encode(string) {
|
|
894
|
+
string = string.replace(/\r\n/g, '\n');
|
|
895
|
+
var utftext = '';
|
|
896
|
+
for (var n = 0; n < string.length; n++) {
|
|
897
|
+
var c = string.charCodeAt(n);
|
|
898
|
+
if (c < 128) {
|
|
899
|
+
utftext += String.fromCharCode(c);
|
|
900
|
+
} else if ((c > 127) && (c < 2048)) {
|
|
901
|
+
utftext += String.fromCharCode((c >> 6) | 192);
|
|
902
|
+
utftext += String.fromCharCode((c & 63) | 128);
|
|
903
|
+
} else {
|
|
904
|
+
utftext += String.fromCharCode((c >> 12) | 224);
|
|
905
|
+
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
|
906
|
+
utftext += String.fromCharCode((c & 63) | 128);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
}
|
|
910
|
+
return utftext;
|
|
911
|
+
}
|
|
745
912
|
}
|
|
746
913
|
|
|
747
914
|
const caPlugin = new CA_ExtInterface();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -89,6 +89,7 @@ import {
|
|
|
89
89
|
getNotificationMsg,
|
|
90
90
|
findCodeValues,
|
|
91
91
|
directStartTaskCircularRead,
|
|
92
|
+
endFlowAndStartTaskCircularRead,
|
|
92
93
|
} from 'eoss-ui/src/config/api';
|
|
93
94
|
import util from 'eoss-ui/src/utils/util.js';
|
|
94
95
|
export default {
|
|
@@ -202,7 +203,7 @@ export default {
|
|
|
202
203
|
}
|
|
203
204
|
|
|
204
205
|
const param = {
|
|
205
|
-
url: directStartTaskCircularRead,
|
|
206
|
+
url:this.showBtn ? directStartTaskCircularRead : endFlowAndStartTaskCircularRead,
|
|
206
207
|
data: {
|
|
207
208
|
opinion,
|
|
208
209
|
businessId,
|
|
@@ -220,6 +221,10 @@ export default {
|
|
|
220
221
|
headers: { Accept: 'application/json,text/plain' },
|
|
221
222
|
method: 'POST'
|
|
222
223
|
};
|
|
224
|
+
if(!this.showBtn){
|
|
225
|
+
param.data.pendingId = this.pendingId;
|
|
226
|
+
delete param.data.processDefinitionId;
|
|
227
|
+
}
|
|
223
228
|
this.loading = true;
|
|
224
229
|
util
|
|
225
230
|
.ajax(param)
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
:businessId="businessId"
|
|
41
41
|
ref="circulate"
|
|
42
42
|
:selectorParams="params"
|
|
43
|
+
:pending-id="pendingId"
|
|
43
44
|
:showBtn="false"
|
|
44
45
|
:processDefinitionId="nodeInfo.nextNode"
|
|
45
46
|
:simpleTips="simpleTips"
|
|
@@ -81,6 +82,7 @@
|
|
|
81
82
|
:appId="resetAppId"
|
|
82
83
|
@cancel="closeProcess($event)"
|
|
83
84
|
:flowParams="param"
|
|
85
|
+
:subParams="subParams"
|
|
84
86
|
v-else-if="newTypeCode == 'reset' || newTypeCode == 'continuation'"
|
|
85
87
|
/>
|
|
86
88
|
<div class="es-flow-content" v-else>
|
|
@@ -1032,6 +1034,10 @@ export default {
|
|
|
1032
1034
|
type: Object,
|
|
1033
1035
|
default: () => {}
|
|
1034
1036
|
},
|
|
1037
|
+
subParams: {
|
|
1038
|
+
type: Object,
|
|
1039
|
+
default: () => {}
|
|
1040
|
+
},
|
|
1035
1041
|
width: {
|
|
1036
1042
|
type: String
|
|
1037
1043
|
},
|
|
@@ -237,6 +237,10 @@ export default {
|
|
|
237
237
|
flowParams: {
|
|
238
238
|
type: Object,
|
|
239
239
|
default: () => {}
|
|
240
|
+
},
|
|
241
|
+
subParams: {
|
|
242
|
+
type: Object,
|
|
243
|
+
default: () => {}
|
|
240
244
|
},
|
|
241
245
|
appId: {
|
|
242
246
|
type: String,
|
|
@@ -572,7 +576,8 @@ export default {
|
|
|
572
576
|
this.mixPresetList && this.mixPresetList.length > 0
|
|
573
577
|
? this.mixPresetList.join('|')
|
|
574
578
|
: presetReadUserId.join(','),
|
|
575
|
-
opinion: this.newOpinion || newOpinion
|
|
579
|
+
opinion: this.newOpinion || newOpinion,
|
|
580
|
+
...this.subParams
|
|
576
581
|
};
|
|
577
582
|
if (this.activeNames != '1') delete params.customPresetUserJson;
|
|
578
583
|
util
|
|
Binary file
|