Skip to content

Commit

Permalink
perf(asset): 资产树,右击增加计算节点数量的菜单,可以让后台去计算 #527
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxinwen committed Dec 10, 2020
1 parent 57d5c89 commit 543eaa8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/i18n/langs/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@
"RenameNode": "重命名节点",
"ShowAssetAllChildrenNode": "显示所有子节点资产",
"ShowAssetOnlyCurrentNode": "仅显示当前节点资产",
"CheckAssetsAmount": "校对资产数量",
"ShowNodeInfo": "显示节点详情",
"TestNodeAssetConnectivity": "测试资产节点可连接性",
"UpdateNodeAssetHardwareInfo": "更新节点资产硬件信息"
Expand Down
1 change: 1 addition & 0 deletions src/i18n/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@
"RenameNode": "Rename node",
"ShowAssetAllChildrenNode": "Show asset all children node",
"ShowAssetOnlyCurrentNode": "Show asset only current node",
"CheckAssetsAmount": "Check assets amount",
"ShowNodeInfo": "Show node information",
"TestNodeAssetConnectivity": "Test node asset connectivity",
"UpdateNodeAssetHardwareInfo": "Update node asset hardware information"
Expand Down
12 changes: 12 additions & 0 deletions src/views/assets/Asset/AssetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<i class="fa fa-align-justify" /> {{ this.$t('tree.ShowAssetAllChildrenNode') }}
</li>
<li class="divider" />
<li id="m_check_assets_amount" class="rmenu" tabindex="-1" @click="rCheckAssetsAmount">
<i class="fa fa-clone" /> {{ this.$t('tree.CheckAssetsAmount') }}
</li>
<li id="m_show_node_info" class="rmenu" tabindex="-1" @click="rMenuShowNodeInfo">
<i class="fa fa-info-circle" /> {{ this.$t('tree.ShowNodeInfo') }}
</li>
Expand Down Expand Up @@ -459,6 +462,15 @@ export default {
this.$message.error(this.$t('common.getErrorMsg' + ' ' + error))
})
},
rCheckAssetsAmount: function() {
this.$axios.post(
`/api/v1/assets/nodes/launch_check_assets_amount_task/`
).then(res => {
res.task
}).catch(error => {
this.$message.error(this.$t('common.getErrorMsg' + ' ' + error))
})
},
addRowToAssetsSelected(row) {
const selectValueIndex = this.assetTreeTableDialogSetting.assetsSelected.indexOf(row.id)
if (selectValueIndex === -1) {
Expand Down

0 comments on commit 543eaa8

Please sign in to comment.