Commit 425fd454 authored by 高飞's avatar 高飞
parents d93c697f 9f367568
......@@ -9,4 +9,11 @@ vuedraggable 拖拽
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
才能安装成功sass
### 安装环境
node版本14版本
\ No newline at end of file
node版本14版本
### 打包需要文件
webpack.config.js 改为template: path.resolve(__dirname, './onlyoffice/prod.html')
src/constant/user
export const MAIL_ADDRESS = "http://6.1.22.93:8000";
export const MAIL_MANAGER_ADDRESS = "http://6.1.22.93:8010";
export const MAIL_DOMAIN = "zyyt.com"
......@@ -113,4 +113,14 @@ export const queryLiteratureById = name => {
//文件文献预览
export const previewPdf = (bucket, objectName) => {
window.open(`api/rest/file/pdf/${bucket}?objectName=${objectName}`);
}
//文件文献下载
export const downloadFile = (bucket, objectName) => {
window.open(`api/rest/file/download/${bucket}/${objectName}`);
}
//文件文献下载
export const downloadDocument = (bucket, objectName,originFileName) => {
window.open(`api/rest/file/download/${bucket}/${objectName}?originFileName=`+originFileName);
}
\ No newline at end of file
<template>
<div class="uploadWrapper">
<div class="btnUpload">
<div id="picker" class="form-control-focus">点击选择文件上传</div>
<div>
<div style="margin-bottom:20px;display: grid;grid-template-columns: 80px auto;">
<span style="margin-top:20px;color: white;">选择目录:</span>
<el-tree class="myTree" :data="treeData" node-key="id" show-checkbox :expand-on-click-node="false" :default-expanded-keys="[fl_type]"
highlight-current :props="defaultProps" :check-strictly="true" ref="tree" @check-change="handleCheckChange"
:indent=1>
</el-tree>
</div>
<div id="thelist" class="uploader-list">
<ul>
<li v-for="(item, index) in fileList ">
<a @click="removeFile(item, index)"><span title="点击移除">{{ item.name }}</span></a>
<span
:class="[item.state == 1 ? 'el-icon-loading' : item.state == 2 ? 'el-icon-success' : item.state == 3 ? 'el-icon-warning' : '']">{{
item.description }}</span>
<a @click="retry(item, index)" v-if="item.state == 3"><span title="点击重试"
class="el-icon-refresh-right"></span></a>
<el-progress :text-inside="true" :stroke-width="14" :percentage="item.percentage"
status="success"></el-progress>
</li>
</ul>
<div class="uploadWrapper">
<div class="btnUpload">
<div id="picker" class="form-control-focus">点击选择文件上传</div>
</div>
<div id="thelist" class="uploader-list">
<ul>
<li v-for="(item, index) in fileList ">
<a @click="removeFile(item, index)"><span title="点击移除">{{ item.name }}</span></a>
<span
:class="[item.state == 1 ? 'el-icon-loading' : item.state == 2 ? 'el-icon-success' : item.state == 3 ? 'el-icon-warning' : '']">{{
item.description }}</span>
<a @click="retry(item, index)" v-if="item.state == 3"><span title="点击重试"
class="el-icon-refresh-right"></span></a>
<el-progress :text-inside="true" :stroke-width="14" :percentage="item.percentage"
status="success"></el-progress>
</li>
</ul>
</div>
<el-button class="startUpload" type="primary" @click="upload()">开始上传</el-button>
</div>
<el-button class="startUpload" type="primary" @click="upload()">开始上传</el-button>
</div>
</template>
<script>
......@@ -32,12 +41,25 @@ export default {
},
checkFileExist: {
type: Function
},
treeDataBig: {
type: Array
},
flType:{
type:Number
}
},
data() {
return {
fileList: [],
headers: { 'x-requested-with': 'XMLHttpRequest' }
headers: { 'x-requested-with': 'XMLHttpRequest' },
clientDetails_check_type: [],
treeData: [],
defaultProps: {
children: 'children',
label: 'label'
},
fl_type:0
};
},
mounted() {
......@@ -139,8 +161,9 @@ export default {
name: file.name,
size: file.size,
type: file.ext,
uuid: file.uid + "." + file.ext,
}
uuid: file.uid + "." + file.ext
},
treeId: _self.clientDetails_check_type
});
} else {
return Promise.resolve(res);
......@@ -235,6 +258,13 @@ export default {
},
methods: {
upload() {
if (this.clientDetails_check_type.length == 0 || this.clientDetails_check_type.includes(1) || this.clientDetails_check_type.includes(2) || this.clientDetails_check_type.includes(3) || this.clientDetails_check_type.includes(4)) {
this.$message({
type: "warning",
message: "请选择文档列表子节点",
});
return;
}
this.uploader.upload();
},
removeFile(item, index) {
......@@ -275,13 +305,38 @@ export default {
}
}).catch(err => reject(err));
})
},
handleCheckChange(node, isSelected) {
if (isSelected) {
this.clientDetails_check_type.push(node.id);
} else {
this.clientDetails_check_type = this.clientDetails_check_type.filter(item => {
return item != node.id
})
}
console.log(this.clientDetails_check_type);
}
},
watch: {
treeDataBig: {
handler(newVal, oldVal) {
this.treeData = newVal;
this.clientDetails_check_type = [];
},
immediate: true
},
flType:{
handler(newVal, oldVal) {
this.fl_type = newVal;
},
immediate: true
}
}
};
</script>
<style lang="scss" scope>
.uploadWrapper {
height: 524px;
min-height: 300px;
}
#picker>div:nth-child(2) {
......
......@@ -36,6 +36,7 @@
<el-dropdown-menu slot="dropdown" class="hide-drop">
<el-dropdown-item v-for="(item, index) in manager_module_backstage" v-text="item.name"
:command="item.name" :key="index"></el-dropdown-item>
<el-dropdown-item command="邮箱">邮箱</el-dropdown-item>
<el-dropdown-item command="修改密码">修改密码</el-dropdown-item>
<el-dropdown-item command="安全退出">安全退出</el-dropdown-item>
</el-dropdown-menu>
......@@ -81,7 +82,7 @@ import { endLoading, get, post, httpSSERequest, fetchEventSource, httpSSERequest
import { queryDictItem } from '../api/dictitem';
import Push from 'push.js'
import dayjs from 'dayjs';
import { SYSTEM_NAME } from "@/constant/user";
import { SYSTEM_NAME, MAIL_ADDRESS } from "@/constant/user";
export default {
name: "home",
data() {
......@@ -168,6 +169,8 @@ export default {
this.$router.push("xx");
} else if (command == '修改密码') {
this.dialogVisible = true;
} else if (command == '邮箱') {
window.open(MAIL_ADDRESS);
}
},
handleClose(key, keyPath) { },
......
......@@ -49,6 +49,7 @@
:disabled="scope.row.image == null || scope.row.image == '' ? true : false">删除图片</el-button>
<el-button size="mini" type="success" @click="top(scope.row)">{{ scope.row.stick == null ? '置顶' :
'取消置顶' }}</el-button>
<el-button size="mini" type="primary" @click="downloadLiterature(scope.row)">下载</el-button>
</template>
</el-table-column>
</el-table>
......@@ -151,7 +152,7 @@
import { get, fileUpload, startLoading, endLoading, download, delete_util, post } from '../../util/http_util';
import {
queryLiterature, uploadLiterature, removeLiterature, addPictureToLiterature, bulkStickLiterature, removeLiteratureByBatch, bulkChangeLiteratureFolder,
updateLiteratureFolder, queryLiteratureFolder, previewPdf
updateLiteratureFolder, queryLiteratureFolder, previewPdf,downloadFile
} from "../../api/xxxl/llxx"
export default {
name: 'flfggl',
......@@ -490,6 +491,10 @@ export default {
this.$message.warning(err.message);
console.log(err);
});
},
//下载文件
downloadLiterature(row){
downloadFile('Literature',row.name);
}
},
activated() {
......
This diff is collapsed.
This diff is collapsed.
......@@ -30,8 +30,8 @@ module.exports = {
favicon: path.join('static/img/favicon.ico')
}),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, './onlyoffice/dev.html'),
// template: path.resolve(__dirname, './onlyoffice/prod.html'),
// template: path.resolve(__dirname, './onlyoffice/dev.html'),
template: path.resolve(__dirname, './onlyoffice/prod.html'),
filename: 'onlyoffice.html',
inject: 'body',
chunks: ['onlyoffice'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment