ArrangeWork.66a2639c.js 3.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ArrangeWork"],{"2b61":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("div",{staticClass:"arrangeWork"},[t.headerStatus?a("m-header"):t._e(),a("div",{staticClass:"container"},[a("div",{staticClass:"formGroup"},[a("div",{staticClass:"formTitle"},[t._v("作业内容")]),a("van-field",{attrs:{rows:"8",type:"textarea",placeholder:"请输入(1-600字)"},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}})],1)]),a("van-cell",{staticClass:"endTime",attrs:{title:"截止时间",readonly:"",placeholder:"请选择截止时间"},on:{click:t.onEndTime},scopedSlots:t._u([{key:"default",fn:function(){return[t._v("\n "+t._s(t.dateSection.showStartDate)+" "),a("span",{staticClass:"arrowDown"})]},proxy:!0}])}),a("div",{staticClass:"button-group"},[a("van-button",{attrs:{type:"primary",round:"",size:"large"},on:{click:t.onSubmit}},[t._v("确定")])],1),a("van-popup",{attrs:{position:"bottom"},model:{value:t.dateSection.status,callback:function(e){t.$set(t.dateSection,"status",e)},expression:"dateSection.status"}},[a("van-datetime-picker",{attrs:{type:"date","min-date":t.dateSection.minDate,"max-date":t.dateSection.maxDate,formatter:t.formatter},on:{confirm:function(e){return t.confirmStartTime()},cancel:function(e){t.dateSection.status=!1}},model:{value:t.dateSection.currentDate,callback:function(e){t.$set(t.dateSection,"currentDate",e)},expression:"dateSection.currentDate"}})],1)],1)},o=[],i=a("6e6e"),r=a("ff51"),c=a("530a"),s={name:"teacherList",components:{MHeader:i["a"]},data:function(){var t=new Date;return t.setDate(t.getDate()+3),{that:this,headerStatus:!0,dateSection:{status:!1,minDate:new Date,maxDate:new Date(2025,10,1),currentDate:t,showStartDate:Object(r["f"])(t,!0)},content:null,expiryDate:null}},mounted:function(){var t=this.$route.query;t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),document.title="布置作业",(Object(r["b"])().android||Object(r["b"])().iPhone)&&(this.headerStatus=!1)},methods:{formatter:function(t,e){return"year"===t?"".concat(e,"年"):"month"===t?"".concat(e,"月"):"day"==t?"".concat(e,"日"):e},confirmStartTime:function(){this.dateSection.showStartDate=Object(r["f"])(this.dateSection.currentDate,!0),this.dateSection.status=!1},onEndTime:function(){this.dateSection.status=!0},onSubmit:Object(r["a"])(function(){var t=this;if(this.content){this.$toast.loading({message:"加载中...",duration:1e4,forbidClick:!0,loadingType:"spinner"});var e=this.$route.query,a={content:this.content,courseId:e.courseId,expiryDate:this.dateSection.showStartDate};Object(c["a"])(a).then(function(e){var a=e.data;t.$toast.clear(),200==a.code?(t.$toast("作业布置成功"),t.$router.replace({path:"/manageEvaluation"})):t.$toast(a.msg)})}else this.$toast("请输入作业内容")},500)}},u=s,d=(a("52e0"),a("2877")),l=Object(d["a"])(u,n,o,!1,null,"9f159dbc",null);e["default"]=l.exports},"52e0":function(t,e,a){"use strict";var n=a("83d5"),o=a.n(n);o.a},"83d5":function(t,e,a){}}]);