|
|
@ -36,6 +36,17 @@ |
|
|
|
:readonly="true" |
|
|
|
:placeholder="$t('user.deptName')"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物业项目" |
|
|
|
prop="projectName"> |
|
|
|
<el-select v-model="dataForm.projectId" placeholder="用户类型" |
|
|
|
@change="projectHandleChange" style="width: 100%"> |
|
|
|
<el-option v-for="item in projectList" |
|
|
|
:key="item.dictValue" |
|
|
|
:label="item.dictName" |
|
|
|
:value="item.dictValue"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="用户类型" |
|
|
|
prop="userTagKey"> |
|
|
|
<el-select v-model="dataForm.userTagKey" |
|
|
@ -163,7 +174,7 @@ |
|
|
|
<script> |
|
|
|
import debounce from 'lodash/debounce' |
|
|
|
import { isEmail, isMobile } from '@/utils/validate' |
|
|
|
import Cookies from "js-cookie" |
|
|
|
import Cookies from 'js-cookie' |
|
|
|
export default { |
|
|
|
data () { |
|
|
|
return { |
|
|
@ -178,6 +189,8 @@ export default { |
|
|
|
username: '', |
|
|
|
deptId: '0', |
|
|
|
deptName: '', |
|
|
|
projectName: '', |
|
|
|
projectId: '', |
|
|
|
password: '', |
|
|
|
comfirmPassword: '', |
|
|
|
realName: '', |
|
|
@ -204,6 +217,7 @@ export default { |
|
|
|
}, |
|
|
|
verifyMobileList: [], |
|
|
|
userTagDictList: [], |
|
|
|
projectList: [], |
|
|
|
loading: false |
|
|
|
} |
|
|
|
}, |
|
|
@ -275,7 +289,7 @@ export default { |
|
|
|
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` |
|
|
|
Promise.all([ |
|
|
|
this.getDeptList(), |
|
|
|
this.getRoleList() |
|
|
|
this.getRoleList(), |
|
|
|
]).then(() => { |
|
|
|
if (this.dataForm.id) { |
|
|
|
this.getInfo() |
|
|
@ -283,6 +297,7 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.getUserTagDicList() |
|
|
|
this.getProjectList() |
|
|
|
}, |
|
|
|
// 根据手机号获取产品工作人员信息 |
|
|
|
relationEpmetStaffUser (mobile) { |
|
|
@ -329,6 +344,14 @@ export default { |
|
|
|
this.roleList = res.data |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
getPropertyUserList () { |
|
|
|
return this.$http.get('/sys/syspropertyuser/list').then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.propertyUserList = res.data |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
// 获取用户标签字典列表 |
|
|
|
getUserTagDicList () { |
|
|
|
this.$http.get(`/sys/dict/listSimple/user_tag`).then(({ data: res }) => { |
|
|
@ -338,6 +361,16 @@ export default { |
|
|
|
this.userTagDictList = res.data |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
// 获取用物业项目列表 |
|
|
|
getProjectList () { |
|
|
|
this.$http.get(`/property/project/dict`).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.projectList = res.data |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取信息 |
|
|
|
getInfo () { |
|
|
|
this.$http.get(`/sys/user/${this.dataForm.id}`).then(({ data: res }) => { |
|
|
@ -433,6 +466,14 @@ export default { |
|
|
|
}, |
|
|
|
handelError () { |
|
|
|
this.loading = false |
|
|
|
}, |
|
|
|
projectHandleChange (value) { |
|
|
|
console.log(value) |
|
|
|
let obj = this.projectList.find((item) => { |
|
|
|
return item.dictValue === value |
|
|
|
}) |
|
|
|
console.log(obj.dictName) |
|
|
|
this.dataForm.projectName = obj.dictName |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|