diff --git a/backend/apps/chat/api/chat.py b/backend/apps/chat/api/chat.py
index 14cfdbf4..459dd050 100644
--- a/backend/apps/chat/api/chat.py
+++ b/backend/apps/chat/api/chat.py
@@ -96,7 +96,7 @@ async def start_chat(session: SessionDep, current_user: CurrentUser):
@router.post("/recommend_questions/{chat_record_id}")
async def recommend_questions(session: SessionDep, current_user: CurrentUser, chat_record_id: int, current_assistant: CurrentAssistant):
try:
- record = session.query(ChatRecord).get(chat_record_id)
+ record = session.get(ChatRecord, chat_record_id)
if not record:
raise HTTPException(
status_code=400,
diff --git a/backend/apps/chat/models/chat_model.py b/backend/apps/chat/models/chat_model.py
index a83c6b07..db72e80d 100644
--- a/backend/apps/chat/models/chat_model.py
+++ b/backend/apps/chat/models/chat_model.py
@@ -151,8 +151,6 @@ class AiModelQuestion(BaseModel):
class ChatQuestion(AiModelQuestion):
question: str = ''
chat_id: int = 0
- assistant_certificate: Optional[str] = None
-
class ChatMcp(ChatQuestion):
token: str = ''
diff --git a/backend/apps/chat/task/llm.py b/backend/apps/chat/task/llm.py
index 02746c15..4194e75f 100644
--- a/backend/apps/chat/task/llm.py
+++ b/backend/apps/chat/task/llm.py
@@ -53,7 +53,6 @@ class LLMService:
session: SessionDep
current_user: CurrentUser
current_assistant: Optional[CurrentAssistant] = None
- assistant_certificate: str
out_ds_instance: Optional[AssistantOutDs] = None
change_title: bool = False
@@ -63,8 +62,6 @@ class LLMService:
self.session = session
self.current_user = current_user
self.current_assistant = current_assistant
- if chat_question.assistant_certificate:
- self.assistant_certificate = chat_question.assistant_certificate
# chat = self.session.query(Chat).filter(Chat.id == chat_question.chat_id).first()
chat_id = chat_question.chat_id
chat: Chat = self.session.get(Chat, chat_id)
diff --git a/backend/apps/system/crud/assistant.py b/backend/apps/system/crud/assistant.py
index 11934f94..45f451e1 100644
--- a/backend/apps/system/crud/assistant.py
+++ b/backend/apps/system/crud/assistant.py
@@ -10,7 +10,7 @@ from apps.datasource.models.datasource import CoreDatasource, DatasourceConf
from apps.system.models.system_model import AssistantModel
from apps.system.schemas.auth import CacheName, CacheNamespace
-from apps.system.schemas.system_schema import AssistantOutDsSchema, UserInfoDTO
+from apps.system.schemas.system_schema import AssistantHeader, AssistantOutDsSchema, UserInfoDTO
from common.core.sqlbot_cache import cache
from common.core.db import engine
from starlette.middleware.cors import CORSMiddleware
@@ -24,9 +24,8 @@ async def get_assistant_info(*, session: Session, assistant_id: int) -> Assistan
def get_assistant_user(*, id: int):
return UserInfoDTO(id=id, account="sqlbot-inner-assistant", oid=1, name="sqlbot-inner-assistant", email="sqlbot-inner-assistant@sqlbot.com")
-# def get_assistant_ds(*, session: Session, assistant: AssistantModel):
def get_assistant_ds(llm_service) -> list[dict]:
- assistant: AssistantModel = llm_service.current_assistant
+ assistant: AssistantHeader = llm_service.current_assistant
session: Session = llm_service.session
type = assistant.type
if type == 0:
@@ -51,7 +50,7 @@ def get_assistant_ds(llm_service) -> list[dict]:
# filter private ds if offline
return result_list
- out_ds_instance: AssistantOutDs = AssistantOutDsFactory.get_instance(assistant, llm_service.assistant_certificate)
+ out_ds_instance: AssistantOutDs = AssistantOutDsFactory.get_instance(assistant)
llm_service.out_ds_instance = out_ds_instance
dslist = out_ds_instance.get_simple_ds_list()
# format?
@@ -84,20 +83,20 @@ def init_dynamic_cors(app: FastAPI):
class AssistantOutDs:
- assistant: AssistantModel
+ assistant: AssistantHeader
ds_list: Optional[list[AssistantOutDsSchema]] = None
certificate: Optional[str] = None
- def __init__(self, assistant: AssistantModel, certificate: Optional[str] = None):
+ def __init__(self, assistant: AssistantHeader):
self.assistant = assistant
self.ds_list = None
- self.certificate = certificate
- self.get_ds_from_api(certificate)
+ self.certificate = assistant.certificate
+ self.get_ds_from_api()
#@cache(namespace=CacheNamespace.EMBEDDED_INFO, cacheName=CacheName.ASSISTANT_DS, keyExpression="current_user.id")
- def get_ds_from_api(self, certificate: Optional[str] = None):
+ def get_ds_from_api(self):
config: dict[any] = json.loads(self.assistant.configuration)
endpoint: str = config['endpoint']
- certificateList: list[any] = json.loads(certificate)
+ certificateList: list[any] = json.loads(self.certificate)
header = {}
cookies = {}
for item in certificateList:
@@ -155,8 +154,8 @@ class AssistantOutDs:
class AssistantOutDsFactory:
@staticmethod
- def get_instance(assistant: AssistantModel, certificate: Optional[str] = None) -> AssistantOutDs:
- return AssistantOutDs(assistant, certificate)
+ def get_instance(assistant: AssistantHeader) -> AssistantOutDs:
+ return AssistantOutDs(assistant)
def get_ds_engine(ds: AssistantOutDsSchema) -> Engine:
timeout: int = 30
diff --git a/backend/apps/system/middleware/auth.py b/backend/apps/system/middleware/auth.py
index db5bc4f3..89c3b1f3 100644
--- a/backend/apps/system/middleware/auth.py
+++ b/backend/apps/system/middleware/auth.py
@@ -9,7 +9,7 @@ from apps.system.models.system_model import AssistantModel
from common.core.db import engine
from apps.system.crud.assistant import get_assistant_info, get_assistant_user
from apps.system.crud.user import get_user_info
-from apps.system.schemas.system_schema import UserInfoDTO
+from apps.system.schemas.system_schema import AssistantHeader, UserInfoDTO
from common.core import security
from common.core.config import settings
from common.core.schemas import TokenPayload
@@ -92,6 +92,7 @@ class TokenMiddleware(BaseHTTPMiddleware):
session_user = get_assistant_user(id = token_data.id)
assistant_info = await get_assistant_info(session=session, assistant_id=payload['assistant_id'])
assistant_info = AssistantModel.model_validate(assistant_info)
+ assistant_info = AssistantHeader.model_validate(assistant_info.model_dump(exclude_unset=True))
return True, session_user, assistant_info
except Exception as e:
return False, e
\ No newline at end of file
diff --git a/backend/apps/system/schemas/system_schema.py b/backend/apps/system/schemas/system_schema.py
index 2183db38..28e30505 100644
--- a/backend/apps/system/schemas/system_schema.py
+++ b/backend/apps/system/schemas/system_schema.py
@@ -71,6 +71,12 @@ class AssistantBase(BaseModel):
class AssistantDTO(AssistantBase, BaseCreatorDTO):
pass
+class AssistantHeader(AssistantDTO):
+ unique: Optional[str] = None
+ certificate: Optional[str] = None
+ online: bool = False
+
+
class AssistantValidator(BaseModel):
valid: bool = False
id_match: bool = False
diff --git a/backend/common/core/deps.py b/backend/common/core/deps.py
index be8d1efb..afc2dc36 100644
--- a/backend/common/core/deps.py
+++ b/backend/common/core/deps.py
@@ -1,9 +1,10 @@
+import base64
from typing import Annotated
+from urllib.parse import unquote
from fastapi import Depends, Request
from sqlmodel import Session
-from apps.system.models.system_model import AssistantModel
-from apps.system.schemas.system_schema import UserInfoDTO
+from apps.system.schemas.system_schema import AssistantHeader, UserInfoDTO
from common.core.db import get_session
from common.utils.locale import I18n
@@ -19,10 +20,14 @@ async def get_current_user(request: Request) -> UserInfoDTO:
CurrentUser = Annotated[UserInfoDTO, Depends(get_current_user)]
-async def get_current_assistant(request: Request) -> AssistantModel | None:
- return request.state.assistant if hasattr(request.state, "assistant") else None
+async def get_current_assistant(request: Request) -> AssistantHeader | None:
+ base_assistant = request.state.assistant if hasattr(request.state, "assistant") else None
+ if request.headers.get("X-SQLBOT-ASSISTANT-CERTIFICATE"):
+ entry_certificate = request.headers['X-SQLBOT-ASSISTANT-CERTIFICATE']
+ base_assistant.certificate = unquote(base64.b64decode(entry_certificate).decode('utf-8'))
+ return base_assistant
-CurrentAssistant = Annotated[AssistantModel, Depends(get_current_assistant)]
+CurrentAssistant = Annotated[AssistantHeader, Depends(get_current_assistant)]
diff --git a/frontend/src/components/layout/Menu.vue b/frontend/src/components/layout/Menu.vue
index 63651691..245da8e2 100644
--- a/frontend/src/components/layout/Menu.vue
+++ b/frontend/src/components/layout/Menu.vue
@@ -74,5 +74,9 @@ const routerList = computed(() => {
color: #1cba90 !important;
}
}
+
+ .ed-sub-menu .ed-icon {
+ margin-right: 8px;
+ }
}
diff --git a/frontend/src/components/layout/Workspace.vue b/frontend/src/components/layout/Workspace.vue
index 748c1d70..38374f66 100644
--- a/frontend/src/components/layout/Workspace.vue
+++ b/frontend/src/components/layout/Workspace.vue
@@ -76,7 +76,9 @@ onMounted(async () => {
- {{ currentWorkspace.name }}
+ {{
+ currentWorkspace.name
+ }}
{
-
+
- 没有找到相关结果
+ {{ $t('model.relevant_results_found') }}
@@ -142,6 +148,7 @@ onMounted(async () => {
font-size: 14px;
line-height: 22px;
margin-left: 8px;
+ max-width: 120px;
}
.expand {
@@ -203,6 +210,7 @@ onMounted(async () => {
font-weight: 400;
font-size: 14px;
line-height: 22px;
+ max-width: 180px;
}
.done {
diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json
index 2f2fe1c8..36f089e8 100644
--- a/frontend/src/i18n/en.json
+++ b/frontend/src/i18n/en.json
@@ -312,6 +312,7 @@
"old_password": "Old password"
},
"workspace": {
+ "relevant_content_found": "No relevant content found",
"add_workspace": "Add workspace",
"administrator": "Administrator",
"ordinary_member": "Ordinary member",
diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json
index 45eaac16..3a2a5ed6 100644
--- a/frontend/src/i18n/zh-CN.json
+++ b/frontend/src/i18n/zh-CN.json
@@ -325,6 +325,7 @@
}
},
"workspace": {
+ "relevant_content_found": "找不到相关内容",
"add_workspace": "添加工作空间",
"administrator": "管理员",
"ordinary_member": "普通成员",
diff --git a/frontend/src/utils/request.ts b/frontend/src/utils/request.ts
index 479c948e..2893d9f0 100644
--- a/frontend/src/utils/request.ts
+++ b/frontend/src/utils/request.ts
@@ -75,6 +75,11 @@ class HttpService {
if (assistantStore.getToken) {
config.headers['X-SQLBOT-ASSISTANT-TOKEN'] = `Assistant ${assistantStore.getToken}`
if (config.headers['X-SQLBOT-TOKEN']) config.headers.delete('X-SQLBOT-TOKEN')
+ if (assistantStore.getType && assistantStore.getCertificate) {
+ config.headers['X-SQLBOT-ASSISTANT-CERTIFICATE'] = btoa(
+ encodeURIComponent(assistantStore.getCertificate)
+ )
+ }
}
const locale = getLocale()
if (locale) {
@@ -239,6 +244,11 @@ class HttpService {
if (assistantStore.getToken) {
heads['X-SQLBOT-ASSISTANT-TOKEN'] = `Assistant ${assistantStore.getToken}`
if (heads['X-SQLBOT-TOKEN']) delete heads['X-SQLBOT-TOKEN']
+ if (assistantStore.getType && assistantStore.getCertificate) {
+ heads['X-SQLBOT-ASSISTANT-CERTIFICATE'] = btoa(
+ encodeURIComponent(assistantStore.getCertificate)
+ )
+ }
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
diff --git a/frontend/src/views/chat/ChatListContainer.vue b/frontend/src/views/chat/ChatListContainer.vue
index 9678fc6d..5231c6dc 100644
--- a/frontend/src/views/chat/ChatListContainer.vue
+++ b/frontend/src/views/chat/ChatListContainer.vue
@@ -103,54 +103,61 @@ function onChatCreated(chat: ChatInfo) {
const chatCreatorRef = ref()
-function goEmpty() {
+function goEmpty(func?: (...p: any[]) => void, ...params: any[]) {
_currentChat.value = new ChatInfo()
_currentChatId.value = undefined
- emits('goEmpty')
+ emits('goEmpty', func, ...params)
}
const createNewChat = async () => {
- if (!_loading.value) {
- goEmpty()
- if (isAssistant.value) {
- const assistantChat = await assistantStore.setChat()
- if (assistantChat) {
- onChatCreated(assistantChat)
- }
- return
- } else {
- chatCreatorRef.value?.showDs()
+ goEmpty(doCreateNewChat)
+}
+
+async function doCreateNewChat() {
+ if (isAssistant.value) {
+ const assistantChat = await assistantStore.setChat()
+ if (assistantChat) {
+ onChatCreated(assistantChat)
}
+ return
+ } else {
+ chatCreatorRef.value?.showDs()
}
}
function onClickHistory(chat: Chat) {
- if (chat !== undefined && chat.id !== undefined && !_loading.value) {
- goEmpty()
- nextTick(() => {
- if (chat !== undefined && chat.id !== undefined) {
- _currentChat.value = new ChatInfo(chat)
- _currentChatId.value = chat.id
- _loading.value = true
- chatApi
- .get(chat.id)
- .then((res) => {
- const info = chatApi.toChatInfo(res)
- if (info) {
- _currentChat.value = info
-
- // scrollToBottom()
- emits('onClickHistory', info)
- }
- })
- .finally(() => {
- _loading.value = false
- })
- }
- })
+ if (chat !== undefined && chat.id !== undefined) {
+ if (_currentChatId.value === chat.id) {
+ return
+ }
+ goEmpty(goHistory, chat)
}
}
+function goHistory(chat: Chat) {
+ nextTick(() => {
+ if (chat !== undefined && chat.id !== undefined) {
+ _currentChat.value = new ChatInfo(chat)
+ _currentChatId.value = chat.id
+ _loading.value = true
+ chatApi
+ .get(chat.id)
+ .then((res) => {
+ const info = chatApi.toChatInfo(res)
+ if (info && info.id === _currentChatId.value) {
+ _currentChat.value = info
+
+ // scrollToBottom()
+ emits('onClickHistory', info)
+ }
+ })
+ .finally(() => {
+ _loading.value = false
+ })
+ }
+ })
+}
+
function onChatDeleted(id: number) {
for (let i = 0; i < _chatList.value.length; i++) {
if (_chatList.value[i].id === id) {
diff --git a/frontend/src/views/chat/RecommendQuestion.vue b/frontend/src/views/chat/RecommendQuestion.vue
index 31c01fbb..d239ee32 100644
--- a/frontend/src/views/chat/RecommendQuestion.vue
+++ b/frontend/src/views/chat/RecommendQuestion.vue
@@ -1,5 +1,5 @@
diff --git a/frontend/src/views/chat/answer/AnalysisAnswer.vue b/frontend/src/views/chat/answer/AnalysisAnswer.vue
index feaf51f5..0757e9f5 100644
--- a/frontend/src/views/chat/answer/AnalysisAnswer.vue
+++ b/frontend/src/views/chat/answer/AnalysisAnswer.vue
@@ -1,7 +1,7 @@
diff --git a/frontend/src/views/chat/answer/ChartAnswer.vue b/frontend/src/views/chat/answer/ChartAnswer.vue
index 3d9f3743..805a05f6 100644
--- a/frontend/src/views/chat/answer/ChartAnswer.vue
+++ b/frontend/src/views/chat/answer/ChartAnswer.vue
@@ -1,9 +1,7 @@
diff --git a/frontend/src/views/chat/answer/PredictAnswer.vue b/frontend/src/views/chat/answer/PredictAnswer.vue
index 7aee5005..992f18c2 100644
--- a/frontend/src/views/chat/answer/PredictAnswer.vue
+++ b/frontend/src/views/chat/answer/PredictAnswer.vue
@@ -1,7 +1,7 @@
diff --git a/frontend/src/views/chat/index.vue b/frontend/src/views/chat/index.vue
index c98681d8..bbf51f25 100644
--- a/frontend/src/views/chat/index.vue
+++ b/frontend/src/views/chat/index.vue
@@ -99,6 +99,7 @@
:questions="message.recommended_question"
:first-chat="message.first_chat"
@click-question="quickAsk"
+ @stop="onChatStop"
/>
@@ -118,6 +119,7 @@
:reasoning-name="['sql_answer', 'chart_answer']"
@finish="onChartAnswerFinish"
@error="onChartAnswerError"
+ @stop="onChatStop"
>
@@ -206,6 +209,7 @@
:message="message"
@finish="onAnalysisAnswerFinish"
@error="onAnalysisAnswerError"
+ @stop="onChatStop"
>
>(() => {
return messages
})
-const goEmpty = () => {
+const goEmpty = (func?: (...p: any[]) => void, ...param: any[]) => {
inputMessage.value = ''
- stop()
+ stop(func, ...param)
}
const createNewChatSimple = async () => {
@@ -418,8 +423,8 @@ function getChatList() {
}
function onClickHistory(chat: Chat) {
- console.log('click history', chat)
scrollToBottom()
+ console.debug('click history', chat)
}
function toAssistantHistory(chat: Chat) {
@@ -510,6 +515,13 @@ async function onChartAnswerFinish(id: number) {
function onChartAnswerError() {
loading.value = false
isTyping.value = false
+ console.debug('onChartAnswerError')
+}
+
+function onChatStop() {
+ loading.value = false
+ isTyping.value = false
+ console.debug('onChatStop')
}
const sendMessage = async () => {
@@ -698,7 +710,7 @@ function clickInput() {
inputRef.value?.focus()
}
-function stop() {
+function stop(func?: (...p: any[]) => void, ...param: any[]) {
if (recommendQuestionRef.value) {
if (recommendQuestionRef.value instanceof Array) {
for (let i = 0; i < recommendQuestionRef.value.length; i++) {
@@ -735,6 +747,9 @@ function stop() {
predictAnswerRef.value.stop()
}
}
+ if (func && typeof func === 'function') {
+ func(...param)
+ }
}
onMounted(() => {
diff --git a/frontend/src/views/ds/DataTable.vue b/frontend/src/views/ds/DataTable.vue
index 2e675c80..ce204535 100644
--- a/frontend/src/views/ds/DataTable.vue
+++ b/frontend/src/views/ds/DataTable.vue
@@ -8,7 +8,6 @@ import EmptyBackground from '@/views/dashboard/common/EmptyBackground.vue'
import edit from '@/assets/svg/icon_edit_outlined.svg'
import { useI18n } from 'vue-i18n'
import ParamsForm from './ParamsForm.vue'
-import icon_add_outlined from '@/assets/svg/icon_add_outlined.svg'
interface Table {
name: string
diff --git a/frontend/src/views/ds/Datasource.vue b/frontend/src/views/ds/Datasource.vue
index 910fa801..8fe01004 100644
--- a/frontend/src/views/ds/Datasource.vue
+++ b/frontend/src/views/ds/Datasource.vue
@@ -275,6 +275,7 @@ const back = () => {
diff --git a/frontend/src/views/ds/DatasourceForm.vue b/frontend/src/views/ds/DatasourceForm.vue
index 72e1426f..392364c6 100644
--- a/frontend/src/views/ds/DatasourceForm.vue
+++ b/frontend/src/views/ds/DatasourceForm.vue
@@ -463,10 +463,7 @@ defineExpose({
>
{{ activeName }}
-
+
{{ t('ds.form.support_version') }}:
2012+
12+
diff --git a/frontend/src/views/embedded/assistant.vue b/frontend/src/views/embedded/assistant.vue
index f5dfd328..ba6bd644 100644
--- a/frontend/src/views/embedded/assistant.vue
+++ b/frontend/src/views/embedded/assistant.vue
@@ -109,7 +109,6 @@ const communicationCb = async (event: any) => {
}
if (event.data?.busi == 'certificate') {
const certificate = event.data['certificate']
- console.log(certificate)
assistantStore.setType(1)
assistantStore.setCertificate(certificate)
// store certificate to pinia
diff --git a/frontend/src/views/system/member/index.vue b/frontend/src/views/system/member/index.vue
index ed96c598..1f680d21 100644
--- a/frontend/src/views/system/member/index.vue
+++ b/frontend/src/views/system/member/index.vue
@@ -440,8 +440,11 @@ const handleCurrentChange = (val: number) => {
bottom: 0;
border-top: 1px solid #1f232926;
display: flex;
+ background-color: #fff;
align-items: center;
padding-left: 24px;
+ background-color: #fff;
+ z-index: 10;
.danger-button {
border: 1px solid var(--ed-color-danger);
diff --git a/frontend/src/views/system/permission/index.vue b/frontend/src/views/system/permission/index.vue
index a251ecad..35bdf73e 100644
--- a/frontend/src/views/system/permission/index.vue
+++ b/frontend/src/views/system/permission/index.vue
@@ -442,9 +442,10 @@ const savePermission = () => {
id,
name,
permissions: permissionsObj,
- users: isCreate.value
- ? selectPermissionRef.value.checkedWorkspace.map((ele: any) => ele.id)
- : users,
+ users:
+ isCreate.value || activeStep.value === 1
+ ? selectPermissionRef.value.checkedWorkspace.map((ele: any) => ele.id)
+ : users,
}
if (!id) {
delete obj.id
@@ -764,6 +765,7 @@ const columnRules = {
-
+
-
-
+
+
@@ -193,6 +192,7 @@
@@ -316,6 +316,7 @@ const dialogVisiblePassword = ref(false)
const isIndeterminate = ref(true)
const drawerMainRef = ref()
const userImportRef = ref()
+const selectionLoading = ref(false)
const filterOption = ref([
{
type: 'enum',
@@ -359,7 +360,7 @@ const defaultForm = {
account: '',
oid: 0,
email: '',
- status: '',
+ status: 1,
phoneNumber: '',
oid_list: [],
}
@@ -451,7 +452,9 @@ const handleConfirmPassword = () => {
})
dialogVisiblePassword.value = false
}
+
const handleSelectionChange = (val: any[]) => {
+ if (selectionLoading.value) return
const ids = state.tableData.map((ele: any) => ele.id)
multipleSelectionAll.value = [
...multipleSelectionAll.value.filter((ele) => !ids.includes(ele.id)),
@@ -481,6 +484,7 @@ const handleToggleRowSelection = (check: boolean = true) => {
}
checkAll.value = i === state.tableData.length
isIndeterminate.value = !(i === 0 || i === state.tableData.length)
+ selectionLoading.value = false
}
const handleSearch = () => {
search()
@@ -541,6 +545,7 @@ const deleteBatchUser = () => {
autofocus: false,
}).then(() => {
userApi.deleteBatch(multipleSelectionAll.value.map((ele) => ele.id)).then(() => {
+ multipleSelectionAll.value = []
ElMessage({
type: 'success',
message: t('dashboard.delete_success'),
@@ -557,13 +562,20 @@ const deleteHandler = (row: any) => {
customClass: 'confirm-no_icon',
autofocus: false,
}).then(() => {
- userApi.delete(row.id).then(() => {
- ElMessage({
- type: 'success',
- message: t('dashboard.delete_success'),
- })
- search()
+ multipleSelectionAll.value = multipleSelectionAll.value.filter((ele) => ele.id !== row.id)
+ ElMessage({
+ type: 'success',
+ message: t('dashboard.delete_success'),
})
+ search()
+ // userApi.delete(row.id).then(() => {
+ // multipleSelectionAll.value = multipleSelectionAll.value.filter((ele) => ele.id !== row.id)
+ // ElMessage({
+ // type: 'success',
+ // message: t('dashboard.delete_success'),
+ // })
+ // search()
+ // })
})
}
@@ -613,7 +625,7 @@ const search = () => {
.then((res: any) => {
state.tableData = res.items
state.pageInfo.total = res.total
-
+ selectionLoading.value = true
nextTick(() => {
handleToggleRowSelection()
})
@@ -692,11 +704,13 @@ onMounted(() => {
height: 64px;
width: calc(100% + 48px);
left: -24px;
+ background-color: #fff;
bottom: 0;
border-top: 1px solid #1f232926;
display: flex;
align-items: center;
padding-left: 24px;
+ z-index: 10;
.danger-button {
border: 1px solid var(--ed-color-danger);
@@ -734,12 +748,8 @@ onMounted(() => {
.sqlbot-table {
border-radius: 6px;
width: 100%;
- max-height: calc(100vh - 100px);
+ max-height: calc(100vh - 150px);
overflow-y: auto;
-
- &.is-filter {
- max-height: calc(100vh - 256px);
- }
:deep(.ed-table) {
--el-table-header-bg-color: #f5f7fa;
--el-table-border-color: #ebeef5;
@@ -795,12 +805,13 @@ onMounted(() => {
}
}
}
- .pagination-container {
- display: flex;
- justify-content: end;
- align-items: center;
- margin-top: 16px;
- }
+ }
+
+ .pagination-container {
+ display: flex;
+ justify-content: end;
+ align-items: center;
+ margin-top: 16px;
}
}
diff --git a/frontend/src/views/system/workspace/AuthorizedWorkspaceDialog.vue b/frontend/src/views/system/workspace/AuthorizedWorkspaceDialog.vue
index f599118b..99583478 100644
--- a/frontend/src/views/system/workspace/AuthorizedWorkspaceDialog.vue
+++ b/frontend/src/views/system/workspace/AuthorizedWorkspaceDialog.vue
@@ -133,7 +133,7 @@ const open = async (id: any) => {
checkAll.value = false
isIndeterminate.value = false
const systemWorkspaceList = await workspaceOptionUserList({ oid }, 1, 1000)
- workspace.value = systemWorkspaceList.items as any
+ workspace.value = systemWorkspaceList.items.filter((ele: any) => +ele.id !== 1) as any
loading.value = false
centerDialogVisible.value = true
}
@@ -203,7 +203,8 @@ defineExpose({
}
.w-full {
- width: 100%;
+ height: 100%;
+ width: 50%;
overflow-y: auto;
.flex-between {
@@ -239,6 +240,8 @@ defineExpose({
.border-r {
border-right: 1px solid #dee0e3;
+ width: 50%;
+ overflow: hidden;
}
}
diff --git a/frontend/src/views/system/workspace/index.vue b/frontend/src/views/system/workspace/index.vue
index 834c7344..4583b6e3 100644
--- a/frontend/src/views/system/workspace/index.vue
+++ b/frontend/src/views/system/workspace/index.vue
@@ -30,6 +30,7 @@ const multipleSelectionAll = ref([])
const tableList = ref([] as any[])
const keyword = ref('')
const keywordsMember = ref('')
+const oldKeywordsMember = ref('')
const workspaceFormRef = ref()
const authorizedWorkspaceDialog = ref()
const tableListWithSearch = computed(() => {
@@ -210,8 +211,9 @@ const search = () => {
pageInfo.currentPage,
pageInfo.pageSize
).then((res) => {
- fieldList.value = res.items
+ fieldList.value = res.items.sort((a: any, b: any) => b.weight - a.weight)
pageInfo.total = res.total
+ oldKeywordsMember.value = keywordsMember.value
})
}
@@ -342,7 +344,7 @@ const handleCurrentChange = (val: number) => {
- {{ $t('workspace.historical_dialogue') }}
+ {{ $t('workspace.relevant_content_found') }}
@@ -463,31 +465,31 @@ const handleCurrentChange = (val: number) => {
-
+
+
{
}
}
+ .pagination-container {
+ display: flex;
+ justify-content: end;
+ align-items: center;
+ margin-top: 16px;
+ }
+
.table-content {
padding: 0 24px 16px 24px;
- height: calc(100% - 104px);
-
- .pagination-container {
- display: flex;
- justify-content: end;
- align-items: center;
- margin-top: 16px;
- }
+ height: calc(100% - 168px);
+ overflow-y: auto;
.preview-or-schema {
:deep(.user-source) {
@@ -779,7 +782,9 @@ const handleCurrentChange = (val: number) => {
border-top: 1px solid #1f232926;
display: flex;
align-items: center;
+ background-color: #fff;
padding-left: 24px;
+ z-index: 10;
.danger-button {
border: 1px solid var(--ed-color-danger);