|
36 | 36 | <div class="discovery-ci-header"> |
37 | 37 | <a-input-search |
38 | 38 | :placeholder="$t('cmdb.components.pleaseSearch')" |
39 | | - :style="{ width: '200px', marginRight: '20px' }" |
| 39 | + :style="{ width: '200px' }" |
40 | 40 | @search="handleSearch" |
41 | 41 | allowClear |
42 | 42 | /> |
|
46 | 46 | <span @click="batchDelete">{{ $t('delete') }}</span> |
47 | 47 | <span>{{ $t('cmdb.ci.selectRows', { rows: selectedCount }) }}</span> |
48 | 48 | </span> |
| 49 | + <a-button |
| 50 | + type="primary" |
| 51 | + class="ops-button-ghost" |
| 52 | + ghost |
| 53 | + @click="getAdc()" |
| 54 | + > |
| 55 | + <ops-icon type="veops-refresh" /> |
| 56 | + {{ $t('refresh') }} |
| 57 | + </a-button> |
49 | 58 | <a-button |
50 | 59 | type="primary" |
51 | 60 | ghost |
|
68 | 77 | :height="tableHeight" |
69 | 78 | :scroll-y="{ enabled: true, gt: 50 }" |
70 | 79 | :scroll-x="{ enabled: true, gt: 0 }" |
| 80 | + :loading="loading" |
71 | 81 | @checkbox-change="onSelectChange" |
72 | 82 | @checkbox-all="onSelectChange" |
73 | 83 | @checkbox-range-end="onSelectChange" |
@@ -222,6 +232,7 @@ export default { |
222 | 232 | logTextArray: [], |
223 | 233 | acceptByFilters: [], |
224 | 234 | selectedCount: 0, |
| 235 | + loading: false |
225 | 236 | } |
226 | 237 | }, |
227 | 238 | computed: { |
@@ -289,6 +300,7 @@ export default { |
289 | 300 | this.$refs.xTable.getVxetableRef().clearSort() |
290 | 301 | }, |
291 | 302 | getAdc(isInit) { |
| 303 | + this.loading = true |
292 | 304 | getAdc({ |
293 | 305 | type_id: this.currentType, |
294 | 306 | page_size: 100000, |
@@ -320,6 +332,9 @@ export default { |
320 | 332 | xTable.refreshColumn() |
321 | 333 | } |
322 | 334 | }) |
| 335 | + .finally(() => { |
| 336 | + this.loading = false |
| 337 | + }) |
323 | 338 | }, |
324 | 339 | getColumns(data, attrList) { |
325 | 340 | const width = document.getElementById('discovery-ci').clientWidth - 50 |
@@ -470,6 +485,7 @@ export default { |
470 | 485 | .discovery-ci-header { |
471 | 486 | display: flex; |
472 | 487 | align-items: center; |
| 488 | + column-gap: 20px; |
473 | 489 | padding-top: 18px; |
474 | 490 | padding-bottom: 10px; |
475 | 491 | } |
|
0 commit comments