aldehyde 0.1.86 → 0.2.2
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/LICENSE +2 -2
- package/README.md +2 -1
- package/lib/controls/action/index.d.ts +2 -2
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/action/index.js +6 -6
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/chemstruc/graph.d.ts +2 -2
- package/lib/controls/chemstruc/graph.d.ts.map +1 -1
- package/lib/controls/chemstruc/graph.js +5 -5
- package/lib/controls/chemstruc/graph.js.map +1 -1
- package/lib/controls/chemstruc/index.css +28 -28
- package/lib/controls/color-picker/index.d.ts.map +1 -1
- package/lib/controls/color-picker/index.js +2 -3
- package/lib/controls/color-picker/index.js.map +1 -1
- package/lib/controls/cquery/cquick-button.js +2 -2
- package/lib/controls/cquery/cquick-button.js.map +1 -1
- package/lib/controls/date-picker/index.js +17 -17
- package/lib/controls/date-picker/index.js.map +1 -1
- package/lib/controls/entity-select/index.css +6 -6
- 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/drawer-file-view.js +5 -5
- package/lib/controls/file-view/drawer-file-view.js.map +1 -1
- package/lib/controls/html-editor/tinymce.d.ts +0 -5
- package/lib/controls/html-editor/tinymce.d.ts.map +1 -1
- package/lib/controls/password-setter/index.d.ts +0 -1
- package/lib/controls/password-setter/index.d.ts.map +1 -1
- package/lib/controls/password-setter/index.js +1 -1
- package/lib/controls/password-setter/index.js.map +1 -1
- package/lib/controls/relation-existion/index.css +4 -4
- package/lib/controls/rfield/index.css +4 -4
- package/lib/controls/rfield/index.js +1 -1
- package/lib/controls/rfield/index.js.map +1 -1
- package/lib/controls/signature/index.d.ts +2 -2
- package/lib/controls/signature/index.d.ts.map +1 -1
- package/lib/controls/signature/index.js +5 -5
- package/lib/controls/signature/index.js.map +1 -1
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +2 -4
- package/lib/controls/view-control.js.map +1 -1
- package/lib/custom-page/def-custom-page.d.ts +0 -1
- package/lib/custom-page/def-custom-page.d.ts.map +1 -1
- package/lib/detail/edit/dtmpl-edit-page.d.ts +1 -1
- package/lib/detail/edit/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/detail/edit/dtmpl-edit-page.js +8 -8
- package/lib/detail/edit/dtmpl-edit-page.js.map +1 -1
- package/lib/detail/edit/dtmpl-edit.js +1 -1
- package/lib/detail/edit/dtmpl-edit.js.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/modal-row-edit.js +2 -2
- package/lib/detail/edit/modal-row-edit.js.map +1 -1
- package/lib/detail/edit/post-result/index.d.ts +1 -1
- package/lib/detail/edit/post-result/index.d.ts.map +1 -1
- package/lib/detail/edit/post-result/index.js +2 -2
- package/lib/detail/edit/post-result/index.js.map +1 -1
- package/lib/detail/edit/row-editor.d.ts +2 -2
- package/lib/detail/edit/row-editor.d.ts.map +1 -1
- package/lib/detail/edit/row-editor.js +6 -6
- package/lib/detail/edit/row-editor.js.map +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts +2 -2
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +5 -5
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/detail/view/dtmpl-view.d.ts +1 -1
- package/lib/detail/view/dtmpl-view.js +2 -2
- package/lib/detail/view/dtmpl-view.js.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.d.ts +2 -1
- package/lib/detail/view/modal-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.js +3 -3
- package/lib/detail/view/modal-dtmpl-view.js.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/detail/view/snapshot-timeline.js +5 -5
- package/lib/detail/view/snapshot-timeline.js.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/criteria-form.js +4 -4
- package/lib/form/criteria-form.js.map +1 -1
- package/lib/form/form-Item-group.d.ts +0 -1
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/form/form-Item-group.js +0 -1
- package/lib/form/form-Item-group.js.map +1 -1
- package/lib/import/excel-import.d.ts +3 -3
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/import/excel-import.js +6 -6
- package/lib/import/excel-import.js.map +1 -1
- package/lib/import/template-builder.d.ts +0 -8
- package/lib/import/template-builder.d.ts.map +1 -1
- package/lib/import/template-builder.js +1 -1
- package/lib/import/template-builder.js.map +1 -1
- package/lib/layout/footer/index.d.ts +0 -1
- package/lib/layout/footer/index.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts +1 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.js +1 -1
- package/lib/layout/menu/l2menu-message-bar.js.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts +1 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.js +2 -2
- package/lib/layout/menu/l2menu-quick-bar.js.map +1 -1
- package/lib/layout/menu/reset-password.d.ts +1 -1
- package/lib/layout/menu/reset-password.d.ts.map +1 -1
- package/lib/layout/menu/reset-password.js +2 -2
- package/lib/layout/menu/reset-password.js.map +1 -1
- package/lib/layout/menu/userinfo-bar.js +1 -1
- package/lib/layout/menu/userinfo-bar.js.map +1 -1
- package/lib/login/login-context.d.ts +0 -11
- package/lib/login/login-context.d.ts.map +1 -1
- package/lib/login/login.d.ts +0 -10
- package/lib/login/login.d.ts.map +1 -1
- package/lib/module/dtmpl-view-page.js +1 -1
- package/lib/module/dtmpl-view-page.js.map +1 -1
- package/lib/module/ltmpl-page.js +3 -3
- package/lib/module/ltmpl-page.js.map +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +1 -4
- package/lib/table/act-table.js.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/modal-select-table.js +7 -7
- package/lib/table/modal-select-table.js.map +1 -1
- package/lib/table/relation-table.js +3 -3
- package/lib/table/relation-table.js.map +1 -1
- package/lib/table/select-table.js +1 -1
- package/lib/table/select-table.js.map +1 -1
- package/lib/table/stat/restat.d.ts +2 -2
- package/lib/table/stat/restat.d.ts.map +1 -1
- package/lib/table/stat/restat.js +5 -5
- package/lib/table/stat/restat.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +4 -3
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/superagent.js +2 -2
- package/lib/tmpl/superagent.js.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.d.ts.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.js +15 -14
- package/lib/tmpl/tmpl-config-analysis.js.map +1 -1
- package/lib/units/index.d.ts +1 -1
- package/lib/units/index.js +3 -3
- package/lib/units/index.js.map +1 -1
- package/lib/welcome/HCWelcome.d.ts +0 -4
- package/lib/welcome/HCWelcome.d.ts.map +1 -1
- package/lib/welcome/quick-entrance.d.ts +1 -1
- package/lib/welcome/quick-entrance.d.ts.map +1 -1
- package/lib/welcome/quick-entrance.js +1 -1
- package/lib/welcome/quick-entrance.js.map +1 -1
- package/lib/welcome/workbench.d.ts +1 -1
- package/lib/welcome/workbench.d.ts.map +1 -1
- package/lib/welcome/workbench.js +1 -1
- package/lib/welcome/workbench.js.map +1 -1
- package/package.json +31 -33
- package/src/aldehyde/controls/action/index.tsx +8 -8
- package/src/aldehyde/controls/chemstruc/graph.tsx +6 -6
- package/src/aldehyde/controls/chemstruc/index.css +28 -28
- package/src/aldehyde/controls/color-picker/index.tsx +2 -5
- package/src/aldehyde/controls/cquery/cquick-button.tsx +2 -2
- package/src/aldehyde/controls/date-picker/index.tsx +20 -20
- package/src/aldehyde/controls/entity-select/index.css +6 -6
- package/src/aldehyde/controls/file-view/drawer-file-view.tsx +7 -7
- package/src/aldehyde/controls/password-setter/index.js +1 -1
- package/src/aldehyde/controls/relation-existion/index.css +4 -4
- package/src/aldehyde/controls/rfield/index.css +4 -4
- package/src/aldehyde/controls/rfield/index.tsx +1 -1
- package/src/aldehyde/controls/signature/index.tsx +6 -6
- package/src/aldehyde/controls/view-control.tsx +3 -4
- package/src/aldehyde/detail/edit/dtmpl-edit-page.tsx +9 -9
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +1 -1
- package/src/aldehyde/detail/edit/modal-row-edit.tsx +3 -3
- package/src/aldehyde/detail/edit/post-result/index.tsx +3 -3
- package/src/aldehyde/detail/edit/row-editor.tsx +7 -7
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +6 -6
- package/src/aldehyde/detail/view/dtmpl-view.tsx +2 -2
- package/src/aldehyde/detail/view/modal-dtmpl-view.tsx +4 -3
- package/src/aldehyde/detail/view/snapshot-timeline.tsx +6 -6
- package/src/aldehyde/form/criteria-form.tsx +5 -5
- package/src/aldehyde/form/form-Item-group.tsx +0 -2
- package/src/aldehyde/import/excel-import.tsx +8 -9
- package/src/aldehyde/import/template-builder.js +1 -1
- package/src/aldehyde/layout/menu/l2menu-message-bar.tsx +1 -1
- package/src/aldehyde/layout/menu/l2menu-quick-bar.tsx +2 -2
- package/src/aldehyde/layout/menu/reset-password.tsx +2 -2
- package/src/aldehyde/layout/menu/userinfo-bar.tsx +1 -1
- package/src/aldehyde/module/criteria-page.tsx1 +2 -2
- package/src/aldehyde/module/dtmpl-view-page.tsx +1 -1
- package/src/aldehyde/module/ltmpl-page.tsx +3 -3
- package/src/aldehyde/table/act-table.tsx +8 -9
- package/src/aldehyde/table/modal-select-table.tsx +8 -8
- package/src/aldehyde/table/relation-table.tsx +4 -4
- package/src/aldehyde/table/select-table.tsx +1 -1
- package/src/aldehyde/table/stat/restat.tsx +6 -6
- package/src/aldehyde/tmpl/hcservice-v3.tsx +4 -3
- package/src/aldehyde/tmpl/superagent.js +2 -2
- package/src/aldehyde/tmpl/tmpl-config-analysis.tsx +15 -14
- package/src/aldehyde/units/index.tsx +3 -3
- package/src/aldehyde/welcome/quick-entrance.tsx +1 -1
- package/src/aldehyde/welcome/workbench.tsx +1 -1
- package/lib/chart/antd/Chart.d.ts +0 -10
- package/lib/chart/antd/Chart.d.ts.map +0 -1
- package/lib/chart/antd/Chart.js +0 -31
- package/lib/chart/antd/Chart.js.map +0 -1
- package/lib/chart/antd/Max2DimLineChart.d.ts +0 -15
- package/lib/chart/antd/Max2DimLineChart.d.ts.map +0 -1
- package/lib/chart/antd/Max2DimLineChart.js +0 -126
- package/lib/chart/antd/Max2DimLineChart.js.map +0 -1
- package/lib/chart/antd/chart-utils.d.ts +0 -7
- package/lib/chart/antd/chart-utils.d.ts.map +0 -1
- package/lib/chart/antd/chart-utils.js +0 -46
- package/lib/chart/antd/chart-utils.js.map +0 -1
- package/lib/chart/antd/column-chart-sub.d.ts +0 -7
- package/lib/chart/antd/column-chart-sub.d.ts.map +0 -1
- package/lib/chart/antd/column-chart-sub.js +0 -50
- package/lib/chart/antd/column-chart-sub.js.map +0 -1
- package/lib/chart/antd/line-chart-sub.d.ts +0 -7
- package/lib/chart/antd/line-chart-sub.d.ts.map +0 -1
- package/lib/chart/antd/line-chart-sub.js +0 -49
- package/lib/chart/antd/line-chart-sub.js.map +0 -1
- package/lib/chart/antd/pie-chart-sub.d.ts +0 -7
- package/lib/chart/antd/pie-chart-sub.d.ts.map +0 -1
- package/lib/chart/antd/pie-chart-sub.js +0 -37
- package/lib/chart/antd/pie-chart-sub.js.map +0 -1
- package/lib/chart/antd/statview-d2-chart.d.ts +0 -17
- package/lib/chart/antd/statview-d2-chart.d.ts.map +0 -1
- package/lib/chart/antd/statview-d2-chart.js +0 -108
- package/lib/chart/antd/statview-d2-chart.js.map +0 -1
- package/lib/chart/statview-l2-chart.d.ts +0 -23
- package/lib/chart/statview-l2-chart.d.ts.map +0 -1
- package/lib/chart/statview-l2-chart.js +0 -64
- package/lib/chart/statview-l2-chart.js.map +0 -1
- package/src/aldehyde/chart/antd/Chart.js +0 -31
- package/src/aldehyde/chart/antd/Max2DimLineChart.js +0 -127
- package/src/aldehyde/chart/antd/chart-utils.tsx +0 -50
- package/src/aldehyde/chart/antd/column-chart-sub.tsx +0 -77
- package/src/aldehyde/chart/antd/line-chart-sub.tsx +0 -75
- package/src/aldehyde/chart/antd/pie-chart-sub.tsx +0 -65
- package/src/aldehyde/chart/antd/statview-d2-chart.tsx +0 -125
- package/src/aldehyde/chart/statview-l2-chart.tsx +0 -69
|
@@ -185,7 +185,7 @@ class LtmplPage extends React.PureComponent<LtmplPageProps, LtmplPageState> {
|
|
|
185
185
|
sourceId={sourceId} criteriaData={criteriaData}
|
|
186
186
|
ltmplConfig={ltmplConfigRes.ltmplConfig} />
|
|
187
187
|
{buttons.includes('detail') ?
|
|
188
|
-
<ModalDtmplView
|
|
188
|
+
<ModalDtmplView open={showDtmplView} onCancel={()=>{
|
|
189
189
|
this.setState({
|
|
190
190
|
showDtmplView:false,
|
|
191
191
|
})}
|
|
@@ -193,7 +193,7 @@ class LtmplPage extends React.PureComponent<LtmplPageProps, LtmplPageState> {
|
|
|
193
193
|
sourceId={sourceId}
|
|
194
194
|
code={selectedCode}> </ModalDtmplView> : ""}
|
|
195
195
|
{buttons.includes('dtmplEdit') || buttons.includes('dtmplAdd') ?
|
|
196
|
-
<DtmplEditPage
|
|
196
|
+
<DtmplEditPage open={showDtmplEdit} onCancel={()=>{
|
|
197
197
|
this.setState({
|
|
198
198
|
showDtmplEdit:false,
|
|
199
199
|
})}}
|
|
@@ -208,7 +208,7 @@ class LtmplPage extends React.PureComponent<LtmplPageProps, LtmplPageState> {
|
|
|
208
208
|
closable={true}
|
|
209
209
|
mask={false}
|
|
210
210
|
onClose={this.closeDrawer}
|
|
211
|
-
|
|
211
|
+
open={showDraw}
|
|
212
212
|
width={'calc(100% - 280px)'}
|
|
213
213
|
style={{
|
|
214
214
|
maxWidth: 1960,
|
|
@@ -43,7 +43,7 @@ import ColumnSelector from './column/column-selector';
|
|
|
43
43
|
import ExportFrame from '../exportor/export-frame';
|
|
44
44
|
import {SortableHandle} from 'react-sortable-hoc';
|
|
45
45
|
import L2ActTable from "./l2-act-table";
|
|
46
|
-
import StatViewL2Chart from '../chart/statview-l2-chart'
|
|
46
|
+
//import StatViewL2Chart from '../chart/statview-l2-chart'
|
|
47
47
|
import Action from '../controls/action'
|
|
48
48
|
import Restat from "./stat/restat"
|
|
49
49
|
import ActionUtils from '../controls/action/utils'
|
|
@@ -90,7 +90,6 @@ interface ActTableStat {
|
|
|
90
90
|
viewModels?: ActTableViewModel[];
|
|
91
91
|
showL2ActTable: boolean;
|
|
92
92
|
showL2Chart: boolean;
|
|
93
|
-
// drillingPopoverVisible:boolean;
|
|
94
93
|
};
|
|
95
94
|
|
|
96
95
|
class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
@@ -110,7 +109,6 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
110
109
|
disabledColIds: undefined,
|
|
111
110
|
showL2ActTable: false,
|
|
112
111
|
showL2Chart: false,
|
|
113
|
-
//drillingPopoverVisible:false,
|
|
114
112
|
}
|
|
115
113
|
|
|
116
114
|
static defaultProps = {
|
|
@@ -689,12 +687,13 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
689
687
|
}
|
|
690
688
|
return (
|
|
691
689
|
<>
|
|
692
|
-
{
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
}
|
|
690
|
+
{/*暂时不支持L2chart 后续用echart*/}
|
|
691
|
+
{/*{buttons.includes("showChart") && showL2Chart ? <div>*/}
|
|
692
|
+
{/* <StatViewL2Chart queryKey={queryKey.key} ltmplConfig={ltmplConfig} hiddenColIds={hiddenColIds}*/}
|
|
693
|
+
{/* hiddenRowCodes={hiddenRowCodes}/>*/}
|
|
694
|
+
{/* /!*<Divider dashed style={{borderTopColor: "#40a9ff",}} plain></Divider>*!/*/}
|
|
695
|
+
{/*</div> : ""*/}
|
|
696
|
+
{/*}*/}
|
|
698
697
|
{buttons.includes("analysis") && showL2ActTable ? <div>
|
|
699
698
|
<L2ActTable innerQueryKey={queryKey.key} sourceId={sourceId}/>
|
|
700
699
|
<Divider dashed style={{borderTopColor: "#40a9ff",}} plain></Divider>
|
|
@@ -13,7 +13,7 @@ import SelectedRowsCard from './selected-rows-card'
|
|
|
13
13
|
|
|
14
14
|
interface ModelSelectTableProps {
|
|
15
15
|
maxSelectedRows: number,
|
|
16
|
-
|
|
16
|
+
open: boolean,
|
|
17
17
|
sourceId: string,
|
|
18
18
|
mainCode:string,
|
|
19
19
|
exceptCodes?: string[],
|
|
@@ -66,8 +66,8 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
async componentDidMount() {
|
|
69
|
-
const { sourceId,
|
|
70
|
-
if (sourceId &&
|
|
69
|
+
const { sourceId, open} = this.props;
|
|
70
|
+
if (sourceId && open) {
|
|
71
71
|
await this.loadData(await this.loadConfig(), {});
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -119,11 +119,11 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
async componentDidUpdate(prevProps) {
|
|
122
|
-
const {exceptCodes,
|
|
122
|
+
const {exceptCodes, open} = this.props;
|
|
123
123
|
const {selectConfig, criteriaData, queryKey, loading} = this.state;
|
|
124
|
-
const {exceptCodes: preExceptCodes,
|
|
124
|
+
const {exceptCodes: preExceptCodes, open: preOpen} = prevProps;
|
|
125
125
|
let config = selectConfig;
|
|
126
|
-
if (
|
|
126
|
+
if (open) {
|
|
127
127
|
if (!config) {
|
|
128
128
|
config = await this.loadConfig();
|
|
129
129
|
}
|
|
@@ -205,7 +205,7 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
205
205
|
|
|
206
206
|
|
|
207
207
|
render() {
|
|
208
|
-
let {
|
|
208
|
+
let {open, maxSelectedRows} = this.props;
|
|
209
209
|
let {queryKey, columns, selectConfig, criteriaData, loading, selectedRows} = this.state;
|
|
210
210
|
|
|
211
211
|
if (!selectConfig) {
|
|
@@ -223,7 +223,7 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
223
223
|
|
|
224
224
|
return (
|
|
225
225
|
<Modal
|
|
226
|
-
|
|
226
|
+
open={open}
|
|
227
227
|
title={<SelectedRowsCard value={selectedRows} onChange={this.changeRowSelection}></SelectedRowsCard>}
|
|
228
228
|
style={{maxWidth: 'calc(100vw - 60px)', maxHeight: 'calc(100vh - 50px)'}}
|
|
229
229
|
width={'1250px'}
|
|
@@ -559,22 +559,22 @@ class RelationTable extends React.PureComponent<RelationTableProps, RelationTabl
|
|
|
559
559
|
</div>
|
|
560
560
|
</CollapseCard>
|
|
561
561
|
{buttons.includes('detail') ?
|
|
562
|
-
<ModalDtmplView mainCode={mainCode1}
|
|
562
|
+
<ModalDtmplView mainCode={mainCode1} open={showDtmplView} onCancel={this.hiddenEntityView}
|
|
563
563
|
sourceId={fieldGroupConfig.id}
|
|
564
564
|
code={selectedCode}> </ModalDtmplView> : ""}
|
|
565
565
|
{buttons.includes('dtmplEdit') || buttons.includes('dtmplAdd') ?
|
|
566
|
-
<DtmplEditPage mainCode={mainCode1}
|
|
566
|
+
<DtmplEditPage mainCode={mainCode1} open={showDtmplEdit} onCancel={this.hiddenEntityEdit}
|
|
567
567
|
sourceId={fieldGroupConfig.id}
|
|
568
568
|
code={selectedCode}
|
|
569
569
|
onOk={selectedCode ? this.handleDtmplEdit : this.handleDtmplAdd} />
|
|
570
570
|
: ""}
|
|
571
571
|
{/*{buttons.includes('rowEdit') || buttons.includes('rowAdd') ?*/}
|
|
572
|
-
{/* <ModalRowEdit
|
|
572
|
+
{/* <ModalRowEdit open={showRowEdit} onCancel={this.hiddenRowEdit}*/}
|
|
573
573
|
{/* onOk={this.handleRowEdit} dtmplData={selectedDtmplData}*/}
|
|
574
574
|
{/* fieldGroupConfig={fieldGroupConfig}> </ModalRowEdit>*/}
|
|
575
575
|
{/* : ""}*/}
|
|
576
576
|
{buttons.includes('selectAdd') ?
|
|
577
|
-
<ModelSelectTable maxSelectedRows={fieldGroupConfig.max}
|
|
577
|
+
<ModelSelectTable maxSelectedRows={fieldGroupConfig.max} open={showSelectTable}
|
|
578
578
|
onOK={this.select} onCancel={() => {
|
|
579
579
|
this.setState({showSelectTable: false})
|
|
580
580
|
}} exceptCodes={exceptCodes} mainCode={mainCode1}
|
|
@@ -118,7 +118,7 @@ class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat>
|
|
|
118
118
|
async componentDidUpdate(prevProps) {
|
|
119
119
|
const {} = this.props;
|
|
120
120
|
const {selectConfig, criteriaData, queryKey, loading} = this.state;
|
|
121
|
-
const {exceptCodes: preExceptCodes,
|
|
121
|
+
const {exceptCodes: preExceptCodes, open: preOpen} = prevProps;
|
|
122
122
|
let config = selectConfig;
|
|
123
123
|
//if (visible) {
|
|
124
124
|
if (!config) {
|
|
@@ -13,7 +13,7 @@ interface RestatProps {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
interface RestatStat {
|
|
16
|
-
|
|
16
|
+
popoverOpen: boolean;
|
|
17
17
|
loading:boolean,
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ class Restat extends React.PureComponent<RestatProps, RestatStat> {
|
|
|
21
21
|
|
|
22
22
|
static defaultProps = {}
|
|
23
23
|
state = {
|
|
24
|
-
|
|
24
|
+
popoverOpen: false,
|
|
25
25
|
loading:false,
|
|
26
26
|
}
|
|
27
27
|
formRef = React.createRef<FormInstance>();
|
|
@@ -38,9 +38,9 @@ class Restat extends React.PureComponent<RestatProps, RestatStat> {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
render() {
|
|
41
|
-
const {
|
|
41
|
+
const {popoverOpen,loading} = this.state;
|
|
42
42
|
const {fields, value} = this.props;
|
|
43
|
-
return <Popover
|
|
43
|
+
return <Popover open={popoverOpen}
|
|
44
44
|
content={
|
|
45
45
|
<Card loading={loading}
|
|
46
46
|
style={{width: 1000}}
|
|
@@ -54,7 +54,7 @@ class Restat extends React.PureComponent<RestatProps, RestatStat> {
|
|
|
54
54
|
>确定</Button>
|
|
55
55
|
}
|
|
56
56
|
{<Button onClick={() => {
|
|
57
|
-
this.setState({
|
|
57
|
+
this.setState({popoverOpen: false});
|
|
58
58
|
}}><CloseOutlined/></Button>
|
|
59
59
|
}
|
|
60
60
|
</Space></>}
|
|
@@ -68,7 +68,7 @@ class Restat extends React.PureComponent<RestatProps, RestatStat> {
|
|
|
68
68
|
placement="bottomLeft"
|
|
69
69
|
trigger="click">
|
|
70
70
|
<Tooltip title={'重新统计'}><Button onClick={() => {
|
|
71
|
-
this.setState({
|
|
71
|
+
this.setState({popoverOpen: !popoverOpen});
|
|
72
72
|
}}>
|
|
73
73
|
<CalculatorOutlined/>
|
|
74
74
|
</Button></Tooltip>
|
|
@@ -2,7 +2,8 @@ import Units from '../units'
|
|
|
2
2
|
import Super from "./superagent";
|
|
3
3
|
import {message} from 'antd'
|
|
4
4
|
import EncryptUtils from '../units/EncryptUtils'
|
|
5
|
-
import moment from 'moment';
|
|
5
|
+
// import moment from 'moment';
|
|
6
|
+
import format from 'dayjs';
|
|
6
7
|
import { PageInfo,SelectedRow} from "./interface";
|
|
7
8
|
import HCDataSource from "./hc-data-source";
|
|
8
9
|
|
|
@@ -162,7 +163,7 @@ export default class HcserviceV3 {
|
|
|
162
163
|
|
|
163
164
|
static async requestSelectedData(sourceId, codes) {
|
|
164
165
|
if (!codes) {
|
|
165
|
-
message.
|
|
166
|
+
message.warning("没有选择实体")
|
|
166
167
|
return null;
|
|
167
168
|
}
|
|
168
169
|
let url = `/v3/field-group/data/selected`
|
|
@@ -589,7 +590,7 @@ export default class HcserviceV3 {
|
|
|
589
590
|
|
|
590
591
|
static async login(json,kaptchaToken,kaptchaText,pubkey) {
|
|
591
592
|
|
|
592
|
-
let datetime=
|
|
593
|
+
let datetime= format(new Date()).format("YYYY-MM-DD HH:mm:ss")
|
|
593
594
|
let programCode
|
|
594
595
|
json['datetime']=datetime;
|
|
595
596
|
|
|
@@ -93,10 +93,10 @@ export default class Superagent {
|
|
|
93
93
|
Units.toLogin();
|
|
94
94
|
} else if (res.status === 404 || res.status === 504) {
|
|
95
95
|
message.error("服务资源未找到("+res.status+")")
|
|
96
|
-
resolve(
|
|
96
|
+
resolve(res);
|
|
97
97
|
} else if (res.status === 500) {
|
|
98
98
|
message.error("后台处理错误(" + res.text + ")")
|
|
99
|
-
resolve(
|
|
99
|
+
resolve(res);
|
|
100
100
|
} else {
|
|
101
101
|
message.error("服务资源请求失败!");
|
|
102
102
|
reject(res.body)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import moment, {DurationInputArg2} from "moment";
|
|
1
|
+
// import moment, {DurationInputArg2} from "moment";
|
|
2
2
|
|
|
3
|
+
import dayjs,{ManipulateType} from "dayjs";
|
|
3
4
|
|
|
4
5
|
function TmplConfigAnalysis() {
|
|
5
6
|
|
|
@@ -48,7 +49,7 @@ TmplConfigAnalysis.currentL1 = function ( config: string,format:string) {
|
|
|
48
49
|
let unit=match[3];
|
|
49
50
|
//没有单位
|
|
50
51
|
if(unit==""){
|
|
51
|
-
return
|
|
52
|
+
return dayjs().format(format);
|
|
52
53
|
}else{
|
|
53
54
|
//系数
|
|
54
55
|
let symbol=match[1];
|
|
@@ -60,37 +61,37 @@ TmplConfigAnalysis.currentL1 = function ( config: string,format:string) {
|
|
|
60
61
|
nstr="1";
|
|
61
62
|
}
|
|
62
63
|
let n:number=parseInt(nstr);
|
|
63
|
-
let
|
|
64
|
+
let dayjsUnit:ManipulateType="days";
|
|
64
65
|
|
|
65
66
|
switch (unit) {
|
|
66
67
|
case "D":
|
|
67
|
-
|
|
68
|
+
dayjsUnit="days";
|
|
68
69
|
break;
|
|
69
70
|
case "M":
|
|
70
|
-
|
|
71
|
+
dayjsUnit="months";
|
|
71
72
|
break;
|
|
72
73
|
case "Y":
|
|
73
|
-
|
|
74
|
+
dayjsUnit="years";
|
|
74
75
|
break;
|
|
75
76
|
case "W":
|
|
76
|
-
|
|
77
|
+
dayjsUnit="weeks";
|
|
77
78
|
break;
|
|
78
79
|
case "h":
|
|
79
|
-
|
|
80
|
+
dayjsUnit="hours";
|
|
80
81
|
break;
|
|
81
82
|
case "m":
|
|
82
|
-
|
|
83
|
+
dayjsUnit="minutes";
|
|
83
84
|
break;
|
|
84
85
|
case "s":
|
|
85
|
-
|
|
86
|
+
dayjsUnit="seconds";
|
|
86
87
|
break;
|
|
87
88
|
}
|
|
88
89
|
if(symbol=="-"){
|
|
89
|
-
// console.log("moment().subtract(n,
|
|
90
|
-
return
|
|
90
|
+
// console.log("moment().subtract(n,dayjsUnit)",moment().subtract(n,dayjsUnit).format(format));
|
|
91
|
+
return dayjs().subtract(n,dayjsUnit).format(format);
|
|
91
92
|
}else{
|
|
92
|
-
// console.log("moment().add(n,
|
|
93
|
-
return
|
|
93
|
+
// console.log("moment().add(n,dayjsUnit)",moment().add(n,dayjsUnit).format(format));
|
|
94
|
+
return dayjs().add(n,dayjsUnit).format(format);
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
}else{
|
|
@@ -4,7 +4,7 @@ import Axios from "axios";
|
|
|
4
4
|
import Logo from "./logo.png";
|
|
5
5
|
import {DtmplConfig, DtmplData, EnumItem} from "../tmpl/interface";
|
|
6
6
|
import HCDataSource from "../tmpl/hc-data-source";
|
|
7
|
-
import
|
|
7
|
+
import dayjs from "dayjs";
|
|
8
8
|
import TmplConfigAnalysis from "../tmpl/tmpl-config-analysis";
|
|
9
9
|
|
|
10
10
|
const Option = Select.Option;
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
121
121
|
|
|
122
122
|
formateDate(time) {
|
|
123
123
|
if (!time) return '';
|
|
124
|
-
return
|
|
124
|
+
return dayjs(new Date(time)).format("YYYY-MM-DD HH:mm:ss");
|
|
125
125
|
//let str=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
|
|
126
126
|
// return str;
|
|
127
127
|
},
|
|
@@ -466,7 +466,7 @@ export default {
|
|
|
466
466
|
return false; //非空
|
|
467
467
|
}
|
|
468
468
|
return true;
|
|
469
|
-
},
|
|
469
|
+
}, getDayjsFormat(itemType) {
|
|
470
470
|
let format = 'YYYY-MM-DD HH:mm:ss'
|
|
471
471
|
|
|
472
472
|
switch (itemType) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import {Badge, Button, Card, Layout, Space,CardProps} from 'antd'
|
|
3
3
|
import {CodeTwoTone} from '@ant-design/icons';
|
|
4
|
-
import 'antd/dist/
|
|
4
|
+
import 'antd/dist/reset.css';
|
|
5
5
|
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
6
6
|
import HCDataSource from '../tmpl/hc-data-source'
|
|
7
7
|
import {Level2Menu} from "../tmpl/interface";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import {Button, Card, Space, Statistic,CardProps} from 'antd'
|
|
3
3
|
import {LikeOutlined,RightCircleOutlined,HeartOutlined,RocketOutlined,RocketTwoTone } from '@ant-design/icons';
|
|
4
|
-
import 'antd/dist/
|
|
4
|
+
import 'antd/dist/reset.css';
|
|
5
5
|
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
6
6
|
import HCDataSource from '../tmpl/hc-data-source'
|
|
7
7
|
import {Level2Menu} from "../tmpl/interface";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default class Chart extends React.Component<any, any, any> {
|
|
2
|
-
constructor(props: any);
|
|
3
|
-
constructor(props: any, context: any);
|
|
4
|
-
state: {};
|
|
5
|
-
componentWillReceiveProps(nextProps: any): Promise<void>;
|
|
6
|
-
getChart: () => void;
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
-
}
|
|
9
|
-
import React from "react";
|
|
10
|
-
//# sourceMappingURL=Chart.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../../src/aldehyde/chart/antd/Chart.js"],"names":[],"mappings":"AAEA;IA6BwsmB,wBAA8C;IAAA,sCAAyJ;IA3B34mB,UAAU;IAGV,yDAEC;IAED,qBAGC;IAED,sBAYC;CAEJ"}
|
package/lib/chart/antd/Chart.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import LineChart from './Max2DimLineChart';
|
|
12
|
-
export default class Chart extends React.Component {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.state = {};
|
|
16
|
-
this.getChart = () => {
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
componentWillReceiveProps(nextProps) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
let { data, statView, ltmpl } = this.props;
|
|
25
|
-
return (React.createElement("div", null, statView.refL2ChartType == '10000' || statView.refL2ChartType == '折线图' ?
|
|
26
|
-
React.createElement(LineChart, { data: data, statView: statView, ltmpl: ltmpl }, " ")
|
|
27
|
-
:
|
|
28
|
-
React.createElement("div", null, "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u56FE\u8868")));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=Chart.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.js","sourceRoot":"","sources":["../../../../../src/aldehyde/chart/antd/Chart.js"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAC1C,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAS;IAAlD;;QAEI,UAAK,GAAG,EAAE,CAAA;QAOV,aAAQ,GAAG,GAAG,EAAE;QAGhB,CAAC,CAAA;IAgBL,CAAC;IAvBS,yBAAyB,CAAC,SAAS;;QAEzC,CAAC;KAAA;IAOD,MAAM;QACF,IAAI,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACzC,OAAO,CAAC,iCAEE,QAAQ,CAAC,cAAc,IAAI,OAAO,IAAG,QAAQ,CAAC,cAAc,IAAE,KAAK,CAAC,CAAC;YACnE,oBAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,QAAe;YAC9E,CAAC;gBACG,0FAAoB,CAElB,CAET,CAAC;IACN,CAAC;CAEJ"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export default class Max2DimLineChart extends React.Component<any, any, any> {
|
|
2
|
-
constructor(props: any);
|
|
3
|
-
constructor(props: any, context: any);
|
|
4
|
-
state: {
|
|
5
|
-
dataArray: any[];
|
|
6
|
-
};
|
|
7
|
-
componentWillMount(): Promise<void>;
|
|
8
|
-
componentWillReceiveProps(nextprops: any): void;
|
|
9
|
-
init: (data: any, statView: any, ltmpl: any) => void;
|
|
10
|
-
get2DimChart: (lineData: any) => any[];
|
|
11
|
-
getChart1: (refL2ChartType: any, val: any) => JSX.Element;
|
|
12
|
-
render(): JSX.Element;
|
|
13
|
-
}
|
|
14
|
-
import React from "react";
|
|
15
|
-
//# sourceMappingURL=Max2DimLineChart.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Max2DimLineChart.d.ts","sourceRoot":"","sources":["../../../../../src/aldehyde/chart/antd/Max2DimLineChart.js"],"names":[],"mappings":"AAOA;IAwH49e,wBAA8C;IAAA,sCAAyJ;IAtH/pf;;MAEC;IAED,oCAOC;IAED,gDAGC;IAED,qDAmDC;IAED,uCAcC;IAED,0DASC;IAED,sBAiBC;CAEJ"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import LineChart from './LineChart-sub';
|
|
12
|
-
import ColumnChart from './ColumnChart-sub';
|
|
13
|
-
import PieChart from './PieChart-sub';
|
|
14
|
-
import { Col, Divider, Row } from "antd";
|
|
15
|
-
import chartUtils from "./ChartUtils";
|
|
16
|
-
export default class Max2DimLineChart extends React.Component {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.state = {
|
|
20
|
-
dataArray: [],
|
|
21
|
-
};
|
|
22
|
-
this.init = (data, statView, ltmpl) => {
|
|
23
|
-
let data_;
|
|
24
|
-
let firstDim = undefined, secondDim = undefined, dimensions = [], facts = [];
|
|
25
|
-
ltmpl.columns.forEach((col) => {
|
|
26
|
-
if ("fact" == col.colClass) {
|
|
27
|
-
facts.push(col);
|
|
28
|
-
}
|
|
29
|
-
else if ("dimension" == col.colClass) {
|
|
30
|
-
dimensions.push(col);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
let lineData;
|
|
34
|
-
if (dimensions.length > 1) {
|
|
35
|
-
firstDim = dimensions[0];
|
|
36
|
-
secondDim = dimensions[1];
|
|
37
|
-
data_ = chartUtils.transValueFloatGroupByDim(ltmpl, data, firstDim);
|
|
38
|
-
lineData = new Map();
|
|
39
|
-
for (let [key, data1] of data_) {
|
|
40
|
-
lineData.set(key, []);
|
|
41
|
-
facts.forEach((fact) => {
|
|
42
|
-
let obj1 = {};
|
|
43
|
-
obj1.data = data1;
|
|
44
|
-
obj1.config = {
|
|
45
|
-
xAxisTitle: key,
|
|
46
|
-
yAxisTitle: fact.title,
|
|
47
|
-
xField: secondDim.title,
|
|
48
|
-
yField: fact.title
|
|
49
|
-
};
|
|
50
|
-
lineData.get(key).push(obj1);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
else if (dimensions.length == 1) {
|
|
55
|
-
lineData = [];
|
|
56
|
-
secondDim = dimensions[0];
|
|
57
|
-
data_ = chartUtils.transValueFloat(ltmpl, data.list);
|
|
58
|
-
facts.forEach((fact) => {
|
|
59
|
-
let obj1 = {};
|
|
60
|
-
obj1.data = data_;
|
|
61
|
-
obj1.config = {
|
|
62
|
-
xAxisTitle: secondDim.title,
|
|
63
|
-
yAxisTitle: fact.title,
|
|
64
|
-
xField: secondDim.title,
|
|
65
|
-
yField: fact.title
|
|
66
|
-
};
|
|
67
|
-
lineData.push(obj1);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
this.setState({
|
|
71
|
-
lineData
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
this.get2DimChart = (lineData) => {
|
|
75
|
-
let refL2ChartType = this.props.statView.refL2ChartType;
|
|
76
|
-
let list = [];
|
|
77
|
-
let that = this;
|
|
78
|
-
for (let [key, obj] of lineData) {
|
|
79
|
-
obj.map(function (val) {
|
|
80
|
-
list.push(React.createElement(Col, { span: 12, key: val.config.yAxisTitle },
|
|
81
|
-
that.getChart1(refL2ChartType, val),
|
|
82
|
-
React.createElement(Divider, { dashed: true, style: { borderTopColor: "#40a9ff", }, plain: true })));
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
return list;
|
|
86
|
-
};
|
|
87
|
-
this.getChart1 = (refL2ChartType, val) => {
|
|
88
|
-
return refL2ChartType == '折线图' ?
|
|
89
|
-
React.createElement(LineChart, { data: val.data, config: val.config })
|
|
90
|
-
: refL2ChartType == '柱图' ?
|
|
91
|
-
React.createElement(ColumnChart, { data: val.data, config: val.config })
|
|
92
|
-
:
|
|
93
|
-
refL2ChartType == '饼图' ?
|
|
94
|
-
React.createElement(PieChart, { data: val.data, config: val.config }) :
|
|
95
|
-
React.createElement("div", null, "\u6682\u4E0D\u652F\u6301\u7684\u56FE\u5F62");
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
componentWillMount() {
|
|
99
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
let { data, statView, ltmpl } = this.props;
|
|
101
|
-
// console.log("data:", data);
|
|
102
|
-
// console.log("statView:", statView);
|
|
103
|
-
// console.log("ltmpl:", ltmpl);
|
|
104
|
-
this.init(data, statView, ltmpl);
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
componentWillReceiveProps(nextprops) {
|
|
108
|
-
let { data, statView, ltmpl } = nextprops;
|
|
109
|
-
this.init(data, statView, ltmpl);
|
|
110
|
-
}
|
|
111
|
-
render() {
|
|
112
|
-
let { lineData } = this.state;
|
|
113
|
-
let refL2ChartType = this.props.refL2ChartType;
|
|
114
|
-
;
|
|
115
|
-
let that = this;
|
|
116
|
-
return React.createElement("div", null,
|
|
117
|
-
React.createElement(Row, { style: { padding: '8px 0' }, gutter: [32, { xs: 8, sm: 16, md: 24, lg: 32 }] }, lineData instanceof Map ?
|
|
118
|
-
that.get2DimChart(lineData)
|
|
119
|
-
: lineData ? lineData.map(function (val) {
|
|
120
|
-
return React.createElement(Col, { span: 12, key: val.config.yAxisTitle },
|
|
121
|
-
that.getChart1(refL2ChartType, val),
|
|
122
|
-
React.createElement(Divider, { dashed: true, style: { borderTopColor: "#40a9ff", }, plain: true }));
|
|
123
|
-
}) : ""));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=Max2DimLineChart.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Max2DimLineChart.js","sourceRoot":"","sources":["../../../../../src/aldehyde/chart/antd/Max2DimLineChart.js"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,MAAM,MAAM,CAAC;AACvC,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,KAAK,CAAC,SAAS;IAA7D;;QAEI,UAAK,GAAG;YACJ,SAAS,EAAE,EAAE;SAChB,CAAA;QAgBD,SAA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;IACrC,CAAC;IAkFD,MAAM;QACF,IAAI,EAAC,QAAQ,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,IAAI,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;QAAA,CAAC;QAChD,IAAI,IAAI,GAAC,IAAI,CAAC;QACd,OAAO;YACH,oBAAC,GAAG,IAAC,KAAK,EAAE,EAAC,OAAO,EAAE,OAAO,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,CAAC,IACxE,QAAQ,YAAY,GAAG,CAAC,CAAC;gBACtB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC;gBAC3B,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,GAAG;oBACnC,OAAO,oBAAC,GAAG,IAAC,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU;wBAC3C,IAAI,CAAC,SAAS,CAAC,cAAc,EAAC,GAAG,CAAC;wBACnC,oBAAC,OAAO,IAAC,MAAM,QAAC,KAAK,EAAE,EAAC,cAAc,EAAE,SAAS,GAAE,EAAE,KAAK,SAAW,CACnE,CAAA;gBACV,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAET,CACJ,CAAA;IACV,CAAC;CAEJ"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DtmplData, LtmplConfig } from "../../tmpl/interface";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
transValueFloat(ltmpl: LtmplConfig, data: DtmplData[]): any[];
|
|
4
|
-
transValueFloatGroupByDim(ltmpl: LtmplConfig, data: DtmplData[], dimension: any): Map<any, any>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
|
-
//# sourceMappingURL=chart-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chart-utils.d.ts","sourceRoot":"","sources":["../../../../../src/aldehyde/chart/antd/chart-utils.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;;2BAIlC,WAAW,QAAM,SAAS,EAAE;qCAqBlB,WAAW,QAAM,SAAS,EAAE;;AAtBhE,wBA6CC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
transValueFloat(ltmpl, data) {
|
|
3
|
-
let data_ = [];
|
|
4
|
-
let cols = ltmpl.columns;
|
|
5
|
-
if (data) {
|
|
6
|
-
data.map(function (val) {
|
|
7
|
-
let value = {};
|
|
8
|
-
Object.keys(val.fieldMap).forEach((key) => {
|
|
9
|
-
cols.forEach((col) => {
|
|
10
|
-
if (col.id == key) {
|
|
11
|
-
let v1 = parseFloat(val.fieldMap[key]);
|
|
12
|
-
value[col.title] = isNaN(v1) ? val.fieldMap[key] : v1;
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
data_.push(value);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
// console.log("chartData:",data_);
|
|
21
|
-
return data_;
|
|
22
|
-
},
|
|
23
|
-
transValueFloatGroupByDim(ltmpl, data, dimension) {
|
|
24
|
-
let dimKey = dimension.id;
|
|
25
|
-
//先分类
|
|
26
|
-
let map1 = new Map();
|
|
27
|
-
if (data) {
|
|
28
|
-
data.map(function (val) {
|
|
29
|
-
let v1 = val.fieldMap[dimKey];
|
|
30
|
-
if (v1) {
|
|
31
|
-
if (!map1.has(v1)) {
|
|
32
|
-
map1.set(v1, []);
|
|
33
|
-
}
|
|
34
|
-
map1.get(v1).push(val);
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
let map2 = new Map();
|
|
39
|
-
//再转换
|
|
40
|
-
for (let [key, value] of map1) {
|
|
41
|
-
map2.set(key, this.transValueFloat(ltmpl, value));
|
|
42
|
-
}
|
|
43
|
-
return map2;
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=chart-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chart-utils.js","sourceRoot":"","sources":["../../../../../src/aldehyde/chart/antd/chart-utils.tsx"],"names":[],"mappings":"AAIA,eAAe;IACX,eAAe,CAAC,KAAiB,EAAC,IAAgB;QAC9C,IAAI,KAAK,GAAC,EAAE,CAAC;QACb,IAAI,IAAI,GAAE,KAAK,CAAC,OAAO,CAAC;QACxB,IAAG,IAAI,EAAC;YACJ,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG;gBAClB,IAAI,KAAK,GAAC,EAAE,CAAC;gBACb,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAC,EAAE;oBACrC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAC,EAAE;wBAChB,IAAG,GAAG,CAAC,EAAE,IAAE,GAAG,EAAC;4BACX,IAAI,EAAE,GAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;4BACrC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAC,KAAK,CAAC,EAAE,CAAC,CAAA,CAAC,CAAA,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA,CAAC,CAAA,EAAE,CAAC;4BAChD,OAAO;yBACV;oBACL,CAAC,CAAC,CAAA;gBACN,CAAC,CAAC,CAAC;gBACH,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC,CAAC,CAAA;SACL;QACF,mCAAmC;QAClC,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,yBAAyB,CAAC,KAAiB,EAAC,IAAgB,EAAC,SAAS;QAElE,IAAI,MAAM,GAAC,SAAS,CAAC,EAA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