| | |
| | | |
| | | .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> |
| | |
| | | justify-content: center; |
| | | } |
| | | </style> |
| | | <style> |
| | | .person_manage .el-tree-node__content { |
| | | height: 32px; |
| | | font-size: 14px; |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | .person_manage .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content { |
| | | color: #3A7BFA; |
| | | } |
| | | |
| | | .person_manage .has-gutter .el-table__cell .cell { |
| | | line-height: 34px; |
| | | background-color: #f8f8f8; |
| | | } |
| | | |
| | | .person_manage .has-gutter .el-table__cell { |
| | | background-color: #fafafa !important; |
| | | } |
| | | |
| | | .person_manage .el-table__row .cell { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .person_manage .el-table .warning-row .cell { |
| | | color: #bababa; |
| | | } |
| | | </style> |
| | | <template> |
| | | <div class="person_manage"> |
| | | <!-- <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"> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-input placeholder="输入关键字进行搜索" suffix-icon="el-icon-search" v-model="search" size="small" |
| | | style="margin-bottom: 5px;" clearable @blur="searchFilter" @clear="searchFilter"></el-input> |
| | | style="margin-bottom: 5px;" clearable @blur="searchFilter" @clear="searchFilter" @keyup.enter.native="searchFilter()"></el-input> |
| | | </el-col> |
| | | <el-col :span="4" style="text-align: center;line-height: 30px;" v-if="addPower"> |
| | | <el-button type="primary" icon="el-icon-plus" size="mini" circle @click="handleAdd"></el-button> |
| | |
| | | <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"> |
| | |
| | | name: null, |
| | | state: null, |
| | | company: null, |
| | | departId:null, |
| | | orderBy:{ |
| | | field: 'id', |
| | | order: 'asc' |
| | |
| | | }, */ |
| | | requiredAdd:['account','name','state','roleId','password','nameEn','phone'], |
| | | requiredUp:['account','name','state','roleId','nameEn','phone'], |
| | | // disabledUp:['departId'], |
| | | addUpload:['pictureUrl','signatureUrl'], |
| | | addUploadConfig:{ |
| | | accept:'.png, .jpg, .jpeg, .gif', |
| | |
| | | upIndex: 0, |
| | | addDia: false, |
| | | addPower: true, |
| | | delStandardTree:true, |
| | | addDia0:false, |
| | | addOb:{ |
| | | fatherId:'', |
| | |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | // this.upIndex++ |
| | | this.refreshTable() |
| | | }, |
| | | upUser(row){ |
| | | console.log(row); |
| | |
| | | }) |
| | | }, |
| | | opeaAdd(){ |
| | | if(!this.addOb.fatherId||this.selectTree==''||this.selectTree=='全部'){ |
| | | this.$message.error('请选择一个组织') |
| | | return |
| | | } |
| | | this.$refs.ValueTable.openAddDia(this.$api.user.addUser); |
| | | this.$refs['ValueTable'].upData.departId = this.selectTree |
| | | }, |
| | | selectTreeList(){ |
| | | /* this.$axios.get(this.$api.department.selectDepartment).then(res => { |
| | |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let add = false |
| | | let delStandardTree = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if(power[i].menuMethod=='updateUser'){ |
| | | up = true |
| | |
| | | if(power[i].menuMethod=='addUser'){ |
| | | add = true |
| | | } |
| | | if(power[i].menuMethod=='delDepartment'){ |
| | | delStandardTree = true |
| | | } |
| | | } |
| | | if(!up){ |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.delStandardTree = delStandardTree |
| | | this.addPower = add |
| | | }, |
| | | handleAdd(){ |
| | |
| | | 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" |
| | |
| | | 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> |