Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
e8ce9686
提交
e8ce9686
编写于
9月 28, 2020
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化导航类部件工具栏状态逻辑
上级
764d69e2
变更
4
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
138 行增加
和
20 行删除
+138
-20
CONTROL-BASE.vue.ftl
@CONTROL/卡片视图导航/CONTROL-BASE.vue.ftl
+34
-5
CONTROL-BASE.vue.ftl
@CONTROL/日历导航/CONTROL-BASE.vue.ftl
+34
-5
CONTROL-BASE.vue.ftl
@CONTROL/树视图导航栏/CONTROL-BASE.vue.ftl
+36
-5
CONTROL-BASE.vue.ftl
@CONTROL/表格导航/CONTROL-BASE.vue.ftl
+34
-5
未找到文件。
@CONTROL/卡片视图导航/CONTROL-BASE.vue.ftl
浏览文件 @
e8ce9686
...
...
@@ -489,6 +489,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) {
this.calcToolbarItemState(true);
return ;
}
const arg:any = args[0];
...
...
@@ -519,6 +520,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam});
this.calcToolbarItemState(false);
this.$forceUpdate();
}
...
...
@@ -532,9 +534,38 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_load(args: any[], tag?: string, $event2?: any): void {
this.calcToolbarItemState(true);
this.$emit('load',args);
}
/**
* 设置导航区工具栏禁用状态
*
* @param {boolean} state
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public calcToolbarItemState(state: boolean) {
let _this: any = this;
const models:any = _this.${ctrl.getCodeName()?lower_case}_toolbarModels;
if (models) {
for (const key in models) {
if (!models.hasOwnProperty(key)) {
return;
}
const _item = models[key];
if (_item.uiaction && (Object.is(_item.uiaction.target, 'SINGLEKEY') || Object.is(_item.uiaction.target, 'MULTIKEY'))) {
_item.disabled = state;
}
_item.visabled = true;
if (_item.noprivdisplaymode && _item.noprivdisplaymode === 6) {
_item.visabled = false;
}
}
this.calcNavigationToolbarState();
}
}
/**
* 计算导航工具栏权限状态
*
...
...
@@ -543,17 +574,15 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
public calcNavigationToolbarState(){
let _this: any = this;
// 界面行为
<#assign ModelsName>${ctrl.getCodeName()?lower_case}_toolbarModels</#assign>
if(_this.${ModelsName}){
<#if ctrl.getPSAppDataEntity?? && ctrl.getPSAppDataEntity()??>
<#assign curAppEntity = ctrl.getPSAppDataEntity() />
const curUIService:${srfclassname('${curAppEntity.getCodeName()}')}UIService = new ${srfclassname('${curAppEntity.getCodeName()}')}UIService();
<#if ctrl.getCodeName?? && ctrl.getCodeName()??>
<#assign ModelsName>${ctrl.getCodeName()?lower_case}_toolbarModels</#assign>
if(_this.${ModelsName}){
ViewTool.calcActionItemAuthState({},_this.${ModelsName},curUIService);
}
</#if>
</#if>
}
}
/**
* 执行搜索
...
...
@CONTROL/日历导航/CONTROL-BASE.vue.ftl
浏览文件 @
e8ce9686
...
...
@@ -367,6 +367,7 @@
let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) {
this.calcToolbarItemState(true);
return ;
}
const arg:any = args[0];
...
...
@@ -402,6 +403,7 @@
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName[arg.itemType] }, context:tempContext,viewparam:tempViewParam });
this.calcToolbarItemState(false);
this.$emit('selectionchange',args);
this.$forceUpdate();
}
...
...
@@ -412,9 +414,38 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_load(args:any, tag?: string, $event2?: any){
this.calcToolbarItemState(true);
this.$emit('load',args);
}
/**
* 设置导航区工具栏禁用状态
*
* @param {boolean} state
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public calcToolbarItemState(state: boolean) {
let _this: any = this;
const models:any = _this.${ctrl.getCodeName()?lower_case}_toolbarModels;
if (models) {
for (const key in models) {
if (!models.hasOwnProperty(key)) {
return;
}
const _item = models[key];
if (_item.uiaction && (Object.is(_item.uiaction.target, 'SINGLEKEY') || Object.is(_item.uiaction.target, 'MULTIKEY'))) {
_item.disabled = state;
}
_item.visabled = true;
if (_item.noprivdisplaymode && _item.noprivdisplaymode === 6) {
_item.visabled = false;
}
}
this.calcNavigationToolbarState();
}
}
/**
* 计算导航工具栏权限状态
*
...
...
@@ -423,17 +454,15 @@
public calcNavigationToolbarState(){
let _this: any = this;
// 界面行为
<#assign ModelsName>${ctrl.getCodeName()?lower_case}_toolbarModels</#assign>
if(_this.${ModelsName}){
<#if ctrl.getPSAppDataEntity?? && ctrl.getPSAppDataEntity()??>
<#assign curAppEntity = ctrl.getPSAppDataEntity() />
const curUIService:${srfclassname('${curAppEntity.getCodeName()}')}UIService = new ${srfclassname('${curAppEntity.getCodeName()}')}UIService();
<#if ctrl.getCodeName?? && ctrl.getCodeName()??>
<#assign ModelsName>${ctrl.getCodeName()?lower_case}_toolbarModels</#assign>
if(_this.${ModelsName}){
ViewTool.calcActionItemAuthState({},_this.${ModelsName},curUIService);
}
</#if>
</#if>
}
}
/**
* 执行搜索
...
...
@CONTROL/树视图导航栏/CONTROL-BASE.vue.ftl
浏览文件 @
e8ce9686
...
...
@@ -208,15 +208,18 @@
*/
public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
if (args.length === 0) {
this.calcToolbarItemState(true);
return ;
}
const arg:any = args[0];
if (!arg.id) {
this.calcToolbarItemState(true);
return;
}
const nodetype = arg.id.split(';')[0];
const refview = this.getExpItemView({ nodetype: nodetype });
if (!refview) {
this.calcToolbarItemState(true);
return;
}
let tempViewparam:any = {};
...
...
@@ -260,6 +263,7 @@
this.selection = {};
Object.assign(this.selection, { view: { viewname: refview.viewname } });
Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext});
this.calcToolbarItemState(false);
this.$forceUpdate();
}
...
...
@@ -273,6 +277,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_load(args: any[], tag?: string, $event2?: any): void {
this.calcToolbarItemState(true);
this.$emit('load',args);
}
...
...
@@ -414,6 +419,34 @@
this.$emit('load', $event);
}
/**
* 设置导航区工具栏禁用状态
*
* @param {boolean} state
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public calcToolbarItemState(state: boolean) {
let _this: any = this;
const models:any = _this.${ctrl.getCodeName()?lower_case}_toolbarModels;
if (models) {
for (const key in models) {
if (!models.hasOwnProperty(key)) {
return;
}
const _item = models[key];
if (_item.uiaction && (Object.is(_item.uiaction.target, 'SINGLEKEY') || Object.is(_item.uiaction.target, 'MULTIKEY'))) {
_item.disabled = state;
}
_item.visabled = true;
if (_item.noprivdisplaymode && _item.noprivdisplaymode === 6) {
_item.visabled = false;
}
}
this.calcNavigationToolbarState();
}
}
/**
* 计算导航工具栏权限状态
*
...
...
@@ -422,17 +455,15 @@
public calcNavigationToolbarState(){
let _this: any = this;
// 界面行为
<#assign ModelsName>${ctrl.getCodeName()?lower_case}_toolbarModels</#assign>
if(_this.${ModelsName}){
<#if ctrl.getPSAppDataEntity?? && ctrl.getPSAppDataEntity()??>
<#assign curAppEntity = ctrl.getPSAppDataEntity() />
const curUIService:${srfclassname('${curAppEntity.getCodeName()}')}UIService = new ${srfclassname('${curAppEntity.getCodeName()}')}UIService();
<#if ctrl.getCodeName?? && ctrl.getCodeName()??>
<#assign ModelsName>${ctrl.getCodeName()?lower_case}_toolbarModels</#assign>
if(_this.${ModelsName}){
ViewTool.calcActionItemAuthState({},_this.${ModelsName},curUIService);
}
</#if>
</#if>
}
}
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
...
...
@CONTROL/表格导航/CONTROL-BASE.vue.ftl
浏览文件 @
e8ce9686
...
...
@@ -490,6 +490,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) {
this.calcToolbarItemState(true);
return ;
}
const arg:any = args[0];
...
...
@@ -520,6 +521,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, context:tempContext,viewparam:tempViewParam });
this.calcToolbarItemState(false);
this.$forceUpdate();
}
...
...
@@ -529,9 +531,38 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_load(args:any, tag?: string, $event2?: any){
this.calcToolbarItemState(true);
this.$emit('load',args);
}
/**
* 设置导航区工具栏禁用状态
*
* @param {boolean} state
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public calcToolbarItemState(state: boolean) {
let _this: any = this;
const models:any = _this.${ctrl.getCodeName()?lower_case}_toolbarModels;
if (models) {
for (const key in models) {
if (!models.hasOwnProperty(key)) {
return;
}
const _item = models[key];
if (_item.uiaction && (Object.is(_item.uiaction.target, 'SINGLEKEY') || Object.is(_item.uiaction.target, 'MULTIKEY'))) {
_item.disabled = state;
}
_item.visabled = true;
if (_item.noprivdisplaymode && _item.noprivdisplaymode === 6) {
_item.visabled = false;
}
}
this.calcNavigationToolbarState();
}
}
/**
* 计算导航工具栏权限状态
*
...
...
@@ -540,17 +571,15 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
public calcNavigationToolbarState(){
let _this: any = this;
// 界面行为
<#assign ModelsName>${ctrl.getCodeName()?lower_case}_toolbarModels</#assign>
if(_this.${ModelsName}){
<#if ctrl.getPSAppDataEntity?? && ctrl.getPSAppDataEntity()??>
<#assign curAppEntity = ctrl.getPSAppDataEntity() />
const curUIService:${srfclassname('${curAppEntity.getCodeName()}')}UIService = new ${srfclassname('${curAppEntity.getCodeName()}')}UIService();
<#if ctrl.getCodeName?? && ctrl.getCodeName()??>
<#assign ModelsName>${ctrl.getCodeName()?lower_case}_toolbarModels</#assign>
if(_this.${ModelsName}){
ViewTool.calcActionItemAuthState({},_this.${ModelsName},curUIService);
}
</#if>
</#if>
}
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录