diff --git a/src/views/ne/neSoftware/index.vue b/src/views/ne/neSoftware/index.vue
index 3da17a5e..841fba1f 100644
--- a/src/views/ne/neSoftware/index.vue
+++ b/src/views/ne/neSoftware/index.vue
@@ -63,6 +63,8 @@ type TabeStateType = {
seached: boolean;
/**记录数据 */
data: object[];
+ /**勾选记录 */
+ selectedRowKeys: (string | number)[];
};
/**表格状态 */
@@ -71,6 +73,7 @@ let tableState: TabeStateType = reactive({
size: 'middle',
seached: false,
data: [],
+ selectedRowKeys: [],
});
/**表格字段列 */
@@ -162,6 +165,11 @@ function fnTableSize({ key }: MenuInfo) {
tableState.size = key as SizeType;
}
+/**表格多选 */
+function fnTableSelectedRowKeys(keys: (string | number)[]) {
+ tableState.selectedRowKeys = keys;
+}
+
/**查询列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
@@ -242,9 +250,16 @@ function fnModalEditCancel() {
/**删除软件包 */
function fnRecordDelete(id: string) {
+ if (!id || modalState.confirmLoading) return;
+ let msg = 'Removing software packages?';
+ if (id === '0') {
+ msg = `${msg} select ${tableState.selectedRowKeys.length}`;
+ id = tableState.selectedRowKeys.join(',');
+ }
+
Modal.confirm({
title: t('common.tipTitle'),
- content: 'Removing software packages?',
+ content: msg,
onOk() {
if (modalState.confirmLoading) return;
modalState.confirmLoading = true;
@@ -408,6 +423,16 @@ onMounted(() => {
More File Upload
+
+
+ {{ t('common.deleteText') }}
+
@@ -467,6 +492,12 @@ onMounted(() => {
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 150 }"
@resizeColumn="(w:number, col:any) => (col.width = w)"
+ :row-selection="{
+ type: 'checkbox',
+ columnWidth: '48px',
+ selectedRowKeys: tableState.selectedRowKeys,
+ onChange: fnTableSelectedRowKeys,
+ }"
>