关联项目会议项目
This commit is contained in:
@@ -0,0 +1,192 @@
|
||||
<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 label="会议名称">
|
||||
<a-input placeholder="请输入会议名称" v-model="queryParam.meetingName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||
<a-form-item label="会议时间">
|
||||
<j-date
|
||||
placeholder="请选择开始日期"
|
||||
class="query-group-cust"
|
||||
v-model="queryParam.meetingStartTime"
|
||||
:disabled-date="disabledStartDate">
|
||||
</j-date>
|
||||
<span class="query-group-split-cust"></span>
|
||||
<j-date
|
||||
placeholder="请选择结束日期"
|
||||
class="query-group-cust"
|
||||
v-model="queryParam.meetingEndTime"
|
||||
:disabled-date="disabledEndDate">
|
||||
</j-date>
|
||||
</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" @click="searchReset" class="reset-button">重置</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="text" slot-scope="text">
|
||||
<j-ellipsis v-if="text && text.length > 0" :value="text" :length="30"></j-ellipsis>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import {RangeDateMixin} from '@/mixins/RangeDateMixin'
|
||||
import JDate from '@comp/tools/JDate'
|
||||
import JEllipsis from '@comp/jero/JEllipsis'
|
||||
|
||||
export default {
|
||||
name: 'MeetingListModal',
|
||||
components: {
|
||||
JDate,
|
||||
JEllipsis
|
||||
},
|
||||
mixins: [JeroListMixin, RangeDateMixin],
|
||||
data() {
|
||||
return {
|
||||
title: '选择会议',
|
||||
width: 1200,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: '/meeting/payMeeting/page',
|
||||
},
|
||||
dateKeyObj: {
|
||||
beginKey: 'meetingStartTime',
|
||||
endKey: 'meetingEndTime'
|
||||
},
|
||||
selectedCompany: {},
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '会议名称',
|
||||
align: 'center',
|
||||
dataIndex: 'meetingName',
|
||||
scopedSlots: {customRender: 'text'},
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
title: '会议类型',
|
||||
align: 'center',
|
||||
dataIndex: 'meetingType_dictText',
|
||||
scopedSlots: {customRender: 'text'},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '负责人',
|
||||
align: 'center',
|
||||
dataIndex: 'directorName',
|
||||
scopedSlots: {customRender: 'text'},
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
title: '召开时间',
|
||||
align: 'center',
|
||||
dataIndex: 'startTime',
|
||||
width: 160,
|
||||
customRender: function (text, record) {
|
||||
return `${record.startTime}~${record.endTime}`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '召开地点',
|
||||
align: 'center',
|
||||
dataIndex: 'venue',
|
||||
width: 160,
|
||||
customRender: function (text, record) {
|
||||
return text + '/' + record.address
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '会议费用',
|
||||
align: 'center',
|
||||
dataIndex: 'meetingCosts',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
dataIndex: 'createTime',
|
||||
scopedSlots: {customRender: 'text'},
|
||||
}
|
||||
],
|
||||
dataSource: []
|
||||
}
|
||||
},
|
||||
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
|
||||
},
|
||||
/*
|
||||
* 修改查询条件
|
||||
* */
|
||||
searchQuery() {
|
||||
this.queryParam.meetingStartTime = this.queryParam.meetingStartTime ? this.queryParam.meetingStartTime + ' ' + '00:00:00' : undefined
|
||||
this.queryParam.meetingEndTime = this.queryParam.meetingEndTime ? this.queryParam.meetingEndTime + ' ' + '23:59:59' : undefined
|
||||
this.queryParam.createTime_begin = this.queryParam.createTime_begin ? this.queryParam.createTime_begin + ' ' + '00:00:00' : undefined
|
||||
this.queryParam.createTime_end = this.queryParam.createTime_end ? this.queryParam.createTime_end + ' ' + '23:59:59' : undefined
|
||||
this.lastQueryParam = {...this.queryParam}
|
||||
this.loadData(1)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div class="company-select">
|
||||
<a-input @click="chooseBusiness" autocomplete="off" :value="value[valueKey]" v-bind="$attrs" :readOnly="true"></a-input>
|
||||
<meeting-list-modal ref="meetingList" @ok="handleOk" v-bind="$attrs"></meeting-list-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MeetingListModal from '@comp/company/MeetingListModal'
|
||||
export default {
|
||||
name: 'MeetingSelect',
|
||||
components:{
|
||||
MeetingListModal
|
||||
},
|
||||
props: {
|
||||
// 是否可以选择
|
||||
isCompanyDisabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
value: {
|
||||
type: [Object],
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 回显数据的key
|
||||
valueKey: {
|
||||
type: String,
|
||||
default: 'meetingName'
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
/**
|
||||
* 打开选择会议的的模态框,如果父级传参为true则点击不弹模态框
|
||||
*/
|
||||
chooseBusiness() {
|
||||
if (this.isCompanyDisabled) {
|
||||
return
|
||||
}
|
||||
this.$refs.meetingList.searchReset()
|
||||
this.$refs.meetingList.visible = true
|
||||
},
|
||||
handleOk(value) {
|
||||
this.$emit('change', value)
|
||||
}
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'change'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
a-input:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user