Commit e58b491b authored by 高飞's avatar 高飞

修改信息ZP模块问题--左侧tree拖拽、与或非搜索等

parent 425fd454
...@@ -280,6 +280,57 @@ div::-webkit-scrollbar-corner { ...@@ -280,6 +280,57 @@ div::-webkit-scrollbar-corner {
} }
} }
.bk-xxzp-animation1 {
position: relative;
&::before {
content: "";
position: absolute;
top: 13.1%;
left: 4.8%;
right: 2.8%;
bottom: 18.7%;
border-radius: 0px 20px;
border: 1px solid #47ebe4;
animation: clippathss 5s infinite linear;
pointer-events: none;
}
&::after {
content: "";
position: absolute;
top: 13.1%;
left: 4.8%;
right: 2.8%;
bottom: 18.7%;
border-radius: 0px 20px;
border: 1px solid #47ebe4;
animation: clippathss 6s infinite linear reverse;
pointer-events: none;
}
}
.bk-xxzp-animation1:hover {
&::before {
top: 17%;
left: 9.3%;
right: 2.5%;
bottom: 24%;
/* border:2px solid #ff9933; */
border: none;
}
&::after {
top: 17%;
left: 9.3%;
right: 2.5%;
bottom: 24%;
/* border:2px solid #ff9933; */
border: none;
}
}
.bk-xjs-animation { .bk-xjs-animation {
position: relative; position: relative;
......
...@@ -10,11 +10,15 @@ ...@@ -10,11 +10,15 @@
<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>
<el-button type="danger" plain size="mini" style="height: 26px;" v-if="fileList.length>0" @click="removeFileAll()">全部删除</el-button>
</div> </div>
<div id="thelist" class="uploader-list"> <div id="thelist" class="uploader-list">
<ul> <ul>
<li v-for="(item, index) in fileList "> <li v-for="(item, index) in fileList ">
<a @click="removeFile(item, index)"><span title="点击移除">{{ item.name }}</span></a> <div class="div-a">
<span :title="item.name">{{ item.name }}</span>
<i class="el-icon-circle-close" style="font-size: 20px;margin-left: 16px;cursor: pointer;color: #ff4040;" @click="removeFile(item, index)"></i>
</div>
<span <span
:class="[item.state == 1 ? 'el-icon-loading' : item.state == 2 ? 'el-icon-success' : item.state == 3 ? 'el-icon-warning' : '']">{{ :class="[item.state == 1 ? 'el-icon-loading' : item.state == 2 ? 'el-icon-success' : item.state == 3 ? 'el-icon-warning' : '']">{{
item.description }}</span> item.description }}</span>
...@@ -257,7 +261,17 @@ export default { ...@@ -257,7 +261,17 @@ export default {
this.uploader = uploader; this.uploader = uploader;
}, },
methods: { methods: {
removeFileAll(){
this.fileList = [];
},
upload() { upload() {
if(this.fileList.length==0){
this.$message({
type: "warning",
message: "文件不能为空",
});
return;
}
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",
...@@ -345,7 +359,10 @@ export default { ...@@ -345,7 +359,10 @@ export default {
} }
.btnUpload { .btnUpload {
height: 50px; // height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
} }
#thelist { #thelist {
...@@ -354,13 +371,21 @@ export default { ...@@ -354,13 +371,21 @@ export default {
max-height: calc(100% - 130px); max-height: calc(100% - 130px);
} }
#thelist a { #thelist .div-a {
// text-decoration: underline; // text-decoration: underline;
cursor: pointer; // cursor: pointer;
font-size: 16px; font-size: 14px;
color: white; color: white;
display: flex;
align-items: center;
flex-direction: row;
height: 26px;
}
#thelist .div-a span{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
#thelist li { #thelist li {
/* 去掉li前面的小圆点 */ /* 去掉li前面的小圆点 */
list-style: none; list-style: none;
...@@ -384,14 +409,19 @@ export default { ...@@ -384,14 +409,19 @@ export default {
.el-icon-loading { .el-icon-loading {
color: white; color: white;
font-size: 11px;
font-weight: 600;
} }
.el-icon-warning { .el-icon-warning {
color: red; color: #ff5555;
font-size: 11px; font-size: 11px;
font-weight: 600;
} }
.el-icon-success { .el-icon-success {
color: green color: green;
font-size: 11px;
font-weight: 600;
} }
</style> </style>
<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="treeDatas" 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"
:default-checked-keys="clientDetails_check_type"
:indent=1>
</el-tree>
</div>
<div class="fileCopyDiv">
<div class="copyDiv">
<el-button type="primary" @click="copyTransfer()">转移</el-button>
<!-- <el-button type="primary" @click="Transfer()">转移</el-button> -->
</div>
</div>
</div>
</template>
<script>
export default {
props: {
treeData: {
type: Array
},
treeId:{
type: Array
},
flType:{
type:Number
}
},
data() {
return {
defaultProps: {
children: 'children',
label: 'label'
},
treeDatas: [],
clientDetails_check_type: [],
fl_type:0,
};
},
methods: {
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
})
}
},
copyTransfer(){
if(this.clientDetails_check_type.length==0){
this.$message({
type: "warning",
message: "至少选择一个目录",
});
return
}
this.$emit("onSubmit", {data:this.clientDetails_check_type});
},
// Transfer(){
// this.$emit("onSubmit", {data:this.clientDetails_check_type});
// }
},
watch: {
treeData: {
handler(newVal, oldVal) {
this.treeDatas = newVal;
},
immediate: true
},
flType:{
handler(newVal, oldVal) {
this.fl_type = newVal;
},
immediate: true
},
treeId:{
handler(newVal, oldVal) {
this.clientDetails_check_type = newVal;
},
immediate: true
}
}
};
</script>
<style lang="scss" scope>
.fileCopyDiv {
height: 100px;
}
.copyDiv {
display: flex;
justify-content: space-evenly;
}
</style>
...@@ -963,6 +963,20 @@ export default { ...@@ -963,6 +963,20 @@ export default {
max: 20, max: 20,
speed: 400, speed: 400,
}); });
// var paragraphs = document.querySelectorAll('.text-div');
// var paragraphs1 = document.querySelectorAll('.desc');
// var paragraphs2 = document.querySelectorAll('.bottom-span');
// setTimeout(function(){
// paragraphs.forEach(function(paragraph) {
// paragraph.style.height = 'px'; // 设置颜色为蓝色
// });
// paragraphs1.forEach(function(paragraphs1) {
// paragraphs1.style.height = '33px'; // 设置颜色为蓝色
// });
// paragraphs2.forEach(function(paragraphs2) {
// paragraphs2.style.height = '24px'; // 设置颜色为蓝色
// });
// },1500)
}); });
}, },
}, },
......
...@@ -963,6 +963,20 @@ export default { ...@@ -963,6 +963,20 @@ export default {
max: 20, max: 20,
speed: 400, speed: 400,
}); });
// var paragraphs = document.querySelectorAll('.text-div');
// var paragraphs1 = document.querySelectorAll('.desc');
// var paragraphs2 = document.querySelectorAll('.bottom-span');
// setTimeout(function(){
// paragraphs.forEach(function(paragraph) {
// paragraph.style.height = '41px'; // 设置颜色为蓝色
// });
// paragraphs1.forEach(function(paragraphs1) {
// paragraphs1.style.height = '33px'; // 设置颜色为蓝色
// });
// paragraphs2.forEach(function(paragraphs2) {
// paragraphs2.style.height = '24px'; // 设置颜色为蓝色
// });
// },1500)
}); });
}, },
}, },
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<li @click="clickButtomTop()">文档列表> </li> <li @click="clickButtomTop()">文档列表> </li>
<li v-for="(item) in trees" @click="clickButtom(item)">{{ item.label + '>' }}</li> <li v-for="(item) in trees" @click="clickButtom(item)">{{ item.label + '>' }}</li>
</ul> --> </ul> -->
<ul class="uls uls1"> <!-- <ul class="uls uls1">
<li v-for="(item) in treesChildren" @click="clickButtom(item)" :class="[expandedArr[0]==item.id?'active':'']">{{ item.label }}</li> <li v-for="(item) in treesChildren" @click="clickButtom(item)" :class="[expandedArr[0]==item.id?'active':'']">{{ item.label }}</li>
</ul> </ul> -->
<!-- <div v-for="(item, index) in modules" style="width: 200px;float: left;"> <!-- <div v-for="(item, index) in modules" style="width: 200px;float: left;">
<el-menu background-color="red" text-color="#fff" active-text-color="#010008"> <el-menu background-color="red" text-color="#fff" active-text-color="#010008">
<NavMenu :navMenus="item"></NavMenu> <NavMenu :navMenus="item"></NavMenu>
...@@ -18,13 +18,27 @@ ...@@ -18,13 +18,27 @@
<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 :data="tree_data" node-key="id" :expand-on-click-node="false" :filter-node-method="filterNode" <el-tree class="myTree" :data="tree_data" node-key="id" :expand-on-click-node="false"
highlight-current :props="defaultProps" ref="tree" :current-node-key="4" :default-expanded-keys="expandedArr" :filter-node-method="filterNode" :props="defaultProps" ref="tree" :current-node-key="4"
@node-click="handleNodeClick"> :default-expanded-keys="expandedArr" :check-strictly="true" :highlight-current="false" :show-checkbox="true"
@check="boxOnCheck">
<!-- @node-click="handleNodeClick" -->
<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> </span>
</el-tree> </el-tree>
<div class="checkDiv" v-if="checkList.length > 0">
<div style="width: 100%;font-size: 13px;font-weight: 900;margin-bottom: 10px;">
<span>当前已选择项:</span>
</div>
<div v-for="(item) in checkList" class="checkList">
<div style="display: flex;align-items: center;">
<span>{{ item.label }}</span>
<i class="el-icon-close" style="font-size: 15px;cursor: pointer;margin-left: 3px;"
@click="deleteBox(item)"></i>
</div>
</div>
</div>
</div> </div>
<div class="right-div"> <div class="right-div">
<component :is="currentRole" :clientDetails="clientDetails" ref="mychild" /> <component :is="currentRole" :clientDetails="clientDetails" ref="mychild" />
...@@ -69,9 +83,23 @@ export default { ...@@ -69,9 +83,23 @@ export default {
treesChildren: [], treesChildren: [],
tree: [], tree: [],
modules: [], modules: [],
checkList: [],
}; };
}, },
methods: { methods: {
deleteBox(i) {
this.checkList = this.checkList.filter(item => item.id != i.id);
this.$refs.tree.setCheckedKeys(this.checkList.map((item) => { return item.id }));
this.currentRole = "navs";
// this.nodeClickList = [node.id];
this.clientDetails = { type: this.checkList.map((item) => { return item.id }) };
},
boxOnCheck(node, data) {
this.checkList = data.checkedNodes;
this.currentRole = "navs";
// this.nodeClickList = [node.id];
this.clientDetails = { type: data.checkedKeys };
},
//查询tree数据 //查询tree数据
query_tree() { query_tree() {
this.tree_data = []; this.tree_data = [];
...@@ -95,15 +123,43 @@ export default { ...@@ -95,15 +123,43 @@ export default {
// } // }
// console.log(this.modules) // console.log(this.modules)
this.currentRole = "navs"; this.currentRole = "navs";
this.clientDetails = { type: 4 }; this.clientDetails = { type: [] };
}) })
.catch((err) => { .catch((err) => {
this.$message.warning(err.message); this.$message.warning(err.message);
}); });
}, },
filterNode(value, data) { filterNode(value, data) {
if (value.indexOf('&') > -1) {
let stringTemp;
for (let index = 0; index < value.split('&').length; index++) {
if (value.split('&')[index]) {
let tmp = data.label.indexOf(value.split('&')[index]) !== -1;
if (index == 0) {
stringTemp = tmp;
} else {
stringTemp = stringTemp && tmp;
}
}
}
return stringTemp;
} else if (value.indexOf('|') > -1) {
let stringTemp;
for (let index = 0; index < value.split('|').length; index++) {
if (value.split('|')[index]) {
let tmp = data.label.indexOf(value.split('|')[index]) !== -1;
if (index == 0) {
stringTemp = tmp;
} else {
stringTemp = stringTemp || tmp;
}
}
}
return stringTemp;
} else {
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}
}, },
clickButtomTop() { clickButtomTop() {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -147,8 +203,8 @@ export default { ...@@ -147,8 +203,8 @@ export default {
// this.trees = []; // this.trees = [];
// this.treesChildren = this.tree; // this.treesChildren = this.tree;
// } // }
this.currentRole = "navs"; // this.currentRole = "navs";
this.clientDetails = { type: node.id }; // this.clientDetails = { type: node.id };
this.expandedArr = [node.id] this.expandedArr = [node.id]
// if (node.id == 21 || this.getparentNode(data) == 21) { // if (node.id == 21 || this.getparentNode(data) == 21) {
// this.currentRole = "navs"; // this.currentRole = "navs";
...@@ -221,19 +277,40 @@ export default { ...@@ -221,19 +277,40 @@ export default {
margin: 0px 10px; margin: 0px 10px;
border-radius: 9px; border-radius: 9px;
} }
.active{
.active {
background: linear-gradient(to right, #00b6ff75, #304a51db); background: linear-gradient(to right, #00b6ff75, #304a51db);
} }
} }
.el-menu{
.el-menu {
border-right: none; border-right: none;
} }
.left-div { .left-div {
width: 15%; width: 15%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
float: left; float: left;
position: relative;
.checkDiv {
position: absolute;
bottom: 20px;
background: #7f7f7f17;
display: flex;
flex-wrap: wrap;
gap: 7px 12px;
width: calc(100% - 60px);
padding: 10px 10px 14px;
}
.checkList {
font-size: 12px;
padding: 3px 9px;
background: #5757578f;
}
input { input {
color: white; color: white;
...@@ -251,6 +328,10 @@ export default { ...@@ -251,6 +328,10 @@ export default {
margin-left: 0px !important; margin-left: 0px !important;
} }
.myTree>.el-tree-node>.el-tree-node__content .el-checkbox {
display: none;
}
.el-tree { .el-tree {
color: white; color: white;
background: transparent; background: transparent;
......
This diff is collapsed.
...@@ -4,9 +4,18 @@ ...@@ -4,9 +4,18 @@
<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" :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" :default-expanded-keys="[this.fl_type]" :props="defaultProps"
ref="tree" :current-node-key="this.fl_type" @node-click="handleNodeClick" ref="tree" :current-node-key="this.fl_type"
:check-strictly="true"
:highlight-current="false"
:show-checkbox="true"
@check="boxOnCheck"
draggable
:allow-drop="allowDrop"
@node-drag-start="nodeDragStart"
@node-drag-end="nodeDragEnd"
:indent=1> :indent=1>
<!-- @node-click="handleNodeClick" -->
<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">
...@@ -32,6 +41,17 @@ ...@@ -32,6 +41,17 @@
</span> </span>
</span> </span>
</el-tree> </el-tree>
<div class="checkDiv" v-if="checkList.length>0">
<div style="width: 100%;font-size: 13px;font-weight: 900;margin-bottom: 10px;">
<span>当前已选择项:</span>
</div>
<div v-for="(item) in checkList" class="checkList">
<div style="display: flex;align-items: center;">
<span>{{ item.label }}</span>
<i class="el-icon-close" style="font-size: 15px;cursor: pointer;margin-left: 3px;" @click="deleteBox(item)"></i>
</div>
</div>
</div>
</div> </div>
<div class="right-div"> <div class="right-div">
<component :is="currentRole" :clientDetails="clientDetails_s" :treeData="tree_data" ref="mychild" /> <component :is="currentRole" :clientDetails="clientDetails_s" :treeData="tree_data" ref="mychild" />
...@@ -83,7 +103,8 @@ export default { ...@@ -83,7 +103,8 @@ export default {
module_name: '', module_name: '',
fl_type: '', fl_type: '',
type_folder: '', type_folder: '',
nodeClickList: [] nodeClickList: [],
checkList:[],
}; };
}, },
props: { props: {
...@@ -93,6 +114,62 @@ export default { ...@@ -93,6 +114,62 @@ export default {
}, },
}, },
methods: { methods: {
nodeDragStart(node, evt){
if(node.level == 1){
this.$message.info("根节点不能转移");
return;
}
},
nodeDragEnd(sNode, eNode, position, evt){
if(eNode == null || sNode.id == eNode.id){
return;
}
this.$confirm(
"此操作永久将"+ sNode.data.label+ "及其下所有文件夹到" + eNode.data.label + "中, 是否继续?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(res=>{
return post("api/rest/3z/document/moveDocumentTreeItem", {
id: sNode.data.id, //当前节点
destCode: eNode.data.parentCode, //目标节点
level: eNode.data.level//目标节点id
});
}).then(res=>{
this.$message.success("转移成功");
}).catch(err=>{
if(err instanceof Object) {
this.$message.info(err.msg);
} else {
this.$message.info("已取消");
}
this.query_tree();
});
},
allowDrop(draggingNode, dropNode, type) {
if (dropNode.level==1) {
// this.$message.info("不可转移至根节点");
return false
}else{
return true
}
},
deleteBox(i){
this.checkList = this.checkList.filter(item=> item.id!=i.id);
this.$refs.tree.setCheckedKeys(this.checkList.map((item)=> {return item.id}));
this.currentRole = "navs";
// this.nodeClickList = [node.id];
this.clientDetails_s = { type: this.checkList.map((item)=> {return item.id}), module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type};
},
boxOnCheck(node,data){
this.checkList = data.checkedNodes;
this.currentRole = "navs";
// this.nodeClickList = [node.id];
this.clientDetails_s = { type: data.checkedKeys, module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type};
},
edit(node, data) { edit(node, data) {
this.name_edit = data.label; this.name_edit = data.label;
this.dialogVisible_edit = true; this.dialogVisible_edit = true;
...@@ -217,19 +294,48 @@ export default { ...@@ -217,19 +294,48 @@ export default {
children: res children: res
}]; }];
this.currentRole = "navs"; this.currentRole = "navs";
let arr = [this.fl_type]; // let arr = [this.fl_type];
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}; // this.clientDetails_s = { type: arr, module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type};
this.clientDetails_s = { type: [], 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);
}); });
}, },
filterNode(value, data) { filterNode(value, data) {
if (value.indexOf('&') > -1) {
let stringTemp;
for (let index = 0; index < value.split('&').length; index++) {
if (value.split('&')[index]) {
let tmp = data.label.indexOf(value.split('&')[index]) !== -1;
if (index == 0) {
stringTemp = tmp;
} else {
stringTemp = stringTemp && tmp;
}
}
}
return stringTemp;
} else if (value.indexOf('|') > -1) {
let stringTemp;
for (let index = 0; index < value.split('|').length; index++) {
if (value.split('|')[index]) {
let tmp = data.label.indexOf(value.split('|')[index]) !== -1;
if (index == 0) {
stringTemp = tmp;
} else {
stringTemp = stringTemp || tmp;
}
}
}
return stringTemp;
} else {
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}
}, },
//节点点击事件 //节点点击事件
handleNodeClick(node, data) { handleNodeClick(node, data) {
...@@ -264,7 +370,21 @@ export default { ...@@ -264,7 +370,21 @@ export default {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
float: left; float: left;
.checkDiv{
position: absolute;
bottom: 20px;
background: #7f7f7f17;
display: flex;
flex-wrap: wrap;
gap: 7px 12px;
width: 280px;
padding: 10px 10px 14px;
}
.checkList{
font-size: 12px;
padding: 3px 9px;
background: #5757578f;
}
input { input {
color: white; color: white;
background-color: transparent; background-color: transparent;
...@@ -326,7 +446,7 @@ export default { ...@@ -326,7 +446,7 @@ export default {
width: 1px; width: 1px;
position: absolute; position: absolute;
left: -3px; left: -3px;
top: -17px; // top: -17px;
border-width: 1px; border-width: 1px;
border-left: 1px solid #1895a2; border-left: 1px solid #1895a2;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div id="wxk_public"> <div id="wxk_public">
<div v-show="wjfx_qh"> <div v-show="wjfx_qh">
<div class="top-div"> <div class="top-div">
<el-input v-model="wd_name" suffix-icon="el-icon-search" placeholder="请输入文档名称或关键词"></el-input> <el-input v-model="wd_name" suffix-icon="el-icon-search" placeholder="文档名称、简要描述、关键词"></el-input>
<div class="block sjxz"> <div class="block sjxz">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="sc_time" type="daterange" <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="sc_time" type="daterange"
range-separator="至" start-placeholder="上传起始时间" end-placeholder="上传结束时间" range-separator="至" start-placeholder="上传起始时间" end-placeholder="上传结束时间"
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<div v-if="toggle_value_lb" class="transition-box"> <div v-if="toggle_value_lb" class="transition-box">
<div class="table-div"> <div class="table-div">
<el-table :data="tableData" height="calc(100% - 0px)" border style="width: 100%"> <el-table :data="tableData" height="calc(100% - 0px)" border style="width: 100%">
<el-table-column type="index" label="序号" width="80"> <el-table-column type="index" label="序号" width="70">
</el-table-column> </el-table-column>
<!-- <el-table-column <!-- <el-table-column
prop="dict_item.name" prop="dict_item.name"
...@@ -49,8 +49,15 @@ ...@@ -49,8 +49,15 @@
</el-table-column> </el-table-column>
<el-table-column prop="file.type" label="文档类型" width="110"> <el-table-column prop="file.type" label="文档类型" width="110">
</el-table-column> </el-table-column>
<el-table-column prop="file.type" label="所属目录" width="200">
<template slot-scope="scope">
<span>{{ scope.row.labels.join('') }}</span>
</template>
</el-table-column>
<el-table-column prop="cz" label="操作" width="200" show-overflow-tooltip> <el-table-column prop="cz" label="操作" width="200" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<i class="el-icon-copy-document" @click="fileCopys(scope.row)" style="color: #52a6ff;font-size: 18px;"
title="转移"></i>&nbsp;
<i class="el-icon-view" @click="handleView(scope.$index, scope.row)" <i class="el-icon-view" @click="handleView(scope.$index, scope.row)"
title="预览"></i>&nbsp; title="预览"></i>&nbsp;
<i class="el-icon-download" @click="downloadLiterature(scope.$index, scope.row)" <i class="el-icon-download" @click="downloadLiterature(scope.$index, scope.row)"
...@@ -284,6 +291,13 @@ ...@@ -284,6 +291,13 @@
</BigfileUpload> </BigfileUpload>
</el-dialog> </el-dialog>
<el-dialog title="文件转移或复制转移" :visible.sync="centerDialogVisible_fileCopy"
width="30%" center class="xzwd">
<FileCopy :treeData="tree_data" :treeId="defaultTreeId" :flType="fl_type"
@onSubmit="fileCopyFun">
</FileCopy>
</el-dialog>
<el-dialog :title="title" :visible.sync="centerDialogVisible_video" center width="800px"> <el-dialog :title="title" :visible.sync="centerDialogVisible_video" center width="800px">
<div style="height: 400px; position: relative"> <div style="height: 400px; position: relative">
<!-- <video id="video" class="" preload="meta" controls width="100%" object-fit="fill" height="100%" <!-- <video id="video" class="" preload="meta" controls width="100%" object-fit="fill" height="100%"
...@@ -319,6 +333,7 @@ import { ...@@ -319,6 +333,7 @@ import {
} from "../../util/http_util"; } from "../../util/http_util";
import { uuid } from "../../util/data_util"; import { uuid } from "../../util/data_util";
import BigfileUpload from "../../components/common/bigfile_upload.vue"; import BigfileUpload from "../../components/common/bigfile_upload.vue";
import FileCopy from "../../components/common/filecopy.vue";
import { fileMd5Sum, getFileMD5Progress } from '../../util/file_md5.js'; import { fileMd5Sum, getFileMD5Progress } from '../../util/file_md5.js';
import VideoPlayer from "../../components/common/video_player.vue"; import VideoPlayer from "../../components/common/video_player.vue";
import { downloadFile, downloadDocument } from "../../api/xxxl/llxx"; import { downloadFile, downloadDocument } from "../../api/xxxl/llxx";
...@@ -393,10 +408,14 @@ export default { ...@@ -393,10 +408,14 @@ export default {
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
} },
centerDialogVisible_fileCopy:false,
copyfileId:'',
defaultTreeId:'',
}; };
}, },
components: { components: {
FileCopy,
BigfileUpload, BigfileUpload,
VideoPlayer VideoPlayer
}, },
...@@ -411,6 +430,37 @@ export default { ...@@ -411,6 +430,37 @@ export default {
} }
}, },
methods: { methods: {
fileCopys(row){
this.copyfileId = row.id;
this.defaultTreeId = row.treeId.split(",");
this.centerDialogVisible_fileCopy = true;
},
fileCopyFun(data){
let _that = this;
// startLoading();
post(
"api/rest/3z/document/updDocFolder?id=" +
this.copyfileId +
"&treeIds=" +
data.data.join(','),
).then((data) => {
// console.log();
if(data==1){
this.$message({
type: "success",
message: "转移成功!!!",
});
_that.handleCurrentChange_lb(_that.current_page);
// endLoading();
_that.centerDialogVisible_fileCopy = false;
}
})
.catch((err) => {
_that.$message.warning(err.message);
// endLoading();
his.centerDialogVisible_fileCopy = false;
})
},
//列表动画效果结束让全文动画开始 //列表动画效果结束让全文动画开始
afterLeave_lb(el) { afterLeave_lb(el) {
let _this = this; let _this = this;
...@@ -445,6 +495,7 @@ export default { ...@@ -445,6 +495,7 @@ export default {
let _this = this; let _this = this;
let startTime = ""; let startTime = "";
let endTime = ""; let endTime = "";
let complexKeywords = [];
if (_this.sc_time != "" && _this.sc_time != null) { if (_this.sc_time != "" && _this.sc_time != null) {
startTime = _this.sc_time[0]; startTime = _this.sc_time[0];
endTime = _this.sc_time[1]; endTime = _this.sc_time[1];
...@@ -453,9 +504,53 @@ export default { ...@@ -453,9 +504,53 @@ export default {
beginTime: startTime == "" ? null : startTime, beginTime: startTime == "" ? null : startTime,
endTime: endTime == "" ? null : endTime, endTime: endTime == "" ? null : endTime,
name: _this.wd_name == "" ? null : _this.wd_name, name: _this.wd_name == "" ? null : _this.wd_name,
module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null, // complexKeywords:complexKeywords,
treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0], // module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null,
// treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0],
module: _this.clientDetails_type.length==0 ? this.module_name:null,
treeIds: _this.clientDetails_type.length==0 ? null : _this.clientDetails_type,
};
if(_this.wd_name!=''){
if(_this.wd_name.charAt(0)=='&'||_this.wd_name.charAt(0)=='|'||_this.wd_name.charAt(_this.wd_name.length-1)=='&'||_this.wd_name.charAt(_this.wd_name.length-1)=='|'){
this.$message({
type: "warning",
message: "不允许以&、|开头或结尾",
});
return
}
if(_this.wd_name.includes('||')||_this.wd_name.includes('&&')||_this.wd_name.includes('&|')||_this.wd_name.includes('|&')){
this.$message({
type: "warning",
message: "不能连续出现&、|或者&|、|&",
});
return
}
let result3 = _this.wd_name.split(/[|&]/);
if(result3.length>=2){
let indexs = 0;
result3.forEach((item,index)=>{
if(index==0){
indexs = indexs+item.length;
}else{
indexs = indexs+item.length+1;
}
complexKeywords.push({
keyword: item,
operatorWithNext: _this.wd_name[indexs]=='&'?'AND':'OR'
})
})
_this.paramData = {
beginTime: startTime == "" ? null : startTime,
endTime: endTime == "" ? null : endTime,
// name: _this.wd_name == "" ? null : _this.wd_name,
complexKeywords:complexKeywords,
// module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null,
// treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0],
module: _this.clientDetails_type.length==0 ? this.module_name:null,
treeIds: _this.clientDetails_type.length==0 ? null : _this.clientDetails_type,
}; };
}
}
// startLoading(); // startLoading();
_this.tableData = []; _this.tableData = [];
_this.total = 0; _this.total = 0;
...@@ -703,7 +798,7 @@ export default { ...@@ -703,7 +798,7 @@ export default {
message: "删除失败!", message: "删除失败!",
}); });
} }
_this.handleCurrentChange_lb(1); _this.handleCurrentChange_lb(_this.current_page);
}) })
.catch((err) => { .catch((err) => {
this.$message.warning(err.message); this.$message.warning(err.message);
...@@ -797,7 +892,8 @@ export default { ...@@ -797,7 +892,8 @@ export default {
message: "修改失败!", message: "修改失败!",
}); });
} }
_this.handleCurrentChange_lb(1); // _this.handleCurrentChange_lb(1);
_this.handleCurrentChange_lb(_this.current_page);
_this.centerDialogVisible_edit = false; _this.centerDialogVisible_edit = false;
}) })
.catch((err) => { .catch((err) => {
......
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