@@ -79,7 +88,9 @@
- {{
+ {{
$t('common.delete')
}}
@@ -119,6 +130,7 @@ import ParagraphDialog from '@/views/paragraph/component/ParagraphDialog.vue'
import SelectDocumentDialog from '@/views/paragraph/component/SelectDocumentDialog.vue'
import { MsgSuccess, MsgConfirm } from '@/utils/message'
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
+import permissionMap from '@/permission'
import { t } from '@/locales'
const props = defineProps<{
data: any
@@ -127,6 +139,8 @@ const props = defineProps<{
showMoveDown?: boolean
}>()
+console.log(props)
+
const route = useRoute()
const {
params: { id, documentId },
@@ -137,6 +151,10 @@ const apiType = computed(() => {
return type as 'systemShare' | 'workspace' | 'systemManage'
})
+const permissionPrecise = computed (() => {
+ return permissionMap['knowledge'][apiType.value]
+})
+
const emit = defineEmits(['clickCard','changeState', 'deleteParagraph', 'refresh', 'refreshMigrateParagraph','move'])
const loading = ref(false)
const changeStateloading = ref(false)
@@ -202,7 +220,11 @@ function editParagraph(row: any) {
}
}
+const cardClick = permissionPrecise.value.doc_edit(id)
+
function handleClickCard(row: any) {
+ if (!cardClick)
+ {return }
if (!props.disabled) {
editParagraph(row)
}else {
diff --git a/ui/src/views/paragraph/index.vue b/ui/src/views/paragraph/index.vue
index ea511c53e..43f4f34e5 100644
--- a/ui/src/views/paragraph/index.vue
+++ b/ui/src/views/paragraph/index.vue
@@ -12,7 +12,7 @@
>)
-