update: 应用管理
This commit is contained in:
parent
bba6ef3c30
commit
c24be85601
|
@ -11,4 +11,10 @@ export const delApply_api = (id:string) => server.remove(`/application/${id}`)
|
|||
|
||||
|
||||
// 获取组织列表
|
||||
export const getDepartmentList_api = () => server.get(`/organization/_all/tree`);
|
||||
export const getDepartmentList_api = () => server.get(`/organization/_all/tree`);
|
||||
// 获取组织列表
|
||||
export const getAppInfo_api = (id:string) => server.get(`/application/${id}`);
|
||||
// 新增应用
|
||||
export const addApp_api = (data:object) => server.post(`/application`, data);
|
||||
// 更新应用
|
||||
export const updateApp_api = (id:string, data:object) => server.put(`/application/${id}`, data);
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,49 @@
|
|||
<template>
|
||||
<a-modal
|
||||
v-model:visible="dialog.visible"
|
||||
title="集成菜单"
|
||||
width="600px"
|
||||
@ok="dialog.handleOk"
|
||||
class="edit-dialog-container"
|
||||
:confirmLoading="dialog.loading"
|
||||
cancelText="取消"
|
||||
okText="确定"
|
||||
>
|
||||
|
||||
|
||||
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
|
||||
const emits = defineEmits(['confirm']);
|
||||
// 弹窗相关
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
loading: false,
|
||||
|
||||
handleOk: () => {
|
||||
emits('confirm');
|
||||
},
|
||||
/**
|
||||
* 设置表单类型
|
||||
* @param type 弹窗类型
|
||||
* @param defaultForm 表单回显对象
|
||||
*/
|
||||
changeVisible: () => {
|
||||
dialog.visible = true;
|
||||
}
|
||||
});
|
||||
// 将打开弹窗的操作暴露给父组件
|
||||
defineExpose({
|
||||
openDialog: dialog.changeVisible,
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -12,7 +12,20 @@
|
|||
<a-input v-model:value="record.label" />
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'value'">
|
||||
<a-input v-model:value="record.value" />
|
||||
<a-input
|
||||
v-model:value="record.value"
|
||||
v-if="props.valueType === 'input'"
|
||||
/>
|
||||
<a-select
|
||||
v-else-if="props.valueType === 'select'"
|
||||
v-model:value="record.value"
|
||||
>
|
||||
<a-select-option
|
||||
v-for="item in props.valueOptions"
|
||||
:value="item.value"
|
||||
>{{ item.label }}</a-select-option
|
||||
>
|
||||
</a-select>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'action'">
|
||||
<a-button
|
||||
|
@ -41,21 +54,31 @@
|
|||
import type { optionsType } from '../typing';
|
||||
|
||||
const emits = defineEmits(['update:value']);
|
||||
const props = defineProps<{
|
||||
value: optionsType;
|
||||
}>();
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
value: optionsType;
|
||||
valueType?: 'input' | 'select';
|
||||
valueOptions?: optionsType;
|
||||
}>(),
|
||||
{
|
||||
valueType: 'input',
|
||||
},
|
||||
);
|
||||
const columns = [
|
||||
{
|
||||
title: 'KEY',
|
||||
dataIndex: 'key',
|
||||
width: '40%'
|
||||
},
|
||||
{
|
||||
title: 'VALUE',
|
||||
dataIndex: 'value',
|
||||
width: '40%'
|
||||
},
|
||||
{
|
||||
title: ' ',
|
||||
dataIndex: 'action',
|
||||
width: '20%'
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ export type optionsType = {
|
|||
disabled?: boolean
|
||||
}[]
|
||||
export type formType = {
|
||||
id?:string,
|
||||
name: string;
|
||||
provider: applyType;
|
||||
integrationModes: string[];
|
||||
|
@ -33,6 +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,
|
||||
oauth2: { // OAuth2信息
|
||||
authorizationUrl: string, // 授权地址
|
||||
tokenUrl: string, // token地址
|
||||
|
@ -58,12 +60,14 @@ export type formType = {
|
|||
sso: { // 统一单点登陆集成
|
||||
configuration: { // 配置
|
||||
oauth2: { // Oauth2单点登录配置
|
||||
type?: string, // 认证方式
|
||||
authorizationUrl: string, // 授权地址
|
||||
redirectUri: string, // 重定向地址
|
||||
clientId: string, // 客户端ID
|
||||
clientSecret: string, // 客户端密钥
|
||||
userInfoUrl: string, // 用户信息接口
|
||||
scope: string, // scope
|
||||
logoUrl?:string, // logo
|
||||
userProperty: { // 用户属性字段信息
|
||||
userId: string, // 用户ID
|
||||
username: string, // 用户名
|
||||
|
|
Loading…
Reference in New Issue