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

Merge branch 'dev'

......@@ -34,6 +34,9 @@
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.list-exp-bar-content {
......
......@@ -61,6 +61,29 @@
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public newdata: any;
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public opendata: any;
</#if>
</#list>
</#if>
/**
* 视图唯一标识
*
......
......@@ -3,6 +3,16 @@
<#if view.getViewType() == 'DEDATAVIEWEXPVIEW'>
:viewUID="viewUID"
</#if>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
:newdata="newdata"
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
:opendata="opendata"
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
......@@ -34,6 +34,9 @@
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.dataview-exp-bar-content {
......
<template>
<div>
<#if ctrl.getQuickSearchMode() gt 0>
<i-input v-model="query" @on-change="onQueryChange" placeholder="<#if ctrl.getPSSearchBarQuickSearchs()??><#list ctrl.getPSSearchBarQuickSearchs() as search><#if search_index gt 0>,</#if><#if search.getPSDEField()??>${search.getPSDEField().getLogicName()}</#if></#list></#if>" style="<#if ctrl.getQuickSearchWidth() gt 0>width: ${ctrl.getQuickSearchWidth()?c}px;</#if>"></i-input>
</#if>
<div v-if="filterFields.length > 0" class="filter-group">
<template v-for="(item, index) of filterItems">
<filter-item :key="index" :data="item" :filterFields="filterFields">
<template slot-scope="{data}">
<#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter>
<template v-if="Object.is(data.field, '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>')">
${P.getEditorCode(filter, "EDITOR.vue").code}
</template>
</#list>
</#if>
</template>
</filter-item>
</template>
</div>
</div>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 快速搜索值
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public query: string = '';
/**
* 过滤属性集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
get filterFields() {
return Object.vals(this.detailsModel);
}
/**
* 过滤属性模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public detailsModel: any = {
<#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter>
'${filter.getName()}': {
label: '${filter.getCaption()}',
prop: '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>',
disabled: false
},
</#list>
</#if>
};
/**
* 过滤项集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public filterItems: any[] = [];
/**
* 获取多项数据
*
......@@ -25,6 +88,27 @@
return null;
}
/**
* 快速搜索框值变化
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onQueryChange($event: any) {
this.$emit('on-change', { query: this.query });
}
/**
* 过滤项值变化
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onFilterChange($event: any) {
this.$emit('on-change', { filter: '' });
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
<#-- content -->
<#assign content>
@on-change="onSearchBarChange"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
......@@ -139,6 +139,17 @@
this.afterCreated();
}
/**
* 生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mounted(){
if(this.items.length>0){
this.isShowSlot?this.tabPanelClick(this.items[0].name):this.items.length>1?this.tabPanelClick(this.items[1].name):()=>{};
}
}
/**
* 执行created后的逻辑
*
......
.drtab{
height:100%;
overflow: auto;
.app-dr-tab {
height: 100%;
>.ivu-tabs-bar {
......
......@@ -28,12 +28,15 @@
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
padding: 10px;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.calendar-exp-bar-content {
......
......@@ -374,9 +374,11 @@ FullCalendar,
let handleEvents = ()=>{
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events[0]));
let tempEvent = JSON.parse(JSON.stringify(_this.events.length > 0?_this.events[0]:{}));
_this.onEventClick(tempEvent,true);
_this.events[0].className = "select-first-event";
if(_this.events.length > 0){
_this.events[0].className = "select-first-event";
}
_this.calendarClass = "calendar select-first-calendar";
}
let filterEvents = this.events.filter((event:any)=>{
......
......@@ -6,7 +6,15 @@
<div slot='left'>
<#if ctrl.isShowTitleBar()>
<div class='tree-exp-bar-header'>
<div><#if ctrl.getTitle() == ''>树视图导航栏<#else>${ctrl.getTitle()}</#if></div>
<div class="tree-exp-bar-title"><#if ctrl.getTitle() == ''>树视图导航栏<#else>${ctrl.getTitle()}</#if></div>
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "TOOLBAR">
${P.getCtrlCode(singleControl, 'CONTROL.html').code}
</#if>
</#list>
</#if>
</div>
</#if>
<#if ctrl.isEnableSearch()>
......@@ -46,6 +54,29 @@
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public newdata: any;
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public opendata: any;
</#if>
</#list>
</#if>
/**
* 视图唯一标识
*
......@@ -369,6 +400,15 @@
this.$emit('load', $event);
}
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "TOOLBAR">
${P.getCtrlCode(singleControl, 'CONTROL.vue').code}
</#if>
</#list>
</#if>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -2,6 +2,16 @@
<#if view.getViewType() == 'DETREEEXPVIEW'>
:viewUID="viewUID"
</#if>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
:newdata="newdata"
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
:opendata="opendata"
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
......@@ -14,14 +14,27 @@
.tree-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
>div {
display: flex;
justify-content: space-between;
.tree-exp-bar-title {
font-size: 18px;
padding-left: 8px;
flex-shrink: 0;
i {
font-size: 20px;
margin-top: -2px;
}
}
.toolbar-container{
margin-left: auto;
margin-right: 10px;
display: flex;
flex-wrap: wrap;
align-items: center;
.ivu-badge-count{
top: 2px;
}
}
}
.search-content {
width: 100%;
......
......@@ -14,7 +14,7 @@ new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'>
new FormPartModel({ ${detail} })
<#elseif item.getDetailType() == 'GROUPPANEL'>
new FormGroupPanelModel({ ${detail}, uiActionGroup: { caption: '<#if item.getPSUIActionGroup()??>${item.getPSUIActionGroup().getName()}</#if>', langbase: '<#if langbase??>${langbase}</#if>', extractMode: '<#if item.getActionGroupExtractMode?? && item.getActionGroupExtractMode()??>${item.getActionGroupExtractMode()}<#else>ITEM</#if>', details: [<#if item.getPSUIActionGroup()??><#list item.getPSUIActionGroup().getPSUIActionGroupDetails() as uadetails><#if uadetails_index gt 0>, </#if>{ name: '${item.getName()}_${uadetails.getName()}', caption: '${uadetails.getPSUIAction().getCaption()}', uiactiontag: '${uadetails.getPSUIAction().getUIActionTag()?lower_case}'<#if uadetails.getPSUIAction().getPSSysImage()??>, <#assign viewimg=uadetails.getPSUIAction().getPSSysImage()/><#if viewimg.getCssClass() != ''>icon: '${viewimg.getCssClass()}'<#else>img: '${viewimg.getImagePath()}'</#if></#if>,isShowCaption:${uadetails.isShowCaption()?c},isShowIcon:${uadetails.isShowIcon()?c} }</#list></#if>] } })
new FormGroupPanelModel({ ${detail}, uiActionGroup: { caption: '<#if item.getPSUIActionGroup()??>${item.getPSUIActionGroup().getName()}</#if>', langbase: '<#if langbase??>${langbase}</#if>', extractMode: '<#if item.getActionGroupExtractMode?? && item.getActionGroupExtractMode()??>${item.getActionGroupExtractMode()}<#else>ITEM</#if>', details: [<#if item.getPSUIActionGroup()??><#list item.getPSUIActionGroup().getPSUIActionGroupDetails() as uadetails><#if uadetails_index gt 0>, </#if>{ name: '${item.getName()}_${uadetails.getName()}', caption: '${uadetails.getPSUIAction().getCaption()}', uiactiontag: '<#if uadetails.getPSUIAction().getPSAppDataEntity?? && uadetails.getPSUIAction().getPSAppDataEntity()??>${uadetails.getPSUIAction().getPSAppDataEntity().getCodeName()?lower_case}_</#if>${uadetails.getPSUIAction().getUIActionTag()?lower_case}'<#if uadetails.getPSUIAction().getPSSysImage()??>, <#assign viewimg=uadetails.getPSUIAction().getPSSysImage()/><#if viewimg.getCssClass() != ''>icon: '${viewimg.getCssClass()}'<#else>img: '${viewimg.getImagePath()}'</#if></#if>,isShowCaption:${uadetails.isShowCaption()?c},isShowIcon:${uadetails.isShowIcon()?c} }</#list></#if>] } })
<#elseif item.getDetailType() == 'IFRAME'>
new FormIFrameModel({ ${detail} })
<#elseif item.getDetailType() == 'RAWITEM'>
......
......@@ -19,7 +19,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Inject('navModel')
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
......
......@@ -34,6 +34,9 @@
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.grid-exp-bar-content {
......
......@@ -4,6 +4,9 @@
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#if view.getViewType() == "DEGRIDVIEW9">
<#if view.hasPSControl('searchbar')>
${P.getCtrlCode('searchbar', 'CONTROL.html').code}
</#if>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
......@@ -39,6 +42,9 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code}
</#if>
<#-- END:快速搜索或工具栏存在 -->
<#if view.getViewType() != "DEGRIDVIEW9">
<#if view.hasPSControl('searchbar')>
${P.getCtrlCode('searchbar', 'CONTROL.html').code}
</#if>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
......
......@@ -41,7 +41,7 @@
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
</header>
<content :class="{'index_content':true,'index_tab_content':Object.is(navModel,'tab')?true:false,'index_route_content':Object.is(navModel,'route')?true:false}" :style="{'width':this.collapseChange ? 'calc(100vw - 64px)' : 'calc(100vw - 200px)' }">
<content :class="{'index_content':true,'index_tab_content':Object.is(navModel,'tab')?true:false,'index_route_content':Object.is(navModel,'route')?true:false}" :style="{'width':this.collapseChange ? 'calc(100vw - 64px)' : 'calc(100vw - 200px)' }" @click="contextMenuDragVisiable=false">
<tab-page-exp v-if="Object.is(navModel,'tab')"></tab-page-exp>
<app-keep-alive :routerList="getRouterList">
<router-view :key="getRouterViewKey"></router-view>
......@@ -72,7 +72,7 @@
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
</header>
<content style="height:calc(100vh - 50px);">
<content style="height:calc(100vh - 50px);" @click="contextMenuDragVisiable=false">
<router-view></router-view>
</content>
</layout>
......
......@@ -184,7 +184,7 @@ import { Environment } from '@/environments/environment';
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Inject('navModel')
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
<#if ctrl.getPortletType() == 'ACTIONBAR'>
......
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
<app-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
......@@ -12,4 +12,4 @@
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
</app-group-select>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
<app-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
......@@ -12,4 +12,4 @@
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
</app-group-select>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
<app-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
......@@ -12,4 +12,4 @@
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
</app-group-select>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
<app-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
......@@ -12,4 +12,4 @@
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
</app-group-select>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
<app-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
......@@ -10,4 +10,4 @@
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
</app-group-select>
......@@ -282,6 +282,18 @@ if(this.formDruipart){
this.onSearch($event);
}
</#if>
<#if view.hasPSControl('searchbar')>
/**
* 搜索栏事件
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}Base
*/
public onSearchBarChange($event: any) {
console.log($event);
}
</#if>
<#ibizinclude>
./VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -234,9 +234,9 @@
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public initNavDataWithRoute(data:any = null){
public initNavDataWithRoute(data:any = null, isNew:boolean = false){
if(this.viewDefaultUsage && Object.is(this.navModel,"route")){
this.navDataService.addNavData({id:'${srffilepath2(view.getCodeName())}',tag:this.viewtag,srfkey:<#if appde??>this.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
this.navDataService.addNavData({id:'${srffilepath2(view.getCodeName())}',tag:this.viewtag,srfkey:isNew ? null : <#if appde??>this.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
......
......@@ -131,7 +131,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Inject('navModel')
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
</#if>
......
......@@ -12,7 +12,6 @@ import i18n from '@/locale'
import 'element-ui/lib/theme-chalk/index.css';
import 'view-design/dist/styles/iview.css';
import 'ibiz-vue-lib/lib/ibiz-vue-lib.css';
import '@/styles/default.less';
// 模拟数据
......
......@@ -82,7 +82,7 @@ export default {
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
uiactions: {
<#list ctrl.getPSUIActions() as obj>
${obj.getUIActionTag()?lower_case}: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
<#if obj.getPSAppDataEntity?? && obj.getPSAppDataEntity()??>${obj.getPSAppDataEntity().getCodeName()?lower_case}_</#if>${obj.getUIActionTag()?lower_case}: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list>
},
</#if>
......
......@@ -81,7 +81,7 @@ export default {
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
uiactions: {
<#list ctrl.getPSUIActions() as obj>
${obj.getUIActionTag()?lower_case}: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
<#if obj.getPSAppDataEntity?? && obj.getPSAppDataEntity()??>${obj.getPSAppDataEntity().getCodeName()?lower_case}_</#if>${obj.getUIActionTag()?lower_case}: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list>
},
</#if>
......
......@@ -91,33 +91,66 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#if singleServiceApi.getRequestParamType() == "NONE">
<#-- 无参数情况start -->
if(${condition}true){
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
res.data.${item.getCodeName()?lower_case} = data.${item.getCodeName()?lower_case};
<@setStore appEntity=item />
return res;
}
<#-- 无参数情况end -->
<#elseif singleServiceApi.getRequestParamType() == "FIELD">
<#-- 指定属性情况start -->
if(${condition}context.${item.getCodeName()?lower_case}){
<#-- 指定属性情况start -->
<#-- GET -->
<#if singleServiceApi.getRequestMethod() == "GET">
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
<@setStore appEntity=item />
return res;
<#elseif singleServiceApi.getRequestMethod() == "POST">
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<#else>
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
</#if>
<#-- 指定属性情况end -->
}
<#-- 指定属性情况start -->
<#elseif singleServiceApi.getRequestParamType() == "ENTITY">
<#-- 提交对象数据情况start -->
<#if singleAppMethod.getCodeName() == 'Create'>
if(${condition}true){
let masterData:any = {};
<@getStore appEntity=item />
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}`,data,isloading);
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}`,data,isloading);
<#if item.getMajorPSAppDERSs()??>
<#list item.getMajorPSAppDERSs() as deReRs>
<#-- 主实体 -->
<#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() />
<#-- 从实体 -->
<#assign minorPSAppDataEntity = deReRs.getMinorPSAppDataEntity() />
this.tempStorage.setItem(tempContext.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}',JSON.stringify(res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}));
</#list>
</#if>
return res;
}
<#else>
if(${condition}context.${item.getCodeName()?lower_case}){
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
let masterData:any = {};
<@getStore appEntity=item />
Object.assign(data,masterData);
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<@setStore appEntity=item />
return res;
}
</#if>
<#-- 提交对象数据情况start -->
<#-- 提交对象数据情况end -->
<#else>
<#-- URI参数传递情况start -->
// URI参数传递情况未实现
......@@ -172,8 +205,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
<#-- } -->
</#if>
<#-- 指定属性情况start -->
<#-- 指定属性情况end -->
<#elseif singleServiceApi.getRequestParamType() == "ENTITY">
<#-- 提交对象数据情况start -->
<#if singleAppMethod.getCodeName() == 'Update'>
......@@ -221,7 +253,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<#-- } -->
</#if>
<#-- 提交对象数据情况start -->
<#-- 提交对象数据情况end -->
<#else>
<#-- URI参数传递情况start -->
// URI参数传递情况未实现
......
......@@ -3,7 +3,7 @@ TARGET=PSSYSAPP
</#ibiztemplate>
const path = require('path');
const os = require('os');
<#-- const CompressionPlugin = require("compression-webpack-plugin"); -->
function resolve(dir) {
return path.join(__dirname, dir)
}
......@@ -138,5 +138,16 @@ module.exports = {
// 单个进程最大使用内存
ForkTsCheckerPlugin.memoryLimit = 4096;
}
<#-- if(Object.is(config.mode, 'production')){
return{
plugins: [
new CompressionPlugin({
test:/\.js$|\.html$|.\css/, //匹配文件名
threshold: 10240,//对超过10k的数据压缩
deleteOriginalAssets: false //不删除源文件
})
]
}
} -->
},
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册