提交 fa747b21 编写于 作者: KK's avatar KK

地图逻辑调整

上级 0af52455
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<#assign import_block> <#assign import_block>
import echarts from 'echarts'; import echarts from 'echarts';
import 'echarts/map/js/china.js' import 'echarts/map/js/china.js'
import { Http } from "@/ibiz-core/utils";
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
...@@ -190,11 +191,10 @@ import 'echarts/map/js/china.js' ...@@ -190,11 +191,10 @@ import 'echarts/map/js/china.js'
* @type {} * @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base * @memberof ${srfclassname('${ctrl.name}')}Base
*/ */
public mapItems = [ public mapItems = {
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??> <#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem> <#list ctrl.getPSSysMapItems() as mapitem>
{ '${mapitem.getItemType()}'{
type:'${mapitem.getItemType()}',
bkcolor:'<#if mapitem.getBKColorPSAppDEField?? && mapitem.getBKColorPSAppDEField()??>${mapitem.getBKColorPSAppDEField().getCodeName()?lower_case}</#if>', bkcolor:'<#if mapitem.getBKColorPSAppDEField?? && mapitem.getBKColorPSAppDEField()??>${mapitem.getBKColorPSAppDEField().getCodeName()?lower_case}</#if>',
color:'<#if mapitem.getColorPSAppDEField?? && mapitem.getColorPSAppDEField()??>${mapitem.getColorPSAppDEField().getCodeName()?lower_case}</#if>', color:'<#if mapitem.getColorPSAppDEField?? && mapitem.getColorPSAppDEField()??>${mapitem.getColorPSAppDEField().getCodeName()?lower_case}</#if>',
content:'<#if mapitem.getContentPSDEField?? && mapitem.getContentPSDEField()??>${mapitem.getContentPSDEField().getCodeName()?lower_case}</#if>', content:'<#if mapitem.getContentPSDEField?? && mapitem.getContentPSDEField()??>${mapitem.getContentPSDEField().getCodeName()?lower_case}</#if>',
...@@ -205,7 +205,7 @@ import 'echarts/map/js/china.js' ...@@ -205,7 +205,7 @@ import 'echarts/map/js/china.js'
}, },
</#list> </#list>
</#if> </#if>
] }
//点击弹出 //点击弹出
public tooltip = { public tooltip = {
......
...@@ -12,9 +12,8 @@ ...@@ -12,9 +12,8 @@
</#if> </#if>
</#list> </#list>
</#if> </#if>
Object.assign(response.data,<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??><#list ctrl.getPSSysMapItems() as mapitem><#if mapitem.getPSAppDEDataSet?? && mapitem.getPSAppDEDataSet()??>{${mapitem.getName()}:${mapitem.getName()}Data}<#if mapitem_has_next>,</#if></#if></#list></#if>)
let responseData = { let responseData = {
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??><#list ctrl.getPSSysMapItems() as mapitem><#if mapitem.getPSAppDEDataSet?? && mapitem.getPSAppDEDataSet()??>${mapitem.getName()}:${mapitem.getName()}Data<#if mapitem_has_next>,</#if></#if></#list></#if>) <#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??><#list ctrl.getPSSysMapItems() as mapitem><#if mapitem.getPSAppDEDataSet?? && mapitem.getPSAppDEDataSet()??>${mapitem.getName()}:${mapitem.getName()}Data.data<#if mapitem_has_next>,</#if></#if></#list></#if>
} }
let response = new HttpResponse(200,responseData); let response = new HttpResponse(200,responseData);
return response; return response;
...@@ -27,7 +26,7 @@ ...@@ -27,7 +26,7 @@
public async ${mapitem.getName()}_${mapitem.getPSAppDEDataSet().getCodeName()}(data:any){ public async ${mapitem.getName()}_${mapitem.getPSAppDEDataSet().getCodeName()}(data:any){
const service: any = await this.getService('<#if mapitem.getPSDataEntity?? && mapitem.getPSDataEntity()??>${mapitem.getPSDataEntity().getName()?lower_case}</#if>'); const service: any = await this.getService('<#if mapitem.getPSDataEntity?? && mapitem.getPSDataEntity()??>${mapitem.getPSDataEntity().getName()?lower_case}</#if>');
if(service){ if(service){
const response: any await service.${mapitem.getPSAppDEDataSet().getCodeName()}(data); const response: any = await service.${mapitem.getPSAppDEDataSet().getCodeName()}(data);
if(!response.isError()){ if(!response.isError()){
return response return response
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册