Bläddra i källkod

fix: 修改样式问题,新增按钮权限判断

xiaweibo 1 månad sedan
förälder
incheckning
c623bffdf6

+ 2 - 0
src/api/hiddenDanger/index.ts

@@ -54,6 +54,8 @@ export interface HiddenDangerItem {
   canView?: boolean;
   /** 审查不通过原因(详情/整改页展示) */
   reviewRejectReason?: string;
+  /** 整改负责人(详情/整改页展示) */
+  rectificationResponsibleIds?: string;
 }
 
 /**

+ 7 - 2
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanManagementDeptDetail.vue

@@ -152,9 +152,9 @@
           start-placeholder="开始日期"
           end-placeholder="结束日期"
           value-format="YYYY-MM-DD"
-          style="margin-right: 12px"
+          style="margin-right: 12px;max-width: 280px;"
         />
-        <el-button type="primary" @click="onRecordSearch">查询</el-button>
+        <el-button type="primary" class="view-record-toolbar-btn" @click="onRecordSearch">查询</el-button>
         <el-button @click="onRecordExport">导出</el-button>
         <el-button type="primary" @click="onAddRecord">新增检查日志</el-button>
       </div>
@@ -1002,4 +1002,9 @@
   .view-record-table {
     margin-bottom: 16px;
   }
+
+  .view-record-toolbar-btn{
+    margin-left: auto;
+  }
+
 </style>

+ 6 - 2
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/hiddenTroubleAccountManagement/hiddenTroubleAccountManagement.vue

@@ -92,13 +92,13 @@
                 <!-- 待整改 statusId=2:查看、整改、扣分 -->
                 <template v-else-if="scope.row.statusId === 2">
                   <ActionButton text="查看" @click="handleView(scope.row.id)" />
-                  <ActionButton text="整改" @click="handleRectify(scope.row.id)" />
+                  <ActionButton text="整改" @click="handleRectify(scope.row.id)" v-if="id === scope.row.rectificationResponsibleIds"/>
                   <ActionButton text="扣分" @click="handleOpenDeduct(scope.row.id)" />
                 </template>
                 <!-- 待复查 statusId=3:查看、复查、扣分 -->
                 <template v-else-if="scope.row.statusId === 3">
                   <ActionButton text="查看" @click="handleView(scope.row.id)" />
-                  <ActionButton text="复查" @click="handleReview(scope.row.id)" />
+                  <ActionButton text="复查" @click="handleReview(scope.row.id)" v-if="id === scope.row.reviewPersonId"/>
                   <ActionButton text="扣分" @click="handleOpenDeduct(scope.row.id)" />
                 </template>
                 <!-- 已完成 statusId=4:查看、扣分 -->
@@ -248,6 +248,8 @@
   import BatchImport from '@/components/batch-import/BatchImport.vue';
   import { useGlobSetting } from '@/hooks/setting';
   import urlJoin from 'url-join';
+  import { useUserInfoHook } from '@/hooks/useUserInfoHook'
+  const { id } = useUserInfoHook();
 
   const router = useRouter();
 
@@ -298,6 +300,8 @@
           currentNode: item.currentNode,
           statusName: item.statusName,
           statusId: item.statusId,
+          reviewPersonId: item.reviewPersonId,
+          rectificationResponsibleIds: Number(item.rectificationResponsibleIds),
         }));
         pagination.total = (res as any).totalRow ?? (res as any).total ?? 0;
       } else {