Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz4jVue
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
iBiz4jVue
提交
f316615a
提交
f316615a
编写于
6月 28, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
应用级状态数据同步
上级
9d140ba5
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
40 行增加
和
2 行删除
+40
-2
CONTROL_HEADER-BASE.vue.ftl
@CONTROL/@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
+1
-0
CONTROL-BASE.vue.ftl
@CONTROL/表单/CONTROL-BASE.vue.ftl
+17
-2
CONTROL-BASE.vue.ftl
@CONTROL/表格/CONTROL-BASE.vue.ftl
+22
-0
未找到文件。
@CONTROL/@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
浏览文件 @
f316615a
...
@@ -5,6 +5,7 @@ import { Subject, Subscription } from 'rxjs';
...
@@ -5,6 +5,7 @@ import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util } from '@/utils';
import { UIActionTool,Util } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service";
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
<#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??>
<#if singleCounterRef.getPSAppCounter()??>
...
...
@CONTROL/表单/CONTROL-BASE.vue.ftl
浏览文件 @
f316615a
...
@@ -895,6 +895,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
...
@@ -895,6 +895,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
const data = response.data;
const data = response.data;
this.onFormLoad(data,'load');
this.onFormLoad(data,'load');
this.$emit('load', data);
this.$emit('load', data);
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
this.$nextTick(() => {
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
this.formState.next({ type: 'load', data: data });
});
});
...
@@ -942,6 +945,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
...
@@ -942,6 +945,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.resetDraftFormStates();
this.resetDraftFormStates();
this.onFormLoad(data,'loadDraft');
this.onFormLoad(data,'loadDraft');
this.$emit('load', data);
this.$emit('load', data);
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
this.$nextTick(() => {
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
this.formState.next({ type: 'load', data: data });
});
});
...
@@ -1000,7 +1006,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
...
@@ -1000,7 +1006,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.onFormLoad(data,'autoSave');
this.onFormLoad(data,'autoSave');
this.$emit('save', data);
this.$emit('save', data);
<#if ctrl.getControlType() == 'FORM'>
<#if ctrl.getControlType() == 'FORM'>
this.$store.dispatch('viewaction/datasaved', { viewtag: this.viewtag
});
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data
});
</#if>
</#if>
this.$nextTick(() => {
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
this.formState.next({ type: 'save', data: data });
...
@@ -1072,7 +1078,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
...
@@ -1072,7 +1078,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.onFormLoad(data,'save');
this.onFormLoad(data,'save');
this.$emit('save', data);
this.$emit('save', data);
<#if ctrl.getControlType() == 'FORM'>
<#if ctrl.getControlType() == 'FORM'>
this.$store.dispatch('viewaction/datasaved', { viewtag: this.viewtag
});
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data
});
</#if>
</#if>
this.$nextTick(() => {
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
this.formState.next({ type: 'save', data: data });
...
@@ -1122,6 +1128,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
...
@@ -1122,6 +1128,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.formState.next({ type: 'remove', data: data });
this.formState.next({ type: 'remove', data: data });
this.data.ismodify = false;
this.data.ismodify = false;
this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + ' 删除成功!' });
this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + ' 删除成功!' });
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
resolve(response);
resolve(response);
}
}
}).catch((error: any) => {
}).catch((error: any) => {
...
@@ -1219,6 +1228,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
...
@@ -1219,6 +1228,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
// 保存完成UI处理
// 保存完成UI处理
this.onFormLoad(arg,'save');
this.onFormLoad(arg,'save');
this.$emit('save', arg);
this.$emit('save', arg);
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
this.$nextTick(() => {
this.$nextTick(() => {
this.formState.next({ type: 'save', data: arg });
this.formState.next({ type: 'save', data: arg });
});
});
...
@@ -1306,6 +1318,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
...
@@ -1306,6 +1318,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.fillForm(_data,'updateFormItem');
this.fillForm(_data,'updateFormItem');
this.formLogic({ name: '', newVal: null, oldVal: null });
this.formLogic({ name: '', newVal: null, oldVal: null });
this.dataChang.next(JSON.stringify(this.data));
this.dataChang.next(JSON.stringify(this.data));
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
this.$nextTick(() => {
this.$nextTick(() => {
this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: _data });
this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: _data });
});
});
...
...
@CONTROL/表格/CONTROL-BASE.vue.ftl
浏览文件 @
f316615a
...
@@ -116,6 +116,15 @@ import { FormItemModel } from '@/model/form-detail';
...
@@ -116,6 +116,15 @@ import { FormItemModel } from '@/model/form-detail';
*/
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appStateEvent: Subscription | undefined;
/**
/**
* 获取多项数据
* 获取多项数据
*
*
...
@@ -1099,6 +1108,16 @@ import { FormItemModel } from '@/model/form-detail';
...
@@ -1099,6 +1108,16 @@ import { FormItemModel } from '@/model/form-detail';
}
}
});
});
}
}
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"${ctrl.getPSAppDataEntity().getCodeName()}")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh([data]);
}
})
}
}
}
/**
/**
...
@@ -1119,6 +1138,9 @@ import { FormItemModel } from '@/model/form-detail';
...
@@ -1119,6 +1138,9 @@ import { FormItemModel } from '@/model/form-detail';
if (this.viewStateEvent) {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
this.viewStateEvent.unsubscribe();
}
}
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
<#if destroyed_block??>
<#if destroyed_block??>
${destroyed_block}
${destroyed_block}
</#if>
</#if>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录