diff --git a/src/api/reagent/applymanage.js b/src/api/reagent/applymanage.js new file mode 100644 index 0000000..e9b6099 --- /dev/null +++ b/src/api/reagent/applymanage.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +export function get_apply_list(data) { + return request({ + url: '/api/temporary_auth/get_list', + method: 'post', + data + }) +} + +export function update_solve(data) { + return request({ + url: '/api/temporary_auth/update_solve', + method: 'post', + data + }) +} diff --git a/src/api/reagent/createapply.js b/src/api/reagent/createapply.js new file mode 100644 index 0000000..7e31549 --- /dev/null +++ b/src/api/reagent/createapply.js @@ -0,0 +1,25 @@ +import request from '@/utils/request' + +export function get_drug_group_list(data) { + return request({ + url: '/api/temporary_auth/get_drug_group_list', + method: 'post', + data + }) +} + +export function get_pt_user_list(data) { + return request({ + url: '/api/user/get_user_list', + method: 'post', + data + }) +} + +export function add_apply(data) { + return request({ + url: '/api/temporary_auth/add', + method: 'post', + data + }) +} diff --git a/src/router/modules/reagent.js b/src/router/modules/reagent.js index 9866693..205056c 100644 --- a/src/router/modules/reagent.js +++ b/src/router/modules/reagent.js @@ -127,6 +127,34 @@ const reagentRouter = [ } ] }, + { + path: '/reagent/createapply', + component: Layout, + redirect: '/reagent/createapply/index', + meta: { classification: 'reagent', module_code: 'CreateApplyView' }, + children: [ + { + path: 'index', + name: 'createapply', + component: () => import('@/views/reagent/createapply/index'), + meta: { title: '创建申请', icon: '创建申请', classification: 'reagent' } + } + ] + }, + { + path: '/reagent/applymanagement', + component: Layout, + redirect: '/reagent/applymanagement/index', + meta: { classification: 'reagent', module_code: 'ApplyManagementView' }, + children: [ + { + path: 'index', + name: 'applymanagement', + component: () => import('@/views/reagent/applymanagement/index'), + meta: { title: '申请管理', icon: '申请管理', classification: 'reagent' } + } + ] + }, { path: '/reagent/weighing', component: Layout, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 35ebd01..f17c905 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ const getDefaultState = () => { return { + id : '', token: '', name: '', avatar: '', @@ -32,6 +33,9 @@ const mutations = { }, SET_USERMANAGE_AUTH: (state, userAuth) =>{ state.userAuth = userAuth + }, + SET_USER_ID: (state, id) => { + state.id = id } } diff --git a/src/utils/index.js b/src/utils/index.js index 8041a77..0926478 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -169,6 +169,12 @@ export function filterAsyncRoutes(routers, roles) { if (item.meta && item.meta.module_code === 'MainOverview') { return true } + if (item.meta && item.meta.module_code === 'CreateApplyView') { + return true + } + if (item.meta && item.meta.module_code === 'ApplyManagementView') { + return true + } return !!roles.find(it => it.module_code === item.meta.module_code) }) } diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 48af916..6c4a975 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -256,6 +256,7 @@ export default { this.$store.commit('user/SET_AVATAR', process.env.VUE_APP_FACE_API + '/' +user_info.avatar_url) } // this.$store.commit('user/SET_AVATAR', user_info.avatar_url) + this.$store.commit('user/SET_USER_ID', user_info.user_id) this.$store.commit('user/SET_NAME', user_info.real_name) this.$store.commit('user/SET_TOKEN', token) this.$store.dispatch('permission/generateRoutes') diff --git a/src/views/reagent/applymanagement/index.vue b/src/views/reagent/applymanagement/index.vue new file mode 100644 index 0000000..b9dba16 --- /dev/null +++ b/src/views/reagent/applymanagement/index.vue @@ -0,0 +1,339 @@ + + + + + + + diff --git a/src/views/reagent/createapply/index.vue b/src/views/reagent/createapply/index.vue new file mode 100644 index 0000000..6d5d029 --- /dev/null +++ b/src/views/reagent/createapply/index.vue @@ -0,0 +1,271 @@ + + + + + + +