From 5ce8644cd400c711572d0d8bba4e245eefb53f46 Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Wed, 6 Sep 2023 11:34:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=87=91=E8=9E=8D=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E6=94=BF=E7=AD=96=E3=80=81=E5=85=B6=E5=AE=83=E8=9E=8D?= =?UTF-8?q?=E4=BA=A7=E5=93=81--=E5=A2=9E=E5=8A=A0=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- anrui-riskcenter-ui/src/api/Common/dictcommons.js | 10 ++++++++++ .../financialpolicymanagement.vue | 15 +++++++++++++-- .../otherfinancialpolicymanagement.vue | 15 +++++++++++++-- .../otherfinancialpolicymanagementInfo.vue | 2 +- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/anrui-riskcenter-ui/src/api/Common/dictcommons.js b/anrui-riskcenter-ui/src/api/Common/dictcommons.js index 0ed7b3444b..93fcd471ee 100644 --- a/anrui-riskcenter-ui/src/api/Common/dictcommons.js +++ b/anrui-riskcenter-ui/src/api/Common/dictcommons.js @@ -71,6 +71,16 @@ export function selectHaveMessage(data) { }) } +// 根据当前登录用户的角色获取菜单分页列表页面右上角按钮的隐藏 +export function getButtonPermissions(data) { + return request({ + url: '/portal/v1/sysfunction/getButtonPermissions', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) +} + // 根据分公司sid获取该分公司下的所有供应商 export function getGysByOrgSid(data) { return request({ diff --git a/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagement.vue b/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagement.vue index efccfac833..7f78a84ae8 100644 --- a/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagement.vue +++ b/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagement.vue @@ -139,7 +139,7 @@ import Pagination from '@/components/pagination' import pageye from '@/components/pagination/pageye' import ButtonBar from '@/components/ButtonBar' import req from '@/api/financialpolicymanagement/financialpolicymanagement' -import { typeValues } from '@/api/Common/dictcommons' +import { typeValues, getButtonPermissions } from '@/api/Common/dictcommons' import financialpolicymanagementAdd from './financialpolicymanagementAdd' import financialpolicymanagementInfo from './financialpolicymanagementInfo' import financialpolicyreportingAdd from '../financialpolicyreporting/financialpolicyreportingAdd' @@ -297,7 +297,18 @@ export default { this.init() }, mounted() { - this.$refs['btnbar'].setButtonList(this.btnList) + getButtonPermissions({ userSid: window.sessionStorage.getItem('userSid'), url: this.$route.path, type: 0 }).then((res) => { + if (res.success) { + for (var i = 0; i < res.data.length; i++) { + for (var k = 0; k < this.btnList.length; k++) { + if (res.data[i].buttonId === this.btnList[k].btnKey) { + this.btnList.splice(k, 1) + } + } + } + this.$refs['btnbar'].setButtonList(this.btnList) + } + }) }, methods: { // 搜索条件效果 diff --git a/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagement.vue b/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagement.vue index 2c5a33960b..59e9eee0eb 100644 --- a/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagement.vue +++ b/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagement.vue @@ -119,7 +119,7 @@ import Pagination from '@/components/pagination' import pageye from '@/components/pagination/pageye' import ButtonBar from '@/components/ButtonBar' import req from '@/api/otherfinancialpolicymanagement/otherfinancialpolicymanagement' -import { typeValues } from '@/api/Common/dictcommons' +import { typeValues, getButtonPermissions } from '@/api/Common/dictcommons' import otherfinancialpolicymanagementAdd from './otherfinancialpolicymanagementAdd' import otherfinancialpolicymanagementInfo from './otherfinancialpolicymanagementInfo' import otherfinancialproductsreportAdd from '../otherfinancialproductsreport/otherfinancialproductsreportAdd' @@ -276,7 +276,18 @@ export default { this.init() }, mounted() { - this.$refs['btnbar'].setButtonList(this.btnList) + getButtonPermissions({ userSid: window.sessionStorage.getItem('userSid'), url: this.$route.path, type: 0 }).then((res) => { + if (res.success) { + for (var i = 0; i < res.data.length; i++) { + for (var k = 0; k < this.btnList.length; k++) { + if (res.data[i].buttonId === this.btnList[k].btnKey) { + this.btnList.splice(k, 1) + } + } + } + this.$refs['btnbar'].setButtonList(this.btnList) + } + }) }, methods: { // 搜索条件效果 diff --git a/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagementInfo.vue b/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagementInfo.vue index a446daa1cd..a5bb2862e8 100644 --- a/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagementInfo.vue +++ b/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagementInfo.vue @@ -17,7 +17,7 @@