|
@ -15,6 +15,15 @@ |
|
|
<el-form-item label="手机号"> |
|
|
<el-form-item label="手机号"> |
|
|
<el-input v-model="dataForm.mobile" placeholder="手机号" clearable @keyup.native="btKeyUpMobile"></el-input> |
|
|
<el-input v-model="dataForm.mobile" placeholder="手机号" clearable @keyup.native="btKeyUpMobile"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="所属部门"> |
|
|
|
|
|
<el-cascader |
|
|
|
|
|
v-model="ids" |
|
|
|
|
|
:options="options" |
|
|
|
|
|
:props="{ checkStrictly: true }" |
|
|
|
|
|
clearable |
|
|
|
|
|
> |
|
|
|
|
|
</el-cascader> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-button @click="getDataListSearch()" type="success">{{ $t('query') }}</el-button> |
|
|
<el-button @click="getDataListSearch()" type="success">{{ $t('query') }}</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -89,28 +98,54 @@ export default { |
|
|
username: '', |
|
|
username: '', |
|
|
realname: '', |
|
|
realname: '', |
|
|
mobile: '', |
|
|
mobile: '', |
|
|
email: '' |
|
|
email: '', |
|
|
} |
|
|
deptId: '' |
|
|
|
|
|
}, |
|
|
|
|
|
ids: [], |
|
|
|
|
|
options: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
components: { |
|
|
components: { |
|
|
AddOrUpdate |
|
|
AddOrUpdate |
|
|
}, |
|
|
}, |
|
|
|
|
|
created: function () { |
|
|
|
|
|
this.getOptions() |
|
|
|
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
ids: function (val) { |
|
|
|
|
|
if (val.length === 0) { |
|
|
|
|
|
this.dataForm.deptId = '' |
|
|
|
|
|
} else { |
|
|
|
|
|
this.dataForm.deptId = this.ids[val.length - 1] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
getOptions () { |
|
|
|
|
|
this.$http |
|
|
|
|
|
.get(`/sys/user/deptOptions/getByLoginUser`) |
|
|
|
|
|
.then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
this.options = res.data.options |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => {}) |
|
|
|
|
|
}, |
|
|
btKeyUpUsername (e) { |
|
|
btKeyUpUsername (e) { |
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
this.dataForm.username = e.target.value |
|
|
this.dataForm.username = e.target.value |
|
|
}, |
|
|
}, |
|
|
btKeyUpRealname (e) { |
|
|
btKeyUpRealname (e) { |
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
this.dataForm.realname = e.target.value |
|
|
this.dataForm.realname = e.target.value |
|
|
}, |
|
|
}, |
|
|
btKeyUpEmail (e) { |
|
|
btKeyUpEmail (e) { |
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
this.dataForm.email = e.target.value |
|
|
this.dataForm.email = e.target.value |
|
|
}, |
|
|
}, |
|
|
btKeyUpMobile (e) { |
|
|
btKeyUpMobile (e) { |
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
this.dataForm.mobile = e.target.value |
|
|
this.dataForm.mobile = e.target.value |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|