Pārlūkot izejas kodu

调整项目阶段的权限

Lijy 2 gadi atpakaļ
vecāks
revīzija
de2bd9509f

+ 22 - 19
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -202,16 +202,20 @@
 
             <!-- 项目阶段 -->
             <!-- 换位置之前看下项目阶段发起的请求  -->
-            <el-table-column prop="currentStage" label="项目阶段" sortable="custom" min-width="150" width="220" v-if="user.company.packageProject == 1 && permissions.projectPhase">
+            <el-table-column prop="currentStage" label="项目阶段" sortable="custom" min-width="150" width="220" v-if="user.company.packageProject == 1">
                 <template slot-scope="scope">
-                    <span style="display: inline-block; width: 150px">
-                        <el-select v-model="phaseProjectValie" v-if="scope.row.index + ',' + scope.column.index == currentCell" :ref="scope.row.index + ',' + scope.column.index" filterable placeholder="请选择项目阶段" size="mini" @blur="hideSelect" @change="selectChange">
-                            <el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
-                        </el-select>
-                        <el-link v-else type="primary" :underline="false">{{scope.row.currentStageId == null ? '暂无' : scope.row.currentStageName}}</el-link>
-                    </span> 
-                    
-                    <el-link v-if="(permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId) && scope.row.index + ',' + scope.column.index != currentCell && rowid == scope.row.id" type="primary" :underline="false"><i class="el-icon-edit"></i></el-link> 
+                    <div v-if="permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId">
+                        <span style="display: inline-block; width: 150px">
+                            <el-select v-model="phaseProjectValie" v-if="scope.row.index + ',' + scope.column.index == currentCell" :ref="scope.row.index + ',' + scope.column.index" filterable placeholder="请选择项目阶段" size="mini" @blur="hideSelect" @change="selectChange">
+                                <el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
+                            </el-select>
+                            <el-link v-else type="primary" :underline="false">{{scope.row.currentStageId == null ? '暂无阶段' : scope.row.currentStageName}}</el-link>
+                        </span> 
+                        <el-link v-if="scope.row.index + ',' + scope.column.index != currentCell && rowid == scope.row.id" type="primary" :underline="false"><i class="el-icon-edit"></i></el-link> 
+                    </div>
+                    <div v-else>
+                        {{scope.row.currentStageId == null ? '暂无阶段' : scope.row.currentStageName}}
+                    </div>
                 </template>
             </el-table-column>
 
@@ -1332,18 +1336,17 @@ a {
                 column.index=columnIndex;
             },
             clickCell(row,column) {
-                // console.log('can can need',row,column)
+                console.log('can can need',row,column)
                 if(this.permissions.projectManagement || this.user.id==row.inchargerId || this.user.id==row.creatorId) {
-                    this.phaseProjectValie = row.currentStageId  ? row.currentStageId : ''
-                    this.currentCell = row.index + ',' + column.index;
-                    // if(column.label == '项目阶段') {
+                    if(this.permissions.projectManagement || this.user.id==row.inchargerId || this.user.id==row.creatorId) {
+                        this.phaseProjectValie = row.currentStageId  ? row.currentStageId : ''
+                        this.currentCell = row.index + ',' + column.index;
                         this.phaseProjectId = row.id
-                        // this.obtainPhase(row)
-                    // }
-                    setTimeout(() => {
-                        // 获得焦点
-                        this.$refs[row.index + ',' + column.index].focus();
-                    })
+                        setTimeout(() => {
+                            // 获得焦点
+                            this.$refs[row.index + ',' + column.index].focus();
+                        })
+                    }
                 }
             },
             selectChange() {