aldehyde 0.2.55 → 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 +5 -5
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/cascader/index.d.ts +1 -1
- package/lib/controls/chemstruc/graph.d.ts +1 -1
- package/lib/controls/code-editor/sql-code-editor.d.ts +1 -1
- package/lib/controls/collapse-card/index.d.ts +2 -2
- package/lib/controls/collapse-card/index.d.ts.map +1 -1
- package/lib/controls/color-picker/index.d.ts +1 -1
- package/lib/controls/counting-tag/index.d.ts +1 -1
- package/lib/controls/cquery/cquick-button.d.ts +2 -2
- package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.d.ts +4 -4
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/lab-tree-select.d.ts +1 -1
- package/lib/controls/entity-select/popover-entity-select.d.ts +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 +2 -2
- package/lib/controls/file-view/drawer-file-view.d.ts.map +1 -1
- package/lib/controls/file-view/index.d.ts +2 -2
- package/lib/controls/file-view/index.d.ts.map +1 -1
- package/lib/controls/html-editor/tinymce.d.ts +1 -1
- package/lib/controls/html-editor/tinymce.d.ts.map +1 -1
- package/lib/controls/password-setter/index.d.ts +1 -1
- package/lib/controls/password-setter/index.d.ts.map +1 -1
- package/lib/controls/relation-existion/index.d.ts +1 -1
- package/lib/controls/rfield/index.d.ts +1 -1
- package/lib/controls/signature/index.d.ts +1 -1
- package/lib/controls/text/ellipsis-text.d.ts +2 -2
- package/lib/controls/text/ellipsis-text.d.ts.map +1 -1
- package/lib/controls/upload/index.d.ts +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/custom-page/custom-page-router.d.ts +2 -1
- package/lib/custom-page/custom-page-router.d.ts.map +1 -1
- package/lib/custom-page/def-custom-page.d.ts +1 -1
- package/lib/custom-page/def-custom-page.d.ts.map +1 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts +1 -1
- package/lib/detail/button/cquery-button-bar.d.ts +2 -2
- package/lib/detail/button/cquery-button-bar.d.ts.map +1 -1
- package/lib/detail/button/submit-button-bar.d.ts +2 -2
- package/lib/detail/button/submit-button-bar.d.ts.map +1 -1
- package/lib/detail/edit/dtmpl-edit.d.ts +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts +2 -2
- package/lib/detail/edit/fields-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/modal-row-edit.d.ts +2 -2
- package/lib/detail/edit/modal-row-edit.d.ts.map +1 -1
- package/lib/detail/edit/row-edit-card.d.ts +2 -2
- package/lib/detail/edit/row-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/row-editor.d.ts +3 -4
- package/lib/detail/edit/row-editor.d.ts.map +1 -1
- package/lib/detail/edit/row-editor.js.map +1 -1
- package/lib/detail/rightbar/index.d.ts +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts +1 -1
- package/lib/detail/view/dtmpl-view.d.ts +2 -2
- package/lib/detail/view/dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/field-view-group.d.ts +2 -2
- package/lib/detail/view/field-view-group.d.ts.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.d.ts +1 -1
- package/lib/detail/view/snapshot-timeline.d.ts +2 -2
- package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
- package/lib/exportor/export-frame.d.ts +2 -2
- 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/dtmpl-form.d.ts +2 -2
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/field-group-form.d.ts +3 -3
- package/lib/form/field-group-form.d.ts.map +1 -1
- package/lib/form/fields-form.d.ts +2 -2
- package/lib/form/fields-form.d.ts.map +1 -1
- package/lib/form/form-Item-group.d.ts +4 -4
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/icon/index.d.ts +1 -1
- package/lib/import/excel-import.d.ts +2 -2
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/layout/MainPage.d.ts +2 -1
- package/lib/layout/MainPage.d.ts.map +1 -1
- package/lib/layout/footer/index.d.ts +1 -1
- package/lib/layout/footer/index.d.ts.map +1 -1
- package/lib/layout/menu/block.d.ts +2 -2
- package/lib/layout/menu/block.d.ts.map +1 -1
- package/lib/layout/menu/block1.d.ts +2 -2
- package/lib/layout/menu/block1.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts +2 -2
- package/lib/layout/menu/l2menu-message-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts +2 -2
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
- package/lib/layout/menu/menu-2layers.d.ts +1 -1
- package/lib/layout/menu/menu-render.d.ts +3 -2
- package/lib/layout/menu/menu-render.d.ts.map +1 -1
- package/lib/layout/menu/reset-password.d.ts +3 -2
- 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 +5 -3
- 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/layout/menu/userinfo-bar.d.ts +1 -1
- package/lib/login/context-setter.d.ts +3 -2
- package/lib/login/context-setter.d.ts.map +1 -1
- package/lib/login/login.d.ts +2 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts +1 -1
- package/lib/module/dtmpl-edit-drawer.d.ts +1 -1
- package/lib/module/dtmpl-edit-modal.d.ts +1 -1
- package/lib/module/dtmpl-edit-page.d.ts +1 -1
- package/lib/module/dtmpl-editor.d.ts +1 -1
- package/lib/module/dtmpl-view-card.d.ts +2 -2
- package/lib/module/dtmpl-view-card.d.ts.map +1 -1
- package/lib/module/dtmpl-view-drawer.d.ts +1 -1
- package/lib/module/dtmpl-view-modal.d.ts +1 -1
- package/lib/module/ltmpl-drawer.d.ts +1 -1
- package/lib/module/ltmpl-modal.d.ts +1 -1
- package/lib/module/ltmpl-table.d.ts +2 -2
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/routable/dtmpl-route.d.ts +2 -1
- package/lib/routable/dtmpl-route.d.ts.map +1 -1
- package/lib/routable/import-route.d.ts +3 -2
- package/lib/routable/import-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.d.ts +2 -1
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/withroute.d.ts +2 -1
- package/lib/routable/withroute.d.ts.map +1 -1
- package/lib/table/act-table.d.ts +4 -4
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/column/column-selector.d.ts +1 -1
- package/lib/table/l2-act-table.d.ts +1 -1
- package/lib/table/modal-select-table.d.ts +2 -2
- package/lib/table/modal-select-table.d.ts.map +1 -1
- package/lib/table/pagination.d.ts +1 -1
- package/lib/table/query-table.d.ts +4 -4
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/relation-table.d.ts +3 -3
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/select-table.d.ts +2 -2
- package/lib/table/select-table.d.ts.map +1 -1
- package/lib/table/selected-rows-card.d.ts +1 -1
- package/lib/table/stat/restat.d.ts +2 -2
- 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/lib/welcome/HCWelcome.d.ts +2 -1
- package/lib/welcome/HCWelcome.d.ts.map +1 -1
- package/lib/welcome/quick-entrance.d.ts +1 -1
- package/lib/welcome/workbench.d.ts +1 -1
- package/package.json +5 -3
- 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 +2 -3
- 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
|
@@ -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
|
};
|