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

Revert "Revert "Merge branch 'dev'""

This reverts commit 1e20fde2.
上级 f58552fc
......@@ -23,7 +23,17 @@
dataType: 'TEXT',
},
<#-- 表单保留字段end -->
<#-- 表单项 -->
<#-- 动态表单start -->
<#list ctrl.getAllPSDEFormDetails() as item>
<#if item.getDetailType()?? && item.getDetailType() == "FORMPART" && item.getFormPartType() =="DYNASYS">
{
name: '${item.getName()}',
dataType:'FORMPART'
},
</#if>
</#list>
<#-- 动态表单end -->
<#-- 表单项start -->
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem>
{
......@@ -40,6 +50,7 @@
},
</#list>
</#if>
<#-- 表单项end -->
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
......
......@@ -388,6 +388,10 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}else{
if(item.dataType && Object.is(item.dataType,"FORMPART")){
Object.assign(requestData,data[item.name]);
}
}
}
});
......@@ -420,6 +424,42 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
return itemName.trim();
}
/**
* 重写处理返回数据
*
* @param {string} action
* @param {*} response
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleResponseData(action: string, data: any = {},isCreate?:boolean,codelistArray?:any){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let item: any = {};
let dataItems: any[] = model.getDataItems();
dataItems.forEach(dataitem => {
let val = data.hasOwnProperty(dataitem.prop) ? data[dataitem.prop] : null;
if (val === null) {
val = data.hasOwnProperty(dataitem.name) ? data[dataitem.name] : null;
}
if((isCreate === undefined || isCreate === null ) && Object.is(dataitem.dataType, 'GUID') && Object.is(dataitem.name, 'srfkey') && (val && !Object.is(val, ''))){
isCreate = true;
}
item[dataitem.name] = val;
// 转化代码表
if(codelistArray && dataitem.codelist){
if(codelistArray.get(dataitem.codelist.tag) && codelistArray.get(dataitem.codelist.tag).get(val)){
item[dataitem.name] = codelistArray.get(dataitem.codelist.tag).get(val);
}
}
});
item.srfuf = data.srfuf ? data.srfuf : (isCreate ? "0" : "1");
item = Object.assign(data,item);
return item;
}
<#ibizinclude>
./SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
......@@ -54,7 +54,7 @@
</div>
</template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/codelist-service";
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......
......@@ -61,7 +61,7 @@
</template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/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';
......
......@@ -61,7 +61,7 @@
</template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/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';
......
<div></div>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<app-rawitem
contentStyle="<#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>"
sizeStyle="<#if item.getRawItemHeight() gt 0>height: ${item.getRawItemHeight()?c}px;</#if><#if item.getRawItemWidth() gt 0>width: ${item.getRawItemWidth()?c}px;</#if>"
contentType="<#if item.getContentType?? && item.getContentType()??>${item.getContentType()}</#if>"
<#if item.getRawContent?? && item.getRawContent()??>
rawContent="${item.getRawContent()}"
</#if>
<#if item.getHtmlContent?? && item.getHtmlContent()??>
htmlContent="${item.getHtmlContent()}"
</#if>
<#if item.getPSSysImage?? && item.getPSSysImage()??>
<#assign img=item.getPSSysImage()>
<#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>
imageClass="${img.getCssClass()}"</#if></#if>>
</app-rawitem>
</#if>
\ No newline at end of file
......@@ -118,6 +118,7 @@
<#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import { Environment } from '@/environments/environment';
import AuthService from '@/authservice/auth-service';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......@@ -287,6 +288,15 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public counterdata: any = {};
/**
* 建构权限服务对象
*
* @type {AuthService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public authService:AuthService = new AuthService({ $store: this.$store });
/**
* vue 生命周期
*
......@@ -549,7 +559,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
*/
public computedEffectiveMenus(inputMenus:Array<any>){
inputMenus.forEach((_item:any) =>{
if(!this.$store.getters['authresource/getAuthMenu'](_item)){
if(!this.authService.getMenusPermission(_item)){
_item.hidden = true;
if (_item.items && _item.items.length > 0) {
this.computedEffectiveMenus(_item.items);
......
......@@ -8,7 +8,7 @@ new FormButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=ite
<#elseif item.getDetailType() == 'DRUIPART'>
new FormDRUIPartModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMITEM'>
new FormItemModel({ ${detail}, disabled: false, enableCond: ${item.getEnableCond()?c} })
new FormItemModel({ ${detail},required:<#if item.isAllowEmpty()>false<#else>true</#if>, disabled: false, enableCond: ${item.getEnableCond()?c} })
<#elseif item.getDetailType() == 'FORMPAGE'>
new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'>
......
......@@ -119,6 +119,21 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
</#list>
};
/**
* 详情模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public detailsModel: any = {
<#list ctrl.getAllPSDEFormDetails() as formdetail>
${formdetail.name}: ${P.getPartCode(formdetail, 'DETAIL_MODEL').code},
</#list>
<#if !ctrl.isNoTabHeader()>
${ctrl.name}: new FormTabPanelModel({ caption: '${ctrl.name}', detailType: 'TABPANEL', name: '${ctrl.name}', visible: true, isShowCaption: true, form: this, tabPages: [<#list ctrl.getPSDEFormPages() as formmenber><#if formmenber_index gt 0>, </#if>{ name: '${formmenber.name}', index: ${formmenber_index}, visible: <#if formmenber.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if> }</#list>] }),
</#if>
};
/**
* 属性值规则
*
......@@ -131,28 +146,13 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
${formdetail.getName()}: [
{ type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值必须为<#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>数值<#else>字符串</#if>类型', trigger: 'change' },
{ type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值必须为<#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>数值<#else>字符串</#if>类型', trigger: 'blur' },
{ required: <#if formdetail.isAllowEmpty()>false<#else>true</#if>, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'change' },
{ required: <#if formdetail.isAllowEmpty()>false<#else>true</#if>, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'blur' },
{ required: this.detailsModel.${formdetail.getName()}.required, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'change' },
{ required: this.detailsModel.${formdetail.getName()}.required, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'blur' },
],
</#if>
</#list>
}
/**
* 详情模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public detailsModel: any = {
<#list ctrl.getAllPSDEFormDetails() as formdetail>
${formdetail.name}: ${P.getPartCode(formdetail, 'DETAIL_MODEL').code},
</#list>
<#if !ctrl.isNoTabHeader()>
${ctrl.name}: new FormTabPanelModel({ caption: '${ctrl.name}', detailType: 'TABPANEL', name: '${ctrl.name}', visible: true, isShowCaption: true, form: this, tabPages: [<#list ctrl.getPSDEFormPages() as formmenber><#if formmenber_index gt 0>, </#if>{ name: '${formmenber.name}', index: ${formmenber_index}, visible: <#if formmenber.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if> }</#list>] }),
</#if>
};
<#list ctrl.getPSDEFormItems() as item>
/**
* 监控表单属性 ${item.getName()} 值
......
......@@ -12,7 +12,7 @@
<#assign import_block>
import echarts from 'echarts';
import moment from "moment";
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/codelist-service";
import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,ChartBarSeries,ChartRadarSeries} from '@/model/chart-detail';
</#assign>
......
......@@ -12,7 +12,7 @@
<#assign import_block>
import echarts from 'echarts';
import moment from "moment";
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/codelist-service";
import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,ChartBarSeries,ChartRadarSeries} from '@/model/chart-detail';
</#assign>
......
......@@ -2,6 +2,9 @@
flex-grow: 1;
height: 100%;
overflow: auto;
.portlet-without-title{
width: 100%;
}
.ivu-row{
.ivu-card{
.ivu-card-head{
......
......@@ -97,7 +97,7 @@
</#if>
</template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/codelist-service";
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......
......@@ -66,11 +66,11 @@ ${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
dataItems = [...dataItems,
{
name: '${appDataEntity.getCodeName()?lower_case}',
prop: '${appDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}'
prop: '<#if calendarItem.getIdPSAppDEField()??>${calendarItem.getIdPSAppDEField().getCodeName()?lower_case}<#else>${appDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}</#if>'
},
{
name: 'title',
prop: '${appDataEntity.getMajorPSAppDEField().getCodeName()?lower_case}'
prop: '<#if calendarItem.getTextPSAppDEField()??>${calendarItem.getTextPSAppDEField().getCodeName()?lower_case}<#else>${appDataEntity.getMajorPSAppDEField().getCodeName()?lower_case}</#if>'
},
{
name:'start',
......
<#assign import_block>
import CodeListService from '@service/app/codelist-service';
import CodeListService from "@/codelist/codelist-service";
import i18n from '@/locale';
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
......
<#assign import_block>
import CodeListService from '@service/app/codelist-service';
import CodeListService from "@/codelist/codelist-service";
import i18n from '@/locale';
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
......
<#assign import_block>
import CodeListService from '@service/app/codelist-service';
import CodeListService from "@/codelist/codelist-service";
import i18n from '@/locale';
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
......
<#if item.getFormPartType()?? && item.getFormPartType() == "DYNASYS">
<app-form-part name="${item.name}" :context="context" :viewparams="viewparams" :data="mixinData" :formState="formState" appCodeName="${app.getCodeName()}" deCodeName="${de.getCodeName()}" formCodeName="${ctrl.getCodeName()}" formDetailCodeName="${item.getCodeName()}" @change="onFormItemValueChange"></app-form-part>
</#if>
\ No newline at end of file
......@@ -8,7 +8,7 @@ new FormButtonModel({ ${detail},disabled: false<#if item.getPSUIAction()??><#ass
<#elseif item.getDetailType() == 'DRUIPART'>
new FormDRUIPartModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMITEM'>
new FormItemModel({ ${detail}, disabled: false, enableCond: ${item.getEnableCond()?c} })
new FormItemModel({ ${detail}, required:<#if item.isAllowEmpty()>false<#else>true</#if>, disabled: false, enableCond: ${item.getEnableCond()?c} })
<#elseif item.getDetailType() == 'FORMPAGE'>
new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'>
......
<#if item.render??>
${item.render.code}
<#else>
<div class="<#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>" style="<#if item.getRawContentHeight() gt 0>height: ${item.getRawContentHeight()?c}px;</#if><#if item.getRawContentWidth() gt 0>width: ${item.getRawContentWidth()?c}px;</#if>">
${item.getRawContent()}
</div>
<app-rawitem
contentStyle="<#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>"
sizeStyle="<#if item.getRawItemHeight() gt 0>height: ${item.getRawItemHeight()?c}px;</#if><#if item.getRawItemWidth() gt 0>width: ${item.getRawItemWidth()?c}px;</#if>"
contentType="<#if item.getContentType?? && item.getContentType()??>${item.getContentType()}</#if>"
<#if item.getRawContent?? && item.getRawContent()??>
rawContent="${item.getRawContent()}"
</#if>
<#if item.getHtmlContent?? && item.getHtmlContent()??>
htmlContent="${item.getHtmlContent()}"
</#if>
<#if item.getPSSysImage?? && item.getPSSysImage()??>
<#assign img=item.getPSSysImage()>
<#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>
imageClass="${img.getCssClass()}"</#if></#if>>
</app-rawitem>
</#if>
\ No newline at end of file
......@@ -11,12 +11,13 @@
if (${P.getPartCode(ITEMBLANK, 'DETAIL_LOGIC').code}) {
ret = false;
}
this.rules().${formdetail.name}.some((rule: any) => {
<#-- this.rules().${formdetail.name}.some((rule: any) => {
if (rule.hasOwnProperty('required')) {
rule.required = ret;
}
return false;
});
}); -->
this.detailsModel.${formdetail.name}.required = ret;
}
</#if>
<#if formdetail.getPSDEFDGroupLogic('ITEMENABLE')??>
......
......@@ -197,6 +197,14 @@ import { Environment } from '@/environments/environment';
*/
public oldData: any = {};
/**
* 混入表单数据对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mixinData:any = {};
/**
* 表单数据对象
*
......@@ -204,8 +212,10 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public data: any = {
<#list ctrl.getPSDEFormItems() as item>
<#list ctrl.getAllPSDEFormDetails() as item>
<#if item.getDetailType()?? && (item.getDetailType() == "FORMITEM" || item.getDetailType() == "FORMPART")>
${item.getName()}: null,
</#if>
</#list>
${ctrl.getPSAppDataEntity().getCodeName()?lower_case}:null,
};
......@@ -255,8 +265,8 @@ import { Environment } from '@/environments/environment';
${formdetail.getName()}: [
{ type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值必须为<#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>数值<#else>字符串</#if>类型', trigger: 'change' },
{ type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值必须为<#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>数值<#else>字符串</#if>类型', trigger: 'blur' },
{ required: <#if formdetail.isAllowEmpty()>false<#else>true</#if>, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'change' },
{ required: <#if formdetail.isAllowEmpty()>false<#else>true</#if>, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'blur' },
{ required: this.detailsModel.${formdetail.getName()}.required, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'change' },
{ required: this.detailsModel.${formdetail.getName()}.required, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'blur' },
<#if formdetail.getEditorType?? && formdetail.getEditorType()?? && formdetail.isAllowEmpty?? && formdetail.isAllowEmpty()??>
<#if formdetail.getEditorType() == 'CHECKBOX' && !formdetail.isAllowEmpty()>
{ validator: (rule:any, value:any, callback:any) => {
......@@ -581,6 +591,7 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public fillForm(_datas: any = {},action:string): void {
this.mixinData = _datas;
this.ignorefieldvaluechange = true;
Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) {
......
......@@ -119,7 +119,7 @@ ${ctrl.render.code}
</#if>
</template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/codelist-service";
import { FormItemModel } from '@/model/form-detail';
import { Environment } from '@/environments/environment';
</#assign>
......
......@@ -61,7 +61,7 @@
</template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/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';
......
......@@ -13,6 +13,13 @@ ${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code}
</@ibizindent>
</#if>
<div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
./View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR">
......@@ -24,6 +31,13 @@ ${P.getCtrlCode(ctrl, 'CONTROL.html').code}
</#if>
</#list>
</#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
./View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -15,11 +15,25 @@
</#ibizinclude>
<div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
./View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('drtab')>
<@ibizindent blank=8>
${P.getCtrlCode('drtab', 'CONTROL.html').code}
</@ibizindent>
</#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
./View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
<div class='view-bottom-messages'>
<#if view.getPSViewMsgGroup()??>
<#assign viewMsgGroup = view.getPSViewMsgGroup()/>
<#list viewMsgGroup.getPSViewMsgGroupDetails() as detail>
<#assign msg = detail.getPSViewMsg()>
<#-- BEGIN:暂时支持静态 -->
<#if msg.getCodeName() != '' && msg.getPosition() == 'BOTTOM' && msg.getDynamicMode() == 0>
<#assign type = msg.getMessageType() />
<alert type='<#if type == 'INFO'>info<#elseif type == 'WARN'>warning<#elseif type == 'ERROR'>error<#else>info</#if>' closable={${msg.isEnableRemove()?c}}>
${msg.getTitle()}
<span slot='desc'>${msg.getMessage()}</span>
</alert>
<#compress>
<#if viewMsgGroup.getCodeName()??>
<app-alert-group position='BOTTOM' infoGroup='${viewMsgGroup.getCodeName()}'></app-alert-group>
<#else>
<app-alert-group position='BOTTOM' infoGroup='${viewMsgGroup.getName()}'></app-alert-group>
</#if>
<#-- END:暂时支持静态 -->
</#list>
</#compress>
</#if>
</div>
\ No newline at end of file
<div class='view-top-messages'>
<#if view.getPSViewMsgGroup()??>
<#assign viewMsgGroup = view.getPSViewMsgGroup()/>
<#list viewMsgGroup.getPSViewMsgGroupDetails() as detail>
<#assign msg = detail.getPSViewMsg()>
<#-- BEGIN:暂时支持静态 -->
<#if msg.getCodeName() != '' && msg.getPosition() == 'TOP' && msg.getDynamicMode() == 0>
<#assign type = msg.getMessageType() />
<alert type='<#if type == 'INFO'>info<#elseif type == 'WARN'>warning<#elseif type == 'ERROR'>error<#else>info</#if>' closable={${msg.isEnableRemove()?c}}>
${msg.getTitle()}
<span slot='desc'>${msg.getMessage()}</span>
</alert>
<#compress>
<#if viewMsgGroup.getCodeName()??>
<app-alert-group position='TOP' infoGroup='${viewMsgGroup.getCodeName()}'></app-alert-group>
<#else>
<app-alert-group position='TOP' infoGroup='${viewMsgGroup.getName()}'></app-alert-group>
</#if>
<#-- END:暂时支持静态 -->
</#list>
</#compress>
</#if>
</div>
\ No newline at end of file
......@@ -7,9 +7,23 @@
</#ibizinclude>
<div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('listexpbar')>
${P.getCtrlCode('listexpbar', 'CONTROL.html').code}
</#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -8,6 +8,13 @@
</#ibizinclude>
<div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
......@@ -50,6 +57,13 @@ ${P.getCtrlCode('list', 'CONTROL.html').code}
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -4,6 +4,13 @@
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :bordered="false" :dis-hover="true" >
<div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
......@@ -46,6 +53,13 @@ ${P.getCtrlCode('list', 'CONTROL.html').code}
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -7,9 +7,23 @@
</#ibizinclude>
<div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('dataviewexpbar')>
${P.getCtrlCode('dataviewexpbar', 'CONTROL.html').code}
</#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -13,6 +13,13 @@ ${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code}
</@ibizindent>
</#if>
<div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR">
......@@ -24,6 +31,13 @@ ${P.getCtrlCode(ctrl, 'CONTROL.html').code}
</#if>
</#list>
</#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
......@@ -13,6 +13,13 @@ ${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code}
</@ibizindent>
</#if>
<div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.getPSControls()??>
<#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR">
......@@ -24,6 +31,13 @@ ${P.getCtrlCode(ctrl, 'CONTROL.html').code}
</#if>
</#list>
</#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
......@@ -8,6 +8,13 @@
</#ibizinclude>
</@ibizindent>
<div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
......@@ -50,6 +57,13 @@
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -3,6 +3,13 @@
<app-studioaction :viewTitle="$t(model.srfCaption)" 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">
<div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
......@@ -46,6 +53,13 @@
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -7,9 +7,23 @@
</#ibizinclude>
<div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('calendarexpbar')>
${P.getCtrlCode('calendarexpbar', 'CONTROL.html').code}
</#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -8,6 +8,13 @@
</#ibizinclude>
<div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
......@@ -50,6 +57,13 @@ ${P.getCtrlCode('calendar', 'CONTROL.html').code}
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -4,6 +4,13 @@
<card class='view-card view-no-caption <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :bordered="false" :dis-hover="true" >
<div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
......@@ -46,6 +53,13 @@ ${P.getCtrlCode('calendar', 'CONTROL.html').code}
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -15,11 +15,25 @@
</#ibizinclude>
<div class="content-container edit-view2">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('drbar')>
<@ibizindent blank=8>
${P.getCtrlCode('drbar', 'CONTROL.html').code}
</@ibizindent>
</#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -7,9 +7,23 @@
</#ibizinclude>
<div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('gridexpbar')>
${P.getCtrlCode('gridexpbar', 'CONTROL.html').code}
</#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
......@@ -130,6 +130,36 @@
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
<iframe src="<#if ctrl.getPageUrl()??>${ctrl.getPageUrl()}</#if>" style="height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}<#else>400</#if>px;width: 100%;border-width: 1px;"></iframe>
</div>
<#-- 直接内容 -->
<#elseif ctrl.getPortletType() == 'RAWITEM'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'>
<span>
${ctrl.getTitle()}
</span>
</p>
</#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<app-rawitem
contentStyle="<#if ctrl.getPSSysCss()??>${ctrl.getPSSysCss().getCssName()}</#if>"
sizeStyle="<#if ctrl.getRawItemHeight() gt 0>height: ${ctrl.getRawItemHeight()?c}px;</#if><#if ctrl.getRawItemWidth() gt 0>width: ${ctrl.getRawItemWidth()?c}px;</#if>"
contentType="<#if ctrl.getContentType?? && ctrl.getContentType()??>${ctrl.getContentType()}</#if>"
<#if ctrl.getRawContent?? && ctrl.getRawContent()??>
rawContent="${ctrl.getRawContent()}"
</#if>
<#if ctrl.getHtmlContent?? && ctrl.getHtmlContent()??>
htmlContent="${ctrl.getHtmlContent()}"
</#if>
<#if ctrl.getPSSysImage?? && ctrl.getPSSysImage()??>
<#assign img=ctrl.getPSSysImage()>
<#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>
imageClass="${img.getCssClass()}"</#if></#if>>
</app-rawitem>
</#if>
</div>
<#-- 其他部件 -->
<#elseif ctrl.getContentPSControl()??><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
......
......@@ -2,14 +2,13 @@
<#if item.render??>
${item.render.code}
<#else>
<app-panel-item
<app-panel-button
caption="<#if item.getCaption?? && item.getCaption()??>${item.getCaption()}</#if>"
icon="<#if item.getPSSysImage?? && item.getPSSysImage()??>${item.getPSSysImage().getCssClass()}</#if>"
itemType="BUTTON"
:showCaption="<#if item.isShowCaption?? && item.isShowCaption()??>${item.isShowCaption()?c}<#else>true</#if>"
<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>lableStyle='${item.getLabelPSSysCss().getCssName()}'</#if>
<#if item.getPSUIAction?? && item.getPSUIAction()??>@onClick="($event)=>{uiAction(null, '${item.getPSUIAction().getUIActionTag()}', $event)}"</#if>>
</app-panel-item>
</app-panel-button>
</#if>
</#assign>
......
......@@ -2,14 +2,22 @@
<#if item.render??>
${item.render.code}
<#else>
<app-panel-item
<app-rawitem
contentStyle="<#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>"
sizeStyle="<#if item.getRawItemHeight() gt 0>height: ${item.getRawItemHeight()?c}px;</#if><#if item.getRawItemWidth() gt 0>width: ${item.getRawItemWidth()?c}px;</#if>"
contentType="<#if item.getContentType?? && item.getContentType()??>${item.getContentType()}</#if>"
caption="<#if item.getCaption?? && item.getCaption()??>${item.getCaption()}</#if>"
icon="<#if item.getPSSysImage?? && item.getPSSysImage()??>${item.getPSSysImage().getCssClass()}</#if>"
itemType="RAWITEM"
<#if item.getPSSysCss?? && item.getPSSysCss()??>contentStyle='${item.getPSSysCss().getCssName()}'</#if>>
${item.getHtmlContent()}
</app-panel-item>
<#if item.getRawContent?? && item.getRawContent()??>
rawContent="${item.getRawContent()}"
</#if>
<#if item.getHtmlContent?? && item.getHtmlContent()??>
htmlContent="${item.getHtmlContent()}"
</#if>
<#if item.getPSSysImage?? && item.getPSSysImage()??>
<#assign img=item.getPSSysImage()>
<#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>
imageClass="${img.getCssClass()}"</#if></#if>>
</app-rawitem>
</#if>
</#assign>
......
......@@ -4,7 +4,7 @@
<#assign import_block>
import { PanelDetailModel,PanelRawitemModel,PanelTabPanelModel,PanelTabPageModel,PanelFieldModel,PanelContainerModel,PanelControlModel,PanelUserControlModel,PanelButtonModel } from '@/model/panel-detail';
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/codelist-service";
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......
......@@ -7,6 +7,7 @@
:data="data"
:context="context"
:viewparams="viewparams"
:formState="formState"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled"
......
......@@ -4,7 +4,7 @@
</#ibizinclude>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/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';
......
......@@ -3,7 +3,7 @@
</#ibizinclude>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/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';
......
......@@ -4,7 +4,7 @@
</#ibizinclude>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/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';
......
......@@ -134,7 +134,9 @@
Object.assign(this.context,this.$store.getters.getAppData().context);
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
if(typeof this.viewdata == 'string') {
Object.assign(this.context, JSON.parse(this.viewdata));
}
if(this.context && this.context.srfparentdename){
Object.assign(this.viewparams,{srfparentdename:this.context.srfparentdename});
}
......
......@@ -178,7 +178,9 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
for(let key in this.viewparams){
delete this.viewparams[key];
}
if(typeof this.viewparams == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}
<#if watch_viewparam_block??>${watch_viewparam_block}</#if>
}
}
......@@ -199,7 +201,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
_this.engine.load();
<#if viewdata_block??>${viewdata_block}</#if>
});
} else if(!Object.is(newVal, oldVal) && _this.refresh() && Object.is(_this.$util.typeOf(_this.refresh()), 'function')) {
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
}
}
......
......@@ -3,7 +3,7 @@
</#ibizinclude>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/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';
......
......@@ -3,7 +3,7 @@
</#ibizinclude>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
import CodeListService from "@/codelist/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';
......
......@@ -5,6 +5,7 @@ import App from '@/App.vue';
import ElementUi from 'element-ui';
import ViewUI from 'view-design';
import ibizLab from 'ibiz-vue-lib';
import axios from "axios";
import { Interceptors } from '@/utils';
import {Print} from '@/utils/print';
import i18n from '@/locale'
......@@ -27,13 +28,18 @@ import { PortletComponent } from '@/portlet-register';
import store from '@/store';
import router from './router';
const win: any = window;
win.axios = axios;
Vue.config.errorHandler = function (err: any, vm: any, info: any) {
console.log(err);
}
Vue.config.productionTip = false;
Vue.use(Print);
Vue.use(ibizLab);
Vue.use(Vuex);
Vue.use(win.AVUE);
Vue.use(VueRouter);;
Vue.use(ElementUi, {
i18n: (key: any, value: any) => i18n.t(key, value)
......
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
{
<#if app.getAllPSAppViewMsgGroups()??>
<#list app.getAllPSAppViewMsgGroups() as viewMsgGroup>
"<#if viewMsgGroup.getCodeName()??>${viewMsgGroup.getCodeName()}<#else>${viewMsgGroup.getName()}</#if>":[
<#if viewMsgGroup.getPSAppViewMsgGroupDetails()??>
<#list viewMsgGroup.getPSAppViewMsgGroupDetails() as viewMsgGroupDetail>
<#assign viewMessage = viewMsgGroupDetail.getPSAppViewMsg() />
{"tag":"${viewMessage.getCodeName()}","position":"<#if viewMessage.getPosition() != "">${viewMessage.getPosition()}<#else>TOP</#if>","type":"<#if viewMessage.getMessageType() !="">${viewMessage.getMessageType()}<#else>INFO</#if>"}<#if viewMsgGroupDetail_has_next>,</#if>
</#list>
</#if>
]<#if viewMsgGroup_has_next>,</#if>
</#list>
</#if>
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWMSG
</#ibiztemplate>
import ViewMessageService from '../view-message-service';
/**
* ${item.getName()}视图消息服务对象基类
*
* @export
* @class ${item.getCodeName()}MessageServiceBase
*/
export default class ${srfclassname('${item.getCodeName()}')}MessageServiceBase extends ViewMessageService {
<#-- 动态模式为实体数据集合start -->
<#if item.getDynamicMode() == 1>
/**
* 支持缓存
*
* @type {boolean}
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public isEnableCache:boolean = ${item.isEnableCache()?c};
/**
* 缓存范围
*
* @type {string}
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public cacheScope:string = "${item.getCacheScope()}";
/**
* 缓存超时
*
* @type {number}
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public cacheTimeout:number = ${item.getCacheTimeout()?c};
/**
* 过期时间
*
* @type any
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public static expirationTime:any;
/**
* 获取过期时间
*
* @type any
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public getExpirationTime(){
return ${srfclassname('${item.getCodeName()}')}MessageServiceBase.expirationTime;
}
/**
* 设置过期时间
*
* @type any
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public setExpirationTime(value:any){
${srfclassname('${item.getCodeName()}')}MessageServiceBase.expirationTime = value;
}
/**
* 应用实体对象名
*
* @type {string}
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public appDataEntityName:string = "<#if item.getPSAppDataEntity()??>${item.getPSAppDataEntity().getCodeName()}</#if>";
/**
* 实体数据集合接口名
*
* @type {string}
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public appDataSetName:string = "<#if item.getPSAppDEDataSet()??>${item.getPSAppDEDataSet().getCodeName()}</#if>";
</#if>
<#-- 动态模式为实体数据集合end -->
/**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}MessageServiceBase.
*
* @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础参数
*
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public initBasicParam(){
this.id = "${item.getId()}";
this.name = "${item.getName()}";
this.codename = "<#if item.getCodeName()??>${item.getCodeName()}</#if>";
this.title = "<#if item.getTitle()??>${item.getTitle()}</#if>";
this.content = "<#if item.getMessage()??>${item.getMessage()}</#if>";
this.closeMode = ${item.getRemoveMode()?c};
this.position = "<#if item.getPosition() !="">${item.getPosition()}<#else>TOP</#if>";
this.type = "<#if item.getMessageType() !=""><#if item.getMessageType() =="WARN">warning<#else>${item.getMessageType()?lower_case}</#if><#else>info</#if>";
this.isEnableRemove = ${item.isEnableRemove()?c};
this.order = 1;
this.dynamicMode = "<#if item.getDynamicMode() == 0>STATIC<#else>DYNAMIC</#if>";
this.hasMessageTemp = <#if item.getPSSysMsgTempl()??>true<#else>false</#if>;
this.messageType = "<#if item.getPSSysMsgTempl()?? && item.getPSSysMsgTempl().getContentType()??>${item.getPSSysMsgTempl().getContentType()}<#else>TEXT</#if>";
}
/**
* 转化消息模板标题和内容
*
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public translateMessageTemp(target:any,item?:any){
if(this.hasMessageTemp && Object.is(this.messageType,"HTML")){
Object.assign(target,{title:`<#if item.getPSSysMsgTempl()?? && item.getPSSysMsgTempl().getSubject()??>${item.getPSSysMsgTempl().getSubject()}</#if>`});
Object.assign(target,{content:`<#if item.getPSSysMsgTempl()?? && item.getPSSysMsgTempl().getContent()??>${item.getPSSysMsgTempl().getContent()}</#if>`});
}
if(this.hasMessageTemp && Object.is(this.messageType,"TEXT")){
Object.assign(target,{title:"<#if item.getPSSysMsgTempl()?? && item.getPSSysMsgTempl().getSubject()??>${item.getPSSysMsgTempl().getSubject()}</#if>"});
Object.assign(target,{content:"<#if item.getPSSysMsgTempl()?? && item.getPSSysMsgTempl().getContent()??>${item.getPSSysMsgTempl().getContent()}</#if>"});
}
}
<#-- 动态模式为实体数据集合start -->
<#if item.getDynamicMode() == 1>
/**
* 获取远程数据
*
* @param {*} context
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public getItems(context: any={}, data: any={}, isloading?: boolean): Promise<any> {
let tempContext:any = context?context:{};
let tempData:any = data?data:{};
return new Promise((resolve, reject) => {
this.entityService.getService(this.appDataEntityName.toLowerCase()).then((service:any) =>{
if(service[this.appDataSetName] && service[this.appDataSetName] instanceof Function){
const promise: Promise<any> = service[this.appDataSetName](tempContext, tempData, isloading);
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
resolve(this.doItems(data));
} else {
resolve([]);
}
}).catch((response: any) => {
console.error(response);
reject(response);
});
}
})
});
}
/**
* 处理数据
*
* @public
* @param {any[]} items
* @returns {any[]}
* @memberof ${srfclassname('${item.getCodeName()}')}MessageServiceBase
*/
public doItems(items: any[]): any[] {
let _items: any[] = [];
items.forEach((item: any) => {
let itemdata:any = {
id:"${item.getId()}",
name:"${item.getName()}",
codename:"<#if item.getCodeName()??>${item.getCodeName()}</#if>",
title:<#if item.getTitlePSDEField()??>item['${item.getTitlePSDEField().getCodeName()?lower_case}']<#else>"<#if item.getTitle()??>${item.getTitle()}</#if>"</#if>,
content:<#if item.getContentPSDEField()??>item['${item.getContentPSDEField().getCodeName()?lower_case}']<#else>"<#if item.getMessage()??>${item.getMessage()}</#if>"</#if>,
closeMode:${item.getRemoveMode()?c},
position:<#if item.getMsgPosPSDEField()??>item['${item.getMsgPosPSDEField().getCodeName()?lower_case}']<#else>"<#if item.getPosition() !="">${item.getPosition()}<#else>TOP</#if>"</#if>,
type:<#if item.getMsgTypePSDEField()??>item['${item.getMsgTypePSDEField().getCodeName()?lower_case}']<#else>"<#if item.getMessageType() !=""><#if item.getMessageType() =="WARN">warning<#else>${item.getMessageType()?lower_case}</#if><#else>info</#if>"</#if>,
isEnableRemove:<#if item.getRemoveFlagPSDEField()??>item['${item.getRemoveFlagPSDEField().getCodeName()?lower_case}']<#else>${item.isEnableRemove()?c}</#if>,
order:<#if item.getOrderValuePSDEField()??>item['${item.getOrderValuePSDEField().getCodeName()?lower_case}']<#else>1</#if>,
dynamicMode:"DYNAMIC",
messageType:"<#if item.getPSSysMsgTempl()?? && item.getPSSysMsgTempl().getContentType()??>${item.getPSSysMsgTempl().getContentType()}<#else>TEXT</#if>"
};
this.translateMessageTemp(itemdata,item);
_items.push(itemdata);
});
return _items;
}
</#if>
<#-- 动态模式为实体数据集合end -->
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWMSG
</#ibiztemplate>
import ${srfclassname('${item.getCodeName()}')}MessageServiceBase from './${srffilepath2(item.getCodeName())}-message-base';
/**
* ${item.getName()}视图消息服务对象
*
* @export
* @class ${item.getCodeName()}MessageService
*/
export default class ${srfclassname('${item.getCodeName()}')}MessageService extends ${srfclassname('${item.getCodeName()}')}MessageServiceBase {
/**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}MessageService.
*
* @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}MessageService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
/**
* 视图消息服务注册中心
*
* @export
* @class MessageServiceRegister
*/
export class MessageServiceRegister {
/**
* 所有视图消息服务Map
*
* @protected
* @type {*}
* @memberof MessageServiceRegister
*/
protected allMessageService: Map<string, () => Promise<any>> = new Map();
/**
* 已加载视图消息服务Map缓存
*
* @protected
* @type {Map<string, any>}
* @memberof MessageServiceRegister
*/
protected serviceCache: Map<string, any> = new Map();
/**
* Creates an instance of MessageServiceRegister.
* @memberof MessageServiceRegister
*/
constructor() {
this.init();
}
/**
* 初始化
*
* @protected
* @memberof MessageServiceRegister
*/
protected init(): void {
<#if app.getAllPSAppViewMsgs()??>
<#list app.getAllPSAppViewMsgs() as viewMsg>
this.allMessageService.set('${viewMsg.getCodeName()}', () => import('@/message/${srffilepath2(viewMsg.getCodeName())}/${srffilepath2(viewMsg.getCodeName())}-message'));
</#list>
</#if>
}
/**
* 加载视图消息服务
*
* @protected
* @param {string} codeName
* @returns {Promise<any>}
* @memberof MessageServiceRegister
*/
protected async loadService(codeName: string): Promise<any> {
const service = this.allMessageService.get(codeName);
if (service) {
return service();
}
}
/**
* 获取视图消息服务
*
* @param {string} name
* @returns {Promise<any>}
* @memberof MessageServiceRegister
*/
public async getService(name: string): Promise<any> {
if (this.serviceCache.has(name)) {
return this.serviceCache.get(name);
}
const messageService: any = await this.loadService(name);
if (messageService && messageService.default) {
const instance: any = new messageService.default();
this.serviceCache.set(name, instance);
return instance;
}
}
}
export const messageServiceRegister: MessageServiceRegister = new MessageServiceRegister();
\ No newline at end of file
......@@ -25,3 +25,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
</#list>
}];
});
// 获取视图消息分组信息
mock.onGet('./assets/json/view-message-group.json').reply((config: any) => {
let status = MockAdapter.mockStatus(config);
return [status,{
<#if app.getAllPSAppViewMsgGroups()??>
<#list app.getAllPSAppViewMsgGroups() as viewMsgGroup>
"<#if viewMsgGroup.getCodeName()??>${viewMsgGroup.getCodeName()}<#else>${viewMsgGroup.getName()}</#if>":[
<#if viewMsgGroup.getPSAppViewMsgGroupDetails()??>
<#list viewMsgGroup.getPSAppViewMsgGroupDetails() as viewMsgGroupDetail>
<#assign viewMessage = viewMsgGroupDetail.getPSAppViewMsg() />
{"tag":"${viewMessage.getCodeName()}","position":"<#if viewMessage.getPosition() != "">${viewMessage.getPosition()}<#else>TOP</#if>","type":"<#if viewMessage.getMessageType() !="">${viewMessage.getMessageType()}<#else>INFO</#if>"}<#if viewMsgGroupDetail_has_next>,</#if>
</#list>
</#if>
]<#if viewMsgGroup_has_next>,</#if>
</#list>
</#if>
}];
});
\ No newline at end of file
......@@ -350,13 +350,13 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
}
})
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
<#noparse>let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? `${curData[this.mainStateFields[0]]}` : "":"";</#noparse>
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
<#noparse>let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;</#noparse>
<#noparse>let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? `${curData[this.mainStateFields[1]]}` : ""}`:strTag;</#noparse>
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
<#noparse>let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;</#noparse>
<#noparse>let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? `${curData[this.mainStateFields[2]]}` : ""}`:strTag2;</#noparse>
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册