u
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ class CooperationMind(AbstractModel):
|
|||||||
creator = models.BigIntegerField(verbose_name='创建人ID', null=False, blank=False)
|
creator = models.BigIntegerField(verbose_name='创建人ID', null=False, blank=False)
|
||||||
client_id = models.CharField(verbose_name='客户端ID', max_length=64, null=False, blank=False)
|
client_id = models.CharField(verbose_name='客户端ID', max_length=64, null=False, blank=False)
|
||||||
snapshot_data = models.TextField(verbose_name='脑图数据', null=True, )
|
snapshot_data = models.TextField(verbose_name='脑图数据', null=True, )
|
||||||
snapshot_log_id = models.BigIntegerField(verbose_name='data对应的操作日志(cooperation_mind_log)ID', null=True, )
|
log_id = models.BigIntegerField(verbose_name='data对应的操作日志(cooperation_mind_log)ID', null=True, )
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = 'cooperation_mind'
|
db_table = 'cooperation_mind'
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
// show
|
// show
|
||||||
let data = resp.data.snapshot_data
|
let data = resp.data.snapshot_data
|
||||||
me.coop_mind_id = id
|
me.coop_mind_id = id
|
||||||
me.coop_mind_log_id = resp.data.snapshot_log_id
|
me.coop_mind_log_id = resp.data.log_id
|
||||||
me.show_mind(resp.data.coop_mind_name, JSON.parse(data))
|
me.show_mind(resp.data.coop_mind_name, JSON.parse(data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -65,8 +65,6 @@
|
|||||||
this.coop_mind_id = _jm.options.coop_mind_id
|
this.coop_mind_id = _jm.options.coop_mind_id
|
||||||
this.coop_mind_log_id = _jm.options.coop_mind_log_id
|
this.coop_mind_log_id = _jm.options.coop_mind_log_id
|
||||||
this.coop_mind_log_last_id = _jm.options.coop_mind_log_id
|
this.coop_mind_log_last_id = _jm.options.coop_mind_log_id
|
||||||
|
|
||||||
console.log(this.coop_mind_log_id)
|
|
||||||
},
|
},
|
||||||
// 初始化websocket
|
// 初始化websocket
|
||||||
_init_ws: function () {
|
_init_ws: function () {
|
||||||
@@ -131,6 +129,12 @@
|
|||||||
_handle_jsmind_with_ws_message: function (message) {
|
_handle_jsmind_with_ws_message: function (message) {
|
||||||
const msg_json = JSON.parse(message)
|
const msg_json = JSON.parse(message)
|
||||||
const client_id = msg_json.client_id
|
const client_id = msg_json.client_id
|
||||||
|
const log_id = msg_json.log_id
|
||||||
|
if (log_id > this.coop_mind_log_id) {
|
||||||
|
this.coop_mind_log_id = log_id
|
||||||
|
}
|
||||||
|
|
||||||
|
// 回放
|
||||||
if (client_id === this.client_id) {
|
if (client_id === this.client_id) {
|
||||||
console.log('self msg')
|
console.log('self msg')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user