Edit D:\xinhaisoft\crisis_new\m\vant\js\chunk-58bf36ce.6ae0c880.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-58bf36ce"],{"0b33":function(t,e,i){"use strict";var s=i("c31d"),o=i("d282"),n=i("9884"),r=i("48f4"),a=Object(o["a"])("tab"),l=a[0],c=a[1];e["a"]=l({mixins:[Object(n["a"])("vanTabs")],props:Object(s["a"])({},r["c"],{dot:Boolean,name:[Number,String],info:[Number,String],badge:[Number,String],title:String,titleStyle:null,titleClass:null,disabled:Boolean}),data:function(){return{inited:!1}},computed:{computedName:function(){var t;return null!=(t=this.name)?t:this.index},isActive:function(){var t=this.computedName===this.parent.currentName;return t&&(this.inited=!0),t}},watch:{title:function(){this.parent.setLine(),this.parent.scrollIntoView()},inited:function(t){var e=this;this.parent.lazyRender&&t&&this.$nextTick((function(){e.parent.$emit("rendered",e.computedName,e.title)}))}},render:function(t){var e=this.slots,i=this.parent,s=this.isActive,o=e();if(o||i.animated){var n=i.scrollspy||s,r=this.inited||i.scrollspy||!i.lazyRender,a=r?o:t();return i.animated?t("div",{attrs:{role:"tabpanel","aria-hidden":!s},class:c("pane-wrapper",{inactive:!s})},[t("div",{class:c("pane")},[a])]):t("div",{directives:[{name:"show",value:n}],attrs:{role:"tabpanel"},class:c("pane")},[a])}}})},2527:function(t,e,i){"use strict";i("f07c")},"5e46":function(t,e,i){"use strict";var s,o=i("d282"),n=i("ea8e"),r=i("a142"),a=i("4598"),l=i("a8c1");function c(t,e,i){Object(a["a"])(s);var o=0,n=t.scrollLeft,r=0===i?1:Math.round(1e3*i/16);function l(){t.scrollLeft+=(e-n)/r,++o<r&&(s=Object(a["c"])(l))}l()}function h(t,e,i,s){var o=Object(l["c"])(t),n=o<e,r=0===i?1:Math.round(1e3*i/16),c=(e-o)/r;function h(){o+=c,(n&&o>e||!n&&o<e)&&(o=e),Object(l["h"])(t,o),n&&o<e||!n&&o>e?Object(a["c"])(h):s&&Object(a["c"])(s)}h()}var u=i("48f4"),d=i("02de"),f=i("1325"),p=i("b1d2");function m(t){var e=t.interceptor,i=t.args,s=t.done;if(e){var o=e.apply(void 0,i);Object(r["f"])(o)?o.then((function(t){t&&s()})).catch(r["h"]):o&&s()}else s()}var b=i("9884"),y=i("5fbe"),v=i("6f2f"),g=Object(o["a"])("tab"),w=g[0],x=g[1],$=w({props:{dot:Boolean,type:String,info:[Number,String],color:String,title:String,isActive:Boolean,disabled:Boolean,scrollable:Boolean,activeColor:String,inactiveColor:String},computed:{style:function(){var t={},e=this.color,i=this.isActive,s="card"===this.type;e&&s&&(t.borderColor=e,this.disabled||(i?t.backgroundColor=e:t.color=e));var o=i?this.activeColor:this.inactiveColor;return o&&(t.color=o),t}},methods:{onClick:function(){this.$emit("click")},genText:function(){var t=this.$createElement,e=t("span",{class:x("text",{ellipsis:!this.scrollable})},[this.slots()||this.title]);return this.dot||Object(r["c"])(this.info)&&""!==this.info?t("span",{class:x("text-wrapper")},[e,t(v["a"],{attrs:{dot:this.dot,info:this.info}})]):e}},render:function(){var t=arguments[0];return t("div",{attrs:{role:"tab","aria-selected":this.isActive},class:[x({active:this.isActive,disabled:this.disabled})],style:this.style,on:{click:this.onClick}},[this.genText()])}}),k=Object(o["a"])("sticky"),_=k[0],S=k[1],C=_({mixins:[Object(y["a"])((function(t,e){if(this.scroller||(this.scroller=Object(l["d"])(this.$el)),this.observer){var i=e?"observe":"unobserve";this.observer[i](this.$el)}t(this.scroller,"scroll",this.onScroll,!0),this.onScroll()}))],props:{zIndex:[Number,String],container:null,offsetTop:{type:[Number,String],default:0}},data:function(){return{fixed:!1,height:0,transform:0}},computed:{offsetTopPx:function(){return Object(n["b"])(this.offsetTop)},style:function(){if(this.fixed){var t={};return Object(r["c"])(this.zIndex)&&(t.zIndex=this.zIndex),this.offsetTopPx&&this.fixed&&(t.top=this.offsetTopPx+"px"),this.transform&&(t.transform="translate3d(0, "+this.transform+"px, 0)"),t}}},watch:{fixed:function(t){this.$emit("change",t)}},created:function(){var t=this;!r["g"]&&window.IntersectionObserver&&(this.observer=new IntersectionObserver((function(e){e[0].intersectionRatio>0&&t.onScroll()}),{root:document.body}))},methods:{onScroll:function(){var t=this;if(!Object(d["a"])(this.$el)){this.height=this.$el.offsetHeight;var e=this.container,i=this.offsetTopPx,s=Object(l["c"])(window),o=Object(l["a"])(this.$el),n=function(){t.$emit("scroll",{scrollTop:s,isFixed:t.fixed})};if(e){var r=o+e.offsetHeight;if(s+i+this.height>r){var a=this.height+s-r;return a<this.height?(this.fixed=!0,this.transform=-(a+i)):this.fixed=!1,void n()}}s+i>o?(this.fixed=!0,this.transform=0):this.fixed=!1,n()}}},render:function(){var t=arguments[0],e=this.fixed,i={height:e?this.height+"px":null};return t("div",{style:i},[t("div",{class:S({fixed:e}),style:this.style},[this.slots()])])}}),O=i("c31d"),I=i("3875"),T=Object(o["a"])("tabs"),j=T[0],N=T[1],z=50,B=j({mixins:[I["a"]],props:{count:Number,duration:[Number,String],animated:Boolean,swipeable:Boolean,currentIndex:Number},computed:{style:function(){if(this.animated)return{transform:"translate3d("+-1*this.currentIndex*100+"%, 0, 0)",transitionDuration:this.duration+"s"}},listeners:function(){if(this.swipeable)return{touchstart:this.touchStart,touchmove:this.touchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}}},methods:{onTouchEnd:function(){var t=this.direction,e=this.deltaX,i=this.currentIndex;"horizontal"===t&&this.offsetX>=z&&(e>0&&0!==i?this.$emit("change",i-1):e<0&&i!==this.count-1&&this.$emit("change",i+1))},genChildren:function(){var t=this.$createElement;return this.animated?t("div",{class:N("track"),style:this.style},[this.slots()]):this.slots()}},render:function(){var t=arguments[0];return t("div",{class:N("content",{animated:this.animated}),on:Object(O["a"])({},this.listeners)},[this.genChildren()])}}),L=Object(o["a"])("tabs"),D=L[0],q=L[1];e["a"]=D({mixins:[Object(b["b"])("vanTabs"),Object(y["a"])((function(t){this.scroller||(this.scroller=Object(l["d"])(this.$el)),t(window,"resize",this.resize,!0),this.scrollspy&&t(this.scroller,"scroll",this.onScroll,!0)}))],inject:{vanPopup:{default:null}},model:{prop:"active"},props:{color:String,border:Boolean,sticky:Boolean,animated:Boolean,swipeable:Boolean,scrollspy:Boolean,background:String,lineWidth:[Number,String],lineHeight:[Number,String],beforeChange:Function,titleActiveColor:String,titleInactiveColor:String,type:{type:String,default:"line"},active:{type:[Number,String],default:0},ellipsis:{type:Boolean,default:!0},duration:{type:[Number,String],default:.3},offsetTop:{type:[Number,String],default:0},lazyRender:{type:Boolean,default:!0},swipeThreshold:{type:[Number,String],default:5}},data:function(){return{position:"",currentIndex:null,lineStyle:{backgroundColor:this.color}}},computed:{scrollable:function(){return this.children.length>this.swipeThreshold||!this.ellipsis},navStyle:function(){return{borderColor:this.color,background:this.background}},currentName:function(){var t=this.children[this.currentIndex];if(t)return t.computedName},offsetTopPx:function(){return Object(n["b"])(this.offsetTop)},scrollOffset:function(){return this.sticky?this.offsetTopPx+this.tabHeight:0}},watch:{color:"setLine",active:function(t){t!==this.currentName&&this.setCurrentIndexByName(t)},children:function(){var t=this;this.setCurrentIndexByName(this.active),this.setLine(),this.$nextTick((function(){t.scrollIntoView(!0)}))},currentIndex:function(){this.scrollIntoView(),this.setLine(),this.stickyFixed&&!this.scrollspy&&Object(l["g"])(Math.ceil(Object(l["a"])(this.$el)-this.offsetTopPx))},scrollspy:function(t){t?Object(f["b"])(this.scroller,"scroll",this.onScroll,!0):Object(f["a"])(this.scroller,"scroll",this.onScroll)}},mounted:function(){var t=this;this.init(),this.vanPopup&&this.vanPopup.onReopen((function(){t.setLine()}))},activated:function(){this.init(),this.setLine()},methods:{resize:function(){this.setLine()},init:function(){var t=this;this.$nextTick((function(){t.inited=!0,t.tabHeight=Object(l["e"])(t.$refs.wrap),t.scrollIntoView(!0)}))},setLine:function(){var t=this,e=this.inited;this.$nextTick((function(){var i=t.$refs.titles;if(i&&i[t.currentIndex]&&"line"===t.type&&!Object(d["a"])(t.$el)){var s=i[t.currentIndex].$el,o=t.lineWidth,a=t.lineHeight,l=s.offsetLeft+s.offsetWidth/2,c={width:Object(n["a"])(o),backgroundColor:t.color,transform:"translateX("+l+"px) translateX(-50%)"};if(e&&(c.transitionDuration=t.duration+"s"),Object(r["c"])(a)){var h=Object(n["a"])(a);c.height=h,c.borderRadius=h}t.lineStyle=c}}))},setCurrentIndexByName:function(t){var e=this.children.filter((function(e){return e.computedName===t})),i=(this.children[0]||{}).index||0;this.setCurrentIndex(e.length?e[0].index:i)},setCurrentIndex:function(t){var e=this.findAvailableTab(t);if(Object(r["c"])(e)){var i=this.children[e],s=i.computedName,o=null!==this.currentIndex;this.currentIndex=e,s!==this.active&&(this.$emit("input",s),o&&this.$emit("change",s,i.title))}},findAvailableTab:function(t){var e=t<this.currentIndex?-1:1;while(t>=0&&t<this.children.length){if(!this.children[t].disabled)return t;t+=e}},onClick:function(t,e){var i=this,s=this.children[e],o=s.title,n=s.disabled,r=s.computedName;n?this.$emit("disabled",r,o):(m({interceptor:this.beforeChange,args:[r],done:function(){i.setCurrentIndex(e),i.scrollToCurrentContent()}}),this.$emit("click",r,o),Object(u["b"])(t.$router,t))},scrollIntoView:function(t){var e=this.$refs.titles;if(this.scrollable&&e&&e[this.currentIndex]){var i=this.$refs.nav,s=e[this.currentIndex].$el,o=s.offsetLeft-(i.offsetWidth-s.offsetWidth)/2;c(i,o,t?0:+this.duration)}},onSticktScroll:function(t){this.stickyFixed=t.isFixed,this.$emit("scroll",t)},scrollTo:function(t){var e=this;this.$nextTick((function(){e.setCurrentIndexByName(t),e.scrollToCurrentContent(!0)}))},scrollToCurrentContent:function(t){var e=this;if(void 0===t&&(t=!1),this.scrollspy){var i=this.children[this.currentIndex],s=null==i?void 0:i.$el;if(s){var o=Object(l["a"])(s,this.scroller)-this.scrollOffset;this.lockScroll=!0,h(this.scroller,o,t?0:+this.duration,(function(){e.lockScroll=!1}))}}},onScroll:function(){if(this.scrollspy&&!this.lockScroll){var t=this.getCurrentIndexOnScroll();this.setCurrentIndex(t)}},getCurrentIndexOnScroll:function(){for(var t=this.children,e=0;e<t.length;e++){var i=Object(l["f"])(t[e].$el);if(i>this.scrollOffset)return 0===e?0:e-1}return t.length-1}},render:function(){var t,e=this,i=arguments[0],s=this.type,o=this.animated,n=this.scrollable,r=this.children.map((function(t,o){var r;return i($,{ref:"titles",refInFor:!0,attrs:{type:s,dot:t.dot,info:null!=(r=t.badge)?r:t.info,title:t.title,color:e.color,isActive:o===e.currentIndex,disabled:t.disabled,scrollable:n,activeColor:e.titleActiveColor,inactiveColor:e.titleInactiveColor},style:t.titleStyle,class:t.titleClass,scopedSlots:{default:function(){return t.slots("title")}},on:{click:function(){e.onClick(t,o)}}})})),a=i("div",{ref:"wrap",class:[q("wrap",{scrollable:n}),(t={},t[p["f"]]="line"===s&&this.border,t)]},[i("div",{ref:"nav",attrs:{role:"tablist"},class:q("nav",[s,{complete:this.scrollable}]),style:this.navStyle},[this.slots("nav-left"),r,"line"===s&&i("div",{class:q("line"),style:this.lineStyle}),this.slots("nav-right")])]);return i("div",{class:q([s])},[this.sticky?i(C,{attrs:{container:this.$el,offsetTop:this.offsetTop},on:{scroll:this.onSticktScroll}},[a]):a,i(B,{attrs:{count:this.children.length,animated:o,duration:this.duration,swipeable:this.swipeable,currentIndex:this.currentIndex},on:{change:this.setCurrentIndex}},[this.slots()])])}})},e20a:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"title",rawName:"v-title",value:"????????",expression:"'????????'"}]},[i("NavBar",{attrs:{title:"????????","left-arrow":""},on:{"click-left":function(e){return t.$router.back()}}}),i("Tabs",{attrs:{sticky:""},on:{click:t.tabSwitch},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},t._l(t.tabs,(function(e){return i("Tab",{key:e.date},[i("div",{attrs:{slot:"title"},slot:"title"},[t._v(" "+t._s(e.mmdd)+" "),i("div",[t._v(t._s(e.week))])])])})),1),t._l(t.list,(function(e,s){return i("div",{key:e.consultant,staticClass:"list"},[i("div",{staticClass:"left"},[i("div",{staticClass:"photo",style:"background-image:url("+e.photo+")"}),t._v(" "+t._s(e.realname)+" ")]),i("div",{staticClass:"right"},t._l(e.thetime,(function(e,o){return i("Button",{key:e.time,attrs:{type:"primary",size:"small"},on:{click:function(e){return t.checkWeekLimit(s,o)}}},[t._v(" "+t._s(e.time)+" ")])})),1)])})),i("Popup",{attrs:{position:"bottom",closeable:""},model:{value:t.apply.show,callback:function(e){t.$set(t.apply,"show",e)},expression:"apply.show"}},[i("br"),i("CellGroup",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v(" ???????????/???????????? "),i("span",{staticStyle:{color:"#ff976a"}},[t._v(t._s(t.user.zx_times))]),t._v(" ?°?????????????????????????????????????????????????????????????????????????????????????????????????????????? ")]},proxy:!0}])},[i("Field",{attrs:{rows:"2",autosize:"",type:"textarea"},model:{value:t.apply.content,callback:function(e){t.$set(t.apply,"content",e)},expression:"apply.content"}})],1),i("div",{staticClass:"gap"},[i("Button",{attrs:{type:"primary",icon:"certificate",block:""},on:{click:t.submitApply}},[t._v("??????")])],1)],1),i("Popup",{attrs:{position:"bottom",closeable:""},model:{value:t.popup.show,callback:function(e){t.$set(t.popup,"show",e)},expression:"popup.show"}},[i("div",{staticClass:"yuyue-content"},[i("CellGroup",{attrs:{title:"??????"}},[i("Cell",[t._v(" ??????"+t._s(t.popup.realname)+" "),i("br"),t._v(" ????????"+t._s(t.popup.timestr)+" "),i("br"),t.popup.room?i("span",[t._v("?????"+t._s(t.popup.room))]):t._e(),i("br"),t._v(" ????????"+t._s(1===t.popup.way?"??????":"???")+" "),i("br"),t.popup.remark?i("span",[t._v("?????"+t._s(t.popup.remark))]):t._e()])],1),i("CellGroup",{attrs:{title:"?????????????????????????????"}},[i("Field",{attrs:{rows:"1",autosize:"",type:"textarea"},model:{value:t.form.question,callback:function(e){t.$set(t.form,"question",e)},expression:"form.question"}})],1),i("CellGroup",{attrs:{title:"????????????????????????"}},[i("Field",{model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile",e)},expression:"form.mobile"}})],1),i("CellGroup",{attrs:{title:"??????????????Q???"}},[i("Field",{model:{value:t.form.qq,callback:function(e){t.$set(t.form,"qq",e)},expression:"form.qq"}})],1),1===t.form.way?i("CellGroup",{attrs:{title:"?????????????????"}},[i("Field",{model:{value:t.form.contact,callback:function(e){t.$set(t.form,"contact",e)},expression:"form.contact"}})],1):t._e(),i("div",{staticClass:"gap"},[i("Button",{attrs:{type:"primary",icon:"certificate",block:""},on:{click:t.submit}},[t._v("??????")])],1)],1)]),i("Popup",{attrs:{position:"bottom",closeable:""},model:{value:t.license.show,callback:function(e){t.$set(t.license,"show",e)},expression:"license.show"}},[i("div",{staticClass:"license-content"},[i("h2",[i("Icon",{attrs:{name:"bulb-o",size:"18"}}),t._v("??????")],1),i("div",{domProps:{innerHTML:t._s(t.license.message)}}),1===t.license.way?[i("p",[t._v("????????/????????")]),i("Uploader",{attrs:{"max-count":"1","result-type":"file","after-read":t.Upload},model:{value:t.license.photo,callback:function(e){t.$set(t.license,"photo",e)},expression:"license.photo"}}),i("p",[t._v(" ?????? "),t.form.signature?i("span",[t._v("??????????????")]):t._e(),t._v("?? ")]),t.form.signature?i("img",{attrs:{src:t.form.signature},on:{click:function(e){return t.Signature("rewrite")}}}):i("div",{staticClass:"signature"},[i("div",{staticClass:"clear",on:{click:function(e){return t.Signature("clear")}}},[i("Icon",{attrs:{name:"cross"}})],1),i("canvas",{ref:"canvas"})])]:t._e()],2),i("Button",{attrs:{type:"primary",icon:"certificate",block:"",square:""},on:{click:t.agreeLicense}},[t._v("?????????")])],1)],2)},o=[],n=i("6b41"),r=i("0b33"),a=i("5e46"),l=i("b650"),c=i("e41f"),h=i("565f"),u=i("7744"),d=i("34e9"),f=i("ad06"),p=i("8f80"),m=i("5a0c"),b=i.n(m),y=i("a78e"),v=i.n(y),g=i("7c8d"),w=i.n(g),x=i("90e2");const $=b()();let k=null;var _={name:"YuyueByDate",components:{NavBar:n["a"],Tab:r["a"],Tabs:a["a"],Button:l["a"],Popup:c["a"],Field:h["a"],Cell:u["a"],CellGroup:d["a"],Icon:f["a"],Uploader:p["a"]},data(){const t=this.$store("user");return{window:window,user:t,root:"/school/student",school:{},tab:0,tabs:[],weekday:Object.freeze(["??","??","??","??","??","??","??"]),list:[],current:[0,0],license:{show:!1,message:"",way:0,photo:[]},popup:{show:!1,realname:"",timestr:"",room:"",remark:"",way:0},form:{school:0,consultant:0,yydate:"",yytime:"",room:"",question:"",mobile:t.mobile,qq:t.qq,contact:"",signature:"",way:0,realname:t.realname},apply:{show:!1,content:""}}},mounted(){this.getSchoolSetting()},methods:{getSchoolSetting(){const t=this.$store("school");t?t.yuyue_arrange?this.$dialog.alert({title:"??????",message:"???????????????????????????????????????????"}).then(()=>this.$router.replace(this.root)):t.zixun_close_date&&$.format("YYYY-MM-DD")>=t.zixun_close_date?this.$dialog.alert({title:"??????",message:t.yuyue_close_msg,messageAlign:"left"}).then(()=>this.$router.replace(this.root)):(t.yydate=t.yydate||7,this.school=Object.freeze(t),this.form.school=t.id,this.getDateList()):this.$router.push("/school/"+this.user.member_type_top+"/student/login?redirect="+this.$route.fullPath)},getDateList(){const t=$.hour()>=22?this.school.yydate+1:this.school.yydate,e=[];for(let i=0;i<t+1;i++){const t=$.add(i,"day"),s=t.format("YYYY-MM-DD");if(!(this.school.zixun_close_date&&s>=this.school.zixun_close_date)){let o="";switch(i){case 0:o="???";break;case 1:o="???";break;case 2:o="???";break;default:o="??"+this.weekday[t.day()]}e.push({date:s,day:t.day(),mmdd:t.format("MM-DD"),week:o})}}this.tabs=e,this.tabSwitch(0)},tabSwitch(t){this.$loading.show();const e=this.tabs[t];this.$http.get("/school/yuyue-by-date",{date:e.date,day:e.day,path:this.user.member_type_path.substring(2)}).then(t=>{if(0===t.code){const i=[],s=$.add(this.school.yuyue_before_time||0,"minute").format("YYYY-MM-DD HH:mm");t.data.forEach(t=>{let o=!0;if(e.date+" "+t.thetime.substring(0,5)<s&&(o=!1),o&&this.school.fds&&this.user.bind_consultant_id&&t.consultant!==this.user.bind_consultant_id&&(o=!1),o){const s=i.findIndex(e=>e.consultant===t.consultant);s>=0?i[s].thetime.push({time:t.thetime,room:t.room,way:t.way,remark:t.remark}):i.push({consultant:t.consultant,realname:t.realname,photo:t.photo,date:e.date,day:e.day,week:e.week,thetime:[{time:t.thetime,room:t.room,way:t.way,remark:t.remark}]})}}),this.list=i,this.$loading.hide(),0===i.length&&this.$toast.fail("????????n???????????10??")}})},checkWeekLimit(t,e){this.current[0]=t,this.current[1]=e;const i=this.school.yuyue_week_limit;i>0?(this.$loading.show(),this.$http.get("/school/yuyue-week-count",{yydate:this.list[t].date}).then(t=>{0===t.code&&(this.$loading.hide(),t.data>=i?this.$dialog.alert({title:"??????",message:"????????????????????????????????"}):this.checkSemesterLimit())})):this.checkSemesterLimit()},checkSemesterLimit(){const t=this.school.zixun_times_limit;t>0&&this.user.zx_times>=t?(this.$loading.show(),this.$http.get("/school/yuyue-apply").then(t=>{0===t.code&&(this.$loading.hide(),-1===t.data?this.apply.show=!0:0===t.data?this.$dialog.alert({title:"???",message:"???????????????????????????????????"}):2===t.data?this.$dialog.alert({title:"???",message:"????????????????????????????????????????????????????????"}):this.checkFeedback())})):this.checkFeedback()},checkFeedback(){this.school.zixun_needfeedback_next?(this.$loading.show(),this.$http.get("/school/last-zixun-feedback-exist").then(t=>{0===t.code&&(this.$loading.hide(),t.data?this.checkTest():this.$dialog.confirm({title:"???",message:"?????????????????????????????????????????????????????????????????????????????????????????n???????????????????????",messageAlign:"left",confirmButtonText:"?????"}).then(()=>window.location="/m/school/student/zixun_list.asp"))})):this.checkTest()},checkTest(){if(this.school.yuyue_test_days>0&&this.school.yuyue_test_lb){const t=JSON.parse("["+this.school.yuyue_test_lb+"]"),e=$.subtract(this.school.yuyue_test_days,"day").format("YYYY-MM-DD");this.$loading.show(),this.$http.get("/member/0/tested",{lb:t.join(),date1:e,valid:1,mini:1,top:5}).then(e=>{if(0===e.code){this.$loading.hide();let i=[];e.data.length?t.forEach(t=>!e.data.some(e=>e.lb===t)&&i.push(t)):i=i.concat(t),i.length?this.$dialog.confirm({title:"???",message:"???????????????????????????????????????????????????????????????????????????????????????????????????",messageAlign:"left",confirmButtonText:"?????"}).then(()=>{v.a.set("TestList",i.join()),v.a.set("TestRedirect","/m/vant/#/school/student/yuyue-by-date"),this.$router.push("/test-start/"+i[0]+"?testtype=1")}):this.showLicense()}})}else this.showLicense()},showLicense(){const t=this.school.yuyuelicense;if(t){const e=this.list[this.current[0]].thetime[this.current[1]].way;this.license.message="<p>"+t.replace(/\n/g,"</p><p>")+"</p>",this.license.way=e,1===e&&(this.user.idcard_picture&&(this.license.photo=[{url:this.user.idcard_picture}]),""===this.form.signature&&this.$nextTick(()=>this.Signature("write"))),this.license.show=!0}else this.yuyue()},Upload(t){new w.a(t.file,{maxWidth:500,maxHeight:500,success:t=>{const e=new FormData;e.append("file",t,t.name),this.$loading.show(),this.$http.post("/upload",e).then(t=>{if(0===t.code){const e=window.location.origin+"/attachments/"+t.data;this.$http.post("/member/0",{idcard_picture:e}).then(t=>{0===t.code&&(this.$set(this.license.photo,0,{url:e}),this.$store.add("user",{idcard_picture:e}),this.$loading.hide(),this.$toast("?????????"))})}else this.$toast.fail(t.message)})},error:()=>this.$toast.fail("?????????")})},Signature(t){if("clear"===t)k.clear();else if("rewrite"===t)this.form.signature="",this.$nextTick(()=>this.Signature("write"));else{const t=this.$refs.canvas,e=()=>{const e=Math.max(window.devicePixelRatio||1,1);t.width=t.offsetWidth*e,t.height=t.offsetHeight*e,t.getContext("2d").scale(e,e),k.clear()};k=new x["a"](t),e(),window.addEventListener("resize",e),this.$once("hook:beforeDestroy",()=>window.removeEventListener("resize",e))}},agreeLicense(){0===this.list[this.current[0]].thetime[this.current[1]].way?(this.license.show=!1,this.yuyue()):0===this.license.photo.length?this.$toast("????????????"):""===this.form.signature&&k.isEmpty()?this.$toast("????????????"):(""===this.form.signature&&(this.form.signature=S(this.$refs.canvas)),this.license.show=!1,this.yuyue())},yuyue(){const t=this.list[this.current[0]],e=t.thetime[this.current[1]];this.popup.realname=t.realname,this.popup.timestr=t.date+" "+t.week+" "+e.time,this.popup.room=e.room,this.popup.remark=e.remark,this.popup.way=e.way,this.popup.show=!0,this.form.consultant=t.consultant,this.form.yydate=t.date,this.form.yytime=e.time,this.form.room=e.room,this.form.way=e.way},submit(){this.$global.MobileValidateReg.test(this.form.mobile)?/^[1-9]\d{5,11}$/.test(this.form.qq)?""===this.form.question||1===this.form.way&&""===this.form.contact?this.$toast("?????????????"):(this.$loading.show(),this.$http.post("/school/yuyue",this.form).then(t=>{this.$loading.hide(),0===t.code?this.$toast.success({message:"?????????????",onClose:()=>{this.tabSwitch(this.tab),this.popup.show=!1}}):1===t.code?this.$toast.fail({message:"???????????????????????",onClose:()=>{this.tabSwitch(this.tab),this.popup.show=!1}}):this.$toast(t.message)})):this.$toast("QQ?????????"):this.$toast("??????????????")},submitApply(){this.apply.content?(this.$loading.show(),this.$http.post("/school/yuyue-apply",{content:this.apply.content}).then(t=>{0===t.code&&(this.$loading.hide(),this.apply.show=!1,this.$toast.success("?????????????????????"))})):this.$toast("???????????")}}};function S(t){const e=document.createElement("canvas"),i=e.getContext("2d");let s,o,n;e.width=t.width,e.height=t.height,i.scale(.25,.25),i.drawImage(t,0,0);let r=e.width,a=e.height;const l={x:[],y:[]},c=i.getImageData(0,0,e.width,e.height);for(o=0;o<a;o++)for(s=0;s<r;s++)n=4*(o*r+s),c.data[n+3]>0&&(l.x.push(s),l.y.push(o));l.x.sort((t,e)=>t-e),l.y.sort((t,e)=>t-e);const h=l.x.length-1;r=l.x[h]-l.x[0],a=l.y[h]-l.y[0];const u=i.getImageData(l.x[0],l.y[0],r,a);return e.width=r,e.height=a,i.putImageData(u,0,0),e.toDataURL()}var C=_,O=(i("2527"),i("2877")),I=Object(O["a"])(C,s,o,!1,null,"a5e6dfda",null);e["default"]=I.exports},f07c:function(t,e,i){}}]);
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de