【bug】标协会员会议维护不显示发布 列表不显示已提醒字段

This commit is contained in:
fengachen
2021-10-22 16:03:33 +08:00
parent 69894599c9
commit cc6a0c3e32
2 changed files with 62 additions and 59 deletions
@@ -51,8 +51,8 @@
</j-date> </j-date>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 标协会议不显示-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="$route.query.meetingType === '5' ">
<a-form-item label="已提醒" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="已提醒" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag style="width: 100%" <j-dict-select-tag style="width: 100%"
dict-code="yn" dict-code="yn"
@@ -62,7 +62,8 @@
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons"> <span class="table-page-search-submitButtons">
<a-button type="primary" icon="search" @click="searchQuery" v-has:[authorCode.search]="'committeeMeeting:search'">查询</a-button> <a-button type="primary" icon="search" @click="searchQuery"
v-has:[authorCode.search]="'committeeMeeting:search'">查询</a-button>
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button> <a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
</span> </span>
</a-col> </a-col>
@@ -73,11 +74,18 @@
<!-- 操作按钮区域--> <!-- 操作按钮区域-->
<div class="table-operator"> <div class="table-operator">
<a-button type="primary" icon="plus" @click="handleAdd" v-has:[authorCode.add]="'committeeMeeting:add'">新增</a-button> <a-button type="primary" icon="plus" @click="handleAdd" v-has:[authorCode.add]="'committeeMeeting:add'">新增
<a-button type="primary" icon="export" @click="handleExportXls('会议维护')" v-has:[authorCode.search]="'committeeMeeting:export'">导出</a-button> </a-button>
<a-button type="danger" icon="delete" @click="batchDel" v-has:[authorCode.batchDel]="'committeeMeeting:batchDel'">批量删除</a-button> <a-button type="primary" icon="export" @click="handleExportXls('会议维护')"
v-has:[authorCode.search]="'committeeMeeting:export'">导出
</a-button>
<a-button type="danger" icon="delete" @click="batchDel"
v-has:[authorCode.batchDel]="'committeeMeeting:batchDel'">批量删除
</a-button>
<!--只有工作会议与分标委会议才有--> <!--只有工作会议与分标委会议才有-->
<a-button type="primary" @click="publishRemind" v-if="meetingType === '5' " v-has="'committeeMeeting:publish'">发布</a-button> <a-button type="primary" @click="publishRemind" v-if="meetingType === '5' " v-has="'committeeMeeting:publish'">
发布
</a-button>
</div> </div>
<!-- /操作按钮区域-end--> <!-- /操作按钮区域-end-->
@@ -89,7 +97,7 @@
bordered bordered
rowKey="id" rowKey="id"
:scroll="{x:true}" :scroll="{x:true}"
:columns="columns" :columns="newColumns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
@@ -98,7 +106,8 @@
class="j-table-force-nowrap"> class="j-table-force-nowrap">
<template slot="htmlSlot" slot-scope="text,record"> <template slot="htmlSlot" slot-scope="text,record">
<j-ellipsis class="primary-color" @click="toAttendance(record)" v-if="text" :value="text" :length="20"></j-ellipsis> <j-ellipsis class="primary-color" @click="toAttendance(record)" v-if="text" :value="text"
:length="20"></j-ellipsis>
<span v-else></span> <span v-else></span>
</template> </template>
@@ -185,13 +194,6 @@ export default {
width: 100, width: 100,
scopedSlots: {customRender: 'text'} scopedSlots: {customRender: 'text'}
}, },
{
title: '已提醒',
align: 'center',
dataIndex: 'remind_dictText',
width: 80,
scopedSlots: {customRender: 'text'}
},
{ {
title: '负责人', title: '负责人',
align: 'center', align: 'center',
@@ -204,7 +206,8 @@ export default {
align: 'center', align: 'center',
dataIndex: 'startTime', dataIndex: 'startTime',
width: 160, width: 160,
customRender: (text, record) => (<j-ellipsis value={record.startTime + '~' + record.endTime} length={20}></j-ellipsis>) customRender: (text, record) => (
<j-ellipsis value={record.startTime + '~' + record.endTime} length={20}></j-ellipsis>)
}, },
{ {
title: '召开地点', title: '召开地点',
@@ -241,10 +244,9 @@ export default {
scopedSlots: {customRender: 'action'} scopedSlots: {customRender: 'action'}
}, },
], ],
newColumns: [],
// 权限编码 // 权限编码
authorCode:{ authorCode: {},
},
// 分标委的权限编码 // 分标委的权限编码
committeeMeetingAuthorCode: { committeeMeetingAuthorCode: {
add: 'committeeMeeting:add', add: 'committeeMeeting:add',
@@ -281,11 +283,12 @@ export default {
} }
this.loadData(1) this.loadData(1)
// 不是分标委会议去掉提醒字段 // 不是分标委会议去掉提醒字段
if (this.meetingType !== 5) { if (this.meetingType !== '5') {
console.log(this.columns) this.newColumns = [...this.columns]
// 找出提醒字段的索引 // 找出提醒字段的索引
let index = this.columns.findIndex(item => item.dataIndex === 'remind_dictText') this.newColumns = this.newColumns.filter(item => item.dataIndex !== 'remind_dictText')
this.columns.splice(index, 1) } else {
this.newColumns = [...this.columns]
} }
}, },
computed: { computed: {
@@ -197,7 +197,7 @@ export default {
// 选择多个会议的时候不需要提醒字段 这样写是因为无法精准定位每一个人对应的每一个会议 这个人是否被提醒 // 选择多个会议的时候不需要提醒字段 这样写是因为无法精准定位每一个人对应的每一个会议 这个人是否被提醒
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_dictText')
} }
this.searchReset() this.searchReset()
}, },