提交 e0d5a9e8 authored 作者: 龙菲's avatar 龙菲

完善创作页面的插入笔记

上级 f7290020
<template> <template>
<div class="breadcrumb-wrapper"> <div class="breadcrumb-wrapper">
<div class="title">当前位置:</div> <div class="title">当前位置:</div>
<el-input <!-- <el-input
class="file-path-input" class="file-path-input"
ref="filePathInputRef" ref="filePathInputRef"
placeholder="请输入路径" placeholder="请输入路径"
...@@ -12,20 +12,11 @@ ...@@ -12,20 +12,11 @@
@blur="handleInputBlurEnter" @blur="handleInputBlurEnter"
@change="handleInputBlurEnter" @change="handleInputBlurEnter"
></el-input> ></el-input>
<!-- {{ breadCrumbList }} --> 123 -->
<div <div
class="breadcrumb-box" class="breadcrumb-box"
:class="{ 'able-input': fileType === 0 }"
v-show="!isShowInput"
@click.self="handleClickBreadCrumbSelf" @click.self="handleClickBreadCrumbSelf"
> >
<!-- <el-breadcrumb
v-if="![0, 8].includes(fileType) && !['Share'].includes($route.name)"
separator-class="el-icon-arrow-right"
>
<el-breadcrumb-item>{{ fileTypeMap[fileType] }}</el-breadcrumb-item>
</el-breadcrumb> -->
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item <el-breadcrumb-item
v-for="(item, index) in breadCrumbList" v-for="(item, index) in breadCrumbList"
......
...@@ -273,45 +273,30 @@ export default { ...@@ -273,45 +273,30 @@ export default {
// 删除按钮是否显示 // 删除按钮是否显示
deleteBtnShow() { deleteBtnShow() {
return this.fileType != this.MY_COLLECT; //我的收藏不能删除 return this.fileType != this.MY_COLLECT; //我的收藏不能删除
// return this.fileType !== 8 && !["Share"].includes(this.routeName);
}, },
// 还原按钮是否显示 // 还原按钮是否显示
restoreBtnShow() { restoreBtnShow() {
return true; return true;
// return this.fileType === 6 && !["Share"].includes(this.routeName);
}, },
// 复制按钮是否显示 // 复制按钮是否显示
copyBtnShow() { copyBtnShow() {
return true; return true;
// return (
// ![6, 8].includes(this.fileType) && !["Share"].includes(this.routeName)
// );
}, },
// 移动按钮是否显示 // 移动按钮是否显示
moveBtnShow() { moveBtnShow() {
return true; return true;
// return (
// ![6, 8].includes(this.fileType) && !["Share"].includes(this.routeName)
// );
}, },
// 重命名按钮是否显示 // 重命名按钮是否显示
renameBtnShow() { renameBtnShow() {
return this.fileType != this.MY_COLLECT; //我的收藏不能重命名 return this.fileType != this.MY_COLLECT; //我的收藏不能重命名
// return (
// ![6, 8].includes(this.fileType) && !["Share"].includes(this.routeName)
// );
}, },
// 分享按钮是否显示 // 分享按钮是否显示
shareBtnShow() { shareBtnShow() {
return true; return this.fileType !=this.TEMPLATE_MANAGE;//模板管理不能分享
// return (
// ![6, 8].includes(this.fileType) && !["Share"].includes(this.routeName)
// );
}, },
// 下载按钮是否显示 // 下载按钮是否显示
downloadBtnShow() { downloadBtnShow() {
return true; return true;
// return ![6, 8].includes(this.fileType);
}, },
// 解压缩按钮是否显示 // 解压缩按钮是否显示
unzipBtnShow() { unzipBtnShow() {
...@@ -333,18 +318,10 @@ export default { ...@@ -333,18 +318,10 @@ export default {
onlineEditBtnShow() { onlineEditBtnShow() {
// 只有我的Word文件才显示 // 只有我的Word文件才显示
// 根据当前文件的作者的userId进行判断,和本人一致则是可编辑 // 根据当前文件的作者的userId进行判断,和本人一致则是可编辑
console.log("onlineEditBtnShow", this.selectedFile);
return ( return (
["doc", "docx"].includes(this.selectedFile.extendName) && ["doc", "docx"].includes(this.selectedFile.extendName) &&
this.selectedFile.userId == store.getters.userInfo.userId this.selectedFile.userId == store.getters.userInfo.userId
); );
// return (
// ![6, 8].includes(this.fileType) &&
// (this.officeFileType.includes(this.selectedFile.extendName) ||
// this.markdownFileType.includes(this.selectedFile.extendName) ||
// this.fileSuffixCodeModeMap.has(this.selectedFile.extendName)) &&
// !["Share"].includes(this.routeName)
// );
}, },
// 复制链接按钮是否显示 // 复制链接按钮是否显示
copyLinkBtnShow() { copyLinkBtnShow() {
......
...@@ -22,5 +22,5 @@ export const uploadModeConstant = { ...@@ -22,5 +22,5 @@ export const uploadModeConstant = {
// 是否收藏 // 是否收藏
export const collectConstant = { export const collectConstant = {
COLLECTED: 0, //收藏 COLLECTED: 0, //收藏
NOT_COLLECTED: 1 ,//未收藏 NOT_COLLECTED: 1,//未收藏
} }
\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
label-width="100px" label-width="100px"
label-position="top" label-position="top"
> >
<el-form-item label="选择新建方式" prop="addNewFileWay"> <el-form-item label="选择新建方式" prop="addNewFileWay" >
<el-radio-group v-model="form.addNewFileWay"> <el-radio-group v-model="form.addNewFileWay">
<el-radio label="1">新建空白文档</el-radio> <el-radio label="1">新建空白文档</el-radio>
<el-radio label="2">从模板导入</el-radio> <el-radio label="2">从模板导入</el-radio>
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
<script> <script>
import { newfile, getTemplateList } from "@/api/wps"; import { newfile, getTemplateList } from "@/api/wps";
export default { export default {
name: "AddFileDialog", name: "AddFileDialog",
data() { data() {
...@@ -89,7 +88,6 @@ export default { ...@@ -89,7 +88,6 @@ export default {
}, },
watch: { watch: {
"form.addNewFileWay"(value) { "form.addNewFileWay"(value) {
console.log("form.addNewFileWay", this.form.addNewFileWay);
if (value == 2) { if (value == 2) {
this.loadTemplateList(); this.loadTemplateList();
} }
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
</template> </template>
<script> <script>
import FileList from "@/components/file/FileList.vue"; import FileList from "@/components/file/FileList.vue";
import { fileTypeConstant } from "@/components/file/constants";
const { TEMPLATE_MANAGE } = fileTypeConstant;
export default { export default {
components: { components: {
FileList, FileList,
...@@ -12,6 +14,7 @@ export default { ...@@ -12,6 +14,7 @@ export default {
data() { data() {
return { return {
isInit: false, isInit: false,
...fileTypeConstant,
}; };
}, },
mounted() { mounted() {
...@@ -21,7 +24,7 @@ export default { ...@@ -21,7 +24,7 @@ export default {
// 修改查询参数,例如,给 "filePath" 参数设置新的值 // 修改查询参数,例如,给 "filePath" 参数设置新的值
// 10-我的创作 11-模板管理 // 10-我的创作 11-模板管理
const newFileType = 11; const newFileType = TEMPLATE_MANAGE;
const newFilePath = "/模板管理"; const newFilePath = "/模板管理";
const newQueryParams = { const newQueryParams = {
...currentQueryParams, ...currentQueryParams,
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
:key="index" :key="index"
> >
<div class="card-head"> <div class="card-head">
<div class="tag" v-if="item.tagName.length > 0"> <div class="tag" v-if="item.tagName && item.tagName.length > 0">
<el-tag <el-tag
style="margin-right: 8px" style="margin-right: 8px"
type="warning" type="warning"
...@@ -152,8 +152,8 @@ export default { ...@@ -152,8 +152,8 @@ export default {
mixins: [noteOperationMixins], mixins: [noteOperationMixins],
data() { data() {
return { return {
keyword:'',//文件名关键词,搜索文件时使用 keyword: "", //文件名关键词,搜索文件时使用
currentFileId:'',//文件id 搜索笔记时使用 currentFileId: "", //文件id 搜索笔记时使用
//文件列表 //文件列表
fileList: { fileList: {
records: [], records: [],
...@@ -210,17 +210,17 @@ export default { ...@@ -210,17 +210,17 @@ export default {
}, },
}, },
mounted() { mounted() {
this.loadfileList(); this.loadLeftList();
}, },
methods: { methods: {
//加载文件列表 //加载文件列表
async loadfileList() { async loadLeftList() {
this.loading = true; this.loading = true;
const { current, size } = this.fileList; const { current, size } = this.fileList;
const params = { const params = {
currentPage: current, currentPage: current,
pageCount: size, pageCount: size,
fileName:this.keyword fileName: this.keyword,
}; };
let res = await getNoteAllFilesList(params); let res = await getNoteAllFilesList(params);
if (res.data) { if (res.data) {
...@@ -252,7 +252,7 @@ export default { ...@@ -252,7 +252,7 @@ export default {
this.fileList.size = 20; this.fileList.size = 20;
// 重置笔记的筛选条件 // 重置笔记的筛选条件
this.currentFileId = ""; this.currentFileId = "";
this.loadfileList(); this.loadLeftList();
}, },
handleReset() { handleReset() {
...@@ -260,9 +260,9 @@ export default { ...@@ -260,9 +260,9 @@ export default {
this.fileList.current = 1; this.fileList.current = 1;
this.fileList.size = 20; this.fileList.size = 20;
// 重置查询参数 // 重置查询参数
this.currentFileId = '' this.currentFileId = "";
this.keyword = '' this.keyword = "";
this.loadfileList(); this.loadLeftList();
}, },
// 点击左侧文件 // 点击左侧文件
...@@ -280,13 +280,13 @@ export default { ...@@ -280,13 +280,13 @@ export default {
// 文件列表size // 文件列表size
handleSizeChangeFile(value) { handleSizeChangeFile(value) {
this.fileList.pageCount = value; this.fileList.pageCount = value;
this.loadfileList(); this.loadLeftList();
}, },
// 文件列表current // 文件列表current
handleCurrentChangeFile(value) { handleCurrentChangeFile(value) {
this.fileList.currentPage = value; this.fileList.currentPage = value;
this.loadfileList(); this.loadLeftList();
}, },
// 文件列表current // 文件列表current
...@@ -395,19 +395,24 @@ export default { ...@@ -395,19 +395,24 @@ export default {
font-size: 14px; font-size: 14px;
margin-bottom: 16px; margin-bottom: 16px;
.card-head { .card-head {
display: flex;
justify-content: space-between;
margin-bottom: 16px; margin-bottom: 16px;
.tag {
float: left;
}
// display: flex;
// justify-content: space-between;
.oprations { .oprations {
display: flex; float: right;
justify-content: flex-end;
margin-bottom: 8px; margin-bottom: 8px;
// display: flex;
// justify-content: flex-end;
.el-link { .el-link {
margin-right: 16px; margin-right: 16px;
} }
} }
} }
.bookmark { .bookmark {
margin-bottom: 16px; margin-bottom: 16px;
font-size: 16px; font-size: 16px;
......
...@@ -20,14 +20,8 @@ ...@@ -20,14 +20,8 @@
> >
</div> </div>
<div class="header"> <div class="total">
<span class="total"> 共计{{ tagList.total }}条数据 </span> 共计{{ tagList.total }}条数据
<span>
<el-button type="text">
<svg-icon icon-class="add-tag"></svg-icon>
新增标签</el-button
>
</span>
</div> </div>
<el-row class="list"> <el-row class="list">
<el-col <el-col
...@@ -67,7 +61,7 @@ ...@@ -67,7 +61,7 @@
:key="index" :key="index"
> >
<div class="card-head"> <div class="card-head">
<div class="tag" v-if="item.tagName.length > 0"> <div class="tag" v-if="item.tagName && item.tagName.length > 0">
<el-tag <el-tag
style="margin-right: 8px" style="margin-right: 8px"
type="warning" type="warning"
...@@ -202,11 +196,11 @@ export default { ...@@ -202,11 +196,11 @@ export default {
}, },
}, },
mounted() { mounted() {
this.loadtagList(); this.loadLeftList();
}, },
methods: { methods: {
//加载文件列表 //加载文件列表
async loadtagList() { async loadLeftList() {
this.loading = true; this.loading = true;
const { current, size } = this.tagList; const { current, size } = this.tagList;
const params = { const params = {
...@@ -254,7 +248,7 @@ export default { ...@@ -254,7 +248,7 @@ export default {
this.fileList.size = 20; this.fileList.size = 20;
// 重置当前选中的文件 // 重置当前选中的文件
this.currentTagId = ""; this.currentTagId = "";
this.loadtagList(); this.loadLeftList();
}, },
handleReset() { handleReset() {
...@@ -270,13 +264,13 @@ export default { ...@@ -270,13 +264,13 @@ export default {
// 文件列表size // 文件列表size
handleSizeChangeFile(value) { handleSizeChangeFile(value) {
this.tagList.pageCount = value; this.tagList.pageCount = value;
this.loadtagList(); this.loadLeftList();
}, },
// 文件列表current // 文件列表current
handleCurrentChangeFile(value) { handleCurrentChangeFile(value) {
this.tagList.currentPage = value; this.tagList.currentPage = value;
this.loadtagList(); this.loadLeftList();
}, },
// 文件列表current // 文件列表current
...@@ -312,14 +306,12 @@ export default { ...@@ -312,14 +306,12 @@ export default {
padding: 20px 20px 0px; padding: 20px 20px 0px;
position: relative; position: relative;
.header { .total {
color: #999; color: #999;
padding: 12px 0 10px; padding: 12px 0 10px;
// margin-bottom: 10px;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
justify-content: space-between; justify-content: flex-end;
align-items: center;
} }
.list { .list {
font-size: 14px; font-size: 14px;
...@@ -382,13 +374,18 @@ export default { ...@@ -382,13 +374,18 @@ export default {
font-size: 14px; font-size: 14px;
margin-bottom: 16px; margin-bottom: 16px;
.card-head { .card-head {
display: flex;
justify-content: space-between;
margin-bottom: 16px; margin-bottom: 16px;
// display: flex;
// justify-content: space-between;
.tag{
float: left;
}
.oprations { .oprations {
display: flex; float: right;
justify-content: flex-end; // display: flex;
// justify-content: flex-end;
margin-bottom: 8px; margin-bottom: 8px;
.el-link { .el-link {
margin-right: 16px; margin-right: 16px;
} }
......
import { textCopy } from "@/utils/index"; import { textCopy } from "@/utils/index";
import { addOrUpdateNoteDoc, deleteNote } from "@/api/doc/bookMark"; import { deleteNote } from "@/api/doc/bookMark";
import AddOrUpdateNoteDialog from "@/views/read/wpsReader/component/addOrUpdateNoteDialog.vue"; import AddOrUpdateNoteDialog from "@/views/read/wpsReader/component/addOrUpdateNoteDialog.vue";
export default { export default {
components:{ components: {
AddOrUpdateNoteDialog AddOrUpdateNoteDialog
}, },
methods: { methods: {
...@@ -43,15 +43,16 @@ export default { ...@@ -43,15 +43,16 @@ export default {
}, },
// 删除笔记 // 删除笔记
async handleDeleteNote(item) { async handleDeleteNote(item) {
this.loading = true; // this.loading = true;
const params = { const params = {
id: item.id, id: item.id,
}; };
let res = await deleteNote(params); let res = await deleteNote(params);
// this.loading = false;
if (res.code == 200) { if (res.code == 200) {
this.$message.success("操作成功"); this.$message.success("操作成功");
this.loadLeftList();
} }
this.loading = false;
}, },
} }
} }
<template>
<div>自动检查</div>
</template>
<script>
export default {};
</script>
<style></style>
<template>
<div>自动补全</div>
</template>
<script>
export default {};
</script>
<style></style>
...@@ -5,38 +5,48 @@ ...@@ -5,38 +5,48 @@
<el-input <el-input
class="input" class="input"
size="mini" size="mini"
placeholder="输入关键词搜索" placeholder="输入关键词搜索原文或笔记"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
v-model="searchValue" v-model="searchParams.content"
@keyup.enter.native="handleSearch"
clearable clearable
></el-input> ></el-input>
<el-select <el-select
v-model="tagModelValue"
placeholder="请选择标签"
size="mini" size="mini"
class="select" v-model="searchParams.tagId"
filterable
remote
clearable clearable
default-first-option
placeholder="标签(可搜索)"
:remote-method="remoteMethod"
:loading="loading"
@change="handleSearch"
> >
<el-option <el-option
v-for="item in tagList" v-for="item in tagList.records"
:key="item.value" :key="item.id"
:label="item.label" :label="item.tagName"
:value="item.value" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<!-- {{ noteList }} --> <div class="total">{{ noteList.records.length }}条数据</div>
<div class="total">{{ noteList.length }}条数据</div>
<div class="note-list"> <div class="note-list">
<el-card <el-card
class="note-item" class="note-item"
v-for="(item, index) in noteList" v-for="(item, index) in noteList.records"
:key="index" :key="index"
shadow="hover" shadow="hover"
> >
<div class="tag"> <div class="tag" v-if="item.tagName && item.tagName.length > 0">
<el-tag type="warning">{{ item.tag }}</el-tag> <el-tag
style="margin-right: 8px"
type="warning"
v-for="(v, i) in item.tagName.split(',')"
>{{ v }}
</el-tag>
<el-dropdown> <el-dropdown>
<el-link>更多</el-link> <el-link>更多</el-link>
...@@ -50,43 +60,78 @@ ...@@ -50,43 +60,78 @@
</el-dropdown> </el-dropdown>
</div> </div>
<div class="origin oneRow"> <div class="origin oneRow">
<i class="el-icon-document"></i> <svg-icon
原文:{{ item.bookmarkContent }} icon-class="origin"
style="color: #1a5eff; margin-right: 6px"
/>
<!-- <i class="el-icon-document"></i> -->
<span>原文:</span>
<span
v-if="oldContent"
v-html="brightenKeyword(item.bookmarkContent, oldContent)"
></span>
<span v-else> {{ item.bookmarkContent }}</span>
</div> </div>
<div class="note twoRow"> <div class="note twoRow">
<i class="el-icon-edit"></i> <svg-icon
笔记:{{ item.noteContent }} icon-class="icon-note"
style="color: #e6a23c; margin-right: 6px"
/>
<!-- <i class="el-icon-edit"></i> -->
<span>笔记:</span>
<span
v-if="oldContent"
v-html="brightenKeyword(item.noteContent, oldContent)"
></span>
<span v-else> {{ item.noteContent }}</span>
</div> </div>
<div class="buttons"> <div class="buttons">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="handleInsertNote(item.noteContent)" @click="handleInsertOrigin(item.bookmarkContent)"
>引入笔记</el-button >引入原文</el-button
> >
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
plain plain
@click="handleInsertOrigin(item.bookmarkContent)" @click="handleInsertNote(item.noteContent)"
>引入原文</el-button >引入笔记</el-button
> >
</div> </div>
</el-card> </el-card>
</div> </div>
<div class="page">
<el-pagination
size="mini"
class="note-page"
background
@size-change="handleSizeChangeNote"
@current-change="handleCurrentChangeNote"
:current-page.sync="noteList.current"
:page-size="noteList.size"
layout="prev, pager, next"
:total="tagList.total"
>
</el-pagination>
</div>
</div> </div>
</template> </template>
<script> <script>
import { noteList, tagList } from "./mockData"; // import { noteList, tagList } from "./mockData";
import { getBookMarkList } from "@/api/doc/bookMark"; import { getNoteByTag, getNoteAllTagList } from "@/api/doc/index";
export default { export default {
data() { data() {
return { return {
//当前选中的标签 searchParams: {
tagModelValue: "", //标签名搜索
//笔记搜索 tagId: "",
searchValue: "", //从原文和笔记中搜索
content: "",
},
oldContent: "", //用于记录上一次搜索的关键词,以至于不会被实时影响关键词着色效果
loading: false, loading: false,
dropdownList: [ dropdownList: [
{ {
...@@ -102,24 +147,67 @@ export default { ...@@ -102,24 +147,67 @@ export default {
value: "delete", value: "delete",
}, },
], ],
noteList, noteList: {
tagList, records: [],
// noteList: [], //笔记列表 current: 1,
// tagList: [], size: 20,
total: 0,
}, //笔记列表
tagList: {
records: [],
current: 1,
size: 20,
total: 0,
},
}; };
}, },
mounted() { mounted() {
// this.loadData() this.loadNoteList();
}, },
methods: { methods: {
async loadData() { // 加载笔记列表
async loadNoteList() {
this.loading = true; this.loading = true;
let res = await getBookMarkList(); const { current, size } = this.noteList;
const { content, tagId } = this.searchParams;
const params = {
currentPage: current,
pageCount: size,
id: tagId,
content,
};
let res = await getNoteByTag(params);
this.oldContent = content;
this.loading = false; this.loading = false;
if (res.code == 200) { if (res.code == 200) {
this.noteList = res.data; this.noteList = res.data;
this.loadTagList();
} }
}, },
// 搜索
handleSearch() {
this.loadNoteList();
},
// 加载标签
async loadTagList() {
// 首次加载时只加载最多10个供用户下拉选择
this.remoteMethod("", 10);
},
// 远程搜索标签 默认搜索时pageCount 为100
remoteMethod(keyword, pageCount = 100) {
this.loading = true;
const params = {
keyword,
currentPage: 1,
pageCount,
};
getNoteAllTagList(params).then((res) => {
this.loading = false;
if (res.code == 200) {
this.tagList = res.data;
}
});
},
// 插入笔记 // 插入笔记
handleInsertNote(value) { handleInsertNote(value) {
this.$emit("insertText", value); this.$emit("insertText", value);
...@@ -135,17 +223,50 @@ export default { ...@@ -135,17 +223,50 @@ export default {
case "view": case "view":
break; break;
case "edit": case "edit":
this.handleOpenAddUpdateDialog(item) this.handleOpenAddUpdateDialog(item);
break; break;
case "delete": case "delete":
break; break;
} }
}, },
// 打开编辑笔记对话框 // 打开编辑笔记对话框
handleOpenAddUpdateDialog(item){ handleOpenAddUpdateDialog(item) {
this.$emit('handleOpenAddUpdateDialog',item) this.$emit("handleOpenAddUpdateDialog", item);
} },
//获取需要标红的文字
getRedWords(contentText, keyword) {
let keywordArray = keyword.split("");
let wordsArray = [];
for (let key of keywordArray) {
if (contentText.includes(key)) {
wordsArray.push(key);
}
}
return wordsArray;
},
//将文字标红
brightenKeyword(contentText, keyword) {
let wordsArray = this.getRedWords(contentText, keyword);
let res = contentText; //res的初始值是不带任何红色格式的
//遍历相同字数组,
for (let word of wordsArray) {
const Reg = new RegExp(word, "i");
//替换每一个相同字
res = res.replace(Reg, `<span style="color: red;">${word}</span>`);
}
return res; //此时的res里已经将需要标红的字体带上了格式(<span style="color:red"></span>
},
// 文件列表current
handleSizeChangeNote(value) {
this.tagList.pageCount = value;
this.loadNoteList();
},
// 文件列表current
handleCurrentChangeNote(value) {
this.tagList.currentPage = value;
this.loadNoteList();
},
}, },
}; };
</script> </script>
...@@ -167,11 +288,11 @@ export default { ...@@ -167,11 +288,11 @@ export default {
margin: 20px 0 4px; margin: 20px 0 4px;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
font-style: 14px; font-size: 14px;
color: #999; color: #999;
} }
.note-list { .note-list {
height: calc(100vh - 200px); height: calc(100vh - 210px);
overflow: auto; overflow: auto;
.note-item { .note-item {
margin-bottom: 16px; margin-bottom: 16px;
......
<template> <template>
<div class="panel"> <div class="panel">
<div class="left"> <div class="left">
<div class="title">{{ currentTab }}</div> <div class="title">插入笔记</div>
<div class="left-content"> <div class="left-content">
<InsertNote <InsertNote
ref="InsertNote" ref="InsertNote"
@insertText="handleInsertText" @insertText="handleInsertText"
@handleOpenAddUpdateDialog="handleOpenAddUpdateDialog" @handleOpenAddUpdateDialog="handleOpenAddUpdateDialog"
/> />
<!-- <AutoCheck v-if="currentTab == '自动检查'" />
<AutoClose v-if="currentTab == '自动补全'" /> -->
</div> </div>
</div> </div>
<!-- <div class="right">
<div class="tabs">
<div
@click="handleClickTab(item)"
:class="{ 'tab-item': true, active: currentTab == item }"
v-for="(item, index) in tabs"
:key="index"
>
{{ item }}
</div>
</div>
</div> -->
<div class="close"> <div class="close">
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</div> </div>
...@@ -32,30 +18,18 @@ ...@@ -32,30 +18,18 @@
<script> <script>
import InsertNote from "./insertNote.vue"; import InsertNote from "./insertNote.vue";
import AutoCheck from "./autoCheck.vue";
import AutoClose from "./autoClose.vue";
export default { export default {
name: "rightPanel", name: "rightPanel",
components: { components: {
InsertNote, InsertNote,
AutoCheck,
AutoClose,
}, },
data() { data() {
return { return {
// 当前选中的tab
currentTab: "插入笔记",
//右侧tabs
tabs: ["插入笔记", "自动检查", "自动补全"],
}; };
}, },
methods: { methods: {
handleClickTab(tab) {
this.currentTab = tab;
},
// 获取笔记 // 获取笔记
loadNoteData() { loadNoteData() {
console.log("获取笔记loadData");
this.$refs.InsertNote.loadData(); this.$refs.InsertNote.loadData();
}, },
//插入文字 //插入文字
......
...@@ -35,9 +35,9 @@ module.exports = { ...@@ -35,9 +35,9 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://222.85.214.245:9600`, target: `http://222.85.214.245:9600`,
// target: `http://222.85.214.245:9558`, // target: `http://222.85.214.245:9558`,
target: `http://172.24.100.246:9600`, // target: `http://172.24.100.246:9600`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论