Merge remote-tracking branch 'origin/build' into build

This commit is contained in:
wanglei
2024-06-25 08:39:56 +08:00
2 changed files with 49 additions and 45 deletions

View File

@@ -5,7 +5,7 @@
<!-- 标题 -->
<ai-title slot="title" :title="$options.label" isShowBottomBorder/>
<template #content>
<ai-tree-menu title="企微统计">
<ai-tree-menu title="企微统计" hideInput>
<el-tree @node-click="nodeClick" :props="props" :load="loadNode" lazy :expand-on-click-node="false"/>
</ai-tree-menu>
<div class="fill mar-l8">
@@ -43,10 +43,10 @@
</template>
</ai-search-bar>
<ai-table :tableData="gropList" :total="page.total" :current.sync="page.current" :size.sync="page.size"
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
@getList="getTableData" :col-configs="colConfigs" :dict="dict" height="calc(100% - 64px)">
<el-table-column label="操作" slot="options" align="center" width="100">
<template v-slot="{row}">
<el-button type="text" @click="$router.push({hash:'#add',query:{id:row.id}})">详情</el-button>
<el-button v-if="row.aiEnable==1" type="text" @click="$router.push({hash:'#add',query:{id:row.id}})">详情</el-button>
</template>
</el-table-column>
</ai-table>
@@ -60,9 +60,11 @@
<script>
import {mapState} from 'vuex'
import coDetail from "./coDetail.vue";
import AiCard from "dui/packages/layout/AiCard.vue";
export default {
name: 'AppCorpOverview',
components: {AiCard},
label: '企微概览',
props: {
dict: Object,
@@ -98,7 +100,7 @@ export default {
},
colConfigs() {
return [
{label: "企微名称", prop: "name", align: 'center', width: 250},
{label: "企微名称", prop: "name", width: 250},
{label: "地区", prop: "areaName", align: 'center', width: 150},
{label: "地区编码", prop: "areaId", align: 'center', width: 150},
{label: "创建时间", prop: "createTime", align: 'center', width: 200},
@@ -107,16 +109,14 @@ export default {
]
}
},
mounted() {
this.getInfo()
this.getTableData()
},
methods: {
loadNode(node, resolve) {
if (node.level == 0) {
this.instance.post(`/api/appCorpStat/getCorpStatTotal`).then((res) => {
this.instance.post(`/api/appcorp2/getCorpStatTotal`).then((res) => {
if (res.data) {
return resolve([{name: `全国 (${res.data})`}]);
}
@@ -128,17 +128,15 @@ export default {
if (node.level == 1) { //全国
areaId = ''
}
this.instance.post(`/api/appCorpStat/getCorpStatByArea?areaId=${areaId}`).then((res) => {
this.instance.post(`/api/appcorp2/getCorpStatByArea?areaId=${areaId}`).then((res) => {
if (res.data) {
res.data.map((item) => {
item.name = item.name + `(${item.total})`
item.leaf = !/0{8}$/.test(item.id)
})
resolve(res.data)
}
})
},
nodeClick(list, node) {
if (node.data.id) {
this.areaId = node.data.id
@@ -149,7 +147,6 @@ export default {
this.getInfo()
this.getTableData()
},
resetSearch() {
this.name = ''
this.page.current = 1
@@ -157,23 +154,18 @@ export default {
this.page.total = 0
this.getTableData()
},
getInfo() {
this.info = {}
this.instance.post(`/api/appCorpStat/getLatestInfo?areaId=${this.areaId}`).then(res => {
if (res.code === 0) {
this.info = res.data
this.instance.post(`/api/appcorp2/getLatestInfo?areaId=${this.areaId}`).then(res => {
if (res?.data) {
this.info = res.data || {}
}
})
},
getTableData() {
this.instance.post(`/api/appCorp/page?areaId=${this.areaId}&current=${this.page.current}&size=${this.page.size}&name=${this.name}`,).then(res => {
if (res.code === 0) {
if (res.data) {
this.gropList = res.data.records
this.page.total = res.data.total
}
this.instance.post(`/api/appcorp2/list?areaId=${this.areaId}&current=${this.page.current}&size=${this.page.size}&name=${this.name}`,).then(res => {
if (res?.data) {
this.gropList = res.data.records
this.page.total = res.data.total
}
})
},
@@ -208,12 +200,13 @@ export default {
.ai-search-ba {
margin-top: 10px;
}
.ai-table {
margin-top: 0 !important;
}
}
}
.ai-table {
height: calc(100% - 44px);
margin-top: 0 !important;
}
}
}
@@ -252,7 +245,6 @@ export default {
gap: 16px;
.title {
line-height: 60px;
font-size: 18px;
@@ -267,5 +259,13 @@ export default {
padding-bottom: 20px;
}
}
.table {
background: #fff;
box-shadow: 0 4px 6px -2px rgba(15, 15, 21, 0.15);
border-radius: 2px;
padding: 16px;
height: calc(100% - 133px);
}
}
</style>

View File

@@ -1,10 +1,7 @@
<script>
import AiTable from "dui/packages/basic/AiTable.vue";
const aiBase = process.env.NODE_ENV == "production" ? "https://aiweb.icunwei.com" : "http://192.168.1.87:9000"
export default {
name: "coDetail",
components: {AiTable},
label: "系统详情",
props: {
dict: Object,
@@ -15,28 +12,35 @@ export default {
detail: {},
tableData: [],
sta: {
a: "接入群数量",
b: "群消息调用总计",
c: "昨日群调用",
d: "昨日请求人数"
accessGroupCount: "接入群数量",
aiCallCount: "群消息调用总计",
yesterdayCallCount: "昨日群调用",
yesterdayCallMember: "昨日请求人数"
}
}
},
computed: {
columns: v => [
{label: "群ID", prop: "1", width: 160},
{label: "时间", prop: "1", width: 160},
{label: "请求文本", prop: "1"},
columns: () => [
{label: "群ID", prop: "xbotGroupId", width: 160},
{label: "时间", prop: "sendTime", width: 160},
{label: "请求文本", prop: "content"},
]
},
methods: {
getDetail() {
const {id} = this.$route.query
this.instance.post("", null, {
this.instance.post("/api/appcorp2/list", null, {
params: {id}
}).then(res => {
if (res?.data) {
this.detail = res.data
this.detail = res.data.records?.[0] || {}
}
})
this.instance.post("/api/apiForward", null, {
params: {url: `${aiBase}/app/appmasssendingtaskbaidu/ailist?size=15`}
}).then(res => {
if (res?.data) {
this.tableData = res.data
}
})
}
@@ -55,9 +59,9 @@ export default {
<div>
<ai-card title="大模型应用详情">
<el-descriptions :column="1" :colon="false">
<el-descriptions-item label="地域名称"></el-descriptions-item>
<el-descriptions-item label="地域编号"></el-descriptions-item>
<el-descriptions-item label="ab_appid"></el-descriptions-item>
<el-descriptions-item label="地域名称">{{ detail.areaName }}</el-descriptions-item>
<el-descriptions-item label="地域编号">{{ detail.areaId }}</el-descriptions-item>
<el-descriptions-item label="ab_appid">{{ detail.abAppid }}</el-descriptions-item>
</el-descriptions>
</ai-card>
<ai-card title="大模型应用统计">