update
This commit is contained in:
@@ -5,7 +5,7 @@ def to_dashboard(request):
|
|||||||
"""
|
"""
|
||||||
主界面
|
主界面
|
||||||
"""
|
"""
|
||||||
param = {"page": "main"}
|
param = {"page": "b9b101e"}
|
||||||
return render(request, "html/dashboard.html", param)
|
return render(request, "html/dashboard.html", param)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ class JsMindView(LoginRequiredJSONMixin, ListAPIView):
|
|||||||
查询思维导图
|
查询思维导图
|
||||||
"""
|
"""
|
||||||
pk = request.GET.get('id')
|
pk = request.GET.get('id')
|
||||||
src_page = request.GET.get('src_page')
|
# 页面源
|
||||||
|
src_page = request.GET.get('s_p')
|
||||||
user = request.user
|
user = request.user
|
||||||
if src_page is None or user.id is None:
|
if src_page is None or user.id is None:
|
||||||
return build_response(code=CODE_FAILED, msg="参数错误")
|
return build_response(code=CODE_FAILED, msg="参数错误")
|
||||||
@@ -45,7 +46,7 @@ class JsMindView(LoginRequiredJSONMixin, ListAPIView):
|
|||||||
return build_response(data=serializer.data)
|
return build_response(data=serializer.data)
|
||||||
|
|
||||||
# 查询列表
|
# 查询列表
|
||||||
if 'main' == src_page:
|
if 'b9b101e' == src_page:
|
||||||
self.queryset = CooperationMind.objects.filter(creator_user_id=user.id, deleted=0).values('id', 'coop_mind_name', "client_uuid", "data_format")
|
self.queryset = CooperationMind.objects.filter(creator_user_id=user.id, deleted=0).values('id', 'coop_mind_name', "client_uuid", "data_format")
|
||||||
elif 'share' == src_page:
|
elif 'share' == src_page:
|
||||||
share = CooperationMindShare.objects.filter(coop_mind_id=OuterRef('id'))
|
share = CooperationMindShare.objects.filter(coop_mind_id=OuterRef('id'))
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: `get`,
|
type: `get`,
|
||||||
url: `list?page=${current_page}&page_size=${page_size}&src_page=${src_page}`,
|
url: `list?page=${current_page}&page_size=${page_size}&s_p=${src_page}`,
|
||||||
headers: {"X-CSRFToken": $.cookie("csrftoken")},
|
headers: {"X-CSRFToken": $.cookie("csrftoken")},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (resp) {
|
success: function (resp) {
|
||||||
@@ -107,8 +107,8 @@
|
|||||||
|
|
||||||
// 添加按钮组
|
// 添加按钮组
|
||||||
let sub_btn;
|
let sub_btn;
|
||||||
if (src_page === 'main') {
|
if (src_page === 'b9b101e') {
|
||||||
sub_btn = `<a class="dropdown-item" href="javascript:void(0);" onclick="window.open('2_d?id=${item.id}')">编辑</a>
|
sub_btn = `<a class="dropdown-item" href="javascript:void(0);" onclick="window.open('2_d?id=${item.id}&s_p=b9b101e')">编辑</a>
|
||||||
<a class="dropdown-item" href="javascript:void(0);" onclick="mind.del_mind(${item.id},'card_${uuid}')">删除</a>
|
<a class="dropdown-item" href="javascript:void(0);" onclick="mind.del_mind(${item.id},'card_${uuid}')">删除</a>
|
||||||
<a class="dropdown-item" href="javascript:void(0);" onclick="mind.share_mind(${item.id})">分享</a>`
|
<a class="dropdown-item" href="javascript:void(0);" onclick="mind.share_mind(${item.id})">分享</a>`
|
||||||
} else if (src_page === 'share') {
|
} else if (src_page === 'share') {
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="card-title" style="margin-bottom: 0px;font-weight:bold;text-overflow:ellipsis;white-space:nowrap;overflow: hidden;">${item.coop_mind_name}</div>
|
<div class="card-title" style="margin-bottom: 0px;font-weight:bold;text-overflow:ellipsis;white-space:nowrap;overflow: hidden;">${item.coop_mind_name}</div>
|
||||||
<hr style="margin: 0">
|
<hr style="margin: 0">
|
||||||
<img src="/static/pic/demo_icon.png" class="card-img-top" style="margin-top: 8px;cursor: pointer;" onclick="window.open('2_d?id=${item.id}')">
|
<img src="/static/pic/demo_icon.png" class="card-img-top" style="margin-top: 8px;cursor: pointer;" onclick="window.open('2_d?id=${item.id}&s_p=b9b101e')">
|
||||||
<div style="text-align:right;font-size: 0.8rem;margin-top: 5px;font-family: inherit;">
|
<div style="text-align:right;font-size: 0.8rem;margin-top: 5px;font-family: inherit;">
|
||||||
<div class="btn-group btn-group-sm" role="group">
|
<div class="btn-group btn-group-sm" role="group">
|
||||||
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">操作</button>
|
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">操作</button>
|
||||||
@@ -409,7 +409,7 @@
|
|||||||
/**新页面打开*/
|
/**新页面打开*/
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
const id = resp.data
|
const id = resp.data
|
||||||
window.open('2_d?id=' + id)
|
window.open('2_d?id=' + id + `&s_p=b9b101e`)
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
let h = `{{ h }}`;
|
let h = `{{ h }}`;
|
||||||
const me = this;
|
const me = this;
|
||||||
const from_share = id.length === 0;
|
const from_share = id.length === 0;
|
||||||
const url = from_share ? `s_d?u=${u}&h=${h}` : 'd?id=' + id;
|
const url = from_share ? `s_d?u=${u}&h=${h}` : 'd?id=' + id + `&s_p=b9b101e`;
|
||||||
$.get(url, function (resp) {
|
$.get(url, function (resp) {
|
||||||
if (resp.code === -1) {
|
if (resp.code === -1) {
|
||||||
common_alert(resp.msg)
|
common_alert(resp.msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user