12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-71c401c6"],{"129d":function(t,e,a){"use strict";a("8d50")},"202b":function(t,e,a){"use strict";a("493c")},"493c":function(t,e,a){},"8d50":function(t,e,a){},9973:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-pagination",{attrs:{background:"","page-size":t.page_size?t.page_size:20,"current-page":t.current,"page-sizes":[10,20,30,40,50,60,70,80,90,100],layout:"total,sizes,prev, pager, next",total:t.total},on:{"current-change":t.getData,"size-change":t.handleSizeChange}})},o=[],l={data:function(){return{page:1}},props:{total:"",page_size:"",current:""},methods:{getData:function(t){this.page=t,this.$emit("pageChange")},handleSizeChange:function(t){this.$emit("pageChange",t)}},created:function(){}},r=l,i=(a("129d"),a("2877")),s=Object(i["a"])(r,n,o,!1,null,null,null);e["a"]=s.exports},c8af4:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"content"},[a("h4",[t._v("医生列表")]),a("el-divider"),a("el-form",{staticClass:"filter-form",attrs:{"label-width":"80px"}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"名称"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入名称",size:"mini"},on:{clear:function(e){return t.getData()}},model:{value:t.queryParams.name,callback:function(e){t.$set(t.queryParams,"name",e)},expression:"queryParams.name"}})],1)],1),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"手机号"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入手机号",size:"mini"},on:{clear:function(e){return t.getData()}},model:{value:t.queryParams.phone,callback:function(e){t.$set(t.queryParams,"phone",e)},expression:"queryParams.phone"}})],1)],1),a("el-col",{attrs:{span:4}},[a("el-form-item",{staticStyle:{"margin-left":"10px"},attrs:{"label-width":"10"}},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.getData}},[t._v("筛选")]),a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:t.handleAdd}},[t._v("新增医生")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%","margin-top":"10px"},attrs:{data:t.list,height:"50vh"}},[a("el-table-column",{attrs:{align:"center",prop:"name",label:"名称"}}),a("el-table-column",{attrs:{align:"center",prop:"phone",label:"手机号"}}),a("el-table-column",{attrs:{label:"医生类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.role?a("span",[t._v("大医生")]):t._e(),2==e.row.role?a("span",[t._v("中医生")]):t._e(),3==e.row.role?a("span",[t._v("小医生")]):t._e()]}}])}),a("el-table-column",{attrs:{align:"center",prop:"hospital_name",label:"医院"}}),a("el-table-column",{attrs:{align:"center",prop:"ctime",label:"创建时间"}}),a("el-table-column",{attrs:{align:"center",prop:"date",label:"操作",width:"320"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(a){return t.edit(e.row.id)}}},[t._v("编辑")]),a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){return t.del(e.row.id)}}},[t._v("删除")])]}}])})],1),a("Page",{ref:"pageButton",attrs:{current:t.form.page,page_size:t.form.page_size,total:t.total},on:{pageChange:t.gopage}}),a("el-dialog",{attrs:{title:t.title,visible:t.open,width:"500px","append-to-body":""},on:{"update:visible":function(e){t.open=e}}},[a("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入手机号"},model:{value:t.form.phone,callback:function(e){t.$set(t.form,"phone",e)},expression:"form.phone"}})],1),a("el-form-item",{attrs:{label:"医生类型",prop:"role"}},[a("el-select",{attrs:{placeholder:"请选择医生类型",filterable:""},model:{value:t.form.role,callback:function(e){t.$set(t.form,"role",e)},expression:"form.role"}},t._l(t.$const.doctorRoleList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"医院",prop:"hospital_name"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入医院"},model:{value:t.form.hospital_name,callback:function(e){t.$set(t.form,"hospital_name",e)},expression:"form.hospital_name"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("确 定")]),a("el-button",{on:{click:function(e){t.open=!1}}},[t._v("取 消")])],1)],1)],1)},o=[],l=a("9973"),r={components:{Page:l["a"]},data:function(){return{loading:!1,queryParams:{page:1},form:{},form1:{},form2:{},list:[{},{}],total:0,title:"新增用户",open:!1,stockList:[],rules:{}}},methods:{del:function(t){var e=this;this.$confirm("确认删除?","提示",{type:"warning"}).then((function(){e.$api.delDoctorInfo({id:t}).then((function(t){t.data.code?e.$msgError(t.data.message):(e.$msgSuccess("删除成功"),e.getData())}))}))},gopage:function(t){t&&(this.queryParams.page_size=t),this.queryParams.page=this.$refs.pageButton.page,this.getData()},getData:function(){var t=this;this.loading=!0,this.$api.getDoctorsList(this.queryParams).then((function(e){t.list=e.data.data.list,t.total=e.data.data.total,t.loading=!1}))},handleAdd:function(){this.open=!0,this.title="新增医生",this.form={}},edit:function(t){var e=this;this.title="编辑医生",this.$api.getDoctorInfo({id:t}).then((function(t){e.form=t.data.data,e.open=!0}))},handleAvatarSuccess:function(t,e){this.form.img=t.data.url},beforeAvatarUpload:function(t){},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){e&&(null!=t.form.id?t.$api.editDoctorInfo(t.form).then((function(e){0==e.data.code?(t.msgSuccess("成功!"),t.open=!1,t.getData()):t.msgError(e.data.message)})):t.$api.addDoctorInfo(t.form).then((function(e){0==e.data.code?(t.msgSuccess("成功!"),t.open=!1,t.getData()):t.msgError(e.data.message)})))}))},remoteMethod:function(t){var e=this;""!==t?(this.loading=!0,this.$api.getStockSearchList({name:t}).then((function(t){e.stockList=t.data.data,e.$set(e.stockList,t.data.data),e.loading=!1}))):this.stockList=[]}},created:function(){this.getData()}},i=r,s=(a("202b"),a("2877")),c=Object(s["a"])(i,n,o,!1,null,null,null);e["default"]=c.exports}}]);
- //# sourceMappingURL=chunk-71c401c6.8e612e4a.js.map
|