浏览代码

权限按钮补充

cxmo 11 月之前
父节点
当前提交
df972c00a9
共有 3 个文件被更改,包括 15 次插入3 次删除
  1. 1 1
      src/routes/modules/chartRoutes.js
  2. 10 1
      src/utils/buttonConfig.js
  3. 4 1
      src/views/toolBox_manage/ForexCalendar.vue

+ 1 - 1
src/routes/modules/chartRoutes.js

@@ -347,7 +347,7 @@ export default [
 			},
 			{
 				path:"forexCalendar",
-				name:"外汇日历表",
+				name:"事件日历",
 				component:()=>import('@/views/toolBox_manage/ForexCalendar.vue')
 			},
 		]

+ 10 - 1
src/utils/buttonConfig.js

@@ -578,6 +578,14 @@ export const productPricePermission = {
     goodsPrice_priceLine_addMyChart:'goodsPrice:priceLine:addMyChart',
     goodsPrice_priceLine_share:'goodsPrice:priceLine:share',
 }
+/**
+ * --------------------------------------------------------------------------工具箱-----------------------------------------------------
+ */
+export const toolBoxPermission = {
+    forexCalendar_view:'forexCalendar:view',//查看日历
+    forexCalendar_save:'forexCalendar:save',//添加/编辑事项
+
+}
 /*
  * --------------------------------------------------------------------------系统设置------------------------------------------------
 */
@@ -698,7 +706,8 @@ const btnMap  = {
     outlinkConfigPermission,approveFlowPermission,
     approvePermission,
     outlinkConfigPermission,
-    chartThemePermission
+    chartThemePermission,
+    toolBoxPermission
 }
 
 /**

+ 4 - 1
src/views/toolBox_manage/ForexCalendar.vue

@@ -3,7 +3,9 @@
         <div class="calendar-header">
             <div class="left-select">
                 <!-- 添加事项 -->
-                <el-button type="primary" @click="dateClick">{{ $t('ToolBox.ForexCalendar.add_item') }}</el-button>
+                <el-button 
+                    v-permission="permissionBtn.toolBoxPermission.forexCalendar_save"
+                    type="primary" @click="dateClick">{{ $t('ToolBox.ForexCalendar.add_item') }}</el-button>
                 <!-- 选择日期 -->
                 <el-date-picker type="month" :placeholder="$t('ToolBox.ForexCalendar.select_date')" 
                     :clearable="false"
@@ -152,6 +154,7 @@ export default {
         },
         //根据日期设置弹窗信息
         setEventInfo(date){
+            if(!this.permissionBtn.isShowBtn('toolBoxPermission','forexCalendar_save')) return
             if(!this.permissionValue) return this.$message.warning(this.$t('ToolBox.ForexCalendar.select_type_hint'))
             this.choosedDay = date||''
             this.isEventDialogShow = true