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

Merge branch 'dev'

上级 a0410458
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<template v-if="Object.is(mode,'horizontal')"> <template v-if="Object.is(mode,'horizontal')">
<template v-for="item0 in menus"> <template v-for="item0 in menus">
<template v-if="item0.items && Array.isArray(item0.items) && item0.items.length > 0"> <template v-if="item0.items && Array.isArray(item0.items) && item0.items.length > 0">
<el-submenu v-show="!item0.hidden" :index="item0.name" :popper-class="popperClass" :key="item0.id"> <el-submenu v-show="!item0.hidden" :index="item0.name" :popper-class="popperClass" :key="item0.id" :class="item0.textcls">
<template slot='title'> <template slot='title'>
<template v-if="item0.icon && item0.icon != ''"> <template v-if="item0.icon && item0.icon != ''">
<img :src="item0.icon" class='app-menu-icon' /> <img :src="item0.icon" class='app-menu-icon' />
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</template> </template>
<template v-for="item1 in item0.items"> <template v-for="item1 in item0.items">
<template v-if="item1.items && Array.isArray(item1.items) && item1.items.length > 0"> <template v-if="item1.items && Array.isArray(item1.items) && item1.items.length > 0">
<el-submenu v-show="!item1.hidden" :index="item1.name" :popper-class="popperClass" :key="item1.id"> <el-submenu v-show="!item1.hidden" :index="item1.name" :popper-class="popperClass" :key="item1.id" :class="item1.textcls">
<template slot='title'> <template slot='title'>
<template v-if="item1.icon && item1.icon != ''"> <template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' /> <img :src="item1.icon" class='app-menu-icon' />
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</template> </template>
<template v-for="item2 in item1.items"> <template v-for="item2 in item1.items">
<template v-if="item2.type =='MENUITEM'"> <template v-if="item2.type =='MENUITEM'">
<el-menu-item v-show="!item2.hidden" :index="item2.name" :key="item2.id"> <el-menu-item v-show="!item2.hidden" :index="item2.name" :key="item2.id" :class="item2.textcls">
<template v-if="item2.icon && item2.icon != ''"> <template v-if="item2.icon && item2.icon != ''">
<img :src="item2.icon" class='app-menu-icon' /> <img :src="item2.icon" class='app-menu-icon' />
</template> </template>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</template> </template>
<template v-else> <template v-else>
<template v-if="item1.type =='MENUITEM'"> <template v-if="item1.type =='MENUITEM'">
<el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id"> <el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id" :class="item1.textcls">
<template v-if="item1.icon && item1.icon != ''"> <template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' /> <img :src="item1.icon" class='app-menu-icon' />
</template> </template>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</template> </template>
<template v-else> <template v-else>
<template v-if="item0.type =='MENUITEM'"> <template v-if="item0.type =='MENUITEM'">
<el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id"> <el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id" :class="item0.textcls">
<template v-if="item0.icon && item0.icon != ''"> <template v-if="item0.icon && item0.icon != ''">
<img :src="item0.icon" class='app-menu-icon' /> <img :src="item0.icon" class='app-menu-icon' />
</template> </template>
......
...@@ -32,13 +32,21 @@ ...@@ -32,13 +32,21 @@
</#macro> </#macro>
<#if (layout == 'TABLE_24COL' || layout == 'TABLE_12COL') && LayoutPos??><#t> <#if (layout == 'TABLE_24COL' || layout == 'TABLE_12COL') && LayoutPos??><#t>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: <@format_numer LayoutPos.getColXS()*multiple/>, offset: <#if LayoutPos.getColXSOffset() != -1><@format_numer LayoutPos.getColXSOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: <@format_numer LayoutPos.getColSM()*multiple />, offset: <#if LayoutPos.getColSMOffset() != -1><@format_numer LayoutPos.getColSMOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: <@format_numer LayoutPos.getColMD()*multiple />, offset: <#if LayoutPos.getColMDOffset() != -1><@format_numer LayoutPos.getColMDOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: <@format_numer LayoutPos.getColLG()*multiple />, offset: <#if LayoutPos.getColLGOffset() != -1><@format_numer LayoutPos.getColLGOffset()*multiple /><#else>0</#if> }"</#if>> <i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: <@format_numer LayoutPos.getColXS()*multiple/>, offset: <#if LayoutPos.getColXSOffset() != -1><@format_numer LayoutPos.getColXSOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: <@format_numer LayoutPos.getColSM()*multiple />, offset: <#if LayoutPos.getColSMOffset() != -1><@format_numer LayoutPos.getColSMOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: <@format_numer LayoutPos.getColMD()*multiple />, offset: <#if LayoutPos.getColMDOffset() != -1><@format_numer LayoutPos.getColMDOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: <@format_numer LayoutPos.getColLG()*multiple />, offset: <#if LayoutPos.getColLGOffset() != -1><@format_numer LayoutPos.getColLGOffset()*multiple /><#else>0</#if> }"</#if>>
<#if portlet.getPSPortlets?? && portlet.getPSPortlets()??>
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#else>
<card class="portlet-card custom-card" :bordered="false" dis-hover :padding="10">
</#if>
<#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content> <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<#if view.getViewStyle?? && view.getViewStyle()?? && (view.getViewStyle() == 'cardportal' || view.getViewStyle == 'entitydatakanbanviewcard' || view.getViewStyle() == 'entitydatakanbanunitsviewcard' )>
<a slot='extra'></a>
<#else>
<p slot='title'> <p slot='title'>
${portlet.getTitle()} ${portlet.getTitle()}
<span class="line"></span> <span class="line"></span>
</p> </p>
<a slot='extra'></a> <a slot='extra'></a>
</#if>
</#if> </#if>
<span> <span>
<@ibizindent blank=10><#t> <@ibizindent blank=10><#t>
...@@ -49,13 +57,21 @@ ...@@ -49,13 +57,21 @@
</i-col> </i-col>
<#-- ELSE:门户部件绘制,Flex --> <#-- ELSE:门户部件绘制,Flex -->
<#else> <#else>
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <#if portlet.getPSPortlets?? && portlet.getPSPortlets()??>
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#else>
<card class="portlet-card custom-card" :bordered="false" dis-hover :padding="10">
</#if>
<#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content> <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<#if view.getViewStyle?? && view.getViewStyle()?? && (view.getViewStyle() == 'cardportal' || view.getViewStyle == 'entitydatakanbanviewcard' || view.getViewStyle() == 'entitydatakanbanunitsviewcard' )>
<a slot='extra'></a>
<#else>
<p slot='title'> <p slot='title'>
${portlet.getTitle()} ${portlet.getTitle()}
<span class="line"></span> <span class="line"></span>
</p> </p>
<a slot='extra'></a> <a slot='extra'></a>
</#if>
</#if> </#if>
<span> <span>
<@ibizindent blank=10><#t> <@ibizindent blank=10><#t>
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
} }
} }
} }
} }
} }
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
......
...@@ -1216,6 +1216,9 @@ import schema from 'async-validator'; ...@@ -1216,6 +1216,9 @@ import schema from 'async-validator';
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
if(this.viewparams && this.viewparams.copymode){
data.srfuf = '0';
}
const post: Promise<any> = Object.is(data.srfuf, '1')?this.service.update(action, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(action,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(data.srfuf, '1')?this.service.update(action, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(action,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
...@@ -1224,7 +1227,7 @@ import schema from 'async-validator'; ...@@ -1224,7 +1227,7 @@ import schema from 'async-validator';
} }
return; return;
} }
this.viewparams.copymode = false;
const data = response.data; const data = response.data;
this.onFormLoad(data,'save'); this.onFormLoad(data,'save');
this.$emit('save', data); this.$emit('save', data);
......
...@@ -163,7 +163,13 @@ ...@@ -163,7 +163,13 @@
viewname: '${srffilepath2(dataview.getCodeName())}', height: ${dataview.getHeight()?c},width: ${dataview.getWidth()?c},title: <@getViewLanguageTitle dataview />,placement: '${dataview.getOpenMode()}', isRedirectView: <#if dataview.isRedirectView()>true<#else>false</#if>,deResParameters: <@getDeResParameters dataview />,parameters: <@getParameters dataview /> viewname: '${srffilepath2(dataview.getCodeName())}', height: ${dataview.getHeight()?c},width: ${dataview.getWidth()?c},title: <@getViewLanguageTitle dataview />,placement: '${dataview.getOpenMode()}', isRedirectView: <#if dataview.isRedirectView()>true<#else>false</#if>,deResParameters: <@getDeResParameters dataview />,parameters: <@getParameters dataview />
</#assign> </#assign>
</#if> </#if>
<app-column-link deKeyField='<#if dataview.isPSDEView()>${dataview.getPSAppDataEntity().getCodeName()?lower_case}</#if>' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{<#compress><#if appLinkView??>${appLinkView}</#if></#compress>}" valueitem="<#if item.getLinkValueItem()??>${item.getLinkValueItem()}</#if>"> <app-column-link
deKeyField='<#if dataview.isPSDEView()>${dataview.getPSAppDataEntity().getCodeName()?lower_case}</#if>'
:context="JSON.parse(JSON.stringify(context))"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:data="row"
:linkview="{<#compress><#if appLinkView??>${appLinkView}</#if></#compress>}"
valueitem="<#if item.getLinkValueItem()??>${item.getLinkValueItem()}</#if>">
<#-- BEGIN:常规显示 --> <#-- BEGIN:常规显示 -->
<#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??> <#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??>
<app-span name='${item.name}' editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :value="row.${item.getName()?lower_case}"></app-span> <app-span name='${item.name}' editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :value="row.${item.getName()?lower_case}"></app-span>
......
<template> <template>
<div class='grid' style="height:100%;"> <div class='grid' style="height:100%">
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<i-form style="height:100%"> <i-form style="height:100%;display:flex;flex-direction: column;justify-content: space-between">
<el-table v-if="isDisplay === true" <el-table v-if="isDisplay === true"
<#-- BEGIN:是否支持排序 --> <#-- BEGIN:是否支持排序 -->
<#if !ctrl.isNoSort()> <#if !ctrl.isNoSort()>
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
:show-summary="true && items.length > 0" :show-summary="true && items.length > 0"
:summary-method="getSummaries" :summary-method="getSummaries"
</#if> </#if>
<#-- 表格聚合end --> <#-- 表格聚合end -->
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
:highlight-current-row ="isSingleSelect" :highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName" :row-class-name="getRowClassName"
:cell-class-name="getCellClassName" :cell-class-name="getCellClassName"
...@@ -657,7 +656,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -657,7 +656,7 @@ import { FormItemModel } from '@/model/form-detail';
return; return;
} }
const data: any = response.data; const data: any = response.data;
this.totalrow = response.total; this.totalrow = response.data.length;
this.items = JSON.parse(JSON.stringify(data)); this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel // 清空selections,gridItemsModel
this.selections = []; this.selections = [];
...@@ -1407,7 +1406,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1407,7 +1406,7 @@ import { FormItemModel } from '@/model/form-detail';
return prev; return prev;
} }
}, 0); }, 0);
sums[index] = tempData; sums[index] = tempData.toFixed(3);
} }
<#elseif singleColumn.getAggMode() == "AVG"> <#elseif singleColumn.getAggMode() == "AVG">
if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){ if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){
...@@ -1419,7 +1418,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1419,7 +1418,7 @@ import { FormItemModel } from '@/model/form-detail';
return prev; return prev;
} }
}, 0); }, 0);
sums[index] = tempData/data.length; sums[index] = (tempData/data.length).toFixed(2);
} }
<#elseif singleColumn.getAggMode() == "MAX"> <#elseif singleColumn.getAggMode() == "MAX">
if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){ if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){
...@@ -1611,6 +1610,12 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1611,6 +1610,12 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public async save(args: any[], params?: any, $event?: any, xData?: any){ public async save(args: any[], params?: any, $event?: any, xData?: any){
let _this = this; let _this = this;
// 拷贝模式
if(_this.viewparams && _this.viewparams.copymode && Object.is(_this.viewparams.copymode,'true') && _this.items && _this.items.length >0){
for (const item of _this.items) {
item.rowDataState = 'create';
}
}
if(_this.items && _this.items.length >0){ if(_this.items && _this.items.length >0){
for (const item of _this.items) { for (const item of _this.items) {
if(Object.is(item.rowDataState, 'update')){ if(Object.is(item.rowDataState, 'update')){
......
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
display: inline; display: inline;
} }
.el-table { .el-table {
height: 100%;
display:flex;
flex-direction: column;
justify-content: start;
.el-table__row{ .el-table__row{
.grid-uiaction-divider { .grid-uiaction-divider {
padding:0 10px 0 10px; padding:0 10px 0 10px;
...@@ -94,9 +98,6 @@ ...@@ -94,9 +98,6 @@
} }
} }
} }
.el-table__body-wrapper{
height: calc(100% - 45px) !important;
}
} }
.ivu-modal-content{ .ivu-modal-content{
.footer{ .footer{
......
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if> <#if view.getViewStyle() != 'DEFAULT'>${view.getViewStyle()}</#if>"> <div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if> <#if view.getViewStyle() != 'DEFAULT'>${view.getViewStyle()?lower_case}</#if>">
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :disHover="true" :padding="0" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :disHover="true" :padding="0" :bordered="false">
......
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
<#if view.getViewStyle?? && view.getViewStyle()?? && view.getViewStyle()?lower_case == 'entitydatakanbanviewcard'>
.entitydatakanbanviewcard {
background-color: #F0F2F5;
box-shadow: none !important;
>.view-card {
background-color: #F0F2F5;
>.ivu-card-head{
display: none;
}
}
.portlet-card {
background-color: #f0f2f5;
}
.custom-card {
background-color: #ffffff;
margin: 5px;
box-shadow: 1px 1px 5px rgb(209, 205, 205);
.view-card {
background-color: #ffffff;
}
}
}
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/DATA_PANEL.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#ENTITYDATAKANBANVIEWCARD
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
<#if view.getViewStyle?? && view.getViewStyle()?? && view.getViewStyle()?lower_case == 'entitydatakanbanunitsviewcard'>
.entitydatakanbanunitsviewcard {
background-color: #F0F2F5;
box-shadow: none !important;
>.view-card {
background-color: #F0F2F5;
>.ivu-card-head{
display: none;
}
}
.portlet-card {
background-color: #f0f2f5;
}
.custom-card {
background-color: #ffffff;
margin: 5px;
box-shadow: 1px 1px 5px rgb(209, 205, 205);
.view-card {
background-color: #ffffff;
}
}
}
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/DATA_PANEL.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#ENTITYDATAKANBANUNITSVIEWCARD
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
display: block;
}
<#if view.getViewStyle?? && view.getViewStyle()?? && view.getViewStyle()?lower_case == 'cardportal'>
.cardportal {
background-color: #F0F2F5;
box-shadow: none !important;
.view-card {
background-color: #F0F2F5;
}
.portlet-card {
background-color: #f0f2f5;
}
.custom-card {
background-color: #ffffff;
margin: 5px;
box-shadow: 1px 1px 5px rgb(209, 205, 205);
.view-card {
background-color: #ffffff;
}
}
> .view-card > .ivu-card-body {
height: 100%;
}
}
</#if>
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if> <#if view.getViewStyle() != 'DEFAULT'>${view.getViewStyle()?lower_case}</#if>'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' dis-hover :bordered="false">
<div class='content-container'>
<div class='view-top-messages'>
</div>
<@ibizindent blank=12>
<#if view.hasPSControl('dashboard')>
${P.getCtrlCode('dashboard', 'CONTROL.html').code}
</#if>
</@ibizindent>
<div class='view-bottom-messages'>
</div>
</div>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#CARDPORTAL
\ No newline at end of file
...@@ -225,10 +225,11 @@ import { Environment } from '@/environments/environment'; ...@@ -225,10 +225,11 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public handleItemClick($event:any){ public handleItemClick($event:any){
let data: any = $event.params && Object.keys($event.params).length > 0 ? $event.params : null;
<#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??> <#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as appViewLogic> <#list ctrl.getPSAppViewLogics() as appViewLogic>
if(Object.is($event,'${appViewLogic.name}')){ if(Object.is($event.tag,'${appViewLogic.name}')){
this.${appViewLogic.name}(null); this.${appViewLogic.name}(data, $event.tag, $event.event);
} }
</#list> </#list>
</#if> </#if>
......
...@@ -44,13 +44,21 @@ ...@@ -44,13 +44,21 @@
<#if (layout == 'TABLE_24COL' || layout == 'TABLE_12COL') && LayoutPos??><#t> <#if (layout == 'TABLE_24COL' || layout == 'TABLE_12COL') && LayoutPos??><#t>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: <@format_numer LayoutPos.getColXS()*multiple/>, offset: <#if LayoutPos.getColXSOffset() != -1><@format_numer LayoutPos.getColXSOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: <@format_numer LayoutPos.getColSM()*multiple />, offset: <#if LayoutPos.getColSMOffset() != -1><@format_numer LayoutPos.getColSMOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: <@format_numer LayoutPos.getColMD()*multiple />, offset: <#if LayoutPos.getColMDOffset() != -1><@format_numer LayoutPos.getColMDOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: <@format_numer LayoutPos.getColLG()*multiple />, offset: <#if LayoutPos.getColLGOffset() != -1><@format_numer LayoutPos.getColLGOffset()*multiple /><#else>0</#if> }"</#if>> <i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: <@format_numer LayoutPos.getColXS()*multiple/>, offset: <#if LayoutPos.getColXSOffset() != -1><@format_numer LayoutPos.getColXSOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: <@format_numer LayoutPos.getColSM()*multiple />, offset: <#if LayoutPos.getColSMOffset() != -1><@format_numer LayoutPos.getColSMOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: <@format_numer LayoutPos.getColMD()*multiple />, offset: <#if LayoutPos.getColMDOffset() != -1><@format_numer LayoutPos.getColMDOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: <@format_numer LayoutPos.getColLG()*multiple />, offset: <#if LayoutPos.getColLGOffset() != -1><@format_numer LayoutPos.getColLGOffset()*multiple /><#else>0</#if> }"</#if>>
<div class="portlet-without-title"> <div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <#if portlet.getPSPortlets?? && portlet.getPSPortlets()??>
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#else>
<card class="portlet-card custom-card" :bordered="false" dis-hover :padding="10">
</#if>
<#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content> <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<#if view.getViewStyle?? && view.getViewStyle()?? && view.getViewStyle() != 'DEFAULT'>
<a slot='extra'></a>
<#else>
<p slot='title'> <p slot='title'>
${portlet.getTitle()} ${portlet.getTitle()}
<span class="line"></span> <span class="line"></span>
</p> </p>
<a slot='extra'></a> <a slot='extra'></a>
</#if>
</#if> </#if>
<span> <span>
<@ibizindent blank=14><#t> <@ibizindent blank=14><#t>
...@@ -63,13 +71,21 @@ ...@@ -63,13 +71,21 @@
<#-- BEGIN:子门户部件绘制,Flex --> <#-- BEGIN:子门户部件绘制,Flex -->
<#else> <#else>
<div class="portlet-without-title"> <div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <#if portlet.getPSPortlets?? && portlet.getPSPortlets()??>
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#else>
<card class="portlet-card custom-card" :bordered="false" dis-hover :padding="10">
</#if>
<#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content> <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'> <#if view.getViewStyle?? && view.getViewStyle()?? && view.getViewStyle() != 'DEFAULT'>
${portlet.getTitle()} <a slot='extra'></a>
<span class="line"></span> <#else>
</p> <p slot='title'>
<a slot='extra'></a> ${portlet.getTitle()}
<span class="line"></span>
</p>
<a slot='extra'></a>
</#if>
</#if> </#if>
<span> <span>
<@ibizindent blank=14><#t> <@ibizindent blank=14><#t>
......
...@@ -8,11 +8,14 @@ ...@@ -8,11 +8,14 @@
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
type='number' type='number'
<#if item.getPSAppDEField()?? && item.getPSAppDEField().getPSDEField()?? && item.getPSAppDEField().getPSDEField().getPrecision??> <#if item.getPSAppDEField()?? && item.getPSAppDEField().getPSDEField()?? && item.getPSAppDEField().getPSDEField().getPrecision??>
<#if item.getPSAppDEField().getPSDEField().getDataType() == 'FLOAT' && item.getPSAppDEField().getPSDEField().getPrecision() == 0> <#assign datatype = item.getPSAppDEField().getPSDEField().getDataType()>
<#if datatype=='DOUBLE' || datatype=='DECIMAL' || datatype=='FLOAT' || datatype=='BIGDECIMAL'>
<#if item.getPSAppDEField().getPSDEField().getPrecision() == 0>
:precision="2" :precision="2"
<#else> <#else>
:precision="${item.getPSAppDEField().getPSDEField().getPrecision()?c}" :precision="${item.getPSAppDEField().getPSDEField().getPrecision()?c}"
</#if> </#if>
</#if>
</#if> </#if>
<#if editor.getPlaceHolder()??>placeholder="${editor.getPlaceHolder()}"</#if> <#if editor.getPlaceHolder()??>placeholder="${editor.getPlaceHolder()}"</#if>
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
......
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<input-box v-model="data.${editor.name}" @enter="onEnter($event)" <#if item.getUnitName()??> unit="${item.getUnitName()}"</#if> :disabled="detailsModel.${editor.name}.disabled" type='text' <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> style="${editor.getEditorCssStyle()}"></input-box> <input-box
v-model="data.${editor.name}"
@enter="onEnter($event)"
<#if item.getUnitName()??> unit="${item.getUnitName()}"</#if>
:disabled="detailsModel.${editor.name}.disabled"
type='<#if item.getPSDEField?? && item.getPSDEField()??><#assign datatype=srfjavatype(item.getPSDEField().getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>text</#if><#else>text</#if>'
<#if item.getPSDEField?? && item.getPSDEField()?? && item.getPSDEField().getPrecision??>
<#assign datatype=srfjavatype(item.getPSDEField().getStdDataType())>
<#if datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>
<#if item.getPSDEField().getPrecision() == 0>
:precision="2"
<#else>
:precision="${item.getPSDEField().getPrecision()?c}"
</#if>
</#if>
</#if>
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
style="${editor.getEditorCssStyle()}">
</input-box>
</#if> </#if>
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) { public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) { <#-- if (args.length === 0) {
return; return;
} }
const _this: any = this; const _this: any = this;
...@@ -28,5 +28,20 @@ ...@@ -28,5 +28,20 @@
xData.copy(args[0].srfkey); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} -->
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
<#if appde??>Object.assign(data, { ${appde.codeName?lower_case}: args[0].${appde.codeName?lower_case} });</#if>
}
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
Object.assign(this.viewparams,{copymode:true});
} }
} }
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* @param {*} [xData] * @param {*} [xData]
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}
*/ */
public ${item.name}(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) { public ${item.name}(args: any[],fullargs?:any,params?: any, $event?: any, xData?: any) {
<#if item.getPSControlContainer().getViewType??> <#if item.getPSControlContainer().getViewType??>
if(!this.viewDefaultUsage){ if(!this.viewDefaultUsage){
if(Object.is(this.navModel,"route")){ if(Object.is(this.navModel,"route")){
...@@ -156,6 +156,9 @@ ...@@ -156,6 +156,9 @@
<#elseif dataview.getOpenMode() == 'INDEXVIEWTAB' || dataview.getOpenMode() == ''> <#elseif dataview.getOpenMode() == 'INDEXVIEWTAB' || dataview.getOpenMode() == ''>
<#-- 打开顶级分页视图 --> <#-- 打开顶级分页视图 -->
const _this: any = this; const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openIndexViewTab = (data: any) => { const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data); const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
<#if dataview.getViewType() == "DEWFDYNAEDITVIEW" > <#if dataview.getViewType() == "DEWFDYNAEDITVIEW" >
...@@ -168,11 +171,17 @@ ...@@ -168,11 +171,17 @@
<#elseif dataview.getOpenMode() == 'POPUPAPP'> <#elseif dataview.getOpenMode() == 'POPUPAPP'>
<#-- 打开独立程序弹出 --> <#-- 打开独立程序弹出 -->
const _this: any = this; const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data); const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
window.open('./#'+routePath, '_blank'); window.open('./#'+routePath, '_blank');
<#elseif dataview.getOpenMode() = 'POPUPMODAL'> <#elseif dataview.getOpenMode() = 'POPUPMODAL'>
<#-- 打开模态 --> <#-- 打开模态 -->
const _this: any = this; const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openPopupModal = (view: any, data: any) => { const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(view, tempContext, data); let container: Subject<any> = this.$appmodal.openModal(view, tempContext, data);
container.subscribe((result: any) => { container.subscribe((result: any) => {
...@@ -195,6 +204,9 @@ ...@@ -195,6 +204,9 @@
<#elseif dataview.getOpenMode()?index_of('DRAWER') == 0> <#elseif dataview.getOpenMode()?index_of('DRAWER') == 0>
<#-- 打开抽屉 --> <#-- 打开抽屉 -->
const _this: any = this; const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openDrawer = (view: any, data: any) => { const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data); let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => { container.subscribe((result: any) => {
...@@ -218,6 +230,9 @@ ...@@ -218,6 +230,9 @@
<#elseif dataview.getOpenMode() == 'POPOVER'> <#elseif dataview.getOpenMode() == 'POPOVER'>
<#-- 打开气泡卡片 --> <#-- 打开气泡卡片 -->
const _this: any = this; const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openPopOver = (view: any, data: any) => { const openPopOver = (view: any, data: any) => {
let container: Subject<any> = this.$apppopover.openPop($event, view, tempContext, data); let container: Subject<any> = this.$apppopover.openPop($event, view, tempContext, data);
container.subscribe((result: any) => { container.subscribe((result: any) => {
......
<#assign self_viewparam>
this.$forceUpdate();
</#assign>
<#assign self_content>
/**
* 加载数据
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public loadModel(){
<#assign appDataEntity = view.getPSAppDataEntity() />
if(this.context.${appDataEntity.getCodeName()?lower_case}){
this.appEntityService.getDataInfo(JSON.parse(JSON.stringify(this.context)),{},false).then((response:any) =>{
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
this.viewState.next({ tag: 'app-actionbar', action: 'loadmodel', data:_data});
if (_data.${appDataEntity.getMajorPSAppDEField().getCodeName()?lower_case}) {
Object.assign(this.model, { dataInfo: _data.${appDataEntity.getMajorPSAppDEField().getCodeName()?lower_case} });
if(this.$tabPageExp){
let _this:any = this;
this.$tabPageExp.setCurPageCaption(_this.$t(this.model.srfTitle), _this.$t(this.model.srfTitle), _this.model.dataInfo);
}
if(this.$route){
this.$route.meta.info = this.model.dataInfo;
}
<#noparse>Object.assign(this.model, { srfTitle: `${this.$t(this.model.srfTitle)} - ${this.model.dataInfo}` });</#noparse>
}
})
}
}
</#assign>
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEPORTALVIEW#ENTITYDATAKANBANVIEWCARD
\ No newline at end of file
<#assign self_viewparam>
this.$forceUpdate();
</#assign>
<#assign created_block>
if(this.formDruipart){
this.formDruipart.subscribe((res:any) =>{
if(Object.is(res.action,'load')){
const _this: any = this;
_this.engine.load(res.data,true);
}
});
}
</#assign>
<#assign self_content>
/**
* 加载数据
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public loadModel(){
<#assign appDataEntity = view.getPSAppDataEntity() />
if(this.context.${appDataEntity.getCodeName()?lower_case}){
this.appEntityService.getDataInfo(JSON.parse(JSON.stringify(this.context)),{},false).then((response:any) =>{
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
this.viewState.next({ tag: 'app-actionbar', action: 'loadmodel', data:_data});
if (_data.${appDataEntity.getMajorPSAppDEField().getCodeName()?lower_case}) {
Object.assign(this.model, { dataInfo: _data.${appDataEntity.getMajorPSAppDEField().getCodeName()?lower_case} });
if(this.$tabPageExp){
let _this:any = this;
this.$tabPageExp.setCurPageCaption(_this.$t(this.model.srfTitle), _this.$t(this.model.srfTitle), _this.model.dataInfo);
}
if(this.$route){
this.$route.meta.info = this.model.dataInfo;
}
<#noparse>Object.assign(this.model, { srfTitle: `${this.$t(this.model.srfTitle)} - ${this.model.dataInfo}` });</#noparse>
}
})
}
}
</#assign>
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 是否嵌入关系界面
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Prop({default:false}) public isformDruipart?: boolean;
/**
* 界面关系通讯对象
*
* @type {Subject<ViewState>}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Prop() public formDruipart!: Subject<ViewState>;
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEPORTALVIEW9#ENTITYDATAKANBANUNITSVIEWCARD
\ No newline at end of file
<#assign mounted_block>
this.viewState.next({ tag: 'dashboard', action: 'load', data: {} });
</#assign>
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 应用起始页面
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base
*/
public isDefaultPage: boolean = ${view.isDefaultPage()?c};
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPPORTALVIEW#CARDPORTAL
\ No newline at end of file
...@@ -52,6 +52,8 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -52,6 +52,8 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.${minorPSAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case} = null; item.${minorPSAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case} = null;
<#-- 置空父键 -->
if(item.hasOwnProperty('${majorPSAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}') && item.${majorPSAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}) item.${majorPSAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case} = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
...@@ -529,7 +531,8 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -529,7 +531,8 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#if afterlogic.getPSDELogic()?? && afterlogic.getPSDELogic().getLogicHolder?? && afterlogic.getPSDELogic().getLogicHolder()?? && (afterlogic.getPSDELogic().getLogicHolder() == 2 || afterlogic.getPSDELogic().getLogicHolder() == 3)> <#if afterlogic.getPSDELogic()?? && afterlogic.getPSDELogic().getLogicHolder?? && afterlogic.getPSDELogic().getLogicHolder()?? && (afterlogic.getPSDELogic().getLogicHolder() == 2 || afterlogic.getPSDELogic().getLogicHolder() == 3)>
<#assign singleLogic = afterlogic.getPSDELogic() /> <#assign singleLogic = afterlogic.getPSDELogic() />
<@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(res))});</@compress> <@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(res))});</@compress>
<@compress single_line=true>res = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,res.data,isloading?true:false);</@compress> <@compress single_line=true>let returndata:any = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,res.data,isloading?true:false);</@compress>
res ={status:200,data:returndata};
</#if> </#if>
</#list> </#list>
</#if> </#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册