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