Merge branch 'main' of github.com:1Panel-dev/MaxKB
This commit is contained in:
commit
117863ed4c
1
.gitignore
vendored
1
.gitignore
vendored
@ -180,3 +180,4 @@ apps/static
|
|||||||
models/
|
models/
|
||||||
data
|
data
|
||||||
.dev
|
.dev
|
||||||
|
poetry.lock
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class FunctionField(serializers.Field):
|
|||||||
|
|
||||||
def to_internal_value(self, data):
|
def to_internal_value(self, data):
|
||||||
if not callable(data):
|
if not callable(data):
|
||||||
self.fail('不是一個函數', value=data)
|
self.fail('不是一个函數', value=data)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def to_representation(self, value):
|
def to_representation(self, value):
|
||||||
|
|||||||
@ -6,8 +6,8 @@ EMAIL_HOST: ${EMAIL_HOST}
|
|||||||
EMAIL_PORT: ${EMAIL_PORT}
|
EMAIL_PORT: ${EMAIL_PORT}
|
||||||
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
|
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
|
||||||
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
|
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
|
||||||
#
|
|
||||||
# # 数据库链接信息
|
# 数据库链接信息
|
||||||
DB_NAME: maxkb
|
DB_NAME: maxkb
|
||||||
DB_HOST: 127.0.0.1
|
DB_HOST: 127.0.0.1
|
||||||
DB_PORT: 5432
|
DB_PORT: 5432
|
||||||
|
|||||||
2
main.py
2
main.py
@ -18,7 +18,7 @@ django.setup()
|
|||||||
def collect_static():
|
def collect_static():
|
||||||
"""
|
"""
|
||||||
收集静态文件到指定目录
|
收集静态文件到指定目录
|
||||||
本项目主要是将前端vue/dist的前段项目放到静态目录下面
|
本项目主要是将前端vue/dist的前端项目放到静态目录下面
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
logging.info("Collect static files")
|
logging.info("Collect static files")
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import ResetPassword from './ResetPasssword.vue'
|
import ResetPassword from './ResetPassword.vue'
|
||||||
import AboutDialog from './AboutDialog.vue'
|
import AboutDialog from './AboutDialog.vue'
|
||||||
const { user } = useStore()
|
const { user } = useStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|||||||
@ -332,8 +332,8 @@ h4 {
|
|||||||
|
|
||||||
/* tag */
|
/* tag */
|
||||||
.default-tag {
|
.default-tag {
|
||||||
background: var(--tag-deflaut-bg);
|
background: var(--tag-default-bg);
|
||||||
color: var(--tag-deflaut-color);
|
color: var(--tag-default-color);
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.success-tag {
|
.success-tag {
|
||||||
|
|||||||
@ -24,8 +24,8 @@
|
|||||||
--sidebar-bg-color: #ffffff;
|
--sidebar-bg-color: #ffffff;
|
||||||
--sidebar-width: 240px;
|
--sidebar-width: 240px;
|
||||||
/** tag */
|
/** tag */
|
||||||
--tag-deflaut-bg: rgba(51, 112, 255, 0.2);
|
--tag-default-bg: rgba(51, 112, 255, 0.2);
|
||||||
--tag-deflaut-color: #2b5fd9;
|
--tag-default-color: #2b5fd9;
|
||||||
--tag-success-bg: rgba(52, 199, 36, 0.2);
|
--tag-success-bg: rgba(52, 199, 36, 0.2);
|
||||||
--tag-success-color: #2ca91f;
|
--tag-success-color: #2ca91f;
|
||||||
--tag-warning-bg: rgba(255, 136, 0, 0.2);
|
--tag-warning-bg: rgba(255, 136, 0, 0.2);
|
||||||
|
|||||||
@ -40,26 +40,26 @@ export const MsgError = (message: string) => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除知识库
|
* 删除知识库
|
||||||
* @param 参数 message: {title, decription,type}
|
* @param 参数 message: {title, description,type}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const MsgConfirm = (title: string, decription: string, options?: any) => {
|
export const MsgConfirm = (title: string, description: string, options?: any) => {
|
||||||
const defaultOptions: Object = {
|
const defaultOptions: Object = {
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
...options
|
...options
|
||||||
}
|
}
|
||||||
return ElMessageBox.confirm(decription, title, defaultOptions)
|
return ElMessageBox.confirm(description, title, defaultOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
// export const MsgConfirm = ({ title, decription }: any, options?: any) => {
|
// export const MsgConfirm = ({ title, description }: any, options?: any) => {
|
||||||
// const message: any = h('div', { class: 'app-confirm' }, [
|
// const message: any = h('div', { class: 'app-confirm' }, [
|
||||||
// h('h4', { class: 'app-confirm-title flex align-center' }, [
|
// h('h4', { class: 'app-confirm-title flex align-center' }, [
|
||||||
// h(ElIcon, { class: 'icon' }, [h(WarningFilled)]),
|
// h(ElIcon, { class: 'icon' }, [h(WarningFilled)]),
|
||||||
// h('span', { class: 'ml-16' }, title)
|
// h('span', { class: 'ml-16' }, title)
|
||||||
// ]),
|
// ]),
|
||||||
// h('div', { class: 'app-confirm-decription mt-8' }, decription)
|
// h('div', { class: 'app-confirm-description mt-8' }, description)
|
||||||
// ])
|
// ])
|
||||||
|
|
||||||
// const defaultOptions: Object = {
|
// const defaultOptions: Object = {
|
||||||
|
|||||||
@ -3,23 +3,6 @@
|
|||||||
<template #backButton>
|
<template #backButton>
|
||||||
<back-button @click="back"></back-button>
|
<back-button @click="back"></back-button>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template #header>
|
|
||||||
<el-steps :active="active" finish-status="success" align-center class="create-dataset__steps">
|
|
||||||
<el-step v-for="(item, index) in steps" :key="index">
|
|
||||||
<template #icon>
|
|
||||||
<div class="app-step flex align-center">
|
|
||||||
<div class="el-step__icon is-text">
|
|
||||||
<div class="el-step__icon-inner">
|
|
||||||
<el-icon v-if="active == index + 1" style="margin-top: 1px"><Select /></el-icon>
|
|
||||||
<span v-else> {{ index + 1 }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<span class="ml-4">{{ item.name }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-step>
|
|
||||||
</el-steps>
|
|
||||||
</template> -->
|
|
||||||
<div class="create-dataset__main flex" v-loading="loading">
|
<div class="create-dataset__main flex" v-loading="loading">
|
||||||
<div class="create-dataset__component main-calc-height">
|
<div class="create-dataset__component main-calc-height">
|
||||||
<template v-if="active === 0">
|
<template v-if="active === 0">
|
||||||
|
|||||||
@ -172,7 +172,7 @@ function getDocument() {
|
|||||||
cloneDocumentList.value = res.data
|
cloneDocumentList.value = res.data
|
||||||
documentList.value = res.data
|
documentList.value = res.data
|
||||||
currentDocument.value = cloneDocumentList.value?.length > 0 ? cloneDocumentList.value[0].id : ''
|
currentDocument.value = cloneDocumentList.value?.length > 0 ? cloneDocumentList.value[0].id : ''
|
||||||
getParagraphList(currentDocument.value)
|
currentDocument.value && getParagraphList(currentDocument.value)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user