@@ -4,8 +4,7 @@
< div class = "welcome-banner" >
< div class = "welcome-banner" >
< div class = "welcome-left flex flex-row gap-2 items-center" >
< div class = "welcome-left flex flex-row gap-2 items-center" >
< a-avatar
< a-avatar
v-if = "shopLogoUrl"
: src = "shopLogoUrl || 'https://oss.wsdns.cn/20240822/0252ad4ed46449cdafe12f8d3d96c2ea.svg' "
:src = "shopLogoUrl"
:size = "64"
:size = "64"
shape = "square"
shape = "square"
class = "welcome-logo"
class = "welcome-logo"
@@ -26,7 +25,6 @@
< a-button size = "small" :disabled = "!notifyEnabled" @click ="onTestNotify" > 测试 < / a -button >
< a-button size = "small" :disabled = "!notifyEnabled" @click ="onTestNotify" > 测试 < / a -button >
< / div >
< / div >
< a-space >
< a-space >
< a-tag color = "green" style = "font-size:13px;padding:4px 12px" > { { siteStore . statusText || '正常' } } < / a-tag >
< a-button size = "small" @click ="refreshStatistics" :loading = "loading" >
< a-button size = "small" @click ="refreshStatistics" :loading = "loading" >
< template # icon > < ReloadOutlined / > < / template >
< template # icon > < ReloadOutlined / > < / template >
刷新数据
刷新数据
@@ -81,38 +79,15 @@
< / div >
< / div >
< RightOutlined class = "todo-arrow" / >
< RightOutlined class = "todo-arrow" / >
< / div >
< / div >
< div v-if = "!loading && todoItems.every(t => t.value === 0)" class="todo-empty" >
<!-- < div v-if = "!loading && todoItems.every(t => t.value === 0)" class="todo-empty" > - - >
🎉 暂无待处理事项, 一切正常!
<!-- 🎉 暂无待处理事项, 一切正常! -- >
< / div >
<!-- < / div > -- >
< / div >
< / div >
< / div >
< / div >
< / a-col >
< / a-col >
<!-- 快速入口 -- >
<!-- 今日数据概况 -- >
< a-col :xs = "24" :md = "12" >
< a-col :xs = "24" :md = "12" >
< div class = "panel" >
< div class = "panel-header" >
< span class = "panel-title" > ⚡ 快速入口 < / span >
< / div >
< div class = "quick-grid" >
< div
v-for = "item in quickLinks"
:key = "item.to"
class = "quick-card"
@click ="navigateTo(item.to)"
>
< div class = "quick-icon" : style = "{ background: item.bg }" >
{ { item . icon } }
< span v-if = "item.badge" class="quick-icon-dot" > < / span >
< / div >
< div class = "quick-label" > { { item . label } } < / div >
< / div >
< / div >
< / div >
< / a-col >
< / a-row >
<!-- 今日数据趋势 -- >
< div class = "panel" >
< div class = "panel" >
< div class = "panel-header" >
< div class = "panel-header" >
< span class = "panel-title" > 📊 今日数据概况 < / span >
< span class = "panel-title" > 📊 今日数据概况 < / span >
@@ -148,15 +123,19 @@
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / a-col >
< / a-row >
<!-- 系统 基本信息 -- >
<!-- 今日数据概况 + 基本信息 -- >
< a-row : gutter = "[16, 16]" style = "margin-top: 16px" >
< a-row : gutter = "[16, 16]" >
< a-col :span = "12" >
<!-- 基本信息 -- >
< a-col :xs = "24" :md = "12" >
< div class = "panel" >
< div class = "panel" >
< div class = "panel-header" >
< div class = "panel-header" >
< span class = "panel-title" > 📋 基本信息 < / span >
< span class = "panel-title" > 📋 基本信息 < / span >
< / div >
< / div >
< div style = "padding: 16 px 18px;" >
< div style = "padding: 23 px 18px;" >
< a-descriptions :column = "1" size = "small" >
< a-descriptions :column = "1" size = "small" >
< a-descriptions-item label = "软件名称" >
< a-descriptions-item label = "软件名称" >
< template v-if = "subscriptionLoading" >
< template v-if = "subscriptionLoading" >
@@ -164,16 +143,16 @@
< / template >
< / template >
< template v-else > {{ currentProduct ? .productName | | ' - ' }} < / template >
< template v-else > {{ currentProduct ? .productName | | ' - ' }} < / template >
< / a -descriptions -item >
< / a -descriptions -item >
< a-descriptions-item label = "版本号 " >
< a-descriptions-item label = "当前 版本" >
< template v-if = "subscriptionLoading" >
< template v-if = "subscriptionLoading" >
< a -skeleton -input :active = "true" size = "small" style = "width: 8 0px" / >
< a -skeleton -input :active = "true" size = "small" style = "width: 16 0px" / >
< / template >
< / template >
< template v-else > {{ currentProduct ? .version | | ' - ' }} < / template >
< template v-else > {{ currentProduct ? .version | | ' - ' }} < / template >
< / a -descriptions -item >
< / a -descriptions -item >
< a-descriptions-item label = "运行状态 " >
< a-descriptions-item label = "授权编号 " >
< a-tag :color = "productStatusText.color" > { { productStatusText . text } } < / a-tag >
< span > { { currentSubscription ? . subscriptionNo || '-' } } < / span >
< / a-descriptions-item >
< / a-descriptions-item >
< a-descriptions-item label = "创建 时间" >
< a-descriptions-item label = "开通 时间" >
< template v-if = "subscriptionLoading" >
< template v-if = "subscriptionLoading" >
< a -skeleton -input :active = "true" size = "small" style = "width: 160px" / >
< a -skeleton -input :active = "true" size = "small" style = "width: 160px" / >
< / template >
< / template >
@@ -185,7 +164,7 @@
< / template >
< / template >
< template v-else-if = "currentSubscription && currentSubscription.status === 'active' && currentSubscription.expireTime" >
< template v-else-if = "currentSubscription && currentSubscription.status === 'active' && currentSubscription.expireTime" >
< span > { { formatDateTime ( currentSubscription . expireTime ) } } < / span >
< span > { { formatDateTime ( currentSubscription . expireTime ) } } < / span >
< a-tag : color = "isExpired ? 'red' : 'green'" style= "margin-left: 8px" >
< a-tag v-if = "isExpired" :color= "isExpired ? 'red' : 'green'" style= "margin-left: 8px">
{{ isExpired ? ' 已过期 ' : ' 已激活 ' }}
{{ isExpired ? ' 已过期 ' : ' 已激活 ' }}
< / a -tag >
< / a -tag >
< span v-if = "daysToExpire !== null && daysToExpire >= 0 && daysToExpire <= 7" class="expire-warn" >
< span v-if = "daysToExpire !== null && daysToExpire >= 0 && daysToExpire <= 7" class="expire-warn" >
@@ -208,62 +187,45 @@
< a-button type = "link" size = "small" @click ="onSubscribe" style = "padding: 0 0 0 8px" > 立即订阅 < / a-button >
< a-button type = "link" size = "small" @click ="onSubscribe" style = "padding: 0 0 0 8px" > 立即订阅 < / a-button >
< / template >
< / template >
< / a-descriptions-item >
< / a-descriptions-item >
< a-descriptions-item label = "系统运行" >
<!-- < a-descriptions-item label = "系统运行" > -- >
< template v-if = "subscriptionLoading" >
<!-- < template v-if = "subscriptionLoading" > - - >
< a -skeleton -input :active = "true" size = "small" style = "width: 60px" / >
<!-- < a-skeleton-input :active = "true" size = "small" style = "width: 60px" / > -- >
< / template >
<!-- < / template > -- >
< template v-else >
<!-- < template v-else > - - >
< a -tooltip title = "自您首次开通小程序商城起" >
<!-- < a-tooltip title = "自您首次开通小程序商城起" > -- >
< span > { { runDays } } 天 < / span >
<!-- < span > { { runDays } } 天 < / span > -- >
< / a-tooltip >
<!-- < / a-tooltip > -- >
< / template >
<!-- < / template > -- >
< / a-descriptions-item >
<!-- < / a-descriptions-item > -- >
<!-- < a-descriptions-item label = "绑定小程序" > -- >
<!-- { { currentSubscription ? . miniProgramId || 'wx75cbc65759eb981a' } } -- >
<!-- < / a-descriptions-item > -- >
<!-- < a-descriptions-item label = "售后服务" > -- >
<!-- < a href = "https://websoft.top/login" class = "text-gray-500" > 提交售后工单 < / a > -- >
<!-- < / a-descriptions-item > -- >
< / a-descriptions >
< / a-descriptions >
< / div >
< / div >
< / div >
< / div >
< / a-col >
< / a-col >
<!-- 快速入口 -- >
<!-- 快捷操作 -- >
< a-col :xs = "24" :md = "12" >
< a-col :span = "12 " >
< div class = "panel " >
< div class = "panel" style = "min-height: 353px" >
< div class = "panel-header" >
< div class = "panel-header" >
< span class = "panel-title" > ⚡ 快捷操作 < / span >
< span class = "panel-title" > ⚡ 快速入口 < / span >
< / div >
< / div >
< div style = "padding: 16px 18px; " >
< div class = "quick-grid " >
< a-space direction = "vertical" style = "width: 100%" >
< div
< a-button
v-for = "item in quickLinks"
type = "primary "
:key = "item.to "
block
class = "quick-card"
@click ="navigateTo('/shop/shopOrder' )"
@click ="navigateTo(item.to )"
>
>
< ShoppingCartOutlined / >
< div class = "quick-icon" : style = "{ background: item.bg }" >
订单管理
{ { item . icon } }
< / a-butto n>
< span v-if = "item.badge" class="quick-icon-dot" > < / spa n>
< a-button block @click ="navigateTo('/shop/shopGoods')" >
< / div >
< ShopOutlined / >
< div class = "quick-label" > { { item . label } } < / div >
商品管理
< / div >
< / a-button >
< a-button block @click ="navigateTo('/shop/shopGoodsCategory')" >
< AppstoreOutlined / >
商品分类
< / a-button >
< a-button block @click ="navigateTo('/market/coupon')" >
< GiftOutlined / >
优惠券管理
< / a-button >
< a-button block @click ="navigateTo('/system/user')" >
< TeamOutlined / >
会员管理
< / a-button >
< a-button block @click ="navigateTo('/shop/shopSetting')" >
< SettingOutlined / >
商城设置
< / a-button >
< a-button block @click ="handleClearCache" >
< ClearOutlined / >
清除缓存
< / a-button >
< / a-space >
< / div >
< / div >
< / div >
< / div >
< / a-col >
< / a-col >
@@ -351,13 +313,6 @@ import { useOrderNotify } from '@/views/shop/shopOrder/useOrderNotify';
import {
import {
ReloadOutlined ,
ReloadOutlined ,
RightOutlined ,
RightOutlined ,
ShoppingCartOutlined ,
ShopOutlined ,
AppstoreOutlined ,
GiftOutlined ,
TeamOutlined ,
SettingOutlined ,
ClearOutlined ,
InfoCircleOutlined ,
InfoCircleOutlined ,
QrcodeOutlined
QrcodeOutlined
} from '@ant-design/icons-vue' ;
} from '@ant-design/icons-vue' ;
@@ -371,7 +326,6 @@ import { pageShopOrder } from '@/api/shop/shopOrder';
import { getShopSettingCategoryValues } from '@/api/shop/shopSetting' ;
import { getShopSettingCategoryValues } from '@/api/shop/shopSetting' ;
import { getCompressedImageUrl } from '@/utils/image' ;
import { getCompressedImageUrl } from '@/utils/image' ;
import { storeToRefs } from 'pinia' ;
import { storeToRefs } from 'pinia' ;
import { removeSiteInfoCache } from '@/api/cms/cmsWebsite' ;
import { getProductDetail } from '@/api/app/appProduct' ;
import { getProductDetail } from '@/api/app/appProduct' ;
import type { AppProduct } from '@/api/app/appProduct/model' ;
import type { AppProduct } from '@/api/app/appProduct/model' ;
import type { AppSubscription } from '@/api/app/appSubscription/model' ;
import type { AppSubscription } from '@/api/app/appSubscription/model' ;
@@ -770,17 +724,6 @@ const formatMoney = (value?: number | string) => {
return Number . isFinite ( num ) ? num . toFixed ( 2 ) : '0.00' ;
return Number . isFinite ( num ) ? num . toFixed ( 2 ) : '0.00' ;
} ;
} ;
// 清除缓存
const handleClearCache = ( ) => {
removeSiteInfoCache ( 'SiteInfo:' + localStorage . getItem ( 'TenantId' ) ) . then (
( msg ) => {
if ( msg ) {
message . success ( msg ) ;
}
}
) ;
} ;
// 新订单声音提醒(全局单例:轮询由 layout 启动,此处仅消费状态 + UI)
// 新订单声音提醒(全局单例:轮询由 layout 启动,此处仅消费状态 + UI)
const { enabled : notifyEnabled , hasNewOrder , toggle : onNotifyToggle , testNotify : onTestNotify } = useOrderNotify ( {
const { enabled : notifyEnabled , hasNewOrder , toggle : onNotifyToggle , testNotify : onTestNotify } = useOrderNotify ( {
onNewOrder : ( ) => loadData ( )
onNewOrder : ( ) => loadData ( )
@@ -972,7 +915,7 @@ onUnmounted(() => {
. panel - title { font - size : 14 px ; font - weight : 600 ; color : rgba ( 0 , 0 , 0 , 0.85 ) ; }
. panel - title { font - size : 14 px ; font - weight : 600 ; color : rgba ( 0 , 0 , 0 , 0.85 ) ; }
/* 待办 */
/* 待办 */
. todo - list { padding : 8 px 0 ; }
. todo - list { padding : 2 px 0 ; }
. todo - item {
. todo - item {
display : flex ; align - items : center ; gap : 12 px ;
display : flex ; align - items : center ; gap : 12 px ;
padding : 12 px 18 px ; cursor : pointer ; transition : background 0.15 s ;
padding : 12 px 18 px ; cursor : pointer ; transition : background 0.15 s ;
@@ -1030,9 +973,9 @@ onUnmounted(() => {
/* 今日数据 */
/* 今日数据 */
. today - stats {
. today - stats {
display : grid ;
display : grid ;
grid - template - columns : repeat ( 4 , 1 fr ) ;
grid - template - columns : repeat ( 2 , 1 fr ) ;
gap : 16 px ;
gap : 12 px ;
padding : 20 px ;
padding : 16 px ;
}
}
. today - stat {
. today - stat {
display : flex ;
display : flex ;