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

Revert "Revert "Merge branch 'dev'""

This reverts commit 1e20fde2.
上级 f58552fc
...@@ -23,7 +23,17 @@ ...@@ -23,7 +23,17 @@
dataType: 'TEXT', dataType: 'TEXT',
}, },
<#-- 表单保留字段end --> <#-- 表单保留字段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()??> <#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem> <#list ctrl.getPSDEFormItems() as dataitem>
{ {
...@@ -40,6 +50,7 @@ ...@@ -40,6 +50,7 @@
}, },
</#list> </#list>
</#if> </#if>
<#-- 表单项end -->
<#-- 关联主实体的主键 --> <#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??> <#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() /> <#assign appDataEntity = ctrl.getPSAppDataEntity() />
......
...@@ -388,6 +388,10 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi ...@@ -388,6 +388,10 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
}else{ }else{
if(item && item.prop){ if(item && item.prop){
requestData[item.prop] = data[item.name]; 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 ...@@ -420,6 +424,42 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
return itemName.trim(); 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> <#ibizinclude>
./SERVICE_BOTTOM.ts.ftl ./SERVICE_BOTTOM.ts.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</div> </div>
</template> </template>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</template> </template>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter'; import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</template> </template>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter'; import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
......
<div></div> <#if item.render??>
\ No newline at end of file ${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 @@ ...@@ -118,6 +118,7 @@
<#assign import_block> <#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model'; import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import { Environment } from '@/environments/environment'; import { Environment } from '@/environments/environment';
import AuthService from '@/authservice/auth-service';
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
...@@ -287,6 +288,15 @@ import { Environment } from '@/environments/environment'; ...@@ -287,6 +288,15 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public counterdata: any = {}; public counterdata: any = {};
/**
* 建构权限服务对象
*
* @type {AuthService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public authService:AuthService = new AuthService({ $store: this.$store });
/** /**
* vue 生命周期 * vue 生命周期
* *
...@@ -549,7 +559,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code} ...@@ -549,7 +559,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
*/ */
public computedEffectiveMenus(inputMenus:Array<any>){ public computedEffectiveMenus(inputMenus:Array<any>){
inputMenus.forEach((_item:any) =>{ inputMenus.forEach((_item:any) =>{
if(!this.$store.getters['authresource/getAuthMenu'](_item)){ if(!this.authService.getMenusPermission(_item)){
_item.hidden = true; _item.hidden = true;
if (_item.items && _item.items.length > 0) { if (_item.items && _item.items.length > 0) {
this.computedEffectiveMenus(_item.items); this.computedEffectiveMenus(_item.items);
......
...@@ -8,7 +8,7 @@ new FormButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=ite ...@@ -8,7 +8,7 @@ new FormButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=ite
<#elseif item.getDetailType() == 'DRUIPART'> <#elseif item.getDetailType() == 'DRUIPART'>
new FormDRUIPartModel({ ${detail} }) new FormDRUIPartModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMITEM'> <#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'> <#elseif item.getDetailType() == 'FORMPAGE'>
new FormPageModel({ ${detail} }) new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'> <#elseif item.getDetailType() == 'FORMPART'>
......
...@@ -119,6 +119,21 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -119,6 +119,21 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
</#list> </#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'; ...@@ -131,28 +146,13 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
${formdetail.getName()}: [ ${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: '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' }, { 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: 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: <#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: 'blur' },
], ],
</#if> </#if>
</#list> </#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> <#list ctrl.getPSDEFormItems() as item>
/** /**
* 监控表单属性 ${item.getName()} 值 * 监控表单属性 ${item.getName()} 值
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<#assign import_block> <#assign import_block>
import echarts from 'echarts'; import echarts from 'echarts';
import moment from "moment"; 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'; import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,ChartBarSeries,ChartRadarSeries} from '@/model/chart-detail';
</#assign> </#assign>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<#assign import_block> <#assign import_block>
import echarts from 'echarts'; import echarts from 'echarts';
import moment from "moment"; 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'; import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,ChartBarSeries,ChartRadarSeries} from '@/model/chart-detail';
</#assign> </#assign>
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
flex-grow: 1; flex-grow: 1;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
.portlet-without-title{
width: 100%;
}
.ivu-row{ .ivu-row{
.ivu-card{ .ivu-card{
.ivu-card-head{ .ivu-card-head{
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</#if> </#if>
</template> </template>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......
...@@ -66,11 +66,11 @@ ${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code} ...@@ -66,11 +66,11 @@ ${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
dataItems = [...dataItems, dataItems = [...dataItems,
{ {
name: '${appDataEntity.getCodeName()?lower_case}', 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', 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', name:'start',
......
<#assign import_block> <#assign import_block>
import CodeListService from '@service/app/codelist-service'; import CodeListService from "@/codelist/codelist-service";
import i18n from '@/locale'; import i18n from '@/locale';
<#if ctrl.getPSDETreeNodes()??> <#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node> <#list ctrl.getPSDETreeNodes() as node>
......
<#assign import_block> <#assign import_block>
import CodeListService from '@service/app/codelist-service'; import CodeListService from "@/codelist/codelist-service";
import i18n from '@/locale'; import i18n from '@/locale';
<#if ctrl.getPSDETreeNodes()??> <#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node> <#list ctrl.getPSDETreeNodes() as node>
......
<#assign import_block> <#assign import_block>
import CodeListService from '@service/app/codelist-service'; import CodeListService from "@/codelist/codelist-service";
import i18n from '@/locale'; import i18n from '@/locale';
<#if ctrl.getPSDETreeNodes()??> <#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node> <#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 ...@@ -8,7 +8,7 @@ new FormButtonModel({ ${detail},disabled: false<#if item.getPSUIAction()??><#ass
<#elseif item.getDetailType() == 'DRUIPART'> <#elseif item.getDetailType() == 'DRUIPART'>
new FormDRUIPartModel({ ${detail} }) new FormDRUIPartModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMITEM'> <#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'> <#elseif item.getDetailType() == 'FORMPAGE'>
new FormPageModel({ ${detail} }) new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'> <#elseif item.getDetailType() == 'FORMPART'>
......
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#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>"> <app-rawitem
${item.getRawContent()} contentStyle="<#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>"
</div> 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> </#if>
\ No newline at end of file
...@@ -11,12 +11,13 @@ ...@@ -11,12 +11,13 @@
if (${P.getPartCode(ITEMBLANK, 'DETAIL_LOGIC').code}) { if (${P.getPartCode(ITEMBLANK, 'DETAIL_LOGIC').code}) {
ret = false; ret = false;
} }
this.rules().${formdetail.name}.some((rule: any) => { <#-- this.rules().${formdetail.name}.some((rule: any) => {
if (rule.hasOwnProperty('required')) { if (rule.hasOwnProperty('required')) {
rule.required = ret; rule.required = ret;
} }
return false; return false;
}); }); -->
this.detailsModel.${formdetail.name}.required = ret;
} }
</#if> </#if>
<#if formdetail.getPSDEFDGroupLogic('ITEMENABLE')??> <#if formdetail.getPSDEFDGroupLogic('ITEMENABLE')??>
......
...@@ -197,6 +197,14 @@ import { Environment } from '@/environments/environment'; ...@@ -197,6 +197,14 @@ import { Environment } from '@/environments/environment';
*/ */
public oldData: any = {}; public oldData: any = {};
/**
* 混入表单数据对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mixinData:any = {};
/** /**
* 表单数据对象 * 表单数据对象
* *
...@@ -204,8 +212,10 @@ import { Environment } from '@/environments/environment'; ...@@ -204,8 +212,10 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public data: any = { 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, ${item.getName()}: null,
</#if>
</#list> </#list>
${ctrl.getPSAppDataEntity().getCodeName()?lower_case}:null, ${ctrl.getPSAppDataEntity().getCodeName()?lower_case}:null,
}; };
...@@ -255,8 +265,8 @@ import { Environment } from '@/environments/environment'; ...@@ -255,8 +265,8 @@ import { Environment } from '@/environments/environment';
${formdetail.getName()}: [ ${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: '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' }, { 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: 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: <#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: 'blur' },
<#if formdetail.getEditorType?? && formdetail.getEditorType()?? && formdetail.isAllowEmpty?? && formdetail.isAllowEmpty()??> <#if formdetail.getEditorType?? && formdetail.getEditorType()?? && formdetail.isAllowEmpty?? && formdetail.isAllowEmpty()??>
<#if formdetail.getEditorType() == 'CHECKBOX' && !formdetail.isAllowEmpty()> <#if formdetail.getEditorType() == 'CHECKBOX' && !formdetail.isAllowEmpty()>
{ validator: (rule:any, value:any, callback:any) => { { validator: (rule:any, value:any, callback:any) => {
...@@ -581,6 +591,7 @@ import { Environment } from '@/environments/environment'; ...@@ -581,6 +591,7 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public fillForm(_datas: any = {},action:string): void { public fillForm(_datas: any = {},action:string): void {
this.mixinData = _datas;
this.ignorefieldvaluechange = true; this.ignorefieldvaluechange = true;
Object.keys(_datas).forEach((name: string) => { Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) { if (this.data.hasOwnProperty(name)) {
......
...@@ -119,7 +119,7 @@ ${ctrl.render.code} ...@@ -119,7 +119,7 @@ ${ctrl.render.code}
</#if> </#if>
</template> </template>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
import { FormItemModel } from '@/model/form-detail'; import { FormItemModel } from '@/model/form-detail';
import { Environment } from '@/environments/environment'; import { Environment } from '@/environments/environment';
</#assign> </#assign>
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</template> </template>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter'; import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
......
...@@ -13,6 +13,13 @@ ${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code} ...@@ -13,6 +13,13 @@ ${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code}
</@ibizindent> </@ibizindent>
</#if> </#if>
<div class="content-container"> <div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
./View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.getPSControls()??> <#if view.getPSControls()??>
<#list view.getPSControls() as ctrl> <#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR"> <#if ctrl.getControlType() != "TOOLBAR">
...@@ -24,6 +31,13 @@ ${P.getCtrlCode(ctrl, 'CONTROL.html').code} ...@@ -24,6 +31,13 @@ ${P.getCtrlCode(ctrl, 'CONTROL.html').code}
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
./View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -15,11 +15,25 @@ ...@@ -15,11 +15,25 @@
</#ibizinclude> </#ibizinclude>
<div class="content-container"> <div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
./View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('drtab')> <#if view.hasPSControl('drtab')>
<@ibizindent blank=8> <@ibizindent blank=8>
${P.getCtrlCode('drtab', 'CONTROL.html').code} ${P.getCtrlCode('drtab', 'CONTROL.html').code}
</@ibizindent> </@ibizindent>
</#if> </#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
./View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
<div class='view-bottom-messages'> <div class='view-bottom-messages'>
<#if view.getPSViewMsgGroup()??> <#if view.getPSViewMsgGroup()??>
<#assign viewMsgGroup = view.getPSViewMsgGroup()/> <#assign viewMsgGroup = view.getPSViewMsgGroup()/>
<#list viewMsgGroup.getPSViewMsgGroupDetails() as detail> <#compress>
<#assign msg = detail.getPSViewMsg()> <#if viewMsgGroup.getCodeName()??>
<#-- BEGIN:暂时支持静态 --> <app-alert-group position='BOTTOM' infoGroup='${viewMsgGroup.getCodeName()}'></app-alert-group>
<#if msg.getCodeName() != '' && msg.getPosition() == 'BOTTOM' && msg.getDynamicMode() == 0> <#else>
<#assign type = msg.getMessageType() /> <app-alert-group position='BOTTOM' infoGroup='${viewMsgGroup.getName()}'></app-alert-group>
<alert type='<#if type == 'INFO'>info<#elseif type == 'WARN'>warning<#elseif type == 'ERROR'>error<#else>info</#if>' closable={${msg.isEnableRemove()?c}}> </#if>
${msg.getTitle()} </#compress>
<span slot='desc'>${msg.getMessage()}</span>
</alert>
</#if>
<#-- END:暂时支持静态 -->
</#list>
</#if> </#if>
</div> </div>
\ No newline at end of file
<div class='view-top-messages'> <div class='view-top-messages'>
<#if view.getPSViewMsgGroup()??> <#if view.getPSViewMsgGroup()??>
<#assign viewMsgGroup = view.getPSViewMsgGroup()/> <#assign viewMsgGroup = view.getPSViewMsgGroup()/>
<#list viewMsgGroup.getPSViewMsgGroupDetails() as detail> <#compress>
<#assign msg = detail.getPSViewMsg()> <#if viewMsgGroup.getCodeName()??>
<#-- BEGIN:暂时支持静态 --> <app-alert-group position='TOP' infoGroup='${viewMsgGroup.getCodeName()}'></app-alert-group>
<#if msg.getCodeName() != '' && msg.getPosition() == 'TOP' && msg.getDynamicMode() == 0> <#else>
<#assign type = msg.getMessageType() /> <app-alert-group position='TOP' infoGroup='${viewMsgGroup.getName()}'></app-alert-group>
<alert type='<#if type == 'INFO'>info<#elseif type == 'WARN'>warning<#elseif type == 'ERROR'>error<#else>info</#if>' closable={${msg.isEnableRemove()?c}}> </#if>
${msg.getTitle()} </#compress>
<span slot='desc'>${msg.getMessage()}</span>
</alert>
</#if>
<#-- END:暂时支持静态 -->
</#list>
</#if> </#if>
</div> </div>
\ No newline at end of file
...@@ -7,9 +7,23 @@ ...@@ -7,9 +7,23 @@
</#ibizinclude> </#ibizinclude>
<div class="content-container"> <div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('listexpbar')> <#if view.hasPSControl('listexpbar')>
${P.getCtrlCode('listexpbar', 'CONTROL.html').code} ${P.getCtrlCode('listexpbar', 'CONTROL.html').code}
</#if> </#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -8,6 +8,13 @@ ...@@ -8,6 +8,13 @@
</#ibizinclude> </#ibizinclude>
<div class='content-container'> <div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent> <#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
...@@ -50,6 +57,13 @@ ${P.getCtrlCode('list', 'CONTROL.html').code} ...@@ -50,6 +57,13 @@ ${P.getCtrlCode('list', 'CONTROL.html').code}
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl ../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -4,6 +4,13 @@ ...@@ -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" > <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'> <div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent> <#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
...@@ -46,6 +53,13 @@ ${P.getCtrlCode('list', 'CONTROL.html').code} ...@@ -46,6 +53,13 @@ ${P.getCtrlCode('list', 'CONTROL.html').code}
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl ../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -7,9 +7,23 @@ ...@@ -7,9 +7,23 @@
</#ibizinclude> </#ibizinclude>
<div class="content-container"> <div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('dataviewexpbar')> <#if view.hasPSControl('dataviewexpbar')>
${P.getCtrlCode('dataviewexpbar', 'CONTROL.html').code} ${P.getCtrlCode('dataviewexpbar', 'CONTROL.html').code}
</#if> </#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -13,6 +13,13 @@ ${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code} ...@@ -13,6 +13,13 @@ ${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code}
</@ibizindent> </@ibizindent>
</#if> </#if>
<div class="content-container"> <div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.getPSControls()??> <#if view.getPSControls()??>
<#list view.getPSControls() as ctrl> <#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR"> <#if ctrl.getControlType() != "TOOLBAR">
...@@ -24,6 +31,13 @@ ${P.getCtrlCode(ctrl, 'CONTROL.html').code} ...@@ -24,6 +31,13 @@ ${P.getCtrlCode(ctrl, 'CONTROL.html').code}
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
...@@ -13,6 +13,13 @@ ${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code} ...@@ -13,6 +13,13 @@ ${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code}
</@ibizindent> </@ibizindent>
</#if> </#if>
<div class="content-container"> <div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.getPSControls()??> <#if view.getPSControls()??>
<#list view.getPSControls() as ctrl> <#list view.getPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR"> <#if ctrl.getControlType() != "TOOLBAR">
...@@ -24,6 +31,13 @@ ${P.getCtrlCode(ctrl, 'CONTROL.html').code} ...@@ -24,6 +31,13 @@ ${P.getCtrlCode(ctrl, 'CONTROL.html').code}
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
...@@ -8,6 +8,13 @@ ...@@ -8,6 +8,13 @@
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<div class='content-container'> <div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent> <#assign MDContent>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 --> <#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)> <#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
...@@ -50,6 +57,13 @@ ...@@ -50,6 +57,13 @@
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl ../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <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"> <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'> <div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent> <#assign MDContent>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 --> <#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)> <#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
...@@ -46,6 +53,13 @@ ...@@ -46,6 +53,13 @@
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl ../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -7,9 +7,23 @@ ...@@ -7,9 +7,23 @@
</#ibizinclude> </#ibizinclude>
<div class="content-container"> <div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('calendarexpbar')> <#if view.hasPSControl('calendarexpbar')>
${P.getCtrlCode('calendarexpbar', 'CONTROL.html').code} ${P.getCtrlCode('calendarexpbar', 'CONTROL.html').code}
</#if> </#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -8,6 +8,13 @@ ...@@ -8,6 +8,13 @@
</#ibizinclude> </#ibizinclude>
<div class='content-container'> <div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent> <#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
...@@ -50,6 +57,13 @@ ${P.getCtrlCode('calendar', 'CONTROL.html').code} ...@@ -50,6 +57,13 @@ ${P.getCtrlCode('calendar', 'CONTROL.html').code}
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl ../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -4,6 +4,13 @@ ...@@ -4,6 +4,13 @@
<card class='view-card view-no-caption <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :bordered="false" :dis-hover="true" > <card class='view-card view-no-caption <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :bordered="false" :dis-hover="true" >
<div class='content-container'> <div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#assign MDContent> <#assign MDContent>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
...@@ -46,6 +53,13 @@ ${P.getCtrlCode('calendar', 'CONTROL.html').code} ...@@ -46,6 +53,13 @@ ${P.getCtrlCode('calendar', 'CONTROL.html').code}
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl ../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -15,11 +15,25 @@ ...@@ -15,11 +15,25 @@
</#ibizinclude> </#ibizinclude>
<div class="content-container edit-view2"> <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')> <#if view.hasPSControl('drbar')>
<@ibizindent blank=8> <@ibizindent blank=8>
${P.getCtrlCode('drbar', 'CONTROL.html').code} ${P.getCtrlCode('drbar', 'CONTROL.html').code}
</@ibizindent> </@ibizindent>
</#if> </#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -7,9 +7,23 @@ ...@@ -7,9 +7,23 @@
</#ibizinclude> </#ibizinclude>
<div class="content-container"> <div class="content-container">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#if view.hasPSControl('gridexpbar')> <#if view.hasPSControl('gridexpbar')>
${P.getCtrlCode('gridexpbar', 'CONTROL.html').code} ${P.getCtrlCode('gridexpbar', 'CONTROL.html').code}
</#if> </#if>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -129,7 +129,37 @@ ...@@ -129,7 +129,37 @@
</#if> </#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>"> <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> <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> </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> <#elseif ctrl.getContentPSControl()??><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
......
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<app-panel-item <app-panel-button
caption="<#if item.getCaption?? && item.getCaption()??>${item.getCaption()}</#if>" caption="<#if item.getCaption?? && item.getCaption()??>${item.getCaption()}</#if>"
icon="<#if item.getPSSysImage?? && item.getPSSysImage()??>${item.getPSSysImage().getCssClass()}</#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>" :showCaption="<#if item.isShowCaption?? && item.isShowCaption()??>${item.isShowCaption()?c}<#else>true</#if>"
<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>lableStyle='${item.getLabelPSSysCss().getCssName()}'</#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>> <#if item.getPSUIAction?? && item.getPSUIAction()??>@onClick="($event)=>{uiAction(null, '${item.getPSUIAction().getUIActionTag()}', $event)}"</#if>>
</app-panel-item> </app-panel-button>
</#if> </#if>
</#assign> </#assign>
......
...@@ -2,14 +2,22 @@ ...@@ -2,14 +2,22 @@
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<app-panel-item <app-rawitem
caption="<#if item.getCaption?? && item.getCaption()??>${item.getCaption()}</#if>" contentStyle="<#if item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>"
icon="<#if item.getPSSysImage?? && item.getPSSysImage()??>${item.getPSSysImage().getCssClass()}</#if>" sizeStyle="<#if item.getRawItemHeight() gt 0>height: ${item.getRawItemHeight()?c}px;</#if><#if item.getRawItemWidth() gt 0>width: ${item.getRawItemWidth()?c}px;</#if>"
itemType="RAWITEM" contentType="<#if item.getContentType?? && item.getContentType()??>${item.getContentType()}</#if>"
<#if item.getPSSysCss?? && item.getPSSysCss()??>contentStyle='${item.getPSSysCss().getCssName()}'</#if>> caption="<#if item.getCaption?? && item.getCaption()??>${item.getCaption()}</#if>"
${item.getHtmlContent()} <#if item.getRawContent?? && item.getRawContent()??>
</app-panel-item> 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> </#if>
</#assign> </#assign>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<#assign import_block> <#assign import_block>
import { PanelDetailModel,PanelRawitemModel,PanelTabPanelModel,PanelTabPageModel,PanelFieldModel,PanelContainerModel,PanelControlModel,PanelUserControlModel,PanelButtonModel } from '@/model/panel-detail'; 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 ${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> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
:formState="formState"
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</#ibizinclude> </#ibizinclude>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter'; import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</#ibizinclude> </#ibizinclude>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter'; import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</#ibizinclude> </#ibizinclude>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter'; import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
......
...@@ -134,7 +134,9 @@ ...@@ -134,7 +134,9 @@
Object.assign(this.context,this.$store.getters.getAppData().context); Object.assign(this.context,this.$store.getters.getAppData().context);
} }
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) { if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
Object.assign(this.context, JSON.parse(this.viewdata)); if(typeof this.viewdata == 'string') {
Object.assign(this.context, JSON.parse(this.viewdata));
}
if(this.context && this.context.srfparentdename){ if(this.context && this.context.srfparentdename){
Object.assign(this.viewparams,{srfparentdename:this.context.srfparentdename}); Object.assign(this.viewparams,{srfparentdename:this.context.srfparentdename});
} }
......
...@@ -178,7 +178,9 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -178,7 +178,9 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
for(let key in this.viewparams){ for(let key in this.viewparams){
delete this.viewparams[key]; delete this.viewparams[key];
} }
Object.assign(this.viewparams, JSON.parse(this.viewparam)); if(typeof this.viewparams == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}
<#if watch_viewparam_block??>${watch_viewparam_block}</#if> <#if watch_viewparam_block??>${watch_viewparam_block}</#if>
} }
} }
...@@ -199,7 +201,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -199,7 +201,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
_this.engine.load(); _this.engine.load();
<#if viewdata_block??>${viewdata_block}</#if> <#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(); _this.refresh();
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</#ibizinclude> </#ibizinclude>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter'; import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</#ibizinclude> </#ibizinclude>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@/codelist/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter'; import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
......
...@@ -5,6 +5,7 @@ import App from '@/App.vue'; ...@@ -5,6 +5,7 @@ import App from '@/App.vue';
import ElementUi from 'element-ui'; import ElementUi from 'element-ui';
import ViewUI from 'view-design'; import ViewUI from 'view-design';
import ibizLab from 'ibiz-vue-lib'; import ibizLab from 'ibiz-vue-lib';
import axios from "axios";
import { Interceptors } from '@/utils'; import { Interceptors } from '@/utils';
import {Print} from '@/utils/print'; import {Print} from '@/utils/print';
import i18n from '@/locale' import i18n from '@/locale'
...@@ -27,13 +28,18 @@ import { PortletComponent } from '@/portlet-register'; ...@@ -27,13 +28,18 @@ import { PortletComponent } from '@/portlet-register';
import store from '@/store'; import store from '@/store';
import router from './router'; import router from './router';
const win: any = window;
win.axios = axios;
Vue.config.errorHandler = function (err: any, vm: any, info: any) { Vue.config.errorHandler = function (err: any, vm: any, info: any) {
console.log(err); console.log(err);
} }
Vue.config.productionTip = false; Vue.config.productionTip = false;
Vue.use(Print); Vue.use(Print);
Vue.use(ibizLab); Vue.use(ibizLab);
Vue.use(Vuex); Vue.use(Vuex);
Vue.use(win.AVUE);
Vue.use(VueRouter);; Vue.use(VueRouter);;
Vue.use(ElementUi, { Vue.use(ElementUi, {
i18n: (key: any, value: any) => i18n.t(key, value) 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
...@@ -24,4 +24,23 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -24,4 +24,23 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
}<#if view_index != num>,</#if> }<#if view_index != num>,</#if>
</#list> </#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} ...@@ -350,13 +350,13 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
} }
}) })
for (let i = 0; i <= 1; i++) { 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) { if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) { 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) { if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) { 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); return this.allDeMainStateMap.get(strTag3);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册