feat: paragraph
This commit is contained in:
parent
980a27bb74
commit
06216b1596
@ -12,7 +12,11 @@
|
|||||||
:modelValue="data.content"
|
:modelValue="data.content"
|
||||||
class="maxkb-md"
|
class="maxkb-md"
|
||||||
/>
|
/>
|
||||||
<el-card shadow="always" style="--el-card-padding: 8px 12px; --el-card-border-radius: 8px">
|
<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
|
<el-switch
|
||||||
:loading="changeStateloading"
|
:loading="changeStateloading"
|
||||||
v-model="data.is_active"
|
v-model="data.is_active"
|
||||||
@ -21,11 +25,20 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<el-divider direction="vertical" />
|
<el-divider direction="vertical" />
|
||||||
<el-button link>
|
<span class="mr-8">
|
||||||
<el-icon :size="16" :title="$t('views.applicationWorkflow.control.zoomOut')"
|
<el-button link @click="editParagraph(data)">
|
||||||
><ZoomOut
|
<el-icon :size="16" :title="$t('views.applicationWorkflow.control.zoomOut')">
|
||||||
/></el-icon>
|
<EditPen />
|
||||||
</el-button>
|
</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">
|
<el-dropdown trigger="click">
|
||||||
<el-button text>
|
<el-button text>
|
||||||
<el-icon><MoreFilled /></el-icon>
|
<el-icon><MoreFilled /></el-icon>
|
||||||
@ -47,6 +60,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<ParagraphDialog ref="ParagraphDialogRef" :title="title" @refresh="refresh" />
|
||||||
|
<SelectDocumentDialog ref="SelectDocumentDialogRef" @refresh="refreshMigrateParagraph" />
|
||||||
|
<GenerateRelatedDialog ref="GenerateRelatedDialogRef" @refresh="refresh" />
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -55,6 +71,8 @@ import { useRoute } from 'vue-router'
|
|||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import GenerateRelatedDialog from '@/components/generate-related-dialog/index.vue'
|
import GenerateRelatedDialog from '@/components/generate-related-dialog/index.vue'
|
||||||
|
import ParagraphDialog from '@/views/paragraph/component/ParagraphDialog.vue'
|
||||||
|
import SelectDocumentDialog from '@/views/paragraph/component/SelectDocumentDialog.vue'
|
||||||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||||
const { paragraph } = useStore()
|
const { paragraph } = useStore()
|
||||||
|
|
||||||
@ -66,7 +84,6 @@ const props = defineProps<{
|
|||||||
data: any
|
data: any
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const SelectDocumentDialogRef = ref()
|
|
||||||
const changeStateloading = ref(false)
|
const changeStateloading = ref(false)
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
// card上面存在dropdown菜单
|
// card上面存在dropdown菜单
|
||||||
@ -103,10 +120,10 @@ function openGenerateDialog(row: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function openSelectDocumentDialog(row?: any) {
|
function openSelectDocumentDialog(row?: any) {
|
||||||
// if (row) {
|
// if (row) {
|
||||||
// multipleSelection.value = [row.id]
|
// multipleSelection.value = [row.id]
|
||||||
// }
|
// }
|
||||||
// SelectDocumentDialogRef.value.open(multipleSelection.value)
|
// SelectDocumentDialogRef.value.open(multipleSelection.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteParagraph(row: any) {
|
function deleteParagraph(row: any) {
|
||||||
@ -127,15 +144,33 @@ function deleteParagraph(row: any) {
|
|||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
const SelectDocumentDialogRef = ref()
|
||||||
|
const ParagraphDialogRef = ref()
|
||||||
|
const title = ref('')
|
||||||
|
function editParagraph(row: any) {
|
||||||
|
title.value = t('views.paragraph.paragraphDetail')
|
||||||
|
ParagraphDialogRef.value.open(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
function refresh() {}
|
||||||
|
|
||||||
|
function refreshMigrateParagraph() {}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.paragraph-box {
|
.paragraph-box {
|
||||||
background: var(--app-layout-bg-color);
|
background: var(--app-layout-bg-color);
|
||||||
border: 1px solid #ffffff;
|
border: 1px solid #ffffff;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
|
position: relative;
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(31, 35, 41, 0.1);
|
background: rgba(31, 35, 41, 0.1);
|
||||||
border: 1px solid #dee0e3;
|
border: 1px solid #dee0e3;
|
||||||
}
|
}
|
||||||
|
.paragraph-box-operation {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
border: 1px solid #dee0e3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user