浏览代码

手动推送日报数据增加权限控制

yurk 2 年之前
父节点
当前提交
0545dc6fed

+ 3 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/PermissionServiceImpl.java

@@ -280,6 +280,9 @@ public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permiss
             if(fun.getReportFormId()==null||(fun.getReportFormId()!=null&&formIds.contains(fun.getReportFormId()))){
                 resultFunList.add(fun);
             }
+            if(timeType.getPushReportData()!=1&&fun.getName().equals("手动推送工时")){
+                resultFunList.remove(fun);
+            }
         }
         for (SysModule module : moduleList) {
             if (module.getParentId() == null) {

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -44,6 +44,7 @@ const StringUtil = {
         reportsDept: false, //查看本部门工时
         reportBatch: false, //批量填报
         reportExport: false, //日报导出
+        reportPush: false, //手动推送工时
 
         // 财务核算成本 
         financialCustom: false, // 自定义薪资项 // 
@@ -207,6 +208,7 @@ const StringUtil = {
         arr[i] == '全部项目成本基线表' ? obj.reportAllOutputValue = true : ''
         arr[i] == '负责项目成本基线表' ? obj.reportOutputValue = true : ''
         arr[i] == '日报导出' ? obj.reportExport = true : ''
+        arr[i] == '手动推送工时' ? obj.reportPush = true : ''
         arr[i] == '查看全公司数值' ? obj.customDataAll = true : ''
         arr[i] == '删除出差' ? obj.awayOfficeDelete = true : ''
         arr[i] == '全部人员月度工时表' ? obj.reportMonthlyPersonnel = true : ''

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -8,7 +8,7 @@
                             <el-date-picker size="small" v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM"
                             style="width:190px;"
                             @change="changeMonthOut" :clearable="false" type="month" :placeholder="$t('Selectmonth')" :picker-options="getPickerOptions"></el-date-picker>
-                            <el-button v-if="user.timeType.pushReportData == 1" style="margin-left:10px;" icon="iconfont firerock-icontuisong" size="mini" @click="pushWorkTime"></el-button>
+                            <el-button v-if="user.timeType.pushReportData == 1 && permissions.reportPush" style="margin-left:10px;" icon="iconfont firerock-icontuisong" size="mini" @click="pushWorkTime"></el-button>
                             <el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini"  @click="showWorkTime"></el-button>
                         </div>
                     <div slot="header" class="clearfix" id="clearfix" style="padding-left: 255px;">