Commit 425fd454 authored by 高飞's avatar 高飞
parents d93c697f 9f367568
...@@ -10,3 +10,10 @@ npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass ...@@ -10,3 +10,10 @@ npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
才能安装成功sass 才能安装成功sass
### 安装环境 ### 安装环境
node版本14版本 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"
...@@ -114,3 +114,13 @@ export const queryLiteratureById = name => { ...@@ -114,3 +114,13 @@ export const queryLiteratureById = name => {
export const previewPdf = (bucket, objectName) => { export const previewPdf = (bucket, objectName) => {
window.open(`api/rest/file/pdf/${bucket}?objectName=${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> <template>
<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 class="uploadWrapper"> <div class="uploadWrapper">
<div class="btnUpload"> <div class="btnUpload">
<div id="picker" class="form-control-focus">点击选择文件上传</div> <div id="picker" class="form-control-focus">点击选择文件上传</div>
...@@ -19,6 +27,7 @@ ...@@ -19,6 +27,7 @@
</div> </div>
<el-button class="startUpload" type="primary" @click="upload()">开始上传</el-button> <el-button class="startUpload" type="primary" @click="upload()">开始上传</el-button>
</div> </div>
</div>
</template> </template>
<script> <script>
import $ from "jquery"; import $ from "jquery";
...@@ -32,12 +41,25 @@ export default { ...@@ -32,12 +41,25 @@ export default {
}, },
checkFileExist: { checkFileExist: {
type: Function type: Function
},
treeDataBig: {
type: Array
},
flType:{
type:Number
} }
}, },
data() { data() {
return { return {
fileList: [], fileList: [],
headers: { 'x-requested-with': 'XMLHttpRequest' } headers: { 'x-requested-with': 'XMLHttpRequest' },
clientDetails_check_type: [],
treeData: [],
defaultProps: {
children: 'children',
label: 'label'
},
fl_type:0
}; };
}, },
mounted() { mounted() {
...@@ -139,8 +161,9 @@ export default { ...@@ -139,8 +161,9 @@ export default {
name: file.name, name: file.name,
size: file.size, size: file.size,
type: file.ext, type: file.ext,
uuid: file.uid + "." + file.ext, uuid: file.uid + "." + file.ext
} },
treeId: _self.clientDetails_check_type
}); });
} else { } else {
return Promise.resolve(res); return Promise.resolve(res);
...@@ -235,6 +258,13 @@ export default { ...@@ -235,6 +258,13 @@ export default {
}, },
methods: { methods: {
upload() { 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(); this.uploader.upload();
}, },
removeFile(item, index) { removeFile(item, index) {
...@@ -275,13 +305,38 @@ export default { ...@@ -275,13 +305,38 @@ export default {
} }
}).catch(err => reject(err)); }).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> </script>
<style lang="scss" scope> <style lang="scss" scope>
.uploadWrapper { .uploadWrapper {
height: 524px; min-height: 300px;
} }
#picker>div:nth-child(2) { #picker>div:nth-child(2) {
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<el-dropdown-menu slot="dropdown" class="hide-drop"> <el-dropdown-menu slot="dropdown" class="hide-drop">
<el-dropdown-item v-for="(item, index) in manager_module_backstage" v-text="item.name" <el-dropdown-item v-for="(item, index) in manager_module_backstage" v-text="item.name"
:command="item.name" :key="index"></el-dropdown-item> :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-item command="安全退出">安全退出</el-dropdown-item> <el-dropdown-item command="安全退出">安全退出</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
...@@ -81,7 +82,7 @@ import { endLoading, get, post, httpSSERequest, fetchEventSource, httpSSERequest ...@@ -81,7 +82,7 @@ import { endLoading, get, post, httpSSERequest, fetchEventSource, httpSSERequest
import { queryDictItem } from '../api/dictitem'; import { queryDictItem } from '../api/dictitem';
import Push from 'push.js' import Push from 'push.js'
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { SYSTEM_NAME } from "@/constant/user"; import { SYSTEM_NAME, MAIL_ADDRESS } from "@/constant/user";
export default { export default {
name: "home", name: "home",
data() { data() {
...@@ -168,6 +169,8 @@ export default { ...@@ -168,6 +169,8 @@ export default {
this.$router.push("xx"); this.$router.push("xx");
} else if (command == '修改密码') { } else if (command == '修改密码') {
this.dialogVisible = true; this.dialogVisible = true;
} else if (command == '邮箱') {
window.open(MAIL_ADDRESS);
} }
}, },
handleClose(key, keyPath) { }, handleClose(key, keyPath) { },
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
:disabled="scope.row.image == null || scope.row.image == '' ? true : false">删除图片</el-button> :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 size="mini" type="success" @click="top(scope.row)">{{ scope.row.stick == null ? '置顶' :
'取消置顶' }}</el-button> '取消置顶' }}</el-button>
<el-button size="mini" type="primary" @click="downloadLiterature(scope.row)">下载</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -151,7 +152,7 @@ ...@@ -151,7 +152,7 @@
import { get, fileUpload, startLoading, endLoading, download, delete_util, post } from '../../util/http_util'; import { get, fileUpload, startLoading, endLoading, download, delete_util, post } from '../../util/http_util';
import { import {
queryLiterature, uploadLiterature, removeLiterature, addPictureToLiterature, bulkStickLiterature, removeLiteratureByBatch, bulkChangeLiteratureFolder, queryLiterature, uploadLiterature, removeLiterature, addPictureToLiterature, bulkStickLiterature, removeLiteratureByBatch, bulkChangeLiteratureFolder,
updateLiteratureFolder, queryLiteratureFolder, previewPdf updateLiteratureFolder, queryLiteratureFolder, previewPdf,downloadFile
} from "../../api/xxxl/llxx" } from "../../api/xxxl/llxx"
export default { export default {
name: 'flfggl', name: 'flfggl',
...@@ -490,6 +491,10 @@ export default { ...@@ -490,6 +491,10 @@ export default {
this.$message.warning(err.message); this.$message.warning(err.message);
console.log(err); console.log(err);
}); });
},
//下载文件
downloadLiterature(row){
downloadFile('Literature',row.name);
} }
}, },
activated() { activated() {
......
This diff is collapsed.
This diff is collapsed.
...@@ -30,8 +30,8 @@ module.exports = { ...@@ -30,8 +30,8 @@ module.exports = {
favicon: path.join('static/img/favicon.ico') favicon: path.join('static/img/favicon.ico')
}), }),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
template: path.resolve(__dirname, './onlyoffice/dev.html'), // template: path.resolve(__dirname, './onlyoffice/dev.html'),
// template: path.resolve(__dirname, './onlyoffice/prod.html'), template: path.resolve(__dirname, './onlyoffice/prod.html'),
filename: 'onlyoffice.html', filename: 'onlyoffice.html',
inject: 'body', inject: 'body',
chunks: ['onlyoffice'], 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