From 6bf2569b46b681b12c3988a58288dac6f3d68e97 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Tue, 23 Jan 2024 10:20:26 +0800 Subject: [PATCH] up --- public/index.html | 3 + src/store/modules/user.js | 24 ++- src/views/record/components/addRecord.vue | 37 +++-- src/views/record/index.vue | 3 +- src/views/record/personinfo.vue | 32 ++-- .../viewrecords/components/addViewRecord.vue | 119 ++++++++++++--- src/views/viewrecords/components/check.vue | 24 +-- src/views/viewrecords/index.vue | 142 +++++++++++------- 8 files changed, 264 insertions(+), 120 deletions(-) diff --git a/public/index.html b/public/index.html index 55e0e78..4d125ad 100644 --- a/public/index.html +++ b/public/index.html @@ -4,6 +4,9 @@ + + + <%= webpackConfig.name %> diff --git a/src/store/modules/user.js b/src/store/modules/user.js index c288974..cc2af73 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -16,7 +16,8 @@ const getDefaultState = () => { return { token: getToken(), name: '', - avatar: '', + avatar: '', + is_number:false, // 是否可以编辑残疾证信息 roles: [] } } @@ -38,6 +39,9 @@ const mutations = { }, SET_ROLES: (state, roles) => { state.roles = roles + }, + SET_ISNUMBER:(state, is_number)=>{ + state.is_number = is_number } } @@ -79,19 +83,29 @@ const actions = { if (!response) { reject('身份验证失败请重新登录') - } + } + if(response["role"]){ + for(var k of response["role"]){ + if(k.name==='残疾证管理'){ + response["is_number"] = true + } + } + } + response["roles"] = ["admin"]; const { roles, name, - avatar + avatar, + is_number } = response - + commit('SET_AVATAR', avatar) commit('SET_ROLES', roles) commit('SET_NAME', name) - commit('SET_AVATAR', avatar) + commit('SET_AVATAR', avatar) + commit('SET_ISNUMBER', is_number) resolve(response) }).catch(error => { reject(error) diff --git a/src/views/record/components/addRecord.vue b/src/views/record/components/addRecord.vue index e11fef7..977f304 100644 --- a/src/views/record/components/addRecord.vue +++ b/src/views/record/components/addRecord.vue @@ -198,7 +198,7 @@ *残疾证:
- +
@@ -208,7 +208,7 @@ *残疾类别:
- + @@ -221,7 +221,7 @@ *残疾等级:
- + @@ -234,7 +234,7 @@ 残疾详情:
-
@@ -242,10 +242,10 @@