From 41d5eb529708a5ecd9e77fe6f2e264665a3a21b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Tue, 8 Apr 2025 16:18:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bst/area.js | 9 + src/api/dashboard/dashboardOrder.js | 13 ++ src/components/BaseRemoteSelect/index.vue | 2 + src/components/BaseRemoteSelect/mixins.js | 12 +- .../Business/Area/AreaRemoteSelect.vue | 2 + src/main.js | 3 +- src/utils/enums.js | 13 ++ src/utils/permission.js | 7 + src/views/bst/areaSub/components/AreaMap.vue | 2 +- .../device/view/components/DeviceLocation.vue | 5 + src/views/bst/index/AdminIndex.vue | 115 +++++++++ src/views/bst/index/MchIndex.vue | 152 ++++++++++++ src/views/bst/index/components/AdminStat.vue | 128 ++++++++++ .../bst/index/components/BalancePanel.vue | 219 ++++++++++++++++++ src/views/bst/index/components/MchStat.vue | 93 ++++++++ src/views/bst/index/components/OrderRank.vue | 68 ++++++ src/views/bst/index/components/Stat.vue | 155 ------------- src/views/bst/index/index.vue | 98 +------- .../bst/model/components/ModelEditDialog.vue | 3 +- 19 files changed, 851 insertions(+), 248 deletions(-) create mode 100644 src/views/bst/index/AdminIndex.vue create mode 100644 src/views/bst/index/MchIndex.vue create mode 100644 src/views/bst/index/components/AdminStat.vue create mode 100644 src/views/bst/index/components/BalancePanel.vue create mode 100644 src/views/bst/index/components/MchStat.vue create mode 100644 src/views/bst/index/components/OrderRank.vue delete mode 100644 src/views/bst/index/components/Stat.vue diff --git a/src/api/bst/area.js b/src/api/bst/area.js index b65502d..59a3cee 100644 --- a/src/api/bst/area.js +++ b/src/api/bst/area.js @@ -42,3 +42,12 @@ export function delArea(id) { method: 'delete' }) } + +// 查询运营区简单数据列表 +export function listSimpleArea(query) { + return request({ + url: '/bst/area/simpleList', + method: 'get', + params: query + }) +} diff --git a/src/api/dashboard/dashboardOrder.js b/src/api/dashboard/dashboardOrder.js index ea53779..50a98e0 100644 --- a/src/api/dashboard/dashboardOrder.js +++ b/src/api/dashboard/dashboardOrder.js @@ -12,3 +12,16 @@ export function getOrderDailyAmount(query) { params: query }) } + +/** + * 获取订单排行榜数据 + * @param {Object} query 查询参数 + * @returns {Promise} 返回排行榜数据 + */ +export function getOrderRank(query) { + return request({ + url: '/dashboard/order/rank', + method: 'get', + params: query + }) +} diff --git a/src/components/BaseRemoteSelect/index.vue b/src/components/BaseRemoteSelect/index.vue index e356c72..5720dbc 100644 --- a/src/components/BaseRemoteSelect/index.vue +++ b/src/components/BaseRemoteSelect/index.vue @@ -9,6 +9,8 @@ @visible-change="handleVisibleChange" remote :remote-method="remoteMethod" + :clearable="clearable" + :size="size" >
diff --git a/src/components/BaseRemoteSelect/mixins.js b/src/components/BaseRemoteSelect/mixins.js index 72534e3..619fac7 100644 --- a/src/components/BaseRemoteSelect/mixins.js +++ b/src/components/BaseRemoteSelect/mixins.js @@ -48,12 +48,22 @@ export const $remoteSelect = { // 空数据文本 emptyText: { type: String, - default: '暂无数据' + default: '请选择' }, // 获取选项前回调 beforeGetOptions: { type: Function, default: () => {return true;} + }, + // 是否可清空 + clearable: { + type: Boolean, + default: false + }, + // 尺寸 + size: { + type: String, + default: null } }, } \ No newline at end of file diff --git a/src/components/Business/Area/AreaRemoteSelect.vue b/src/components/Business/Area/AreaRemoteSelect.vue index 30bd8df..aec7a98 100644 --- a/src/components/Business/Area/AreaRemoteSelect.vue +++ b/src/components/Business/Area/AreaRemoteSelect.vue @@ -8,6 +8,8 @@ :multiple="multiple" :init-options="initOptions" v-on="$listeners" + :clearable="clearable" + :size="size" /> diff --git a/src/main.js b/src/main.js index 0c407f5..ee24aed 100644 --- a/src/main.js +++ b/src/main.js @@ -17,7 +17,7 @@ import store from './store'; import { getConfigKey } from '@/api/system/config'; import { getDicts } from '@/api/system/dict/data'; -import { checkPermi, checkRole, isSysAdmin } from '@/utils/permission'; +import { checkPermi, checkRole, isAgent, isSysAdmin } from '@/utils/permission'; import { addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'; import './assets/icons'; // icon import './permission'; // permission control @@ -59,6 +59,7 @@ Vue.prototype.handleTree = handleTree Vue.prototype.checkPermi = checkPermi Vue.prototype.checkRole = checkRole Vue.prototype.isSysAdmin = isSysAdmin +Vue.prototype.isAgent = isAgent // 全局组件挂载 Vue.component('DictTag', DictTag) diff --git a/src/utils/enums.js b/src/utils/enums.js index da70c12..10bb2c8 100644 --- a/src/utils/enums.js +++ b/src/utils/enums.js @@ -197,16 +197,29 @@ export const StatKeys = { ORDER_COUNT: "order_count", // 订单数量 ORDER_PAY_AMOUNT: "order_pay_amount", // 订单支付金额 ORDER_REFUND_AMOUNT: "order_refund_amount", // 订单退款金额 + BONUS_COUNT: "bonus_count", // 分成数量 BONUS_AMOUNT: "bonus_amount", // 分成总金额 BONUS_REFUND_AMOUNT: "bonus_refund_amount", // 分成总退款 + BONUS_WAIT_DIVIDE_AMOUNT: "bonus_wait_divide_amount", // 分成未入账金额 + USER_COUNT: "user_count", // 用户数量 + USER_TODAY_COUNT: "user_today_count", // 今日新增用户数量 USER_BALANCE: "user_balance", // 用户余额 + USER_MCH_COUNT: "user_mch_count", // 运营商数量 + USER_AGENT_COUNT: "user_agent_count", // 代理商数量 + DEVICE_COUNT: "device_count", // 设备数量 DEVICE_STATUS_COUNT: "device_status_count", // 设备状态数量 DEVICE_ONLINE_STATUS_COUNT: "device_online_status_count", // 设备在线状态数量 + AREA_COUNT: "area_count", // 运营区数量 MODEL_COUNT: "model_count", // 型号数量 + + AREA_JOIN_COUNT: "area_join_count", // 加盟商数量 + AREA_JOIN_PARTNER_COUNT: "area_join_partner_count", // 合伙人数量 + + WITHDRAW_SUCCESS_AMOUNT: "withdraw_success_amount", // 成功提现金额 } // 收款账户类型 diff --git a/src/utils/permission.js b/src/utils/permission.js index 6e80255..44d0549 100644 --- a/src/utils/permission.js +++ b/src/utils/permission.js @@ -52,3 +52,10 @@ export function checkRole(value) { export function isSysAdmin() { return checkRole(['sysAdmin']) } + +/** + * 是否代理商 + */ +export function isAgent() { + return checkRole(['agent']) +} diff --git a/src/views/bst/areaSub/components/AreaMap.vue b/src/views/bst/areaSub/components/AreaMap.vue index 8098319..3fa2a64 100644 --- a/src/views/bst/areaSub/components/AreaMap.vue +++ b/src/views/bst/areaSub/components/AreaMap.vue @@ -11,7 +11,7 @@ 全局查看 切换样式 {{ showLabels ? '隐藏' : '显示' }}文字 - {{ isPlaybackVisible ? '隐藏' : '显示' }}轨迹控制台 + {{ isPlaybackVisible ? '隐藏' : '显示' }}轨迹控制台
diff --git a/src/views/bst/device/view/components/DeviceLocation.vue b/src/views/bst/device/view/components/DeviceLocation.vue index 933b724..bd76938 100644 --- a/src/views/bst/device/view/components/DeviceLocation.vue +++ b/src/views/bst/device/view/components/DeviceLocation.vue @@ -94,6 +94,11 @@ export default { methods: { // 获取运营区域 getArea() { + if (!this.areaId) { + this.area = {}; + this.areaSubList = []; + return; + } getArea(this.areaId).then(res => { this.area = res.data; this.getAreaSubList(); diff --git a/src/views/bst/index/AdminIndex.vue b/src/views/bst/index/AdminIndex.vue new file mode 100644 index 0000000..9d46b97 --- /dev/null +++ b/src/views/bst/index/AdminIndex.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/src/views/bst/index/MchIndex.vue b/src/views/bst/index/MchIndex.vue new file mode 100644 index 0000000..cd2328e --- /dev/null +++ b/src/views/bst/index/MchIndex.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/src/views/bst/index/components/AdminStat.vue b/src/views/bst/index/components/AdminStat.vue new file mode 100644 index 0000000..9321cb7 --- /dev/null +++ b/src/views/bst/index/components/AdminStat.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/src/views/bst/index/components/BalancePanel.vue b/src/views/bst/index/components/BalancePanel.vue new file mode 100644 index 0000000..57da453 --- /dev/null +++ b/src/views/bst/index/components/BalancePanel.vue @@ -0,0 +1,219 @@ + + + + + \ No newline at end of file diff --git a/src/views/bst/index/components/MchStat.vue b/src/views/bst/index/components/MchStat.vue new file mode 100644 index 0000000..ffa891c --- /dev/null +++ b/src/views/bst/index/components/MchStat.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/views/bst/index/components/OrderRank.vue b/src/views/bst/index/components/OrderRank.vue new file mode 100644 index 0000000..7803f15 --- /dev/null +++ b/src/views/bst/index/components/OrderRank.vue @@ -0,0 +1,68 @@ + + + + + \ No newline at end of file diff --git a/src/views/bst/index/components/Stat.vue b/src/views/bst/index/components/Stat.vue deleted file mode 100644 index d9bdebd..0000000 --- a/src/views/bst/index/components/Stat.vue +++ /dev/null @@ -1,155 +0,0 @@ - - - - - diff --git a/src/views/bst/index/index.vue b/src/views/bst/index/index.vue index 40954a3..7ad7e0b 100644 --- a/src/views/bst/index/index.vue +++ b/src/views/bst/index/index.vue @@ -1,105 +1,27 @@