Compare commits

...

10 Commits

13 changed files with 40 additions and 5 deletions

View File

@@ -53,13 +53,27 @@ export const matchAlphanumericUnderscore = {
trigger: ['blur', 'change']
}
// 不能包含()
export const MatchExcludeParenthesis = {
validator: (rule, value, callback) => {
value = value?.trim()
if (!/^[^()]*$/.test(value)) {
callback(new Error(i18n.t('common.notParenthesis')))
} else {
callback()
}
},
trigger: ['blur', 'change']
}
export default {
IpCheck,
Required,
RequiredChange,
EmailCheck,
specialEmojiCheck,
matchAlphanumericUnderscore
matchAlphanumericUnderscore,
MatchExcludeParenthesis
}
export const JsonRequired = {

View File

@@ -215,6 +215,13 @@ export default {
handler(newValue, oldValue) {
},
deep: true
},
iOptions(val) {
if (val.length === 0) {
this.remote = false
} else {
this.remote = true
}
}
},
async mounted() {

View File

@@ -21,7 +21,6 @@
:placeholder="this.$t('common.EnterToContinue')"
class="search-input"
@blur="focus = false"
@change="handleConfirm"
@focus="focus = true"
@select="handleSelect"
@keyup.enter.native="handleConfirm"

View File

@@ -867,6 +867,7 @@
"SecretKey": "Secret Key",
"NotSpecialEmoji": "No special emoji allowed",
"notAlphanumericUnderscore": "Only numbers, letters and underscores can be entered",
"notParenthesis": "Not contain ( )",
"Task": "Task",
"Cas": "CAS",
"Invalid": "Invalid",

View File

@@ -804,6 +804,7 @@
"FormatError": "フォーマットエラー",
"NotSpecialEmoji": "特殊な表情記号の入力は許可されていません",
"notAlphanumericUnderscore": "数字、文字、アンダースコアのみ入力可能",
"notParenthesis": "含まない ( )",
"WeekCronSelect": {
"Monday": "月曜日",
"Tuesday": "火曜日",

View File

@@ -838,6 +838,7 @@
"FormatError": "格式错误",
"NotSpecialEmoji": "不允许输入特殊表情符号",
"notAlphanumericUnderscore": "只能输入字母、数字、下划线",
"notParenthesis": "不能包含 ( )",
"WeekCronSelect": {
"Monday": "星期一",
"Tuesday": "星期二",

View File

@@ -13,7 +13,7 @@ export default {
data() {
return {
config: {
activeMenu: 'VirtualAccountList',
activeMenu: 'AccountList',
submenu: [
{
title: this.$t('accounts.GeneralAccounts'),

View File

@@ -93,7 +93,7 @@ export default {
title: vm.$t('xpack.Execute'),
name: 'execute',
can: ({ row }) => {
return row.is_active && vm.$hasPerm('accounts.add_changesecretexection')
return row.is_active && vm.$hasPerm('accounts.add_changesecretexecution')
},
type: 'info',
disabled: ({ row }) => !row.is_active,

View File

@@ -39,7 +39,7 @@ export default {
this.$router.push({
name: routeName,
params: { id: id },
query: { provider: vm.Account.provider }
query: { provider: vm.Account.provider.value }
})
}
}

View File

@@ -101,6 +101,7 @@ export default {
if (status) {
data['id'] = value
this.tableConfig.totalData.push(data)
this.$emit('change', this.tableConfig.totalData)
}
},
handleCreate() {

View File

@@ -11,6 +11,7 @@
:title="$tc('profile.CreateAccessKey')"
:visible.sync="visible"
width="700px"
@close="onClose"
@confirm="visible = false"
>
<el-alert type="warning">
@@ -135,6 +136,9 @@ export default {
}
},
methods: {
onClose() {
this.getRefsListTable.reloadTable()
}
}
}
</script>

View File

@@ -4,6 +4,7 @@
<script>
import BaseAssetCreateUpdate from '@/views/assets/Asset/AssetCreateUpdate/BaseAssetCreateUpdate'
import { Required, MatchExcludeParenthesis } from '@/components/Form/DataForm/rules'
export default {
components: {
@@ -19,6 +20,9 @@ export default {
[this.$t('assets.Account'), ['auto_create_accounts', 'accounts_create_amount']]
],
addFieldsMeta: {
name: {
rules: [Required, MatchExcludeParenthesis]
},
accounts_create_amount: {
hidden: (formValue) => !formValue['auto_create_accounts']
},

View File

@@ -176,6 +176,9 @@ export default {
} else {
importLdapUser(data).then(res => {
this.$message.success(res.msg)
}).catch(error => {
const errorMessage = getErrorResponseMsg(error) || this.$t('common.imExport.ImportFail')
this.$message.error(errorMessage)
}).finally(() => {
this.dialogLdapUserImportAllLoginStatus = false
})