jinlin
2023-12-12 0dff85a422669f41ef6d8e88fa24bf26ca164cbd
web/packages/components/zt-table-column-handle/src/zt-table-column-handle.vue
@@ -2,7 +2,7 @@
  <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>
@@ -41,10 +41,18 @@
        return typeof this.hasView === 'boolean' ? this.hasView : this.hasView(row)
      },
      isCanEidt(row) {
        return typeof this.hasEdit === 'boolean' ? this.hasEdit : this.hasEdit(row)
        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)
        }
      }
    }
  }