diff --git a/src/components/RowPagination/index.vue b/src/components/RowPagination/index.vue new file mode 100644 index 00000000..3e8c04d1 --- /dev/null +++ b/src/components/RowPagination/index.vue @@ -0,0 +1,57 @@ + + + + + + {{ i + 1 }} + + + + + + + + diff --git a/src/components/index.ts b/src/components/index.ts index a03aa034..76a1159b 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -16,6 +16,7 @@ import JEmpty from './Empty/index.vue' import AMapComponent from './AMapComponent/index.vue' import PathSimplifier from './AMapComponent/PathSimplifier.vue' import ValueItem from './ValueItem/index.vue' +import RowPagination from './RowPagination/index.vue' export default { install(app: App) { @@ -37,5 +38,6 @@ export default { .component('AMapComponent', AMapComponent) .component('PathSimplifier', PathSimplifier) .component('ValueItem', ValueItem) + .component('RowPagination', RowPagination) } } diff --git a/src/views/system/Apply/Save/components/EditForm.vue b/src/views/system/Apply/Save/components/EditForm.vue index bae48b9c..951c703e 100644 --- a/src/views/system/Apply/Save/components/EditForm.vue +++ b/src/views/system/Apply/Save/components/EditForm.vue @@ -333,6 +333,7 @@ .clientId " placeholder="请输入appId" + :disabled="!!form.data.id" /> @@ -657,10 +663,6 @@ required: true, message: '请输入secureKey', }, - { - max: 64, - message: '最多可输入64个字符', - }, ]" > @@ -711,7 +713,7 @@ v-model:value="form.data.apiServer.roleIdList" :options="form.roleIdList" mode="multiple" - placeholder="请选中角色" + placeholder="请选择角色" > @@ -1196,6 +1202,10 @@ required: true, message: '请输入appKey', }, + { + max: 64, + message: '最多可输入64个字符', + }, ]" > @@ -1227,6 +1237,10 @@ required: true, message: '请输入appSecret', }, + { + max: 64, + message: '最多可输入64个字符', + }, ]" > @@ -1281,6 +1295,10 @@ required: true, message: '请输入默认密码', }, + { + max: 64, + message: '最多可输入64个字符', + }, ]" > >) { if (info.file.status === 'uploading') { form.uploadLoading = true; } else if (info.file.status === 'done') { - info.file.url = info.file.response?.result; form.uploadLoading = false; form.data.sso.configuration.oauth2.logoUrl = info.file.response?.result; @@ -1798,7 +1815,7 @@ function clearNullProp(obj: object) { color: #000; &.ant-radio-button-wrapper-disabled { - opacity: .5; + opacity: 0.5; } &.ant-radio-button-wrapper-checked { diff --git a/src/views/system/Apply/Save/components/RequestTable.vue b/src/views/system/Apply/Save/components/RequestTable.vue index b25cdc2c..49606ec1 100644 --- a/src/views/system/Apply/Save/components/RequestTable.vue +++ b/src/views/system/Apply/Save/components/RequestTable.vue @@ -9,7 +9,7 @@ > - + - --> + + 新增 @@ -68,17 +75,20 @@ const columns = [ { title: 'KEY', dataIndex: 'key', - width: '40%' + key: 'key', + width: '40%', }, { title: 'VALUE', dataIndex: 'value', - width: '40%' + key: 'value', + width: '40%', }, { title: ' ', dataIndex: 'action', - width: '20%' + key: 'action', + width: '20%', }, ]; @@ -88,7 +98,7 @@ const tableData = computed(() => { return props.value.slice((current.value - 1) * 10, current.value * 10); }); -if(props.value.length < 1) addRow() +if (props.value.length < 1) addRow(); watch( () => props.value, (n, o) => { diff --git a/src/views/system/Apply/Save/typing.d.ts b/src/views/system/Apply/Save/typing.d.ts index 2bc07a2f..a7f2b3fd 100644 --- a/src/views/system/Apply/Save/typing.d.ts +++ b/src/views/system/Apply/Save/typing.d.ts @@ -34,7 +34,7 @@ export type formType = { type: 'none' | 'bearer' | 'oauth2' | 'basic' | 'other', // 类型, 可选值:none, bearer, oauth2, basic, other bearer: { token: string }, // 授权信息 basic: { username: string, password: string }, // 基本信息 - token: string, + token?: string, oauth2: { // OAuth2信息 authorizationUrl: string, // 授权地址 tokenUrl: string, // token地址 diff --git a/src/views/system/Apply/index.vue b/src/views/system/Apply/index.vue index 382c1cc3..a655c16c 100644 --- a/src/views/system/Apply/index.vue +++ b/src/views/system/Apply/index.vue @@ -46,7 +46,6 @@ enabled: 'success', disabled: 'error', }" - hasMark > @@ -74,7 +73,9 @@ 说明 - {{ slotProps.description }} + + {{ slotProps.description }} + @@ -271,8 +272,8 @@ const columns = [ dataIndex: 'action', key: 'action', scopedSlots: true, - width:'200px', - fixed:'right' + width: '200px', + fixed: 'right', }, ]; const queryParams = ref({}); @@ -361,7 +362,7 @@ const table = { // 有集成菜单权限 if (otherServers.includes('page')) others.children?.push({ - permission: [`${permission}:add`,`${permission}:update`], + permission: [`${permission}:add`, `${permission}:update`], key: 'page', text: '集成菜单', tooltip: { @@ -378,7 +379,7 @@ const table = { if (otherServers.includes('apiServer')) others.children?.push( { - permission: [`${permission}:add`,`${permission}:update`], + permission: [`${permission}:add`, `${permission}:update`], key: 'empowerment', text: '赋权', tooltip: { @@ -394,7 +395,7 @@ const table = { }, }, { - permission: [`${permission}:add`,`${permission}:update`], + permission: [`${permission}:add`, `${permission}:update`], key: 'viewApi', text: '查看API', tooltip: {