消息通知页面增加全部设置未已读的功能

This commit is contained in:
季圣华
2021-12-14 22:44:43 +08:00
parent 674eb203af
commit b319148049

View File

@@ -30,9 +30,9 @@
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<!-- <div class="table-operator">--> <div class="table-operator">
<!-- <a-button type="primary" @click="readAll" icon="book">全部标注已读</a-button>--> <a-button type="primary" @click="readAll" icon="book">全部标注已读</a-button>
<!-- </div>--> </div>
<div style="margin-top: 5px"> <div style="margin-top: 5px">
<a-table <a-table
ref="table" ref="table"
@@ -59,8 +59,7 @@
</template> </template>
<script> <script>
import { filterObj } from '@/utils/util' import { postAction } from '@/api/manage'
import { getAction,putAction,postAction } from '@/api/manage'
import ShowAnnouncement from '@/components/tools/ShowAnnouncement' import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
import {JeecgListMixin} from '@/mixins/JeecgListMixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import DynamicNotice from '../../components/tools/DynamicNotice' import DynamicNotice from '../../components/tools/DynamicNotice'
@@ -111,8 +110,7 @@
url: { url: {
list: "/msg/list", list: "/msg/list",
batchUpdateStatus:"/msg/batchUpdateStatus", batchUpdateStatus:"/msg/batchUpdateStatus",
editCementSend:"sys/sysAnnouncementSend/editByAnntIdAndUserId", readAllMsg:"/msg/readAllMsg",
readAllMsg:"sys/sysAnnouncementSend/readAll",
}, },
loading:false, loading:false,
openPath:'', openPath:'',
@@ -127,7 +125,6 @@
postAction(this.url.batchUpdateStatus,{ids:record.id, status: '2'}).then((res)=>{ postAction(this.url.batchUpdateStatus,{ids:record.id, status: '2'}).then((res)=>{
if(res && res.code === 200){ if(res && res.code === 200){
this.loadData(); this.loadData();
//this.syncHeadNotic(record.anntId)
} }
}); });
if(record.openType==='component'){ if(record.openType==='component'){
@@ -138,20 +135,16 @@
this.$refs.ShowAnnouncement.detail(record); this.$refs.ShowAnnouncement.detail(record);
} }
}, },
syncHeadNotic(anntId){
getAction("sys/annountCement/syncNotic",{anntId:anntId})
},
readAll(){ readAll(){
var that = this; let that = this;
that.$confirm({ that.$confirm({
title:"确认操作", title:"确认操作",
content:"是否全部标注已读?", content:"是否全部标注已读?",
onOk: function(){ onOk: function(){
putAction(that.url.readAllMsg).then((res)=>{ postAction(that.url.readAllMsg).then((res)=>{
if(res.success){ if(res && res.code === 200){
that.$message.success(res.message); that.$message.success(res.data);
that.loadData(); that.loadData();
that.syncHeadNotic();
} }
}); });
} }