Explorar o código

项目创建人、现场负责人、项目经理1、项目经理2可编辑项目组成员

lizhenhao %!s(int64=2) %!d(string=hai) anos
pai
achega
d1a1c99c19
Modificáronse 1 ficheiros con 9 adicións e 2 borrados
  1. 9 2
      src/views/modules/cw/projectRecords/ProjectMembersList.vue

+ 9 - 2
src/views/modules/cw/projectRecords/ProjectMembersList.vue

@@ -74,8 +74,15 @@
             <template  slot-scope="scope">
 <!--              项目创建人、项目组成员、管理员可编辑-->
 <!--              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.id))" type="text"  size="small" @click="edit(scope.row.id)">编辑</el-button>-->
-<!--              项目创建人、管理员可编辑-->
-              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin)" type="text"  size="small" @click="edit(scope.row.id)">编辑</el-button>
+<!--              项目创建人、管理员、项目现场负责人、项目经理1、项目经理2可编辑-->
+              <el-button v-if="hasPermission('cwProjectRecords:edit')&&
+              (
+              isAdmin ||
+              $store.state.user.id === scope.row.createBy.id ||
+              $store.state.user.id === scope.row.projectLeaderId ||
+              $store.state.user.id === scope.row.projectMasterId ||
+              $store.state.user.id === scope.row.realHeader
+              )"type="text"  size="small" @click="edit(scope.row.id)">编辑</el-button>
 
             </template>
           </vxe-column>