Commit 9f367568 authored by 夏敏伟's avatar 夏敏伟

增加外部邮箱链接 增加弹框内树状结构目录树

parent e87cd2b3
<template> <template>
<div class="uploadWrapper"> <div>
<div class="btnUpload"> <div style="margin-bottom:20px;display: grid;grid-template-columns: 80px auto;">
<div id="picker" class="form-control-focus">点击选择文件上传</div> <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>
<div id="thelist" class="uploader-list"> <div class="uploadWrapper">
<ul> <div class="btnUpload">
<li v-for="(item, index) in fileList "> <div id="picker" class="form-control-focus">点击选择文件上传</div>
<a @click="removeFile(item, index)"><span title="点击移除">{{ item.name }}</span></a> </div>
<span <div id="thelist" class="uploader-list">
:class="[item.state == 1 ? 'el-icon-loading' : item.state == 2 ? 'el-icon-success' : item.state == 3 ? 'el-icon-warning' : '']">{{ <ul>
item.description }}</span> <li v-for="(item, index) in fileList ">
<a @click="retry(item, index)" v-if="item.state == 3"><span title="点击重试" <a @click="removeFile(item, index)"><span title="点击移除">{{ item.name }}</span></a>
class="el-icon-refresh-right"></span></a> <span
<el-progress :text-inside="true" :stroke-width="14" :percentage="item.percentage" :class="[item.state == 1 ? 'el-icon-loading' : item.state == 2 ? 'el-icon-success' : item.state == 3 ? 'el-icon-warning' : '']">{{
status="success"></el-progress> item.description }}</span>
</li> <a @click="retry(item, index)" v-if="item.state == 3"><span title="点击重试"
</ul> 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> </div>
<el-button class="startUpload" type="primary" @click="upload()">开始上传</el-button>
</div> </div>
</template> </template>
<script> <script>
...@@ -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) { },
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<div class="left-div"> <div class="left-div">
<el-input class="public-input" placeholder="输入关键字进行过滤" suffix-icon="el-icon-search" <el-input class="public-input" placeholder="输入关键字进行过滤" suffix-icon="el-icon-search"
v-model="filterText"></el-input> v-model="filterText"></el-input>
<el-tree class="myTree" :data="tree_data" node-key="id" show-checkbox :expand-on-click-node="false" <el-tree class="myTree" :data="tree_data" node-key="id" :expand-on-click-node="false"
:filter-node-method="filterNode" highlight-current :default-expanded-keys="[this.fl_type]" :props="defaultProps" :filter-node-method="filterNode" highlight-current :default-expanded-keys="[this.fl_type]" :props="defaultProps"
:check-strictly="true" ref="tree" :current-node-key="this.fl_type" @node-click="handleNodeClick" ref="tree" :current-node-key="this.fl_type" @node-click="handleNodeClick"
@check-change="handleCheckChange" :indent=1> :indent=1>
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span class="first-span" :title="node.label">{{ node.label }}</span> <span class="first-span" :title="node.label">{{ node.label }}</span>
<span class="list-span"> <span class="list-span">
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</el-tree> </el-tree>
</div> </div>
<div class="right-div"> <div class="right-div">
<component :is="currentRole" :clientDetails="clientDetails_s" ref="mychild" /> <component :is="currentRole" :clientDetails="clientDetails_s" :treeData="tree_data" ref="mychild" />
</div> </div>
<el-dialog title="新增文件夹" :visible.sync="dialogVisible"> <el-dialog title="新增文件夹" :visible.sync="dialogVisible">
<span class="dialogContent"><span><span style="color:red">*</span>名称:</span> <span class="dialogContent"><span><span style="color:red">*</span>名称:</span>
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
components: { navs }, components: { navs },
data() { data() {
return { return {
clientDetails_s: { type: [this.fl_type], module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type, checkList: [] }, clientDetails_s: { type: [this.fl_type], module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type},
currentRole: "navs", currentRole: "navs",
tree_data: [], //左侧树结构的数据 tree_data: [], //左侧树结构的数据
dialogVisible: false, //新增子节点弹出框 dialogVisible: false, //新增子节点弹出框
...@@ -83,7 +83,6 @@ export default { ...@@ -83,7 +83,6 @@ export default {
module_name: '', module_name: '',
fl_type: '', fl_type: '',
type_folder: '', type_folder: '',
checkboxList: [],
nodeClickList: [] nodeClickList: []
}; };
}, },
...@@ -222,7 +221,7 @@ export default { ...@@ -222,7 +221,7 @@ export default {
if (res.length > 0) { if (res.length > 0) {
arr.push(res[0].id) arr.push(res[0].id)
} }
this.clientDetails_s = { type: arr, module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type, checkList: this.checkboxList }; this.clientDetails_s = { type: arr, module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type};
}) })
.catch((err) => { .catch((err) => {
this.$message.warning(err.message); this.$message.warning(err.message);
...@@ -239,19 +238,7 @@ export default { ...@@ -239,19 +238,7 @@ export default {
if (data.childNodes.length > 0) { if (data.childNodes.length > 0) {
this.nodeClickList.push(data.childNodes[0].data.id) this.nodeClickList.push(data.childNodes[0].data.id)
} }
this.clientDetails_s = { type: this.nodeClickList, module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type, checkList: this.checkboxList }; this.clientDetails_s = { type: this.nodeClickList, module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type};
},
handleCheckChange(node, isSelected) {
this.currentRole = "navs";
if (isSelected) {
this.checkboxList.push(node.id);
} else {
this.checkboxList = this.checkboxList.filter(item => {
return item != node.id
})
}
// this.clientDetails_s['checkList'] = this.checkboxList;
this.clientDetails_s = { type: this.nodeClickList, module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type, checkList: this.checkboxList };
} }
}, },
watch: { watch: {
...@@ -262,7 +249,6 @@ export default { ...@@ -262,7 +249,6 @@ export default {
this.module_name = val.module_name; this.module_name = val.module_name;
this.fl_type = val.fl_type; this.fl_type = val.fl_type;
this.type_folder = val.type_folder; this.type_folder = val.type_folder;
this.checkboxList = [];
this.query_tree(); this.query_tree();
}, },
}, },
......
...@@ -198,7 +198,8 @@ ...@@ -198,7 +198,8 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog title="新增文档" :visible.sync="centerDialogVisible_add" width="30%" center class="xzwd"> <el-dialog v-if="centerDialogVisible_add" title="新增文档" :visible.sync="centerDialogVisible_add" width="30%"
center class="xzwd">
<el-form :model="form_add" label-width="80px" style="margin-bottom: 0px" ref="forms" :rules="rules"> <el-form :model="form_add" label-width="80px" style="margin-bottom: 0px" ref="forms" :rules="rules">
<el-form-item label="文档名称" prop="name"> <el-form-item label="文档名称" prop="name">
<el-input v-model="form_add.name" maxlength="20" show-word-limit placeholder="请输入文档名称"></el-input> <el-input v-model="form_add.name" maxlength="20" show-word-limit placeholder="请输入文档名称"></el-input>
...@@ -232,6 +233,12 @@ ...@@ -232,6 +233,12 @@
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="选择目录">
<el-tree class="myTree" :data="tree_data" node-key="id" show-checkbox :expand-on-click-node="false"
highlight-current :props="defaultProps" :check-strictly="true" ref="tree"
:default-expanded-keys="[this.fl_type]" @check-change="handleCheckChange" :indent=1>
</el-tree>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible_add = false">取 消</el-button> <el-button @click="centerDialogVisible_add = false">取 消</el-button>
...@@ -270,9 +277,10 @@ ...@@ -270,9 +277,10 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="大文件上传" :visible.sync="centerDialogVisible_bigFile" width="30%" center class="xzwd"> <el-dialog v-if="centerDialogVisible_bigFile" title="大文件上传" :visible.sync="centerDialogVisible_bigFile"
<BigfileUpload :checkFileExist="checkFileExist" :addFileInfo="addFileInfo" width="30%" center class="xzwd">
@Finished="bigFileUploadFinished"> <BigfileUpload :checkFileExist="checkFileExist" :addFileInfo="addFileInfo" :treeDataBig="tree_data"
:flType="fl_type" @Finished="bigFileUploadFinished">
</BigfileUpload> </BigfileUpload>
</el-dialog> </el-dialog>
...@@ -380,6 +388,11 @@ export default { ...@@ -380,6 +388,11 @@ export default {
fileList: [ fileList: [
{ required: true, message: '请选择文件', trigger: 'change' } { required: true, message: '请选择文件', trigger: 'change' }
] ]
},
tree_data: [],
defaultProps: {
children: 'children',
label: 'label'
} }
}; };
}, },
...@@ -392,6 +405,10 @@ export default { ...@@ -392,6 +405,10 @@ export default {
type: Object, type: Object,
default: {}, default: {},
}, },
treeData: {
type: Array,
default: []
}
}, },
methods: { methods: {
//列表动画效果结束让全文动画开始 //列表动画效果结束让全文动画开始
...@@ -602,7 +619,6 @@ export default { ...@@ -602,7 +619,6 @@ export default {
}, },
//文件下载 //文件下载
downloadLiterature(index, row) { downloadLiterature(index, row) {
debugger
downloadDocument('Document', row.file.uuid, row.file.name); downloadDocument('Document', row.file.uuid, row.file.name);
}, },
//打开软件 //打开软件
...@@ -704,13 +720,13 @@ export default { ...@@ -704,13 +720,13 @@ export default {
//新增弹出框弹出 //新增弹出框弹出
handleAdd() { handleAdd() {
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)) { // 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({ // this.$message({
type: "warning", // type: "warning",
message: "请选择文档列表子节点", // message: "请选择文档列表子节点",
}); // });
return; // return;
} // }
let _this = this; let _this = this;
//设置下拉框默认选择第一条 //设置下拉框默认选择第一条
// _this.form_add.region = _this.options[0].value; // _this.form_add.region = _this.options[0].value;
...@@ -721,13 +737,13 @@ export default { ...@@ -721,13 +737,13 @@ export default {
}, },
bigFileUploadAdd() {//弹出 bigFileUploadAdd() {//弹出
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)) { // 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({ // this.$message({
type: "warning", // type: "warning",
message: "请选择文档列表子节点", // message: "请选择文档列表子节点",
}); // });
return; // return;
} // }
let _this = this; let _this = this;
_this.centerDialogVisible_bigFile = true; _this.centerDialogVisible_bigFile = true;
}, },
...@@ -742,7 +758,7 @@ export default { ...@@ -742,7 +758,7 @@ export default {
createId: this.$store.getters.userInfo.account, createId: this.$store.getters.userInfo.account,
description: null, description: null,
file: evt.file, file: evt.file,
treeId: this.clientDetails_check_type.join(','), treeId: evt.treeId.join(','),
name: evt.file.name, name: evt.file.name,
keyword: null, keyword: null,
module: this.module_name module: this.module_name
...@@ -876,6 +892,7 @@ export default { ...@@ -876,6 +892,7 @@ export default {
endLoading(); endLoading();
console.log("loaded"); console.log("loaded");
self.handleCurrentChange_lb(1); self.handleCurrentChange_lb(1);
this.clientDetails_check_type = [];
}).catch(err => { }).catch(err => {
endLoading(); endLoading();
console.log("error"); console.log("error");
...@@ -980,6 +997,15 @@ export default { ...@@ -980,6 +997,15 @@ export default {
this.searchs(1); this.searchs(1);
this.wjfx_qh = true; this.wjfx_qh = true;
}, },
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
})
}
}
}, },
mounted() { mounted() {
let _this = this; let _this = this;
...@@ -1032,7 +1058,6 @@ export default { ...@@ -1032,7 +1058,6 @@ export default {
}, },
clientDetails: function (val) { clientDetails: function (val) {
this.clientDetails_type = val.type; this.clientDetails_type = val.type;
this.clientDetails_check_type = val.checkList;
this.module_name = val.module_name; this.module_name = val.module_name;
this.type_folder = val.type_folder; this.type_folder = val.type_folder;
this.fl_type = val.fl_type; this.fl_type = val.fl_type;
...@@ -1047,6 +1072,9 @@ export default { ...@@ -1047,6 +1072,9 @@ export default {
this.znjsfx_name = ""; this.znjsfx_name = "";
this.searchs(1); this.searchs(1);
}, },
treeData: function (val) {
this.tree_data = val;
}
}, },
}; };
</script> </script>
...@@ -1504,5 +1532,152 @@ export default { ...@@ -1504,5 +1532,152 @@ export default {
padding: 25px 25px 0px; padding: 25px 25px 0px;
} }
} }
.myTree>.el-tree-node>.el-tree-node__content .el-checkbox {
display: none;
}
.el-tree {
color: white;
background: transparent;
// height: 150px;
// max-height: 200px;
margin-top: 10px;
// overflow-y: auto;
.el-tree-node__content {
height: 40px;
// .el-icon-circle-plus {
// display: none;
// }
// .el-icon-error {
// display: none;
// }
// .el-icon-upload {
// display: none;
// }
// .el-icon-edit-outline {
// display: none;
// }
// .list-span{
// display: none;
// }
}
.el-tree-node {
position: relative;
padding-left: 0px; // 缩进量
}
.el-tree-node__children {
padding-left: 15px; // 缩进量
}
// 竖线
.el-tree-node::before {
content: "";
height: 100%;
width: 1px;
position: absolute;
left: -3px;
top: -17px;
border-width: 1px;
border-left: 1px solid #1895a2;
}
// 当前层最后一个节点的竖线高度固定
.el-tree-node:last-child::before {
height: 38px; // 可以自己调节到合适数值
}
// 横线
.el-tree-node::after {
content: "";
width: 13px;
height: 20px;
position: absolute;
left: -3px;
top: 20px;
border-width: 1px;
border-top: 1px solid #1895a2;
}
// 去掉最顶层的虚线,放最下面样式才不会被上面的覆盖了
&>.el-tree-node::after {
border-top: none;
}
&>.el-tree-node::before {
border-left: none;
}
// 展开关闭的icon
.el-tree-node__expand-icon {
font-size: 16px;
// 叶子节点(无子节点)
&.is-leaf {
color: transparent;
// display: none; // 也可以去掉
}
}
}
.el-tree>.el-tree-node>.el-tree-node__content {
height: 40px;
background: none !important;
border: 1px solid #146a80 !important;
box-shadow: 0 0 10px #1b6097;
// background-image: url(../../assets/img/yqjc/24.png);
// background-repeat: no-repeat;
// background-size: 100% 100%;
.el-icon-error {
display: none !important;
}
.el-icon-edit-outline {
display: none !important;
}
}
.el-tree>.el-tree-node>.el-tree-node__children>.el-tree-node>.el-tree-node__content {
height: 40px;
// background-image: url(../../assets/img/yqjc/24.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
.el-tree>.el-tree-node>.el-tree-node__content>.el-tree-node__label {
font-size: 16px !important;
}
.el-tree>.el-tree-node>.el-tree-node__children {
background-color: #1d2d46ad !important;
width: calc(100% - 15px);
// height: calc(100% - 44px);
// overflow: auto;
// position: relative;
// .el-tree-node{
// width: 300px;
// }
}
.el-tree-node:focus>.el-tree-node__content {
background-color: #00648a96 !important;
// border-radius: 5px;
}
.el-tree-node__content:hover,
.el-tree-node__content:focus {
background-color: #00638a50 !important;
// border-radius: 5px;
}
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
background-color: #00648a96 !important;
// border-radius: 5px;
}
} }
</style> </style>
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