|
1 | 1 | <template> |
2 | | - <el-drawer v-model="drawer" title="执行记录" direction="rtl" :before-close="close"> |
| 2 | + <el-drawer v-model="drawer" title="执行记录" direction="rtl" size="800px" :before-close="close"> |
3 | 3 | <div class="lighter mb-12"> |
4 | 4 | {{ $t('views.system.resourceMapping.sub_title') }} |
5 | 5 | </div> |
|
54 | 54 | <template #default="{ row }"> |
55 | 55 | <el-button link> |
56 | 56 | <div class="flex align-center"> |
57 | | - <KnowledgeIcon class="mr-8" :size="22" :type="row.icon" /> |
58 | 57 | <el-avatar shape="square" :size="22" style="background: none" class="mr-8"> |
59 | 58 | <img |
60 | 59 | v-if="row.source_type === 'TOOL'" |
|
68 | 67 | /> |
69 | 68 | </el-avatar> |
70 | 69 |
|
71 | | - <span>{{ row.name }}</span> |
| 70 | + <span>{{ row.source_name }}</span> |
72 | 71 | </div> |
73 | 72 | </el-button> |
74 | 73 | </template> |
75 | 74 | </el-table-column> |
76 | | - <el-table-column |
77 | | - prop="desc" |
78 | | - min-width="120" |
79 | | - show-overflow-tooltip |
80 | | - :label="$t('common.desc')" |
81 | | - /> |
| 75 | + |
82 | 76 | <el-table-column |
83 | 77 | prop="source_type" |
84 | 78 | min-width="120" |
|
94 | 88 | </template> |
95 | 89 | </el-table-column> |
96 | 90 |
|
| 91 | + <el-table-column prop="state" :label="$t('common.status.label')" width="180"> |
| 92 | + <template #default="{ row }"> |
| 93 | + <el-text class="color-text-primary" v-if="row.state === 'SUCCESS'"> |
| 94 | + <el-icon class="color-success"><SuccessFilled /></el-icon> |
| 95 | + {{ $t('common.status.success') }} |
| 96 | + </el-text> |
| 97 | + <el-text class="color-text-primary" v-else-if="row.state === 'FAILURE'"> |
| 98 | + <el-icon class="color-danger"><CircleCloseFilled /></el-icon> |
| 99 | + {{ $t('common.status.fail') }} |
| 100 | + </el-text> |
| 101 | + <el-text class="color-text-primary" v-else-if="row.state === 'REVOKED'"> |
| 102 | + <el-icon class="color-danger"><CircleCloseFilled /></el-icon> |
| 103 | + {{ $t('common.status.REVOKED') }} |
| 104 | + </el-text> |
| 105 | + <el-text class="color-text-primary" v-else-if="row.state === 'REVOKE'"> |
| 106 | + <el-icon class="is-loading color-primary"><Loading /></el-icon> |
| 107 | + {{ $t('common.status.REVOKE') }} |
| 108 | + </el-text> |
| 109 | + <el-text class="color-text-primary" v-else> |
| 110 | + <el-icon class="is-loading color-primary"><Loading /></el-icon> |
| 111 | + {{ $t('common.status.STARTED') }} |
| 112 | + </el-text> |
| 113 | + </template> |
| 114 | + </el-table-column> |
| 115 | + <el-table-column prop="run_time" :label="$t('chat.KnowledgeSource.consumeTime')"> |
| 116 | + <template #default="{ row }"> |
| 117 | + {{ row.run_time != undefined ? row.run_time?.toFixed(2) + 's' : '-' }} |
| 118 | + </template> |
| 119 | + </el-table-column> |
97 | 120 | <el-table-column |
98 | | - prop="username" |
99 | | - min-width="120" |
100 | | - show-overflow-tooltip |
101 | | - :label="$t('common.creator')" |
102 | | - /> |
| 121 | + prop="create_time" |
| 122 | + :label="$t('chat.executionDetails.createTime')" |
| 123 | + width="180" |
| 124 | + > |
| 125 | + <template #default="{ row }"> |
| 126 | + {{ datetimeFormat(row.create_time) }} |
| 127 | + </template> |
| 128 | + </el-table-column> |
| 129 | + |
| 130 | + <el-table-column :label="$t('common.operation')" width="90"> |
| 131 | + <template #default="{ row }"> |
| 132 | + <div class="flex"> |
| 133 | + <el-tooltip effect="dark" :content="$t('chat.executionDetails.title')" placement="top"> |
| 134 | + <el-button type="primary" text @click.stop="toDetails(row)"> |
| 135 | + <AppIcon iconName="app-operate-log"></AppIcon> |
| 136 | + </el-button> |
| 137 | + </el-tooltip> |
| 138 | + </div> |
| 139 | + </template> |
| 140 | + </el-table-column> |
103 | 141 | </app-table> |
104 | 142 | </el-drawer> |
105 | 143 | </template> |
106 | 144 | <script setup lang="ts"> |
107 | 145 | import { ref, reactive } from 'vue' |
108 | 146 | import { isAppIcon, resetUrl } from '@/utils/common' |
109 | 147 | import triggerAPI from '@/api/trigger/trigger' |
| 148 | +import { datetimeFormat } from '@/utils/time' |
| 149 | +const toDetails = (row: any) => {} |
110 | 150 | const searchType = ref<string>('name') |
111 | 151 | const drawer = ref<boolean>(false) |
112 | 152 | const paginationConfig = reactive({ |
|
0 commit comments