add:历史节点显示颜色
This commit is contained in:
@@ -31,7 +31,7 @@ import {
|
||||
sequence,
|
||||
registerSubProcess,
|
||||
} from '../../view_flow/registerNode'
|
||||
|
||||
import curdExecution from './curdExecution'
|
||||
//const demoData = require('./data.json')
|
||||
|
||||
export default {
|
||||
@@ -167,10 +167,22 @@ export default {
|
||||
} else {
|
||||
this.lf.render(JSON.parse(json))
|
||||
}
|
||||
const proc_inst_id = row.proc_inst_id;
|
||||
|
||||
this.queryHisActivityId(proc_inst_id)
|
||||
const nodeModel = this.lf.getNodeModelById(row.activity_id);
|
||||
nodeModel.setStyle("stroke", "red")
|
||||
nodeModel.setStyle("stroke-width", "2.5")
|
||||
},
|
||||
queryHisActivityId(proc_inst_id) {
|
||||
curdExecution.queryHisActivityId(proc_inst_id).then(res => {
|
||||
res.forEach((activity_id) => {
|
||||
const nodeModel = this.lf.getNodeModelById(activity_id);
|
||||
nodeModel.setStyle("stroke", "red")
|
||||
nodeModel.setStyle("stroke-width", "1")
|
||||
});
|
||||
})
|
||||
},
|
||||
closeDialog() {
|
||||
this.$data.dialogVisible = false
|
||||
},
|
||||
|
||||
@@ -89,6 +89,13 @@ export function flowConfirm(inst_id) {
|
||||
})
|
||||
}
|
||||
|
||||
export function queryHisActivityId(proc_inst_id) {
|
||||
return request({
|
||||
url: '/api/bpmnExecution/queryHisActivityId/' + proc_inst_id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
@@ -101,5 +108,6 @@ export default {
|
||||
getDeploymentById,
|
||||
getDtl,
|
||||
changeActive,
|
||||
flowConfirm
|
||||
flowConfirm,
|
||||
queryHisActivityId
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="task_type">
|
||||
<el-select @change="formData.skipExpression = ''" clearable v-model="formData.category" placeholder="请选择" style="width: 370px;">
|
||||
<el-select @change="() => { formData.skipExpression = ''; formData.auxParam = ''; }" clearable v-model="formData.category" placeholder="请选择" style="width: 370px;">
|
||||
<el-option
|
||||
v-for="item in taskTypes"
|
||||
:key="item.value"
|
||||
|
||||
@@ -5,7 +5,7 @@ class ResizableDiamondModel extends DiamondResize.model {
|
||||
getTextStyle() {
|
||||
const style = super.getTextStyle();
|
||||
const height = super.height;
|
||||
style.fontSize = height / 10;
|
||||
style.fontSize = height / 20;
|
||||
return style;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class ResizableDiamondView extends DiamondResize.view {
|
||||
const {stroke} = style;
|
||||
const iconWidth = width; // 图标宽度
|
||||
const iconHeight = height; // 图标高度
|
||||
const iconX = x - iconWidth / 2; // 调整图标位置的X坐标
|
||||
const iconX = x - iconWidth / 2 + 3.5; // 调整图标位置的X坐标
|
||||
const iconY = y - iconHeight / 2; // 调整图标位置的Y坐标
|
||||
return h(
|
||||
'svg',
|
||||
|
||||
@@ -5,7 +5,7 @@ class ResizableDiamondModel extends DiamondResize.model {
|
||||
getTextStyle() {
|
||||
const style = super.getTextStyle();
|
||||
const height = super.height;
|
||||
style.fontSize = height / 10;
|
||||
style.fontSize = height / 20;
|
||||
return style;
|
||||
}
|
||||
|
||||
@@ -61,10 +61,10 @@ class ResizableDiamondView extends DiamondResize.view {
|
||||
const {x, y, width, height} = model;
|
||||
const style = model.getNodeStyle();
|
||||
const {stroke} = style;
|
||||
const iconWidth = width / 3; // 图标宽度
|
||||
const iconHeight = height / 3; // 图标高度
|
||||
const iconX = x - iconWidth; // 调整图标位置的X坐标
|
||||
const iconY = y - iconHeight; // 调整图标位置的Y坐标
|
||||
const iconWidth = width; // 图标宽度
|
||||
const iconHeight = height; // 图标高度
|
||||
const iconX = x - iconWidth / 2 + 3.5; // 调整图标位置的X坐标
|
||||
const iconY = y - iconHeight / 2; // 调整图标位置的Y坐标
|
||||
return h(
|
||||
'svg',
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user