Browse Source

fix:模型始终进行显示;

dxj
李朋徽 1 year ago
parent
commit
b0fe576416
  1. 2
      src/components/AppContainerBox/index.vue
  2. 2
      src/components/AppContentBox/index.vue
  3. 18
      src/views/conversation/index.vue
  4. 18
      src/views/conversationNet/index.vue
  5. 18
      src/views/repository/index.vue
  6. 17
      src/views/textToImage/index.vue
  7. 19
      src/views/visualAnalysis/index.vue

2
src/components/AppContainerBox/index.vue

@ -17,7 +17,7 @@ import { AppContentBox } from '@/components/AppContentBox'
<style lang="scss" scoped> <style lang="scss" scoped>
@include app('container-box') { @include app('container-box') {
padding: 20px 0 20px 0; padding: 15px 0 15px 0;
background-color: #edf3ff; background-color: #edf3ff;
} }
</style> </style>

2
src/components/AppContentBox/index.vue

@ -11,7 +11,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
@include app('content-box') { @include app('content-box') {
width: calc(100% - $sub-menu-width); width: calc(100% - $sub-menu-width);
padding: 30px; padding: 15px 30px 15px 30px;
border-radius: 30px 0 0 30px; border-radius: 30px 0 0 30px;
background-color: #ffffff; background-color: #ffffff;
position: relative; position: relative;

18
src/views/conversation/index.vue

@ -28,6 +28,7 @@ const { createConfirm } = useMessage()
const messageStore = useMessageStore() const messageStore = useMessageStore()
const modelSelectDisabled = ref(false)
const sendBtnLoading = ref(false) const sendBtnLoading = ref(false)
const subMenuActiveIndex = ref(-1) // const subMenuActiveIndex = ref(-1) //
const subMenuActionIndex = ref(-1) // const subMenuActionIndex = ref(-1) //
@ -73,6 +74,15 @@ watch(
}, },
) )
watch(
() => subMenuActiveIndex.value,
(val) => {
if (val === -1) {
modelSelectDisabled.value = false
}
},
)
/** /**
* @description: 点击会话操作项 * @description: 点击会话操作项
*/ */
@ -210,7 +220,7 @@ async function getHistoryMessage() {
} }
return return
} }
modelSelectDisabled.value = true
res.records.forEach((item: any) => { res.records.forEach((item: any) => {
const itemData: MessageItem = { const itemData: MessageItem = {
messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI, messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI,
@ -413,7 +423,7 @@ onUnmounted(() => {
<template #content> <template #content>
<Spin :spinning="spinning" wrapper-class-name="app-content-spin"> <Spin :spinning="spinning" wrapper-class-name="app-content-spin">
<AppModelSelect <AppModelSelect
v-if="conversationDefaultShow" :disabled="modelSelectDisabled"
:active-index="modelIndex" :active-index="modelIndex"
:options="modelOptions" :options="modelOptions"
@change="handleModel" @change="handleModel"
@ -437,7 +447,7 @@ onUnmounted(() => {
v-if="!conversationDefaultShow && appMessageShow" v-if="!conversationDefaultShow && appMessageShow"
ref="appMessageRef" ref="appMessageRef"
:key="MenuTypeEnum.TEXT_TO_TEXT" :key="MenuTypeEnum.TEXT_TO_TEXT"
class="pl-27 pr-5" class="pl-27 pr-5 mt-13"
:el-index="elIndex" :el-index="elIndex"
:list="messageList" :list="messageList"
@on-scroll-top="onScrollTop" @on-scroll-top="onScrollTop"
@ -447,7 +457,7 @@ onUnmounted(() => {
<!-- 发送框 --> <!-- 发送框 -->
<AppTextarea <AppTextarea
class="pl-44 pr-24 mt-10" class="pl-44 pr-24 mt-4"
:btn-loading="sendBtnLoading" :btn-loading="sendBtnLoading"
:is-stop="false" :is-stop="false"
@send="handleSend" @send="handleSend"

18
src/views/conversationNet/index.vue

@ -28,6 +28,7 @@ const { createConfirm } = useMessage()
const messageStore = useMessageStore() const messageStore = useMessageStore()
const modelSelectDisabled = ref(false)
const sendBtnLoading = ref(false) const sendBtnLoading = ref(false)
const subMenuActiveIndex = ref(-1) // const subMenuActiveIndex = ref(-1) //
const subMenuActionIndex = ref(-1) // const subMenuActionIndex = ref(-1) //
@ -73,6 +74,15 @@ watch(
}, },
) )
watch(
() => subMenuActiveIndex.value,
(val) => {
if (val === -1) {
modelSelectDisabled.value = false
}
},
)
/** /**
* @description: 点击会话操作项 * @description: 点击会话操作项
*/ */
@ -210,7 +220,7 @@ async function getHistoryMessage() {
} }
return return
} }
modelSelectDisabled.value = true
res.records.forEach((item: any) => { res.records.forEach((item: any) => {
const itemData: MessageItem = { const itemData: MessageItem = {
messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI, messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI,
@ -413,7 +423,7 @@ onUnmounted(() => {
<template #content> <template #content>
<Spin :spinning="spinning" wrapper-class-name="app-content-spin"> <Spin :spinning="spinning" wrapper-class-name="app-content-spin">
<AppModelSelect <AppModelSelect
v-if="conversationDefaultShow" :disabled="modelSelectDisabled"
:active-index="modelIndex" :active-index="modelIndex"
:options="modelOptions" :options="modelOptions"
@change="handleModel" @change="handleModel"
@ -437,7 +447,7 @@ onUnmounted(() => {
v-if="!conversationDefaultShow && appMessageShow" v-if="!conversationDefaultShow && appMessageShow"
ref="appMessageRef" ref="appMessageRef"
:key="MenuTypeEnum.CONVERSATION_NET" :key="MenuTypeEnum.CONVERSATION_NET"
class="pl-27 pr-5" class="pl-27 pr-5 mt-13"
:el-index="elIndex" :el-index="elIndex"
:list="messageList" :list="messageList"
@on-scroll-top="onScrollTop" @on-scroll-top="onScrollTop"
@ -447,7 +457,7 @@ onUnmounted(() => {
<!-- 发送框 --> <!-- 发送框 -->
<AppTextarea <AppTextarea
class="pl-44 pr-24 mt-10" class="pl-44 pr-24 mt-4"
:btn-loading="sendBtnLoading" :btn-loading="sendBtnLoading"
:is-stop="false" :is-stop="false"
@send="handleSend" @send="handleSend"

18
src/views/repository/index.vue

@ -29,6 +29,7 @@ const { createConfirm } = useMessage()
const messageStore = useMessageStore() const messageStore = useMessageStore()
const modelSelectDisabled = ref(false)
const sendBtnLoading = ref(false) const sendBtnLoading = ref(false)
const subMenuActiveIndex = ref(-1) // const subMenuActiveIndex = ref(-1) //
const subMenuActionIndex = ref(-1) // const subMenuActionIndex = ref(-1) //
@ -92,6 +93,15 @@ watch(
}, },
) )
watch(
() => subMenuActiveIndex.value,
(val) => {
if (val === -1) {
modelSelectDisabled.value = false
}
},
)
/** /**
* @description: 点击会话操作项 * @description: 点击会话操作项
*/ */
@ -229,7 +239,7 @@ async function getHistoryMessage() {
} }
return return
} }
modelSelectDisabled.value = true
res.records.forEach((item: any) => { res.records.forEach((item: any) => {
const itemData: MessageItem = { const itemData: MessageItem = {
messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI, messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI,
@ -416,7 +426,7 @@ onUnmounted(() => {
<template #content> <template #content>
<Spin :spinning="spinning" wrapper-class-name="app-content-spin"> <Spin :spinning="spinning" wrapper-class-name="app-content-spin">
<AppModelSelect <AppModelSelect
v-if="conversationDefaultShow" :disabled="modelSelectDisabled"
:active-index="modelIndex" :active-index="modelIndex"
:options="modelOptions" :options="modelOptions"
@change="handleModel" @change="handleModel"
@ -439,7 +449,7 @@ onUnmounted(() => {
v-if="!conversationDefaultShow && appMessageShow" v-if="!conversationDefaultShow && appMessageShow"
ref="appMessageRef" ref="appMessageRef"
:key="MenuTypeEnum.REPOSITORY" :key="MenuTypeEnum.REPOSITORY"
class="pl-27 pr-5" class="pl-27 pr-5 mt-13"
:el-index="elIndex" :el-index="elIndex"
:list="messageList" :list="messageList"
@on-scroll-top="onScrollTop" @on-scroll-top="onScrollTop"
@ -449,7 +459,7 @@ onUnmounted(() => {
<!-- 发送框 --> <!-- 发送框 -->
<AppTextarea <AppTextarea
class="pl-44 pr-24 mt-10" class="pl-44 pr-24 mt-4"
:btn-loading="sendBtnLoading" :btn-loading="sendBtnLoading"
:is-stop="false" :is-stop="false"
@send="handleSend" @send="handleSend"

17
src/views/textToImage/index.vue

@ -27,6 +27,7 @@ const { createConfirm } = useMessage()
const messageStore = useMessageStore() const messageStore = useMessageStore()
const modelSelectDisabled = ref(false)
const sendBtnLoading = ref(false) const sendBtnLoading = ref(false)
const subMenuActiveIndex = ref(-1) // const subMenuActiveIndex = ref(-1) //
const subMenuActionIndex = ref(-1) // const subMenuActionIndex = ref(-1) //
@ -84,6 +85,15 @@ watch(
}, },
) )
watch(
() => subMenuActiveIndex.value,
(val) => {
if (val === -1) {
modelSelectDisabled.value = false
}
},
)
/** /**
* @description: 点击会话操作项 * @description: 点击会话操作项
*/ */
@ -214,6 +224,7 @@ async function getHistoryMessage() {
} }
return return
} }
modelSelectDisabled.value = true
res.records.forEach((item: any) => { res.records.forEach((item: any) => {
const itemData: MessageItem = { const itemData: MessageItem = {
messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI, messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI,
@ -384,7 +395,7 @@ onUnmounted(() => {
<template #content> <template #content>
<Spin :spinning="spinning" wrapper-class-name="app-content-spin"> <Spin :spinning="spinning" wrapper-class-name="app-content-spin">
<AppModelSelect <AppModelSelect
v-if="conversationDefaultShow" :disabled="modelSelectDisabled"
:active-index="modelIndex" :active-index="modelIndex"
:options="modelOptions" :options="modelOptions"
@change="handleModel" @change="handleModel"
@ -407,7 +418,7 @@ onUnmounted(() => {
<AppMessage <AppMessage
v-if="!conversationDefaultShow && appMessageShow" v-if="!conversationDefaultShow && appMessageShow"
ref="appMessageRef" ref="appMessageRef"
class="pl-27 pr-5" class="pl-27 pr-5 mt-13"
:list="messageList" :list="messageList"
:el-index="elIndex" :el-index="elIndex"
ai-width-type="auto" ai-width-type="auto"
@ -418,7 +429,7 @@ onUnmounted(() => {
<!-- 发送框 --> <!-- 发送框 -->
<AppTextarea <AppTextarea
class="pl-44 pr-24 mt-10" class="pl-44 pr-24 mt-4"
:btn-loading="sendBtnLoading" :btn-loading="sendBtnLoading"
@send="handleSend" @send="handleSend"
></AppTextarea> ></AppTextarea>

19
src/views/visualAnalysis/index.vue

@ -27,6 +27,7 @@ const { createConfirm } = useMessage()
const messageStore = useMessageStore() const messageStore = useMessageStore()
const modelSelectDisabled = ref(false)
const sendBtnLoading = ref(false) const sendBtnLoading = ref(false)
const subMenuActiveIndex = ref(-1) // const subMenuActiveIndex = ref(-1) //
const subMenuActionIndex = ref(-1) // const subMenuActionIndex = ref(-1) //
@ -70,6 +71,16 @@ watch(
}, },
) )
watch(
() => subMenuActiveIndex.value,
(val) => {
if (val === -1) {
modelSelectDisabled.value = false
}
},
)
/** /**
* @description: 点击会话操作项 * @description: 点击会话操作项
*/ */
@ -216,7 +227,7 @@ async function getHistoryMessage() {
} }
return return
} }
modelSelectDisabled.value = true
res.records.forEach((item: any) => { res.records.forEach((item: any) => {
const itemData: MessageItem = { const itemData: MessageItem = {
messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI, messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI,
@ -381,7 +392,7 @@ onUnmounted(() => {
<template #content> <template #content>
<Spin :spinning="spinning" wrapper-class-name="app-content-spin"> <Spin :spinning="spinning" wrapper-class-name="app-content-spin">
<AppModelSelect <AppModelSelect
v-if="conversationDefaultShow" :disabled="modelSelectDisabled"
:active-index="modelIndex" :active-index="modelIndex"
:options="modelOptions" :options="modelOptions"
@change="handleModel" @change="handleModel"
@ -403,7 +414,7 @@ onUnmounted(() => {
<AppMessage <AppMessage
v-if="!conversationDefaultShow && appMessageShow" v-if="!conversationDefaultShow && appMessageShow"
ref="appMessageRef" ref="appMessageRef"
class="pl-27 pr-5" class="pl-27 pr-5 mt-13"
height="calc(100% - 120px)" height="calc(100% - 120px)"
:el-index="elIndex" :el-index="elIndex"
:list="messageList" :list="messageList"
@ -416,7 +427,7 @@ onUnmounted(() => {
class="w-full" class="w-full"
> >
<AppTextarea <AppTextarea
class="pl-44 pr-24 mt-10" class="pl-44 pr-24 mt-4"
:is-upload="true" :is-upload="true"
:default-file-url="defaultFileUrl" :default-file-url="defaultFileUrl"
:upload-disabled="uploadDisabled" :upload-disabled="uploadDisabled"

Loading…
Cancel
Save