提交 22bdaf55 编写于 作者: shanwewei's avatar shanwewei

Merge branch 'dev' of http://demo.ibizlab.cn/vue_v2/vue_r6 into dev

...@@ -177,6 +177,21 @@ ...@@ -177,6 +177,21 @@
} }
Object.assign(this.selection, item); Object.assign(this.selection, item);
} }
<#-- 定义宏 -->
<#macro getParentmode PSDEDataRelation dritemName>
<#compress>
<#if PSDEDataRelation.getPSDEDRDetails?? && PSDEDataRelation.getPSDEDRDetails()??>
<#assign deDrDetails = PSDEDataRelation.getPSDEDRDetails() />
<#list deDrDetails as deDrDetail>
<#if deDrDetail.getName() == dritemName && deDrDetail.getPSDEDRItem?? && deDrDetail.getPSDEDRItem()?? && deDrDetail.getPSDEDRItem().getParentDataJO()??>
${deDrDetail.getPSDEDRItem().getParentDataJO()}
</#if>
</#list>
</#if>
</#compress>
</#macro>
<#list ctrl.getRootItem().getAllItems() as dritem> <#list ctrl.getRootItem().getAllItems() as dritem>
/** /**
...@@ -216,7 +231,7 @@ ...@@ -216,7 +231,7 @@
viewcontainer2: true, viewcontainer2: true,
}, },
props: { props: {
viewdata: JSON.stringify({ srfparentdata: this.selection.data }), viewdata: JSON.stringify({ srfparentdata: this.selection.data ,srfparentmode:<@getParentmode ctrl.getPSDEDataRelation() '${dritem.getId()}'/>}),
}, },
key: this.$util.createUUID(), key: this.$util.createUUID(),
}) })
......
...@@ -36,10 +36,37 @@ ...@@ -36,10 +36,37 @@
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
if (!xData || !(xData.refresh instanceof Function)) { //处理参数
if(result.datas && result.datas.length == 0){
return; return;
} }
xData.refresh(result.datas); let tempData:any = {};
let keys = '';
const viewParam:any = {};
if (_this.srfparentdata) {
Object.assign(tempData, _this.srfparentdata,JSON.parse(this.viewdata).srfparentmode );
}
Object.assign(viewParam,{ srfparentdata: tempData});
result.datas.forEach((record:any) => {
let key = record.srfkey;
if (!Object.is(keys, '')) {
keys += ';';
}
keys += key;
});
Object.assign(viewParam,{srfkeys:keys});
// 发送批处理请求
const url:string ="${app.getPKGCodeName()?lower_case}/${de.getPSSystemModule().codeName?lower_case}/${de.codeName?lower_case}/addbatch";
this.$http.post(url,viewParam).then((response:any) =>{
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
})
}); });
} }
const view: any = { const view: any = {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册