1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["CourseDetail"],{1211:function(e,t,r){},3354:function(e,t,r){},4127:function(e,t,r){"use strict";var a=r("d2334"),n=r("b313"),i=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,l=Array.prototype.push,c=function(e,t){l.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=n["default"],f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:a.encode,encodeValuesOnly:!1,format:d,formatter:n.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return"string"===typeof e||"number"===typeof e||"boolean"===typeof e||"symbol"===typeof e||"bigint"===typeof e},h=function e(t,r,n,i,o,l,u,d,h,m,v,y,g){var b=t;if("function"===typeof u?b=u(r,b):b instanceof Date?b=m(b):"comma"===n&&s(b)&&(b=b.join(",")),null===b){if(i)return l&&!y?l(r,f.encoder,g):r;b=""}if(p(b)||a.isBuffer(b)){if(l){var w=y?r:l(r,f.encoder,g);return[v(w)+"="+v(l(b,f.encoder,g))]}return[v(r)+"="+v(String(b))]}var S,C=[];if("undefined"===typeof b)return C;if(s(u))S=u;else{var j=Object.keys(b);S=d?j.sort(d):j}for(var O=0;O<S.length;++O){var k=S[O];o&&null===b[k]||(s(b)?c(C,e(b[k],"function"===typeof n?n(r,k):r,n,i,o,l,u,d,h,m,v,y,g)):c(C,e(b[k],r+(h?"."+k:"["+k+"]"),n,i,o,l,u,d,h,m,v,y,g)))}return C},m=function(e){if(!e)return f;if(null!==e.encoder&&void 0!==e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||f.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=n["default"];if("undefined"!==typeof e.format){if(!i.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var a=n.formatters[r],o=f.filter;return("function"===typeof e.filter||s(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:"undefined"===typeof e.allowDots?f.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,delimiter:"undefined"===typeof e.delimiter?f.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:f.encode,encoder:"function"===typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:o,formatter:a,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}};e.exports=function(e,t){var r,a,n=e,i=m(t);"function"===typeof i.filter?(a=i.filter,n=a("",n)):s(i.filter)&&(a=i.filter,r=a);var l,u=[];if("object"!==typeof n||null===n)return"";l=t&&t.arrayFormat in o?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var d=o[l];r||(r=Object.keys(n)),i.sort&&r.sort(i.sort);for(var f=0;f<r.length;++f){var p=r[f];i.skipNulls&&null===n[p]||c(u,h(n[p],p,d,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.formatter,i.encodeValuesOnly,i.charset))}var v=u.join(i.delimiter),y=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&("iso-8859-1"===i.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""}},4328:function(e,t,r){"use strict";var a=r("4127"),n=r("9e6a"),i=r("b313");e.exports={formats:i,parse:n,stringify:a}},5115:function(e,t,r){"use strict";var a=r("3354"),n=r.n(a);n.a},"6e6e":function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"mheader"},[r("header",{staticClass:"m-nav-header",class:[e.isFixed?"fixed":""]},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:e.goBack}},[r("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),r("div",{staticClass:"m-nav-bar__title"},[e._t("default",[e._v(e._s(e.name?e.name:this.$route.meta.descrition))])],2),r("div",{staticClass:"m-nav-bar__right"},[e._t("right")],2)])])},n=[],i={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{goBack:function(){var e=this.backUrl;"function"==typeof e.callBack?e.callBack():e.path?this.$router.push({path:e.path,query:e.params}):history.go(-1)}}},o=i,s=(r("5115"),r("2877")),l=Object(s["a"])(o,a,n,!1,null,"61d0e2e4",null);t["a"]=l.exports},7121:function(e,t,r){e.exports=r.p+"img/icon_student.2f375f47.png"},9624:function(e,t,r){"use strict";var a=r("1211"),n=r.n(a);n.a},"9e6a":function(e,t,r){"use strict";var a=r("d2334"),n=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:a.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",c=function(e,t){var r,c={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,f=u.split(t.delimiter,d),p=-1,h=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&(f[r]===l?h="utf-8":f[r]===s&&(h="iso-8859-1"),p=r,r=f.length);for(r=0;r<f.length;++r)if(r!==p){var m,v,y=f[r],g=y.indexOf("]="),b=-1===g?y.indexOf("="):g+1;-1===b?(m=t.decoder(y,i.decoder,h),v=t.strictNullHandling?null:""):(m=t.decoder(y.slice(0,b),i.decoder,h),v=t.decoder(y.slice(b+1),i.decoder,h)),v&&t.interpretNumericEntities&&"iso-8859-1"===h&&(v=o(v)),v&&t.comma&&v.indexOf(",")>-1&&(v=v.split(",")),n.call(c,m)?c[m]=a.combine(c[m],v):c[m]=v}return c},u=function(e,t,r){for(var a=t,n=e.length-1;n>=0;--n){var i,o=e[n];if("[]"===o&&r.parseArrays)i=[].concat(a);else{i=r.plainObjects?Object.create(null):{};var s="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,l=parseInt(s,10);r.parseArrays||""!==s?!isNaN(l)&&o!==s&&String(l)===s&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(i=[],i[l]=a):i[s]=a:i={0:a}}a=i}return a},d=function(e,t,r){if(e){var a=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,s=r.depth>0&&i.exec(a),l=s?a.slice(0,s.index):a,c=[];if(l){if(!r.plainObjects&&n.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}var d=0;while(r.depth>0&&null!==(s=o.exec(a))&&d<r.depth){if(d+=1,!r.plainObjects&&n.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(s[1])}return s&&c.push("["+a.slice(s.index)+"]"),u(c,t,r)}},f=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||a.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}};e.exports=function(e,t){var r=f(t);if(""===e||null===e||"undefined"===typeof e)return r.plainObjects?Object.create(null):{};for(var n="string"===typeof e?c(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),s=0;s<o.length;++s){var l=o[s],u=d(l,n[l],r);i=a.merge(i,u,r)}return a.compact(i)}},b313:function(e,t,r){"use strict";var a=String.prototype.replace,n=/%20/g,i=r("d2334"),o={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:o.RFC3986,formatters:{RFC1738:function(e){return a.call(e,n,"+")},RFC3986:function(e){return String(e)}}},o)},d2334:function(e,t,r){"use strict";var a=Object.prototype.hasOwnProperty,n=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e){while(e.length>1){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var a=[],i=0;i<r.length;++i)"undefined"!==typeof r[i]&&a.push(r[i]);t.obj[t.prop]=a}}},s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},a=0;a<e.length;++a)"undefined"!==typeof e[a]&&(r[a]=e[a]);return r},l=function e(t,r,i){if(!r)return t;if("object"!==typeof r){if(n(t))t.push(r);else{if(!t||"object"!==typeof t)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!a.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!==typeof t)return[t].concat(r);var o=t;return n(t)&&!n(r)&&(o=s(t,i)),n(t)&&n(r)?(r.forEach(function(r,n){if(a.call(t,n)){var o=t[n];o&&"object"===typeof o&&r&&"object"===typeof r?t[n]=e(o,r,i):t.push(r)}else t[n]=r}),t):Object.keys(r).reduce(function(t,n){var o=r[n];return a.call(t,n)?t[n]=e(t[n],o,i):t[n]=o,t},o)},c=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},u=function(e,t,r){var a=e.replace(/\+/g," ");if("iso-8859-1"===r)return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch(n){return a}},d=function(e,t,r){if(0===e.length)return e;var a=e;if("symbol"===typeof e?a=Symbol.prototype.toString.call(e):"string"!==typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var n="",o=0;o<a.length;++o){var s=a.charCodeAt(o);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?n+=a.charAt(o):s<128?n+=i[s]:s<2048?n+=i[192|s>>6]+i[128|63&s]:s<55296||s>=57344?n+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(o+=1,s=65536+((1023&s)<<10|1023&a.charCodeAt(o)),n+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return n},f=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],a=0;a<t.length;++a)for(var n=t[a],i=n.obj[n.prop],s=Object.keys(i),l=0;l<s.length;++l){var c=s[l],u=i[c];"object"===typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:i,prop:c}),r.push(u))}return o(t),e},p=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},h=function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},m=function(e,t){return[].concat(e,t)};e.exports={arrayToObject:s,assign:c,combine:m,compact:f,decode:u,encode:d,isBuffer:h,isRegExp:p,merge:l}},e373:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"courseEvaluation"},[e.headerStatus?a("MHeader"):e._e(),a("van-cell-group",[a("van-cell",{attrs:{title:"课程班名称",value:e.teacherClassHeadInfo.classGroupName}})],1),a("van-cell-group",[a("van-cell",{attrs:{title:"课程时间",value:e.teacherClassHeadInfo.classTime}})],1),a("van-cell-group",[a("van-cell",{attrs:{title:"乐器",value:e.teacherClassHeadInfo.subjectNames}})],1),a("van-cell-group",[a("van-cell",{attrs:{title:"班级学员",value:e.teacherClassHeadInfo.studentNames}})],1),a("van-cell-group",[a("van-field",{staticClass:"textarea",attrs:{maxlength:"255",autosize:"",label:"教学内容",type:"textarea",readonly:e.teachingMaterialStatus,placeholder:"请输入1-255字"},model:{value:e.teachingMaterial,callback:function(t){e.teachingMaterial=t},expression:"teachingMaterial"}})],1),e.courseScheduleComplaints.length>0?a("div",[a("div",{staticClass:"title"},[e._v("学员评价")]),e._l(e.courseScheduleComplaints,function(t,n){return a("div",{key:n,staticClass:"evaluation-item"},[a("div",{staticClass:"header"},[t.avatar?a("img",{attrs:{src:t.avatar,alt:""}}):a("img",{attrs:{src:r("7121"),alt:""}}),e._v("\n "+e._s(t.username)+"\n ")]),a("div",{staticClass:"rate"},[e._v("评价"),a("van-rate",{attrs:{readonly:"",size:20},model:{value:t.score,callback:function(r){e.$set(t,"score",r)},expression:"item.score"}})],1),a("div",{staticClass:"content"},[e._v("\n "+e._s(t.reason)+"\n ")])])})],2):e._e(),a("div",{staticClass:"title",class:[e.courseScheduleComplaints.length>0?"teacher":""]},[e._v("老师评价")]),e.courseScheduleReviewList.length>0?a("div",e._l(e.courseScheduleReviewList,function(t,n){return a("van-panel",{key:n},[a("div",{staticClass:"van-hairline--bottom",staticStyle:{display:"flex"},attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"header"},[t.studentAvatar?a("img",{attrs:{src:t.studentAvatar,alt:""}}):a("img",{attrs:{src:r("7121"),alt:""}}),e._v(e._s(t.studentName)+"\n ")])]),a("div",{staticClass:"content",attrs:{slot:"default"},slot:"default"},[e._v(e._s(t.memo))])])}),1):a("div",[a("van-cell",{attrs:{center:"",title:"是否对所有学生评价"}},[a("van-switch",{attrs:{slot:"right-icon"},slot:"right-icon",model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}})],1),e.checked?a("van-panel",{staticClass:"evaluation-panel",attrs:{title:"评论给所有学生"}},[a("div",{attrs:{slot:"default"},slot:"default"},[a("van-field",{attrs:{rows:"3",maxlength:"255",autosize:"",type:"textarea",placeholder:"请输入1-255字"},model:{value:e.contentall,callback:function(t){e.contentall=t},expression:"contentall"}})],1)]):a("div",e._l(e.students,function(t,n){return a("van-panel",{key:n,staticClass:"evaluation-panel"},[a("div",{staticClass:"van-hairline--bottom",staticStyle:{display:"flex","padding-left":".16rem"},attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"header"},[t.avatar?a("img",{attrs:{src:t.avatar,alt:""}}):a("img",{attrs:{src:r("7121"),alt:""}}),e._v("\n "+e._s(t.username)+"\n ")])]),a("div",{attrs:{slot:"default"},slot:"default"},[a("van-field",{attrs:{rows:"3",autosize:"",type:"textarea",placeholder:"请输入1-255字"},model:{value:t.content,callback:function(r){e.$set(t,"content",r)},expression:"item.content"}})],1)])}),1)],1),e.courseScheduleReviewList.length<=0?a("div",{staticClass:"button-group"},[a("van-button",{attrs:{type:"primary",round:"",size:"large"},on:{click:e.onSubmit}},[e._v("确认")])],1):e._e()],1)},n=[],i=r("6e6e"),o=r("b562"),s=r("ff51"),l={name:"courseEvaluation",components:{MHeader:i["a"]},data:function(){var e=this.$route.query;return{headerStatus:!1,checked:!0,courseId:e.courseId,teachingMaterial:null,teachingMaterialStatus:!1,teacherClassHeadInfo:{},courseScheduleReview:[],courseScheduleComplaints:[],courseScheduleReviewList:[],review4StudentIds:{},students:[],contentall:null}},mounted:function(){var e=this.$route.query;e.Authorization&&(localStorage.setItem("Authorization",decodeURI(e.Authorization)),localStorage.setItem("userInfo",decodeURI(e.Authorization))),Object(s["b"])().android||Object(s["b"])().iPhone?document.title="课程评价":this.headerStatus=!0,this.__init()},methods:{__init:function(){var e=this;this.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),Object(o["f"])({courseId:this.courseId}).then(function(t){var r=t.data;if(e.$toast.clear(),200==r.code){var a=r.data;a&&(e.teachingMaterial=a.teachingMaterial,e.teachingMaterialStatus=!!a.teachingMaterial,e.teacherClassHeadInfo=a.teacherClassHeadInfo?a.teacherClassHeadInfo:{},e.teacherClassHeadInfo.classDate&&(e.teacherClassHeadInfo.classTime=e.teacherClassHeadInfo.classDate+" "+e.teacherClassHeadInfo.startClassTime+"-"+e.teacherClassHeadInfo.endClassTime),e.courseScheduleReview=a.courseScheduleReview?a.courseScheduleReview:[],e.courseScheduleComplaints=a.courseScheduleComplaints?a.courseScheduleComplaints:[],e.courseScheduleReviewList=a.courseScheduleReviewList?a.courseScheduleReviewList:[],e.review4StudentIds=a.review4StudentIds?a.review4StudentIds:{},e.students=a.students?a.students:[],a.students.forEach(function(e){e.content=null}))}else e.$toast(r.msg)})},onSubmit:function(){var e=this,t=this.students,r=[];if(this.teachingMaterial)if(this.contentall||!this.checked){var a=!1;t.forEach(function(t){e.checked||t.content?r.push({memo:e.checked?e.contentall:t.content,courseScheduleId:e.courseId,studentId:t.id,teachingMaterial:e.teachingMaterial}):a=!0}),a?this.$toast("请输入学生评价"):(this.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),Object(o["a"])(r).then(function(t){e.$toast.clear();var r=t.data;200==r.code?(e.$toast("评价成功"),setTimeout(function(){e.onSubmitStatus=!0,Object(s["b"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):Object(s["b"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):e.$router.push("/business")},500)):e.$toast(r.msg)}))}else this.$toast("请输入学生评价");else this.$toast("请输入教学内容")}},destroyed:function(){this.$toast.clear()}},c=l,u=(r("9624"),r("2877")),d=Object(u["a"])(c,a,n,!1,null,"97e6aa2a",null);t["default"]=d.exports}}]);
|