|
@@ -28,7 +28,7 @@
|
|
|
</el-tooltip>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
<el-tooltip content="预览" placement="bottom" effect="light">
|
|
|
- <el-icon class="ibt0">
|
|
|
+ <el-icon class="ibt0" @click="previewHistoryEv(scope.row)">
|
|
|
<View />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
@@ -43,14 +43,18 @@ import process from '@/api/flow/process'
|
|
|
import { useTablePage } from '@/hooks/useTablePage'
|
|
|
import { flowIconPrefix } from '@/utils/index'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
+import router from '@/router'
|
|
|
const props = defineProps({
|
|
|
modelValue: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
- processId: {
|
|
|
- type: String,
|
|
|
- default: undefined
|
|
|
+ item: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({
|
|
|
+ processId: undefined,
|
|
|
+ processType: undefined
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -67,7 +71,7 @@ const queryList = async () => {
|
|
|
const { options, searchParams } = tableOpts
|
|
|
options.loading = true
|
|
|
try {
|
|
|
- const { records: list, total } = await process.pageHistoryListApi({ ...searchParams, data: { processId: props.processId } })
|
|
|
+ const { records: list, total } = await process.pageHistoryListApi({ ...searchParams, data: { processId: props.item.processId } })
|
|
|
tableOpts.total = total
|
|
|
tableOpts.list = list
|
|
|
} catch {
|
|
@@ -146,7 +150,11 @@ const checkoutHistoryEv = async row => {
|
|
|
$myEmit('successFn')
|
|
|
} catch (e) {}
|
|
|
}
|
|
|
-
|
|
|
+// 预览历史
|
|
|
+const previewHistoryEv = async (row) => {
|
|
|
+ const _path = { main: 'index', business: 'business', child: 'child' }[props.item.processType] || 'index'
|
|
|
+ router.push(`/flow_create/${_path}?view=1&id=${row.id}`)
|
|
|
+}
|
|
|
// 弹窗显隐
|
|
|
const visibleDialog = computed({
|
|
|
get() {
|