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

增加视图类型

上级 ce632cf2
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.pickup-view {
>.translate-contant {
overflow: auto;
flex-grow: 1;
display: flex;
justify-content: flex-end;
height: calc(100% - 64px);
.translate-buttons {
width: 80px;
display: flex;
align-items: center;
text-align: center;
button {
margin-bottom: 5px;
}
}
.left, .right {
width: 300px;
}
.right {
border: 1px solid #e9e9e9;
.mpicker-select {
font-family: helvetica, sans-serif;
font-size: 16px;
text-align: justify;
word-spacing: -3.8pt;
line-height: 1.6;
font-weight: bold;
word-spacing: 10px;
height: 100%;
overflow: auto;
}
.mpicker-select > div {
padding: 3px 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.85);
font-weight: initial;
cursor: pointer;
min-height: 28px;
border: 1px solid #e9e9e9;
margin: 4px 4px;
transition: all .3s;
}
.mpicker-select > div:hover {
background: #ecf6fd;
}
.mpicker-select > .select{
color: #108ee9;
background: #ecf6fd;
}
}
.center{
width: calc(100% - 380px);
.pickupviewpanel {
width: 100%;
height: 100%;
}
}
}
>.footer {
height: 64px;
}
}
\ No newline at end of file
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card view-no-caption <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :padding="0" :bordered="false">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<div class="content-container pickup-view">
<#-- BEGIN:视图内容区视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Body_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图内容区视图消息 -->
<div class="translate-contant">
<div class="center" :style="{width : !isShowButton ? '100%' : ''}">
<#if view.hasPSControl('pickupviewpanel')>
<@ibizindent blank=20>
${P.getCtrlCode('pickupviewpanel', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</div>
<div v-if="isShowButton" class="translate-buttons">
<div class="buttons">
<i-button type="primary" :title="this.containerModel.view_rightbtn.text"
:disabled="this.containerModel.view_rightbtn.disabled"
@click="onCLickRight">
<i class="el-icon-arrow-right"></i>
</i-button>
<i-button type="primary" :title="this.containerModel.view_leftbtn.text"
:disabled="this.containerModel.view_leftbtn.disabled"
@click="onCLickLeft">
<i class="el-icon-arrow-left"></i>
</i-button>
<i-button type="primary" :title="this.containerModel.view_allrightbtn.text"
@click="onCLickAllRight">
<i class="el-icon-d-arrow-right"></i>
</i-button>
<i-button type="primary" :title="this.containerModel.view_allleftbtn.text"
@click="onCLickAllLeft">
<i class="el-icon-d-arrow-left"></i>
</i-button>
</div>
</div>
<div v-if="isShowButton" class="right">
<div class="mpicker-select">
<div v-for="(item, index) in viewSelections" :key="index" :class="item._select ? 'select' : ''" @click="selectionsClick(item)" @dblclick="selectionsDBLClick(item)">
<span>{{item.srfmajortext}}</span>
</div>
</div>
</div>
</div>
<card v-if="isShowButton" :dis-hover="true" :bordered="false" class="footer">
<row :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel">{{this.containerModel.view_cancelbtn.text}}</i-button>
</row>
</card>
</div>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMPICKUPVIEW2
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="app-redirect-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEWFSTARTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.pickup-view {
>.pickupviewpanel {
flex-grow: 1;
display: flex;
justify-content: flex-end;
height: calc(100% - 64px);
}
>.footer {
height: 64px;
}
}
\ No newline at end of file
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card view-no-caption <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :padding="0" :bordered="false">
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<div class="content-container pickup-view">
<#-- BEGIN:视图内容区视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Body_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图内容区视图消息 -->
<#if view.hasPSControl('pickupviewpanel')>
<@ibizindent blank=12>
${P.getCtrlCode('pickupviewpanel', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
<card v-if="isShowButton" :dis-hover="true" :bordered="false" class="footer">
<row :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel">{{this.containerModel.view_cancelbtn.text}}</i-button>
</row>
</card>
</div>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEPICKUPVIEW2
\ No newline at end of file
.view-card {
>.ivu-card-extra {
top: 5px;
right: 0px;
}
}
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<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">
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<div class='content-container'>
<#-- BEGIN:视图内容区视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Body_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图内容区视图消息 -->
<#if view.hasPSControl('treeexpbar')>
<@ibizindent blank=12>
${P.getCtrlCode('treeexpbar', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</div>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDETREEEXPVIEW2
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/GRID.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEGRIDVIEW2
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.${srffilepath2(view.getCodeName())}{
display: block;
}
\ No newline at end of file
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if> <#if view.getViewStyle() != 'DEFAULT'>${view.getViewStyle()}</#if>'>
<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 :bordered="false">
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
<div class='content-container'>
<div class='view-top-messages'>
</div>
<div class='view-bottom-messages'>
</div>
</div>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPPANELVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#assign watch_viewparam_block>
if(this.viewparams.selectedData){
this.selectedData = JSON.stringify(this.viewparams.selectedData);
this.viewSelections = this.viewparams.selectedData;
}
</#assign>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#assign mounted_block>
if(this.viewparams.selectedData){
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', this.viewparams.selectedData);
this.onCLickRight();
}
</#assign>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 选中数据的字符串
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
public selectedData: string = "";
/**
* 是否初始化已选中项
*
* @type {any[]}
* @memberof ${srfclassname('${view.name}')}Base
*/
public isInitSelected:boolean = false;
/**
* 视图选中数据
*
* @type {any[]}
* @memberof ${srfclassname('${view.name}')}Base
*/
public viewSelections:any[] = [];
/**
* 是否单选
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base
*/
public isSingleSelect: boolean = false;
/**
* 选中数据单击
*
* @param {*} item
* @memberof ${srfclassname('${view.name}')}Base
*/
public selectionsClick(item:any):void {
item._select = !item._select;
const removeSelect: boolean = this.viewSelections.some((selection: any) => selection._select);
this.containerModel.view_leftbtn.disabled = !removeSelect;
}
/**
* 选中树双击
*
* @param {*} item
* @memberof ${srfclassname('${view.name}')}Base
*/
public selectionsDBLClick(item:any):void {
const index: number = this.viewSelections.findIndex((selection: any) => Object.is(selection.srfkey, item.srfkey));
if (index !== -1) {
this.viewSelections.splice(index, 1);
}
const removeSelect: boolean = this.viewSelections.some((selection: any) => selection._select);
this.containerModel.view_leftbtn.disabled = !removeSelect;
this.selectedData = JSON.stringify(this.viewSelections);
}
/**
* 删除右侧全部选中数据
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onCLickLeft():void {
const _selectiions = [...JSON.parse(JSON.stringify(this.viewSelections))];
_selectiions.forEach((item: any) => {
if (!item._select) {
return;
}
const index = this.viewSelections.findIndex((selection: any) => Object.is(item.srfkey, selection.srfkey));
if (index !== -1) {
this.viewSelections.splice(index, 1);
}
});
const removeSelect: boolean = this.viewSelections.some((selection: any) => selection._select);
this.containerModel.view_leftbtn.disabled = !removeSelect;
this.selectedData = JSON.stringify(this.viewSelections);
}
/**
* 添加左侧选中数据
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onCLickRight():void {
Object.values(this.containerModel).forEach((model: any) => {
if (!Object.is(model.type, 'PICKUPVIEWPANEL')) {
return;
}
let newSelections:any[] = [];
model.selections.forEach((item: any) => {
const index: number = this.viewSelections.findIndex((selection: any) => Object.is(item.srfkey, selection.srfkey));
if (index === -1) {
let _item: any = { ...JSON.parse(JSON.stringify(item)) };
Object.assign(_item, { _select: false })
newSelections.push(_item);
}else{
newSelections.push(this.viewSelections[index]);
}
});
this.viewSelections = this.removeDuplicates([...newSelections,...this.viewSelections]);
});
}
/**
* 去重
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public removeDuplicates(data:any):Array<any> {
const uniqueSet = new Set(data);
return [...uniqueSet];
}
/**
* 选中数据全部删除
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onCLickAllLeft():void {
this.viewSelections = [];
this.containerModel.view_leftbtn.disabled = true;
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', []);
this.selectedData = JSON.stringify(this.viewSelections);
}
/**
* 添加左侧面板所有数据到右侧
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onCLickAllRight():void {
Object.values(this.containerModel).forEach((model: any) => {
if (!Object.is(model.type, 'PICKUPVIEWPANEL')) {
return;
}
if(model.datas.length>0){
model.datas.forEach((data:any,index:any)=>{
Object.assign(data,{srfmajortext: data['${view.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}']});
})
}
model.datas.forEach((item: any) => {
const index: number = this.viewSelections.findIndex((selection: any) => Object.is(item.srfkey, selection.srfkey));
if (index === -1) {
let _item: any = { ...JSON.parse(JSON.stringify(item)) };
Object.assign(_item, { _select: false })
this.viewSelections.push(_item);
}
});
});
this.selectedData = JSON.stringify(this.viewSelections);
}
/**
* 确定
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onClickOk(): void {
this.$emit('viewdataschange', this.viewSelections);
this.$emit('close', null);
}
/**
* 取消
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onClickCancel(): void {
this.$emit('viewdataschange', null);
this.$emit('close', null);
}
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEMPICKUPVIEW2
\ No newline at end of file
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEWFSTARTVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#assign watch_viewparam_block>
if(this.viewparams.selectedData){
this.selectedData = JSON.stringify(this.viewparams.selectedData);
}
</#assign>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#assign mounted_block>
if(this.viewparams.selectedData){
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', this.viewparams.selectedData);
}
</#assign>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 选中数据的字符串
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
public selectedData: string = "";
/**
* 视图选中数据
*
* @type {any[]}
* @memberof ${srfclassname('${view.name}')}Base
*/
public viewSelections:any[] = [];
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base
*/
public isSingleSelect: boolean = true;
/**
* 确定
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onClickOk(): void {
this.$emit('viewdataschange', this.viewSelections);
this.$emit('close', null);
}
/**
* 取消
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onClickCancel(): void {
this.$emit('viewdataschange', null);
this.$emit('close', null);
}
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEPICKUPVIEW2
\ No newline at end of file
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 视图唯一标识
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
public viewUID: string = '${srffilepath2(view.getPSAppModule().getCodeName())}-${srffilepath2(view.getCodeName())}';
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDETREEEXPVIEW2
\ No newline at end of file
<#ibizinclude>
../@MACRO/GRID_VIEW-BASE.vue.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEGRIDVIEW2
\ No newline at end of file
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPPANELVIEW
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册