aldehyde 0.2.194 → 0.2.195
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/controls/file-view/newin-file-view.d.ts.map +1 -1
- package/lib/controls/file-view/newin-file-view.js +0 -1
- package/lib/controls/file-view/newin-file-view.js.map +1 -1
- package/lib/layout/menu/reset-password.js +1 -1
- package/lib/layout/menu/reset-password.js.map +1 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +8 -2
- package/lib/login/login.js.map +1 -1
- package/lib/login2/LoginPage.d.ts.map +1 -1
- package/lib/login2/LoginPage.js +6 -1
- package/lib/login2/LoginPage.js.map +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +13 -1
- package/lib/table/act-table.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +4 -1
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +12 -5
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.d.ts.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.js +0 -1
- package/lib/tmpl/tmpl-config-analysis.js.map +1 -1
- package/package.json +2 -2
- package/src/aldehyde/controls/file-view/newin-file-view.tsx +0 -1
- package/src/aldehyde/layout/menu/reset-password.tsx +3 -3
- package/src/aldehyde/login/login.tsx +237 -229
- package/src/aldehyde/login2/LoginPage.tsx +5 -0
- package/src/aldehyde/table/act-table.tsx +20 -9
- package/src/aldehyde/tmpl/hcservice-v3.tsx +10 -5
- package/src/aldehyde/tmpl/tmpl-config-analysis.tsx +0 -1
|
@@ -1,248 +1,256 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {CSSProperties} from "react";
|
|
2
2
|
import "./index.css";
|
|
3
|
-
import {
|
|
3
|
+
import {Button, Col, Form, Input, Row, FormInstance} from "antd";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
LockOutlined,
|
|
6
|
+
SafetyCertificateOutlined,
|
|
7
|
+
UserOutlined,
|
|
8
8
|
} from "@ant-design/icons";
|
|
9
9
|
import HCserviceV3 from "../tmpl/hcservice-v3";
|
|
10
|
-
import {
|
|
10
|
+
import {LocaleContext} from "../locale/LocaleProvider";
|
|
11
11
|
import Vertify from "./vertify/index";
|
|
12
12
|
import Units from "../units";
|
|
13
|
+
import ResetPassword from "../layout/menu/reset-password";
|
|
13
14
|
|
|
14
15
|
interface LoginProps {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
onFinish: (token: string) => void;
|
|
17
|
+
title?: any;
|
|
18
|
+
programCode?: string;
|
|
19
|
+
autoSaveUser?: boolean;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
interface LoginState {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
username?: string;
|
|
24
|
+
password?: string;
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
needKaptcha?: boolean;
|
|
27
|
+
kaptchaImg?: string;
|
|
28
|
+
kaptchaToken?: string;
|
|
29
|
+
pubkey?: string;
|
|
30
|
+
vertify: boolean;
|
|
31
|
+
showSlideVertify: boolean;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
class Login extends React.PureComponent<LoginProps, LoginState> {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
35
|
+
state = {
|
|
36
|
+
username: "",
|
|
37
|
+
password: "",
|
|
38
|
+
loading: true,
|
|
39
|
+
needKaptcha: false,
|
|
40
|
+
kaptchaImg: null,
|
|
41
|
+
kaptchaToken: null,
|
|
42
|
+
pubkey: undefined,
|
|
43
|
+
vertify: false,
|
|
44
|
+
showSlideVertify: false,
|
|
45
|
+
};
|
|
46
|
+
formRef = React.createRef<FormInstance>();
|
|
47
|
+
static contextType = LocaleContext;
|
|
48
|
+
context: React.ContextType<typeof LocaleContext>;
|
|
49
|
+
|
|
50
|
+
componentDidMount = async () => {
|
|
51
|
+
const {programCode} = this.props;
|
|
52
|
+
localStorage.setItem("version", "v1");
|
|
53
|
+
|
|
54
|
+
if (programCode) Units.setProgramCode(programCode);
|
|
55
|
+
window.removeEventListener("keydown", this.handleKeyDown);
|
|
56
|
+
let pubkey = await HCserviceV3.getRasPubkey(null, programCode);
|
|
57
|
+
this.setState({
|
|
58
|
+
pubkey,
|
|
59
|
+
loading: false,
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
getKaptchaToken = async () => {
|
|
64
|
+
const {programCode} = this.props;
|
|
65
|
+
let res = await HCserviceV3.getKaptchaToken(programCode);
|
|
66
|
+
if (res) {
|
|
67
|
+
let kaptchaImg;
|
|
68
|
+
if (res.img && res.img.indexOf("data:") == 0) {
|
|
69
|
+
kaptchaImg = res.img;
|
|
70
|
+
} else {
|
|
71
|
+
kaptchaImg = `data:image/png;base64,${res.img}`;
|
|
72
|
+
}
|
|
73
|
+
this.setState({
|
|
74
|
+
kaptchaImg,
|
|
75
|
+
kaptchaToken: res.kaptchaToken,
|
|
76
|
+
needKaptcha: true,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
handleSubmit = async () => {
|
|
82
|
+
this.setState({
|
|
83
|
+
loading: true,
|
|
84
|
+
});
|
|
85
|
+
let {kaptchaToken, pubkey, needKaptcha, vertify} = this.state;
|
|
86
|
+
|
|
87
|
+
await this.formRef.current
|
|
88
|
+
.validateFields()
|
|
89
|
+
.then(async (values) => {
|
|
90
|
+
// if (needKaptcha && !vertify)
|
|
91
|
+
// return this.setState({ showSlideVertify: false });
|
|
92
|
+
|
|
93
|
+
const {programCode} = this.props;
|
|
94
|
+
let json = {username: values.username, password: values.password};
|
|
95
|
+
let res = await HCserviceV3.login(
|
|
96
|
+
json,
|
|
97
|
+
kaptchaToken,
|
|
98
|
+
values.kaptchaText,
|
|
99
|
+
pubkey,
|
|
100
|
+
programCode
|
|
101
|
+
);
|
|
102
|
+
if (res.status === "success") {
|
|
103
|
+
this.props.onFinish(res.token);
|
|
104
|
+
} else if (res.status === "error") {
|
|
105
|
+
this.setState({needKaptcha: true, vertify: false});
|
|
106
|
+
await this.getKaptchaToken();
|
|
107
|
+
}
|
|
108
|
+
})
|
|
109
|
+
.catch((errorInfo) => {
|
|
110
|
+
});
|
|
111
|
+
this.setState({
|
|
112
|
+
loading: false,
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
handleKeyDown = (event) => {
|
|
117
|
+
//按下enter键,触发login事件
|
|
118
|
+
switch (event.keyCode) {
|
|
119
|
+
case 13:
|
|
120
|
+
this.handleSubmit();
|
|
121
|
+
break;
|
|
122
|
+
default:
|
|
123
|
+
break;
|
|
106
124
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
changeKaptcha = async (event) => {
|
|
128
|
+
//切换验证码
|
|
129
|
+
await this.getKaptchaToken();
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
render() {
|
|
133
|
+
const {loading, needKaptcha, kaptchaImg, showSlideVertify} = this.state;
|
|
134
|
+
|
|
135
|
+
const {autoSaveUser = true} = this.props;
|
|
136
|
+
|
|
137
|
+
const {translate} = this.context;
|
|
138
|
+
return (
|
|
139
|
+
<>
|
|
140
|
+
<Form
|
|
141
|
+
style={{width: 350}}
|
|
142
|
+
ref={this.formRef}
|
|
143
|
+
name="normal_login"
|
|
144
|
+
initialValues={{remember: true}}
|
|
145
|
+
>
|
|
146
|
+
{this.props.title}
|
|
147
|
+
<Form.Item
|
|
148
|
+
name="username"
|
|
149
|
+
rules={[
|
|
150
|
+
{required: true, message: translate("${请输入}${用户名}!")},
|
|
151
|
+
{
|
|
152
|
+
max: 30,
|
|
153
|
+
min: 0,
|
|
154
|
+
message: translate("${请输入}${0-30个字符}!"),
|
|
155
|
+
},
|
|
156
|
+
]}
|
|
157
|
+
>
|
|
158
|
+
<Input
|
|
159
|
+
prefix={<UserOutlined className="site-form-item-icon"/>}
|
|
160
|
+
placeholder={translate("${用户名}")}
|
|
161
|
+
autoComplete={autoSaveUser ? "on" : "off"}
|
|
162
|
+
/>
|
|
163
|
+
</Form.Item>
|
|
164
|
+
<Form.Item
|
|
165
|
+
name="password"
|
|
166
|
+
rules={[
|
|
167
|
+
{required: true, message: translate("${请输入}${密码}!")},
|
|
168
|
+
]}
|
|
169
|
+
>
|
|
170
|
+
<Input
|
|
171
|
+
style={
|
|
172
|
+
autoSaveUser
|
|
173
|
+
? {}
|
|
174
|
+
: ({"-webkit-text-security": "disc"} as CSSProperties)
|
|
175
|
+
}
|
|
176
|
+
type={autoSaveUser ? "password" : "text"}
|
|
177
|
+
placeholder={translate("${密码}")}
|
|
178
|
+
onKeyDown={this.handleKeyDown}
|
|
179
|
+
autoComplete={autoSaveUser ? "on" : "off"}
|
|
180
|
+
prefix={<LockOutlined className="site-form-item-icon"/>}
|
|
181
|
+
/>
|
|
182
|
+
</Form.Item>
|
|
183
|
+
{needKaptcha ? (
|
|
184
|
+
<Row gutter={8}>
|
|
185
|
+
<Col span={12}>
|
|
186
|
+
<Form.Item
|
|
187
|
+
name="kaptchaText"
|
|
188
|
+
rules={[
|
|
189
|
+
{
|
|
190
|
+
required: true,
|
|
191
|
+
message: translate("${请输入}${验证码}!"),
|
|
192
|
+
},
|
|
193
|
+
]}
|
|
194
|
+
>
|
|
195
|
+
<Input
|
|
196
|
+
prefix={
|
|
197
|
+
<SafetyCertificateOutlined className="site-form-item-icon"/>
|
|
198
|
+
}
|
|
199
|
+
placeholder={translate("${验证码}")}
|
|
200
|
+
onKeyDown={this.handleKeyDown}
|
|
201
|
+
/>
|
|
202
|
+
</Form.Item>
|
|
203
|
+
</Col>
|
|
204
|
+
<Col span={12}>
|
|
205
|
+
<img
|
|
206
|
+
style={{cursor: "pointer"}}
|
|
207
|
+
height={30}
|
|
208
|
+
width={90}
|
|
209
|
+
title={translate("${点击刷新}")}
|
|
210
|
+
onClick={this.changeKaptcha}
|
|
211
|
+
src={kaptchaImg}
|
|
212
|
+
></img>
|
|
213
|
+
</Col>
|
|
214
|
+
</Row>
|
|
215
|
+
) : (
|
|
216
|
+
""
|
|
217
|
+
)}
|
|
218
|
+
<Form.Item>
|
|
219
|
+
<Button
|
|
220
|
+
type="primary"
|
|
221
|
+
style={{width: "100%"}}
|
|
222
|
+
loading={loading}
|
|
223
|
+
onClick={this.handleSubmit}
|
|
224
|
+
>
|
|
225
|
+
{translate("${登录}")}
|
|
226
|
+
</Button>
|
|
227
|
+
</Form.Item>
|
|
228
|
+
<Form.Item style={{marginBottom:0}}>
|
|
229
|
+
<Row gutter={8}>
|
|
230
|
+
<Col span={6} offset={18}><ResetPassword></ResetPassword></Col>
|
|
231
|
+
</Row>
|
|
232
|
+
</Form.Item>
|
|
233
|
+
</Form>
|
|
234
|
+
|
|
235
|
+
{showSlideVertify ? (
|
|
236
|
+
<div style={{width: "100%", height: "100%", background: "white"}}>
|
|
237
|
+
<Vertify
|
|
238
|
+
onSuccess={() =>
|
|
239
|
+
this.setState({vertify: true, showSlideVertify: false}, () =>
|
|
240
|
+
this.handleSubmit()
|
|
241
|
+
)
|
|
242
|
+
}
|
|
243
|
+
onFail={() =>
|
|
244
|
+
this.setState({vertify: false, showSlideVertify: true})
|
|
245
|
+
}
|
|
246
|
+
></Vertify>
|
|
247
|
+
</div>
|
|
248
|
+
) : (
|
|
249
|
+
<></>
|
|
250
|
+
)}
|
|
251
|
+
</>
|
|
252
|
+
);
|
|
122
253
|
}
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
changeKaptcha = async (event) => {
|
|
126
|
-
//切换验证码
|
|
127
|
-
await this.getKaptchaToken();
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
render() {
|
|
131
|
-
const { loading, needKaptcha, kaptchaImg, showSlideVertify } = this.state;
|
|
132
|
-
|
|
133
|
-
const { autoSaveUser = true } = this.props;
|
|
134
|
-
|
|
135
|
-
const { translate } = this.context;
|
|
136
|
-
return (
|
|
137
|
-
<>
|
|
138
|
-
<Form
|
|
139
|
-
style={{ width: 350 }}
|
|
140
|
-
ref={this.formRef}
|
|
141
|
-
name="normal_login"
|
|
142
|
-
initialValues={{ remember: true }}
|
|
143
|
-
>
|
|
144
|
-
{this.props.title}
|
|
145
|
-
<Form.Item
|
|
146
|
-
name="username"
|
|
147
|
-
rules={[
|
|
148
|
-
{ required: true, message: translate("${请输入}${用户名}!") },
|
|
149
|
-
{
|
|
150
|
-
max: 30,
|
|
151
|
-
min: 0,
|
|
152
|
-
message: translate("${请输入}${0-30个字符}!"),
|
|
153
|
-
},
|
|
154
|
-
]}
|
|
155
|
-
>
|
|
156
|
-
<Input
|
|
157
|
-
prefix={<UserOutlined className="site-form-item-icon" />}
|
|
158
|
-
placeholder={translate("${用户名}")}
|
|
159
|
-
autoComplete={autoSaveUser ? "on" : "off"}
|
|
160
|
-
/>
|
|
161
|
-
</Form.Item>
|
|
162
|
-
<Form.Item
|
|
163
|
-
name="password"
|
|
164
|
-
rules={[
|
|
165
|
-
{ required: true, message: translate("${请输入}${密码}!") },
|
|
166
|
-
]}
|
|
167
|
-
>
|
|
168
|
-
<Input
|
|
169
|
-
style={
|
|
170
|
-
autoSaveUser
|
|
171
|
-
? {}
|
|
172
|
-
: ({ "-webkit-text-security": "disc" } as CSSProperties)
|
|
173
|
-
}
|
|
174
|
-
type={autoSaveUser ? "password" : "text"}
|
|
175
|
-
placeholder={translate("${密码}")}
|
|
176
|
-
onKeyDown={this.handleKeyDown}
|
|
177
|
-
autoComplete={autoSaveUser ? "on" : "off"}
|
|
178
|
-
prefix={<LockOutlined className="site-form-item-icon" />}
|
|
179
|
-
/>
|
|
180
|
-
</Form.Item>
|
|
181
|
-
{needKaptcha ? (
|
|
182
|
-
<Row gutter={8}>
|
|
183
|
-
<Col span={12}>
|
|
184
|
-
<Form.Item
|
|
185
|
-
name="kaptchaText"
|
|
186
|
-
rules={[
|
|
187
|
-
{
|
|
188
|
-
required: true,
|
|
189
|
-
message: translate("${请输入}${验证码}!"),
|
|
190
|
-
},
|
|
191
|
-
]}
|
|
192
|
-
>
|
|
193
|
-
<Input
|
|
194
|
-
prefix={
|
|
195
|
-
<SafetyCertificateOutlined className="site-form-item-icon" />
|
|
196
|
-
}
|
|
197
|
-
placeholder={translate("${验证码}")}
|
|
198
|
-
onKeyDown={this.handleKeyDown}
|
|
199
|
-
/>
|
|
200
|
-
</Form.Item>
|
|
201
|
-
</Col>
|
|
202
|
-
<Col span={12}>
|
|
203
|
-
<img
|
|
204
|
-
style={{ cursor: "pointer" }}
|
|
205
|
-
height={30}
|
|
206
|
-
width={90}
|
|
207
|
-
title={translate("${点击刷新}")}
|
|
208
|
-
onClick={this.changeKaptcha}
|
|
209
|
-
src={kaptchaImg}
|
|
210
|
-
></img>
|
|
211
|
-
</Col>
|
|
212
|
-
</Row>
|
|
213
|
-
) : (
|
|
214
|
-
""
|
|
215
|
-
)}
|
|
216
|
-
<Form.Item>
|
|
217
|
-
<Button
|
|
218
|
-
type="primary"
|
|
219
|
-
style={{ width: "100%" }}
|
|
220
|
-
loading={loading}
|
|
221
|
-
onClick={this.handleSubmit}
|
|
222
|
-
>
|
|
223
|
-
{translate("${登录}")}
|
|
224
|
-
</Button>
|
|
225
|
-
</Form.Item>
|
|
226
|
-
</Form>
|
|
227
|
-
{showSlideVertify ? (
|
|
228
|
-
<div style={{ width: "100%", height: "100%", background: "white" }}>
|
|
229
|
-
<Vertify
|
|
230
|
-
onSuccess={() =>
|
|
231
|
-
this.setState({ vertify: true, showSlideVertify: false }, () =>
|
|
232
|
-
this.handleSubmit()
|
|
233
|
-
)
|
|
234
|
-
}
|
|
235
|
-
onFail={() =>
|
|
236
|
-
this.setState({ vertify: false, showSlideVertify: true })
|
|
237
|
-
}
|
|
238
|
-
></Vertify>
|
|
239
|
-
</div>
|
|
240
|
-
) : (
|
|
241
|
-
<></>
|
|
242
|
-
)}
|
|
243
|
-
</>
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
254
|
}
|
|
247
255
|
|
|
248
256
|
export default Login;
|
|
@@ -4,6 +4,8 @@ import LoginBgPng from "./img/login-bg.png";
|
|
|
4
4
|
import { useLocale } from "../locale/useLocale";
|
|
5
5
|
import HCDataSource from "../tmpl/hc-data-source";
|
|
6
6
|
import Units from "../units";
|
|
7
|
+
import {Button, Col, Row} from "antd";
|
|
8
|
+
import ResetPassword from "../layout/menu/reset-password";
|
|
7
9
|
|
|
8
10
|
const LoginPage = () => {
|
|
9
11
|
const { translate } = useLocale();
|
|
@@ -51,6 +53,9 @@ const LoginPage = () => {
|
|
|
51
53
|
Units.setHydrocarbonToken(token);
|
|
52
54
|
}}
|
|
53
55
|
></Login>
|
|
56
|
+
<Row>
|
|
57
|
+
<Col span={6} offset={18}><ResetPassword></ResetPassword></Col>
|
|
58
|
+
</Row>
|
|
54
59
|
</div>
|
|
55
60
|
</div>
|
|
56
61
|
);
|
|
@@ -699,15 +699,26 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
699
699
|
{ltmplConfig.rowFileButtons &&
|
|
700
700
|
ltmplConfig.rowFileButtons.length > 0
|
|
701
701
|
? ltmplConfig.rowFileButtons.map((openFileButton) => {
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
702
|
+
let v= record[openFileButton.fieldId];
|
|
703
|
+
if(v){
|
|
704
|
+
if(v instanceof Array){
|
|
705
|
+
v=v[0];
|
|
706
|
+
}
|
|
707
|
+
if(v.includes("@R@")>0){
|
|
708
|
+
v=v.split("@R@")[1];
|
|
709
|
+
}
|
|
710
|
+
return (
|
|
711
|
+
<NewinFileView
|
|
712
|
+
title={openFileButton.title}
|
|
713
|
+
filePath={HCService.toFilePath(v, serverKey)}
|
|
714
|
+
serverKey={serverKey}
|
|
715
|
+
key={openFileButton.id}
|
|
716
|
+
//size={"small"}
|
|
717
|
+
/>
|
|
718
|
+
);
|
|
719
|
+
}else{
|
|
720
|
+
return "";
|
|
721
|
+
}
|
|
711
722
|
})
|
|
712
723
|
: ""}
|
|
713
724
|
{buttons.includes("singleDelete") &&
|
|
@@ -42,7 +42,6 @@ export default class HcserviceV3 {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
static toFilePath(value,serverKey) {
|
|
45
|
-
debugger
|
|
46
45
|
if (!value) {
|
|
47
46
|
return null;
|
|
48
47
|
}
|
|
@@ -1034,10 +1033,16 @@ export default class HcserviceV3 {
|
|
|
1034
1033
|
},
|
|
1035
1034
|
method: "GET",
|
|
1036
1035
|
});
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1036
|
+
if(res.passwordState){
|
|
1037
|
+
if(res.passwordState=="expiry"){
|
|
1038
|
+
message.warning(translate("${"+res.message+"}"), 10);
|
|
1039
|
+
}else if(res.passwordState=="expiried"){
|
|
1040
|
+
message.error(translate("${"+res.message+"}"), 10)
|
|
1041
|
+
}else if(res.passwordState=="restricted"){
|
|
1042
|
+
message.error(translate("${"+res.message+"}"), 15)
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
return {status:res.status,token:res.token};
|
|
1041
1046
|
}
|
|
1042
1047
|
|
|
1043
1048
|
static async setContext(json) {
|