chunk-2b42dd56.2d7a3c64.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b42dd56"],{"5a0c":function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";var t=1e3,e=6e4,n=36e5,a="millisecond",r="second",s="minute",i="hour",u="day",o="week",l="month",c="quarter",d="year",f="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},y=function(t,e,n){var a=String(t);return!a||a.length>=e?t:""+Array(e+1-a.length).join(n)+t},g={s:y,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),a=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+y(a,2,"0")+":"+y(r,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var a=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(a,l),s=n-r<0,i=e.clone().add(a+(s?-1:1),l);return+(-(a+(n-r)/(s?r-i:i-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:d,w:o,d:u,D:f,h:i,m:s,s:r,ms:a,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",$={};$[v]=p;var w="$isDayjsObject",S=function(t){return t instanceof x||!(!t||!t[w])},k=function t(e,n,a){var r;if(!e)return v;if("string"==typeof e){var s=e.toLowerCase();$[s]&&(r=s),n&&($[s]=n,r=s);var i=e.split("-");if(!r&&i.length>1)return t(i[0])}else{var u=e.name;$[u]=e,r=u}return!a&&r&&(v=r),r||!a&&v},_=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new x(n)},O=g;O.l=k,O.i=S,O.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var x=function(){function p(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var y=p.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var a=e.match(m);if(a){var r=a[2]-1||0,s=(a[7]||"0").substring(0,3);return n?new Date(Date.UTC(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,s)):new Date(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,s)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return O},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(t,e){var n=_(t);return this.startOf(e)<=n&&n<=this.endOf(e)},y.isAfter=function(t,e){return _(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<_(t)},y.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var n=this,a=!!O.u(e)||e,c=O.p(t),h=function(t,e){var r=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return a?r:r.endOf(u)},m=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(a?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},b=this.$W,p=this.$M,y=this.$D,g="set"+(this.$u?"UTC":"");switch(c){case d:return a?h(1,0):h(31,11);case l:return a?h(1,p):h(0,p+1);case o:var v=this.$locale().weekStart||0,$=(b<v?b+7:b)-v;return h(a?y-$:y+(6-$),p);case u:case f:return m(g+"Hours",0);case i:return m(g+"Minutes",1);case s:return m(g+"Seconds",2);case r:return m(g+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var n,o=O.p(t),c="set"+(this.$u?"UTC":""),h=(n={},n[u]=c+"Date",n[f]=c+"Date",n[l]=c+"Month",n[d]=c+"FullYear",n[i]=c+"Hours",n[s]=c+"Minutes",n[r]=c+"Seconds",n[a]=c+"Milliseconds",n)[o],m=o===u?this.$D+(e-this.$W):e;if(o===l||o===d){var b=this.clone().set(f,1);b.$d[h](m),b.init(),this.$d=b.set(f,Math.min(this.$D,b.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[O.p(t)]()},y.add=function(a,c){var f,h=this;a=Number(a);var m=O.p(c),b=function(t){var e=_(h);return O.w(e.date(e.date()+Math.round(t*a)),h)};if(m===l)return this.set(l,this.$M+a);if(m===d)return this.set(d,this.$y+a);if(m===u)return b(1);if(m===o)return b(7);var p=(f={},f[s]=e,f[i]=n,f[r]=t,f)[m]||1,y=this.$d.getTime()+a*p;return O.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var a=t||"YYYY-MM-DDTHH:mm:ssZ",r=O.z(this),s=this.$H,i=this.$m,u=this.$M,o=n.weekdays,l=n.months,c=n.meridiem,d=function(t,n,r,s){return t&&(t[n]||t(e,a))||r[n].slice(0,s)},f=function(t){return O.s(s%12||12,t,"0")},m=c||function(t,e,n){var a=t<12?"AM":"PM";return n?a.toLowerCase():a};return a.replace(b,(function(t,a){return a||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return O.s(e.$y,4,"0");case"M":return u+1;case"MM":return O.s(u+1,2,"0");case"MMM":return d(n.monthsShort,u,l,3);case"MMMM":return d(l,u);case"D":return e.$D;case"DD":return O.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(n.weekdaysMin,e.$W,o,2);case"ddd":return d(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return O.s(s,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(s,i,!0);case"A":return m(s,i,!1);case"m":return String(i);case"mm":return O.s(i,2,"0");case"s":return String(e.$s);case"ss":return O.s(e.$s,2,"0");case"SSS":return O.s(e.$ms,3,"0");case"Z":return r}return null}(t)||r.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(a,f,h){var m,b=this,p=O.p(f),y=_(a),g=(y.utcOffset()-this.utcOffset())*e,v=this-y,$=function(){return O.m(b,y)};switch(p){case d:m=$()/12;break;case l:m=$();break;case c:m=$()/3;break;case o:m=(v-g)/6048e5;break;case u:m=(v-g)/864e5;break;case i:m=v/n;break;case s:m=v/e;break;case r:m=v/t;break;default:m=v}return h?m:O.a(m)},y.daysInMonth=function(){return this.endOf(l).$D},y.$locale=function(){return $[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),a=k(t,e,!0);return a&&(n.$L=a),n},y.clone=function(){return O.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},p}(),M=x.prototype;return _.prototype=M,[["$ms",a],["$s",r],["$m",s],["$H",i],["$W",u],["$M",l],["$y",d],["$D",f]].forEach((function(t){M[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),_.extend=function(t,e){return t.$i||(t(e,x,_),t.$i=!0),_},_.locale=k,_.isDayjs=S,_.unix=function(t){return _(1e3*t)},_.en=$[v],_.Ls=$,_.p={},_}))},6127:function(t,e,n){"use strict";n("77f4")},"77f4":function(t,e,n){},deb2:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-form",{attrs:{inline:!0}},[n("el-form-item",{attrs:{label:"姓名:"}},[n("el-input",{attrs:{placeholder:"请输入姓名查找"},model:{value:t.form.doctorName,callback:function(e){t.$set(t.form,"doctorName",e)},expression:"form.doctorName"}})],1),n("el-form-item",{attrs:{label:"日期"}},[n("el-date-picker",{attrs:{type:"month",format:"yyyy 年 MM 月","value-format":"yyyy-MM",clearable:!1},model:{value:t.form.date,callback:function(e){t.$set(t.form,"date",e)},expression:"form.date"}})],1),n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.initList}},[t._v("搜索")]),n("el-button",{on:{click:t.reset}},[t._v("重置")])],1),n("span",{staticStyle:{float:"right","margin-top":"10px",display:"flex","align-items":"center"}},[n("span",{staticStyle:{"font-weight":"700"}},[t._v(" 班次: ")]),t._l(t.schedulingStatusOptions,(function(e){return n("el-tooltip",{key:e.id,staticClass:"item",attrs:{effect:"dark",content:"休"!=e.statusName?e.startTime+"~"+e.endTime:"全天休息",placement:"top-start"}},[n("span",{staticClass:"ban_box",style:{backgroundColor:e.color}},[t._v(" "+t._s(e.statusName)+" ")])])}))],2)],1),t.flag?t._e():n("el-button",{staticStyle:{float:"right","margin-bottom":"10px","margin-left":"10px"},attrs:{type:"primary"},on:{click:t.edit}},[t._v("编辑排班")]),t.flag?n("el-button",{staticStyle:{float:"right","margin-bottom":"10px","margin-left":"10px"},attrs:{type:"primary"},on:{click:t.submit}},[t._v("完成编辑")]):t._e(),n("el-button",{staticStyle:{float:"right","margin-bottom":"10px"},attrs:{type:"primary"},on:{click:t.doClasses}},[t._v("固定班次排班")]),n("el-table",{attrs:{data:t.tableData}},[n("el-table-column",{attrs:{prop:"doctorName",fixed:"",label:"姓名","show-overflow-tooltip":"",align:"center"}}),t.tableData.length?n("el-table-column",{attrs:{align:"center",label:"排班表"}},t._l(t.tableHeader.data,(function(e,a){return n("el-table-column",{key:a,attrs:{align:"center",width:t.flag?80:70},scopedSlots:t._u([{key:"default",fn:function(e){return[t.flag?n("el-select",{model:{value:e.row.data[a].status,callback:function(n){t.$set(e.row.data[a],"status",n)},expression:"scope.row.data[index].status"}},t._l(t.schedulingStatusOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.statusName,value:t.id}})})),1):n("span",{staticClass:"span_box",style:{backgroundColor:e.row.data[a].color}},[t._v(" "+t._s(e.row.data[a].statusCn)+" ")])]}}],null,!0)},[n("template",{slot:"header"},[n("div",{staticClass:"header_box"},[n("span",{staticClass:"header1",style:{color:"星期六"==e.week||"星期日"==e.week?"#ff0000":"#515a6e"}},[t._v(t._s(e.day))]),n("span",{staticClass:"header2",style:{color:"星期六"==e.week||"星期日"==e.week?"#ff0000":"#515a6e"}},[t._v(t._s(e.week))])])])],2)})),1):t._e()],1),t.dialogVisible?n("el-dialog",{attrs:{title:"固定班次排班",visible:t.dialogVisible,width:"800px","close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{staticStyle:{"max-height":"70vh",overflow:"auto"}},[n("el-table",{attrs:{data:t.weekList,border:""}},[n("el-table-column",{attrs:{prop:"doctorName",label:"姓名",align:"center",width:"100","show-overflow-tooltip":""}}),n("el-table-column",{attrs:{label:"周一",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-select",{model:{value:a.mondayStatus,callback:function(e){t.$set(a,"mondayStatus",e)},expression:"row.mondayStatus"}},t._l(t.schedulingStatusOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.statusName,value:t.id}})})),1)]}}],null,!1,3793897701)}),n("el-table-column",{attrs:{label:"周二",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-select",{model:{value:a.tuesdayStatus,callback:function(e){t.$set(a,"tuesdayStatus",e)},expression:"row.tuesdayStatus"}},t._l(t.schedulingStatusOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.statusName,value:t.id}})})),1)]}}],null,!1,3913599070)}),n("el-table-column",{attrs:{label:"周三",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-select",{model:{value:a.wednesdayStatus,callback:function(e){t.$set(a,"wednesdayStatus",e)},expression:"row.wednesdayStatus"}},t._l(t.schedulingStatusOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.statusName,value:t.id}})})),1)]}}],null,!1,2011713671)}),n("el-table-column",{attrs:{label:"周四",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-select",{model:{value:a.thursdayStatus,callback:function(e){t.$set(a,"thursdayStatus",e)},expression:"row.thursdayStatus"}},t._l(t.schedulingStatusOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.statusName,value:t.id}})})),1)]}}],null,!1,1599523073)}),n("el-table-column",{attrs:{label:"周五",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-select",{model:{value:a.fridayStatus,callback:function(e){t.$set(a,"fridayStatus",e)},expression:"row.fridayStatus"}},t._l(t.schedulingStatusOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.statusName,value:t.id}})})),1)]}}],null,!1,1042463860)}),n("el-table-column",{attrs:{label:"周六",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-select",{model:{value:a.saturdayStatus,callback:function(e){t.$set(a,"saturdayStatus",e)},expression:"row.saturdayStatus"}},t._l(t.schedulingStatusOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.statusName,value:t.id}})})),1)]}}],null,!1,595701544)}),n("el-table-column",{attrs:{label:"周日",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-select",{model:{value:a.sundayStatus,callback:function(e){t.$set(a,"sundayStatus",e)},expression:"row.sundayStatus"}},t._l(t.schedulingStatusOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.statusName,value:t.id}})})),1)]}}],null,!1,297135265)})],1)],1),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:t.cancel}},[t._v("取 消")]),n("el-button",{attrs:{type:"primary"},on:{click:t.submitClass}},[t._v("保 存")])],1)]):t._e()],1)},r=[],s=n("c7eb"),i=n("1da1"),u=(n("7db0"),n("d3b7"),n("5a0c")),o=n.n(u),l=n("943d"),c={name:"EitcErmPcIndex",data:function(){return{form:{doctorName:"",date:""},tableHeader:[],flag:!1,tableData:[],dialogVisible:!1,weekList:[],schedulingStatusOptions:[]}},mounted:function(){var t=this;this.form.date=o()(new Date).format("YYYY-MM"),this.initschedulingStatusOptions(),this.$nextTick((function(){t.initList()}))},methods:{initschedulingStatusOptions:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(l["gc"])();case 2:if(n=e.sent,200===n.code){e.next=5;break}return e.abrupt("return",t.$message.error(n.msg));case 5:t.schedulingStatusOptions=n.data;case 6:case"end":return e.stop()}}),e)})))()},reset:function(){this.form.doctorName="",this.form.date=o()(new Date).format("YYYY-MM"),this.initList()},edit:function(){this.flag=!0},submit:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(l["dc"])(t.tableData);case 2:if(n=e.sent,200===n.code){e.next=5;break}return e.abrupt("return",t.$message.error(n.msg));case 5:t.$message.success("保存成功"),t.initList(),t.flag=!1;case 8:case"end":return e.stop()}}),e)})))()},doClasses:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.dialogVisible=!0,e.next=3,Object(l["cc"])();case 3:if(n=e.sent,200===n.code){e.next=6;break}return e.abrupt("return",t.$message.error(n.msg));case 6:t.weekList=n.data;case 7:case"end":return e.stop()}}),e)})))()},initList:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(l["ec"])(t.form);case 2:n=e.sent,t.tableData=n.data,t.tableData.length&&t.tableData.some((function(t){return t.data.length}))&&(t.tableHeader=t.tableData.find((function(t){return t.data.length}))),t.$forceUpdate();case 6:case"end":return e.stop()}}),e)})))()},cancel:function(){var t=this;this.$confirm("确认退出吗,退出将清空已编辑完成数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.dialogVisible=!1,t.initList()})).catch((function(){}))},submitClass:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(l["bc"])(t.weekList);case 2:if(n=e.sent,200===n.code){e.next=5;break}return e.abrupt("return",t.$message.error(n.msg));case 5:console.log(n,6666),t.dialogVisible=!1,t.initList();case 8:case"end":return e.stop()}}),e)})))()}}},d=c,f=(n("6127"),n("2877")),h=Object(f["a"])(d,a,r,!1,null,"be945294",null);e["default"]=h.exports}}]);