From 987fed48d3d1dfa9c3c70b0df25f5aa07ad2b964 Mon Sep 17 00:00:00 2001 From: wanglei Date: Tue, 10 Jun 2025 15:16:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 1 + ruoyi-ui/src/api/pay/homepage.js | 33 ++ ruoyi-ui/src/main.js | 3 + ruoyi-ui/src/views/index.vue | 550 ++++++++++++++++++++++--------- 4 files changed, 426 insertions(+), 161 deletions(-) create mode 100644 ruoyi-ui/src/api/pay/homepage.js diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index bb8a553..0dd34a3 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -36,6 +36,7 @@ }, "dependencies": { "@babel/parser": "7.7.4", + "@jiaminghi/data-view": "^2.10.0", "@riophae/vue-treeselect": "0.4.0", "axios": "0.24.0", "bpmn-js-token-simulation": "0.10.0", diff --git a/ruoyi-ui/src/api/pay/homepage.js b/ruoyi-ui/src/api/pay/homepage.js new file mode 100644 index 0000000..885af7d --- /dev/null +++ b/ruoyi-ui/src/api/pay/homepage.js @@ -0,0 +1,33 @@ +import request from '@/utils/request' + +export function getPanel(query) { + return request({ + url: '/pay/home/panel', + method: 'get', + params: query + }) +} + +export function getMonthPay(query) { + return request({ + url: '/pay/home/monthPay', + method: 'get', + params: query + }) +} + +export function getDeptPay(query) { + return request({ + url: '/pay/home/deptPay', + method: 'get', + params: query + }) +} + +export function getChuQin(query) { + return request({ + url: '/pay/home/chuqin', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index caf30d7..3e0996a 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -38,6 +38,8 @@ import VueMeta from 'vue-meta' // 字典数据组件 import DictData from '@/components/DictData' +import dataV from '@jiaminghi/data-view' + // 全局方法挂载 Vue.prototype.getDicts = getDicts Vue.prototype.getConfigKey = getConfigKey @@ -62,6 +64,7 @@ Vue.component('ImagePreview', ImagePreview) Vue.use(directive) Vue.use(plugins) Vue.use(VueMeta) +Vue.use(dataV) DictData.install() /** diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index e5ed322..3048786 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -1,191 +1,419 @@ + // 选择公司 + changCompany(id){ + this.gsInfo.active_id = id; + this.reset(); + window.removeEventListener("resize", resizeFun); + this.getReportDateList(); + this.handleLineList(); + this.getHours(); + }, + reset(){ + this.lineChartData= { + actualData: [], + monthList: [] + } + this.srbconfig= { + data: [], + rowNum: null, + unit: '天' + }; + this.pieChartData= { + year: null, + month: null, + workHours: [] + }; + this.barChartData= { + year: null, + month: null, + departList: [], + wages: [] + }; + }, + handleLineList() { + getMonthPay({ tenantId: this.gsInfo.active_id }).then(response => { + response.rows.forEach(item => { + this.lineChartData.actualData.push(Math.round(item.actuallyPayMoney * Math.pow(10, 2)) / Math.pow(10, 2)) + var month = null + month = item.month + '月' + this.lineChartData.monthList.push(month) + }) - -