mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-29 07:52:50 +00:00
style: 优化样式
This commit is contained in:
parent
cfbb7417ee
commit
723b8b5b02
|
|
@ -175,6 +175,9 @@ class ChatSerializers(serializers.Serializer):
|
|||
'problem_padding') else ""
|
||||
paragraph_list = details.get('search_step').get(
|
||||
'paragraph_list') if 'search_step' in details and 'paragraph_list' in details.get('search_step') else []
|
||||
for key, node in details.items():
|
||||
if node.get('type') == 'search-dataset-node':
|
||||
paragraph_list = node.get('paragraph_list')
|
||||
improve_paragraph_list = row.get('improve_paragraph_list')
|
||||
vote_status_map = {'-1': '未投票', '0': '赞同', '1': '反对'}
|
||||
return [str(row.get('chat_id')), row.get('abstract'), row.get('problem_text'), padding_problem_text,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="chat-embed layout-bg" v-loading="loading">
|
||||
<el-dialog
|
||||
v-model="isPasswordDialogVisible"
|
||||
width="480"
|
||||
width="300"
|
||||
title="请输入密码打开链接"
|
||||
custom-class="no-close-button"
|
||||
:close-on-click-modal="false"
|
||||
|
|
@ -25,30 +25,31 @@
|
|||
>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<div v-if="isAuthenticated">
|
||||
<div class="chat-embed__header" :class="!isDefaultTheme ? 'custom-header' : ''">
|
||||
<div class="chat-width flex align-center">
|
||||
<div class="mr-12 ml-24 flex">
|
||||
<AppAvatar
|
||||
v-if="isAppIcon(applicationDetail?.icon)"
|
||||
shape="square"
|
||||
:size="32"
|
||||
style="background: none"
|
||||
>
|
||||
<img :src="applicationDetail?.icon" alt="" />
|
||||
</AppAvatar>
|
||||
<AppAvatar
|
||||
v-else-if="applicationDetail?.name"
|
||||
:name="applicationDetail?.name"
|
||||
pinyinColor
|
||||
shape="square"
|
||||
:size="32"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<h4>{{ applicationDetail?.name }}</h4>
|
||||
<div class="chat-embed__header" :class="!isDefaultTheme ? 'custom-header' : ''">
|
||||
<div class="chat-width flex align-center">
|
||||
<div class="mr-12 ml-24 flex">
|
||||
<AppAvatar
|
||||
v-if="isAppIcon(applicationDetail?.icon)"
|
||||
shape="square"
|
||||
:size="32"
|
||||
style="background: none"
|
||||
>
|
||||
<img :src="applicationDetail?.icon" alt="" />
|
||||
</AppAvatar>
|
||||
<AppAvatar
|
||||
v-else-if="applicationDetail?.name"
|
||||
:name="applicationDetail?.name"
|
||||
pinyinColor
|
||||
shape="square"
|
||||
:size="32"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<h4>{{ applicationDetail?.name }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isAuthenticated">
|
||||
<div class="chat-embed__main">
|
||||
<AiChat
|
||||
ref="AiChatRef"
|
||||
|
|
@ -169,7 +170,8 @@ const validateName = (rule: any, value: string, callback: any) => {
|
|||
.validatePassword(applicationDetail?.value.id, form.value.password, validateLoading)
|
||||
.then((res: any) => {
|
||||
if (res?.data.is_valid) {
|
||||
callback()
|
||||
isAuthenticated.value = true
|
||||
isPasswordDialogVisible.value = false
|
||||
} else {
|
||||
callback(new Error('密码错误'))
|
||||
}
|
||||
|
|
@ -182,12 +184,7 @@ const rules = reactive({
|
|||
|
||||
const submitHandle = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate((valid) => {
|
||||
if (valid) {
|
||||
isAuthenticated.value = true
|
||||
isPasswordDialogVisible.value = false
|
||||
}
|
||||
})
|
||||
await formEl.validate((valid) => {})
|
||||
}
|
||||
|
||||
const paginationConfig = reactive({
|
||||
|
|
@ -416,3 +413,8 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-overlay) {
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -25,30 +25,29 @@
|
|||
>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<div v-if="isAuthenticated">
|
||||
<div class="chat-pc__header" :class="!isDefaultTheme ? 'custom-header' : ''">
|
||||
<div class="flex align-center">
|
||||
<div class="mr-12 ml-24 flex">
|
||||
<AppAvatar
|
||||
v-if="isAppIcon(applicationDetail?.icon)"
|
||||
shape="square"
|
||||
:size="32"
|
||||
style="background: none"
|
||||
>
|
||||
<img :src="applicationDetail?.icon" alt="" />
|
||||
</AppAvatar>
|
||||
<AppAvatar
|
||||
v-else-if="applicationDetail?.name"
|
||||
:name="applicationDetail?.name"
|
||||
pinyinColor
|
||||
shape="square"
|
||||
:size="32"
|
||||
/>
|
||||
</div>
|
||||
<h4>{{ applicationDetail?.name }}</h4>
|
||||
<div class="chat-pc__header" :class="!isDefaultTheme ? 'custom-header' : ''">
|
||||
<div class="flex align-center">
|
||||
<div class="mr-12 ml-24 flex">
|
||||
<AppAvatar
|
||||
v-if="isAppIcon(applicationDetail?.icon)"
|
||||
shape="square"
|
||||
:size="32"
|
||||
style="background: none"
|
||||
>
|
||||
<img :src="applicationDetail?.icon" alt="" />
|
||||
</AppAvatar>
|
||||
<AppAvatar
|
||||
v-else-if="applicationDetail?.name"
|
||||
:name="applicationDetail?.name"
|
||||
pinyinColor
|
||||
shape="square"
|
||||
:size="32"
|
||||
/>
|
||||
</div>
|
||||
<h4>{{ applicationDetail?.name }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isAuthenticated">
|
||||
<div class="flex">
|
||||
<div class="chat-pc__left border-r">
|
||||
<div class="p-24 pb-0">
|
||||
|
|
@ -193,7 +192,8 @@ const validateName = (rule: any, value: string, callback: any) => {
|
|||
.validatePassword(applicationDetail?.value.id, form.value.password, validateLoading)
|
||||
.then((res: any) => {
|
||||
if (res?.data.is_valid) {
|
||||
callback()
|
||||
isAuthenticated.value = true
|
||||
isPasswordDialogVisible.value = false
|
||||
} else {
|
||||
callback(new Error('密码错误'))
|
||||
}
|
||||
|
|
@ -206,12 +206,7 @@ const rules = reactive({
|
|||
|
||||
const submitHandle = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate((valid) => {
|
||||
if (valid) {
|
||||
isAuthenticated.value = true
|
||||
isPasswordDialogVisible.value = false
|
||||
}
|
||||
})
|
||||
await formEl.validate((valid) => {})
|
||||
}
|
||||
|
||||
const classObj = computed(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue