NEZ-3231 fix:software asset 查看二级页面开发
This commit is contained in:
@@ -82,6 +82,10 @@
|
|||||||
<discovery-tab v-if="from === fromRoute.assetDiscovery && targetTab === 'assetDiscoveryTab'" :from="from" :obj="obj" :tabs="tabs.discovery" @changeTab="changeTab" :targetTab.sync="targetTab"></discovery-tab>
|
<discovery-tab v-if="from === fromRoute.assetDiscovery && targetTab === 'assetDiscoveryTab'" :from="from" :obj="obj" :tabs="tabs.discovery" @changeTab="changeTab" :targetTab.sync="targetTab"></discovery-tab>
|
||||||
<!-- notebook Tab -->
|
<!-- notebook Tab -->
|
||||||
<notebook-tab @getTableData="getTableData" v-if="from === fromRoute.notebook && targetTab === 'notebookTab'" :from="from" :obj="obj" :tabs="tabs.notebook" @changeTab="changeTab" :targetTab.sync="targetTab"></notebook-tab>
|
<notebook-tab @getTableData="getTableData" v-if="from === fromRoute.notebook && targetTab === 'notebookTab'" :from="from" :obj="obj" :tabs="tabs.notebook" @changeTab="changeTab" :targetTab.sync="targetTab"></notebook-tab>
|
||||||
|
<!--softwareAsset列表的tab-->
|
||||||
|
<endpointTabNew v-if="from === fromRoute.softwareAsset && targetTab === 'endpoint'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.softwareAssetTabTitle" :targetTab="targetTab" @changeTab="changeTab"></endpointTabNew>
|
||||||
|
<!--model 下滑-->
|
||||||
|
<asset-tab v-if="(from === fromRoute.softwareType) && targetTab === 'asset'" :tabs="tabs.softwareType" ref="assetTab" :from="from" :obj="obj" @changeTab="changeTab" @exit="closeSubList" :targetTab.sync="targetTab"></asset-tab>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -241,6 +245,11 @@ export default {
|
|||||||
{ prop: 'moduleAlertMessage', name: this.$t('overall.alert') }
|
{ prop: 'moduleAlertMessage', name: this.$t('overall.alert') }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
softwareAsset: {
|
||||||
|
softwareAssetTabTitle: [
|
||||||
|
{ prop: 'endpoint', name: this.$t('asset.endpoint') },
|
||||||
|
]
|
||||||
|
},
|
||||||
endpoint: {
|
endpoint: {
|
||||||
endpointTabTitle: [
|
endpointTabTitle: [
|
||||||
{ prop: 'dashboardTab', name: this.$t('overall.dashboard') },
|
{ prop: 'dashboardTab', name: this.$t('overall.dashboard') },
|
||||||
@@ -268,6 +277,9 @@ export default {
|
|||||||
model: [
|
model: [
|
||||||
{ prop: 'asset', name: this.$t('asset.asset'), active: true }
|
{ prop: 'asset', name: this.$t('asset.asset'), active: true }
|
||||||
],
|
],
|
||||||
|
softwareType: [
|
||||||
|
{ prop: 'asset', name: this.$t('asset.asset'), active: true }
|
||||||
|
],
|
||||||
dc: {
|
dc: {
|
||||||
cabinet: [
|
cabinet: [
|
||||||
{ prop: 'cabinet', name: this.$t('asset.cabinet'), active: true },
|
{ prop: 'cabinet', name: this.$t('asset.cabinet'), active: true },
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ export default {
|
|||||||
// this.$store.commit('addConsole', consoleParam)
|
// this.$store.commit('addConsole', consoleParam)
|
||||||
},
|
},
|
||||||
getTableData (params) {
|
getTableData (params) {
|
||||||
|
let url = this.url
|
||||||
if (params && Object.keys(params).length > 0) {
|
if (params && Object.keys(params).length > 0) {
|
||||||
for (const key in params) {
|
for (const key in params) {
|
||||||
this.$set(this.searchLabel, key, params[key])
|
this.$set(this.searchLabel, key, params[key])
|
||||||
@@ -249,9 +250,12 @@ export default {
|
|||||||
this.$set(this.searchLabel, 'modelIds', this.obj.id)
|
this.$set(this.searchLabel, 'modelIds', this.obj.id)
|
||||||
} else if (this.from === fromRoute.dc) {
|
} else if (this.from === fromRoute.dc) {
|
||||||
this.$set(this.searchLabel, 'dcIds', this.obj.id)
|
this.$set(this.searchLabel, 'dcIds', this.obj.id)
|
||||||
|
} else if (this.from === fromRoute.softwareType) {
|
||||||
|
url = '/asset/software'
|
||||||
|
this.$set(this.searchLabel, 'typeIds', this.obj.id)
|
||||||
}
|
}
|
||||||
this.tools.loading = true
|
this.tools.loading = true
|
||||||
this.$get(this.url, { ...this.searchLabel, ...this.searchCheckBox }).then(response => {
|
this.$get(url, { ...this.searchLabel, ...this.searchCheckBox }).then(response => {
|
||||||
this.tools.loading = false
|
this.tools.loading = false
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
for (let i = 0; i < response.data.list.length; i++) {
|
for (let i = 0; i < response.data.list.length; i++) {
|
||||||
|
|||||||
@@ -138,6 +138,8 @@ export default {
|
|||||||
params.moduleIds = this.obj.id
|
params.moduleIds = this.obj.id
|
||||||
} else if (this.from === fromRoute.asset) {
|
} else if (this.from === fromRoute.asset) {
|
||||||
params.assetIds = this.obj.id
|
params.assetIds = this.obj.id
|
||||||
|
} else if (this.from === fromRoute.softwareAsset) {
|
||||||
|
params.softwareAssetIds = this.obj.id
|
||||||
}
|
}
|
||||||
this.$get(this.url, params).then(response => {
|
this.$get(this.url, params).then(response => {
|
||||||
this.tools.loading = false
|
this.tools.loading = false
|
||||||
|
|||||||
@@ -424,6 +424,8 @@ export const fromRoute = {
|
|||||||
assetType: 'assetType',
|
assetType: 'assetType',
|
||||||
assetState: 'assetState',
|
assetState: 'assetState',
|
||||||
assetLabel: 'assetLabel',
|
assetLabel: 'assetLabel',
|
||||||
|
softwareAsset: 'softwareAsset',
|
||||||
|
softwareType: 'softwareType',
|
||||||
assetDiscovery: 'assetDiscovery',
|
assetDiscovery: 'assetDiscovery',
|
||||||
user: 'user',
|
user: 'user',
|
||||||
agent: 'agent',
|
agent: 'agent',
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
|
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
|
||||||
<div slot-scope="scope" class="table-operation-items">
|
<div slot-scope="scope" class="table-operation-items">
|
||||||
<!-- <button class="table-operation-item" v-has="'softwareAsset_edit'" @click="$emit('edit', scope.row)" :title="$t('overall.edit')"><i class="nz-icon nz-icon-edit"></i></button> -->
|
<!-- <button class="table-operation-item" v-has="'softwareAsset_edit'" @click="$emit('edit', scope.row)" :title="$t('overall.edit')"><i class="nz-icon nz-icon-edit"></i></button> -->
|
||||||
<button class="table-operation-item" @click="showBottomBox('asset', scope.row)" :title="$t('overall.view')"><i class="nz-icon nz-icon-view1"></i></button>
|
<button class="table-operation-item" @click="showBottomBox('endpoint', scope.row)" :title="$t('overall.view')"><i class="nz-icon nz-icon-view1"></i></button>
|
||||||
<el-dropdown size="medium" v-has="['softwareAsset_delete','main_edit','softwareAsset_edit']" trigger="click" @command="tableOperation">
|
<el-dropdown size="medium" v-has="['softwareAsset_delete','main_edit','softwareAsset_edit']" trigger="click" @command="tableOperation">
|
||||||
<div class="table-operation-item table-operation-item--more" :title="$t('overall.moreOperations')">
|
<div class="table-operation-item table-operation-item--more" :title="$t('overall.moreOperations')">
|
||||||
<i class="nz-icon nz-icon-more3"></i>
|
<i class="nz-icon nz-icon-more3"></i>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
ref="dataList"
|
ref="dataList"
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
:from="fromRoute.model"
|
:from="fromRoute.softwareAsset"
|
||||||
:layout="['searchInput', 'elementSet', 'pagination']"
|
:layout="['searchInput', 'elementSet', 'pagination']"
|
||||||
:search-msg="searchMsg"
|
:search-msg="searchMsg"
|
||||||
@search="search"
|
@search="search"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
ref="dataList"
|
ref="dataList"
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
:from="fromRoute.model"
|
:from="fromRoute.softwareType"
|
||||||
:layout="['searchInput', 'elementSet', 'pagination']"
|
:layout="['searchInput', 'elementSet', 'pagination']"
|
||||||
:search-msg="searchMsg"
|
:search-msg="searchMsg"
|
||||||
@search="search"
|
@search="search"
|
||||||
|
|||||||
Reference in New Issue
Block a user