4646 class =" w-full"
4747 v-loading =" loading"
4848 @changePage =" changePage"
49- :maxTableHeight =" 200"
49+ :maxTableHeight =" 150"
50+ :paginationConfig =" paginationConfig"
5051 >
5152 <el-table-column prop =" user_name" :label =" $t('workflow.initiator')" >
5253 <template #default =" { row } " >
53- {{ row.user_name }}
54+ {{ row.meta. user_name }}
5455 </template >
5556 </el-table-column >
56- <el-table-column prop =" state" label =" 状态 " width =" 180" >
57+ <el-table-column prop =" state" : label =" $t('common.status.label') " width =" 180" >
5758 <template #default =" { row } " >
58- {{ row.state }}
59+ <el-text class =" color-text-primary" v-if =" row.state === 'SUCCESS'" >
60+ <el-icon class =" color-success" ><SuccessFilled /></el-icon >
61+ {{ $t('common.status.success') }}
62+ </el-text >
63+ <el-text class =" color-text-primary" v-else-if =" row.state === 'FAILURE'" >
64+ <el-icon class =" color-danger" ><CircleCloseFilled /></el-icon >
65+ {{ $t('common.status.fail') }}
66+ </el-text >
67+ <el-text class =" color-text-primary" v-else >
68+ <el-icon class =" is-loading color-primary" ><Loading /></el-icon >
69+ {{ $t('common.status.padding') }}
70+ </el-text >
5971 </template >
6072 </el-table-column >
61- <el-table-column prop =" run_time" label =" 运行时间 " >
73+ <el-table-column prop =" run_time" : label =" $t('chat.KnowledgeSource.consumeTime') " >
6274 <template #default =" { row } " >
63- {{ row.run_time }}
75+ {{ row.run_time != undefined ? row.run_time + 's' : '-' }}
6476 </template >
6577 </el-table-column >
66- <el-table-column label =" 操作 " >
78+ <el-table-column : label =" $t('common.operation') " width = " 80 " >
6779 <template #default =" { row } " >
68- <span @click =" toDetails(row)" >执行详情</span >
80+ <el-tooltip effect =" dark" :content =" $t('chat.executionDetails.title')" placement =" top" >
81+ <el-button type =" primary" text @click.stop =" toDetails(row)" >
82+ <AppIcon iconName =" app-operate-log" ></AppIcon >
83+ </el-button >
84+ </el-tooltip >
6985 </template >
7086 </el-table-column >
7187 </app-table-infinite-scroll >
@@ -106,6 +122,7 @@ const changeFilterHandle = () => {
106122}
107123const changePage = () => {
108124 paginationConfig .current_page += 1
125+ console .log (paginationConfig .current_page )
109126 getList ()
110127}
111128
@@ -114,15 +131,18 @@ const getList = () => {
114131 .getWorkflowActionPage (active_knowledge_id .value , paginationConfig , query .value , loading )
115132 .then ((ok : any ) => {
116133 paginationConfig .total = ok .data ?.total
117- data .value = ok .data .records
134+ data .value = data . value . concat ( ok .data .records )
118135 })
119136}
120137const open = (knowledge_id : string ) => {
121- drawer .value = true
122138 active_knowledge_id .value = knowledge_id
123139 getList ()
140+ drawer .value = true
124141}
125142const close = () => {
143+ paginationConfig .current_page = 1
144+ paginationConfig .total = 0
145+ data .value = []
126146 drawer .value = false
127147}
128148defineExpose ({ open , close })
0 commit comments