aldehyde 0.2.23 → 0.2.25
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.js +2 -2
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/chemstruc/graph.d.ts.map +1 -1
- package/lib/controls/chemstruc/graph.js +0 -1
- package/lib/controls/chemstruc/graph.js.map +1 -1
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +0 -1
- package/lib/controls/view-control.js.map +1 -1
- package/lib/detail/edit/dtmpl-edit.d.ts +1 -1
- package/lib/detail/edit/dtmpl-edit.d.ts.map +1 -1
- package/lib/detail/edit/dtmpl-edit.js +3 -3
- package/lib/detail/edit/dtmpl-edit.js.map +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +1 -1
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/form/criteria-form.js +1 -1
- package/lib/form/criteria-form.js.map +1 -1
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/dtmpl-form.js +4 -4
- package/lib/form/dtmpl-form.js.map +1 -1
- package/lib/form/form-Item-group.js +1 -1
- package/lib/form/form-Item-group.js.map +1 -1
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.js +6 -8
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/lib/table/act-table.d.ts +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +40 -44
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +2 -1
- package/lib/table/query-table.js.map +1 -1
- package/lib/units/index.d.ts +1 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +4 -1
- package/lib/units/index.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/index.tsx +2 -2
- package/src/aldehyde/controls/chemstruc/graph.tsx +0 -1
- package/src/aldehyde/controls/view-control.tsx +1 -3
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +4 -5
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +2 -5
- package/src/aldehyde/form/criteria-form.tsx +1 -1
- package/src/aldehyde/form/dtmpl-form.tsx +4 -8
- package/src/aldehyde/form/form-Item-group.tsx +1 -1
- package/src/aldehyde/routable/ltmpl-route.tsx +6 -10
- package/src/aldehyde/table/act-table.tsx +8 -14
- package/src/aldehyde/table/query-table.tsx +2 -1
- package/src/aldehyde/units/index.tsx +4 -1
|
@@ -53,7 +53,6 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
53
53
|
const {sourceId} = params;
|
|
54
54
|
let {sourceId: preSourceId} = prevProps.params;
|
|
55
55
|
let {location: preLocation} = prevProps;
|
|
56
|
-
|
|
57
56
|
if (!sourceId ||
|
|
58
57
|
(!preSourceId && this.state.ltmplConfigRes)
|
|
59
58
|
|| (location.pathname == preLocation.pathname && location.search == preLocation.search)
|
|
@@ -127,17 +126,15 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
127
126
|
const {basePath} = this.props;
|
|
128
127
|
const {sourceId} = this.props.params;
|
|
129
128
|
let params = {...params_}
|
|
130
|
-
params['sourceId'] = sourceId;
|
|
129
|
+
//params['sourceId'] = sourceId;
|
|
131
130
|
const newfliter = Units.transQueryParamsToStr(params);
|
|
132
|
-
this.props.navigate(`${basePath}/${sourceId}/act-table
|
|
131
|
+
this.props.navigate(`${basePath}/${sourceId}/act-table?${newfliter}`,{replace:true})
|
|
133
132
|
|
|
134
133
|
}
|
|
135
134
|
onChangeSearch = (params_) => {
|
|
136
135
|
let params = {...params_}
|
|
137
136
|
//追加过滤条件,hiddenColIds,innerQueryKey
|
|
138
|
-
const {
|
|
139
|
-
let mainCode = undefined;
|
|
140
|
-
let criteriaData=searchParams;
|
|
137
|
+
const {searchParams} = this.props;
|
|
141
138
|
let mcode=searchParams.get("mainCode");
|
|
142
139
|
if (mcode) {
|
|
143
140
|
params['mainCode'] = mcode;
|
|
@@ -149,14 +146,14 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
149
146
|
if(pageNo){
|
|
150
147
|
params['pageSize'] = pageSize;
|
|
151
148
|
}
|
|
152
|
-
|
|
149
|
+
params['menuId']=this.getMenuId();
|
|
150
|
+
params['sourceId']=this.getMenuId();
|
|
153
151
|
this.doSearch(params);
|
|
154
152
|
}
|
|
155
153
|
|
|
156
154
|
onChangePage = (pageNo: number, pageSize: number) => {
|
|
157
155
|
const {location} = this.props;
|
|
158
156
|
let search = location.search;
|
|
159
|
-
let mainCode = undefined;
|
|
160
157
|
let params = Units.transQueryStrToParams(search);
|
|
161
158
|
params['pageNo'] = pageNo;
|
|
162
159
|
params['pageSize'] = pageSize;
|
|
@@ -177,7 +174,6 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
177
174
|
let mainCode = undefined;
|
|
178
175
|
|
|
179
176
|
let search = location.search;
|
|
180
|
-
debugger
|
|
181
177
|
let criteriaData = Units.transQueryStrToParams(search);
|
|
182
178
|
// if (search.indexOf('menuId') > 0) {
|
|
183
179
|
// menuId = criteriaData['menuId'];
|
|
@@ -199,7 +195,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
199
195
|
menuId={this.getMenuId()} mainCode={mainCode} showView={this.showView}
|
|
200
196
|
doSearch={this.onChangeSearch} doEdit={this.doEdit} doCreate={this.doCreate}
|
|
201
197
|
sourceId={sourceId} criteriaData={criteriaData}
|
|
202
|
-
ltmplConfig={ltmplConfigRes.ltmplConfig}
|
|
198
|
+
ltmplConfig={ltmplConfigRes?ltmplConfigRes.ltmplConfig:null}
|
|
203
199
|
doRAction={this.doRAction}
|
|
204
200
|
/>
|
|
205
201
|
}
|
|
@@ -44,7 +44,7 @@ import ColumnSelector from './column/column-selector';
|
|
|
44
44
|
import ExportFrame from '../exportor/export-frame';
|
|
45
45
|
import {SortableHandle} from 'react-sortable-hoc';
|
|
46
46
|
import L2ActTable from "./l2-act-table";
|
|
47
|
-
|
|
47
|
+
|
|
48
48
|
import Action from '../controls/action'
|
|
49
49
|
import Restat from "./stat/restat"
|
|
50
50
|
import ActionUtils from '../controls/action/utils'
|
|
@@ -125,8 +125,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
125
125
|
if (!ltmplConfig) {
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
|
-
|
|
129
|
-
// console.log('acttable ltmplConfig:', ltmplConfig);
|
|
128
|
+
|
|
130
129
|
this.setState({
|
|
131
130
|
loading: true,
|
|
132
131
|
})
|
|
@@ -358,10 +357,9 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
358
357
|
let {ltmplConfig: preLtmplConfig, criteriaData: preCriteriaData,sourceId:preSourceId} = prevProps;
|
|
359
358
|
|
|
360
359
|
let {hiddenColIds, sortedColConfigs} = this.state;
|
|
361
|
-
|
|
362
|
-
if ((sourceId && preSourceId!=sourceId) ||
|
|
360
|
+
if ((sourceId && preSourceId != sourceId) ||
|
|
363
361
|
(ltmplConfig && (!preLtmplConfig || ltmplConfig.id != preLtmplConfig.id)) ||
|
|
364
|
-
(Units.transQueryParamsToStr(criteriaData) != Units.transQueryParamsToStr(preCriteriaData))) {
|
|
362
|
+
(Units.transQueryParamsToStr(criteriaData,false,['pageSize','pageNo']) != Units.transQueryParamsToStr(preCriteriaData,false,['pageSize','pageNo']))) {
|
|
365
363
|
|
|
366
364
|
if (ltmplConfig.id == preLtmplConfig.id) {
|
|
367
365
|
this.loadData(hiddenColIds, [], sortedColConfigs);
|
|
@@ -625,7 +623,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
625
623
|
|
|
626
624
|
criteriaFormUseful = () => {
|
|
627
625
|
const {ltmplConfig} = this.props;
|
|
628
|
-
let {buttons, criterias,
|
|
626
|
+
let {buttons, criterias, } = ltmplConfig;
|
|
629
627
|
if ((buttons.includes('query') && ((criterias && criterias.length > 0) || buttons.includes('drilling'))) ||
|
|
630
628
|
this.checkBoxUseful()) {
|
|
631
629
|
return true;
|
|
@@ -657,7 +655,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
657
655
|
doSearch={doSearch}/>
|
|
658
656
|
}
|
|
659
657
|
|
|
660
|
-
renderContent() {
|
|
658
|
+
renderContent=()=> {
|
|
661
659
|
let {queryKey, tableColumns, loading, selectedRows, hiddenRowCodes, viewModels, sortedColConfigs, hiddenColIds, showL2ActTable} = this.state;
|
|
662
660
|
let {sourceId, ltmplConfig, funcMode, title, collapsible,pageSize,pageNo,onChangePage} = this.props;
|
|
663
661
|
|
|
@@ -712,17 +710,14 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
712
710
|
{displayCriteriaCard ?
|
|
713
711
|
this.renderCriteriaForm() : null
|
|
714
712
|
}
|
|
715
|
-
{
|
|
716
|
-
loading ? "" :
|
|
717
|
-
<QueryTable onChangePage={onChangePage} viewModels={viewModels} columnConfigs={columnConfigs}
|
|
713
|
+
{loading?"":<QueryTable onChangePage={onChangePage} viewModels={viewModels} columnConfigs={columnConfigs}
|
|
718
714
|
maxSelectedRows={this.checkBoxUseful() ? 10000 : -1}
|
|
719
715
|
selectedRows={selectedRows}
|
|
720
716
|
columns={tableColumns}
|
|
721
717
|
hiddenRowCodes={hiddenRowCodes}
|
|
722
718
|
pageInfo={{pageNo:pageNo?pageNo:1,pageSize:pageSize?pageSize:ltmplConfig.defaultPageSize}}
|
|
723
719
|
queryKey={queryKey}
|
|
724
|
-
onChangeRowSelection={this.changeRowSelection}/>
|
|
725
|
-
}
|
|
720
|
+
onChangeRowSelection={this.changeRowSelection}/>}
|
|
726
721
|
</div>
|
|
727
722
|
</>
|
|
728
723
|
);
|
|
@@ -740,7 +735,6 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
740
735
|
</Table>
|
|
741
736
|
</>
|
|
742
737
|
}
|
|
743
|
-
|
|
744
738
|
return <> {
|
|
745
739
|
collapsible ?
|
|
746
740
|
<CollapseCard
|
|
@@ -96,6 +96,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
96
96
|
async componentDidUpdate(prevProps) {
|
|
97
97
|
const {queryKey: preQueryKey, pageInfo: prePageInfo} = prevProps;
|
|
98
98
|
const {queryKey, pageInfo} = this.props;
|
|
99
|
+
const {total}=this.state;
|
|
99
100
|
if (queryKey) {
|
|
100
101
|
if (preQueryKey?.key != queryKey.key) {
|
|
101
102
|
await this.loadData(queryKey.key, pageInfo, true);
|
|
@@ -294,7 +295,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
294
295
|
}
|
|
295
296
|
|
|
296
297
|
render() {
|
|
297
|
-
const {pageInfo, columns, viewModels
|
|
298
|
+
const {pageInfo, columns, viewModels} = this.props;
|
|
298
299
|
const {touchEnd, total, loading, virtualEndPageNo} = this.state;
|
|
299
300
|
return (
|
|
300
301
|
<>
|
|
@@ -404,13 +404,16 @@ export default {
|
|
|
404
404
|
return token;
|
|
405
405
|
|
|
406
406
|
},
|
|
407
|
-
transQueryParamsToStr(data, isPrefix = false) {
|
|
407
|
+
transQueryParamsToStr(data, isPrefix = false,excudekeys=[]) {
|
|
408
408
|
let prefix = isPrefix ? '?' : '';
|
|
409
409
|
let _result = [];
|
|
410
410
|
|
|
411
411
|
let paramKeys = [];
|
|
412
412
|
//寻找参数
|
|
413
413
|
for (let key in data) {
|
|
414
|
+
if(excudekeys.indexOf(key)>=0){
|
|
415
|
+
continue
|
|
416
|
+
}
|
|
414
417
|
let value = data[key]
|
|
415
418
|
// 去掉为空的参数
|
|
416
419
|
if ([undefined, null].includes(value)) {
|