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

修复模板错误

上级 5e50bda9
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <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> <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"> <card class='view-card view-no-caption <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :padding="0" :bordered="false">
<#-- BEGIN:视图顶部视图消息 --> <#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl ../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<#-- END:视图顶部视图消息 --> <#-- END:视图顶部视图消息 -->
<div class="content-container pickup-view"> <div class="content-container pickup-view">
<#-- BEGIN:视图内容区视图消息 --> <#-- BEGIN:视图内容区视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
...@@ -16,58 +16,14 @@ ...@@ -16,58 +16,14 @@
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<#-- END:视图内容区视图消息 --> <#-- 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> </div>
<#-- BEGIN:视图底部视图消息 --> <#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl ../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<#-- END:视图底部视图消息 --> <#-- END:视图底部视图消息 -->
</card> </card>
</div> </div>
\ 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>"> <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> <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"> <card class='view-card view-no-caption <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :padding="0" :bordered="false">
<#-- BEGIN:视图顶部视图消息 --> <#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl ../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<#-- END:视图顶部视图消息 --> <#-- END:视图顶部视图消息 -->
<div class="content-container pickup-view"> <div class="content-container pickup-view">
<#-- BEGIN:视图内容区视图消息 --> <#-- BEGIN:视图内容区视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
...@@ -16,25 +16,14 @@ ...@@ -16,25 +16,14 @@
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<#-- END:视图内容区视图消息 --> <#-- 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> </div>
<#-- BEGIN:视图底部视图消息 --> <#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl ../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<#-- END:视图底部视图消息 --> <#-- END:视图底部视图消息 -->
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -2,209 +2,13 @@ ...@@ -2,209 +2,13 @@
../@MACRO/LAYOUTPANEL_VIEW.template.ftl ../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude> </#ibizinclude>
<#assign watch_viewparam_block>
if(this.viewparams.selectedData){
this.selectedData = JSON.stringify(this.viewparams.selectedData);
this.viewSelections = this.viewparams.selectedData;
}
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl ../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#assign mounted_block>
if(this.viewparams.selectedData){
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', this.viewparams.selectedData);
this.onCLickRight();
}
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl ../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude> </#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> <#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl ../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
......
...@@ -2,76 +2,13 @@ ...@@ -2,76 +2,13 @@
../@MACRO/LAYOUTPANEL_VIEW.template.ftl ../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude> </#ibizinclude>
<#assign watch_viewparam_block>
if(this.viewparams.selectedData){
this.selectedData = JSON.stringify(this.viewparams.selectedData);
}
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl ../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#assign mounted_block>
if(this.viewparams.selectedData){
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', this.viewparams.selectedData);
}
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl ../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude> </#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> <#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl ../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册