发布 v1.10 #5
@@ -274,6 +274,8 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
const pageDataRef = ref();
|
const pageDataRef = ref();
|
||||||
const saveDialog = ref();
|
const saveDialog = ref();
|
||||||
|
const selectedCategoryId = ref<number | string>('');
|
||||||
|
const searchKeyword = ref('');
|
||||||
const dictStore = useDictStore();
|
const dictStore = useDictStore();
|
||||||
const headerButtons = [
|
const headerButtons = [
|
||||||
{
|
{
|
||||||
@@ -343,11 +345,18 @@ async function updateVisibilityScope(
|
|||||||
updatingScopeId.value = null;
|
updatingScopeId.value = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSearch = (params: string) => {
|
function applyFilters() {
|
||||||
pageDataRef.value.setQuery({ title: params, isQueryOr: true });
|
pageDataRef.value?.setQuery({
|
||||||
};
|
categoryId: selectedCategoryId.value || undefined,
|
||||||
function reset() {
|
title: searchKeyword.value || undefined,
|
||||||
pageDataRef.value.setQuery({});
|
});
|
||||||
|
}
|
||||||
|
function handleSearch(keyword: string) {
|
||||||
|
searchKeyword.value = keyword;
|
||||||
|
applyFilters();
|
||||||
|
}
|
||||||
|
function reloadCurrentList() {
|
||||||
|
pageDataRef.value?.reload?.();
|
||||||
}
|
}
|
||||||
function showDialog(row: any, importMode = false) {
|
function showDialog(row: any, importMode = false) {
|
||||||
saveDialog.value.openDialog({ ...row }, importMode);
|
saveDialog.value.openDialog({ ...row }, importMode);
|
||||||
@@ -968,7 +977,8 @@ const formRules = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function changeCategory(category: any) {
|
function changeCategory(category: any) {
|
||||||
pageDataRef.value.setQuery({ categoryId: category.id });
|
selectedCategoryId.value = category?.id ?? '';
|
||||||
|
applyFilters();
|
||||||
}
|
}
|
||||||
function showControlDialog(item: any) {
|
function showControlDialog(item: any) {
|
||||||
formRef.value?.resetFields();
|
formRef.value?.resetFields();
|
||||||
@@ -1046,7 +1056,7 @@ function handleHeaderButtonClick(data: any) {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex h-full flex-col gap-6 p-6">
|
<div class="flex h-full flex-col gap-6 p-6">
|
||||||
<WorkflowModal ref="saveDialog" @reload="reset" />
|
<WorkflowModal ref="saveDialog" @reload="reloadCurrentList" />
|
||||||
<ElDialog
|
<ElDialog
|
||||||
v-model="apiInstructionVisible"
|
v-model="apiInstructionVisible"
|
||||||
:title="$t('aiWorkflow.apiInstruction')"
|
:title="$t('aiWorkflow.apiInstruction')"
|
||||||
@@ -1080,6 +1090,7 @@ function handleHeaderButtonClick(data: any) {
|
|||||||
<PageSide
|
<PageSide
|
||||||
label-key="categoryName"
|
label-key="categoryName"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
|
:default-selected="selectedCategoryId"
|
||||||
:menus="sideList"
|
:menus="sideList"
|
||||||
:control-btns="controlBtns"
|
:control-btns="controlBtns"
|
||||||
:footer-button="footerButton"
|
:footer-button="footerButton"
|
||||||
|
|||||||
Reference in New Issue
Block a user