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

新增门户部件刷新

上级 c3a721d8
...@@ -437,7 +437,7 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -437,7 +437,7 @@ import CodeListService from "@/codelist/codelist-service";
if (!Object.is(this.name, tag)) { if (!Object.is(this.name, tag)) {
return; return;
} }
if (Object.is(action,'load')) { if (Object.is(action,'load') || Object.is(action,'refresh')) {
this.refresh(data) this.refresh(data)
} }
}); });
......
...@@ -79,6 +79,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -79,6 +79,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
if (Object.is('load', action)) { if (Object.is('load', action)) {
this.load(data); this.load(data);
} }
if (Object.is('refresh', action)) {
this.refresh(data);
}
}); });
} }
} }
......
...@@ -79,6 +79,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -79,6 +79,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
if (Object.is('load', action)) { if (Object.is('load', action)) {
this.load(data); this.load(data);
} }
if (Object.is('refresh', action)) {
this.refresh(data);
}
}); });
} }
} }
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</#if> </#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>"> <div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
<#assign refview = ctrl.getPortletPSAppView()><#t> <#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> </div>
<#-- 菜单 --> <#-- 菜单 -->
<#elseif ctrl.getPortletType() == 'APPMENU'><#t> <#elseif ctrl.getPortletType() == 'APPMENU'><#t>
...@@ -365,6 +365,20 @@ import { Environment } from '@/environments/environment'; ...@@ -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 生命周期 * vue 生命周期
* *
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册