#I5MD1F 增加导出为word文档支持
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
ENV = 'development'
|
||||
|
||||
# base api
|
||||
# VUE_APP_BASE_API = 'http://local.zyplayer.com:8083/zyplayer-doc-manage'
|
||||
VUE_APP_BASE_API = 'http://doc.zyplayer.com'
|
||||
VUE_APP_BASE_API = 'http://local.zyplayer.com:8083/zyplayer-doc-manage'
|
||||
# VUE_APP_BASE_API = 'http://doc.zyplayer.com'
|
||||
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
|
||||
@@ -1,22 +1,37 @@
|
||||
import GlobalLayout from './components/layouts/GlobalLayout'
|
||||
import ShareLayout from './components/layouts/ShareLayout'
|
||||
import ShareMobileLayout from './components/layouts/ShareMobileLayout'
|
||||
import GlobalLayout from './components/layouts/GlobalLayout.vue'
|
||||
import ShareLayout from './components/layouts/ShareLayout.vue'
|
||||
import ShareMobileLayout from './components/layouts/ShareMobileLayout.vue'
|
||||
|
||||
import Search from './views/page/Search.vue'
|
||||
import EditorTest from './views/page/EditorTest.vue'
|
||||
import NoAuth from './views/common/NoAuth.vue'
|
||||
|
||||
import Home from './views/home/Home.vue'
|
||||
import MyInfo from './views/user/MyInfo.vue'
|
||||
import Show from './views/page/Show.vue'
|
||||
import Edit from './views/page/Edit.vue'
|
||||
|
||||
import spaceManage from './views/space/Manage.vue'
|
||||
|
||||
import sharePcHome from './views/page/share/pc/Home.vue'
|
||||
import sharePcView from './views/page/share/pc/View.vue'
|
||||
import shareMobileView from './views/page/share/mobile/View.vue'
|
||||
|
||||
let routes = [
|
||||
{path: '/', redirect: '/home'},
|
||||
{path: '/page/search', name: 'WIKI-全局搜索', component: () => import('@/views/page/Search')},
|
||||
{path: '/common/noAuth', name: 'WIKI-没有权限', component: () => import('@/views/common/NoAuth')},
|
||||
{path: '/page/editorTest', name: '编辑内容', component: () => import('@/views/page/EditorTest')},
|
||||
{path: '/page/search', name: 'WIKI-全局搜索', component: Search},
|
||||
{path: '/common/noAuth', name: 'WIKI-没有权限', component: NoAuth},
|
||||
{path: '/page/editorTest', name: '编辑内容', component: EditorTest},
|
||||
{
|
||||
path: '/',
|
||||
name: '页面管理',
|
||||
component: GlobalLayout,
|
||||
children: [
|
||||
{path: '/home', name: 'WIKI文档管理', component: () => import('@/views/home/Home')},
|
||||
{path: '/user/myInfo', name: 'WIKI-我的信息', component: () => import('@/views/user/MyInfo')},
|
||||
{path: '/page/show', name: 'WIKI-内容展示', component: () => import('@/views/page/Show')},
|
||||
{path: '/page/edit', name: 'WIKI-编辑内容', component: () => import('@/views/page/Edit')},
|
||||
{path: '/space/manage', name: 'WIKI-空间管理', component: () => import('@/views/space/Manage')},
|
||||
{path: '/home', name: 'WIKI文档管理', component: Home},
|
||||
{path: '/user/myInfo', name: 'WIKI-我的信息', component: MyInfo},
|
||||
{path: '/page/show', name: 'WIKI-内容展示', component: Show},
|
||||
{path: '/page/edit', name: 'WIKI-编辑内容', component: Edit},
|
||||
{path: '/space/manage', name: 'WIKI-空间管理', component: spaceManage},
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -24,8 +39,8 @@ let routes = [
|
||||
name: '页面管理',
|
||||
component: ShareLayout,
|
||||
children: [
|
||||
{path: '/page/share/home', name: 'WIKI-开放文档', component: () => import('@/views/page/share/pc/Home')},
|
||||
{path: '/page/share/view', name: 'WIKI-内容展示', component: () => import('@/views/page/share/pc/View')},
|
||||
{path: '/page/share/home', name: 'WIKI-开放文档', component: sharePcHome},
|
||||
{path: '/page/share/view', name: 'WIKI-内容展示', component: sharePcView},
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -33,7 +48,7 @@ let routes = [
|
||||
name: '页面管理',
|
||||
component: ShareMobileLayout,
|
||||
children: [
|
||||
{path: '/page/share/mobile/view', name: 'WIKI-开放文档', component: () => import('@/views/page/share/mobile/View')},
|
||||
{path: '/page/share/mobile/view', name: 'WIKI-开放文档', component: shareMobileView},
|
||||
]
|
||||
},
|
||||
];
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
<el-row type="border-card" style="height: 100%;">
|
||||
<el-col :span="actionTabVisible?18:24" style="padding: 20px;border-right: 1px solid #f1f1f1;height: 100%;overflow: auto;">
|
||||
<el-row>
|
||||
<el-col :xs="0" :sm="4" :md="4" :lg="6" :xl="6" v-if="navigationList.length > 0">
|
||||
<Navigation ref="navigation" :heading="navigationList"></Navigation>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="navigationList.length > 0?20:24" :md="navigationList.length > 0?20:24" :lg="navigationList.length > 0?18:24" :xl="navigationList.length > 0?18:24">
|
||||
<div style="max-width: 1000px;margin: 0 auto;padding-left: 10px;">
|
||||
<div class="wiki-title" ref="wikiTitle">{{wikiPage.name}}</div>
|
||||
@@ -33,6 +30,7 @@
|
||||
<el-dropdown-item command="editAuth" v-if="wikiPageAuth.canConfigAuth==1" icon="el-icon-s-check">权限设置</el-dropdown-item>
|
||||
<el-dropdown-item command="showOpenPage" v-if="spaceInfo.openDoc == 1" icon="el-icon-share">查看开放文档</el-dropdown-item>
|
||||
<el-dropdown-item command="showMobileView" v-if="spaceInfo.openDoc == 1" icon="el-icon-mobile-phone">手机端查看</el-dropdown-item>
|
||||
<el-dropdown-item command="exportWord" v-if="spaceInfo.openDoc == 1" icon="el-icon-download">导出为Word文档</el-dropdown-item>
|
||||
<el-dropdown-item command="deletePage" v-if="wikiPageAuth.canDelete==1" icon="el-icon-delete">删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -84,6 +82,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="0" :sm="4" :md="4" :lg="6" :xl="6" v-if="navigationList.length > 0">
|
||||
<Navigation ref="navigation" :heading="navigationList"></Navigation>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="6" style="height: 100%;" v-show="actionTabVisible">
|
||||
@@ -187,6 +188,9 @@
|
||||
<div ref="imagePreview">
|
||||
<el-image-viewer v-if="showImagePreview" :url-list="showImagePreviewList" :on-close="closeImagePreview" :initial-index="previewInitialIndex"/>
|
||||
</div>
|
||||
<form method="post" ref="downloadForm" :action="downloadFormParam.url" target="_blank">
|
||||
<input type="hidden" :name="key" :value="val" v-for="(val,key) in downloadFormParam.param">
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -255,6 +259,11 @@ var page = {
|
||||
fullscreen: true,
|
||||
readmodel: true,
|
||||
},
|
||||
// 下载为Word
|
||||
downloadFormParam: {
|
||||
url: 'zyplayer-doc-wiki/page/download',
|
||||
param: {}
|
||||
},
|
||||
};
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
@@ -287,38 +296,52 @@ var page = {
|
||||
} else if (val == 'showPageHistory') {
|
||||
this.showPageHistory();
|
||||
} else if (val == 'showOpenPage') {
|
||||
if (this.spaceInfo.openDoc != 1) {
|
||||
this.$message.warning("该空间未开放,无法查看开放文档地址");
|
||||
} else {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/page/share/view',
|
||||
query: {pageId: this.wikiPage.id, space: this.spaceInfo.uuid}
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
}
|
||||
this.showOpenPage();
|
||||
} else if (val == 'showMobileView') {
|
||||
if (this.spaceInfo.openDoc != 1) {
|
||||
this.$message.warning("该空间未开放,无法查看开放文档地址");
|
||||
} else {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/page/share/mobile/view',
|
||||
query: {pageId: this.wikiPage.id, space: this.spaceInfo.uuid}
|
||||
this.showMobileView();
|
||||
} else if (val == 'exportWord') {
|
||||
this.exportWord();
|
||||
}
|
||||
},
|
||||
exportWord() {
|
||||
this.downloadFormParam.param = {
|
||||
pageId: this.wikiPage.id
|
||||
};
|
||||
setTimeout(() => this.$refs.downloadForm.submit(), 0);
|
||||
},
|
||||
showOpenPage() {
|
||||
if (this.spaceInfo.openDoc != 1) {
|
||||
this.$message.warning("该空间未开放,无法查看开放文档地址");
|
||||
} else {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/page/share/view',
|
||||
query: {pageId: this.wikiPage.id, space: this.spaceInfo.uuid}
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
}
|
||||
},
|
||||
showMobileView() {
|
||||
if (this.spaceInfo.openDoc != 1) {
|
||||
this.$message.warning("该空间未开放,无法查看开放文档地址");
|
||||
} else {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/page/share/mobile/view',
|
||||
query: {pageId: this.wikiPage.id, space: this.spaceInfo.uuid}
|
||||
});
|
||||
this.mobileScanDialogVisible = true;
|
||||
let hostPath = window.location.href.split("#")[0];
|
||||
setTimeout(() => {
|
||||
this.qrCodeUrl = hostPath + routeUrl.href;
|
||||
this.$refs.qrCodeDiv.innerHTML = "";
|
||||
new QRCode(this.$refs.qrCodeDiv, {
|
||||
text: this.qrCodeUrl,
|
||||
width: 250,
|
||||
height: 250,
|
||||
colorDark: "#333333", //二维码颜色
|
||||
colorLight: "#ffffff", //二维码背景色
|
||||
correctLevel: QRCode.CorrectLevel.M//容错率,L/M/H
|
||||
});
|
||||
this.mobileScanDialogVisible = true;
|
||||
let hostPath = window.location.href.split("#")[0];
|
||||
setTimeout(() => {
|
||||
this.qrCodeUrl = hostPath + routeUrl.href;
|
||||
this.$refs.qrCodeDiv.innerHTML = "";
|
||||
new QRCode(this.$refs.qrCodeDiv, {
|
||||
text: this.qrCodeUrl,
|
||||
width: 250,
|
||||
height: 250,
|
||||
colorDark: "#333333", //二维码颜色
|
||||
colorLight: "#ffffff", //二维码背景色
|
||||
correctLevel: QRCode.CorrectLevel.M//容错率,L/M/H
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
addPageAuthUser() {
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
position: fixed;
|
||||
z-index: 4;
|
||||
top: 150px;
|
||||
height: calc(100vh - 250px);
|
||||
max-height: calc(100vh - 250px);
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
padding-left: 16px;
|
||||
|
||||
Reference in New Issue
Block a user