提交 1ffb659b 编写于 作者: JunZai's avatar JunZai

update

上级 e69aba34
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
</template> </template>
<#assign import_block> <#assign import_block>
import GanttElastic from "ibiz-gantt-elastic/src/GanttElastic.vue"; import GanttElastic from "ibiz-gantt-elastic/src/GanttElastic.vue";
import ganttElasticHeader from "gantt-elastic-header/src/Header.vue";
</#assign> </#assign>
<#assign component_block> <#assign component_block>
GanttElastic, GanttElastic,
ganttElasticHeader,
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
...@@ -295,8 +293,49 @@ ganttElasticHeader, ...@@ -295,8 +293,49 @@ ganttElasticHeader,
* @returns * @returns
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public taskClick($event: any) { public taskClick({event, data}: {event: any, data: any}) {
console.log($event); let view: any = {};
let _context: any = Object.assign({},this.context);
switch(data.itemType) {
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<#if calendarItem.getPSAppDataEntity()??>
<#assign _appde = calendarItem.getPSAppDataEntity() />
case "${calendarItem.getItemType()}":
_context.${_appde.getCodeName()?lower_case} = event.${_appde.getCodeName()?lower_case};
view = this.getEditView("${_appde.getCodeName()?lower_case}");
break;
</#if>
</#list>
</#if>
}
// 导航栏中不需要打开视图,只要抛出选中数据
if(this.isSelectFirstDefault){
_context.itemType = itemType;
this.selections = [_context];
this.$emit("selectionchange",[_context]);
return;
}
// 根据打开模式打开视图
if (Object.is(view.placement, 'INDEXVIEWTAB') || Object.is(view.placement, '')) {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, this.context, view.deResParameters, view.parameters, [JSON.parse(JSON.stringify(_context))] , JSON.parse(JSON.stringify(this.viewparams)));
this.$router.push(routePath);
} else {
let container: Subject<any> = new Subject();
if (Object.is(view.placement, 'POPOVER')) {
container = this.$apppopover.openPop(isOriginData ? $event2 : $event.jsEvent, view,JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
} else if (Object.is(view.placement, 'POPUPMODAL')) {
container = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
} else if (view.placement.startsWith('DRAWER')) {
container = this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
}
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
_this.refresh();
});
}
} }
<#ibizinclude> <#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册