修改开放文档页面位置
This commit is contained in:
@@ -58,6 +58,15 @@ export default {
|
|||||||
},
|
},
|
||||||
updatePageZan: data => {
|
updatePageZan: data => {
|
||||||
return request({url: '/zyplayer-doc-wiki/page/zan/update', method: 'post', data: Qs.stringify(data)});
|
return request({url: '/zyplayer-doc-wiki/page/zan/update', method: 'post', data: Qs.stringify(data)});
|
||||||
|
},
|
||||||
|
openPageDetail: data => {
|
||||||
|
return request({url: 'zyplayer-doc-wiki/open-api/page/detail', method: 'post', data: Qs.stringify(data)});
|
||||||
|
},
|
||||||
|
openPageList: data => {
|
||||||
|
return request({url: 'zyplayer-doc-wiki/open-api/page/list', method: 'post', data: Qs.stringify(data)});
|
||||||
|
},
|
||||||
|
openSpaceInfo: data => {
|
||||||
|
return request({url: 'zyplayer-doc-wiki/open-api/space/info', method: 'post', data: Qs.stringify(data)});
|
||||||
},
|
},
|
||||||
xxxxxxxxxxxx: data => {
|
xxxxxxxxxxxx: data => {
|
||||||
return request({url: 'update', method: 'post', data: Qs.stringify(data)});
|
return request({url: 'update', method: 'post', data: Qs.stringify(data)});
|
||||||
|
|||||||
@@ -91,7 +91,11 @@
|
|||||||
this.userInput.addEventListener('keydown', e => {
|
this.userInput.addEventListener('keydown', e => {
|
||||||
if (e.which == 13) {
|
if (e.which == 13) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.editDom.keyEnter(this.editorDom, this.editorRange, this.undoRedo);
|
this.editDom = this.editDom.keyEnter(this.editorDom, this.editorRange, this.undoRedo);
|
||||||
|
// 修改光标位置为下一行的开始
|
||||||
|
this.editorRange.startDomIndex = 0;
|
||||||
|
this.editorRange.endDomIndex = 0;
|
||||||
|
this.$forceUpdate();
|
||||||
} else if (e.keyCode == 90 && e.ctrlKey) {
|
} else if (e.keyCode == 90 && e.ctrlKey) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.undoRedo.undo();
|
this.undoRedo.undo();
|
||||||
@@ -164,7 +168,7 @@
|
|||||||
if (lastDom.type != 'locate') {
|
if (lastDom.type != 'locate') {
|
||||||
lastDom = new Dom('locate', 'locate');
|
lastDom = new Dom('locate', 'locate');
|
||||||
this.editorDom.push(lastDom);
|
this.editorDom.push(lastDom);
|
||||||
this.undoRedo.execute(2, this.editorDom.length - 1, JSON.stringify(lastDom), '');
|
this.undoRedo.execute(2, this.editorDom.length - 1, lastDom, '');
|
||||||
}
|
}
|
||||||
setTimeout(() => event.target.lastChild.click(), 100);
|
setTimeout(() => event.target.lastChild.click(), 100);
|
||||||
},
|
},
|
||||||
@@ -200,11 +204,13 @@
|
|||||||
if (startIndex != endIndex) {
|
if (startIndex != endIndex) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 光标开始位置计算
|
||||||
let startOffset = selectionRange.startOffset;
|
let startOffset = selectionRange.startOffset;
|
||||||
let previousSibling = toolbarCommon.getRealElem(selectionRange.startContainer).previousSibling;
|
let previousSibling = toolbarCommon.getRealElem(selectionRange.startContainer).previousSibling;
|
||||||
for (; previousSibling; previousSibling = previousSibling.previousSibling) {
|
for (; previousSibling; previousSibling = previousSibling.previousSibling) {
|
||||||
startOffset += previousSibling.innerText.length;
|
startOffset += previousSibling.innerText.length;
|
||||||
}
|
}
|
||||||
|
// 光标结束位置计算
|
||||||
let endOffset = selectionRange.endOffset;
|
let endOffset = selectionRange.endOffset;
|
||||||
let endPreviousSibling = toolbarCommon.getRealElem(selectionRange.endContainer).previousSibling;
|
let endPreviousSibling = toolbarCommon.getRealElem(selectionRange.endContainer).previousSibling;
|
||||||
for (; endPreviousSibling; endPreviousSibling = endPreviousSibling.previousSibling) {
|
for (; endPreviousSibling; endPreviousSibling = endPreviousSibling.previousSibling) {
|
||||||
@@ -212,7 +218,8 @@
|
|||||||
}
|
}
|
||||||
this.editorRange.startOffset = startOffset;
|
this.editorRange.startOffset = startOffset;
|
||||||
this.editorRange.endOffset = endOffset;
|
this.editorRange.endOffset = endOffset;
|
||||||
console.log(startOffset, endOffset);
|
// console.log(startOffset, endOffset);
|
||||||
|
// 如果没有选中内容,隐藏工具栏,输入框获取焦点
|
||||||
if (startOffset == endOffset) {
|
if (startOffset == endOffset) {
|
||||||
this.hideToolbar();
|
this.hideToolbar();
|
||||||
setTimeout(() => this.userInput.focus(), 50);
|
setTimeout(() => this.userInput.focus(), 50);
|
||||||
@@ -228,12 +235,11 @@
|
|||||||
domNew = new Dom('locate', 'locate');
|
domNew = new Dom('locate', 'locate');
|
||||||
this.editorDom.push(domNew);
|
this.editorDom.push(domNew);
|
||||||
}
|
}
|
||||||
let beforeJson = JSON.stringify(this.editDom);
|
let beforeDom = this.editDom.clone();
|
||||||
let oldText = this.editDom.text || '';
|
let oldText = this.editDom.text || '';
|
||||||
// 如果文字的中间位置点击,则把内容放到指定位置
|
// 如果文字的中间位置点击,则把内容放到指定位置
|
||||||
let startOffset = this.editorRange.startOffset;
|
let startOffset = this.editorRange.startOffset;
|
||||||
this.editDom.addText(startOffset, this.userInputData);
|
this.editDom.addText(startOffset, this.userInputData);
|
||||||
let afterJson = JSON.stringify(this.editDom);
|
|
||||||
if (startOffset < oldText.length) {
|
if (startOffset < oldText.length) {
|
||||||
this.editorRange.startOffset = this.editorRange.endOffset = (startOffset + this.userInputData.length);
|
this.editorRange.startOffset = this.editorRange.endOffset = (startOffset + this.userInputData.length);
|
||||||
} else {
|
} else {
|
||||||
@@ -244,12 +250,15 @@
|
|||||||
// let letterSpacing = this.userInputData.length * 0.52;
|
// let letterSpacing = this.userInputData.length * 0.52;
|
||||||
// this.editorCursorStyle.left = (parseInt(this.editorCursorStyle.left) + (parseInt(fontSize) * newLength) + letterSpacing) + 'px';
|
// this.editorCursorStyle.left = (parseInt(this.editorCursorStyle.left) + (parseInt(fontSize) * newLength) + letterSpacing) + 'px';
|
||||||
this.userInputData = '';
|
this.userInputData = '';
|
||||||
|
// 增加撤销重做记录
|
||||||
let editDomNode = toolbarCommon.getRootDom(this.editDom.target);
|
let editDomNode = toolbarCommon.getRootDom(this.editDom.target);
|
||||||
let editIndex = parseInt(editDomNode.getAttribute("index"));
|
if (editDomNode != null) {
|
||||||
this.undoRedo.execute(1, editIndex, beforeJson, afterJson);
|
let editIndex = parseInt(editDomNode.getAttribute("index"));
|
||||||
|
this.undoRedo.execute(1, editIndex, beforeDom, this.editDom);
|
||||||
|
}
|
||||||
// 如果在最后一个div里面输入,则改为非最后一个,然后在最后再加一行
|
// 如果在最后一个div里面输入,则改为非最后一个,然后在最后再加一行
|
||||||
if (!!domNew) {
|
if (!!domNew) {
|
||||||
this.undoRedo.execute(2, this.editorDom.length - 1, JSON.stringify(domNew), '');
|
this.undoRedo.execute(2, this.editorDom.length - 1, domNew, '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleToolbarBold() {
|
handleToolbarBold() {
|
||||||
|
|||||||
@@ -11,9 +11,11 @@ function Dom(type = 'text', cls = '', text = '', styleRange = []) {
|
|||||||
this.startOffset = -1;
|
this.startOffset = -1;
|
||||||
this.endOffset = -1;
|
this.endOffset = -1;
|
||||||
this.dom = [];
|
this.dom = [];
|
||||||
this.textStyle = [];
|
|
||||||
// 一个范围的样式,例:{start: 1, end: 2, class: 'xx xxx'}
|
// 一个范围的样式,例:{start: 1, end: 2, class: 'xx xxx'}
|
||||||
this.styleRange = styleRange;
|
this.styleRange = [];
|
||||||
|
styleRange.forEach(item => {
|
||||||
|
this.styleRange.push(new StyleRange(item.start, item.end, this.styleRange.cls));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 原型
|
// 原型
|
||||||
@@ -128,22 +130,26 @@ Dom.prototype = {
|
|||||||
this.dom.push(new Dom('', '', this.text.substring(lastStart, this.text.length)));
|
this.dom.push(new Dom('', '', this.text.substring(lastStart, this.text.length)));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
clone() {
|
||||||
|
return new Dom(this.type, this.cls, this.text, this.styleRange);
|
||||||
|
},
|
||||||
// 回车事件处理
|
// 回车事件处理
|
||||||
keyEnter(editorDom, editorRange, undoRedo) {
|
keyEnter(editorDom, editorRange, undoRedo) {
|
||||||
let nextText = '';
|
let nextText = '';
|
||||||
let oldText = this.text || '';
|
let oldText = this.text || '';
|
||||||
// 如果文字的中间位置点击,则把内容分割到两行
|
// 如果文字的中间位置点击,则把内容分割到两行
|
||||||
if (editorRange.startOffset < oldText.length) {
|
if (editorRange.startOffset < oldText.length) {
|
||||||
let beforeJson = JSON.stringify(this);
|
let beforeDom = this.clone();
|
||||||
this.text = oldText.substring(0, editorRange.startOffset);
|
this.text = oldText.substring(0, editorRange.startOffset);
|
||||||
undoRedo.execute(1, editIndex, beforeJson, JSON.stringify(this));
|
undoRedo.execute(1, editIndex, beforeDom, this);
|
||||||
nextText = oldText.substring(editorRange.startOffset, oldText.length);
|
nextText = oldText.substring(editorRange.startOffset, oldText.length);
|
||||||
}
|
}
|
||||||
let editDomNode = toolbarCommon.getRootDom(this.target);
|
let editDomNode = toolbarCommon.getRootDom(this.target);
|
||||||
let editIndex = parseInt(editDomNode.getAttribute("index"));
|
let editIndex = parseInt(editDomNode.getAttribute("index"));
|
||||||
let domNew = new Dom('text', this.cls, nextText);
|
let domNew = new Dom('text', this.cls, nextText);
|
||||||
editorDom.splice(editIndex + 1, 0, domNew);
|
editorDom.splice(editIndex + 1, 0, domNew);
|
||||||
undoRedo.execute(2, editIndex + 1, JSON.stringify(domNew), '');
|
undoRedo.execute(2, editIndex + 1, domNew, '');
|
||||||
|
return domNew;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,24 @@ UndoRedo.prototype = {
|
|||||||
if (this.undoRedoList.length >= 50) {
|
if (this.undoRedoList.length >= 50) {
|
||||||
this.undoRedoList.splice(0, 1);
|
this.undoRedoList.splice(0, 1);
|
||||||
}
|
}
|
||||||
|
// 处理下,只保留有用的字段
|
||||||
|
before = this.handleDomColumn(before);
|
||||||
|
after = this.handleDomColumn(after);
|
||||||
this.undoRedoList.push(new UndoInfo(type, index, before, after));
|
this.undoRedoList.push(new UndoInfo(type, index, before, after));
|
||||||
this.undoRedoIndex = this.undoRedoList.length - 1;
|
this.undoRedoIndex = this.undoRedoList.length - 1;
|
||||||
},
|
},
|
||||||
|
handleDomColumn(content) {
|
||||||
|
if (!content) return '';
|
||||||
|
let beforeObj = [];
|
||||||
|
if (content instanceof Array) {
|
||||||
|
content.forEach(item => {
|
||||||
|
beforeObj.push({type: item.type, cls: item.cls, text: item.text, styleRange: item.styleRange});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
beforeObj.push({type: content.type, cls: content.cls, text: content.text, styleRange: content.styleRange});
|
||||||
|
}
|
||||||
|
return JSON.stringify(beforeObj);
|
||||||
|
},
|
||||||
undo() {
|
undo() {
|
||||||
if (this.undoRedoIndex >= this.undoRedoList.length) {
|
if (this.undoRedoIndex >= this.undoRedoList.length) {
|
||||||
this.undoRedoIndex = this.undoRedoList.length - 1;
|
this.undoRedoIndex = this.undoRedoList.length - 1;
|
||||||
@@ -34,13 +49,11 @@ UndoRedo.prototype = {
|
|||||||
}
|
}
|
||||||
let undoInfo = this.undoRedoList[this.undoRedoIndex];
|
let undoInfo = this.undoRedoList[this.undoRedoIndex];
|
||||||
let changeContent = JSON.parse(undoInfo.before);
|
let changeContent = JSON.parse(undoInfo.before);
|
||||||
if (changeContent instanceof Array) {
|
let undoIndex = undoInfo.index;
|
||||||
changeContent.forEach(item => {
|
changeContent.forEach(item => {
|
||||||
this.undoObjDomToEditor(undoInfo, item);
|
this.undoObjDomToEditor(undoInfo, undoIndex, item);
|
||||||
});
|
undoIndex--;
|
||||||
} else {
|
});
|
||||||
this.undoObjDomToEditor(undoInfo, changeContent);
|
|
||||||
}
|
|
||||||
this.undoRedoIndex = Math.max(this.undoRedoIndex - 1, -1);
|
this.undoRedoIndex = Math.max(this.undoRedoIndex - 1, -1);
|
||||||
},
|
},
|
||||||
redo() {
|
redo() {
|
||||||
@@ -52,53 +65,51 @@ UndoRedo.prototype = {
|
|||||||
let undoInfo = this.undoRedoList[this.undoRedoIndex];
|
let undoInfo = this.undoRedoList[this.undoRedoIndex];
|
||||||
let actionText = (undoInfo.type == 1) ? undoInfo.after : undoInfo.before;
|
let actionText = (undoInfo.type == 1) ? undoInfo.after : undoInfo.before;
|
||||||
let changeContent = JSON.parse(actionText);
|
let changeContent = JSON.parse(actionText);
|
||||||
if (changeContent instanceof Array) {
|
let undoIndex = undoInfo.index;
|
||||||
changeContent.forEach(item => {
|
changeContent.forEach(item => {
|
||||||
this.redoObjDomToEditor(undoInfo, item);
|
this.redoObjDomToEditor(undoInfo, item);
|
||||||
});
|
undoIndex++;
|
||||||
} else {
|
});
|
||||||
this.redoObjDomToEditor(undoInfo, changeContent);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
redoObjDomToEditor(undoInfo, domObj) {
|
redoObjDomToEditor(undoInfo, undoIndex, domObj) {
|
||||||
let dom = new Dom(domObj.type, domObj.cls, domObj.text, domObj.styleRange);
|
let dom = new Dom(domObj.type, domObj.cls, domObj.text, domObj.styleRange);
|
||||||
if (undoInfo.type == 1) {
|
if (undoInfo.type == 1) {
|
||||||
// 1=修改 2=添加 3=删除
|
// 1=修改 2=添加 3=删除
|
||||||
if (this.editorDom.length > undoInfo.index) {
|
if (this.editorDom.length > undoIndex) {
|
||||||
vue.$set(this.editorDom, undoInfo.index, dom);
|
vue.$set(this.editorDom, undoIndex, dom);
|
||||||
}
|
}
|
||||||
} else if (undoInfo.type == 2) {
|
} else if (undoInfo.type == 2) {
|
||||||
// 1=修改 2=添加 3=删除
|
// 1=修改 2=添加 3=删除
|
||||||
if (this.editorDom.length == undoInfo.index) {
|
if (this.editorDom.length == undoIndex) {
|
||||||
this.editorDom.push(dom);
|
this.editorDom.push(dom);
|
||||||
} else if (this.editorDom.length > undoInfo.index) {
|
} else if (this.editorDom.length > undoIndex) {
|
||||||
this.editorDom.splice(undoInfo.index, 0, dom);
|
this.editorDom.splice(undoIndex, 0, dom);
|
||||||
}
|
}
|
||||||
} else if (undoInfo.type == 3) {
|
} else if (undoInfo.type == 3) {
|
||||||
// 1=修改 2=添加 3=删除
|
// 1=修改 2=添加 3=删除
|
||||||
if (this.editorDom.length > undoInfo.index) {
|
if (this.editorDom.length > undoIndex) {
|
||||||
this.editorDom.splice(undoInfo.index, 1);
|
this.editorDom.splice(undoIndex, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
undoObjDomToEditor(undoInfo, domObj) {
|
undoObjDomToEditor(undoInfo, undoIndex, domObj) {
|
||||||
let dom = new Dom(domObj.type, domObj.cls, domObj.text, domObj.styleRange);
|
let dom = new Dom(domObj.type, domObj.cls, domObj.text, domObj.styleRange);
|
||||||
if (undoInfo.type == 1) {
|
if (undoInfo.type == 1) {
|
||||||
// 1=修改 2=添加 3=删除
|
// 1=修改 2=添加 3=删除
|
||||||
if (this.editorDom.length > undoInfo.index) {
|
if (this.editorDom.length > undoIndex) {
|
||||||
vue.$set(this.editorDom, undoInfo.index, dom);
|
vue.$set(this.editorDom, undoIndex, dom);
|
||||||
}
|
}
|
||||||
} else if (undoInfo.type == 2) {
|
} else if (undoInfo.type == 2) {
|
||||||
// 1=修改 2=添加 3=删除
|
// 1=修改 2=添加 3=删除
|
||||||
if (this.editorDom.length > undoInfo.index) {
|
if (this.editorDom.length > undoIndex) {
|
||||||
this.editorDom.splice(undoInfo.index, 1);
|
this.editorDom.splice(undoIndex, 1);
|
||||||
}
|
}
|
||||||
} else if (undoInfo.type == 3) {
|
} else if (undoInfo.type == 3) {
|
||||||
// 1=修改 2=添加 3=删除
|
// 1=修改 2=添加 3=删除
|
||||||
if (this.editorDom.length == undoInfo.index) {
|
if (this.editorDom.length == undoIndex) {
|
||||||
this.editorDom.push(dom);
|
this.editorDom.push(dom);
|
||||||
} else if (this.editorDom.length > undoInfo.index) {
|
} else if (this.editorDom.length > undoIndex) {
|
||||||
this.editorDom.splice(undoInfo.index, 0, dom);
|
this.editorDom.splice(undoIndex, 0, dom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
<el-table-column prop="spaceExplain" label="说明"></el-table-column>
|
<el-table-column prop="spaceExplain" label="说明"></el-table-column>
|
||||||
<el-table-column label="开放地址">
|
<el-table-column label="开放地址">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<a target="_blank" :href="'open-wiki.html?space='+scope.row.uuid" v-if="scope.row.openDoc == 1">{{scope.row.name}}</a>
|
<el-button type="text" @click="showOpenSpace(scope.row.uuid)" v-if="scope.row.openDoc == 1">{{scope.row.name}}</el-button>
|
||||||
<span v-else>暂未开放</span>
|
<span v-else>暂未开放</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -247,6 +247,10 @@
|
|||||||
filterPageNode(value, data) {
|
filterPageNode(value, data) {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.name.indexOf(value) !== -1;
|
return data.name.indexOf(value) !== -1;
|
||||||
|
},
|
||||||
|
showOpenSpace(space) {
|
||||||
|
let routeUrl = this.$router.resolve({path: '/page/openView', query: {space: space}});
|
||||||
|
window.open(routeUrl.href, '_blank');
|
||||||
},
|
},
|
||||||
editSpaceInfo(row) {
|
editSpaceInfo(row) {
|
||||||
this.newSpaceForm = {
|
this.newSpaceForm = {
|
||||||
|
|||||||
244
zyplayer-doc-ui/wiki-ui/src/components/layouts/OpenLayout.vue
Normal file
244
zyplayer-doc-ui/wiki-ui/src/components/layouts/OpenLayout.vue
Normal file
@@ -0,0 +1,244 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-container style="height: 100%;">
|
||||||
|
<el-aside width="280px" style="height: 100%;background-color: #fafafa;" v-show="leftCollapse">
|
||||||
|
<div class="logo">{{nowSpaceShow.name}}</div>
|
||||||
|
<div style="padding: 0 10px 50px 10px;">
|
||||||
|
<el-input v-model="searchKeywords" @keyup.enter.native="searchByKeywords" placeholder="搜索文档" style="margin: 10px 0;">
|
||||||
|
<el-button slot="append" icon="el-icon-search" v-on:click="searchByKeywords"></el-button>
|
||||||
|
</el-input>
|
||||||
|
<el-tree :props="defaultProps" :data="wikiPageList" @node-click="handleNodeClick"
|
||||||
|
ref="wikiPageTree" :filter-node-method="filterPageNode" highlight-current
|
||||||
|
:expand-on-click-node="false" :default-expanded-keys="wikiPageExpandedKeys"
|
||||||
|
node-key="id"
|
||||||
|
style="background-color: #fafafa;">
|
||||||
|
</el-tree>
|
||||||
|
<!--请手下留情,别删我(╥╯^╰╥),给我一个露脸的机会,我长的不碍眼的-->
|
||||||
|
<div class="build-info">本文档使用<span @click="aboutDialogVisible = true">zyplayer-doc</span>构建</div>
|
||||||
|
</div>
|
||||||
|
</el-aside>
|
||||||
|
<el-container>
|
||||||
|
<el-main class="doc-body-box">
|
||||||
|
<el-row type="border-card" v-show="rightContentType == 0">
|
||||||
|
<div style="margin-top: 30px;color: #666; text-align: center; font-size: 30px;">欢迎使用在线文档</div>
|
||||||
|
<div style="margin-top: 30px;color: #666; text-align: center;">
|
||||||
|
{{nowSpaceShow.name}}
|
||||||
|
<span v-show="nowSpaceShow.spaceExplain && nowSpaceShow.spaceExplain.length > 0"> · {{nowSpaceShow.spaceExplain}}</span>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<el-row type="border-card" v-show="rightContentType == 1">
|
||||||
|
<i class="el-icon-menu icon-collapse" @click="leftCollapse = !leftCollapse"></i>
|
||||||
|
<div style="max-width: 950px;margin: 0 auto;">
|
||||||
|
<div class="wiki-title">{{wikiPage.name}}</div>
|
||||||
|
<div class="wiki-author">
|
||||||
|
<span v-show="!wikiPage.updateTime">创建时间:{{wikiPage.createTime}}</span>
|
||||||
|
<span v-show="wikiPage.updateTime">最后修改:{{wikiPage.updateTime}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="wiki-files">
|
||||||
|
<el-table v-show="pageFileList.length > 0" :data="pageFileList" border style="width: 100%; margin-bottom: 5px;">
|
||||||
|
<el-table-column label="文件名">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<a target="_blank" :href="scope.row.fileUrl">{{scope.row.fileName}}</a>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="创建时间" width="180px"></el-table-column>
|
||||||
|
<el-table-column prop="downloadNum" label="下载次数" width="80px"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="wiki-content w-e-text">
|
||||||
|
<div v-html="pageContent.content"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-container>
|
||||||
|
<!--关于弹窗-->
|
||||||
|
<el-dialog title="关于zyplayer-doc-wiki" :visible.sync="aboutDialogVisible" width="600px">
|
||||||
|
<el-form>
|
||||||
|
<el-form-item label="项目地址:">
|
||||||
|
<a target="_blank" href="https://gitee.com/zyplayer/zyplayer-doc">zyplayer-doc</a>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开发人员:">
|
||||||
|
<a target="_blank" href="http://zyplayer.com">暮光:城中城</a>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="">
|
||||||
|
欢迎加群讨论,QQ群号:466363173,欢迎提交需求,欢迎使用和加入开发!
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pageApi from '../../common/api/page'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
leftCollapse: true,
|
||||||
|
aboutDialogVisible: false,
|
||||||
|
rightContentLoading: false,
|
||||||
|
rightContentType: 0,// 右侧显示类型,0=欢迎页 1=文章内容 2=编辑或新增文章
|
||||||
|
pathIndex: [],
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'name'
|
||||||
|
},
|
||||||
|
// 空间搜索相关
|
||||||
|
nowSpaceShow: {},
|
||||||
|
// 搜索的输入内容
|
||||||
|
searchKeywords: "",
|
||||||
|
lastClickNode: {},
|
||||||
|
// 页面展示相关
|
||||||
|
wikiPageList:[],
|
||||||
|
wikiPage: {},
|
||||||
|
wikiPageExpandedKeys: [],
|
||||||
|
pageContent: {},
|
||||||
|
pageFileList: [],
|
||||||
|
// 页面跳转相关
|
||||||
|
parentPath: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeRouteUpdate(to, from, next) {
|
||||||
|
this.initQueryParam(to);
|
||||||
|
next();
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
this.initQueryParam(this.$route);
|
||||||
|
this.getSpaceInfo();
|
||||||
|
this.doGetPageList(null);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
filterPageNode(value, data) {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.name.indexOf(value) !== -1;
|
||||||
|
},
|
||||||
|
handleNodeClick(data) {
|
||||||
|
this.rightContentType = 1;
|
||||||
|
if (this.lastClickNode.id == data.id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log("点击节点:", data);
|
||||||
|
this.lastClickNode = data;
|
||||||
|
this.nowClickPath = {pageId: this.lastClickNode.id, space: this.parentPath.space};
|
||||||
|
this.$router.push({path: '/page/openView', query: this.nowClickPath});
|
||||||
|
},
|
||||||
|
loadPageDetail(pageId) {
|
||||||
|
this.rightContentType = 1;
|
||||||
|
let param = {pageId: pageId, space: this.parentPath.space};
|
||||||
|
pageApi.openPageDetail(param).then(json => {
|
||||||
|
let wikiPage = json.data.wikiPage || {};
|
||||||
|
wikiPage.selfZan = json.data.selfZan || 0;
|
||||||
|
this.wikiPage = wikiPage;
|
||||||
|
this.pageContent = json.data.pageContent || {};
|
||||||
|
this.pageFileList = json.data.fileList || [];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
searchByKeywords() {
|
||||||
|
this.$refs.wikiPageTree.filter(this.searchKeywords);
|
||||||
|
},
|
||||||
|
doGetPageList() {
|
||||||
|
let nodePath = "/";
|
||||||
|
let param = {space: this.parentPath.space};
|
||||||
|
pageApi.openPageList(param).then(json => {
|
||||||
|
let pathIndex = json.data || [];
|
||||||
|
this.createNodePath(pathIndex, nodePath);
|
||||||
|
this.wikiPageList = pathIndex;
|
||||||
|
this.lastClickNode = {};
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getSpaceInfo() {
|
||||||
|
let param = {space: this.parentPath.space};
|
||||||
|
pageApi.openSpaceInfo(param).then(json => {
|
||||||
|
this.nowSpaceShow = json.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
createNodePath(node, nodePath) {
|
||||||
|
if (!nodePath.endsWith("/")) {
|
||||||
|
nodePath += "/";
|
||||||
|
}
|
||||||
|
for (let i = 0; i < node.length; i++) {
|
||||||
|
let item = node[i];
|
||||||
|
item.nodePath = nodePath + item.name;
|
||||||
|
if (!!item.children && item.children.length > 0) {
|
||||||
|
this.createNodePath(item.children, item.nodePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initQueryParam(to) {
|
||||||
|
this.parentPath = {space: to.query.space, pageId: to.query.pageId};
|
||||||
|
if (!!this.parentPath.pageId) {
|
||||||
|
this.loadPageDetail(this.parentPath.pageId);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
html,body,#app {margin: 0; padding: 0; height: 100%;}
|
||||||
|
pre{margin: 0;white-space: pre-wrap;font-size: 14px; font-family: auto;}
|
||||||
|
.el-menu {box-sizing: border-box;border-right: 0;margin-right: 3px;}
|
||||||
|
.el-header {background-color: #409EFF; color: #333; line-height: 40px; text-align: right;height: 40px !important;}
|
||||||
|
.doc-body-box{
|
||||||
|
overflow-x: hidden;overflow-y: auto;width: 100%;
|
||||||
|
padding: 10px;border-left: 1px solid #f1f1f1; box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.el-tree{margin-right: 3px;}
|
||||||
|
.logo{
|
||||||
|
/*background: #409EFF; cursor: pointer;*/
|
||||||
|
border-bottom: 1px solid #f1f1f1;
|
||||||
|
overflow: hidden;white-space: nowrap;text-overflow: ellipsis; padding: 5px 10px;
|
||||||
|
width: 260px; height:40px;line-height:40px;font-size: 25px;color: #666;text-align: center;
|
||||||
|
}
|
||||||
|
.icon-collapse{float: left;font-size: 25px;color: #aaa;cursor: pointer;position: fixed;}
|
||||||
|
.icon-collapse:hover{color: #ccc;}
|
||||||
|
.wiki-title{font-size: 20px;text-align: center;}
|
||||||
|
.wiki-author{font-size: 14px;color: #888;padding: 20px 0;height: 40px;line-height: 40px;}
|
||||||
|
.wiki-content{font-size: 14px;}
|
||||||
|
.wiki-content.w-e-text{overflow-y: auto;}
|
||||||
|
|
||||||
|
.upload-page-file .el-upload-list{display: none;}
|
||||||
|
.is-link{color: #1e88e5;cursor: pointer;}
|
||||||
|
/*编辑框高度*/
|
||||||
|
#newPageContentDiv .w-e-text-container{height: 600px !important;}
|
||||||
|
/*评论*/
|
||||||
|
.comment-box .head{
|
||||||
|
float: left;background-color: #ccc;border-radius: 50%;margin-right: 10px;
|
||||||
|
width: 45px; height: 45px; line-height: 45px;text-align: center;color: #fff;
|
||||||
|
}
|
||||||
|
.build-info{
|
||||||
|
position: fixed;bottom: 0;left: 0;background: #fafafa;width: 280px;text-align: center;
|
||||||
|
padding: 5px 0;color: #aaa;font-size: 12px;
|
||||||
|
}
|
||||||
|
.build-info span{color: #4183c4;cursor: pointer;}
|
||||||
|
/* S-JSON展示的样式 */
|
||||||
|
pre.json {
|
||||||
|
display: block;
|
||||||
|
padding: 9.5px;
|
||||||
|
margin: 0 0 0 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.38461538;
|
||||||
|
color: #333;
|
||||||
|
word-break: break-all;
|
||||||
|
word-wrap: break-word;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
pre.json .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;}
|
||||||
|
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
||||||
|
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
||||||
|
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
||||||
|
pre.json .string{color:#007777;}
|
||||||
|
pre.json .number{color:#aa00aa;}
|
||||||
|
pre.json .boolean{color:#0000ff;}
|
||||||
|
pre.json .function{color:#aa6633;text-decoration:initial;}
|
||||||
|
pre.json .null{color:#0000ff;}
|
||||||
|
pre.json .comma{color:#000000;font-weight:bold;}
|
||||||
|
pre.json .annotation{color:#aaa;}
|
||||||
|
pre img{cursor: pointer;}
|
||||||
|
/* E-JSON展示的样式 */
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -1,20 +1,29 @@
|
|||||||
import GlobalLayout from './components/layouts/GlobalLayout'
|
import GlobalLayout from './components/layouts/GlobalLayout'
|
||||||
|
import OpenLayout from './components/layouts/OpenLayout'
|
||||||
|
|
||||||
let routes = [
|
let routes = [
|
||||||
{path: '/', redirect: '/home'},
|
{path: '/', redirect: '/home'},
|
||||||
{path: '/user/login', name: '系统登录', component: () => import('@/views/user/Login')},
|
{path: '/user/login', name: 'WIKI-系统登录', component: () => import('@/views/user/Login')},
|
||||||
{path: '/page/search', name: '全局搜索', component: () => import('@/views/page/Search')},
|
{path: '/page/search', name: 'WIKI-全局搜索', component: () => import('@/views/page/Search')},
|
||||||
{path: '/common/noAuth', name: '没有权限', component: () => import('@/views/common/NoAuth')},
|
{path: '/common/noAuth', name: 'WIKI-没有权限', component: () => import('@/views/common/NoAuth')},
|
||||||
{path: '/page/editorTest', name: '编辑内容', component: () => import('@/views/page/EditorTest')},
|
{path: '/page/editorTest', name: '编辑内容', component: () => import('@/views/page/EditorTest')},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: '页面管理',
|
name: '页面管理',
|
||||||
component: GlobalLayout,
|
component: GlobalLayout,
|
||||||
children: [
|
children: [
|
||||||
{path: '/home', name: '主页', component: () => import('@/views/home/Home')},
|
{path: '/home', name: 'WIKI文档管理', component: () => import('@/views/home/Home')},
|
||||||
{path: '/user/myInfo', name: '我的信息', component: () => import('@/views/user/MyInfo')},
|
{path: '/user/myInfo', name: 'WIKI-我的信息', component: () => import('@/views/user/MyInfo')},
|
||||||
{path: '/page/show', name: '页面内容展示', component: () => import('@/views/page/Show')},
|
{path: '/page/show', name: 'WIKI-内容展示', component: () => import('@/views/page/Show')},
|
||||||
{path: '/page/edit', name: '编辑内容', component: () => import('@/views/page/Edit')},
|
{path: '/page/edit', name: 'WIKI-编辑内容', component: () => import('@/views/page/Edit')},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
name: '页面管理',
|
||||||
|
component: OpenLayout,
|
||||||
|
children: [
|
||||||
|
{path: '/page/openView', name: 'WIKI-内容展示', component: () => import('@/views/page/OpenView')},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
24
zyplayer-doc-ui/wiki-ui/src/views/page/OpenView.vue
Normal file
24
zyplayer-doc-ui/wiki-ui/src/views/page/OpenView.vue
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<div class="page-open-view-vue">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
beforeRouteUpdate(to, from, next) {
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
},
|
||||||
|
methods: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-select v-model="pageAuthNewUser" filterable remote reserve-keyword
|
<el-select v-model="pageAuthNewUser" filterable remote reserve-keyword
|
||||||
placeholder="请输入名字、邮箱、账号搜索用户" :remote-method="getSearchUserList"
|
placeholder="请输入名字、邮箱、账号搜索用户" :remote-method="getSearchUserList"
|
||||||
:loading="pageAuthUserLoading" style="width: 750px;">
|
:loading="pageAuthUserLoading" style="width: 750px;margin-right: 10px;">
|
||||||
<el-option v-for="item in searchUserList" :key="item.id" :label="item.userName" :value="item.id"></el-option>
|
<el-option v-for="item in searchUserList" :key="item.id" :label="item.userName" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button v-on:click="addPageAuthUser">添加</el-button>
|
<el-button v-on:click="addPageAuthUser">添加</el-button>
|
||||||
@@ -276,6 +276,8 @@
|
|||||||
this.pageFileList = json.data.fileList || [];
|
this.pageFileList = json.data.fileList || [];
|
||||||
this.uploadFormData = {pageId: this.wikiPage.id};
|
this.uploadFormData = {pageId: this.wikiPage.id};
|
||||||
this.parentPath.spaceId = wikiPage.spaceId;
|
this.parentPath.spaceId = wikiPage.spaceId;
|
||||||
|
// 修改标题
|
||||||
|
document.title = wikiPage.name || '页面展示';
|
||||||
// 修改最后点击的项,保证刷新后点击编辑能展示编辑的项
|
// 修改最后点击的项,保证刷新后点击编辑能展示编辑的项
|
||||||
// if (!this.lastClickNode.id) {
|
// if (!this.lastClickNode.id) {
|
||||||
// this.lastClickNode = {id: wikiPage.id, nodePath: wikiPage.name};
|
// this.lastClickNode = {id: wikiPage.id, nodePath: wikiPage.name};
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
body,html{margin:0;padding:0}#app,.el-container,.el-menu,body,html{height:100%}.el-header{background-color:#1d4e89!important;color:#333;line-height:40px;text-align:right;height:40px!important}.icon-collapse{float:left;font-size:25px;color:#aaa;margin-top:8px;cursor:pointer}.icon-collapse:hover{color:#eee}#app[data-v-774985bc],body[data-v-774985bc],html[data-v-774985bc]{margin:0;padding:0;height:100%}pre[data-v-774985bc]{margin:0;white-space:pre-wrap;font-size:14px;font-family:auto}.el-menu[data-v-774985bc]{-webkit-box-sizing:border-box;box-sizing:border-box;border-right:0;margin-right:3px}.el-header[data-v-774985bc]{background-color:#409eff;color:#333;line-height:40px;text-align:right;height:40px!important}.doc-body-box[data-v-774985bc]{overflow-x:hidden;overflow-y:auto;width:100%;padding:10px;border-left:1px solid #f1f1f1;-webkit-box-sizing:border-box;box-sizing:border-box}.el-tree[data-v-774985bc]{margin-right:3px}.logo[data-v-774985bc]{border-bottom:1px solid #f1f1f1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:5px 10px;width:260px;height:40px;line-height:40px;font-size:25px;color:#666;text-align:center}.icon-collapse[data-v-774985bc]{float:left;font-size:25px;color:#aaa;cursor:pointer;position:fixed}.icon-collapse[data-v-774985bc]:hover{color:#ccc}.wiki-title[data-v-774985bc]{font-size:20px;text-align:center}.wiki-author[data-v-774985bc]{font-size:14px;color:#888;padding:20px 0;height:40px;line-height:40px}.wiki-content[data-v-774985bc]{font-size:14px}.wiki-content.w-e-text[data-v-774985bc]{overflow-y:auto}.upload-page-file .el-upload-list[data-v-774985bc]{display:none}.is-link[data-v-774985bc]{color:#1e88e5;cursor:pointer}#newPageContentDiv .w-e-text-container[data-v-774985bc]{height:600px!important}.comment-box .head[data-v-774985bc]{float:left;background-color:#ccc;border-radius:50%;margin-right:10px;width:45px;height:45px;line-height:45px;text-align:center;color:#fff}.build-info[data-v-774985bc]{position:fixed;bottom:0;left:0;background:#fafafa;width:280px;text-align:center;padding:5px 0;color:#aaa;font-size:12px}.build-info span[data-v-774985bc]{color:#4183c4;cursor:pointer}pre.json[data-v-774985bc]{display:block;padding:9.5px;margin:0 0 0 10px;font-size:12px;line-height:1.38461538;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre.json .canvas[data-v-774985bc]{font:10pt georgia;background-color:#ececec;color:#000;border:1px solid #cecece}pre.json .object-brace[data-v-774985bc]{color:#0a0;font-weight:700}pre.json .array-brace[data-v-774985bc]{color:#03f;font-weight:700}pre.json .property-name[data-v-774985bc]{color:#c00;font-weight:700}pre.json .string[data-v-774985bc]{color:#077}pre.json .number[data-v-774985bc]{color:#a0a}pre.json .boolean[data-v-774985bc]{color:#00f}pre.json .function[data-v-774985bc]{color:#a63;text-decoration:initial}pre.json .null[data-v-774985bc]{color:#00f}pre.json .comma[data-v-774985bc]{color:#000;font-weight:700}pre.json .annotation[data-v-774985bc]{color:#aaa}pre img[data-v-774985bc]{cursor:pointer}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.login-container{border-radius:5px;-moz-border-radius:5px;background-clip:padding-box;margin:0 auto;width:350px;padding:35px 35px 15px 35px;background:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 0 25px #cac6c6;box-shadow:0 0 25px #cac6c6}.title{margin:0 auto 40px auto;text-align:center;color:#505458}.remember{margin:0 0 35px 0}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.page-edit-vue .icon-collapse{float:left;font-size:25px;color:#aaa;margin-top:8px;cursor:pointer}.page-edit-vue .icon-collapse:hover{color:#eee}.page-edit-vue .wiki-title{font-size:20px}.page-edit-vue .wiki-author{font-size:14px;color:#888;padding:20px 0;height:40px;line-height:40px}.page-edit-vue .wiki-content{font-size:14px}.page-edit-vue .wiki-content.w-e-text{overflow-y:auto}.page-edit-vue .upload-page-file .el-upload-list{display:none}.page-edit-vue .is-link{color:#1e88e5;cursor:pointer}.page-edit-vue #newPageContentDiv .w-e-text-container{height:600px!important}.page-edit-vue .comment-box .head{float:left;background-color:#ccc;border-radius:50%;margin-right:10px;width:45px;height:45px;line-height:45px;text-align:center;color:#fff}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.my-info-vue .box-card{margin:10px}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.page-search-vue .empty-news{text-align:center;padding:100px}.page-search-vue .text-link{color:#444}.page-search-vue .line-box{color:#666;border-bottom:1px solid #eee;padding:20px 0}.page-search-vue .line-title{font-size:14px}.page-search-vue .page-preview-title{font-size:18px;margin:10px 0 5px 0;color:#3a8ee6;cursor:pointer}.page-search-vue .page-preview-content{font-size:16px;margin-bottom:5px}.page-search-vue .zan-img{vertical-align:middle;margin-top:-3px}.page-search-vue .view-img{font-size:16px;color:#666}.page-search-vue .page-info-box{text-align:right;margin:20px 0 50px 0}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.home-vue .empty-news{text-align:center;padding:100px}.home-vue .text-link{color:#444}.home-vue .line-box{color:#666;border-bottom:1px solid #eee;padding:20px 0}.home-vue .line-title{font-size:14px}.home-vue .page-preview-title{cursor:pointer;font-size:20px;margin:10px 0 5px 0;color:#3a8ee6}.home-vue .page-preview-content{font-size:16px;margin-bottom:5px}.home-vue .zan-img{vertical-align:middle;margin-top:-3px}.home-vue .view-img{font-size:16px;color:#666}.home-vue .page-info-box{text-align:right;margin:20px 0 50px 0}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.page-show-vue .icon-collapse{float:left;font-size:25px;color:#aaa;margin-top:8px;cursor:pointer}.page-show-vue .icon-collapse:hover{color:#eee}.page-show-vue .wiki-title{font-size:20px}.page-show-vue .wiki-author{font-size:14px;color:#888;padding:20px 0;height:40px;line-height:40px}.page-show-vue .wiki-content{font-size:14px}.page-show-vue .wiki-content.w-e-text{overflow-y:auto}.page-show-vue .wiki-content.w-e-text img{cursor:auto}.page-show-vue .wiki-content.w-e-text img:hover{-webkit-box-shadow:unset;box-shadow:unset}.page-show-vue .upload-page-file .el-upload-list{display:none}.page-show-vue .is-link{color:#1e88e5;cursor:pointer}.page-show-vue #newPageContentDiv .w-e-text-container{height:600px!important}.page-show-vue .comment-box .head{float:left;background-color:#ccc;border-radius:50%;margin-right:10px;width:45px;height:45px;line-height:45px;text-align:center;color:#fff}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
|||||||
!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var a,i,f,l=0,s=[];l<t.length;l++)i=t[l],o[i]&&s.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(t,c,u);s.length;)s.shift()();if(u)for(l=0;l<u.length;l++)f=r(r.s=u[l]);return f};var t={},o={2:0};r.e=function(e){function n(){u.onerror=u.onload=null,clearTimeout(a);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=new Promise(function(r,n){o[e]=[r,n]});o[e][2]=t;var c=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,r.nc&&u.setAttribute("nonce",r.nc),u.src=r.p+""+e+".js?"+{0:"2b8a785d47f4d7159c21",1:"f60aacff1fb160c86619"}[e];var a=setTimeout(n,12e4);return u.onerror=u.onload=n,c.appendChild(u),t},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r.oe=function(e){throw console.error(e),e}}([]);
|
|
||||||
//# sourceMappingURL=doc-wiki-manifest.js.map?e6fed62ad62f5aa67b0c
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,14 +1 @@
|
|||||||
<!DOCTYPE HTML>
|
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon-wiki.png><title>WIKI文档管理系统</title><link href=css/chunk-0741282a.1750663f.css rel=prefetch><link href=css/chunk-2e5083a6.33baba58.css rel=prefetch><link href=css/chunk-32cc5643.5a5b2ca1.css rel=prefetch><link href=css/chunk-34407190.57bbfb51.css rel=prefetch><link href=css/chunk-578eb6fe.83c6d32d.css rel=prefetch><link href=css/chunk-5a43323e.aed19865.css rel=prefetch><link href=css/chunk-9ece0f4a.b3d0f39b.css rel=prefetch><link href=js/chunk-0741282a.586dcd09.js rel=prefetch><link href=js/chunk-2d0d3313.a5ecb2ff.js rel=prefetch><link href=js/chunk-2d207ece.d3a941b6.js rel=prefetch><link href=js/chunk-2e5083a6.378a5f06.js rel=prefetch><link href=js/chunk-32cc5643.85244eab.js rel=prefetch><link href=js/chunk-34407190.43641165.js rel=prefetch><link href=js/chunk-578eb6fe.66e91fc4.js rel=prefetch><link href=js/chunk-5a43323e.bad98fe3.js rel=prefetch><link href=js/chunk-9ece0f4a.06a0a43b.js rel=prefetch><link href=css/app.3ba808b5.css rel=preload as=style><link href=css/chunk-vendors.43fc3011.css rel=preload as=style><link href=js/app.dcdcaf6c.js rel=preload as=script><link href=js/chunk-vendors.151c7031.js rel=preload as=script><link href=css/chunk-vendors.43fc3011.css rel=stylesheet><link href=css/app.3ba808b5.css rel=stylesheet></head><body><noscript><strong>We're sorry but zyplayer-wiki-ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.151c7031.js></script><script src=js/app.dcdcaf6c.js></script></body></html>
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
|
||||||
<title>wiki文档管理系统</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
|
||||||
<script type="text/javascript" src="doc-wiki-manifest.js?e6fed62ad62f5aa67b0c"></script><script type="text/javascript" src="doc-wiki-vendor.js?2b8a785d47f4d7159c21"></script><script type="text/javascript" src="doc-wiki-index.js?f60aacff1fb160c86619"></script></body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
||||||
BIN
zyplayer-doc-wiki/src/main/resources/favicon-wiki.png
Normal file
BIN
zyplayer-doc-wiki/src/main/resources/favicon-wiki.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
Binary file not shown.
1
zyplayer-doc-wiki/src/main/resources/js/app.dcdcaf6c.js
Normal file
1
zyplayer-doc-wiki/src/main/resources/js/app.dcdcaf6c.js
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0741282a"],{"40c0":function(e,t,n){},9231:function(e,t,n){"use strict";var r=n("40c0"),a=n.n(r);a.a},ac2a:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{"padding-top":"50px"}},[n("el-form",{ref:"loginParam",staticClass:"demo-ruleForm login-container",attrs:{model:e.loginParam,rules:e.loginRules,"label-position":"left","label-width":"0px"}},[n("h3",{staticClass:"title"},[e._v("系统登录")]),n("el-form-item",{attrs:{prop:"username"}},[n("el-input",{attrs:{type:"text","auto-complete":"off",placeholder:"账号"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginSubmit(t)}},model:{value:e.loginParam.username,callback:function(t){e.$set(e.loginParam,"username",t)},expression:"loginParam.username"}})],1),n("el-form-item",{attrs:{prop:"password"}},[n("el-input",{attrs:{type:"password","auto-complete":"off",placeholder:"密码"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginSubmit(t)}},model:{value:e.loginParam.password,callback:function(t){e.$set(e.loginParam,"password",t)},expression:"loginParam.password"}})],1),n("el-form-item",{staticStyle:{width:"100%"}},[n("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary",loading:e.logining},nativeOn:{click:function(t){return t.preventDefault(),e.loginSubmit(t)}}},[e._v("登录")])],1)],1)],1)},a=[],i=n("9f03"),o={data:function(){return{logining:!1,redirect:"",loginParam:{username:"",password:""},loginRules:{username:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]},checked:!0}},mounted:function(){this.redirect=this.$route.query.redirect},methods:{loginSubmit:function(){var e=this;this.$refs.loginParam.validate((function(t){t&&i["a"].userLogin(e.loginParam).then((function(){e.redirect?location.href=decodeURIComponent(e.redirect):e.$router.back()}))}))}}},l=o,s=(n("9231"),n("2877")),u=Object(s["a"])(l,r,a,!1,null,null,null);t["default"]=u.exports}}]);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d3313"],{"5c5d":function(e,n,t){"use strict";t.r(n);var u=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"page-open-view-vue"})},o=[],c={data:function(){return{}},beforeRouteUpdate:function(e,n,t){},mounted:function(){},methods:{}},a=c,i=t("2877"),s=Object(i["a"])(a,u,o,!1,null,null,null);n["default"]=s.exports}}]);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d207ece"],{a339:function(n,e,t){"use strict";t.r(e);var u=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[n._v("没有权限访问该模块")])},c=[],o={data:function(){return{}},mounted:function(){},methods:{}},a=o,r=t("2877"),i=Object(r["a"])(a,u,c,!1,null,null,null);e["default"]=i.exports}}]);
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32cc5643"],{"408e":function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"my-info-vue"},[s("div",{staticStyle:{margin:"0 auto","max-width":"1000px"}},[s("el-card",{staticClass:"box-card"},[s("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e._v("我的信息")]),s("el-form",{staticClass:"search-form-box",attrs:{"label-width":"100px"}},[s("el-form-item",{attrs:{label:"账号:"}},[e._v(e._s(e.userInfo.userNo))]),s("el-form-item",{attrs:{label:"用户名:"}},[e._v(e._s(e.userInfo.userName))]),s("el-form-item",{attrs:{label:"手机号:"}},[e._v(e._s(e.userInfo.phone))]),s("el-form-item",{attrs:{label:"邮箱:"}},[e._v(e._s(e.userInfo.email))]),s("el-form-item",{attrs:{label:"状态:"}},[e._v(e._s(0==e.userInfo.delFlag?"正常":"停用"))]),s("el-form-item",{attrs:{label:"性别:"}},[e._v(e._s(0==e.userInfo.sex?"女":"男"))])],1)],1)],1)])},r=[],n=s("9f03"),l={data:function(){return{userInfo:{}}},mounted:function(){this.getUserInfo()},methods:{getUserInfo:function(){var e=this;n["a"].getSelfUserInfo().then((function(t){e.userInfo=t.data}))}}},o=l,f=(s("dcfc"),s("2877")),i=Object(f["a"])(o,a,r,!1,null,null,null);t["default"]=i.exports},dcfc:function(e,t,s){"use strict";var a=s("ed55"),r=s.n(a);r.a},ed55:function(e,t,s){}}]);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-34407190"],{"5d0c":function(e,a,t){"use strict";var s=t("8b6f"),n=t.n(s);n.a},"6c9a":function(e,a){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAqFBMVEX///9wcHBwcHBwcHBwcHB8fHxwcHB6enpwcHCDg4NwcHB8fHx6enqSkpJ8fHxycnJwcHDp6el2dnZwcHD////39/f19fXz8/Pw8PDr6+vn5+fj4+PZ2dnX19fHx8fExMS9vb20tLSrq6uhoaGenp6MjIyKioqDg4N8fHx6enp4eHh0dHRycnKZmZmOjo6KioqDg4OAgIB/f396enp4eHh2dnZycnJwcHDyRjyJAAAALXRSTlMAETNEVWZmd3eIiJmqu7u7u93d3e7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u6OCyV0AAAAi0lEQVQYGXXBRwKCMBAF0B9Q7Io6RJGo2LAEu8zc/2YuyCILfQ/4R8k5gK+zy0v4TilZeAZb2rTCSMHp3bV+jeJpDEDFIvagSRtNJAro2vHjSo4owOYzNlTTAoDnGZNjLABOFkzOagigWiecUW3fBNB/L5+33GgiSksFQE1YPkUlciwuETxhox3ghy8Wng9K1E9YIwAAAABJRU5ErkJggg=="},"8b6f":function(e,a,t){},f890:function(e,a,t){"use strict";t.r(a);var s=function(){var e=this,a=e.$createElement,s=e._self._c||a;return s("div",{staticClass:"page-search-vue",staticStyle:{background:"#f1f1f1","min-height":"100%"}},[s("div",{staticStyle:{"max-width":"1200px",margin:"0 auto",background:"#fff",padding:"20px","min-height":"100%","box-sizing":"border-box"}},[s("div",{staticStyle:{"margin-bottom":"20px"}},[s("el-row",{staticStyle:{"max-width":"700px",margin:"0 auto"},attrs:{gutter:20}},[s("el-col",{attrs:{span:20}},[s("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:""},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.getSpacePageNews(a)}},model:{value:e.searchParam.keywords,callback:function(a){e.$set(e.searchParam,"keywords",a)},expression:"searchParam.keywords"}})],1),s("el-col",{attrs:{span:4}},[s("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.getSpacePageNews}},[e._v("搜索一下")])],1)],1)],1),e.spacePageNews.length<=0?s("div",{staticClass:"empty-news"},[e._v("暂无数据")]):e._l(e.spacePageNews,(function(a){return s("div",{staticClass:"line-box"},[s("div",{staticClass:"line-title"},[s("span",{staticClass:"text-link"},[e._v(e._s(a.createUserName))]),e._v(" 发布于 "),s("span",{staticClass:"text-link"},[e._v(e._s(a.spaceName))])]),s("div",{staticClass:"page-preview-box"},[s("div",{staticClass:"page-preview-title",domProps:{innerHTML:e._s(a.pageTitle)},on:{click:function(t){return e.showPageDetail(a)}}}),s("div",{staticClass:"page-preview-content",domProps:{innerHTML:e._s(a.previewContent)}}),s("div",[s("span",[s("img",{staticClass:"zan-img",attrs:{src:t("6c9a")}}),e._v(" "+e._s(a.zanNum)+" ")]),s("span",[s("i",{staticClass:"el-icon-view view-img"}),e._v(" "+e._s(a.viewNum)+" ")]),s("span",[e._v(e._s(a.updateTime||a.createTime))])])])])})),s("div",{staticClass:"page-info-box"},[s("el-pagination",{attrs:{"page-sizes":[20,50,100],"page-size":20,"current-page":e.searchParam.pageNum,layout:"prev, pager, next, jumper, sizes, total",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],2)])},n=[],i=t("0a79"),c={data:function(){return{totalCount:0,searchParam:{spaceId:"",keywords:"",newsType:1,pageNum:1,pageSize:20},spacePageNews:[]}},beforeRouteUpdate:function(e,a,t){this.initQueryParam(e),t()},mounted:function(){this.initQueryParam(this.$route)},methods:{getSpacePageNews:function(){var e=this;i["a"].pageSearchByEs(this.searchParam).then((function(a){e.spacePageNews=a.data||[],e.totalCount=a.total}))},handleSizeChange:function(e){this.searchParam.pageSize=e,this.getSpacePageNews()},showPageDetail:function(e){window.open("#/page/show?spaceId="+e.spaceId+"&pageId="+e.pageId)},handleCurrentChange:function(e){this.searchParam.pageNum=e,this.getSpacePageNews()},initQueryParam:function(e){this.searchParam={keywords:e.query.keywords,spaceId:e.query.spaceId,newsType:1,pageNum:1,pageSize:20},this.getSpacePageNews()}}},r=c,o=(t("5d0c"),t("2877")),u=Object(o["a"])(r,s,n,!1,null,null,null);a["default"]=u.exports}}]);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-578eb6fe"],{"159b":function(e,a,t){var s=t("da84"),n=t("fdbc"),i=t("17c2"),r=t("9112");for(var c in n){var o=s[c],p=o&&o.prototype;if(p&&p.forEach!==i)try{r(p,"forEach",i)}catch(u){p.forEach=i}}},"17c2":function(e,a,t){"use strict";var s=t("b727").forEach,n=t("b301");e.exports=n("forEach")?function(e){return s(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},2629:function(e,a,t){"use strict";var s=t("d7846"),n=t.n(s);n.a},4160:function(e,a,t){"use strict";var s=t("23e7"),n=t("17c2");s({target:"Array",proto:!0,forced:[].forEach!=n},{forEach:n})},"6c9a":function(e,a){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAqFBMVEX///9wcHBwcHBwcHBwcHB8fHxwcHB6enpwcHCDg4NwcHB8fHx6enqSkpJ8fHxycnJwcHDp6el2dnZwcHD////39/f19fXz8/Pw8PDr6+vn5+fj4+PZ2dnX19fHx8fExMS9vb20tLSrq6uhoaGenp6MjIyKioqDg4N8fHx6enp4eHh0dHRycnKZmZmOjo6KioqDg4OAgIB/f396enp4eHh2dnZycnJwcHDyRjyJAAAALXRSTlMAETNEVWZmd3eIiJmqu7u7u93d3e7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u6OCyV0AAAAi0lEQVQYGXXBRwKCMBAF0B9Q7Io6RJGo2LAEu8zc/2YuyCILfQ/4R8k5gK+zy0v4TilZeAZb2rTCSMHp3bV+jeJpDEDFIvagSRtNJAro2vHjSo4owOYzNlTTAoDnGZNjLABOFkzOagigWiecUW3fBNB/L5+33GgiSksFQE1YPkUlciwuETxhox3ghy8Wng9K1E9YIwAAAABJRU5ErkJggg=="},b3d7:function(e,a,t){"use strict";t.r(a);var s=function(){var e=this,a=e.$createElement,s=e._self._c||a;return s("div",{staticClass:"home-vue",staticStyle:{padding:"10px"}},[s("div",{staticStyle:{"max-width":"800px",margin:"0 auto"}},[s("el-select",{staticStyle:{float:"right","z-index":"1"},attrs:{placeholder:"请选择查看方式"},on:{change:e.getSpacePageNews},model:{value:e.searchParam.newsType,callback:function(a){e.$set(e.searchParam,"newsType",a)},expression:"searchParam.newsType"}},e._l(e.newsTypesArr,(function(e){return s("el-option",{key:e.key,attrs:{label:e.val,value:e.key}})})),1),s("el-tabs",{attrs:{value:"first"}},[s("el-tab-pane",{attrs:{label:e.newsTypesMap[e.searchParam.newsType],name:"first"}},[e.spacePageNews.length<=0?s("div",{staticClass:"empty-news"},[e._v("暂无数据")]):e._l(e.spacePageNews,(function(a){return s("div",{staticClass:"line-box"},[s("div",{staticClass:"line-title"},[s("span",{staticClass:"text-link"},[e._v(e._s(a.createUserName))]),e._v(" 发布于 "),s("span",{staticClass:"text-link"},[e._v(e._s(a.spaceName))])]),s("div",{staticClass:"page-preview-box"},[s("div",{staticClass:"page-preview-title",domProps:{innerHTML:e._s(a.pageTitle)},on:{click:function(t){return e.showPageDetail(a)}}}),s("div",{staticClass:"page-preview-content",domProps:{innerHTML:e._s(a.previewContent)}}),s("div",[s("span",[s("img",{staticClass:"zan-img",attrs:{src:t("6c9a")}}),e._v(" "+e._s(a.zanNum)+" ")]),s("span",[s("i",{staticClass:"el-icon-view view-img"}),e._v(" "+e._s(a.viewNum)+" ")]),s("span",[e._v(e._s(a.updateTime||a.createTime))])])])])}))],2)],1),s("div",{staticClass:"page-info-box"},[s("el-pagination",{attrs:{"page-sizes":[20,50,100],"page-size":20,"current-page":e.searchParam.pageNum,layout:"prev, pager, next, jumper, sizes, total",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)])},n=[],i=(t("4160"),t("159b"),t("0a79")),r={data:function(){return{totalCount:0,searchParam:{spaceId:"",newsType:1,pageNum:1,pageSize:20},spacePageNews:[],newsTypesArr:[{key:1,val:"最近更新"},{key:2,val:"最新创建"},{key:3,val:"查看最多"},{key:4,val:"点赞最多"},{key:5,val:"查看+点赞最多"}],newsTypesMap:{}}},beforeRouteUpdate:function(e,a,t){this.initQueryParam(e),t()},mounted:function(){this.initQueryParam(this.$route)},methods:{getSpacePageNews:function(){var e=this;i["a"].pageNews(this.searchParam).then((function(a){e.spacePageNews=a.data||[],e.totalCount=a.total}))},handleSizeChange:function(e){this.searchParam.pageSize=e,this.getSpacePageNews()},showPageDetail:function(e){this.nowClickPath={spaceId:e.spaceId,pageId:e.pageId},this.$router.push({path:"/page/show",query:this.nowClickPath})},handleCurrentChange:function(e){this.searchParam.pageNum=e,this.getSpacePageNews()},initQueryParam:function(e){var a=this;this.searchParam={spaceId:e.query.spaceId,newsType:1,pageNum:1,pageSize:20},this.searchParam.spaceId&&this.getSpacePageNews(),this.newsTypesMap={},this.newsTypesArr.forEach((function(e){return a.newsTypesMap[e.key]=e.val}))}}},c=r,o=(t("2629"),t("2877")),p=Object(o["a"])(c,s,n,!1,null,null,null);a["default"]=p.exports},d7846:function(e,a,t){}}]);
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user