新增定时任务 Redis文章转MongoDB

This commit is contained in:
WangHao
2020-10-18 18:27:21 +08:00
parent e7b6e1f5dc
commit 046aba8a28
9 changed files with 90 additions and 18 deletions

View File

@ -34,7 +34,7 @@ export function addUserNote(data) {
export function userUpdateNote(data) {
return request({
url: '/note/note/userUpdateNote',
method: 'put',
method: 'post',
data: data
})
}

View File

@ -90,7 +90,7 @@
break;
case 1:
//便签模式
that.isdescription = true;
that.isdescription = false;
that.noteTime = true;
that.isBookmarkIcon = false;
break;

View File

@ -477,7 +477,7 @@
that.queryParams.menuId = routedata;
that.noteParams.menuId = routedata;
}
console.log("当前状态:"+that.property)
if (property != null && property != undefined && property != ''){
that.property =property;
}
@ -575,7 +575,7 @@
//缓存状态
that.$store.state.property=e;
this.showimg=false;
console.log("缓存property:"+that.$store.state.property)
// console.log("缓存property:"+that.$store.state.property)
// console.log("缓存property:"+store.state.property)
//初始化
this.queryParams.pageNum=1;
@ -837,7 +837,6 @@
this.loading = true;
selectBymenuIdUserID(this.queryParams).then(response => {
if (response.code == 200) {
console.log("response.rows" + response.rows)
this.bookmarkList = this.bookmarkList.concat(response.rows);
this.total = response.total;
this.listloading = false

View File

@ -5,6 +5,10 @@
<div class="mdui-textfield mdui-textfield-floating-label inputtop">
<input class="mdui-textfield-input" v-model="queryParamsAndMg.title" type="text" required/>
</div>
<div>
<span>{{queryParamsAndMg.updateTime==null?'0000:00:00':queryParamsAndMg.updateTime}}</span>
<span @click="updateEdit">{{updateOpn}}</span>
</div>
</div>
<div v-loading="loading" v-if="!showEditor" class="mian" v-html="queryParamsAndMg.ueditorContent">
@ -21,7 +25,7 @@
<div v-if="showEditor" STYLE="margin-top: 10px;margin-bottom: 10px">
<button class="mdui-btn mdui-btn-raised mdui-color-indigo-300" @click="clear">清空内容</button>
<button class="mdui-btn mdui-btn-raised mdui-color-indigo-300" @click="clear">发布</button>
<button class="mdui-btn mdui-btn-raised mdui-color-indigo-300" @click="UpdateNote">发布</button>
<button class="mdui-btn mdui-ripple mdui-btn-raised " @click="disabled = true">禁用</button>
<button class="mdui-btn mdui-ripple mdui-btn-raised " @click="disabled = false">启用</button>
</div>
@ -94,6 +98,7 @@
},
showEditor:false,
loading:false,
updateOpn:'编辑'
}
},
created() {
@ -103,12 +108,17 @@
/** 实时更新文章的信息 */
UpdateNote() {
userUpdateNote(this.queryParamsAndMg).then(response => {
console.log("已保存:" + Date.now())
if (response.code==200){
console.log("已保存:" + Date.now())
this.$message({
message: '保存成功!',
type: 'success'
});
}
});
},
/** 查询便签管理列表 */
getNoteById() {
console.log("请求执行了!!!")
var that = this;
that.loading=true;
var blueditor = that.ueditor != null && that.ueditor != '' && that.ueditor != undefined;
@ -135,6 +145,16 @@
//清空内容
clear() {
this.$refs.editor.clear()
},
updateEdit(){
var that=this;
that.showEditor=!that.showEditor;
if (that.showEditor) {
that.updateOpn='退出编辑';
}else {
that.updateOpn='编辑';
}
}
}
}
@ -168,11 +188,11 @@
overflow: scroll;
}
.edit{
margin-left: 3px;
margin-left: 13px;
}
.nqtitle{
margin-left: 3px;
margin-left: 13px;
margin-bottom: 10px;
}
.inputtop{

View File

@ -575,10 +575,7 @@
//颜色改变提醒
resize[i].style.background = 'transparent';
var startX = e.clientX;
console.log("鼠标按下后:" + e.clientX)
resize[i].left = resize[i].offsetLeft;
console.log("鼠标按下后:" + resize[i].left)
console.log("鼠标按下后:" + resize[i].offsetLeft)
// 鼠标拖动事件
document.onmousemove = function (e) {
var endX = e.clientX;