【bug】分标委会议分布提醒修改

This commit is contained in:
fengachen
2021-09-27 10:51:20 +08:00
parent dc588204bb
commit cdae27d402
@@ -11,11 +11,19 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row>
<a-col :xl="10" :lg="10" :md="10" :sm="24">
<!-- 分标委发布显示这个查询条件-->
<a-col :xl="10" :lg="10" :md="10" :sm="24" v-if="$route.query.meetingType === '5' ">
<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="10" :lg="10" :md="10" :sm="24" v-else>
<a-form-item label="成员单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入成员单位" v-model="queryParam.chargeCompanyTemporaryName"></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>
@@ -54,7 +62,7 @@
</span>
</a-table>
<template slot="footer">
<a-button type="primary" @click="handleOk" v-preventclick>确定发布</a-button>
<a-button type="primary" @click="handleOk" v-preventclick>确定发布</a-button>
<a-button @click="handleCancel">取消</a-button>
</template>
@@ -77,6 +85,7 @@ export default {
confirmLoading: false,
form: this.$form.createForm(this),
disableMixinCreated: true,
// 工作组发布提醒 表头
columns: [
{
title: '序号',
@@ -110,6 +119,40 @@ export default {
// scopedSlots: {customRender: 'text'}
},
],
// 分标委发布提醒 表头
commitColumns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{
title: '成员单位',
align: 'center',
width: 200,
dataIndex: 'companyName',
scopedSlots: {customRender: 'text'}
},
{
title: '企业联系人',
align: 'center',
width: 200,
dataIndex: 'contactsName',
scopedSlots: {customRender: 'text'}
},
{
title: '是否提醒',
align: 'center',
width: 200,
dataIndex: 'remind',
// scopedSlots: {customRender: 'text'}
},
],
model: {},
labelCol: {
xs: {span: 24},
@@ -125,26 +168,40 @@ export default {
list: '/project/payWorkingGroupSubitem/list',
},
// 会议维护选中的会议
selectedMetingList:[],
newColumns:[]
selectedMetingList: [],
newColumns: [],
// 提醒类型 1 是工作组 2 是分标委
remindType:'',
}
},
methods: {
open(meetingList) {
this.newColumns = [...this.columns]
this.visible = true
// 保存选中的会议
this.selectedMetingList = [...meetingList]
// 列表需要工作组id参数
this.filters.workingGroupId = this.$route.query.workingGroupProjectId
// 分表委会议需要分标标委的id
if (this.$route.query.meetingType === '5') {
// 分标委
this.newColumns = [...this.commitColumns]
this.filters.id = this.$route.query.id
this.remindType = 2
// 分表委成员
this.url.list = '/payCaseCommitteeSubitem/payCaseCommitteeSubitem/list'
} else {
// 工作组
this.remindType = 1
this.newColumns = [...this.columns]
}
// 发布提醒需要会议id 只有选择一个会议的时候 才会有这个参数
if(meetingList.length === 1) {
this.filters.meetingId = meetingList[0]
if (meetingList.length === 1) {
this.filters.meetingId = meetingList[0]
}
// 选择多个会议的时候不需要提醒字段 这样写是因为无法精准定位每一个人对应的每一个会议 这个人是否被提醒
if(meetingList.length > 1){
if (meetingList.length > 1) {
// 去掉列表的提醒字段
this.newColumns = this.newColumns.filter( item => item.dataIndex !== 'remind')
this.newColumns = this.newColumns.filter(item => item.dataIndex !== 'remind')
}
this.searchReset()
},
@@ -157,18 +214,19 @@ export default {
this.$message.warn('请至少选择一个成员单位')
return
} else {
this.confirmLoading =true
this.confirmLoading = true
const param = {
meetingIds:this.selectedMetingList,
subitemIds:this.selectedRowKeys
meetingIds: this.selectedMetingList,
subitemIds: this.selectedRowKeys,
projectType:this.remindType
}
publishRemind(param).then(res => {
if(res.success){
if (res.success) {
this.$message.success(res.message)
this.$emit('ok')
this.confirmLoading = false
this.handleCancel()
}else {
} else {
this.$message.warn(res.message)
}
}).finally(() => {