feat: huaxing-AI智能BAS系统
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
export const tableConfig = {
|
||||
pageField: 'data.page', //当前页
|
||||
pageField: 'data.pages', //当前页
|
||||
pageCount: 'data.pageCount', //当前页
|
||||
sizeField: 'data.pageSize', // 每页数量
|
||||
listField: 'data.data', // 数据集合
|
||||
totalField: 'data.items', // 数据总数
|
||||
sizeField: 'data.size', // 每页数量
|
||||
listField: 'data.records', // 数据集合
|
||||
totalField: 'data.total', // 数据总数
|
||||
|
||||
pageFieldOffset: 1, //前端页码1开始,后端0 偏移量 1
|
||||
pageSizeOptions: ['10', '20', '40'], // 分页设置种类
|
||||
defaultPageSize: 10, // 默认每页数量
|
||||
paramsPageSizeField: 'pageSize',
|
||||
paramsPageField: 'page',
|
||||
paramsPageField: 'pageNumber',
|
||||
paramsOrderField: 'order',
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
|
@@ -3,10 +3,10 @@
|
||||
<template>
|
||||
<div style="height: 100%">
|
||||
<a-layout style="height: 100%">
|
||||
<a-layout-header class="home_header" style="position: relative">
|
||||
<ns-icon class="test" name="login" size="64" style="width: 220px" />
|
||||
<!-- <img v-else :src="themeConfig.logoUrl" style="width: 220px; height: 48px" /> -->
|
||||
</a-layout-header>
|
||||
<!-- <a-layout-header class="home_header" style="position: relative"> -->
|
||||
<!-- <ns-icon class="test" name="login" size="64" style="width: 220px" /> -->
|
||||
<!-- <img v-else :src="themeConfig.logoUrl" style="width: 220px; height: 48px" /> -->
|
||||
<!-- </a-layout-header> -->
|
||||
<a-layout-content
|
||||
class="center-content"
|
||||
:style="{
|
||||
@@ -16,7 +16,7 @@
|
||||
backgroundSize: 'cover',
|
||||
}">
|
||||
<div class="lg_card">
|
||||
<h1 class="lg_card_title">账号登录cur</h1>
|
||||
<h1 class="lg_card_title">账号登录</h1>
|
||||
<p v-show="!errorShow" style="height: 8px"></p>
|
||||
<p v-show="errorShow" class="lg_card_error">{{ errorMsg }}</p>
|
||||
<p class="lg_card_tip">用户名/手机号</p>
|
||||
@@ -43,7 +43,7 @@
|
||||
>
|
||||
</div>
|
||||
</a-layout-content>
|
||||
<a-layout-footer>Copyright 2021 xu科技 All Rights Reserved</a-layout-footer>
|
||||
<!-- <a-layout-footer>Copyright 2021 xu科技 All Rights Reserved</a-layout-footer> -->
|
||||
</a-layout>
|
||||
</div>
|
||||
</template>
|
||||
@@ -232,6 +232,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding-right: 100px;
|
||||
}
|
||||
|
||||
.ant-layout-footer {
|
||||
|
@@ -2,6 +2,8 @@ import type { AxiosRequestConfig } from 'axios';
|
||||
import { http } from '../util/http';
|
||||
import { isFunction, isPlainObject, isString } from 'lodash-es';
|
||||
import { usePath } from '/nerv-lib/use/use-path';
|
||||
import { RequestEnum } from '/@/enum/http-enum.ts';
|
||||
|
||||
export type HttpRequestConfig = AxiosRequestConfig;
|
||||
|
||||
export interface HttpRequest {
|
||||
@@ -40,7 +42,7 @@ export function useApi() {
|
||||
params = paramsFilter(params);
|
||||
}
|
||||
|
||||
if (requestConfig?.method?.toLocaleLowerCase() === 'get') {
|
||||
if (RequestEnum[requestConfig?.method?.toLocaleUpperCase()] === 'GET') {
|
||||
if (!requestConfig.params) requestConfig.params = params;
|
||||
} else {
|
||||
if (!requestConfig.data) requestConfig.data = params;
|
||||
|
@@ -4,6 +4,8 @@ import type { Result } from './axios.d';
|
||||
import { NsMessage } from '/nerv-lib/component/message';
|
||||
import { routerConfig } from '/nerv-base/config/router.config';
|
||||
import { Cookies } from '/nerv-lib/util/cookie';
|
||||
import { RequestEnum } from '/@/enum/http-enum.ts';
|
||||
|
||||
export class NSAxios {
|
||||
private instance: AxiosInstance;
|
||||
private readonly options: AxiosRequestConfig;
|
||||
@@ -157,8 +159,13 @@ export class NSAxios {
|
||||
|
||||
request<T = any>(config: AxiosRequestConfig): Promise<T> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const methodTransform = {
|
||||
...config,
|
||||
method: RequestEnum[config.method?.toLocaleUpperCase()],
|
||||
};
|
||||
|
||||
this.instance
|
||||
.request<any, AxiosResponse<Result>>(config)
|
||||
.request<any, AxiosResponse<Result>>(methodTransform)
|
||||
.then((res: AxiosResponse<Result>) => {
|
||||
resolve(res.data as unknown as Promise<T>);
|
||||
})
|
||||
|
Reference in New Issue
Block a user