Commit 034c5454 authored by 夏敏伟's avatar 夏敏伟
parents c54231c7 33b0f02e
<template>
<div id="wjfx_fzjc">
<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="[4]"
@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>
<div class="right-div">
<component :is="currentRole" :clientDetails="clientDetails" ref="mychild" />
</div>
</div>
</template>
<script>
import { get, post, delete_util } from "../../util/http_util";
import { queryDocumentTree, updateDocumentTreeItem, addDocumentTreeItem } from '../../api/zfclk/wxgl';
import XLSX from "xlsx";
import navs from "./znfxZfcl.vue";
// import navs1 from "./znjsfx.vue";
let id = 1000;
export default {
components: { navs },
data() {
return {
clientDetails: {},
currentRole: "navs",
tree_data: [], //左侧树结构的数据
dialogVisible: false, //新增子节点弹出框
dialogVisible_edit: false,
name_edit: '',
name: "", //新增子节点的名称
this_data: "",
this_node: "",
filterText: "",
defaultProps: {
children: 'children',
label: 'label'
},
dialogVisibleImport: false,
title: "",
pickNew: "",
tableDataFromExcelHead: [],
tableDataFromExcel: [],
module_name: '战法策略库文档',
};
},
methods: {
//查询tree数据
query_tree() {
this.tree_data = [];
queryDocumentTree(this.module_name)
.then((res) => {
this.tree_data = [{
id: 4,
label: '文档列表',
level: 0,
children: res
}];
this.currentRole = "navs";
this.clientDetails = { type: 4 };
})
.catch((err) => {
this.$message.warning(err.message);
});
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//节点点击事件
handleNodeClick(node, data) {
this.currentRole = "navs";
this.clientDetails = { type: node.id };
// if (node.id == 21 || this.getparentNode(data) == 21) {
// this.currentRole = "navs";
// this.clientDetails = { type: node.id };
// } else if (node.id == 25 || this.getparentNode(data) == 25) {
// this.currentRole = "navs1";
// } else {
// this.currentRole = "";
// }
},
//查询当前节点的最顶层节点ID
getparentNode(data) {
if (data.data.parentCode == null) {
return data.data.id;
} else {
return this.getparentNode(data.parent);
}
},
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
activated() {
this.query_tree();
},
};
</script>
<style lang="scss">
#wjfx_fzjc {
width: calc(100% - 50px);
height: calc(100% - 70px);
margin: 20px;
.left-div {
width: 15%;
height: 100%;
box-sizing: border-box;
padding: 20px;
float: left;
input {
color: white;
background-color: transparent;
}
.el-input {
position: relative;
font-size: 14px;
display: inline-block;
width: 100%;
}
.el-button+.el-button {
margin-left: 0px !important;
}
.el-tree {
color: white;
background: transparent;
height: calc(100% - 50px);
margin-top: 10px;
.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>.el-tree-node>.el-tree-node__content {
height: 40px;
// background-image: url(../../assets/img/yqjc/24.png);
background-image: url("../../assets/img/dfzy/new/6.png");
background-repeat: no-repeat;
background-size: 100% 100%;
.el-icon-error {
display: none !important;
}
.el-icon-edit-outline {
display: none !important;
}
// .list-span{
// display: none !important;
// }
// .el-button{
// margin-left: -50px;
// }
}
.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;
}
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 12px;
padding-right: 8px;
width: 82%;
.first-span {
width: 100%;
float: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.list-span {
position: absolute;
right: 20px;
}
}
.el-tree>.el-tree-node>.el-tree-node__children {
// background-color: #1d2d46ad !important;
width: 100%;
height: calc(100% - 44px);
overflow: auto;
position: relative;
.el-tree-node {
// width: 300px;
}
}
.el-tree-node:focus>.el-tree-node__content {
background-color: #00648a78 !important;
// border-radius: 5px;
}
.el-tree-node__content:hover,
.el-tree-node__content:focus {
background-color: #00638a50 !important;
// border-radius: 5px;
.el-icon-circle-plus {
display: block;
}
.el-icon-edit-outline {
display: block;
}
.el-icon-error {
display: block;
}
.el-icon-upload {
display: block;
}
.list-span {
display: block;
}
}
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
background-color: #00648a96 !important;
// border-radius: 5px;
}
.el-icon-circle-plus {
font-size: 16px;
color: #00a6f5;
}
.el-icon-edit-outline {
font-size: 16px;
color: #2ae209;
}
// .list-span{
// // background: #0b4c6dba;
// }
.el-icon-error {
font-size: 16px;
color: #ff5454;
}
.el-icon-upload {
font-size: 16px;
color: #2bce0e;
}
}
.right-div {
width: calc(85% - 10px);
height: 100%;
float: left;
margin-left: 10px;
}
}
</style>
...@@ -439,7 +439,7 @@ export default { ...@@ -439,7 +439,7 @@ export default {
gjc_input: "", gjc_input: "",
tab_jsfx: true, tab_jsfx: true,
znjsfx_name: "", znjsfx_name: "",
clientDetails_type: "1", //默认查询id为21的方案预案 clientDetails_type: "4", //默认查询id为21的方案预案
module_name: "战法策略文档", module_name: "战法策略文档",
tab_actives: "-1", //表格切换 tab_actives: "-1", //表格切换
}; };
......
This diff is collapsed.
...@@ -17,6 +17,13 @@ ...@@ -17,6 +17,13 @@
<component :is="flfg_wx" :clientDetails="jczc_data" ref="jczc" /> <component :is="flfg_wx" :clientDetails="jczc_data" ref="jczc" />
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane>
<span slot="label"><i class="el-icon-phone-outline"></i>战法策略</span>
<div style="width: 100%; height: 100%">
<component :is="flfg_zfcl" :clientDetails="zfcl_data" ref="zfcl" />
</div>
</el-tab-pane>
<el-tab-pane> <el-tab-pane>
<span slot="label"><i class="el-icon-edit-outline"></i>制作简报</span> <span slot="label"><i class="el-icon-edit-outline"></i>制作简报</span>
<div style="width: 100%; height: 100%"> <div style="width: 100%; height: 100%">
...@@ -40,6 +47,8 @@ export default { ...@@ -40,6 +47,8 @@ export default {
editableTabsValue: "0", editableTabsValue: "0",
jczc_data: {}, jczc_data: {},
flfg_wx: "navs_wx", flfg_wx: "navs_wx",
zfcl_data: {},
flfg_zfcl: "navs_wx",
createBriefing:'createBriefingDialog' createBriefing:'createBriefingDialog'
}; };
}, },
...@@ -54,6 +63,13 @@ export default { ...@@ -54,6 +63,13 @@ export default {
}); });
} else if (this.editableTabsValue == 0) { } else if (this.editableTabsValue == 0) {
(this.currentRole_wx_data = "flfg_flfg") (this.currentRole_wx_data = "flfg_flfg")
} else if(this.editableTabsValue == 2){
(this.flfg_zfcl = "navs_wx"),
(this.zfcl_data = {
module_name: "战法策略库文档",
fl_type: 3,
type_folder: "DocumentPDF",
});
} }
}, },
}, },
......
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