增加消息

main
252535409 2 years ago
parent 5e87e5f2ee
commit 52074bbd9d

@ -167,7 +167,7 @@ export default {
fullPath: indexKey,
meta: {
icon: 'dashboard',
title: '首页',
title: '资料袋管理',
},
})
this.linkList.splice(0, 0, indexKey)

@ -6,23 +6,6 @@
<a-spin :spinning="loadding">
<a-tabs>
<a-tab-pane :tab="msg1Title" key="1">
<!--<a-list>
<a-list-item>
<a-list-item-meta title="你收到了 14 份新周报" description="一年前">
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"/>
</a-list-item-meta>
</a-list-item>
<a-list-item>
<a-list-item-meta title="你推荐的 IT大牛 已通过第三轮面试" description="一年前">
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png"/>
</a-list-item-meta>
</a-list-item>
<a-list-item>
<a-list-item-meta title="这种模板可以区分多种通知类型" description="一年前">
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png"/>
</a-list-item-meta>
</a-list-item>
</a-list>-->
<a-list>
<a-list-item :key="index" v-for="(record, index) in announcement1">
<div style="margin-left: 5%;width: 80%">
@ -201,7 +184,7 @@ export default {
// WebSocketwshttpwsshttps
var userId = store.getters.userInfo.id;
var url = window._CONFIG['domianURL'].replace("https://", "wss://").replace("http://", "ws://") + "/websocket/" + userId;
//console.log(url);
console.log(url);
this.websock = new WebSocket(url);
this.websock.onopen = this.websocketOnopen;
this.websock.onerror = this.websocketOnerror;
@ -214,11 +197,11 @@ export default {
//this.heartCheck.reset().start();
},
websocketOnerror: function (e) {
// console.log("WebSocket");
console.log("WebSocket连接发生错误");
this.reconnect();
},
websocketOnmessage: function (e) {
// console.log("------------", e.data);
console.log("-----接收消息-------", e.data);
var data = eval("(" + e.data + ")"); //
if (data.cmd == "topic") {
//

@ -37,7 +37,7 @@
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:dataSource="tableData"
:pagination="ipagination"
:loading="loading"
@change="handleTableChange">
@ -51,6 +51,7 @@
</template>
<script>
import MenuTitle from '@/views/ai/MenuTitle'
import { filterObj } from '@/utils/util'
import { getAction,putAction } from '@/api/manage'
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
@ -68,6 +69,12 @@
return {
description: '系统通告表管理页面',
queryParam: {},
tableData: [],
queryParams: {
pageNo: 1,
pageSize: 10,
delFlag: 0
},
columns: [{
title: '标题',
align:"center",
@ -127,7 +134,7 @@
align:"center",
scopedSlots: { customRender: 'action' },
}],
url: {
url: {
list: "/sys/sysAnnouncementSend/getMyAnnouncementSend",
editCementSend:"sys/sysAnnouncementSend/editByAnntIdAndUserId",
readAllMsg:"sys/sysAnnouncementSend/readAll",
@ -137,6 +144,9 @@
formData:''
}
},
created() {
this.getList()
},
methods: {
handleDetail: function(record){
this.$refs.sysAnnouncementModal.detail(record);
@ -159,6 +169,18 @@
},
syncHeadNotic(anntId){
getAction("sys/annountCement/syncNotic",{anntId:anntId})
},
//
getList() {
this.loading = true
getAction(this.url.list, this.queryParams).then((res) => {
if (res.success) {
this.total = res.result.total || 0
this.pageTotal = Math.ceil(this.total / this.queryParams.pageSize)
this.tableData = res.result.records
this.loading = false
}
})
},
readAll(){
var that = this;

Loading…
Cancel
Save