|
|
|
|
@ -219,6 +219,7 @@ function deleteSelection(id = "") {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
|
|
|
|
|
selectionIds.value = [];
|
|
|
|
|
query(pagination.page, pagination.pageSize);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -308,6 +309,10 @@ const inputHandler = debounce((word) => {
|
|
|
|
|
keyword.value = word;
|
|
|
|
|
query(1, 5);
|
|
|
|
|
}, 300);
|
|
|
|
|
|
|
|
|
|
const showSearch = computed(() => {
|
|
|
|
|
return selectionIds.value.length > 0;
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
@ -336,27 +341,49 @@ const inputHandler = debounce((word) => {
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrapper-form">
|
|
|
|
|
|
|
|
|
|
<div class="wrapper-form" v-if="!showSearch">
|
|
|
|
|
<n-input
|
|
|
|
|
:style="{ width: '360px', border: '1px solid #cad2dd' }"
|
|
|
|
|
placeholder="请输入过滤条件名称搜索"
|
|
|
|
|
@input="inputHandler"
|
|
|
|
|
>
|
|
|
|
|
<template #suffix>
|
|
|
|
|
<SvgIcon size="14px" name="magnifying-1" color="#fff" />
|
|
|
|
|
<SvgIcon size="14px" name="magnifying-1" />
|
|
|
|
|
</template>
|
|
|
|
|
</n-input>
|
|
|
|
|
<n-button type="info" style="background: #507afd" @click="handleClick">
|
|
|
|
|
<n-button type="info" @click="handleClick">
|
|
|
|
|
创建
|
|
|
|
|
<template #icon>
|
|
|
|
|
<img
|
|
|
|
|
src="../../../../../assets/images/addIcon.png"
|
|
|
|
|
style="width: 16px; height: 16px"
|
|
|
|
|
/>
|
|
|
|
|
<SvgIcon size="14px" name="magnifying-1" />
|
|
|
|
|
</template>
|
|
|
|
|
</n-button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="wrapper-form" v-else>
|
|
|
|
|
<div class="del_btn">
|
|
|
|
|
<n-button icon-placement="left" size="medium" @click="deleteSelection">
|
|
|
|
|
<template #icon>
|
|
|
|
|
<SvgIcon name="delete-history" size="16" />
|
|
|
|
|
</template>
|
|
|
|
|
删除</n-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="msg">
|
|
|
|
|
<span
|
|
|
|
|
>已选中
|
|
|
|
|
<span style="color: #507afd; font-size: 16px">{{
|
|
|
|
|
selectionIds.length
|
|
|
|
|
}}</span>
|
|
|
|
|
项</span
|
|
|
|
|
>
|
|
|
|
|
<a @click="selectionIds = []">清空</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="wrapper-table">
|
|
|
|
|
<NDataTable
|
|
|
|
|
ref="tableRef"
|
|
|
|
|
@ -372,6 +399,7 @@ const inputHandler = debounce((word) => {
|
|
|
|
|
@update-page-size="handlePageSizeChange"
|
|
|
|
|
@update:checked-row-keys="handleCheck"
|
|
|
|
|
@update:sorter="sortData"
|
|
|
|
|
:checked-row-keys="selectionIds"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|