[update] 修改操作列只显示一个按钮,其他显示在更多
This commit is contained in:
@@ -54,23 +54,35 @@
|
||||
:can-drag="true"
|
||||
:loading="loading"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 280px)'}"
|
||||
:scroll="{x: '100%', y:'calc(100vh - 280px)'}"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
@change="handleTableChange"
|
||||
>
|
||||
<template v-slot:operation="{text,record}">
|
||||
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('docTool.comparison.comparisonResults')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy === userInfoQuery.username || administrators"
|
||||
@click="subscribe(record)">
|
||||
{{!record.releaseState || record.releaseState === 'draft' ? $t('release') :$t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-if="(record.createBy === userInfoQuery.username || administrators) && record.releaseState === 'draft'"
|
||||
@click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="(record.createBy === userInfoQuery.username || administrators) && record.releaseState === 'draft'"
|
||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('docTool.comparison.comparisonResults')}}</a>
|
||||
|
||||
<a-divider type="vertical" v-if="record.createBy === userInfoQuery.username || administrators" />
|
||||
|
||||
<a-dropdown v-if="record.createBy === userInfoQuery.username || administrators">
|
||||
<a class="ant-dropdown-link">
|
||||
{{ $t('more') }} <a-icon type="down"/>
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a v-if="record.createBy === userInfoQuery.username || administrators" @click="subscribe(record)">
|
||||
{{!record.releaseState || record.releaseState === 'draft' ? $t('release') :$t('withdraw')}}
|
||||
</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a v-if="(record.createBy === userInfoQuery.username || administrators) && record.releaseState === 'draft'"
|
||||
@click="edit(record)">{{$t('edit')}}</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a v-if="(record.createBy === userInfoQuery.username || administrators) && record.releaseState === 'draft'"
|
||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<template v-slot:serialNumberRight="{text,record}">
|
||||
<a @click="serialNumberRightClick(record)" :title="text">{{text}}</a>
|
||||
@@ -102,7 +114,9 @@ export default {
|
||||
deleteBatch: '/compare/sarFileCompareInfo/deleteBatch'
|
||||
},
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
dataSource: [
|
||||
{id: 1}
|
||||
],
|
||||
selectedRowKeys: [],
|
||||
selectionRows: [],
|
||||
downLoadFileUrl: window._CONFIG.domianPreviewURL + '/sys/common/download',
|
||||
@@ -192,7 +206,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 310,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
|
||||
Reference in New Issue
Block a user