feat: 多选样式一致,修复高级筛选流程操作问题

bak
刘释隆 1 year ago
parent 4b64a4c25f
commit 21301dccc0

@ -54,4 +54,17 @@ const getThemeOverrides = computed(() => {
</NConfigProvider>
</template>
<style lang="less"></style>
<style lang="less">
.n-checkbox .n-checkbox__label{
color: #666666 !important;
font-size: 14px !important;
}
.n-checkbox.n-checkbox--disabled .n-checkbox__label{
color: #c9c9c9 !important;
font-size: 14px !important;
}
.draggable-ul .draggable-li{
color: #666666 !important;
font-size: 14px !important;
}
</style>

@ -1,18 +1,23 @@
<script lang="ts" setup>
import { useTaskStore } from "@/store/modules/task";
import { debounce } from "lodash-es";
import { computed, onMounted, ref, unref, watch,shallowRef } from "vue";
import { computed, onMounted, ref, unref, watch, shallowRef } from "vue";
import CustomFieldModal from "../modal/CustomFieldModal.vue";
import type { AsideEntity } from '@/config/aside'
import type { AsideEntity } from "@/config/aside";
import { useUser } from "@/store/modules/user";
import { getAllfieldList, getfieldList, savefield } from "@/api/home/filter";
import TaskList from "./TaskList.vue";
import AdvanceFilter from '../../home/aside/comp/AdvanceFilter.vue'
import AdvanceFilter from "../../home/aside/comp/AdvanceFilter.vue";
import emitter from '@/utils/mitt'
import {
CustomFilterModalVue,
FilterModalVue,
NewFilterModalVue,
} from "../../home/aside/comp/modals";
import emitter from "@/utils/mitt";
const CustomFieldModalRef = ref(null);
const collapse = ref(false);
@ -118,26 +123,26 @@ onMounted(() => {
// key
function scrollHandler(key: string) {
const element = document.querySelector(`#${key}`)
element?.scrollIntoView(true)
const element = document.querySelector(`#${key}`);
element?.scrollIntoView(true);
}
//
function filterHandler(searchId: string) {
emitter.emit('filter', searchId)
emitter.emit("filter", searchId);
}
function showModal(modalRef: any) {
const modal = unref(modalRef)! as any
modal.showModal()
const modal = unref(modalRef)! as any;
modal.showModal();
}
//
const showItems = shallowRef<{ key: string, config: AsideEntity }[]>([])
const filterModalRef = ref(null)
const newFilterModalRef = ref(null)
const customModalRef = ref(null)
const showItems = shallowRef<{ key: string; config: AsideEntity }[]>([]);
const filterModalRef = ref(null);
const newFilterModalRef = ref(null);
const customModalRef = ref(null);
function editFilter(filter: any) {
const modal = unref(newFilterModalRef)! as any
modal.showModal()
modal.edit(filter)
const modal = unref(newFilterModalRef)! as any;
modal.showModal();
modal.edit(filter);
}
</script>
@ -176,8 +181,12 @@ function editFilter(filter: any) {
</div> -->
<!-- 高级筛选 -->
<AdvanceFilter
v-show="!showSearch" :type="2" @select="filterHandler" @update:search="setShowSearch(true)"
@show-custom="showModal(customModalRef)" @show-filter="showModal(filterModalRef)"
v-show="!showSearch"
:type="2"
@select="filterHandler"
@update:search="setShowSearch(true)"
@show-custom="showModal(CustomFieldModalRef)"
@show-filter="showModal(filterModalRef)"
/>
<div v-show="showSearch" class="warpper">
@ -197,7 +206,6 @@ function editFilter(filter: any) {
@click="setShowSearch(false)"
/>
</div>
</div>
<TaskList
ref="taskListRef"
@ -210,6 +218,14 @@ function editFilter(filter: any) {
:reviewType="reviewType"
@onOk="getshowFieldList"
/>
<!-- 过滤列表 -->
<FilterModalVue
ref="filterModalRef"
@edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)"
/>
<!-- 新增过滤 -->
<NewFilterModalVue ref="newFilterModalRef" />
</div>
</template>

Loading…
Cancel
Save