|
|
@ -6,10 +6,10 @@ |
|
|
权限管理 / |
|
|
权限管理 / |
|
|
<span class="contenttitleBold">用户管理</span> |
|
|
<span class="contenttitleBold">用户管理</span> |
|
|
</div> |
|
|
</div> |
|
|
<!-- <div class="seachinput"> |
|
|
|
|
|
|
|
|
<div class="seachinput"> |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="department" |
|
|
|
|
|
placeholder="请选择项目类别" |
|
|
|
|
|
|
|
|
v-model="departments" |
|
|
|
|
|
placeholder="请选择账号" |
|
|
filterable |
|
|
filterable |
|
|
:filter-method="remoteMethodes" |
|
|
:filter-method="remoteMethodes" |
|
|
default-first-option |
|
|
default-first-option |
|
|
@ -20,12 +20,12 @@ |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in quckDepartment" |
|
|
v-for="item in quckDepartment" |
|
|
:key="item.id" |
|
|
:key="item.id" |
|
|
:label="item.displayName" |
|
|
|
|
|
|
|
|
:label="item.surname" |
|
|
:value="item.id" |
|
|
:value="item.id" |
|
|
> |
|
|
> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> --> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<div style="display: flex; margin-top: 7px"> |
|
|
<div style="display: flex; margin-top: 7px"> |
|
|
@ -42,6 +42,8 @@ |
|
|
:props="defaultProps" |
|
|
:props="defaultProps" |
|
|
@node-click="handleNodeClick" |
|
|
@node-click="handleNodeClick" |
|
|
highlight-current |
|
|
highlight-current |
|
|
|
|
|
node-key="id" |
|
|
|
|
|
ref="itemType" |
|
|
> |
|
|
> |
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
<div> |
|
|
<div> |
|
|
@ -213,6 +215,13 @@ |
|
|
size="small" |
|
|
size="small" |
|
|
/> </el-form-item |
|
|
/> </el-form-item |
|
|
></el-col> |
|
|
></el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="邮箱"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="form.email" |
|
|
|
|
|
size="small" |
|
|
|
|
|
></el-input> </el-form-item |
|
|
|
|
|
></el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="科室"> |
|
|
<el-form-item label="科室"> |
|
|
<!-- |
|
|
<!-- |
|
|
@ -238,11 +247,7 @@ |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<!-- <el-col :span="12"> |
|
|
|
|
|
<el-form-item label="邮箱" > |
|
|
|
|
|
<el-input v-model="form.email"></el-input> </el-form-item |
|
|
|
|
|
></el-col> --> |
|
|
|
|
|
<el-col> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-form-item label="是否激活"> |
|
|
<el-form-item label="是否激活"> |
|
|
<el-checkbox |
|
|
<el-checkbox |
|
|
v-model="form.isActive" |
|
|
v-model="form.isActive" |
|
|
@ -251,6 +256,62 @@ |
|
|
></el-checkbox> |
|
|
></el-checkbox> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="操作类别" prop="operatorType"> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="form.operatorType" |
|
|
|
|
|
placeholder="请选择操作类别" |
|
|
|
|
|
size="small" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in operatorType" |
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
:label="item.displayName" |
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="签名图片"> |
|
|
|
|
|
<el-upload |
|
|
|
|
|
class="avatar-uploader" |
|
|
|
|
|
:action="actionUrl" |
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
:on-change="getFile" |
|
|
|
|
|
> |
|
|
|
|
|
<i class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
<div v-if="form.userSign" style="display: inline-block;position: relative;"> |
|
|
|
|
|
<img |
|
|
|
|
|
ref="phoUrl" |
|
|
|
|
|
:src="form.userSign" |
|
|
|
|
|
class="avatar" |
|
|
|
|
|
/> |
|
|
|
|
|
<span class="el-upload-delete"> |
|
|
|
|
|
<i class="el-icon-circle-close" @click="handleRemove"></i> |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="用户图片"> |
|
|
|
|
|
<el-upload |
|
|
|
|
|
class="avatar-uploader" |
|
|
|
|
|
:action="actionUrl" |
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
:on-change="getFiles" |
|
|
|
|
|
> |
|
|
|
|
|
<i class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
<div v-if="form.userPhoto" style="display: inline-block;position: relative;"> |
|
|
|
|
|
<img ref="phoUrl" :src="form.userPhoto" class="avatar" /> |
|
|
|
|
|
<span class="el-upload-delete"> |
|
|
|
|
|
<i class="el-icon-circle-close" @click="handleRemoves"></i> |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="密码" |
|
|
label="密码" |
|
|
@ -355,10 +416,13 @@ |
|
|
size="small" |
|
|
size="small" |
|
|
></el-input> </el-form-item |
|
|
></el-input> </el-form-item |
|
|
></el-col> |
|
|
></el-col> |
|
|
<!-- <el-col :span="12"> |
|
|
|
|
|
<el-form-item label="邮箱" > |
|
|
|
|
|
<el-input v-model="form.email"></el-input> </el-form-item |
|
|
|
|
|
></el-col> --> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="邮箱"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="form.email" |
|
|
|
|
|
size="small" |
|
|
|
|
|
></el-input> </el-form-item |
|
|
|
|
|
></el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="密码" |
|
|
label="密码" |
|
|
@ -383,6 +447,66 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="操作类别" prop="operatorType"> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="form.operatorType" |
|
|
|
|
|
placeholder="请选择操作类别" |
|
|
|
|
|
size="small" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in operatorType" |
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
:label="item.displayName" |
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="签名图片"> |
|
|
|
|
|
<el-upload |
|
|
|
|
|
class="avatar-uploader" |
|
|
|
|
|
:action="actionUrl" |
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
:on-change="getFile" |
|
|
|
|
|
> |
|
|
|
|
|
<i class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
<div v-if="form.userSign" style="display: inline-block;position: relative;"> |
|
|
|
|
|
<img |
|
|
|
|
|
ref="phoUrl" |
|
|
|
|
|
:src="form.userSign" |
|
|
|
|
|
class="avatar" |
|
|
|
|
|
/> |
|
|
|
|
|
<span class="el-upload-delete"> |
|
|
|
|
|
<i class="el-icon-circle-close" @click="handleRemove"></i> |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="用户图片"> |
|
|
|
|
|
<el-upload |
|
|
|
|
|
class="avatar-uploader" |
|
|
|
|
|
:action="actionUrl" |
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
:on-change="getFiles" |
|
|
|
|
|
> |
|
|
|
|
|
<i class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
<div v-if="form.userPhoto" style="display: inline-block;position: relative;"> |
|
|
|
|
|
<img ref="phoUrl" :src="form.userPhoto" class="avatar" /> |
|
|
|
|
|
<span class="el-upload-delete"> |
|
|
|
|
|
<i class="el-icon-circle-close" @click="handleRemoves"></i> |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<!-- 角色111 --> |
|
|
<!-- 角色111 --> |
|
|
<el-tab-pane label="角色"> |
|
|
<el-tab-pane label="角色"> |
|
|
@ -708,6 +832,9 @@ export default { |
|
|
roleNames: [ |
|
|
roleNames: [ |
|
|
{ required: true, message: "请选择所属用户", trigger: "change" }, |
|
|
{ required: true, message: "请选择所属用户", trigger: "change" }, |
|
|
], |
|
|
], |
|
|
|
|
|
operatorType: [ |
|
|
|
|
|
{ required: true, message: "请选择操作类别", trigger: "change" }, |
|
|
|
|
|
], |
|
|
nam: [{ required: true, message: "请输入名", trigger: "change" }], |
|
|
nam: [{ required: true, message: "请输入名", trigger: "change" }], |
|
|
}, |
|
|
}, |
|
|
ruless: { |
|
|
ruless: { |
|
|
@ -749,6 +876,9 @@ export default { |
|
|
roleNames: [ |
|
|
roleNames: [ |
|
|
{ required: true, message: "请选择所属用户", trigger: "change" }, |
|
|
{ required: true, message: "请选择所属用户", trigger: "change" }, |
|
|
], |
|
|
], |
|
|
|
|
|
operatorType: [ |
|
|
|
|
|
{ required: true, message: "请选择操作类别", trigger: "change" }, |
|
|
|
|
|
], |
|
|
nam: [{ required: true, message: "请输入名", trigger: "change" }], |
|
|
nam: [{ required: true, message: "请输入名", trigger: "change" }], |
|
|
}, |
|
|
}, |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
@ -767,6 +897,9 @@ export default { |
|
|
userName: "", |
|
|
userName: "", |
|
|
password: "", |
|
|
password: "", |
|
|
isActive: true, |
|
|
isActive: true, |
|
|
|
|
|
userSign: "", |
|
|
|
|
|
userPhoto: "", |
|
|
|
|
|
operatorType: "", |
|
|
}, |
|
|
}, |
|
|
roleNames: [], |
|
|
roleNames: [], |
|
|
are: [], |
|
|
are: [], |
|
|
@ -790,6 +923,28 @@ export default { |
|
|
itemtype: [], |
|
|
itemtype: [], |
|
|
haveitemtype: [], |
|
|
haveitemtype: [], |
|
|
newitemtype: [], |
|
|
newitemtype: [], |
|
|
|
|
|
departments: "", |
|
|
|
|
|
quckDepartment: [], |
|
|
|
|
|
initTableData: [], |
|
|
|
|
|
actionUrl: "", |
|
|
|
|
|
operatorType: [ |
|
|
|
|
|
{ |
|
|
|
|
|
id: "0", |
|
|
|
|
|
displayName: "操作员", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "1", |
|
|
|
|
|
displayName: "医生", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "2", |
|
|
|
|
|
displayName: "总检医生", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "3", |
|
|
|
|
|
displayName: "医生和总检医生", |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -803,6 +958,117 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
handleRemove(){ |
|
|
|
|
|
this.form.userSign=this.$options.data().form.userSign |
|
|
|
|
|
}, |
|
|
|
|
|
handleRemoves(){ |
|
|
|
|
|
this.form.userPhoto=this.$options.data().form.userPhoto |
|
|
|
|
|
}, |
|
|
|
|
|
quckDepartments(e) { |
|
|
|
|
|
if (e) { |
|
|
|
|
|
let currentKey = ""; |
|
|
|
|
|
this.quckDepartment.forEach((item) => { |
|
|
|
|
|
if (e == item.id) { |
|
|
|
|
|
currentKey = item.organizationUnitId; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
this.$refs["itemType"].setCurrentKey(currentKey); |
|
|
|
|
|
let selected = this.$refs["itemType"].getCurrentNode(); |
|
|
|
|
|
if ( |
|
|
|
|
|
this.$refs["itemType"].getNode(selected) && |
|
|
|
|
|
this.$refs["itemType"].getNode(selected).parent |
|
|
|
|
|
) { |
|
|
|
|
|
this.expandParents(this.$refs["itemType"].getNode(selected).parent); |
|
|
|
|
|
} |
|
|
|
|
|
postapi( |
|
|
|
|
|
"/api/identity/users/getlistinorganizationunit",{ |
|
|
|
|
|
organizationUnitId:currentKey |
|
|
|
|
|
} |
|
|
|
|
|
).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.tableData = res.data; |
|
|
|
|
|
this.tableData.forEach((item, index) => { |
|
|
|
|
|
if (e == item.id) { |
|
|
|
|
|
this.$refs["tableData"].setCurrentRow(item); |
|
|
|
|
|
this.rowick(item); |
|
|
|
|
|
this.searchup(item, index); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.remoteMethodes(); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
remoteMethodes(keyWords) { |
|
|
|
|
|
if (keyWords) { |
|
|
|
|
|
this.quckDepartment = []; |
|
|
|
|
|
this.initTableData.forEach((item) => { |
|
|
|
|
|
if ( |
|
|
|
|
|
item.userName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 || |
|
|
|
|
|
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 |
|
|
|
|
|
|| item.surname.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 |
|
|
|
|
|
) { |
|
|
|
|
|
this.quckDepartment.push(item); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.quckDepartment = deepCopy(this.initTableData); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
expandParents(node) { |
|
|
|
|
|
node.expanded = true; |
|
|
|
|
|
if (node.parent) { |
|
|
|
|
|
this.expandParents(node.parent); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
searchup(data, index) { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
if (index == 0) { |
|
|
|
|
|
index = 1; |
|
|
|
|
|
} |
|
|
|
|
|
const targetTop = this.$refs["tableData"].$el |
|
|
|
|
|
.querySelectorAll(".el-table__body tr") |
|
|
|
|
|
[index - 1].getBoundingClientRect().top; |
|
|
|
|
|
const containerTop = this.$refs["tableData"].$el |
|
|
|
|
|
.querySelector(".el-table__body") |
|
|
|
|
|
.getBoundingClientRect().top; |
|
|
|
|
|
const scrollParent = this.$refs["tableData"].$el.querySelector( |
|
|
|
|
|
".el-table__body-wrapper" |
|
|
|
|
|
); |
|
|
|
|
|
scrollParent.scrollTop = targetTop - containerTop; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
getFile(file, fileList) { |
|
|
|
|
|
//上传头像 |
|
|
|
|
|
this.getBase64(file.raw).then((res) => { |
|
|
|
|
|
this.form.userSign = res; |
|
|
|
|
|
console.log(res); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
getFiles(file, fileList) { |
|
|
|
|
|
//上传头像 |
|
|
|
|
|
this.getBase64(file.raw).then((res) => { |
|
|
|
|
|
this.form.userPhoto = res; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
getBase64(file) { |
|
|
|
|
|
//把图片转成base64编码 |
|
|
|
|
|
return new Promise(function (resolve, reject) { |
|
|
|
|
|
let reader = new FileReader(); |
|
|
|
|
|
let imgResult = ""; |
|
|
|
|
|
reader.readAsDataURL(file); |
|
|
|
|
|
reader.onload = function () { |
|
|
|
|
|
imgResult = reader.result; |
|
|
|
|
|
}; |
|
|
|
|
|
reader.onerror = function (error) { |
|
|
|
|
|
reject(error); |
|
|
|
|
|
}; |
|
|
|
|
|
reader.onloadend = function () { |
|
|
|
|
|
resolve(imgResult); |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
cancellation() { |
|
|
cancellation() { |
|
|
this.dialogVisible = false; |
|
|
this.dialogVisible = false; |
|
|
this.form = this.$options.data().form; |
|
|
this.form = this.$options.data().form; |
|
|
@ -836,8 +1102,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
handleNodeClick(data) { |
|
|
handleNodeClick(data) { |
|
|
this.department = data.displayName; |
|
|
this.department = data.displayName; |
|
|
getapi( |
|
|
|
|
|
`/api/identity/users/getlistinorganizationunit?OrganizationUnitId=${data.id}` |
|
|
|
|
|
|
|
|
postapi( |
|
|
|
|
|
"/api/identity/users/getlistinorganizationunit",{ |
|
|
|
|
|
organizationUnitId:data.id |
|
|
|
|
|
} |
|
|
).then((res) => { |
|
|
).then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
this.tableData = res.data; |
|
|
this.tableData = res.data; |
|
|
@ -945,9 +1213,11 @@ export default { |
|
|
// // usreslist() |
|
|
// // usreslist() |
|
|
// }, |
|
|
// }, |
|
|
btnQuery() { |
|
|
btnQuery() { |
|
|
getapi("/api/identity/users/getlist", this.pages).then((res) => { |
|
|
|
|
|
|
|
|
postapi("/api/identity/users/getlistinorganizationunit").then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
this.tableData = res.data.items; |
|
|
|
|
|
|
|
|
this.tableData = res.data; |
|
|
|
|
|
this.quckDepartment = [...res.data]; |
|
|
|
|
|
this.initTableData = [...res.data]; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
@ -1102,6 +1372,10 @@ export default { |
|
|
password: this.form.password, |
|
|
password: this.form.password, |
|
|
roleNames: this.form.roleNames, |
|
|
roleNames: this.form.roleNames, |
|
|
isActive: this.form.isActive, |
|
|
isActive: this.form.isActive, |
|
|
|
|
|
email: this.form.email, |
|
|
|
|
|
operatorType: this.form.operatorType, |
|
|
|
|
|
userSign: this.form.userSign, |
|
|
|
|
|
userPhoto: this.form.userPhoto, |
|
|
}; |
|
|
}; |
|
|
if (this.form.roleNames.length == 0) { |
|
|
if (this.form.roleNames.length == 0) { |
|
|
this.$message.warning("请选择角色"); |
|
|
this.$message.warning("请选择角色"); |
|
|
@ -1133,7 +1407,8 @@ export default { |
|
|
this.department = this.$options.data().department; |
|
|
this.department = this.$options.data().department; |
|
|
this.curRow = this.$options.data().curRow; |
|
|
this.curRow = this.$options.data().curRow; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
this.haveitemtype =this.$options.data().haveitemtype; |
|
|
|
|
|
|
|
|
this.haveitemtype = |
|
|
|
|
|
this.$options.data().haveitemtype; |
|
|
this.$refs["tableData"].setCurrentRow(""); |
|
|
this.$refs["tableData"].setCurrentRow(""); |
|
|
this.btnQuery(); |
|
|
this.btnQuery(); |
|
|
} |
|
|
} |
|
|
@ -1157,18 +1432,22 @@ export default { |
|
|
password: this.form.password, |
|
|
password: this.form.password, |
|
|
roleNames: this.form.roleNames, |
|
|
roleNames: this.form.roleNames, |
|
|
isActive: this.form.isActive, |
|
|
isActive: this.form.isActive, |
|
|
|
|
|
email: this.form.email, |
|
|
|
|
|
operatorType: this.form.operatorType, |
|
|
|
|
|
userSign: this.form.userSign, |
|
|
|
|
|
userPhoto: this.form.userPhoto, |
|
|
// roleNames: this.form.roleNames, |
|
|
// roleNames: this.form.roleNames, |
|
|
}; |
|
|
}; |
|
|
if (this.orgId == "" || this.orgId == null) { |
|
|
if (this.orgId == "" || this.orgId == null) { |
|
|
return this.$message.warning("请选择科室"); |
|
|
return this.$message.warning("请选择科室"); |
|
|
} |
|
|
} |
|
|
|
|
|
console.log(this.form.roleNames); |
|
|
if (this.form.roleNames.length == 0) { |
|
|
if (this.form.roleNames.length == 0) { |
|
|
this.$message.warning("请选则用户角色"); |
|
|
this.$message.warning("请选则用户角色"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let msg = ""; |
|
|
let msg = ""; |
|
|
|
|
|
|
|
|
//更新用户与所属角色 |
|
|
//更新用户与所属角色 |
|
|
postapi(`/api/identity/users/update?id=${this.form.id}`, obj).then( |
|
|
postapi(`/api/identity/users/update?id=${this.form.id}`, obj).then( |
|
|
(res) => { |
|
|
(res) => { |
|
|
@ -1195,7 +1474,8 @@ export default { |
|
|
this.department = this.$options.data().department; |
|
|
this.department = this.$options.data().department; |
|
|
this.curRow = this.$options.data().curRow; |
|
|
this.curRow = this.$options.data().curRow; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
this.haveitemtype =this.$options.data().haveitemtype; |
|
|
|
|
|
|
|
|
this.haveitemtype = |
|
|
|
|
|
this.$options.data().haveitemtype; |
|
|
this.$refs["tableData"].setCurrentRow(""); |
|
|
this.$refs["tableData"].setCurrentRow(""); |
|
|
//this.$message.success("操作成功!"); |
|
|
//this.$message.success("操作成功!"); |
|
|
this.btnQuery(); |
|
|
this.btnQuery(); |
|
|
@ -1256,12 +1536,18 @@ export default { |
|
|
if (this.title == 2) { |
|
|
if (this.title == 2) { |
|
|
// row里面没有roleNames字段 |
|
|
// row里面没有roleNames字段 |
|
|
//const form = JSON.parse(JSON.stringify(row)); |
|
|
//const form = JSON.parse(JSON.stringify(row)); |
|
|
const form = deepCopy(this.curRow); |
|
|
|
|
|
this.form = { |
|
|
|
|
|
...form, |
|
|
|
|
|
roleNames: [], |
|
|
|
|
|
}; |
|
|
|
|
|
this.form.roleNames = []; |
|
|
|
|
|
|
|
|
getapi("/api/identity/users/getinfo", { |
|
|
|
|
|
id: this.curRow.id, |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
const form = deepCopy(res.data); |
|
|
|
|
|
this.form = { |
|
|
|
|
|
...form, |
|
|
|
|
|
roleNames: [], |
|
|
|
|
|
}; |
|
|
|
|
|
this.form.roleNames = []; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
//获取组织架构 |
|
|
//获取组织架构 |
|
|
organizationtree().then((res) => { |
|
|
organizationtree().then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
@ -1273,7 +1559,7 @@ export default { |
|
|
// postapi(`/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`,{orgId:this.orgId[0]}).then(res=>{ |
|
|
// postapi(`/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`,{orgId:this.orgId[0]}).then(res=>{ |
|
|
// console.log(res,'wwwwwwwwwwwww'); |
|
|
// console.log(res,'wwwwwwwwwwwww'); |
|
|
// }) |
|
|
// }) |
|
|
useraffiliation(this.form.id).then((res) => { |
|
|
|
|
|
|
|
|
useraffiliation(this.curRow.id).then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
if (res.data.items && res.data.items.length > 0) { |
|
|
if (res.data.items && res.data.items.length > 0) { |
|
|
let val = res.data.items.map((item) => { |
|
|
let val = res.data.items.map((item) => { |
|
|
@ -1396,7 +1682,48 @@ export default { |
|
|
:deep .el-table tr { |
|
|
:deep .el-table tr { |
|
|
height: 33px; |
|
|
height: 33px; |
|
|
} |
|
|
} |
|
|
:deep .el-tree-node>.el-tree-node__children{ |
|
|
|
|
|
|
|
|
:deep .el-tree-node > .el-tree-node__children { |
|
|
overflow: visible; |
|
|
overflow: visible; |
|
|
} |
|
|
} |
|
|
|
|
|
.seachinput { |
|
|
|
|
|
width: 250px; |
|
|
|
|
|
margin-right: 110px; |
|
|
|
|
|
} |
|
|
|
|
|
:deep .seachinput .el-select { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
:deep.avatar-uploader{ |
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
} |
|
|
|
|
|
:deep.avatar-uploader .el-upload { |
|
|
|
|
|
border: 1px dashed #d9d9d9; |
|
|
|
|
|
border-radius: 6px; |
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
} |
|
|
|
|
|
:deep.avatar-uploader .el-upload:hover { |
|
|
|
|
|
border-color: #409eff; |
|
|
|
|
|
} |
|
|
|
|
|
:deep.avatar-uploader-icon { |
|
|
|
|
|
font-size: 28px; |
|
|
|
|
|
color: #8c939d; |
|
|
|
|
|
width: 80px; |
|
|
|
|
|
height: 80px; |
|
|
|
|
|
line-height: 80px; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
} |
|
|
|
|
|
.avatar { |
|
|
|
|
|
width: 80px; |
|
|
|
|
|
height: 80px; |
|
|
|
|
|
display: block; |
|
|
|
|
|
} |
|
|
|
|
|
.el-upload-delete{ |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
right: 0; |
|
|
|
|
|
line-height: 0; |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |