app.8628ae9c.js 9.4 KB

12
  1. (function(e){function t(t){for(var n,l,r=t[0],s=t[1],d=t[2],u=0,h=[];u<r.length;u++)l=r[u],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&h.push(o[l][0]),o[l]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);c&&c(t);while(h.length)h.shift()();return i.push.apply(i,d||[]),a()}function a(){for(var e,t=0;t<i.length;t++){for(var a=i[t],n=!0,r=1;r<a.length;r++){var s=a[r];0!==o[s]&&(n=!1)}n&&(i.splice(t--,1),e=l(l.s=a[0]))}return e}var n={},o={app:0},i=[];function l(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,l),a.l=!0,a.exports}l.m=e,l.c=n,l.d=function(e,t,a){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(l.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(a,n,function(t){return e[t]}.bind(null,n));return a},l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],s=r.push.bind(r);r.push=t,r=r.slice();for(var d=0;d<r.length;d++)t(r[d]);var c=s;i.push([0,"chunk-vendors"]),a()})({0:function(e,t,a){e.exports=a("56d7")},"56d7":function(e,t,a){"use strict";a.r(t);a("e260"),a("e6cf"),a("cca6"),a("a79d");var n=a("2b0e"),o=a("5c96"),i=a.n(o),l=(a("0fae"),a("bc3a")),r=a.n(l),s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("index")],1)},d=[],c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"main"},[a("div",{staticStyle:{"margin-bottom":"15px"}},[a("el-select",{staticStyle:{"margin-right":"15px"},attrs:{placeholder:"选择排班周"},model:{value:e.Schedulingtime,callback:function(t){e.Schedulingtime=t},expression:"Schedulingtime"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),a("el-select",{staticStyle:{"margin-right":"15px"},attrs:{disabled:e.isorg,placeholder:"选择机构"},on:{change:e.selectmechanism},model:{value:e.mechanism,callback:function(t){e.mechanism=t},expression:"mechanism"}},e._l(e.mechanismList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),a("el-select",{attrs:{disabled:e.isdocter,placeholder:"选择医生"},on:{change:e.selectdocter},model:{value:e.docter,callback:function(t){e.docter=t},expression:"docter"}},e._l(e.docterList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),a("el-button",{staticStyle:{"margin-left":"15px"},attrs:{type:"primary"},on:{click:e.submitsave}},[e._v("保存")])],1),a("el-table",{staticStyle:{width:"1200px"},attrs:{data:e.dataList,border:""}},[a("el-table-column",{attrs:{prop:"date",label:"时段"}}),a("el-table-column",{attrs:{label:"周一"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-checkbox",{attrs:{disabled:"other"==e.tableData[t.$index].monday},on:{change:function(a){return e.mondaychange(t.$index,t.row)}},model:{value:e.tableData[t.$index].monday,callback:function(a){e.$set(e.tableData[t.$index],"monday",a)},expression:"tableData[scope.$index].monday"}})]}}])}),a("el-table-column",{attrs:{prop:"name",label:"周二"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-checkbox",{attrs:{disabled:"other"==e.tableData[t.$index].tuesday},on:{change:function(a){return e.mondaychange(t.$index,t.row)}},model:{value:e.tableData[t.$index].tuesday,callback:function(a){e.$set(e.tableData[t.$index],"tuesday",a)},expression:"tableData[scope.$index].tuesday"}})]}}])}),a("el-table-column",{attrs:{prop:"name",label:"周三"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-checkbox",{attrs:{disabled:"other"==e.tableData[t.$index].wednesday},on:{change:function(a){return e.mondaychange(t.$index,t.row)}},model:{value:e.tableData[t.$index].wednesday,callback:function(a){e.$set(e.tableData[t.$index],"wednesday",a)},expression:"tableData[scope.$index].wednesday"}})]}}])}),a("el-table-column",{attrs:{prop:"name",label:"周四"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-checkbox",{attrs:{disabled:"other"==e.tableData[t.$index].thursday},on:{change:function(a){return e.mondaychange(t.$index,t.row)}},model:{value:e.tableData[t.$index].thursday,callback:function(a){e.$set(e.tableData[t.$index],"thursday",a)},expression:"tableData[scope.$index].thursday"}})]}}])}),a("el-table-column",{attrs:{prop:"name",label:"周五"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-checkbox",{attrs:{disabled:"other"==e.tableData[t.$index].friday},on:{change:function(a){return e.mondaychange(t.$index,t.row)}},model:{value:e.tableData[t.$index].friday,callback:function(a){e.$set(e.tableData[t.$index],"friday",a)},expression:"tableData[scope.$index].friday"}})]}}])}),a("el-table-column",{attrs:{prop:"name",label:"周六"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-checkbox",{attrs:{disabled:"other"==e.tableData[t.$index].saturday},on:{change:function(a){return e.mondaychange(t.$index,t.row)}},model:{value:e.tableData[t.$index].saturday,callback:function(a){e.$set(e.tableData[t.$index],"saturday",a)},expression:"tableData[scope.$index].saturday"}})]}}])}),a("el-table-column",{attrs:{prop:"address",label:"周日"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-checkbox",{attrs:{disabled:"other"==e.tableData[t.$index].sunday},on:{change:function(a){return e.mondaychange(t.$index,t.row)}},model:{value:e.tableData[t.$index].sunday,callback:function(a){e.$set(e.tableData[t.$index],"sunday",a)},expression:"tableData[scope.$index].sunday"}})]}}])})],1)],1)},u=[],h=(a("b0c0"),a("ac1f"),a("1276"),{name:"index",data:function(){return{org_id:"",isorg:!1,isdocter:!1,mechanismList:[],docterList:[],options:[],mechanism:"",Schedulingtime:"",docter:"",docter_id:"",tableData:[{date:"上午",monday:!1,tuesday:!1,wednesday:!1,thursday:!1,friday:!1,saturday:!1,sunday:!1},{date:"下午",monday:!1,tuesday:!1,wednesday:!1,thursday:!1,friday:!1,saturday:!1,sunday:!1},{date:"晚上",monday:!1,tuesday:!1,wednesday:!1,thursday:!1,friday:!1,saturday:!1,sunday:!1}],urlid:""}},computed:{dataList:function(){var e=this.tableData;return e}},beforeCreate:function(){},created:function(){this.id=window.location.href.split("?")[1].split("=")[1],this.getComSchedule();var e=new Date;e.setTime(e.getTime()+864e5*(7-e.getDay()));for(var t=0;t<4;t++){e.setTime(e.getTime()+864e5);var a=e.getFullYear()+"-"+(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-"+(e.getDate()<10?"0"+e.getDate():e.getDate());e.setTime(e.getTime()+864e5*(e.getDay()+5));var n=e.getFullYear()+"-"+(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-"+(e.getDate()<10?"0"+e.getDate():e.getDate());this.options.push({value:a+"至"+n,label:a+"至"+n})}},methods:{selectmechanism:function(e){var t=this;if(""==this.Schedulingtime){this.mechanism="";var a=this.$createElement;return this.$notify({title:"提示",message:a("i",{style:"color: red"},"请先选择排班周时间"),duration:2500}),!1}this.org_id=e,this.http.get("cdms/getComSchedule",{params:{docter_id:this.docter_id,org_id:e,time:this.Schedulingtime}}).then((function(e){console.log(e),200==e.data.code&&(t.tableData=e.data.data.docter,console.log(t.tableData))}))},selectdocter:function(e){var t=this;if(""==this.Schedulingtime){this.docter="";var a=this.$createElement;return this.$notify({title:"提示",message:a("i",{style:"color: red"},"请先选择排班周时间"),duration:2500}),!1}this.docter_id=e,this.http.get("cdms/getComSchedule",{params:{docter_id:e,org_id:this.org_id,time:this.Schedulingtime}}).then((function(e){console.log(e),200==e.data.code&&(t.tableData=e.data.data.docter,console.log(t.tableData))}))},mondaychange:function(e,t){console.log(e),console.log(t)},submitsave:function(){var e=this;return""==this.Schedulingtime?(this.$message({showClose:!0,message:"请选择排班周",type:"error"}),!1):""==this.org_id?(this.$message({showClose:!0,message:"请选择机构",type:"error"}),!1):""==this.docter_id?(this.$message({showClose:!0,message:"请选择医生",type:"error"}),!1):void this.http.get("cdms/setDocChedule",{params:{docter_id:this.docter_id,org_id:this.org_id,time:this.Schedulingtime,schedulingtime:this.tableData}}).then((function(t){200==t.status&&e.$message({message:"设置成功",type:"success"})}))},getComSchedule:function(){var e=this;this.http.get("/cdms/getScheduleInfo",{}).then((function(t){console.log(t),200==t.data.code&&(2==t.data.data.role?(e.docterList.push({label:t.data.data.name,value:t.data.data.user_id}),e.docter=t.data.data.name,e.docter_id=t.data.data.user_id,e.isdocter=!0,e.mechanismList=t.data.data.list):(e.isorg=!0,e.mechanism=t.data.data.name,e.docterList=t.data.data.list,e.org_id=t.data.data.user_id))}))}}}),m=h,f=a("2877"),p=Object(f["a"])(m,c,u,!1,null,"10171fa9",null),b=p.exports,g={name:"App",components:{index:b}},y=g,x=(a("5c0b"),Object(f["a"])(y,s,d,!1,null,null,null)),v=x.exports;n["default"].use(i.a),n["default"].prototype.http=r.a,n["default"].config.productionTip=!1,new n["default"]({render:function(e){return e(v)}}).$mount("#app")},"5c0b":function(e,t,a){"use strict";a("9c0c")},"9c0c":function(e,t,a){}});
  2. //# sourceMappingURL=app.8628ae9c.js.map