From 63a668beb29dee34db2ea05665aab7711ef53357 Mon Sep 17 00:00:00 2001 From: zhangrenyuan <18990852002@163.com> Date: Sun, 28 Sep 2025 14:42:03 +0800 Subject: [PATCH 01/12] cashmanagement style --- src/components/workspace/CashManagement.vue | 6 +++--- src/views/home.vue | 2 +- src/views/workspace/index.vue | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/workspace/CashManagement.vue b/src/components/workspace/CashManagement.vue index 56ef20a..dfa250b 100644 --- a/src/components/workspace/CashManagement.vue +++ b/src/components/workspace/CashManagement.vue @@ -168,7 +168,7 @@ justify-content: center; padding: 10px; } -/* 左侧数据列表,使用您指定的样式 */ +/* 左侧数据列表,使用指定的样式 */ .market-data { display: flex; width: 179px; @@ -197,9 +197,9 @@ justify-content: center; } /* 图表样式 */ -/* .chart { +.chart { flex: 1; height: 300px; margin-top: 10px; -} */ +} diff --git a/src/views/home.vue b/src/views/home.vue index f793730..8f99664 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -351,7 +351,7 @@ function logout() { height: 100%; padding: 20px; background: transparent; - overflow-y: auto; + overflow-y: hidden; /* 应用自定义滚动条 */ } diff --git a/src/views/workspace/index.vue b/src/views/workspace/index.vue index 231ed36..ca06dcc 100644 --- a/src/views/workspace/index.vue +++ b/src/views/workspace/index.vue @@ -4,7 +4,9 @@
数据总览
- + From 9bfa4aac55b08f84574a321a6055e18b57df773d Mon Sep 17 00:00:00 2001 From: zhangrenyuan <18990852002@163.com> Date: Sun, 28 Sep 2025 18:14:24 +0800 Subject: [PATCH 02/12] =?UTF-8?q?style=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/workspace/CashManagement.vue | 7 ++++--- src/components/workspace/GoldManagement.vue | 2 +- src/views/audit/gold/rechargeAudit.vue | 2 +- src/views/audit/gold/refundAudit.vue | 2 +- src/views/home.vue | 2 +- src/views/recharge/gold/addCoinRecharge.vue | 22 ++++++++++------------ 6 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/components/workspace/CashManagement.vue b/src/components/workspace/CashManagement.vue index 0e1c434..4edc094 100644 --- a/src/components/workspace/CashManagement.vue +++ b/src/components/workspace/CashManagement.vue @@ -173,12 +173,12 @@ onMounted(() => { /* 左侧数据列表,使用指定的样式 */ .market-data { display: flex; - width: 179px; + width: 180px; flex-direction: column; align-items: flex-start; - gap: 12px; + gap: 20px; padding: 10px; - margin-left: 80px; + margin-left: 40px; } .market-item { @@ -191,6 +191,7 @@ onMounted(() => { } .market-name { + white-space: nowrap; font-weight: 700; } diff --git a/src/components/workspace/GoldManagement.vue b/src/components/workspace/GoldManagement.vue index 46b5e9a..be09be0 100644 --- a/src/components/workspace/GoldManagement.vue +++ b/src/components/workspace/GoldManagement.vue @@ -540,7 +540,7 @@ onMounted(async () => { }) - diff --git a/src/views/workspace/index.vue b/src/views/workspace/index.vue index f7d02fe..0cf0a5e 100644 --- a/src/views/workspace/index.vue +++ b/src/views/workspace/index.vue @@ -6,7 +6,7 @@
- + @@ -15,7 +15,7 @@ - +
@@ -29,76 +29,7 @@ import GoldManagement from "@/components/workspace/GoldManagement.vue" import CashManagement from "@/components/workspace/CashManagement.vue" import GoldGraph from "@/components/workspace/GoldGraph.vue" -const cardData = ref({}) -const graphData = ref([]) -const markets = ref([]) -const account = ref('') -const activeTab = ref('recharge') -// tab 切换时重新调图表接口 -const handleTabChange = async (tab) => { - activeTab.value = tab - await getGraphData() -} - -// 获取用户信息(拿 account) -const getUserInfo = async () => { - const res = await API({ url: '/admin/userinfo', data: {} }) - account.value = res?.account || '' -} - -// 获取市场列表 -const getMarkets = async () => { - if (!account.value) return - const res = await API({ url: '/general/adminMarkets', data: { account: account.value } }) - markets.value = res.data - console.log('获取市场列表:res:', res) - console.log('获取市场列表:market:', markets.value) -} - -// 获取金币卡片数据 -const getCardData = async () => { - const res = await API({ url: '/workbench/getCard', data: {} }) - cardData.value = res?.data || {} -} - -// 获取金币图表数据 -const getGraphData = async () => { - if (!markets.value.length) return - - const params = { - markets: markets.value, - startDate: '2025-01-01 00:00:00', - endDate: '2025-12-31 23:59:59' - } - - const res = await API({ url: '/workbench/getGraph', data: params }) - if (!res?.marketGraphs) return - - graphData.value = res.marketGraphs.map(m => ({ - market: m.market, - permanent: activeTab.value === 'recharge' - ? m.sumRechargePermanent / 100 - : m.sumConsumePermanent / 100, - free: activeTab.value === 'recharge' - ? m.sumRechargeFree / 100 - : m.sumConsumeFree / 100, - task: activeTab.value === 'recharge' - ? m.sumRechargeTask / 100 - : m.sumConsumeTask / 100, - })) -} - -onMounted(async () => { - try { - await getUserInfo() // 先拿 account - await getMarkets() // 再拿 markets - await getCardData() // 卡片 - await getGraphData() // 图表 - } catch (err) { - console.error('初始化失败:', err) - } -}) From c881b86bfb2c75a35a01088154c53d5abb4e9523 Mon Sep 17 00:00:00 2001 From: zhangrenyuan <18990852002@163.com> Date: Tue, 30 Sep 2025 09:41:18 +0800 Subject: [PATCH 08/12] =?UTF-8?q?fix=E9=87=91=E5=B8=81=E5=AE=A1=E6=A0=B8st?= =?UTF-8?q?yle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/workspace/GoldGraph.vue | 7 +- src/views/audit/gold/rechargeAudit.vue | 181 +++++++++++++++++++++------------ 2 files changed, 121 insertions(+), 67 deletions(-) diff --git a/src/components/workspace/GoldGraph.vue b/src/components/workspace/GoldGraph.vue index 9d648a5..7b9a441 100644 --- a/src/components/workspace/GoldGraph.vue +++ b/src/components/workspace/GoldGraph.vue @@ -788,13 +788,14 @@ onUnmounted(() => { box-shadow: 0 0 8px 0 #00000040; padding: 12px; - .card-select { :deep(.el-select__wrapper) { background-color: #E7F4FD !important; - + // :hover { + // background-color: red !important; + // } box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25) !important; - border: #B7BBC4 !important; + border: none !important; } :deep(.el-select-dropdown__item.selected) { diff --git a/src/views/audit/gold/rechargeAudit.vue b/src/views/audit/gold/rechargeAudit.vue index bc303f7..b9d2c4b 100644 --- a/src/views/audit/gold/rechargeAudit.vue +++ b/src/views/audit/gold/rechargeAudit.vue @@ -1,5 +1,5 @@ - + - + 驳回
@@ -189,7 +191,7 @@ const hasrechargeWaitThough = ref(false) // 充值审核通过 const hasrechargeWaitReject = ref(false) // 充值审核驳回 // 初始化权限状态 -const initPermissions = async() => { +const initPermissions = async () => { if (!menuTree.value || !menuTree.value.length) return; hasrechargeThrough.value = hasMenuPermission(menuTree.value, permissionMapping.rechargeThrough); hasrechargeReject.value = hasMenuPermission(menuTree.value, permissionMapping.rechargeReject); @@ -354,7 +356,7 @@ const getRecharge = async function (val) { } const getStats = async () => { - if (!hasrechargeWaitShow) { + if (!hasrechargeWaitShow) { return } try { @@ -480,21 +482,21 @@ const adminReject = async function () { const handleClick = function (tab, event) { activeName.value = tab.props.name if (tab.props.name === 'wait') { - if(!hasrechargeWait){ + if (!hasrechargeWait) { ElMessage.error('暂无权限') return } - if(hasrechargeWaitShow){ + if (hasrechargeWaitShow) { adminWait() } } else if (tab.props.name === 'pass') { - if(!hasrechargeThrough){ + if (!hasrechargeThrough) { ElMessage.error('暂无权限') return } adminPass() } else if (tab.props.name === 'reject') { - if(!hasrechargeReject){ + if (!hasrechargeReject) { ElMessage.error('暂无权限') return } @@ -525,35 +527,35 @@ const handlePagination = (type, val) => { const clicked = ref(false); // 处理通过操作 const handleApprove = async (row) => { - if(!hasrechargeWaitThough){ - ElMessage.error('暂无权限') - return - } + if (!hasrechargeWaitThough) { + ElMessage.error('暂无权限') + return + } clicked.value = true - try { - const params = { - orderCode: row.orderCode, - auditId: adminData.value.id, - action: 1, - rejectReason: '' - } - await request({ url: '/audit/audit', data: params }) - ElMessage.success('审核通过成功') - await getRecharge() - clicked.value = false - await getStats() - } catch (error) { - console.error('审核通过失败', error) - ElMessage.error('操作失败') + try { + const params = { + orderCode: row.orderCode, + auditId: adminData.value.id, + action: 1, + rejectReason: '' } - + await request({ url: '/audit/audit', data: params }) + ElMessage.success('审核通过成功') + await getRecharge() + clicked.value = false + await getStats() + } catch (error) { + console.error('审核通过失败', error) + ElMessage.error('操作失败') + } + } const showRejectDialog = (row) => { - if(!hasrechargeWaitReject){ - ElMessage.error('暂无权限') - return - } + if (!hasrechargeWaitReject) { + ElMessage.error('暂无权限') + return + } currentRecord.value = row rejectReason.value = '' rejectDialogVisible.value = true @@ -562,34 +564,34 @@ const showRejectDialog = (row) => { const cancelClicked = ref(false) // 处理驳回操作 const handleReject = async () => { - if(!hasrechargeWaitReject){ - ElMessage.error('暂无权限') - return - } + if (!hasrechargeWaitReject) { + ElMessage.error('暂无权限') + return + } cancelClicked.value = true - if (!rejectReason.value.trim()) { - ElMessage.warning('请输入驳回理由') - return + if (!rejectReason.value.trim()) { + ElMessage.warning('请输入驳回理由') + return + } + try { + const params = { + orderCode: currentRecord.value.orderCode, + auditId: adminData.value.id, + action: 2, + rejectReason: rejectReason.value } - try { - const params = { - orderCode: currentRecord.value.orderCode, - auditId: adminData.value.id, - action: 2, - rejectReason: rejectReason.value - } - await request({ url: '/audit/audit', data: params }) - ElMessage.success('驳回操作成功') - rejectDialogVisible.value = false - await getRecharge() - cancelClicked.value = false - await getStats() - } catch (error) { - console.error('驳回操作失败', error) - ElMessage.error('操作失败') - } + await request({ url: '/audit/audit', data: params }) + ElMessage.success('驳回操作成功') + rejectDialogVisible.value = false + await getRecharge() + cancelClicked.value = false + await getStats() + } catch (error) { + console.error('驳回操作失败', error) + ElMessage.error('操作失败') + } } // 处理排序事件 const handleSortChange = (column) => { @@ -700,11 +702,11 @@ const formatTime = (val) => val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '' // 挂载 onMounted(async function () { await initPermissions() - if(hasrechargeWaitShow.value){ + if (hasrechargeWaitShow.value) { rechargeAudit.value.auditStatus = '0' - }else if(hasrechargeThrough.value){ + } else if (hasrechargeThrough.value) { rechargeAudit.value.auditStatus = '1' - }else if(hasrechargeReject){ + } else if (hasrechargeReject) { rechargeAudit.value.auditStatus = '2' } await getActivity() @@ -716,6 +718,7 @@ onMounted(async function () { diff --git a/src/components/workspace/GoldGraph.vue b/src/components/workspace/GoldGraph.vue index dabf113..76e1807 100644 --- a/src/components/workspace/GoldGraph.vue +++ b/src/components/workspace/GoldGraph.vue @@ -15,15 +15,25 @@ 任务金币: {{ activeTab === 'recharge' ? sumRechargeTask / 100 : sumConsumeTask / 100 }}  
- 昨天 + 昨天 - 今天 + 今天 - 本周 + 本周 - 本月 + 本月 - 本年 + 本年
@@ -656,7 +666,6 @@ const getAdminData = async function () { } } -const workDataUpdateTime = ref(null) // 标记当前激活的时间范围按钮 const activeTimeRange = ref('') @@ -679,7 +688,7 @@ onUnmounted(() => { diff --git a/src/components/workspace/GoldGraphMarkets.vue b/src/components/workspace/GoldGraphMarkets.vue index 9f0cf73..3de971f 100644 --- a/src/components/workspace/GoldGraphMarkets.vue +++ b/src/components/workspace/GoldGraphMarkets.vue @@ -1,3 +1,5 @@ + + - \ No newline at end of file diff --git a/src/views/refund/gold/coinRefundDetail.vue b/src/views/refund/gold/coinRefundDetail.vue index 6d2925c..62b66a5 100644 --- a/src/views/refund/gold/coinRefundDetail.vue +++ b/src/views/refund/gold/coinRefundDetail.vue @@ -499,7 +499,7 @@ const getMarket = async function () { - \ No newline at end of file diff --git a/src/views/usergold/gold/clientCountBalance.vue b/src/views/usergold/gold/clientCountBalance.vue index 92806e0..cabc15d 100644 --- a/src/views/usergold/gold/clientCountBalance.vue +++ b/src/views/usergold/gold/clientCountBalance.vue @@ -5,11 +5,11 @@ import { storeToRefs } from "pinia" import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js" const adminStore = useAdminStore() const { adminData, menuTree } = storeToRefs(adminStore) -import {onMounted, ref} from 'vue' -import {ElMessage} from 'element-plus' +import { onMounted, ref } from 'vue' +import { ElMessage } from 'element-plus' import moment from 'moment' import API from '@/util/http.js' -import {reverseMarketMapping} from "@/utils/marketMap.js"; +import { reverseMarketMapping } from "@/utils/marketMap.js"; //新增员工数据复选框 const showEmployeeData = ref(false) @@ -65,7 +65,7 @@ const sortOrder = ref('') // 搜索=========================================================================== // 搜索方法 const get = async function (val) { - if(!findMenuById(menuTree.value, permissionMapping.coinCustomerMoney)){ + if (!findMenuById(menuTree.value, permissionMapping.coinCustomerMoney)) { ElMessage.error('无此权限') return } @@ -81,7 +81,7 @@ const get = async function (val) { console.log('搜索参数', getObj.value) // 发送POST请求 - const requestData = {...getObj.value, user: {...user.value}};//控制台打印请求的参数 + const requestData = { ...getObj.value, user: { ...user.value } };//控制台打印请求的参数 console.log('最终请求参数', JSON.stringify(requestData, null, 2)); // 打印格式化后的请求参数 //console.log('请求参数', requestData); // 检查markets数组中是否包含'总部'或'研发部' @@ -102,7 +102,7 @@ const get = async function (val) { const result = await API({ url: '/goldDetail/getGold', method: 'post', - data: {...getObj.value, user: {...user.value, flag: showEmployeeData.value? 0 : 1}} + data: { ...getObj.value, user: { ...user.value, flag: showEmployeeData.value ? 0 : 1 } } }) console.log('响应数据', result) tableData.value = result.data.list @@ -115,7 +115,7 @@ const get = async function (val) { data: { jwcode: user.value.jwcode, markets: user.value.markets, - flag: showEmployeeData.value? 0 : 1 + flag: showEmployeeData.value ? 0 : 1 } }) // 判断精网号是否存在,假设精网号不存在时 result.data.list 为空数组 @@ -137,7 +137,7 @@ const get = async function (val) { // ElMessage.warning('精网号不存在,请检查输入') } // 判断合计数是否存在,不存在时 result.data.list 为空数组 - else if(resultGoldTotal.data===0){ + else if (resultGoldTotal.data === 0) { // 将表格数据设置为空数组 tableData.value = [] // 将合计数设置为 0 @@ -242,11 +242,11 @@ const exportExcel = async function () { user: { jwcode: user.value.jwcode || '', markets: user.value.markets || [], - flag: showEmployeeData.value? 0 : 1 + flag: showEmployeeData.value ? 0 : 1 } } - const res = await API({url: '/goldDetail/exportGold', data: params}) + const res = await API({ url: '/goldDetail/exportGold', data: params }) if (res.code === 200) { ElMessage.success('导出成功') } @@ -268,7 +268,7 @@ const exportListLoading = ref(false) const getExportList = async () => { exportListLoading.value = true try { - const result = await API({url: '/export/export'}) + const result = await API({ url: '/export/export' }) if (result.code === 200) { const filteredData = result.data.filter(item => { return item.type === 1; //返回type為0即客户金币余额的数据 @@ -357,8 +357,8 @@ const getMarket = async function () { return allChildren.map(child => { const grandchildren = child.children && child.children.length - ? transformTree([child]) // 递归处理子节点 - : null; + ? transformTree([child]) // 递归处理子节点 + : null; return { value: child.name, @@ -375,63 +375,57 @@ const getMarket = async function () { } } const format3 = (num) => { - // 每三位添加逗号 - return num.toLocaleString('en-US') + // 每三位添加逗号 + return num.toLocaleString('en-US') }