dialog_approval.vue
2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<script lang="ts" setup name="DialogApproval">
import { TableColumnWidth } from '@/utils/enum';
import {
getCrossDetailList
} from '@/api/modules/workFlowService';
const { proxy } = getCurrentInstance() as any;
const emits = defineEmits([
"dialogCancel"
]);
const props = defineProps({
visible: {
type: Boolean,
default: false
},
currentRowInfo: {
type: Object,
default: {
}
}
})
const dialogInfo = ref({
visible: false,
size: 700,
direction: "column",
header: {
title: "主平台审批节点",
},
footer: {
visible: false
}
});
watch(() => props.visible, () => {
dialogInfo.value.visible = props.visible;
if (props.visible) {
tableInfo.value.data = [];
gettableList();
}
}, {
immediate: true
})
/** 获取版本信息数据 */
const gettableList = () => {
tableInfo.value.loading = true;
getCrossDetailList({
pageIndex: 1,
pageSize: -1,
bizGuid: props.currentRowInfo.guid
}).then((res: any) => {
tableInfo.value.loading = false;
if (res.code == proxy.$passCode) {
const data = res.data || [];
tableInfo.value.data = data?.map(d => {
d.approveState = d.approveState == null ? undefined : d.approveState;
return d;
});
} else {
proxy.$ElMessage.error(res.msg);
}
})
}
const tableInfo = ref({
id: 'approval-table',
loading: false,
minPanelHeight: "60px",
minHeight: "60px",
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center", fixed: "left" },
{
label: "节点", field: "processName", width: 100
},
{ label: "处理对象", field: "operator", width: TableColumnWidth.USERNAME },
{ label: "操作时间", field: "operatingTime", width: TableColumnWidth.DATETIME, },
{
label: "审批状态", field: "approveState", width: 120, type: 'tag'
},
{ label: "审批原因", field: "approveSuggest", width: TableColumnWidth.DESCRIPTION },
],
data: [],
showPage: false,
actionInfo: {
show: false
}
});
const handleDialogCancel = () => {
dialogInfo.value.visible = false;
emits("dialogCancel");
}
</script>
<template>
<!-- 版本信息 -->
<el-dialog v-model="dialogInfo.visible" :title="dialogInfo.header.title" :width="dialogInfo.size" :modal="true"
:close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel">
<Table ref="tableRef" :tableInfo="tableInfo" class="approval-table" />
</el-dialog>
</template>
<style lang="scss" scoped>
.approval-table {
height: 180px !important;
}
:deep(.cusror-inherit) {
cursor: inherit;
}
</style>