编辑书签鼠标移入移出显示编辑 修改字段

This commit is contained in:
WangHao 2021-03-14 21:01:56 +08:00
parent 9c075786b4
commit e00e2148a9
4 changed files with 80 additions and 53 deletions

View File

@ -69,8 +69,8 @@ public class NmNote
/** 便签状态 */
@Excel(name = "便签状态")
@Column(name = "is_state")
private Integer isState;
@Column(name = "note_state")
private Integer noteState;
/** 阅读进度 */
@Excel(name = "阅读进度")
@ -79,13 +79,13 @@ public class NmNote
/** 是否星标 */
@Excel(name = "是否星标")
@Column(name = "is_star")
private Integer isStar;
@Column(name = "note_star")
private Integer noteStar;
/** 是否删除 */
@Excel(name = "是否删除")
@Column(name = "is_delete")
private Integer isDelete;
@Column(name = "note_delete")
private Integer noteDelete;
/** 是否置顶 */
@Excel(name = "是否置顶")
@ -94,13 +94,13 @@ public class NmNote
/** 是否分享(判断是否可以随意访问) */
@Excel(name = "是否分享(判断是否可以随意访问)")
@Column(name = "is_share")
private Integer isShare;
@Column(name = "note_share")
private Integer noteShare;
/** 是否加密 */
@Excel(name = "是否加密")
@Column(name = "is_encryption")
private Integer isEncryption;
@Column(name = "note_encryption")
private Integer noteEncryption;
/** 创建时间 */
@Column(name = "create_time")

View File

@ -13,13 +13,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="background" column="background" />
<result property="noteCount" column="note_count" />
<result property="noteSort" column="note_sort" />
<result property="isState" column="is_state" />
<result property="noteState" column="note_state" />
<result property="readProgress" column="read_progress" />
<result property="isStar" column="is_star" />
<result property="isDelete" column="is_delete" />
<result property="noteStar" column="note_star" />
<result property="noteDelete" column="note_delete" />
<result property="topFlag" column="top_flag" />
<result property="isShare" column="is_share" />
<result property="isEncryption" column="is_encryption" />
<result property="noteShare" column="note_share" />
<result property="noteEncryption" column="note_encryption" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="tiymceUeditor" column="tiymce_ueditor" />
@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectNmNoteVo">
select note_id, user_id, title, description, menu_id, background, note_count, note_sort, is_state, read_progress, is_star, is_delete, top_flag, is_share, is_encryption, create_time, update_time,tiymce_ueditor from nm_note
select note_id, user_id, title, description, menu_id, background, note_count, note_sort, note_state, read_progress, note_star, note_delete, top_flag, note_share, note_encryption, create_time, update_time,tiymce_ueditor from nm_note
</sql>
<select id="selectNmNoteList" parameterType="NmNote" resultMap="NmNoteResult">
@ -41,13 +41,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="background != null and background != ''"> and background = #{background}</if>
<if test="noteCount != null "> and note_count = #{noteCount}</if>
<if test="noteSort != null "> and note_sort = #{noteSort}</if>
<if test="isState != null "> and is_state = #{isState}</if>
<if test="noteState != null "> and note_state = #{noteState}</if>
<if test="readProgress != null "> and read_progress = #{readProgress}</if>
<if test="isStar != null "> and is_star = #{isStar}</if>
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
<if test="noteStar != null "> and note_star = #{noteStar}</if>
<if test="noteDelete != null "> and note_delete = #{noteDelete}</if>
<if test="topFlag != null "> and top_flag = #{topFlag}</if>
<if test="isShare != null "> and is_share = #{isShare}</if>
<if test="isEncryption != null "> and is_encryption = #{isEncryption}</if>
<if test="noteShare != null "> and note_share = #{noteShare}</if>
<if test="noteEncryption != null "> and note_encryption = #{noteEncryption}</if>
<if test="tiymceUeditor != null "> and tiymce_ueditor = #{tiymceUeditor}</if>
</where>
order by create_time desc
@ -69,13 +69,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="background != null">background,</if>
<if test="noteCount != null">note_count,</if>
<if test="noteSort != null">note_sort,</if>
<if test="isState != null">is_state,</if>
<if test="noteState != null">note_state,</if>
<if test="readProgress != null">read_progress,</if>
<if test="isStar != null">is_star,</if>
<if test="isDelete != null">is_delete,</if>
<if test="noteStar != null">note_star,</if>
<if test="noteDelete != null">note_delete,</if>
<if test="topFlag != null">top_flag,</if>
<if test="isShare != null">is_share,</if>
<if test="isEncryption != null">is_encryption,</if>
<if test="noteShare != null">note_share,</if>
<if test="noteEncryption != null">note_encryption,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="tiymceUeditor != null">tiymce_ueditor,</if>
@ -89,13 +89,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="background != null">#{background},</if>
<if test="noteCount != null">#{noteCount},</if>
<if test="noteSort != null">#{noteSort},</if>
<if test="isState != null">#{isState},</if>
<if test="noteState != null">#{noteState},</if>
<if test="readProgress != null">#{readProgress},</if>
<if test="isStar != null">#{isStar},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="noteStar != null">#{noteStar},</if>
<if test="noteDelete != null">#{noteDelete},</if>
<if test="topFlag != null">#{topFlag},</if>
<if test="isShare != null">#{isShare},</if>
<if test="isEncryption != null">#{isEncryption},</if>
<if test="noteShare != null">#{noteShare},</if>
<if test="noteEncryption != null">#{noteEncryption},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tiymceUeditor != null">#{tiymceUeditor},</if>
@ -112,13 +112,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="background != null">background = #{background},</if>
<if test="noteCount != null">note_count = #{noteCount},</if>
<if test="noteSort != null">note_sort = #{noteSort},</if>
<if test="isState != null">is_state = #{isState},</if>
<if test="noteState != null">note_state = #{noteState},</if>
<if test="readProgress != null">read_progress = #{readProgress},</if>
<if test="isStar != null">is_star = #{isStar},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="noteStar != null">note_star = #{noteStar},</if>
<if test="noteDelete != null">note_delete = #{noteDelete},</if>
<if test="topFlag != null">top_flag = #{topFlag},</if>
<if test="isShare != null">is_share = #{isShare},</if>
<if test="isEncryption != null">is_encryption = #{isEncryption},</if>
<if test="noteShare != null">note_share = #{noteShare},</if>
<if test="noteEncryption != null">note_encryption = #{noteEncryption},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tiymceUeditor != null">tiymce_ueditor = #{tiymceUeditor},</if>

View File

@ -2,8 +2,8 @@
<div>
<!-- STYLE="position: relative"-->
<div v-for="bm in bookmarkList" class="bookmark" @click="winurl(bm.noteId,bm.tiymceUeditor,bm.bookmarkId,bm.url)">
<div class="bookmark-item">
<div v-for="bm in bookmarkList" class="bookmark" @click="winurl(bm.noteId,bm.tiymceUeditor,bm.bookmarkId,bm.url)" @mouseover="enter(bm.bookmarkId)" @mouseleave="leave()" >
<div class="bookmark-item" >
<span class="bookmark-title" v-if="highlighted" v-html="highLight(bm.title,sousuo)"/>
<span class="bookmark-title" v-if="!highlighted">{{bm.title}}</span>
@ -39,9 +39,14 @@
</div>
</div>
</div>
<!-- <div style="width: 300px;height: inherit;background-color: red;position: absolute;right: 0px;top: 10px;bottom: 10px">-->
<!-- 2222222222222222222222-->
<!-- </div>-->
<!--编辑 -->
<div class="editAllBookMark" v-show="seen&&bm.bookmarkId==current">
<el-button type="info" plain size="mini" icon="el-icon-edit"></el-button>
<el-button type="info" plain size="mini" icon="el-icon-share"></el-button>
<el-button type="info" plain size="mini" icon="el-icon-delete"></el-button>
<div style="width: 10px"></div>
</div>
</div>
</div>
@ -63,6 +68,8 @@
noteTime:true,
isBookmarkIcon:false,
Ueditor:undefined,
seen:false,
current:0
}
},
mounted(){
@ -166,6 +173,15 @@
},
/**搜索高亮 结束**/
enter(index){
this.seen = true;
this.current = index;
},
leave(){
this.seen = false;
this.current = null;
},
}
}
</script>
@ -246,5 +262,16 @@
height: 15px;
}
.editAllBookMark{
width: 200px;
height: inherit;
position: absolute;
right: 0px;
top: 10px;
bottom: 10px;
display:inline-flex;
justify-content:flex-end;
align-items:center;
}
</style>

View File

@ -12,11 +12,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="urls" column="urls" />
<result property="description" column="description" />
<result property="image" column="image" />
<result property="label" column="Label" />
<result property="label" column="label" />
<result property="menuId" column="menu_id" />
<result property="zcount" column="zcount" />
<result property="idelete" column="IDelete" />
<result property="start" column="Start" />
<result property="idelete" column="idelete" />
<result property="start" column="start" />
<result property="createTime" column="create_time" />
<!-- <collection property="sqTags"-->
<!-- javaType="java.util.ArrayList"-->
@ -42,11 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="urls != null and urls != ''"> and urls = #{urls}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="image != null and image != ''"> and image = #{image}</if>
<if test="label != null and label != ''"> and Label = #{label}</if>
<if test="label != null and label != ''"> and label = #{label}</if>
<if test="menuId != null "> and menu_id = #{menuId}</if>
<if test="zcount != null "> and zcount = #{zcount}</if>
<if test="idelete != null "> and IDelete = #{idelete}</if>
<if test="start != null "> and Start = #{start}</if>
<if test="idelete != null "> and idelete = #{idelete}</if>
<if test="start != null "> and start = #{start}</if>
</where>
</select>
@ -64,11 +64,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="urls != null">urls,</if>
<if test="description != null">description,</if>
<if test="image != null">image,</if>
<if test="label != null">Label,</if>
<if test="label != null">label,</if>
<if test="menuId != null">menu_id,</if>
<if test="zcount != null">zcount,</if>
<if test="idelete != null">IDelete,</if>
<if test="start != null">Start,</if>
<if test="idelete != null">idelete,</if>
<if test="start != null">start,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -96,11 +96,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="urls != null">urls = #{urls},</if>
<if test="description != null">description = #{description},</if>
<if test="image != null">image = #{image},</if>
<if test="label != null">Label = #{label},</if>
<if test="label != null">label = #{label},</if>
<if test="menuId != null">menu_id = #{menuId},</if>
<if test="zcount != null">zcount = #{zcount},</if>
<if test="idelete != null">IDelete = #{idelete},</if>
<if test="start != null">Start = #{start},</if>
<if test="idelete != null">idelete = #{idelete},</if>
<if test="start != null">start = #{start},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where bookmark_id = #{bookmarkId}