linwenxin 1 vuosi sitten
vanhempi
commit
560cb7bbea

+ 6 - 4
src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryMaterialClass/index.vue

@@ -3,7 +3,8 @@
     <div class="mymain-container">
       <div class="btn-group clearfix">
         <div class="fl">
-          <el-button size="small" type="primary" icon="el-icon-plus" @click="addData">添加</el-button>
+          <el-button v-if="$restrict('add')" size="small" type="primary" icon="el-icon-plus"
+            @click="addData">添加</el-button>
         </div>
       </div>
       <div class="table">
@@ -18,9 +19,10 @@
           <el-table-column align="center" prop="sort" label="排序"></el-table-column>
           <el-table-column align="right" label="操作" width="120" fixed="right">
             <template slot-scope="scope">
-              <el-button v-if="scope.row.parentCategoryId == 0" type="primary" size="mini" icon="el-icon-plus"
-                @click="addDatapat(scope.row)"></el-button>
-              <el-button type="primary" size="mini" icon="el-icon-edit" @click="setDataup(scope.row)"></el-button>
+              <el-button v-if="scope.row.parentCategoryId == 0 && $restrict('add')" type="primary" size="mini"
+                icon="el-icon-plus" @click="addDatapat(scope.row)"></el-button>
+              <el-button v-if="$restrict('edit')" type="primary" size="mini" icon="el-icon-edit"
+                @click="setDataup(scope.row)"></el-button>
             </template>
           </el-table-column>
         </el-table>