|
31 | 31 | <el-button v-permission type="primary" plain @click="onClean()"> |
32 | 32 | {{ $t('container.containerPrune') }} |
33 | 33 | </el-button> |
34 | | - <el-button-group class="button-group"> |
35 | | - <el-button v-permission :disabled="checkStatus('start', null)" @click="onOperate('start', null)"> |
36 | | - {{ $t('commons.operate.start') }} |
37 | | - </el-button> |
38 | | - <el-button v-permission :disabled="checkStatus('stop', null)" @click="onOperate('stop', null)"> |
39 | | - {{ $t('commons.operate.stop') }} |
40 | | - </el-button> |
41 | | - <el-button |
42 | | - v-permission |
43 | | - :disabled="checkStatus('restart', null)" |
44 | | - @click="onOperate('restart', null)" |
45 | | - > |
46 | | - {{ $t('commons.button.restart') }} |
47 | | - </el-button> |
48 | | - <el-button v-permission :disabled="checkStatus('kill', null)" @click="onOperate('kill', null)"> |
49 | | - {{ $t('container.kill') }} |
50 | | - </el-button> |
51 | | - <el-button v-permission :disabled="checkStatus('pause', null)" @click="onOperate('pause', null)"> |
52 | | - {{ $t('container.pause') }} |
53 | | - </el-button> |
54 | | - <el-button |
55 | | - v-permission |
56 | | - :disabled="checkStatus('unpause', null)" |
57 | | - @click="onOperate('unpause', null)" |
58 | | - > |
59 | | - {{ $t('container.unpause') }} |
60 | | - </el-button> |
61 | | - <el-button v-permission :disabled="checkStatus('remove', null)" @click="onOperate('remove', null)"> |
62 | | - {{ $t('commons.button.delete') }} |
63 | | - </el-button> |
64 | | - </el-button-group> |
65 | 34 | </template> |
66 | 35 | <template #rightToolBar> |
67 | 36 | <TableViewSwitch v-model="viewMode" storage-key="container" /> |
|
102 | 71 | localKey="containerColumn" |
103 | 72 | :heightDiff="300" |
104 | 73 | > |
105 | | - <el-table-column type="selection" /> |
| 74 | + <el-table-column type="selection" width="32" /> |
106 | 75 | <el-table-column |
107 | 76 | :label="$t('commons.table.name')" |
108 | 77 | min-width="250" |
|
395 | 364 | :fixed="isMobile ? false : 'right'" |
396 | 365 | prop="operate" |
397 | 366 | /> |
| 367 | + <template #footerLeft="{ selected, toggleSelection }"> |
| 368 | + <div class="footer-left-button" v-permission> |
| 369 | + <el-select class="p-w-200" v-model="batchOperation"> |
| 370 | + <template #prefix> |
| 371 | + <el-checkbox |
| 372 | + :model-value="selected" |
| 373 | + @click.stop |
| 374 | + @change="toggleSelection" |
| 375 | + ></el-checkbox> |
| 376 | + </template> |
| 377 | + <el-option |
| 378 | + :label="$t('container.start')" |
| 379 | + value="start" |
| 380 | + :disabled="checkStatus('start', null)" |
| 381 | + /> |
| 382 | + <el-option |
| 383 | + :label="$t('container.stop')" |
| 384 | + value="stop" |
| 385 | + :disabled="checkStatus('stop', null)" |
| 386 | + /> |
| 387 | + <el-option |
| 388 | + :label="$t('container.restart')" |
| 389 | + value="restart" |
| 390 | + :disabled="checkStatus('restart', null)" |
| 391 | + /> |
| 392 | + <el-option |
| 393 | + :label="$t('container.kill')" |
| 394 | + value="kill" |
| 395 | + :disabled="checkStatus('kill', null)" |
| 396 | + /> |
| 397 | + <el-option |
| 398 | + :label="$t('container.pause')" |
| 399 | + value="pause" |
| 400 | + :disabled="checkStatus('pause', null)" |
| 401 | + /> |
| 402 | + <el-option |
| 403 | + :label="$t('container.unpause')" |
| 404 | + value="unpause" |
| 405 | + :disabled="checkStatus('unpause', null)" |
| 406 | + /> |
| 407 | + <el-option |
| 408 | + :label="$t('container.remove')" |
| 409 | + value="remove" |
| 410 | + :disabled="checkStatus('remove', null)" |
| 411 | + /> |
| 412 | + </el-select> |
| 413 | + <el-button |
| 414 | + type="primary" |
| 415 | + :disabled=" |
| 416 | + selects.length === 0 || batchOperation === '' || checkStatus(batchOperation, null) |
| 417 | + " |
| 418 | + @click="onOperate(batchOperation, null)" |
| 419 | + > |
| 420 | + {{ $t('website.batchOperate') }} |
| 421 | + <span class="ml-1" v-if="selects.length > 0">({{ selects.length }})</span> |
| 422 | + </el-button> |
| 423 | + </div> |
| 424 | + </template> |
398 | 425 | </ComplexTable> |
399 | 426 | </template> |
400 | 427 |
|
@@ -517,6 +544,7 @@ const columns = ref([]); |
517 | 544 |
|
518 | 545 | const batchNames = ref(); |
519 | 546 | const batchOp = ref(); |
| 547 | +const batchOperation = ref(''); |
520 | 548 | const taskLogRef = ref(); |
521 | 549 |
|
522 | 550 | const tags = ref([]); |
@@ -1079,11 +1107,6 @@ onMounted(() => { |
1079 | 1107 | font-size: 6px; |
1080 | 1108 | cursor: pointer; |
1081 | 1109 | } |
1082 | | -.button-group .el-button { |
1083 | | - margin-left: -1px !important; |
1084 | | - position: relative !important; |
1085 | | - z-index: 1 !important; |
1086 | | -} |
1087 | 1110 | .tag-button { |
1088 | 1111 | margin-top: -5px; |
1089 | 1112 | margin-right: 10px; |
|
0 commit comments