Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
ffed3592
提交
ffed3592
编写于
10月 31, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复模板错误
上级
5e50bda9
变更
4
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
17 行增加
和
330 行删除
+17
-330
VIEW.vue.ftl
@CONTROL/视图布局面板/实体数据多项选择视图/VIEW.vue.ftl
+16
-59
VIEW.vue.ftl
@CONTROL/视图布局面板/实体数据选择视图(左右关系)/VIEW.vue.ftl
+1
-12
VIEW-BASE.vue.ftl
@VIEW/实体多项数据选择视图(左右关系)/VIEW-BASE.vue.ftl
+0
-196
VIEW-BASE.vue.ftl
@VIEW/实体数据选择视图(左右关系)/VIEW-BASE.vue.ftl
+0
-63
未找到文件。
@CONTROL/视图布局面板/实体数据多项选择视图/VIEW.vue.ftl
浏览文件 @
ffed3592
<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>
<#-- BEGIN:视图底部视图消息 -->
</div>
<@ibizindent blank=8>
<card v-if="isShowButton" :dis-hover="true" :bordered="false" class="footer">
<#ibizinclude>
<row :style="{ textAlign: 'right' }">
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk">{{this.containerModel.view_okbtn.text}}</i-button>
</#ibizinclude>
</@ibizindent>
<i-button @click="onClickCancel">{{this.containerModel.view_cancelbtn.text}}</i-button>
<#-- END:视图底部视图消息 -->
</row>
</card>
</div>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</card>
</card>
</div>
</div>
\ No newline at end of file
@CONTROL/视图布局面板/实体数据选择视图(左右关系)/VIEW.vue.ftl
浏览文件 @
ffed3592
...
@@ -16,18 +16,7 @@
...
@@ -16,18 +16,7 @@
</#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>
<i-button @click="onClickCancel">{{this.containerModel.view_cancelbtn.text}}</i-button>
</row>
</card>
</div>
</div>
<#-- BEGIN:视图底部视图消息 -->
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<@ibizindent blank=8>
...
...
@VIEW/实体多项数据选择视图(左右关系)/VIEW-BASE.vue.ftl
浏览文件 @
ffed3592
...
@@ -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
...
...
@VIEW/实体数据选择视图(左右关系)/VIEW-BASE.vue.ftl
浏览文件 @
ffed3592
...
@@ -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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录