aldehyde 0.2.461 → 0.2.462
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/2dEditor/components/component.less +3 -1
- package/lib/controls/chemstruc/graph.d.ts.map +1 -1
- package/lib/controls/chemstruc/graph.js.map +1 -1
- package/lib/controls/cquery/cquick-button.d.ts +2 -0
- package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
- package/lib/controls/cquery/cquick-button.js +4 -6
- package/lib/controls/cquery/cquick-button.js.map +1 -1
- package/lib/controls/direct-file-view/drawer-file-view.d.ts +1 -1
- package/lib/controls/direct-file-view/drawer-file-view.d.ts.map +1 -1
- package/lib/controls/direct-file-view/drawer-file-view.js +4 -3
- package/lib/controls/direct-file-view/drawer-file-view.js.map +1 -1
- package/lib/controls/entity-select/entity-select.d.ts +1 -2
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.js +1 -2
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/entity-select/index.css +5 -3
- package/lib/controls/entity-select/popover-entity-select.d.ts +5 -2
- package/lib/controls/entity-select/popover-entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.js +9 -7
- package/lib/controls/entity-select/popover-entity-select.js.map +1 -1
- package/lib/controls/file-view/drawer-file-view.d.ts.map +1 -1
- package/lib/controls/file-view/drawer-file-view.js +4 -3
- package/lib/controls/file-view/drawer-file-view.js.map +1 -1
- package/lib/controls/qr-code/index.js +1 -1
- package/lib/controls/qr-code/index.js.map +1 -1
- package/lib/controls/qr-code/index.less +2 -1
- package/lib/controls/relation-existion/index.css +3 -3
- package/lib/controls/relation-existion/index.js +1 -1
- package/lib/controls/relation-existion/index.js.map +1 -1
- package/lib/controls/text/ellipsis-text.d.ts +1 -0
- package/lib/controls/text/ellipsis-text.d.ts.map +1 -1
- package/lib/controls/text/ellipsis-text.js +1 -0
- package/lib/controls/text/ellipsis-text.js.map +1 -1
- package/lib/controls/text/index.less +5 -0
- package/lib/detail/view/snapshot-timeline.d.ts +4 -0
- package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
- package/lib/detail/view/snapshot-timeline.js +6 -6
- package/lib/detail/view/snapshot-timeline.js.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts +0 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.js +9 -8
- package/lib/layout/menu/l2menu-message-bar.js.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts +2 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.js +14 -17
- package/lib/layout/menu/l2menu-quick-bar.js.map +1 -1
- package/lib/layout2/components/search-menu.js +14 -3
- package/lib/layout2/components/search-menu.js.map +1 -1
- package/lib/layout2/components/user-button.js +13 -2
- package/lib/layout2/components/user-button.js.map +1 -1
- package/lib/layout2/page.js +1 -1
- package/lib/layout2/page.js.map +1 -1
- package/lib/layout2/sider.d.ts.map +1 -1
- package/lib/layout2/sider.js +16 -13
- package/lib/layout2/sider.js.map +1 -1
- package/lib/layout3/css/main.less +7 -3
- package/lib/layout3/page.js +1 -1
- package/lib/layout3/page.js.map +1 -1
- package/lib/layout3/sider.d.ts.map +1 -1
- package/lib/layout3/sider.js +16 -13
- package/lib/layout3/sider.js.map +1 -1
- package/lib/layout4/css/main.less +7 -3
- package/lib/layout4/page.js +1 -1
- package/lib/layout4/page.js.map +1 -1
- package/lib/layout4/sider.d.ts.map +1 -1
- package/lib/layout4/sider.js +16 -13
- package/lib/layout4/sider.js.map +1 -1
- package/lib/layout5/page.js +1 -1
- package/lib/layout5/page.js.map +1 -1
- package/lib/layout5/sider.d.ts.map +1 -1
- package/lib/layout5/sider.js +16 -13
- package/lib/layout5/sider.js.map +1 -1
- package/lib/list/gantt/index.less +1 -0
- package/lib/lowcode-components/lowcode-view/index.less +1 -0
- package/lib/module/block-menu-tree-drawer.d.ts +2 -0
- package/lib/module/block-menu-tree-drawer.d.ts.map +1 -1
- package/lib/module/block-menu-tree-drawer.js +9 -7
- package/lib/module/block-menu-tree-drawer.js.map +1 -1
- package/lib/module/dtmpl-edit-page.d.ts +4 -0
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.js +26 -14
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/module/dtmpl-view-drawer.d.ts +4 -1
- package/lib/module/dtmpl-view-drawer.d.ts.map +1 -1
- package/lib/module/dtmpl-view-drawer.js +10 -9
- package/lib/module/dtmpl-view-drawer.js.map +1 -1
- package/lib/module/ltmpl-drawer.d.ts +5 -1
- package/lib/module/ltmpl-drawer.d.ts.map +1 -1
- package/lib/module/ltmpl-drawer.js +21 -4
- package/lib/module/ltmpl-drawer.js.map +1 -1
- package/lib/module/ltmpl-table.d.ts +2 -0
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/module/ltmpl-table.js +5 -6
- package/lib/module/ltmpl-table.js.map +1 -1
- package/lib/routable/ltmpl-route.d.ts +1 -0
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.js +6 -7
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/lib/routable/splitview-ltmpl-route.d.ts.map +1 -1
- package/lib/routable/splitview-ltmpl-route.js +2 -4
- package/lib/routable/splitview-ltmpl-route.js.map +1 -1
- package/lib/table/act-table.d.ts +2 -0
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +5 -4
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-builder.d.ts +1 -0
- package/lib/table/column/column-builder.d.ts.map +1 -1
- package/lib/table/column/column-builder.js +78 -10
- package/lib/table/column/column-builder.js.map +1 -1
- package/lib/table/column/index.less +30 -2
- package/lib/tmpl/interface.d.ts +3 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/tmpl/web-socket.js +1 -1
- package/lib/tmpl/web-socket.js.map +1 -1
- package/lib/welcome/components/user-menus.d.ts.map +1 -1
- package/lib/welcome/components/user-menus.js +2 -1
- package/lib/welcome/components/user-menus.js.map +1 -1
- package/package.json +3 -4
- package/src/aldehyde/controls/2dEditor/components/component.less +3 -1
- package/src/aldehyde/controls/chemstruc/graph.tsx +32 -32
- package/src/aldehyde/controls/cquery/cquick-button.tsx +7 -7
- package/src/aldehyde/controls/direct-file-view/drawer-file-view.tsx +6 -3
- package/src/aldehyde/controls/entity-select/entity-select.tsx +2 -4
- package/src/aldehyde/controls/entity-select/index.css +5 -3
- package/src/aldehyde/controls/entity-select/popover-entity-select.tsx +12 -9
- package/src/aldehyde/controls/file-view/drawer-file-view.tsx +6 -3
- package/src/aldehyde/controls/qr-code/index.less +2 -1
- package/src/aldehyde/controls/qr-code/index.tsx +1 -1
- package/src/aldehyde/controls/relation-existion/index.css +3 -3
- package/src/aldehyde/controls/relation-existion/index.tsx +1 -1
- package/src/aldehyde/controls/text/ellipsis-text.tsx +4 -2
- package/src/aldehyde/controls/text/index.less +5 -0
- package/src/aldehyde/detail/view/snapshot-timeline.tsx +15 -9
- package/src/aldehyde/layout/menu/l2menu-message-bar.tsx +27 -31
- package/src/aldehyde/layout/menu/l2menu-quick-bar.tsx +25 -33
- package/src/aldehyde/layout2/components/search-menu.tsx +3 -3
- package/src/aldehyde/layout2/components/user-button.tsx +2 -2
- package/src/aldehyde/layout2/page.tsx +1 -1
- package/src/aldehyde/layout2/sider.tsx +21 -20
- package/src/aldehyde/layout3/css/main.less +7 -3
- package/src/aldehyde/layout3/page.tsx +1 -1
- package/src/aldehyde/layout3/sider.tsx +19 -16
- package/src/aldehyde/layout4/css/main.less +7 -3
- package/src/aldehyde/layout4/page.tsx +1 -1
- package/src/aldehyde/layout4/sider.tsx +19 -16
- package/src/aldehyde/layout5/page.tsx +1 -1
- package/src/aldehyde/layout5/sider.tsx +19 -16
- package/src/aldehyde/list/gantt/index.less +1 -0
- package/src/aldehyde/lowcode-components/lowcode-view/index.less +1 -0
- package/src/aldehyde/module/block-menu-tree-drawer.tsx +15 -10
- package/src/aldehyde/module/dtmpl-edit-page.tsx +50 -33
- package/src/aldehyde/module/dtmpl-view-drawer.tsx +12 -12
- package/src/aldehyde/module/ltmpl-drawer.tsx +12 -10
- package/src/aldehyde/module/ltmpl-table.tsx +7 -13
- package/src/aldehyde/routable/ltmpl-route.tsx +8 -10
- package/src/aldehyde/routable/splitview-ltmpl-route.tsx +4 -5
- package/src/aldehyde/table/act-table.tsx +7 -3
- package/src/aldehyde/table/column/column-builder.tsx +134 -26
- package/src/aldehyde/table/column/index.less +30 -2
- package/src/aldehyde/tmpl/interface.tsx +3 -0
- package/src/aldehyde/tmpl/web-socket.ts +1 -1
- package/src/aldehyde/welcome/components/user-menus.tsx +4 -0
|
@@ -15,6 +15,7 @@ interface CquickButtonProps extends ButtonProps {
|
|
|
15
15
|
|
|
16
16
|
interface CquickButtonState {
|
|
17
17
|
showDraw?: boolean;
|
|
18
|
+
drawerSize?: number | string; // 抽屉组件尺寸
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
const outlinedMap = {
|
|
@@ -27,6 +28,7 @@ class CquickButton extends React.PureComponent<
|
|
|
27
28
|
> {
|
|
28
29
|
state = {
|
|
29
30
|
showDraw: false,
|
|
31
|
+
drawerSize: "92vw",
|
|
30
32
|
};
|
|
31
33
|
static contextType = LocaleContext;
|
|
32
34
|
context: React.ContextType<typeof LocaleContext>;
|
|
@@ -57,7 +59,7 @@ class CquickButton extends React.PureComponent<
|
|
|
57
59
|
serverKey,
|
|
58
60
|
...button
|
|
59
61
|
} = this.props;
|
|
60
|
-
const { showDraw } = this.state;
|
|
62
|
+
const { showDraw, drawerSize } = this.state;
|
|
61
63
|
const { translate } = this.context;
|
|
62
64
|
//console.log("cQuery mainCode",mainCode);
|
|
63
65
|
let mcode =
|
|
@@ -109,15 +111,12 @@ class CquickButton extends React.PureComponent<
|
|
|
109
111
|
<Drawer
|
|
110
112
|
placement={"left"}
|
|
111
113
|
title={translate("${关联查询}")}
|
|
114
|
+
size={drawerSize}
|
|
115
|
+
resizable={{ onResize: (newSize => this.setState({ drawerSize: newSize })) }}
|
|
112
116
|
closable={true}
|
|
113
117
|
mask={false}
|
|
114
118
|
onClose={this.closeDrawer}
|
|
115
119
|
open={showDraw}
|
|
116
|
-
width="100%"
|
|
117
|
-
rootStyle={{
|
|
118
|
-
width: "calc(100% - 280px)",
|
|
119
|
-
maxWidth: 1960,
|
|
120
|
-
}}
|
|
121
120
|
extra={
|
|
122
121
|
<Space>
|
|
123
122
|
<Button onClick={this.closeDrawer}>
|
|
@@ -125,6 +124,7 @@ class CquickButton extends React.PureComponent<
|
|
|
125
124
|
</Button>
|
|
126
125
|
</Space>
|
|
127
126
|
}
|
|
127
|
+
styles={{ body: { minWidth: "720px" } }}
|
|
128
128
|
>
|
|
129
129
|
{cQueryConfig.path ? (
|
|
130
130
|
React.createElement(Units.getCustomPage(cQueryConfig.path))
|
|
@@ -133,7 +133,7 @@ class CquickButton extends React.PureComponent<
|
|
|
133
133
|
serverKey={serverKey}
|
|
134
134
|
sourceId={cQueryConfig.id}
|
|
135
135
|
mainCode={mcode}
|
|
136
|
-
|
|
136
|
+
/>
|
|
137
137
|
)}
|
|
138
138
|
</Drawer>
|
|
139
139
|
)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import { Button, Drawer, Space, Spin } from 'antd';
|
|
3
3
|
import { DownloadOutlined, CloseOutlined } from '@ant-design/icons';
|
|
4
4
|
import { CommonFilePath } from "../../tmpl/interface";
|
|
@@ -16,7 +16,8 @@ interface DrawerFileViewProps {
|
|
|
16
16
|
|
|
17
17
|
const Index = (props: DrawerFileViewProps) => {
|
|
18
18
|
const { filePath, downloadable } = props;
|
|
19
|
-
const [drawerOpen, setDrawerOpen] =
|
|
19
|
+
const [drawerOpen, setDrawerOpen] = useState<boolean>(false);
|
|
20
|
+
const [drawerSize, setDrawerSize] = useState<number | string>("1200px");
|
|
20
21
|
|
|
21
22
|
const download = (filePath: CommonFilePath) => {
|
|
22
23
|
Units.downloadFile(filePath.path, filePath.fileName);
|
|
@@ -28,10 +29,12 @@ const Index = (props: DrawerFileViewProps) => {
|
|
|
28
29
|
{drawerOpen ? <Drawer
|
|
29
30
|
title={filePath.fileName}
|
|
30
31
|
placement="left"
|
|
32
|
+
size={drawerSize}
|
|
33
|
+
resizable={{ onResize: (newSize => setDrawerSize(newSize)) }}
|
|
31
34
|
closable={false}
|
|
32
35
|
onClose={() => setDrawerOpen(false)}
|
|
33
|
-
width="1200px"
|
|
34
36
|
open={drawerOpen}
|
|
37
|
+
styles={{ body: { minWidth: "1000px" } }}
|
|
35
38
|
extra={
|
|
36
39
|
<Space>
|
|
37
40
|
{downloadable ? <Button onClick={() => download(filePath)} ><DownloadOutlined /></Button> : null}
|
|
@@ -21,7 +21,6 @@ import HcserviceV3 from "../../tmpl/hcservice-v3";
|
|
|
21
21
|
import HCDataSource from "../../tmpl/hc-data-source";
|
|
22
22
|
import DtmplViewDrawer from "../../module/dtmpl-view-drawer";
|
|
23
23
|
import DtmplEditPage from "../../module/dtmpl-edit-page";
|
|
24
|
-
import { CustomTagProps } from "rc-select/lib/BaseSelect";
|
|
25
24
|
import DtmplCustomEditModalPage from "../../custom-page/dtmpl-custom-edit-modal-page";
|
|
26
25
|
import { LtmplModal } from "../../index";
|
|
27
26
|
import { LocaleContext } from "../../locale/LocaleProvider";
|
|
@@ -549,7 +548,7 @@ export default class EntitySelect extends React.PureComponent<
|
|
|
549
548
|
this.props.onChange(formValues.join("@,@"));
|
|
550
549
|
};
|
|
551
550
|
|
|
552
|
-
tagRender = (props
|
|
551
|
+
tagRender = (props) => {
|
|
553
552
|
const { label, closable, onClose } = props;
|
|
554
553
|
const onPreventMouseDown = (event: React.MouseEvent<HTMLSpanElement>) => {
|
|
555
554
|
event.preventDefault();
|
|
@@ -712,8 +711,7 @@ export default class EntitySelect extends React.PureComponent<
|
|
|
712
711
|
open={useSelectOpenStat ? selectOpen : undefined}
|
|
713
712
|
popupRender={this.dropdownRender}
|
|
714
713
|
tagRender={
|
|
715
|
-
actions
|
|
716
|
-
(actions.indexOf("detail") >= 0 || actions.indexOf("edit") >= 0)
|
|
714
|
+
actions?.some(r => ["detail", "edit"].includes(r))
|
|
717
715
|
? this.tagRender
|
|
718
716
|
: undefined
|
|
719
717
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Button, Popover, Select } from "antd";
|
|
3
|
-
import { EControlProps, SelectedRow } from "../../tmpl/interface";
|
|
3
|
+
import { EControlProps, SelectedRow, DtmplData } from "../../tmpl/interface";
|
|
4
4
|
import { SearchOutlined } from "@ant-design/icons";
|
|
5
5
|
import SelectTable from "../../table/select-table";
|
|
6
6
|
import "./index.css";
|
|
@@ -9,10 +9,12 @@ import { LocaleContext } from "../../locale/LocaleProvider";
|
|
|
9
9
|
interface PopoverEntitySelectProps extends EControlProps {
|
|
10
10
|
maxSelected?: number;
|
|
11
11
|
onEntityClick?: (code: string) => void;
|
|
12
|
+
onChange?: (value: any, selectedDatas?: DtmplData[]) => void;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
interface PopoverEntitySelectState {
|
|
15
16
|
open: boolean;
|
|
17
|
+
selectedDatas: DtmplData[];
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
export default class PopoverEntitySelect extends React.PureComponent<
|
|
@@ -24,7 +26,8 @@ export default class PopoverEntitySelect extends React.PureComponent<
|
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
state = {
|
|
27
|
-
open: false
|
|
29
|
+
open: false,
|
|
30
|
+
selectedDatas: []
|
|
28
31
|
};
|
|
29
32
|
static contextType = LocaleContext;
|
|
30
33
|
context: React.ContextType<typeof LocaleContext>;
|
|
@@ -33,7 +36,7 @@ export default class PopoverEntitySelect extends React.PureComponent<
|
|
|
33
36
|
this.setState({ open: true });
|
|
34
37
|
};
|
|
35
38
|
|
|
36
|
-
onSelect = (selectedRows: SelectedRow[]) => {
|
|
39
|
+
onSelect = (selectedRows: SelectedRow[], selectedDatas: DtmplData[]) => {
|
|
37
40
|
const { value, onChange } = this.props;
|
|
38
41
|
let newValue = [];
|
|
39
42
|
if (selectedRows) {
|
|
@@ -45,7 +48,6 @@ export default class PopoverEntitySelect extends React.PureComponent<
|
|
|
45
48
|
title = row.title;
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
// console.log('1323',title);
|
|
49
51
|
if (row.title && row.title.includes("@R@")) {
|
|
50
52
|
let ts = title.split("@R@");
|
|
51
53
|
title = ts[ts.length - 1];
|
|
@@ -53,8 +55,8 @@ export default class PopoverEntitySelect extends React.PureComponent<
|
|
|
53
55
|
newValue.push(row.code + "@R@" + title);
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
onChange(newValue.join("@,@"), selectedDatas);
|
|
59
|
+
this.setState({ selectedDatas });
|
|
58
60
|
};
|
|
59
61
|
|
|
60
62
|
toArray = (value) => {
|
|
@@ -99,7 +101,7 @@ export default class PopoverEntitySelect extends React.PureComponent<
|
|
|
99
101
|
mainCode,
|
|
100
102
|
serverKey,
|
|
101
103
|
} = this.props;
|
|
102
|
-
const { open } = this.state;
|
|
104
|
+
const { open, selectedDatas } = this.state;
|
|
103
105
|
const { translate } = this.context;
|
|
104
106
|
let selectedRows: SelectedRow[] = [];
|
|
105
107
|
let relationOptions = [];
|
|
@@ -143,7 +145,7 @@ export default class PopoverEntitySelect extends React.PureComponent<
|
|
|
143
145
|
maxWidth: "calc(100vw - 20vw)",
|
|
144
146
|
maxHeight: "calc(100vh - 50px)",
|
|
145
147
|
},
|
|
146
|
-
|
|
148
|
+
container: { padding: 0 }
|
|
147
149
|
}}
|
|
148
150
|
align={{ offset: [20, 0] }}
|
|
149
151
|
content={
|
|
@@ -190,7 +192,8 @@ export default class PopoverEntitySelect extends React.PureComponent<
|
|
|
190
192
|
onChange={(value) => {
|
|
191
193
|
// 关系字段更改选中项
|
|
192
194
|
const selOptions = selectedRows?.filter(r => value.includes(r.code))?.map(r => `${r.code}@R@${r.title}`).join("@,@");
|
|
193
|
-
|
|
195
|
+
const temSelectedDatas = selectedDatas?.filter(r => value.includes(r.code));
|
|
196
|
+
onChange(selOptions || value.join("@,@"), temSelectedDatas);
|
|
194
197
|
}}
|
|
195
198
|
options={relationOptions}
|
|
196
199
|
onClick={this.onClick}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Button, Drawer, Space, Spin } from 'antd';
|
|
3
3
|
import { DownloadOutlined, CloseOutlined } from '@ant-design/icons';
|
|
4
4
|
import loadable from '@loadable/component';
|
|
@@ -21,7 +21,8 @@ interface DrawerFileViewProps {
|
|
|
21
21
|
|
|
22
22
|
const DrawerFileView: React.FC<DrawerFileViewProps> = (props) => {
|
|
23
23
|
const { filePath, serverKey, downloadable = true, contentType } = props;
|
|
24
|
-
const [drawerOpen, setDrawerOpen] =
|
|
24
|
+
const [drawerOpen, setDrawerOpen] = useState<boolean>(false);
|
|
25
|
+
const [drawerSize, setDrawerSize] = useState<number | string>("1200px");
|
|
25
26
|
const containerRef = useRef(null);
|
|
26
27
|
|
|
27
28
|
const loadDocx = async () => {
|
|
@@ -79,10 +80,12 @@ const DrawerFileView: React.FC<DrawerFileViewProps> = (props) => {
|
|
|
79
80
|
<Drawer
|
|
80
81
|
title={filePath.fileName}
|
|
81
82
|
placement={'left'}
|
|
83
|
+
size={drawerSize}
|
|
84
|
+
resizable={{ onResize: (newSize => setDrawerSize(newSize)) }}
|
|
82
85
|
closable={false}
|
|
83
86
|
onClose={onClose}
|
|
84
|
-
width={'1200px'}
|
|
85
87
|
open={drawerOpen}
|
|
88
|
+
styles={{ body: { minWidth: "1000px" } }}
|
|
86
89
|
extra={
|
|
87
90
|
<Space>
|
|
88
91
|
{downloadable ? (
|
|
@@ -31,7 +31,7 @@ const Index: React.FC<Props> = (props) => {
|
|
|
31
31
|
<EyeOutlined />
|
|
32
32
|
{translate("${预览}")}
|
|
33
33
|
</div>
|
|
34
|
-
<Modal getContainer={QRRef.current} style={{ top: `calc(50% - ${previewSize / 2}px)` }} width={previewSize} destroyOnHidden styles={{
|
|
34
|
+
<Modal getContainer={QRRef.current} style={{ top: `calc(50% - ${previewSize / 2}px)` }} width={previewSize} destroyOnHidden styles={{ container: { padding: 0, borderRadius: 0, width: "fit-content" } }} onCancel={() => setPreview(false)} open={preview} footer={null} closable={false}>
|
|
35
35
|
<QRCode size={previewSize} value={value as string} bordered={false} />
|
|
36
36
|
</Modal>
|
|
37
37
|
</div >
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
.ant-popover-
|
|
1
|
+
.ant-popover-inner-content,
|
|
2
|
+
.ant-popover-content {
|
|
3
3
|
padding: 4px;
|
|
4
|
-
}
|
|
4
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import Units from "../../units";
|
|
3
|
-
import {
|
|
3
|
+
import { Popover, Tooltip } from "antd";
|
|
4
4
|
import { LocaleContext } from "../../locale/LocaleProvider";
|
|
5
|
+
import "./index.less";
|
|
5
6
|
|
|
6
7
|
interface EllipsisTextProps {
|
|
7
8
|
isHtml?: boolean;
|
|
@@ -84,7 +85,8 @@ export default class EllipsisText extends React.PureComponent<
|
|
|
84
85
|
<Tooltip placement="top" title={text} >
|
|
85
86
|
<span className="infoStyle" style={style}>
|
|
86
87
|
{text}
|
|
87
|
-
</span
|
|
88
|
+
</span>
|
|
89
|
+
</Tooltip>
|
|
88
90
|
) : (
|
|
89
91
|
<span className="infoStyle" style={style}>
|
|
90
92
|
{this.viewButton(text.substring(0, showMax) + "...")}
|
|
@@ -25,6 +25,8 @@ export interface SnapshotTimelineStat {
|
|
|
25
25
|
pageNo?: number;
|
|
26
26
|
currents?: SnapshotType[];
|
|
27
27
|
isEnd?: boolean;
|
|
28
|
+
rightDrawerSize?: number | string; // 抽屉组件尺寸
|
|
29
|
+
leftDrawerSize?: number | string; // 抽屉组件尺寸
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
class SnapshotTimeline extends React.PureComponent<
|
|
@@ -39,6 +41,8 @@ class SnapshotTimeline extends React.PureComponent<
|
|
|
39
41
|
currents: [],
|
|
40
42
|
pageNo: 1,
|
|
41
43
|
isEnd: false,
|
|
44
|
+
rightDrawerSize: 370,
|
|
45
|
+
leftDrawerSize: "calc(100% - 380px)"
|
|
42
46
|
};
|
|
43
47
|
static contextType = LocaleContext;
|
|
44
48
|
context: React.ContextType<typeof LocaleContext>;
|
|
@@ -163,8 +167,9 @@ class SnapshotTimeline extends React.PureComponent<
|
|
|
163
167
|
code,
|
|
164
168
|
serverKey,
|
|
165
169
|
} = this.props;
|
|
166
|
-
const { list, currents, loading, pageNo, isEnd } = this.state;
|
|
170
|
+
const { list, currents, loading, pageNo, isEnd, rightDrawerSize, leftDrawerSize } = this.state;
|
|
167
171
|
const { translate } = this.context;
|
|
172
|
+
const leftDrawerMaxSize = document.documentElement.clientWidth - 380;
|
|
168
173
|
|
|
169
174
|
let viewDatas: ViewComparData[] = [];
|
|
170
175
|
currents.sort((a, b) => b.time - a.time);
|
|
@@ -179,7 +184,10 @@ class SnapshotTimeline extends React.PureComponent<
|
|
|
179
184
|
closable={true}
|
|
180
185
|
onClose={onClose}
|
|
181
186
|
open={open}
|
|
182
|
-
|
|
187
|
+
resizable={{ onResize: (newSize => this.setState({ rightDrawerSize: newSize })) }}
|
|
188
|
+
size={rightDrawerSize}
|
|
189
|
+
maxSize={370}
|
|
190
|
+
styles={{ body: { minWidth: "300px" } }}
|
|
183
191
|
>
|
|
184
192
|
{loading ? <Skeleton /> :
|
|
185
193
|
list && list.length > 0 ? (
|
|
@@ -196,16 +204,14 @@ class SnapshotTimeline extends React.PureComponent<
|
|
|
196
204
|
<Drawer key={translate("${快照查看}")}
|
|
197
205
|
placement={"left"}
|
|
198
206
|
title={translate("${快照查看}")}
|
|
207
|
+
resizable={{ onResize: (newSize => this.setState({ leftDrawerSize: newSize })) }}
|
|
208
|
+
size={leftDrawerSize}
|
|
209
|
+
maxSize={leftDrawerMaxSize}
|
|
199
210
|
closable={true}
|
|
200
211
|
mask={false}
|
|
201
212
|
onClose={onClose}
|
|
202
213
|
open={open}
|
|
203
|
-
styles={{ body: { padding: "6px 24px 6px 24px" } }}
|
|
204
|
-
width="100%"
|
|
205
|
-
rootStyle={{
|
|
206
|
-
width: "calc(100% - 380px)",
|
|
207
|
-
maxWidth: 1960,
|
|
208
|
-
}}
|
|
214
|
+
styles={{ body: { padding: "6px 24px 6px 24px", minWidth: "1000px" } }}
|
|
209
215
|
>
|
|
210
216
|
{/*<DtmplView*/}
|
|
211
217
|
{/* serverKey={serverKey}*/}
|
|
@@ -215,7 +221,7 @@ class SnapshotTimeline extends React.PureComponent<
|
|
|
215
221
|
{/* code={code}*/}
|
|
216
222
|
{/* versionId={current}*/}
|
|
217
223
|
{/*></DtmplView>*/}
|
|
218
|
-
<ViewComparePanel serverKey={serverKey} dtmplConfig={dtmplConfig} sourceId={sourceId} data={viewDatas}
|
|
224
|
+
<ViewComparePanel serverKey={serverKey} dtmplConfig={dtmplConfig} sourceId={sourceId} data={viewDatas} />
|
|
219
225
|
</Drawer>
|
|
220
226
|
</>
|
|
221
227
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties, useEffect, useState, useRef } from "react";
|
|
2
|
-
import { Badge, Dropdown,
|
|
2
|
+
import { Badge, Dropdown, Button } from "antd";
|
|
3
3
|
import { BellOutlined } from "@ant-design/icons";
|
|
4
|
-
import "antd/dist/reset.css";
|
|
5
4
|
import { Level2Menu } from "../../tmpl/interface";
|
|
6
5
|
import HcserviceV3 from "../../tmpl/hcservice-v3";
|
|
7
6
|
import { NavLink } from "react-router-dom";
|
|
@@ -66,34 +65,31 @@ const Index = (props: L2MenuMessageBarProps) => {
|
|
|
66
65
|
const renderMessageBar = () => {
|
|
67
66
|
let total: number = 0;
|
|
68
67
|
const syyy: CSSProperties = { "--message-bar-backgroupd": backgroudColor } as CSSProperties;
|
|
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
|
-
</Menu>
|
|
96
|
-
);
|
|
68
|
+
|
|
69
|
+
const menu = messageBars.map((messageBar, index) => {
|
|
70
|
+
if (messageBar.count) {
|
|
71
|
+
total = total + messageBar.count;
|
|
72
|
+
}
|
|
73
|
+
let defaultCriteriaData = "";
|
|
74
|
+
if (messageBar.l2Menu.defaultCriteriaValue) {
|
|
75
|
+
defaultCriteriaData = "&" + Units.transQueryParamsToStr(messageBar.l2Menu.defaultCriteriaValue);
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
key: index,
|
|
79
|
+
label: <NavLink
|
|
80
|
+
to={`/${version}/${messageBar.l2Menu.id}/act-table?menuId=${messageBar.l2Menu.id}${defaultCriteriaData}`}
|
|
81
|
+
>
|
|
82
|
+
{messageBar.l2Menu.title}
|
|
83
|
+
<Badge
|
|
84
|
+
count={messageBar.count}
|
|
85
|
+
overflowCount={99}
|
|
86
|
+
offset={[2, -2]}
|
|
87
|
+
size="small"
|
|
88
|
+
/>
|
|
89
|
+
</NavLink>
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
|
|
97
93
|
if (!messageBars?.length) {
|
|
98
94
|
return;
|
|
99
95
|
}
|
|
@@ -135,7 +131,7 @@ const Index = (props: L2MenuMessageBarProps) => {
|
|
|
135
131
|
);
|
|
136
132
|
} else {
|
|
137
133
|
return (
|
|
138
|
-
<Dropdown
|
|
134
|
+
<Dropdown menu={{ items: menu }} placement="bottomCenter">
|
|
139
135
|
<div style={syyy}>
|
|
140
136
|
<Badge size="small" count={total} overflowCount={99} offset={[6, -2]} className="ripple-dot">
|
|
141
137
|
<Button
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties } from "react";
|
|
2
|
-
import { Dropdown,
|
|
2
|
+
import { Dropdown, Drawer, Space, Button } from "antd";
|
|
3
3
|
import { AppstoreOutlined } from "@ant-design/icons";
|
|
4
|
-
import "antd/dist/reset.css";
|
|
5
4
|
import { Level2Menu } from "../../tmpl/interface";
|
|
6
5
|
import HCDataSource from "../../tmpl/hc-data-source";
|
|
7
6
|
import LtmplTable from "../../module/ltmpl-table";
|
|
@@ -23,6 +22,7 @@ interface L2MenuQuickBarState {
|
|
|
23
22
|
anyState?: boolean;
|
|
24
23
|
currentId?: string;
|
|
25
24
|
showDraw?: boolean;
|
|
25
|
+
drawerSize?: number | string; // 抽屉组件尺寸
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
class L2MenuQuickBar extends React.PureComponent<
|
|
@@ -34,6 +34,7 @@ class L2MenuQuickBar extends React.PureComponent<
|
|
|
34
34
|
anyState: false,
|
|
35
35
|
currentId: undefined,
|
|
36
36
|
showDraw: false,
|
|
37
|
+
drawerSize: "92vw",
|
|
37
38
|
};
|
|
38
39
|
static defaultProps = {
|
|
39
40
|
backgroudColor: "#4a5f74",
|
|
@@ -80,29 +81,22 @@ class L2MenuQuickBar extends React.PureComponent<
|
|
|
80
81
|
const { backgroudColor, style = {} } = this.props;
|
|
81
82
|
const { translate } = this.context;
|
|
82
83
|
let total: number = 0;
|
|
83
|
-
const syyy: CSSProperties = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</Space>
|
|
100
|
-
</span>
|
|
101
|
-
</Menu.Item>
|
|
102
|
-
);
|
|
103
|
-
})}
|
|
104
|
-
</Menu>
|
|
105
|
-
);
|
|
84
|
+
const syyy: CSSProperties = { "--message-bar-backgroupd": backgroudColor } as CSSProperties;
|
|
85
|
+
const menu = quickBars.map((quickBar, index) => {
|
|
86
|
+
if (quickBar.count) {
|
|
87
|
+
total = total + quickBar.count;
|
|
88
|
+
}
|
|
89
|
+
const renderIcon = quickBar.l2Menu.icon ? <IconFont type={quickBar.l2Menu.icon} /> : "";
|
|
90
|
+
return {
|
|
91
|
+
key: index,
|
|
92
|
+
label: <span onClick={() => this.showDraw(quickBar.l2Menu.id)}>
|
|
93
|
+
<Space>
|
|
94
|
+
{renderIcon}
|
|
95
|
+
{translate("${" + quickBar.l2Menu.title + "}")}
|
|
96
|
+
</Space>
|
|
97
|
+
</span>
|
|
98
|
+
};
|
|
99
|
+
});
|
|
106
100
|
|
|
107
101
|
if (!quickBars || quickBars.length == 0) {
|
|
108
102
|
return;
|
|
@@ -128,7 +122,7 @@ class L2MenuQuickBar extends React.PureComponent<
|
|
|
128
122
|
);
|
|
129
123
|
} else {
|
|
130
124
|
return (
|
|
131
|
-
<Dropdown
|
|
125
|
+
<Dropdown menu={{ items: menu }} placement="bottomCenter">
|
|
132
126
|
<Button
|
|
133
127
|
icon={<AppstoreOutlined />}
|
|
134
128
|
shape="default"
|
|
@@ -150,7 +144,7 @@ class L2MenuQuickBar extends React.PureComponent<
|
|
|
150
144
|
};
|
|
151
145
|
|
|
152
146
|
render() {
|
|
153
|
-
const { quickBars, showDraw, currentId } = this.state;
|
|
147
|
+
const { quickBars, showDraw, currentId, drawerSize } = this.state;
|
|
154
148
|
const { translate } = this.context;
|
|
155
149
|
return (
|
|
156
150
|
<>
|
|
@@ -158,22 +152,20 @@ class L2MenuQuickBar extends React.PureComponent<
|
|
|
158
152
|
<Drawer
|
|
159
153
|
placement={"left"}
|
|
160
154
|
title={translate("${快捷查询}")}
|
|
155
|
+
size={drawerSize}
|
|
156
|
+
resizable={{ onResize: (newSize => this.setState({ drawerSize: newSize })) }}
|
|
161
157
|
closable={true}
|
|
162
158
|
mask={false}
|
|
163
159
|
onClose={this.closeDrawer}
|
|
164
160
|
open={showDraw}
|
|
165
|
-
width="100%"
|
|
166
|
-
rootStyle={{
|
|
167
|
-
width: "calc(100% - 280px)",
|
|
168
|
-
maxWidth: 1960,
|
|
169
|
-
}}
|
|
170
161
|
extra={
|
|
171
162
|
<Space>
|
|
172
163
|
<Button onClick={this.closeDrawer}>关闭</Button>
|
|
173
164
|
</Space>
|
|
174
165
|
}
|
|
166
|
+
styles={{ body: { minWidth: "720px" } }}
|
|
175
167
|
>
|
|
176
|
-
<LtmplTable serverKey={null} sourceId={currentId}
|
|
168
|
+
<LtmplTable serverKey={null} sourceId={currentId} />
|
|
177
169
|
</Drawer>
|
|
178
170
|
</>
|
|
179
171
|
);
|
|
@@ -25,7 +25,7 @@ interface Props extends ButtonProps {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const Index = (props: Props) => {
|
|
28
|
-
const { menuList } = props;
|
|
28
|
+
const { menuList, ...otherProps } = props;
|
|
29
29
|
const { translate, getLocale } = useLocale();
|
|
30
30
|
const [menu, setMenu] = useState<MenuType[]>([]);
|
|
31
31
|
const [searchValue, setSearchValue] = useState<string>();
|
|
@@ -67,7 +67,7 @@ const Index = (props: Props) => {
|
|
|
67
67
|
/>;
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
|
-
<Popover placement="bottom" trigger="click" content={renderMenu} styles={{
|
|
70
|
+
<Popover placement="bottom" trigger="click" content={renderMenu} styles={{ container: { padding: 2 } }} destroyOnHidden onOpenChange={(val) => val && setSelectInit(true)}>
|
|
71
71
|
<Button type="link" icon={<SearchOutlined />} shape="default" size="large"
|
|
72
72
|
style={{
|
|
73
73
|
width: "100%",
|
|
@@ -76,7 +76,7 @@ const Index = (props: Props) => {
|
|
|
76
76
|
padding: 0,
|
|
77
77
|
borderRadius: 0,
|
|
78
78
|
color: "#fff",
|
|
79
|
-
}} {...
|
|
79
|
+
}} {...otherProps}
|
|
80
80
|
/>
|
|
81
81
|
</Popover>
|
|
82
82
|
);
|
|
@@ -39,7 +39,7 @@ interface Props extends ButtonProps {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const UserButton: React.FC<Props> = (props) => {
|
|
42
|
-
const { logoutUrl = "/login2", customRender, layoutRootPath = "v2", themeConfig } = props;
|
|
42
|
+
const { logoutUrl = "/login2", customRender, layoutRootPath = "v2", themeConfig, ...otherProps } = props;
|
|
43
43
|
// translate
|
|
44
44
|
const { translate, changeSiderCollapsed, getSiderCollapsed, compactTheme, changeCompactTheme } = useLocale();
|
|
45
45
|
const [keepAliveTabs, setKeepAliveTabs] = useSessionStorageState<KeepAliveTab[]>('keepAliveTabs', {
|
|
@@ -246,7 +246,7 @@ const UserButton: React.FC<Props> = (props) => {
|
|
|
246
246
|
borderRadius: 0,
|
|
247
247
|
color: "#fff",
|
|
248
248
|
}}
|
|
249
|
-
{...
|
|
249
|
+
{...otherProps}
|
|
250
250
|
>
|
|
251
251
|
{isLogin ? userConfig?.name : translate("${请登录}")}
|
|
252
252
|
</Button>
|