mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: Feishu lark support attributes settings
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
|
||||
<script>
|
||||
import BaseAuth from './Base'
|
||||
import { UpdateToken } from '@/components/Form/FormFields'
|
||||
import { JsonEditor, UpdateToken } from '@/components/Form/FormFields'
|
||||
import { JsonRequiredUserNameMapped } from '@/components/Form/DataForm/rules'
|
||||
|
||||
export default {
|
||||
name: 'Feishu',
|
||||
@@ -33,7 +34,18 @@ export default {
|
||||
},
|
||||
formFields: {
|
||||
type: Array,
|
||||
default: () => ['AUTH_FEISHU', 'FEISHU_APP_ID', 'FEISHU_APP_SECRET']
|
||||
default: () => ['AUTH_FEISHU', 'FEISHU_APP_ID', 'FEISHU_APP_SECRET', 'FEISHU_RENAME_ATTRIBUTES']
|
||||
},
|
||||
formFieldsMeta: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return {
|
||||
FEISHU_RENAME_ATTRIBUTES: {
|
||||
component: JsonEditor,
|
||||
rules: [JsonRequiredUserNameMapped]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
enableFieldName: {
|
||||
type: String,
|
||||
@@ -65,6 +77,7 @@ export default {
|
||||
],
|
||||
encryptedFields: this.encryptedFields,
|
||||
fields: this.formFields,
|
||||
fieldsMeta: this.formFieldsMeta,
|
||||
// 不清理的话,编辑secret,在删除提交会报错
|
||||
cleanFormValue(data) {
|
||||
this.encryptedFields.forEach(field => {
|
||||
|
||||
@@ -4,12 +4,15 @@
|
||||
:form-fields="formFields"
|
||||
:title="$tc('setting.Lark')"
|
||||
:encrypted-fields="encryptedFields"
|
||||
:form-fields-meta="formFieldsMeta"
|
||||
:enable-field-name="enableFieldName"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FeiShu from './FeiShu'
|
||||
import { JsonEditor } from '@/components/Form/FormFields'
|
||||
import { JsonRequiredUserNameMapped } from '@/components/Form/DataForm/rules'
|
||||
|
||||
export default {
|
||||
name: 'Lark',
|
||||
@@ -24,10 +27,18 @@ export default {
|
||||
return 'AUTH_LARK'
|
||||
},
|
||||
formFields() {
|
||||
return ['AUTH_LARK', 'LARK_APP_ID', 'LARK_APP_SECRET']
|
||||
return ['AUTH_LARK', 'LARK_APP_ID', 'LARK_APP_SECRET', 'LARK_RENAME_ATTRIBUTES']
|
||||
},
|
||||
encryptedFields() {
|
||||
return ['LARK_APP_SECRET']
|
||||
},
|
||||
formFieldsMeta() {
|
||||
return {
|
||||
LARK_RENAME_ATTRIBUTES: {
|
||||
component: JsonEditor,
|
||||
rules: [JsonRequiredUserNameMapped]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
|
||||
Reference in New Issue
Block a user