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)) }}

-