|
@@ -1,146 +1,152 @@
|
|
|
<template>
|
|
|
- <div class="bm-main-box">
|
|
|
- <CzrButton
|
|
|
- type="normal"
|
|
|
- title="返回"
|
|
|
- icon="czr_arrow"
|
|
|
- :rotate="180"
|
|
|
- @click="toBack"
|
|
|
+ <div class="flex h-full w-full flex-col">
|
|
|
+ <toBackCom
|
|
|
+ title="模型纳管"
|
|
|
+ :rou="{
|
|
|
+ name: '78430247-a531-4c8f-8a08-c88e93a836e2',
|
|
|
+ params: {
|
|
|
+ name: '86e9f5e8-285d-4038-abc2-a39b2ad7fcd1',
|
|
|
+ },
|
|
|
+ }"
|
|
|
/>
|
|
|
- <div class="mt-4 flex">
|
|
|
- <img
|
|
|
- src="@/assets/images/model/model-default-logo.png"
|
|
|
- class="mr-2.5 h-[3.25rem] w-[3.25rem]"
|
|
|
- />
|
|
|
- <div class="flex flex-1 flex-col justify-around overflow-hidden">
|
|
|
- <div class="flex items-center text-xl font-bold text-[#2E3238]">
|
|
|
- <div v-title>{{ state.detail.name }}</div>
|
|
|
- <div
|
|
|
- v-if="state.detail.status == 1"
|
|
|
- class="ml-4 flex h-[1.56rem] w-[3.75rem] items-center justify-center rounded-[1.25rem] bg-gradient-to-r from-[#D5F9FE] to-[#E0DAFF] text-[0.75rem] font-bold text-[#1E3F92]"
|
|
|
- >
|
|
|
- 已启用
|
|
|
+ <div class="bm-main-box">
|
|
|
+ <div class="flex">
|
|
|
+ <img
|
|
|
+ src="@/assets/images/model/model-default-logo.png"
|
|
|
+ class="mr-2.5 h-[3.25rem] w-[3.25rem]"
|
|
|
+ />
|
|
|
+ <div class="flex flex-1 flex-col justify-around overflow-hidden">
|
|
|
+ <div class="flex items-center text-xl font-bold text-[#2E3238]">
|
|
|
+ <div v-title>{{ state.detail.name }}</div>
|
|
|
+ <div
|
|
|
+ v-if="state.detail.status == 1"
|
|
|
+ class="ml-4 flex h-[1.56rem] w-[3.75rem] items-center justify-center rounded-[1.25rem] bg-gradient-to-r from-[#D5F9FE] to-[#E0DAFF] text-[0.75rem] font-bold text-[#1E3F92]"
|
|
|
+ >
|
|
|
+ 已启用
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="flex">
|
|
|
- <div
|
|
|
- class="flex h-[1.25rem] items-center justify-center rounded-[0.13rem] bg-gradient-to-r from-[#FF9E2D] to-[#FFB92D] px-[0.38rem] text-[0.63rem] font-bold text-[#ffffff]"
|
|
|
- >
|
|
|
- {{ DictionaryStore.modelTypes.map.get(state.detail.type) }}
|
|
|
+ <div class="flex">
|
|
|
+ <div
|
|
|
+ class="flex h-[1.25rem] items-center justify-center rounded-[0.13rem] bg-gradient-to-r from-[#FF9E2D] to-[#FFB92D] px-[0.38rem] text-[0.63rem] font-bold text-[#ffffff]"
|
|
|
+ >
|
|
|
+ {{ DictionaryStore.modelTypes.map.get(state.detail.type) }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="mt-[0.25rem] ml-auto"></div>
|
|
|
</div>
|
|
|
- <div class="mt-[0.25rem] ml-auto"></div>
|
|
|
- </div>
|
|
|
- <div class="mt-2.5 text-sm text-[#606266]" style="line-height: 1.4rem">
|
|
|
- {{ state.detail.description }}
|
|
|
- </div>
|
|
|
- <div class="mt-2.5 flex items-center gap-2.5 text-[0.75rem] text-[#6F7889]">
|
|
|
- <div>
|
|
|
- {{ DictionaryStore.modelProvides.map.get(state.detail.pluginClass) }}
|
|
|
+ <div class="mt-2.5 text-sm text-[#606266]" style="line-height: 1.4rem">
|
|
|
+ {{ state.detail.description }}
|
|
|
</div>
|
|
|
- <div>|</div>
|
|
|
- <div>(创建单位)</div>
|
|
|
- <div>|</div>
|
|
|
- <div>{{ state.detail.createNickName }}</div>
|
|
|
- <div>|</div>
|
|
|
- <div>{{ YMDHms(state.detail.updateTime) }}</div>
|
|
|
- </div>
|
|
|
- <div class="mt-4 flex flex-1 flex-col gap-4 overflow-y-auto">
|
|
|
- <div class="card">
|
|
|
- <div class="__czr-title_1">Token调用次数</div>
|
|
|
- <div class="h-[9rem] w-full">
|
|
|
- <lineChart :data="state.statistic.token" />
|
|
|
+ <div
|
|
|
+ class="mt-2.5 flex items-center gap-2.5 text-[0.75rem] text-[#6F7889]"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ {{ DictionaryStore.modelProvides.map.get(state.detail.pluginClass) }}
|
|
|
</div>
|
|
|
+ <div>|</div>
|
|
|
+ <div>(创建单位)</div>
|
|
|
+ <div>|</div>
|
|
|
+ <div>{{ state.detail.createNickName }}</div>
|
|
|
+ <div>|</div>
|
|
|
+ <div>{{ YMDHms(state.detail.updateTime) }}</div>
|
|
|
</div>
|
|
|
- <div class="card">
|
|
|
- <div class="__czr-title_1">大模型调用次数</div>
|
|
|
- <div class="h-[9rem] w-full">
|
|
|
- <lineChart :data="state.statistic.call" />
|
|
|
+ <div class="mt-4 flex flex-1 flex-col gap-4 overflow-y-auto">
|
|
|
+ <div class="card">
|
|
|
+ <div class="__czr-title_1">Token调用次数</div>
|
|
|
+ <div class="h-[9rem] w-full">
|
|
|
+ <lineChart :data="state.statistic.token" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="flex gap-4">
|
|
|
- <div class="card flex-1">
|
|
|
- <div class="__czr-title_1">调用单位占比统计</div>
|
|
|
- <div class="h-[16rem] w-full">
|
|
|
- <pieChart :data="state.statistic.dept" />
|
|
|
+ <div class="card">
|
|
|
+ <div class="__czr-title_1">大模型调用次数</div>
|
|
|
+ <div class="h-[9rem] w-full">
|
|
|
+ <lineChart :data="state.statistic.call" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="card flex-1">
|
|
|
- <div class="__czr-title_1">大模型调用明细</div>
|
|
|
- <div class="mt-2 flex h-[16rem] w-full flex-col">
|
|
|
- <div class="flex h-[2.25rem] items-center gap-2">
|
|
|
- <CzrButton
|
|
|
- :type="
|
|
|
- state.statistic.table.dateType === 1 ? 'primary' : 'normal'
|
|
|
- "
|
|
|
- title="今日"
|
|
|
- @click="() => (state.statistic.table.dateType = 1)"
|
|
|
- />
|
|
|
- <CzrButton
|
|
|
- :type="
|
|
|
- state.statistic.table.dateType === 2 ? 'primary' : 'normal'
|
|
|
- "
|
|
|
- title="近7天"
|
|
|
- @click="() => (state.statistic.table.dateType = 2)"
|
|
|
- />
|
|
|
- <CzrButton
|
|
|
- :type="
|
|
|
- state.statistic.table.dateType === 3 ? 'primary' : 'normal'
|
|
|
- "
|
|
|
- title="近30天"
|
|
|
- @click="() => (state.statistic.table.dateType = 3)"
|
|
|
- />
|
|
|
- <CzrButton
|
|
|
- :type="
|
|
|
- state.statistic.table.dateType === 4 ? 'primary' : 'normal'
|
|
|
- "
|
|
|
- title="自定义"
|
|
|
- @click="() => (state.statistic.table.dateType = 4)"
|
|
|
- />
|
|
|
- <CzrFormColumn
|
|
|
- v-if="state.statistic.table.dateType === 4"
|
|
|
- width="25rem"
|
|
|
- class="__czr-table-form-column"
|
|
|
- label-width="0px"
|
|
|
- v-model:param="state.statistic.table.cusDate"
|
|
|
- link="datetime"
|
|
|
- type="datetimerange"
|
|
|
- />
|
|
|
+ <div class="flex gap-4">
|
|
|
+ <div class="card flex-1">
|
|
|
+ <div class="__czr-title_1">调用单位占比统计</div>
|
|
|
+ <div class="h-[16rem] w-full">
|
|
|
+ <pieChart :data="state.statistic.dept" />
|
|
|
</div>
|
|
|
- <div class="flex-1">
|
|
|
- <CzrTable
|
|
|
- v-loading="state.statistic.table.query.loading"
|
|
|
- :data="state.statistic.table.query.result.data"
|
|
|
- :head="state.statistic.table.query.head"
|
|
|
- :no-foot="true"
|
|
|
- >
|
|
|
- <template #name-column-value="{ scope }">
|
|
|
- <div class="flex justify-center">
|
|
|
- <CzrButton
|
|
|
- type="table"
|
|
|
- :title="scope.row.p1"
|
|
|
- @click="onStage(scope.row)"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template #caozuo-column-value="{ scope }">
|
|
|
- <div class="__czr-table-operations">
|
|
|
- <CzrButton
|
|
|
- type="table"
|
|
|
- title="重命名"
|
|
|
- @click="onRename(scope.row)"
|
|
|
- />
|
|
|
- <CzrButton
|
|
|
- type="table"
|
|
|
- title="迁移"
|
|
|
- @click="onKnowledge(scope.row)"
|
|
|
- />
|
|
|
- <CzrButton type="table" title="归档" />
|
|
|
- <CzrButton type="table-del" @click="onDel(scope.row)" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </CzrTable>
|
|
|
+ </div>
|
|
|
+ <div class="card flex-1">
|
|
|
+ <div class="__czr-title_1">大模型调用明细</div>
|
|
|
+ <div class="mt-2 flex h-[16rem] w-full flex-col">
|
|
|
+ <div class="flex h-[2.25rem] items-center gap-2">
|
|
|
+ <CzrButton
|
|
|
+ :type="
|
|
|
+ state.statistic.table.dateType === 1 ? 'primary' : 'normal'
|
|
|
+ "
|
|
|
+ title="今日"
|
|
|
+ @click="() => (state.statistic.table.dateType = 1)"
|
|
|
+ />
|
|
|
+ <CzrButton
|
|
|
+ :type="
|
|
|
+ state.statistic.table.dateType === 2 ? 'primary' : 'normal'
|
|
|
+ "
|
|
|
+ title="近7天"
|
|
|
+ @click="() => (state.statistic.table.dateType = 2)"
|
|
|
+ />
|
|
|
+ <CzrButton
|
|
|
+ :type="
|
|
|
+ state.statistic.table.dateType === 3 ? 'primary' : 'normal'
|
|
|
+ "
|
|
|
+ title="近30天"
|
|
|
+ @click="() => (state.statistic.table.dateType = 3)"
|
|
|
+ />
|
|
|
+ <CzrButton
|
|
|
+ :type="
|
|
|
+ state.statistic.table.dateType === 4 ? 'primary' : 'normal'
|
|
|
+ "
|
|
|
+ title="自定义"
|
|
|
+ @click="() => (state.statistic.table.dateType = 4)"
|
|
|
+ />
|
|
|
+ <CzrFormColumn
|
|
|
+ v-if="state.statistic.table.dateType === 4"
|
|
|
+ width="25rem"
|
|
|
+ class="__czr-table-form-column"
|
|
|
+ label-width="0px"
|
|
|
+ v-model:param="state.statistic.table.cusDate"
|
|
|
+ link="datetime"
|
|
|
+ type="datetimerange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="flex-1">
|
|
|
+ <CzrTable
|
|
|
+ v-loading="state.statistic.table.query.loading"
|
|
|
+ :data="state.statistic.table.query.result.data"
|
|
|
+ :head="state.statistic.table.query.head"
|
|
|
+ :no-foot="true"
|
|
|
+ >
|
|
|
+ <template #name-column-value="{ scope }">
|
|
|
+ <div class="flex justify-center">
|
|
|
+ <CzrButton
|
|
|
+ type="table"
|
|
|
+ :title="scope.row.p1"
|
|
|
+ @click="onStage(scope.row)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #caozuo-column-value="{ scope }">
|
|
|
+ <div class="__czr-table-operations">
|
|
|
+ <CzrButton
|
|
|
+ type="table"
|
|
|
+ title="重命名"
|
|
|
+ @click="onRename(scope.row)"
|
|
|
+ />
|
|
|
+ <CzrButton
|
|
|
+ type="table"
|
|
|
+ title="迁移"
|
|
|
+ @click="onKnowledge(scope.row)"
|
|
|
+ />
|
|
|
+ <CzrButton type="table" title="归档" />
|
|
|
+ <CzrButton type="table-del" @click="onDel(scope.row)" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </CzrTable>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -165,6 +171,7 @@ import pieChart from './pie-chart.vue'
|
|
|
import { pluginDetail } from '@/api/modules/model'
|
|
|
import { useDictionaryStore } from '@/stores'
|
|
|
import { YMDHms } from '@/utils/czr-util'
|
|
|
+import toBackCom from '@/views/manage/components/to-back.vue'
|
|
|
|
|
|
const DictionaryStore = useDictionaryStore()
|
|
|
const route = useRoute()
|
|
@@ -235,12 +242,6 @@ const initDetail = () => {
|
|
|
router.push({ name: '86e9f5e8-285d-4038-abc2-a39b2ad7fcd1' })
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-const toBack = () => {
|
|
|
- router.push({
|
|
|
- name: '86e9f5e8-285d-4038-abc2-a39b2ad7fcd1',
|
|
|
- })
|
|
|
-}
|
|
|
const initStatistic = () => {
|
|
|
state.statistic.table.query.loading = true
|
|
|
setTimeout(() => {
|