Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
b234fea8
提交
b234fea8
编写于
11月 11, 2022
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新:多数据容器
上级
2016a4e8
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
23 行增加
和
30 行删除
+23
-30
CONTROL-BASE.vue#PANEL.ftl
@CONTROL/面板/CONTROL-BASE.vue#PANEL.ftl
+2
-2
CONTROL-BASE.vue.ftl
@CONTROL/面板/CONTROL-BASE.vue.ftl
+5
-4
PANEL.ftl
@MACRO/PANEL.ftl
+7
-16
VIEW_HEADER-BASE.vue.ftl
@VIEW/@MACRO/VIEW_HEADER-BASE.vue.ftl
+5
-4
VIEW_LAYOUTPANEL_RENDER.ftl
@VIEW/@MACRO/VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_RENDER.ftl
+4
-4
未找到文件。
@CONTROL/面板/CONTROL-BASE.vue#PANEL.ftl
浏览文件 @
b234fea8
...
@@ -9,11 +9,11 @@ ${ctrl.render.code}
...
@@ -9,11 +9,11 @@ ${ctrl.render.code}
<#else>
<#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'}">
<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 ctrl.getRootPSPanelItems()??>
<#if ctrl.getRootPSPanelItems()??>
<
template v-if="!isLayoutLoadding
">
<
div v-show="!isLayoutLoadding" :style="{height: '100%', width: '100%'}
">
<#list ctrl.getRootPSPanelItems() as panelDetail>
<#list ctrl.getRootPSPanelItems() as panelDetail>
<@renderByDetailType panelDetail ctrl false/>
<@renderByDetailType panelDetail ctrl false/>
</#list>
</#list>
</
template
>
</
div
>
</#if>
</#if>
</div>
</div>
</#if>
</#if>
...
...
@CONTROL/面板/CONTROL-BASE.vue.ftl
浏览文件 @
b234fea8
...
@@ -231,12 +231,13 @@ import UIService from '@/uiservice/ui-service';
...
@@ -231,12 +231,13 @@ import UIService from '@/uiservice/ui-service';
* @memberof ${srfclassname('${ctrl.name}')}Base
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
*/
public handleValueChange(args: { name: string, value: any }, index?: number) {
public handleValueChange(args: { name: string, value: any }, index?: number) {
if (!args || !args.name || Object.is(args.name, '') || !this.layoutData.hasOwnProperty(args.name)) {
const { name, value } = args;
<#noparse>let fullName = (index || index === 0) ? `${name}_${index}` : name;</#noparse>
if (!fullName || !this.layoutData.hasOwnProperty(fullName)) {
return;
return;
}
}
const { name, value } = args;
this.layoutData[fullName] = value;
this.layoutData[name] = value;
this.layoutModelDetails[fullName].setData(value);
this.layoutModelDetails[name].setData(value);
this.panelLogic(name, index);
this.panelLogic(name, index);
this.computeButtonAuthState();
this.computeButtonAuthState();
this.panelEditItemChange(name, value);
this.panelEditItemChange(name, value);
...
...
@MACRO/PANEL.ftl
浏览文件 @
b234fea8
...
@@ -39,9 +39,6 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
...
@@ -39,9 +39,6 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
* @memberof ${srfclassname('${item.codeName}')}Base
* @memberof ${srfclassname('${item.codeName}')}Base
*/
*/
public panelLogic(name: string, index?: number): void {
public panelLogic(name: string, index?: number): void {
if (name && (index || index === 0)) {
<#noparse>name = name.replace(`_${index}`,"");</#noparse>
}
<#list panelItems as panelItem>
<#list panelItems as panelItem>
<#if panelItem.getPSPanelItemGroupLogic('ITEMBLANK')??>
<#if panelItem.getPSPanelItemGroupLogic('ITEMBLANK')??>
<#assign ITEMBLANK = panelItem.getPSPanelItemGroupLogic('ITEMBLANK')/>
<#assign ITEMBLANK = panelItem.getPSPanelItemGroupLogic('ITEMBLANK')/>
...
@@ -49,11 +46,9 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
...
@@ -49,11 +46,9 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
let ret = true;
let ret = true;
<#if ITEMBLANK.getRelatedItemNames()??>
<#if ITEMBLANK.getRelatedItemNames()??>
<#list ITEMBLANK.getRelatedItemNames() as detailName>
<#list ITEMBLANK.getRelatedItemNames() as detailName>
let _${detailName} =
''
;
let _${detailName} =
this.layoutData['${detailName}']
;
if (index || index === 0) {
if (index || index === 0) {
_${detailName} = this.layoutData[`${detailName}<#noparse>_${index}</#noparse>`];
_${detailName} = this.layoutData[`${detailName}<#noparse>_${index}</#noparse>`];
} else {
_${detailName} = this.layoutData['${detailName}'];
}
}
</#list>
</#list>
</#if>
</#if>
...
@@ -73,11 +68,9 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
...
@@ -73,11 +68,9 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
let ret = false;
let ret = false;
<#if ITEMENABLE.getRelatedItemNames()??>
<#if ITEMENABLE.getRelatedItemNames()??>
<#list ITEMENABLE.getRelatedItemNames() as detailName>
<#list ITEMENABLE.getRelatedItemNames() as detailName>
let _${detailName} =
''
;
let _${detailName} =
this.layoutData['${detailName}']
;
if (index || index === 0) {
if (index || index === 0) {
_${detailName} = this.layoutData[`${detailName}<#noparse>_${index}</#noparse>`];
_${detailName} = this.layoutData[`${detailName}<#noparse>_${index}</#noparse>`];
} else {
_${detailName} = this.layoutData['${detailName}'];
}
}
</#list>
</#list>
</#if>
</#if>
...
@@ -97,11 +90,9 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
...
@@ -97,11 +90,9 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
let ret = false;
let ret = false;
<#if PANELVISIBLE.getRelatedItemNames()??>
<#if PANELVISIBLE.getRelatedItemNames()??>
<#list PANELVISIBLE.getRelatedItemNames() as detailName>
<#list PANELVISIBLE.getRelatedItemNames() as detailName>
let _${detailName} =
''
;
let _${detailName} =
this.layoutData['${detailName}']
;
if (index || index === 0) {
if (index || index === 0) {
_${detailName} = this.layoutData[`${detailName}<#noparse>_${index}</#noparse>`];
_${detailName} = this.layoutData[`${detailName}<#noparse>_${index}</#noparse>`];
} else {
_${detailName} = this.layoutData['${detailName}'];
}
}
</#list>
</#list>
</#if>
</#if>
...
@@ -327,7 +318,7 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
...
@@ -327,7 +318,7 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
* @public
* @public
* @memberof ${srfclassname('${item.name}')}Base
* @memberof ${srfclassname('${item.name}')}Base
*/
*/
public isLayoutLoadding: boolean =
fals
e;
public isLayoutLoadding: boolean =
tru
e;
/**
/**
* 布局面板数据
* 布局面板数据
...
@@ -371,10 +362,10 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
...
@@ -371,10 +362,10 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
* @public
* @public
* @memberof ${srfclassname('${item.name}')}Base
* @memberof ${srfclassname('${item.name}')}Base
*/
*/
public async initLayoutItem(layoutModelItem: any, index
: number = 0
) {
public async initLayoutItem(layoutModelItem: any, index
?: number
) {
const { name } = layoutModelItem;
const { name } = layoutModelItem;
const layoutModelDetail = Util.getLayoutItemInstance(layoutModelItem);
const layoutModelDetail = Util.getLayoutItemInstance(layoutModelItem);
if (!
index
) {
if (!
(index || index === 0)
) {
await layoutModelDetail.load(this.context, this.viewparams);
await layoutModelDetail.load(this.context, this.viewparams);
this.$set(this.layoutModelDetails, name, layoutModelDetail);
this.$set(this.layoutModelDetails, name, layoutModelDetail);
this.$set(this.layoutData, name, layoutModelDetail.getData());
this.$set(this.layoutData, name, layoutModelDetail.getData());
...
@@ -401,7 +392,7 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
...
@@ -401,7 +392,7 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
for (let i = 0; i < layoutModelDetail.details.length; i++) {
for (let i = 0; i < layoutModelDetail.details.length; i++) {
const key = layoutModelDetail.details[i];
const key = layoutModelDetail.details[i];
if (this.layoutItems[key]) {
if (this.layoutItems[key]) {
await this.initLayoutItem(this.layoutItems[key],index);
await this.initLayoutItem(this.layoutItems[key],
index);
}
}
}
}
}
}
...
...
@VIEW/@MACRO/VIEW_HEADER-BASE.vue.ftl
浏览文件 @
b234fea8
...
@@ -331,12 +331,13 @@ ${P.getCtrlCode('toolbar', 'CONTROL.vue').code}
...
@@ -331,12 +331,13 @@ ${P.getCtrlCode('toolbar', 'CONTROL.vue').code}
* @memberof ${srfclassname('${view.name}')}Base
* @memberof ${srfclassname('${view.name}')}Base
*/
*/
public handleValueChange(args: { name: string, value: any }, index?: number) {
public handleValueChange(args: { name: string, value: any }, index?: number) {
if (!args || !args.name || Object.is(args.name, '') || !this.layoutData.hasOwnProperty(args.name)) {
const { name, value } = args;
<#noparse>let fullName = (index || index === 0) ? `${name}_${index}` : name;</#noparse>
if (!fullName || !this.layoutData.hasOwnProperty(fullName)) {
return;
return;
}
}
const {name,value} = args;
this.layoutData[fullName] = value;
this.layoutData[name] = value;
this.layoutModelDetails[fullName].setData(value);
this.layoutModelDetails[name].setData(value);
this.panelLogic(name, index);
this.panelLogic(name, index);
this.computeButtonAuthState();
this.computeButtonAuthState();
}
}
...
...
@VIEW/@MACRO/VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_RENDER.ftl
浏览文件 @
b234fea8
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
codelistType="${codelist.getCodeListType()}"
codelistType="${codelist.getCodeListType()}"
</#if>
</#if>
placeholder=<#if panelDetail.getPlaceHolder()??>'${panelDetail.getPlaceHolder()}'<#else>'请选择...'</#if>
placeholder=<#if panelDetail.getPlaceHolder()??>'${panelDetail.getPlaceHolder()}'<#else>'请选择...'</#if>
@change="(value) => handleValueChange({ name:
<#if isMultiData == true >`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`<#else>'${panelDetail.name}'</#if>, value
}<#if isMultiData == true >, `<#noparse>${slotProps.data.index}</#noparse>`</#if>)">
@change="(value) => handleValueChange({ name:
'${panelDetail.name}', value
}<#if isMultiData == true >, `<#noparse>${slotProps.data.index}</#noparse>`</#if>)">
</dropdown-list>
</dropdown-list>
<#elseif panelDetail.getPSEditor().getEditorType() == 'NUMBER'>
<#elseif panelDetail.getPSEditor().getEditorType() == 'NUMBER'>
<input-box
<input-box
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
:disabled=<#if isMultiData == true >"layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`] ? layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`].disabled : false"<#else>"layoutModelDetails.${panelDetail.getName()} ? layoutModelDetails.${panelDetail.getName()}.disabled : false"</#if>
:disabled=<#if isMultiData == true >"layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`] ? layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`].disabled : false"<#else>"layoutModelDetails.${panelDetail.getName()} ? layoutModelDetails.${panelDetail.getName()}.disabled : false"</#if>
<#if panelDetail.getUnitName?? && panelDetail.getUnitName()??>unit="${panelDetail.getUnitName()}"</#if>
<#if panelDetail.getUnitName?? && panelDetail.getUnitName()??>unit="${panelDetail.getUnitName()}"</#if>
<#if panelDetail.getPlaceHolder()??>placeholder="${panelDetail.getPlaceHolder()}"</#if>
<#if panelDetail.getPlaceHolder()??>placeholder="${panelDetail.getPlaceHolder()}"</#if>
@change="(value) => handleValueChange({ name:
<#if isMultiData == true >`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`<#else>'${panelDetail.name}'</#if>, value
}<#if isMultiData == true >, `<#noparse>${slotProps.data.index}</#noparse>`</#if>)">
@change="(value) => handleValueChange({ name:
'${panelDetail.name}', value
}<#if isMultiData == true >, `<#noparse>${slotProps.data.index}</#noparse>`</#if>)">
</input-box>
</input-box>
<#elseif panelDetail.getPSEditor().getEditorType() == 'PASSWORD'>
<#elseif panelDetail.getPSEditor().getEditorType() == 'PASSWORD'>
<input-box
<input-box
...
@@ -206,7 +206,7 @@
...
@@ -206,7 +206,7 @@
:itemValue=<#if isMultiData == true >"layoutData[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`]"<#else>"layoutData.${panelDetail.getName()}"</#if>
:itemValue=<#if isMultiData == true >"layoutData[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`]"<#else>"layoutData.${panelDetail.getName()}"</#if>
:disabled=<#if isMultiData == true >"layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`] ? layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`].disabled : false"<#else>"layoutModelDetails.${panelDetail.getName()} ? layoutModelDetails.${panelDetail.getName()}.disabled : false"</#if>
:disabled=<#if isMultiData == true >"layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`] ? layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`].disabled : false"<#else>"layoutModelDetails.${panelDetail.getName()} ? layoutModelDetails.${panelDetail.getName()}.disabled : false"</#if>
<#if panelDetail.getPlaceHolder()??>placeholder="${panelDetail.getPlaceHolder()}"</#if>
<#if panelDetail.getPlaceHolder()??>placeholder="${panelDetail.getPlaceHolder()}"</#if>
@change="(value) => handleValueChange({ name:
<#if isMultiData == true >`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`<#else>'${panelDetail.name}'</#if>, value
}<#if isMultiData == true >, `<#noparse>${slotProps.data.index}</#noparse>`</#if>)">
@change="(value) => handleValueChange({ name:
'${panelDetail.name}', value
}<#if isMultiData == true >, `<#noparse>${slotProps.data.index}</#noparse>`</#if>)">
</input-box>
</input-box>
<#elseif panelDetail.getPSEditor().getEditorType() == 'TEXTBOX'>
<#elseif panelDetail.getPSEditor().getEditorType() == 'TEXTBOX'>
<input-box
<input-box
...
@@ -215,7 +215,7 @@
...
@@ -215,7 +215,7 @@
:itemValue=<#if isMultiData == true >"layoutData[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`]"<#else>"layoutData.${panelDetail.getName()}"</#if>
:itemValue=<#if isMultiData == true >"layoutData[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`]"<#else>"layoutData.${panelDetail.getName()}"</#if>
:disabled=<#if isMultiData == true >"layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`] ? layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`].disabled : false"<#else>"layoutModelDetails.${panelDetail.getName()} ? layoutModelDetails.${panelDetail.getName()}.disabled : false"</#if>
:disabled=<#if isMultiData == true >"layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`] ? layoutModelDetails[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`].disabled : false"<#else>"layoutModelDetails.${panelDetail.getName()} ? layoutModelDetails.${panelDetail.getName()}.disabled : false"</#if>
<#if panelDetail.getPlaceHolder()??>placeholder="${panelDetail.getPlaceHolder()}"</#if>
<#if panelDetail.getPlaceHolder()??>placeholder="${panelDetail.getPlaceHolder()}"</#if>
@change="(value) => handleValueChange({ name:
<#if isMultiData == true >`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`<#else>'${panelDetail.name}'</#if>, value
}<#if isMultiData == true >, `<#noparse>${slotProps.data.index}</#noparse>`</#if>)">
@change="(value) => handleValueChange({ name:
'${panelDetail.name}', value
}<#if isMultiData == true >, `<#noparse>${slotProps.data.index}</#noparse>`</#if>)">
</input-box>
</input-box>
<#else>
<#else>
<app-span
<app-span
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录