Files
income_payments_client/src/views/dataNetworkDiskManagement/committee/CommitteeMaintenance.vue
T
2021-09-16 19:46:02 +08:00

264 lines
8.6 KiB
Vue

<template>
<div>
<page-header-title :img-for-icon="IconImg"></page-header-title>
<a-card :bordered="false">
<!-- 查询区域-start -->
<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="分标委名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入分标委名称" v-model="queryParam.fenBiaoWeiName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="企业名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入企业名称" v-model="queryParam.companyName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入用户名称" v-model="queryParam.contactsName"></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" @click="searchReset" class="reset-button">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-end-->
<!-- 操作按钮区域-->
<div class="table-operator">
<a-button type="primary" icon="plus" @click="handleAdd">新增分标委</a-button>
<a-button type="primary" icon="export" @click="handleExportXls('分标委维护')">导出</a-button>
<a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>
</div>
<!-- 操作按钮区域-end-->
<!-- table表格区域-->
<div>
<a-table rowKey="id"
:scroll="{x: 1300}"
:columns="columns"
:data-source="dataSource"
:pagination="ipagination"
bordered
:loading="loading"
@change="handleTableChange"
class="j-table-force-nowrap">
<template slot="text" slot-scope="text">
<j-ellipsis :value="text" :length="20"></j-ellipsis>
</template>
<span slot="operation" class="action-span-cell" slot-scope="text, record">
<a @click="handleMaintainData(record)">资料维护</a>
<a @click="handleMaintainMeeting(record)">会议维护</a>
<a @click="handleAddCommitteeMember(record)">新增成员</a>
<a @click="handleEdit(record)">编辑</a>
<a @click="handleDelete(record.id)">删除</a>
</span>
<a-table
rowKey="childrenId"
slot="expandedRowRender"
slot-scope="record"
:columns="committeeMemberColumns"
:data-source="record.list"
:pagination="false"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap">
<template slot="textRow" slot-scope="text">
<j-ellipsis :value="text" :length="20"></j-ellipsis>
</template>
<span slot="action" class="action-span-cell" slot-scope="text, itemRecord">
<a @click="handleDeleteMember(itemRecord.childrenId)">删除</a>
</span>
</a-table>
</a-table>
</div>
<!-- /table表格区域-->
<!-- 新增分标委-->
<committee-module ref="modalForm" @ok="modalFormOk"></committee-module>
<committee-member-module ref="memberModalForm" @ok="modalFormOk"></committee-member-module>
</a-card>
</div>
</template>
<script>
import {JeroListMixin} from '@/mixins/JeroListMixin'
import CommitteeModule from '@views/dataNetworkDiskManagement/committee/modules/CommitteeModule'
import CommitteeMemberModule from '@views/dataNetworkDiskManagement/committee/modules/CommitteeMemberModule'
import {getAction} from '@api/manage'
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
import IconImg from '@/assets/imgs/icon/icon_committee.png'
export default {
name: 'CommitteeMaintenance',
components: {CommitteeModule, CommitteeMemberModule, PageHeaderTitle},
mixins: [JeroListMixin],
data() {
return {
IconImg,
labelCol: {
xs: {span: 24},
sm: {span: 5}
},
wrapperCol: {
xs: {span: 24},
sm: {span: 10}
},
url: {
list: '/payCaseCommitteeSubitem/payCaseCommitteeSubitem/find',
delete: '/payCaseCommittee/payCaseCommittee/delete',
deleteMember: '/payCaseCommitteeSubitem/payCaseCommitteeSubitem/delete',
deleteBatch: '/payCaseCommitteeSubitem/payCaseCommitteeSubitem/deleteBatch',
exportXlsUrl: '/payCaseCommittee/payCaseCommittee/exportXls'
},
// 父级表头
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 80,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}, {
title: '分标委名称',
align: 'center',
dataIndex: 'name',
scopedSlots: {customRender: 'text'}
}, {
title: '操作',
dataIndex: 'operation',
align: 'center',
width: 400,
scopedSlots: {customRender: 'operation'}
}
],
// 成员表头
committeeMemberColumns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 80,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}, {
title: '姓名',
align: 'center',
dataIndex: 'peopleName',
scopedSlots: {customRender: 'textRow'}
}, {
title: '企业名称',
align: 'center',
dataIndex: 'companyName',
scopedSlots: {customRender: 'textRow'}
}, {
title: '职务',
align: 'center',
dataIndex: 'post',
scopedSlots: {customRender: 'textRow'}
}, {
title: '手机号',
align: 'center',
dataIndex: 'phone',
scopedSlots: {customRender: 'textRow'}
}, {
title: '操作',
dataIndex: 'action',
align: 'center',
width: 199,
scopedSlots: {customRender: 'action'}
}
],
dataSource: []
}
},
methods: {
// 下拉框的搜索
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
)
},
handleAdd() {
this.$refs.modalForm.add()
this.$refs.modalForm.title = '新增分标委'
this.$refs.modalForm.disableSubmit = false
},
/**
* 新增成员
* @param record
*/
handleAddCommitteeMember(record) {
record.committeeId = record.id
this.$refs.memberModalForm.add(record)
this.$refs.memberModalForm.title = '新增成员'
this.$refs.memberModalForm.disableSubmit = false
},
handleDeleteMember(id) {
console.log(id)
if (!this.url.deleteMember) {
this.$message.error('请设置url.deleteMember属性!')
return
}
var that = this
this.$confirm({
title: '确认删除',
content: '确定要删除此条数据吗?',
onOk: function () {
getAction(that.url.deleteMember, {id: id}).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.loadData()
} else {
that.$message.warning(res.message)
}
})
}
})
},
/*
* 资料维护
* */
handleMaintainData(record){
this.$router.push({
path:'/projectManagement/WorkingGroupProjectDataMaintenance',
query:{
id:record.id
}
})
},
/*
* 会议维护
* */
handleMaintainMeeting(record){
this.$router.push({
path:'/projectManagement/CommitteeMeeting',
query:{
id:record.id,
title:record.name,
meetingType:'5'
}
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>