提交 566dc899 编写于 作者: yanshaowei's avatar yanshaowei

init

上级
流水线 #218 已失败 ,包含阶段

要显示的变更太多。

为了保持性能,仅显示文件中的 1000/1000+

import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UICounter } from '@/utils';
import './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}.less';
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#if subctrl.getPSDataEntity?? && subctrl.getPSDataEntity()??>
import view_${subctrl.getName()} from '@widget/${srffilepath2(subctrl.getPSDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}';
<#else>
import view_${subctrl.getName()} from '@widget/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}';
</#if>
</#if>
</#list>
</#if>
<#-- 语言资源入口 -->
<#ibizinclude>
./LANGBASE.tsx.ftl
</#ibizinclude>
<#if ctrl.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
import layout_${panel.getName()} from '@widget/${srffilepath2(panel.getPSDataEntity().getCodeName())}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}';
</#list>
</#if>
<#if import_block??>${import_block}</#if>
@Component({
components: {
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
view_${subctrl.getName()},
</#if>
</#list>
</#if>
<#if ctrl.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
layout_${panel.getName()},
</#list>
</#if>
<#if components??>${components}</#if>
}
})
export default class ${srfclassname('${ctrl.codeName}')} extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 视图状态事件
*
* @protected
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected viewStateEvent: Subscription | undefined;
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType()??>
<#if childCtrl.getHookEventNames()??>
<#list childCtrl.getHookEventNames() as eventName>
/**
* ${childCtrl.name} 部件 ${eventName?lower_case} 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ${childCtrl.name}_${eventName?lower_case}($event: any, $event2?: any) {
<#if childCtrl.getPSControlLogics(eventName)??>
<#list childCtrl.getPSControlLogics(eventName) as ctrlLogic>
<#if ctrlLogic.getLogicType?? && ctrlLogic.getLogicType() == "APPVIEWENGINE" && ctrlLogic.getPSAppViewEngine()??>
this.${ctrlLogic.getPSAppViewEngine().getName()}.onCtrlEvent('${childCtrl.name}', '${eventName?lower_case}', $event);
<#else>
<#if ctrlLogic.getEventArg()?? && ctrlLogic.getEventArg()?length gt 0>
if (Object.is($event.tag, '${ctrlLogic.getEventArg()}')) {
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
}
<#else>
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
</#if>
</#if>
</#list>
</#if>
}
</#list>
</#if>
</#if>
</#list>
</#if>
<#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getLogicTrigger() == "CUSTOM" || logic.getLogicTrigger() == "CTRLEVENT">
${P.getLogicCode(logic, "LOGIC.tsx").code}
</#if>
</#list>
</#if>
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<#list ctrl.getPSUIActions() as uiAction>
${P.getLogicCode(uiAction, "LOGIC.tsx").code}
</#list>
</#if>
/**
* 序列号
*
* @private
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private serialNumber: number = this.$util.createSerialNumber();
/**
* 请求行为序列号数组
*
* @private
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private serialsNumber: any[] = [];
/**
* 添加序列号
*
* @private
* @param {*} action
* @param {number} serialnumber
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private addSerialNumber(action: any, serialnumber: number): void {
const index = this.serialsNumber.findIndex((serial: any) => Object.is(serial.action, action));
if (index === -1) {
this.serialsNumber.push({ action: action, serialnumber: serialnumber })
} else {
this.serialsNumber[index].serialnumber = serialnumber;
}
}
/**
* 删除序列号
*
* @private
* @param {*} action
* @returns {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
private getSerialNumber(action: any): number {
const index = this.serialsNumber.findIndex((serial: any) => Object.is(serial.action, action));
return this.serialsNumber[index].serialnumber;
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public closeView(args: any[]): void {
let _this: any = this;
_this.$emit('closeview', args);
}
<#assign layout='TABLE_24COL'><#if formmenber.getPSLayoutPos()??><#if formmenber.getPSLayoutPos().getParentPSLayout()??><#assign layout='${formmenber.getPSLayoutPos().getParentPSLayout().getLayout()}'></#if></#if>
<#assign LayoutPos = formmenber.getPSLayoutPos()>
<#if layout == 'TABLE_24COL' && LayoutPos??>
<i-col v-show={this.detailsModel.${formmenber.name}.visible} style='<#if (formmenber.getHeight?? && formmenber.getHeight() gt 0)>height: ${formmenber.getHeight()?c}px !important;</#if><#if (formmenber.getWidth?? && formmenber.getWidth() gt 0)>width: ${formmenber.getWidth()?c}px !important;</#if>' <#if LayoutPos.getColXS() != -1> sm={{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if> }}</#if><#if LayoutPos.getColSM() != -1> md={{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if> }}</#if><#if LayoutPos.getColMD() != -1> lg={{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }}</#if><#if LayoutPos.getColLG() != -1> xl={{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }}</#if>>
${P.getPartCode(formmenber).code}
</i-col>
<#elseif layout == 'FLEX'>
<div v-show={this.detailsModel.${formmenber.name}.visible} style="<#if LayoutPos.getGrow() != -1>flex-grow: ${LayoutPos.getGrow()?c};<#if !LayoutPos.getHeight()??>height: 0;</#if></#if><#if LayoutPos.getWidth()??>width: ${LayoutPos.getWidth()?c}px;</#if><#if LayoutPos.getHeight()??>height: ${LayoutPos.getHeight()?c}px;</#if>">
${P.getPartCode(formmenber).code}
</div>
<#else>
<div v-show={this.detailsModel.${formmenber.name}.visible}>
${P.getPartCode(formmenber).code}
</div>
</#if>
\ No newline at end of file
<#assign langbase><#if de??>${de.getCodeName()?lower_case}.${ctrl.getCodeName()?lower_case}_${ctrl.getControlType()?lower_case}</#if></#assign>
\ No newline at end of file
${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/${ctrl.codeName?lower_case}${srfclassname(ctrl.getControlType())?lower_case}/
\ No newline at end of file
// this is less
<#if ctrl.getPSSysCsses?? && ctrl.getPSSysCsses()??>
<#list ctrl.getPSSysCsses() as css>
<#if css.getRawCssStyle()?? && css.getRawCssStyle()?length gt 0>
.${css.getCssName()} {
${css.getRawCssStyle()}
}
</#if>
<#if css.getCssStyle()??>
${css.getCssStyle()}
</#if>
</#list>
</#if>
\ No newline at end of file
<#-- ctrl document -->
<view_${ctrl.getName()}
viewState={this.viewState}
<#if content??>
${content}
</#if>
name='${ctrl.name}'
ref='${ctrl.name}'
<#if ctrl.getHookEventNames()??>
<#list ctrl.getHookEventNames() as eventName>
on-${eventName?lower_case}={($event: any) => this.${ctrl.name}_${eventName?lower_case}($event)}
</#list>
</#if>
on-closeview={($event: any) => this.closeView($event)}>
</view_${ctrl.getName()}>
\ No newline at end of file