aldehyde 0.2.56 → 0.2.57
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/action/index.d.ts +1 -1
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/cquery/cquick-button.d.ts +1 -1
- package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
- package/lib/controls/entry-control.d.ts +2 -1
- package/lib/controls/entry-control.d.ts.map +1 -1
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/controls/file-view/drawer-file-view.d.ts +1 -1
- package/lib/controls/file-view/drawer-file-view.d.ts.map +1 -1
- package/lib/controls/file-view/index.d.ts +1 -1
- package/lib/controls/file-view/index.d.ts.map +1 -1
- package/lib/controls/view-control.d.ts +2 -1
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js.map +1 -1
- package/lib/detail/button/cquery-button-bar.d.ts +1 -1
- package/lib/detail/button/cquery-button-bar.d.ts.map +1 -1
- package/lib/detail/button/submit-button-bar.d.ts +1 -1
- package/lib/detail/button/submit-button-bar.d.ts.map +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/modal-row-edit.d.ts +1 -1
- package/lib/detail/edit/modal-row-edit.d.ts.map +1 -1
- package/lib/detail/edit/row-edit-card.d.ts +1 -1
- package/lib/detail/edit/row-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/row-editor.d.ts +1 -1
- package/lib/detail/edit/row-editor.d.ts.map +1 -1
- package/lib/detail/view/field-view-group.d.ts +1 -1
- package/lib/detail/view/field-view-group.d.ts.map +1 -1
- package/lib/detail/view/snapshot-timeline.d.ts +1 -1
- package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
- package/lib/exportor/export-frame.d.ts +1 -1
- package/lib/exportor/export-frame.d.ts.map +1 -1
- package/lib/form/criteria-form.d.ts +1 -1
- package/lib/form/criteria-form.d.ts.map +1 -1
- package/lib/form/field-group-form.d.ts +1 -1
- package/lib/form/field-group-form.d.ts.map +1 -1
- package/lib/form/fields-form.d.ts +1 -1
- package/lib/form/fields-form.d.ts.map +1 -1
- package/lib/form/form-Item-group.d.ts +1 -1
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/import/excel-import.d.ts +1 -1
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/layout/menu/reset-password.d.ts +1 -0
- package/lib/layout/menu/reset-password.d.ts.map +1 -1
- package/lib/layout/menu/reset-password.js +5 -3
- package/lib/layout/menu/reset-password.js.map +1 -1
- package/lib/layout/menu/user-bar.d.ts +2 -0
- package/lib/layout/menu/user-bar.d.ts.map +1 -1
- package/lib/layout/menu/user-bar.js +34 -20
- package/lib/layout/menu/user-bar.js.map +1 -1
- package/lib/login/context-setter.d.ts +1 -1
- package/lib/login/context-setter.d.ts.map +1 -1
- package/lib/module/dtmpl-view-card.d.ts +1 -1
- package/lib/module/dtmpl-view-card.d.ts.map +1 -1
- package/lib/module/ltmpl-table.d.ts +1 -1
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/routable/import-route.d.ts +1 -1
- package/lib/routable/import-route.d.ts.map +1 -1
- package/lib/table/modal-select-table.d.ts +1 -1
- package/lib/table/modal-select-table.d.ts.map +1 -1
- package/lib/table/query-table.d.ts +1 -1
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/relation-table.d.ts +1 -1
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/select-table.d.ts +1 -1
- package/lib/table/select-table.d.ts.map +1 -1
- package/lib/table/stat/restat.d.ts +1 -1
- package/lib/table/stat/restat.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +2 -2
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +4 -2
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +2 -2
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/index.tsx +1 -1
- package/src/aldehyde/controls/cquery/cquick-button.tsx +1 -1
- package/src/aldehyde/controls/entry-control.tsx +2 -1
- package/src/aldehyde/controls/file-view/drawer-file-view.tsx +1 -1
- package/src/aldehyde/controls/file-view/index.tsx +1 -1
- package/src/aldehyde/controls/view-control.tsx +2 -1
- package/src/aldehyde/detail/button/cquery-button-bar.tsx +1 -1
- package/src/aldehyde/detail/button/submit-button-bar.tsx +1 -1
- package/src/aldehyde/detail/edit/fields-edit-card.tsx +1 -1
- package/src/aldehyde/detail/edit/modal-row-edit.tsx +1 -1
- package/src/aldehyde/detail/edit/row-edit-card.tsx +1 -1
- package/src/aldehyde/detail/edit/row-editor.tsx +1 -1
- package/src/aldehyde/detail/view/field-view-group.tsx +1 -1
- package/src/aldehyde/detail/view/snapshot-timeline.tsx +1 -1
- package/src/aldehyde/exportor/export-frame.tsx +1 -1
- package/src/aldehyde/form/criteria-form.tsx +1 -1
- package/src/aldehyde/form/field-group-form.tsx +1 -1
- package/src/aldehyde/form/fields-form.tsx +1 -1
- package/src/aldehyde/form/form-Item-group.tsx +1 -1
- package/src/aldehyde/import/excel-import.tsx +1 -1
- package/src/aldehyde/layout/menu/reset-password.tsx +8 -15
- package/src/aldehyde/layout/menu/user-bar.tsx +47 -25
- package/src/aldehyde/login/context-setter.tsx +1 -1
- package/src/aldehyde/module/dtmpl-view-card.tsx +1 -1
- package/src/aldehyde/module/ltmpl-table.tsx +1 -1
- package/src/aldehyde/routable/import-route.tsx +1 -1
- package/src/aldehyde/table/modal-select-table.tsx +1 -1
- package/src/aldehyde/table/query-table.tsx +1 -1
- package/src/aldehyde/table/relation-table.tsx +1 -1
- package/src/aldehyde/table/select-table.tsx +1 -1
- package/src/aldehyde/table/stat/restat.tsx +1 -1
- package/src/aldehyde/tmpl/hcservice-v3.tsx +4 -2
- package/src/aldehyde/tmpl/interface.tsx +2 -2
|
@@ -4,7 +4,7 @@ import {DtmplData, FieldGroupConfig} from "../../tmpl/interface";
|
|
|
4
4
|
import FieldGroupForm from '../../form/field-group-form';
|
|
5
5
|
|
|
6
6
|
interface ModalRowEditorProps {
|
|
7
|
-
serverKey
|
|
7
|
+
serverKey?:string,
|
|
8
8
|
height?: any,
|
|
9
9
|
open: boolean,
|
|
10
10
|
onOk: (value: DtmplData) => void,
|
|
@@ -6,7 +6,7 @@ import FieldGroupForm from '../../form/field-group-form';
|
|
|
6
6
|
import {ButtonType} from "antd/es/button";
|
|
7
7
|
|
|
8
8
|
interface RowEditCardProps {
|
|
9
|
-
serverKey
|
|
9
|
+
serverKey?:string,
|
|
10
10
|
height?: any,
|
|
11
11
|
onCancel?: () => void,
|
|
12
12
|
onOk: (value: DtmplData,hidden:boolean) => void,
|
|
@@ -3,7 +3,7 @@ import {Button, FormInstance, Popover, Tooltip} from 'antd'
|
|
|
3
3
|
import {DtmplData, FieldGroupConfig} from "../../tmpl/interface";
|
|
4
4
|
import RowEditCard from './row-edit-card'
|
|
5
5
|
interface RowEditorProps {
|
|
6
|
-
serverKey
|
|
6
|
+
serverKey?:string,
|
|
7
7
|
buttonTitle?: string,
|
|
8
8
|
buttonIcon: React.ReactNode,
|
|
9
9
|
tooltipTitle?: React.ReactNode ;
|
|
@@ -9,7 +9,7 @@ type ExportStatus = 'ready'|'exporting' | 'success'|'fail' |'stop';
|
|
|
9
9
|
type ExportMode = 'current'|'all';
|
|
10
10
|
interface ExportFrameProps {
|
|
11
11
|
defaultExportMode?:string,
|
|
12
|
-
serverKey
|
|
12
|
+
serverKey?:string,
|
|
13
13
|
queryKey: QueryKey;
|
|
14
14
|
currentPage?:PageInfo;
|
|
15
15
|
title:string;
|
|
@@ -14,7 +14,7 @@ type LogLevel = 'INFO'| 'SUC'|'ERROR'|'WARN';
|
|
|
14
14
|
type ImportStatus = 'waitingFile'| 'fileSelected' |'importing' | 'success'|'fail' |'stop';
|
|
15
15
|
const { Text } = Typography;
|
|
16
16
|
interface ExcelImportProps {
|
|
17
|
-
serverKey
|
|
17
|
+
serverKey?:string,
|
|
18
18
|
sourceId:string,
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import {
|
|
3
|
-
Dropdown,
|
|
4
|
-
Menu,
|
|
5
|
-
Modal,
|
|
6
3
|
message,
|
|
7
|
-
Popconfirm,
|
|
8
|
-
Avatar,
|
|
9
|
-
Badge,
|
|
10
|
-
Tooltip,
|
|
11
4
|
Button,
|
|
12
5
|
Popover,
|
|
13
6
|
Col,
|
|
14
7
|
Form,
|
|
15
|
-
Input, Row,
|
|
8
|
+
Input, Row, FormInstance
|
|
16
9
|
} from 'antd';
|
|
17
|
-
import {
|
|
10
|
+
import {LockOutlined} from '@ant-design/icons';
|
|
18
11
|
import 'antd/dist/reset.css';
|
|
19
12
|
import HCserviceV3 from "../../tmpl/hcservice-v3";
|
|
20
13
|
|
|
21
14
|
interface ResetPasswordProps {
|
|
22
|
-
|
|
15
|
+
serverKey?:string,
|
|
23
16
|
}
|
|
24
17
|
|
|
25
18
|
|
|
@@ -39,7 +32,8 @@ class ResetPassword extends React.PureComponent<ResetPasswordProps, ResetPasswor
|
|
|
39
32
|
formRef = React.createRef<FormInstance>();
|
|
40
33
|
|
|
41
34
|
async componentDidMount() {
|
|
42
|
-
|
|
35
|
+
const {serverKey}=this.props;
|
|
36
|
+
let pubkey = await HCserviceV3.getRasPubkey(serverKey);
|
|
43
37
|
this.setState({
|
|
44
38
|
pubkey
|
|
45
39
|
})
|
|
@@ -52,10 +46,11 @@ class ResetPassword extends React.PureComponent<ResetPasswordProps, ResetPasswor
|
|
|
52
46
|
this.setState({
|
|
53
47
|
loading: true
|
|
54
48
|
})
|
|
55
|
-
|
|
49
|
+
const {pubkey}=this.state
|
|
56
50
|
|
|
51
|
+
const {serverKey}=this.props;
|
|
57
52
|
|
|
58
|
-
let res = await HCserviceV3.resetPassword(values.oldPassword, values.newPassword,pubkey);
|
|
53
|
+
let res = await HCserviceV3.resetPassword(serverKey,values.oldPassword, values.newPassword,pubkey);
|
|
59
54
|
if(res.status == 'success') {
|
|
60
55
|
message.info("密码已重置,请重新登录")
|
|
61
56
|
HCserviceV3.logout();
|
|
@@ -161,8 +156,6 @@ class ResetPassword extends React.PureComponent<ResetPasswordProps, ResetPasswor
|
|
|
161
156
|
|
|
162
157
|
}
|
|
163
158
|
|
|
164
|
-
|
|
165
|
-
|
|
166
159
|
render() {
|
|
167
160
|
const {showPopover,loading} = this.state;
|
|
168
161
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, {CSSProperties} from 'react'
|
|
2
|
-
import {Avatar, Col, Dropdown, Menu, Row, Tooltip} from 'antd';
|
|
2
|
+
import {Avatar, Col, Dropdown, Menu, MenuProps, Row, Tooltip} from 'antd';
|
|
3
3
|
import {LoginOutlined, LogoutOutlined, UserOutlined} from '@ant-design/icons';
|
|
4
4
|
import {UserInfo} from "../../tmpl/interface";
|
|
5
5
|
import HcserviceV3 from '../../tmpl/hcservice-v3';
|
|
@@ -13,6 +13,7 @@ interface UserBarProps {
|
|
|
13
13
|
backgroudColor?: string,
|
|
14
14
|
showUserInfo?: boolean,
|
|
15
15
|
showChangePassword?: boolean,
|
|
16
|
+
menu?: MenuProps
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
|
|
@@ -89,37 +90,58 @@ class UserBar extends React.PureComponent<UserBarProps, UserBarState> {
|
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
render() {
|
|
92
|
-
const {backgroudColor, showUserInfo, showChangePassword} = this.props;
|
|
93
|
+
const {backgroudColor, showUserInfo, showChangePassword,menu} = this.props;
|
|
93
94
|
const {name, context, cleanCachable, gtmplSourceId, changePasswordable, changePersonalInfoable, viewPersonalInfoable, id} = this.state;
|
|
94
95
|
const syyy: CSSProperties = {'--message-bar-backgroupd': backgroudColor} as CSSProperties;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
|
|
97
|
+
const items: MenuProps['items'] = [];
|
|
98
|
+
if (name) {
|
|
99
|
+
showUserInfo && viewPersonalInfoable ?
|
|
100
|
+
items.push({
|
|
101
|
+
key: '1',
|
|
102
|
+
label: (
|
|
103
|
+
<UserInfoBar gtmplSourceId={gtmplSourceId} editable={changePersonalInfoable} userCode={id}/>
|
|
104
|
+
),
|
|
105
|
+
}) : null;
|
|
106
|
+
context && context.length > 0 ? items.push({
|
|
107
|
+
key: '2',
|
|
108
|
+
label: (
|
|
101
109
|
<span onClick={this.toSetContext}>全局配置</span>
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
),
|
|
111
|
+
}) : null;
|
|
112
|
+
showChangePassword && changePasswordable ? items.push({
|
|
113
|
+
key: '3',
|
|
114
|
+
label: (
|
|
104
115
|
<ResetPassword></ResetPassword>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
),
|
|
117
|
+
}) : null;
|
|
118
|
+
|
|
119
|
+
cleanCachable ? items.push({
|
|
120
|
+
key: '4',
|
|
121
|
+
label: (
|
|
122
|
+
<span onClick={this.cleanCache}>清空缓存</span>
|
|
123
|
+
),
|
|
124
|
+
}) : null;
|
|
125
|
+
|
|
126
|
+
items.push({
|
|
127
|
+
key: '5',
|
|
128
|
+
label: (
|
|
113
129
|
<span onClick={HcserviceV3.logout}><LogoutOutlined/> 退出</span>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
130
|
+
),
|
|
131
|
+
});
|
|
132
|
+
} else {
|
|
133
|
+
items.push({
|
|
134
|
+
key: '2',
|
|
135
|
+
label: (
|
|
136
|
+
<span onClick={HcserviceV3.logout}><LoginOutlined/> 登 录</span>
|
|
137
|
+
),
|
|
138
|
+
})
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
120
142
|
return (
|
|
121
143
|
<>
|
|
122
|
-
<Dropdown
|
|
144
|
+
<Dropdown menu={menu?menu:{ items}} placement="bottom" trigger={['click']}>
|
|
123
145
|
<div className="userLogin" style={syyy}>
|
|
124
146
|
{/*<Tooltip placement={'right'} title={name} >*/}
|
|
125
147
|
{/*<Avatar style={{ color:'#1890ff' }} shape="square" icon={<UserOutlined/>} size={{ xs: 8, sm: 16, md: 24, lg: 32, xl: 40, xxl: 48 }}>*/}
|
|
@@ -12,7 +12,7 @@ import DtmplCustomEditModalPage from "../custom-page/dtmpl-custom-edit-modal-pag
|
|
|
12
12
|
//以列表为入口的,页面内列表,基本原则是所有交互在页面内完成,不会触发路由。
|
|
13
13
|
|
|
14
14
|
export interface LtmplTableProps {
|
|
15
|
-
serverKey
|
|
15
|
+
serverKey?:string,
|
|
16
16
|
sourceId: string,
|
|
17
17
|
mainCode?: string;
|
|
18
18
|
showView?: (code: string, toCustomPage?: boolean) => void,
|
|
@@ -35,7 +35,7 @@ interface QueryTableProps {
|
|
|
35
35
|
pageSize: number
|
|
36
36
|
},
|
|
37
37
|
columns: any[];
|
|
38
|
-
serverKey
|
|
38
|
+
serverKey?:string,
|
|
39
39
|
queryKey: QueryKey;
|
|
40
40
|
onChangePage: (pageNo: number, pageSize: number) => void,
|
|
41
41
|
onChangeRowSelection?: (selectedRows: SelectedRow[], selectedDatas: DtmplData[], allRowKeys: string[]) => void;
|
|
@@ -12,7 +12,7 @@ import ViewControl from "../controls/view-control";
|
|
|
12
12
|
interface SelectTableProps {
|
|
13
13
|
mainCode?:string,
|
|
14
14
|
maxSelectedRows?: number,
|
|
15
|
-
serverKey
|
|
15
|
+
serverKey?:string,
|
|
16
16
|
sourceId: string,
|
|
17
17
|
selectedRows: SelectedRow[];
|
|
18
18
|
selectedDatas?: DtmplData[];
|
|
@@ -563,11 +563,12 @@ export default class HcserviceV3 {
|
|
|
563
563
|
}
|
|
564
564
|
|
|
565
565
|
|
|
566
|
-
static async resetPassword(oPassword, nPassword, pubkey) {
|
|
566
|
+
static async resetPassword(serverKey:string,oPassword:string, nPassword:string, pubkey) {
|
|
567
567
|
let oldPassword = EncryptUtils.rsaEncrypt(oPassword, pubkey);
|
|
568
568
|
let newPassword = EncryptUtils.rsaEncrypt(nPassword, pubkey);
|
|
569
569
|
let res = await Super.super({
|
|
570
570
|
url: '/v3/auth/password',
|
|
571
|
+
serverKey,
|
|
571
572
|
query: {
|
|
572
573
|
oldPassword, newPassword
|
|
573
574
|
},
|
|
@@ -647,9 +648,10 @@ export default class HcserviceV3 {
|
|
|
647
648
|
}
|
|
648
649
|
}
|
|
649
650
|
|
|
650
|
-
static async getRasPubkey() {
|
|
651
|
+
static async getRasPubkey(serverKey?:string) {
|
|
651
652
|
let res = await Super.super({
|
|
652
653
|
url: '/v3/auth/ras-pubkey',
|
|
654
|
+
serverKey,
|
|
653
655
|
method: "GET"
|
|
654
656
|
})
|
|
655
657
|
if (res.status === 'success') {
|
|
@@ -111,7 +111,7 @@ export type ButtonName = 'rowAdd' | 'rowEdit' | 'batchDelete'|'singleDelete'| 's
|
|
|
111
111
|
export type ChartType = 'line' | 'pie' | 'column';
|
|
112
112
|
export type GroupDisplayConfig = 'nonDataNonDisplayed' | 'displayed' | 'folded' |'unfold' | 'listview' | 'tableview';
|
|
113
113
|
export interface FieldGroupConfig extends OrderableTmplBase {
|
|
114
|
-
serverKey
|
|
114
|
+
serverKey?:string,
|
|
115
115
|
type: FieldGroupType;
|
|
116
116
|
buttons: ButtonName[];
|
|
117
117
|
min: number;
|
|
@@ -311,7 +311,7 @@ export interface RouterCompProps {
|
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
export interface TmplBaseProps {
|
|
314
|
-
serverKey
|
|
314
|
+
serverKey?:string,
|
|
315
315
|
sourceId: string,
|
|
316
316
|
mainCode?: string,
|
|
317
317
|
};
|