update
This commit is contained in:
@@ -27,11 +27,13 @@ class JsMindView(LoginRequiredJSONMixin, ListAPIView):
|
|||||||
查询思维导图
|
查询思维导图
|
||||||
"""
|
"""
|
||||||
pk = request.GET.get('id')
|
pk = request.GET.get('id')
|
||||||
|
user = request.user
|
||||||
if pk is not None:
|
if pk is not None:
|
||||||
mind = CooperationMind.objects.filter(id=pk).first()
|
mind = CooperationMind.objects.filter(id=pk).first()
|
||||||
# 序列化
|
# 序列化
|
||||||
serializer = CooperationMindSerializer(mind)
|
serializer = CooperationMindSerializer(mind)
|
||||||
return build_response(data=serializer.data)
|
return build_response(data=serializer.data)
|
||||||
|
self.queryset = CooperationMind.objects.filter(creator=user.id).all()
|
||||||
return self.list(request, *args, **kwargs)
|
return self.list(request, *args, **kwargs)
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
@@ -45,7 +47,6 @@ class JsMindView(LoginRequiredJSONMixin, ListAPIView):
|
|||||||
mind.save()
|
mind.save()
|
||||||
return build_response(data=mind.id)
|
return build_response(data=mind.id)
|
||||||
|
|
||||||
@login_required(login_url="dashboard")
|
|
||||||
def delete(self, request):
|
def delete(self, request):
|
||||||
# 删除
|
# 删除
|
||||||
pk = request.POST.get('id')
|
pk = request.POST.get('id')
|
||||||
|
|||||||
@@ -309,8 +309,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="newMindModal" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">新建</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--start-->
|
||||||
|
<form>
|
||||||
|
<div class="modal-body register_group">
|
||||||
|
<label for="userName" class="sr-only"></label>
|
||||||
|
<input type="text" id="userName" class="form-control" placeholder="思维导图名称" autocomplete="off" required autofocus>
|
||||||
|
<div style="text-align:right;">
|
||||||
|
<button type="button" class="btn btn-info">确认创建</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<!--end-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Modal end-->
|
<!-- Modal end-->
|
||||||
|
|
||||||
|
|
||||||
<!-- 页眉 start-->
|
<!-- 页眉 start-->
|
||||||
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
|
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
|
||||||
<a class="navbar-brand col-md-2 col-lg-2 mr-0 px-3" href="#">协作思维导图</a>
|
<a class="navbar-brand col-md-2 col-lg-2 mr-0 px-3" href="#">协作思维导图</a>
|
||||||
@@ -365,6 +391,9 @@
|
|||||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||||
<h1 class="h2">全部文件</h1>
|
<h1 class="h2">全部文件</h1>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#newMindModal">新建导图</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-plus"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>
|
||||||
|
After Width: | Height: | Size: 431 B |
Reference in New Issue
Block a user