update
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ class JsMindLogView(ListAPIView):
|
||||
coop_mind_name = request.data.get('mind_name')
|
||||
snapshot_data = request.data.get('snapshot_data')
|
||||
print(snapshot_data)
|
||||
mind = CooperationMind(coop_mind_name=coop_mind_name, client_id='', snapshot_log_id=-1, creator=-1, snapshot_data=snapshot_data)
|
||||
mind = CooperationMind(coop_mind_name=coop_mind_name, client_id='', snapshot_log_id=-1, creator=9527, snapshot_data=snapshot_data)
|
||||
mind.save()
|
||||
return build_response(data=mind.id)
|
||||
|
||||
|
||||
+11
-4
@@ -49,13 +49,16 @@
|
||||
},
|
||||
// 获取数据
|
||||
fetch_data: function () {
|
||||
const me = this
|
||||
const get_param = {'page': this.current_page, 'page_size': this.limit}
|
||||
if (this.get_coop_mind_name()) {
|
||||
get_param.coop_mind_name = this.get_coop_mind_name()
|
||||
}
|
||||
$.get('list', get_param, function (resp) {
|
||||
console.log(resp)
|
||||
// 清空数据
|
||||
$('#layui-table tbody').empty()
|
||||
$('#' + me.opts.page_bar_elem).empty()
|
||||
|
||||
const results = resp.results
|
||||
results.forEach(item => {
|
||||
const tr = `<tr>
|
||||
@@ -63,13 +66,17 @@
|
||||
<td>${item.creator}</td>
|
||||
<td>${item.create_time}</td>
|
||||
<td>${item.update_time}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<i class="layui-icon layui-icon-edit" style="font-size: 15px; color: #1E9FFF;cursor: pointer;">编辑</i>
|
||||
<i class="layui-icon layui-icon-share" style="font-size: 15px; color: #1E9FFF;cursor: pointer;margin-left: 10px;">复制分享</i>
|
||||
</td>
|
||||
</tr>`
|
||||
$('#layui-table tbody').append(tr)
|
||||
})
|
||||
})
|
||||
|
||||
// 分页组件
|
||||
this.auto_page_bar()
|
||||
me.auto_page_bar()
|
||||
})
|
||||
},
|
||||
get_coop_mind_name: function () {
|
||||
return $('#mind_name').val()
|
||||
|
||||
Reference in New Issue
Block a user