From 460781a46366c9b6deea6371a32227f58d80786b Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Tue, 26 Dec 2023 11:35:08 +0800 Subject: [PATCH] 2023-12-26 --- src/store/modules/user.js | 10 ++++- .../contract/components/editorContract.vue | 2 +- src/views/dashboard/components/PieChart.vue | 2 +- src/views/dashboard/index.vue | 15 ++++--- .../inOut/component/addExpenseAccount.vue | 43 ++++++++++++------- src/views/inOut/expenseAccount.vue | 4 +- 6 files changed, 48 insertions(+), 28 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 7799326..cf700fc 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -21,6 +21,7 @@ const getDefaultState = () => { name: '', username:'', avatar: '', + min_allow_level: 2, department: {}, roles: [], oaToken: '' @@ -36,6 +37,9 @@ const mutations = { SET_TOKEN: (state, token) => { state.token = token }, + SET_LEVEL: (state, level=2) => { + state.min_allow_level = level + }, SET_NAME: (state, name) => { state.name = name }, @@ -134,7 +138,8 @@ const actions = { name, username, avatar, - department + department, + min_allow_level } = response commit('SET_USERNAME',username) @@ -142,7 +147,8 @@ const actions = { commit('SET_ROLES', roles) commit('SET_NAME', name) commit('SET_AVATAR', avatar) - commit('SET_DEPARTMENT',department) + commit('SET_DEPARTMENT', department) + commit('SET_LEVEL', min_allow_level) getOatoken().then(res => { diff --git a/src/views/contract/components/editorContract.vue b/src/views/contract/components/editorContract.vue index eb1a8bf..bb6a6c2 100644 --- a/src/views/contract/components/editorContract.vue +++ b/src/views/contract/components/editorContract.vue @@ -400,7 +400,7 @@ import { resetSelect } from '@/utils' } } return { - userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"], + userList: ["ma_sm", "admin", "yu_l","wang_yx","li_f","chen_y"], user: null, adminEdit: false, isFocus: false, diff --git a/src/views/dashboard/components/PieChart.vue b/src/views/dashboard/components/PieChart.vue index bc9633b..1ff6d1f 100644 --- a/src/views/dashboard/components/PieChart.vue +++ b/src/views/dashboard/components/PieChart.vue @@ -26,7 +26,7 @@ default: '300px' }, chartData: { - type: Object + type: [Object,Array] } }, data() { diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index b2717d5..02179f3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -8,8 +8,8 @@ - - + +
预算总体执行情况
- +
@@ -191,7 +191,7 @@ -
+