update
This commit is contained in:
@@ -85,7 +85,7 @@ class JsMindView(LoginRequiredJSONMixin, ListAPIView):
|
|||||||
|
|
||||||
def delete(self, request):
|
def delete(self, request):
|
||||||
# 删除
|
# 删除
|
||||||
pk = request.POST.get('id')
|
pk = request.POST.get('coop_mind_id')
|
||||||
source = request.POST.get('source')
|
source = request.POST.get('source')
|
||||||
user = request.user
|
user = request.user
|
||||||
res = None
|
res = None
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title>全部文件</title>
|
<title>协作导图管理</title>
|
||||||
|
|
||||||
|
|
||||||
<link rel="shortcut icon" href="/static/abl1b-qks1b-001.ico"/>
|
<link rel="shortcut icon" href="/static/abl1b-qks1b-001.ico"/>
|
||||||
<link rel="stylesheet" type="text/css" href="/static/css/dashboard.css">
|
<link rel="stylesheet" type="text/css" href="/static/css/dashboard.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/static/bootstrap-4.6.1-dist/css/bootstrap.css">
|
<link rel="stylesheet" type="text/css" href="/static/bootstrap-4.6.1-dist/css/bootstrap.css">
|
||||||
@@ -115,7 +113,8 @@
|
|||||||
} else if (page_tag === 'star') {
|
} else if (page_tag === 'star') {
|
||||||
sub_btn = `<a class="dropdown-item" href="javascript:void(0);" onclick="mind.un_star(${item.id})">取消收藏</a>`
|
sub_btn = `<a class="dropdown-item" href="javascript:void(0);" onclick="mind.un_star(${item.id})">取消收藏</a>`
|
||||||
} else if (page_tag === 'recycle') {
|
} else if (page_tag === 'recycle') {
|
||||||
sub_btn = `<a class="dropdown-item" href="javascript:void(0);" onclick="mind.del_cancel(${item.id})">恢复</a>`
|
sub_btn = `<a class="dropdown-item" href="javascript:void(0);" onclick="mind.del_cancel(${item.id})">恢复</a>
|
||||||
|
<a class="dropdown-item" href="javascript:void(0);" onclick="mind.del_final(${item.id})">彻底删除</a>`
|
||||||
}
|
}
|
||||||
|
|
||||||
const content = `<div class="card col-2" style="margin: 6px; margin-left: 20px;" id='card_${uuid}'>
|
const content = `<div class="card col-2" style="margin: 6px; margin-left: 20px;" id='card_${uuid}'>
|
||||||
@@ -185,7 +184,7 @@
|
|||||||
type: "delete",
|
type: "delete",
|
||||||
url: "delete",
|
url: "delete",
|
||||||
headers: {"X-CSRFToken": $.cookie("csrftoken")},
|
headers: {"X-CSRFToken": $.cookie("csrftoken")},
|
||||||
data: {'id': mind_id, 'source': 'dashboard'},
|
data: {'coop_mind_id': mind_id, 'source': 'dashboard'},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.code === 0) {
|
if (data.code === 0) {
|
||||||
@@ -253,6 +252,24 @@
|
|||||||
async: false
|
async: false
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**彻底删除*/
|
||||||
|
del_final: function (mind_id) {
|
||||||
|
const me = this
|
||||||
|
$.ajax({
|
||||||
|
type: "delete",
|
||||||
|
url: "delete",
|
||||||
|
headers: {"X-CSRFToken": $.cookie("csrftoken")},
|
||||||
|
data: {'coop_mind_id': mind_id, 'source': 'recycle'},
|
||||||
|
dataType: "json",
|
||||||
|
success: function (resp) {
|
||||||
|
common_alert(resp.msg)
|
||||||
|
if (me.is_success_resp(resp)) {
|
||||||
|
me.fetch_mind()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async: false
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 取消收藏 */
|
/** 取消收藏 */
|
||||||
un_star: function (mind_id) {
|
un_star: function (mind_id) {
|
||||||
const me = this
|
const me = this
|
||||||
|
|||||||
Reference in New Issue
Block a user