mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
perf: 优化设置
This commit is contained in:
parent
d0a0e77c44
commit
b3e83e13bc
@ -84,49 +84,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ivu-modal-wrap-apply-body">
|
<div class="ivu-modal-wrap-apply-body">
|
||||||
<Tabs v-model="aibotTabAction" :animated="false" class="ai-tabs">
|
<Tabs v-model="aibotTabAction" :animated="false" class="ai-tabs">
|
||||||
<TabPane label="ChatGPT" name="openai">
|
<TabPane v-for="(item, key) in aibotList" :key="key" :label="item.label" :name="item.value">
|
||||||
<div class="aibot-warp">
|
<div class="aibot-setting">
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'openai'" />
|
<SystemAibot
|
||||||
</div>
|
v-if="aibotTabAction == item.value"
|
||||||
</TabPane>
|
:type="aibotTabAction"
|
||||||
<TabPane label="Claude" name="claude">
|
@on-update-setting="handleAITags" />
|
||||||
<div class="aibot-warp">
|
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'claude'" />
|
|
||||||
</div>
|
|
||||||
</TabPane>
|
|
||||||
<TabPane label="DeepSeek" name="deepseek">
|
|
||||||
<div class="aibot-warp">
|
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'deepseek'" />
|
|
||||||
</div>
|
|
||||||
</TabPane>
|
|
||||||
<TabPane label="Gemini" name="gemini">
|
|
||||||
<div class="aibot-warp">
|
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'gemini'" />
|
|
||||||
</div>
|
|
||||||
</TabPane>
|
|
||||||
<TabPane label="Grok" name="grok">
|
|
||||||
<div class="aibot-warp">
|
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'grok'" />
|
|
||||||
</div>
|
|
||||||
</TabPane>
|
|
||||||
<TabPane label="Ollama" name="ollama">
|
|
||||||
<div class="aibot-warp">
|
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'ollama'" />
|
|
||||||
</div>
|
|
||||||
</TabPane>
|
|
||||||
<TabPane :label="$L('智谱清言')" name="zhipu">
|
|
||||||
<div class="aibot-warp">
|
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'zhipu'" />
|
|
||||||
</div>
|
|
||||||
</TabPane>
|
|
||||||
<TabPane :label="$L('通义千问')" name="qianwen">
|
|
||||||
<div class="aibot-warp">
|
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'qianwen'" />
|
|
||||||
</div>
|
|
||||||
</TabPane>
|
|
||||||
<TabPane :label="$L('文心一言')" name="wenxin">
|
|
||||||
<div class="aibot-warp">
|
|
||||||
<SystemAibot :type="aibotTabAction" v-if="aibotTabAction == 'wenxin'" />
|
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
@ -501,6 +464,11 @@ export default {
|
|||||||
this.$store.dispatch("call", {
|
this.$store.dispatch("call", {
|
||||||
url: 'system/setting/aibot',
|
url: 'system/setting/aibot',
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
|
this.handleAITags(data);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 处理AI标签
|
||||||
|
handleAITags(data) {
|
||||||
for (let key in data) {
|
for (let key in data) {
|
||||||
const match = key.match(/^(.*?)_models$/);
|
const match = key.match(/^(.*?)_models$/);
|
||||||
if (match) {
|
if (match) {
|
||||||
@ -512,7 +480,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 开始聊天
|
// 开始聊天
|
||||||
onGoToChat(type) {
|
onGoToChat(type) {
|
||||||
|
|||||||
@ -168,6 +168,7 @@ export default {
|
|||||||
if (save) {
|
if (save) {
|
||||||
$A.messageSuccess('修改成功');
|
$A.messageSuccess('修改成功');
|
||||||
}
|
}
|
||||||
|
this.$emit('on-update-setting', data);
|
||||||
this.formData = data;
|
this.formData = data;
|
||||||
this.formDatum_bak = $A.cloneJSON(this.formData);
|
this.formDatum_bak = $A.cloneJSON(this.formData);
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
|
|||||||
4
resources/assets/sass/pages/page-apply.scss
vendored
4
resources/assets/sass/pages/page-apply.scss
vendored
@ -386,7 +386,7 @@
|
|||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
color: #666;
|
color: #666;
|
||||||
border: none;
|
border: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -425,7 +425,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.aibot-warp {
|
.aibot-setting {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user