diff --git a/vue/gold-system/src/views/recharge/adminRecharge.vue b/vue/gold-system/src/views/recharge/adminRecharge.vue index 851dd3f..af66f35 100644 --- a/vue/gold-system/src/views/recharge/adminRecharge.vue +++ b/vue/gold-system/src/views/recharge/adminRecharge.vue @@ -6,20 +6,29 @@ import { AiFillRead } from "vue-icons-plus/ai"; import axios from "axios"; import moment from "moment"; import API from "../../api/index.js"; +//这是获取用户信息的接口 +const adminData = ref({}); +const getAdminData = async function () { + try { + const result = await API.post( + "http://192.168.8.93:10010/admin/userinfo", + {} + ); + adminData.value = result; + rechargeVo.value.adminId = adminData.value.adminId; + console.log("请求成功", result); + console.log("用户信息", adminData.value); + } catch (error) { + console.log("请求失败", error); + } +}; // 变量 -// 用户对象假的 -const admin = ref({ - adminId: 1, - name: "赵刚", - area: "中国", -}); - // 充值明细表格 const tableData = ref([]); // 搜索=========================================== // 搜索recharge const rechargeVo = ref({ - adminId: admin.value.adminId, + adminId: adminData.value.adminId, }); // 搜索对象 const getObj = ref({ @@ -313,6 +322,7 @@ const checkNumber = function () { // 挂载 onMounted(async function () { + await getAdminData(); await get(); getActivity(); await getArea(); diff --git a/vue/gold-system/src/views/workspace/index.vue b/vue/gold-system/src/views/workspace/index.vue index 4f260b9..fe37c33 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)) }}

-