|
|
@ -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>
|
|
|
|
|
|
|
|
|
|
|
|