diff --git a/vue/gold-system/src/main.ts b/vue/gold-system/src/main.ts index 68a9507..5f84645 100644 --- a/vue/gold-system/src/main.ts +++ b/vue/gold-system/src/main.ts @@ -2,6 +2,7 @@ import { createApp } from 'vue' import App from './App.vue' import router from './router' import ElementPlus from 'element-plus' +import zhCn from 'element-plus/es/locale/lang/zh-cn' import 'element-plus/dist/index.css' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import './assets/css/common.css'; // 引入公共CSS文件 @@ -9,7 +10,9 @@ import './assets/css/common.css'; // 引入公共CSS文件 const app = createApp(App) for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component) - } + app.component(key, component) +} -app.use(ElementPlus).use(router).mount('#app'); +app.use(ElementPlus, { + locale: zhCn, +}).use(router).mount('#app'); diff --git a/vue/gold-system/src/util/http.js b/vue/gold-system/src/util/http.js index e9aabc2..48e95c6 100644 --- a/vue/gold-system/src/util/http.js +++ b/vue/gold-system/src/util/http.js @@ -21,7 +21,7 @@ export default function (options) { //status:HTTP状态码,例如200表示请求成功。 //data:服务器返回的数据。 // statusText:HTTP状态文本,例如"OK"表示请求成功。 - console.log(data); + // console.log(data); if (status == 200) { return data; } else { diff --git a/vue/gold-system/src/views/audit/rechargeAudit.vue b/vue/gold-system/src/views/audit/rechargeAudit.vue index 18764bd..d9e1aac 100644 --- a/vue/gold-system/src/views/audit/rechargeAudit.vue +++ b/vue/gold-system/src/views/audit/rechargeAudit.vue @@ -295,6 +295,7 @@ const pass = function (row) { passObj.value.adminId = admin.value.adminId; passObj.value.auditId = row.auditId; passObj.value.status = 1; + passObj.value.rechargeId=row.rechargeId; console.log("通过对象", passObj.value); }; diff --git a/vue/gold-system/src/views/managerecharge/activity.vue b/vue/gold-system/src/views/managerecharge/activity.vue index ba46c6d..13d34dc 100644 --- a/vue/gold-system/src/views/managerecharge/activity.vue +++ b/vue/gold-system/src/views/managerecharge/activity.vue @@ -22,15 +22,9 @@ const getAdminData = async function () { console.log("请求失败", error); } }; -getAdminData(); + //变量 -// 用户对象假的 -const admin = ref({ - adminId: 1, - name: "赵刚", - area: "中国", -}); //活动表格数据 const tableData = ref([]); //分页总条目 @@ -122,8 +116,8 @@ const addActicity = function () { console.log("Date", new Date()); //添加对象初始化操作 addObj.value = {}; - addObj.value.adminId = admin.value.adminId; - addObj.value.adminName = admin.value.name; + addObj.value.adminId = adminData.value.adminId; + addObj.value.adminName = adminData.value.name; addObj.value.freeGold = "0"; addObj.value.rechargeRatio = 0; addObj.value.startTime = null; @@ -278,6 +272,7 @@ const checkNumber = function () { // 挂载 onMounted(async function () { + await getAdminData(); get(); }); @@ -381,12 +376,12 @@ onMounted(async function () {
共{{ total }}条,每页
- +
+ :current-page="getObj.pageNum" @current-change="get">
跳至
diff --git a/vue/gold-system/src/views/workspace/index.vue b/vue/gold-system/src/views/workspace/index.vue index cfb0fe3..f638b7c 100644 --- a/vue/gold-system/src/views/workspace/index.vue +++ b/vue/gold-system/src/views/workspace/index.vue @@ -5,6 +5,7 @@ import { VscInfo } from "vue-icons-plus/vsc"; import * as bs from "vue-icons-plus/bs"; import axios, { all } from "axios"; import API from "../../api/index"; +import moment from "moment"; // 变量 // 加载对象 @@ -15,6 +16,9 @@ const statistics = ref({}); const getYearConsumeCoin = ref({}); const getDayConsumeCoin = ref({}); +// 中间统计图搜索参数 +const searchTime = ref([]); + // 月份柱状图 // 充值 const payTotalRecharge = ref(0); @@ -277,13 +281,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 = [ @@ -303,13 +307,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 = [ @@ -329,13 +333,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 = [ @@ -355,13 +359,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 = [ @@ -500,6 +504,105 @@ const handleChange = function () { goldType.value = "全部类型"; getAreaRank(); }; +// 时间范围控制 +const disabledDate = function (date) { + const currentDate = new Date(); + const startDate = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1); + const endDate = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0); + if(date >= startDate && date <= endDate){ + return false; + } + return true; +} +// 本日 +const today = function () { + const current = new Date(); + const startDate = new Date( + current.getFullYear(), + current.getMonth(), + current.getDate() + ); + const endDate = new Date( + current.getFullYear(), + current.getMonth(), + current.getDate() + 1 + ); + searchTime.value = [startDate, endDate]; + search(); + // console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "至" + moment(searchTime.value[1]).format("YYYY-MM-DD")) + +}; +// 本周 +const thisWeek= function () { + const current = new Date(); + const startDate = new Date( + current.getFullYear(), + current.getMonth(), + current.getDate() - 6 + ); + const endDate = new Date( + current.getFullYear(), + current.getMonth(), + current.getDate() + 1 + ); + searchTime.value = [startDate, endDate]; + search(); + // console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "至" + moment(searchTime.value[1]).format("YYYY-MM-DD")) +}; +// 本月 +const thisMonth = function () { + const current = new Date(); + const startDate = new Date( + current.getFullYear(), + current.getMonth(), + 1 + ); + const endDate = new Date( + current.getFullYear(), + current.getMonth()+1, + 0 + ); + searchTime.value = [startDate, endDate]; + search(); + // console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "至" + moment(searchTime.value[1]).format("YYYY-MM-DD")) +}; +// 本年 +const thisYear = function () { + const current = new Date(); + const startDate = new Date( + current.getFullYear(), + 0, + 1 + ); + const endDate = new Date( + current.getFullYear()+1, + 0, + 0 + ); + searchTime.value = [startDate, endDate]; + 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 search=function(){ + console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "至" + moment(searchTime.value[1]).format("YYYY-MM-DD")) + getAreaRankObj.value.searchStartTime = moment(searchTime.value[0]).format("YYYY-MM-DD"); + getAreaRankObj.value.searchEndTime = moment(searchTime.value[1]).format("YYYY-MM-DD"); + if(getAreaRankObj.value.searchStartTime=="Invalid date"){ + delete getAreaRankObj.value.searchStartTime; + } + if(getAreaRankObj.value.searchEndTime=="Invalid date"){ + delete getAreaRankObj.value.searchEndTime; + } + console.log("getAreaRankObj", getAreaRankObj.value); + getAreaRank(); +} + + // 切换平台 const changePlatform = function () { console.log("changePlatform", platform.value); @@ -906,37 +1009,26 @@ onMounted(async function () {
较前一天 {{ formatNum(getSumCoin.coinDifference) }} - +
较前一天 {{ formatNum(getSumCoin.coinDifference) }} - +
较前一天 {{ formatNum(getSumCoin.coinDifference) }} - +

- + @@ -948,8 +1040,7 @@ onMounted(async function () {

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

-