| | |
| | | <!-- 操作列 --> |
| | | <el-table-column label="操作" width="140" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handleDetail(scope.row)" |
| | | > |
| | | </el-button> |
| | | <el-button |
| | | v-if="isReserve" |
| | | v-hasRole="['user']" |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | > |
| | | </el-button> |
| | | <el-button |
| | | v-if="isReserve" |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | > |
| | | </el-button> |
| | | <el-tooltip class="item" effect="dark" content="审核" placement="top"> |
| | | <el-button |
| | | v-if="scope.row.auditRole && $route.query.projectCategory==='6'" |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-circle-check" |
| | | @click="handleDetail(scope.row)" |
| | | > |
| | | </el-button> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="详情" placement="top"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handleDetail(scope.row)" |
| | | > |
| | | </el-button> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="编辑" placement="top"> |
| | | <el-button |
| | | v-if="isReserve" |
| | | v-hasRole="['user']" |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | > |
| | | </el-button> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="删除" placement="top"> |
| | | <el-button |
| | | v-if="isReserve" |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | > |
| | | </el-button> |
| | | </el-tooltip> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | item.index = index + 1; |
| | | item.key = index; |
| | | item.serialNumber = index + 1; |
| | | if(item.id ==='usedStatus' ){ |
| | | if(projectCategory !== '6') { |
| | | item.visible = false |
| | | } else { |
| | | item.visible = true |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | this.columns = columns; |
| | |
| | | item.index = index + 1; |
| | | item.key = index; |
| | | item.serialNumber = index + 1 |
| | | if(item.id ==='usedStatus' ){ |
| | | if(projectCategory !== '6') { |
| | | item.visible = false |
| | | } else { |
| | | item.visible = true |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | this.columns = currentRest.map((item, index) => { |
| | | item.index = index + 1; |
| | | item.key = index; |
| | | item.serialNumber = index + 1 |
| | | if(item.id ==='usedStatus' ){ |
| | | if(projectCategory !== '6') { |
| | | item.visible = false |
| | | } else { |
| | | item.visible = true |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | //强制table渲染 |