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

2020.5.21 更新

上级 9accc83d
......@@ -11,15 +11,13 @@
</#if>
</#macro>
<#-- 搜索框的输入提示信息 -->
<#macro getQuickSearchPlaceholder view>
请输入<#t>
<#assign isdrawcComma = false />
<#if view.getPSDataEntity?? && view.getPSDataEntity()?? && view.getPSDataEntity().getAllPSDEFields?? && view.getPSDataEntity().getAllPSDEFields()??>
<#list view.getPSDataEntity().getAllPSDEFields() as field>
<#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().getAllPSAppDEFields?? && view.getPSAppDataEntity().getAllPSAppDEFields()??>
<#list view.getPSAppDataEntity().getAllPSAppDEFields() as field>
<#if field.isEnableQuickSearch()>
<#if isdrawcComma>,<#else><#assign isdrawcComma = true /></#if><#t>
${field.getLogicName()}<#t>
${field.getPSDEField().getLogicName()}<#t>
</#if>
</#list>
</#if>
......
<template>
<div class='tabviewpanel' style="height:100%;">
<tabs :animated="false" class='tabexppanel' name='${ctrl.name}' @on-click="tabPanelClick">
<tabs :animated="false" class='tabexppanel' name='${ctrl.getCodeName()?lower_case}' @on-click="tabPanelClick">
<#list ctrl.getPSControls() as tabviewpanel>
<tab-pane :index="${tabviewpanel_index}" name='${tabviewpanel.name}' tab='${ctrl.name}' class='<#if tabviewpanel.getPSSysCss?? && tabviewpanel.getPSSysCss()??>${tabviewpanel.getPSSysCss().getCssName()}</#if>'
<tab-pane :index="${tabviewpanel_index}" name='${tabviewpanel.name}' tab='${ctrl.getCodeName()?lower_case}' class='<#if tabviewpanel.getPSSysCss?? && tabviewpanel.getPSSysCss()??>${tabviewpanel.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{
return h('div', [
<#if tabviewpanel.getPSSysImage()??>
......
......@@ -7,7 +7,7 @@
<div v-for = "item in items" :key="item.srfmajortext" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()>
<layout_${panel.getName()} name='${panel.name}' :data="item"></layout_${panel.getName()}>
<layout_${panel.getName()} name='${panel.name}' :inputData="item"></layout_${panel.getName()}>
<#elseif ctrl.itemRender??>
${ctrl.itemRender.code}
<#else>
......
......@@ -18,6 +18,10 @@
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
<#if dataitem.getFrontPSCodeList?? && dataitem.getFrontPSCodeList()??>
<#assign codelist=dataitem.getFrontPSCodeList() />
codelist:{tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'},
</#if>
},
</#list>
......
......@@ -23,8 +23,8 @@
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
result.then(async (response) => {
await this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
......
......@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<div class='list-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if></div>
<#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if>
</div>
</#if>
<div class="container-header">
......
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude>
<tabs :animated="false" name='${item.name}' v-show="detailsModel.${item.name}.visible" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if><#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"> app-tabpanel-flex</#if>'
<tabs :animated="false" name='${item.getCodeName()?lower_case}' v-show="detailsModel.${item.name}.visible" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if><#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"> app-tabpanel-flex</#if>'
:value="detailsModel.${item.name}.activiedPage" @on-click="detailsModel.${item.name}.clickPage($event)">
<#list item.getPSDEFormTabPages() as formmenber>
<tab-pane v-show="detailsModel.${formmenber.name}.visible" name='${formmenber.name}' :index="${formmenber_index}" tab='${item.name}' class='<#if formmenber.getPSSysCss?? && formmenber.getPSSysCss()??>${formmenber.getPSSysCss().getCssName()}</#if>'
<tab-pane v-show="detailsModel.${formmenber.name}.visible" name='${formmenber.name}' :index="${formmenber_index}" tab='${item.getCodeName()?lower_case}' class='<#if formmenber.getPSSysCss?? && formmenber.getPSSysCss()??>${formmenber.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{
return h('span',{
class:'caption<#if formmenber.getLabelPSSysCss?? && formmenber.getLabelPSSysCss()??> ${formmenber.getLabelPSSysCss().getCssName()}</#if>'
......
......@@ -13,10 +13,10 @@
</@ibizindent>
</#list>
<#else>
<tabs :animated="false" name='${ctrl.name}' :value="detailsModel.${ctrl.name}.activiedPage"
<tabs :animated="false" name='${ctrl.getCodeName()?lower_case}' :value="detailsModel.${ctrl.name}.activiedPage"
@on-click="detailsModel.${ctrl.name}.clickPage($event)">
<#list ctrl.getPSDEFormPages() as formpage>
<tab-pane v-show="detailsModel.${formpage.name}.visible" name='${formpage.name}' :index="${formpage_index}" tab='${ctrl.name}' class='<#if formpage.getPSSysCss?? && formpage.getPSSysCss()??>${formpage.getPSSysCss().getCssName()}</#if>'
<tab-pane v-show="detailsModel.${formpage.name}.visible" name='${formpage.name}' :index="${formpage_index}" tab='${ctrl.getCodeName()?lower_case}' class='<#if formpage.getPSSysCss?? && formpage.getPSSysCss()??>${formpage.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{
return h('span',{
class:'caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>'
......
<template>
<div class = "drtab">
<tabs :animated='false' class='app-dr-tab' name='name' @on-click="tabPanelClick">
<tabs :animated='false' class='app-dr-tab' name='${ctrl.getCodeName()?lower_case}' @on-click="tabPanelClick">
<#list ctrl.getRootItem().getAllItems() as dritem>
<tab-pane <#if dritem_index == 0>v-if="isShowSlot"</#if> :index='${dritem_index?c}' name='${dritem.getId()?lower_case}' tab='name' class='' :disabled='items[${dritem_index?c}].disabled'
<tab-pane <#if dritem_index == 0>v-if="isShowSlot"</#if> :index='${dritem_index?c}' name='${dritem.getId()?lower_case}' tab='${ctrl.getCodeName()?lower_case}' class='' :disabled='items[${dritem_index?c}].disabled'
label='${dritem.text}'>
<#if dritem.getId()?lower_case == 'form'>
<div class='main-data'>
......
......@@ -89,29 +89,29 @@ import UtilService from '@/utilservice/util-service';
/**
* 是否支持看板定制
*
* @protected
* @public
* @type {(boolean)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected isEnableCustomized!:boolean;
@Prop() public isEnableCustomized!:boolean;
/**
* 是否已有看板定制
*
* @protected
* @public
* @type {(boolean)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected isHasCustomized:boolean = false;
public isHasCustomized:boolean = false;
/**
* 模型数据
*
* @protected
* @public
* @type {(*)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected modelDta:any;
public modelDta:any;
/**
* modleId
......@@ -119,7 +119,7 @@ import UtilService from '@/utilservice/util-service';
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected modelId:string = "dashboard_<#if ctrl.getPSAppDataEntity()??>${ctrl.getPSAppDataEntity().getCodeName()?lower_case}<#else>app</#if>_${ctrl.getCodeName()?lower_case}";
public modelId:string = "dashboard_<#if ctrl.getPSAppDataEntity()??>${ctrl.getPSAppDataEntity().getCodeName()?lower_case}<#else>app</#if>_${ctrl.getCodeName()?lower_case}";
/**
* 建构功能服务对象
......@@ -127,7 +127,7 @@ import UtilService from '@/utilservice/util-service';
* @type {UtilService}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected utilService:UtilService = new UtilService();
public utilService:UtilService = new UtilService();
/**
* 功能服务名称
......@@ -135,7 +135,7 @@ import UtilService from '@/utilservice/util-service';
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected utilServiceName:string = "<#if ctrl.getPSAppDynaDashboardUtil?? && ctrl.getPSAppDynaDashboardUtil()??>${ctrl.getPSAppDynaDashboardUtil().getCodeName()?lower_case}</#if>";
public utilServiceName:string = "<#if ctrl.getPSAppDynaDashboardUtil?? && ctrl.getPSAppDynaDashboardUtil()??>${ctrl.getPSAppDynaDashboardUtil().getCodeName()?lower_case}</#if>";
/**
* 获取多项数据
......@@ -162,7 +162,7 @@ import UtilService from '@/utilservice/util-service';
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected created() {
public created() {
this.afterCreated();
}
......@@ -171,7 +171,7 @@ import UtilService from '@/utilservice/util-service';
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected afterCreated(){
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
......@@ -235,7 +235,7 @@ import UtilService from '@/utilservice/util-service';
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected loadModel(){
public loadModel(){
if(this.isEnableCustomized){
this.utilService.getService(this.utilServiceName).then((service:any) =>{
service.loadModelData(JSON.parse(JSON.stringify(this.context)),{modelid:this.modelId}).then((res:any) =>{
......@@ -266,7 +266,7 @@ import UtilService from '@/utilservice/util-service';
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected handleClick(){
public handleClick(){
const view:any ={
viewname: 'app-portal-design',
title: '面板设计',
......@@ -291,7 +291,7 @@ import UtilService from '@/utilservice/util-service';
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected destroyed() {
public destroyed() {
this.afterDestroy();
}
......@@ -300,7 +300,7 @@ import UtilService from '@/utilservice/util-service';
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected afterDestroy() {
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
......
......@@ -186,7 +186,7 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
* @param {*} response
* @memberof ControlService
*/
public handleResponse(action: string, response: any,isCreate:boolean = false,itemType:string=""){
public async handleResponse(action: string, response: any,isCreate:boolean = false,itemType:string=""){
let model: any = this.getMode();
model.itemType = itemType;
super.handleResponse(action,response,isCreate);
......
此差异已折叠。
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
@import '~@fullcalendar/core/main.css';
@import '~@fullcalendar/daygrid/main.css';
@import '~@fullcalendar/timegrid/main.css';
@import '~@fullcalendar/list/main.css';
.gantt {
height: 100%;
.gantt-elastic__main-view-container {
flex-grow: 1;
}
}
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ 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>
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'style',
},
{
name: 'textColor',
},
{
name: 'itemType',
},
{
name: 'parentId'
},
{
name: 'query',
prop: 'query',
},
];
switch(this.itemType){
<#-- 甘特项实体映射 -->
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as ganttItem>
<#if ganttItem.getTreeNodeType() == "DE">
case "${ganttItem.getNodeType()}":
dataItems = [...dataItems,
<#if ganttItem.getIdPSAppDEField()??>
{
name: 'id',
prop: '${ganttItem.getIdPSAppDEField().getCodeName()?lower_case}'
},
</#if>
<#if ganttItem.getPSDETreeNodeDataItems()??>
<#list ganttItem.getPSDETreeNodeDataItems() as dataItem>
{
name: '<#if dataItem.getName() == 'begin'>start<#else>${dataItem.getName()?lower_case}</#if>',
prop: '<#if dataItem.getPSDEField()??>${dataItem.getPSDEField().getCodeName()?lower_case}</#if>'
},
</#list>
</#if>
];
break;
</#if>
</#list>
</#if>
}
return dataItems;
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
此差异已折叠。
CTRLTYPE=GANTT
\ No newline at end of file
......@@ -4,7 +4,7 @@
<#if item.render??>
${item.render.code}
<#else>
<app-form-group layoutType="<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}" <#if item.getPSSysImage()??>:iconInfo="{<#assign img=item.getPSSysImage()><#if img.getImagePath() == "">'iconclass':'${img.getCssClass()}'<#else>'iconpath':'${img.getImagePath()}'</#if>}"</#if>>
<app-form-group layoutType="<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' :uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}" <#if item.getPSSysImage()??>:iconInfo="{<#assign img=item.getPSSysImage()><#if img.getImagePath() == "">'iconclass':'${img.getCssClass()}'<#else>'iconpath':'${img.getImagePath()}'</#if>}"</#if>>
<#assign content>
<#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())>
......
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude>
<tabs :animated="false" name='${item.name}' v-show="detailsModel.${item.name}.visible" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if><#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"> app-tabpanel-flex</#if>'
<tabs :animated="false" name='${item.getCodeName()?lower_case}' v-show="detailsModel.${item.name}.visible" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if><#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"> app-tabpanel-flex</#if>'
:value="detailsModel.${item.name}.activiedPage" @on-click="detailsModel.${item.name}.clickPage($event)">
<#list item.getPSDEFormTabPages() as formmenber>
<tab-pane v-show="detailsModel.${formmenber.name}.visible" name='${formmenber.name}' :index="${formmenber_index}" tab='${item.name}' class='<#if formmenber.getPSSysCss?? && formmenber.getPSSysCss()??>${formmenber.getPSSysCss().getCssName()}</#if>'
<tab-pane v-show="detailsModel.${formmenber.name}.visible" name='${formmenber.name}' :index="${formmenber_index}" tab='${item.getCodeName()?lower_case}' class='<#if formmenber.getPSSysCss?? && formmenber.getPSSysCss()??>${formmenber.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{
return h('span',{
class:'caption<#if formmenber.getLabelPSSysCss?? && formmenber.getLabelPSSysCss()??> ${formmenber.getLabelPSSysCss().getCssName()}</#if>'
......
......@@ -9,10 +9,10 @@
${P.getPartCode(formmenber).code}
</#list>
<#else>
<tabs :animated="false" name='${ctrl.name}' :value="detailsModel.${ctrl.name}.activiedPage"
<tabs :animated="false" name='${ctrl.getCodeName()?lower_case}' :value="detailsModel.${ctrl.name}.activiedPage"
@on-click="detailsModel.${ctrl.name}.clickPage($event)">
<#list ctrl.getPSDEFormPages() as formpage>
<tab-pane v-show="detailsModel.${formpage.name}.visible" name='${formpage.name}' :index="${formpage_index}" tab='${ctrl.name}' class='<#if formpage.getPSSysCss?? && formpage.getPSSysCss()??>${formpage.getPSSysCss().getCssName()}</#if>'
<tab-pane v-show="detailsModel.${formpage.name}.visible" name='${formpage.name}' :index="${formpage_index}" tab='${ctrl.getCodeName()?lower_case}' class='<#if formpage.getPSSysCss?? && formpage.getPSSysCss()??>${formpage.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{
return h('span',{
class:'caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>'
......
......@@ -701,7 +701,11 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.load(data);
}
if (Object.is('loaddraft', action)) {
this.loadDraft(data);
if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
}
if (Object.is('save', action)) {
this.save(data,data.showResultInfo);
......@@ -773,8 +777,18 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @param {*} [arg={}]
* @memberof @memberof ${srfclassname('${ctrl.codeName}')}
*/
public copy(arg: any = {}): void {
this.loadDraft(arg);
public copy(srfkey: string): void {
let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.${appde.getCodeName()?lower_case} = copyData.srfkey;
copyData.${appde.getKeyPSAppDEField().getCodeName()?lower_case} = copyData.srfkey;
Object.assign(this.context,{${appde.getCodeName()?lower_case}:copyData.${appde.getCodeName()?lower_case}})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
}
/**
......
......@@ -45,22 +45,24 @@
<#-- END:分组列 -->
<#elseif item.getColumnType() == 'UAGRIDCOLUMN'>
<#-- BEGIN:操作列 -->
<el-table-column :column-key="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}"</#if> :align="'${item.getAlign()?lower_case}'">
<el-table-column :column-key="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'">
<template slot-scope="scope">
<span>
<#if item.getPSDEUIActionGroup().getPSDEUIActions()??>
<#list item.getPSDEUIActionGroup().getPSDEUIActions() as uiaction>
<#if item.getPSDEUIActionGroup().getPSDEUIActions()??>
<#list item.getPSDEUIActionGroup().getPSDEUIActions() as uiaction>
<#if uiaction_index gt 0><divider type='vertical'></divider></#if>
<a @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)">{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</a>
</#list>
</#if>
<a @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)">
{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}
</a>
</#list>
</#if>
</span>
</template>
</el-table-column>
<#-- END:操作列 -->
<#elseif item.getColumnType() == 'DEFGRIDCOLUMN'>
<#-- BEGIN:数据列 -->
<el-table-column show-overflow-tooltip :prop="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}"</#if> :align="'${item.getAlign()?lower_case}'"<#if (!ctrl.isNoSort()) && item.isEnableSort()> :sortable="'custom'"</#if>>
<el-table-column show-overflow-tooltip :prop="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'"<#if (!ctrl.isNoSort()) && item.isEnableSort()> :sortable="'custom'"</#if>>
<template v-slot="{row,column}">
<#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || item.isEnableRowEdit()>
<#-- BEGIN:列绘制、前端绘制代码表、行编辑 -->
......
......@@ -427,7 +427,7 @@ import CodeListService from "@service/app/codelist-service";
* @type {number}
* @memberof AppIndex
*/
protected checkboxColWidth: number = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.CHECKCOLWIDTH',34)}<#else>34</#if>;
public checkboxColWidth: number = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.CHECKCOLWIDTH',34)}<#else>34</#if>;
/**
* 是否允许拖动列宽
......@@ -1385,7 +1385,7 @@ import CodeListService from "@service/app/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public uiAction(row: any, tag: any, $event: any) {
this.rowClick(row, true);
// this.rowClick(row, true);
<#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??>
......
......@@ -96,4 +96,4 @@
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
......@@ -396,7 +396,7 @@ import CodeListService from "@service/app/codelist-service";
* @type {number}
* @memberof AppIndex
*/
protected checkboxColWidth: number = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.CHECKCOLWIDTH',34)}<#else>34</#if>;
public checkboxColWidth: number = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.CHECKCOLWIDTH',34)}<#else>34</#if>;
/**
* 是否允许拖动列宽
......@@ -1349,8 +1349,8 @@ import CodeListService from "@service/app/codelist-service";
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected uiAction(row: any, tag: any, $event: any) {
this.rowClick(row, true);
public uiAction(row: any, tag: any, $event: any) {
// this.rowClick(row, true);
<#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??>
......
......@@ -17,4 +17,4 @@
</#assign>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEGANTTVIEW
\ No newline at end of file
......@@ -8,7 +8,7 @@
<#assign portletClass = "portlet">
</#if>
<template>
<div class='${portletClass} ${srffilepath2(ctrl.getCodeName())}' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '${portletHeight}' : '${ctrl.getHeight()?c}px',</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}">
<div class='${portletClass} ${srffilepath2(ctrl.getCodeName())}' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '${portletHeight}' : <#if ctrl.getHeight() == 1>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}">
<#if ctrl.getPortletType?? && ctrl.getPortletType()??><#t>
<#-- 视图 -->
<#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t>
......@@ -145,7 +145,7 @@
<#assign viewUIAction = appViewLogic.getPSAppViewUIAction()/>
<#if viewUIAction.getPSUIAction?? && viewUIAction.getPSUIAction()??>
<#assign uiaction = viewUIAction.getPSUIAction() />
actionName:"${uiaction.getName()}",
actionName:"${uiaction.getCaption()}",
<#if uiaction.getPSAppCounter?? && uiaction.getPSAppCounter()??>
<#assign counter = uiaction.getPSAppCounter() />
counterService:this.${srfclassname('${counter.getCodeName()}')}counterservice,
......
<#assign selfContent>
<#if !item.isHidden()>
<div class="item-field">
<span class="item-field-label <#if item.getLabelPSSysCss()??> ${item.getLabelPSSysCss().getCssName()}</#if>"<#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span>
<#if item.isShowCaption()><span class="item-field-label <#if item.getLabelPSSysCss()??> ${item.getLabelPSSysCss().getCssName()}</#if>"<#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span></#if>
<div class="item-field-content">
${P.getEditorCode(item, "PANELEDITOR.vue").code}
</div>
</div>
</#if>
</#assign>
<#ibizinclude>
......
<template>
${P.getPartCode(item,'PANEL').code}
</template>
<#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import CodeListService from "@service/app/codelist-service";
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -17,6 +21,13 @@
}
return [this.data];
}
/**
* 接口实现
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
getData() {
return this.data;
}
......@@ -27,7 +38,134 @@
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public data?: any;
@Prop() public inputData?: any;
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public codeListService:CodeListService = new CodeListService({ $store:this.$store });
/**
* 数据模型对象
*
* @type {${srfclassname('${ctrl.codeName}')}Model}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public dataModel:${srfclassname('${ctrl.codeName}')}Model = new ${srfclassname('${ctrl.codeName}')}Model();
/**
* UI数据对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public data:any = {};
/**
* 监听数据对象
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Watch('inputData',{immediate:true})
async onInputDataChange(newVal: any, oldVal: any){
if(newVal){
await this.computedUIData(newVal);
this.$forceUpdate();
}
}
/**
* 计算UI展示数据
*
* @param codelistArray 代码表模型数组
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public async computedUIData(newVal:any){
let codelistArray:Array<any> = [];
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
this.dataModel.getDataItems().forEach((item:any) =>{
if(item.codelist){
codelistArray.push(item.codelist);
}
})
if(codelistArray.length >0){
let res:any = await this.getAllCodeList(codelistArray);
this.dataModel.getDataItems().forEach((item:any) =>{
if(item.codelist){
this.data[item.name] = res.get(item.codelist.tag).get(newVal[item.prop]);
}else{
this.data[item.name] = newVal[item.prop];
}
})
}else{
this.dataModel.getDataItems().forEach((item:any) =>{
this.data[item.name] = newVal[item.prop];
})
}
}
}
/**
* 获取所有代码表
*
* @param codelistArray 代码表模型数组
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getAllCodeList(codelistArray:Array<any>):Promise<any>{
return new Promise((resolve:any,reject:any) =>{
let codeListMap:Map<string,any> = new Map();
let promiseArray:Array<any> = [];
codelistArray.forEach((item:any) =>{
if(!codeListMap.get(item.tag)){
promiseArray.push(this.getCodeList(item));
Promise.all(promiseArray).then((result:any) =>{
if(result && result.length >0){
result.forEach((codeList:any) =>{
let tempCodeListMap:Map<number,any> = new Map();
if(codeList.length >0){
codeList.forEach((codeListItem:any) =>{
tempCodeListMap.set(codeListItem.value,codeListItem.text);
})
}
codeListMap.set(item.tag,tempCodeListMap);
})
resolve(codeListMap);
}
})
}
})
})
}
/**
* 获取代码表
*
* @param codeListObject 传入代码表对象
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getCodeList(codeListObject:any):Promise<any>{
return new Promise((resolve:any,reject:any) =>{
if(codeListObject.tag && Object.is(codeListObject.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(codeListObject.tag);
if (codelist) {
resolve([...JSON.parse(JSON.stringify(codelist.items))]);
} else {
resolve([]);
console.log(`----<#noparse>${codeListObject.tag}</#noparse>----代码表不存在`);
}
}else if(codeListObject.tag && Object.is(codeListObject.codelistType,"DYNAMIC")){
this.codeListService.getItems(codeListObject.tag).then((res:any) => {
resolve(res);
}).catch((error:any) => {
resolve([]);
console.log(`----<#noparse>${codeListObject.tag}</#noparse>----代码表不存在`);
});
}
})
}
<#if ctrl.getAllPSPanelItems()??>
<#list ctrl.getAllPSPanelItems() as panelItem>
......@@ -42,7 +180,6 @@
<#assign uiaction = panelItem.getPSUIAction()>
this.${ctrl.name}_${panelItem.getName()}_click(null, null, $event);
</#if>
}
</#if>
</#list>
......
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getDataItems(): any[] {
return [
<#-- 主实体所有属性 -->
<#if ctrl.getAllPSPanelFields()??>
<#list ctrl.getAllPSPanelFields() as datafield>
{
name: '${datafield.getName()?lower_case}',
<#if datafield.getPSCodeList()??>
<#assign codelist = datafield.getPSCodeList() />
codelist:{tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'},
</#if>
prop: '${datafield.getViewFieldName()?lower_case}'
}<#if datafield_has_next>,</#if>
</#list>
</#if>
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<el-input size="small" v-model="data.${editor.getViewFieldName()?lower_case}" style="width: 100%;"></el-input>
\ No newline at end of file
<el-input size="small" v-model="data.${editor.getName()?lower_case}" style="width: 100%;"></el-input>
\ No newline at end of file
<span v-html="data.${item.getViewFieldName()?lower_case}"></span>
\ No newline at end of file
<span v-html="data.${item.getName()?lower_case}"></span>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<span>{{data.${item.getViewFieldName()?lower_case}}}</span>
\ No newline at end of file
<span>{{data.${item.getName()?lower_case}}}</span>
\ No newline at end of file
<span v-html="data.${item.getViewFieldName()?lower_case}"></span>
\ No newline at end of file
<span v-html="data.${item.getName()?lower_case}"></span>
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
......@@ -18,14 +18,14 @@
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(data2);
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
......
......@@ -90,6 +90,9 @@
<#elseif viewlogic.getNewDataPSAppView()??>
<#assign dataview = viewlogic.getNewDataPSAppView()/>
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(curViewParam,args[0]);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册