|
@@ -110,7 +110,6 @@ |
|
|
> |
|
|
> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="userRoleTypeName" |
|
|
|
|
|
label="性别"> |
|
|
label="性别"> |
|
|
<template slot-scope="{row}"> |
|
|
<template slot-scope="{row}"> |
|
|
{{row.sex==0?'男':'女'}} |
|
|
{{row.sex==0?'男':'女'}} |
|
@@ -171,36 +170,34 @@ |
|
|
> |
|
|
> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="userRoleTypeName" |
|
|
|
|
|
label="性别"> |
|
|
|
|
|
|
|
|
prop="orgName" |
|
|
|
|
|
label="所属组织"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="所属组织" |
|
|
|
|
|
label="公司"> |
|
|
|
|
|
|
|
|
prop="" |
|
|
|
|
|
label="组织类型"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="createTime" |
|
|
prop="createTime" |
|
|
label="注册时间"> |
|
|
|
|
|
|
|
|
label="组织角色"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="createTime" |
|
|
|
|
|
label="用户身份"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="createTime" |
|
|
|
|
|
label="状态"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="createTime" |
|
|
|
|
|
label="添加时间"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="address" |
|
|
prop="address" |
|
|
label="操作"> |
|
|
label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-tooltip style="font-size:18px" effect="dark" content="密码重置" placement="top-start"> |
|
|
|
|
|
<i class="el-icon-unlock" style="color:#ff892a;" @click="resetPwd(scope.row)"></i> |
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
<el-tooltip style="font-size:18px" effect="dark" content="查看" placement="top-start"> |
|
|
|
|
|
<i class="el-icon-zoom-in" style="color:#008EF2;" @click="editRole(scope.row,true)"></i> |
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
<el-tooltip style="font-size:18px" effect="dark" content="编辑" placement="top-start"> |
|
|
|
|
|
<i class="el-icon-edit" style="color:red" @click="editRole(scope.row,false)"></i> |
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
<el-tooltip style="font-size:18px" effect="dark" content="删除" placement="top-start"> |
|
|
|
|
|
<i class="el-icon-close" style="color:#428bca" @click="deletes(scope.row)"></i> |
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
<el-tooltip style="font-size:18px" effect="dark" content="修改客户信息状态" placement="top-start"> |
|
|
|
|
|
<i class="el-icon-view" style="color:#428bca" @click="editStatus(scope.row)"></i> |
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
|
|
|
<el-button @click="gochosehouse(scope.row)" type="text" size="small">楼盘选择</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
@@ -220,92 +217,70 @@ |
|
|
|
|
|
|
|
|
<el-dialog :title="formTitle" :visible.sync="dialogFormVisible" @close='resetForm'> |
|
|
<el-dialog :title="formTitle" :visible.sync="dialogFormVisible" @close='resetForm'> |
|
|
<el-form :model="form" label-width="120px" ref="form" :rules="rules" :disabled='editFlag'> |
|
|
<el-form :model="form" label-width="120px" ref="form" :rules="rules" :disabled='editFlag'> |
|
|
<el-form-item label="状态:"> |
|
|
|
|
|
<el-switch v-model="form.lockFlag" active-value="0" inactive-value="9"></el-switch> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="性别:" prop="sex"> |
|
|
|
|
|
<el-select v-model="form.sex" placeholder="请选择性别"> |
|
|
|
|
|
<el-option label="男" value="0"></el-option> |
|
|
|
|
|
<el-option label="女" value="1"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="用户类型:" prop="sign" v-if="sign!=1"> |
|
|
|
|
|
<el-select v-model="form.sign" placeholder="请选择用户类型" @change="signChange"> |
|
|
|
|
|
<el-option label="系统用户" :value="0"></el-option> |
|
|
|
|
|
<el-option label="公司用户" :value="1"></el-option> |
|
|
|
|
|
<el-option label="运营用户" :value="2"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
<el-form-item label="登录手机" prop="username"> |
|
|
|
|
|
<el-input v-model="form.username" :disabled='phoneFlag' style="width:370px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="用户名" prop="name"> |
|
|
|
|
|
<el-input v-model="form.name" :disabled='phoneFlag' style="width:370px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="性别" prop="sex"> |
|
|
|
|
|
<el-radio-group v-model="form.sex"> |
|
|
|
|
|
<el-radio label="0">男</el-radio> |
|
|
|
|
|
<el-radio label="1">女</el-radio> |
|
|
|
|
|
</el-radio-group> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="身份:" prop="userRoleType" v-if="sign==1||form.sign==1"> |
|
|
|
|
|
<el-select v-model="form.userRoleType" placeholder="请选择用户身份"> |
|
|
|
|
|
<el-option label="项目总" value="2"></el-option> |
|
|
|
|
|
<el-option label="客服" value="3"></el-option> |
|
|
|
|
|
<el-option label="策划" value="4"></el-option> |
|
|
|
|
|
<el-option label="经理" value="5"></el-option> |
|
|
|
|
|
<el-option label="置业顾问" value="6"></el-option> |
|
|
|
|
|
|
|
|
<el-form-item label="登录密码" prop="password" v-if="!phoneFlag"> |
|
|
|
|
|
<el-input v-model="form.password" style="width:370px" show-password></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="组织类型:" prop="orgType"> |
|
|
|
|
|
<el-select v-model="form.orgType" placeholder="请选择组织类型" style="width:370px" @change="typeChange"> |
|
|
|
|
|
<el-option label="平台" :value="0"></el-option> |
|
|
|
|
|
<el-option label="代理商" :value="1"></el-option> |
|
|
|
|
|
<el-option label="公司" :value="2"></el-option> |
|
|
|
|
|
<el-option label="楼盘" :value="3"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="登录名:" prop="username"> |
|
|
|
|
|
<el-input v-model="form.username" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="公司:" prop="deptId" > |
|
|
|
|
|
<!-- <el-form-item label="公司:" prop="deptId" v-if="form.sign==1"> --> |
|
|
|
|
|
<!-- <el-select size="small" placeholder="请选择" clearable v-model="form.deptName" @clear="selectClear"> |
|
|
|
|
|
<el-option class="option-style" :label="form.deptName" :value="form.deptId"> |
|
|
|
|
|
<el-input class="search" size="small" placeholder="输入关键字进行过滤" v-model="keywork" @click.stop.native></el-input> |
|
|
|
|
|
<el-tree |
|
|
|
|
|
ref="tree" |
|
|
|
|
|
:data="deptTreeList" |
|
|
|
|
|
:props="treeProps" |
|
|
|
|
|
:filter-node-method="filterNode" |
|
|
|
|
|
@node-click="nodeClick" |
|
|
|
|
|
@check-change="checkChange"> |
|
|
|
|
|
<div slot-scope="{node, data}"> |
|
|
|
|
|
<span :class="[{'tree-click': treeClick==data.aid}]">{{data.name}}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-tree> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> --> |
|
|
|
|
|
<avue-input-tree |
|
|
|
|
|
ref="tree" |
|
|
|
|
|
v-model="form.deptId" |
|
|
|
|
|
:dic="deptTreeList" |
|
|
|
|
|
:props="defaultProps1" |
|
|
|
|
|
@change="nodeClick($event)" |
|
|
|
|
|
@blur="radioBlur" |
|
|
|
|
|
placeholder="请选择所属公司"/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<!-- <el-form-item label="公司角色:" v-if="roelFlag&&form.sign==1" prop="userRoleId"> --> |
|
|
|
|
|
<el-form-item label="公司角色:" v-if="roelFlag" prop="userRoleId"> |
|
|
|
|
|
<el-select v-model="form.userRoleId" placeholder="请选择公司角色" @change="userRoleIdChange"> |
|
|
|
|
|
|
|
|
<el-form-item label="选择公司:" v-if="orgFlag" prop="orgCode"> |
|
|
|
|
|
<el-select v-model="form.orgCode" filterable placeholder="请选择公司" style="width:370px" @change="orgCodeChange($event,0)"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in RoleByOrgCodeList" |
|
|
|
|
|
:key="item.roleId" |
|
|
|
|
|
:label="item.roleName" |
|
|
|
|
|
:value="item.roleId" |
|
|
|
|
|
|
|
|
v-for="item in orgList" |
|
|
|
|
|
:key="item.orgCode" |
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
:value="item.orgCode" |
|
|
> |
|
|
> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="用户名:" prop="name"> |
|
|
|
|
|
<el-input v-model="form.name" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="楼盘:" prop="houseIdList" v-if="form.sign!=0"> |
|
|
|
|
|
<el-select v-model="houseIdList" multiple value-key="key" placeholder="请选择楼盘" @change="houseListChange"> |
|
|
|
|
|
|
|
|
<el-form-item label="选择代理商:" v-if="agentFlag" prop="agentId"> |
|
|
|
|
|
<el-select v-model="form.agentId" filterable placeholder="请选择代理商" style="width:370px" @change="orgCodeChange($event,1)"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in houseNameList" |
|
|
|
|
|
|
|
|
v-for="item in agentList" |
|
|
:key="item.id" |
|
|
:key="item.id" |
|
|
:label="item.propertyName" |
|
|
|
|
|
|
|
|
:label="item.agentName" |
|
|
:value="item.id" |
|
|
:value="item.id" |
|
|
> |
|
|
> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="证件号码:" prop="identityId"> |
|
|
|
|
|
<el-input v-model="form.identityId" ></el-input> |
|
|
|
|
|
|
|
|
<el-form-item label="角色:" v-if="roleFlag" prop="roleId"> |
|
|
|
|
|
<el-select v-model="form.roleId" filterable value-key="key" style="width:370px" placeholder="请选择角色"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in userList" |
|
|
|
|
|
:key="item.roleId" |
|
|
|
|
|
:label="item.roleName" |
|
|
|
|
|
:value="item.roleId" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="描述:" prop="description"> |
|
|
|
|
|
<el-input v-model="form.description" type="textarea"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item label="身份" prop="userRoleType" v-if="identityFlag"> |
|
|
|
|
|
<el-select v-model="form.userRoleType" value-key="key" style="width:370px" placeholder="请选择身份" > |
|
|
|
|
|
<el-option label="项目总" value="2"></el-option> |
|
|
|
|
|
<el-option label="客服" value="3"></el-option> |
|
|
|
|
|
<el-option label="策划" value="4"></el-option> |
|
|
|
|
|
<el-option label="经理" value="5"></el-option> |
|
|
|
|
|
<el-option label="置业顾问" value="6"></el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
@@ -371,6 +346,10 @@ |
|
|
keywork: '', //搜索关键字 |
|
|
keywork: '', //搜索关键字 |
|
|
selectLabel: '', //下拉框显示名称 |
|
|
selectLabel: '', //下拉框显示名称 |
|
|
selectValue: '', |
|
|
selectValue: '', |
|
|
|
|
|
orgFlag:false, |
|
|
|
|
|
roleFlag:false, |
|
|
|
|
|
identityFlag:false, |
|
|
|
|
|
agentFlag:false, |
|
|
treeProps: { |
|
|
treeProps: { |
|
|
children: "children", |
|
|
children: "children", |
|
|
label: "label" |
|
|
label: "label" |
|
@@ -411,22 +390,20 @@ |
|
|
listLoading: true, |
|
|
listLoading: true, |
|
|
role: [], |
|
|
role: [], |
|
|
houseIdList:[], |
|
|
houseIdList:[], |
|
|
|
|
|
agentList:[], |
|
|
codeOrg:'', |
|
|
codeOrg:'', |
|
|
form: { |
|
|
form: { |
|
|
lockFlag:"0",//状态 |
|
|
|
|
|
sex:'',//性别 |
|
|
|
|
|
sign:null,//用户类型 |
|
|
|
|
|
username:'',//用户名 |
|
|
|
|
|
deptName:'', |
|
|
|
|
|
userRoleType:null, |
|
|
|
|
|
deptId:'',//公司id |
|
|
|
|
|
name:'',//用户名 |
|
|
name:'',//用户名 |
|
|
houseIdList:'',//楼盘id |
|
|
|
|
|
identityId:'',//证件号码 |
|
|
|
|
|
description:'',//描述 |
|
|
|
|
|
userRoleId:'', |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
username:'',//手机号 |
|
|
|
|
|
sex:'0',//性别 |
|
|
|
|
|
password:'',//密码 |
|
|
|
|
|
orgType:'',//组织类型 |
|
|
|
|
|
roleId:'',//角色id |
|
|
|
|
|
agentId:'',//代理商id |
|
|
|
|
|
orgCode:'',//公司标识 |
|
|
|
|
|
userRoleType:'',//身份 |
|
|
}, |
|
|
}, |
|
|
|
|
|
phoneFlag:false, |
|
|
rolesOptions: [], |
|
|
rolesOptions: [], |
|
|
searchMsg:{ |
|
|
searchMsg:{ |
|
|
flag:'1', |
|
|
flag:'1', |
|
@@ -448,7 +425,7 @@ |
|
|
roleNameList:[], |
|
|
roleNameList:[], |
|
|
editFlag:false, |
|
|
editFlag:false, |
|
|
addFlag:true, |
|
|
addFlag:true, |
|
|
houseNameList:[], |
|
|
|
|
|
|
|
|
userList:[], |
|
|
orgNameList:[], |
|
|
orgNameList:[], |
|
|
RoleByOrgCodeList:[], |
|
|
RoleByOrgCodeList:[], |
|
|
tableData:[], |
|
|
tableData:[], |
|
@@ -478,36 +455,35 @@ |
|
|
passwordRules:{ |
|
|
passwordRules:{ |
|
|
password: [ |
|
|
password: [ |
|
|
{ required: true, message: '请填写密码', trigger: 'blur' }, |
|
|
{ required: true, message: '请填写密码', trigger: 'blur' }, |
|
|
|
|
|
{ min: 6, max: 11, message: '长度在 6 到 11 位', trigger: 'blur' } |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
rules:{ |
|
|
rules:{ |
|
|
sex: [ |
|
|
|
|
|
{ required: true, message: '请选择性别', trigger: 'blur' }, |
|
|
|
|
|
|
|
|
username: [ |
|
|
|
|
|
{ required: true, message: '请填写登录手机', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
name: [ |
|
|
|
|
|
{ required: true, message: '请填写用户名', trigger: 'blur' }, |
|
|
], |
|
|
], |
|
|
sign: [ |
|
|
|
|
|
{ required: true, message: '请选择用户类型', trigger: 'blur' }, |
|
|
|
|
|
|
|
|
password: [ |
|
|
|
|
|
{ required: true, message: '请填写密码', trigger: 'blur' }, |
|
|
|
|
|
{ min: 6, max: 11, message: '长度在 6 到 11 位', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
username: [ |
|
|
|
|
|
{ required: true, message: '请填写用户登录名', trigger: 'blur' }, |
|
|
|
|
|
|
|
|
orgType: [ |
|
|
|
|
|
{ required: true, message: '请选择组织类型', trigger: 'blur' }, |
|
|
], |
|
|
], |
|
|
roleName: [ |
|
|
|
|
|
{ required: true, message: '请选择用户角色', trigger: 'blur' }, |
|
|
|
|
|
|
|
|
agentId: [ |
|
|
|
|
|
{ required: true, message: '请选择代理商', trigger: 'blur' }, |
|
|
], |
|
|
], |
|
|
deptId: [ |
|
|
|
|
|
|
|
|
orgCode: [ |
|
|
{ required: true, message: '请选择公司', trigger: 'blur' }, |
|
|
{ required: true, message: '请选择公司', trigger: 'blur' }, |
|
|
], |
|
|
], |
|
|
name: [ |
|
|
|
|
|
{ required: true, message: '请输入用户名', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
userRoleId:[ |
|
|
|
|
|
{ required: true, message: '请选择公司角色', trigger: 'blur' }, |
|
|
|
|
|
|
|
|
roleId:[ |
|
|
|
|
|
{ required: true, message: '请选择角色', trigger: 'blur' }, |
|
|
], |
|
|
], |
|
|
userRoleType:[ |
|
|
userRoleType:[ |
|
|
{ required: true, message: '请选择角色身份', trigger: 'blur' }, |
|
|
{ required: true, message: '请选择角色身份', trigger: 'blur' }, |
|
|
], |
|
|
], |
|
|
houseIdList: [ |
|
|
|
|
|
{ required: true, message: '请选择楼盘', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -543,10 +519,10 @@ |
|
|
// let info=getStore({name:'userInfo'}) |
|
|
// let info=getStore({name:'userInfo'}) |
|
|
// this.sign=info.sign |
|
|
// this.sign=info.sign |
|
|
// console.log(info); |
|
|
// console.log(info); |
|
|
// this.init() |
|
|
|
|
|
this.roleList() //table 列表 |
|
|
this.roleList() //table 列表 |
|
|
// this.userDeptTree()// 获取部门树 |
|
|
// this.userDeptTree()// 获取部门树 |
|
|
// this.deptGetOrgList()//获取公司列表 |
|
|
|
|
|
|
|
|
this.deptGetOrgList()//获取公司列表 |
|
|
|
|
|
this.getAgentList()//获取代理商列表 |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 下一步 |
|
|
// 下一步 |
|
@@ -559,15 +535,23 @@ |
|
|
console.log(res) |
|
|
console.log(res) |
|
|
// 判断数据是否已经有了 |
|
|
// 判断数据是否已经有了 |
|
|
if(res.data){ |
|
|
if(res.data){ |
|
|
// 没有用户 |
|
|
|
|
|
|
|
|
// 由用户 |
|
|
|
|
|
this.phoneFlag=true |
|
|
console.log(res.data.sysUser); |
|
|
console.log(res.data.sysUser); |
|
|
|
|
|
this.form.name=res.data.sysUser.name |
|
|
|
|
|
this.form.username=res.data.sysUser.phone |
|
|
|
|
|
this.form.sex=res.data.sysUser.sex |
|
|
}else{ |
|
|
}else{ |
|
|
|
|
|
// 没有用户 |
|
|
console.log('没有用户'); |
|
|
console.log('没有用户'); |
|
|
|
|
|
this.form.username=this.phoneForm.phone |
|
|
|
|
|
this.phoneFlag=false |
|
|
} |
|
|
} |
|
|
|
|
|
this.phoneVisible=false |
|
|
|
|
|
this.dialogFormVisible=true |
|
|
}) |
|
|
}) |
|
|
// return |
|
|
// return |
|
|
this.phoneVisible=false |
|
|
|
|
|
this.dialogFormVisible=true |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
@@ -639,16 +623,6 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// fetchList({...this.page,...this.searchMsg}) |
|
|
|
|
|
// .then(res=>{ |
|
|
|
|
|
// // console.log(res); |
|
|
|
|
|
// if(res.code==0){ |
|
|
|
|
|
// this.tableData=res.data.records |
|
|
|
|
|
// this.page.total=res.data.total |
|
|
|
|
|
// }else{ |
|
|
|
|
|
// this.$message.waring(res.msg) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
}, |
|
|
}, |
|
|
// 获取部门树 |
|
|
// 获取部门树 |
|
|
userDeptTree(){ |
|
|
userDeptTree(){ |
|
@@ -661,8 +635,9 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
houseListChange(e){ |
|
|
|
|
|
this.form.houseIdList=e.join(',') |
|
|
|
|
|
|
|
|
// 去楼盘选择 |
|
|
|
|
|
gochosehouse(row){ |
|
|
|
|
|
console.log(row) |
|
|
}, |
|
|
}, |
|
|
// 获取用户信息 |
|
|
// 获取用户信息 |
|
|
getUserMsg(userId){ |
|
|
getUserMsg(userId){ |
|
@@ -741,11 +716,9 @@ |
|
|
if(this.addFlag){ |
|
|
if(this.addFlag){ |
|
|
this.$refs.form.validate((valid) => { |
|
|
this.$refs.form.validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
this.form.sign=this.form.sign/1 |
|
|
|
|
|
this.form.userRoleType?this.form.userRoleType=this.form.userRoleType+'':this.form.userRoleType=null |
|
|
|
|
|
this.$api.api.addUserMsg(this.form) |
|
|
|
|
|
|
|
|
this.$api.api.addUser(this.form) |
|
|
.then(res=>{ |
|
|
.then(res=>{ |
|
|
// console.log(res); |
|
|
|
|
|
|
|
|
console.log(res); |
|
|
this.roleList() |
|
|
this.roleList() |
|
|
this.dialogFormVisible=false |
|
|
this.dialogFormVisible=false |
|
|
}) |
|
|
}) |
|
@@ -757,8 +730,6 @@ |
|
|
}else{ |
|
|
}else{ |
|
|
this.$refs.form.validate((valid) => { |
|
|
this.$refs.form.validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
this.form.sign=this.form.sign/1 |
|
|
|
|
|
this.form.userRoleType?this.form.userRoleType=this.form.userRoleType+'':this.form.userRoleType=null |
|
|
|
|
|
this.$api.api.editUserMsg(this.form) |
|
|
this.$api.api.editUserMsg(this.form) |
|
|
.then(res=>{ |
|
|
.then(res=>{ |
|
|
// console.log(res); |
|
|
// console.log(res); |
|
@@ -839,12 +810,20 @@ |
|
|
}, |
|
|
}, |
|
|
// 获取公司列表 |
|
|
// 获取公司列表 |
|
|
deptGetOrgList(){ |
|
|
deptGetOrgList(){ |
|
|
this.$api.api.deptGetOrgList() |
|
|
|
|
|
|
|
|
this.$api.api.findMyOrg({orgType:localStorage.getItem('orgType')}) |
|
|
.then(res=>{ |
|
|
.then(res=>{ |
|
|
console.log(res); |
|
|
console.log(res); |
|
|
this.orgList=res.data |
|
|
this.orgList=res.data |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
getAgentList(){ |
|
|
|
|
|
// console.log(localStorage.getItem('orgType')) |
|
|
|
|
|
this.$api.api.findMyAgent({orgType:localStorage.getItem('orgType')}) |
|
|
|
|
|
.then(res=>{ |
|
|
|
|
|
// console.log(res) |
|
|
|
|
|
this.agentList=res.data |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
//分页器 |
|
|
//分页器 |
|
|
handleSizeChange(val) { |
|
|
handleSizeChange(val) { |
|
|
this.page.pageSize = val; |
|
|
this.page.pageSize = val; |
|
@@ -923,29 +902,61 @@ |
|
|
checkChange(obj, node){ |
|
|
checkChange(obj, node){ |
|
|
console.log(obj, node); |
|
|
console.log(obj, node); |
|
|
}, |
|
|
}, |
|
|
userRoleIdChange(e){ |
|
|
|
|
|
|
|
|
orgCodeChange(e,idx){ |
|
|
// console.log(e); |
|
|
// console.log(e); |
|
|
this.form.userRoleId=e |
|
|
|
|
|
// console.log(this.form.userRoleId,'123'); |
|
|
|
|
|
|
|
|
this.form.roleId='' |
|
|
|
|
|
if(idx==0){ |
|
|
|
|
|
this.$api.api.findRoleByOrgCode({ |
|
|
|
|
|
orgCode:e |
|
|
|
|
|
}) |
|
|
|
|
|
.then(res=>{ |
|
|
|
|
|
this.userList=res.data |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$api.api.findRoleByOrgCode({ |
|
|
|
|
|
agentId:e |
|
|
|
|
|
}) |
|
|
|
|
|
.then(res=>{ |
|
|
|
|
|
this.userList=res.data |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
|
}, |
|
|
}, |
|
|
signChange(e){ |
|
|
|
|
|
|
|
|
typeChange(e){ |
|
|
console.log(e); |
|
|
console.log(e); |
|
|
if(e==0){ |
|
|
if(e==0){ |
|
|
this.form.houseIdList='' |
|
|
|
|
|
this.form.deptId='' |
|
|
|
|
|
this.form.deptName='' |
|
|
|
|
|
this.form.userRoleId='' |
|
|
|
|
|
this.form.userRoleType=null |
|
|
|
|
|
this.RoleByOrgCodeList=[] |
|
|
|
|
|
this.houseIdList=[] |
|
|
|
|
|
|
|
|
// 平台 只显示角色 |
|
|
|
|
|
this.orgFlag=false |
|
|
|
|
|
this.roleFlag=true |
|
|
|
|
|
this.identityFlag=false |
|
|
|
|
|
this.agentFlag=false |
|
|
|
|
|
this.$api.api.findRoleByOrgCode({ |
|
|
|
|
|
orgCode:null, |
|
|
|
|
|
agentId:null |
|
|
|
|
|
}) |
|
|
|
|
|
.then(res=>{ |
|
|
|
|
|
this.userList=res.data |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
else if(e==1){ |
|
|
|
|
|
// 代理商 选择代理商和角色 |
|
|
|
|
|
this.orgFlag=false |
|
|
|
|
|
this.roleFlag=true |
|
|
|
|
|
this.identityFlag=false |
|
|
|
|
|
this.agentFlag=true |
|
|
} |
|
|
} |
|
|
else if(e==2){ |
|
|
else if(e==2){ |
|
|
this.form.deptId='' |
|
|
|
|
|
this.form.deptName='' |
|
|
|
|
|
this.form.userRoleId='' |
|
|
|
|
|
this.form.userRoleType=null |
|
|
|
|
|
this.RoleByOrgCodeList=[] |
|
|
|
|
|
|
|
|
// 公司 选择公司和角色 |
|
|
|
|
|
this.orgFlag=true |
|
|
|
|
|
this.roleFlag=true |
|
|
|
|
|
this.identityFlag=false |
|
|
|
|
|
this.agentFlag=false |
|
|
|
|
|
}else{ |
|
|
|
|
|
// 楼盘 选择公司 角色 角色身份 |
|
|
|
|
|
this.orgFlag=true |
|
|
|
|
|
this.roleFlag=true |
|
|
|
|
|
this.identityFlag=true |
|
|
|
|
|
this.agentFlag=false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
getList(page, params) { |
|
|
getList(page, params) { |
|
|