From d7288486001eab06820089b9755bdd973379e700 Mon Sep 17 00:00:00 2001 From: lihuilin Date: Mon, 12 May 2025 16:04:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?0512bug=E6=94=B9=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gold-system/src/views/audit/rechargeAudit.vue | 8 +++--- gold-system/src/views/consume/addConsume.vue | 35 ++++++++++++++++++++------ gold-system/src/views/managerecharge/rate.vue | 16 ++++++------ gold-system/src/views/recharge/addRecharge.vue | 2 +- 4 files changed, 40 insertions(+), 21 deletions(-) diff --git a/gold-system/src/views/audit/rechargeAudit.vue b/gold-system/src/views/audit/rechargeAudit.vue index 74e2b6e..9e6f30b 100644 --- a/gold-system/src/views/audit/rechargeAudit.vue +++ b/gold-system/src/views/audit/rechargeAudit.vue @@ -30,7 +30,7 @@ const columnOptions = ref([ // 默认显示 const defaultColumns = ['username', 'jwcode', 'area', 'activityName', 'rechargeGold', 'rechargeWay', 'paidGold', 'freeGold', - 'remark', 'payWay', 'rechargeVoucher', 'name', 'status', 'reson', 'rechargeTime', 'createTime', 'operation', ] + 'remark', 'payWay', 'rechargeVoucher', 'name', 'status', 'reson', 'rechargeTime', 'createTime' ] const selectedColumns = ref([...defaultColumns]) //这是获取用户信息的接口 const adminData = ref({}) @@ -646,9 +646,9 @@ const trimJwCode = () => { -
- 显示列: - +
+ 请选择您想看到的数据: +
diff --git a/gold-system/src/views/consume/addConsume.vue b/gold-system/src/views/consume/addConsume.vue index 09689a6..0d969b9 100644 --- a/gold-system/src/views/consume/addConsume.vue +++ b/gold-system/src/views/consume/addConsume.vue @@ -39,6 +39,7 @@ const addConsume = ref({ rechargeCoin: 0, taskCoin: 0, updateType: "1", + indexName:"", //这个是指标字段,后面绑定 }); // 这是添加消费信息的接口 const add = async function () { @@ -130,6 +131,18 @@ const rules = reactive({ { required: true, message: "消费金币总数不能为空", trigger: "blur" }, { validator: checkFreeGoldRadio, trigger: "blur" }, ], + indexName: [ + { + validator: (rule, value, callback) => { + if (isHC.value === 1 && !value) { + callback(new Error("请选择指标")); + } else { + callback(); + } + }, + trigger: ["change", "blur"], + }, + ] }); //这是重置方法 const delteConsume = function () { @@ -305,17 +318,22 @@ const getIndexs = async function (type) { const isHC = ref(0); const handleProductSelect = (productName) => { // 根据商品名称获取对应的商品信息 - indexs.value.productName = productName; - if (productName == "homilychart") { + // indexs.value.productName = productName;为什么直接绑定??? + if (productName === "homilychart") { isHC.value = 1; + addConsume.value.productName = "homilychart"; // 商品名 + addConsume.value.indexName = ""; // 指标名 } else { isHC.value = 0; + addConsume.value.productName = productName; + addConsume.value.indexName = ""; } }; const indexs = ref([]); -const handleIndexSelect = (indexName) => { - indexs.value.productName = "homilychart" + indexName; - console.log("选择的指标是", indexs.value.productName); +const handleIndexSelect = () => { + if (isHC.value === 1 && addConsume.value.indexName) { + addConsume.value.productName = "homilychart" + addConsume.value.indexName; + } }; // 挂载 @@ -388,12 +406,13 @@ const handleSelectBlur = (value) => { />
- + + 查询 - 重置 + 查询
diff --git a/gold-system/src/views/recharge/addRecharge.vue b/gold-system/src/views/recharge/addRecharge.vue index 22d6c10..b78cb46 100644 --- a/gold-system/src/views/recharge/addRecharge.vue +++ b/gold-system/src/views/recharge/addRecharge.vue @@ -84,7 +84,7 @@ const add = async function () { addRecharge.value.rechargeVoucher = '' addRecharge.value.rechargeWay = '客服充值' addRecharge.value.freeGold = '' - addRecharge.value.rechargeGold = 1 + addRecharge.value.rechargeGold = null addRecharge.value.paidGold = '' imageUrl.value = '' Rate.value = null From 0e6871321eb287556fc05eb196a7685895365cc1 Mon Sep 17 00:00:00 2001 From: lihuilin Date: Mon, 12 May 2025 16:20:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=94=B9=E5=AE=8C=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E5=8F=B0=EF=BC=8C=E5=8F=AF=E4=BB=A5=E6=8F=90=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gold-system/src/views/workspace/index.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gold-system/src/views/workspace/index.vue b/gold-system/src/views/workspace/index.vue index 7f7e0c2..dc8fe17 100644 --- a/gold-system/src/views/workspace/index.vue +++ b/gold-system/src/views/workspace/index.vue @@ -1019,7 +1019,7 @@ onMounted(async function () { tooltip: { trigger: 'item', position: ['15%', '-3%'], - show:true, //控制上方小卡片是否展示 + show:false, //控制上方小卡片是否展示 formatter: function (params) { return params.seriesName + '
' + params.name } @@ -1029,7 +1029,7 @@ onMounted(async function () { left: 'center', orient: 'vertical', // 控制点击事件 - selectedMode: true, + selectedMode: false, }, series: [ { @@ -1061,6 +1061,7 @@ onMounted(async function () { var yearConsumePie = echarts.init(document.getElementById('yearConsume')) const option4 = { tooltip: { + show:false, //控制上方小卡片是否展示 trigger: 'item', position: ['15%', '-3%'], formatter: function (params) { @@ -1070,7 +1071,8 @@ onMounted(async function () { legend: { bottom: '-1%', left: 'center', - orient: 'vertical' + orient: 'vertical', + selectedMode: false, }, grid: { top: '0%' // 设置图表距离容器顶部的距离为10%,使饼图上移 @@ -1105,6 +1107,7 @@ onMounted(async function () { var nowGoldPie = echarts.init(document.getElementById('nowGold')) const option5 = { tooltip: { + show: false, trigger: 'item', position: ['15%', '-3%'], formatter: function (params) { @@ -1122,6 +1125,7 @@ onMounted(async function () { } }, legend: { + selectedMode: false, bottom: '-1%', left: 'center', orient: 'vertical' From 3356c466037e0d2c977e8809cb1b437fe0744ab0 Mon Sep 17 00:00:00 2001 From: lihuilin Date: Mon, 12 May 2025 17:46:26 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=94=B9=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gold-system/src/views/consume/addConsume.vue | 1 + gold-system/src/views/managerecharge/rate.vue | 12 ++++++------ gold-system/src/views/recharge/allRecharge.vue | 9 +++------ gold-system/src/views/usergold/index.vue | 7 ++++--- gold-system/stats.html | 2 +- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/gold-system/src/views/consume/addConsume.vue b/gold-system/src/views/consume/addConsume.vue index 0d969b9..02954f7 100644 --- a/gold-system/src/views/consume/addConsume.vue +++ b/gold-system/src/views/consume/addConsume.vue @@ -133,6 +133,7 @@ const rules = reactive({ ], indexName: [ { + required: true, validator: (rule, value, callback) => { if (isHC.value === 1 && !value) { callback(new Error("请选择指标")); diff --git a/gold-system/src/views/managerecharge/rate.vue b/gold-system/src/views/managerecharge/rate.vue index 8029380..2a4b7e3 100644 --- a/gold-system/src/views/managerecharge/rate.vue +++ b/gold-system/src/views/managerecharge/rate.vue @@ -101,8 +101,8 @@ const getToday = () => { const today = new Date() // 格式化开始时间 const startDate = moment(today).startOf('day').format('YYYY-MM-DD HH:mm:ss') - // 格式化结束时间 - const endDate = moment(today).endOf('day').format('YYYY-MM-DD HH:mm:ss') + // 格式化结束时间,将结束时间设为当天 00:00:00 + const endDate = moment(today).add(1, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss') time.value.startTime = startDate time.value.endTime = endDate search() @@ -113,8 +113,8 @@ const getYesterday = () => { const yesterday = moment().subtract(1, 'days') // 格式化开始时间 const startDate = yesterday.startOf('day').format('YYYY-MM-DD HH:mm:ss') - // 格式化结束时间 - const endDate = yesterday.endOf('day').format('YYYY-MM-DD HH:mm:ss') + // 格式化结束时间,将结束时间设为当天 00:00:00 + const endDate = yesterday.add(1, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss') time.value.startTime = startDate time.value.endTime = endDate search() @@ -124,8 +124,8 @@ const getYesterday = () => { const get7Days = () => { // 格式化开始时间 const startDate = moment().subtract(6, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss') - // 格式化结束时间 - const endDate = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss') + // 格式化结束时间,将结束时间设为当天 00:00:00 + const endDate = moment().add(1, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss') time.value.startTime = startDate time.value.endTime = endDate search() diff --git a/gold-system/src/views/recharge/allRecharge.vue b/gold-system/src/views/recharge/allRecharge.vue index d81297b..e1fc6e9 100644 --- a/gold-system/src/views/recharge/allRecharge.vue +++ b/gold-system/src/views/recharge/allRecharge.vue @@ -214,8 +214,7 @@ const getToday = function () { const endDate = new Date( today.getFullYear(), today.getMonth(), - today.getDate(), - 23, 59, 59 + today.getDate() + 1 ) getTime.value = [startDate, endDate] // 格式化时间 @@ -238,8 +237,7 @@ const getYesterday = function () { const endDate = new Date( yesterday.getFullYear(), yesterday.getMonth(), - yesterday.getDate(), - 23, 59, 59 + yesterday.getDate() + 1 ) getTime.value = [startDate, endDate] // 格式化时间 @@ -261,8 +259,7 @@ const get7Days = function () { const endDate = new Date( today.getFullYear(), today.getMonth(), - today.getDate(), - 23, 59, 59 + today.getDate() + 1 ) getTime.value = [startDate, endDate] // 格式化时间 diff --git a/gold-system/src/views/usergold/index.vue b/gold-system/src/views/usergold/index.vue index f0175cf..e0bae00 100644 --- a/gold-system/src/views/usergold/index.vue +++ b/gold-system/src/views/usergold/index.vue @@ -152,16 +152,17 @@ const reset = function () { const getToday = function () { const today = moment() const startDate = today.startOf('day').toDate() - const endDate = today.endOf('day').toDate() + const endDate = today.add(1, 'days').startOf('day').toDate() getTime.value = [startDate, endDate] search() } // 昨天 const getYesterday = function () { + const today = moment() const yesterday = moment().subtract(1, 'day') const startDate = yesterday.startOf('day').toDate() - const endDate = yesterday.endOf('day').toDate() + const endDate = today.startOf('day').toDate() getTime.value = [startDate, endDate] search() } @@ -169,7 +170,7 @@ const getYesterday = function () { // 近7天 const get7Days = function () { const startDate = moment().subtract(6, 'day').startOf('day').toDate() - const endDate = moment().endOf('day').toDate() + const endDate = moment().add(1,'days').startOf('day').toDate() getTime.value = [startDate, endDate] search() } diff --git a/gold-system/stats.html b/gold-system/stats.html index 640cf61..1acf0be 100644 --- a/gold-system/stats.html +++ b/gold-system/stats.html @@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {