Skip to content

Commit

Permalink
fix: 修复gamestatefulsets和gamedeployments批量删除功能缺失问题 (#1601)
Browse files Browse the repository at this point in the history
  • Loading branch information
HubuHito authored Oct 14, 2021
1 parent 0ea2a48 commit 271d1c7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 34 deletions.
36 changes: 19 additions & 17 deletions bcs-app/frontend/src/views/app/k8s/gamedeployments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
:data="curPageData"
:page-params="pageConf"
@page-change="handlePageChange"
@page-limit-change="handlePageSizeChange">
@page-limit-change="handlePageSizeChange"
@selection-change="handleSelectionChange">
<bk-table-column type="selection" width="60"></bk-table-column>
<bk-table-column v-for="(column, index) in columnList" :label="(defaultColumnMap[column] && defaultColumnMap[column].label) || column"
:min-width="defaultColumnMap[column] ? defaultColumnMap[column].minWidth : 'auto'"
:key="index">
Expand Down Expand Up @@ -113,32 +115,29 @@
:quick-close="false"
class="batch-delete-gamestatefulset"
@cancel="hideBatchDelDialog">
<div slot="content">
<div class="biz-batch-wrapper">
<p class="batch-title">{{batchDelDialogConf.title}}</p>
<ul class="batch-list">
<li v-for="(item, index) of batchDelDialogConf.list" :key="index">{{item.name}}</li>
</ul>
</div>
<div class="biz-batch-wrapper">
<p class="batch-title">{{batchDelDialogConf.title}}</p>
<ul class="batch-list">
<li v-for="(item, index) of batchDelDialogConf.list" :key="index">{{item.name}}</li>
</ul>
</div>
<template slot="footer">
<div class="bk-dialog-outer">
<template v-if="batchDelDialogConf.isDeleting">
<button type="button" class="bk-dialog-btn bk-dialog-btn-confirm bk-btn-primary is-disabled">
<bk-button theme="primary">
{{$t('删除中...')}}
</button>
<button type="button" class="bk-dialog-btn bk-dialog-btn-cancel is-disabled">
</bk-button>
<bk-button>
{{$t('取消')}}
</button>
</bk-button>
</template>
<template v-else>
<button type="button" class="bk-dialog-btn bk-dialog-btn-confirm bk-btn-primary"
@click="batchDelConfirm">
<bk-button theme="primary" @click="batchDelConfirm">
{{$t('确定')}}
</button>
<button type="button" class="bk-dialog-btn bk-dialog-btn-cancel" @click="hideBatchDelDialog">
</bk-button>
<bk-button @click="hideBatchDelDialog">
{{$t('取消')}}
</button>
</bk-button>
</template>
</div>
</template>
Expand Down Expand Up @@ -396,6 +395,9 @@
this.initPageConf()
this.handlePageChange()
},
handleSelectionChange (selection) {
this.checkedNodeList = selection
},
/**
* 获取分页数据
Expand Down
37 changes: 20 additions & 17 deletions bcs-app/frontend/src/views/app/k8s/gamestatefulset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
:data="curPageData"
:page-params="pageConf"
@page-change="handlePageChange"
@page-limit-change="handlePageSizeChange">
@page-limit-change="handlePageSizeChange"
@selection-change="handleSelectionChange">
<bk-table-column type="selection" width="60"></bk-table-column>
<bk-table-column v-for="(column, index) in columnList" :label="(defaultColumnMap[column] && defaultColumnMap[column].label) || column"
:min-width="defaultColumnMap[column] ? defaultColumnMap[column].minWidth : 'auto'"
:key="index">
Expand Down Expand Up @@ -119,32 +121,29 @@
:quick-close="false"
class="batch-delete-gamestatefulset"
@cancel="hideBatchDelDialog">
<div slot="content">
<div class="biz-batch-wrapper">
<p class="batch-title">{{batchDelDialogConf.title}}</p>
<ul class="batch-list">
<li v-for="(item, index) of batchDelDialogConf.list" :key="index">{{item.name}}</li>
</ul>
</div>
<div class="biz-batch-wrapper">
<p class="batch-title">{{batchDelDialogConf.title}}</p>
<ul class="batch-list">
<li v-for="(item, index) of batchDelDialogConf.list" :key="index">{{item.name}}</li>
</ul>
</div>
<template slot="footer">
<div class="bk-dialog-outer">
<template v-if="batchDelDialogConf.isDeleting">
<button type="button" class="bk-dialog-btn bk-dialog-btn-confirm bk-btn-primary is-disabled">
<bk-button theme="primary">
{{$t('删除中...')}}
</button>
<button type="button" class="bk-dialog-btn bk-dialog-btn-cancel is-disabled">
</bk-button>
<bk-button>
{{$t('取消')}}
</button>
</bk-button>
</template>
<template v-else>
<button type="button" class="bk-dialog-btn bk-dialog-btn-confirm bk-btn-primary"
@click="batchDelConfirm">
<bk-button theme="primary" @click="batchDelConfirm">
{{$t('确定')}}
</button>
<button type="button" class="bk-dialog-btn bk-dialog-btn-cancel" @click="hideBatchDelDialog">
</bk-button>
<bk-button @click="hideBatchDelDialog">
{{$t('取消')}}
</button>
</bk-button>
</template>
</div>
</template>
Expand Down Expand Up @@ -397,6 +396,10 @@
this.initPageConf()
this.handlePageChange()
},
// select变更
handleSelectionChange (selection) {
this.checkedNodeList = selection
},
/**
* 获取分页数据
Expand Down

0 comments on commit 271d1c7

Please sign in to comment.