diff --git a/cmdb-ui/src/components/CMDBValueTypeMapIcon/index.vue b/cmdb-ui/src/components/CMDBValueTypeMapIcon/index.vue index 137d2d3..11dfe5b 100644 --- a/cmdb-ui/src/components/CMDBValueTypeMapIcon/index.vue +++ b/cmdb-ui/src/components/CMDBValueTypeMapIcon/index.vue @@ -17,25 +17,29 @@ export default { getPropertyIcon(attr) { switch (attr.value_type) { case '0': - return 'icon-xianxing-shishu' + return 'duose-shishu' case '1': - return 'icon-xianxing-fudianshu' + return 'duose-fudianshu' case '2': if (attr.is_password) { - return 'icon-xianxing-password' + return 'duose-password' } if (attr.is_link) { - return 'icon-xianxing-link' + return 'duose-link' } - return 'icon-xianxing-wenben' + return 'duose-wenben' case '3': - return 'icon-xianxing-datetime' + return 'duose-datetime' case '4': - return 'icon-xianxing-date' + return 'duose-date' case '5': - return 'icon-xianxing-time' + return 'duose-time' case '6': - return 'icon-xianxing-json' + return 'duose-json' + case '7': + return 'duose-password' + case '8': + return 'duose-link' } }, }, diff --git a/cmdb-ui/src/components/tools/TopMenu.vue b/cmdb-ui/src/components/tools/TopMenu.vue index a84f580..f877cd2 100644 --- a/cmdb-ui/src/components/tools/TopMenu.vue +++ b/cmdb-ui/src/components/tools/TopMenu.vue @@ -11,9 +11,9 @@ :key="route.name" @click="() => handleClick(route)" > - {{ $t(route.meta.title) }} + {{ route.meta.title }} - + @@ -49,18 +49,8 @@ export default { components: { gridSvg, top_agent, top_acl }, data() { return { - defaultShowRouteName: [ - 'dag', - 'cmdb', - 'itsm', - 'ticket', - 'monitor', - 'calendar', - 'datainsight', - 'fullscreen', - 'oneterm', - ], - defaultUnShowRouteName: ['acl', 'agent'], + defaultShowRouteName: ['cmdb', 'acl'], + defaultUnShowRouteName: [], routes: store.getters.appRoutes.filter((i) => !(i.meta || {}).hiddenInTopMenu), current: store.getters.appRoutes[0].name, visible: false, diff --git a/cmdb-ui/src/modules/cmdb/lang/en.js b/cmdb-ui/src/modules/cmdb/lang/en.js index d7616a4..5929927 100644 --- a/cmdb-ui/src/modules/cmdb/lang/en.js +++ b/cmdb-ui/src/modules/cmdb/lang/en.js @@ -271,7 +271,7 @@ const cmdb_en = { tips1: 'Kind Reminder :', tips2: '1. Click to download the template, and users can customize the header of the template file, including model properties and model associations', // eslint-disable-next-line no-template-curly-in-string - tips3: '2. The red color in the template file represents the model relationship, such as the $Product. Product Name (${Model Name}. {Attribute Name}) column, which establishes the relationship between the physical machine and the product.', + tips3: '2. The red color in the template file represents the model relationship, such as the $Product. Product Name (${Model Name}. {Attribute Name}) column, which establishes the relationship with the product.', tips4: '3. In the download template Excel file, the predefined values of attributes will be set as dropdown options. Please note that due to the limitations of Excel itself, a single dropdown box is limited to a maximum of 255 characters. If it exceeds 255 characters, we will not set the dropdown options for this attribute', tips5: '4. When using Excel templates, please ensure that a single file does not exceed 5000 lines.', }, diff --git a/cmdb-ui/src/modules/cmdb/lang/zh.js b/cmdb-ui/src/modules/cmdb/lang/zh.js index b336e4d..ff966a3 100644 --- a/cmdb-ui/src/modules/cmdb/lang/zh.js +++ b/cmdb-ui/src/modules/cmdb/lang/zh.js @@ -270,7 +270,7 @@ const cmdb_zh = { tips1: '温馨提示:', tips2: '1. 点击下载模板,用户可以自定义模板文件的表头,包括模型属性、模型关联', // eslint-disable-next-line no-template-curly-in-string - tips3: '2. 模板文件中红色为模型关系,如$产品.产品名(${模型名}.{属性名})这一列就可建立物理机和产品之间的关系', + tips3: '2. 模板文件中红色为模型关系,如$产品.产品名(${模型名}.{属性名})这一列就可建立和产品之间的关系', tips4: '3. 下载模板excel文件中会将属性的预定义值置为下拉选项,请注意,受excel本身的限制,单个下拉框限制了最多255个字符,如果超过255个字符,我们不会设置该属性的下拉选项', tips5: '4. 在使用excel模板时,请确保单个文件不超过5000行', }, diff --git a/cmdb-ui/src/modules/cmdb/router/index.js b/cmdb-ui/src/modules/cmdb/router/index.js index da8909e..3ce4419 100644 --- a/cmdb-ui/src/modules/cmdb/router/index.js +++ b/cmdb-ui/src/modules/cmdb/router/index.js @@ -156,8 +156,8 @@ const genCmdbRoutes = async () => { const lastTypeId = window.localStorage.getItem('ops_ci_typeid') || undefined if (lastTypeId && preference.some(item => item.id === Number(lastTypeId))) { routes.redirect = `/cmdb/instances/types/${lastTypeId}` - } else if (routes.children[3]?.children?.length > 0) { - routes.redirect = routes.children[3]?.children.find(item => !item.hidden)?.path + } else if (routes.children[2]?.children?.length > 0) { + routes.redirect = routes.children[2].children.find(item => !item.hidden)?.path } else { routes.redirect = '/cmdb/dashboard' } diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/attributesTable.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/attributesTable.vue index 9a1a749..64fafbd 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci_types/attributesTable.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci_types/attributesTable.vue @@ -108,9 +108,7 @@ handle=".handle" > { + if (!attrTypeFilter.length) { + return true + } else { + if (attrTypeFilter.includes('7') && attr.is_password) { + return true + } + if (attrTypeFilter.includes('8') && attr.is_link) { + return true + } + if ( + attrTypeFilter.includes(attr.value_type) && + attr.value_type === '2' && + (attr.is_password || attr.is_link) + ) { + return false + } + if (attrTypeFilter.includes(attr.value_type)) { + return true + } + return false + } + }) + }, }, } diff --git a/cmdb-ui/src/style/global.less b/cmdb-ui/src/style/global.less index 790f2e4..8bf021c 100644 --- a/cmdb-ui/src/style/global.less +++ b/cmdb-ui/src/style/global.less @@ -1143,7 +1143,7 @@ body { border-bottom: 1px solid @border-color-base; } .ant-tabs-tab { - color: @text-color_4; + color: @text-color_2; } .ant-tabs-tab-active { color: @primary-color;