Merge branch 'main' of github.com:1Panel-dev/MaxKB

This commit is contained in:
shaohuzhang1 2024-04-15 16:02:25 +08:00
commit 117863ed4c
11 changed files with 16 additions and 32 deletions

1
.gitignore vendored
View File

@ -180,3 +180,4 @@ apps/static
models/ models/
data data
.dev .dev
poetry.lock

View File

@ -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):

View File

@ -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

View File

@ -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")

View File

@ -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()

View File

@ -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 {

View File

@ -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);

View File

@ -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 = {

View File

@ -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">

View File

@ -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)
}) })
} }