diff --git a/src/views/final/comp/FilterModal.vue b/src/views/final/comp/FilterModal.vue index e1f1ebf..b2b4278 100644 --- a/src/views/final/comp/FilterModal.vue +++ b/src/views/final/comp/FilterModal.vue @@ -8,6 +8,7 @@ import { reactive, ref, unref, + computed, } from "vue"; import { NDataTable } from "naive-ui"; import type { DataTableColumns, DataTableRowKey } from "naive-ui"; @@ -26,6 +27,7 @@ const emit = defineEmits<{ }>(); const show = ref(false); +const checkedRowKeys = ref([]); const cardStyle = { width: "800px", @@ -109,7 +111,7 @@ const pagination = reactive({ }, ], showQuickJumper: true, - prefix:()=>`共 ${total.value} 条数据` + prefix: () => `共 ${total.value} 条数据`, }); const tableData = ref>([]); const keyword = ref(""); @@ -119,7 +121,7 @@ async function query(page: number, pageSize: number) { search_searchname: { value: keyword.value, op: "like", type: "string" }, }; const result = await getConditionList({ pageNo: page, pageSize }, searchParam, 1); - const { data, pageCount,total:totalCount } = result; + const { data, pageCount, total: totalCount } = result; total.value = totalCount; tableData.value = data; pagination.page = page; @@ -283,6 +285,10 @@ const inputHandler = debounce((word) => { keyword.value = word; query(1, 5); }, 300); + +const showSearch = computed(() => { + return selectionIds.value.length > 0; +}); + +
+
+ + + 删除 +
+
+ 已选中 {{ selectionIds.length }} + 清空 +
+
+
{ @update:page="handlePageChange" @update-page-size="handlePageSizeChange" @update:checked-row-keys="handleCheck" + :checked-row-keys="selectionIds" />
@@ -378,6 +400,16 @@ const inputHandler = debounce((word) => { width: 300px; border: 1px solid gray; } + .del_btn{ + + } + .msg{ + a{ + margin-left: 30px; + cursor: pointer; + color: #507afd; + } + } } &-table { diff --git a/src/views/home/aside/comp/modals/FilterModal.vue b/src/views/home/aside/comp/modals/FilterModal.vue index aa1924f..ef8428e 100644 --- a/src/views/home/aside/comp/modals/FilterModal.vue +++ b/src/views/home/aside/comp/modals/FilterModal.vue @@ -1,5 +1,14 @@