diff --git a/ui/src/views/paragraph/component/ParagraphCard.vue b/ui/src/views/paragraph/component/ParagraphCard.vue index 0b98c3877..85ee997a1 100644 --- a/ui/src/views/paragraph/component/ParagraphCard.vue +++ b/ui/src/views/paragraph/component/ParagraphCard.vue @@ -169,9 +169,13 @@ const props = defineProps<{ const route = useRoute() const { params: { id, documentId }, - query: { from }, + query: { from, isShared }, } = route as any +const shareDisabled = computed(() => { + return isShared === 'true' +}) + const apiType = computed(() => { return from as 'systemShare' | 'workspace' | 'systemManage' }) @@ -223,7 +227,7 @@ async function changeState(row: any) { }) } function getDetail() { - loadSharedApi({ type: 'knowledge', systemType: apiType.value }) + loadSharedApi({ type: 'knowledge', systemType: apiType.value, isShared: shareDisabled.value}) .getKnowledgeDetail(id, loading) .then((res: any) => { knowledgeDetail.value = res.data diff --git a/ui/src/views/paragraph/component/SelectDocumentDialog.vue b/ui/src/views/paragraph/component/SelectDocumentDialog.vue index 26c2c0e36..29305b1a1 100644 --- a/ui/src/views/paragraph/component/SelectDocumentDialog.vue +++ b/ui/src/views/paragraph/component/SelectDocumentDialog.vue @@ -37,8 +37,13 @@ const props = defineProps<{ const route = useRoute() const { params: { id, documentId }, // id为knowledgeID + query: { from, isShared }, } = route as any +const shareDisabled = computed(() => { + return isShared === 'true' +}) + const emit = defineEmits(['refresh']) const SelectKnowledgeDocumentRef = ref() const knowledgeDetail = ref({}) @@ -80,7 +85,7 @@ const submitForm = async () => { } function getDetail() { - loadSharedApi({ type: 'knowledge', systemType: props.apiType }) + loadSharedApi({ type: 'knowledge', systemType: props.apiType, isShared: shareDisabled.value }) .getKnowledgeDetail(id, loading) .then((res: any) => { knowledgeDetail.value = res.data diff --git a/ui/src/views/paragraph/index.vue b/ui/src/views/paragraph/index.vue index be4be242e..fd007c5ab 100644 --- a/ui/src/views/paragraph/index.vue +++ b/ui/src/views/paragraph/index.vue @@ -352,7 +352,7 @@ function getDetail() { documentDetail.value = res.data }) - loadSharedApi({ type: 'knowledge', isShared: isShared.value, systemType: apiType.value }) + loadSharedApi({ type: 'knowledge', isShared: shareDisabled.value, systemType: apiType.value }) .getKnowledgeDetail(id, loading) .then((res: any) => { knowledgeDetail.value = res.data