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

2020.6.5 更新

上级 1edd5869
......@@ -15,7 +15,7 @@ import view_${subctrl.getName()} from '@widgets/app/${srffilepath2(subctrl.getCo
<#if ctrl.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
import layout_${panel.getName()} from '@widgets/${srffilepath2(panel.getPSDataEntity().getCodeName())}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}.vue';
import layout_${panel.getName()} from '@widgets/${srffilepath2(panel.getPSAppDataEntity().getCodeName())}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}.vue';
</#list>
</#if>
<#if import_block??>${import_block}</#if>
......
......@@ -156,7 +156,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
<#else>
<#if ctrlLogic.getEventArg()?? && ctrlLogic.getEventArg()?length gt 0>
if (Object.is($event.tag, '${ctrlLogic.getEventArg()}')) {
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
this.${ctrlLogic.name}(null, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
}
<#else>
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
......
.tree-right-menu {
.ivu-divider-horizontal {
width: calc(100% - 32px);
min-width: calc(100% - 32px);
width: 100%;
min-width: 100%;
margin: 0 auto;
}
.ivu-dropdown-item {
......
......@@ -27,7 +27,7 @@
h('span', '${tabviewpanel.getCaption()}'),
h('Badge', {
props: {
count: <#if tabviewpanel.getPSSysCounterRef()?? && tabviewpanel.getPSSysCounterRef().getPSAppCounter()??><#assign appCounter = tabviewpanel.getPSSysCounterRef().getPSAppCounter()/>${srfclassname('${appCounter.getCodeName()}')}counterservice.counterData.<#if tabviewpanel.getCounterId()??>${tabviewpanel.getCounterId()}</#if><#else>undefined</#if>,
count: <#if tabviewpanel.getPSSysCounterRef?? && tabviewpanel.getPSSysCounterRef()?? && tabviewpanel.getPSSysCounterRef().getPSAppCounter()??><#assign appCounter = tabviewpanel.getPSSysCounterRef().getPSAppCounter()/>${srfclassname('${appCounter.getCodeName()}')}counterservice.counterData.<#if tabviewpanel.getCounterId()??>${tabviewpanel.getCounterId()}</#if><#else>undefined</#if>,
type: 'primary'
}
})
......
......@@ -4,7 +4,7 @@
<${srffilepath2(embedddevedview.getCodeName())}
class='viewcontainer2'
:viewdata="JSON.stringify(context)"
:viewparam="JSON.stringify(viewparams)"
:viewparam="JSON.stringify(getNavViewParams())"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</${srffilepath2(embedddevedview.getCodeName())}></#if>
......@@ -41,6 +41,14 @@
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isActivied: boolean = true;
/**
* 视图面板过滤项
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public navfilter: string = "<#if ctrl.getNavFilter?? && ctrl.getNavFilter()??>${ctrl.getNavFilter()}</#if>";
/**
* vue 生命周期
......@@ -76,6 +84,21 @@
}
}
/**
* 传入导航视图参数
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getNavViewParams(){
if(Object.is(this.navfilter,"")){
return this.viewparams;
}else{
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams));
Object.assign(tempViewParams,{[this.navfilter]:this.context['${ctrl.getPSAppDataEntity().getCodeName()?lower_case}']});
return tempViewParams;
}
}
/**
* 视图数据变化
*
......
......@@ -7,7 +7,7 @@
<div v-for = "item in items" :key="item.srfmajortext" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()>
<layout_${panel.getName()} name='${panel.name}' :inputData="item"></layout_${panel.getName()}>
<layout_${panel.getName()} name='${panel.name}' :inputData="item" :parentRef="thisRef"></layout_${panel.getName()}>
<#elseif ctrl.itemRender??>
${ctrl.itemRender.code}
<#else>
......@@ -93,6 +93,37 @@
*/
@Prop() public fetchAction!: string;
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public newdata: any;
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public opendata: any;
</#if>
</#list>
</#if>
/**
* this引用
*
* @type {number}
* @memberof Main
*/
public thisRef: any = this;
/**
* 当前页
*
......@@ -123,7 +154,7 @@
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public limit: number = 20;
public limit: number = ${ctrl.getPagingSize()?c};
/**
* 总条数
......@@ -133,6 +164,14 @@
*/
public totalRecord: number = 0;
/**
* 加载的数据是否附加在items之后
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isAddBehind:boolean = false;
/**
* 排序方向
*
......@@ -177,6 +216,7 @@
}
})
}
/**
* Vue声明周期,组件创建完毕
......@@ -237,6 +277,7 @@
if(this.totalRecord>this.items.length)
{
this.curPage = ++this.curPage;
this.isAddBehind = true;
this.load({});
}
}
......@@ -280,7 +321,9 @@
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
if(this.viewparams){
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
}
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction, this.context?JSON.parse(JSON.stringify(this.context)):{}, arg, this.showBusyIndicator);
post.then((response: any) => {
......@@ -291,7 +334,9 @@
return;
}
const data: any = response.data;
this.items = [];
if(!this.isAddBehind){
this.items = [];
}
if (Object.keys(data).length > 0) {
let datas = JSON.parse(JSON.stringify(data));
datas.map((item: any) => {
......@@ -300,6 +345,7 @@
this.totalRecord = response.total;
this.items.push(...datas);
}
this.isAddBehind = false;
this.$emit('load', this.items);
if(this.isSelectFirstDefault){
this.handleClick(this.items[0]);
......
......@@ -8,6 +8,16 @@
<#if view.getViewType() == 'DELISTEXPVIEW'>
:isSelectFirstDefault="true"
</#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
......
......@@ -56,6 +56,9 @@
</#if>
</#if>
</#list>
</#if>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
</#if>
{
name:'size',
......
......@@ -295,6 +295,9 @@
return ;
}
const arg:any = args[0];
if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context)));
}
<#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl()/>
<#if xDataControl.getPSAppDataEntity()??>
......@@ -303,9 +306,6 @@
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
</#if>
</#if>
if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context)));
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data });
this.$emit('selectionchange',args);
......
......@@ -3,4 +3,6 @@
</#ibizinclude>
.multieditviewpanel{
width: 100%;
height: 100%;
overflow: auto;
}
\ No newline at end of file
......@@ -123,6 +123,7 @@
<#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import { Environment } from '@/environments/environment';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......@@ -507,11 +508,11 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleMenusResource(inputMenus:Array<any>){
if(this.$store.getters['unifiedresource/getEnablePermissionValid']){
if(Environment.enablePermissionValid){
this.computedEffectiveMenus(inputMenus);
}
this.dataProcess(this.menuMode.getAppMenuItems());
this.menus = this.menuMode.getAppMenuItems();
this.dataProcess(inputMenus);
this.menus = inputMenus;
<#if view.isDefaultPage?? && view.isDefaultPage()>
this.doMenuSelect();
</#if>
......@@ -525,7 +526,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
*/
public computedEffectiveMenus(inputMenus:Array<any>){
inputMenus.forEach((_item:any) =>{
if(_item.resourcetag && !this.$store.getters['unifiedresource/getResourceData'](_item.resourcetag)){
if(!this.$store.getters['authresource/getAuthMenu'](_item)){
_item.hidden = true;
if (_item.items && _item.items.length > 0) {
this.computedEffectiveMenus(_item.items);
......
......@@ -21,28 +21,32 @@
}
}
.el-submenu__title i, .el-menu-item i {
font-size: 16px;
width: 16px;
font-size: 12px;
width: 18px;
}
.el-submenu__title .app-menu-icon,.el-submenu__title .app-menu-icon{
width:20px;
font-size: 14px;
}
.el-submenu__title .text {
font-size: 16px;
}
.el-menu-item, .el-submenu__title {
height: 36px;
font-size: 16px;
line-height: 32px;
height: 50px;
font-size: 14px;
line-height: 50px;
}
.el-menu-item, .el-submenu, .el-menu {
border-top: 1px solid #fff;
}
> .el-menu-item, > .el-submenu > .el-submenu__title {
height: 40px;
line-height: 36px;
border-left: 4px solid transparent;
height: 56px;
line-height: 56px;
padding-left: 16px !important;
}
.app-menu-icon {
margin-right: 4px;
margin: 4px;
text-align: center;
}
> .el-submenu {
> .el-menu {
......@@ -70,8 +74,8 @@
}
}
.ivu-divider-horizontal {
width: calc(100% - 32px);
min-width: calc(100% - 32px);
width: 100%;
min-width: 100%;
margin: 4px auto;
margin-bottom: 1px;
}
......@@ -99,8 +103,8 @@
}
}
.ivu-divider-horizontal {
width: calc(100% - 12px);
min-width: calc(100% - 12px);
width: 100%;
min-width: 100%;
margin: 4px auto;
margin-bottom: 1px;
}
......
......@@ -28,6 +28,7 @@
appfunctag: '',
</#if>
resourcetag: '<#if item.getAccessKey()??>${item.getAccessKey()}</#if>',
authtag:'${app.getCodeName()}-${ctrl.getCodeName()}-${item.getName()}',
<#if item.getPSAppMenuItems()??>
items: [
<#list item.getPSAppMenuItems() as child>
......
......@@ -7,6 +7,10 @@
loaddraftAction="<#if ctrl.getGetDraftPSControlAction()?? && ctrl.getGetDraftPSControlAction().getPSAppDEMethod()??>${ctrl.getGetDraftPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
loadAction="<#if ctrl.getGetPSControlAction()?? && ctrl.getGetPSControlAction().getPSAppDEMethod()??>${ctrl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
<#if ctrl.getFormStyle() == "SEARCHBAR">@valuechange="qucikFormValueChange"</#if>
<#if view.getViewType() == "DECALENDARVIEW" || view.getViewType() == "DECALENDARVIEW9">
@search="searchform_search($event)"
@load="searchform_load($event)"
</#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
.app-dr-tab {
height: 100%;
>.ivu-tabs-bar {
margin-bottom: 0px;
}
>.ivu-tabs-content {
height: calc(100% - 36px);
padding: 0px !important;
.ivu-tabs-tabpane {
height: 100%;
.main-data {
width: 100%;
height: 100%;
}
}
}
.drtab{
height:100%;
.app-dr-tab {
height: 100%;
>.ivu-tabs-bar {
margin-bottom: 0px;
}
>.ivu-tabs-content {
height: calc(100% - 36px);
padding: 0px !important;
.ivu-tabs-tabpane {
height: 100%;
.main-data {
width: 100%;
height: 100%;
}
}
}
}
}
<#ibizinclude>
......
......@@ -12,5 +12,12 @@ ${item.render.code}
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
}
</#if>
\ No newline at end of file
......@@ -12,5 +12,12 @@ ${item.render.code}
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
}
</#if>
\ No newline at end of file
......@@ -9,6 +9,13 @@ ${item.render.code}
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
......
......@@ -9,6 +9,13 @@ ${item.render.code}
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
......
<#-- 雷达图坐标系start -->
<#if item.render??>
${item.render.code}
<#else>
<#if item.getIndicatorPSCodeList?? && item.getIndicatorPSCodeList()??>
<#assign indicatorCodeList = item.getIndicatorPSCodeList() />
indicator:[
<#list indicatorCodeList.getAllPSCodeItems() as codeItem>
{name:'${codeItem.getText()}',max:${codeItem.getUserParam('MAXVALUE',100)}}<#if codeItem_has_next>,</#if>
</#list>
]
</#if>
</#if>
<#-- 雷达图坐标系end -->
\ No newline at end of file
......@@ -7,6 +7,7 @@ new ChartLineSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
......@@ -17,7 +18,7 @@ new ChartLineSeries({
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${codelist.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
......@@ -97,6 +98,7 @@ new ChartFunnelSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
......@@ -187,6 +189,7 @@ new ChartPieSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
......@@ -278,6 +281,7 @@ new ChartBarSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
......@@ -288,7 +292,7 @@ new ChartBarSeries({
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${codelist.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
......@@ -369,6 +373,7 @@ new ChartRadarSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
data:[],
......
......@@ -7,7 +7,7 @@ ${item.render.code}
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'radar',
encode:{
<#if item.getCatalogField()??>itemName:"${item.getCatalogField()}"</#if>
itemName:"type"
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
......
......@@ -201,6 +201,19 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
],
</#if>
<#-- 绘图网格end -->
<#-- 雷达图坐标系start -->
<#if ctrl.getPSChartRadars?? && ctrl.getPSChartRadars()??>
<#list ctrl.getPSChartRadars() as chartRadar>
<#if chartRadar_index == 0>
radar:{
<@ibizindent blank=8>
${P.getPartCode(chartRadar).code}
</@ibizindent>
},
</#if>
</#list>
</#if>
<#-- 雷达图坐标系end -->
<#-- X轴start -->
<#if ctrl.getPSChartXAxises()??>
xAxis: [
......@@ -276,7 +289,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
</#if>
this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg,this.showBusyIndicator).then((res) => {
if (res) {
this.transformToBasicChartSetData(res.data,() =>{_this.drawCharts()});
this.transformToBasicChartSetData(res.data,(codelist:any) =>{_this.drawCharts(codelist)});
}
}).catch((error) => {
console.error(error);
......@@ -289,12 +302,12 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public drawCharts(){
public drawCharts(codelist:any){
if(!this.myChart){
let element:any = document.getElementById(this.chartId);
this.myChart = echarts.init(element);
}
this.handleChartOPtion();
this.handleChartOPtion(codelist);
console.log(this.chartOption);
this.myChart.setOption(this.chartOption);
this.myChart.resize();
......@@ -305,7 +318,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public handleChartOPtion(){
public handleChartOPtion(allcodelist:any){
if(Object.keys(this.seriesModel).length > 0){
let tempDataSourceMap:Map<string,any> = new Map();
for(let i=0;i<Object.keys(this.seriesModel).length;i++){
......@@ -336,28 +349,18 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
//设置多序列
let tempSeries:any = this.seriesModel[seriesName];
// 雷达图
if(tempSeries.type && Object.is(tempSeries.type,'radar') && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0){
let tempIndicator:any = [];
tempSeries.seriesValues.forEach((item:any) =>{
let singleIndicatorObj:any = {name:item,max:100};
tempIndicator.push(singleIndicatorObj);
// 非雷达图
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0 && !Object.is(tempSeries.type,'radar')){
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{
return Object.is(item.id,seriesName);
})
this.chartOption.series.splice(returnIndex,1);
let tempSeriesArray:Array<any> = [];
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp));
<#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse>
this.chartOption.series.push(tempSeriesTemp);
})
this.chartOption.radar = {'indicator':tempIndicator};
}else{
// 非雷达图
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0){
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{
return Object.is(item.id,seriesName);
})
this.chartOption.series.splice(returnIndex,1);
let tempSeriesArray:Array<any> = [];
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp));
<#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse>
this.chartOption.series.push(tempSeriesTemp);
})
}
}
})
}
......@@ -417,9 +420,18 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
}else{
// 序列属性存在时
let tempSeriesValueItem = tempSeriesValues.get(item[singleSeries.seriesIdField]);
if(!tempSeriesValueItem){
tempSeriesValues.set(item[singleSeries.seriesIdField],item[singleSeries.seriesNameField]);
// 序列代码表存在时,翻译tempSeriesValues的键值对
if(singleSeries.seriesCodeList){
const seriesCodeList:Map<string,any> = allCodeList.get(singleSeries.seriesCodeList.tag);
let tempSeriesValueItem = tempSeriesValues.get(seriesCodeList.get(item[singleSeries.seriesIdField]));
if(!tempSeriesValueItem){
tempSeriesValues.set(seriesCodeList.get(item[singleSeries.seriesIdField]),seriesCodeList.get(item[singleSeries.seriesIdField]));
}
}else{
let tempSeriesValueItem = tempSeriesValues.get(item[singleSeries.seriesIdField]);
if(!tempSeriesValueItem){
tempSeriesValues.set(item[singleSeries.seriesIdField],item[singleSeries.seriesNameField]);
}
}
Object.assign(tempChartSetDataItem,{name:item[singleSeries.seriesIdField]});
if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){
......@@ -432,6 +444,14 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
})
// 补全数据集合
this.completeDataSet(tempChartSetData,singleSeries,allCodeList);
// 序列代码表存在时,补全序列
if(singleSeries.seriesCodeList){
const seriesCodeList:Map<string,any> = allCodeList.get(singleSeries.seriesCodeList.tag);
tempSeriesValues = new Map();
seriesCodeList.forEach((item:any) =>{
tempSeriesValues.set(item,item);
})
}
singleSeries.seriesValues = [...tempSeriesValues.keys()];
let tempSeriesMapObj:any = {};
tempSeriesValues.forEach((value:any,key:any) =>{
......@@ -496,7 +516,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
item.data = this.groupAndAdd(tempGroupField,[],tempValueField,data,item,groupField,allCodeList);
}
if(callback && callback instanceof Function){
callback();
callback(allCodeList);
}
}
......@@ -610,11 +630,19 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
returnArray = this.sortReturnArray(returnArray,groupFieldModel,allCodeList);
// 雷达图数据格式处理
if(Object.is(item.type,'radar')){
returnArray.forEach((item:any) =>{
item.type = item[groupField[0]];
delete item[groupField[0]];
})
if(Object.is(item.type,'radar') && returnArray.length >0){
let tempReturnArray:Array<any> = [];
let seriesValues:Array<any> = item.seriesValues;
if(seriesValues && seriesValues.length >0){
seriesValues.forEach((singleSeriesName:any) =>{
let singleSeriesObj:any = {type:singleSeriesName};
returnArray.forEach((item:any) =>{
Object.assign(singleSeriesObj,{[item[groupField[0]]]:item[singleSeriesName]});
})
tempReturnArray.push(singleSeriesObj);
})
}
returnArray = tempReturnArray;
}
console.log(JSON.stringify(returnArray));
return returnArray;
......
......@@ -12,5 +12,12 @@ ${item.render.code}
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
}
</#if>
\ No newline at end of file
......@@ -12,5 +12,12 @@ ${item.render.code}
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
}
</#if>
\ No newline at end of file
......@@ -9,6 +9,13 @@ ${item.render.code}
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
......
......@@ -9,6 +9,13 @@ ${item.render.code}
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
......
<#-- 雷达图坐标系start -->
<#if item.render??>
${item.render.code}
<#else>
<#if item.getIndicatorPSCodeList?? && item.getIndicatorPSCodeList()??>
<#assign indicatorCodeList = item.getIndicatorPSCodeList() />
indicator:[
<#list indicatorCodeList.getAllPSCodeItems() as codeItem>
{name:'${codeItem.getText()}',max:${codeItem.getUserParam('MAXVALUE',100)}}<#if codeItem_has_next>,</#if>
</#list>
]
</#if>
</#if>
<#-- 雷达图坐标系end -->
\ No newline at end of file
......@@ -7,6 +7,7 @@ new ChartLineSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
......@@ -17,7 +18,7 @@ new ChartLineSeries({
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${codelist.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
......@@ -97,6 +98,7 @@ new ChartFunnelSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
......@@ -187,6 +189,7 @@ new ChartPieSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
......@@ -278,6 +281,7 @@ new ChartBarSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
......@@ -288,7 +292,7 @@ new ChartBarSeries({
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${codelist.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
......@@ -369,6 +373,7 @@ new ChartRadarSeries({
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
<#if item.getSeriesPSCodeList()??><#assign seriesCodeList = item.getSeriesPSCodeList() />seriesCodeList:{type:'${seriesCodeList.getCodeListType()}',tag:'${seriesCodeList.getCodeName()}',emptycode:'empty',emptytext:'${seriesCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
data:[],
......
......@@ -7,7 +7,7 @@ ${item.render.code}
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'radar',
encode:{
<#if item.getCatalogField()??>itemName:"${item.getCatalogField()}"</#if>
itemName:"type"
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
......
......@@ -201,6 +201,19 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
],
</#if>
<#-- 绘图网格end -->
<#-- 雷达图坐标系start -->
<#if ctrl.getPSChartRadars?? && ctrl.getPSChartRadars()??>
<#list ctrl.getPSChartRadars() as chartRadar>
<#if chartRadar_index == 0>
radar:{
<@ibizindent blank=8>
${P.getPartCode(chartRadar).code}
</@ibizindent>
},
</#if>
</#list>
</#if>
<#-- 雷达图坐标系end -->
<#-- X轴start -->
<#if ctrl.getPSChartXAxises()??>
xAxis: [
......@@ -276,7 +289,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
</#if>
this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg,this.showBusyIndicator).then((res) => {
if (res) {
this.transformToBasicChartSetData(res.data,() =>{_this.drawCharts()});
this.transformToBasicChartSetData(res.data,(codelist:any) =>{_this.drawCharts(codelist)});
}
}).catch((error) => {
console.error(error);
......@@ -289,12 +302,12 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public drawCharts(){
public drawCharts(codelist:any){
if(!this.myChart){
let element:any = document.getElementById(this.chartId);
this.myChart = echarts.init(element);
}
this.handleChartOPtion();
this.handleChartOPtion(codelist);
console.log(this.chartOption);
this.myChart.setOption(this.chartOption);
this.myChart.resize();
......@@ -305,7 +318,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public handleChartOPtion(){
public handleChartOPtion(allcodelist:any){
if(Object.keys(this.seriesModel).length > 0){
let tempDataSourceMap:Map<string,any> = new Map();
for(let i=0;i<Object.keys(this.seriesModel).length;i++){
......@@ -336,28 +349,18 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
//设置多序列
let tempSeries:any = this.seriesModel[seriesName];
// 雷达图
if(tempSeries.type && Object.is(tempSeries.type,'radar') && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0){
let tempIndicator:any = [];
tempSeries.seriesValues.forEach((item:any) =>{
let singleIndicatorObj:any = {name:item,max:100};
tempIndicator.push(singleIndicatorObj);
// 非雷达图
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0 && !Object.is(tempSeries.type,'radar')){
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{
return Object.is(item.id,seriesName);
})
this.chartOption.series.splice(returnIndex,1);
let tempSeriesArray:Array<any> = [];
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp));
<#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse>
this.chartOption.series.push(tempSeriesTemp);
})
this.chartOption.radar = {'indicator':tempIndicator};
}else{
// 非雷达图
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0){
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{
return Object.is(item.id,seriesName);
})
this.chartOption.series.splice(returnIndex,1);
let tempSeriesArray:Array<any> = [];
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp));
<#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse>
this.chartOption.series.push(tempSeriesTemp);
})
}
}
})
}
......@@ -417,9 +420,18 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
}else{
// 序列属性存在时
let tempSeriesValueItem = tempSeriesValues.get(item[singleSeries.seriesIdField]);
if(!tempSeriesValueItem){
tempSeriesValues.set(item[singleSeries.seriesIdField],item[singleSeries.seriesNameField]);
// 序列代码表存在时,翻译tempSeriesValues的键值对
if(singleSeries.seriesCodeList){
const seriesCodeList:Map<string,any> = allCodeList.get(singleSeries.seriesCodeList.tag);
let tempSeriesValueItem = tempSeriesValues.get(seriesCodeList.get(item[singleSeries.seriesIdField]));
if(!tempSeriesValueItem){
tempSeriesValues.set(seriesCodeList.get(item[singleSeries.seriesIdField]),seriesCodeList.get(item[singleSeries.seriesIdField]));
}
}else{
let tempSeriesValueItem = tempSeriesValues.get(item[singleSeries.seriesIdField]);
if(!tempSeriesValueItem){
tempSeriesValues.set(item[singleSeries.seriesIdField],item[singleSeries.seriesNameField]);
}
}
Object.assign(tempChartSetDataItem,{name:item[singleSeries.seriesIdField]});
if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){
......@@ -432,6 +444,14 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
})
// 补全数据集合
this.completeDataSet(tempChartSetData,singleSeries,allCodeList);
// 序列代码表存在时,补全序列
if(singleSeries.seriesCodeList){
const seriesCodeList:Map<string,any> = allCodeList.get(singleSeries.seriesCodeList.tag);
tempSeriesValues = new Map();
seriesCodeList.forEach((item:any) =>{
tempSeriesValues.set(item,item);
})
}
singleSeries.seriesValues = [...tempSeriesValues.keys()];
let tempSeriesMapObj:any = {};
tempSeriesValues.forEach((value:any,key:any) =>{
......@@ -496,7 +516,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
item.data = this.groupAndAdd(tempGroupField,[],tempValueField,data,item,groupField,allCodeList);
}
if(callback && callback instanceof Function){
callback();
callback(allCodeList);
}
}
......@@ -610,11 +630,19 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
returnArray = this.sortReturnArray(returnArray,groupFieldModel,allCodeList);
// 雷达图数据格式处理
if(Object.is(item.type,'radar')){
returnArray.forEach((item:any) =>{
item.type = item[groupField[0]];
delete item[groupField[0]];
})
if(Object.is(item.type,'radar') && returnArray.length >0){
let tempReturnArray:Array<any> = [];
let seriesValues:Array<any> = item.seriesValues;
if(seriesValues && seriesValues.length >0){
seriesValues.forEach((singleSeriesName:any) =>{
let singleSeriesObj:any = {type:singleSeriesName};
returnArray.forEach((item:any) =>{
Object.assign(singleSeriesObj,{[item[groupField[0]]]:item[singleSeriesName]});
})
tempReturnArray.push(singleSeriesObj);
})
}
returnArray = tempReturnArray;
}
console.log(JSON.stringify(returnArray));
return returnArray;
......
......@@ -237,7 +237,7 @@ import UtilService from '@/utilservice/util-service';
public loadModel(){
if(this.isEnableCustomized){
this.utilService.getService(this.utilServiceName).then((service:any) =>{
service.loadModelData(JSON.parse(JSON.stringify(this.context)),{modelid:this.modelId}).then((res:any) =>{
service.loadModelData(JSON.parse(JSON.stringify(this.context)),{modelid:this.modelId,utilServiceName:this.utilServiceName}).then((res:any) =>{
if(res && res.status == 200){
const data:any = res.data;
if(data && data.length >0){
......
......@@ -160,6 +160,14 @@
*/
public totalRecord: number = 0;
/**
* 加载的数据是否附加在items之后
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isAddBehind:boolean = false;
/**
* 选中数组
* @type {Array<any>}
......@@ -298,6 +306,7 @@
if(this.totalRecord>this.items.length)
{
this.curPage = ++this.curPage;
this.isAddBehind = true;
this.load({});
}
}
......@@ -363,8 +372,10 @@
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
let viewparamResult:any = Object.assign(arg,this.viewparams);
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), {viewparams:viewparamResult}, this.showBusyIndicator);
let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
if (response.errorMessage) {
......@@ -373,7 +384,9 @@
return;
}
const data: any = response.data;
this.items = [];
if(!this.isAddBehind){
this.items = [];
}
if (Object.keys(data).length > 0) {
let datas = JSON.parse(JSON.stringify(data));
datas.map((item: any) => {
......@@ -386,6 +399,7 @@
this.items.push(...datas);
}
}
this.isAddBehind = false;
this.$emit('load', this.items);
if(this.isSelectFirstDefault){
this.handleClick(this.items[0]);
......
......@@ -324,6 +324,9 @@
return ;
}
const arg:any = args[0];
if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context)));
}
switch(arg.itemType) {
<#if xDataControl?? && xDataControl.getPSSysCalendarItems()??>
<#list xDataControl.getPSSysCalendarItems() as calendarItem>
......@@ -337,9 +340,6 @@
</#list>
</#if>
}
if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context)));
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName[arg.itemType] }, data:data });
this.$emit('selectionchange',args);
......
......@@ -3,6 +3,22 @@
</#ibizinclude>
<template>
<div :class='calendarClass'>
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<span class="quick-toolbar">
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(quickToolbar, 'CONTROL.html').code}
</@ibizindent>
</span>
</#if>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<span v-if="selections.length > 0" class="batch-toolbar">
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
</span>
</#if>
<#if ctrl.getCalendarStyle?? && ctrl.getCalendarStyle() == 'TIMELINE'>
<el-timeline>
<el-timeline-item
......@@ -18,6 +34,16 @@
</el-timeline-item>
</el-timeline>
<#else>
<div class="event-legends">
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<div :class="{'event-lengend':true, '${calendarItem.getItemType()}':true, 'event-disabled':!isShowlegend.${calendarItem.getItemType()}}" @click="legendTrigger('${calendarItem.getItemType()}')">
<div class="lengend-icon" style="background:${calendarItem.getBKColor()};"></div>
<span style="color:${calendarItem.getColor()};">${calendarItem.getName()}</span>
</div>
</#list>
</#if>
</div>
<FullCalendar
ref="calendar"
:locale="$i18n.locale"
......@@ -261,6 +287,41 @@ FullCalendar,
*/
public calendarType: string = "${ctrl.getCalendarStyle()}";
/**
* 图例显示控制
*
* @public
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isShowlegend: any = {
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
${calendarItem.getItemType()}:true,
</#list>
</#if>
};
/**
* 图例点击事件
*
* @public
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
legendTrigger(itemType:string){
this.isShowlegend[itemType] = !this.isShowlegend[itemType];
this.refresh();
}
/**
* 查询参数缓存
*
* @public
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public searchArgCache: any = {};
/**
* 搜索获取日程事件
*
......@@ -268,6 +329,7 @@ FullCalendar,
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public searchEvents(fetchInfo?:any, successCallback?:any, failureCallback?:any ) {
// 处理请求参数
let start = (fetchInfo && fetchInfo.start) ? this.$util.dateFormat(fetchInfo.start) : null;
let end = (fetchInfo && fetchInfo.end) ? this.$util.dateFormat(fetchInfo.end) : null;
let arg = { start: start, end: end };
......@@ -275,6 +337,39 @@ FullCalendar,
Object.assign(arg,{query : fetchInfo.query});
}
Object.assign(arg,{viewparams:this.viewparams});
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
// 处理events数据
let _this = this;
let handleEvents = ()=>{
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events[0]));
_this.onEventClick(tempEvent,true);
_this.events[0].className = "select-first-event";
_this.calendarClass = "calendar select-first-calendar";
}
let filterEvents = this.events.filter((event:any)=>{
return _this.isShowlegend[event.itemType];
});
if(successCallback){
successCallback(filterEvents);
}
// 刷新日历的大小(仅fullcalendar组件使用)
if(!Object.is(_this.calendarType,"TIMELINE")){
let appCalendar: any = _this.$refs.calendar;
let api = appCalendar.getApi();
api.updateSize();
}
}
if(JSON.stringify(arg) === JSON.stringify(this.searchArgCache)){
handleEvents();
return;
}else{
this.searchArgCache = arg;
}
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
......@@ -285,22 +380,7 @@ FullCalendar,
}
// 默认选中第一项
this.events = response.data;
if(this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(this.events[0]));
this.onEventClick(tempEvent,true);
this.events[0].className = "select-first-event";
this.calendarClass = "calendar select-first-calendar";
}
if(successCallback){
successCallback(this.events);
}
// 刷新日历的大小(仅fullcalendar组件使用)
if(!Object.is(this.calendarType,"TIMELINE")){
let appCalendar: any = this.$refs.calendar;
let api = appCalendar.getApi();
api.updateSize();
}
handleEvents();
}, (response: any) => {
if (response && response.status === 401) {
return;
......@@ -331,7 +411,7 @@ FullCalendar,
switch(deName){
<#if view.getAllRelatedPSAppViews?? && view.getAllRelatedPSAppViews()??>
<#list view.getAllRelatedPSAppViews() as editview>
case "${editview.getPSDataEntity().getCodeName()?lower_case}":
case "${editview.getPSAppDataEntity().getCodeName()?lower_case}":
view = {
viewname: '${srffilepath2(editview.getCodeName())}',
height: ${editview.getHeight()?c},
......@@ -418,15 +498,17 @@ FullCalendar,
</#list>
</#if>
}
_context.itemType = itemType;
this.selections = [_context];
// 导航栏中不需要打开视图,只要抛出选中数据
if(this.isSelectFirstDefault){
_context.itemType = itemType;
this.selections = [_context];
this.$emit("selectionchange",[_context]);
return;
}
// 根据打开模式打开视图
if (Object.is(view.placement, 'INDEXVIEWTAB') || Object.is(view.placement, '')) {
if(!view.viewname){
return;
} else if (Object.is(view.placement, 'INDEXVIEWTAB') || Object.is(view.placement, '')) {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, this.context, view.deResParameters, view.parameters, [JSON.parse(JSON.stringify(_context))] , JSON.parse(JSON.stringify(this.viewparams)));
this.$router.push(routePath);
} else {
......@@ -588,6 +670,16 @@ FullCalendar,
</#if>
}
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
${P.getCtrlCode(quickToolbar, 'CONTROL.vue').code}
</#if>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#if>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -3,6 +3,9 @@
<#if view.getViewType() == 'DECALENDAREXPVIEW'>
:isSelectFirstDefault="true"
</#if>
<#if view.getViewType() == 'DECALENDARVIEW' || view.getViewType() == 'DECALENDARVIEW9'>
@beforeload="onBeforeLoad($event)"
</#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
......@@ -8,17 +8,49 @@
.calendar{
height:100%;
overflow: auto;
.el-timeline{
padding-left: 2px;
}
.event-legends{
width: 100%;
text-align: center;
.event-lengend{
display: inline-block;
margin-left: 10px;
height: 20px;
.lengend-icon{
display: inline-block;
width: 30px;
height: 20px;
border-radius: 5px;
}
span{
display: inline-block;
margin-left: 5px;
line-height: 20px;
vertical-align: top;
}
}
.event-lengend.event-disabled{
.lengend-icon{
background:#cccccc !important;
}
span{
color:#cccccc !important;
}
}
}
}
// 选中样式
.calendar .selected-event,
.select-first-calendar .select-first-event{
border: 2px solid #ff8711 !important;
}
.calendar .selected-event:before,
.select-first-calendar .select-first-event:before{
.calendar .fc-dayGrid-view .selected-event:before,
.select-first-calendar .fc-dayGrid-view .select-first-event:before,
.calendar .fc-timeGrid-view .selected-event:before,
.select-first-calendar .fc-timeGrid-view .select-first-event:before{
content: '';
display: block;
position: absolute;
......@@ -29,8 +61,10 @@
border-left-color: transparent;
color: #fff;
}
.calendar .selected-event:after,
.select-first-calendar .select-first-event:after{
.calendar .fc-dayGrid-view .selected-event:after,
.select-first-calendar .fc-dayGrid-view .select-first-event:after,
.calendar .fc-timeGrid-view .selected-event:after,
.select-first-calendar .fc-timeGrid-view .select-first-event:after{
content: '';
display: block;
width: 4px;
......
......@@ -32,6 +32,9 @@
</#if>
</#list>
</#if>
</#if>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
</#if>
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
......
.tree-right-menu {
.ivu-divider-horizontal {
width: calc(100% - 32px);
min-width: calc(100% - 32px);
width: 100%;
min-width: 100%;
margin: 0 auto;
}
.ivu-dropdown-item {
......@@ -29,6 +29,9 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
.icon{
padding-right: 10px;
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
......
......@@ -432,9 +432,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
</#if>
});
</#if>
<#if node.getTreeNodeType() == 'DE' && node.getPSDataEntity()??>
<#assign filtername>${node.getPSDataEntity().codeName}SearchFilter</#assign>
<#assign entityname>${node.getPSDataEntity().codeName}</#assign>
<#if node.getTreeNodeType() == 'DE' && node.getPSAppDataEntity()??>
<#assign filtername>${node.getPSAppDataEntity().codeName}SearchFilter</#assign>
<#assign entityname>${node.getPSAppDataEntity().codeName}</#assign>
let searchFilter: any = {};
<#list ctrl.getPSDETreeNodeRSs() as noders>
<#if noders.getChildPSDETreeNode().id == node.id>
......
......@@ -7,7 +7,8 @@
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
overflow-y: auto;
overflow-x: hidden;
display: flex;
flex-direction: column;
.tree-exp-bar-header {
......
......@@ -179,7 +179,7 @@ GanttElastic,
<#if dataItem.getFrontPSCodeList()??>
<#assign codelist = dataItem.getFrontPSCodeList()/>
if (Object.is(field, '${dataItem.name}')) {
let codelist: any[] = this.$store.getters.getCodeList('CodeList4');
let codelist: any[] = this.$store.getters.getCodeList('${codelist.getCodeName()}');
if(codelist) {
return this.getCodeListItem(codelist, task[field]);
}
......
......@@ -465,9 +465,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
</#if>
});
</#if>
<#if node.getTreeNodeType() == 'DE' && node.getPSDataEntity()??>
<#assign filtername>${node.getPSDataEntity().codeName}SearchFilter</#assign>
<#assign entityname>${node.getPSDataEntity().codeName}</#assign>
<#if node.getTreeNodeType() == 'DE' && node.getPSAppDataEntity()??>
<#assign filtername>${node.getPSAppDataEntity().codeName}SearchFilter</#assign>
<#assign entityname>${node.getPSAppDataEntity().codeName}</#assign>
let searchFilter: any = {};
<#list ctrl.getPSDETreeNodeRSs() as noders>
<#if noders.getChildPSDETreeNode().id == node.id>
......
......@@ -29,14 +29,14 @@
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<span class="quick-toolbar">
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(quickToolbar, 'CONTROL.html').code}
</@ibizindent>
</#if>
</span>
</#if>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
......@@ -70,14 +70,14 @@
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<span v-if="selections.length > 0" class="batch-toolbar">
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
</#if>
</span>
</#if>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
......@@ -1202,7 +1202,7 @@ import { FormItemModel } from '@/model/form-detail';
}
// 已选中则删除,没选中则添加
let selectIndex = this.selections.findIndex((item:any)=>{
return Object.is(item.${ctrl.getPSDataEntity().getName()?lower_case},$event.${ctrl.getPSDataEntity().getName()?lower_case});
return Object.is(item.${ctrl.getPSAppDataEntity().getName()?lower_case},$event.${ctrl.getPSAppDataEntity().getName()?lower_case});
});
if (Object.is(selectIndex,-1)){
this.selections.push(JSON.parse(JSON.stringify($event)));
......@@ -1481,7 +1481,7 @@ import { FormItemModel } from '@/model/form-detail';
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public setColState() {
const _data: any = localStorage.getItem('${ctrl.getPSDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}');
const _data: any = localStorage.getItem('${ctrl.getPSAppDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}');
if (_data) {
let columns = JSON.parse(_data);
columns.forEach((col: any) => {
......@@ -1499,7 +1499,7 @@ import { FormItemModel } from '@/model/form-detail';
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public onColChange() {
localStorage.setItem('${ctrl.getPSDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}', JSON.stringify(this.allColumns));
localStorage.setItem('${ctrl.getPSAppDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}', JSON.stringify(this.allColumns));
}
/**
......
......@@ -331,6 +331,9 @@
return ;
}
const arg:any = args[0];
if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context)));
}
<#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl()/>
<#if xDataControl.getPSAppDataEntity()??>
......@@ -339,9 +342,6 @@
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
</#if>
</#if>
if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context)));
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data });
this.$emit('selectionchange',args);
......
<#ibizinclude>../../@MACRO/FUNC/MACRO.ftl</#ibizinclude>
<#assign MDContent><#t>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef() ?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#if view.getViewType() == "DEGRIDVIEW9">
......@@ -16,7 +16,7 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code}
<div style='margin-bottom: 6px;'>
<#if view.isEnableQuickGroup()>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" :counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice" @valuechange="qucikGroupValueChange"></app-quick-group>
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="qucikGroupValueChange"></app-quick-group>
</div>
</#if>
<#if view.getQuickPSDESearchForm()??>
......
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
<div class='content-container'>
<#assign MDContent>
<#if view.getPSSysCounterRef() ?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
......
......@@ -5,7 +5,7 @@
<div class='content-container'>
<#assign MDContent>
<#if view.getPSSysCounterRef() ?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
......
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,40 +2,51 @@
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#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="true" :bordered="false">
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
</@ibizindent>
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
</@ibizindent>
<div class='content-container'>
<#assign MDContent>
<#comment><!--开始:快速搜索或工具栏存在--></#comment>
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar'))>
<row style='margin-bottom: 6px;'>
<#if view.isEnableQuickSearch()>
<i-input <#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show='!this.isExpandSearchForm '</#if></#if> v-model='query' search @on-search='onSearch' placeholder="<@getQuickSearchPlaceholder view />" class='pull-left' style='max-width: 400px;margin-top:6px;' />
</#if>
<div class='pull-right'>
<@ibizindent blank=20>
<#if view.hasPSControl('toolbar')>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}<#t>
</#if>
</@ibizindent>
</div>
</row>
</#if>
<#comment><!--结束:快速搜索或工具栏存在--></#comment>
<#if view.hasPSControl('searchform')>
<@ibizindent blank=12>
${P.getCtrlCode('searchform', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
<#if view.hasPSControl('dataview')>
<@ibizindent blank=12>
${P.getCtrlCode('dataview', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</#assign>
<#assign MDContent>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
<div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="qucikGroupValueChange"></app-quick-group>
</div>
</#if>
<#if view.getQuickPSDESearchForm()??>
<div class="quick-search-container">
<#assign quickSearchForm = view.getQuickPSDESearchForm() />
${P.getCtrlCode(quickSearchForm, 'CONTROL.html').code}
</div>
</#if>
<#if view.isEnableQuickSearch()>
<i-input <#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show='!this.isExpandSearchForm '</#if></#if> v-model='query' search @on-search='onSearch' placeholder="<@getQuickSearchPlaceholder view />" class='pull-left' style='max-width: 400px;margin-top:6px;' />
</#if>
<div class='pull-right'>
<#if view.hasPSControl('toolbar')>
<@ibizindent blank=20>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</div>
</div>
</#if>
<#-- END:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if view.hasPSControl('searchform')>
<@ibizindent blank=12>
${P.getCtrlCode('searchform', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
<#if view.hasPSControl('dataview')>
<@ibizindent blank=12>
${P.getCtrlCode('dataview', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
......
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -4,28 +4,43 @@
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :bordered="false">
<div class='content-container'>
<#assign MDContent>
<#comment><!--开始:快速搜索或工具栏存在--></#comment>
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar'))>
<row style='margin-bottom: 6px;'>
<#if view.isEnableQuickSearch()>
<i-input <#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show='!this.isExpandSearchForm'</#if></#if> v-model='query' search @on-search='onSearch' class='pull-left' placeholder="<@getQuickSearchPlaceholder view />" style='max-width: 400px;margin-top:6px;' />
</#if>
<div class='pull-right'>
<@ibizindent blank=8>
<#if view.hasPSControl('toolbar')>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}
</#if>
</@ibizindent>
</div>
</row>
</#if>
<#comment><!--结束:快速搜索或工具栏存在--></#comment>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
<#if view.hasPSControl('dataview')>
${P.getCtrlCode('dataview', 'CONTROL.html').code}
</#if>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
<div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="qucikGroupValueChange"></app-quick-group>
</div>
</#if>
<#if view.getQuickPSDESearchForm()??>
<div class="quick-search-container">
<#assign quickSearchForm = view.getQuickPSDESearchForm() />
${P.getCtrlCode(quickSearchForm, 'CONTROL.html').code}
</div>
</#if>
<#if view.isEnableQuickSearch()>
<i-input <#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show='!this.isExpandSearchForm '</#if></#if> v-model='query' search @on-search='onSearch' placeholder="<@getQuickSearchPlaceholder view />" class='pull-left' style='max-width: 400px;margin-top:6px;' />
</#if>
<div class='pull-right'>
<#if view.hasPSControl('toolbar')>
<@ibizindent blank=20>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</div>
</div>
</#if>
<#-- END:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if view.hasPSControl('searchform')>
<@ibizindent blank=12>
${P.getCtrlCode('searchform', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
<#if view.hasPSControl('dataview')>
<@ibizindent blank=12>
${P.getCtrlCode('dataview', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</#assign>
<#ibizinclude>
......
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
<#ibizinclude>../../@MACRO/FUNC/MACRO.ftl</#ibizinclude>
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#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>' :bordered="false" :dis-hover="true" >
<#ibizinclude>
../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl
</#ibizinclude>
<div class='content-container'>
<#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
<div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="qucikGroupValueChange"></app-quick-group>
</div>
</#if>
<#if view.getQuickPSDESearchForm()??>
<div class="quick-search-container">
<#assign quickSearchForm = view.getQuickPSDESearchForm() />
${P.getCtrlCode(quickSearchForm, 'CONTROL.html').code}
</div>
</#if>
<#if view.isEnableQuickSearch()>
<i-input<#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show="!isExpandSearchForm"</#if></#if> v-model="query" search enter-button @on-search="onSearch($event)" class='pull-left' placeholder="<@getQuickSearchPlaceholder view />" style='max-width: 400px;margin-top:6px;' />
</#if>
<div class='pull-right'>
<#if view.hasPSControl('toolbar')>
<@ibizindent blank=8>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}
</@ibizindent>
</#if>
</div>
</div>
</#if>
<#-- END:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
<#if view.hasPSControl('calendar')>
${P.getCtrlCode('calendar', 'CONTROL.html').code}
</#if>
</#assign>
<#ibizinclude>
../@MACRO/DEFAULT.vue.ftl
</#ibizinclude>
\ No newline at end of file
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
</div>
</card>
</div>
\ No newline at end of file
<#ibizinclude>../../@MACRO/FUNC/MACRO.ftl</#ibizinclude>
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card view-no-caption <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :bordered="false" :dis-hover="true" >
<div class='content-container'>
<#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
<div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="qucikGroupValueChange"></app-quick-group>
</div>
</#if>
<#if view.getQuickPSDESearchForm()??>
<div class="quick-search-container">
<#assign quickSearchForm = view.getQuickPSDESearchForm() />
${P.getCtrlCode(quickSearchForm, 'CONTROL.html').code}
</div>
</#if>
<#if view.isEnableQuickSearch()>
<i-input<#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show="!isExpandSearchForm"</#if></#if> v-model="query" search enter-button @on-search="onSearch($event)" class='pull-left' placeholder="<@getQuickSearchPlaceholder view />" style='max-width: 400px;margin-top:6px;' />
</#if>
<div class='pull-right'>
<#if view.hasPSControl('toolbar')>
<@ibizindent blank=16>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}
</@ibizindent>
</#if>
</div>
</div>
</#if>
<#-- END:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
<#if view.hasPSControl('calendar')>
${P.getCtrlCode('calendar', 'CONTROL.html').code}
</#if>
</#assign>
<#ibizinclude>
../@MACRO/DEFAULT.vue.ftl
</#ibizinclude>
\ No newline at end of file
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
</div>
</card>
</div>
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.view-container {
.view-card {
.ivu-card-body {
.content-container{
height: calc(100% - 64px);
}
.app-modal{
.view-container {
.view-card {
.ivu-card-body {
.content-container{
height: calc(100% - 64px);
}
}
}
}
}
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -2,5 +2,5 @@
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
width:100%;
display: block;
}
\ No newline at end of file
......@@ -3,12 +3,16 @@
</#ibizinclude>
.index_view{
margin-bottom: 1px;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
overflow: hidden;
color:#303133;
background-color: #fff;
.index_header{
height:50px;
height:65px;
padding:0 20px;
display: flex;
align-items: center;
......@@ -18,6 +22,29 @@
align-items: center;
}
.header-left{
i{
color:#b4bcc8;
}
i:hover{
color:#1890ff;
}
> .app-breadcrumb{
> span .el-breadcrumb__item .el-breadcrumb__inner{
a{
color:#606d80 !important;
cursor: pointer !important;
}
a:last-child:hover{
color:#1890ff !important;
}
}
}
.ivu-icon{
font-size: 20px;
padding: 4px;
margin-top: -2px;
cursor: pointer;
}
display: flex;
align-items: center;
justify-content: space-between;
......@@ -33,7 +60,7 @@
}
}
.index_content{
background-color:#fff;
background-color:#F0F2F5;
height:calc(100vh - 50px);
overflow-x: hidden;
overflow-y: hidden;
......@@ -44,16 +71,21 @@
}
}
.ivu-layout .ivu-layout-sider .ivu-layout-sider-children .sider-top{
line-height: 58px;
text-align: right;
padding-right: 18px;
}
.ivu-layout .ivu-layout-sider .ivu-layout-sider-children .sider-top .ivu-icon{
font-size: 20px;
padding: 4px;
margin-top: -2px;
line-height: 58px;
text-align: center;
font-size: 20px;
cursor: pointer;
}
.sider-top{
margin-bottom: 1px;
height:65px;
box-shadow: 0 1px 2px 0 rgba(0,0,0,.15);
> .page-logo{
text-align: center;
}
}
}
/*** BRGIN:滚动条样式 ***/
......
......@@ -9,47 +9,44 @@
<div class="index_view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<layout :class="themeClasses" :style="themeStyle">
<header class="index_header">
<div class="header-left" >
<div class="page-logo">
<#if view.getAppIconPath() != "">
<img src="${view.getAppIconPath()}" height="32">
<#else>
<img src="../../../assets/img/logo.png" height="32" />
</#if>
<span style="display: inline-block;margin-left: 10px;font-size: 22px;">{{$t(model.srfCaption)}}</span>
</div>
</div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
<app-header-menus />
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector>
<app-user></app-user>
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
</header>
<layout>
<#if view.hasPSControl('appmenu')>
<sider :width="collapseChange ? 64 : 200" hide-trigger v-model="collapseChange">
<div class="sider-top">
<i class="ivu-icon ivu-icon-md-menu" @click="handleClick"></i>
<div class="page-logo">
<#if view.getAppIconPath() != "">
<img v-show="collapseChange" src="${view.getAppIconPath()}" height="16">
<#else>
<img v-show="collapseChange" src="../../../assets/img/logo.png" height="16" />
</#if>
<span v-show="!collapseChange" style="display: block;text-align: center;font-weight: 300;font-size: 20px;">{{$t(model.srfCaption)}}</span>
</div>
</div>
${P.getCtrlCode('appmenu', 'CONTROL.html').code}
</sider>
<content class="index_content" :style="{'width':this.collapseChange ? 'calc(100vw - 64px)' : 'calc(100vw - 200px)' }">
<tab-page-exp></tab-page-exp>
<app-keep-alive :routerList="getRouterList">
<router-view :key="getRouterViewKey"></router-view>
</app-keep-alive>
</content>
<#else>
<content style="width: 100vw;height: calc(100vh - 50px);">
<tab-page-exp></tab-page-exp>
<app-keep-alive :routerList="getRouterList">
<router-view :key="getRouterViewKey"></router-view>
</app-keep-alive>
</content>
</#if>
<layout>
<header class="index_header">
<div class="header-left" >
<div class="page-logo">
<i v-show="!collapseChange" class="ivu-icon el-icon-s-fold" @click="handleClick"></i>
<i v-show="collapseChange" class="ivu-icon el-icon-s-unfold" @click="handleClick"></i>
<app-breadcrumb :defPSAppView="defPSAppView"></app-breadcrumb>
</div>
</div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
<app-header-menus />
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector>
<app-user></app-user>
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
</header>
<content class="index_content" :style="{'width':this.collapseChange ? 'calc(100vw - 64px)' : 'calc(100vw - 200px)' }">
<tab-page-exp></tab-page-exp>
<app-keep-alive :routerList="getRouterList">
<router-view :key="getRouterViewKey"></router-view>
</app-keep-alive>
</content>
</layout>
</layout>
</layout>
</div>
......
......@@ -8,7 +8,7 @@
<#assign portletClass = "portlet">
</#if>
<template>
<div class='${portletClass} ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '${portletHeight}' : <#if ctrl.getHeight() == 1>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}">
<div class='${portletClass} ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '${portletHeight}' : <#if ctrl.getHeight() == 0>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}">
<#if ctrl.getPortletType?? && ctrl.getPortletType()??><#t>
<#-- 视图 -->
<#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t>
......
......@@ -38,7 +38,7 @@ import view_${subctrl.getName()} from '@widgets/app/${srffilepath2(subctrl.getCo
<#if ctrl.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
import layout_${panel.getName()} from '@widgets/${srffilepath2(panel.getPSDataEntity().getCodeName())}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}.vue';
import layout_${panel.getName()} from '@widgets/${srffilepath2(panel.getPSAppDataEntity().getCodeName())}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}.vue';
</#list>
</#if>
<#if import_block??>${import_block}</#if>
......
<div class='view-container'>
<div class='panel-container'>
<row class="app-layoutpanel">
<@ibizindent blank=8>
<#if ctrl.getRootPSPanelItems()??>
......
......@@ -17,10 +17,10 @@ import CodeListService from "@service/app/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
getDatas(): any[] {
if (!this.data) {
if (!this.panelData) {
return [];
}
return [this.data];
return [this.panelData];
}
/**
......@@ -33,6 +33,14 @@ import CodeListService from "@service/app/codelist-service";
return this.data;
}
/**
* 父级部件引用
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public parentRef?: any;
/**
* 面板数据对象
*
......@@ -90,6 +98,14 @@ import CodeListService from "@service/app/codelist-service";
*/
public data:any = {};
/**
* 面板数据对象
*
* @type {*}
* @memberof Mob
*/
public panelData:any = null;
/**
* 监听数据对象
*
......@@ -135,13 +151,46 @@ import CodeListService from "@service/app/codelist-service";
}
}
/**
* 计算面板数据
*
* @param codelistArray 代码表模型数组
* @memberof Mob
*/
public async computePanelData(){
let codelistArray:Array<any> = [];
let panelData:any = {};
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
this.dataModel.getDataItems().forEach((item:any) =>{
if(item.codelist){
codelistArray.push(item.codelist);
}
})
if(codelistArray.length >0){
let res:any = await this.getAllCodeList(codelistArray,true);
this.dataModel.getDataItems().forEach((item:any) =>{
if(item.codelist){
panelData[item.prop] = res.get(item.codelist.tag).get(this.data[item.name]);
}else{
panelData[item.prop] = this.data[item.name];
}
})
}else{
this.dataModel.getDataItems().forEach((item:any) =>{
panelData[item.prop] = this.data[item.name];
})
}
}
this.panelData = Object.assign(JSON.parse(JSON.stringify(this.inputData)),panelData);
}
/**
* 获取所有代码表
*
* @param codelistArray 代码表模型数组
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getAllCodeList(codelistArray:Array<any>):Promise<any>{
public getAllCodeList(codelistArray:Array<any>,reverse:boolean = false):Promise<any>{
return new Promise((resolve:any,reject:any) =>{
let codeListMap:Map<string,any> = new Map();
let promiseArray:Array<any> = [];
......@@ -154,7 +203,11 @@ import CodeListService from "@service/app/codelist-service";
let tempCodeListMap:Map<number,any> = new Map();
if(codeList.length >0){
codeList.forEach((codeListItem:any) =>{
tempCodeListMap.set(codeListItem.value,codeListItem.text);
if(reverse){
tempCodeListMap.set(codeListItem.text,codeListItem.value);
}else{
tempCodeListMap.set(codeListItem.value,codeListItem.text);
}
})
}
codeListMap.set(item.tag,tempCodeListMap);
......@@ -194,23 +247,76 @@ import CodeListService from "@service/app/codelist-service";
})
}
<#if ctrl.getAllPSPanelItems()??>
<#list ctrl.getAllPSPanelItems() as panelItem>
<#if panelItem.getItemType() == "BUTTON">
/**
* 面板 ${panelItem.getCaption()} 事件
*
* @memberof @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ${panelItem.getName()}_click($event: any): void {
<#if panelItem.getPSUIAction?? && panelItem.getPSUIAction()??>
<#assign uiaction = panelItem.getPSUIAction()>
this.${ctrl.name}_${panelItem.getName()}_click(null, null, $event);
/**
* 界面行为
*
* @param {*} row
* @param {*} tag
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public async uiAction(row: any, tag: any, $event: any) {
await this.computePanelData();
<#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??>
<#assign action = logic.getPSAppViewUIAction().getPSUIAction()>
if(Object.is('${action.getUIActionTag()}', tag)) {
this.${logic.getName()}(row, tag, $event);
}
</#if>
</#list>
</#if>
}
</#if>
</#list>
</#if>
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any){
if (this.parentRef.opendata && this.parentRef.opendata instanceof Function) {
this.parentRef.opendata(args,fullargs,params, $event, xData);
}
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
if (this.parentRef.newdata && this.parentRef.newdata instanceof Function) {
this.parentRef.newdata(args,fullargs,params, $event, xData);
}
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public async remove(datas: any[]): Promise<any> {
if (this.parentRef.remove && this.parentRef.remove instanceof Function) {
return this.parentRef.remove(datas);
}
}
/**
* 刷新
*
* @param {*} [opt={}]
* @memberof Main
*/
public refresh(opt: any = {}) {
if (this.parentRef.refresh && this.parentRef.refresh instanceof Function) {
this.parentRef.refresh(opt);
}
}
/**
* 界面行为
......
<#assign content>
:parentRef="thisRef"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
......@@ -36,7 +36,7 @@
"{ <#t>
viewname: '${srffilepath2(pickupview.codeName)}'<#t>
<#if pickupview.isPSDEView()>
, title: $t('entities.${pickupview.getPSDataEntity().getCodeName()?lower_case}.views.${pickupview.getPSDEViewCodeName()?lower_case}.title')<#t>
, title: $t('entities.${pickupview.getPSAppDataEntity().getCodeName()?lower_case}.views.${pickupview.getPSDEViewCodeName()?lower_case}.title')<#t>
<#else>
, title: $t('app.views.${pickupview.getCodeName()?lower_case}.title')<#t>
</#if>
......@@ -65,7 +65,7 @@
"{ <#t>
viewname: '${linkview.codeName}'<#t>
<#if linkview.isPSDEView()>
, title: $t('entities.${linkview.getPSDataEntity().getCodeName()?lower_case}.views.${linkview.getPSDEViewCodeName()?lower_case}.title')<#t>
, title: $t('entities.${linkview.getPSAppDataEntity().getCodeName()?lower_case}.views.${linkview.getPSDEViewCodeName()?lower_case}.title')<#t>
<#else>
, title: $t('app.views.${linkview.getCodeName()?lower_case}.title')<#t>
</#if>
......@@ -77,7 +77,7 @@
, isRedirectView: <#t>
<#if linkview.isRedirectView()>
true<#t>
<#assign link_de = linkview.getPSDataEntity()/>
<#assign link_de = linkview.getPSAppDataEntity().getPSDataEntity()/>
, url: '/${app.getPKGCodeName()?lower_case}/${link_de.getPSSystemModule().codeName?lower_case}/${link_de.codeName?lower_case}/${linkview.getPSDEViewCodeName()?lower_case}/getmodel'<#t>
<#else><#t>
false<#t>
......@@ -123,9 +123,6 @@
<#if currentItem.getParamJOString?? && currentItem.getParamJOString()??>
param:${editor.getParamJOString()},<#t>
</#if>
<#if currentItem.getEditorParam('PARENTDATA','') != ''>
parentdata:${currentItem.getEditorParam('PARENTDATA','')?replace("'", "\"")}, <#t>
</#if>
}' <#t>
</#macro>
<#-- END:获取AC参数 -->
\ No newline at end of file
<dropdown-list-dynamic v-model="data.${editor.name}" :data="data" :itemParam="<#if item.getEditorParam('PARENTDATA','') != ''>{parentdata:${item.getEditorParam('PARENTDATA','')}}<#else>{}</#if>" :disabled="detailsModel.${editor.name}.disabled" <#if editor.getPSCodeList()??><#assign codelist=editor.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}"></dropdown-list-dynamic>
\ No newline at end of file
<dropdown-list-dynamic
v-model="data.${editor.name}"
:data="data"
:context="context"
:viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>"
:disabled="detailsModel.${editor.name}.disabled"
<#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}">
</dropdown-list-dynamic>
\ No newline at end of file
<dropdown-list v-model="data.${editor.name}" :data="data" :itemParam="<#if item.getEditorParam('PARENTDATA','') != ''>{parentdata:${item.getEditorParam('PARENTDATA','')}}<#else>{}</#if>" :disabled="detailsModel.${editor.name}.disabled" <#if editor.getPSCodeList()??><#assign codelist=editor.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}"></dropdown-list>
\ No newline at end of file
<dropdown-list
v-model="data.${editor.name}"
:data="data"
:context="context"
:viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>"
:disabled="detailsModel.${editor.name}.disabled"
<#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}">
</dropdown-list>
\ No newline at end of file
<dropdown-list v-model="data.${editor.name}" :data="data" :itemParam="<#if item.getEditorParam('PARENTDATA','') != ''>{parentdata:${item.getEditorParam('PARENTDATA','')}}<#else>{}</#if>" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}width: 100px;" <#if editor.getPSCodeList()??><#assign codelist=editor.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>></dropdown-list>
\ No newline at end of file
<dropdown-list
v-model="data.${editor.name}"
:data="data"
:context="context"
:viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>"
:disabled="detailsModel.${editor.name}.disabled"
style="${editor.getEditorCssStyle()}width: 100px;"
<#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>>
</dropdown-list>
\ No newline at end of file
<dropdown-list-mpicker v-model="data.${editor.name}" :itemParam="<#if item.getEditorParam('PARENTDATA','') != ''>{parentdata:${item.getEditorParam('PARENTDATA','')}}<#else>{}</#if>" :disabled="detailsModel.${editor.name}.disabled" <#if editor.getPSCodeList()??><#assign codelist=editor.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' <#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if></#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}"></dropdown-list-mpicker>
\ No newline at end of file
<dropdown-list-mpicker
v-model="data.${editor.name}"
:data="data"
:context="context"
:viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>" :disabled="detailsModel.${editor.name}.disabled"
<#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
<#if codelist.valueSeparator?has_content>
valueSeparator="${codelist.valueSeparator}"
</#if>
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}">
</dropdown-list-mpicker>
\ No newline at end of file
<dropdown-list-mpicker
v-model="row[column.property]"
:itemParam="<#if item.getEditorParam('PARENTDATA','') != ''>{parentdata:${item.getEditorParam('PARENTDATA','')}}<#else>{}</#if>"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
<#if item.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
......
<app-radio-group v-model="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" name="${editor.name}" <#if editor.getPSCodeList()??><#assign codelist=editor.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' </#if> style="${editor.getEditorCssStyle()}"></app-radio-group>
\ No newline at end of file
<app-radio-group
v-model="data.${editor.name}"
:data="data"
:context="context"
:viewparams="viewparams"
:disabled="detailsModel.${editor.name}.disabled"
name="${editor.name}"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>"
<#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
</#if>
style="${editor.getEditorCssStyle()}">
</app-radio-group>
\ No newline at end of file
......@@ -7,6 +7,7 @@
name="${editor.name}"
:context="context"
:viewparams="viewparams"
:itemParam=<@getItemParams editor />
:service="service"
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
......@@ -7,6 +7,7 @@
name="${editor.name}"
:context="context"
:viewparams="viewparams"
:itemParam=<@getItemParams editor />
:service="service"
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
......@@ -15,5 +15,9 @@
textSeparator="${codelist.textSeparator}" <#t>
</#if>
</#if>
:data="data"
:context="context"
:viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>"
style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt>
\ No newline at end of file
......@@ -15,5 +15,9 @@
textSeparator="${codelist.textSeparator}" <#t>
</#if>
</#if>
:data="data"
:context="context"
:viewparams="viewparams"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>"
style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt>
\ No newline at end of file
<app-checkbox-list v-model="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" <#if editor.getPSCodeList()??><#assign codelist=editor.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' <#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if> mode="${codelist.getOrMode()?lower_case}"</#if> name="${editor.name}" style="${editor.getEditorCssStyle()}"></app-checkbox-list>
\ No newline at end of file
<app-checkbox-list
v-model="data.${editor.name}"
:data="data"
:context="context"
:viewparams="viewparams"
:disabled="detailsModel.${editor.name}.disabled"
:itemParam="<#if item.getEditorParam('ITEMPARAM','') != ''>${item.getEditorParam('ITEMPARAM','')}<#else>{}</#if>"
<#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
codelistType='${codelist.getCodeListType()}'
<#if codelist.valueSeparator?has_content>
valueSeparator="${codelist.valueSeparator}"
</#if>
mode="${codelist.getOrMode()?lower_case}"
</#if>
name="${editor.name}"
style="${editor.getEditorCssStyle()}">
</app-checkbox-list>
\ No newline at end of file
......@@ -298,7 +298,7 @@ ${front_block}
window.open(url, '_blank');
return null;
}
<#assign dataview_de = dataview.getPSDataEntity()/>
<#assign dataview_de = dataview.getPSAppDataEntity().getPSDataEntity()/>
const url: string = '/${app.getPKGCodeName()?lower_case}/${dataview_de.getPSSystemModule().codeName?lower_case}/${dataview_de.codeName?lower_case}/${dataview.getPSDEViewCodeName()?lower_case}/getmodel';
actionContext.$http.get(url, data).then((response: any) => {
if (!response || response.status !== 200) {
......
......@@ -94,6 +94,10 @@
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
<#if dataview.isPSDEView()>
<#assign appDataEntity = dataview.getPSAppDataEntity()/>
delete curViewParam.${appDataEntity.getCodeName()?lower_case};
</#if>
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
......
......@@ -43,7 +43,7 @@
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
</#if>
</#if>
if(params){
datas = [params];
}
......
<#macro getViewLanguageTitle tempView>
<#if tempView.isPSDEView()>
$t('entities.${tempView.getPSDataEntity().getCodeName()?lower_case}.views.${tempView.getPSDEViewCodeName()?lower_case}.title')<#t>
$t('entities.${tempView.getPSAppDataEntity().getCodeName()?lower_case}.views.${tempView.getPSDEViewCodeName()?lower_case}.title')<#t>
<#else>
$t('app.views.${tempView.getCodeName()?lower_case}.title')<#t>
</#if>
......
......@@ -3,10 +3,22 @@
./LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
</#assign>
<#ibizinclude>
./VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#assign mounted_block>
<#if view.isEnableQuickGroup()>_this.loadQuickGroupModel();</#if>
</#assign>
<#ibizinclude>
./VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
......@@ -59,6 +71,136 @@
}
}
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store });
</#if>
<#if view.isEnableQuickGroup()>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 快速分组数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikGroupData:any;
/**
* 快速分组是否有抛值
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public isEmitQuickGroupValue:boolean = false;
/**
* 快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupModel:Array<any> = [];
/**
* 加载快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public loadQuickGroupModel(){
<#if view.getQuickGroupPSCodeList()??>
<#assign codelist=view.getQuickGroupPSCodeList() />
let quickGroupCodeList:any = {tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'};
if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(quickGroupCodeList.tag);
if (codelist) {
this.quickGroupModel = [...this.handleDynamicData(JSON.parse(JSON.stringify(codelist.items)))];
} else {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
}
}else if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"DYNAMIC")){
this.codeListService.getItems(quickGroupCodeList.tag,{},{}).then((res:any) => {
this.quickGroupModel = res;
}).catch((error:any) => {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
});
}
</#if>
}
/**
* 处理快速分组模型动态数据部分(%xxx%)
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleDynamicData(inputArray:Array<any>){
if(inputArray.length >0){
inputArray.forEach((item:any) =>{
if(item.data && Object.keys(item.data).length >0){
Object.keys(item.data).forEach((name:any) =>{
let value: any = item.data[name];
if (value && typeof(value)=='string' && value.startsWith('%') && value.endsWith('%')) {
const key = (value.substring(1, value.length - 1)).toLowerCase();
if (this.context[key]) {
value = this.context[key];
} else if(this.viewparams[key]){
value = this.viewparams[key];
}
}
item.data[name] = value;
})
}
})
}
return inputArray;
}
/**
* 快速分组值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikGroupValueChange($event:any){
if($event && $event.data){
this.qucikGroupData = $event.data;
if(this.isEmitQuickGroupValue){
this.onSearch($event);
}
}
this.isEmitQuickGroupValue = true;
}
</#if>
<#if view.getQuickPSDESearchForm()??>
/**
* 快速搜索栏数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikFormData:any;
/**
* 快速搜索栏值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikFormValueChange($event:any){
this.qucikFormData = $event;
this.onSearch($event);
}
</#if>
<#ibizinclude>
./VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -4,7 +4,7 @@
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef() ?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
......@@ -49,7 +49,7 @@ if(this.formDruipart){
public isSingleSelect: boolean = ${grid.isSingleSelect()?c};
</#if>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef() ?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
......
......@@ -51,7 +51,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
}
}
<#if view.getPSSysCounterRef() ?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
......
......@@ -87,6 +87,9 @@
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
<#if self_viewparam??>
${self_viewparam}
......
......@@ -201,10 +201,12 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
_this.parseViewParam();
_this.engine.load();
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
<#if viewdata_block??>${viewdata_block}</#if>
});
}
<#if viewdata_block??>${viewdata_block}</#if>
}
/**
......
......@@ -2,14 +2,233 @@
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
</#assign>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#assign mounted_block>
<#if view.isEnableQuickGroup()>_this.loadQuickGroupModel();</#if>
</#assign>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 搜索值
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public query: string = '';
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}
*/
public isExpandSearchForm: boolean = ${view.isExpandSearchForm()?c};
/**
* 快速搜索
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}
*/
public onSearch($event: any): void {
const refs: any = this.$refs;
if (refs.calendar) {
refs.calendar.refresh();
}
}
/**
* calendar 的 beforeload 事件
*
* @param {*} arg
* @memberof ${srfclassname('${view.name}')}
*/
public onBeforeLoad(arg: any){
let _this:any = this;
if (_this.viewparams && Object.keys(_this.viewparams).length > 0) {
Object.assign(arg, _this.viewparams);
}
if (_this.$refs.searchform && _this.isExpandSearchForm) {
Object.assign(arg, _this.$refs.searchform.getData());
}
if (_this && !_this.isExpandSearchForm) {
Object.assign(arg, { query: _this.query });
}
// 快速分组和快速搜索栏
let otherQueryParam:any = {};
if(_this && (_this.qucikGroupData as any)){
Object.assign(otherQueryParam,_this.qucikGroupData);
}
if(_this && _this.qucikFormData){
Object.assign(otherQueryParam,_this.qucikFormData);
}
Object.assign(arg,{viewparams:otherQueryParam});
}
/**
* searchform 部件 search 事件
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}
*/
public searchform_search($event: any) {
this.onSearch($event);
}
/**
* searchform 部件 load 事件
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}
*/
public searchform_load($event: any) {
this.onSearch($event);
}
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store });
</#if>
<#if view.isEnableQuickGroup()>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 快速分组数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikGroupData:any;
/**
* 快速分组是否有抛值
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public isEmitQuickGroupValue:boolean = false;
/**
* 快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupModel:Array<any> = [];
/**
* 加载快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public loadQuickGroupModel(){
<#if view.getQuickGroupPSCodeList()??>
<#assign codelist=view.getQuickGroupPSCodeList() />
let quickGroupCodeList:any = {tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'};
if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(quickGroupCodeList.tag);
if (codelist) {
this.quickGroupModel = [...this.handleDynamicData(JSON.parse(JSON.stringify(codelist.items)))];
} else {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
}
}else if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"DYNAMIC")){
this.codeListService.getItems(quickGroupCodeList.tag,{},{}).then((res:any) => {
this.quickGroupModel = res;
}).catch((error:any) => {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
});
}
</#if>
}
/**
* 处理快速分组模型动态数据部分(%xxx%)
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleDynamicData(inputArray:Array<any>){
if(inputArray.length >0){
inputArray.forEach((item:any) =>{
if(item.data && Object.keys(item.data).length >0){
Object.keys(item.data).forEach((name:any) =>{
let value: any = item.data[name];
if (value && typeof(value)=='string' && value.startsWith('%') && value.endsWith('%')) {
const key = (value.substring(1, value.length - 1)).toLowerCase();
if (this.context[key]) {
value = this.context[key];
} else if(this.viewparams[key]){
value = this.viewparams[key];
}
}
item.data[name] = value;
})
}
})
}
return inputArray;
}
/**
* 快速分组值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikGroupValueChange($event:any){
if($event && $event.data){
this.qucikGroupData = $event.data;
if(this.isEmitQuickGroupValue){
this.onSearch($event);
}
}
this.isEmitQuickGroupValue = true;
}
</#if>
<#if view.getQuickPSDESearchForm()??>
/**
* 快速搜索栏数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikFormData:any;
/**
* 快速搜索栏值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikFormValueChange($event:any){
this.qucikFormData = $event;
this.onSearch($event);
}
</#if>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -2,6 +2,14 @@
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
</#assign>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -19,6 +27,10 @@
}
</#assign>
<#assign mounted_block>
<#if view.isEnableQuickGroup()>_this.loadQuickGroupModel();</#if>
</#assign>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
......@@ -40,6 +52,212 @@
*/
protected formDruipartEvent: any | undefined;
/**
* 搜索值
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}
*/
public query: string = '';
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}
*/
public isExpandSearchForm: boolean = ${view.isExpandSearchForm()?c};
/**
* 快速搜索
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}
*/
public onSearch($event: any): void {
const refs: any = this.$refs;
if (refs.calendar) {
refs.calendar.refresh();
}
}
/**
* calendar 的 beforeload 事件
*
* @param {*} arg
* @memberof ${srfclassname('${view.name}')}
*/
public onBeforeLoad(arg: any){
let _this:any = this;
if (_this.viewparams && Object.keys(_this.viewparams).length > 0) {
Object.assign(arg, _this.viewparams);
}
if (_this.$refs.searchform && _this.isExpandSearchForm) {
Object.assign(arg, _this.$refs.searchform.getData());
}
if (_this && !_this.isExpandSearchForm) {
Object.assign(arg, { query: _this.query });
}
// 快速分组和快速搜索栏
let otherQueryParam:any = {};
if(_this && (_this.qucikGroupData as any)){
Object.assign(otherQueryParam,_this.qucikGroupData);
}
if(_this && _this.qucikFormData){
Object.assign(otherQueryParam,_this.qucikFormData);
}
Object.assign(arg,{viewparams:otherQueryParam});
}
/**
* searchform 部件 search 事件
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}
*/
public searchform_search($event: any) {
this.onSearch($event);
}
/**
* searchform 部件 load 事件
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}
*/
public searchform_load($event: any) {
this.onSearch($event);
}
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store });
</#if>
<#if view.isEnableQuickGroup()>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 快速分组数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikGroupData:any;
/**
* 快速分组是否有抛值
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public isEmitQuickGroupValue:boolean = false;
/**
* 快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupModel:Array<any> = [];
/**
* 加载快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public loadQuickGroupModel(){
<#if view.getQuickGroupPSCodeList()??>
<#assign codelist=view.getQuickGroupPSCodeList() />
let quickGroupCodeList:any = {tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'};
if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(quickGroupCodeList.tag);
if (codelist) {
this.quickGroupModel = [...this.handleDynamicData(JSON.parse(JSON.stringify(codelist.items)))];
} else {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
}
}else if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"DYNAMIC")){
this.codeListService.getItems(quickGroupCodeList.tag,{},{}).then((res:any) => {
this.quickGroupModel = res;
}).catch((error:any) => {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
});
}
</#if>
}
/**
* 处理快速分组模型动态数据部分(%xxx%)
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleDynamicData(inputArray:Array<any>){
if(inputArray.length >0){
inputArray.forEach((item:any) =>{
if(item.data && Object.keys(item.data).length >0){
Object.keys(item.data).forEach((name:any) =>{
let value: any = item.data[name];
if (value && typeof(value)=='string' && value.startsWith('%') && value.endsWith('%')) {
const key = (value.substring(1, value.length - 1)).toLowerCase();
if (this.context[key]) {
value = this.context[key];
} else if(this.viewparams[key]){
value = this.viewparams[key];
}
}
item.data[name] = value;
})
}
})
}
return inputArray;
}
/**
* 快速分组值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikGroupValueChange($event:any){
if($event && $event.data){
this.qucikGroupData = $event.data;
if(this.isEmitQuickGroupValue){
this.onSearch($event);
}
}
this.isEmitQuickGroupValue = true;
}
</#if>
<#if view.getQuickPSDESearchForm()??>
/**
* 快速搜索栏数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikFormData:any;
/**
* 快速搜索栏值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikFormValueChange($event:any){
this.qucikFormData = $event;
this.onSearch($event);
}
</#if>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
......
......@@ -12,7 +12,7 @@ Vue.use(Router);
{
path: '<#if !isIncludeIndex>/</#if>appdataredirectview/:appdataredirectview?',
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......@@ -30,7 +30,7 @@ Vue.use(Router);
{
path: '<#if !isIncludeIndex>/</#if>appwfdataredirectview/:appwfdataredirectview?',
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......@@ -48,7 +48,7 @@ Vue.use(Router);
{
path: '<#if !isIncludeIndex>/</#if>${subView.getViewType()?lower_case}/:${subView.getViewType()?lower_case}?',
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......@@ -66,7 +66,7 @@ Vue.use(Router);
{
path: '<#if !isIncludeIndex>/</#if>${subView.getCodeName()?lower_case}/:${subView.getCodeName()?lower_case}?',
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......@@ -102,7 +102,7 @@ Vue.use(Router);
path: '/${path}${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?',
<#-- 嵌入关系路由未设置name属性 -->
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......@@ -125,7 +125,7 @@ Vue.use(Router);
{
path: '/${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?',
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......@@ -142,7 +142,7 @@ Vue.use(Router);
{
path: '/${subView.getCodeName()?lower_case}/:${subView.getCodeName()?lower_case}?',
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......@@ -182,7 +182,7 @@ const router = new Router({
});
},
meta: {
caption: '<#if view.isPSDEView()>entities.${view.getPSDataEntity().getCodeName()?lower_case}.views.${view.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${view.getCodeName()?lower_case}.caption</#if>',
caption: '<#if view.isPSDEView()>entities.${view.getPSAppDataEntity().getCodeName()?lower_case}.views.${view.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${view.getCodeName()?lower_case}.caption</#if>',
viewType: 'APPINDEX',
<#if view.getPSSysImage()??>
imgPath: '${view.getPSSysImage().getImagePath()}',
......@@ -212,7 +212,7 @@ const router = new Router({
{
path: '${path}${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?',
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......@@ -236,7 +236,7 @@ const router = new Router({
{
path: '${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${subView.getPSDEViewCodeName()?lower_case}/:${subView.getPSDEViewCodeName()?lower_case}?',
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......@@ -254,7 +254,7 @@ const router = new Router({
{
path: '${subView.getCodeName()?lower_case}/:${subView.getCodeName()?lower_case}?',
meta: {
caption: '<#if subView.isPSDEView()>entities.${subView.getPSDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
caption: '<#if subView.isPSDEView()>entities.${subView.getPSAppDataEntity().getCodeName()?lower_case}.views.${subView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${subView.getCodeName()?lower_case}.caption</#if>',
<#if subView.getPSSysImage()??>
imgPath: '${subView.getPSSysImage().getImagePath()}',
iconCls: '${subView.getPSSysImage().getCssClass()}',
......
......@@ -24,6 +24,8 @@ export const Environment = {
uniteAddress:"http://172.16.100.202:8114",
// 是否为开发模式
devMode: true,
// 是否开启权限认证
enablePermissionValid:false,
// 项目模板地址
ProjectUrl: "http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7",
// 配置平台地址
......
......@@ -3,7 +3,7 @@ TARGET=PSSYSAPP
</#ibiztemplate>
<#ibizinclude>../@MACRO/FUNC.ts</#ibizinclude>
<#list app.getAllPSAppDataEntities() as dataEntitey>
import ${dataEntitey.getCodeName()?lower_case}_en_US from '@locale/lanres/${srffilepath2(dataEntitey.getCodeName())}/${srffilepath2(dataEntitey.getCodeName())}_en_US';
import ${dataEntitey.getCodeName()?lower_case}_en_US from '@locale/lanres/entities/${srffilepath2(dataEntitey.getCodeName())}/${srffilepath2(dataEntitey.getCodeName())}_en_US';
</#list>
import components_en_US from '@locale/lanres/components/components_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
......
......@@ -3,7 +3,7 @@ TARGET=PSSYSAPP
</#ibiztemplate>
<#ibizinclude>../@MACRO/FUNC.ts</#ibizinclude>
<#list app.getAllPSAppDataEntities() as dataEntitey>
import ${dataEntitey.getCodeName()?lower_case}_zh_CN from '@locale/lanres/${srffilepath2(dataEntitey.getCodeName())}/${srffilepath2(dataEntitey.getCodeName())}_zh_CN';
import ${dataEntitey.getCodeName()?lower_case}_zh_CN from '@locale/lanres/entities/${srffilepath2(dataEntitey.getCodeName())}/${srffilepath2(dataEntitey.getCodeName())}_zh_CN';
</#list>
import components_zh_CN from '@locale/lanres/components/components_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
......
......@@ -8,17 +8,17 @@ export default {
<#list app.getAllPSAppCodeLists() as codelist>
<#if codelist.getCodeListType() == "STATIC">
${codelist.codeName}: {
<#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??>
<#if codelist.isCodeItemValueNumber()>
<#list codelist.getAllPSCodeItems() as codeitem>
${codeitem.getValue()?j_string}: '<@getTextLanguage codeitem langrestype />',
</#list>
<#else>
<#list codelist.getAllPSCodeItems() as codeitem>
'${codeitem.getValue()?j_string}': '<@getTextLanguage codeitem langrestype />',
</#list>
<#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??>
<#if codelist.isCodeItemValueNumber()>
<#list codelist.getAllPSCodeItems() as codeitem>
${codeitem.getValue()?j_string}: '<@getTextLanguage codeitem langrestype />',
</#list>
<#else>
<#list codelist.getAllPSCodeItems() as codeitem>
'${codeitem.getValue()?j_string}': '<@getTextLanguage codeitem langrestype />',
</#list>
</#if>
</#if>
</#if>
empty: '<@getEmptyTextLanguage codelist langrestype '' />',
},
<#elseif codelist.getCodeListType() == "DYNAMIC">
......
......@@ -8,17 +8,17 @@ export default {
<#list app.getAllPSAppCodeLists() as codelist>
<#if codelist.getCodeListType() == "STATIC">
${codelist.codeName}: {
<#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??>
<#if codelist.isCodeItemValueNumber()>
<#list codelist.getAllPSCodeItems() as codeitem>
${codeitem.getValue()?j_string}: '<@getTextLanguage codeitem langrestype />',
</#list>
<#else>
<#list codelist.getAllPSCodeItems() as codeitem>
'${codeitem.getValue()?j_string}': '<@getTextLanguage codeitem langrestype />',
</#list>
<#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??>
<#if codelist.isCodeItemValueNumber()>
<#list codelist.getAllPSCodeItems() as codeitem>
${codeitem.getValue()?j_string}: '<@getTextLanguage codeitem langrestype />',
</#list>
<#else>
<#list codelist.getAllPSCodeItems() as codeitem>
'${codeitem.getValue()?j_string}': '<@getTextLanguage codeitem langrestype />',
</#list>
</#if>
</#if>
</#if>
empty: '<@getEmptyTextLanguage codelist langrestype '' />',
},
<#elseif codelist.getCodeListType() == "DYNAMIC">
......
<#ibiztemplate>
TARGET=PSAPPDATAENTITY
</#ibiztemplate>
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#ibizinclude>../../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'EN'/>
export default {
......@@ -18,7 +18,7 @@ export default {
views: {
<#list item.getAllPSAppViews() as obj>
${obj.getPSDEViewCodeName()?lower_case}: {
caption: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
caption: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
title: '<@getTitleLanguage obj langrestype />',
},
</#list>
......@@ -35,7 +35,7 @@ export default {
<#if ctrl.getControlType() == 'FORM' || ctrl.getControlType() == 'SEARCHFORM'>
details: {
<#list ctrl.getAllPSDEFormDetails() as obj>
${obj.name?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
${obj.name?lower_case}: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list>
},
</#if>
......@@ -43,7 +43,7 @@ export default {
columns: {
<#if ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as obj>
${obj.getName()?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
${obj.getName()?lower_case}: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list>
</#if>
},
......@@ -51,7 +51,7 @@ export default {
exportColumns: {
<#if ctrl.getPSDEDataExport().getPSDEDataExportItems()??>
<#list ctrl.getPSDEDataExport().getPSDEDataExportItems() as obj>
${obj.getName()?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
${obj.getName()?lower_case}: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list>
</#if>
},
......@@ -72,8 +72,8 @@ export default {
<#if ctrl.getAllPSDEToolbarItems()??>
<#list ctrl.getAllPSDEToolbarItems() as obj>
${obj.getName()?lower_case}: {
caption: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
tip: "<#ibizinclude>../../@MACRO/TIPLANG.ts</#ibizinclude>",
caption: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
tip: "<#ibizinclude>../../../@MACRO/TIPLANG.ts</#ibizinclude>",
},
</#list>
</#if>
......@@ -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>",
${obj.getUIActionTag()?lower_case}: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list>
},
</#if>
......
<#ibiztemplate>
TARGET=PSAPPDATAENTITY
</#ibiztemplate>
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#ibizinclude>../../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'ZH_CN'/>
export default {
<#-- 实体属性输出 -->
......@@ -17,7 +17,7 @@ export default {
views: {
<#list item.getAllPSAppViews() as obj>
${obj.getPSDEViewCodeName()?lower_case}: {
caption: '<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
caption: '<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
title: '<@getTitleLanguage obj langrestype />',
},
</#list>
......@@ -34,7 +34,7 @@ export default {
<#if ctrl.getControlType() == 'FORM' || ctrl.getControlType() == 'SEARCHFORM'>
details: {
<#list ctrl.getAllPSDEFormDetails() as obj>
${obj.name?lower_case}: '<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
${obj.name?lower_case}: '<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
</#list>
},
</#if>
......@@ -42,7 +42,7 @@ export default {
columns: {
<#if ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as obj>
${obj.getName()?lower_case}: '<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
${obj.getName()?lower_case}: '<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
</#list>
</#if>
},
......@@ -50,7 +50,7 @@ export default {
exportColumns: {
<#if ctrl.getPSDEDataExport().getPSDEDataExportItems()??>
<#list ctrl.getPSDEDataExport().getPSDEDataExportItems() as obj>
${obj.getName()?lower_case}: "<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
${obj.getName()?lower_case}: "<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>",
</#list>
</#if>
},
......@@ -71,8 +71,8 @@ export default {
<#if ctrl.getAllPSDEToolbarItems()??>
<#list ctrl.getAllPSDEToolbarItems() as obj>
${obj.getName()?lower_case}: {
caption: '<#ibizinclude>../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
tip: '<#ibizinclude>../../@MACRO/TIPLANG.ts</#ibizinclude>',
caption: '<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
tip: '<#ibizinclude>../../../@MACRO/TIPLANG.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>',
${obj.getUIActionTag()?lower_case}: '<#ibizinclude>../../../@MACRO/CAPTIONLANG.ts</#ibizinclude>',
</#list>
},
</#if>
......
......@@ -19,13 +19,44 @@ import { Verify } from '@/utils/verify/verify';
<#macro setParam logicNode>
<#if logicNode.getPSDELogicNodeParams()??>
<#list logicNode.getPSDELogicNodeParams() as logicparam>
<#if logicparam.getSrcFieldName()?? && logicparam.getDstFieldName()??>
Object.assign(params,{${logicparam.getDstFieldName()?lower_case}:<#if logicparam.getSrcFieldName()?? && logicparam.getSrcFieldName() != "">params.${logicparam.getSrcFieldName()?lower_case}<#else>params.${logicparam.getDstFieldName()?lower_case}</#if>});
<#if logicparam.getDstPSDELogicParam?? && logicparam.getDstPSDELogicParam()?? && logicparam.getDstPSDELogicParam().getParamPSAppDataEntity()??>
<#if logicparam.getSrcFieldName()?lower_case?contains("id") >
Object.assign(context,{${logicparam.getDstPSDELogicParam().getParamPSAppDataEntity().getCodeName()?lower_case}:params.${logicparam.getSrcFieldName()?lower_case} ? params.${logicparam.getSrcFieldName()?lower_case} : null});
</#if>
</#if>
<#if logicparam.getDstPSDELogicParam()?? && logicparam.getDstFieldName()?? && logicparam.getSrcValueType()??>
<#-- 源参数 -->
<#if logicparam.getSrcPSDELogicParam()??><#assign srcParam = logicparam.getSrcPSDELogicParam() /></#if>
<#-- 源参数属性名称 -->
<#if logicparam.getSrcFieldName()??><#assign srcFieldParam = logicparam.getSrcFieldName()?lower_case /></#if>
<#-- 目标参数 -->
<#assign dstParam = logicparam.getDstPSDELogicParam() />
<#-- 目标参数属性名称 -->
<#assign dstFieldParam = logicparam.getDstFieldName()?lower_case />
<#-- 源逻辑参数 -->
let tempDstParam${logicparam_index}Context:any = this.paramsMap.get('${dstParam.getCodeName()}').context?this.paramsMap.get('${dstParam.getCodeName()}').context:{};
let tempDstParam${logicparam_index}Data:any = this.paramsMap.get('${dstParam.getCodeName()}').data?this.paramsMap.get('${dstParam.getCodeName()}').data:{};
<#if logicparam.getSrcValueType() =="SRCDLPARAM">
let tempSrcParam${logicparam_index}Data:any = this.paramsMap.get('${srcParam.getCodeName()}').data?this.paramsMap.get('${srcParam.getCodeName()}').data:{};
<#if dstParam.getParamPSAppDataEntity?? && dstParam.getParamPSAppDataEntity()?? && dstFieldParam == dstParam.getParamPSAppDataEntity().getKeyPSAppDEField().getCodeName()?lower_case>
Object.assign(tempDstParam${logicparam_index}Context,{${dstParam.getParamPSAppDataEntity().getCodeName()?lower_case}:tempSrcParam${logicparam_index}Data['${srcFieldParam}']});
</#if>
Object.assign(tempDstParam${logicparam_index}Data,{${dstFieldParam}:tempSrcParam${logicparam_index}Data['${srcFieldParam}']});
<#-- 应用上下文 -->
<#elseif logicparam.getSrcValueType() =="APPDATA">
<#if dstParam.getParamPSAppDataEntity?? && dstParam.getParamPSAppDataEntity()?? && dstFieldParam == dstParam.getParamPSAppDataEntity().getKeyPSAppDEField().getCodeName()?lower_case>
Object.assign(tempDstParam${logicparam_index}Context,{${dstParam.getParamPSAppDataEntity().getCodeName()?lower_case}:context['${srcFieldParam}']});
</#if>
Object.assign(tempDstParam${logicparam_index}Data,{${dstFieldParam}:context['${srcFieldParam}']});
<#-- 数据上下文 -->
<#elseif logicparam.getSrcValueType() =="DATACONTEXT">
<#if dstParam.getParamPSAppDataEntity?? && dstParam.getParamPSAppDataEntity()?? && dstFieldParam == dstParam.getParamPSAppDataEntity().getKeyPSAppDEField().getCodeName()?lower_case>
Object.assign(tempDstParam${logicparam_index}Context,{${dstParam.getParamPSAppDataEntity().getCodeName()?lower_case}:params['${srcFieldParam}']});
</#if>
Object.assign(tempDstParam${logicparam_index}Data,{${dstFieldParam}:params['${srcFieldParam}']});
<#-- 直接值 -->
<#elseif logicparam.getSrcValueType() =="SRCVALUE">
<#if dstParam.getParamPSAppDataEntity?? && dstParam.getParamPSAppDataEntity()?? && dstFieldParam == dstParam.getParamPSAppDataEntity().getKeyPSAppDEField().getCodeName()?lower_case>
Object.assign(tempDstParam${logicparam_index}Context,{${dstParam.getParamPSAppDataEntity().getCodeName()?lower_case}:${logicparam.getSrcValue()}});
</#if>
Object.assign(tempDstParam${logicparam_index}Data,{${dstFieldParam}:"${logicparam.getSrcValue()}"});
</#if>
this.paramsMap.set('${dstParam.getCodeName()}',{data:tempDstParam${logicparam_index}Data,context:tempDstParam${logicparam_index}Context});
</#if>
</#list>
</#if>
......@@ -48,7 +79,7 @@ import { Verify } from '@/utils/verify/verify';
</#if>
</#list>
<#else>
return params;
return this.paramsMap.get(this.defaultParamName).data;
</#if>
</#macro>
......@@ -84,6 +115,13 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
*/
private defaultParamName:string = "${item.getDefaultParamName()}";
/**
* 参数集合
*
* @memberof ${srfclassname('${item.getCodeName()}')}LogicBase
*/
private paramsMap:Map<string,any> = new Map();
/**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}LogicBase.
*
......@@ -91,7 +129,25 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
* @memberof ${srfclassname('${item.getCodeName()}')}LogicBase
*/
constructor(opts: any = {}) {
this.initParams(opts);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}LogicBase
*/
public initParams(opts:any){
<#if item.getPSDELogicParams?? && item.getPSDELogicParams()??>
<#list item.getPSDELogicParams() as logicParam>
<#if logicParam.isDefault()>
this.paramsMap.set('${logicParam.getCodeName()}',opts);
<#else>
this.paramsMap.set('${logicParam.getCodeName()}',{});
</#if>
</#list>
</#if>
}
<#if item.getPSDELogicLinks()??>
......@@ -157,13 +213,18 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
<#assign targetEntity = delogicNode.getDstPSAppDataEntity() />
<#assign deAction = delogicNode.getDstPSAppDEAction() />
let result: any;
<#if delogicNode.getDstPSDELogicParam()??>
let actionParam:any = this.paramsMap.get('${delogicNode.getDstPSDELogicParam().getCodeName()}');
<#else>
let actionParam:any = this.paramsMap.get(this.defaultParamName);
</#if>
const targetService:${srfclassname('${targetEntity.getCodeName()}')}Service = new ${srfclassname('${targetEntity.getCodeName()}')}Service();
if (targetService['${deAction.getCodeName()}'] && targetService['${deAction.getCodeName()}'] instanceof Function) {
result = await targetService['${deAction.getCodeName()}'](context,params, false);
result = await targetService['${deAction.getCodeName()}'](actionParam.context,actionParam.data, false);
}
if(result && result.status == 200){
Object.assign(params,result.data);
<@executeNext delogicNode />
Object.assign(actionParam.data,result.data);
<@executeNext delogicNode />
}
</#if>
}
......@@ -177,8 +238,8 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
*/
private async execute${delogicNode.codeName}(context:any,params:any,isloading:boolean){
// 准备参数节点
<@setParam delogicNode />
<@executeNext delogicNode />
<@setParam delogicNode />
<@executeNext delogicNode />
}
<#-- 开始流程节点 -->
<#elseif delogicNode.getLogicNodeType()?? && delogicNode.getLogicNodeType() == "STARTWF">
......@@ -190,7 +251,7 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
*/
private async execute${delogicNode.codeName}(context:any,params:any,isloading:boolean){
// 开始流程节点
return params;
return this.paramsMap.get(this.defaultParamName).data;
}
<#-- 异常捕获节点 -->
<#elseif delogicNode.getLogicNodeType()?? && delogicNode.getLogicNodeType() == "THROWEXCEPTION">
......@@ -202,7 +263,7 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
*/
private async execute${delogicNode.codeName}(context:any,params:any,isloading:boolean){
// 异常捕获节点
return params;
return this.paramsMap.get(this.defaultParamName).data;
}
<#-- 前端插件 -->
<#elseif delogicNode.getLogicNodeType()?? && delogicNode.getLogicNodeType() == "PFPLUGIN">
......@@ -214,7 +275,7 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
*/
private async execute${delogicNode.codeName}(context:any,params:any,isloading:boolean){
// 前端插件
return params;
return this.paramsMap.get(this.defaultParamName).data;
}
<#else>
/**
......@@ -226,7 +287,7 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
private async execute${delogicNode.codeName}(context:any,params:any,isloading:boolean){
// ${delogicNode.getLogicNodeType()}暂未支持
console.log("${delogicNode.getLogicNodeType()}暂未支持");
return params;
return this.paramsMap.get(this.defaultParamName).data;
}
</#if>
</#list>
......
......@@ -469,7 +469,7 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
<#assign appdeAction = singleAppMethod.getPSDEAction() />
<#if appdeAction.getPSDELogic?? && appdeAction.getPSDELogic()?? && (appdeAction.getActionHolder() == 2 || appdeAction.getActionHolder() == 3) >
<#assign appdelogic = appdeAction.getPSDELogic() />
let appLogic:${appdelogic.codeName}Logic = new ${appdelogic.codeName}Logic();
let appLogic:${srfclassname('${appdelogic.getCodeName()}')}Logic = new ${srfclassname('${appdelogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))});
const result = await appLogic.onExecute(context,data,isloading?true:false);
return {status:200,data:result};
<#else>
......
......@@ -50,6 +50,14 @@ export default class CodeListService {
*/
public static codelistCache:Map<string,any> = new Map();
/**
* 动态代码表缓存(已完成)
*
* @type {Map<string,any>}
* @memberof CodeListService
*/
public static codelistCached:Map<string,any> = new Map();
<#if app.getAllPSAppCodeLists()??>
<#list app.getAllPSAppCodeLists() as codelist>
<#if codelist.getCodeListType() == "DYNAMIC">
......@@ -73,33 +81,24 @@ export default class CodeListService {
* @returns {Promise<any[]>}
* @memberof CodeListService
*/
public getItems(tag: string,context:any = {}, data?: any, isloading?: boolean,): Promise<any[]> {
<#noparse>public getItems(tag: string,context:any = {}, data?: any, isloading?: boolean,): Promise<any[]> {
let _this: any = this;
if(context && context.srfsessionid){
delete context.srfsessionid;
}
let isEnableCache:boolean = _this[tag].isEnableCache;
let cacheTimeout:any = _this[tag].cacheTimeout;
return new Promise((resolve:any,reject:any) =>{
// 如有查询参数传递过来,需直接加载,不能使用缓存
if(data && Object.keys(data).length >0){
if (_this[tag]) {
_this[tag].getItems(context,JSON.parse(JSON.stringify(data)),isloading).then((result:any) =>{
resolve(result);
}).catch((error:any) =>{
Promise.reject([]);
})
}else{
return Promise.reject([]);
}
}else{
// 启用缓存
if(isEnableCache){
// 加载完成,从store获取
if(this.$store && _this.$store.getters){
let items:any = _this.$store.getters.getCodeListItems(tag);
// 加载完成,从本地缓存获取
if(CodeListService.codelistCached.get(`${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`)){
let items:any = CodeListService.codelistCached.get(`${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`);
if(items.length >0){
if(cacheTimeout !== -1){
if(new Date().getTime() > _this[tag].expirationTime){
_this[tag].getItems(context,data,isloading).then((result:any) =>{
_this.$store.commit('updateCodeList',{srfkey:tag,items:result});
CodeListService.codelistCached.set(`${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`,{items:result});
_this[tag].expirationTime = new Date().getTime() + cacheTimeout;
resolve(result);
}).catch((error:any) =>{
......@@ -114,10 +113,11 @@ export default class CodeListService {
}
}
if (_this[tag]) {
const callback:Function = (tag:string,promise:Promise<any>) =>{
const callback:Function = (context:any ={},data:any ={},tag:string,promise:Promise<any>) =>{
promise.then((result:any) =>{
console.log()
if(result.length > 0){
_this.$store.commit('updateCodeList',{srfkey:tag,items:result});
CodeListService.codelistCached.set(`${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`,{items:result});
return resolve(result);
}else{
return resolve([]);
......@@ -127,15 +127,15 @@ export default class CodeListService {
})
}
// 加载中,UI又需要数据,解决连续加载同一代码表问题
if(CodeListService.codelistCache.get(tag)){
callback(tag,CodeListService.codelistCache.get(tag));
if(CodeListService.codelistCache.get(`${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`)){
callback(context,data,tag,CodeListService.codelistCache.get(`${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`));
}else{
let result:Promise<any> = _this[tag].getItems(context,data,isloading);
CodeListService.codelistCache.set(tag,result);
CodeListService.codelistCache.set(`${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`,result);
if(cacheTimeout !== -1){
_this[tag].expirationTime = new Date().getTime() + cacheTimeout;
}
callback(tag,result);
callback(context,data,tag,result);
}
}
}else{
......@@ -149,7 +149,6 @@ export default class CodeListService {
return Promise.reject([]);
}
}
}
})
}
}</#noparse>
}
\ No newline at end of file
......@@ -69,10 +69,10 @@ export default class ${srfclassname('${item.getCodeName()}')}UtilServiceBase ext
* @memberof ${srfclassname('${item.getCodeName()}')}UtilServiceBase
*/
public initBasicParam(){
this.modelIdField = "${item.getModelIdPSAppDEField().getCodeName()?lower_case}";
this.modelField = "${item.getModelPSAppDEField().getCodeName()?lower_case}";
this.appIdField = "${item.getAppIdPSAppDEField().getCodeName()?lower_case}";
this.userIdField = "${item.getUserIdPSAppDEField().getCodeName()?lower_case}";
<#if item.getModelIdPSAppDEField()??>this.modelIdField = "${item.getModelIdPSAppDEField().getCodeName()?lower_case}";</#if>
<#if item.getModelIdPSAppDEField()??>this.modelField = "${item.getModelPSAppDEField().getCodeName()?lower_case}";</#if>
<#if item.getModelIdPSAppDEField()??>this.appIdField = "${item.getAppIdPSAppDEField().getCodeName()?lower_case}";</#if>
<#if item.getModelIdPSAppDEField()??>this.userIdField = "${item.getUserIdPSAppDEField().getCodeName()?lower_case}";</#if>
<#if item.getStoagePSAppDataEntity()??>
<#assign stoageDataEntity = item.getStoagePSAppDataEntity() />
this.stoageEntityName ="${stoageDataEntity.getCodeName()?lower_case}";
......@@ -89,27 +89,27 @@ export default class ${srfclassname('${item.getCodeName()}')}UtilServiceBase ext
* @memberof ${srfclassname('${item.getCodeName()}')}UtilServiceBase
*/
public loadModelData(context: any = {},data: any = {}, isloading?: boolean): Promise<any>{
<#-- const {context:contextResult,data:dataResult} = this.handlePreParam(context,data); -->
return new Promise((resolve: any, reject: any) => {
let dataStr = window.localStorage.getItem(data.modelid);
if(dataStr) {
const data: any = JSON.parse(dataStr);
resolve({status:200,data:data.model});
} else {
resolve({status:200,data:[]});
}
<#-- let result: Promise<any>;
const _appEntityService: any = this.stoageDataService;
if (_appEntityService[this.loadAction] && _appEntityService[this.loadAction] instanceof Function) {
result = _appEntityService[this.loadAction](contextResult,dataResult, isloading);
} else {
result = _appEntityService.Get(contextResult,dataResult, isloading);
//从接口加载
if(data && data.utilServiceName){
const requestParam:any ={configType:data.utilServiceName,targetType:data.modelid};
this.stoageDataService.getDynaModel(context,requestParam).then((res:any) =>{
if(res && res.status === 200){
const data: any = res.data;
resolve({status:200,data:(data && data.model)?data.model:[]});
}
}).catch((error:any) =>{
reject(error);
})
}else{
let dataStr = window.localStorage.getItem(data.modelid);
if(dataStr) {
const data: any = JSON.parse(dataStr);
resolve({status:200,data:data.model});
} else {
resolve({status:200,data:[]});
}
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
}); -->
});
}
......@@ -123,61 +123,23 @@ export default class ${srfclassname('${item.getCodeName()}')}UtilServiceBase ext
* @memberof ${srfclassname('${item.getCodeName()}')}UtilServiceBase
*/
public saveModelData(context: any = {},action:string,data: any = {}, isloading?: boolean):Promise<any>{
<#-- const {context:contextResult,data:dataResult} = this.handlePreParam(context,data); -->
return new Promise((resolve: any, reject: any) => {
window.localStorage.setItem(data.modelid, JSON.stringify(data));
resolve({status:200,data:data.model});
<#-- let result: Promise<any> = Object.is(action,"Update") ? this.updateModelData(context,data,isloading):this.createdModelData(context,data,isloading);
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
}); -->
});
}
/**
* 新建模型数据
*
* @param context 应用上下文
* @param data 传入模型数据
* @param isloading 是否加载
* @memberof ${srfclassname('${item.getCodeName()}')}UtilServiceBase
*/
public createdModelData(context: any = {},data: any = {}, isloading?: boolean):Promise<any>{
const {context:contextResult,data:dataResult} = this.handlePreParam(context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.stoageDataService;
result = _appEntityService[this.createAction](contextResult,dataResult, isloading);
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
// 存储到数据库
if(data && data.utilServiceName){
const requestParam:any ={configType:data.utilServiceName,targetType:data.modelid,model:data.model};
this.stoageDataService.setDynaModel(context,requestParam).then((res:any) =>{
if(res && res.status === 200){
resolve({status:200,data:data.model});
}
}).catch((error:any) =>{
reject(error);
})
}else{
window.localStorage.setItem(data.modelid, JSON.stringify(data));
resolve({status:200,data:data.model});
}
});
}
/**
* 更新模型数据
*
* @param context 应用上下文
* @param data 传入模型数据
* @param isloading 是否加载
* @memberof ${srfclassname('${item.getCodeName()}')}UtilServiceBase
*/
public updateModelData(context: any = {},data: any = {}, isloading?: boolean):Promise<any>{
const {context:contextResult,data:dataResult} = this.handlePreParam(context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.stoageDataService;
result = _appEntityService[this.updateAction](contextResult,dataResult, isloading);
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
}
\ No newline at end of file
## v7.0.0-alpha.8 [2020-6-4]
### Bug修复
修复树右键菜单事件传值bug
修复树节点图标样式
修复viewdata和viewparams解析不同步
修复界面行为多主键分隔符由";"改为","
修复多层导航失效
数据选择,自动填充编辑器参数处理,动态代码表编辑器参数
修复富文本国际化bug
修复坐标轴的自定义参数
修复分页面板配置导航参数
修复实体处理逻辑
修复应用级context对象特性丢失的问题
修复新建逻辑
修复动态代码表传递上下文、参数逻辑
### 功能新增及优化
#### 模板
树选择双击
列表快速分组和快速搜索表单
数据视图快速分组和快速搜索表单
日历图例、日历快速分组和批处理工具栏
实体国际化路径调整
面板界面行为支持
列表,数据视图下拉加载
增加图表名称代码表识别、雷达图支持
uaa菜单权限
增加数据看板动态模型数据存库
应用样式调整
#### 基础文件
人员选择标准控件样式调整
应用样式调整
## v7.0.0-alpha.7 [2020-5-28]
### Bug修复
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册