Files
laws-sinotruk-client/src/views/personalCenter/receivedShare/ReceivedShare.vue
T

124 lines
4.0 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<a-card :bordered="false">
<!-- 搜索区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :span="6">
<a-form-item :label="$t('personalCenter.receivedShare.pushSearch')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('personalCenter.receivedShare.enterPushInfo')" v-model="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item :label="$t('personalCenter.receivedShare.owningPlate')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:placeholder="$t('pleaseEnter')+$t('personalCenter.receivedShare.owningPlate')"
dict-code="sector"
v-model="queryParam.source">
</j-dict-select-tag>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'personalCenter:receivedShare:search'">{{ $t('query') }}</a-button>
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<!-- 操作区域 -->
<div class="table-operator">
<!-- 批量删除 -->
<a-button icon="delete" type="primary" ghost @click="batchDel" v-has="'personalCenter:receivedShare:batchDel'">
{{ $t('batchDelete') }}
</a-button>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
size="middle"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 接收时间,单独写出来是解决会有滚动条的问题 -->
<template slot="receiptTime" slot-scope="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ record.sharingTime || record.sharingTime === 0 ? record.sharingTime : global.emptyLine }}</template>
<div class="table-text">{{ record.sharingTime || record.sharingTime === 0 ? record.sharingTime : global.emptyLine }}</div>
</a-tooltip>
</template>
</j-table>
</div>
</a-card>
</template>
<script>
import '@assets/less/common.less'
import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
export default {
name: 'ReceivedShare',
components: { JTable },
mixins: [JeroListMixin],
data () {
return {
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
columns: [
{
title: this.$t('personalCenter.receivedShare.owningPlate'),
align: 'center',
width: 180,
dataIndex: 'source_dictText',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('personalCenter.receivedShare.title'),
align: 'center',
width: 180,
dataIndex: 'title',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('personalCenter.receivedShare.forwarder'),
align: 'center',
width: 180,
dataIndex: 'sharerName',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('personalCenter.receivedShare.receiptTime'),
align: 'center',
width: 180,
scopedSlots: { customRender: 'receiptTime' }
}
],
url: {
list: '/personal/lawsStandardSharing/received/page',
deleteBatch: '/personal/lawsStandardSharing/deleteBatch'
}
}
}
}
</script>
<style scoped>
</style>