Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
42e76af7
提交
42e76af7
编写于
11月 08, 2022
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
8e0f8f66
变更
5
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
383 行增加
和
355 行删除
+383
-355
CONTROL-BASE.vue#PANEL.ftl
@CONTROL/面板/CONTROL-BASE.vue#PANEL.ftl
+22
-19
CONTROL-BASE.vue.ftl
@CONTROL/面板/CONTROL-BASE.vue.ftl
+63
-52
PANEL.ftl
@MACRO/PANEL.ftl
+0
-280
VIEW_HEADER-BASE.vue.ftl
@VIEW/@MACRO/VIEW_HEADER-BASE.vue.ftl
+271
-4
VIEW_LAYOUTPANEL_LOGIC.ftl
@VIEW/@MACRO/VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_LOGIC.ftl
+27
-0
未找到文件。
@CONTROL/面板/CONTROL-BASE.vue#PANEL.ftl
浏览文件 @
42e76af7
<#ibizinclude>
../../@VIEW/@MACRO/VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_RENDER.ftl
</#ibizinclude>
<template>
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<#if ctrl.getLayoutMode()?? && ctrl.getLayoutMode() == "FLEX">
<div class="app-layoutpanel ${ctrl.getCodeName()}<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>" v-loading="isLayoutLoadding" :style="{width: <#if ctrl.getWidth()?? && ctrl.getWidth() gt 0>'${ctrl.getWidth()?c}px'<#else>'100%'</#if>, height: <#if ctrl.getHeight() gt 0>'${ctrl.getHeight()?c}px'<#else>'100%'</#if>, 'display': 'flex', 'flex-direction': 'column'}">
<#else>
<div class="app-layoutpanel ${ctrl.getCodeName()}<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>" v-loading="isLayoutLoadding" :style="{width: <#if ctrl.getWidth()?? && ctrl.getWidth() gt 0>'${ctrl.getWidth()?c}px'<#else>'100%'</#if>, height: <#if ctrl.getHeight() gt 0>'${ctrl.getHeight()?c}px'<#else>'100%'</#if>, overflow: 'auto'}">
</#if>
<#if ctrl.getRootPSPanelItems()??>
<template v-show="!isLayoutLoadding">
<#list ctrl.getRootPSPanelItems() as panelDetail>
<@renderByDetailType panelDetail ctrl false/>
</#list>
</template>
</#if>
</div>
<#if ctrl.getLayoutMode()=='FLEX'>
<row class="app-layoutpanel <#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" style="width:<#if ctrl.getWidth()?? && ctrl.getWidth() gt 0>${ctrl.getWidth()?c}px<#else>100%</#if>;height:<#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px;<#else>100%;</#if>display: flex;">
<@ibizindent blank=8>
<#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item>
${P.getPartCode(item).code}
</#list>
</#if>
</template>
\ No newline at end of file
</@ibizindent>
</row>
<#else>
<row class="app-layoutpanel <#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" style="width:<#if ctrl.getWidth()?? && ctrl.getWidth() gt 0>${ctrl.getWidth()?c}px<#else>100%</#if>;height:<#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px<#else>100%</#if>;">
<@ibizindent blank=8>
<#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item>
${P.getPartCode(item).code}
</#list>
</#if>
</@ibizindent>
</row>
</#if>
</#if>
\ No newline at end of file
@CONTROL/面板/CONTROL-BASE.vue.ftl
浏览文件 @
42e76af7
${P.getPartCode(item,'PANEL').code}
<template>
${P.getPartCode(item,'PANEL').code}
</template>
<#assign import_block>
import { PanelDetailModel,PanelRawitemModel,PanelTabPanelModel,PanelTabPageModel,PanelFieldModel,PanelContainerModel,PanelControlModel,PanelUserControlModel,PanelButtonModel } from '@/model/panel-detail';
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
...
...
@@ -7,9 +9,6 @@ import UIService from '@/uiservice/ui-service';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../../@MACRO/PANEL.ftl
</#ibizinclude>
/**
...
...
@@ -19,10 +18,10 @@ import UIService from '@/uiservice/ui-service';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
getDatas(): any[] {
if (!this.
layout
Data) {
if (!this.
panel
Data) {
return [];
}
return [this.
layout
Data];
return [this.
panel
Data];
}
/**
...
...
@@ -32,7 +31,7 @@ import UIService from '@/uiservice/ui-service';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
getData() {
return this.
layout
Data;
return this.
panel
Data;
}
/**
...
...
@@ -67,6 +66,22 @@ import UIService from '@/uiservice/ui-service';
*/
public data:any = {};
/**
* 面板数据对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public panelData:any = null;
/**
* 视图布局数据
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public layoutData:any = {};
/**
* 数据模型对象
*
...
...
@@ -102,29 +117,15 @@ import UIService from '@/uiservice/ui-service';
</#if>
/**
*
布局面板顶级成员名称
*
详情模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public rootLayoutDetailNames: string[] = <@compress single_line=true>[
<#if ctrlgetRootPSPanelItems?? && ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as panelItem>
'${panelItem.name}'<#if panelItem_has_next>,</#if>
public detailsModel: any = {
<#list ctrl.getAllPSPanelItems() as panelItem>
${panelItem.name}: ${P.getPartCode(panelItem, 'ITEM_MODEL').code},
</#list>
</#if>
];</@compress>
/**
* 布局面板项模型对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public layoutItems:any = {
<#list ctrl.getAllPSPanelItems() as panelItem>
<#-- <@getPanelItemModel panelItem 'ITEMLAYOUT'/> -->
</#list>
};
/**
...
...
@@ -155,7 +156,7 @@ import UIService from '@/uiservice/ui-service';
public onInputDataChange(newVal: any, oldVal: any){
if(newVal){
this.computedUIData(newVal);
this.
layout
Data = Util.deepCopy(newVal);
this.
panel
Data = Util.deepCopy(newVal);
this.computeButtonState(newVal);
this.panelLogic({ name: '', newVal: null, oldVal: null });
this.$forceUpdate();
...
...
@@ -186,21 +187,21 @@ import UIService from '@/uiservice/ui-service';
// 若为项布局面板,存在parentRef
if(this.parentRef){
let targetData:any = this.parentRef.transformData(data);
if(this.layoutModelDetails && Object.keys(this.layoutModelDetails).length >0){
Object.keys(this.layoutModelDetails).forEach((name:any) =>{
if(this.layoutModelDetails[name] && this.layoutModelDetails[name].uiAction && this.layoutModelDetails[name].uiAction.dataAccaction && Object.is(this.layoutModelDetails[name].itemType,"BUTTON")){
let tempUIAction:any = JSON.parse(JSON.stringify(this.layoutModelDetails[name].uiAction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData, [tempUIAction], this.appUIService ? this.appUIService : null);
this.layoutModelDetails[name].visible = tempUIAction.visabled;
this.layoutModelDetails[name].disabled = tempUIAction.disabled;
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].itemType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService?this.appUIService:null);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
}
}
<@panelBase ctrl>
/**
* 界面行为
*
...
...
@@ -272,21 +273,22 @@ import UIService from '@/uiservice/ui-service';
}
/**
* 处理值改变
*
* @public
* @memberof ${srfclassname('${view.name}')}Base
* 设置变更面板编辑项的值
*
* @param data 面板数据
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public
handleValueChange(args
: { name: string, value: any }): void {
if (!
args || !args.name || Object.is(args.name, '') || !this.layoutData.hasOwnProperty(args.name)
) {
public
onPanelItemValueChange(data: any,$event
: { name: string, value: any }): void {
if (!
$event
) {
return;
}
const { name, value } = args;
this.data[name] = value;
this.layoutData[name] = value;
this.layoutModelDetails[name].setData(value);
this.panelLogic(name);
this.panelEditItemChange(this.data, name, value);
if (!$event.name || Object.is($event.name, '') || !data.hasOwnProperty($event.name)) {
return;
}
data[$event.name] = $event.value;
this.panelEditItemChange(data, $event.name, $event.value);
}
/**
...
...
@@ -312,17 +314,26 @@ import UIService from '@/uiservice/ui-service';
}
/**
* 分页切换事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleTabPanelClick(name:string,$event:any){
this.detailsModel[name].clickPage($event.name);
}
/**
* 面板逻辑
*
* @public
* @param
name
* @param
{{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public panelLogic(
name: string
): void {
<#
list ctrl.getAllPSPanelItems() as panelItem
>
<#-- <@panelItemLogic panelItem> -->
</#
list
>
public panelLogic(
{ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }
): void {
<#
if P.getPartCode(item,'PANEL_LOGIC').code?length gt 0
>
${P.getPartCode(item,'PANEL_LOGIC').code}
</#
if
>
}
<#ibizinclude>
...
...
@MACRO/PANEL.ftl
已删除
100644 → 0
浏览文件 @
8e0f8f66
此差异已折叠。
点击以展开。
@VIEW/@MACRO/VIEW_HEADER-BASE.vue.ftl
浏览文件 @
42e76af7
此差异已折叠。
点击以展开。
@VIEW/@MACRO/VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_LOGIC.ftl
0 → 100644
浏览文件 @
42e76af7
<#macro panelLogic item>
<@compress single_line=true>
<#if item.getLogicType() == 'GROUP'>
<#if item.isNotMode()>
!(
</#if>
<#if item.getPSPanelItemLogics()??>
<#list item.getPSPanelItemLogics() as subLogic>
<#if subLogic_index gt 0>
<#if item.getGroupOP() == 'AND'>
&&
</#if>
<#if item.getGroupOP() == 'OR'>
||
</#if>
</#if>
<@panelLogic subLogic/>
</#list>
</#if>
<#if item.isNotMode()>
)
</#if>
<#elseif item.getLogicType() == 'SINGLE'>
this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp()}", "${item.getValue()}")
</#if>
</@compress>
</#macro>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录