Explorar el Código

日志、服务-按钮权限

zhongxiaoyu hace 2 años
padre
commit
4bb1e93ed7

+ 18 - 4
src/components/minheader/index.vue

@@ -55,16 +55,17 @@
           placeholder="请输入您要搜索的内容"
           clearable
         /> -->
-        <Search v-permission="[searchPermission]" @clear="clear" @search="search" />
+        <Search v-permission="searchPermission ? [searchPermission] : []" @clear="clear" @search="search" />
         <!-- <el-button type="danger" size="default" class="br L12">搜索</el-button> -->
       </template>
       <template v-if="isSlot">
-        <el-button type="danger" size="default" class="br L12" @click="addslot"
+        <el-button v-permission="slotPermission ? [slotPermission] : []" type="danger" size="default" class="br L12" @click="addslot"
           >1个插槽</el-button
         >
       </template>
       <template v-if="isJournal">
         <el-button
+          v-permission="logPermission ? [logPermission] : []"
           size="default"
           plain
           class="btn-white P12"
@@ -79,6 +80,7 @@
       </template>
       <template v-if="isPreser">
         <el-button
+          v-permission="savePermission ? [savePermission] : []"
           type="danger"
           size="default"
           class="br L12"
@@ -92,13 +94,13 @@
           plain
           class="btn-white br"
           @click="addBbut"
-          v-permission="[powerData]"
+          v-permission="powerData ? [powerData] : []"
           >新增</el-button
         >
       </template>
       <template v-if="isShow">
         <img
-          v-permission="[columnSetPermission]"
+          v-permission="columnSetPermission ? [columnSetPermission] : []"
           class="btn-img"
           src="@/assets/baggage/ic_setting.png"
           title="列设置"
@@ -180,6 +182,18 @@ const props = defineProps({
   columnSetPermission: {
     type: String,
     default: ''
+  },
+  logPermission: {
+    type: String,
+    default: ''
+  },
+  savePermission: {
+    type: String,
+    default: ''
+  },
+  slotPermission: {
+    type: String,
+    default: ''
   }
 });
 // console.log(props.power);

+ 1 - 0
src/views/systemSettings/log/index.vue

@@ -29,6 +29,7 @@
       </div>
       <div class="interfaceLog_head_btn">
         <Search
+          v-permission="['log_management_search_button']"
           :is-title="false"
           @get-search-data="getSearchData"
           @clear-search-data="clearSearchData"

+ 4 - 0
src/views/systemSettings/serviceManagement/index.vue

@@ -4,6 +4,7 @@
       <MinHeader
         :is-auth="true"
         :is-statuser="true"
+        power-data="service_addition_button"
         @addForm="addServiceDialogShow"
       >
         <template #header>
@@ -435,6 +436,7 @@ const tableBtnGroup = [
     name: '查看',
     className: 'editBtn',
     param: 1,
+    is: 'service_view_button',
   },
   {
     name: '编辑',
@@ -445,11 +447,13 @@ const tableBtnGroup = [
     name: '停止',
     className: 'editBtn',
     param: 3,
+    is: 'service_stop_button',
   },
   {
     name: '删除',
     className: 'delBtn',
     param: 4,
+    is: 'service_deletion_button',
   },
 ]
 const tableButtonClickHandler = (rowIndex: number, row: any, param: number) => {

+ 9 - 1
src/views/systemSettings/serviceManagement/serviceEdit.vue

@@ -6,6 +6,9 @@
         is-statuser
         is-slot
         is-preser
+        slot-permission="slot_edit_page"
+        save-permission="service_save_button"
+        log-permission="view_log_button"
         @add-journal-form="logDialogShow"
         @add-slot-form="slotDialogShow"
         @preser-form="serviceSubmitHandler"
@@ -280,6 +283,7 @@
           <Minheader
             :is-statuser="true"
             :is-auth="true"
+            power-data="new_service_output_location_button"
             @addForm="outputDialogShow"
           >
             <template #header>
@@ -742,11 +746,13 @@ const outputTableButtonGroup = [
     name: '编辑',
     className: 'editBtn',
     param: 1,
+    is: 'service_edit_output_location_button',
   },
   {
     name: '删除',
     className: 'delBtn',
     param: 2,
+    is: 'service_delete_output_location_button',
   },
 ]
 const outputTableButtonClickHandler = (
@@ -814,7 +820,7 @@ const outputForm = reactive<CommonData>({})
 const outputSubmitHandler = async () => {
   try {
     const dataContent = {
-      serviceID
+      serviceID,
     }
     switch (outputDialogType.value) {
       case 'add':
@@ -968,11 +974,13 @@ const slotTableButtonGroups = [
     name: '编辑',
     className: 'editBtn',
     param: 1,
+    is: 'machine_editing_button'
   },
   {
     name: '删除',
     className: 'delBtn',
     param: 2,
+    is: 'machine_deletion_button'
   },
 ]
 const slotTableButtonClickHandler = (