354 lines
12 KiB
Vue
354 lines
12 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" :maxLength='50'></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" :maxLength='50'></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" :maxLength='50'></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" v-has="'committee:search'">查询</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" v-has="'committee:add'">新增分标委</a-button>
|
|
<a-button type="primary" icon="export" @click="handleExportXls('分标委维护')" v-has="'committee:export'">导出
|
|
</a-button>
|
|
<a-button type="danger" icon="delete" @click="batchDel" v-has="'committee:batchDel'">批量删除</a-button>
|
|
</div>
|
|
<!-- 操作按钮区域-end-->
|
|
|
|
<!-- table表格区域-->
|
|
<div>
|
|
<a-table rowKey="id"
|
|
size="middle"
|
|
:scroll="{x: 1300}"
|
|
:columns="columns"
|
|
:data-source="dataSource"
|
|
:pagination="ipagination"
|
|
:expandedRowKeys.sync="expandedRowKeys"
|
|
bordered
|
|
:loading="loading"
|
|
@change="handleTableChange"
|
|
class="j-table-force-nowrap">
|
|
<template slot="text" slot-scope="text">
|
|
<a-tooltip>
|
|
<template slot="title">{{ text }}</template>
|
|
<div class="table-text">{{ text }}</div>
|
|
</a-tooltip>
|
|
</template>
|
|
|
|
<span slot="operation" class="action-span-cell" slot-scope="text, record">
|
|
<a @click="toUnderStudyProject(record)" v-has="'committee:underStudyProject'">在研项目</a>
|
|
<a @click="handleMaintainData(record)" v-has="'committee:fileMaintenance'">其他分发资料</a>
|
|
<a @click="handleMaintainMeeting(record)" v-has="'committee:meetingMaintenance'">分标委会议</a>
|
|
<a @click="handleAddCommitteeMember(record)" v-has="'committee:addMember'">新增委员</a>
|
|
<a @click="handleEdit(record)" v-has="'committee:edit'">基本信息维护</a>
|
|
<a @click="handleDelete(record.id)" v-has="'committee:delete'">删除</a>
|
|
</span>
|
|
|
|
<a-table
|
|
rowKey="childrenId"
|
|
slot="expandedRowRender"
|
|
slot-scope="record"
|
|
:columns="committeeMemberColumns"
|
|
:data-source="record.list"
|
|
:pagination="false"
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, columnWidth: 80}"
|
|
class="j-table-force-nowrap">
|
|
<template slot="textRow" slot-scope="text">
|
|
<a-tooltip>
|
|
<template slot="title">{{ text }}</template>
|
|
<div class="table-text">{{ text }}</div>
|
|
</a-tooltip>
|
|
</template>
|
|
|
|
<span slot="action" class="action-span-cell" slot-scope="text, itemRecord">
|
|
<a @click="handleDeleteMember(itemRecord.childrenId)" v-has="'committee:member:delete'">删除</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'
|
|
import { downloadFile } from '../../../api/manage'
|
|
|
|
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: '/payCaseCommitteeSubitem/payCaseCommitteeSubitem/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: 520,
|
|
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',
|
|
width: 220,
|
|
scopedSlots: { customRender: 'textRow' }
|
|
}, {
|
|
title: '手机号',
|
|
align: 'center',
|
|
dataIndex: 'phone',
|
|
width: 220,
|
|
scopedSlots: { customRender: 'textRow' }
|
|
}, {
|
|
title: '操作',
|
|
dataIndex: 'action',
|
|
align: 'center',
|
|
width: 79,
|
|
scopedSlots: { customRender: 'action' }
|
|
}
|
|
],
|
|
dataSource: [],
|
|
expandedRowKeys: [] // 展开数据的id
|
|
}
|
|
},
|
|
methods: {
|
|
loadData(arg) {
|
|
if (!this.url.list) {
|
|
this.$message.error('请设置url.list属性!')
|
|
return
|
|
}
|
|
//加载数据 若传入参数1则加载第一页的内容
|
|
if (arg === 1) {
|
|
this.ipagination.current = 1
|
|
}
|
|
// 清除展开的行id
|
|
this.expandedRowKeys = []
|
|
var params = this.getQueryParams()//查询条件
|
|
this.loading = true
|
|
getAction(this.url.list, params).then((res) => {
|
|
if (res.success) {
|
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
this.dataSource = res.result.records || res.result
|
|
// 表格有数据则需要展开
|
|
if (this.dataSource.length > 0) {
|
|
this.dataSource.forEach(item => {
|
|
this.expandedRowKeys.push(item.id)
|
|
})
|
|
this.$forceUpdate()
|
|
}
|
|
if (res.result.total) {
|
|
this.ipagination.total = res.result.total
|
|
//清空列表选中
|
|
this.onClearSelected()
|
|
} else {
|
|
this.ipagination.total = 0
|
|
}
|
|
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
}
|
|
if (res.code === 510) {
|
|
this.$message.warning(res.message)
|
|
}
|
|
this.loading = false
|
|
}).finally(() => {
|
|
this.loading = false
|
|
})
|
|
},
|
|
// 下拉框的搜索
|
|
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
|
|
},
|
|
handleExportXls(fileName) {
|
|
if (!fileName || typeof fileName != 'string') {
|
|
fileName = '导出文件'
|
|
}
|
|
let param = this.getQueryParams()
|
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
|
param['ids'] = this.selectedRowKeys.join(',')
|
|
}
|
|
console.log('导出参数', param)
|
|
downloadFile(this.url.exportXlsUrl, fileName + '.xlsx', param)
|
|
},
|
|
/**
|
|
* 新增成员
|
|
* @param record
|
|
*/
|
|
handleAddCommitteeMember(record) {
|
|
record.committeeId = record.id
|
|
this.$refs.memberModalForm.add(record)
|
|
this.$refs.memberModalForm.title = '新增成员'
|
|
this.$refs.memberModalForm.disableSubmit = false
|
|
},
|
|
/**
|
|
* 删除成员
|
|
* @param id
|
|
*/
|
|
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'
|
|
}
|
|
})
|
|
},
|
|
/**
|
|
* 前往在研项目
|
|
* @param record
|
|
*/
|
|
toUnderStudyProject(record) {
|
|
this.$router.push({
|
|
path: '/projectManagement/CommitteeMaintenance/UnderStudyProject',
|
|
query: {
|
|
title: record.name,
|
|
abbreviation: record.abbreviation
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
@import '~@assets/less/common.less';
|
|
|
|
.table-text {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
</style> |