|
|
|
@ -29,7 +29,7 @@ const allCount = computed(() => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const selectCount = computed(() => {
|
|
|
|
|
return `全部筛选(共${onList.value.length}个)`;
|
|
|
|
|
return `已选筛选(共${onList.value.length}个)`;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
@ -137,15 +137,13 @@ function onCheckAllChange(value) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
selectIds.value = value ? ids : [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function onCheckChange(checked: any, item: any) {
|
|
|
|
|
const index = selectIds.value.indexOf(item.id);
|
|
|
|
|
|
|
|
|
|
item.checked = checked;
|
|
|
|
|
let currentIndex = offList.value.findIndex(v=>v.id == item.id)
|
|
|
|
|
let currentIndex = offList.value.findIndex((v) => v.id == item.id);
|
|
|
|
|
offList.value[currentIndex].checked = item.checked;
|
|
|
|
|
if (index === -1 && checked) selectIds.value.push(item.id);
|
|
|
|
|
else selectIds.value.splice(index, 1);
|
|
|
|
@ -267,17 +265,17 @@ const rightInputHandler = debounce((keyword) => {
|
|
|
|
|
<div>
|
|
|
|
|
<n-input placeholder="搜索关键字" @input="leftInputHandler">
|
|
|
|
|
<template #suffix>
|
|
|
|
|
<SvgIcon size="14px" name="magnifying-1" />
|
|
|
|
|
<SvgIcon size="14px" name="magnifying-1" color="#999999" />
|
|
|
|
|
</template>
|
|
|
|
|
</n-input>
|
|
|
|
|
<n-scrollbar
|
|
|
|
|
style="max-height: 500px; border: 1px solid #cad2dd; border-radius: 2px"
|
|
|
|
|
>
|
|
|
|
|
<div class="draggable-ul">
|
|
|
|
|
<div class="draggable-li">
|
|
|
|
|
<div class="draggable-li" style="color:#666666">
|
|
|
|
|
<n-checkbox
|
|
|
|
|
v-model:checked="checkAll"
|
|
|
|
|
label="全部"
|
|
|
|
|
label="全选"
|
|
|
|
|
@update:checked="onCheckAllChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
@ -317,7 +315,7 @@ const rightInputHandler = debounce((keyword) => {
|
|
|
|
|
<div>
|
|
|
|
|
<n-input placeholder="搜索关键字" @input="rightInputHandler">
|
|
|
|
|
<template #suffix>
|
|
|
|
|
<SvgIcon size="14px" name="magnifying-1" />
|
|
|
|
|
<SvgIcon size="14px" name="magnifying-1" color="#999999" />
|
|
|
|
|
</template>
|
|
|
|
|
</n-input>
|
|
|
|
|
<n-scrollbar
|
|
|
|
@ -339,7 +337,8 @@ const rightInputHandler = debounce((keyword) => {
|
|
|
|
|
:class="{ fix: item.fix }"
|
|
|
|
|
class="cursor-move draggable-li"
|
|
|
|
|
>
|
|
|
|
|
<SvgIcon v-show="!item.fix" name="drag" size="24" />
|
|
|
|
|
<!-- v-show="!item.fix" 判断是否为固定值 -->
|
|
|
|
|
<SvgIcon name="drag" size="14" />
|
|
|
|
|
<span class="ml-2">{{ item.name }}</span>
|
|
|
|
|
<SvgIcon
|
|
|
|
|
v-if="!item.fix"
|
|
|
|
@ -358,7 +357,7 @@ const rightInputHandler = debounce((keyword) => {
|
|
|
|
|
</div>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="wrapper-footer">
|
|
|
|
|
<n-button type="info" @click="handleSumbit"> 确认 </n-button>
|
|
|
|
|
<n-button type="info" @click="handleSumbit"> 确定 </n-button>
|
|
|
|
|
<n-button secondary style="margin-left: 15px" @click="closeModal">
|
|
|
|
|
取消
|
|
|
|
|
</n-button>
|
|
|
|
@ -376,6 +375,7 @@ const rightInputHandler = debounce((keyword) => {
|
|
|
|
|
&-title {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #333333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-bar {
|
|
|
|
@ -416,6 +416,8 @@ const rightInputHandler = debounce((keyword) => {
|
|
|
|
|
height: 800px;
|
|
|
|
|
--n-padding-bottom: 20px;
|
|
|
|
|
--n-padding-left: 24px;
|
|
|
|
|
--n-padding-right: 24px;
|
|
|
|
|
--n-padding-top: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.textbtnStyle {
|
|
|
|
@ -426,6 +428,7 @@ const rightInputHandler = debounce((keyword) => {
|
|
|
|
|
.draggable-ul {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
background: #f8f8f8;
|
|
|
|
|
|
|
|
|
|
.draggable-li {
|
|
|
|
|
width: 100%;
|
|
|
|
@ -449,14 +452,22 @@ const rightInputHandler = debounce((keyword) => {
|
|
|
|
|
--n-padding-top: 0px;
|
|
|
|
|
--n-padding-bottom: 12px;
|
|
|
|
|
}
|
|
|
|
|
::v-deep(.n-card > .n-card-header .n-card-header__main){
|
|
|
|
|
::v-deep(.n-card > .n-card-header .n-card-header__main) {
|
|
|
|
|
font-weight: lighter !important;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
::v-deep(.n-scrollbar){
|
|
|
|
|
::v-deep(.n-scrollbar) {
|
|
|
|
|
border-top: none !important;
|
|
|
|
|
}
|
|
|
|
|
::v-deep(.n-button--info-type){
|
|
|
|
|
background: #507AFD !important;
|
|
|
|
|
::v-deep(.n-button--info-type) {
|
|
|
|
|
background: #507afd !important;
|
|
|
|
|
}
|
|
|
|
|
::v-deep(.n-card__footer) {
|
|
|
|
|
padding: 0 16px 16px 16px !important;
|
|
|
|
|
}
|
|
|
|
|
::v-deep(.n-button--default-type) {
|
|
|
|
|
border: 1px solid #cad2dd !important;
|
|
|
|
|
color: #333333;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|