feat: 添加订单每日汇总相关请求模型和接口,更新管理看板组件以支持新功能
This commit is contained in:
@@ -268,6 +268,9 @@ models/kami-api-order-v1-order-form-list-req.ts
|
||||
models/kami-api-order-v1-order-form-update-req.ts
|
||||
models/kami-api-order-v1-order-log-delete-req.ts
|
||||
models/kami-api-order-v1-order-log-list-req.ts
|
||||
models/kami-api-order-v1-order-summary-daily-get-list-req.ts
|
||||
models/kami-api-order-v1-order-summary-daily-get-list-res.ts
|
||||
models/kami-api-order-v1-order-summary-daily-record.ts
|
||||
models/kami-api-order-v1-order-summary-get-list-req.ts
|
||||
models/kami-api-order-v1-order-summary-get-list-res.ts
|
||||
models/kami-api-order-v1-order-summary-record.ts
|
||||
|
||||
@@ -327,6 +327,8 @@ import type { KamiApiMonitorV1HealthCheckRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiOrderV1OrderFormUpdateReq } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiOrderV1OrderSummaryDailyGetListRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiOrderV1OrderSummaryGetListRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiRestrictionV1BlockOrderReq } from '../models';
|
||||
@@ -4730,6 +4732,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartAccountDailySummaryGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [username] 用户
|
||||
* @param {string} [accountName] 账户名称
|
||||
* @param {string} [date] 日期
|
||||
* @param {string} [userId] 用户ID
|
||||
* @param {*} [options] Override http request option.
|
||||
@@ -4739,6 +4742,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartAccountDailySummaryGetPageSizeEnum,
|
||||
username?: string,
|
||||
accountName?: string,
|
||||
date?: string,
|
||||
userId?: string,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
@@ -4783,6 +4787,10 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
localVarQueryParameter['username'] = username;
|
||||
}
|
||||
|
||||
if (accountName !== undefined) {
|
||||
localVarQueryParameter['accountName'] = accountName;
|
||||
}
|
||||
|
||||
if (date !== undefined) {
|
||||
localVarQueryParameter['date'] = date;
|
||||
}
|
||||
@@ -4973,7 +4981,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
* @param {ApiCardInfoWalmartAccountGetListGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [name] 账户名称
|
||||
* @param {string} [nickName] 用户昵称
|
||||
* @param {string} [cookie]
|
||||
* @param {string} [cookie] cookie
|
||||
* @param {string} [createdUserName] 创建用户昵称
|
||||
* @param {number} [groupId] 分组ID
|
||||
* @param {string} [userId] 用户ID
|
||||
@@ -5289,6 +5297,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartAccountSummaryDownloadGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [username] 用户
|
||||
* @param {string} [accountName] 账户名称
|
||||
* @param {string} [date] 日期
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@@ -5297,6 +5306,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartAccountSummaryDownloadGetPageSizeEnum,
|
||||
username?: string,
|
||||
accountName?: string,
|
||||
date?: string,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
@@ -5340,6 +5350,10 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
localVarQueryParameter['username'] = username;
|
||||
}
|
||||
|
||||
if (accountName !== undefined) {
|
||||
localVarQueryParameter['accountName'] = accountName;
|
||||
}
|
||||
|
||||
if (date !== undefined) {
|
||||
localVarQueryParameter['date'] = date;
|
||||
}
|
||||
@@ -7712,6 +7726,71 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
options: localVarRequestOptions
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单每日汇总
|
||||
* @param {number} current 页数
|
||||
* @param {ApiOrderInfoSummaryDailyStatsGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [roadUid]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiOrderInfoSummaryDailyStatsGet: async (
|
||||
current: number,
|
||||
pageSize: ApiOrderInfoSummaryDailyStatsGetPageSizeEnum,
|
||||
roadUid?: string,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'current' is not null or undefined
|
||||
assertParamExists('apiOrderInfoSummaryDailyStatsGet', 'current', current);
|
||||
// verify required parameter 'pageSize' is not null or undefined
|
||||
assertParamExists(
|
||||
'apiOrderInfoSummaryDailyStatsGet',
|
||||
'pageSize',
|
||||
pageSize
|
||||
);
|
||||
const localVarPath = `/api/orderInfo/summary/dailyStats`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = {
|
||||
method: 'GET',
|
||||
...baseOptions,
|
||||
...options
|
||||
};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
if (roadUid !== undefined) {
|
||||
localVarQueryParameter['roadUid'] = roadUid;
|
||||
}
|
||||
|
||||
if (current !== undefined) {
|
||||
localVarQueryParameter['current'] = current;
|
||||
}
|
||||
|
||||
if (pageSize !== undefined) {
|
||||
localVarQueryParameter['pageSize'] = pageSize;
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单汇总
|
||||
@@ -13452,6 +13531,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartAccountDailySummaryGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [username] 用户
|
||||
* @param {string} [accountName] 账户名称
|
||||
* @param {string} [date] 日期
|
||||
* @param {string} [userId] 用户ID
|
||||
* @param {*} [options] Override http request option.
|
||||
@@ -13461,6 +13541,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartAccountDailySummaryGetPageSizeEnum,
|
||||
username?: string,
|
||||
accountName?: string,
|
||||
date?: string,
|
||||
userId?: string,
|
||||
options?: RawAxiosRequestConfig
|
||||
@@ -13475,6 +13556,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
current,
|
||||
pageSize,
|
||||
username,
|
||||
accountName,
|
||||
date,
|
||||
userId,
|
||||
options
|
||||
@@ -13604,7 +13686,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
* @param {ApiCardInfoWalmartAccountGetListGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [name] 账户名称
|
||||
* @param {string} [nickName] 用户昵称
|
||||
* @param {string} [cookie]
|
||||
* @param {string} [cookie] cookie
|
||||
* @param {string} [createdUserName] 创建用户昵称
|
||||
* @param {number} [groupId] 分组ID
|
||||
* @param {string} [userId] 用户ID
|
||||
@@ -13794,6 +13876,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartAccountSummaryDownloadGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [username] 用户
|
||||
* @param {string} [accountName] 账户名称
|
||||
* @param {string} [date] 日期
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@@ -13802,6 +13885,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartAccountSummaryDownloadGetPageSizeEnum,
|
||||
username?: string,
|
||||
accountName?: string,
|
||||
date?: string,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
@@ -13812,6 +13896,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
current,
|
||||
pageSize,
|
||||
username,
|
||||
accountName,
|
||||
date,
|
||||
options
|
||||
);
|
||||
@@ -15349,6 +15434,46 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
configuration
|
||||
)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单每日汇总
|
||||
* @param {number} current 页数
|
||||
* @param {ApiOrderInfoSummaryDailyStatsGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [roadUid]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiOrderInfoSummaryDailyStatsGet(
|
||||
current: number,
|
||||
pageSize: ApiOrderInfoSummaryDailyStatsGetPageSizeEnum,
|
||||
roadUid?: string,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<KamiApiOrderV1OrderSummaryDailyGetListRes>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.apiOrderInfoSummaryDailyStatsGet(
|
||||
current,
|
||||
pageSize,
|
||||
roadUid,
|
||||
options
|
||||
);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath =
|
||||
operationServerMap['DefaultApi.apiOrderInfoSummaryDailyStatsGet']?.[
|
||||
localVarOperationServerIndex
|
||||
]?.url;
|
||||
return (axios, basePath) =>
|
||||
createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单汇总
|
||||
@@ -18766,6 +18891,7 @@ export const DefaultApiFactory = function (
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.username,
|
||||
requestParameters.accountName,
|
||||
requestParameters.date,
|
||||
requestParameters.userId,
|
||||
options
|
||||
@@ -18935,6 +19061,7 @@ export const DefaultApiFactory = function (
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.username,
|
||||
requestParameters.accountName,
|
||||
requestParameters.date,
|
||||
options
|
||||
)
|
||||
@@ -19721,6 +19848,26 @@ export const DefaultApiFactory = function (
|
||||
.apiMonitorHeathcheckGet(options)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单每日汇总
|
||||
* @param {DefaultApiApiOrderInfoSummaryDailyStatsGetRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiOrderInfoSummaryDailyStatsGet(
|
||||
requestParameters: DefaultApiApiOrderInfoSummaryDailyStatsGetRequest,
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiOrderV1OrderSummaryDailyGetListRes> {
|
||||
return localVarFp
|
||||
.apiOrderInfoSummaryDailyStatsGet(
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.roadUid,
|
||||
options
|
||||
)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单汇总
|
||||
@@ -22454,6 +22601,19 @@ export interface DefaultApiInterface {
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiMonitorV1HealthCheckRes>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单每日汇总
|
||||
* @param {DefaultApiApiOrderInfoSummaryDailyStatsGetRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApiInterface
|
||||
*/
|
||||
apiOrderInfoSummaryDailyStatsGet(
|
||||
requestParameters: DefaultApiApiOrderInfoSummaryDailyStatsGetRequest,
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiOrderV1OrderSummaryDailyGetListRes>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单汇总
|
||||
@@ -24594,6 +24754,13 @@ export interface DefaultApiApiCardInfoWalmartAccountDailySummaryGetRequest {
|
||||
*/
|
||||
readonly username?: string;
|
||||
|
||||
/**
|
||||
* 账户名称
|
||||
* @type {string}
|
||||
* @memberof DefaultApiApiCardInfoWalmartAccountDailySummaryGet
|
||||
*/
|
||||
readonly accountName?: string;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
* @type {string}
|
||||
@@ -24707,7 +24874,7 @@ export interface DefaultApiApiCardInfoWalmartAccountGetListGetRequest {
|
||||
readonly nickName?: string;
|
||||
|
||||
/**
|
||||
*
|
||||
* cookie
|
||||
* @type {string}
|
||||
* @memberof DefaultApiApiCardInfoWalmartAccountGetListGet
|
||||
*/
|
||||
@@ -24832,6 +24999,13 @@ export interface DefaultApiApiCardInfoWalmartAccountSummaryDownloadGetRequest {
|
||||
*/
|
||||
readonly username?: string;
|
||||
|
||||
/**
|
||||
* 账户名称
|
||||
* @type {string}
|
||||
* @memberof DefaultApiApiCardInfoWalmartAccountSummaryDownloadGet
|
||||
*/
|
||||
readonly accountName?: string;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
* @type {string}
|
||||
@@ -25673,6 +25847,34 @@ export interface DefaultApiApiMerchantOrderQueryGetRequest {
|
||||
readonly merchantOrderNo?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for apiOrderInfoSummaryDailyStatsGet operation in DefaultApi.
|
||||
* @export
|
||||
* @interface DefaultApiApiOrderInfoSummaryDailyStatsGetRequest
|
||||
*/
|
||||
export interface DefaultApiApiOrderInfoSummaryDailyStatsGetRequest {
|
||||
/**
|
||||
* 页数
|
||||
* @type {number}
|
||||
* @memberof DefaultApiApiOrderInfoSummaryDailyStatsGet
|
||||
*/
|
||||
readonly current: number;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
* @type {5 | 10 | 15 | 20 | 50 | 100}
|
||||
* @memberof DefaultApiApiOrderInfoSummaryDailyStatsGet
|
||||
*/
|
||||
readonly pageSize: ApiOrderInfoSummaryDailyStatsGetPageSizeEnum;
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DefaultApiApiOrderInfoSummaryDailyStatsGet
|
||||
*/
|
||||
readonly roadUid?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for apiOrderInfoSummaryGetListGet operation in DefaultApi.
|
||||
* @export
|
||||
@@ -28296,6 +28498,7 @@ export class DefaultApi extends BaseAPI implements DefaultApiInterface {
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.username,
|
||||
requestParameters.accountName,
|
||||
requestParameters.date,
|
||||
requestParameters.userId,
|
||||
options
|
||||
@@ -28483,6 +28686,7 @@ export class DefaultApi extends BaseAPI implements DefaultApiInterface {
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.username,
|
||||
requestParameters.accountName,
|
||||
requestParameters.date,
|
||||
options
|
||||
)
|
||||
@@ -29348,6 +29552,28 @@ export class DefaultApi extends BaseAPI implements DefaultApiInterface {
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单每日汇总
|
||||
* @param {DefaultApiApiOrderInfoSummaryDailyStatsGetRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
*/
|
||||
public apiOrderInfoSummaryDailyStatsGet(
|
||||
requestParameters: DefaultApiApiOrderInfoSummaryDailyStatsGetRequest,
|
||||
options?: RawAxiosRequestConfig
|
||||
) {
|
||||
return DefaultApiFp(this.configuration)
|
||||
.apiOrderInfoSummaryDailyStatsGet(
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.roadUid,
|
||||
options
|
||||
)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 获取订单汇总
|
||||
@@ -30753,6 +30979,18 @@ export enum ApiMerchantConfigStealRuleRecordGetPageSizeEnum {
|
||||
NUMBER_50 = 50,
|
||||
NUMBER_100 = 100
|
||||
}
|
||||
/**
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum ApiOrderInfoSummaryDailyStatsGetPageSizeEnum {
|
||||
NUMBER_5 = 5,
|
||||
NUMBER_10 = 10,
|
||||
NUMBER_15 = 15,
|
||||
NUMBER_20 = 20,
|
||||
NUMBER_50 = 50,
|
||||
NUMBER_100 = 100
|
||||
}
|
||||
/**
|
||||
* @export
|
||||
* @enum {string}
|
||||
|
||||
@@ -256,6 +256,9 @@ export * from './kami-api-order-v1-order-form-list-req';
|
||||
export * from './kami-api-order-v1-order-form-update-req';
|
||||
export * from './kami-api-order-v1-order-log-delete-req';
|
||||
export * from './kami-api-order-v1-order-log-list-req';
|
||||
export * from './kami-api-order-v1-order-summary-daily-get-list-req';
|
||||
export * from './kami-api-order-v1-order-summary-daily-get-list-res';
|
||||
export * from './kami-api-order-v1-order-summary-daily-record';
|
||||
export * from './kami-api-order-v1-order-summary-get-list-req';
|
||||
export * from './kami-api-order-v1-order-summary-get-list-res';
|
||||
export * from './kami-api-order-v1-order-summary-record';
|
||||
|
||||
@@ -36,6 +36,12 @@ export interface KamiApiCardInfoWalmartV1AccountDailySummaryReq {
|
||||
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryReq
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* 账户名称
|
||||
* @type {string}
|
||||
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryReq
|
||||
*/
|
||||
accountName?: string;
|
||||
/**
|
||||
* 日期
|
||||
* @type {string}
|
||||
|
||||
@@ -43,7 +43,7 @@ export interface KamiApiCardInfoWalmartV1AccountListReq {
|
||||
*/
|
||||
nickName?: string;
|
||||
/**
|
||||
*
|
||||
* cookie
|
||||
* @type {string}
|
||||
* @memberof KamiApiCardInfoWalmartV1AccountListReq
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,12 @@ export interface KamiApiCardInfoWalmartV1AccountSummaryDownloadReq {
|
||||
* @memberof KamiApiCardInfoWalmartV1AccountSummaryDownloadReq
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* 账户名称
|
||||
* @type {string}
|
||||
* @memberof KamiApiCardInfoWalmartV1AccountSummaryDownloadReq
|
||||
*/
|
||||
accountName?: string;
|
||||
/**
|
||||
* 日期
|
||||
* @type {string}
|
||||
|
||||
@@ -34,6 +34,12 @@ export interface KamiApiCardRedeemJdV1OrderListSchema {
|
||||
* @memberof KamiApiCardRedeemJdV1OrderListSchema
|
||||
*/
|
||||
bankOrderId?: string;
|
||||
/**
|
||||
* 订单编号
|
||||
* @type {string}
|
||||
* @memberof KamiApiCardRedeemJdV1OrderListSchema
|
||||
*/
|
||||
orderNo?: string;
|
||||
/**
|
||||
* 订单金额
|
||||
* @type {number}
|
||||
@@ -58,12 +64,6 @@ export interface KamiApiCardRedeemJdV1OrderListSchema {
|
||||
* @memberof KamiApiCardRedeemJdV1OrderListSchema
|
||||
*/
|
||||
cookie?: KamiInternalModelEntityV1CardRedeemCookieInfo;
|
||||
/**
|
||||
* 订单编号
|
||||
* @type {string}
|
||||
* @memberof KamiApiCardRedeemJdV1OrderListSchema
|
||||
*/
|
||||
orderNo?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
|
||||
@@ -30,4 +30,10 @@ export interface KamiApiCardRedeemJdV1PlaceOrderReq {
|
||||
* @memberof KamiApiCardRedeemJdV1PlaceOrderReq
|
||||
*/
|
||||
orderAmount: number;
|
||||
/**
|
||||
* 用户代理
|
||||
* @type {string}
|
||||
* @memberof KamiApiCardRedeemJdV1PlaceOrderReq
|
||||
*/
|
||||
userAgent?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface KamiApiOrderV1OrderSummaryDailyGetListReq
|
||||
*/
|
||||
export interface KamiApiOrderV1OrderSummaryDailyGetListReq {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyGetListReq
|
||||
*/
|
||||
roadUid?: string;
|
||||
/**
|
||||
* 页数
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyGetListReq
|
||||
*/
|
||||
current: number;
|
||||
/**
|
||||
* 页码
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyGetListReq
|
||||
*/
|
||||
pageSize: KamiApiOrderV1OrderSummaryDailyGetListReqPageSizeEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum KamiApiOrderV1OrderSummaryDailyGetListReqPageSizeEnum {
|
||||
NUMBER_5 = 5,
|
||||
NUMBER_10 = 10,
|
||||
NUMBER_15 = 15,
|
||||
NUMBER_20 = 20,
|
||||
NUMBER_50 = 50,
|
||||
NUMBER_100 = 100
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { KamiApiOrderV1OrderSummaryDailyRecord } from './kami-api-order-v1-order-summary-daily-record';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface KamiApiOrderV1OrderSummaryDailyGetListRes
|
||||
*/
|
||||
export interface KamiApiOrderV1OrderSummaryDailyGetListRes {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyGetListRes
|
||||
*/
|
||||
total?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<KamiApiOrderV1OrderSummaryDailyRecord>}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyGetListRes
|
||||
*/
|
||||
list?: Array<KamiApiOrderV1OrderSummaryDailyRecord>;
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
export interface KamiApiOrderV1OrderSummaryDailyRecord {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
merchantUid?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
merchantName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
roadUid?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
roadName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
date?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
succeedCount?: number;
|
||||
/**
|
||||
* 订单总量
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
totalCount?: number;
|
||||
/**
|
||||
* 失败的订单
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
failedCount?: number;
|
||||
/**
|
||||
* 创建但未填写的订单
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
waitedCount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
succeedShowAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
succeedFactAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
totalShowAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
totalFactAmount?: number;
|
||||
/**
|
||||
* 比例
|
||||
* @type {number}
|
||||
* @memberof KamiApiOrderV1OrderSummaryDailyRecord
|
||||
*/
|
||||
rate?: number;
|
||||
}
|
||||
@@ -235,6 +235,16 @@ const IFRAME: AppRouteRecordRaw = {
|
||||
requiresAuth: false,
|
||||
roles: ['*']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'AdminDashboard',
|
||||
name: 'iframeAdminDashboard',
|
||||
component: () => import('@/views/dashboard/admin/index.vue'),
|
||||
meta: {
|
||||
locale: '管理看板',
|
||||
requiresAuth: false,
|
||||
roles: ['*']
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
72
src/views/dashboard/admin/components/announcement.vue
Normal file
72
src/views/dashboard/admin/components/announcement.vue
Normal file
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<a-card
|
||||
class="general-card"
|
||||
title="workplace.announcement"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{ padding: '15px 20px 13px 20px' }"
|
||||
>
|
||||
<template #extra>
|
||||
<a-link>{{ 'workplace.viewMore' }}</a-link>
|
||||
</template>
|
||||
<div>
|
||||
<div v-for="(item, idx) in list" :key="idx" class="item">
|
||||
<a-tag :color="item.type" size="small">{{ item.label }}</a-tag>
|
||||
<span class="item-content">
|
||||
{{ item.content }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const list = [
|
||||
{
|
||||
type: 'orangered',
|
||||
label: '活动',
|
||||
content: '内容最新优惠活动'
|
||||
},
|
||||
{
|
||||
type: 'cyan',
|
||||
label: '消息',
|
||||
content: '新增内容尚未通过审核,详情请点击查看。'
|
||||
},
|
||||
{
|
||||
type: 'blue',
|
||||
label: '通知',
|
||||
content: '当前产品试用期即将结束,如需续费请点击查看。'
|
||||
},
|
||||
{
|
||||
type: 'blue',
|
||||
label: '通知',
|
||||
content: '1月新系统升级计划通知'
|
||||
},
|
||||
{
|
||||
type: 'cyan',
|
||||
label: '消息',
|
||||
content: '新增内容已经通过审核,详情请点击查看。'
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
margin-bottom: 4px;
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
margin-left: 4px;
|
||||
overflow: hidden;
|
||||
font-size: 13px;
|
||||
color: var(--color-text-2);
|
||||
text-decoration: none;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
35
src/views/dashboard/admin/components/banner.vue
Normal file
35
src/views/dashboard/admin/components/banner.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<a-col class="banner">
|
||||
<a-col :span="8">
|
||||
<a-typography-title :heading="5" style="margin-top: 0">
|
||||
欢迎使用👏👏👏
|
||||
</a-typography-title>
|
||||
</a-col>
|
||||
<a-divider class="panel-border" />
|
||||
</a-col>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { useUserStore } from '@/store';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const userInfo = computed(() => {
|
||||
return {
|
||||
name: userStore.name
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.banner {
|
||||
width: 100%;
|
||||
padding: 20px 20px 0;
|
||||
background-color: var(--color-bg-2);
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
:deep(.arco-icon-home) {
|
||||
margin-right: 6px;
|
||||
}
|
||||
</style>
|
||||
24
src/views/dashboard/admin/components/carousel.vue
Normal file
24
src/views/dashboard/admin/components/carousel.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<a-carousel
|
||||
indicator-type="slider"
|
||||
show-arrow="hover"
|
||||
auto-play
|
||||
style="width: 100%; height: 170px; overflow: hidden; border-radius: 4px"
|
||||
>
|
||||
<a-carousel-item v-for="(src, idx) in imageSrc" :key="idx">
|
||||
<div>
|
||||
<img :src="src" style="width: 100%" />
|
||||
</div>
|
||||
</a-carousel-item>
|
||||
</a-carousel>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const imageSrc = [
|
||||
'//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/5cc3cd1d994b7ef9db6a1f619a22addd.jpg~tplv-49unhts6dw-image.image',
|
||||
'//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/f256cbcc287139e191fecea9d255a1f0.jpg~tplv-49unhts6dw-image.image',
|
||||
'//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/b557ff0cd44146a2e471b477af2f30d0.jpg~tplv-49unhts6dw-image.image',
|
||||
'//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/665106f4bbd2a2df96eaf7aec52f7bc3.jpg~tplv-49unhts6dw-image.image',
|
||||
'//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/ea095a2c9c72b5d8f2f2818040db736d.jpg~tplv-49unhts6dw-image.image'
|
||||
];
|
||||
</script>
|
||||
114
src/views/dashboard/admin/components/categories-percent.vue
Normal file
114
src/views/dashboard/admin/components/categories-percent.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<a-spin :loading="loading" style="width: 100%">
|
||||
<a-card
|
||||
class="general-card"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{
|
||||
padding: '20px'
|
||||
}"
|
||||
>
|
||||
<template #title>
|
||||
{{ 'workplace.categoriesPercent' }}
|
||||
</template>
|
||||
<Chart height="310px" :option="chartOption" />
|
||||
</a-card>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import useLoading from '@/hooks/loading';
|
||||
import useChartOption from '@/hooks/chart-option';
|
||||
|
||||
const { loading } = useLoading();
|
||||
const { chartOption } = useChartOption(isDark => {
|
||||
// echarts support https://echarts.apache.org/zh/theme-builder.html
|
||||
// It's not used here
|
||||
return {
|
||||
legend: {
|
||||
left: 'center',
|
||||
data: ['纯文本', '图文类', '视频类'],
|
||||
bottom: 0,
|
||||
icon: 'circle',
|
||||
itemWidth: 8,
|
||||
textStyle: {
|
||||
color: isDark ? 'rgba(255, 255, 255, 0.7)' : '#4E5969'
|
||||
},
|
||||
itemStyle: {
|
||||
borderWidth: 0
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'item'
|
||||
},
|
||||
graphic: {
|
||||
elements: [
|
||||
{
|
||||
type: 'text',
|
||||
left: 'center',
|
||||
top: '40%',
|
||||
style: {
|
||||
text: '内容量',
|
||||
textAlign: 'center',
|
||||
fill: isDark ? '#ffffffb3' : '#4E5969',
|
||||
fontSize: 14
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
left: 'center',
|
||||
top: '50%',
|
||||
style: {
|
||||
text: '928,531',
|
||||
textAlign: 'center',
|
||||
fill: isDark ? '#ffffffb3' : '#1D2129',
|
||||
fontSize: 16,
|
||||
fontWeight: 500
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: ['50%', '70%'],
|
||||
center: ['50%', '50%'],
|
||||
label: {
|
||||
formatter: '{d}%',
|
||||
fontSize: 14,
|
||||
color: isDark ? 'rgba(255, 255, 255, 0.7)' : '#4E5969'
|
||||
},
|
||||
itemStyle: {
|
||||
borderColor: isDark ? '#232324' : '#fff',
|
||||
borderWidth: 1
|
||||
},
|
||||
data: [
|
||||
{
|
||||
value: [148564],
|
||||
name: '纯文本',
|
||||
itemStyle: {
|
||||
color: isDark ? '#3D72F6' : '#249EFF'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: [334271],
|
||||
name: '图文类',
|
||||
itemStyle: {
|
||||
color: isDark ? '#A079DC' : '#313CA9'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: [445694],
|
||||
name: '视频类',
|
||||
itemStyle: {
|
||||
color: isDark ? '#6CAAF5' : '#21CCFF'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
211
src/views/dashboard/admin/components/content-chart.vue
Normal file
211
src/views/dashboard/admin/components/content-chart.vue
Normal file
@@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<a-spin :loading="loading" style="width: 100%">
|
||||
<a-card
|
||||
class="general-card"
|
||||
:header-style="{ paddingBottom: 0 }"
|
||||
:body-style="{
|
||||
paddingTop: '20px'
|
||||
}"
|
||||
title="订单量"
|
||||
>
|
||||
<template #extra>
|
||||
<a-link>明细</a-link>
|
||||
</template>
|
||||
<Chart height="289px" :option="chartOption" />
|
||||
</a-card>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { graphic } from 'echarts';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { queryContentData, ContentDataRecord } from '@/api/dashboard';
|
||||
import useChartOption from '@/hooks/chart-option';
|
||||
import { ToolTipFormatterParams } from '@/types/echarts';
|
||||
import { AnyObject } from '@/types/global';
|
||||
import { apiCkClient, apiClient } from '@/api';
|
||||
import {
|
||||
ApiOrderInfoSummaryDailyStatsGetPageSizeEnum,
|
||||
KamiApiOrderV1OrderSummaryDailyRecord
|
||||
} from '@/api/generated';
|
||||
|
||||
function graphicFactory(side: AnyObject) {
|
||||
return {
|
||||
type: 'text',
|
||||
bottom: '8',
|
||||
...side,
|
||||
style: {
|
||||
text: '',
|
||||
textAlign: 'center',
|
||||
fill: '#4E5969',
|
||||
fontSize: 12
|
||||
}
|
||||
};
|
||||
}
|
||||
const { loading, setLoading } = useLoading(true);
|
||||
const xAxis = ref<string[]>([]);
|
||||
const chartsData = ref<number[]>([]);
|
||||
const graphicElements = ref([
|
||||
graphicFactory({ left: '2.6%' }),
|
||||
graphicFactory({ right: 0 })
|
||||
]);
|
||||
const { chartOption } = useChartOption(() => {
|
||||
return {
|
||||
grid: {
|
||||
left: '2.6%',
|
||||
right: '0',
|
||||
top: '10',
|
||||
bottom: '30'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
offset: 2,
|
||||
data: xAxis.value,
|
||||
boundaryGap: false,
|
||||
axisLabel: {
|
||||
color: '#4E5969',
|
||||
formatter(value: number, idx: number) {
|
||||
if (idx === 0) return '';
|
||||
if (idx === xAxis.value.length - 1) return '';
|
||||
return `${value}`;
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
interval: (idx: number) => {
|
||||
if (idx === 0) return false;
|
||||
if (idx === xAxis.value.length - 1) return false;
|
||||
return true;
|
||||
},
|
||||
lineStyle: {
|
||||
color: '#E5E8EF'
|
||||
}
|
||||
},
|
||||
axisPointer: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#23ADFF',
|
||||
width: 2
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
formatter(value: any, idx: number) {
|
||||
if (idx === 0) return value;
|
||||
return `${value}k`;
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: 'dashed',
|
||||
color: '#E5E8EF'
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter(params) {
|
||||
const [firstElement] = params as ToolTipFormatterParams[];
|
||||
return `<div>
|
||||
<p class="tooltip-title">${firstElement.axisValueLabel}</p>
|
||||
<div class="content-panel"><span>总内容量</span><span class="tooltip-value">${(
|
||||
Number(firstElement.value) * 10000
|
||||
).toLocaleString()}</span></div>
|
||||
</div>`;
|
||||
},
|
||||
className: 'echarts-tooltip-diy'
|
||||
},
|
||||
graphic: {
|
||||
elements: graphicElements.value
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: chartsData.value,
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'circle',
|
||||
symbolSize: 12,
|
||||
emphasis: {
|
||||
focus: 'series',
|
||||
itemStyle: {
|
||||
borderWidth: 2
|
||||
}
|
||||
},
|
||||
lineStyle: {
|
||||
width: 3,
|
||||
color: new graphic.LinearGradient(0, 0, 1, 0, [
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgba(30, 231, 255, 1)'
|
||||
},
|
||||
{
|
||||
offset: 0.5,
|
||||
color: 'rgba(36, 154, 255, 1)'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: 'rgba(111, 66, 251, 1)'
|
||||
}
|
||||
])
|
||||
},
|
||||
showSymbol: false,
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: new graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgba(17, 126, 255, 0.16)'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: 'rgba(17, 128, 255, 0)'
|
||||
}
|
||||
])
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
const fetchData = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const { data: chartData } =
|
||||
await apiClient.apiOrderInfoSummaryDailyStatsGet({
|
||||
current: 1,
|
||||
pageSize: 1000 as ApiOrderInfoSummaryDailyStatsGetPageSizeEnum
|
||||
});
|
||||
console.log(chartData);
|
||||
chartData.list.forEach(
|
||||
(el: KamiApiOrderV1OrderSummaryDailyRecord, idx: number) => {
|
||||
xAxis.value.push(el.date);
|
||||
chartsData.value.push(el.succeedFactAmount);
|
||||
if (idx === 0) {
|
||||
graphicElements.value[0].style.text = el.date;
|
||||
}
|
||||
if (idx === chartData.list.length - 1) {
|
||||
graphicElements.value[1].style.text = el.date;
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
fetchData();
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
140
src/views/dashboard/admin/components/data-panel.vue
Normal file
140
src/views/dashboard/admin/components/data-panel.vue
Normal file
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<a-grid :cols="24" :row-gap="16" class="panel">
|
||||
<a-grid-item
|
||||
class="panel-col"
|
||||
:span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
>
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img
|
||||
alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/288b89194e657603ff40db39e8072640.svg~tplv-49unhts6dw-image.image"
|
||||
/>
|
||||
</a-avatar>
|
||||
<a-statistic
|
||||
title="线上总内容"
|
||||
:value="373.5"
|
||||
:precision="1"
|
||||
:value-from="0"
|
||||
animation
|
||||
show-group-separator
|
||||
>
|
||||
<template #suffix>
|
||||
W+
|
||||
<span class="unit">{{ '个' }}</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item
|
||||
class="panel-col"
|
||||
:span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
>
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img
|
||||
alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/fdc66b07224cdf18843c6076c2587eb5.svg~tplv-49unhts6dw-image.image"
|
||||
/>
|
||||
</a-avatar>
|
||||
<a-statistic
|
||||
title="投放中内容"
|
||||
:value="368"
|
||||
:value-from="0"
|
||||
animation
|
||||
show-group-separator
|
||||
>
|
||||
<template #suffix>
|
||||
<span class="unit">个</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item
|
||||
class="panel-col"
|
||||
:span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
>
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img
|
||||
alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/77d74c9a245adeae1ec7fb5d4539738d.svg~tplv-49unhts6dw-image.image"
|
||||
/>
|
||||
</a-avatar>
|
||||
<a-statistic
|
||||
:title="'workplace.newDay'"
|
||||
:value="8874"
|
||||
:value-from="0"
|
||||
animation
|
||||
show-group-separator
|
||||
>
|
||||
<template #suffix>
|
||||
<span class="unit">{{ '个' }}</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item
|
||||
class="panel-col"
|
||||
:span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
|
||||
style="border-right: none"
|
||||
>
|
||||
<a-space>
|
||||
<a-avatar :size="54" class="col-avatar">
|
||||
<img
|
||||
alt="avatar"
|
||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/c8b36e26d2b9bb5dbf9b74dd6d7345af.svg~tplv-49unhts6dw-image.image"
|
||||
/>
|
||||
</a-avatar>
|
||||
<a-statistic
|
||||
title="workplace.newFromYesterday"
|
||||
:value="2.8"
|
||||
:precision="1"
|
||||
:value-from="0"
|
||||
animation
|
||||
>
|
||||
<template #suffix>
|
||||
%
|
||||
<icon-caret-up class="up-icon" />
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
<a-grid-item :span="24">
|
||||
<a-divider class="panel-border" />
|
||||
</a-grid-item>
|
||||
</a-grid>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.arco-grid.panel {
|
||||
padding: 16px 20px 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.panel-col {
|
||||
padding-left: 43px;
|
||||
border-right: 1px solid rgb(var(--gray-2));
|
||||
}
|
||||
|
||||
.col-avatar {
|
||||
margin-right: 12px;
|
||||
background-color: var(--color-fill-2);
|
||||
}
|
||||
|
||||
.up-icon {
|
||||
color: rgb(var(--red-6));
|
||||
}
|
||||
|
||||
.unit {
|
||||
margin-left: 8px;
|
||||
font-size: 12px;
|
||||
color: rgb(var(--gray-8));
|
||||
}
|
||||
|
||||
:deep(.panel-border) {
|
||||
margin: 4px 0 0;
|
||||
}
|
||||
</style>
|
||||
42
src/views/dashboard/admin/components/docs.vue
Normal file
42
src/views/dashboard/admin/components/docs.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<a-card
|
||||
class="general-card"
|
||||
title="workplace.docs"
|
||||
:header-style="{ paddingBottom: 0 }"
|
||||
:body-style="{ paddingTop: 0 }"
|
||||
style="height: 166px"
|
||||
>
|
||||
<template #extra>
|
||||
<a-link>{{ 'workplace.viewMore' }}</a-link>
|
||||
</template>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-link>
|
||||
{{ 'workplace.docs.productOverview' }}
|
||||
</a-link>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-link>
|
||||
{{ 'workplace.docs.userGuide' }}
|
||||
</a-link>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-link>
|
||||
{{ 'workplace.docs.workflow' }}
|
||||
</a-link>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-link>
|
||||
{{ 'workplace.docs.interfaceDocs' }}
|
||||
</a-link>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.arco-card-body .arco-link {
|
||||
margin: 10px 0;
|
||||
color: rgb(var(--gray-8));
|
||||
}
|
||||
</style>
|
||||
124
src/views/dashboard/admin/components/popular-content.vue
Normal file
124
src/views/dashboard/admin/components/popular-content.vue
Normal file
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<a-spin :loading="loading" style="width: 100%">
|
||||
<a-card
|
||||
class="general-card"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{ padding: '17px 20px 21px 20px' }"
|
||||
>
|
||||
<template #title>
|
||||
{{ 'workplace.popularContent' }}
|
||||
</template>
|
||||
<template #extra>
|
||||
<a-link>{{ 'workplace.viewMore' }}</a-link>
|
||||
</template>
|
||||
<a-space direction="vertical" :size="10" fill>
|
||||
<a-radio-group
|
||||
v-model:model-value="type"
|
||||
type="button"
|
||||
@change="typeChange as any"
|
||||
>
|
||||
<a-radio value="text">
|
||||
{{ 'workplace.popularContent.text' }}
|
||||
</a-radio>
|
||||
<a-radio value="image">
|
||||
{{ 'workplace.popularContent.image' }}
|
||||
</a-radio>
|
||||
<a-radio value="video">
|
||||
{{ 'workplace.popularContent.video' }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
<a-table
|
||||
:data="renderList"
|
||||
:pagination="false"
|
||||
:bordered="false"
|
||||
:scroll="{ x: '100%', y: '264px' }"
|
||||
>
|
||||
<template #columns>
|
||||
<a-table-column title="排名" data-index="key"></a-table-column>
|
||||
<a-table-column title="内容标题" data-index="title">
|
||||
<template #cell="{ record }">
|
||||
<a-typography-paragraph
|
||||
:ellipsis="{
|
||||
rows: 1
|
||||
}"
|
||||
>
|
||||
{{ record.title }}
|
||||
</a-typography-paragraph>
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column
|
||||
title="点击量"
|
||||
data-index="clickNumber"
|
||||
></a-table-column>
|
||||
<a-table-column
|
||||
title="日涨幅"
|
||||
data-index="increases"
|
||||
:sortable="{
|
||||
sortDirections: ['ascend', 'descend']
|
||||
}"
|
||||
>
|
||||
<template #cell="{ record }">
|
||||
<div class="increases-cell">
|
||||
<span>{{ record.increases }}%</span>
|
||||
<icon-caret-up
|
||||
v-if="record.increases !== 0"
|
||||
style="font-size: 8px; color: #f53f3f"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</a-table-column>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-space>
|
||||
</a-card>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { queryPopularList } from '@/api/dashboard';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
const type = ref('text');
|
||||
const { loading, setLoading } = useLoading();
|
||||
const renderList = ref<TableData[]>();
|
||||
const fetchData = async (contentType: string) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
const { data } = await queryPopularList({ type: contentType });
|
||||
renderList.value = data;
|
||||
} catch (err) {
|
||||
// you can report use errorHandler or other
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const typeChange = (contentType: string) => {
|
||||
fetchData(contentType);
|
||||
};
|
||||
fetchData('text');
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.general-card {
|
||||
min-height: 395px;
|
||||
}
|
||||
|
||||
:deep(.arco-table-tr) {
|
||||
height: 44px;
|
||||
|
||||
.arco-typography {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.increases-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
35
src/views/dashboard/admin/components/quick-operation.vue
Normal file
35
src/views/dashboard/admin/components/quick-operation.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<a-card
|
||||
class="general-card"
|
||||
title="'workplace.quick.operation'"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{ padding: '24px 20px 0 20px' }"
|
||||
>
|
||||
<template #extra>
|
||||
<a-link>{{ 'workplace.quickOperation.setup' }}</a-link>
|
||||
</template>
|
||||
<a-row :gutter="8">
|
||||
<a-col v-for="link in links" :key="link.text" :span="8" class="wrapper">
|
||||
<div class="icon">
|
||||
<component :is="link.icon" />
|
||||
</div>
|
||||
<a-typography-paragraph class="text">
|
||||
{{ 'link.text' }}
|
||||
</a-typography-paragraph>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider class="split-line" style="margin: 0" />
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const links = [
|
||||
{ text: 'workplace.contentManagement', icon: 'icon-file' },
|
||||
{ text: 'workplace.contentStatistical', icon: 'icon-storage' },
|
||||
{ text: 'workplace.advanced', icon: 'icon-settings' },
|
||||
{ text: 'workplace.onlinePromotion', icon: 'icon-mobile' },
|
||||
{ text: 'workplace.contentPutIn', icon: 'icon-fire' }
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
44
src/views/dashboard/admin/components/recently-visited.vue
Normal file
44
src/views/dashboard/admin/components/recently-visited.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<a-card
|
||||
class="general-card"
|
||||
title="workplace.recently.visited"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{ paddingTop: '26px' }"
|
||||
>
|
||||
<div style="margin-bottom: -1rem">
|
||||
<a-row :gutter="8">
|
||||
<a-col v-for="link in links" :key="link.text" :span="8" class="wrapper">
|
||||
<div class="icon">
|
||||
<component :is="link.icon" />
|
||||
</div>
|
||||
<a-typography-paragraph class="text">
|
||||
{{ link.text }}
|
||||
</a-typography-paragraph>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const links = [
|
||||
{
|
||||
text: 'workplace.contentManagement',
|
||||
icon: 'icon-storage'
|
||||
},
|
||||
{
|
||||
text: 'workplace.contentStatistical',
|
||||
icon: 'icon-file'
|
||||
},
|
||||
{
|
||||
text: 'workplace.advanced',
|
||||
icon: 'icon-settings'
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.arco-card-header-title) {
|
||||
line-height: inherit;
|
||||
}
|
||||
</style>
|
||||
153
src/views/dashboard/admin/index.vue
Normal file
153
src/views/dashboard/admin/index.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="left-side">
|
||||
<div class="panel">
|
||||
<Banner />
|
||||
<!-- <DataPanel /> -->
|
||||
<ContentChart />
|
||||
</div>
|
||||
<a-grid :cols="24" :col-gap="16" :row-gap="16" style="margin-top: 16px">
|
||||
<!-- <a-grid-item
|
||||
:span="{ xs: 24, sm: 24, md: 24, lg: 12, xl: 12, xxl: 12 }"
|
||||
>
|
||||
<PopularContent />
|
||||
</a-grid-item> -->
|
||||
<!-- <a-grid-item
|
||||
:span="{ xs: 24, sm: 24, md: 24, lg: 12, xl: 12, xxl: 12 }"
|
||||
>
|
||||
<CategoriesPercent />
|
||||
</a-grid-item> -->
|
||||
</a-grid>
|
||||
</div>
|
||||
<!-- <div class="right-side">
|
||||
<a-grid :cols="24" :row-gap="16">
|
||||
<a-grid-item :span="24">
|
||||
<div class="panel moduler-wrap">
|
||||
<QuickOperation />
|
||||
<RecentlyVisited />
|
||||
</div>
|
||||
</a-grid-item>
|
||||
<a-grid-item class="panel" :span="24">
|
||||
<Carousel />
|
||||
</a-grid-item>
|
||||
<a-grid-item class="panel" :span="24">
|
||||
<Announcement />
|
||||
</a-grid-item>
|
||||
<a-grid-item class="panel" :span="24">
|
||||
<Docs />
|
||||
</a-grid-item>
|
||||
</a-grid>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Banner from './components/banner.vue';
|
||||
import DataPanel from './components/data-panel.vue';
|
||||
import ContentChart from './components/content-chart.vue';
|
||||
import PopularContent from './components/popular-content.vue';
|
||||
import CategoriesPercent from './components/categories-percent.vue';
|
||||
import RecentlyVisited from './components/recently-visited.vue';
|
||||
import QuickOperation from './components/quick-operation.vue';
|
||||
import Announcement from './components/announcement.vue';
|
||||
import Carousel from './components/carousel.vue';
|
||||
import Docs from './components/docs.vue';
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'AdminDashboard'
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
padding: 16px 20px;
|
||||
padding-bottom: 0;
|
||||
background-color: var(--color-fill-2);
|
||||
}
|
||||
|
||||
.left-side {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.right-side {
|
||||
width: 280px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.panel {
|
||||
overflow: auto;
|
||||
background-color: var(--color-bg-2);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
:deep(.panel-border) {
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid rgb(var(--gray-2));
|
||||
}
|
||||
|
||||
.moduler-wrap {
|
||||
background-color: var(--color-bg-2);
|
||||
border-radius: 4px;
|
||||
|
||||
:deep(.text) {
|
||||
font-size: 12px;
|
||||
color: rgb(var(--gray-8));
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:deep(.wrapper) {
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
&:last-child {
|
||||
.text {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.icon {
|
||||
color: rgb(var(--arcoblue-6));
|
||||
background-color: #e8f3ff;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: rgb(var(--arcoblue-6));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.icon) {
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-bottom: 4px;
|
||||
font-size: 16px;
|
||||
line-height: 32px;
|
||||
color: rgb(var(--dark-gray-1));
|
||||
text-align: center;
|
||||
background-color: rgb(var(--gray-1));
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// responsive
|
||||
.mobile {
|
||||
.container {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.right-side {
|
||||
width: 100%;
|
||||
margin-top: 16px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user