|
126 | 126 | <div class="mainClass"> |
127 | 127 | <el-row :gutter="20" v-show="hasRecords" class="mainRowClass"> |
128 | 128 | <el-col :span="6"> |
129 | | - <div> |
130 | | - <ul class="infinite-list" style="overflow: auto"> |
131 | | - <el-card |
132 | | - v-for="(item, index) in records" |
133 | | - :key="index" |
134 | | - :class="item.id === currentRecord.id ? 'select-card' : 'primary-card'" |
135 | | - @click="forDetail(item)" |
136 | | - > |
137 | | - <el-tag v-if="item.status === 'Success'" type="success"> |
138 | | - {{ $t('commons.status.success') }} |
139 | | - </el-tag> |
140 | | - <el-tag v-if="item.status === 'Waiting'" type="info"> |
141 | | - {{ $t('commons.status.waiting') }} |
142 | | - </el-tag> |
143 | | - <el-tag v-if="item.status === 'Failed'" type="danger"> |
144 | | - {{ $t('commons.status.failed') }} |
145 | | - </el-tag> |
146 | | - <span> |
147 | | - {{ dateFormat(0, 0, item.startTime) }} |
148 | | - </span> |
149 | | - </el-card> |
150 | | - </ul> |
151 | | - <div class="page-item"> |
152 | | - <el-pagination |
153 | | - :page-size="searchInfo.pageSize" |
154 | | - :current-page="searchInfo.page" |
155 | | - @current-change="handleCurrentChange" |
156 | | - @size-change="handleSizeChange" |
157 | | - :pager-count="5" |
158 | | - :page-sizes="[6, 8, 10, 12, 14]" |
159 | | - small |
160 | | - layout="total, sizes, prev, pager, next" |
161 | | - :total="searchInfo.recordTotal" |
162 | | - /> |
163 | | - </div> |
| 129 | + <div class="infinite-list" style="overflow: auto"> |
| 130 | + <el-table :data="records" border :show-header="false" @row-click="forDetail"> |
| 131 | + <el-table-column> |
| 132 | + <template #default="{ row }"> |
| 133 | + <span v-if="row.id === currentRecord.id" class="select-sign"></span> |
| 134 | + <el-tag v-if="row.status === 'Success'" type="success"> |
| 135 | + {{ $t('commons.status.success') }} |
| 136 | + </el-tag> |
| 137 | + <el-tag v-if="row.status === 'Waiting'" type="info"> |
| 138 | + {{ $t('commons.status.waiting') }} |
| 139 | + </el-tag> |
| 140 | + <el-tag v-if="row.status === 'Failed'" type="danger"> |
| 141 | + {{ $t('commons.status.failed') }} |
| 142 | + </el-tag> |
| 143 | + <span> |
| 144 | + {{ dateFormat(0, 0, row.startTime) }} |
| 145 | + </span> |
| 146 | + </template> |
| 147 | + </el-table-column> |
| 148 | + </el-table> |
| 149 | + </div> |
| 150 | + <div class="page-item"> |
| 151 | + <el-pagination |
| 152 | + :page-size="searchInfo.pageSize" |
| 153 | + :current-page="searchInfo.page" |
| 154 | + @current-change="handleCurrentChange" |
| 155 | + @size-change="handleSizeChange" |
| 156 | + :pager-count="5" |
| 157 | + :page-sizes="[6, 8, 10, 12, 14]" |
| 158 | + small |
| 159 | + layout="total, sizes, prev, pager, next" |
| 160 | + :total="searchInfo.recordTotal" |
| 161 | + /> |
164 | 162 | </div> |
165 | 163 | </el-col> |
166 | 164 | <el-col :span="18"> |
|
318 | 316 | :placeholder="$t('cronjob.noLogs')" |
319 | 317 | :indent-with-tab="true" |
320 | 318 | :tabSize="4" |
321 | | - style="height: calc(100vh - 484px); width: 100%; margin-top: 5px" |
| 319 | + style="height: calc(100vh - 488px); width: 100%; margin-top: 5px" |
322 | 320 | :lineWrapping="true" |
323 | 321 | :matchBrackets="true" |
324 | 322 | theme="cobalt" |
@@ -719,36 +717,22 @@ defineExpose({ |
719 | 717 |
|
720 | 718 | <style lang="scss" scoped> |
721 | 719 | .infinite-list { |
722 | | - height: calc(100vh - 416px); |
723 | | - padding: 0; |
724 | | - margin: 0; |
725 | | - .el-card { |
726 | | - border: var(--panel-border) !important; |
727 | | - &:hover { |
728 | | - box-shadow: 2px 2px 2px #888888; |
729 | | - } |
730 | | - display: flex; |
731 | | - align-items: center; |
732 | | - height: 40px; |
733 | | - font-size: 14px; |
734 | | - margin: 5px; |
735 | | - cursor: pointer; |
736 | | - } |
737 | | - .select-card { |
738 | | - color: var(--el-color-primary); |
739 | | - border: 1px solid var(--el-color-primary) !important; |
740 | | - box-shadow: 2px 2px 2px #888888; |
| 720 | + height: calc(100vh - 420px); |
| 721 | + .select-sign { |
741 | 722 | &::before { |
742 | | - position: absolute; |
| 723 | + float: left; |
| 724 | + margin-left: -3px; |
| 725 | + position: relative; |
743 | 726 | width: 3px; |
744 | | - height: 40px; |
| 727 | + height: 24px; |
745 | 728 | content: ''; |
746 | 729 | background: $primary-color; |
747 | | - border-radius: 10px; |
| 730 | + border-radius: 20px; |
748 | 731 | } |
749 | 732 | } |
750 | 733 | .el-tag { |
751 | | - margin-right: 15px; |
| 734 | + margin-left: 20px; |
| 735 | + margin-right: 20px; |
752 | 736 | } |
753 | 737 | } |
754 | 738 |
|
|
0 commit comments