mirror of
https://github.com/veops/cmdb.git
synced 2025-08-08 11:18:40 +08:00
@@ -75,7 +75,6 @@
|
||||
<a-popconfirm
|
||||
title="确认删除?"
|
||||
@confirm="handleDelete(record)"
|
||||
@cancel="cancel"
|
||||
okText="是"
|
||||
cancelText="否"
|
||||
>
|
||||
|
@@ -40,7 +40,7 @@
|
||||
bordered
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="_id"
|
||||
rowKey="ci_id"
|
||||
:columns="columns"
|
||||
:data="loadInstances"
|
||||
:alert="options.alert"
|
||||
@@ -158,7 +158,7 @@ export default {
|
||||
result.totalCount = res.numfound
|
||||
result.totalPage = Math.ceil(res.numfound / params.pageSize)
|
||||
result.data = Object.assign([], res.result)
|
||||
result.data.forEach((item, index) => (item.key = item._id))
|
||||
result.data.forEach((item, index) => (item.key = item.ci_id))
|
||||
setTimeout(() => {
|
||||
this.setColumnWidth()
|
||||
}, 200)
|
||||
@@ -324,7 +324,7 @@ export default {
|
||||
return searchCI(`q=_id:${ciId}`).then(res => {
|
||||
const ciMap = {}
|
||||
Object.keys(res.result[0]).forEach(k => {
|
||||
if (!['ci_type', '_id', 'ci_type_alias', '_type'].includes(k)) {
|
||||
if (!['ci_type', 'ci_id', 'ci_type_alias', 'type_id'].includes(k)) {
|
||||
ciMap[k] = res.result[0][k]
|
||||
}
|
||||
})
|
||||
|
@@ -33,7 +33,7 @@
|
||||
<div v-for="parent in parentCITypes" :key="'ctr_' + parent.ctr_id">
|
||||
<a-card type="inner" :title="parent.alias || parent.name" v-if="firstCIs[parent.name]">
|
||||
<a-table
|
||||
rowKey="_id"
|
||||
rowKey="ci_id"
|
||||
size="middle"
|
||||
:columns="firstCIColumns[child.id]"
|
||||
:dataSource="firstCIs[child.name]"
|
||||
@@ -45,7 +45,7 @@
|
||||
<div v-for="child in childCITypes" :key="'ctr_' + child.ctr_id">
|
||||
<a-card type="inner" :title="child.alias || child.name" v-if="secondCIs[child.name]">
|
||||
<a-table
|
||||
rowKey="_id"
|
||||
rowKey="ci_id"
|
||||
size="middle"
|
||||
:columns="secondCIColumns[child.id]"
|
||||
:dataSource="secondCIs[child.name]"
|
||||
|
@@ -20,7 +20,7 @@
|
||||
bordered
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="_id"
|
||||
rowKey="ci_id"
|
||||
:columns="columns"
|
||||
:data="loadInstances"
|
||||
:scroll="{ x: scrollX, y: scrollY }"
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
result.totalCount = res.numfound
|
||||
result.totalPage = Math.ceil(res.numfound / (params.pageSize || 25))
|
||||
result.data = Object.assign([], res.result)
|
||||
result.data.forEach((item, index) => (item.key = item._id))
|
||||
result.data.forEach((item, index) => (item.key = item.ci_id))
|
||||
setTimeout(() => {
|
||||
this.setColumnWidth()
|
||||
}, 200)
|
||||
@@ -203,7 +203,7 @@ export default {
|
||||
this.current = [this.typeId]
|
||||
this.loadColumns()
|
||||
this.levels = res.find(item => item.id === this.typeId).levels
|
||||
this.$refs.table.refresh(true)
|
||||
this.$refs.table && this.$refs.table.refresh(true)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
Reference in New Issue
Block a user