diff --git a/src/components/AutoDataZTree/index.vue b/src/components/AutoDataZTree/index.vue index 140ea396b..7a9265429 100644 --- a/src/components/AutoDataZTree/index.vue +++ b/src/components/AutoDataZTree/index.vue @@ -119,8 +119,8 @@ export default { ).then(() => { this.$message.success(this.$t('common.deleteSuccessMsg')) this.zTree.removeNode(currentNode) - }).catch(error => { - this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error)) + }).catch(() => { + // this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error)) }) }, onRename: function(event, treeId, treeNode, isCancel) { diff --git a/src/layout/components/GenericDetailPage/index.vue b/src/layout/components/GenericDetailPage/index.vue index ff040a3f6..a85565e12 100644 --- a/src/layout/components/GenericDetailPage/index.vue +++ b/src/layout/components/GenericDetailPage/index.vue @@ -65,7 +65,11 @@ export default { .replace('详情', '') this.$log.debug('Object is: ', obj) const objectName = this.getObjectName(obj) - return `${objectType}: ${objectName}` + let title = `${objectType}: ${objectName}` + if (title.length > 80) { + title = title.slice(0, 80) + '...' + } + return title } }, goBack: { diff --git a/src/views/assets/Asset/AssetDetail/Detail.vue b/src/views/assets/Asset/AssetDetail/Detail.vue index 5f0fbfb20..89f9d6037 100644 --- a/src/views/assets/Asset/AssetDetail/Detail.vue +++ b/src/views/assets/Asset/AssetDetail/Detail.vue @@ -15,7 +15,7 @@ import DetailCard from '@/components/DetailCard' import RelationCard from '@/components/RelationCard' import QuickActions from '@/components/QuickActions' -import LabelCard from '@/components/LabelCard' +import LabelCard from './components/LabelCard' import { toSafeLocalDateStr } from '@/utils/common' export default { diff --git a/src/components/LabelCard/index.vue b/src/views/assets/Asset/AssetDetail/components/LabelCard.vue similarity index 74% rename from src/components/LabelCard/index.vue rename to src/views/assets/Asset/AssetDetail/components/LabelCard.vue index eee89c46c..1a659f453 100644 --- a/src/components/LabelCard/index.vue +++ b/src/views/assets/Asset/AssetDetail/components/LabelCard.vue @@ -1,8 +1,8 @@ @@ -30,17 +30,14 @@ export default { }, data() { return { - iTag: [] + iLabels: [] } }, mounted() { this.$axios.get(`/api/v1/assets/labels/`).then(res => { - if (this.labels === []) { - return - } for (const i in res) { if (this.labels.indexOf(res[i].id) > -1) { - this.iTag.push(res[i].name) + this.iLabels.push(res[i]) } } }) diff --git a/src/views/assets/Asset/AssetList.vue b/src/views/assets/Asset/AssetList.vue index 0d202d056..c976fb1a6 100644 --- a/src/views/assets/Asset/AssetList.vue +++ b/src/views/assets/Asset/AssetList.vue @@ -143,6 +143,11 @@ export default { name: 'AssetCreate', query: this.$route.query }, + searchConfig: { + options: [ + { label: this.$t('assets.Label'), value: 'label' } + ] + }, extraMoreActions: [ { name: 'DeactiveSelected', diff --git a/src/views/audits/CommandExecutionList.vue b/src/views/audits/CommandExecutionList.vue index d044efd18..a95ba0005 100644 --- a/src/views/audits/CommandExecutionList.vue +++ b/src/views/audits/CommandExecutionList.vue @@ -83,8 +83,7 @@ export default { headerActions: { hasLeftActions: false, hasImport: false, - hasExport: false, - tagSearch: [] + hasExport: false } }, headerActions: { diff --git a/src/views/users/User/UserDetail/UserAssetPermissionRules.vue b/src/views/users/User/UserDetail/UserAssetPermissionRules.vue index 7267dbf3e..fec43b17c 100644 --- a/src/views/users/User/UserDetail/UserAssetPermissionRules.vue +++ b/src/views/users/User/UserDetail/UserAssetPermissionRules.vue @@ -22,17 +22,6 @@ export default { url: `/api/v1/perms/asset-permissions/?user_id=${this.object.id}`, hasSelection: false, hasTree: true, - tagSearch: [ - { label: this.$t('common.Name'), key: 'name' }, - { label: this.$t('common.isValid'), key: 'is_valid' }, - { label: this.$t('users.Username'), key: 'username' }, - { label: this.$t('users.UserGroups'), key: 'user_group' }, - { label: this.$t('assets.IP'), key: 'ip' }, - { label: this.$t('assets.Hostname'), key: 'hostname' }, - { label: this.$t('assets.Node'), key: 'node' }, - { label: this.$t('assets.SystemUser'), key: 'system_user' }, - { label: '继承(先占位)', key: 'all=0' } - ], columns: [ 'name', 'users_amount', 'user_groups_amount', 'assets_amount', 'nodes_amount', 'system_users_amount', 'is_active', 'actions'