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

新增实体工作流动态导航表格工具栏

上级 7d137613
......@@ -47,4 +47,11 @@
margin-left: 4px;
}
}
}
.dewfdynaexpgridview{
>.view-card{
.ivu-card-extra{
top: 6px;
}
}
}
\ No newline at end of file
......@@ -2,8 +2,18 @@
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :disHover="true" :padding="0" :bordered="false">
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
<div slot="extra">
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600" v-for="(linkItem, index) in linkModel" :key="index">
<i-button @click="dynamic_toolbar_click(linkItem, $event)">
<span class='caption'>{{linkItem.sequenceFlowName}}</span>
</i-button>
<div slot='content'>{{linkItem.sequenceFlowName}}</div>
</tooltip>
</div>
</div>
<split id="${view.getCodeName()?lower_case}" v-model="split" mode="horizontal">
<div slot='left'>
<el-tree ref="tree" :data="wfStepModel" node-key="userTaskId" :highlight-current="true" :props="defaultProps" @node-click="handleNodeClick">
......
......@@ -29,7 +29,14 @@
* @type {any}
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public isSingleSelect:boolean = true;
public isSingleSelect:boolean = false;
/**
* 工具栏模型数据
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public linkModel:Array<any> = [];
/**
* 左侧树的默认配置
......@@ -73,6 +80,7 @@
if(this.curSelectedNode){
Object.assign(this.viewparams,{'userTaskId':this.curSelectedNode['userTaskId'],'processDefinitionKey':this.curSelectedNode['processDefinitionKey']});
this.setTreeNodeHighLight(this.curSelectedNode);
this.getWFLinkModel({'userTaskId':this.curSelectedNode['userTaskId'],'processDefinitionKey':this.curSelectedNode['processDefinitionKey']});
}
resolve(response.data);
}
......@@ -89,6 +97,37 @@
})
}
/**
* 获取工具栏按钮
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public getWFLinkModel(data:any){
this.appEntityService.getWFLinks(JSON.parse(JSON.stringify(this.context)),data,true).then((response:any) =>{
if (response && response.status === 200) {
this.linkModel = response.data;
}
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
}
});
}
/**
* 工具栏点击事件
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public dynamic_toolbar_click(linkItem:any, $event:any){
}
/**
* 左侧树选中节点
*
......@@ -99,6 +138,7 @@
this.curSelectedNode = data;
this.setTreeNodeHighLight(this.curSelectedNode);
Object.assign(this.viewparams,{'userTaskId':data['userTaskId'],'processDefinitionKey':data['processDefinitionKey']});
this.getWFLinkModel({'userTaskId':this.curSelectedNode['userTaskId'],'processDefinitionKey':this.curSelectedNode['processDefinitionKey']});
(this.$refs.searchform as any).onSearch();
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册