diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/IpDetails.vue b/nezha-fronted/src/components/common/bottomBox/tabs/IpDetails.vue index 8f4e1b096..e954b1cdd 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/IpDetails.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/IpDetails.vue @@ -67,7 +67,7 @@ - + @@ -101,8 +101,7 @@ export default { addr: '', mac: '', state: '', - remark: '', - asset: { id: '', name: '' } + remark: '' }, searchMsg: { // 给搜索框子组件传递的信息 zheze_none: true, @@ -133,7 +132,6 @@ export default { } }, methods: { - // 数据请求 getTableData (params) { if (params && Object.keys(params).length > 0) { for (const key in params) { @@ -149,39 +147,6 @@ export default { this.$set(this.searchLabel, 'id', this.obj.id) this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize) this.tools.loading = true - this.tableData = [{ - id: 1, - name: 'node-1', - subnet: { - id: 1, - name: 'bj' - }, - asset: { - id: 1, - name: 'bj' - }, - addr: '192.168.40.0', - mac: '1a:1b:6b:1d:65:1d', - remark: '', - state: 1, - uts: 1646982371692 - }, { - id: 2, - name: 'node-1', - subnet: { - id: 1, - name: 'bj' - }, - asset: { - id: 1, - name: 'bj' - }, - addr: '192.168.40.0', - mac: '1a:1b:6b:1d:65:1d', - remark: '', - state: 1, - uts: 1646982371692 - }] this.$get(this.url, { ...this.searchLabel }).then(response => { this.tools.loading = false if (response.code === 200) { diff --git a/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue b/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue index 74d450187..f3dcf894d 100644 --- a/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue +++ b/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue @@ -310,10 +310,10 @@ export default { url = '/dc/cabinet/template' } else if (this.importUrl.indexOf('dc') > -1) { url = '/dc/template' - } else if (this.importUrl.indexOf('/ipam/subnet') > -1) { + } else if (this.importUrl.indexOf('ipam/subnet') > -1) { url = '/ipam/subnet/template' - } else if (this.importUrl.indexOf('/ipam/ip') > -1) { - url = ' /ipam/ip/template' + } else if (this.importUrl.indexOf('ipam/ip') > -1) { + url = '/ipam/ip/template' } if (!url) { console.error('no interface support') diff --git a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue index b08984379..f4606473d 100644 --- a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue +++ b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue @@ -237,6 +237,14 @@ export default { id: e.type.id } }) + for (let i = 0; i < this.typeDataList.length - 1; i++) { + for (let j = i + 1; j < this.typeDataList.length; j++) { + if (this.typeDataList[i].id == this.typeDataList[j].id) { + this.typeDataList.splice(j, 1) + j-- + } + } + } }) } }