From cba6a8589da10e21878db25c35add8ca784bb234 Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Fri, 26 May 2023 11:20:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=BD=A6=E5=9E=8B=E7=AE=A1?= =?UTF-8?q?=E7=90=86--=E4=BB=B7=E6=A0=BC=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chexing/relation/chexingguanlianchangyong.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/chexingguanlianchangyong.vue b/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/chexingguanlianchangyong.vue index 2f5ffe9807..c683439d37 100644 --- a/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/chexingguanlianchangyong.vue +++ b/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/chexingguanlianchangyong.vue @@ -172,7 +172,7 @@ import ButtonBar from '@/components/ButtonBar' import chexingpeizhijiageweihu from './chexingpeizhijiageweihuAdd' import changyongpeizhi from './changyongpeizhi' import chexingpeizhibiaoqian from './chexingpeizhibiaoqian' -import { getOrgSidByPath, typeValues } from '@/api/cheliang/dictcommons' +import { getOrgSidByPath, typeValues, getButtonPermissions } from '@/api/cheliang/dictcommons' export default { name: 'chexingpeizhi', @@ -292,7 +292,18 @@ export default { created() { }, 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: { // 搜索条件效果