Commit e58b491b authored by 高飞's avatar 高飞

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

parent 425fd454
......@@ -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 {
position: relative;
......
......@@ -10,11 +10,15 @@
<div class="uploadWrapper">
<div class="btnUpload">
<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 id="thelist" class="uploader-list">
<ul>
<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
:class="[item.state == 1 ? 'el-icon-loading' : item.state == 2 ? 'el-icon-success' : item.state == 3 ? 'el-icon-warning' : '']">{{
item.description }}</span>
......@@ -257,7 +261,17 @@ export default {
this.uploader = uploader;
},
methods: {
removeFileAll(){
this.fileList = [];
},
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)) {
this.$message({
type: "warning",
......@@ -345,7 +359,10 @@ export default {
}
.btnUpload {
height: 50px;
// height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
}
#thelist {
......@@ -354,13 +371,21 @@ export default {
max-height: calc(100% - 130px);
}
#thelist a {
#thelist .div-a {
// text-decoration: underline;
cursor: pointer;
font-size: 16px;
// cursor: pointer;
font-size: 14px;
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 {
/* 去掉li前面的小圆点 */
list-style: none;
......@@ -384,14 +409,19 @@ export default {
.el-icon-loading {
color: white;
font-size: 11px;
font-weight: 600;
}
.el-icon-warning {
color: red;
color: #ff5555;
font-size: 11px;
font-weight: 600;
}
.el-icon-success {
color: green
color: green;
font-size: 11px;
font-weight: 600;
}
</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 {
max: 20,
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 {
max: 20,
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 @@
<li @click="clickButtomTop()">文档列表> </li>
<li v-for="(item) in trees" @click="clickButtom(item)">{{ item.label + '>' }}</li>
</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>
</ul>
</ul> -->
<!-- <div v-for="(item, index) in modules" style="width: 200px;float: left;">
<el-menu background-color="red" text-color="#fff" active-text-color="#010008">
<NavMenu :navMenus="item"></NavMenu>
......@@ -18,13 +18,27 @@
<div class="left-div">
<el-input class="public-input" placeholder="输入关键字进行过滤" suffix-icon="el-icon-search"
v-model="filterText"></el-input>
<el-tree :data="tree_data" node-key="id" :expand-on-click-node="false" :filter-node-method="filterNode"
highlight-current :props="defaultProps" ref="tree" :current-node-key="4" :default-expanded-keys="expandedArr"
@node-click="handleNodeClick">
<el-tree class="myTree" :data="tree_data" node-key="id" :expand-on-click-node="false"
:filter-node-method="filterNode" :props="defaultProps" ref="tree" :current-node-key="4"
: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="first-span" :title="node.label">{{ node.label }}</span>
</span>
</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 class="right-div">
<component :is="currentRole" :clientDetails="clientDetails" ref="mychild" />
......@@ -69,9 +83,23 @@ export default {
treesChildren: [],
tree: [],
modules: [],
checkList: [],
};
},
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数据
query_tree() {
this.tree_data = [];
......@@ -95,15 +123,43 @@ export default {
// }
// console.log(this.modules)
this.currentRole = "navs";
this.clientDetails = { type: 4 };
this.clientDetails = { type: [] };
})
.catch((err) => {
this.$message.warning(err.message);
});
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
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;
return data.label.indexOf(value) !== -1;
}
},
clickButtomTop() {
this.$nextTick(() => {
......@@ -147,8 +203,8 @@ export default {
// this.trees = [];
// this.treesChildren = this.tree;
// }
this.currentRole = "navs";
this.clientDetails = { type: node.id };
// this.currentRole = "navs";
// this.clientDetails = { type: node.id };
this.expandedArr = [node.id]
// if (node.id == 21 || this.getparentNode(data) == 21) {
// this.currentRole = "navs";
......@@ -221,19 +277,40 @@ export default {
margin: 0px 10px;
border-radius: 9px;
}
.active{
.active {
background: linear-gradient(to right, #00b6ff75, #304a51db);
}
}
.el-menu{
.el-menu {
border-right: none;
}
.left-div {
width: 15%;
height: 100%;
box-sizing: border-box;
padding: 20px;
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 {
color: white;
......@@ -251,6 +328,10 @@ export default {
margin-left: 0px !important;
}
.myTree>.el-tree-node>.el-tree-node__content .el-checkbox {
display: none;
}
.el-tree {
color: white;
background: transparent;
......
<template>
<div id="znfx">
<div id="znfx1">
<div v-show="wjfx_qh">
<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">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="sc_time" type="daterange" range-separator="至"
start-placeholder="上传起始时间" end-placeholder="上传结束时间" :default-time="['00:00:00', '23:59:59']">
......@@ -93,14 +93,14 @@
</div> -->
<div class="card-div">
<template v-for="(item, index) in tableData">
<div class="cards-div animate__animated bk-xxzp-animation" :class="[
index % 4 == 0
<div class="cards-div animate__animated bk-xxzp-animation1" :class="[
index % 3 == 0
? 'animate__lightSpeedInLeft'
: index % 4 == 1
: index % 3 == 1
? 'animate__zoomIn'
: index % 4 == 2
? 'animate__zoomIn'
: 'animate__lightSpeedInRight',
: index % 3 == 2
? 'animate__lightSpeedInRight'
: '',
]">
<div :class="[
'tilts',
......@@ -125,6 +125,11 @@
{{ item.name }}
</div>
</div>
<div class="desc">
<div>
{{ item.description }}
</div>
</div>
<div class="bottom-span">
{{ item.createTime }}
</div>
......@@ -137,7 +142,7 @@
<div class="page-div">
<el-pagination class="myPagination" background layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange" :page-size="pageSize" :current-page="current_page" :total="total"
@current-change="handleCurrentChange_lb" :page-sizes="[12, 20, 30, 40, 50, 60, 70, 80, 90, 100]">
@current-change="handleCurrentChange_lb" :page-sizes="[9, 20, 30, 40, 50, 60, 70, 80, 90, 100]">
</el-pagination>
</div>
</div>
......@@ -181,7 +186,7 @@
<el-pagination class="myPagination" background layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange_qw" :page-size="pageSize_qw" :current-page="current_page_qw"
:total="totals_qw" @current-change="handleCurrentChange_qw"
:page-sizes="[12, 20, 30, 40, 50, 60, 70, 80, 90, 100]">
:page-sizes="[9, 20, 30, 40, 50, 60, 70, 80, 90, 100]">
</el-pagination>
</div>
</div>
......@@ -412,7 +417,7 @@ export default {
gjc: "",
},
total: 0,
pageSize: 12,
pageSize: 9,
current_page: 1,
tableData_znjsfx: [],
total_znjsfx: 0,
......@@ -424,7 +429,7 @@ export default {
toggle_value_lb: true,
toggle_value_qw: false,
totals_qw: 0,
pageSize_qw: 12,
pageSize_qw: 9,
current_page_qw: 1,
format_files: "",
get_files: [],
......@@ -482,21 +487,72 @@ export default {
let _this = this;
let startTime = "";
let endTime = "";
let complexKeywords = [];
if (_this.sc_time != "" && _this.sc_time != null) {
startTime = _this.sc_time[0];
endTime = _this.sc_time[1];
}
_this.paramData = {
beginTime: startTime == "" ? null : startTime,
endTime: endTime == "" ? null : endTime,
name: _this.wd_name == "" ? null : _this.wd_name,
module: _this.clientDetails_type == "4" ? this.module_name : null,
treeId: _this.clientDetails_type == 4 ? null : _this.clientDetails_type,
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,
};
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();
_this.tableData = [];
_this.total = 0;
queryDoc(pageNum, _this.pageSize, _this.paramData).then((data) => {
post(
"api/rest/3z/document/queryDoc?pageNum=" +
pageNum +
"&pageSize=" +
_this.pageSize,
_this.paramData
).then((data) => {
setTimeout(() => {
if (data.list.length != 0) {
data.list.forEach(item => {
......@@ -956,13 +1012,27 @@ export default {
max: 20,
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 = '38px'; // 设置颜色为蓝色
});
paragraphs1.forEach(function(paragraphs1) {
paragraphs1.style.height = '56px'; // 设置颜色为蓝色
});
paragraphs2.forEach(function(paragraphs2) {
paragraphs2.style.height = '24px'; // 设置颜色为蓝色
});
},1500)
});
},
},
};
</script>
<style lang="scss">
#znfx {
#znfx1 {
width: calc(100% - 0px);
height: calc(100% - 0px);
padding: 20px;
......@@ -1181,15 +1251,15 @@ export default {
overflow-x: hidden;
.cards-div {
width: 23%;
height: 160px;
margin: 1%;
width: 33%;
height: 190px;
// margin: 1%;
float: left;
.tilts {
width: 100%;
height: 100%;
background-image: url("../../assets/img/fzjc/new/2.png");
background-image: url("../../assets/img/fzjc/new/2-2.png");
background-size: 100% 100%;
cursor: pointer;
transform: perspective(1000px);
......@@ -1197,7 +1267,7 @@ export default {
.tilts:hover {
transform-style: preserve-3d;
background-image: url("../../assets/img/fzjc/new/1.png");
background-image: url("../../assets/img/fzjc/new/1-1.png");
// .span-div {
// .span-div-bg {
......@@ -1230,7 +1300,7 @@ export default {
width: 70px;
height: 70px;
float: left;
margin: 40px 3px 28px 40px;
margin: 52px 10px 28px 44px;
// border: 2px solid white;
// border-radius: 50%;
transform: translateZ(20px);
......@@ -1254,10 +1324,10 @@ export default {
}
.text-div {
width: calc(100% - 140px);
height: 54px;
width: calc(100% - 170px);
height: 39px;
float: left;
margin-top: 40px;
margin-top: 33px;
transform: translateZ(20px);
.name-div {
......@@ -1267,23 +1337,39 @@ export default {
// background-size: 100% 100%;
// text-align: center;
color: white;
display: flex;
align-items: center;
.top-span {
font-size: 13px;
font-size: 15px;
letter-spacing: 1px;
line-height: 23px;
line-height: 18px;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
font-weight: 900;
}
}
.desc{
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
font-size: 14px;
padding: 0px 6px;
height: 55px;
color: #c7c7c7;
text-indent: 2em;
}
.bottom-span {
text-align: center;
text-align: right;
font-size: 12px;
line-height: 23px;
}
.synopsis-div {
......
......@@ -4,9 +4,18 @@
<el-input class="public-input" placeholder="输入关键字进行过滤" suffix-icon="el-icon-search"
v-model="filterText"></el-input>
<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"
ref="tree" :current-node-key="this.fl_type" @node-click="handleNodeClick"
:filter-node-method="filterNode" :default-expanded-keys="[this.fl_type]" :props="defaultProps"
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>
<!-- @node-click="handleNodeClick" -->
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="first-span" :title="node.label">{{ node.label }}</span>
<span class="list-span">
......@@ -32,6 +41,17 @@
</span>
</span>
</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 class="right-div">
<component :is="currentRole" :clientDetails="clientDetails_s" :treeData="tree_data" ref="mychild" />
......@@ -83,7 +103,8 @@ export default {
module_name: '',
fl_type: '',
type_folder: '',
nodeClickList: []
nodeClickList: [],
checkList:[],
};
},
props: {
......@@ -93,6 +114,62 @@ export default {
},
},
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) {
this.name_edit = data.label;
this.dialogVisible_edit = true;
......@@ -217,19 +294,48 @@ export default {
children: res
}];
this.currentRole = "navs";
let arr = [this.fl_type];
if (res.length > 0) {
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};
// let arr = [this.fl_type];
// if (res.length > 0) {
// 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: [], module_name: this.module_name, type_folder: this.type_folder, fl_type: this.fl_type};
})
.catch((err) => {
this.$message.warning(err.message);
});
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
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;
return data.label.indexOf(value) !== -1;
}
},
//节点点击事件
handleNodeClick(node, data) {
......@@ -264,7 +370,21 @@ export default {
height: 100%;
box-sizing: border-box;
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 {
color: white;
background-color: transparent;
......@@ -326,7 +446,7 @@ export default {
width: 1px;
position: absolute;
left: -3px;
top: -17px;
// top: -17px;
border-width: 1px;
border-left: 1px solid #1895a2;
}
......
......@@ -2,7 +2,7 @@
<div id="wxk_public">
<div v-show="wjfx_qh">
<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">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="sc_time" type="daterange"
range-separator="至" start-placeholder="上传起始时间" end-placeholder="上传结束时间"
......@@ -31,7 +31,7 @@
<div v-if="toggle_value_lb" class="transition-box">
<div class="table-div">
<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
prop="dict_item.name"
......@@ -49,8 +49,15 @@
</el-table-column>
<el-table-column prop="file.type" label="文档类型" width="110">
</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>
<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)"
title="预览"></i>&nbsp;
<i class="el-icon-download" @click="downloadLiterature(scope.$index, scope.row)"
......@@ -284,6 +291,13 @@
</BigfileUpload>
</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">
<div style="height: 400px; position: relative">
<!-- <video id="video" class="" preload="meta" controls width="100%" object-fit="fill" height="100%"
......@@ -319,6 +333,7 @@ import {
} from "../../util/http_util";
import { uuid } from "../../util/data_util";
import BigfileUpload from "../../components/common/bigfile_upload.vue";
import FileCopy from "../../components/common/filecopy.vue";
import { fileMd5Sum, getFileMD5Progress } from '../../util/file_md5.js';
import VideoPlayer from "../../components/common/video_player.vue";
import { downloadFile, downloadDocument } from "../../api/xxxl/llxx";
......@@ -393,10 +408,14 @@ export default {
defaultProps: {
children: 'children',
label: 'label'
}
},
centerDialogVisible_fileCopy:false,
copyfileId:'',
defaultTreeId:'',
};
},
components: {
FileCopy,
BigfileUpload,
VideoPlayer
},
......@@ -411,6 +430,37 @@ export default {
}
},
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) {
let _this = this;
......@@ -445,6 +495,7 @@ export default {
let _this = this;
let startTime = "";
let endTime = "";
let complexKeywords = [];
if (_this.sc_time != "" && _this.sc_time != null) {
startTime = _this.sc_time[0];
endTime = _this.sc_time[1];
......@@ -453,9 +504,53 @@ export default {
beginTime: startTime == "" ? null : startTime,
endTime: endTime == "" ? null : endTime,
name: _this.wd_name == "" ? null : _this.wd_name,
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],
// 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,
};
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();
_this.tableData = [];
_this.total = 0;
......@@ -703,7 +798,7 @@ export default {
message: "删除失败!",
});
}
_this.handleCurrentChange_lb(1);
_this.handleCurrentChange_lb(_this.current_page);
})
.catch((err) => {
this.$message.warning(err.message);
......@@ -797,7 +892,8 @@ export default {
message: "修改失败!",
});
}
_this.handleCurrentChange_lb(1);
// _this.handleCurrentChange_lb(1);
_this.handleCurrentChange_lb(_this.current_page);
_this.centerDialogVisible_edit = false;
})
.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