From 121b97b5ce9864bea0afc5da66674258ec58ff0b Mon Sep 17 00:00:00 2001 From: jiangweiguo <1578967617@qq.com> Date: Thu, 23 May 2024 13:56:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8A=A5=E8=A1=A8=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/bs/chart.js | 58 ++++ src/components/UploadFile/index.vue | 2 +- src/router/modules/reportForms.js | 14 + src/router/routes.js | 4 +- .../myNewClaim/components/UserList.vue | 224 +++++++------- src/views/home/index.scss | 3 +- src/views/home/index.vue | 159 +++++----- .../myReportForms/components/LineChart.vue | 126 ++++++++ .../myReportForms/components/RoundChart.vue | 99 +++++++ src/views/reportForms/myReportForms/index.vue | 273 ++++++++++++++++++ 11 files changed, 789 insertions(+), 174 deletions(-) create mode 100644 src/api/bs/chart.js create mode 100644 src/router/modules/reportForms.js create mode 100644 src/views/reportForms/myReportForms/components/LineChart.vue create mode 100644 src/views/reportForms/myReportForms/components/RoundChart.vue create mode 100644 src/views/reportForms/myReportForms/index.vue diff --git a/package.json b/package.json index 4f11f8b..d3cbc1b 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "crypto-js": "^4.1.1", "dayjs": "^1.11.5", "dingtalk-jsapi": "^2.15.2", + "echarts": "^5.5.0", "exif-js": "^2.3.0", "html2canvas": "^1.4.1", "js-base64": "^3.7.5", diff --git a/src/api/bs/chart.js b/src/api/bs/chart.js new file mode 100644 index 0000000..0e38dba --- /dev/null +++ b/src/api/bs/chart.js @@ -0,0 +1,58 @@ +import request from '@/plugin/axios' + +// 申请单报表 +export function applyReportApi(query) { + return request({ + url: 'bs/expense-apply/getreport', + method: 'get', + params: query, + }) +} +// 申请单报表 +export function claimReportApi(query) { + return request({ + url: 'bs/expense-claim/getreport', + method: 'get', + params: query, + }) +} + +// 报表 +export function gatherMsgApi(query) { + return request({ + url: 'bs/statement/gathering ', + method: 'get', + }) +} + +// 申请单报表 +export function paymentMsgApi(query) { + return request({ + url: 'bs/statement/payment', + method: 'get', + }) +} + +// 付款饼图 +export function paymentPieApi(query) { + return request({ + url: '/bs/statement/paymentPie', + method: 'get', + }) +} +// 收款饼图 +export function gatheringPieApi(query) { + return request({ + url: '/bs/statement/gatheringPie', + method: 'get', + }) +} + +// 供应商柱状图 +export function paymentColumnarApi(query) { + return request({ + url: '/bs/statement/paymentColumnar', + method: 'get', + }) +} + diff --git a/src/components/UploadFile/index.vue b/src/components/UploadFile/index.vue index 69202d3..12505f9 100644 --- a/src/components/UploadFile/index.vue +++ b/src/components/UploadFile/index.vue @@ -143,7 +143,7 @@ export default { this.$loading(true, 'file') this.uploadFiles(newList) .then((res) => { - ;(res || []).map((item) => { + (res || []).map((item) => { this.list.push(item) }) this.$loading(false, 'file') diff --git a/src/router/modules/reportForms.js b/src/router/modules/reportForms.js new file mode 100644 index 0000000..9406b01 --- /dev/null +++ b/src/router/modules/reportForms.js @@ -0,0 +1,14 @@ +import layoutHome from '../../layout/index.vue' + +const meta = { requiresAuth: true } + +export default { + path: '/reportForms', + name: 'reportForms', + meta, + redirect: { name: 'reportForms' }, + component: layoutHome, + children: (pre => [ + { path: '/myReportForms', name: `${pre}myReportForms`, component: () => import('@/views/reportForms/myReportForms'), meta: { cache: true, title: '我的报表' } }, + ])('reportForms-') +} diff --git a/src/router/routes.js b/src/router/routes.js index 9c42c7b..3b0ed5b 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -1,6 +1,7 @@ import layoutHome from '../layout/index.vue' import company from './modules/company' import contract from './modules/contract' +import reportForms from './modules/reportForms' export const frameInRoutes = [ { path: '/', @@ -13,7 +14,8 @@ export const frameInRoutes = [ ])('home-') }, company, - contract + contract, + reportForms ] export const frameOutRoutes = [ diff --git a/src/views/company/myNewClaim/components/UserList.vue b/src/views/company/myNewClaim/components/UserList.vue index c82bd68..b92baef 100644 --- a/src/views/company/myNewClaim/components/UserList.vue +++ b/src/views/company/myNewClaim/components/UserList.vue @@ -1,39 +1,58 @@ diff --git a/src/views/reportForms/myReportForms/components/LineChart.vue b/src/views/reportForms/myReportForms/components/LineChart.vue new file mode 100644 index 0000000..0d3beb2 --- /dev/null +++ b/src/views/reportForms/myReportForms/components/LineChart.vue @@ -0,0 +1,126 @@ + + + diff --git a/src/views/reportForms/myReportForms/components/RoundChart.vue b/src/views/reportForms/myReportForms/components/RoundChart.vue new file mode 100644 index 0000000..753ba0e --- /dev/null +++ b/src/views/reportForms/myReportForms/components/RoundChart.vue @@ -0,0 +1,99 @@ + + + diff --git a/src/views/reportForms/myReportForms/index.vue b/src/views/reportForms/myReportForms/index.vue new file mode 100644 index 0000000..e1a5fd3 --- /dev/null +++ b/src/views/reportForms/myReportForms/index.vue @@ -0,0 +1,273 @@ + + + + +