Compare commits
No commits in common. "c857194f48de53fd0abe445857f3b1114095d7f7" and "6bc1a2c9f54cfec1eea4cbe0df9da2dc4b7ddce5" have entirely different histories.
c857194f48
...
6bc1a2c9f5
@ -112,13 +112,4 @@ export const reqModelExperienceDeleteHistory = (params = {}) => {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
// token用量查询
|
|
||||||
export const reqTokenUsage = (params = {}) => {
|
|
||||||
return request({
|
|
||||||
url: '/cntoai/model_usage_user_report.dspy',
|
|
||||||
method: 'post',
|
|
||||||
params
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@
|
|||||||
<div class="two-btn">
|
<div class="two-btn">
|
||||||
<span class="forgot-password" @click="forgotPasswordVisible = true">忘记密码?</span>
|
<span class="forgot-password" @click="forgotPasswordVisible = true">忘记密码?</span>
|
||||||
<span :loading="loading" type="primary" class="go-register"
|
<span :loading="loading" type="primary" class="go-register"
|
||||||
@click.native.prevent="handleRegister"
|
style="width: 127px; margin-bottom: 30px; margin-left: 0px" @click.native.prevent="handleRegister"
|
||||||
@click="handleRegister">
|
@click="handleRegister">
|
||||||
没有账号?<span class="go-register-btn">去注册</span>
|
没有账号?<span class="go-register-btn">去注册</span>
|
||||||
</span>
|
</span>
|
||||||
@ -1018,7 +1018,8 @@ $dark_gray: #889aa4;
|
|||||||
|
|
||||||
/* 统一表单项目样式 + 边距 */
|
/* 统一表单项目样式 + 边距 */
|
||||||
::v-deep .el-form-item {
|
::v-deep .el-form-item {
|
||||||
margin-bottom: 30px !important;
|
margin-bottom: 15px !important;
|
||||||
|
/* 给错误提示预留空间 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 统一输入框外框 */
|
/* 统一输入框外框 */
|
||||||
@ -1102,7 +1103,7 @@ $dark_gray: #889aa4;
|
|||||||
height: 42px;
|
height: 42px;
|
||||||
line-height: 42px;
|
line-height: 42px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-top: 4px !important;
|
margin-top: 0 !important;
|
||||||
margin-bottom: 12px !important;
|
margin-bottom: 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1116,14 +1117,10 @@ $dark_gray: #889aa4;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.forgot-password {
|
.forgot-password {
|
||||||
display: inline-flex;
|
margin-bottom: 12px;
|
||||||
align-items: center;
|
|
||||||
height: 22px;
|
|
||||||
margin-bottom: 0;
|
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 22px;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
@ -1131,12 +1128,8 @@ $dark_gray: #889aa4;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.go-register {
|
.go-register {
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 22px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333;
|
color: #333;
|
||||||
line-height: 22px;
|
|
||||||
|
|
||||||
.go-register-btn {
|
.go-register-btn {
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<span class="title-icon">
|
<span class="title-icon">
|
||||||
<i class="el-icon-data-line"></i>
|
<i class="el-icon-data-line"></i>
|
||||||
</span>
|
</span>
|
||||||
<h2>Token用量</h2>
|
<h2>Token用量</h2>
|
||||||
</div>
|
</div>
|
||||||
<p>查看模型调用 Token 消耗、调用次数和费用趋势。</p>
|
<p>查看模型调用 Token 消耗、调用次数和费用趋势。</p>
|
||||||
</div>
|
</div>
|
||||||
@ -53,8 +53,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { reqTokenUsage } from '@/api/model/model'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TokenUsage',
|
name: 'TokenUsage',
|
||||||
data() {
|
data() {
|
||||||
@ -67,24 +65,36 @@ export default {
|
|||||||
{ label: '活跃模型', value: '8', desc: '最近 7 天有调用', type: 'purple' }
|
{ label: '活跃模型', value: '8', desc: '最近 7 天有调用', type: 'purple' }
|
||||||
],
|
],
|
||||||
usageList: [
|
usageList: [
|
||||||
|
{
|
||||||
|
modelName: 'DeepSeek-V4',
|
||||||
|
calls: 1260,
|
||||||
|
inputTokens: '420,000',
|
||||||
|
outputTokens: '318,000',
|
||||||
|
totalTokens: '738,000',
|
||||||
|
cost: '¥ 73.80',
|
||||||
|
updatedAt: '2026-05-25 10:00:00'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
modelName: '通义千问-Plus',
|
||||||
|
calls: 856,
|
||||||
|
inputTokens: '210,400',
|
||||||
|
outputTokens: '156,000',
|
||||||
|
totalTokens: '366,400',
|
||||||
|
cost: '¥ 38.20',
|
||||||
|
updatedAt: '2026-05-25 09:42:16'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
modelName: '腾讯混元-Pro',
|
||||||
|
calls: 342,
|
||||||
|
inputTokens: '102,000',
|
||||||
|
outputTokens: '80,000',
|
||||||
|
totalTokens: '182,000',
|
||||||
|
cost: '¥ 16.64',
|
||||||
|
updatedAt: '2026-05-25 09:18:31'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
created() {
|
|
||||||
this.getTokenList()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getCurrentUserId() {
|
|
||||||
return sessionStorage.getItem('userId') || localStorage.getItem('userId') || ''
|
|
||||||
},
|
|
||||||
async getTokenList() {
|
|
||||||
const userid = this.getCurrentUserId()
|
|
||||||
const res = await reqTokenUsage({ userid:userid })
|
|
||||||
console.log('token用量',res);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user