Jelajahi Sumber

配置按钮权限

@dongkboy 1 tahun lalu
induk
melakukan
56cf91da98

+ 1 - 1
src/router/modules/product.ts

@@ -17,7 +17,7 @@ const routes: RouteRecordRaw = {
       redirect: '/productConfiguration/drivingInsurance/index',
       meta: {
         title: '驾意险配置',
-        // auth: ['organizationlist.add', 'organizationlist.view', 'organizationlist.delete', 'organizationlist.edit']
+        auth: ['drivingInsurance.add', 'drivingInsurance.view', 'drivingInsurance.delete', 'drivingInsurance.edit']
       },
       children: [
         {

+ 6 - 4
src/views/insuranceCompanyConfiguration/insuranceCompanyConfig.vue

@@ -7,11 +7,11 @@
           <el-input v-model="formInline.name" placeholder="输入保险公司查找" clearable />
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="companyQuery">查询</el-button>
+          <el-button type="primary" @click="companyQuery" v-auth="'insuranceCompanyConfig.view'">查询</el-button>
         </el-form-item>
       </el-form>
       <div>
-        <el-button type="primary" @click="companyAdd">
+        <el-button type="primary" @click="companyAdd" v-auth="'insuranceCompanyConfig.add'">
           <template #icon>
             <el-icon>
               <Plus />
@@ -25,7 +25,7 @@
                 ref="multipleTableRef" :expand-column-key="expandColumnKey" header-class="header-class">
                 <template #cell="scope">
                   <div v-if="scope.column.key == 'option'" class="flex j-s a-c">
-                    <el-button type="primary" link @click="addSubsidiary(scope.rowData)"> 添加子公司
+                    <el-button type="primary" link @click="addSubsidiary(scope.rowData)" v-auth="'insuranceCompanyConfig.add'"> 添加子公司
                     </el-button>
                     <el-dropdown placement="bottom-start">
                       <span class="el-dropdown-link">
@@ -33,8 +33,10 @@
                       </span>
                       <template #dropdown>
                         <el-dropdown-menu>
-                          <Auth :value="'organizationlist.delete'">
+                          <Auth :value="'insuranceCompanyConfig.edit'">
                             <el-dropdown-item @click="companyEdit(scope.rowData)">编辑</el-dropdown-item>
+                          </Auth>
+                          <Auth :value="'insuranceCompanyConfig.delete'">
                             <el-dropdown-item @click="companyDel(scope.rowData)">删除</el-dropdown-item>
                           </Auth>
                         </el-dropdown-menu>

+ 6 - 6
src/views/productConfiguration/drivingInsurance/index.vue

@@ -7,7 +7,7 @@
             <ElFormItem>
               <ElInput v-model="companyName" placeholder="输入保险公司名称查找" type="text" tabindex="1" clearable style="width: 100%;"  @clear="companyQuery">
                 <template #append>
-                  <el-button :icon="Search" @click="companyQuery" />
+                  <el-button :icon="Search" @click="companyQuery" v-auth="'drivingInsurance.add'" />
                 </template>
               </ElInput>
             </ElFormItem>
@@ -52,8 +52,8 @@
                 </el-input>
               </el-form-item>
               <el-form-item>
-                <el-button type="primary" @click="findpage">查询</el-button>
-                <el-button type="default" @click="reset">重置</el-button>
+                <el-button type="primary" @click="findpage" v-auth="'drivingInsurance.view'">查询</el-button>
+                <el-button type="default" @click="reset" v-auth="'drivingInsurance.view'">重置</el-button>
               </el-form-item>
             </el-form>
           </div>
@@ -62,11 +62,11 @@
             :showSelect="false">
             <template v-slot:operation="scope">
               <el-button type="primary" link style="margin-right: 15px;" v-if="scope.operationData.parentId == '0'"
-                @click="add(scope.operationData)"> 添加
+                @click="add(scope.operationData)" v-auth="'drivingInsurance.add'"> 添加
               </el-button>
-              <el-button type="primary" link style="margin-right: 15px;" @click="edit(scope.operationData.id)"> 编辑
+              <el-button type="primary" link style="margin-right: 15px;" @click="edit(scope.operationData.id)" v-auth="'drivingInsurance.edit'"> 编辑
               </el-button>
-              <el-button type="primary" link style="margin-right: 15px;" @click="del(scope.operationData)"> 删除
+              <el-button type="primary" link style="margin-right: 15px;" @click="del(scope.operationData)" v-auth="'drivingInsurance.delete'"> 删除
               </el-button>
             </template>
           </TableTree>