delete
This commit is contained in:
@@ -1,26 +1,27 @@
|
||||
# jsmindmulti
|
||||
|
||||
jsmind多人协作版
|
||||
|
||||
#### 介绍
|
||||
|
||||
```
|
||||
多人协作脑图,站在巨人的肩膀上:前台是赫赫有名的开源的jsmind(可自己改源码,扩展性强);
|
||||
适合只能访问内网、或者不想把数据放外网的公司(现在很多互联网免费的协作脑图产品)
|
||||
|
||||
多人协作思维导图主要采用python django框架,如果不熟悉的需要先学下;
|
||||
快速入门视频推荐:https://www.bilibili.com/video/BV1JW411i7W1?spm_id_from=333.999.0.0
|
||||
|
||||
选择python是因为感觉用django开发一个简单网页会比java更快,但是这里我要吐槽一下python里用缩进区分语句块,稍不注意代码就乱了(感觉还是大括号好)
|
||||
|
||||
```
|
||||
+ 多人协作脑图,站在巨人的肩膀上:前台是赫赫有名的开源的jsmind(可自己改源码,扩展性强),做了小小的改动;
|
||||
+ 适合只能访问内网、或者不想把数据放外网的公司(现在很多互联网免费的协作脑图产品)
|
||||
+ 多人协作思维导图主要采用python django框架,如果不熟悉的需要先补一下;
|
||||
+ 快速入门视频推荐:https://www.bilibili.com/video/BV1JW411i7W1?spm_id_from=333.999.0.0
|
||||
+ 选择python是因为感觉用django开发一个简单网页会比java更快,但是这里我要吐槽一下python里用缩进区分语句块,稍不注意代码就乱了(感觉还是大括号好)
|
||||
|
||||
#### 软件架构
|
||||
|
||||
<hr>
|
||||
|
||||

|
||||
|
||||
<hr>
|
||||
|
||||
#### 安装教程
|
||||
|
||||
+ 安装依赖
|
||||
- 安装python,我本地是Python 3.7.8rc1,版本比这个大就应该可以
|
||||
- 安装python,我本地是Python 3.7.8rc1,版本比这个大就应该可以
|
||||
- 安装依赖,在工程根目录执行 pip install -r reuqirements.txt 将项目的依赖安装到python目录(类似java里的maven),如果相关把依赖安装到其他目录进行分类管理可以采用virtualenvwrapper
|
||||
|
||||
+ 数据库
|
||||
@@ -36,3 +37,7 @@ python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
|
||||
```
|
||||
|
||||
#### 效果
|
||||
|
||||

|
||||
+3
-3
@@ -59,10 +59,10 @@ class JsMindView(ListAPIView):
|
||||
mind.save()
|
||||
return build_response(data=mind.id)
|
||||
|
||||
def delete(self, request, pk):
|
||||
def delete(self, request):
|
||||
# 删除
|
||||
pk = request.GET.get('id')
|
||||
CooperationMind.objects.filter(id=pk).delete()
|
||||
pk = request.POST.get('id')
|
||||
res = CooperationMind.objects.filter(id=pk).delete()
|
||||
return build_response()
|
||||
|
||||
|
||||
|
||||
+20
-2
@@ -72,7 +72,7 @@
|
||||
<td>
|
||||
<i class="layui-icon layui-icon-edit" style="font-size: 15px; color: #1E9FFF;cursor: pointer;" onclick="window.open('detail?id=${item.id}')">编辑</i>
|
||||
<i class="layui-icon layui-icon-share" style="font-size: 15px; color: #1E9FFF;cursor: pointer;margin-left: 10px;">复制分享</i>
|
||||
<i class="layui-icon layui-icon-delete" style="font-size: 15px; color: #1E9FFF;cursor: pointer;margin-left: 10px;">删除</i>
|
||||
<i class="layui-icon layui-icon-delete" style="font-size: 15px; color: #1E9FFF;cursor: pointer;margin-left: 10px;" onclick="delmind(${item.id})">删除</i>
|
||||
</td>
|
||||
</tr>`
|
||||
$('#layui-table tbody').append(tr)
|
||||
@@ -131,12 +131,26 @@
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
del_mind: function (id) {
|
||||
const me = this
|
||||
$.ajax({
|
||||
url: 'delete',
|
||||
type: 'DELETE',
|
||||
data: {'id': id},
|
||||
success: function (result) {
|
||||
layer.closeAll()
|
||||
me.fetch_data()
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
let view
|
||||
$(function () {
|
||||
// 初始化对象
|
||||
const view = new listView({'page_bar_elem': 'page_bar'})
|
||||
view = new listView({'page_bar_elem': 'page_bar'})
|
||||
view.init()
|
||||
view.fetch_data()
|
||||
|
||||
@@ -233,6 +247,10 @@
|
||||
|
||||
//
|
||||
})
|
||||
|
||||
function delmind(id) {
|
||||
view.del_mind(id)
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.5 MiB |
Reference in New Issue
Block a user