fix: bug#10891、10890、10893、10894、10905、10901
This commit is contained in:
parent
ebd304fdba
commit
07510a272e
|
@ -0,0 +1,57 @@
|
|||
<!-- 表格行新增 - 简单分页组件 -->
|
||||
<template>
|
||||
<div class="pager">
|
||||
<j-select v-model:value="myCurrent" style="width: 60px">
|
||||
<j-select-option v-for="(val, i) in pageArr" :value="i + 1">
|
||||
{{ i + 1 }}
|
||||
</j-select-option>
|
||||
</j-select>
|
||||
<j-pagination
|
||||
:pageSize="pageSize"
|
||||
v-model:current="myCurrent"
|
||||
:total="total"
|
||||
style="text-align: center"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="RowPagination">
|
||||
type PageEmits = {
|
||||
(e: 'update:pageNum', data: number | string): void;
|
||||
(e: 'update:pageSize', data: number | string): void;
|
||||
};
|
||||
|
||||
type PageProps = {
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
total: number;
|
||||
};
|
||||
|
||||
const emit = defineEmits<PageEmits>();
|
||||
const props = defineProps<PageProps>();
|
||||
|
||||
const myCurrent = computed({
|
||||
get: () => props.pageNum,
|
||||
set: (val: number) => {
|
||||
emit('update:pageNum', val);
|
||||
},
|
||||
});
|
||||
|
||||
const pageArr = computed(() => {
|
||||
const maxPageNum = Math.ceil(props.total / props.pageSize);
|
||||
return new Array(maxPageNum).fill(1);
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.pager {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 8px 0;
|
||||
.ant-pagination {
|
||||
margin-left: 8px;
|
||||
:deep(.ant-pagination-item) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -333,6 +333,7 @@
|
|||
.clientId
|
||||
"
|
||||
placeholder="请输入appId"
|
||||
:disabled="!!form.data.id"
|
||||
/>
|
||||
</j-form-item>
|
||||
<j-form-item
|
||||
|
@ -576,7 +577,12 @@
|
|||
form.data.apiClient.authConfig.type === 'bearer'
|
||||
"
|
||||
label="token"
|
||||
:name="['apiClient', 'authConfig', 'token']"
|
||||
:name="[
|
||||
'apiClient',
|
||||
'authConfig',
|
||||
'bearer',
|
||||
'token',
|
||||
]"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
|
@ -586,7 +592,7 @@
|
|||
>
|
||||
<j-input
|
||||
v-model:value="
|
||||
form.data.apiClient.authConfig.token
|
||||
form.data.apiClient.authConfig.bearer.token
|
||||
"
|
||||
placeholder="请输入token"
|
||||
/>
|
||||
|
@ -657,10 +663,6 @@
|
|||
required: true,
|
||||
message: '请输入secureKey',
|
||||
},
|
||||
{
|
||||
max: 64,
|
||||
message: '最多可输入64个字符',
|
||||
},
|
||||
]"
|
||||
>
|
||||
<template #label>
|
||||
|
@ -711,7 +713,7 @@
|
|||
v-model:value="form.data.apiServer.roleIdList"
|
||||
:options="form.roleIdList"
|
||||
mode="multiple"
|
||||
placeholder="请选中角色"
|
||||
placeholder="请选择角色"
|
||||
></j-select>
|
||||
<PermissionButton
|
||||
:hasPermission="`${rolePermission}:update`"
|
||||
|
@ -760,7 +762,7 @@
|
|||
@click="
|
||||
clickAddItem(
|
||||
form.data.apiServer.orgIdList,
|
||||
'Role',
|
||||
'Department',
|
||||
)
|
||||
"
|
||||
class="add-item"
|
||||
|
@ -1165,6 +1167,10 @@
|
|||
required: true,
|
||||
message: '请输入appId',
|
||||
},
|
||||
{
|
||||
max: 64,
|
||||
message: '最多可输入64个字符',
|
||||
},
|
||||
]"
|
||||
>
|
||||
<template #label>
|
||||
|
@ -1196,6 +1202,10 @@
|
|||
required: true,
|
||||
message: '请输入appKey',
|
||||
},
|
||||
{
|
||||
max: 64,
|
||||
message: '最多可输入64个字符',
|
||||
},
|
||||
]"
|
||||
>
|
||||
<template #label>
|
||||
|
@ -1227,6 +1237,10 @@
|
|||
required: true,
|
||||
message: '请输入appSecret',
|
||||
},
|
||||
{
|
||||
max: 64,
|
||||
message: '最多可输入64个字符',
|
||||
},
|
||||
]"
|
||||
>
|
||||
<template #label>
|
||||
|
@ -1281,6 +1295,10 @@
|
|||
required: true,
|
||||
message: '请输入默认密码',
|
||||
},
|
||||
{
|
||||
max: 64,
|
||||
message: '最多可输入64个字符',
|
||||
},
|
||||
]"
|
||||
>
|
||||
<j-input
|
||||
|
@ -1436,7 +1454,7 @@ const initForm: formType = {
|
|||
type: 'oauth2', // 类型, 可选值:none, bearer, oauth2, basic, other
|
||||
bearer: { token: '' }, // 授权信息
|
||||
basic: { username: '', password: '' }, // 基本信息
|
||||
token: '',
|
||||
// token: '',
|
||||
oauth2: {
|
||||
// OAuth2信息
|
||||
authorizationUrl: '', // 授权地址
|
||||
|
@ -1738,7 +1756,6 @@ function changeBackUpload(info: UploadChangeParam<UploadFile<any>>) {
|
|||
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 {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.dataIndex === 'key'">
|
||||
<j-input v-model:value="record.label" />
|
||||
<j-input v-model:value="record.key" />
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'value'">
|
||||
<j-input
|
||||
|
@ -37,13 +37,20 @@
|
|||
</template>
|
||||
</template>
|
||||
</j-table>
|
||||
<j-pagination
|
||||
<!-- <j-pagination
|
||||
v-show="props.value.length > 10"
|
||||
v-model:current="current"
|
||||
:page-size="10"
|
||||
:total="props.value.length"
|
||||
show-less-items
|
||||
/> -->
|
||||
<RowPagination
|
||||
v-if="props.value.length > 10"
|
||||
v-model:pageNum="current"
|
||||
:pageSize="10"
|
||||
:total="props.value.length"
|
||||
/>
|
||||
|
||||
<j-button type="dashed" @click="addRow" class="add-btn">
|
||||
<AIcon type="PlusOutlined" />新增
|
||||
</j-button>
|
||||
|
@ -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) => {
|
||||
|
|
|
@ -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地址
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
enabled: 'success',
|
||||
disabled: 'error',
|
||||
}"
|
||||
hasMark
|
||||
>
|
||||
<template #img>
|
||||
<slot name="img">
|
||||
|
@ -74,7 +73,9 @@
|
|||
<div class="card-item-content-text">
|
||||
说明
|
||||
</div>
|
||||
<div>{{ slotProps.description }}</div>
|
||||
<Ellipsis>
|
||||
{{ slotProps.description }}
|
||||
</Ellipsis>
|
||||
</j-col>
|
||||
</j-row>
|
||||
</template>
|
||||
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue