diff --git a/cmdb-ui/src/api/cmdb/batch.js b/cmdb-ui/src/api/cmdb/batch.js
index 6c1f369..559e64b 100644
--- a/cmdb-ui/src/api/cmdb/batch.js
+++ b/cmdb-ui/src/api/cmdb/batch.js
@@ -44,13 +44,11 @@ export function writeExcel (columns, name) {
// Determines whether an array element is empty
export function any (ArrayList) {
- let flag = false
- ArrayList.forEach(item => {
- if (item) {
- flag = true
- return flag
+ for (let i = 0; i < ArrayList.length; i++) {
+ if (ArrayList[i]) {
+ return true
}
- })
+ }
return false
}
diff --git a/cmdb-ui/src/permission.js b/cmdb-ui/src/permission.js
index 4d42387..e42f5ea 100644
--- a/cmdb-ui/src/permission.js
+++ b/cmdb-ui/src/permission.js
@@ -28,16 +28,15 @@ router.beforeEach((to, from, next) => {
.then(res => {
const roles = res.result && res.result.role
store.dispatch('GenerateRoutes', { roles }).then(() => {
- // 根据roles权限生成可访问的路由表
- // 动态添加可访问路由表
+ // Generate an accessible routing table based on the roles permissions
+ // Dynamically add accessible routing tables
router.addRoutes(store.getters.addRouters)
-
const redirect = decodeURIComponent(from.query.redirect || to.path)
if (to.path === redirect) {
- // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
+ // set the replace: true so the navigation will not leave a history record
next({ ...to, replace: true })
} else {
- // 跳转到目的路由
+ // Jump to destination route
next({ path: redirect })
}
})
@@ -45,8 +44,8 @@ router.beforeEach((to, from, next) => {
.catch((e) => {
console.log(e)
notification.error({
- message: '错误',
- description: '请求用户信息失败,请重试'
+ message: this.$t('tip.error'),
+ description: 'Failed to request user information. Please try again!'
})
setTimeout(() => {
store.dispatch('Logout')
diff --git a/cmdb-ui/src/views/cmdb/batch/modules/UploadResult.vue b/cmdb-ui/src/views/cmdb/batch/modules/UploadResult.vue
index aa8919c..db76a36 100644
--- a/cmdb-ui/src/views/cmdb/batch/modules/UploadResult.vue
+++ b/cmdb-ui/src/views/cmdb/batch/modules/UploadResult.vue
@@ -44,7 +44,7 @@ export default {
this.upload2Server()
},
computed: {
- mpercent () {
+ mPercent () {
return Math.round(this.complete / this.total * 10000) / 100
},
progressStatus () {
diff --git a/cmdb-ui/src/views/cmdb/ci/index.vue b/cmdb-ui/src/views/cmdb/ci/index.vue
index f2673ba..3f4c4a9 100644
--- a/cmdb-ui/src/views/cmdb/ci/index.vue
+++ b/cmdb-ui/src/views/cmdb/ci/index.vue
@@ -389,7 +389,7 @@ export default {
columns.push({
title: this.$t('tip.operate'),
key: 'operation',
- width: 100,
+ width: 115,
fixed: 'right',
scopedSlots: { customRender: 'action' }
})
diff --git a/cmdb-ui/src/views/cmdb/ci/modules/CiDetail.vue b/cmdb-ui/src/views/cmdb/ci/modules/CiDetail.vue
index b4ba2be..d2fe625 100644
--- a/cmdb-ui/src/views/cmdb/ci/modules/CiDetail.vue
+++ b/cmdb-ui/src/views/cmdb/ci/modules/CiDetail.vue
@@ -79,6 +79,7 @@
-
diff --git a/cmdb-ui/src/views/cmdb/tree_views/index.vue b/cmdb-ui/src/views/cmdb/tree_views/index.vue
index 8d6d60d..4cf73d8 100644
--- a/cmdb-ui/src/views/cmdb/tree_views/index.vue
+++ b/cmdb-ui/src/views/cmdb/tree_views/index.vue
@@ -244,11 +244,14 @@ export default {
}
-