From b6868eb2053d74ab5e2670975d7512d7b4a1a5cd Mon Sep 17 00:00:00 2001 From: hongxilin <17663930442@163.com> Date: Tue, 17 Dec 2024 17:26:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E4=B8=AD?= =?UTF-8?q?=E9=97=B4=E9=A2=84=E8=AE=BE=E6=97=B6=E9=97=B4=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=98=8E=E6=98=BE=E7=9A=84=E7=82=B9=E5=87=BB=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/gold-system/src/views/workspace/index.vue | 250 ++++++++++---------------- 1 file changed, 96 insertions(+), 154 deletions(-) diff --git a/vue/gold-system/src/views/workspace/index.vue b/vue/gold-system/src/views/workspace/index.vue index b6fb75c..4f90d85 100644 --- a/vue/gold-system/src/views/workspace/index.vue +++ b/vue/gold-system/src/views/workspace/index.vue @@ -17,6 +17,7 @@ const getYearConsumeCoin = ref({}); const getDayConsumeCoin = ref({}); // 中间统计图搜索参数 +const changeTimeRatio=ref("allDays"); const searchTime = ref([]); // 月份柱状图 @@ -210,13 +211,13 @@ const get = async function () { ERPData.value.forEach((item, index) => item == "" ? (ERPData.value[index] = { - value: 0, - name: "第" + (index + 1) + "学科" + 0, - }) + value: 0, + name: "第" + (index + 1) + "学科" + 0, + }) : (ERPData.value[index] = { - value: item[0], - name: "第" + (index + 1) + "学科" + item[0], - }) + value: item[0], + name: "第" + (index + 1) + "学科" + item[0], + }) ); console.log("ERPData", ERPData.value); HCData.value = [ @@ -236,13 +237,13 @@ const get = async function () { HCData.value.forEach((item, index) => item == "" ? (HCData.value[index] = { - value: 0, - name: "第" + (index + 1) + "学科" + 0, - }) + value: 0, + name: "第" + (index + 1) + "学科" + 0, + }) : (HCData.value[index] = { - value: item[0], - name: "第" + (index + 1) + "学科" + item[0], - }) + value: item[0], + name: "第" + (index + 1) + "学科" + item[0], + }) ); console.log("HCData", HCData.value); LinkData.value = [ @@ -262,13 +263,13 @@ const get = async function () { LinkData.value.forEach((item, index) => item == "" ? (LinkData.value[index] = { - value: 0, - name: "第" + (index + 1) + "学科" + 0, - }) + value: 0, + name: "第" + (index + 1) + "学科" + 0, + }) : (LinkData.value[index] = { - value: item[0], - name: "第" + (index + 1) + "学科" + item[0], - }) + value: item[0], + name: "第" + (index + 1) + "学科" + item[0], + }) ); console.log("LinkData", LinkData.value); goldData.value = [ @@ -288,13 +289,13 @@ const get = async function () { goldData.value.forEach((item, index) => item == "" ? (goldData.value[index] = { - value: 0, - name: "第" + (index + 1) + "学科" + 0, - }) + value: 0, + name: "第" + (index + 1) + "学科" + 0, + }) : (goldData.value[index] = { - value: item[0], - name: "第" + (index + 1) + "学科" + item[0], - }) + value: item[0], + name: "第" + (index + 1) + "学科" + item[0], + }) ); console.log("goldData", goldData.value); allData.value = [ @@ -436,7 +437,7 @@ const getMiddleBar = async function () { type: "bar", stack: "total", label: { - show: false, + show: true, }, emphasis: { focus: "series", @@ -449,7 +450,7 @@ const getMiddleBar = async function () { type: "bar", stack: "total", label: { - show: false, + show: true, }, emphasis: { focus: "series", @@ -462,7 +463,7 @@ const getMiddleBar = async function () { type: "bar", stack: "total", label: { - show: false, + show: true, }, emphasis: { focus: "series", @@ -508,7 +509,7 @@ const getMiddleBar = async function () { type: "bar", stack: "total", label: { - show: false, + show: true, }, emphasis: { focus: "series", @@ -521,7 +522,7 @@ const getMiddleBar = async function () { type: "bar", stack: "total", label: { - show: false, + show: true, }, emphasis: { focus: "series", @@ -534,7 +535,7 @@ const getMiddleBar = async function () { type: "bar", stack: "total", label: { - show: false, + show: true, }, emphasis: { focus: "series", @@ -687,17 +688,34 @@ const thisYear = function () { search(); // console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "至" + moment(searchTime.value[1]).format("YYYY-MM-DD")) }; +// 全部 const allTime = function () { searchTime.value = ["", ""]; search(); }; +// 时间选择器 +const changeTime=function(){ + console.log("changeTimeRatio",changeTimeRatio.value); + if(changeTimeRatio.value=="allDays"){ + allTime(); + }else if(changeTimeRatio.value=="week"){ + thisWeek(); + }else if(changeTimeRatio.value=="month"){ + thisMonth(); + }else if(changeTimeRatio.value=="year"){ + thisYear(); + }else if(changeTimeRatio.value=="day"){ + today(); + } +} + // 根据时间搜索 const search = function () { console.log( "searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + - "至" + - moment(searchTime.value[1]).format("YYYY-MM-DD") + "至" + + moment(searchTime.value[1]).format("YYYY-MM-DD") ); getMiddleBarObj.value.searchStartTime = moment(searchTime.value[0]).format( @@ -879,7 +897,7 @@ onMounted(async function () { type: "bar", stack: "total", label: { - show: false, + show: true, }, emphasis: { focus: "series", @@ -892,7 +910,7 @@ onMounted(async function () { type: "bar", stack: "total", label: { - show: false, + show: true, }, emphasis: { focus: "series", @@ -905,7 +923,7 @@ onMounted(async function () { type: "bar", stack: "total", label: { - show: false, + show: true, }, emphasis: { focus: "series", @@ -1067,37 +1085,26 @@ onMounted(async function () {
较前一天 {{ formatNum(getSumCoin.coinDifference) }} - +
较前一天 {{ formatNum(getSumCoin.coinDifference) }} - +
较前一天 {{ formatNum(getSumCoin.coinDifference) }} - +

- + @@ -1109,8 +1116,7 @@ onMounted(async function () {

折合新币累计金额 {{ formatNum(Math.abs(statistics.totalSumCoin)) }}

-