From 3869ff242e358c8d7bf731bd2c32716acb0a26a5 Mon Sep 17 00:00:00 2001 From: aBin Date: Wed, 26 Jan 2022 14:21:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/projectFinance.js | 52 +- components/BonusCollection.vue | 122 ++++ components/HistoricalApplication.vue | 155 +++++ pages/Initiate-application.vue | 877 ++++++++++++++------------- pages/applicant.vue | 166 ++--- plugins/vant.js | 108 ++-- 6 files changed, 899 insertions(+), 581 deletions(-) create mode 100644 components/BonusCollection.vue create mode 100644 components/HistoricalApplication.vue diff --git a/apis/projectFinance.js b/apis/projectFinance.js index c597b1f..f4d354b 100644 --- a/apis/projectFinance.js +++ b/apis/projectFinance.js @@ -1,23 +1,29 @@ -import http from 'apis/axios'; - -const apiUrl = import.meta.env.VITE_API_URL; -const ptccsens = `${apiUrl}/ptccsens/v1.0`; -const projectFinance = `${ptccsens}/projectFinance`; - -// 追加预算 -export const addBudget = params => http.post(`${projectFinance}/addBudget`, params); - -// 查看所有的费用申请 -export const queryAllMoneyApply = params => http.post(`${projectFinance}/queryAllMoneyApply`, params); - -// 查看项目下的财务信息 -export const queryFinanceOfProject = params => http.post(`${projectFinance}/queryFinanceOfProject`, params); - -// 查看自己需要审批的申请 -export const queryNeedCheckByMe = params => http.post(`${projectFinance}/queryNeedCheckByMe`, params); - -// 查看项目下的所有任务对应的财务信息 -export const queryProjectFinance = params => http.post(`${projectFinance}/queryProjectFinance`, params); - -// 修改任务或项目的预算和奖金信息 -export const updateFinance = params => http.post(`${projectFinance}/updateFinance`, params); +import http from 'apis/axios'; + +const apiUrl = import.meta.env.VITE_API_URL; +const ptccsens = `${apiUrl}/ptccsens/v1.0`; +const projectFinance = `${ptccsens}/projectFinance`; + +// 追加预算 +export const addBudget = params => + http.post(`${projectFinance}/addBudget`, params); + +// 查看所有的费用申请 +export const queryAllMoneyApply = params => + http.post(`${projectFinance}/queryAllMoneyApply`, params); + +// 查看项目下的财务信息 +export const queryFinanceOfProject = params => + http.post(`${projectFinance}/queryFinanceOfProject`, params); + +// 查看自己需要审批的申请 +export const queryNeedCheckByMe = params => + http.post(`${projectFinance}/queryNeedCheckByMe`, params); + +// 查看项目下的所有任务对应的财务信息 +export const queryProjectFinance = params => + http.post(`${projectFinance}/queryProjectFinance`, params); + +// 修改任务或项目的预算和奖金信息 +export const updateFinance = params => + http.post(`${projectFinance}/updateFinance`, params); diff --git a/components/BonusCollection.vue b/components/BonusCollection.vue new file mode 100644 index 0000000..a5a4fa3 --- /dev/null +++ b/components/BonusCollection.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/components/HistoricalApplication.vue b/components/HistoricalApplication.vue new file mode 100644 index 0000000..5ec705b --- /dev/null +++ b/components/HistoricalApplication.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/pages/Initiate-application.vue b/pages/Initiate-application.vue index 4b7c0fb..282ab5d 100644 --- a/pages/Initiate-application.vue +++ b/pages/Initiate-application.vue @@ -1,427 +1,450 @@ - - - - + + + + diff --git a/pages/applicant.vue b/pages/applicant.vue index 3ac65aa..461b680 100644 --- a/pages/applicant.vue +++ b/pages/applicant.vue @@ -1,78 +1,88 @@ - - - - - - + + + + + diff --git a/plugins/vant.js b/plugins/vant.js index 8439da6..8f1edba 100644 --- a/plugins/vant.js +++ b/plugins/vant.js @@ -1,53 +1,55 @@ -// 目前在 nuxt 中无法按需引入样式,因此采用手动引入的方式 -import 'vant/lib/index.css'; - -import { - Button, - Cell, - CellGroup, - Col, - Icon, - Image, - Row, - NavBar, - Tabs, - Tab, - Search, - Pagination, - Field, - Uploader, - Form, - Popup, - Cascader, - Circle, - Empty, - Popover, - Dialog -} from 'vant'; - -import { defineNuxtPlugin } from '#app'; - -export default defineNuxtPlugin(nuxtApp => { - nuxtApp.vueApp - .use(Row) - .use(Col) - .use(Image) - .use(Icon) - .use(Cell) - .use(Button) - .use(CellGroup) - .use(NavBar) - .use(Tab) - .use(Search) - .use(Pagination) - .use(Field) - .use(Uploader) - .use(Form) - .use(Cascader) - .use(Popup) - .use(Circle) - .use(Tabs) - .use(Empty) - .use(Popover) - .use(Dialog) -}); +// 目前在 nuxt 中无法按需引入样式,因此采用手动引入的方式 +import 'vant/lib/index.css'; + +import { + Button, + Cell, + CellGroup, + Col, + Icon, + Image, + Row, + NavBar, + Tabs, + Tab, + Search, + Pagination, + Field, + Uploader, + Form, + Popup, + Cascader, + Circle, + Empty, + Popover, + Dialog, + Picker, +} from 'vant'; + +import { defineNuxtPlugin } from '#app'; + +export default defineNuxtPlugin(nuxtApp => { + nuxtApp.vueApp + .use(Row) + .use(Col) + .use(Image) + .use(Icon) + .use(Cell) + .use(Button) + .use(CellGroup) + .use(NavBar) + .use(Tab) + .use(Search) + .use(Pagination) + .use(Field) + .use(Uploader) + .use(Form) + .use(Cascader) + .use(Popup) + .use(Circle) + .use(Tabs) + .use(Empty) + .use(Popover) + .use(Dialog) + .use(Picker); +}); From 63935d892e682e18d4a4adc0f3d9f51b8eb79383 Mon Sep 17 00:00:00 2001 From: Min5203 <2318556978@qq.com> Date: Wed, 26 Jan 2022 14:44:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=A5=BC=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BarEcharts.vue | 130 +++++++++++++++++++++++++++++ components/RingEcharts.vue | 148 +++++++++++++++++++++++++++++++++ nuxt.config.ts | 5 +- pages/Initiate-application.vue | 39 --------- pages/applicant.vue | 12 --- pages/index.vue | 84 +++++++++++++++++-- 6 files changed, 357 insertions(+), 61 deletions(-) create mode 100644 components/BarEcharts.vue create mode 100644 components/RingEcharts.vue diff --git a/components/BarEcharts.vue b/components/BarEcharts.vue new file mode 100644 index 0000000..ea31046 --- /dev/null +++ b/components/BarEcharts.vue @@ -0,0 +1,130 @@ + + diff --git a/components/RingEcharts.vue b/components/RingEcharts.vue new file mode 100644 index 0000000..781c268 --- /dev/null +++ b/components/RingEcharts.vue @@ -0,0 +1,148 @@ + + + + + + diff --git a/nuxt.config.ts b/nuxt.config.ts index b7b03f4..0f62890 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -27,6 +27,9 @@ export default defineNuxtConfig({ href:"https://cdn.bootcdn.net/ajax/libs/tailwindcss/2.2.19/tailwind.min.css", }, ], - script: [{ src: 'https://cdn.bootcdn.net/ajax/libs/dayjs/1.10.7/dayjs.min.js' }], + script: [ + { src: 'https://cdn.bootcdn.net/ajax/libs/dayjs/1.10.7/dayjs.min.js' }, + {src:'https://cdn.bootcdn.net/ajax/libs/echarts/5.2.2/echarts.common.js'} + ], }, }); diff --git a/pages/Initiate-application.vue b/pages/Initiate-application.vue index 66b35bf..54944e6 100644 --- a/pages/Initiate-application.vue +++ b/pages/Initiate-application.vue @@ -273,49 +273,10 @@ const billList = ref([ const reviewerList = ref(['冯教授','周亮','李洪明','夏红','麦琪其','薇薇安','卫老师']); //审核人数组 const selected = ref(['冯教授']); //默认的审核人 const showHistory = ref(true); // 根据数据判断是否有历史记录 -const applyData = ref([ - { - applicant:'代用名1', - money:100, - time:'2021/12/31 12:31', - type: 1 - }, - { - applicant:'代用名2', - money:100, - time:'2021/12/31 12:31', - type: 2 - }, - { - applicant:'代用名1', - money:100, - time:'2021/12/31 12:31', - type: 3 - }, - { - applicant:'代用名2', - money:100, - time:'2021/12/31 12:31', - type: 3 - }, - { - applicant:'代用名1', - money:100, - time:'2021/12/31 12:31', - type: 1 - }, - { - applicant:'代用名2', - money:100, - time:'2021/12/31 12:31', - type: 2 - } -]); // 申请的记录 const isSuccess = ref(false) // 上传票据是否成功 const name = ref('') // 提交人的姓名 const applyMoney = ref(5000) // 手动输入时输入的申请的金额 const titleHidden = ref(true) // 上传提示语隐藏 -const currentPage = ref(0) //当前显示页数 const personalType = ref('个人申请') const personalCategory = ref('用款') diff --git a/pages/applicant.vue b/pages/applicant.vue index 15d6a23..16cf19a 100644 --- a/pages/applicant.vue +++ b/pages/applicant.vue @@ -9,16 +9,6 @@ -
@@ -26,8 +16,6 @@
- -
奖金领取记录
diff --git a/pages/index.vue b/pages/index.vue index 4357815..de2eda2 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,6 +1,5 @@