dedsudiyu 7 月之前
父节点
当前提交
dcc35cd686

+ 11 - 0
src/store/modules/user.js

@@ -117,6 +117,17 @@ const user = {
             localStorage.setItem('deptId',user.deptId);
             localStorage.setItem('deptName',user.deptName);
             localStorage.setItem('user',JSON.stringify(user));
+            //判定校院级管理员身份
+            if(user.postCode == 'school_level_admin'){
+              //校级管理员
+              localStorage.setItem('adminIdentity','school');
+            }else if(user.postCode == 'college_admin'){
+              //院级管理员
+              localStorage.setItem('adminIdentity','college');
+            }else{
+              //非管理员身份
+              localStorage.removeItem('adminIdentity');
+            }
             commit('SET_ROLES', ['placeholder'])
             if(res.data.data[0] == "*:*:*"){
               commit('SET_PERMISSIONS', res.data.data)

+ 2 - 0
src/views/safetyCheck/collegeInspect/hiddenDangersReview/index.vue

@@ -130,6 +130,7 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    v-if="scope.row.reviewButtion"
+                   v-hasPermiRouter="['security:myreview:add']"
                    @click="tableButton(1,scope.row)"
                 >复查</p>
                 <p class="table-button-p"
@@ -138,6 +139,7 @@
                 >详情</p>
                 <p class="table-button-p"
                    v-if="scope.row.isAdmin"
+                   v-hasPermiRouter="['security:myreview:edit']"
                    @click="tableButton(3,scope.row)"
                 >转移</p>
                 <p class="table-button-null"></p>

+ 5 - 5
src/views/safetyCheck/collegeInspect/selfInspectionManage/index.vue

@@ -129,23 +129,23 @@
               </template>
             </el-table-column>
             <el-table-column label="检查人" prop="checkUserNames" width="230" show-overflow-tooltip/>
-            <el-table-column label="操作" width="240" show-overflow-tooltip >
+            <el-table-column label="操作" width="240" show-overflow-tooltip v-if="tableButtonType">
               <template slot-scope="scope">
                 <div class="table-button-box">
                   <p class="table-button-null"></p>
                   <p class="table-button-p"
                      @click="tableButton(1,scope.row)"
-
+                     v-hasPermiRouter="['security:checkSetOption_1:list']"
                   >检查项</p>
                   <p class="table-button-p"
                      v-if='scope.row.manageStatus !=2'
                      @click="tableButton(2,scope.row)"
-
+                     v-hasPermiRouter="['security:checkPlan_1:detail']"
                   >开始检查</p>
                   <p class="table-button-p"
                      v-if='scope.row.manageStatus !=2'
                      @click="tableButton(3,scope.row)"
-
+                     v-hasPermiRouter="['security:checkSetOption_1:batch']"
                   >检查完成</p>
                   <p class="table-button-null"></p>
                 </div>
@@ -188,7 +188,7 @@
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        tableButtonType:this.hasPermiDom(['security:checkSetOption_1:list','security:checkPlan_1:detail','security:checkSetOption_1:batch',]),
         //页面状态
         pageType:1,
         //复查状态选项卡

+ 7 - 6
src/views/safetyCheck/collegeInspect/selfInspectionProject/index.vue

@@ -55,7 +55,8 @@
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
-
+             v-if="adminIdentity == 'college'"
+             v-hasPermiRouter="['security:checkPlan_1:add']"
           >创建计划</p>
         </el-form>
       </div>
@@ -99,21 +100,20 @@
                 <p class="table-button-p"
                    v-if="scope.row.planStatus!=0"
                    @click="tableButton(2,scope.row)"
-
                 >详情</p>
                 <p class="table-button-p"
-                   v-if="scope.row.planStatus==0"
+                   v-if="scope.row.planStatus==0&&adminIdentity=='college'"
                    @click="tableButton(3,scope.row)"
-
+                   v-hasPermiRouter="['security:checkPlan_1:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(5,scope.row)"
 
                 >检查明细</p>
                 <p class="table-button-p"
-                   v-if="scope.row.planStatus==0"
+                   v-if="scope.row.planStatus==0&&adminIdentity=='college'"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['security:checkPlan_1:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -149,6 +149,7 @@
     data () {
       return {
         tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        adminIdentity: localStorage.getItem('adminIdentity'),
         //页面状态
         pageType:1,
         //计划状态选项卡

+ 2 - 2
src/views/safetyCheck/components/checkItem.vue

@@ -107,7 +107,7 @@
                   <p class="table-button-p"
                      v-if="scope.row.checkStatus == 0"
                      @click="tableButton(1,scope.row)"
-
+                     v-hasPermiRouter="['security:checkPlan:detail']"
                   >开始检查</p>
                   <p class="table-button-p"
                      v-if="scope.row.checkStatus == 1"
@@ -117,7 +117,7 @@
                   <p class="table-button-p"
                      v-if="scope.row.checkStatus == 2"
                      @click="tableButton(3,scope.row)"
-
+                     v-hasPermiRouter="['security:checkPlan:detail']"
                   >编辑</p>
                   <p class="table-button-null"></p>
                 </div>

+ 2 - 2
src/views/safetyCheck/dataStatistics/index.vue

@@ -97,11 +97,11 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(3,scope.row)"
-
+                   v-hasPermiRouter="['report:hazardReport:list']"
                 >隐患统计</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['report:hazardItems:list']"
                 >检查项统计</p>
                 <p class="table-button-null"></p>
               </div>

+ 5 - 5
src/views/safetyCheck/inspectProject/inspectProjectAccording/index.vue

@@ -41,7 +41,7 @@
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
-
+             v-hasPermiRouter="['security:basis:add']"
           >新增</p>
         </el-form>
       </div>
@@ -56,17 +56,17 @@
               <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="操作" width="130" show-overflow-tooltip >
+          <el-table-column label="操作" width="130" show-overflow-tooltip v-if="tableButtonType">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(2,scope.row)"
-
+                   v-hasPermiRouter="['security:basis:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['security:basis:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -97,7 +97,7 @@
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        tableButtonType:this.hasPermiDom(['security:basis:edit','security:basis:del']),
         //页面状态
         pageType:1,
         //整改状态选项卡

+ 12 - 7
src/views/safetyCheck/inspectProject/inspectProjectTable/index.vue

@@ -18,16 +18,16 @@
           <p class="page-inquire-common-style-button" @click="onSearch">查询</p>
           <p class="page-reset-common-style-button" @click="resetForm">重置</p>
         </el-form-item>
-        <el-form-item style="float: right;" >
+        <el-form-item style="float: right;" v-hasPermiRouter="['security:option:add']">
           <p class="page-save-common-style-button" style="width:80px;" @click="addDialogOpen(1)">添加</p>
         </el-form-item>
-        <el-form-item style="float: right;" >
+        <el-form-item style="float: right;" v-hasPermiRouter="['security:option:del']">
           <p class="page-add-common-style-button" style="width:100px;" @click="allDel">批量删除</p>
         </el-form-item>
-        <el-form-item style="float: right;" >
+        <el-form-item style="float: right;"  v-hasPermiRouter="['security:option:export']">
           <export-component :exportConfig="exportConfig"></export-component>
         </el-form-item>
-        <el-form-item style="float: right;" >
+        <el-form-item style="float: right;"  v-hasPermiRouter="['security:option:import']">
           <import-component :importConfig="importConfig"></import-component>
         </el-form-item>
       </el-form>
@@ -44,12 +44,16 @@
         <el-table-column label="序号" prop="code" width="240"/>
         <el-table-column label="检查项目" prop="name"/>
         <el-table-column label="检查要点" prop="mainPoint" width="700" show-overflow-tooltip/>
-        <el-table-column label="操作" width="180">
+        <el-table-column label="操作" width="180" v-if="tableButtonType">
           <template slot-scope="scope">
             <div class="table-button-box">
               <p class="table-button-null"></p>
-              <p class="table-button-p" @click="addDialogOpen(3,scope.row)" >编辑</p>
-              <p class="table-button-p" @click="delItem(scope.row)" >删除</p>
+              <p class="table-button-p"
+                 @click="addDialogOpen(3,scope.row)"
+                 v-hasPermiRouter="['security:option:edit']">编辑</p>
+              <p class="table-button-p"
+                 @click="delItem(scope.row)"
+                 v-hasPermiRouter="['security:option:del']">删除</p>
               <p class="table-button-null"></p>
             </div>
           </template>
@@ -148,6 +152,7 @@
     },
     data(){
       return{
+        tableButtonType:this.hasPermiDom(['security:option:edit','security:option:del']),
         //导出
         exportConfig:{
           api:'/security/checkOption/export/',             //导出接口地址

+ 3 - 4
src/views/safetyCheck/inspectSupervisorGroup/index.vue

@@ -46,7 +46,7 @@
           <p class="page-submit-common-style-button"
              style="float: right;width:130px"
              @click="tableButton(1)"
-
+             v-hasPermiRouter="['security:group:add']"
           >创建督导组</p>
         </el-form>
       </div>
@@ -84,15 +84,14 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(2,scope.row)"
-
                 >查看</p>
                 <p class="table-button-p"
                    @click="tableButton(3,scope.row)"
-
+                   v-hasPermiRouter="['security:group:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['security:group:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>

+ 1 - 1
src/views/safetyCheck/safetyHazard/inspectHazard/index.vue

@@ -142,7 +142,7 @@
                 <p class="table-button-p"
                    v-if="scope.row.rectifyStatus == 2"
                    @click="tableButton(1,scope.row)"
-
+                   v-hasPermiRouter="['security:danger:rectify']"
                 >整改</p>
                 <p class="table-button-p"
                    v-if="scope.row.rectifyStatus != 2"

+ 1 - 1
src/views/safetyCheck/safetyHazard/selfInspectionHazard/index.vue

@@ -142,7 +142,7 @@
                 <p class="table-button-p"
                    v-if="scope.row.rectifyStatus == 2"
                    @click="tableButton(1,scope.row)"
-
+                   v-hasPermiRouter="['security:danger:selfRectify']"
                 >整改</p>
                 <p class="table-button-p"
                    v-if="scope.row.rectifyStatus != 2"

+ 3 - 3
src/views/safetyCheck/schoolInspect/inspectManage/index.vue

@@ -135,17 +135,17 @@
                   <p class="table-button-null"></p>
                   <p class="table-button-p"
                      @click="tableButton(1,scope.row)"
-
+                     v-hasPermiRouter="['security:checkSetOption:list']"
                   >检查项</p>
                   <p class="table-button-p"
                      v-if='scope.row.manageStatus !=2'
                      @click="tableButton(2,scope.row)"
-
+                     v-hasPermiRouter="['security:checkPlan:detail']"
                   >开始检查</p>
                   <p class="table-button-p"
                      v-if='scope.row.manageStatus !=2'
                      @click="tableButton(3,scope.row)"
-
+                     v-hasPermiRouter="['security:checkSetOption:batch']"
                   >检查完成</p>
                   <p class="table-button-null"></p>
                 </div>

+ 7 - 6
src/views/safetyCheck/schoolInspect/inspectProject/index.vue

@@ -55,7 +55,8 @@
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
-
+             v-if="adminIdentity == 'school'"
+             v-hasPermiRouter="['security:checkPlan:add']"
           >创建计划</p>
         </el-form>
       </div>
@@ -99,21 +100,20 @@
                 <p class="table-button-p"
                    v-if="scope.row.planStatus!=0"
                    @click="tableButton(2,scope.row)"
-
                 >详情</p>
                 <p class="table-button-p"
-                   v-if="scope.row.planStatus==0"
+                   v-if="scope.row.planStatus==0&&adminIdentity=='school'"
                    @click="tableButton(3,scope.row)"
-
+                   v-hasPermiRouter="['security:checkPlan:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(5,scope.row)"
 
                 >检查明细</p>
                 <p class="table-button-p"
-                   v-if="scope.row.planStatus==0"
+                   v-if="scope.row.planStatus==0&&adminIdentity=='school'"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['security:checkPlan:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -149,6 +149,7 @@
     data () {
       return {
         tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        adminIdentity: localStorage.getItem('adminIdentity'),
         //页面状态
         pageType:1,
         //计划状态选项卡

+ 2 - 0
src/views/safetyCheck/schoolInspect/reviewManage/index.vue

@@ -131,6 +131,7 @@
                 <p class="table-button-p"
                    v-if="scope.row.reviewButtion"
                    @click="tableButton(1,scope.row)"
+                   v-hasPermiRouter="['security:review:add']"
                 >复查</p>
                 <p class="table-button-p"
                    v-if="!scope.row.reviewButtion"
@@ -139,6 +140,7 @@
                 <p class="table-button-p"
                    v-if="scope.row.isAdmin"
                    @click="tableButton(3,scope.row)"
+                   v-hasPermiRouter="['security:review:edit']"
                 >转移</p>
                 <p class="table-button-null"></p>
               </div>

+ 2 - 3
src/views/safetyCheck/snapshot/index.vue

@@ -47,7 +47,7 @@
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
-
+             v-hasPermiRouter="['security:photo:add']"
           >上报</p>
         </el-form>
       </div>
@@ -80,12 +80,11 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(2,scope.row)"
-
                 >详情</p>
                 <p class="table-button-p"
                    v-if="scope.row.rectifyStatus == 0"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['security:photo:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>