修改WebSocket列表
This commit is contained in:
parent
8ef17169be
commit
efc69025c1
|
@ -19,9 +19,9 @@
|
|||
<div style="height:900px;overflow-y:auto;">
|
||||
<a-progress :percent="percent" status="active" />
|
||||
<a-list bordered :data-source="contentList">
|
||||
<template #renderItem="{ item }">
|
||||
<a-list-item>{{ item }}</a-list-item>
|
||||
</template>
|
||||
<a-list-item slot="renderItem" slot-scope="item, index">
|
||||
{{ item }}
|
||||
</a-list-item>
|
||||
</a-list>
|
||||
</div>
|
||||
<!-- table区域-end -->
|
||||
|
@ -33,26 +33,18 @@
|
|||
|
||||
<script>
|
||||
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from "@/components/jeecg/JEllipsis";
|
||||
import {getAction} from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: "dataManage",
|
||||
mixins:[JeecgListMixin],
|
||||
components: {
|
||||
taskModal,
|
||||
JEllipsis,
|
||||
contentList:[],
|
||||
percent:0,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: '数据发布',
|
||||
contentList:[],
|
||||
percent:0,
|
||||
websock:{},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -65,7 +57,7 @@
|
|||
this.websocketclose();
|
||||
},
|
||||
created () {
|
||||
this.loadData();
|
||||
|
||||
},
|
||||
methods: {
|
||||
initWebSocket: function () {
|
||||
|
@ -85,7 +77,7 @@
|
|||
},
|
||||
websocketonmessage: function (e) {
|
||||
var data = eval("(" + e.data + ")");
|
||||
console.log(e);
|
||||
console.log(data);
|
||||
//处理订阅信息
|
||||
this.contentList.push(data.content);
|
||||
this.percent = data.currProgress
|
||||
|
@ -100,19 +92,6 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
loadData() {
|
||||
taskPageList(this.queryParam).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.rows||res.result;
|
||||
if(res.result.total)
|
||||
{
|
||||
this.ipagination.total = res.result.total;
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user