From 23c99c7cb86069a543c34daa65307e0e3090059e Mon Sep 17 00:00:00 2001 From: FrancisHu <2756004617@qq.com> Date: Wed, 22 May 2024 14:16:00 +0800 Subject: [PATCH] =?UTF-8?q?5.22=E5=AE=81=E5=A4=8F=E9=A2=86=E6=96=99?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E8=8E=B7=E5=8F=96=E6=9D=83=E9=99=90=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/apis.js | 8 ++++++++ apis/http.js | 1 + pages/fetchExam/fetchExam.vue | 14 ++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/apis/apis.js b/apis/apis.js index c744f1e..927d161 100644 --- a/apis/apis.js +++ b/apis/apis.js @@ -246,6 +246,14 @@ const fetchExam = { header ) }, + async getRoleList (data = {} , header = {}){ + return await Http.get( + HttpConfig.systemPath, + HttpConfig.serviceUrl.fetchExam.getRoleList, + data, + header + ) + }, } const newInStore = { diff --git a/apis/http.js b/apis/http.js index 06e4435..53bfa56 100644 --- a/apis/http.js +++ b/apis/http.js @@ -61,6 +61,7 @@ class HttpConfig { subExamCq: '/tm_task/auditLeaseByCompanyCq', // 通过重庆领料审批 rejectExam: '/tm_task/rejectLeaseByCompany', // 驳回领料审批 rejectExamCq: '/tm_task/rejectLeaseByCompanyCq', // 驳回重庆领料审批 + getRoleList: '/role/list', // 获取审批角色 }, fetchMaterialOutStore: { fetchInfoByCode: '/leaseOutDetails/getMaMachineByCode', // 根据maId获取机具详情 diff --git a/pages/fetchExam/fetchExam.vue b/pages/fetchExam/fetchExam.vue index 57bf4f1..5afdb93 100644 --- a/pages/fetchExam/fetchExam.vue +++ b/pages/fetchExam/fetchExam.vue @@ -662,6 +662,19 @@ import { basePath } from '../../public' }).catch(err => { console.log(err); }) + }, + getRoles () { + let that = this + that.$api.fetchExam.getRoleList().then(res => { + // console.log(res); + if (res.data.code == 200) { + res.data.rows.forEach(item => { + // console.log(item.roleKey); + }) + } + }).catch(err => { + console.log(err); + }) } }, onShow() { @@ -669,6 +682,7 @@ import { basePath } from '../../public' console.log(that.roles); if (that.roles.includes('admin')) that.roles = ['admin', 'fgs', 'sgb', 'ajb', 'jjfgs', 'tsfgs'] that.initFetch() + that.getRoles() } }