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 AMapComponent from './AMapComponent/index.vue'
|
||||||
import PathSimplifier from './AMapComponent/PathSimplifier.vue'
|
import PathSimplifier from './AMapComponent/PathSimplifier.vue'
|
||||||
import ValueItem from './ValueItem/index.vue'
|
import ValueItem from './ValueItem/index.vue'
|
||||||
|
import RowPagination from './RowPagination/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
install(app: App) {
|
install(app: App) {
|
||||||
|
@ -37,5 +38,6 @@ export default {
|
||||||
.component('AMapComponent', AMapComponent)
|
.component('AMapComponent', AMapComponent)
|
||||||
.component('PathSimplifier', PathSimplifier)
|
.component('PathSimplifier', PathSimplifier)
|
||||||
.component('ValueItem', ValueItem)
|
.component('ValueItem', ValueItem)
|
||||||
|
.component('RowPagination', RowPagination)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,6 +333,7 @@
|
||||||
.clientId
|
.clientId
|
||||||
"
|
"
|
||||||
placeholder="请输入appId"
|
placeholder="请输入appId"
|
||||||
|
:disabled="!!form.data.id"
|
||||||
/>
|
/>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
<j-form-item
|
<j-form-item
|
||||||
|
@ -576,7 +577,12 @@
|
||||||
form.data.apiClient.authConfig.type === 'bearer'
|
form.data.apiClient.authConfig.type === 'bearer'
|
||||||
"
|
"
|
||||||
label="token"
|
label="token"
|
||||||
:name="['apiClient', 'authConfig', 'token']"
|
:name="[
|
||||||
|
'apiClient',
|
||||||
|
'authConfig',
|
||||||
|
'bearer',
|
||||||
|
'token',
|
||||||
|
]"
|
||||||
:rules="[
|
:rules="[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -586,7 +592,7 @@
|
||||||
>
|
>
|
||||||
<j-input
|
<j-input
|
||||||
v-model:value="
|
v-model:value="
|
||||||
form.data.apiClient.authConfig.token
|
form.data.apiClient.authConfig.bearer.token
|
||||||
"
|
"
|
||||||
placeholder="请输入token"
|
placeholder="请输入token"
|
||||||
/>
|
/>
|
||||||
|
@ -657,10 +663,6 @@
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入secureKey',
|
message: '请输入secureKey',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
max: 64,
|
|
||||||
message: '最多可输入64个字符',
|
|
||||||
},
|
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
@ -711,7 +713,7 @@
|
||||||
v-model:value="form.data.apiServer.roleIdList"
|
v-model:value="form.data.apiServer.roleIdList"
|
||||||
:options="form.roleIdList"
|
:options="form.roleIdList"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
placeholder="请选中角色"
|
placeholder="请选择角色"
|
||||||
></j-select>
|
></j-select>
|
||||||
<PermissionButton
|
<PermissionButton
|
||||||
:hasPermission="`${rolePermission}:update`"
|
:hasPermission="`${rolePermission}:update`"
|
||||||
|
@ -760,7 +762,7 @@
|
||||||
@click="
|
@click="
|
||||||
clickAddItem(
|
clickAddItem(
|
||||||
form.data.apiServer.orgIdList,
|
form.data.apiServer.orgIdList,
|
||||||
'Role',
|
'Department',
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
class="add-item"
|
class="add-item"
|
||||||
|
@ -1165,6 +1167,10 @@
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入appId',
|
message: '请输入appId',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
max: 64,
|
||||||
|
message: '最多可输入64个字符',
|
||||||
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
@ -1196,6 +1202,10 @@
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入appKey',
|
message: '请输入appKey',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
max: 64,
|
||||||
|
message: '最多可输入64个字符',
|
||||||
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
@ -1227,6 +1237,10 @@
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入appSecret',
|
message: '请输入appSecret',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
max: 64,
|
||||||
|
message: '最多可输入64个字符',
|
||||||
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
@ -1281,6 +1295,10 @@
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入默认密码',
|
message: '请输入默认密码',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
max: 64,
|
||||||
|
message: '最多可输入64个字符',
|
||||||
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<j-input
|
<j-input
|
||||||
|
@ -1436,7 +1454,7 @@ const initForm: formType = {
|
||||||
type: 'oauth2', // 类型, 可选值:none, bearer, oauth2, basic, other
|
type: 'oauth2', // 类型, 可选值:none, bearer, oauth2, basic, other
|
||||||
bearer: { token: '' }, // 授权信息
|
bearer: { token: '' }, // 授权信息
|
||||||
basic: { username: '', password: '' }, // 基本信息
|
basic: { username: '', password: '' }, // 基本信息
|
||||||
token: '',
|
// token: '',
|
||||||
oauth2: {
|
oauth2: {
|
||||||
// OAuth2信息
|
// OAuth2信息
|
||||||
authorizationUrl: '', // 授权地址
|
authorizationUrl: '', // 授权地址
|
||||||
|
@ -1738,7 +1756,6 @@ function changeBackUpload(info: UploadChangeParam<UploadFile<any>>) {
|
||||||
if (info.file.status === 'uploading') {
|
if (info.file.status === 'uploading') {
|
||||||
form.uploadLoading = true;
|
form.uploadLoading = true;
|
||||||
} else if (info.file.status === 'done') {
|
} else if (info.file.status === 'done') {
|
||||||
|
|
||||||
info.file.url = info.file.response?.result;
|
info.file.url = info.file.response?.result;
|
||||||
form.uploadLoading = false;
|
form.uploadLoading = false;
|
||||||
form.data.sso.configuration.oauth2.logoUrl = info.file.response?.result;
|
form.data.sso.configuration.oauth2.logoUrl = info.file.response?.result;
|
||||||
|
@ -1798,7 +1815,7 @@ function clearNullProp(obj: object) {
|
||||||
color: #000;
|
color: #000;
|
||||||
|
|
||||||
&.ant-radio-button-wrapper-disabled {
|
&.ant-radio-button-wrapper-disabled {
|
||||||
opacity: .5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.ant-radio-button-wrapper-checked {
|
&.ant-radio-button-wrapper-checked {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, record, index }">
|
<template #bodyCell="{ column, record, index }">
|
||||||
<template v-if="column.dataIndex === 'key'">
|
<template v-if="column.dataIndex === 'key'">
|
||||||
<j-input v-model:value="record.label" />
|
<j-input v-model:value="record.key" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'value'">
|
<template v-else-if="column.dataIndex === 'value'">
|
||||||
<j-input
|
<j-input
|
||||||
|
@ -37,13 +37,20 @@
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</j-table>
|
</j-table>
|
||||||
<j-pagination
|
<!-- <j-pagination
|
||||||
v-show="props.value.length > 10"
|
v-show="props.value.length > 10"
|
||||||
v-model:current="current"
|
v-model:current="current"
|
||||||
:page-size="10"
|
:page-size="10"
|
||||||
:total="props.value.length"
|
:total="props.value.length"
|
||||||
show-less-items
|
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">
|
<j-button type="dashed" @click="addRow" class="add-btn">
|
||||||
<AIcon type="PlusOutlined" />新增
|
<AIcon type="PlusOutlined" />新增
|
||||||
</j-button>
|
</j-button>
|
||||||
|
@ -68,17 +75,20 @@ const columns = [
|
||||||
{
|
{
|
||||||
title: 'KEY',
|
title: 'KEY',
|
||||||
dataIndex: 'key',
|
dataIndex: 'key',
|
||||||
width: '40%'
|
key: 'key',
|
||||||
|
width: '40%',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'VALUE',
|
title: 'VALUE',
|
||||||
dataIndex: 'value',
|
dataIndex: 'value',
|
||||||
width: '40%'
|
key: 'value',
|
||||||
|
width: '40%',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: ' ',
|
title: ' ',
|
||||||
dataIndex: 'action',
|
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);
|
return props.value.slice((current.value - 1) * 10, current.value * 10);
|
||||||
});
|
});
|
||||||
|
|
||||||
if(props.value.length < 1) addRow()
|
if (props.value.length < 1) addRow();
|
||||||
watch(
|
watch(
|
||||||
() => props.value,
|
() => props.value,
|
||||||
(n, o) => {
|
(n, o) => {
|
||||||
|
|
|
@ -34,7 +34,7 @@ export type formType = {
|
||||||
type: 'none' | 'bearer' | 'oauth2' | 'basic' | 'other', // 类型, 可选值:none, bearer, oauth2, basic, other
|
type: 'none' | 'bearer' | 'oauth2' | 'basic' | 'other', // 类型, 可选值:none, bearer, oauth2, basic, other
|
||||||
bearer: { token: string }, // 授权信息
|
bearer: { token: string }, // 授权信息
|
||||||
basic: { username: string, password: string }, // 基本信息
|
basic: { username: string, password: string }, // 基本信息
|
||||||
token: string,
|
token?: string,
|
||||||
oauth2: { // OAuth2信息
|
oauth2: { // OAuth2信息
|
||||||
authorizationUrl: string, // 授权地址
|
authorizationUrl: string, // 授权地址
|
||||||
tokenUrl: string, // token地址
|
tokenUrl: string, // token地址
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
enabled: 'success',
|
enabled: 'success',
|
||||||
disabled: 'error',
|
disabled: 'error',
|
||||||
}"
|
}"
|
||||||
hasMark
|
|
||||||
>
|
>
|
||||||
<template #img>
|
<template #img>
|
||||||
<slot name="img">
|
<slot name="img">
|
||||||
|
@ -74,7 +73,9 @@
|
||||||
<div class="card-item-content-text">
|
<div class="card-item-content-text">
|
||||||
说明
|
说明
|
||||||
</div>
|
</div>
|
||||||
<div>{{ slotProps.description }}</div>
|
<Ellipsis>
|
||||||
|
{{ slotProps.description }}
|
||||||
|
</Ellipsis>
|
||||||
</j-col>
|
</j-col>
|
||||||
</j-row>
|
</j-row>
|
||||||
</template>
|
</template>
|
||||||
|
@ -271,8 +272,8 @@ const columns = [
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
key: 'action',
|
key: 'action',
|
||||||
scopedSlots: true,
|
scopedSlots: true,
|
||||||
width:'200px',
|
width: '200px',
|
||||||
fixed:'right'
|
fixed: 'right',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const queryParams = ref({});
|
const queryParams = ref({});
|
||||||
|
@ -361,7 +362,7 @@ const table = {
|
||||||
// 有集成菜单权限
|
// 有集成菜单权限
|
||||||
if (otherServers.includes('page'))
|
if (otherServers.includes('page'))
|
||||||
others.children?.push({
|
others.children?.push({
|
||||||
permission: [`${permission}:add`,`${permission}:update`],
|
permission: [`${permission}:add`, `${permission}:update`],
|
||||||
key: 'page',
|
key: 'page',
|
||||||
text: '集成菜单',
|
text: '集成菜单',
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
@ -378,7 +379,7 @@ const table = {
|
||||||
if (otherServers.includes('apiServer'))
|
if (otherServers.includes('apiServer'))
|
||||||
others.children?.push(
|
others.children?.push(
|
||||||
{
|
{
|
||||||
permission: [`${permission}:add`,`${permission}:update`],
|
permission: [`${permission}:add`, `${permission}:update`],
|
||||||
key: 'empowerment',
|
key: 'empowerment',
|
||||||
text: '赋权',
|
text: '赋权',
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
@ -394,7 +395,7 @@ const table = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
permission: [`${permission}:add`,`${permission}:update`],
|
permission: [`${permission}:add`, `${permission}:update`],
|
||||||
key: 'viewApi',
|
key: 'viewApi',
|
||||||
text: '查看API',
|
text: '查看API',
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
|
Loading…
Reference in New Issue