|
|
|
@ -294,6 +294,34 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="用户类型" prop="userType">
|
|
|
|
|
<el-select v-model="form.userType" placeholder="请选择用户类型" clearable style="width: 100%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.bms_user_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="企业信息" prop="enterpriseId">
|
|
|
|
|
<el-select v-model="form.enterpriseId" placeholder="请选择企业信息" clearable style="width: 100%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in enterpriseList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.enterpriseName"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="备注">
|
|
|
|
@ -342,13 +370,14 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
|
|
|
|
|
import { listEnterpriseBasicInfo } from "@/api/system/enterpriseBasicInfo";
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "User",
|
|
|
|
|
dicts: ['sys_normal_disable', 'sys_user_sex'],
|
|
|
|
|
dicts: ['sys_normal_disable', 'sys_user_sex', 'bms_user_type'],
|
|
|
|
|
components: { Treeselect },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -431,6 +460,12 @@ export default {
|
|
|
|
|
nickName: [
|
|
|
|
|
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
userType: [
|
|
|
|
|
{ required: true, message: "请选择用户类型", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
enterpriseId: [
|
|
|
|
|
{ required: true, message: "请选择企业信息", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
password: [
|
|
|
|
|
{ required: true, message: "用户密码不能为空", trigger: "blur" },
|
|
|
|
|
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' },
|
|
|
|
@ -450,7 +485,9 @@ export default {
|
|
|
|
|
trigger: "blur"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 企业数组
|
|
|
|
|
enterpriseList: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
@ -465,6 +502,9 @@ export default {
|
|
|
|
|
this.getConfigKey("sys.user.initPassword").then(response => {
|
|
|
|
|
this.initPassword = response.msg;
|
|
|
|
|
});
|
|
|
|
|
listEnterpriseBasicInfo({}).then((response) => {
|
|
|
|
|
this.enterpriseList = response.rows
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/** 查询用户列表 */
|
|
|
|
|