提交 5e161058 编写于 作者: tony001's avatar tony001

修复图表视图无搜索表单加载数据问题

上级 cb50e4f7
......@@ -36,7 +36,15 @@ export default class ChartViewEngine extends SearchViewEngine {
* @memberof ChartViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
if (this.getSearchForm()) {
const tag = this.getSearchForm().name;
this.setViewState2({ tag: tag, action: 'loaddraft', viewdata: this.view.viewparams });
}else if(this.getChart() && this.isLoadDefault) {
const tag = this.getChart().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: {} });
} else {
this.isLoadDefault = true;
}
}
/**
......
......@@ -70,17 +70,14 @@ export default class DataViewEngine extends MDViewEngine {
* @memberof DataViewEngine
*/
public doRemove(): void {
let selectedData = this.getMDCtrl() && this.getMDCtrl().getSelection();
if (!selectedData || selectedData == null || selectedData.length === 0) {
return;
}
let dataInfo = '';
selectedData.forEach((record: any, index: number) => {
let srfmajortext = record.srfmajortext;
if (index < 5) {
let srfmajortext = record.srfmajortext;
if (index < 5) {
if (!Object.is(dataInfo, '')) {
dataInfo += '、';
}
......@@ -88,18 +85,13 @@ export default class DataViewEngine extends MDViewEngine {
} else {
return false;
}
});
if (selectedData.length < 5) {
dataInfo = dataInfo + '共' + selectedData.length + '条数据';
} else {
dataInfo = dataInfo + '...' + '共' + selectedData.length + '条数据';
}
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
// 询问框
this.view.$Modal.confirm({
title:'警告',
......@@ -107,9 +99,7 @@ export default class DataViewEngine extends MDViewEngine {
onOk:() => {
this.removeData(null);
},
onCancel: () => {
}
onCancel: () => {}
});
}
......@@ -124,15 +114,6 @@ export default class DataViewEngine extends MDViewEngine {
if (!arg) {
arg = {};
}
// if (this.getParentMode()) {
// Object.assign(arg, this.getParentMode());
// }
// if (this.getParentData()) {
// Object.assign(arg, this.getParentData());
// }
if (!arg.srfkeys) {
// 获取要删除的数据集合
const selectedData: Array<any> = this.getMDCtrl() && this.getMDCtrl().getSelection();
......
......@@ -123,15 +123,6 @@ export default class ListViewEngine extends MDViewEngine {
if (!arg) {
arg = {};
}
// if (this.getParentMode()) {
// Object.assign(arg, this.getParentMode());
// }
// if (this.getParentData()) {
// Object.assign(arg, this.getParentData());
// }
if (!arg.srfkeys) {
// 获取要删除的数据集合
const selectedData: Array<any> = this.getMDCtrl() && this.getMDCtrl().getSelection();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册