必填
This commit is contained in:
@@ -64,46 +64,18 @@
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" >{{$t('addUser')}}</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls($t('userInformation'))">{{$t('export')}}</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('recycleBin')}}</a-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<a-menu slot="overlay" @click="handleMenuClick">
|
||||
<a-menu-item key="1">
|
||||
<a-icon type="delete" @click="batchDel"/>
|
||||
{{$t('delete')}}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2">
|
||||
<a-icon type="lock" @click="batchFrozen('2')"/>
|
||||
{{$('frozen')}}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="3">
|
||||
<a-icon type="unlock" @click="batchFrozen('1')"/>
|
||||
{{$t('thaw')}}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
<a-button style="margin-left: 8px">
|
||||
{{$t('batchOperation')}}
|
||||
<a-icon type="down"/>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery"/>
|
||||
<!-- <a-button @click="handleAdd" type="primary" icon="plus" >{{$t('addUser')}}</a-button>-->
|
||||
<!-- <a-button type="primary" icon="download" @click="handleExportXls($t('userInformation'))">{{$t('export')}}</a-button>-->
|
||||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
|
||||
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
|
||||
<!-- </a-upload>-->
|
||||
<!-- <a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('recycleBin')}}</a-button>-->
|
||||
</div>
|
||||
|
||||
<!-- table区域-begin -->
|
||||
<div>
|
||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
||||
<i class="anticon anticon-info-circle ant-alert-icon"></i>{{$t('selected')}} <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>{{$t('term')}}
|
||||
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
ref="table"
|
||||
bordered
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
@@ -117,47 +89,6 @@
|
||||
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)" >{{$t('edit')}}</a>
|
||||
|
||||
<a-divider type="vertical"/>
|
||||
|
||||
<a-dropdown>
|
||||
<a class="ant-dropdown-link">
|
||||
{{$t('more')}} <a-icon type="down"/>
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleDetail(record)">{{$t('details')}}</a>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleChangePassword(record.username)">{{$t('password')}}</a>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item>
|
||||
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete(record.id)">
|
||||
<a>{{$t('delete')}}</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item v-if="record.status==1">
|
||||
<a-popconfirm :title="$t('freezePassword')" @confirm="() => handleFrozen(record.id,2,record.username)">
|
||||
<a>{{$t('frozen')}}</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item v-if="record.status==2">
|
||||
<a-popconfirm :title="$t('youThaw')" @confirm="() => handleFrozen(record.id,1,record.username)">
|
||||
<a>{{$t('thaw')}}</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
<!-- table区域-end -->
|
||||
@@ -202,19 +133,12 @@
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key:'rowIndex',
|
||||
width:60,
|
||||
width:20,
|
||||
align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: '头像',
|
||||
// align: "center",
|
||||
// width: 120,
|
||||
// dataIndex: 'avatar',
|
||||
// scopedSlots: {customRender: "avatarslot"}
|
||||
// },
|
||||
{
|
||||
title: this.$t('userAccount'),
|
||||
align: "center",
|
||||
@@ -265,13 +189,13 @@
|
||||
width: 80,
|
||||
dataIndex: 'status_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
align: "center",
|
||||
width: 170
|
||||
}
|
||||
// {
|
||||
// title: this.$t('operation'),
|
||||
// dataIndex: 'action',
|
||||
// scopedSlots: {customRender: 'action'},
|
||||
// align: "center",
|
||||
// width: 170
|
||||
// }
|
||||
],
|
||||
superQueryFieldList: [
|
||||
{ type: 'input', value: 'username', text: this.$t('userAccount'), },
|
||||
|
||||
Reference in New Issue
Block a user