From bd8dc5ab54be227682625ee7d0d69202c3ef7acc Mon Sep 17 00:00:00 2001
From: "DESKTOP-5DIJMF9\\admin" <2388969634@qq.com>
Date: Fri, 27 Sep 2024 10:50:43 +0800
Subject: [PATCH] =?UTF-8?q?vue-bus=E6=8F=92=E4=BB=B6=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
lms/nladmin-ui/package.json | 1 +
lms/nladmin-ui/src/main.js | 3 ++-
.../views/wms/basedata/master/faultdevice/index.vue | 10 +++++++---
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/lms/nladmin-ui/package.json b/lms/nladmin-ui/package.json
index b4e80d2..b355e0d 100644
--- a/lms/nladmin-ui/package.json
+++ b/lms/nladmin-ui/package.json
@@ -119,6 +119,7 @@
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
+ "vue-bus": "^1.2.1",
"vue-template-compiler": "2.6.10"
},
"engines": {
diff --git a/lms/nladmin-ui/src/main.js b/lms/nladmin-ui/src/main.js
index 1fe4089..2f33ba7 100644
--- a/lms/nladmin-ui/src/main.js
+++ b/lms/nladmin-ui/src/main.js
@@ -45,7 +45,7 @@ import request from '@/utils/request' // 实现 form generator 使用自己定
import { addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectDictLabels, flexWidth } from '@/utils/nladmin'
import { getValueByCode } from '@/api/system/param'
-
+import VueBus from 'vue-bus'
LogicFlow.use(Menu)
Vue.component('tinymce', Tinymce)
@@ -67,6 +67,7 @@ Vue.use(VueHighlightJS)
Vue.use(mavonEditor)
Vue.use(permission)
Vue.use(dict)
+Vue.use(VueBus)
// 全局设置控件样式https://codeantenna.com/a/0IN5FMJk5h
Element.Table.props.border = { type: Boolean, default: true }
Element.TableColumn.props.align = { type: String, default: 'center' }
diff --git a/lms/nladmin-ui/src/views/wms/basedata/master/faultdevice/index.vue b/lms/nladmin-ui/src/views/wms/basedata/master/faultdevice/index.vue
index 189cb67..320505b 100644
--- a/lms/nladmin-ui/src/views/wms/basedata/master/faultdevice/index.vue
+++ b/lms/nladmin-ui/src/views/wms/basedata/master/faultdevice/index.vue
@@ -117,7 +117,7 @@
@@ -178,7 +178,11 @@ export default {
},
data() {
return {
- permission: {},
+ permission: {
+ add: ['admin', 'faultdevice:add'],
+ edit: ['admin', 'faultdevice:edit'],
+ del: ['admin', 'faultdevice:del']
+ },
syncLoading: false,
rules: {
}