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