提交 6c0bb02d 编写于 作者: tony001's avatar tony001

统一视图、部件刷新方法

上级 f711f3fd
......@@ -497,13 +497,13 @@ import CodeListService from "@/codelist/codelist-service";
/**
* 刷新
*
* @param {*} [opt={}]
* @param {*} [args={}]
* @memberof Main
*/
public refresh(opt: any = {}) {
public refresh(args?: any) {
this.curPage = 1;
this.items = [];
this.load(opt);
this.load(args);
}
/**
......
......@@ -275,11 +275,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
/**
* 刷新
*
* @param {*} [opt={}]
* @param {*} [args={}]
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public refresh(opt: any = {}) {
this.load(opt);
public refresh(args?: any) {
this.load(args);
}
/**
......
......@@ -275,11 +275,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
/**
* 刷新
*
* @param {*} [opt={}]
* @param {*} [args={}]
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public refresh(opt: any = {}) {
this.load(opt);
public refresh(args?: any) {
this.load(args);
}
/**
......
......@@ -548,12 +548,12 @@ import CodeListService from "@/codelist/codelist-service";
/**
* 刷新
*
* @param {*} [opt={}]
* @param {*} [args={}]
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh(opt: any = {}) {
public refresh(args?: any) {
this.curPage = 1;
this.load(opt, true);
this.load(args, true);
}
/**
......
......@@ -640,7 +640,7 @@ FullCalendar,
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh() {
public refresh(args?:any) {
if(Object.is(this.calendarType,"TIMELINE")){
this.searchEvents();
} else {
......
......@@ -241,7 +241,7 @@
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh() {
public refresh(args?:any) {
this.load();
}
......
......@@ -556,10 +556,10 @@ import UIService from '@/uiservice/ui-service';
/**
* 刷新功能
*
* @param {any[]} args
* @param {any} args
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh(args: any[]): void {
public refresh(args?: any): void {
this.refresh_all();
<#-- if (Object.keys(this.currentselectedNode).length === 0) {
return;
......
......@@ -315,7 +315,7 @@ GanttElastic,
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh() {
public refresh(args?: any) {
this.load();
}
......
......@@ -369,9 +369,9 @@ draggable,
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh(opt: any = {}) {
public refresh(args?: any) {
this.curPage = 1;
this.load(opt, true);
this.load(args, true);
}
/**
......
......@@ -1004,12 +1004,12 @@ import { Environment } from '@/environments/environment';
/**
* 部件刷新
*
* @param {any[]} args
* @param {any} args
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh(args: any[]): void {
public refresh(args?: any): void {
let arg: any = {};
Object.assign(arg,args[0]);
Object.assign(arg,args?args[0]:{});
if (this.data.srfkey && !Object.is(this.data.srfkey, '')) {
Object.assign(arg, { srfkey: this.data.srfkey });
this.load(arg);
......
......@@ -495,10 +495,10 @@ import { Environment } from '@/environments/environment';
/**
* 部件刷新
*
* @param {any[]} args
* @param {any} args
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh(args: any[]): void {
public refresh(args?: any): void {
this.load();
}
......
......@@ -238,12 +238,12 @@ import CodeListService from "@/codelist/codelist-service";
/**
* 刷新
*
* @param {*} [opt={}]
* @param {*} [args={}]
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh(opt: any = {}) {
public refresh(args: any = {}) {
if (this.parentRef.refresh && this.parentRef.refresh instanceof Function) {
this.parentRef.refresh(opt);
this.parentRef.refresh(args);
}
}
......
......@@ -231,6 +231,21 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
</#if>
};
<#if view.getXDataPSControl?? && view.getXDataPSControl()??>
<#assign dataControl = view.getXDataPSControl()/>
/**
* 视图刷新
*
* @param {*} args
* @memberof ${srfclassname('${view.name}')}Base
*/
public refresh(args?: any): void {
const refs: any = this.$refs;
if (refs && refs.${ctrl.name}) {
refs.${ctrl.name}.refresh();
}
}
</#if>
/**
* 计数器刷新
*
......
......@@ -51,19 +51,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
}
}
/**
* 视图刷新
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}Base
*/
public refresh(): void {
const refs: any = this.$refs;
if (refs.calendar) {
refs.calendar.refresh();
}
}
/**
* calendar 的 beforeload 事件
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册