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

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

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

Loading…
Cancel
Save