From 69acb8efd5f318e7c08727d3f071eceab1edc846 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 15 五月 2024 11:18:23 +0800
Subject: [PATCH] 完成人员树形前端页面
---
src/components/view/person-manage.vue | 53 ++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 44 insertions(+), 9 deletions(-)
diff --git a/src/components/view/person-manage.vue b/src/components/view/person-manage.vue
index 9003944..1361188 100644
--- a/src/components/view/person-manage.vue
+++ b/src/components/view/person-manage.vue
@@ -46,32 +46,31 @@
.search {
background-color: #fff;
- height: 80px;
+ height: 60px;
display: flex;
align-items: center;
}
.search_thing {
- width: 350px;
+ width: 250px;
display: flex;
align-items: center;
}
.search_label {
- width: 110px;
+ width: 90px;
font-size: 14px;
text-align: right;
}
.search_input {
- width: calc(100% - 110px);
+ width: calc(100% - 90px);
}
.table {
- margin-top: 10px;
+ margin-top: 4px;
background-color: #fff;
- height: calc(100% - 100px);
- padding: 20px;
+ height: calc(100% - 44px);
}
</style>
<style>
@@ -89,8 +88,7 @@
<!-- <el-row class="title">
<el-col :span="12" style="padding-left: 20px;">鐢ㄦ埛绠$悊</el-col>
<el-col :span="12" style="text-align: right;">
- <el-button size="medium" type="primary" @click="openthirdParty">鑾峰彇涓夋柟浜哄憳</el-button>
- <el-button size="medium" type="primary" @click="opeaAdd" v-if="addPower">鏂板鐢ㄦ埛</el-button>
+
</el-col>
</el-row> -->
<div class="left">
@@ -150,6 +148,10 @@
<div class="search_thing" style="padding-left: 30px;">
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ </div>
+ <div class="search_thing">
+ <el-button size="small" type="primary" @click="openthirdParty">鑾峰彇涓夋柟浜哄憳</el-button>
+ <el-button size="small" type="primary" @click="opeaAdd" v-if="addPower">鏂板鐢ㄦ埛</el-button>
</div>
</div>
<div class="table">
@@ -313,6 +315,7 @@
upIndex: 0,
addDia: false,
addPower: true,
+ delStandardTree:true,
addDia0:false,
addOb:{
fatherId:'',
@@ -430,6 +433,12 @@
nodeClose(data, node, el) {
$($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder')
},
+ getNodeParent(val) {
+ if (val.parent != null) {
+ this.selectTree += ' - ' + val.label
+ this.getNodeParent(val.parent)
+ }
+ },
remove(node, data) {
this.$confirm("鏄惁鍒犻櫎璇ュ眰绾�", "鎻愮ず", {
type: "error"
@@ -461,6 +470,32 @@
this.refreshTable()
})
},
+ addStandardTree() {
+ if (this.addOb.name == null || this.addOb.factory == '') {
+ this.$message.error('鏋勬灦鍚嶇О鏄繀濉」')
+ return
+ }
+ this.addLoad = true
+ this.$axios.post(this.$api.department.addDepartment, this.addOb, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ if (res.code === 201) {
+ this.addLoad = false
+ return
+ }
+ this.$message.success('娣诲姞鎴愬姛')
+ this.addDia0 = false
+ this.selectTreeList()
+ this.addLoad = false
+ this.addOb.name = ''
+ this.addOb.fatherId = ''
+ }).catch(e => {
+ this.addDia0 = false
+ this.addLoad = false
+ })
+ },
}
}
</script>
--
Gitblit v1.9.3