diff --git a/src/components/workspace/CashManagement.vue b/src/components/workspace/CashManagement.vue index eb377da..e0864da 100644 --- a/src/components/workspace/CashManagement.vue +++ b/src/components/workspace/CashManagement.vue @@ -17,7 +17,7 @@
{{ market.name }}: - {{ market.value.toLocaleString() }} + {{ market.value.toLocaleString() }}新币
@@ -58,8 +58,11 @@ const renderChart = () => { bottom: 5, // 增加底部距离的 left: 'center' }, + series: [ { + label: {show: false}, + type: 'pie', radius: ['40%', '70%'], data: cashData.value.markets, @@ -170,15 +173,15 @@ onMounted(() => { padding: 10px; } -/* 左侧数据列表,使用您指定的样式 */ +/* 左侧数据列表,使用指定的样式 */ .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 +194,7 @@ onMounted(() => { } .market-name { + white-space: nowrap; font-weight: 700; } diff --git a/src/components/workspace/CashManagementMarkets.vue b/src/components/workspace/CashManagementMarkets.vue new file mode 100644 index 0000000..890fb4b --- /dev/null +++ b/src/components/workspace/CashManagementMarkets.vue @@ -0,0 +1,210 @@ + + + + + + diff --git a/src/components/workspace/GoldGraph.vue b/src/components/workspace/GoldGraph.vue index d83a520..c57d6b8 100644 --- a/src/components/workspace/GoldGraph.vue +++ b/src/components/workspace/GoldGraph.vue @@ -15,15 +15,25 @@ 任务金币: {{ activeTab === 'recharge' ? sumRechargeTask / 100 : sumConsumeTask / 100 }}  
- 昨天 + 昨天 - 今天 + 今天 - 本周 + 本周 - 本月 + 本月 - 本年 + 本年
@@ -655,28 +665,7 @@ const getAdminData = async function () { console.log('请求失败', error) } } -// 获取卡片数据 -const getCardData = async () => { - try { - const response = await API({url: '/workbench/getCard', data: {}}) - workDataUpdateTime.value = response.updateTime - // 周同比 - sumWow.value = response.sumWow.toFixed(2) - // 日环比 - sumDaily.value = response.sumDaily.toFixed(2) - - if (response && response.data) { - processData(response.data) - } else if (Array.isArray(response?.marketCards)) { - processData(response) - } else { - console.error('无效的API响应结构:', response) - } - } catch (error) { - console.error('获取卡片数据失败:', error) - } -} -const workDataUpdateTime = ref(null) + // 标记当前激活的时间范围按钮 const activeTimeRange = ref('') @@ -687,7 +676,6 @@ const handleDatePickerChange = () => { onMounted(async () => { await getAdminData() - await getCardData() await getMarkets() getYear() window.addEventListener('resize', () => { @@ -700,7 +688,7 @@ onUnmounted(() => { diff --git a/src/components/workspace/GoldGraphMarkets.vue b/src/components/workspace/GoldGraphMarkets.vue new file mode 100644 index 0000000..3de971f --- /dev/null +++ b/src/components/workspace/GoldGraphMarkets.vue @@ -0,0 +1,818 @@ + + + + + + diff --git a/src/components/workspace/GoldManagement.vue b/src/components/workspace/GoldManagement.vue index 46b5e9a..c4663ff 100644 --- a/src/components/workspace/GoldManagement.vue +++ b/src/components/workspace/GoldManagement.vue @@ -270,7 +270,8 @@ const processData = (data) => { }); } -// 初始化金币类型南丁格尔图 +// 初始化金币类型南丁格尔图(暂时不用了) +/* const initGoldTypeChart = () => { const myChart = echarts.init(goldTypeChart.value); const option = { @@ -310,6 +311,7 @@ const initGoldTypeChart = () => { }; myChart.setOption(option); } +*/ // 初始化充值金币环形图 const initRechargeGoldChart = () => { @@ -405,7 +407,7 @@ const initConsumeDetailChart = () => { // 增加图表内边距,避免内容溢出 legend: { orient: 'vertical', - left: 'left', + left: '20%', top: '85', icon: 'circle', iconSize: 5, @@ -463,7 +465,7 @@ const initRechargePeopleChart = () => { const option = { legend: { orient: 'vertical', - left: 'left', + left: '20%', top: '85', icon: 'circle', iconSize: 5, @@ -540,7 +542,7 @@ onMounted(async () => { }) - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/audit/gold/rechargeAudit.vue b/src/views/audit/gold/rechargeAudit.vue index 08f2750..a9d7f8f 100644 --- a/src/views/audit/gold/rechargeAudit.vue +++ b/src/views/audit/gold/rechargeAudit.vue @@ -1,5 +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') }