提交 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计数器服务对象
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册