|
@@ -49,6 +49,18 @@
|
|
|
:disabled="loading"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item
|
|
|
+ prop="department"
|
|
|
+ label="部门"
|
|
|
+ >
|
|
|
+ <el-select-v2
|
|
|
+ v-model="form.department"
|
|
|
+ :options="deptList"
|
|
|
+ filterable
|
|
|
+ ></el-select-v2>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item
|
|
|
prop="password"
|
|
|
label="密码"
|
|
@@ -153,6 +165,13 @@ const defaultRules = {
|
|
|
trigger: 'change',
|
|
|
},
|
|
|
],
|
|
|
+ department: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: $t('text_please_input'),
|
|
|
+ trigger: 'change',
|
|
|
+ },
|
|
|
+ ],
|
|
|
}
|
|
|
let userList = ref([])
|
|
|
const getUserSelectListFunc = () => {
|
|
@@ -169,6 +188,18 @@ const getUserSelectListFunc = () => {
|
|
|
})
|
|
|
.catch(() => console.log('获取用户下拉列表异常'))
|
|
|
}
|
|
|
+const deptList = ref([])
|
|
|
+const getDeptSelectListFunc = () => {
|
|
|
+ userAPI.getDeptList().then((res: any) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ deptList.value = res.result.map((i: any) => ({
|
|
|
+ value: i.id,
|
|
|
+ label: i.role_name,
|
|
|
+ }))
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+getDeptSelectListFunc()
|
|
|
const checkPassword = (rule: any, value: any, cb: any) => {
|
|
|
const length = value.trim().length
|
|
|
if (length < 6 && length > 0) {
|