|
|
|
@ -165,10 +165,11 @@
|
|
|
|
|
<el-radio :label="1">正常</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="角色">
|
|
|
|
|
<el-checkbox-group v-model="formData.roles" :disabled="formData.id === 1">
|
|
|
|
|
<el-form-item v-if="showRole" label="角色">
|
|
|
|
|
<el-checkbox-group v-model="formData.roles">
|
|
|
|
|
<el-checkbox
|
|
|
|
|
v-for="item in roles"
|
|
|
|
|
v-model="item.id"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.id"
|
|
|
|
|
>{{ item.name }}
|
|
|
|
@ -343,13 +344,14 @@ export default {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
if (this.formName === "add") {
|
|
|
|
|
this.formData = {
|
|
|
|
|
id: null,
|
|
|
|
|
userName: null,
|
|
|
|
|
employeeName: null,
|
|
|
|
|
passWord: null,
|
|
|
|
|
checkPassword: null,
|
|
|
|
|
comments: null,
|
|
|
|
|
userFlag: 1,
|
|
|
|
|
roles: null
|
|
|
|
|
roles: []
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
this.$refs["dataForm"].clearValidate();
|
|
|
|
@ -366,8 +368,10 @@ export default {
|
|
|
|
|
handleForm(index, row) {
|
|
|
|
|
this.formVisible = true;
|
|
|
|
|
this.resetForm();
|
|
|
|
|
this.formData = JSON.parse(JSON.stringify(formJson));
|
|
|
|
|
if (row !== null) {
|
|
|
|
|
this.index = index;
|
|
|
|
|
this.formName = "edit";
|
|
|
|
|
this.formRules = this.editRules;
|
|
|
|
|
this.formData = {
|
|
|
|
|
id: row.id,
|
|
|
|
|
passWord: row.passWord,
|
|
|
|
@ -379,13 +383,14 @@ export default {
|
|
|
|
|
roles: row.roles,
|
|
|
|
|
dept: row.dept,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.formName = "add";
|
|
|
|
|
this.formRules = this.addRules;
|
|
|
|
|
if (index !== null) {
|
|
|
|
|
this.index = index;
|
|
|
|
|
this.formName = "edit";
|
|
|
|
|
this.formRules = this.editRules;
|
|
|
|
|
this.formData.roles = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.$store.getters.customerId === 110) {
|
|
|
|
|
this.showRole = true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
formSubmit() {
|
|
|
|
|