style(api): 统一代码风格并修复语法问题
- 统一import语句的空格格式 - 修复分号缺失问题 - 调整函数参数换行格式以符合规范 - 删除多余空行保持代码整洁 - 修复字符串拼接的换行格式问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
import {ShopOrder, ShopOrderParam} from "@/api/shop/shopOrder/model";
|
||||
import { ShopOrder, ShopOrderParam } from '@/api/shop/shopOrder/model';
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-捐款记录
|
||||
@@ -19,7 +19,6 @@ export async function pageBszxOrder(params: ShopOrderParam) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 统计订单总金额(只统计有效订单)
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BszxPay, BszxPayParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
import {ShopOrder} from "@/api/shop/shopOrder/model";
|
||||
import { ShopOrder } from '@/api/shop/shopOrder/model';
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-捐款记录
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BszxPayRanking, BszxPayRankingParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
import {BszxClass, BszxClassParam} from "@/api/bszx/bszxClass/model";
|
||||
import { BszxClass, BszxClassParam } from '@/api/bszx/bszxClass/model';
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-捐款排行
|
||||
@@ -62,8 +62,6 @@ export async function ranking2(params?: BszxClassParam) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 添加百色中学-捐款排行
|
||||
*/
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeClinicAppointment(id?: number) {
|
||||
/**
|
||||
* 批量删除挂号
|
||||
*/
|
||||
export async function removeBatchClinicAppointment(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicAppointment(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-appointment/batch',
|
||||
{
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeClinicDoctorApply(id?: number) {
|
||||
/**
|
||||
* 批量删除医生入驻申请
|
||||
*/
|
||||
export async function removeBatchClinicDoctorApply(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicDoctorApply(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-apply/batch',
|
||||
{
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicDoctorMedicalRecord, ClinicDoctorMedicalRecordParam } from './model';
|
||||
import type {
|
||||
ClinicDoctorMedicalRecord,
|
||||
ClinicDoctorMedicalRecordParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询医疗记录
|
||||
*/
|
||||
export async function pageClinicDoctorMedicalRecord(params: ClinicDoctorMedicalRecordParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicDoctorMedicalRecord>>>(
|
||||
'/clinic/clinic-doctor-medical-record/page',
|
||||
{
|
||||
export async function pageClinicDoctorMedicalRecord(
|
||||
params: ClinicDoctorMedicalRecordParam
|
||||
) {
|
||||
const res = await request.get<
|
||||
ApiResult<PageResult<ClinicDoctorMedicalRecord>>
|
||||
>('/clinic/clinic-doctor-medical-record/page', {
|
||||
params
|
||||
}
|
||||
);
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -21,7 +25,9 @@ export async function pageClinicDoctorMedicalRecord(params: ClinicDoctorMedicalR
|
||||
/**
|
||||
* 查询医疗记录列表
|
||||
*/
|
||||
export async function listClinicDoctorMedicalRecord(params?: ClinicDoctorMedicalRecordParam) {
|
||||
export async function listClinicDoctorMedicalRecord(
|
||||
params?: ClinicDoctorMedicalRecordParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ClinicDoctorMedicalRecord[]>>(
|
||||
'/clinic/clinic-doctor-medical-record',
|
||||
{
|
||||
@@ -37,7 +43,9 @@ export async function listClinicDoctorMedicalRecord(params?: ClinicDoctorMedical
|
||||
/**
|
||||
* 添加医疗记录
|
||||
*/
|
||||
export async function addClinicDoctorMedicalRecord(data: ClinicDoctorMedicalRecord) {
|
||||
export async function addClinicDoctorMedicalRecord(
|
||||
data: ClinicDoctorMedicalRecord
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-medical-record',
|
||||
data
|
||||
@@ -51,7 +59,9 @@ export async function addClinicDoctorMedicalRecord(data: ClinicDoctorMedicalReco
|
||||
/**
|
||||
* 修改医疗记录
|
||||
*/
|
||||
export async function updateClinicDoctorMedicalRecord(data: ClinicDoctorMedicalRecord) {
|
||||
export async function updateClinicDoctorMedicalRecord(
|
||||
data: ClinicDoctorMedicalRecord
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-medical-record',
|
||||
data
|
||||
@@ -78,7 +88,9 @@ export async function removeClinicDoctorMedicalRecord(id?: number) {
|
||||
/**
|
||||
* 批量删除医疗记录
|
||||
*/
|
||||
export async function removeBatchClinicDoctorMedicalRecord(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicDoctorMedicalRecord(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-medical-record/batch',
|
||||
{
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeClinicDoctorUser(id?: number) {
|
||||
/**
|
||||
* 批量删除分销商用户记录表
|
||||
*/
|
||||
export async function removeBatchClinicDoctorUser(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicDoctorUser(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-user/batch',
|
||||
{
|
||||
|
||||
@@ -5,7 +5,9 @@ import type { ClinicMedicalHistory, ClinicMedicalHistoryParam } from './model';
|
||||
/**
|
||||
* 分页查询病例
|
||||
*/
|
||||
export async function pageClinicMedicalHistory(params: ClinicMedicalHistoryParam) {
|
||||
export async function pageClinicMedicalHistory(
|
||||
params: ClinicMedicalHistoryParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicMedicalHistory>>>(
|
||||
'/clinic/clinic-medical-history/page',
|
||||
{
|
||||
@@ -21,7 +23,9 @@ export async function pageClinicMedicalHistory(params: ClinicMedicalHistoryParam
|
||||
/**
|
||||
* 查询病例列表
|
||||
*/
|
||||
export async function listClinicMedicalHistory(params?: ClinicMedicalHistoryParam) {
|
||||
export async function listClinicMedicalHistory(
|
||||
params?: ClinicMedicalHistoryParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ClinicMedicalHistory[]>>(
|
||||
'/clinic/clinic-medical-history',
|
||||
{
|
||||
@@ -78,7 +82,9 @@ export async function removeClinicMedicalHistory(id?: number) {
|
||||
/**
|
||||
* 批量删除病例
|
||||
*/
|
||||
export async function removeBatchClinicMedicalHistory(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicMedicalHistory(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medical-history/batch',
|
||||
{
|
||||
|
||||
@@ -5,7 +5,9 @@ import type { ClinicMedicineInout, ClinicMedicineInoutParam } from './model';
|
||||
/**
|
||||
* 分页查询出入库
|
||||
*/
|
||||
export async function pageClinicMedicineInout(params: ClinicMedicineInoutParam) {
|
||||
export async function pageClinicMedicineInout(
|
||||
params: ClinicMedicineInoutParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicMedicineInout>>>(
|
||||
'/clinic/clinic-medicine-inout/page',
|
||||
{
|
||||
@@ -21,7 +23,9 @@ export async function pageClinicMedicineInout(params: ClinicMedicineInoutParam)
|
||||
/**
|
||||
* 查询出入库列表
|
||||
*/
|
||||
export async function listClinicMedicineInout(params?: ClinicMedicineInoutParam) {
|
||||
export async function listClinicMedicineInout(
|
||||
params?: ClinicMedicineInoutParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ClinicMedicineInout[]>>(
|
||||
'/clinic/clinic-medicine-inout',
|
||||
{
|
||||
@@ -78,7 +82,9 @@ export async function removeClinicMedicineInout(id?: number) {
|
||||
/**
|
||||
* 批量删除出入库
|
||||
*/
|
||||
export async function removeBatchClinicMedicineInout(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicMedicineInout(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-inout/batch',
|
||||
{
|
||||
|
||||
@@ -5,7 +5,9 @@ import type { ClinicMedicineStock, ClinicMedicineStockParam } from './model';
|
||||
/**
|
||||
* 分页查询药品库存
|
||||
*/
|
||||
export async function pageClinicMedicineStock(params: ClinicMedicineStockParam) {
|
||||
export async function pageClinicMedicineStock(
|
||||
params: ClinicMedicineStockParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicMedicineStock>>>(
|
||||
'/clinic/clinic-medicine-stock/page',
|
||||
{
|
||||
@@ -21,7 +23,9 @@ export async function pageClinicMedicineStock(params: ClinicMedicineStockParam)
|
||||
/**
|
||||
* 查询药品库存列表
|
||||
*/
|
||||
export async function listClinicMedicineStock(params?: ClinicMedicineStockParam) {
|
||||
export async function listClinicMedicineStock(
|
||||
params?: ClinicMedicineStockParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ClinicMedicineStock[]>>(
|
||||
'/clinic/clinic-medicine-stock',
|
||||
{
|
||||
@@ -78,7 +82,9 @@ export async function removeClinicMedicineStock(id?: number) {
|
||||
/**
|
||||
* 批量删除药品库存
|
||||
*/
|
||||
export async function removeBatchClinicMedicineStock(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicMedicineStock(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-stock/batch',
|
||||
{
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeClinicPatientUser(id?: number) {
|
||||
/**
|
||||
* 批量删除患者
|
||||
*/
|
||||
export async function removeBatchClinicPatientUser(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicPatientUser(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-patient-user/batch',
|
||||
{
|
||||
|
||||
@@ -84,7 +84,9 @@ export async function removeClinicPrescription(id?: number) {
|
||||
* 批量删除处方主表
|
||||
|
||||
*/
|
||||
export async function removeBatchClinicPrescription(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicPrescription(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription/batch',
|
||||
{
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicPrescriptionItem, ClinicPrescriptionItemParam } from './model';
|
||||
import type {
|
||||
ClinicPrescriptionItem,
|
||||
ClinicPrescriptionItemParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询处方明细表
|
||||
|
||||
*/
|
||||
export async function pageClinicPrescriptionItem(params: ClinicPrescriptionItemParam) {
|
||||
export async function pageClinicPrescriptionItem(
|
||||
params: ClinicPrescriptionItemParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicPrescriptionItem>>>(
|
||||
'/clinic/clinic-prescription-item/page',
|
||||
{
|
||||
@@ -23,7 +28,9 @@ export async function pageClinicPrescriptionItem(params: ClinicPrescriptionItemP
|
||||
* 查询处方明细表
|
||||
列表
|
||||
*/
|
||||
export async function listClinicPrescriptionItem(params?: ClinicPrescriptionItemParam) {
|
||||
export async function listClinicPrescriptionItem(
|
||||
params?: ClinicPrescriptionItemParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ClinicPrescriptionItem[]>>(
|
||||
'/clinic/clinic-prescription-item',
|
||||
{
|
||||
@@ -55,7 +62,9 @@ export async function addClinicPrescriptionItem(data: ClinicPrescriptionItem) {
|
||||
* 修改处方明细表
|
||||
|
||||
*/
|
||||
export async function updateClinicPrescriptionItem(data: ClinicPrescriptionItem) {
|
||||
export async function updateClinicPrescriptionItem(
|
||||
data: ClinicPrescriptionItem
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item',
|
||||
data
|
||||
@@ -84,7 +93,9 @@ export async function removeClinicPrescriptionItem(id?: number) {
|
||||
* 批量删除处方明细表
|
||||
|
||||
*/
|
||||
export async function removeBatchClinicPrescriptionItem(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicPrescriptionItem(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item/batch',
|
||||
{
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeClinicVisitRecord(id?: number) {
|
||||
/**
|
||||
* 批量删除病例
|
||||
*/
|
||||
export async function removeBatchClinicVisitRecord(data: (number | undefined)[]) {
|
||||
export async function removeBatchClinicVisitRecord(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-visit-record/batch',
|
||||
{
|
||||
|
||||
@@ -22,12 +22,9 @@ export async function pageCmsArticle(params: CmsArticleParam) {
|
||||
* 查询文章列表
|
||||
*/
|
||||
export async function listCmsArticle(params?: CmsArticleParam) {
|
||||
const res = await request.get<ApiResult<CmsArticle[]>>(
|
||||
'/cms/cms-article',
|
||||
{
|
||||
const res = await request.get<ApiResult<CmsArticle[]>>('/cms/cms-article', {
|
||||
params
|
||||
}
|
||||
);
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -38,10 +35,7 @@ export async function listCmsArticle(params?: CmsArticleParam) {
|
||||
* 添加文章
|
||||
*/
|
||||
export async function addCmsArticle(data: CmsArticle) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/cms/cms-article',
|
||||
data
|
||||
);
|
||||
const res = await request.post<ApiResult<unknown>>('/cms/cms-article', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
@@ -52,10 +46,7 @@ export async function addCmsArticle(data: CmsArticle) {
|
||||
* 修改文章
|
||||
*/
|
||||
export async function updateCmsArticle(data: CmsArticle) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/cms/cms-article',
|
||||
data
|
||||
);
|
||||
const res = await request.put<ApiResult<unknown>>('/cms/cms-article', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
@@ -141,7 +132,6 @@ export async function getCount(params: CmsArticleParam) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文章批量导入
|
||||
*/
|
||||
|
||||
@@ -79,7 +79,9 @@ export async function removeCmsArticleComment(id?: number) {
|
||||
/**
|
||||
* 批量删除文章评论表
|
||||
*/
|
||||
export async function removeBatchCmsArticleComment(data: (number | undefined)[]) {
|
||||
export async function removeBatchCmsArticleComment(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-comment/batch',
|
||||
{
|
||||
|
||||
@@ -79,7 +79,9 @@ export async function removeCmsArticleContent(id?: number) {
|
||||
/**
|
||||
* 批量删除文章记录表
|
||||
*/
|
||||
export async function removeBatchCmsArticleContent(data: (number | undefined)[]) {
|
||||
export async function removeBatchCmsArticleContent(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-content/batch',
|
||||
{
|
||||
|
||||
@@ -135,7 +135,6 @@ export async function resolvable(id: number) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据授权主域名
|
||||
*/
|
||||
@@ -144,7 +143,9 @@ export async function getAuthorizedDomain() {
|
||||
return false;
|
||||
}
|
||||
const res = await request.get<ApiResult<CmsDomain>>(
|
||||
SERVER_API_URL + '/cms/cms-domain/getAuthorizedDomain/' + localStorage.getItem('WebsiteId')
|
||||
SERVER_API_URL +
|
||||
'/cms/cms-domain/getAuthorizedDomain/' +
|
||||
localStorage.getItem('WebsiteId')
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -120,7 +120,6 @@ export async function getCmsNavigation(id: number) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据code查询导航
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import {CmsWebsiteSetting} from "@/api/cms/cmsWebsiteSetting/model";
|
||||
import {CmsNavigation} from "@/api/cms/cmsNavigation/model";
|
||||
import { CmsWebsiteSetting } from '@/api/cms/cmsWebsiteSetting/model';
|
||||
import { CmsNavigation } from '@/api/cms/cmsNavigation/model';
|
||||
|
||||
/**
|
||||
* 网站信息记录表
|
||||
@@ -43,7 +43,7 @@ export interface CmsWebsite {
|
||||
// 应用类型 0应用 1插件
|
||||
plugin?: boolean;
|
||||
// 默认编辑器
|
||||
editor?: number,
|
||||
editor?: number;
|
||||
// 服务到期时间
|
||||
expirationTime?: string;
|
||||
// 模版ID
|
||||
|
||||
@@ -79,7 +79,9 @@ export async function removeCmsWebsiteSetting(id?: number) {
|
||||
/**
|
||||
* 批量删除网站设置
|
||||
*/
|
||||
export async function removeBatchCmsWebsiteSetting(data: (number | undefined)[]) {
|
||||
export async function removeBatchCmsWebsiteSetting(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-setting/batch',
|
||||
{
|
||||
|
||||
@@ -5,7 +5,9 @@ import type { CreditBreachOfTrust, CreditBreachOfTrustParam } from './model';
|
||||
/**
|
||||
* 分页查询失信被执行人
|
||||
*/
|
||||
export async function pageCreditBreachOfTrust(params: CreditBreachOfTrustParam) {
|
||||
export async function pageCreditBreachOfTrust(
|
||||
params: CreditBreachOfTrustParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditBreachOfTrust>>>(
|
||||
'/credit/credit-breach-of-trust/page',
|
||||
{
|
||||
@@ -21,7 +23,9 @@ export async function pageCreditBreachOfTrust(params: CreditBreachOfTrustParam)
|
||||
/**
|
||||
* 查询失信被执行人列表
|
||||
*/
|
||||
export async function listCreditBreachOfTrust(params?: CreditBreachOfTrustParam) {
|
||||
export async function listCreditBreachOfTrust(
|
||||
params?: CreditBreachOfTrustParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditBreachOfTrust[]>>(
|
||||
'/credit/credit-breach-of-trust',
|
||||
{
|
||||
@@ -78,7 +82,9 @@ export async function removeCreditBreachOfTrust(id?: number) {
|
||||
/**
|
||||
* 批量删除失信被执行人
|
||||
*/
|
||||
export async function removeBatchCreditBreachOfTrust(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditBreachOfTrust(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust/batch',
|
||||
{
|
||||
@@ -107,7 +113,10 @@ export async function getCreditBreachOfTrust(id: number) {
|
||||
/**
|
||||
* 导入失信被执行人
|
||||
*/
|
||||
export async function importCreditBreachOfTrust(file: File, companyId?: number) {
|
||||
export async function importCreditBreachOfTrust(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeCreditCaseFiling(id?: number) {
|
||||
/**
|
||||
* 批量删除司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditCaseFiling(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditCaseFiling(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/batch',
|
||||
{
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeCreditCompetitor(id?: number) {
|
||||
/**
|
||||
* 批量删除竞争对手
|
||||
*/
|
||||
export async function removeBatchCreditCompetitor(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditCompetitor(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-competitor/batch',
|
||||
{
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCourtAnnouncement, CreditCourtAnnouncementParam } from './model';
|
||||
import type {
|
||||
CreditCourtAnnouncement,
|
||||
CreditCourtAnnouncementParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询法院公告司法大数据
|
||||
*/
|
||||
export async function pageCreditCourtAnnouncement(params: CreditCourtAnnouncementParam) {
|
||||
export async function pageCreditCourtAnnouncement(
|
||||
params: CreditCourtAnnouncementParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCourtAnnouncement>>>(
|
||||
'/credit/credit-court-announcement/page',
|
||||
{
|
||||
@@ -21,7 +26,9 @@ export async function pageCreditCourtAnnouncement(params: CreditCourtAnnouncemen
|
||||
/**
|
||||
* 查询法院公告司法大数据列表
|
||||
*/
|
||||
export async function listCreditCourtAnnouncement(params?: CreditCourtAnnouncementParam) {
|
||||
export async function listCreditCourtAnnouncement(
|
||||
params?: CreditCourtAnnouncementParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditCourtAnnouncement[]>>(
|
||||
'/credit/credit-court-announcement',
|
||||
{
|
||||
@@ -37,7 +44,9 @@ export async function listCreditCourtAnnouncement(params?: CreditCourtAnnounceme
|
||||
/**
|
||||
* 添加法院公告司法大数据
|
||||
*/
|
||||
export async function addCreditCourtAnnouncement(data: CreditCourtAnnouncement) {
|
||||
export async function addCreditCourtAnnouncement(
|
||||
data: CreditCourtAnnouncement
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-court-announcement',
|
||||
data
|
||||
@@ -51,7 +60,9 @@ export async function addCreditCourtAnnouncement(data: CreditCourtAnnouncement)
|
||||
/**
|
||||
* 修改法院公告司法大数据
|
||||
*/
|
||||
export async function updateCreditCourtAnnouncement(data: CreditCourtAnnouncement) {
|
||||
export async function updateCreditCourtAnnouncement(
|
||||
data: CreditCourtAnnouncement
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-court-announcement',
|
||||
data
|
||||
@@ -78,7 +89,9 @@ export async function removeCreditCourtAnnouncement(id?: number) {
|
||||
/**
|
||||
* 批量删除法院公告司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditCourtAnnouncement(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditCourtAnnouncement(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-court-announcement/batch',
|
||||
{
|
||||
@@ -107,7 +120,10 @@ export async function getCreditCourtAnnouncement(id: number) {
|
||||
/**
|
||||
* 导入法院公告司法大数据
|
||||
*/
|
||||
export async function importCreditCourtAnnouncement(file: File, companyId?: number) {
|
||||
export async function importCreditCourtAnnouncement(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeCreditCourtSession(id?: number) {
|
||||
/**
|
||||
* 批量删除开庭公告司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditCourtSession(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditCourtSession(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-court-session/batch',
|
||||
{
|
||||
|
||||
@@ -5,7 +5,9 @@ import type { CreditDeliveryNotice, CreditDeliveryNoticeParam } from './model';
|
||||
/**
|
||||
* 分页查询送达公告司法大数据
|
||||
*/
|
||||
export async function pageCreditDeliveryNotice(params: CreditDeliveryNoticeParam) {
|
||||
export async function pageCreditDeliveryNotice(
|
||||
params: CreditDeliveryNoticeParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditDeliveryNotice>>>(
|
||||
'/credit/credit-delivery-notice/page',
|
||||
{
|
||||
@@ -21,7 +23,9 @@ export async function pageCreditDeliveryNotice(params: CreditDeliveryNoticeParam
|
||||
/**
|
||||
* 查询送达公告司法大数据列表
|
||||
*/
|
||||
export async function listCreditDeliveryNotice(params?: CreditDeliveryNoticeParam) {
|
||||
export async function listCreditDeliveryNotice(
|
||||
params?: CreditDeliveryNoticeParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditDeliveryNotice[]>>(
|
||||
'/credit/credit-delivery-notice',
|
||||
{
|
||||
@@ -78,7 +82,9 @@ export async function removeCreditDeliveryNotice(id?: number) {
|
||||
/**
|
||||
* 批量删除送达公告司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditDeliveryNotice(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditDeliveryNotice(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-delivery-notice/batch',
|
||||
{
|
||||
@@ -107,7 +113,10 @@ export async function getCreditDeliveryNotice(id: number) {
|
||||
/**
|
||||
* 导入送达公告司法大数据
|
||||
*/
|
||||
export async function importCreditDeliveryNotice(file: File, companyId?: number) {
|
||||
export async function importCreditDeliveryNotice(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeCreditFinalVersion(id?: number) {
|
||||
/**
|
||||
* 批量删除终本案件
|
||||
*/
|
||||
export async function removeBatchCreditFinalVersion(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditFinalVersion(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-final-version/batch',
|
||||
{
|
||||
|
||||
@@ -5,7 +5,9 @@ import type { CreditJudgmentDebtor, CreditJudgmentDebtorParam } from './model';
|
||||
/**
|
||||
* 分页查询被执行人
|
||||
*/
|
||||
export async function pageCreditJudgmentDebtor(params: CreditJudgmentDebtorParam) {
|
||||
export async function pageCreditJudgmentDebtor(
|
||||
params: CreditJudgmentDebtorParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditJudgmentDebtor>>>(
|
||||
'/credit/credit-judgment-debtor/page',
|
||||
{
|
||||
@@ -21,7 +23,9 @@ export async function pageCreditJudgmentDebtor(params: CreditJudgmentDebtorParam
|
||||
/**
|
||||
* 查询被执行人列表
|
||||
*/
|
||||
export async function listCreditJudgmentDebtor(params?: CreditJudgmentDebtorParam) {
|
||||
export async function listCreditJudgmentDebtor(
|
||||
params?: CreditJudgmentDebtorParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditJudgmentDebtor[]>>(
|
||||
'/credit/credit-judgment-debtor',
|
||||
{
|
||||
@@ -78,7 +82,9 @@ export async function removeCreditJudgmentDebtor(id?: number) {
|
||||
/**
|
||||
* 批量删除被执行人
|
||||
*/
|
||||
export async function removeBatchCreditJudgmentDebtor(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditJudgmentDebtor(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor/batch',
|
||||
{
|
||||
@@ -107,7 +113,10 @@ export async function getCreditJudgmentDebtor(id: number) {
|
||||
/**
|
||||
* 导入被执行人
|
||||
*/
|
||||
export async function importCreditJudgmentDebtor(file: File, companyId?: number) {
|
||||
export async function importCreditJudgmentDebtor(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditJudicialDocument, CreditJudicialDocumentParam } from './model';
|
||||
import type {
|
||||
CreditJudicialDocument,
|
||||
CreditJudicialDocumentParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询裁判文书司法大数据
|
||||
*/
|
||||
export async function pageCreditJudicialDocument(params: CreditJudicialDocumentParam) {
|
||||
export async function pageCreditJudicialDocument(
|
||||
params: CreditJudicialDocumentParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditJudicialDocument>>>(
|
||||
'/credit/credit-judicial-document/page',
|
||||
{
|
||||
@@ -21,7 +26,9 @@ export async function pageCreditJudicialDocument(params: CreditJudicialDocumentP
|
||||
/**
|
||||
* 查询裁判文书司法大数据列表
|
||||
*/
|
||||
export async function listCreditJudicialDocument(params?: CreditJudicialDocumentParam) {
|
||||
export async function listCreditJudicialDocument(
|
||||
params?: CreditJudicialDocumentParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditJudicialDocument[]>>(
|
||||
'/credit/credit-judicial-document',
|
||||
{
|
||||
@@ -51,7 +58,9 @@ export async function addCreditJudicialDocument(data: CreditJudicialDocument) {
|
||||
/**
|
||||
* 修改裁判文书司法大数据
|
||||
*/
|
||||
export async function updateCreditJudicialDocument(data: CreditJudicialDocument) {
|
||||
export async function updateCreditJudicialDocument(
|
||||
data: CreditJudicialDocument
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-judicial-document',
|
||||
data
|
||||
@@ -78,7 +87,9 @@ export async function removeCreditJudicialDocument(id?: number) {
|
||||
/**
|
||||
* 批量删除裁判文书司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditJudicialDocument(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditJudicialDocument(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judicial-document/batch',
|
||||
{
|
||||
@@ -107,7 +118,10 @@ export async function getCreditJudicialDocument(id: number) {
|
||||
/**
|
||||
* 导入裁判文书司法大数据
|
||||
*/
|
||||
export async function importCreditJudicialDocument(file: File, companyId?: number) {
|
||||
export async function importCreditJudicialDocument(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeCreditRiskRelation(id?: number) {
|
||||
/**
|
||||
* 批量删除风险关系表
|
||||
*/
|
||||
export async function removeBatchCreditRiskRelation(data: (number | undefined)[]) {
|
||||
export async function removeBatchCreditRiskRelation(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-risk-relation/batch',
|
||||
{
|
||||
|
||||
@@ -79,7 +79,9 @@ export async function removeDormitoryBuilding(id?: number) {
|
||||
/**
|
||||
* 批量删除宿舍楼栋
|
||||
*/
|
||||
export async function removeBatchDormitoryBuilding(data: (number | undefined)[]) {
|
||||
export async function removeBatchDormitoryBuilding(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/dormitory/dormitory-building/batch',
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import {HjmFence} from "@/api/hjm/hjmFence/model";
|
||||
import { HjmFence } from '@/api/hjm/hjmFence/model';
|
||||
|
||||
/**
|
||||
* 车辆管理
|
||||
@@ -50,13 +50,13 @@ export interface HjmCar {
|
||||
// 位置
|
||||
location?: string;
|
||||
// 经度
|
||||
longitude?: string,
|
||||
longitude?: string;
|
||||
// 纬度
|
||||
latitude?: string,
|
||||
latitude?: string;
|
||||
// 区域
|
||||
district?: string;
|
||||
// 地址
|
||||
address?: string,
|
||||
address?: string;
|
||||
// 组织ID
|
||||
organizationId?: number;
|
||||
// 父级组织ID
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import {HjmChoices} from "@/api/hjm/hjmChoices/model";
|
||||
import { HjmChoices } from '@/api/hjm/hjmChoices/model';
|
||||
|
||||
/**
|
||||
* 题目
|
||||
@@ -36,10 +36,10 @@ export interface HjmQuestions {
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
// 选项
|
||||
choicesA?: string,
|
||||
choicesB?: string,
|
||||
choicesC?: string,
|
||||
choicesD?: string,
|
||||
choicesA?: string;
|
||||
choicesB?: string;
|
||||
choicesC?: string;
|
||||
choicesD?: string;
|
||||
choices?: number;
|
||||
choicesList?: HjmChoices[];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { UpdatePasswordParam, NoticeResult } from './model';
|
||||
import { SERVER_API_URL } from '@/config/setting';
|
||||
import { Company } from '@/api/system/company/model';
|
||||
import { CmsWebsite } from '@/api/cms/cmsWebsite/model';
|
||||
import {Menu} from "@/api/system/menu/model";
|
||||
import { Menu } from '@/api/system/menu/model';
|
||||
|
||||
/**
|
||||
* 获取当前登录的用户信息、菜单、权限、角色
|
||||
@@ -24,12 +24,9 @@ export async function getTenantInfo(): Promise<Company> {
|
||||
* 获取网站信息 https://cms-api.websoft.top/api
|
||||
*/
|
||||
export async function getSiteInfo() {
|
||||
const res = await request.get<ApiResult<CmsWebsite>>(
|
||||
'/shop/getShopInfo',
|
||||
{
|
||||
const res = await request.get<ApiResult<CmsWebsite>>('/shop/getShopInfo', {
|
||||
params: {}
|
||||
}
|
||||
);
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -66,9 +63,7 @@ export async function updateLoginUser(data: User) {
|
||||
* @return
|
||||
*/
|
||||
export async function getServerTime() {
|
||||
const res = await request.get<ApiResult<any>>(
|
||||
'/cms/website/getServerTime'
|
||||
);
|
||||
const res = await request.get<ApiResult<any>>('/cms/website/getServerTime');
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -80,9 +75,7 @@ export async function getServerTime() {
|
||||
* @return
|
||||
*/
|
||||
export async function getNext7day() {
|
||||
const res = await request.get<ApiResult<any>>(
|
||||
'/cms/website/getNext7day'
|
||||
);
|
||||
const res = await request.get<ApiResult<any>>('/cms/website/getNext7day');
|
||||
console.log('res.data.code: ', res.data.code);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -120,7 +113,8 @@ export async function updatePassword(
|
||||
*/
|
||||
export async function createCmsWebSite(data: CmsWebsite) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
SERVER_API_URL + '/superAdminRegister',data
|
||||
SERVER_API_URL + '/superAdminRegister',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
|
||||
@@ -50,7 +50,9 @@ export async function generateQrCode(): Promise<QrCodeResponse> {
|
||||
/**
|
||||
* 检查二维码状态
|
||||
*/
|
||||
export async function checkQrCodeStatus(token: string): Promise<QrCodeStatusResponse> {
|
||||
export async function checkQrCodeStatus(
|
||||
token: string
|
||||
): Promise<QrCodeStatusResponse> {
|
||||
const res = await request.get<ApiResult<QrCodeStatusResponse>>(
|
||||
SERVER_API_URL + `/qr-login/status/${token}`
|
||||
);
|
||||
@@ -65,12 +67,14 @@ export async function checkQrCodeStatus(token: string): Promise<QrCodeStatusResp
|
||||
/**
|
||||
* 扫码确认登录(移动端调用)
|
||||
*/
|
||||
export async function confirmQrLogin(requestData: QrLoginConfirmRequest): Promise<QrCodeStatusResponse> {
|
||||
export async function confirmQrLogin(
|
||||
requestData: QrLoginConfirmRequest
|
||||
): Promise<QrCodeStatusResponse> {
|
||||
const res = await request.post<ApiResult<QrCodeStatusResponse>>(
|
||||
SERVER_API_URL + '/qr-login/confirm',
|
||||
requestData
|
||||
);
|
||||
console.log(res,'>>>89898989')
|
||||
console.log(res, '>>>89898989');
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -96,7 +100,9 @@ export async function scanQrCode(token: string): Promise<boolean> {
|
||||
/**
|
||||
* 微信小程序扫码登录确认
|
||||
*/
|
||||
export async function wechatMiniProgramConfirm(requestData: QrLoginConfirmRequest): Promise<QrCodeStatusResponse> {
|
||||
export async function wechatMiniProgramConfirm(
|
||||
requestData: QrLoginConfirmRequest
|
||||
): Promise<QrCodeStatusResponse> {
|
||||
const res = await request.post<ApiResult<QrCodeStatusResponse>>(
|
||||
SERVER_API_URL + '/qr-login/wechat-confirm',
|
||||
requestData
|
||||
@@ -106,5 +112,7 @@ export async function wechatMiniProgramConfirm(requestData: QrLoginConfirmReques
|
||||
return res.data.data;
|
||||
}
|
||||
|
||||
return Promise.reject(new Error(res.data.message || '微信小程序登录确认失败'));
|
||||
return Promise.reject(
|
||||
new Error(res.data.message || '微信小程序登录确认失败')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import type {ShopDealerOrder, ShopDealerOrderParam} from './model';
|
||||
import { utils, writeFile } from 'xlsx';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { getTenantId } from '@/utils/domain';
|
||||
import {listShopDealerOrder} from "@/api/shop/shopDealerOrder";
|
||||
import {MODULES_API_URL} from "@/config/setting";
|
||||
import { listShopDealerOrder } from '@/api/shop/shopDealerOrder';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 导入分销商订单
|
||||
@@ -113,7 +113,6 @@ export async function exportSdyDealerOrder(params?: ShopDealerOrderParam) {
|
||||
message.destroy();
|
||||
message.success(`成功导出 ${list.length} 条记录`);
|
||||
}, 1000);
|
||||
|
||||
} catch (error: any) {
|
||||
message.destroy();
|
||||
message.error(error.message || '导出失败,请重试');
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeShopCommissionRole(id?: number) {
|
||||
/**
|
||||
* 批量删除分红角色
|
||||
*/
|
||||
export async function removeBatchShopCommissionRole(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopCommissionRole(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-commission-role/batch',
|
||||
{
|
||||
|
||||
@@ -22,12 +22,9 @@ export async function pageShopCoupon(params: ShopCouponParam) {
|
||||
* 查询优惠券列表
|
||||
*/
|
||||
export async function listShopCoupon(params?: ShopCouponParam) {
|
||||
const res = await request.get<ApiResult<ShopCoupon[]>>(
|
||||
'/shop/shop-coupon',
|
||||
{
|
||||
const res = await request.get<ApiResult<ShopCoupon[]>>('/shop/shop-coupon', {
|
||||
params
|
||||
}
|
||||
);
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -38,10 +35,7 @@ export async function listShopCoupon(params?: ShopCouponParam) {
|
||||
* 添加优惠券
|
||||
*/
|
||||
export async function addShopCoupon(data: ShopCoupon) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/shop/shop-coupon',
|
||||
data
|
||||
);
|
||||
const res = await request.post<ApiResult<unknown>>('/shop/shop-coupon', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
@@ -52,10 +46,7 @@ export async function addShopCoupon(data: ShopCoupon) {
|
||||
* 修改优惠券
|
||||
*/
|
||||
export async function updateShopCoupon(data: ShopCoupon) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-coupon',
|
||||
data
|
||||
);
|
||||
const res = await request.put<ApiResult<unknown>>('/shop/shop-coupon', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import {ShopCouponApplyCate} from "@/api/shop/shopCouponApplyCate/model";
|
||||
import {ShopCouponApplyItem} from "@/api/shop/shopCouponApplyItem/model";
|
||||
import { ShopCouponApplyCate } from '@/api/shop/shopCouponApplyCate/model';
|
||||
import { ShopCouponApplyItem } from '@/api/shop/shopCouponApplyItem/model';
|
||||
|
||||
/**
|
||||
* 优惠券
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* 优惠券
|
||||
*/
|
||||
@@ -7,5 +6,4 @@ export interface ShopCouponApplyCate {
|
||||
couponId?: number;
|
||||
cateId?: number;
|
||||
cateLevel?: number;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* 优惠券
|
||||
*/
|
||||
@@ -7,5 +6,4 @@ export interface ShopCouponApplyItem {
|
||||
couponId?: number;
|
||||
type?: number;
|
||||
pk?: number;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,7 +116,10 @@ export async function approveShopDealerApply(id: number) {
|
||||
/**
|
||||
* 驳回分销商申请
|
||||
*/
|
||||
export async function rejectShopDealerApply(id: number, data: { rejectReason: string }) {
|
||||
export async function rejectShopDealerApply(
|
||||
id: number,
|
||||
data: { rejectReason: string }
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
`/shop/shop-dealer-apply/${id}/reject`,
|
||||
data
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeShopDealerCapital(id?: number) {
|
||||
/**
|
||||
* 批量删除分销商资金明细表
|
||||
*/
|
||||
export async function removeBatchShopDealerCapital(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopDealerCapital(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-dealer-capital/batch',
|
||||
{
|
||||
|
||||
@@ -213,7 +213,6 @@ export async function exportShopDealerOrder(params?: ShopDealerOrderParam) {
|
||||
message.destroy();
|
||||
message.success(`成功导出 ${list.length} 条记录`);
|
||||
}, 1000);
|
||||
|
||||
} catch (error: any) {
|
||||
message.destroy();
|
||||
message.error(error.message || '导出失败,请重试');
|
||||
|
||||
@@ -104,7 +104,10 @@ export async function removeBatchShopDealerPoster(ids: (number | undefined)[]) {
|
||||
* 生成海报
|
||||
*/
|
||||
export async function generatePoster(userId: number, config?: any) {
|
||||
const res = await request.post('/shop/dealer/poster/generate', { userId, config });
|
||||
const res = await request.post('/shop/dealer/poster/generate', {
|
||||
userId,
|
||||
config
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -118,11 +121,15 @@ export async function uploadPosterBackground(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
const res = await request.post('/shop/dealer/poster/upload/background', formData, {
|
||||
const res = await request.post(
|
||||
'/shop/dealer/poster/upload/background',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -79,7 +79,9 @@ export async function removeShopDealerRecord(id?: number) {
|
||||
/**
|
||||
* 批量删除客户跟进情况
|
||||
*/
|
||||
export async function removeBatchShopDealerRecord(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopDealerRecord(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-record/batch',
|
||||
{
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeShopDealerReferee(id?: number) {
|
||||
/**
|
||||
* 批量删除分销商推荐关系表
|
||||
*/
|
||||
export async function removeBatchShopDealerReferee(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopDealerReferee(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-dealer-referee/batch',
|
||||
{
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeShopDealerSetting(id?: number) {
|
||||
/**
|
||||
* 批量删除分销商设置表
|
||||
*/
|
||||
export async function removeBatchShopDealerSetting(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopDealerSetting(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-dealer-setting/batch',
|
||||
{
|
||||
|
||||
@@ -129,12 +129,9 @@ export async function importShopDealerUsers(file: File) {
|
||||
* 导出分销商用户
|
||||
*/
|
||||
export async function exportShopDealerUsers(params?: ShopDealerUserParam) {
|
||||
const res = await request.get<Blob>(
|
||||
'/shop/shop-dealer-user/export',
|
||||
{
|
||||
const res = await request.get<Blob>('/shop/shop-dealer-user/export', {
|
||||
params,
|
||||
responseType: 'blob'
|
||||
}
|
||||
);
|
||||
});
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,9 @@ export async function removeShopDealerWithdraw(id?: number) {
|
||||
/**
|
||||
* 批量删除分销商提现明细表
|
||||
*/
|
||||
export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopDealerWithdraw(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-dealer-withdraw/batch',
|
||||
{
|
||||
|
||||
@@ -52,10 +52,7 @@ export async function addShopExpress(data: ShopExpress) {
|
||||
* 修改物流公司
|
||||
*/
|
||||
export async function updateShopExpress(data: ShopExpress) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-express',
|
||||
data
|
||||
);
|
||||
const res = await request.put<ApiResult<unknown>>('/shop/shop-express', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ import type { ShopExpressTemplate, ShopExpressTemplateParam } from './model';
|
||||
/**
|
||||
* 分页查询运费模板
|
||||
*/
|
||||
export async function pageShopExpressTemplate(params: ShopExpressTemplateParam) {
|
||||
export async function pageShopExpressTemplate(
|
||||
params: ShopExpressTemplateParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopExpressTemplate>>>(
|
||||
'/shop/shop-express-template/page',
|
||||
{
|
||||
@@ -21,7 +23,9 @@ export async function pageShopExpressTemplate(params: ShopExpressTemplateParam)
|
||||
/**
|
||||
* 查询运费模板列表
|
||||
*/
|
||||
export async function listShopExpressTemplate(params?: ShopExpressTemplateParam) {
|
||||
export async function listShopExpressTemplate(
|
||||
params?: ShopExpressTemplateParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ShopExpressTemplate[]>>(
|
||||
'/shop/shop-express-template',
|
||||
{
|
||||
@@ -78,7 +82,9 @@ export async function removeShopExpressTemplate(id?: number) {
|
||||
/**
|
||||
* 批量删除运费模板
|
||||
*/
|
||||
export async function removeBatchShopExpressTemplate(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopExpressTemplate(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-express-template/batch',
|
||||
{
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopExpressTemplateDetail, ShopExpressTemplateDetailParam } from './model';
|
||||
import type {
|
||||
ShopExpressTemplateDetail,
|
||||
ShopExpressTemplateDetailParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询运费模板
|
||||
*/
|
||||
export async function pageShopExpressTemplateDetail(params: ShopExpressTemplateDetailParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopExpressTemplateDetail>>>(
|
||||
'/shop/shop-express-template-detail/page',
|
||||
{
|
||||
export async function pageShopExpressTemplateDetail(
|
||||
params: ShopExpressTemplateDetailParam
|
||||
) {
|
||||
const res = await request.get<
|
||||
ApiResult<PageResult<ShopExpressTemplateDetail>>
|
||||
>('/shop/shop-express-template-detail/page', {
|
||||
params
|
||||
}
|
||||
);
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -21,7 +25,9 @@ export async function pageShopExpressTemplateDetail(params: ShopExpressTemplateD
|
||||
/**
|
||||
* 查询运费模板列表
|
||||
*/
|
||||
export async function listShopExpressTemplateDetail(params?: ShopExpressTemplateDetailParam) {
|
||||
export async function listShopExpressTemplateDetail(
|
||||
params?: ShopExpressTemplateDetailParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ShopExpressTemplateDetail[]>>(
|
||||
'/shop/shop-express-template-detail',
|
||||
{
|
||||
@@ -37,7 +43,9 @@ export async function listShopExpressTemplateDetail(params?: ShopExpressTemplate
|
||||
/**
|
||||
* 添加运费模板
|
||||
*/
|
||||
export async function addShopExpressTemplateDetail(data: ShopExpressTemplateDetail) {
|
||||
export async function addShopExpressTemplateDetail(
|
||||
data: ShopExpressTemplateDetail
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/shop/shop-express-template-detail',
|
||||
data
|
||||
@@ -51,7 +59,9 @@ export async function addShopExpressTemplateDetail(data: ShopExpressTemplateDeta
|
||||
/**
|
||||
* 修改运费模板
|
||||
*/
|
||||
export async function updateShopExpressTemplateDetail(data: ShopExpressTemplateDetail) {
|
||||
export async function updateShopExpressTemplateDetail(
|
||||
data: ShopExpressTemplateDetail
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-express-template-detail',
|
||||
data
|
||||
@@ -78,7 +88,9 @@ export async function removeShopExpressTemplateDetail(id?: number) {
|
||||
/**
|
||||
* 批量删除运费模板
|
||||
*/
|
||||
export async function removeBatchShopExpressTemplateDetail(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopExpressTemplateDetail(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-express-template-detail/batch',
|
||||
{
|
||||
|
||||
@@ -79,7 +79,9 @@ export async function removeShopGoodsCategory(id?: number) {
|
||||
/**
|
||||
* 批量删除商品分类
|
||||
*/
|
||||
export async function removeBatchShopGoodsCategory(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopGoodsCategory(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-goods-category/batch',
|
||||
{
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
import { ShopGoodsRoleCommission, ShopGoodsRoleCommissionParam } from '@/api/shop/shopGoodsRoleCommission/model';
|
||||
import {
|
||||
ShopGoodsRoleCommission,
|
||||
ShopGoodsRoleCommissionParam
|
||||
} from '@/api/shop/shopGoodsRoleCommission/model';
|
||||
|
||||
/**
|
||||
* 分页查询商品绑定角色的分润金额
|
||||
*/
|
||||
export async function pageShopGoodsRoleCommission(params: ShopGoodsRoleCommissionParam) {
|
||||
export async function pageShopGoodsRoleCommission(
|
||||
params: ShopGoodsRoleCommissionParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopGoodsRoleCommission>>>(
|
||||
MODULES_API_URL + '/shop/shop-goods-role-commission/page',
|
||||
{
|
||||
@@ -22,7 +27,9 @@ export async function pageShopGoodsRoleCommission(params: ShopGoodsRoleCommissio
|
||||
/**
|
||||
* 查询商品绑定角色的分润金额列表
|
||||
*/
|
||||
export async function listShopGoodsRoleCommission(params?: ShopGoodsRoleCommissionParam) {
|
||||
export async function listShopGoodsRoleCommission(
|
||||
params?: ShopGoodsRoleCommissionParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ShopGoodsRoleCommission[]>>(
|
||||
MODULES_API_URL + '/shop/shop-goods-role-commission',
|
||||
{
|
||||
@@ -38,7 +45,9 @@ export async function listShopGoodsRoleCommission(params?: ShopGoodsRoleCommissi
|
||||
/**
|
||||
* 添加商品绑定角色的分润金额
|
||||
*/
|
||||
export async function addShopGoodsRoleCommission(data: ShopGoodsRoleCommission) {
|
||||
export async function addShopGoodsRoleCommission(
|
||||
data: ShopGoodsRoleCommission
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-goods-role-commission',
|
||||
data
|
||||
@@ -52,7 +61,9 @@ export async function addShopGoodsRoleCommission(data: ShopGoodsRoleCommission)
|
||||
/**
|
||||
* 修改商品绑定角色的分润金额
|
||||
*/
|
||||
export async function updateShopGoodsRoleCommission(data: ShopGoodsRoleCommission) {
|
||||
export async function updateShopGoodsRoleCommission(
|
||||
data: ShopGoodsRoleCommission
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-goods-role-commission',
|
||||
data
|
||||
@@ -79,7 +90,9 @@ export async function removeShopGoodsRoleCommission(id?: number) {
|
||||
/**
|
||||
* 批量删除商品绑定角色的分润金额
|
||||
*/
|
||||
export async function removeBatchShopGoodsRoleCommission(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopGoodsRoleCommission(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-goods-role-commission/batch',
|
||||
{
|
||||
|
||||
@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
|
||||
/**
|
||||
* 分页查询商户账号
|
||||
*/
|
||||
export async function pageShopMerchantAccount(params: ShopMerchantAccountParam) {
|
||||
export async function pageShopMerchantAccount(
|
||||
params: ShopMerchantAccountParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopMerchantAccount>>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-account/page',
|
||||
{
|
||||
@@ -22,7 +24,9 @@ export async function pageShopMerchantAccount(params: ShopMerchantAccountParam)
|
||||
/**
|
||||
* 查询商户账号列表
|
||||
*/
|
||||
export async function listShopMerchantAccount(params?: ShopMerchantAccountParam) {
|
||||
export async function listShopMerchantAccount(
|
||||
params?: ShopMerchantAccountParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ShopMerchantAccount[]>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-account',
|
||||
{
|
||||
@@ -79,7 +83,9 @@ export async function removeShopMerchantAccount(id?: number) {
|
||||
/**
|
||||
* 批量删除商户账号
|
||||
*/
|
||||
export async function removeBatchShopMerchantAccount(data: (number | undefined)[]) {
|
||||
export async function removeBatchShopMerchantAccount(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-account/batch',
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import {OrderGoods} from "@/api/system/orderGoods/model";
|
||||
import { OrderGoods } from '@/api/system/orderGoods/model';
|
||||
|
||||
/**
|
||||
* 订单
|
||||
@@ -136,9 +136,9 @@ export interface ShopOrder {
|
||||
// 系统版本号 0当前版本 value=其他版本
|
||||
version?: number;
|
||||
// 买家备注
|
||||
buyerRemarks: undefined,
|
||||
buyerRemarks: undefined;
|
||||
// 商家备注
|
||||
merchantRemarks: undefined,
|
||||
merchantRemarks: undefined;
|
||||
// 用户id
|
||||
userId?: number;
|
||||
// 备注
|
||||
|
||||
@@ -79,7 +79,9 @@ export async function removeChatConversation(id?: number) {
|
||||
/**
|
||||
* 批量删除聊天消息表
|
||||
*/
|
||||
export async function removeBatchChatConversation(data: (number | undefined)[]) {
|
||||
export async function removeBatchChatConversation(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/chat-conversation/batch',
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import type {Menu} from "@/api/system/menu/model";
|
||||
import type { Menu } from '@/api/system/menu/model';
|
||||
|
||||
/**
|
||||
* 企业信息
|
||||
|
||||
@@ -49,7 +49,6 @@ export async function getByCompanyId(id: number) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加应用详情
|
||||
*/
|
||||
|
||||
@@ -79,7 +79,9 @@ export async function removeCompanyParameter(id?: number) {
|
||||
/**
|
||||
* 批量删除应用参数
|
||||
*/
|
||||
export async function removeBatchCompanyParameter(data: (number | undefined)[]) {
|
||||
export async function removeBatchCompanyParameter(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
SERVER_API_URL + '/system/company-parameter/batch',
|
||||
{
|
||||
|
||||
@@ -89,7 +89,6 @@ export async function deleteParentMenu(id?: number) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 安装应用
|
||||
*/
|
||||
|
||||
@@ -287,12 +287,9 @@ export async function listAdminsByPhoneAll(params?: UserParam){
|
||||
* 导出用户列表
|
||||
*/
|
||||
export async function exportUsers(params?: UserParam) {
|
||||
const res = await request.get<Blob>(
|
||||
SERVER_API_URL + '/system/user/export',
|
||||
{
|
||||
const res = await request.get<Blob>(SERVER_API_URL + '/system/user/export', {
|
||||
params,
|
||||
responseType: 'blob'
|
||||
}
|
||||
);
|
||||
});
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
// 字典数据
|
||||
const data = getDictionaryOptions(props.dictCode);
|
||||
const content = ref<any>()
|
||||
const content = ref<any>();
|
||||
|
||||
/* 更新选中数据 */
|
||||
const updateValue = () => {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import {listDictData} from "@/api/system/dict-data";
|
||||
import { listDictData } from '@/api/system/dict-data';
|
||||
|
||||
const data = ref<any[]>([]);
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
);
|
||||
|
||||
// 字典数据
|
||||
listDictData({dictCode: props.dictCode}).then(res => {
|
||||
data.value = res.map(d => {
|
||||
listDictData({ dictCode: props.dictCode }).then((res) => {
|
||||
data.value = res.map((d) => {
|
||||
return {
|
||||
dictDataId: d.dictDataId,
|
||||
dictDataCode: d.dictDataCode,
|
||||
@@ -61,7 +61,10 @@
|
||||
const updateValue = (value: string) => {
|
||||
emit('update:value', value);
|
||||
emit('index', Number(props.index));
|
||||
emit('done', data.value.find(d => d.value === value))
|
||||
emit(
|
||||
'done',
|
||||
data.value.find((d) => d.value === value)
|
||||
);
|
||||
};
|
||||
|
||||
/* 失去焦点 */
|
||||
|
||||
@@ -10,16 +10,14 @@
|
||||
<div class="flex p-3 flex-col justify-center items-center">
|
||||
<ele-qr-code-svg :value="`${data}`" :size="260" />
|
||||
<span class="text-gray-400 py-3" @click="copyText(data)">{{ data }}</span>
|
||||
<span class="text-gray-500 text-lg">
|
||||
使用手机扫一扫
|
||||
</span>
|
||||
<span class="text-gray-500 text-lg"> 使用手机扫一扫 </span>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {CmsArticle} from "@/api/cms/cmsArticle/model";
|
||||
import {copyText} from "@/utils/common";
|
||||
import { CmsArticle } from '@/api/cms/cmsArticle/model';
|
||||
import { copyText } from '@/utils/common';
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<!-- 演示控制面板 -->
|
||||
<div class="demo-controls">
|
||||
<h4>演示控制</h4>
|
||||
<a-space direction="vertical" style="width: 100%;">
|
||||
<a-space direction="vertical" style="width: 100%">
|
||||
<a-button @click="simulateScanned" type="primary" ghost>
|
||||
模拟扫码
|
||||
</a-button>
|
||||
@@ -21,9 +21,7 @@
|
||||
<a-button @click="simulateExpired" type="default">
|
||||
模拟过期
|
||||
</a-button>
|
||||
<a-button @click="simulateError" danger>
|
||||
模拟错误
|
||||
</a-button>
|
||||
<a-button @click="simulateError" danger> 模拟错误 </a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
|
||||
@@ -48,7 +46,7 @@
|
||||
</a-card>
|
||||
|
||||
<!-- 日志显示 -->
|
||||
<a-card title="操作日志" :bordered="false" style="margin-top: 16px;">
|
||||
<a-card title="操作日志" :bordered="false" style="margin-top: 16px">
|
||||
<div class="demo-logs">
|
||||
<div
|
||||
v-for="(log, index) in logs"
|
||||
@@ -73,10 +71,13 @@ import QrLogin from './index.vue';
|
||||
const currentQrKey = ref<string>('');
|
||||
const currentStatus = ref<string>('loading');
|
||||
const remainingTime = ref<number>(300);
|
||||
const logs = ref<Array<{time: string, message: string, type: string}>>([]);
|
||||
const logs = ref<Array<{ time: string; message: string; type: string }>>([]);
|
||||
|
||||
// 添加日志
|
||||
const addLog = (message: string, type: 'info' | 'success' | 'error' | 'warning' = 'info') => {
|
||||
const addLog = (
|
||||
message: string,
|
||||
type: 'info' | 'success' | 'error' | 'warning' = 'info'
|
||||
) => {
|
||||
const now = new Date();
|
||||
const time = now.toLocaleTimeString();
|
||||
logs.value.unshift({ time, message, type });
|
||||
|
||||
@@ -7,22 +7,29 @@
|
||||
<p class="loading-text">正在生成二维码...</p>
|
||||
</div>
|
||||
|
||||
<div v-else-if="qrCodeStatus === 'active'" class="qr-active cursor-pointer">
|
||||
<ele-qr-code-svg :value="qrCodeData" :size="200" @click="refreshQrCode" />
|
||||
<div
|
||||
v-else-if="qrCodeStatus === 'active'"
|
||||
class="qr-active cursor-pointer"
|
||||
>
|
||||
<ele-qr-code-svg
|
||||
:value="qrCodeData"
|
||||
:size="200"
|
||||
@click="refreshQrCode"
|
||||
/>
|
||||
<p class="qr-tip">请使用手机APP或小程序扫码登录</p>
|
||||
<p class="qr-expire-tip">二维码有效期:{{ formatTime(expireTime) }}</p>
|
||||
</div>
|
||||
|
||||
<div v-else-if="qrCodeStatus === 'scanned'" class="qr-scanned">
|
||||
<div class="scanned-icon">
|
||||
<CheckCircleOutlined style="font-size: 48px; color: #52c41a;" />
|
||||
<CheckCircleOutlined style="font-size: 48px; color: #52c41a" />
|
||||
</div>
|
||||
<p class="scanned-text">扫码成功,请在手机上确认登录</p>
|
||||
</div>
|
||||
|
||||
<div v-else-if="qrCodeStatus === 'expired'" class="qr-expired">
|
||||
<div class="expired-icon">
|
||||
<ClockCircleOutlined style="font-size: 48px; color: #ff4d4f;" />
|
||||
<ClockCircleOutlined style="font-size: 48px; color: #ff4d4f" />
|
||||
</div>
|
||||
<p class="expired-text">二维码已过期</p>
|
||||
<a-button type="primary" @click="refreshQrCode">刷新二维码</a-button>
|
||||
@@ -30,7 +37,7 @@
|
||||
|
||||
<div v-else-if="qrCodeStatus === 'error'" class="qr-error">
|
||||
<div class="error-icon">
|
||||
<ExclamationCircleOutlined style="font-size: 48px; color: #ff4d4f;" />
|
||||
<ExclamationCircleOutlined style="font-size: 48px; color: #ff4d4f" />
|
||||
</div>
|
||||
<p class="error-text">{{ errorMessage || '生成二维码失败' }}</p>
|
||||
<a-button type="primary" @click="refreshQrCode">重新生成</a-button>
|
||||
@@ -55,7 +62,12 @@ import {
|
||||
ExclamationCircleOutlined,
|
||||
ReloadOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import {generateQrCode, checkQrCodeStatus, type QrCodeResponse, QrCodeStatusResponse} from '@/api/passport/qrLogin';
|
||||
import {
|
||||
generateQrCode,
|
||||
checkQrCodeStatus,
|
||||
type QrCodeResponse,
|
||||
QrCodeStatusResponse
|
||||
} from '@/api/passport/qrLogin';
|
||||
|
||||
// 定义组件事件
|
||||
const emit = defineEmits<{
|
||||
@@ -66,7 +78,9 @@ const emit = defineEmits<{
|
||||
// 响应式数据
|
||||
const qrCodeData = ref<string>('');
|
||||
const qrCodeToken = ref<string>('');
|
||||
const qrCodeStatus = ref<'loading' | 'active' | 'scanned' | 'expired' | 'error'>('loading');
|
||||
const qrCodeStatus = ref<
|
||||
'loading' | 'active' | 'scanned' | 'expired' | 'error'
|
||||
>('loading');
|
||||
const expireTime = ref<number>(0);
|
||||
const errorMessage = ref<string>('');
|
||||
const refreshing = ref<boolean>(false);
|
||||
@@ -105,7 +119,6 @@ const generateQrCodeData = async () => {
|
||||
startStatusCheck();
|
||||
// 开始倒计时
|
||||
startExpireCountdown();
|
||||
|
||||
} catch (error: any) {
|
||||
qrCodeStatus.value = 'error';
|
||||
errorMessage.value = error.message || '生成二维码失败';
|
||||
@@ -132,7 +145,7 @@ const startStatusCheck = () => {
|
||||
case 'confirmed':
|
||||
// 登录成功
|
||||
if (status.tenantId) {
|
||||
localStorage.setItem('TenantId', `${status.tenantId}`)
|
||||
localStorage.setItem('TenantId', `${status.tenantId}`);
|
||||
}
|
||||
qrCodeStatus.value = 'active';
|
||||
stopAllTimers();
|
||||
|
||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<CmsDesign | null>(null);
|
||||
const content = ref<any>(props.value)
|
||||
const content = ref<any>(props.value);
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: CmsDesign) => {
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'name'">
|
||||
<div class="cursor-pointer" @click="onRadio(record)">{{ record.name }}</div>
|
||||
<div class="cursor-pointer" @click="onRadio(record)">{{
|
||||
record.name
|
||||
}}</div>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<template v-if="pageId == record.pageId">
|
||||
@@ -118,7 +120,7 @@
|
||||
};
|
||||
|
||||
const onRadio = (record: CmsDesign) => {
|
||||
pageId.value = Number(record.pageId)
|
||||
pageId.value = Number(record.pageId);
|
||||
updateVisible(false);
|
||||
emit('done', record);
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
);
|
||||
|
||||
const content = ref<any>(props.value)
|
||||
const content = ref<any>(props.value);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done', Dict): void;
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
import { User, UserParam } from '@/api/system/user/model';
|
||||
import { EleProTable } from 'ele-admin-pro';
|
||||
import useSearch from '@/utils/use-search';
|
||||
import {pageHjmFence} from "@/api/hjm/hjmFence";
|
||||
import {HjmFenceParam} from "@/api/hjm/hjmFence/model";
|
||||
import { pageHjmFence } from '@/api/hjm/hjmFence';
|
||||
import { HjmFenceParam } from '@/api/hjm/hjmFence/model';
|
||||
|
||||
const props = defineProps<{
|
||||
// 弹窗是否打开
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
import { BulbOutlined } from '@ant-design/icons-vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import SelectData from './components/select-data.vue';
|
||||
import {HjmFence} from "@/api/hjm/hjmFence/model";
|
||||
import { HjmFence } from '@/api/hjm/hjmFence/model';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -50,7 +50,7 @@ const emit = defineEmits<{
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<HjmFence | null>(null);
|
||||
const content = ref<HjmFence>(props.value)
|
||||
const content = ref<HjmFence>(props.value);
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: HjmFence) => {
|
||||
@@ -64,7 +64,6 @@ const onChange = (row?: HjmFence) => {
|
||||
// 查询租户列表
|
||||
// const appList = ref<App[] | undefined>([]);
|
||||
|
||||
|
||||
watch(
|
||||
() => props.value,
|
||||
(visible) => {
|
||||
|
||||
@@ -64,19 +64,12 @@
|
||||
@search="reload"
|
||||
@pressEnter="reload"
|
||||
/>
|
||||
<a-button
|
||||
type="text"
|
||||
@click="openUrl('/cms/photo/dict')"
|
||||
<a-button type="text" @click="openUrl('/cms/photo/dict')"
|
||||
>管理分组</a-button
|
||||
>
|
||||
<a-alert
|
||||
message="双击行也可以选择"
|
||||
banner
|
||||
closable
|
||||
/>
|
||||
<a-alert message="双击行也可以选择" banner closable />
|
||||
</a-space>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
@@ -140,7 +133,12 @@
|
||||
ColumnItem,
|
||||
DatasourceFunction
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import {pageFiles, removeFile, uploadOss, uploadOssByGroupId} from '@/api/system/file';
|
||||
import {
|
||||
pageFiles,
|
||||
removeFile,
|
||||
uploadOss,
|
||||
uploadOssByGroupId
|
||||
} from '@/api/system/file';
|
||||
import { EleProTable, messageLoading } from 'ele-admin-pro';
|
||||
import { FileRecord, FileRecordParam } from '@/api/system/file/model';
|
||||
import { EditOutlined, UploadOutlined } from '@ant-design/icons-vue';
|
||||
@@ -341,7 +339,6 @@
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/* 自定义行属性 */
|
||||
const customRow = (record: FileRecord) => {
|
||||
return {
|
||||
@@ -356,7 +353,7 @@
|
||||
if (!isMobileDevice()) {
|
||||
record.path = record.url || record.downloadUrl;
|
||||
}
|
||||
console.log(record,'rec......')
|
||||
console.log(record, 'rec......');
|
||||
emit('done', record);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -44,11 +44,15 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PlusOutlined, CloseOutlined, YoutubeOutlined } from '@ant-design/icons-vue';
|
||||
import {
|
||||
PlusOutlined,
|
||||
CloseOutlined,
|
||||
YoutubeOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import { ref } from 'vue';
|
||||
import SelectData from './components/select-data.vue';
|
||||
import { FileRecord } from '@/api/system/file/model';
|
||||
import { isImage } from "@/utils/common";
|
||||
import { isImage } from '@/utils/common';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
||||
@@ -55,7 +55,10 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import { pageShopMerchant } from '@/api/shop/shopMerchant';
|
||||
import { EleProTable } from 'ele-admin-pro';
|
||||
import { ShopMerchant, ShopMerchantParam } from '@/api/shop/shopMerchant/model';
|
||||
import {
|
||||
ShopMerchant,
|
||||
ShopMerchantParam
|
||||
} from '@/api/shop/shopMerchant/model';
|
||||
|
||||
const props = defineProps<{
|
||||
// 弹窗是否打开
|
||||
@@ -99,7 +102,7 @@
|
||||
},
|
||||
{
|
||||
title: '商户类型',
|
||||
dataIndex: 'shopType',
|
||||
dataIndex: 'shopType'
|
||||
// key: 'shopType'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
// 是否显示编辑弹窗
|
||||
const showEdit = ref(false);
|
||||
const content = ref<string>(props.value)
|
||||
const content = ref<string>(props.value);
|
||||
// 当前编辑数据
|
||||
const current = ref<ShopMerchant | null>(null);
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { EleProTable } from 'ele-admin-pro';
|
||||
import {pageCmsModel} from "@/api/cms/cmsModel";
|
||||
import {CmsModel, CmsModelParam} from "@/api/cms/cmsModel/model";
|
||||
import { pageCmsModel } from '@/api/cms/cmsModel';
|
||||
import { CmsModel, CmsModelParam } from '@/api/cms/cmsModel/model';
|
||||
|
||||
const props = defineProps<{
|
||||
// 弹窗是否打开
|
||||
|
||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
||||
|
||||
// 是否显示编辑弹窗
|
||||
const showEdit = ref(false);
|
||||
const content = ref<any>(props.value)
|
||||
const content = ref<any>(props.value);
|
||||
// 当前编辑数据
|
||||
const current = ref<Company | null>(null);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<Environment | null>(null);
|
||||
const content = ref<any>(props.value)
|
||||
const content = ref<any>(props.value);
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: Environment) => {
|
||||
|
||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<CmsMpPages | null>(null);
|
||||
const page = ref<any>()
|
||||
const page = ref<any>();
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: CmsMpPages) => {
|
||||
|
||||
@@ -62,7 +62,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { listCmsNavigation, pageCmsNavigation } from '@/api/cms/cmsNavigation';
|
||||
import {
|
||||
listCmsNavigation,
|
||||
pageCmsNavigation
|
||||
} from '@/api/cms/cmsNavigation';
|
||||
import { EleProTable } from 'ele-admin-pro';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { toTreeData, eachTreeData } from 'ele-admin-pro/es';
|
||||
@@ -71,7 +74,10 @@
|
||||
ColumnItem,
|
||||
EleProTableDone
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import type { CmsNavigation, CmsNavigationParam } from '@/api/cms/cmsNavigation/model';
|
||||
import type {
|
||||
CmsNavigation,
|
||||
CmsNavigationParam
|
||||
} from '@/api/cms/cmsNavigation/model';
|
||||
|
||||
const props = defineProps<{
|
||||
// 弹窗是否打开
|
||||
|
||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<Organization | null>(null);
|
||||
const content = ref<any>(props.value)
|
||||
const content = ref<any>(props.value);
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: Organization) => {
|
||||
|
||||
@@ -48,7 +48,7 @@ const props = withDefaults(
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<Grade | null>(null);
|
||||
const content = ref<any>(props.value)
|
||||
const content = ref<any>(props.value);
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: Grade) => {
|
||||
|
||||
@@ -48,7 +48,7 @@ const props = withDefaults(
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<Spec | null>(null);
|
||||
const content = ref<any>(props.value)
|
||||
const content = ref<any>(props.value);
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: Spec) => {
|
||||
|
||||
@@ -54,11 +54,11 @@
|
||||
|
||||
const onChange = (value: any) => {
|
||||
console.log(value);
|
||||
data.value.map(d => {
|
||||
data.value.map((d) => {
|
||||
if (d.value == value) {
|
||||
emit('done',d, Number(props.index))
|
||||
emit('done', d, Number(props.index));
|
||||
}
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
watch(
|
||||
@@ -66,11 +66,11 @@
|
||||
(specId) => {
|
||||
if (specId) {
|
||||
listSpecValue({ specId }).then((list) => {
|
||||
data.value = list.map(v => {
|
||||
v.label = v.specValue
|
||||
v.value = v.specValue
|
||||
data.value = list.map((v) => {
|
||||
v.label = v.specValue;
|
||||
v.value = v.specValue;
|
||||
return v;
|
||||
})
|
||||
});
|
||||
});
|
||||
} else {
|
||||
data.value = [];
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<User | null>(null);
|
||||
const content = ref<any>()
|
||||
const content = ref<any>();
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: User) => {
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
DatasourceFunction
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import { EleProTable } from 'ele-admin-pro';
|
||||
import {User, UserParam} from "@/api/system/user/model";
|
||||
import {pageUsers} from "@/api/system/user";
|
||||
import { User, UserParam } from '@/api/system/user/model';
|
||||
import { pageUsers } from '@/api/system/user';
|
||||
|
||||
const props = defineProps<{
|
||||
// 弹窗是否打开
|
||||
@@ -86,7 +86,7 @@
|
||||
title: '域名',
|
||||
dataIndex: 'domain',
|
||||
key: 'domain'
|
||||
},
|
||||
}
|
||||
// {
|
||||
// title: '状态',
|
||||
// dataIndex: 'status',
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-button @click="openEdit">
|
||||
<template #icon><BulbOutlined v-if="value > 20" class="ele-text-heading" /><BulbOutlined v-else class="ele-text-danger" /></template>
|
||||
<template #icon
|
||||
><BulbOutlined
|
||||
v-if="value > 20"
|
||||
class="ele-text-heading" /><BulbOutlined
|
||||
v-else
|
||||
class="ele-text-danger"
|
||||
/></template>
|
||||
</a-button>
|
||||
<!-- 选择弹窗 -->
|
||||
<SelectData
|
||||
@@ -18,7 +24,7 @@
|
||||
import { BulbOutlined } from '@ant-design/icons-vue';
|
||||
import { ref } from 'vue';
|
||||
import SelectData from './components/select-data.vue';
|
||||
import {User} from "@/api/system/user/model";
|
||||
import { User } from '@/api/system/user/model';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
||||
@@ -48,7 +48,7 @@ const props = withDefaults(
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<User | null>(null);
|
||||
const user = ref<User>(props.value)
|
||||
const user = ref<User>(props.value);
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: User) => {
|
||||
|
||||
@@ -67,7 +67,7 @@ import {ExclamationCircleOutlined} from '@ant-design/icons-vue';
|
||||
import { EleProTable } from 'ele-admin-pro';
|
||||
import { Company, CompanyParam } from '@/api/system/company/model';
|
||||
import { CmsWebsiteField } from '@/api/cms/cmsWebsiteField/model';
|
||||
import {pageWebsiteField} from "@/api/system/website/field";
|
||||
import { pageWebsiteField } from '@/api/system/website/field';
|
||||
|
||||
const props = defineProps<{
|
||||
// 弹窗是否打开
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
import { BulbOutlined } from '@ant-design/icons-vue';
|
||||
import { ref } from 'vue';
|
||||
import SelectData from './components/select-data.vue';
|
||||
import {CmsWebsiteField} from "@/api/cms/cmsWebsiteField/model";
|
||||
import { CmsWebsiteField } from '@/api/cms/cmsWebsiteField/model';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -50,7 +50,7 @@ const emit = defineEmits<{
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<CmsWebsiteField | null>(null);
|
||||
const content = ref<any>(props.value)
|
||||
const content = ref<any>(props.value);
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: CmsWebsiteField) => {
|
||||
|
||||
@@ -276,11 +276,18 @@ export function setupTextIndent(editor: TinyMCEEditor) {
|
||||
|
||||
// 获取当前段落元素
|
||||
let paragraph = selectedNode;
|
||||
while (paragraph && paragraph.nodeName !== 'P' && paragraph.nodeName !== 'DIV') {
|
||||
while (
|
||||
paragraph &&
|
||||
paragraph.nodeName !== 'P' &&
|
||||
paragraph.nodeName !== 'DIV'
|
||||
) {
|
||||
paragraph = paragraph.parentNode as Element;
|
||||
}
|
||||
|
||||
if (paragraph && (paragraph.nodeName === 'P' || paragraph.nodeName === 'DIV')) {
|
||||
if (
|
||||
paragraph &&
|
||||
(paragraph.nodeName === 'P' || paragraph.nodeName === 'DIV')
|
||||
) {
|
||||
const currentIndent = (paragraph as HTMLElement).style.textIndent;
|
||||
|
||||
if (currentIndent === '2em' || currentIndent === '32px') {
|
||||
@@ -305,7 +312,11 @@ export function setupTextIndent(editor: TinyMCEEditor) {
|
||||
const content = selection.getContent();
|
||||
if (content) {
|
||||
// 如果有选择内容,将选择的内容包装在带缩进的段落中
|
||||
editor.execCommand('mceInsertContent', false, `<p style="text-indent: 2em;">${content}</p>`);
|
||||
editor.execCommand(
|
||||
'mceInsertContent',
|
||||
false,
|
||||
`<p style="text-indent: 2em;">${content}</p>`
|
||||
);
|
||||
} else {
|
||||
// 如果没有选择内容,在当前位置插入带缩进的段落
|
||||
editor.execCommand('FormatBlock', false, 'p');
|
||||
|
||||
@@ -151,23 +151,28 @@ export class PerformanceManager {
|
||||
|
||||
// 收集性能数据
|
||||
private collectPerformanceData() {
|
||||
const navigation = performance.getEntriesByType('navigation')[0] as PerformanceNavigationTiming;
|
||||
const navigation = performance.getEntriesByType(
|
||||
'navigation'
|
||||
)[0] as PerformanceNavigationTiming;
|
||||
const memory = (performance as any).memory;
|
||||
|
||||
return {
|
||||
// 页面加载性能
|
||||
pageLoad: {
|
||||
domContentLoaded: navigation?.domContentLoadedEventEnd - navigation?.fetchStart,
|
||||
domContentLoaded:
|
||||
navigation?.domContentLoadedEventEnd - navigation?.fetchStart,
|
||||
loadComplete: navigation?.loadEventEnd - navigation?.fetchStart,
|
||||
firstByte: navigation?.responseStart - navigation?.fetchStart
|
||||
},
|
||||
|
||||
// 内存使用
|
||||
memory: memory ? {
|
||||
memory: memory
|
||||
? {
|
||||
used: Math.round(memory.usedJSHeapSize / 1024 / 1024),
|
||||
total: Math.round(memory.totalJSHeapSize / 1024 / 1024),
|
||||
limit: Math.round(memory.jsHeapSizeLimit / 1024 / 1024)
|
||||
} : null,
|
||||
}
|
||||
: null,
|
||||
|
||||
// 资源加载
|
||||
resources: this.getResourceMetrics(),
|
||||
@@ -189,7 +194,7 @@ export class PerformanceManager {
|
||||
|
||||
let totalDuration = 0;
|
||||
|
||||
resources.forEach(resource => {
|
||||
resources.forEach((resource) => {
|
||||
const duration = resource.duration;
|
||||
totalDuration += duration;
|
||||
|
||||
@@ -273,13 +278,15 @@ export class PerformanceAdvisor {
|
||||
|
||||
// 检查资源加载
|
||||
const resources = performance.getEntriesByType('resource');
|
||||
const slowResources = resources.filter(r => r.duration > 2000);
|
||||
const slowResources = resources.filter((r) => r.duration > 2000);
|
||||
if (slowResources.length > 0) {
|
||||
advice.push(`发现 ${slowResources.length} 个加载缓慢的资源,建议优化`);
|
||||
}
|
||||
|
||||
// 检查页面加载时间
|
||||
const navigation = performance.getEntriesByType('navigation')[0] as PerformanceNavigationTiming;
|
||||
const navigation = performance.getEntriesByType(
|
||||
'navigation'
|
||||
)[0] as PerformanceNavigationTiming;
|
||||
if (navigation) {
|
||||
const loadTime = navigation.loadEventEnd - navigation.fetchStart;
|
||||
if (loadTime > 3000) {
|
||||
@@ -310,7 +317,11 @@ export const performanceManager = new PerformanceManager();
|
||||
|
||||
// 性能装饰器
|
||||
export function performanceTrack(name: string) {
|
||||
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||
return function (
|
||||
target: any,
|
||||
propertyKey: string,
|
||||
descriptor: PropertyDescriptor
|
||||
) {
|
||||
const originalMethod = descriptor.value;
|
||||
|
||||
descriptor.value = function (...args: any[]) {
|
||||
|
||||
@@ -7,11 +7,14 @@ export const APP_SECRET = import.meta.env.VITE_APP_SECRET || '';
|
||||
// 开发商官方网站
|
||||
export const domain = import.meta.env.VITE_DOMAIN || 'https://your-domain.com';
|
||||
// 主节点
|
||||
export const SERVER_API_URL = import.meta.env.VITE_SERVER_API_URL || 'https://your-api.com/api';
|
||||
export const SERVER_API_URL =
|
||||
import.meta.env.VITE_SERVER_API_URL || 'https://your-api.com/api';
|
||||
// 模块节点
|
||||
export const MODULES_API_URL = localStorage.getItem('ApiUrl') || import.meta.env.VITE_API_URL;
|
||||
export const MODULES_API_URL =
|
||||
localStorage.getItem('ApiUrl') || import.meta.env.VITE_API_URL;
|
||||
// 文件服务器地址
|
||||
export const FILE_SERVER = import.meta.env.VITE_FILE_SERVER || 'https://your-file-server.com';
|
||||
export const FILE_SERVER =
|
||||
import.meta.env.VITE_FILE_SERVER || 'https://your-file-server.com';
|
||||
|
||||
/**
|
||||
* 以下配置一般不需要修改
|
||||
|
||||
@@ -10,5 +10,5 @@ export default {
|
||||
loading: 'loading',
|
||||
oldPassword: 'Old',
|
||||
newPassword: 'New',
|
||||
confirm: 'Confirm',
|
||||
confirm: 'Confirm'
|
||||
};
|
||||
|
||||
@@ -10,5 +10,5 @@ export default {
|
||||
loading: '登录中',
|
||||
oldPassword: '旧密码',
|
||||
newPassword: '新密码',
|
||||
confirm: '确认密码',
|
||||
confirm: '确认密码'
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ const visible = ref<boolean>(false);
|
||||
// 通知数据
|
||||
const notice = ref<ChatMessage[]>([]);
|
||||
|
||||
console.log(userStore.info?.userId,'.....userId')
|
||||
console.log(userStore.info?.userId, '.....userId');
|
||||
// chatStore.connectSocketIO(userStore.info?.userId || 0);
|
||||
|
||||
// 未读数量
|
||||
|
||||
@@ -42,9 +42,11 @@
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="text-gray-400">
|
||||
用户ID:<span class="ele-text-secondary" @click="copyText(loginUser.userId)">{{
|
||||
loginUser.userId
|
||||
}}</span>
|
||||
用户ID:<span
|
||||
class="ele-text-secondary"
|
||||
@click="copyText(loginUser.userId)"
|
||||
>{{ loginUser.userId }}</span
|
||||
>
|
||||
</div>
|
||||
<div class="text-gray-400">
|
||||
昵称:<span class="ele-text-secondary">{{
|
||||
@@ -57,9 +59,11 @@
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="text-gray-400">
|
||||
租户:<span class="ele-text-secondary" @click="copyText(loginUser.tenantId)">{{
|
||||
loginUser.tenantId
|
||||
}}</span>
|
||||
租户:<span
|
||||
class="ele-text-secondary"
|
||||
@click="copyText(loginUser.tenantId)"
|
||||
>{{ loginUser.tenantId }}</span
|
||||
>
|
||||
</div>
|
||||
<div class="text-gray-400">
|
||||
角色:
|
||||
@@ -81,26 +85,39 @@
|
||||
<a-menu-divider />
|
||||
<a-menu-item key="profile">
|
||||
<div class="ele-cell">
|
||||
<div class="ele-cell-content"> {{ t('layout.header.profile') }}</div>
|
||||
<div class="ele-cell-content">
|
||||
{{ t('layout.header.profile') }}</div
|
||||
>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
<a-menu-divider />
|
||||
<a-menu-item key="password">
|
||||
<div class="ele-cell">
|
||||
<div class="ele-cell-content"> {{ t('layout.header.password') }}</div>
|
||||
<div class="ele-cell-content">
|
||||
{{ t('layout.header.password') }}</div
|
||||
>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
<template v-if="loginUser.username == 'admin' || loginUser.username == 'superAdmin'">
|
||||
<template
|
||||
v-if="
|
||||
loginUser.username == 'admin' ||
|
||||
loginUser.username == 'superAdmin'
|
||||
"
|
||||
>
|
||||
<a-menu-divider />
|
||||
<a-menu-item key="accessKey">
|
||||
<div class="ele-cell">
|
||||
<div class="ele-cell-content"> {{ t('layout.header.accessKey') }}</div>
|
||||
<div class="ele-cell-content">
|
||||
{{ t('layout.header.accessKey') }}</div
|
||||
>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
<a-menu-divider />
|
||||
<a-menu-item key="system">
|
||||
<div class="ele-cell">
|
||||
<div class="ele-cell-content"> {{ t('layout.header.system') }}</div>
|
||||
<div class="ele-cell-content">
|
||||
{{ t('layout.header.system') }}</div
|
||||
>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</template>
|
||||
@@ -150,9 +167,9 @@ import {useUserStore} from '@/store/modules/user';
|
||||
import { logout } from '@/utils/page-tab-util';
|
||||
import { listRoles } from '@/api/system/role';
|
||||
import { useSiteStore } from '@/store/modules/site';
|
||||
import Qrcode from "@/components/QrCode/index.vue";
|
||||
import {AppInfo} from "@/api/cms/cmsWebsite/model";
|
||||
import {getCmsWebsiteFieldByCode} from "@/api/cms/cmsWebsiteField";
|
||||
import Qrcode from '@/components/QrCode/index.vue';
|
||||
import { AppInfo } from '@/api/cms/cmsWebsite/model';
|
||||
import { getCmsWebsiteFieldByCode } from '@/api/cms/cmsWebsiteField';
|
||||
|
||||
// 是否开启响应式布局
|
||||
const themeStore = useThemeStore();
|
||||
@@ -218,7 +235,7 @@ const onUserDropClick = ({key}) => {
|
||||
|
||||
const hideShare = () => {
|
||||
showQrcode.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
/* 打开主题设置抽屉 */
|
||||
// const openSetting = () => {
|
||||
@@ -247,11 +264,11 @@ const reload = () => {
|
||||
}
|
||||
// 检查是否启动自定义接口
|
||||
if (import.meta.env.PROD) {
|
||||
getCmsWebsiteFieldByCode('ApiUrl').then(res => {
|
||||
getCmsWebsiteFieldByCode('ApiUrl').then((res) => {
|
||||
if (res) {
|
||||
localStorage.setItem('ApiUrl', `${res.value}`);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user