| | |
| | | <el-table-column fixed="right" :label="$t('handle')" header-align="center" align="center" :width="width" v-slot="{ row }"> |
| | | <slot :row="row"></slot> |
| | | <zt-table-button v-if="isCanView(row)" type="default" @click="table.viewHandle(row)">{{ $t('view') }}</zt-table-button> |
| | | <zt-table-button v-if="isCanEidt(row) && $hasPermission(editPerm)" type="primary" @click="table.editHandle(row)">{{ $t('update') }}</zt-table-button> |
| | | <zt-table-button v-if="isCanEidt(row) && $hasPermission(editPerm) " type="primary" @click="table.editHandle(row)">{{ $t('update') }}</zt-table-button> |
| | | <zt-table-button v-if="isCanDelete(row) && $hasPermission(deletePerm)" type="danger" @click="table.deleteHandle(row)">{{ $t('delete') }}</zt-table-button> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | return typeof this.hasView === 'boolean' ? this.hasView : this.hasView(row) |
| | | }, |
| | | isCanEidt(row) { |
| | | if(row.stepMarker && row.stepMarker.includes('wc')){ |
| | | if(row.flowInfo && row.flowInfo.bizId){ |
| | | return false |
| | | }else { |
| | | return typeof this.hasEdit === 'boolean' ? this.hasEdit : this.hasEdit(row) |
| | | } |
| | | }, |
| | | isCanDelete(row) { |
| | | return typeof this.hasDelete === 'boolean' ? this.hasDelete : this.hasDelete(row) |
| | | if(row.flowInfo && row.flowInfo.bizId){ |
| | | return false |
| | | }else { |
| | | return typeof this.hasDelete === 'boolean' ? this.hasDelete : this.hasDelete(row) |
| | | } |
| | | } |
| | | } |
| | | } |