提交 08f942ba 编写于 作者: doc_wei's avatar doc_wei

feat: 笔记修改

上级 acf90511
......@@ -450,23 +450,23 @@ layui.config({
// 默认展示当前最新的笔记
showNewNoteList();
//树操作--新建文件夹
// 树操作--新建文件夹
$("body").on("click", ".treecreateNewFolder", function (e) {
noteId = "";
if(folderId == "1"){
if (folderId == "1") {
folderId = "2";
}
hideRMenu();
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "mynote002", params: {parentId: folderId, catalogName: '新建文件夹'}, type: 'json', callback: function (json) {
//刷新节点
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "writeFolder", params: {parentId: folderId, name: '新建文件夹'}, type: 'json', method: 'POST', callback: function (json) {
// 刷新节点
refreshTreePointNode();
folderId = json.bean.id;
showListById();//获取文件夹和笔记列表
//执行延时
setTimeout(function(){
showListById();
// 执行延时
setTimeout(function () {
var selNode = ztree.getNodeByParam("id", json.bean.id, null);
ztree.editName(selNode);
},1000);
}, 1000);
}});
});
......@@ -587,15 +587,16 @@ layui.config({
// 新增笔记
function addNote(title, type){
if(folderId == "1"){
thisfolderId = "2";
} else {
thisfolderId = folderId;
}
if (folderId == "1") {
thisfolderId = "2";
} else {
thisfolderId = folderId;
}
hideRMenu();
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "mynote007", params: {parentId: thisfolderId, title: title, type: type}, type: 'json', callback: function (json) {
noteId = json.bean.id;
showListById();// 获取文件夹和笔记列表
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "writeNote", params: {parentId: thisfolderId, name: title, type: type}, type: 'json', method: 'POST', callback: function (json) {
noteId = json.bean.id;
// 获取文件夹和笔记列表
showListById();
}});
}
......
......@@ -17,10 +17,10 @@ layui.config({
var noteId = parent.noteId;
// 显示编辑器内容
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "mynote008", params: {rowId: noteId}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "queryNoteById", params: {id: noteId}, type: 'json', method: "GET", callback: function (json) {
ue = ueEditorUtil.initEditor('container');
parent.$("#noteTitle").val(json.bean.title);
parent.$("#noteTitle").val(json.bean.name);
ue.addListener("ready", function () {
ue.setContent(isNull(json.bean.content) ? "" : json.bean.content);
var height = $(".manage-console").height() - $(".edui-editor-toolbarbox").height() - $(".edui-editor-bottomContainer").height() - 15;
......
......@@ -13,8 +13,8 @@ layui.config({
form.render();
// 显示编辑器内容
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "mynote008", params: {rowId: noteId}, type: 'json', callback: function (json) {
parent.$("#noteTitle").val(json.bean.title);
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "queryNoteById", params: {id: noteId}, type: 'json', method: "GET", callback: function (json) {
parent.$("#noteTitle").val(json.bean.name);
var param = {
container: 'luckysheet',
showtoolbar: true,
......
......@@ -36,8 +36,8 @@ layui.config({
initPasteDragImg(this);
// 加载后富文本编辑器成功后的回调
// 显示编辑器内容
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "mynote008", params: {rowId: noteId}, type: 'json', callback: function (json) {
parent.$("#noteTitle").val(json.bean.title);
AjaxPostUtil.request({url: sysMainMation.noteBasePath + "queryNoteById", params: {id: noteId}, type: 'json', method: "GET", callback: function (json) {
parent.$("#noteTitle").val(json.bean.name);
layEditor.setMarkdown(json.bean.content);
matchingLanguage();
}});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册