fix(paragraph): bug fix
This commit is contained in:
parent
695773df7d
commit
555091aa5d
@ -6,55 +6,56 @@
|
||||
@mouseleave="cardLeave()"
|
||||
>
|
||||
<h2 class="mb-16">{{ data.title || '-' }}</h2>
|
||||
<el-card
|
||||
v-show="show"
|
||||
class="paragraph-box-operation mt-8 mr-8"
|
||||
shadow="always"
|
||||
style="--el-card-padding: 8px 12px; --el-card-border-radius: 8px"
|
||||
>
|
||||
<el-switch
|
||||
:loading="changeStateloading"
|
||||
v-model="data.is_active"
|
||||
:before-change="() => changeState(data)"
|
||||
size="small"
|
||||
/>
|
||||
<div v-show="show" class="mk-sticky">
|
||||
<el-card
|
||||
class="paragraph-box-operation mt-8 mr-8"
|
||||
shadow="always"
|
||||
style="--el-card-padding: 8px 12px; --el-card-border-radius: 8px"
|
||||
>
|
||||
<el-switch
|
||||
:loading="changeStateloading"
|
||||
v-model="data.is_active"
|
||||
:before-change="() => changeState(data)"
|
||||
size="small"
|
||||
/>
|
||||
|
||||
<el-divider direction="vertical" />
|
||||
<span class="mr-8">
|
||||
<el-button link @click="editParagraph(data)">
|
||||
<el-icon :size="16" :title="$t('views.applicationWorkflow.control.zoomOut')">
|
||||
<EditPen />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</span>
|
||||
<span class="mr-8">
|
||||
<el-button link>
|
||||
<el-icon :size="16" :title="$t('views.applicationWorkflow.control.zoomOut')">
|
||||
<el-icon><CirclePlus /></el-icon>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</span>
|
||||
<el-dropdown trigger="click" :teleported="false">
|
||||
<el-button text>
|
||||
<el-icon><MoreFilled /></el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="openGenerateDialog(data)">
|
||||
<el-icon><Connection /></el-icon>
|
||||
{{ $t('views.document.generateQuestion.title') }}</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item @click="openSelectDocumentDialog(data)">
|
||||
<AppIcon iconName="app-migrate"></AppIcon>
|
||||
{{ $t('views.document.setting.migration') }}</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item icon="Delete" @click.stop="deleteParagraph(data)">{{
|
||||
$t('common.delete')
|
||||
}}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</el-card>
|
||||
<el-divider direction="vertical" />
|
||||
<span class="mr-8">
|
||||
<el-button link @click="editParagraph(data)">
|
||||
<el-icon :size="16" :title="$t('views.applicationWorkflow.control.zoomOut')">
|
||||
<EditPen />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</span>
|
||||
<span class="mr-8">
|
||||
<el-button link>
|
||||
<el-icon :size="16" :title="$t('views.applicationWorkflow.control.zoomOut')">
|
||||
<el-icon><CirclePlus /></el-icon>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</span>
|
||||
<el-dropdown trigger="click" :teleported="false">
|
||||
<el-button text>
|
||||
<el-icon><MoreFilled /></el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="openGenerateDialog(data)">
|
||||
<el-icon><Connection /></el-icon>
|
||||
{{ $t('views.document.generateQuestion.title') }}</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item @click="openSelectDocumentDialog(data)">
|
||||
<AppIcon iconName="app-migrate"></AppIcon>
|
||||
{{ $t('views.document.setting.migration') }}</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item icon="Delete" @click.stop="deleteParagraph(data)">{{
|
||||
$t('common.delete')
|
||||
}}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</el-card>
|
||||
</div>
|
||||
<MdPreview
|
||||
ref="editorRef"
|
||||
editorId="preview-only"
|
||||
@ -177,6 +178,16 @@ function refreshMigrateParagraph() {}
|
||||
overflow: inherit;
|
||||
border: 1px solid #dee0e3;
|
||||
z-index: 10;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.mk-sticky {
|
||||
height: 0;
|
||||
position: sticky;
|
||||
right: 0;
|
||||
top: 0;
|
||||
overflow: inherit;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
@click="handleClick"
|
||||
>
|
||||
<template v-for="(item, index) in paragraphDetail" :key="item.id">
|
||||
<el-anchor-link :href="`#${item.id}`" :title="item.title" v-if="item.title" />
|
||||
<el-anchor-link :href="`#m${item.id}`" :title="item.title" v-if="item.title" />
|
||||
</template>
|
||||
</el-anchor>
|
||||
</div>
|
||||
@ -83,9 +83,9 @@
|
||||
ghostClass="ghost"
|
||||
>
|
||||
<template v-for="(item, index) in paragraphDetail" :key="item.id">
|
||||
<div style="display: flex; margin-bottom: 16px">
|
||||
<div :id="`m${item.id}`" style="display: flex; margin-bottom: 16px">
|
||||
<!-- 批量操作 -->
|
||||
<div class="paragraph-card flex" :id="item.id" v-if="isBatch === true">
|
||||
<div class="paragraph-card flex" v-if="isBatch === true">
|
||||
<el-checkbox :value="item.id" />
|
||||
<ParagraphCard :data="item" class="mb-8 w-full" />
|
||||
</div>
|
||||
@ -167,8 +167,9 @@ const title = ref('')
|
||||
const search = ref('')
|
||||
const searchType = ref('title')
|
||||
|
||||
const handleClick = (e: MouseEvent) => {
|
||||
const handleClick = (e: MouseEvent, ele: any) => {
|
||||
e.preventDefault()
|
||||
document.querySelector(`${ele}`).scrollIntoView({ behavior: 'smooth', block: 'start' })
|
||||
}
|
||||
|
||||
// 批量操作
|
||||
|
||||
@ -607,9 +607,11 @@ const title = ref('')
|
||||
const SelectknowledgeDialogRef = ref()
|
||||
|
||||
const exportDocument = (document: any) => {
|
||||
documentApi.exportDocument(document.name, document.knowledge_id, document.id, loading).then(() => {
|
||||
MsgSuccess(t('common.exportSuccess'))
|
||||
})
|
||||
documentApi
|
||||
.exportDocument(document.name, document.knowledge_id, document.id, loading)
|
||||
.then(() => {
|
||||
MsgSuccess(t('common.exportSuccess'))
|
||||
})
|
||||
}
|
||||
const exportDocumentZip = (document: any) => {
|
||||
documentApi
|
||||
@ -717,8 +719,7 @@ const closeInterval = () => {
|
||||
}
|
||||
|
||||
function syncDocument(row: any) {
|
||||
console.log('row', row)
|
||||
if (row.type === '1') {
|
||||
if (+row.type === 1) {
|
||||
syncWebDocument(row)
|
||||
} else {
|
||||
syncLarkDocument(row)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user