|
@@ -185,6 +185,30 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-connection"
|
|
|
+ plain
|
|
|
+ v-if="scope.row.doctorId!=null"
|
|
|
+ @click="handleUpdateDoctor(scope.row)"
|
|
|
+ >换绑医生</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ plain
|
|
|
+ icon="el-icon-link"
|
|
|
+ v-else
|
|
|
+ @click="handleUpdateDoctor(scope.row)"
|
|
|
+ >绑定医生</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-unlock"
|
|
|
+ plain
|
|
|
+ v-if="scope.row.doctorId!=null"
|
|
|
+ @click="handleUnBindUserId(scope.row)"
|
|
|
+ >解绑医生</el-button>
|
|
|
<el-button
|
|
|
v-if="scope.row.qwStatus == 0"
|
|
|
size="mini"
|
|
@@ -551,6 +575,10 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog :title="doctor.title" :visible.sync="doctor.open" width="800px" append-to-body>
|
|
|
+ <selectDoctor ref="selectDoctor" @bindCompanyUserDoctorId="bindCompanyUserDoctorId"></selectDoctor>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -569,7 +597,7 @@ import {
|
|
|
generateSubDomain,
|
|
|
setIsRegisterMember,
|
|
|
updateCompanyUserAreaList,
|
|
|
- isAllowedAllRegister
|
|
|
+ isAllowedAllRegister, unBindDoctorId, bindDoctorId
|
|
|
} from "@/api/company/companyUser";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import { treeselect } from "@/api/company/companyDept";
|
|
@@ -582,11 +610,20 @@ import selectUser from "@/views/company/components/selectQwUser.vue";
|
|
|
import { getConfigByKey } from "@/api/company/companyConfig";
|
|
|
import axios from "axios";
|
|
|
import {addCodeUrl} from "../../../api/company/companyUser";
|
|
|
+import selectDoctor from "@/views/qw/user/selectDoctor.vue";
|
|
|
export default {
|
|
|
name: "User",
|
|
|
- components: { Treeselect ,selectUser},
|
|
|
+ components: {selectDoctor, Treeselect ,selectUser},
|
|
|
data() {
|
|
|
return {
|
|
|
+ doctor: {
|
|
|
+ open: false,
|
|
|
+ title: '绑定医生'
|
|
|
+ },
|
|
|
+ doctorForm: {
|
|
|
+ userId: null,
|
|
|
+ doctorId: null
|
|
|
+ },
|
|
|
uploadUrl: process.env.VUE_APP_BASE_API+"/company/user/common/uploadOSS",
|
|
|
// 遮罩层
|
|
|
loading: false,
|
|
@@ -1403,6 +1440,43 @@ export default {
|
|
|
}
|
|
|
return isPic && isLt2M
|
|
|
},
|
|
|
+ handleUpdateDoctor(row){
|
|
|
+ this.doctor.title="绑定医生"
|
|
|
+ this.doctor.open=true;
|
|
|
+ this.doctorForm.userId=row.userId;
|
|
|
+ },
|
|
|
+ bindCompanyUserDoctorId(row){
|
|
|
+ console.log(row)
|
|
|
+ this.doctorForm.doctorId=row;
|
|
|
+ bindDoctorId(this.doctorForm).then(res=>{
|
|
|
+ if (res.code==200){
|
|
|
+ this.$message.success('绑定成功')
|
|
|
+ }else {
|
|
|
+ this.$message.error('绑定失败:',res.msg)
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ this.doctor.open=false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleUnBindUserId(val){
|
|
|
+ this.$confirm(
|
|
|
+ '确认解绑医生:<span style="color: green;">' + val.nickName + '' +
|
|
|
+ '</span> 的医生?',
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ dangerouslyUseHTMLString: true // 允许使用 HTML 字符串
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ return unBindDoctorId(val.userId);
|
|
|
+ }).then(response => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("解绑成功");
|
|
|
+ }).finally(res=>{
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|