ab add version
This commit is contained in:
@@ -44,3 +44,11 @@ export function batchRemove (data) {
|
|||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function simpleData (data) {
|
||||||
|
return request({
|
||||||
|
url: '/peer/simpleData',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { T } from '@/utils/i18n'
|
|||||||
import { useRepositories as useCollectionRepositories } from '@/views/address_book/collection'
|
import { useRepositories as useCollectionRepositories } from '@/views/address_book/collection'
|
||||||
import { useRepositories as useTagRepositories } from '@/views/tag/index'
|
import { useRepositories as useTagRepositories } from '@/views/tag/index'
|
||||||
import { loadAllUsers } from '@/global'
|
import { loadAllUsers } from '@/global'
|
||||||
|
import { simpleData } from '@/api/peer'
|
||||||
|
|
||||||
export function useRepositories (is_my = 0) {
|
export function useRepositories (is_my = 0) {
|
||||||
|
|
||||||
@@ -42,6 +43,19 @@ export function useRepositories (is_my = 0) {
|
|||||||
const res = await list(listQuery).catch(_ => false)
|
const res = await list(listQuery).catch(_ => false)
|
||||||
listRes.loading = false
|
listRes.loading = false
|
||||||
if (res) {
|
if (res) {
|
||||||
|
const ids = res.data.list.map(item => item.id)
|
||||||
|
if (ids.length) {
|
||||||
|
const peer_data = await simpleData({ ids }).catch(_ => false)
|
||||||
|
if (peer_data) {
|
||||||
|
res.data.list.forEach(item => {
|
||||||
|
const peer = peer_data.data.list.find(peer => peer.id === item.id)
|
||||||
|
if (peer) {
|
||||||
|
item.peer = peer
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
listRes.list = res.data.list
|
listRes.list = res.data.list
|
||||||
listRes.total = res.data.total
|
listRes.total = res.data.total
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<!-- <el-table-column prop="created_at" label="创建时间" align="center"/>-->
|
<!-- <el-table-column prop="created_at" label="创建时间" align="center"/>-->
|
||||||
<!-- <el-table-column prop="updated_at" label="更新时间" align="center"/>-->
|
<!-- <el-table-column prop="updated_at" label="更新时间" align="center"/>-->
|
||||||
<el-table-column prop="alias" :label="T('Alias')" align="center" width="150"/>
|
<el-table-column prop="alias" :label="T('Alias')" align="center" width="150"/>
|
||||||
|
<el-table-column prop="peer.version" :label="T('Version')" align="center" width="100"/>
|
||||||
<el-table-column prop="hash" :label="T('Hash')" align="center" width="150" show-overflow-tooltip/>
|
<el-table-column prop="hash" :label="T('Hash')" align="center" width="150" show-overflow-tooltip/>
|
||||||
<el-table-column :label="T('Actions')" align="center" class-name="table-actions" width="500" fixed="right">
|
<el-table-column :label="T('Actions')" align="center" class-name="table-actions" width="500" fixed="right">
|
||||||
<template #default="{row}">
|
<template #default="{row}">
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
<!-- <el-table-column prop="created_at" label="创建时间" align="center"/>-->
|
<!-- <el-table-column prop="created_at" label="创建时间" align="center"/>-->
|
||||||
<!-- <el-table-column prop="updated_at" label="更新时间" align="center"/>-->
|
<!-- <el-table-column prop="updated_at" label="更新时间" align="center"/>-->
|
||||||
<el-table-column prop="alias" :label="T('Alias')" align="center" width="150"/>
|
<el-table-column prop="alias" :label="T('Alias')" align="center" width="150"/>
|
||||||
|
<el-table-column prop="peer.version" :label="T('Version')" align="center" width="100"/>
|
||||||
<el-table-column prop="hash" :label="T('Hash')" align="center" width="150" show-overflow-tooltip/>
|
<el-table-column prop="hash" :label="T('Hash')" align="center" width="150" show-overflow-tooltip/>
|
||||||
<el-table-column :label="T('Actions')" align="center" class-name="table-actions" width="600" fixed="right">
|
<el-table-column :label="T('Actions')" align="center" class-name="table-actions" width="600" fixed="right">
|
||||||
<template #default="{row}">
|
<template #default="{row}">
|
||||||
|
|||||||
Reference in New Issue
Block a user