diff --git a/src/components/AutoDataForm/index.vue b/src/components/AutoDataForm/index.vue
index 9a9cb7b6e..5448b7577 100644
--- a/src/components/AutoDataForm/index.vue
+++ b/src/components/AutoDataForm/index.vue
@@ -192,6 +192,13 @@ export default {
if (!field) {
return
}
+ if (typeof error === 'object') {
+ const str = error
+ error = ''
+ Object.keys(str).forEach(key => {
+ error += `${parseInt(key) + 1}.${str[key][0]} `
+ })
+ }
if (field.attrs.error === error) {
error += '.'
}
diff --git a/src/layout/components/GenericCreateUpdateForm/index.vue b/src/layout/components/GenericCreateUpdateForm/index.vue
index decdedd9a..d6410303f 100644
--- a/src/layout/components/GenericCreateUpdateForm/index.vue
+++ b/src/layout/components/GenericCreateUpdateForm/index.vue
@@ -147,23 +147,27 @@ export default {
this.$emit('submitSuccess', res)
const h = this.$createElement
this.$log.debug('router is: ', detailRoute)
- this.$message({
- message: h('p', null, [
- h('el-link', {
- on: {
- click: () => this.$router.push(detailRoute)
- },
- style: { 'vertical-align': 'top' }
- }, msgLinkName),
- h('span', { style: {
- 'padding-left': '5px',
- 'height': '18px',
- 'line-height': '18px',
- 'font-size': '13.5px',
- 'font-weight': ' 400' }}, msg)
- ]),
- type: 'success'
- })
+ if (this.hasDetailInMsg) {
+ this.$message({
+ message: h('p', null, [
+ h('el-link', {
+ on: {
+ click: () => this.$router.push(detailRoute)
+ },
+ style: { 'vertical-align': 'top' }
+ }, msgLinkName),
+ h('span', { style: {
+ 'padding-left': '5px',
+ 'height': '18px',
+ 'line-height': '18px',
+ 'font-size': '13.5px',
+ 'font-weight': ' 400' }}, msg)
+ ]),
+ type: 'success'
+ })
+ } else {
+ this.$message.success(msg)
+ }
if (!addContinue) {
setTimeout(() => this.$router.push(route), 100)
}
@@ -189,6 +193,10 @@ export default {
hasSaveContinue: {
type: Boolean,
default: null
+ },
+ hasDetailInMsg: {
+ type: Boolean,
+ default: true
}
},
data() {
diff --git a/src/layout/components/Page/PasswordExpireTip.vue b/src/layout/components/Page/PasswordExpireTip.vue
index 376428a28..8b4623edb 100644
--- a/src/layout/components/Page/PasswordExpireTip.vue
+++ b/src/layout/components/Page/PasswordExpireTip.vue
@@ -24,6 +24,10 @@ export default {
'currentUser'
]),
isExpire() {
+ // 用户来源不是Local时不显示密码过期提示
+ if (this.currentUser.source !== 'local') {
+ return false
+ }
const intervalTime = this.getIntervalDays(this.currentUser.date_password_last_updated)
const securityPasswordExpirationTime = this.publicSettings.SECURITY_PASSWORD_EXPIRATION_TIME
if (intervalTime >= securityPasswordExpirationTime) {
diff --git a/src/userviews/users/UserFirstLogin/PersonalInformationImprovement/PersonalInformationImprovement.vue b/src/userviews/users/UserFirstLogin/PersonalInformationImprovement/PersonalInformationImprovement.vue
index e3a036a25..2e484758a 100644
--- a/src/userviews/users/UserFirstLogin/PersonalInformationImprovement/PersonalInformationImprovement.vue
+++ b/src/userviews/users/UserFirstLogin/PersonalInformationImprovement/PersonalInformationImprovement.vue
@@ -8,6 +8,7 @@
:update-success-next-route="updateSuccessNextRoute"
:clean-form-value="cleanFormValue"
:get-method="getMethod"
+ :on-perform-success="onPerformSuccess"
/>
@@ -86,6 +87,10 @@ export default {
methods: {
getMethod() {
return 'put'
+ },
+ onPerformSuccess() {
+ this.$message.success(this.$t('common.updateSuccessMsg'))
+ setTimeout(() => this.$router.push({ name: 'UserGuide' }), 100)
}
}
}
diff --git a/src/views/assets/CommandFilter/CommandFilterDetail/Detail.vue b/src/views/assets/CommandFilter/CommandFilterDetail/Detail.vue
index ff9603837..53f8ab644 100644
--- a/src/views/assets/CommandFilter/CommandFilterDetail/Detail.vue
+++ b/src/views/assets/CommandFilter/CommandFilterDetail/Detail.vue
@@ -32,14 +32,17 @@ export default {
title: this.$t('perms.addSystemUserToThisPermission'),
objectsAjax: {
url: '/api/v1/assets/system-users/',
- processResults: (data) => {
- let results = data.results
- results = results.filter((item) => item.protocol === 'ssh' || item.protocol === 'telnet').map((item) => {
- return { label: item.name + '(' + item.username + ')', value: item.id }
- })
- const more = !!data.next
- return { results: results, pagination: more, total: data.count }
+ transformOption: (item) => {
+ return { label: item.name + '(' + item.username + ')', value: item.id }
}
+ // processResults: (data) => {
+ // let results = data.results
+ // results = results.filter((item) => item.protocol === 'ssh' || item.protocol === 'telnet').map((item) => {
+ // return { label: item.name + '(' + item.username + ')', value: item.id }
+ // })
+ // const more = !!data.next
+ // return { results: results, pagination: more, total: data.count }
+ // }
},
hasObjectsId: this.object.system_users,
performAdd: (items) => {
diff --git a/src/views/assets/Label/LabelCreateUpdate.vue b/src/views/assets/Label/LabelCreateUpdate.vue
index 32e88b750..41db1c363 100644
--- a/src/views/assets/Label/LabelCreateUpdate.vue
+++ b/src/views/assets/Label/LabelCreateUpdate.vue
@@ -1,5 +1,5 @@
-
+