|
@@ -6,18 +6,23 @@
|
|
|
<span :class="!defaultGroup&&!defaultDepart?'act':''">弘则研究</span>
|
|
|
</div>
|
|
|
<el-tree
|
|
|
- ref="departTree"
|
|
|
- class="depart_tree"
|
|
|
- style="marginTop:27px;"
|
|
|
- :data="departArr"
|
|
|
- node-key="DepartmentId"
|
|
|
- :props="defaultProp"
|
|
|
- default-expand-all
|
|
|
- check-strictly
|
|
|
- empty-text="暂无部门">
|
|
|
+ ref="departTree"
|
|
|
+ class="depart_tree"
|
|
|
+ style="marginTop:27px;"
|
|
|
+ :data="departArr"
|
|
|
+ node-key="unicodeKey"
|
|
|
+ :props="defaultProp"
|
|
|
+ default-expand-all
|
|
|
+ draggable
|
|
|
+ :allow-drag="checkAllowDrag"
|
|
|
+ :allow-drop="checkAllowDrop"
|
|
|
+ check-strictly
|
|
|
+ empty-text="暂无部门"
|
|
|
+ @node-drop="handleDropOver">
|
|
|
<span class="custom-tree-node" slot-scope="{node,data}" @click="clickNode(node,data)">
|
|
|
<span>{{ node.label }}</span>
|
|
|
- <span style="display:flex;alignItems:center;" v-show="act_node===data.DepartmentId">
|
|
|
+ <span style="display:flex;alignItems:center;" v-show="act_node===data.unicodeKey">
|
|
|
+ <img src="~@/assets/img/data_m/move_ico.png" alt="" style="width:12px;height:12px;marginRight:10px;" @click.stop>
|
|
|
<img src="~@/assets/img/set_m/add.png" alt="" style="width:12px;height:12px;marginRight:10px;" @click.stop="addNode(data)" v-if="data.IsDepartment">
|
|
|
<img src="~@/assets/img/set_m/add.png" alt="" style="width:12px;height:12px;marginRight:10px;" @click.stop="addNode(data)" v-if="data.IsGroup">
|
|
|
<img src="~@/assets/img/set_m/edit.png" alt="" style="width:12px;height:12px;marginRight:10px;" @click.stop="editNode(data)">
|
|
@@ -98,16 +103,17 @@
|
|
|
<span :style="{color:scope.row.Enabled===0?'#FF0000':null}">{{scope.row.Enabled===0?'禁用':'启用'}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center">
|
|
|
+ <el-table-column label="操作" align="center" width="260">
|
|
|
<template slot-scope="scope">
|
|
|
- <div style="color:#4099ef; font-size:24px;">
|
|
|
- <span class="editsty" @click.stop="editUser(scope.row)" style="marginRight:20px;">编辑</span>
|
|
|
- <span class="deletesty" @click.stop="delUser(scope.row)">删除</span>
|
|
|
+ <div style="color:#4099ef; font-size:24px;display: flex;gap:0 10px;">
|
|
|
+ <span class="editsty" @click.stop="editUser(scope.row)">编辑</span>
|
|
|
+ <span class="editsty" @click.stop="resetPassWord(scope.row)">重置密码</span>
|
|
|
+ <span class="editsty" @click.stop="moveDepart(scope.row)">移动分组</span>
|
|
|
<span
|
|
|
class="editsty"
|
|
|
- style="margin-left:20px;margin-right:0"
|
|
|
@click.stop="handleChangeStatus(scope.row)"
|
|
|
>{{scope.row.Enabled===0?'启用':'禁用'}}</span>
|
|
|
+ <span class="deletesty" @click.stop="delUser(scope.row)">删除</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -122,9 +128,10 @@
|
|
|
background
|
|
|
:current-page="page_no"
|
|
|
@current-change="handleCurrentChange"
|
|
|
- :page-size="pageSize"
|
|
|
+ :page-size="pageSize"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
:total="total"
|
|
|
- style="float:right;">
|
|
|
+ style="float:right;margin-top: 20px;">
|
|
|
</el-pagination>
|
|
|
</el-col>
|
|
|
<!-- 用户详情右侧弹窗 -->
|
|
@@ -173,17 +180,17 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
<el-popover
|
|
|
- placement="left-start"
|
|
|
+ placement="left"
|
|
|
:title="userObj.name+'权限'"
|
|
|
width="560"
|
|
|
trigger="hover">
|
|
|
- <div class="auth_cont" style="padding:30px 0">
|
|
|
+ <div class="auth_cont" style="padding:30px 0;max-height: 70vh; overflow-y: auto;">
|
|
|
<template v-if="authList.length">
|
|
|
- <div v-for="item in authList" :key="item.Name" class="menu_item">
|
|
|
+ <div v-for="item in authList" :key="item" class="menu_item">
|
|
|
<el-checkbox v-model="item.checkAll" disabled>{{item.Name}}</el-checkbox>
|
|
|
<div style="margin: 15px 0; padding:24px;border:1px solid #DCDFE6">
|
|
|
<el-checkbox-group v-model="item.CheckList" disabled>
|
|
|
- <el-checkbox v-for="list in item.Child" :label="list.MenuId" :key="list.MenuId">{{list.Name}}</el-checkbox>
|
|
|
+ <el-checkbox v-for="list in item.Child" :label="list.MenuId" :key="list">{{list.Name}}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -268,8 +275,10 @@
|
|
|
<el-button style="width:80px;" @click="cancelHandle(2)">取消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <!-- 添加用户 -->
|
|
|
- <el-dialog
|
|
|
+ <!-- 添加用户
|
|
|
+ 研报后台5.9后拆成组件重写了,这块没实际用到,留着参考
|
|
|
+ -->
|
|
|
+ <!-- <el-dialog
|
|
|
:title="userForm.title"
|
|
|
:visible.sync="isAddUser"
|
|
|
:close-on-click-modal="false"
|
|
@@ -320,7 +329,6 @@
|
|
|
v-model="userForm.depart"
|
|
|
:props="form_departProp"
|
|
|
placeholder="请选择部门分组"
|
|
|
- @change="changeDepart"
|
|
|
:key="cascaderIdx"
|
|
|
style="width:90%"
|
|
|
clearable
|
|
@@ -336,7 +344,6 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <!-- <template v-if="isExtraUserFormItemShow"> -->
|
|
|
<el-form-item label="研究方向" prop="direct">
|
|
|
<el-cascader
|
|
|
collapse-tags
|
|
@@ -361,12 +368,6 @@
|
|
|
@province="provinceChange"
|
|
|
></v-distpicker>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="头像" prop="img_url">
|
|
|
- <input type="file" name="file" @change="fileSelected()" id="file" class="true-file" style="display:none;">
|
|
|
- <el-input type="text" v-model="userForm.img_url" placeholder="上传图片" readonly size="medium" style="width:350px;"></el-input>
|
|
|
- <el-button type="primary" size="medium" @click.native="clickinput" :loading="uploadloading">{{uploadloading?'上传中':'选择图片'}}</el-button>
|
|
|
- </el-form-item> -->
|
|
|
- <!-- </template> -->
|
|
|
<el-form-item label="职务" prop="post">
|
|
|
<el-input
|
|
|
v-model="userForm.post"
|
|
@@ -389,22 +390,12 @@
|
|
|
<el-radio :label="0">禁用</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="管理权限" prop="auth">
|
|
|
- <el-select v-model="userForm.auth" placeholder="管理权限" style="width:90%">
|
|
|
- <el-option
|
|
|
- v-for="item in authArr"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item> -->
|
|
|
</el-form>
|
|
|
<div style="display:flex;justify-content:center;margin:75px 0 26px;">
|
|
|
<el-button type="primary" style="width:80px;marginRight:24px;" @click="saveUser">保存</el-button>
|
|
|
<el-button style="width:80px;" @click="cancelHandle(3)">取消</el-button>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
<!-- 编辑分组 -->
|
|
|
<el-dialog
|
|
|
title="编辑分组"
|
|
@@ -438,6 +429,64 @@
|
|
|
<el-button style="width:80px;" @click="cancelHandle(4)">取消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 添加用户弹窗 -->
|
|
|
+ <Add-User-Dialog
|
|
|
+ ref="addUserDialog"
|
|
|
+ :isAddUserDialogShow="isAddUser"
|
|
|
+ :userForm="userForm"
|
|
|
+ :departArr="departArr"
|
|
|
+ :roleArr="roleArr"
|
|
|
+ :hasEmployeeNo="hasEmployeeNo"
|
|
|
+ :researchGroup="researchGroup"
|
|
|
+ @close="cancelHandle(3)"
|
|
|
+ @save="saveUser"
|
|
|
+ @selectRegion="selectRegion"
|
|
|
+ />
|
|
|
+ <!-- 重置密码 -->
|
|
|
+ <el-dialog
|
|
|
+ class="custom-dialog"
|
|
|
+ title="重置密码"
|
|
|
+ :visible.sync="isResetPasswordShow"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ @close="isResetPasswordShow=false" center width="460px" v-dialogDrag
|
|
|
+ >
|
|
|
+ <div class="dialog-container">
|
|
|
+ <el-form ref="resetForm" :model="resetForm" :rules="resetRules" label-width="100px">
|
|
|
+ <el-form-item label="新密码" prop="password">
|
|
|
+ <el-input v-model="resetForm.password" style="width:100%" :show-password="true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="确认新密码" prop="check">
|
|
|
+ <el-input v-model="resetForm.check" style="width:100%" :show-password="true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div style="display:flex;justify-content:center;margin:26px 0">
|
|
|
+ <el-button type="primary" style="width:80px;margin-right:24px;" @click="resetPassWord(_,'execute')">保存</el-button>
|
|
|
+ <el-button style="width:80px;" @click="isResetPasswordShow=false">取消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 移动分组 -->
|
|
|
+ <el-dialog
|
|
|
+ title="移动分组"
|
|
|
+ :visible.sync="isMoveDepartShow"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ @close="isMoveDepartShow=false" center width="460px" v-dialogDrag
|
|
|
+ >
|
|
|
+ <div class="dialog-cotainer">
|
|
|
+ <div class="form-item" style="display: flex;align-items: center;">
|
|
|
+ <p style="width:90px">选择分组</p>
|
|
|
+ <el-cascader :options="departArr" v-model="resetDepart" :props="form_departProp" style="width:100%"
|
|
|
+ placeholder="请选择部门分组">
|
|
|
+ </el-cascader>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex;justify-content:center;margin:26px 0">
|
|
|
+ <el-button type="primary" style="width:80px;margin-right:24px;" @click="moveDepart(_,'execute')">保存</el-button>
|
|
|
+ <el-button style="width:80px;" @click="isMoveDepartShow=false">取消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -540,12 +589,6 @@ export default {
|
|
|
},//用户弹框表单
|
|
|
// 是否有工号
|
|
|
hasEmployeeNo:false,
|
|
|
- form_departProp:{
|
|
|
- value:'DepartmentId',
|
|
|
- label:'DepartmentName',
|
|
|
- children:'Child',
|
|
|
- checkStrictly:true
|
|
|
- },//部门分组选择配置
|
|
|
userRule:{
|
|
|
account:[
|
|
|
{ required: true, message: '登录账号不能为空', trigger: 'blur' },
|
|
@@ -627,8 +670,14 @@ export default {
|
|
|
},//用户详情信息
|
|
|
authList:[],//权限列表
|
|
|
click_roleId:'',//角色id
|
|
|
- province_sorce:province_sorce,
|
|
|
- city_sorce:city_sorce
|
|
|
+ province_sorce:province_sorce,
|
|
|
+ city_sorce:city_sorce,
|
|
|
+ form_departProp:{
|
|
|
+ value:'DepartmentId',
|
|
|
+ label:'DepartmentName',
|
|
|
+ children:'Child',
|
|
|
+ checkStrictly:true
|
|
|
+ },//部门分组选择配置
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -676,6 +725,26 @@ export default {
|
|
|
departInterence.getDepartList().then(res => {
|
|
|
if(res.Ret === 200) {
|
|
|
this.departArr = res.Data.List || []
|
|
|
+ //给节点增加唯一key和parentkey
|
|
|
+ this.departArr = this.departArr.map(depart=>{
|
|
|
+ depart.unicodeKey='depart_'+depart.DepartmentId
|
|
|
+ depart.parentKey = 0
|
|
|
+ if(depart.Child){
|
|
|
+ depart.Child = depart.Child.map(group=>{
|
|
|
+ group.unicodeKey = 'group_'+group.DepartmentId
|
|
|
+ group.parentKey = depart.unicodeKey
|
|
|
+ if(group.Child){
|
|
|
+ group.Child = group.Child.map(team=>{
|
|
|
+ team.unicodeKey = 'team_'+team.DepartmentId
|
|
|
+ team.parentKey = group.unicodeKey
|
|
|
+ return team
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return group
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return depart
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -731,7 +800,7 @@ export default {
|
|
|
},
|
|
|
// 节点点击时显示操作按钮更新表格
|
|
|
clickNode(e,data) {
|
|
|
- this.act_node = data.DepartmentId;
|
|
|
+ this.act_node = data.unicodeKey;
|
|
|
/* 部门节点 */
|
|
|
if(data.IsDepartment) {
|
|
|
this.defaultDepart = data.DepartmentId;
|
|
@@ -1004,15 +1073,15 @@ export default {
|
|
|
/* 保存用户 */
|
|
|
saveUser() {
|
|
|
console.log(this.userForm.depart);
|
|
|
- this.$refs.userForm.validate((valid) => {
|
|
|
+ //转换研究方向字段数据,如果有
|
|
|
+ let ResearchGroupIds = []
|
|
|
+ if(this.userForm.direct){
|
|
|
+ this.userForm.direct.forEach(item=>{
|
|
|
+ ResearchGroupIds.push(item[item.length-1])
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.$refs.addUserDialog.$refs.userForm.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- //转换研究方向字段数据,如果有
|
|
|
- let ResearchGroupIds = []
|
|
|
- if(this.userForm.direct){
|
|
|
- this.userForm.direct.forEach(item=>{
|
|
|
- ResearchGroupIds.push(item[item.length-1])
|
|
|
- })
|
|
|
- }
|
|
|
/* 新增 */
|
|
|
if(this.userForm.title == '添加用户') {
|
|
|
let params = {
|
|
@@ -1021,7 +1090,7 @@ export default {
|
|
|
EmployeeId:this.userForm.employeeNumber.replaceAll(' ',''),
|
|
|
Authority: this.userForm.auth,
|
|
|
DepartmentId: Number(this.userForm.depart[0]),
|
|
|
- GroupId: Number(this.userForm.depart[1]),
|
|
|
+ GroupId:this.userForm.depart[1] ? Number(this.userForm.depart[1]) : 0,
|
|
|
TeamId:this.userForm.depart[2] ? Number(this.userForm.depart[2]) : 0,
|
|
|
Mobile: this.userForm.mobile,
|
|
|
Position: this.userForm.post,
|
|
@@ -1141,7 +1210,7 @@ export default {
|
|
|
auth:'无',
|
|
|
status:1
|
|
|
},
|
|
|
- this.$refs.userForm.resetFields();//重置校验
|
|
|
+ this.$refs.addUserDialog.$refs.userForm.resetFields();//重置校验
|
|
|
this.isAddUser = false;
|
|
|
}else if(type === 4) {
|
|
|
this.editGroupForm = {
|
|
@@ -1194,16 +1263,6 @@ export default {
|
|
|
this.isShowUserdtl = false;
|
|
|
this.$refs.userTable.setCurrentRow();
|
|
|
},
|
|
|
- // 用户弹窗部门选择变化
|
|
|
- changeDepart(val) {
|
|
|
- //console.log('???',val)
|
|
|
- //如果是FICC研究部(val[0]===1),则显示额外必填项
|
|
|
- /* if(val[0]===1){
|
|
|
- this.isExtraUserFormItemShow = true
|
|
|
- }else{
|
|
|
- this.isExtraUserFormItemShow = false
|
|
|
- } */
|
|
|
- },
|
|
|
/* 编辑用户信息 */
|
|
|
async editUser(item) {
|
|
|
let departArr = [];
|
|
@@ -1393,8 +1452,8 @@ export default {
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
top: 0;
|
|
|
- // bottom: 0;
|
|
|
- min-height: 100%;
|
|
|
+ bottom: 0;
|
|
|
+ overflow-y: hidden;
|
|
|
z-index: 2;
|
|
|
box-shadow: -3px 0 6px rgba(0, 0, 0, 0.1);
|
|
|
border: 1px solid #ececec;
|
|
@@ -1408,6 +1467,8 @@ export default {
|
|
|
margin-bottom: 40px;
|
|
|
font-size: 16px;
|
|
|
color: #333;
|
|
|
+ height: calc(100% - 120px);
|
|
|
+ overflow-y: auto;
|
|
|
.info_item {
|
|
|
margin-bottom: 20px;
|
|
|
.item_tit {
|