提交 6e40f7c5 编写于 作者: ibizdev's avatar ibizdev

初始化项目

上级
# General
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
vue
\ No newline at end of file
<#ibizinclude>
./MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getDataItems(): any[] {
return [
<#-- 主实体所有属性 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.getAllPSAppDEFields?? && appDataEntity.getAllPSAppDEFields()??>
<#list appDataEntity.getAllPSAppDEFields() as defield>
{
<#if defield.isKeyField()>
name: '${appDataEntity.getCodeName()?lower_case}',
prop: '${defield.getCodeName()?lower_case}',
<#else>
name: '${defield.getCodeName()?lower_case}',
</#if>
},
</#list>
</#if>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
]
}
<#ibizinclude>
./MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
./MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getDataItems(): any[] {
return [
<#-- 表单项 -->
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
<#-- 界面主键标识 -->
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem>
<#if dataitem.getPSAppDEField()?? && dataitem.getPSAppDEField().isKeyField() == true>
<#if !P.exists("importService1", dataitem.getPSAppDEField().getId(), "")>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#list>
</#if>
]
}
<#ibizinclude>
./MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
}
// 默认导出
export default ${srfclassname('${ctrl.codeName}')}Model;
\ No newline at end of file
/**
* ${srfclassname('${ctrl.codeName}')} 部件模型
*
* @export
* @class ${srfclassname('${ctrl.codeName}')}Model
*/
export class ${srfclassname('${ctrl.codeName}')}Model {
\ No newline at end of file
<#ibizinclude>
./SERVICE_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} [context]
* @param {*} [data]
* @param {boolean} [isLoading]
* @returns {Promise<any[]>}
* @memberof ${srfclassname(ctrl.codeName)}Service
*/
public async getItems(serviceName: string, interfaceName: string, context?: any, data?: any, isLoading?: boolean): Promise<any[]> {
<#list ctrl.getPSDEFormItems() as deItem>
<#if deItem.getPSEditor()?? && deItem.getPSEditor().getPSAppDataEntity?? && deItem.getPSEditor().getPSAppDataEntity()?? && deItem.getPSEditor().getPSAppDEDataSet?? && deItem.getPSEditor().getPSAppDEDataSet()??>
<#assign _appde = deItem.getPSEditor().getPSAppDataEntity()/>
<#assign deDataSet = deItem.getPSEditor().getPSAppDEDataSet()/>
<#if !P.exists("importService4", _appde.getId() + deDataSet.getCodeName(), "")>
<#if _appde.getId() == appde.getId()>
if (Object.is(serviceName, '${srfclassname(_appde.getCodeName())}Service') && Object.is(interfaceName, '${deDataSet.getCodeName()}')) {
await this.onBeforeAction(interfaceName, context, data, isLoading);
const response: any = await this.service.${deDataSet.getCodeName()}(data);
await this.onAfterAction(interfaceName, context, response);
return this.doItems(response);
}
<#else>
if (Object.is(serviceName, '${srfclassname(_appde.getCodeName())}Service') && Object.is(interfaceName, '${deDataSet.getCodeName()}')) {
const service: any = await this.getService('${_appde.getCodeName()?lower_case}');
await this.onBeforeAction(interfaceName, context, data, isLoading);
const response: any = await service.${deDataSet.getCodeName()}(data);
await this.onAfterAction(interfaceName, context, response);
return this.doItems(response);
}
</#if>
</#if>
</#if>
</#list>
return [];
}
/**
* 合并配置的默认值
*
* @protected
* @param {*} [response={}]
* @memberof ${srfclassname(ctrl.codeName)}Service
*/
public mergeDefaults(response:any = {}): void {
if (response.data) {
<#list ctrl.getAllPSDEFormDetails() as formdetail><#t>
<#if formdetail.getCreateDV?? && formdetail.getCreateDV()??><#t>
<#if !(formdetail.getCreateDV() == '')><#t>
Object.assign(response.data, { '${formdetail.getCodeName()?lower_case}': '${formdetail.getCreateDV()}' });
</#if>
</#if>
</#list>
}
}
<#ibizinclude>
./SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
}
// 默认导出
export default ${srfclassname('${ctrl.codeName}')}Service;
\ No newline at end of file
import { <#if extendsClass??>${extendsClass}</#if> } from '@/ibiz-core';
import { Util, HttpResponse } from '@/ibiz-core/utils';
import { ${srfclassname(ctrl.codeName)}Model } from '@/app-core/ctrl-model/<#if ctrl.getPSAppDataEntity?? && ctrl.getPSAppDataEntity()??>${srffilepath2(ctrl.getPSAppDataEntity().getCodeName())}<#else>app</#if>/${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}-model';
<#if import_block??>${import_block}</#if>
/**
* ${srfclassname(ctrl.codeName)} 部件服务对象
*
* @export
* @class ${srfclassname(ctrl.codeName)}Service
* @extends {<#if extendsClass??>${extendsClass}</#if>}
*/
export class ${srfclassname(ctrl.codeName)}Service extends <#if extendsClass??>${extendsClass}</#if> {
/**
* 部件模型
*
* @protected
* @type {${srfclassname(ctrl.codeName)}Model}
* @memberof ControlServiceBase
*/
protected model: ${srfclassname(ctrl.codeName)}Model = new ${srfclassname(ctrl.codeName)}Model();
<#if view.isPSDEView()?? && view.getTempMode?? && view.getTempMode()?? && view.getTempMode() == 2>
/**
* 是否为从数据临时模式
*
* @protected
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}Service
*/
protected isTempMode: boolean = true;
</#if>
<#if appde??>
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}Service
*/
protected appDEName: string = '${appde.getCodeName()?lower_case}';
/**
* 当前应用实体主键标识
*
* @protected
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}Service
*/
protected appDeKey: string = '${appde.getKeyPSAppDEField().getCodeName()?lower_case}';
</#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>TabExpServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=TABEXPPANEL
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>TabViewPanelServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=TABVIEWPANEL
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
return [
<#-- 列表数据项 -->
<#if ctrl.getPSListDataItems()??>
<#list ctrl.getPSListDataItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}'
},
</#if>
</#list>
</#if>
<#if ctrl.getPSListDataItems()??>
<#list ctrl.getPSListDataItems() as dataitem>
<#-- 界面主键标识 -->
<#if dataitem.getPSDEField?? && dataitem.getPSDEField()??>
<#if !P.exists("importService", dataitem.getPSDEField().getId(), "")>
<#if dataitem.getPSDEField().isKeyDEField() == true>
{
name: '${appDataEntity.getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#if>
</#list>
</#if>
</#if>
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'page',
prop:'page'
}
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>ListServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=LIST
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>WizardPanelServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=WIZARDPANEL
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>MultiEditViewPanelServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=MULTIEDITVIEWPANEL
\ No newline at end of file
{
id: '${item.getId()?j_string}',
name: '${item.getName()?j_string}',
text: '${item.getText()?j_string}',
type: '<#if item.getItemType()??>${item.getItemType()?j_string}<#else></#if>',
counterid: '<#if item.getCounterId()??>${item.getCounterId()?j_string}<#else></#if>',
tooltip: '<#if item.getTooltip()??>${item.getTooltip()?j_string}</#if>',
expanded: <#if item.isExpanded()>true<#else>false</#if>,
separator: <#if item.isSeperator()>true<#else>false</#if>,
hidden: <#if item.isHidden()>true<#else>false</#if>,
hidesidebar: <#if item.isHideSideBar()>true<#else>false</#if>,
opendefault: <#if item.isOpenDefault()>true<#else>false</#if>,
<#if item.getPSSysImage()??>
iconcls: '${item.getPSSysImage().getCssClass()}',
icon: '${item.getPSSysImage().getImagePath()}',
<#else>
iconcls: '',
icon: '',
</#if>
<#if item.getPSSysCss()??>
textcls: '${item.getPSSysCss().getCssName()}',
<#else>
textcls: '',
</#if>
<#if item.getPSAppFunc()??>
appfunctag: '${item.getPSAppFunc().codeName}',
<#else>
appfunctag: '',
</#if>
resourcetag: '<#if item.getAccessKey()??>${item.getAccessKey()}</#if>',
<#if item.getPSAppMenuItems()??>
items: [
<#list item.getPSAppMenuItems() as child>
${P.getPartCode(child,"ITEM").code},
</#list>
],
</#if>
}
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 菜单项集合
*
* @private
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
private items: any[] = [
<#list ctrl.getPSAppMenuItems() as child>
${P.getPartCode(child,"ITEM").code},
</#list>
];
/**
* 应用功能集合
*
* @private
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
private funcs: any[] = [
<#if view.isDefaultPage?? && view.isDefaultPage()>
<#list ctrl.getPSAppFuncs() as appFuncs>
{
appfunctag: '${appFuncs.getCodeName()}',
appfuncyype: '${appFuncs.getAppFuncType()}',
<#if appFuncs.getAppFuncType() == 'APPVIEW'>
<#assign dataview = appFuncs.getPSAppView()/>
openmode: '${dataview.getOpenMode()}',
componentname: '${srffilepath2(dataview.getCodeName())}',
codename: '${dataview.getCodeName()?lower_case}',
deResParameters: [],
<#-- BEGIN:是否应用实体视图 -->
<#if dataview.isPSDEView()>
<#assign appDataEntity = dataview.getPSAppDataEntity()/>
routepath: '/${view.getCodeName()?lower_case}/:${view.getCodeName()?lower_case}?/${srfpluralize(appDataEntity.codeName)?lower_case}/:${appDataEntity.getCodeName()?lower_case}?/${dataview.getPSDEViewCodeName()?lower_case}/:${dataview.getPSDEViewCodeName()?lower_case}?',
parameters: [
{ pathName: '${srfpluralize(appDataEntity.codeName)?lower_case}', parameterName: '${appDataEntity.getCodeName()?lower_case}' },
{ pathName: '${dataview.getPSDEViewCodeName()?lower_case}', parameterName: '${dataview.getPSDEViewCodeName()?lower_case}' },
],
<#else>
routepath: '/${view.getCodeName()?lower_case}/:${view.getCodeName()?lower_case}?/${dataview.getCodeName()?lower_case}/:${dataview.getCodeName()?lower_case}?',
parameters: [
{ pathName: '${dataview.getCodeName()?lower_case}', parameterName: '${dataview.getCodeName()?lower_case}' },
],
</#if>
<#-- END:是否应用实体视图 -->
</#if>
},
</#list>
</#if>
];
/**
* 获取所有菜单项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getAppMenuItems(): any[] {
return this.items;
}
/**
* 获取所有应用功能集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getAppFuncs(): any[] {
return this.funcs;
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>AppMenuServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据
*
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public get(params: any = {}): Promise<any> {
return this.http.get('v7/${srffilepath2(ctrl.codeName)}${ctrl.getControlType()?lower_case}', params);
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=APPMENU
\ No newline at end of file
<#assign extendsClass>SearchFormServiceBase</#assign>
<#ibizinclude>
../@MACRO/MODEL/FORM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#-- 表单项 -->
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
<#-- 界面主键标识 -->
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem>
<#if dataitem.getPSAppDEField()?? && dataitem.getPSAppDEField().isKeyField() == true>
<#if !P.exists("importService1", dataitem.getPSAppDEField().getId(), "")>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#list>
</#if>
\ No newline at end of file
<#assign extendsClass>SearchFormServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/FORM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=SEARCHFORM
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>DrTabServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=DRTAB
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>DrBarServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=DRBAR
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
return [
{
name:'query',
prop:'query'
},
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>ChartServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#-- 暂只支持第一个序列 -->
<#list ctrl.getPSDEChartSerieses() as series>
<#if series_index == 0>
<#assign chartSeries = series/>
</#if>
</#list>
/**
* 生成图表数据
*
* @param {string} action
* @param {*} response
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleResponse(action: string, response: any): any {
const chartOption: any = {};
<#-- 获取x轴的分类属性字段 -->
const catalogFields: any = [<#rt>
<#if chartSeries.getCatalogField?? && chartSeries.getCatalogField()??>
<#assign catalogField = chartSeries.getCatalogField()>
<#list catalogField?split(";") as field>
"${field?lower_case}",<#t>
</#list>
</#if>
];<#lt>
<#-- 获取y轴值属性字段和中文名称 -->
const valueFields: any = [<#rt>
<#if chartSeries.getValueField?? && chartSeries.getValueField()??>
<#assign valueField = chartSeries.getValueField()>
<#list valueField?split(";") as field>
[ "${field?lower_case}", "${de.getPSDEField(field).getLogicName()}" ],<#t>
</#list>
</#if>
];<#lt>
// 数据按分类属性分组处理
const xFields:any = [];
const yFields:any = [];
valueFields.forEach((field: any, index: number) => {
yFields[index] = [];
});
response.data.forEach((item:any) => {
if(xFields.indexOf(item[catalogFields[0]]) > -1){
const num = xFields.indexOf(item[catalogFields[0]]);
valueFields.forEach((field: any,index: number) => {
yFields[index][num] += item[field[0]];
});
}else{
xFields.push(item[catalogFields[0]]);
valueFields.forEach((field: any,index: number) => {
yFields[index].push(item[field[0]]);
});
}
});
<#-- 折线图和柱状图需要配置xAxis,饼图不需要 -->
<#if chartSeries.getSeriesType() == 'line' || chartSeries.getSeriesType() == 'bar'>
chartOption.xAxis = { data: xFields };
</#if>
<#-- 配置series -->
const series: any = [];
valueFields.forEach((field: any,index: number) => {
const yData: any = [];
xFields.forEach((item:any, num: number) => {
<#if chartSeries.getSeriesType() == 'line' || chartSeries.getSeriesType() == 'bar'>
yData.push(yFields[index][num]);
<#elseif chartSeries.getSeriesType() == 'pie'>
yData.push({value: yFields[index][num], name: item});
</#if>
});
yData.sort(function (a:any, b:any) { return a.value - b.value; });
series.push({
name: field[1],
type: "${chartSeries.getSeriesType()}",
data: yData,
<#-- 饼图额外配置 -->
<#if chartSeries.getSeriesType() == 'pie'>
top:"40px",
left: (100 / valueFields.length) * index + "%",
right: (100 / valueFields.length) * (valueFields.length - index - 1) + "%",
animationType: 'scale',
animationEasing: 'elasticOut',
animationDelay: function (idx: any) {
return Math.random() * 200;
}
</#if>
});
});
chartOption.series = series;
return new HttpResponse(response.status, chartOption);
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=CHART
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>DashboardServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=DASHBOARD
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
return [
<#-- 数据视图数据项 -->
<#if ctrl.getPSDEDataViewDataItems()??>
<#list ctrl.getPSDEDataViewDataItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}'
},
</#if>
</#list>
</#if>
</#if>
<#if ctrl.getPSDEDataViewDataItems()??>
<#list ctrl.getPSDEDataViewDataItems() as dataitem>
<#-- 界面主键标识 -->
<#if dataitem.getPSDEField?? && dataitem.getPSDEField()?? && dataitem.getPSDEField().isKeyDEField() == true>
<#if !P.exists("importService", dataitem.getPSDEField().getId(), "")>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#list>
</#if>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
</#if>
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'sort',
prop:'sort'
},
{
name:'page',
prop:'page'
},
{
name:'srfparentdata',
prop:'srfparentdata'
}
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>DataViewServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=DATAVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 日历项类型
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public itemType: string = "";
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
let dataItems: any = [
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}'
},
</#if>
</#list>
</#if>
</#if>
{
name: 'queryStart',
prop: 'start'
},
{
name: 'queryEnd',
prop: 'end'
},
{
name: 'color',
},
{
name: 'textColor',
},
{
name: 'itemType',
},
];
switch (this.itemType) {
<#-- 日历项实体映射 -->
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<#if calendarItem.getPSAppDataEntity()??>
<#assign appDataEntity = calendarItem.getPSAppDataEntity() />
case "${calendarItem.getItemType()?lower_case}":
dataItems = [...dataItems,
{
name: '${appDataEntity.getCodeName()?lower_case}',
prop: '${appDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}'
},
{
name: 'title',
prop: '${appDataEntity.getMajorPSAppDEField().getCodeName()?lower_case}'
},
{
name:'start',
prop:'${calendarItem.getBeginTimePSDEField().getCodeName()?lower_case}'
},
{
name:'end',
prop:'${calendarItem.getEndTimePSDEField().getCodeName()?lower_case}'
},
];
break;
</#if>
</#list>
</#if>
}
return dataItems;
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>CalendarServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
/**
* 事件配置集合
*
* @protected
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected eventsConfig: any = {
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<#if calendarItem.getPSAppDataEntity()?? && calendarItem.getPSDEDataSet()??>
'${calendarItem.getItemType()?lower_case}': {
itemName : '${calendarItem.getName()}',
itemType : '${calendarItem.getItemType()?lower_case}',
color : '${calendarItem.getBKColor()}',
textColor : '${calendarItem.getColor()}',
},
</#if>
</#list>
</#if>
};
/**
* 查询数据
*
* @param {string} itemType
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isLoading]
* @returns {Promise<HttpResponse>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public async search(itemType: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let item: any = {};
let action: string = '';
this.model.itemType = itemType;
try {
switch (itemType) {
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<#if calendarItem.getPSAppDataEntity()?? && calendarItem.getPSDEDataSet()??>
<#assign _appde = calendarItem.getPSAppDataEntity() />
<#assign deDataSet = calendarItem.getPSDEDataSet() />
case "${calendarItem.getItemType()?lower_case}":
action = 'Fetch${deDataSet.getCodeName()}';
data = this.handleRequestData(action, context, data);
await this.onBeforeAction(action, context, data, isLoading);
<#if _appde.getId() == appde.getId()>
item = {
...{ ${calendarItem.getItemType()?lower_case}: await this.loadDEDataSet(action, context, data, '${calendarItem.getItemType()?lower_case}') },
};
<#else>
item = {
...{ ${calendarItem.getItemType()?lower_case}: await this.loadDEDataSet(action, context, data, '${calendarItem.getItemType()?lower_case}', '${_appde.getCodeName()?lower_case}') },
};
</#if>
break;
</#if>
</#list>
</#if>
};
} catch (response) {
await this.onAfterAction(action, context, response);
return new HttpResponse(response.status);
}
await this.onAfterAction(action, context);
return new HttpResponse(200, item);
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isLoading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public async update(itemType: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<any> {
await this.onBeforeAction('', context, data, isLoading);
data = this.handleRequestData('', context, data);
let response: any;
switch (itemType) {
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<#if calendarItem.getPSAppDataEntity()??>
<#assign _appde = calendarItem.getPSAppDataEntity() />
<#if _appde.getId() == appde.getId()>
case "${calendarItem.getItemType()}":
response = await this.service.Update(context, data);
break;
<#else>
case "${calendarItem.getItemType()}":
response = await this.getService('${_appde.getCodeName()?lower_case}').then((s: any) => s.Update(context, data));
break;
</#if>
</#if>
</#list>
</#if>
}
if (!response.isError()) {
response = this.handleResponse("", response);
}
await this.onAfterAction('', context, response);
return new HttpResponse(response.status, response.data);
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=CALENDAR
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
此差异已折叠。
CTRLTYPE=TREEVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>TreeExpBarServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=TREEEXPBAR
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>WFExpBarServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=WFEXPBAR
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Model
*/
public getDataItems(): any[] {
return [
<#-- 表格数据项 -->
<#if ctrl.getPSListDataItems?? && ctrl.getPSListDataItems()??>
<#list ctrl.getPSListDataItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
<#if ctrl.getPSListDataItems?? && ctrl.getPSListDataItems()??>
<#list ctrl.getPSListDataItems() as dataitem>
<#-- 界面主键标识 -->
<#if dataitem.getPSDEField?? && dataitem.getPSDEField()??>
<#if !P.exists("importService", dataitem.getPSDEField().getId(), "")>
<#if dataitem.getPSDEField().isKeyDEField() == true>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#if>
</#list>
</#if>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
</#if>
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
}
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>MdServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=MOBMDCTRL
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/FORM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>FormServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/FORM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=FORM
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Model
*/
public getDataItems(): any[] {
return [
<#-- 表格数据项 -->
<#if ctrl.getPSDEGridDataItems()??>
<#list ctrl.getPSDEGridDataItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
<#if ctrl.getPSDEGridDataItems()??>
<#list ctrl.getPSDEGridDataItems() as dataitem>
<#-- 界面主键标识 -->
<#if dataitem.getPSDEField?? && dataitem.getPSDEField()??>
<#if !P.exists("importService", dataitem.getPSDEField().getId(), "")>
<#if dataitem.getPSDEField().isKeyDEField() == true>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#if>
</#list>
</#if>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
</#if>
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
}
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>GridServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#assign import_block>
<#if ctrl.getAggMode() == "ALL" && ctrl.getAggPSAppDataEntity()??>
<#assign aggAppDataEntity = ctrl.getAggPSAppDataEntity() >
import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/service/${srffilepath2(aggAppDataEntity.getCodeName())}/${srffilepath2(aggAppDataEntity.getCodeName())}-service';
</#if>
</#assign>
/**
* 合并配置的默认值
*
* @protected
* @param {*} [response={}]
* @memberof ${srfclassname(ctrl.codeName)}Service
*/
public mergeDefaults(response:any = {}): void {
if (response.data) {
<#list ctrl.getPSDEGridEditItems() as edititem><#t>
<#if edititem.getCreateDV?? && edititem.getCreateDV()??><#t>
<#if !(edititem.getCreateDV() == '')><#t>
Object.assign(response.data, { '${edititem.getCodeName()?lower_case}': '${edititem.getCreateDV()}' });
</#if>
</#if>
</#list>
}
}
<#if ctrl.getAggMode() == "ALL" && ctrl.getAggPSAppDataEntity()??>
<#assign aggAppDataEntity = ctrl.getAggPSAppDataEntity() >
/**
* 表格聚合加载数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isLoading]
* @returns {Promise<HttpResponse>}
* @memberof ${srfclassname(ctrl.codeName)}Service
*/
public async getAggData(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
await this.onBeforeAction(action, context, data, isLoading);
data = this.handleRequestData(action, context, data);
const service: any = await this.getService('${aggAppDataEntity.getCodeName()?lower_case}');
let response: HttpResponse;
if (Util.isFunction(service[action])) {
response = await this.service[action](context, data);
} else {
response = null;
}
if (response.status === 200) {
response = this.handleResponse(action, response);
}
await this.onAfterAction(action, context, response);
return response;
}
</#if>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=GRID
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>PickupViewPanelServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=PICKUPVIEWPANEL
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>PortletServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=PORTLET
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign extendsClass>ListServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=PANEL
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
[
<#list app.getAllPSAppCodeLists() as codelist>
{
<#if codelist.getCodeListType() == "STATIC" && codelist.getAllPSCodeItems()??>
"srfkey": "${codelist.codeName}",
"emptytext": "${codelist.getEmptyText()}",
"codelisttype":"static",
"items": [
<#if codelist.getAllPSCodeItems()??>
<#list codelist.getAllPSCodeItems() as codeitem>
<#if codeitem_index gt 0>,</#if> {
"id": "${codeitem.getValue()?j_string}",
"label": "${codeitem.getText()?j_string}",
"text": "${codeitem.getText()?j_string}",
<#comment>判断是否为数值代码项</#comment>
<#if codelist.isCodeItemValueNumber?? && codelist.isCodeItemValueNumber()>
"value": ${codeitem.getValue()?j_string},
<#else>
"value": "${codeitem.getValue()?j_string}",
</#if>
"disabled": <#if codeitem.isDisableSelect()>true<#else>false</#if>
}
</#list>
</#if>
]
<#else>
"srfkey": "${codelist.codeName}",
"emptytext": "${codelist.getEmptyText()}",
"codelisttype":"dynamic",
"appdataentity":"<#if codelist.getPSAppDataEntity?? && codelist.getPSAppDataEntity()??>${codelist.getPSAppDataEntity().codeName}</#if>",
"appdedataset":"<#if codelist.getPSAppDEDataSet?? && codelist.getPSAppDEDataSet()??>${codelist.getPSAppDEDataSet().codeName}</#if>",
"items": []
</#if>
}<#if codelist_has_next>,</#if>
</#list>
]
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPCODELIST
</#ibiztemplate>
import { CodeListBase } from '@/ibiz-core/code-list/code-list-base';
import { HttpResponse } from '@/ibiz-core/utils';
/**
* 代码表--${item.getName()}
*
* @export
* @class ${srfclassname('${item.getCodeName()}')}
* @extends {CodeListBase}
*/
export class ${srfclassname('${item.getCodeName()}')} extends CodeListBase {
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEDataSet?? && item.getPSAppDEDataSet()??>
/**
* 代码表项主键标识
*
* @protected
* @type {string}
* @memberof CodeListBase
*/
protected idKey: string = '<#if item.getValuePSAppDEField()??>${item.getValuePSAppDEField().getCodeName()?lower_case}<#else>${item.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}</#if>';
/**
* 代码表项值项标识
*
* @protected
* @type {string}
* @memberof CodeListBase
*/
protected valueKey: string = '<#if item.getValuePSAppDEField()??>${item.getValuePSAppDEField().getCodeName()?lower_case}<#else>${item.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}</#if>';
/**
* 代码表项文本标识
*
* @protected
* @type {string}
* @memberof CodeListBase
*/
protected textKey: string = '<#if item.getTextPSAppDEField()??>${item.getTextPSAppDEField().getCodeName()?lower_case}<#else>${item.getPSAppDataEntity().getMajorPSAppDEField().codeName?lower_case}</#if>';
</#if>
<#-- 不为子系统代码表 -->
<#if item.isSubSysCodeList() == false>
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEDataSet?? && item.getPSAppDEDataSet()??>
/**
* 获取数据项
*
* @param {*} [context={}] 上下文
* @param {*} [data={}] 参数
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}
*/
public async getItems(context: any = {}, data: any = {}): Promise<any> {
const service: any = await this.getService('${item.getPSAppDataEntity().codeName?lower_case}');
const response: any = await service.${item.getPSAppDEDataSet().codeName}(context, data);
if (response && response.status === 200 && response.data) {
return new HttpResponse(200, this.doItems(response.data));
}
return new HttpResponse(200, []);
}
</#if>
<#else>
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEDataSet?? && item.getPSAppDEDataSet()??>
<#if item.getPSAppDataEntity().codeName == "CodeItem">
/**
* 获取数据项
*
* @param {*} [context={}] 上下文
* @param {*} [data={}] 参数
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}
*/
public async getItems(context: any = {}, data: any = {}): Promise<any> {
const service: any = await this.getService('${item.getPSAppDataEntity().codeName?lower_case}');
const response: any = await service.${item.getPSAppDEDataSet().codeName}(context, { ...data, codelistid: '${item.id}' });
if (response && response.status === 200 && response.data) {
return new HttpResponse(200, this.doItems(response.data));
}
return new HttpResponse(200, []);
}
</#if>
</#if>
</#if>
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPCOUNTER
</#ibiztemplate>
import { CounterServiceBase } from '@/ibiz-core';
/**
* ${item.getName()}计数器服务对象基类
*
* @export
* @class ${item.getCodeName()}CounterServiceBase
* @extends {CounterServiceBase}
*/
export class ${srfclassname('${item.getCodeName()}')}CounterServiceBase extends CounterServiceBase { }
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPCOUNTER
</#ibiztemplate>
import { ${srfclassname('${item.getCodeName()}')}CounterServiceBase } from './${srffilepath2(item.getCodeName())}-counter-base';
/**
* ${item.getName()}计数器服务对象
*
* @export
* @class ${item.getCodeName()}CounterService
* @extends {${srfclassname('${item.getCodeName()}')}CounterServiceBase}
*/
export class ${srfclassname('${item.getCodeName()}')}CounterService extends ${srfclassname('${item.getCodeName()}')}CounterServiceBase { }
// 默认导出
export default ${srfclassname('${item.getCodeName()}')}CounterService;
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
import { ServiceConstructorBase } from '@/ibiz-core/service/service-constructor-base';
/**
* 计数器服务注册中心
*
* @export
* @class CounterServiceConstructor
* @extends {ServiceConstructorBase}
*/
export class CounterServiceConstructor extends ServiceConstructorBase {
/**
* 初始化
*
* @protected
* @memberof CounterServiceConstructor
*/
protected init(): void {
<#if app.getAllPSAppCounters()??>
<#list app.getAllPSAppCounters() as counter>
this.allService.set('${counter.codeName?lower_case}', () => import('@/app-core/counter/${srffilepath2(counter.getCodeName())}/${srffilepath2(counter.getCodeName())}-counter'));
</#list>
</#if>
}
}
/**
* 计数器服务构造器
*/
export const counterServiceConstructor: CounterServiceConstructor = new CounterServiceConstructor();
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_APPMENU
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_CALENDAR
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_CHART
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_DASHBOARD
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_DATAVIEW
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_DRBAR
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_DRTAB
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_FORM
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_GRID
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_LIST
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MOBMDCTRL
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MULTIEDITVIEWPANEL
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_PANEL
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_PICKUPVIEWPANEL
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_PORTLET
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_SEARCHFORM
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TABEXPPANEL
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_TABVIEWPANEL
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册