128 lines
3.6 KiB
Vue
128 lines
3.6 KiB
Vue
<template>
|
|
<j-modal
|
|
:title="title"
|
|
:width="width"
|
|
:visible="visible"
|
|
:confirmLoading="confirmLoading"
|
|
switchFullscreen
|
|
@ok="handleOk"
|
|
@cancel="handleCancel"
|
|
cancelText="关闭">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
<a-row>
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<a-form-item>
|
|
<a-input placeholder="请输入企业名称" v-model="queryParam.companyName"></a-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<span class="table-page-search-submitButtons">
|
|
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
|
|
<a-button icon="reload">重置</a-button>
|
|
</span>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form>
|
|
</div>
|
|
<div>
|
|
<a-table
|
|
ref="table"
|
|
size="middle"
|
|
bordered
|
|
rowKey="id"
|
|
:columns="columns"
|
|
:dataSource="dataSource"
|
|
:pagination="ipagination"
|
|
:loading="loading"
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}"
|
|
@change="handleTableChange"
|
|
class="j-table-force-nowrap">
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
<div v-html="text"></div>
|
|
</template>
|
|
<template slot="imgSlot" slot-scope="text">
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
|
<img v-else :src="getImgView(text)" height="25px" alt=""
|
|
style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
|
</template>
|
|
<template slot="fileSlot" slot-scope="text,record">
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
|
<j-ellipsis @click.native="uploadFile(record.chargeNoticeFileId)" style="color:#219AFF;cursor: pointer"
|
|
:value="text" :length="20"/>
|
|
</template>
|
|
<template slot="text" slot-scope="text,record">
|
|
<j-ellipsis :value="text" :length="30"></j-ellipsis>
|
|
</template>
|
|
</a-table>
|
|
</div>
|
|
</j-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
|
|
|
export default {
|
|
name: 'BusinessSelect',
|
|
mixins: [JeroListMixin],
|
|
data() {
|
|
return {
|
|
title: '选择企业',
|
|
width: 800,
|
|
visible: false,
|
|
confirmLoading: false,
|
|
url: {
|
|
list: '/company/payCompanyManagement/list',
|
|
},
|
|
selectedCompany: {},
|
|
selectedRowKeys: [],
|
|
columns: [
|
|
{
|
|
title: '序号',
|
|
dataIndex: '',
|
|
key: 'rowIndex',
|
|
width: 60,
|
|
align: 'center',
|
|
customRender: function (t, r, index) {
|
|
return parseInt(index) + 1
|
|
}
|
|
}, {
|
|
title: '企业名称',
|
|
align: 'center',
|
|
dataIndex: 'companyName',
|
|
scopedSlots: { customRender: 'text' }
|
|
}
|
|
],
|
|
dataSource: [
|
|
{
|
|
id: 1,
|
|
companyName: '合众未来'
|
|
}, {
|
|
id: 2,
|
|
companyName: '盛扬信远'
|
|
}
|
|
]
|
|
}
|
|
},
|
|
methods: {
|
|
handleOk() {
|
|
this.$emit('ok', this.selectedCompany)
|
|
this.close()
|
|
},
|
|
handleCancel() {
|
|
this.close()
|
|
},
|
|
close() {
|
|
this.visible = false
|
|
},
|
|
onSelectChange(selectedRowKeys, selectionRows) {
|
|
this.selectedCompany = selectionRows[0]
|
|
this.selectedRowKeys = selectedRowKeys
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
@import '~@assets/less/common.less';
|
|
</style> |