350 lines
9.7 KiB
HTML
350 lines
9.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<!-- import CSS -->
|
|
<link rel="stylesheet" href="components/icon.css">
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<div id="main">
|
|
<div id="leftDiv" ref="searchDiv">
|
|
<div class="cartTitle">
|
|
<span>部门视图</span>
|
|
<div style="float:right">
|
|
文件类型:
|
|
<el-select v-model="selectvalue" placeholder="请选择" @change="selcetchangetype" >
|
|
<el-option
|
|
v-for="item in selectoptions"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value" >
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div id="processList" v-loading="g_loading" style="width: 100%; height: 100%" >
|
|
<div class="collspse">
|
|
<el-tree
|
|
:data="options"
|
|
:props="defaultProps1"
|
|
node-key="ID"
|
|
:default-expanded-keys="defaultkey">
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
<span>
|
|
<a :href="node.data.path">
|
|
{{node.data.name}}
|
|
</a>
|
|
</span>
|
|
<label>
|
|
{{node.data.desc}}
|
|
</label>
|
|
</span>
|
|
</el-tree>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="rightDiv" ref="rightHeight">
|
|
<div id="rightTop">
|
|
<div id="infoCart">
|
|
<div class="cartTitle" style="margin-bottom:30px">
|
|
<span>部门信息</span>
|
|
</div>
|
|
<div class="search">
|
|
<el-input
|
|
placeholder="输入关键字进行过滤"
|
|
v-model="filterText">
|
|
</el-input>
|
|
</div>
|
|
<div class="cartTab" style="height: 400px;overflow-y: auto;overflow-x: hidden;">
|
|
<el-tree
|
|
:data="list"
|
|
show-checkbox
|
|
ref="tree"
|
|
node-key="ID"
|
|
:props="defaultProps"
|
|
:filter-node-method="filterNode"
|
|
@check="handleCheckChange"
|
|
>
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
<span :title=" node.data.name ">{{ node.data.name }}</span>
|
|
</span>
|
|
</el-tree>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="rightBottom">
|
|
<div id="infoCart1">
|
|
<div class="cartTitle">
|
|
<span>部门流程数据统计</span>
|
|
</div>
|
|
<div class="cartTab">
|
|
<div class="postArea">
|
|
<div class="postInfo icon1"><i></i> 制度总数<span> {{ policyFileNum }}</span></div>
|
|
<div class="postInfo icon2"><i></i> 流程总数<span> {{ processFileNum }}</span></div>
|
|
<div class="postInfo icon3"><i></i> 表单模版<span> {{ formFileNum }}</span></div>
|
|
<div class="postInfo icon4"><i></i> 操作指导<span> {{ guideFileNum }}</span></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<!-- import Vue before Element -->
|
|
<script src="components/vue.js"></script>
|
|
<script src="components/jquery.js"></script>
|
|
<!-- import JavaScript -->
|
|
<script src="components/index.js"></script>
|
|
<script src="components/js.js"></script>
|
|
<script src="components/qs.js"></script>
|
|
<script>
|
|
new Vue({
|
|
el: '#app',
|
|
name: "Department",
|
|
data() {
|
|
return {
|
|
g_loading: true,
|
|
filterText: '',
|
|
selectoptions: [],
|
|
selectvalue: '',
|
|
options: [],
|
|
defaultkey: [],
|
|
defaultProps1: {
|
|
children: 'children',
|
|
label: 'name'
|
|
},
|
|
// 右侧部门树数据
|
|
list: [],
|
|
defaultProps: {
|
|
children: 'children',
|
|
label: 'name'
|
|
},
|
|
selectdept: [],
|
|
filetype: '',
|
|
processFileNum: '',//流程数量
|
|
policyFileNum: '',//制度数量
|
|
guideFileNum: '',//操作指导数量
|
|
formFileNum: '',//表单/模板数量
|
|
treelist: []
|
|
};
|
|
},
|
|
created() {
|
|
this.rightTreedatabind()
|
|
this.leftTreedatabind();
|
|
},
|
|
watch: {
|
|
filterText(val) {
|
|
this.$refs.tree.filter(val);
|
|
}
|
|
},
|
|
methods: {
|
|
//右侧树结构
|
|
rightTreedatabind() {
|
|
let _this = this;
|
|
$.ajax({
|
|
url: api.rightTreeurl,
|
|
data: {},
|
|
dataType: "json",
|
|
type: "post",
|
|
async: true,
|
|
success: function (res) {
|
|
_this.g_loading = false
|
|
_this.list = res.data.deptTree;
|
|
if (res.data.deptTree.length > 0) {
|
|
for (let i = 0; i < res.data.fileTypes.length; i++) {
|
|
let obj = {
|
|
value: res.data.fileTypes[i].termsKey,
|
|
label: res.data.fileTypes[i].termsVal
|
|
}
|
|
_this.selectoptions.push(obj)
|
|
}
|
|
}
|
|
}
|
|
});
|
|
},
|
|
leftTreedatabind() {
|
|
let _this = this;
|
|
let qs = Qs;
|
|
let params = {
|
|
dept: _this.selectdept,
|
|
fileType: _this.filetype
|
|
}
|
|
$.ajax({
|
|
url: api.leftTreeurl,
|
|
method: 'post',
|
|
data: qs.stringify(params),
|
|
headers: {
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
}
|
|
})
|
|
.then((res) => {
|
|
_this.g_loading = false
|
|
if (res.data.fileMaps.length > 0) {
|
|
_this.options = res.data.fileMaps;
|
|
res.data.fileMaps.forEach(element => {
|
|
_this.defaultkey.push(element.ID)
|
|
});
|
|
}
|
|
let count = res.data.filesCount;
|
|
_this.processFileNum = count.processFileNum
|
|
_this.policyFileNum = count.policyFileNum
|
|
_this.guideFileNum = count.guideFileNum
|
|
_this.formFileNum = count.formFileNum
|
|
|
|
});
|
|
},
|
|
|
|
handleCheckChange(data) {
|
|
this.treelist = this.$refs.tree.getCheckedKeys()
|
|
this.selectdept = JSON.stringify(this.treelist)
|
|
if (this.treelist.length > 0) {
|
|
this.options = []
|
|
} else {
|
|
this.selectdept = ''
|
|
}
|
|
if (this.treelist.length > 0 && this.filetype) {
|
|
this.options = []
|
|
}
|
|
this.leftTreedatabind()
|
|
},
|
|
selcetchangetype(e) {
|
|
this.filetype = this.selectvalue
|
|
if (this.filetype) {
|
|
this.options = []
|
|
}
|
|
if (this.treelist.length > 0 && this.filetype) {
|
|
this.options = []
|
|
}
|
|
this.leftTreedatabind()
|
|
},
|
|
filterNode(value, data) {
|
|
if (!value) return true;
|
|
return data.name.indexOf(value) !== -1;
|
|
},
|
|
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<style scoped>
|
|
#main {
|
|
margin-top: 20px;
|
|
height: 100%;
|
|
background: #FFFFFF;
|
|
clear: both;
|
|
overflow: hidden;
|
|
}
|
|
#leftDiv {
|
|
height:100%;
|
|
float: left;
|
|
width: 70%;
|
|
min-height: 810px;
|
|
border-right: 10px solid #eeeeee;
|
|
padding-right: 20px;
|
|
box-sizing: border-box;
|
|
padding-bottom: 30px;
|
|
}
|
|
#leftDiv .cartTitle{
|
|
padding-top: 20px;
|
|
}
|
|
#rightDiv {
|
|
height: 100%;
|
|
width: 29.99%;
|
|
float: left;
|
|
}
|
|
#rightTop {
|
|
border-bottom: 10px solid #eeeeee;
|
|
padding: 20px 0;
|
|
}
|
|
#rightBottom {
|
|
margin-top: 15px;
|
|
padding: 10px 0 20px 0;
|
|
}
|
|
.search{width: 94%;margin-left:20px;}
|
|
.cartTitle {
|
|
text-align: left;
|
|
margin-left: 10px;
|
|
font-weight: bold;
|
|
}
|
|
.cartTitle span {
|
|
font-size: 18px;
|
|
margin-left: 10px;
|
|
}
|
|
.cartTab {
|
|
text-align: left;
|
|
margin-top:10px;
|
|
margin-left: 20px;
|
|
|
|
}
|
|
|
|
/* 左侧手风琴样式 */
|
|
.el-tree-node{margin-bottom: 5px}
|
|
.el-tree-node__content{ background-color: #f1f5fa!important;padding: 4px 10px!important;}
|
|
.el-tree-node__children{margin:0 10px; background: #FFFFFF;}
|
|
.el-tree-node__children .el-tree-node__content{background: #FFFFFF!important; border-bottom: 1px solid #eceff5}
|
|
.custom-tree-node{display: block; width: 100%}
|
|
.custom-tree-node label{position: absolute;right: 40px; font-size: 12px; color: #999999}
|
|
.custom-tree-node a{color: #606266}
|
|
.custom-tree-node{display: block; width: 100%}
|
|
.custom-tree-node label{position: absolute;right: 40px; font-size: 12px; color: #999999}
|
|
.custom-tree-node a{color: #606266}
|
|
.el-tree-node__content:hover{
|
|
background-color: #cee4ff !important
|
|
}
|
|
.collspse {
|
|
width: 98%;
|
|
margin-left: 1.5%;
|
|
margin-top: 30px;
|
|
}
|
|
.collapseIteamTitle {
|
|
width: 500px;
|
|
overflow: hidden;
|
|
text-align: left;
|
|
display: inline-block;
|
|
margin-left: 20px;
|
|
}
|
|
.collapseIteamMark {
|
|
font-size: 12px;
|
|
line-height: 12px;
|
|
color: #92a2b2;
|
|
}
|
|
/deep/ .el-collapse-item__content {
|
|
text-align: left;
|
|
}
|
|
|
|
#postSearchCart {
|
|
border-radius: 5px;
|
|
margin-top: 10px;
|
|
height: 200px;
|
|
border: 1px solid gainsboro;
|
|
}
|
|
#postSearch {
|
|
margin-top: 5px;
|
|
}
|
|
/* 右侧下方岗位总览区域样式 */
|
|
.postArea {
|
|
margin-top: 20px;padding-left: 5px;
|
|
}
|
|
.postInfo {
|
|
border-radius: 10px;
|
|
box-shadow: 0 0 10px #d1dbe5;
|
|
padding:10px 10px;
|
|
margin: 0 20px 10px 0;
|
|
float: left;
|
|
width: 40%;
|
|
margin-right: 2%;
|
|
line-height: 30px;
|
|
font-size: 14px;
|
|
}
|
|
.postInfo.icon1 i{display: block; width: 32px;height: 32px; float: left; background: url("static/icon1.png") no-repeat; background-size: 100%;border-radius: 100%; margin-right: 10px}
|
|
.postInfo span{display:block;color: #639; font-size: 20px;margin-left: 6px}
|
|
.postInfo.icon2 i{display: block; width: 32px;height: 32px; float: left; background: url("static/icon2.png") no-repeat; background-size: 100%;border-radius: 100%; margin-right: 10px}
|
|
.postInfo.icon3 i{display: block; width: 32px;height: 32px; float: left; background: url("static/icon3.png") no-repeat; background-size: 100%;border-radius: 100%; margin-right: 10px}
|
|
.postInfo.icon4 i{display: block; width: 32px;height: 32px; float: left; background: url("static/icon4.png") no-repeat; background-size: 100%;border-radius: 100%; margin-right: 10px}
|
|
|
|
</style>
|
|
</html>
|