(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-aee655fa"],{"1f34":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:4,xs:24}},[i("div",{staticClass:"head-container"},[i("el-input",{staticStyle:{"margin-bottom":"20px"},attrs:{placeholder:"请输入科室名称",clearable:"",size:"small","prefix-icon":"el-icon-search"},model:{value:e.deptName,callback:function(t){e.deptName=t},expression:"deptName"}})],1),i("div",{staticClass:"head-container"},[i("el-tree",{ref:"tree",attrs:{data:e.deptOptions,props:e.defaultProps,"expand-on-click-node":!1,"filter-node-method":e.filterNode,"node-key":"id","default-expand-all":"","highlight-current":""},on:{"node-click":e.handleNodeClick}})],1)]),i("el-col",{attrs:{span:20,xs:24}},[i("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{label:"用户名称",prop:"userName"}},[i("el-input",{staticStyle:{width:"240px"},attrs:{placeholder:"请输入用户名称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.userName,callback:function(t){e.$set(e.queryParams,"userName",t)},expression:"queryParams.userName"}})],1),i("el-form-item",{attrs:{label:"手机号码",prop:"phonenumber"}},[i("el-input",{staticStyle:{width:"240px"},attrs:{placeholder:"请输入手机号码",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.phonenumber,callback:function(t){e.$set(e.queryParams,"phonenumber",t)},expression:"queryParams.phonenumber"}})],1),i("el-form-item",{attrs:{label:"状态",prop:"status"}},[i("el-select",{staticStyle:{width:"240px"},attrs:{placeholder:"用户状态",clearable:""},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}},e._l(e.dict.type.sys_normal_disable,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",{attrs:{label:"创建时间"}},[i("el-date-picker",{staticStyle:{width:"240px"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.dateRange,callback:function(t){e.dateRange=t},expression:"dateRange"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),i("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),i("el-row",{staticClass:"mb8",attrs:{gutter:10}},[i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:add"],expression:"['system:user:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:edit"],expression:"['system:user:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:remove"],expression:"['system:user:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:import"],expression:"['system:user:import']"}],attrs:{type:"info",plain:"",icon:"el-icon-upload2",size:"mini"},on:{click:e.handleImport}},[e._v("导入")])],1),i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:export"],expression:"['system:user:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),i("right-toolbar",{attrs:{showSearch:e.showSearch,columns:e.columns},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.userList},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"50",align:"center"}}),e.columns[0].visible?i("el-table-column",{key:"userId",attrs:{label:"用户编号",align:"center",prop:"userId"}}):e._e(),i("el-table-column",{attrs:{label:"头像",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){var l=t.row;return[l.avatar?i("img",{staticClass:"circle",attrs:{src:e.baseUrl+l.avatar}}):i("img",{staticClass:"circle",attrs:{src:a("610a")}})]}}])}),e.columns[1].visible?i("el-table-column",{key:"userName",attrs:{label:"用户名称",align:"center",prop:"userName","show-overflow-tooltip":!0}}):e._e(),e.columns[2].visible?i("el-table-column",{key:"nickName",attrs:{label:"用户昵称",align:"center",prop:"nickName","show-overflow-tooltip":!0}}):e._e(),e.columns[3].visible?i("el-table-column",{key:"deptName",attrs:{label:"科室",align:"center",prop:"dept.deptName","show-overflow-tooltip":!0}}):e._e(),i("el-table-column",{attrs:{label:"岗位",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.postNames)+" ")]}}])}),e.columns[4].visible?i("el-table-column",{key:"phonenumber",attrs:{label:"手机号码",align:"center",prop:"phonenumber",width:"120"}}):e._e(),i("el-table-column",{attrs:{label:"简介",align:"center","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.doctorBlurb)+" ")]}}])}),e.columns[5].visible?i("el-table-column",{key:"status",attrs:{label:"状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-switch",{attrs:{"active-value":"0","inactive-value":"1"},on:{change:function(a){return e.handleStatusChange(t.row)}},model:{value:t.row.status,callback:function(a){e.$set(t.row,"status",a)},expression:"scope.row.status"}})]}}],null,!1,3955094654)}):e._e(),e.columns[6].visible?i("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"createTime",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(e.parseTime(t.row.createTime)))])]}}],null,!1,3078210614)}):e._e(),i("el-table-column",{attrs:{label:"操作",align:"center",width:"160","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return 1!==t.row.userId?[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:edit"],expression:"['system:user:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){return e.handleUpdate(t.row)}}},[e._v("修改")]),i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:remove"],expression:"['system:user:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")]),i("el-dropdown",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:resetPwd","system:user:edit"],expression:"['system:user:resetPwd', 'system:user:edit']"}],attrs:{size:"mini"},on:{command:function(a){return e.handleCommand(a,t.row)}}},[i("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-d-arrow-right"}},[e._v("更多")]),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[i("el-dropdown-item",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:resetPwd"],expression:"['system:user:resetPwd']"}],attrs:{command:"handleResetPwd",icon:"el-icon-key"}},[e._v("重置密码")]),i("el-dropdown-item",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:edit"],expression:"['system:user:edit']"}],attrs:{command:"handleAuthRole",icon:"el-icon-circle-check"}},[e._v("分配角色")])],1)],1)]:void 0}}],null,!0)})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}})],1)],1),i("el-dialog",{attrs:{title:e.title,visible:e.open,width:"1000px","append-to-body":"","close-on-press-escape":!1,"close-on-click-modal":!1,"before-close":e.cancel},on:{"update:visible":function(t){e.open=t}}},[i("div",{staticStyle:{"max-height":"70vh",overflow:"auto","padding-right":"5px"}},[i("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"140px"}},[i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"用户昵称",prop:"nickName"}},[i("el-input",{attrs:{placeholder:"请输入用户昵称",maxlength:"30"},model:{value:e.form.nickName,callback:function(t){e.$set(e.form,"nickName",t)},expression:"form.nickName"}})],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"归属科室",prop:"deptId"}},[i("treeselect",{attrs:{options:e.deptOptions,"show-count":!0,placeholder:"请选择归属科室"},model:{value:e.form.deptId,callback:function(t){e.$set(e.form,"deptId",t)},expression:"form.deptId"}})],1)],1)],1),i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"手机号码",prop:"phonenumber"}},[i("el-input",{attrs:{placeholder:"请输入手机号码",maxlength:"11"},model:{value:e.form.phonenumber,callback:function(t){e.$set(e.form,"phonenumber",t)},expression:"form.phonenumber"}})],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[i("el-input",{attrs:{placeholder:"请输入邮箱",maxlength:"50"},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}})],1)],1)],1),i("el-row",[i("el-col",{attrs:{span:12}},[void 0==e.form.userId?i("el-form-item",{attrs:{label:"用户名称",prop:"userName"}},[i("el-input",{attrs:{placeholder:"请输入用户名称",maxlength:"30"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1):e._e()],1),i("el-col",{attrs:{span:12}},[void 0==e.form.userId?i("el-form-item",{attrs:{label:"用户密码",prop:"password"}},[i("el-input",{attrs:{placeholder:"请输入用户密码",type:"password",maxlength:"20","show-password":""},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1):e._e()],1)],1),i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"用户性别"}},[i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择性别"},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},e._l(e.dict.type.sys_user_sex,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"状态"}},[i("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.dict.type.sys_normal_disable,(function(t){return i("el-radio",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.label))])})),1)],1)],1)],1),i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"岗位"}},[i("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",placeholder:"请选择岗位"},model:{value:e.form.postIds,callback:function(t){e.$set(e.form,"postIds",t)},expression:"form.postIds"}},e._l(e.postOptions,(function(e){return i("el-option",{key:e.postId,attrs:{label:e.postName,value:e.postId,disabled:1==e.status}})})),1)],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"角色"}},[i("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",placeholder:"请选择角色"},model:{value:e.form.roleIds,callback:function(t){e.$set(e.form,"roleIds",t)},expression:"form.roleIds"}},e._l(e.roleOptions,(function(e){return i("el-option",{key:e.roleId,attrs:{label:e.roleName,value:e.roleId,disabled:1==e.status}})})),1)],1)],1)],1),i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"医师资格证书"}},[i("el-upload",{ref:"uploadRef1",attrs:{"before-upload":e.beforeUpload,action:"#","list-type":"picture-card","http-request":e.handlePictureCardPreview1,"on-remove":e.handleRemove1,"file-list":e.imgFileList1,"on-change":e.handleChange1,accept:".jpg,.jpeg,.png,.gif,"}},[i("i",{staticClass:"el-icon-plus"})]),e.dialogImgVisible1?i("el-dialog",{attrs:{visible:e.dialogImgVisible1},on:{"update:visible":function(t){e.dialogImgVisible1=t}}},[i("img",{attrs:{width:"100%",src:e.dialogImageUrl1}})]):e._e()],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"医师头像"}},[i("el-upload",{ref:"uploadRef2",attrs:{"before-upload":e.beforeUpload,action:"#","list-type":"picture-card","http-request":e.handlePictureCardPreview2,"on-remove":e.handleRemove2,"file-list":e.imgFileList2,"on-change":e.handleChange2,accept:".jpg,.jpeg,.png,.gif,"}},[i("i",{staticClass:"el-icon-plus"})]),e.dialogImgVisible2?i("el-dialog",{attrs:{visible:e.dialogImgVisible2},on:{"update:visible":function(t){e.dialogImgVisible2=t}}},[i("img",{attrs:{width:"100%",src:e.dialogImageUrl2}})]):e._e()],1)],1)],1),i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"医师执业证书"}},[i("el-upload",{ref:"uploadRef3",attrs:{"before-upload":e.beforeUpload,action:"#","list-type":"picture-card","http-request":e.handlePictureCardPreview3,"on-remove":e.handleRemove3,"file-list":e.imgFileList3,"on-change":e.handleChange3,accept:".jpg,.jpeg,.png,.gif,"}},[i("i",{staticClass:"el-icon-plus"})]),e.dialogImgVisible3?i("el-dialog",{attrs:{visible:e.dialogImgVisible3},on:{"update:visible":function(t){e.dialogImgVisible3=t}}},[i("img",{attrs:{width:"100%",src:e.dialogImageUrl3}})]):e._e()],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"是否展示患者端"}},[i("el-radio-group",{model:{value:e.form.showPatient,callback:function(t){e.$set(e.form,"showPatient",t)},expression:"form.showPatient"}},[i("el-radio",{attrs:{label:1}},[e._v("是")]),i("el-radio",{attrs:{label:0}},[e._v("否")])],1)],1)],1)],1),i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"医师资格证书编号"}},[i("el-input",{attrs:{placeholder:"请输入医师资格证书编号",maxlength:"11"},model:{value:e.form.physicianQualificationCertificateNum,callback:function(t){e.$set(e.form,"physicianQualificationCertificateNum",t)},expression:"form.physicianQualificationCertificateNum"}})],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"医师执业证书编号"}},[i("el-input",{attrs:{placeholder:"请输入医师执业证书编号",maxlength:"50"},model:{value:e.form.medicalPracticingCertificateNum,callback:function(t){e.$set(e.form,"medicalPracticingCertificateNum",t)},expression:"form.medicalPracticingCertificateNum"}})],1)],1)],1),i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"医生擅长"}},[i("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",placeholder:"请选择医师资格证书编号"},model:{value:e.form.doctorProficientList,callback:function(t){e.$set(e.form,"doctorProficientList",t)},expression:"form.doctorProficientList"}},e._l(e.businessDictDataOptions,(function(e,t){return i("el-option",{key:t,attrs:{label:e.dictName,value:e.dictName}})})),1)],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"医生简介"}},[i("el-input",{attrs:{placeholder:"请输入医生简介"},model:{value:e.form.doctorBlurb,callback:function(t){e.$set(e.form,"doctorBlurb",t)},expression:"form.doctorBlurb"}})],1)],1)],1),i("el-row",[i("el-col",{attrs:{span:24}},[i("el-form-item",{attrs:{label:"备注"}},[i("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1)],1)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.cancel}},[e._v("取 消")]),i("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")])],1)]),i("el-dialog",{attrs:{title:e.upload.title,visible:e.upload.open,width:"400px","append-to-body":""},on:{"update:visible":function(t){return e.$set(e.upload,"open",t)}}},[i("el-upload",{ref:"upload",attrs:{limit:1,accept:".xlsx, .xls",headers:e.upload.headers,action:e.upload.url+"?updateSupport="+e.upload.updateSupport,disabled:e.upload.isUploading,"on-progress":e.handleFileUploadProgress,"on-success":e.handleFileSuccess,"auto-upload":!1,drag:""}},[i("i",{staticClass:"el-icon-upload"}),i("div",{staticClass:"el-upload__text"},[e._v("将文件拖到此处,或"),i("em",[e._v("点击上传")])]),i("div",{staticClass:"el-upload__tip text-center",attrs:{slot:"tip"},slot:"tip"},[i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[i("el-checkbox",{model:{value:e.upload.updateSupport,callback:function(t){e.$set(e.upload,"updateSupport",t)},expression:"upload.updateSupport"}}),e._v(" 是否更新已经存在的用户数据 ")],1),i("span",[e._v("仅允许导入xls、xlsx格式文件。")]),i("el-link",{staticStyle:{"font-size":"12px","vertical-align":"baseline"},attrs:{type:"primary",underline:!1},on:{click:e.importTemplate}},[e._v("下载模板")])],1)]),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.submitFileForm}},[e._v("确 定")]),i("el-button",{on:{click:function(t){e.upload.open=!1}}},[e._v("取 消")])],1)],1)],1)},l=[],r=a("ade3"),s=a("5530"),n=a("c7eb"),o=a("1da1"),c=(a("4de4"),a("a15b"),a("d81d"),a("14d9"),a("fb6a"),a("b0c0"),a("d3b7"),a("ac1f"),a("00b4"),a("c0c7")),u=a("5f87"),d=a("ca17"),m=a.n(d),p=(a("542c"),a("943d")),f={name:"User",dicts:["sys_normal_disable","sys_user_sex"],components:{Treeselect:m.a},data:function(){return{baseUrl:"http://106.74.15.131:80/api",dialogImageUrl1:"",dialogImgVisible1:!1,imgFileList1:[],imgFileFlag1:"imgFileList1",dialogImageUrl2:"",dialogImgVisible2:!1,imgFileList2:[],imgFileFlag2:"imgFileList2",dialogImageUrl3:"",dialogImgVisible3:!1,imgFileList3:[],imgFileFlag3:"imgFileList3",fileType:["png","jpg","jpeg","gif"],businessDictDataOptions:[],loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,userList:null,title:"",deptOptions:void 0,open:!1,deptName:void 0,initPassword:void 0,dateRange:[],postOptions:[],roleOptions:[],form:{},defaultProps:{children:"children",label:"label"},upload:{open:!1,title:"",isUploading:!1,updateSupport:0,headers:{Authorization:"Bearer "+Object(u["a"])()},url:"http://106.74.15.131:80/api/system/user/importData"},queryParams:{pageNum:1,pageSize:10,userName:void 0,phonenumber:void 0,status:void 0,deptId:void 0},columns:[{key:0,label:"用户编号",visible:!0},{key:1,label:"用户名称",visible:!0},{key:2,label:"用户昵称",visible:!0},{key:3,label:"科室",visible:!0},{key:4,label:"手机号码",visible:!0},{key:5,label:"状态",visible:!0},{key:6,label:"创建时间",visible:!0}],rules:{userName:[{required:!0,message:"用户名称不能为空",trigger:"blur"},{min:2,max:20,message:"用户名称长度必须介于 2 和 20 之间",trigger:"blur"}],nickName:[{required:!0,message:"用户昵称不能为空",trigger:"blur"}],password:[{required:!0,message:"用户密码不能为空",trigger:"blur"},{min:5,max:20,message:"用户密码长度必须介于 5 和 20 之间",trigger:"blur"},{pattern:/^[^<>"'|\\]+$/,message:"不能包含非法字符:< > \" ' \\ |",trigger:"blur"}],email:[{type:"email",message:"请输入正确的邮箱地址",trigger:["blur","change"]}],phonenumber:[{required:!0,message:"手机号不能为空",trigger:"blur"},{pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"请输入正确的手机号码",trigger:"blur"}]}}},watch:{deptName:function(e){this.$refs.tree.filter(e)}},created:function(){this.getList(),this.getDeptTree(),this.initBusinessDictData()},methods:Object(r["a"])(Object(r["a"])(Object(r["a"])({initBusinessDictData:function(){var e=this;return Object(o["a"])(Object(n["a"])().mark((function t(){var a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(p["k"])("erm_doctor_tags");case 2:a=t.sent,e.businessDictDataOptions=a.data;case 4:case"end":return t.stop()}}),t)})))()},getList:function(){var e=this;this.loading=!0,Object(c["h"])(this.addDateRange(this.queryParams,this.dateRange)).then((function(t){e.userList=t.rows,e.total=t.total,e.loading=!1}))},getDeptTree:function(){var e=this;Object(c["d"])().then((function(t){e.deptOptions=t.data}))},filterNode:function(e,t){return!e||-1!==t.label.indexOf(e)},handleNodeClick:function(e){this.queryParams.deptId=e.id,this.handleQuery()},handleStatusChange:function(e){var t=this,a="0"===e.status?"启用":"停用";this.$modal.confirm('确认要"'+a+'""'+e.userName+'"用户吗?').then((function(){return Object(c["b"])(e.userId,e.status)})).then((function(){t.$modal.msgSuccess(a+"成功")})).catch((function(){e.status="0"===e.status?"1":"0"}))},cancel:function(){this.open=!1,this.imgFileList1=[],this.imgFileList2=[],this.imgFileList3=[],this.reset()},reset:function(){this.form={userId:void 0,deptId:void 0,userName:void 0,nickName:void 0,password:void 0,phonenumber:void 0,email:void 0,sex:void 0,status:"0",remark:void 0,postIds:[],roleIds:[]},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.dateRange=[],this.resetForm("queryForm"),this.queryParams.deptId=void 0,this.$refs.tree.setCurrentKey(null),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.userId})),this.single=1!=e.length,this.multiple=!e.length},handleCommand:function(e,t){switch(e){case"handleResetPwd":this.handleResetPwd(t);break;case"handleAuthRole":this.handleAuthRole(t);break;default:break}},handleAdd:function(){var e=this;this.reset(),Object(c["f"])().then((function(t){e.postOptions=t.posts,e.roleOptions=t.roles,e.open=!0,e.title="添加用户",e.form.password=e.initPassword,e.form.showPatient=1,e.$nextTick((function(){e.imgFileList1.length>0?e.$refs.uploadRef1.$el.children[1].style.display="none":e.$refs.uploadRef1.$el.children[1].style.display="block"})),e.$nextTick((function(){e.imgFileList2.length>0?e.$refs.uploadRef2.$el.children[1].style.display="none":e.$refs.uploadRef2.$el.children[1].style.display="block"})),e.$nextTick((function(){e.imgFileList3.length>0?e.$refs.uploadRef3.$el.children[1].style.display="none":e.$refs.uploadRef3.$el.children[1].style.display="block"}))}))},handleUpdate:function(e){var t=this;this.reset();var a=e.userId||this.ids;this.open=!0,Object(c["f"])(a).then((function(e){t.form=e.data,t.postOptions=e.posts,t.roleOptions=e.roles,t.$set(t.form,"postIds",e.postIds),t.$set(t.form,"roleIds",e.roleIds),t.$nextTick((function(){e.data.physicianQualificationCertificatePic?(t.dialogImageUrl1=t.baseUrl+e.data.physicianQualificationCertificatePic,t.imgFileList1.push({uid:Date.now(),url:t.baseUrl+e.data.physicianQualificationCertificatePic,name:"医师资格证书"}),t.$nextTick((function(){t.imgFileList1.length>0?t.$refs.uploadRef1.$el.children[1].style.display="none":t.$refs.uploadRef1.$el.children[1].style.display="block"}))):t.$refs.uploadRef1.$el.children[1].style.display="block",e.data.avatar?(t.dialogImageUrl2=t.baseUrl+e.data.avatar,t.imgFileList2.push({uid:Date.now(),url:t.baseUrl+e.data.avatar,name:"医师头像"}),t.$nextTick((function(){t.imgFileList2.length>0?t.$refs.uploadRef2.$el.children[1].style.display="none":t.$refs.uploadRef2.$el.children[1].style.display="block"}))):t.$refs.uploadRef2.$el.children[1].style.display="block",e.data.medicalPracticingCertificatePic?(t.dialogImageUrl3=t.baseUrl+e.data.medicalPracticingCertificatePic,t.imgFileList3.push({uid:Date.now(),url:t.baseUrl+e.data.medicalPracticingCertificatePic,name:"医师头像"}),t.$nextTick((function(){t.imgFileList3.length>0?t.$refs.uploadRef3.$el.children[1].style.display="none":t.$refs.uploadRef3.$el.children[1].style.display="block"}))):t.$refs.uploadRef3.$el.children[1].style.display="block",e.data.doctorProficient&&(t.form.doctorProficientList=e.data.doctorProficient.split(",")),t.$forceUpdate(),t.title="修改用户",t.form.password=""}))}))},handleResetPwd:function(e){var t=this;this.$prompt('请输入"'+e.userName+'"的新密码',"提示",{confirmButtonText:"确定",cancelButtonText:"取消",closeOnClickModal:!1,inputPattern:/^.{5,20}$/,inputErrorMessage:"用户密码长度必须介于 5 和 20 之间",inputValidator:function(e){if(/<|>|"|'|\||\\/.test(e))return"不能包含非法字符:< > \" ' \\ |"}}).then((function(a){var i=a.value;Object(c["i"])(e.userId,i).then((function(e){t.$modal.msgSuccess("修改成功,新密码是:"+i)}))})).catch((function(){}))},handleAuthRole:function(e){var t=e.userId;this.$router.push("/system/user-auth/role/"+t)},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(Array.isArray(e.form.doctorProficientList)&&e.form.doctorProficientList.length&&(e.form.doctorProficient=e.form.doctorProficientList.join()),void 0!=e.form.userId?Object(c["k"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList(),e.imgFileList1=[],e.imgFileList2=[],e.imgFileList3=[]})):(Array.isArray(e.form.doctorProficientList)&&e.form.doctorProficientList.length&&(e.form.doctorProficient=e.form.doctorProficientList.join()),Object(c["a"])(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList(),e.imgFileList1=[],e.imgFileList2=[],e.imgFileList3=[]}))))}))},handleDelete:function(e){var t=this,a=e.userId||this.ids;this.$modal.confirm('是否确认删除用户编号为"'+a+'"的数据项?').then((function(){return Object(c["c"])(a)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("system/user/export",Object(s["a"])({},this.queryParams),"user_".concat((new Date).getTime(),".xlsx"))},handleImport:function(){this.upload.title="用户导入",this.upload.open=!0},importTemplate:function(){this.download("system/user/importTemplate",{},"user_template_".concat((new Date).getTime(),".xlsx"))},handleFileUploadProgress:function(e,t,a){this.upload.isUploading=!0},handleFileSuccess:function(e,t,a){this.upload.open=!1,this.upload.isUploading=!1,this.$refs.upload.clearFiles(),this.$alert("
"+e.msg+"
","导入结果",{dangerouslyUseHTMLString:!0}),this.getList()},submitFileForm:function(){this.$refs.upload.submit()},beforeUpload:function(e){var t=!1;if(this.fileType.length){var a="";e.name.lastIndexOf(".")>-1&&(a=e.name.slice(e.name.lastIndexOf(".")+1)),t=this.fileType.some((function(t){return e.type.indexOf(t)>-1||!!(a&&a.indexOf(t)>-1)}))}else t=e.type.indexOf("image")>-1;return!!t||(this.$modal.msgError("文件格式不正确, 请上传".concat(this.fileType.join("/"),"图片格式文件!")),!1)},handleRemove1:function(e,t){this.imgFileList1=t,this.dialogImageUrl1="",t.length||(this.$refs.uploadRef1.$el.children[this.$refs.uploadRef1.$el.children.length-1].style.display="block",this.imgFileFlag1="imgFileList1")},handleRemove2:function(e,t){this.imgFileList2=t,this.dialogImageUrl2="",t.length||(this.$refs.uploadRef2.$el.children[this.$refs.uploadRef2.$el.children.length-1].style.display="block",this.imgFileFlag2="imgFileList2")},handleRemove3:function(e,t){this.imgFileList3=t,this.dialogImageUrl3="",t.length||(this.$refs.uploadRef3.$el.children[this.$refs.uploadRef3.$el.children.length-1].style.display="block",this.imgFileFlag3="imgFileList3")},handlePictureCardPreview1:function(e){this.dialogImageUrl1=e.url,this.dialogImgVisible1=!0},handlePictureCardPreview2:function(e){this.dialogImageUrl2=e.url,this.dialogImgVisible2=!0},handlePictureCardPreview3:function(e){this.dialogImageUrl3=e.url,this.dialogImgVisible3=!0},handleChange1:function(e,t){t.length>0?this.$refs.uploadRef1.$el.children[this.$refs.uploadRef1.$el.children.length-1].style.display="none":this.$refs.uploadRef1.$el.children[this.$refs.uploadRef1.$el.children.length-1].style.display="block"},handleChange2:function(e,t){t.length>0?this.$refs.uploadRef2.$el.children[this.$refs.uploadRef2.$el.children.length-1].style.display="none":this.$refs.uploadRef2.$el.children[this.$refs.uploadRef2.$el.children.length-1].style.display="block"},handleChange3:function(e,t){t.length>0?this.$refs.uploadRef3.$el.children[this.$refs.uploadRef3.$el.children.length-1].style.display="none":this.$refs.uploadRef3.$el.children[this.$refs.uploadRef3.$el.children.length-1].style.display="block"}},"handlePictureCardPreview1",(function(e){var t=this;return Object(o["a"])(Object(n["a"])().mark((function a(){var i,l;return Object(n["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(a.prev=0,e){a.next=3;break}return a.abrupt("return",t.$message.error("文件有误"));case 3:return i=new FormData,i.append("file",e.file),a.next=7,Object(c["n"])(i);case 7:if(l=a.sent,t.dialogImageUrl1=l.url,t.$nextTick((function(){t.dialogVisible1=!0})),200===l.code){a.next=12;break}return a.abrupt("return",t.$message.error("文件格式不支持"));case 12:t.form.physicianQualificationCertificatePic=l.fileName,a.next=18;break;case 15:a.prev=15,a.t0=a["catch"](0),t.ruleForm.imgFileList=[];case 18:case"end":return a.stop()}}),a,null,[[0,15]])})))()})),"handlePictureCardPreview2",(function(e){var t=this;return Object(o["a"])(Object(n["a"])().mark((function a(){var i,l;return Object(n["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(a.prev=0,e){a.next=3;break}return a.abrupt("return",t.$message.error("文件有误"));case 3:return i=new FormData,i.append("file",e.file),a.next=7,Object(c["n"])(i);case 7:if(l=a.sent,t.dialogImageUrl2=l.url,t.$nextTick((function(){t.dialogVisible2=!0})),200===l.code){a.next=12;break}return a.abrupt("return",t.$message.error("文件格式不支持"));case 12:t.form.avatar=l.fileName,a.next=18;break;case 15:a.prev=15,a.t0=a["catch"](0),t.ruleForm.imgFileList=[];case 18:case"end":return a.stop()}}),a,null,[[0,15]])})))()})),"handlePictureCardPreview3",(function(e){var t=this;return Object(o["a"])(Object(n["a"])().mark((function a(){var i,l;return Object(n["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(a.prev=0,e){a.next=3;break}return a.abrupt("return",t.$message.error("文件有误"));case 3:return i=new FormData,i.append("file",e.file),a.next=7,Object(c["n"])(i);case 7:if(l=a.sent,t.dialogImageUrl3=l.url,t.$nextTick((function(){t.dialogVisible3=!0})),200===l.code){a.next=12;break}return a.abrupt("return",t.$message.error("文件格式不支持"));case 12:t.form.medicalPracticingCertificatePic=l.fileName,a.next=18;break;case 15:a.prev=15,a.t0=a["catch"](0),t.ruleForm.imgFileList=[];case 18:case"end":return a.stop()}}),a,null,[[0,15]])})))()}))},h=f,g=(a("c8b2"),a("2877")),b=Object(g["a"])(h,i,l,!1,null,"7c31ef6d",null);t["default"]=b.exports},9831:function(e,t,a){},c0c7:function(e,t,a){"use strict";a.d(t,"h",(function(){return s})),a.d(t,"f",(function(){return n})),a.d(t,"a",(function(){return o})),a.d(t,"k",(function(){return c})),a.d(t,"c",(function(){return u})),a.d(t,"i",(function(){return d})),a.d(t,"b",(function(){return m})),a.d(t,"g",(function(){return p})),a.d(t,"l",(function(){return f})),a.d(t,"m",(function(){return h})),a.d(t,"o",(function(){return g})),a.d(t,"n",(function(){return b})),a.d(t,"e",(function(){return v})),a.d(t,"j",(function(){return y})),a.d(t,"d",(function(){return w}));a("e9c4");var i=a("b775"),l=a("c38a"),r=a("cbd8");function s(e){return Object(i["a"])({url:"/system/user/list",method:"get",params:e})}function n(e){return Object(i["a"])({url:"/system/user/"+Object(l["e"])(e),method:"get"})}function o(e){return Object(i["a"])({url:"/system/user",method:"post",data:r["a"].methods.encrypt(JSON.stringify(e))})}function c(e){return Object(i["a"])({url:"/system/user",method:"put",data:r["a"].methods.encrypt(JSON.stringify(e))})}function u(e){return Object(i["a"])({url:"/system/user/"+e,method:"delete"})}function d(e,t){var a={userId:e,password:t};return Object(i["a"])({url:"/system/user/resetPwd",method:"put",data:r["a"].methods.encrypt(JSON.stringify(a))})}function m(e,t){var a={userId:e,status:t};return Object(i["a"])({url:"/system/user/changeStatus",method:"put",data:r["a"].methods.encrypt(JSON.stringify(a))})}function p(){return Object(i["a"])({url:"/system/user/profile",method:"get"})}function f(e){return Object(i["a"])({url:"/system/user/profile",method:"put",data:r["a"].methods.encrypt(JSON.stringify(e))})}function h(e,t){var a={oldPassword:e,newPassword:t};return Object(i["a"])({url:"/system/user/profile/updatePwd",method:"put",params:a})}function g(e){return Object(i["a"])({url:"/system/user/profile/avatar",method:"post",data:r["a"].methods.encrypt(JSON.stringify(e))})}function b(e){return Object(i["a"])({url:"/common/upload",method:"post",data:e})}function v(e){return Object(i["a"])({url:"/system/user/authRole/"+e,method:"get"})}function y(e){return Object(i["a"])({url:"/system/user/authRole",method:"put",params:e})}function w(){return Object(i["a"])({url:"/system/user/deptTree",method:"get"})}},c8b2:function(e,t,a){"use strict";a("9831")}}]);