From 31dc945f8c5dcbe5b14d175b0f36a34ecde7394a Mon Sep 17 00:00:00 2001 From: BabyBoy <2019108827@qq.com> Date: Mon, 30 Jun 2025 15:55:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.ts | 15 +- src/api/pms/product.js | 20 ++- src/api/set/messageindex.ts | 14 +- src/api/types.ts | 47 ++++++ src/components/OssImageUpload/index.vue | 1 + src/router/index.ts | 64 ++++---- src/views/contentManage/report/index.vue | 2 +- src/views/contentManage/video/index.vue | 4 +- .../contentManage/videocomment/index.vue | 4 +- src/views/dashboard/LineChartnew.vue | 105 ++++++++++++ src/views/index.vue | 57 +++++-- src/views/pms/product/AddProduct.vue | 19 +-- src/views/pms/product/index.vue | 149 +++++++++++++++--- src/views/set/account.vue | 19 ++- src/views/set/message.vue | 14 +- 15 files changed, 437 insertions(+), 97 deletions(-) create mode 100644 src/views/dashboard/LineChartnew.vue diff --git a/src/api/login.ts b/src/api/login.ts index e02328c..59ffb3b 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -1,7 +1,8 @@ -import request from '@/utils/request'; +import { LoginData, LoginResult, TenantInfo, VerifyCodeResult } from './types'; + import { AxiosPromise } from 'axios'; -import { LoginData, LoginResult, VerifyCodeResult, TenantInfo } from './types'; import { UserInfo } from '@/api/system/user/types'; +import request from '@/utils/request'; // pc端固定客户端授权id const clientId = import.meta.env.VITE_APP_CLIENT_ID; @@ -111,3 +112,13 @@ export function getTenantList(isToken: boolean): AxiosPromise { method: 'get' }); } + +// 首页信息 +export function getIndex() { + return request({ + url: '/count', + method: 'get' + // data: query, + // params: pageReq + }); +} diff --git a/src/api/pms/product.js b/src/api/pms/product.js index 25f1d06..442b2cd 100644 --- a/src/api/pms/product.js +++ b/src/api/pms/product.js @@ -9,7 +9,25 @@ export function listPmsProduct(query, pageReq) { params: pageReq }); } +//审核 +export function productaudit(query, pageReq) { + return request({ + url: '/pms/product/audit', + method: 'get', + data: query, + params: pageReq + }); +} +// 物品上下架 +export function productpublish(query, pageReq) { + return request({ + url: '/pms/product/publish', + method: 'get', + data: query, + params: pageReq + }); +} // 查询商品信息详细 export function getPmsProduct(id) { return request({ @@ -31,7 +49,7 @@ export function addPmsProduct(data) { export function updatePmsProduct(data) { return request({ url: '/pms/product/update', - method: 'put', + method: 'post', data: data }); } diff --git a/src/api/set/messageindex.ts b/src/api/set/messageindex.ts index b2f3b37..8324198 100644 --- a/src/api/set/messageindex.ts +++ b/src/api/set/messageindex.ts @@ -1,4 +1,4 @@ -import { AccountQuery, LeaveListVO, LeaveQuery, paramsaccountOV } from '@/api/set/messagetype'; +import { AccountQuery, LeaveListVO, LeaveQuery, paramsaccountOV, seachookOV } from '@/api/set/messagetype'; import { AxiosPromise } from 'axios'; import request from '@/utils/request'; @@ -24,7 +24,17 @@ export const getnotice = (query?: string): AxiosPromise => { method: 'get' }); }; - +/** + * 模板修改 + * @param data + */ +export const updateCategory = (data: seachookOV) => { + return request({ + url: '/system/message/template', + method: 'put', + data: data + }); +}; //获取下拉列表 export const listuserlist = (query?: string | number): AxiosPromise => { return request({ diff --git a/src/api/types.ts b/src/api/types.ts index 617286c..dde698a 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -57,3 +57,50 @@ export interface TenantInfo { tenantEnabled: boolean; voList: TenantVO[]; } + +export interface top20Stores { + company_name: string; + sales: number; + total_amount: string; +} +export interface top20Product { + name: string; + price: string; + sales: number; + total_amount: string; +} +export interface monthlyIncomeExpense { + expense_amount: string; + income_amount: string; + month: string; +} +export interface monthlyUserVolume { + addCartMemberCount: string; + dealMemberCount: string; + loginMemberCount: string; + month: string; + registerMemberCount: string; +} + +export interface monthlyVlog { + month: string; + vlog_count: number; +} +//首页 +export interface indexObjOV { + StoreAudit: number; + WithdrawCount: number; + feedbackCount: number; + memberCount: number; + orderAudit: string; + orderCount: number; + productAudit: string; + productCount: number; + storeCount: number; + vlogCount: number; + top20Product: top20Product[]; + top20Stores: top20Stores[]; + monthlyIncomeExpense: monthlyIncomeExpense[]; + monthlyUserVolume: monthlyUserVolume[]; + monthlyVlog: monthlyVlog[]; +} diff --git a/src/components/OssImageUpload/index.vue b/src/components/OssImageUpload/index.vue index ac5d3d0..0f1a5f8 100644 --- a/src/components/OssImageUpload/index.vue +++ b/src/components/OssImageUpload/index.vue @@ -85,6 +85,7 @@ export default { modelValue: { handler(val) { if (val) { + console.log(val); // 首先将值转为数组 const list = Array.isArray(val) ? val : this.modelValue.split(','); // 然后将数组转为对象数组 diff --git a/src/router/index.ts b/src/router/index.ts index 46e9fa9..755f2cd 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -230,38 +230,38 @@ export const dynamicRoutes: RouteRecordRaw[] = [ } ] }, - { - path: '/videoManage', - component: Layout, - hidden: true, - permissions: ['system:user:edit'], - children: [ - { - path: 'video', - component: () => import('@/views/contentManage/video/index.vue'), - name: 'video', - meta: { title: '视频列表', icon: 'dashboard', affix: true } - }, - { - path: 'videocomment', - component: () => import('@/views/contentManage/videocomment/index.vue'), - name: 'videocomment', - meta: { title: '视频评论', icon: 'dashboard', affix: true } - }, - { - path: 'report', - component: () => import('@/views/contentManage/report/index.vue'), - name: 'report', - meta: { title: '举报', icon: 'dashboard', affix: true } - } - // { - // path: 'detail', - // component: () => import('@/views/contentManage/videodetails/index.vue'), - // name: 'Videodetails', - // meta: { title: '视频详情', icon: 'dashboard', affix: true } - // } - ] - }, + // { + // path: '/videoManage', + // component: Layout, + // hidden: true, + // permissions: ['system:user:edit'], + // children: [ + // { + // path: 'video', + // component: () => import('@/views/contentManage/video/index.vue'), + // name: 'video', + // meta: { title: '视频列表', icon: 'dashboard', affix: true } + // }, + // { + // path: 'videocomment', + // component: () => import('@/views/contentManage/videocomment/index.vue'), + // name: 'videocomment', + // meta: { title: '视频评论', icon: 'dashboard', affix: true } + // }, + // { + // path: 'report', + // component: () => import('@/views/contentManage/report/index.vue'), + // name: 'report', + // meta: { title: '举报', icon: 'dashboard', affix: true } + // } + // // { + // // path: 'detail', + // // component: () => import('@/views/contentManage/videodetails/index.vue'), + // // name: 'Videodetails', + // // meta: { title: '视频详情', icon: 'dashboard', affix: true } + // // } + // ] + // }, { path: '/notice', component: Layout, diff --git a/src/views/contentManage/report/index.vue b/src/views/contentManage/report/index.vue index bc86ae2..09e208d 100644 --- a/src/views/contentManage/report/index.vue +++ b/src/views/contentManage/report/index.vue @@ -26,7 +26,7 @@ > diff --git a/src/views/contentManage/video/index.vue b/src/views/contentManage/video/index.vue index d6d7ba2..6c35560 100644 --- a/src/views/contentManage/video/index.vue +++ b/src/views/contentManage/video/index.vue @@ -56,7 +56,7 @@ :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" > - + @@ -71,7 +71,7 @@ diff --git a/src/views/contentManage/videocomment/index.vue b/src/views/contentManage/videocomment/index.vue index 25886c7..c10d897 100644 --- a/src/views/contentManage/videocomment/index.vue +++ b/src/views/contentManage/videocomment/index.vue @@ -52,7 +52,7 @@ diff --git a/src/views/set/account.vue b/src/views/set/account.vue index 9d7eb72..d832518 100644 --- a/src/views/set/account.vue +++ b/src/views/set/account.vue @@ -130,7 +130,7 @@ @@ -138,7 +138,7 @@