提交 d5a144d9 编写于 作者: tony001's avatar tony001

优化拷贝功能

上级 c9e4c5c0
......@@ -10,7 +10,7 @@
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
<#-- if (args.length === 0) {
return;
}
const _this: any = this;
......@@ -28,5 +28,20 @@
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} -->
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
<#if appde??>Object.assign(data, { ${appde.codeName?lower_case}: args[0].${appde.codeName?lower_case} });</#if>
}
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
Object.assign(this.viewparams,{copymode:true});
}
}
\ No newline at end of file
......@@ -13,7 +13,7 @@
* @param {*} [xData]
* @memberof ${srfclassname('${view.name}')}
*/
public ${item.name}(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
public ${item.name}(args: any[],fullargs?:any,params?: any, $event?: any, xData?: any) {
<#if item.getPSControlContainer().getViewType??>
if(!this.viewDefaultUsage){
if(Object.is(this.navModel,"route")){
......@@ -156,6 +156,9 @@
<#elseif dataview.getOpenMode() == 'INDEXVIEWTAB' || dataview.getOpenMode() == ''>
<#-- 打开顶级分页视图 -->
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
<#if dataview.getViewType() == "DEWFDYNAEDITVIEW" >
......@@ -168,11 +171,17 @@
<#elseif dataview.getOpenMode() == 'POPUPAPP'>
<#-- 打开独立程序弹出 -->
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
window.open('./#'+routePath, '_blank');
<#elseif dataview.getOpenMode() = 'POPUPMODAL'>
<#-- 打开模态 -->
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(view, tempContext, data);
container.subscribe((result: any) => {
......@@ -195,6 +204,9 @@
<#elseif dataview.getOpenMode()?index_of('DRAWER') == 0>
<#-- 打开抽屉 -->
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
......@@ -218,6 +230,9 @@
<#elseif dataview.getOpenMode() == 'POPOVER'>
<#-- 打开气泡卡片 -->
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openPopOver = (view: any, data: any) => {
let container: Subject<any> = this.$apppopover.openPop($event, view, tempContext, data);
container.subscribe((result: any) => {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册