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

新增门户部件刷新

上级 c3a721d8
......@@ -437,7 +437,7 @@ import CodeListService from "@/codelist/codelist-service";
if (!Object.is(this.name, tag)) {
return;
}
if (Object.is(action,'load')) {
if (Object.is(action,'load') || Object.is(action,'refresh')) {
this.refresh(data)
}
});
......
......@@ -79,6 +79,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
if (Object.is('load', action)) {
this.load(data);
}
if (Object.is('refresh', action)) {
this.refresh(data);
}
});
}
}
......
......@@ -79,6 +79,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
if (Object.is('load', action)) {
this.load(data);
}
if (Object.is('refresh', action)) {
this.refresh(data);
}
});
}
}
......
......@@ -59,7 +59,7 @@
</#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
<#assign refview = ctrl.getPortletPSAppView()><#t>
<${srffilepath2(refview.getCodeName())} :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></${srffilepath2(refview.getCodeName())}>
<${srffilepath2(refview.getCodeName())} :portletState="viewState" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></${srffilepath2(refview.getCodeName())}>
</div>
<#-- 菜单 -->
<#elseif ctrl.getPortletType() == 'APPMENU'><#t>
......@@ -365,6 +365,20 @@ import { Environment } from '@/environments/environment';
}
}
/**
* 刷新
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh(args?: any) {
<#if ctrl.getPortletType?? && ctrl.getPortletType()?? && ctrl.getPortletType() == "VIEW">
this.viewState.next({ tag: '${ctrl.getPortletPSAppView().getName()}', action: 'refresh', data: args });
</#if>
<#if ctrl.getPortletType?? && ctrl.getPortletType()?? && (ctrl.getPortletType() == "CHART" || ctrl.getPortletType() == "LIST")>
this.viewState.next({ tag: '${ctrl.getName()}', action: 'refresh', data: args });
</#if>
}
/**
* vue 生命周期
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册