|
|
@@ -105,12 +105,12 @@ export function useAnalysis() {
|
|
|
const loadingAll = ref(false)
|
|
|
|
|
|
// 流程明细
|
|
|
- const instanceQuery = reactive({ pageNum: 1, pageSize: 10, processDefinitionId: undefined as number | undefined, processName: '', applicantName: '', currentNodeName: '' })
|
|
|
+ const instanceQuery = reactive({ pageNum: 1, pageSize: 10, processDefinitionId: undefined as number | undefined, processName: '', applicantName: '', currentNodeId: '' })
|
|
|
const instanceList = ref<FlowInstance[]>([])
|
|
|
const instanceTotal = ref(0)
|
|
|
const loadingInstanceList = ref(false)
|
|
|
const definitionList = ref<FlowDefinition[]>([])
|
|
|
- const currentNodeOptions = ref<string[]>([])
|
|
|
+ const currentNodeOptions = ref<{ id: string; name: string }[]>([])
|
|
|
|
|
|
const instanceDetailVisible = ref(false)
|
|
|
const instanceDetailId = ref(0)
|
|
|
@@ -296,7 +296,7 @@ export function useAnalysis() {
|
|
|
try {
|
|
|
currentNodeOptions.value = JSON.parse(def.flowJson)
|
|
|
.nodes.filter((n: any) => n.type !== 'start' && n.type !== 'end' && n.type !== 'condition' && n.type !== 'cc')
|
|
|
- .map((n: any) => n.name)
|
|
|
+ .map((n: any) => ({ id: n.id, name: n.name }))
|
|
|
} catch {
|
|
|
currentNodeOptions.value = []
|
|
|
}
|
|
|
@@ -391,7 +391,7 @@ export function useAnalysis() {
|
|
|
if (idx == null) return
|
|
|
const node = nodeList.value[idx]
|
|
|
if (!node) return
|
|
|
- instanceQuery.currentNodeName = node.nodeName
|
|
|
+ instanceQuery.currentNodeId = node.nodeId || ''
|
|
|
instanceQuery.processName = node.processName || ''
|
|
|
instanceQuery.pageNum = 1
|
|
|
loadInstanceList()
|
|
|
@@ -404,7 +404,7 @@ export function useAnalysis() {
|
|
|
}
|
|
|
|
|
|
function onInstanceProcessChange() {
|
|
|
- instanceQuery.currentNodeName = ''
|
|
|
+ instanceQuery.currentNodeId = ''
|
|
|
// 按名称或 ID 查找定义(StuckInstanceTable 切换时传 processName,顶栏切换时传 processDefinitionId)
|
|
|
const def = definitionList.value.find((d) => d.name === instanceQuery.processName)
|
|
|
|| definitionOptions.value.find((d) => d.name === instanceQuery.processName)
|
|
|
@@ -414,7 +414,7 @@ export function useAnalysis() {
|
|
|
try {
|
|
|
currentNodeOptions.value = JSON.parse(def.flowJson)
|
|
|
.nodes.filter((n: any) => n.type !== 'start' && n.type !== 'end' && n.type !== 'condition' && n.type !== 'cc')
|
|
|
- .map((n: any) => n.name)
|
|
|
+ .map((n: any) => ({ id: n.id, name: n.name }))
|
|
|
} catch {
|
|
|
currentNodeOptions.value = []
|
|
|
}
|
|
|
@@ -433,7 +433,7 @@ export function useAnalysis() {
|
|
|
processDefinitionId: instanceQuery.processDefinitionId,
|
|
|
definitionName: instanceQuery.processName || undefined,
|
|
|
applicantName: instanceQuery.applicantName || undefined,
|
|
|
- currentNodeName: instanceQuery.currentNodeName || undefined,
|
|
|
+ currentNodeId: instanceQuery.currentNodeId || undefined,
|
|
|
})
|
|
|
instanceList.value = res.list
|
|
|
instanceTotal.value = res.total
|