Browse Source

添加id4 ui

pull/6/head
WangJunZzz 5 years ago
parent
commit
fd1446a2ec
  1. 1853
      aspnet-core/services/src/CompanyName.ProjectName.HttpApi.Host/Logs/logs.txt
  2. 5
      vue3/.env
  3. 2
      vue3/.env.development
  4. 3
      vue3/.env.devtext
  5. 1
      vue3/.env.production
  6. 2
      vue3/.env.staging
  7. 4
      vue3/package.json
  8. BIN
      vue3/public/favicon.ico
  9. BIN
      vue3/public/resource/img/logo.png
  10. BIN
      vue3/public/video/complete.mp3
  11. BIN
      vue3/public/video/fail.mp3
  12. BIN
      vue3/public/video/success.mp3
  13. BIN
      vue3/public/video/warning.mp3
  14. BIN
      vue3/src/assets/images/logo.png
  15. 45
      vue3/src/router/menus/modules/identityServer.ts
  16. 54
      vue3/src/router/routes/modules/identityServer.ts
  17. 4
      vue3/src/views/admin/users/AbpUser.ts
  18. 49
      vue3/src/views/identityServers/apiResources/ApiResources.ts
  19. 59
      vue3/src/views/identityServers/apiResources/ApiResources.vue
  20. 49
      vue3/src/views/identityServers/apiScopes/ApiScopes.ts
  21. 59
      vue3/src/views/identityServers/apiScopes/ApiScopes.vue
  22. 88
      vue3/src/views/identityServers/clients1/Clients.ts
  23. 71
      vue3/src/views/identityServers/clients1/Clients.vue
  24. 61
      vue3/src/views/identityServers/clients1/CreateClient.vue
  25. 49
      vue3/src/views/identityServers/identityResources/IdentityResources.ts
  26. 59
      vue3/src/views/identityServers/identityResources/IdentityResources.vue
  27. 2
      vue3/src/views/sys/login/useLogin.ts

1853
aspnet-core/services/src/CompanyName.ProjectName.HttpApi.Host/Logs/logs.txt

File diff suppressed because it is too large

5
vue3/.env

@ -2,9 +2,8 @@
VITE_PORT = 4200
# spa-title
VITE_GLOB_APP_TITLE = YH.CDP
VITE_GLOB_APP_TITLE = Abp Vnext
# spa shortname
VITE_GLOB_APP_SHORT_NAME = vue_vben_admin
VITE_GLOB_APP_SHORT_NAME = Abp Vnext
VITE_API_URL=http://yhwms.api.development.yhglobal.cn

2
vue3/.env.development

@ -25,7 +25,7 @@ VITE_GLOB_API_URL_PREFIX=
VITE_BUILD_COMPRESS = 'none'
# 认证授权服务器地址
VITE_AUTH_URL='http://sts.api.development.yhglobal.cn'
VITE_AUTH_URL='http://sts.xx.cn'
# 接口地址

3
vue3/.env.devtext

@ -25,9 +25,8 @@ VITE_GLOB_API_URL_PREFIX=
VITE_BUILD_COMPRESS = 'none'
# 认证授权服务器地址
VITE_AUTH_URL='http://sts.api.development.yhglobal.cn'
VITE_AUTH_URL='http://xx.cn'
# 接口地址
VITE_API_URL= http://yhwms.api.staging.yhglobal.cn
#VITE_API_URL= http://localhost:50015

1
vue3/.env.production

@ -36,4 +36,3 @@ VITE_LEGACY = false
VITE_BUILD_COMPRESS = 'none'
VITE_API_URL=https://yhrms.api.ali.yhglobal.cn

2
vue3/.env.staging

@ -25,5 +25,5 @@ VITE_GLOB_API_URL_PREFIX=
VITE_BUILD_COMPRESS = 'none'
# VITE_API_URL=http://journals.erp.api.development.yhglobal.cn
VITE_API_URL=http://localhost:50011

4
vue3/package.json

@ -1,5 +1,5 @@
{
"name": "yhcdp-ui",
"name": "companyname.projectname",
"version": "2.3.0",
"author": {
"name": "vben",
@ -144,4 +144,4 @@
"engines": {
"node": "^12 || >=14"
}
}
}

BIN
vue3/public/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

BIN
vue3/public/resource/img/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 122 KiB

BIN
vue3/public/video/complete.mp3

Binary file not shown.

BIN
vue3/public/video/fail.mp3

Binary file not shown.

BIN
vue3/public/video/success.mp3

Binary file not shown.

BIN
vue3/public/video/warning.mp3

Binary file not shown.

BIN
vue3/src/assets/images/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 122 KiB

45
vue3/src/router/menus/modules/identityServer.ts

@ -0,0 +1,45 @@
import type { MenuModule } from '/@/router/types';
import { t } from '/@/hooks/web/useI18n';
const identityServer: MenuModule = {
orderNo: 20,
menu: {
path: '/identityServer',
name: 'IdentityServer',
children: [
{
path: 'clients',
name: 'Clients',
tag: {
type: 'warn',
dot: true,
},
},
{
path: 'apiResources',
name: 'ApiResources',
tag: {
type: 'warn',
dot: true,
},
},
{
path: 'apiScopes',
name: 'ApiScopes',
tag: {
type: 'warn',
dot: true,
},
},
{
path: 'identityResources',
name: 'IdentityResources',
tag: {
type: 'warn',
dot: true,
},
},
],
},
};
export default identityServer;

54
vue3/src/router/routes/modules/identityServer.ts

@ -0,0 +1,54 @@
import type { AppRouteModule } from '/@/router/types';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';
const identityServer: AppRouteModule = {
path: '/identityServer',
name: 'IentityServer',
component: LAYOUT,
//redirect: '/admin/abpUser',
meta: {
icon: 'ion:grid-outline',
title: 'IdentityServer',
},
children: [
{
path: 'clients',
name: 'Clients',
component: () => import('/@/views/identityServers/clients/Clients.vue'),
meta: {
title: 'Clients',
icon: 'ant-design:skin-outlined',
},
},
{
path: 'apiResources',
name: 'ApiResources',
component: () => import('/@/views/identityServers/apiResources/ApiResources.vue'),
meta: {
title: 'ApiResources',
icon: 'ant-design:skin-outlined',
},
},
{
path: 'apiScopes',
name: 'ApiScopes',
component: () => import('/@/views/identityServers/apiScopes/ApiScopes.vue'),
meta: {
title: 'ApiResources',
icon: 'ant-design:skin-outlined',
},
},
{
path: 'identityResources',
name: 'IdentityResources',
component: () => import('/@/views/identityServers/identityResources/IdentityResources.vue'),
meta: {
title: 'ApiResources',
icon: 'ant-design:skin-outlined',
},
},
],
};
export default identityServer;

4
vue3/src/views/admin/users/AbpUser.ts

@ -239,10 +239,6 @@ export async function getAllRoleAsync(): Promise<IdentityRoleDtoListResultDto> {
export async function createUserAsync({ request, changeOkLoading, validate, closeModal, resetFields }) {
changeOkLoading(true);
await validate();
if (!request.password && !request.confirmPassword) {
request.password = 'Yh@123456';
request.confirmPassword = 'Yh@123456';
}
if (request.password != request.confirmPassword) {
message.error('两次密码输入不一致');
throw new Error('两次密码输入不一致');

49
vue3/src/views/identityServers/apiResources/ApiResources.ts

@ -0,0 +1,49 @@
import { FormSchema } from '/@/components/Table';
import { BasicColumn } from '/@/components/Table';
import { ClientServiceProxy, PagingClientListInput } from '/@/services/ServiceProxies';
export const searchFormSchema: FormSchema[] = [
{
field: 'filter',
label: '关键字',
component: 'Input',
colProps: { span: 8 },
},
];
export const tableColumns: BasicColumn[] = [
{
title: 'ClientId',
dataIndex: 'clientId',
},
{
title: 'ClientName',
dataIndex: 'clientName',
},
{
title: '是否启用',
dataIndex: 'enabled',
slots: { customRender: 'enabled' },
},
{
title: 'AccessTokenLifetime',
dataIndex: 'accessTokenLifetime',
},
{
title: 'AbsoluteRefreshTokenLifetime',
dataIndex: 'absoluteRefreshTokenLifetime',
},
{
title: 'Description',
dataIndex: 'description',
},
];
/**
*
* @param params
* @returns
*/
export async function getTableListAsync(params: PagingClientListInput) {
const _clientServiceProxy = new ClientServiceProxy();
return _clientServiceProxy.page(params);
}

59
vue3/src/views/identityServers/apiResources/ApiResources.vue

@ -0,0 +1,59 @@
<template>
<div>
<BasicTable @register="registerTable" size="small">
<template #enabled="{ record }">
<Tag :color="record.enabled ? 'green' : 'red'">
{{ record.enabled ? '是' : '否' }}
</Tag>
</template>
</BasicTable></div
>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { tableColumns, searchFormSchema, getTableListAsync } from './ApiResources';
import { useI18n } from '/@/hooks/web/useI18n';
import { Tag } from 'ant-design-vue';
export default defineComponent({
name: 'ApiResources',
components: {
BasicTable,
TableAction,
Tag,
},
setup() {
const { t } = useI18n();
// table
const [registerTable] = useTable({
columns: tableColumns,
formConfig: {
labelWidth: 70,
schemas: searchFormSchema,
},
api: getTableListAsync,
showTableSetting: true,
useSearchForm: true,
bordered: true,
canResize: true,
showIndexColumn: true,
actionColumn: {
width: 150,
title: t('common.action'),
dataIndex: 'action',
slots: {
customRender: 'action',
},
fixed: 'right',
},
});
return {
registerTable,
};
},
});
</script>
<style lang="less" scoped></style>

49
vue3/src/views/identityServers/apiScopes/ApiScopes.ts

@ -0,0 +1,49 @@
import { FormSchema } from '/@/components/Table';
import { BasicColumn } from '/@/components/Table';
import { ClientServiceProxy, PagingClientListInput } from '/@/services/ServiceProxies';
export const searchFormSchema: FormSchema[] = [
{
field: 'filter',
label: '关键字',
component: 'Input',
colProps: { span: 8 },
},
];
export const tableColumns: BasicColumn[] = [
{
title: 'ClientId',
dataIndex: 'clientId',
},
{
title: 'ClientName',
dataIndex: 'clientName',
},
{
title: '是否启用',
dataIndex: 'enabled',
slots: { customRender: 'enabled' },
},
{
title: 'AccessTokenLifetime',
dataIndex: 'accessTokenLifetime',
},
{
title: 'AbsoluteRefreshTokenLifetime',
dataIndex: 'absoluteRefreshTokenLifetime',
},
{
title: 'Description',
dataIndex: 'description',
},
];
/**
*
* @param params
* @returns
*/
export async function getTableListAsync(params: PagingClientListInput) {
const _clientServiceProxy = new ClientServiceProxy();
return _clientServiceProxy.page(params);
}

59
vue3/src/views/identityServers/apiScopes/ApiScopes.vue

@ -0,0 +1,59 @@
<template>
<div>
<BasicTable @register="registerTable" size="small">
<template #enabled="{ record }">
<Tag :color="record.enabled ? 'green' : 'red'">
{{ record.enabled ? '是' : '否' }}
</Tag>
</template>
</BasicTable></div
>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { tableColumns, searchFormSchema, getTableListAsync } from './ApiScopes';
import { useI18n } from '/@/hooks/web/useI18n';
import { Tag } from 'ant-design-vue';
export default defineComponent({
name: 'ApiScopes',
components: {
BasicTable,
TableAction,
Tag,
},
setup() {
const { t } = useI18n();
// table
const [registerTable] = useTable({
columns: tableColumns,
formConfig: {
labelWidth: 70,
schemas: searchFormSchema,
},
api: getTableListAsync,
showTableSetting: true,
useSearchForm: true,
bordered: true,
canResize: true,
showIndexColumn: true,
actionColumn: {
width: 150,
title: t('common.action'),
dataIndex: 'action',
slots: {
customRender: 'action',
},
fixed: 'right',
},
});
return {
registerTable,
};
},
});
</script>
<style lang="less" scoped></style>

88
vue3/src/views/identityServers/clients1/Clients.ts

@ -0,0 +1,88 @@
import { FormSchema } from '/@/components/Table';
import { BasicColumn } from '/@/components/Table';
import { ClientServiceProxy, PagingClientListInput } from '/@/services/ServiceProxies';
export const searchFormSchema: FormSchema[] = [
{
field: 'filter',
label: '关键字',
component: 'Input',
colProps: { span: 8 },
},
];
export const tableColumns: BasicColumn[] = [
{
title: 'ClientId',
dataIndex: 'clientId',
},
{
title: 'ClientName',
dataIndex: 'clientName',
},
{
title: '是否启用',
dataIndex: 'enabled',
slots: { customRender: 'enabled' },
},
{
title: 'AccessTokenLifetime',
dataIndex: 'accessTokenLifetime',
},
{
title: 'AbsoluteRefreshTokenLifetime',
dataIndex: 'absoluteRefreshTokenLifetime',
},
{
title: 'Description',
dataIndex: 'description',
},
];
export const createFormSchema: FormSchema[] = [
{
field: 'clientId',
label: 'ClientId',
component: 'Input',
required: true,
colProps: { span: 18 },
},
{
field: 'clientName',
label: 'ClientName',
component: 'Input',
required: true,
colProps: { span: 18 },
},
{
field: 'description',
label: 'Description',
component: 'Input',
required: true,
colProps: { span: 18 },
},
];
/**
*
* @param params
* @returns
*/
export async function getTableListAsync(params: PagingClientListInput) {
const _clientServiceProxy = new ClientServiceProxy();
return _clientServiceProxy.page(params);
}
/**
* client
* @param params
* @returns
*/
export async function createClientAsync({ request, changeOkLoading, validate, closeModal }) {
changeOkLoading(true);
await validate();
const _clientServiceProxy = new ClientServiceProxy();
await _clientServiceProxy.create(request);
changeOkLoading(false);
closeModal();
}

71
vue3/src/views/identityServers/clients1/Clients.vue

@ -0,0 +1,71 @@
<template>
<div>
<BasicTable @register="registerTable" size="small">
<template #toolbar>
<a-button type="primary" @click="openCreateClientModal">
{{ t('common.createText') }}
</a-button>
</template>
<template #enabled="{ record }">
<Tag :color="record.enabled ? 'green' : 'red'">
{{ record.enabled ? '是' : '否' }}
</Tag>
</template>
</BasicTable>
<CreateClient @register="registerCreateClientModal" @reload="reload" :bodyStyle="{ 'padding-top': '0' }" />
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { tableColumns, searchFormSchema, getTableListAsync } from './Clients';
import { useI18n } from '/@/hooks/web/useI18n';
import { Tag } from 'ant-design-vue';
import CreateClient from './CreateClient.vue';
import { useModal } from '/@/components/Modal';
export default defineComponent({
name: 'Clients',
components: {
BasicTable,
TableAction,
Tag,
CreateClient,
},
setup() {
const { t } = useI18n();
// table
const [registerTable] = useTable({
columns: tableColumns,
formConfig: {
labelWidth: 70,
schemas: searchFormSchema,
},
api: getTableListAsync,
showTableSetting: true,
useSearchForm: true,
bordered: true,
canResize: true,
showIndexColumn: true,
actionColumn: {
width: 150,
title: t('common.action'),
dataIndex: 'action',
slots: {
customRender: 'action',
},
fixed: 'right',
},
});
const [registerCreateClientModal, { openModal: openCreateClientModal }] = useModal();
return {
registerTable,
registerCreateClientModal,
openCreateClientModal,
};
},
});
</script>
<style lang="less" scoped></style>

61
vue3/src/views/identityServers/clients1/CreateClient.vue

@ -0,0 +1,61 @@
<template>
<BasicModal :title="创建Client" :canFullscreen="false" @ok="submit" @cancel="cancel" @register="registerModal">
<BasicForm @register="registerUserForm" />
</BasicModal>
</template>
<script lang="ts">
import { defineComponent, useContext, defineEmit } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { BasicForm, useForm } from '/@/components/Form/index';
import { createFormSchema, createClientAsync } from './Clients';
import { useI18n } from '/@/hooks/web/useI18n';
export default defineComponent({
name: 'CreateAbpRole',
components: {
BasicModal,
BasicForm,
},
setup() {
//
defineEmit(['reload']);
const ctx = useContext();
const { t } = useI18n();
const [registerUserForm, { getFieldsValue, validate, resetFields }] = useForm({
labelWidth: 120,
schemas: createFormSchema,
showActionButtonGroup: false,
});
const [registerModal, { changeOkLoading, closeModal }] = useModalInner();
//
const submit = async () => {
try {
const request = getFieldsValue();
await createClientAsync({ request, changeOkLoading, validate, closeModal });
resetFields();
ctx.emit('reload');
} catch (error) {
changeOkLoading(false);
}
};
const cancel = () => {
resetFields();
closeModal();
};
return {
t,
registerModal,
registerUserForm,
submit,
cancel,
};
},
});
</script>
<style lang="less" scoped></style>

49
vue3/src/views/identityServers/identityResources/IdentityResources.ts

@ -0,0 +1,49 @@
import { FormSchema } from '/@/components/Table';
import { BasicColumn } from '/@/components/Table';
import { ClientServiceProxy, PagingClientListInput } from '/@/services/ServiceProxies';
export const searchFormSchema: FormSchema[] = [
{
field: 'filter',
label: '关键字',
component: 'Input',
colProps: { span: 8 },
},
];
export const tableColumns: BasicColumn[] = [
{
title: 'ClientId',
dataIndex: 'clientId',
},
{
title: 'ClientName',
dataIndex: 'clientName',
},
{
title: '是否启用',
dataIndex: 'enabled',
slots: { customRender: 'enabled' },
},
{
title: 'AccessTokenLifetime',
dataIndex: 'accessTokenLifetime',
},
{
title: 'AbsoluteRefreshTokenLifetime',
dataIndex: 'absoluteRefreshTokenLifetime',
},
{
title: 'Description',
dataIndex: 'description',
},
];
/**
*
* @param params
* @returns
*/
export async function getTableListAsync(params: PagingClientListInput) {
const _clientServiceProxy = new ClientServiceProxy();
return _clientServiceProxy.page(params);
}

59
vue3/src/views/identityServers/identityResources/IdentityResources.vue

@ -0,0 +1,59 @@
<template>
<div>
<BasicTable @register="registerTable" size="small">
<template #enabled="{ record }">
<Tag :color="record.enabled ? 'green' : 'red'">
{{ record.enabled ? '是' : '否' }}
</Tag>
</template>
</BasicTable></div
>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { tableColumns, searchFormSchema, getTableListAsync } from './IdentityResources';
import { useI18n } from '/@/hooks/web/useI18n';
import { Tag } from 'ant-design-vue';
export default defineComponent({
name: 'IdentityResources',
components: {
BasicTable,
TableAction,
Tag,
},
setup() {
const { t } = useI18n();
// table
const [registerTable] = useTable({
columns: tableColumns,
formConfig: {
labelWidth: 70,
schemas: searchFormSchema,
},
api: getTableListAsync,
showTableSetting: true,
useSearchForm: true,
bordered: true,
canResize: true,
showIndexColumn: true,
actionColumn: {
width: 150,
title: t('common.action'),
dataIndex: 'action',
slots: {
customRender: 'action',
},
fixed: 'right',
},
});
return {
registerTable,
};
},
});
</script>
<style lang="less" scoped></style>

2
vue3/src/views/sys/login/useLogin.ts

@ -130,7 +130,7 @@ export function useYHStsLogin() {
let currentHost = `${protocol}//${hostname}${port ? `:${port}` : ''}`;
const settings: any = {
authority: import.meta.env.VITE_AUTH_URL,
client_id: 'yhwms',
client_id: 'CompanyName.ProjectName',
redirect_uri: currentHost + '/sts/callback',
post_logout_redirect_uri: import.meta.env.VITE_AUTH_URL,
response_type: `id_token token`,

Loading…
Cancel
Save