2323 step-strictly
2424 />
2525 <span class =" ml-4" >{{
26- $t('views.applicationOverview.appInfo.LimitDialog.timesDays')
27- }}</span >
26+ $t('views.applicationOverview.appInfo.LimitDialog.timesDays')
27+ }}</span >
2828 </el-form-item >
2929 <!-- 身份验证 -->
3030 <el-form-item
7474 style =" margin : 0 4px 0 0 !important "
7575 >
7676 <el-icon >
77- <RefreshRight />
77+ <RefreshRight />
7878 </el-icon >
7979 </el-button >
8080 </el-tooltip >
111111 >
112112 <el-checkbox-group v-model =" form.authentication_value.login_value" >
113113 <template v-for =" t in auth_list " :key =" t .value " >
114- <el-checkbox :label =" t.label" :value =" t.value" />
114+ <el-checkbox :label =" t.label" :value =" t.value" />
115115 </template >
116116 </el-checkbox-group >
117117 </el-form-item >
118+ <el-form-item
119+ :label =" $t('views.system.display_code')"
120+ :rules =" [
121+ {
122+ required: true,
123+ message: $t('views.applicationOverview.appInfo.LimitDialog.displayCodeRequired'),
124+ trigger: 'change',
125+ },
126+ ]"
127+ prop =" authentication_value.max_attempts"
128+ >
129+ <el-input-number
130+ v-model =" form.authentication_value.max_attempts"
131+ :min =" -1"
132+ :max =" 10"
133+ :step =" 1"
134+ controls-position =" right"
135+ />
136+ <span style =" margin-left : 8px ; color : #909399 ; font-size : 12px ;" >
137+ {{ $t('views.system.display_codeTip') }}
138+ </span >
139+ </el-form-item >
118140 </el-card >
119141 </el-radio-group >
120142
144166 </el-drawer >
145167</template >
146168<script setup lang="ts">
147- import { ref , watch , computed } from ' vue'
148- import { useRoute , useRouter } from ' vue-router'
149- import type { FormInstance , FormRules } from ' element-plus'
150- import { MsgSuccess } from ' @/utils/message'
151- import { t } from ' @/locales'
152- import { copyClick } from ' @/utils/clipboard'
153- import { loadSharedApi } from ' @/utils/dynamics-api/shared-api'
169+ import {ref , watch , computed } from ' vue'
170+ import {useRoute , useRouter } from ' vue-router'
171+ import type {FormInstance , FormRules } from ' element-plus'
172+ import {MsgSuccess } from ' @/utils/message'
173+ import {t } from ' @/locales'
174+ import {copyClick } from ' @/utils/clipboard'
175+ import {loadSharedApi } from ' @/utils/dynamics-api/shared-api'
154176
155177const router = useRouter ()
156178const route = useRoute ()
157179const {
158- params : { id },
180+ params : {id },
159181} = route
160182
161183const apiType = computed (() => {
@@ -174,6 +196,7 @@ const form = ref<any>({
174196 white_list: ' ' ,
175197 authentication_value: {
176198 type: ' password' ,
199+ max_attempts: 1 ,
177200 },
178201 authentication: false ,
179202})
@@ -197,6 +220,9 @@ const open = (data: any) => {
197220 form .value .authentication_value = data .authentication_value || {
198221 type: ' password' ,
199222 }
223+ if (! form .value .authentication_value .max_attempts ) {
224+ form .value .authentication_value .max_attempts = 1
225+ }
200226 if (
201227 form .value .authentication_value .type === ' password' &&
202228 ! form .value .authentication_value .password_value
@@ -205,7 +231,7 @@ const open = (data: any) => {
205231 }
206232 form .value .authentication = data .authentication
207233 dialogVisible .value = true
208- loadSharedApi ({ type: ' application' , systemType: apiType .value })
234+ loadSharedApi ({type: ' application' , systemType: apiType .value })
209235 .getChatUserAuthType ()
210236 .then ((ok : any ) => {
211237 auth_list .value = ok .data
@@ -223,7 +249,7 @@ const submit = async (formEl: FormInstance | undefined) => {
223249 authentication: form .value .authentication ,
224250 authentication_value: form .value .authentication_value ,
225251 }
226- loadSharedApi ({ type: ' application' , systemType: apiType .value })
252+ loadSharedApi ({type: ' application' , systemType: apiType .value })
227253 .putAccessToken (id as string , obj , loading )
228254 .then (() => {
229255 emit (' refresh' )
@@ -256,7 +282,7 @@ function firstGeneration() {
256282 }
257283}
258284
259- defineExpose ({ open })
285+ defineExpose ({open })
260286 </script >
261287<style lang="scss" scoped>
262288.authentication-append-input {
0 commit comments