mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-27 04:58:12 +00:00
perf: 优化AI设置
This commit is contained in:
parent
9c1482f9e9
commit
ccbd873204
@ -46,17 +46,12 @@
|
|||||||
<Report v-if="workReportShow" v-model="workReportTabs" @on-read="$store.dispatch('getReportUnread', 1000)" />
|
<Report v-if="workReportShow" v-model="workReportTabs" @on-read="$store.dispatch('getReportUnread', 1000)" />
|
||||||
</DrawerOverlay>
|
</DrawerOverlay>
|
||||||
|
|
||||||
<!--AI 机器人-->
|
<!--AI 列表-->
|
||||||
<DrawerOverlay v-model="aibotShow" placement="right" :size="950">
|
<DrawerOverlay v-model="aibotShow" placement="right" :size="720">
|
||||||
<div class="ivu-modal-wrap-apply">
|
<div v-if="aibotShow" class="ivu-modal-wrap-apply">
|
||||||
<div class="ivu-modal-wrap-apply-title">
|
<div class="ivu-modal-wrap-apply-title">{{ $L('AI 列表') }}</div>
|
||||||
{{ $L('AI 机器人') }}
|
<div class="ivu-modal-wrap-apply-body ai-body">
|
||||||
<p @click="aibotType = aibotType == 1 ? 2 : 1" v-if="userIsAdmin">
|
<ul class="ai-list">
|
||||||
{{ aibotType == 1 ? $L('机器人设置') : $L('返回') }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="ivu-modal-wrap-apply-body">
|
|
||||||
<ul class="ai-list" v-if="aibotType == 1">
|
|
||||||
<li v-for="(item, key) in aibotList" :key="key">
|
<li v-for="(item, key) in aibotList" :key="key">
|
||||||
<div class="ai-img">
|
<div class="ai-img">
|
||||||
<img :src="item.src">
|
<img :src="item.src">
|
||||||
@ -69,11 +64,23 @@
|
|||||||
<li>22</li>
|
<li>22</li>
|
||||||
<li>cc</li>
|
<li>cc</li>
|
||||||
</ul>
|
</ul>
|
||||||
<Button type="primary" :loading="aibotDialogSearchLoad == item.value" @click="onGoToChat(item.value)">{{ $L('开始聊天') }}</Button>
|
<div class="ai-btn">
|
||||||
|
<Button icon="md-chatbubbles" :loading="aibotDialogSearchLoad == item.value" @click="onGoToChat(item.value)">{{ $L('开始聊天') }}</Button>
|
||||||
|
<Button icon="md-settings" @click="applyClick({value: 'robot-setting'}, item.value)">{{ $L('设置') }}</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<Tabs v-else v-model="aibotTabAction" class="ai-tabs">
|
</div>
|
||||||
|
</div>
|
||||||
|
</DrawerOverlay>
|
||||||
|
|
||||||
|
<!--AI 设置-->
|
||||||
|
<DrawerOverlay v-model="aibotSettingShow" placement="right" :size="950">
|
||||||
|
<div v-if="aibotSettingShow" class="ivu-modal-wrap-apply">
|
||||||
|
<div class="ivu-modal-wrap-apply-title">{{ $L('AI 设置') }}</div>
|
||||||
|
<div class="ivu-modal-wrap-apply-body">
|
||||||
|
<Tabs v-model="aibotTabAction" :animated="false" class="ai-tabs">
|
||||||
<TabPane label="ChatGPT" name="openai">
|
<TabPane label="ChatGPT" name="openai">
|
||||||
<div class="aibot-warp">
|
<div class="aibot-warp">
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'openai'" />
|
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'openai'" />
|
||||||
@ -315,20 +322,20 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "qianwen",
|
value: "qianwen",
|
||||||
label: "Qianwen",
|
label: "通义千问",
|
||||||
src: $A.mainUrl('avatar/%E9%80%9A%E4%B9%89%E5%8D%83%E9%97%AE.png'),
|
src: $A.mainUrl('avatar/%E9%80%9A%E4%B9%89%E5%8D%83%E9%97%AE.png'),
|
||||||
desc: this.$L('我是达摩院自主研发的超大规模语言模型,能够回答问题、创作文字,还能表达观点、撰写代码。')
|
desc: this.$L('我是达摩院自主研发的超大规模语言模型,能够回答问题、创作文字,还能表达观点、撰写代码。')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "wenxin",
|
value: "wenxin",
|
||||||
label: "Wenxin",
|
label: "文心一言",
|
||||||
src: $A.mainUrl('avatar/%E6%96%87%E5%BF%83.png'),
|
src: $A.mainUrl('avatar/%E6%96%87%E5%BF%83.png'),
|
||||||
desc: this.$L('我是文心一言,英文名是ERNIE Bot。我能够与人对话互动,回答问题,协助创作,高效便捷地帮助人们获取信息、知识和灵感。')
|
desc: this.$L('我是文心一言,英文名是ERNIE Bot。我能够与人对话互动,回答问题,协助创作,高效便捷地帮助人们获取信息、知识和灵感。')
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
aibotTabAction: "openai",
|
|
||||||
aibotShow: false,
|
aibotShow: false,
|
||||||
aibotType: 1,
|
aibotSettingShow: false,
|
||||||
|
aibotTabAction: "openai",
|
||||||
aibotDialogSearchLoad: "",
|
aibotDialogSearchLoad: "",
|
||||||
//
|
//
|
||||||
signInShow: false,
|
signInShow: false,
|
||||||
@ -476,10 +483,12 @@ export default {
|
|||||||
this.workReportShow = true;
|
this.workReportShow = true;
|
||||||
break;
|
break;
|
||||||
case 'robot':
|
case 'robot':
|
||||||
this.aibotType = 1;
|
|
||||||
this.aibotTabAction = "openai";
|
|
||||||
this.aibotShow = true;
|
this.aibotShow = true;
|
||||||
break;
|
break;
|
||||||
|
case 'robot-setting':
|
||||||
|
this.aibotTabAction = area;
|
||||||
|
this.aibotSettingShow = true;
|
||||||
|
break;
|
||||||
case 'signin':
|
case 'signin':
|
||||||
this.signInType = 1;
|
this.signInType = 1;
|
||||||
this.signInShow = true;
|
this.signInShow = true;
|
||||||
|
|||||||
59
resources/assets/sass/pages/page-apply.scss
vendored
59
resources/assets/sass/pages/page-apply.scss
vendored
@ -335,7 +335,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
border-radius: 5px;
|
border-radius: 6px;
|
||||||
|
|
||||||
.apply-icon {
|
.apply-icon {
|
||||||
display: block;
|
display: block;
|
||||||
@ -406,26 +406,30 @@
|
|||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
margin-right: -10px;
|
padding: 10px;
|
||||||
|
margin: -10px;
|
||||||
|
|
||||||
> li {
|
> li {
|
||||||
border: 1px solid #eeeeee;
|
border: 1px solid #eeeeee;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
border-radius: 5px;
|
border-radius: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
.ai-img {
|
.ai-img {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
> img {
|
> img {
|
||||||
width: 60px;
|
width: 52px;
|
||||||
height: 60px;
|
height: 52px;
|
||||||
border-radius: 8px;
|
border-radius: 26px;
|
||||||
object-fit: cover;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,7 +440,7 @@
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin: 0 0 10px 0;
|
margin: 0 0 10px 0;
|
||||||
line-height: 24px;
|
line-height: 1.2;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,7 +448,12 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666;
|
color: #666;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 12px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-modal {
|
.ai-modal {
|
||||||
@ -457,16 +466,17 @@
|
|||||||
> li {
|
> li {
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
border-radius: 15px;
|
border-radius: 12px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #666;
|
color: #666;
|
||||||
border: none;
|
border: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
.ai-btn {
|
||||||
background: #e8e8e8;
|
button + button {
|
||||||
color: #333;
|
margin-left: 12px;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -474,7 +484,6 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 机器人
|
|
||||||
.ai-tabs {
|
.ai-tabs {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -493,12 +502,32 @@
|
|||||||
height: 0;
|
height: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
|
.ivu-tabs-tabpane {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.aibot-warp {
|
.aibot-warp {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.ai-body {
|
||||||
|
@media (max-width: 500px) {
|
||||||
|
padding: 8px 0;
|
||||||
|
.ai-list {
|
||||||
|
> li {
|
||||||
|
border: 0;
|
||||||
|
border-top: 1px solid #eeeeee;
|
||||||
|
border-radius: 0;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user