show power for chat and imaging page

This commit is contained in:
RockYang 2024-03-31 20:49:12 +08:00
parent 4596c1049c
commit 95efbd5659
5 changed files with 34 additions and 14 deletions

View File

@ -65,6 +65,14 @@
padding-top 5px padding-top 5px
padding-bottom 5px padding-bottom 5px
} }
.text-info {
padding 10px
.el-tag {
margin-right 10px
}
}
} }
.submit-btn { .submit-btn {

View File

@ -116,6 +116,15 @@
} }
} }
.el-row.text-info {
width 100%
padding 10px 0
.el-tag {
margin-right 10px
}
}
// //
.submit-btn { .submit-btn {
@ -125,13 +134,6 @@
.el-button { .el-button {
width 200px width 200px
} }
.text-info {
width 100%
display flex
justify-content right
align-items center
}
} }

View File

@ -103,7 +103,13 @@
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
/> >
<span>{{ item.name }}</span>
<el-tag style="margin-left: 5px; position: relative; top:-2px" type="info" size="small">{{
item.power
}}算力
</el-tag>
</el-option>
</el-select> </el-select>
<el-button type="primary" @click="newChat"> <el-button type="primary" @click="newChat">
<el-icon> <el-icon>
@ -487,7 +493,7 @@ const loadChat = function (chat) {
if (activeChat.value['chat_id'] === chat.chat_id) { if (activeChat.value['chat_id'] === chat.chat_id) {
return; return;
} }
activeChat.value = chat activeChat.value = chat
newChatItem.value = null; newChatItem.value = null;
roleId.value = chat.role_id; roleId.value = chat.role_id;

View File

@ -287,11 +287,13 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-row class="text-info">
<el-tag>每次绘图消耗{{ mjPower }}算力U/V 操作消耗{{ mjActionPower }}算力</el-tag>
<el-tag type="success">当前可用算力{{ power }}</el-tag>
</el-row>
<div class="submit-btn"> <div class="submit-btn">
<el-button color="#47fff1" :dark="false" @click="generate" round>立即生成</el-button> <el-button color="#47fff1" :dark="false" @click="generate" round>立即生成</el-button>
<div class="text-info">
<el-tag type="success">当前可用算力{{ power }}</el-tag>
</div>
</div> </div>
</el-form> </el-form>
</div> </div>

View File

@ -253,9 +253,11 @@
/> />
</div> </div>
<div class="param-line" style="padding: 10px"> <div class="text-info">
<el-tag>每次绘图消耗{{ sdPower }}算力</el-tag>
<el-tag type="success">当前可用算力{{ power }}</el-tag> <el-tag type="success">当前可用算力{{ power }}</el-tag>
</div> </div>
</el-form> </el-form>
</div> </div>
<div class="submit-btn"> <div class="submit-btn">
@ -479,7 +481,7 @@
<script setup> <script setup>
import {onMounted, onUnmounted, ref} from "vue" import {onMounted, onUnmounted, ref} from "vue"
import {Delete, DocumentCopy, InfoFilled, Orange, Picture, Refresh} from "@element-plus/icons-vue"; import {Delete, DocumentCopy, InfoFilled, Orange, Picture} from "@element-plus/icons-vue";
import {httpGet, httpPost} from "@/utils/http"; import {httpGet, httpPost} from "@/utils/http";
import {ElMessage, ElMessageBox, ElNotification} from "element-plus"; import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
import ItemList from "@/components/ItemList.vue"; import ItemList from "@/components/ItemList.vue";