| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3a1e2fbc"],{"104f":function(e,t,a){"use strict";var i=a("d50e");e.exports=function(e,t){var a=[][e];return!!a&&i((function(){a.call(null,t||function(){throw 1},1)}))}},1460:function(e,t,a){var i=a("fdfe");e.exports=function(e){if("number"!=typeof e&&"Number"!=i(e))throw TypeError("Incorrect invocation");return+e}},"1f65":function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"previewContainer"},[a("div",{staticClass:"mainTitle"},[a("h5",[e._v(" "+e._s(e.BigTitle)+" ")]),a("span",[e._v(e._s(e.smallTitle))])]),a("div",{staticClass:"table"},[e._m(0),a("div",{staticClass:"tableContext"},[a("div",{staticClass:"times"},[e._l(e.previewDate.SttPlanPreviewTimeList,(function(t){return a("span",[e._v(e._s(t.BeginStr)+"-"+e._s(t.EndStr))])})),e._l(e.previewDate.SttPreviewTimeList,(function(t){return a("span",[e._v(e._s(t.BeginStr)+"-"+e._s(t.EndStr))])}))],2),e._l(7,(function(t){return a("div",{staticClass:"rows"},[e._l(e.previewDate.SttPlanPreviewClassList,(function(i){return i.WeekDay==t?a("em",{style:{background:i.ClassColor}},[e._v(" "+e._s(i.ClassName)+" ")]):e._e()})),e._l(e.previewDate.SttPreviewClassList,(function(i){return i.WeekDay==t?a("em",{style:{background:i.ClassColor}},[e._v(" "+e._s(i.ClassName)+" ")]):e._e()}))],2)}))],2)])])},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"tableTitle"},[a("span",[e._v("时间")]),a("span",[e._v("星期一")]),a("span",[e._v("星期二")]),a("span",[e._v("星期三")]),a("span",[e._v("星期四")]),a("span",[e._v("星期五")]),a("span",[e._v("星期六")]),a("span",[e._v("星期日")])])}],o=(a("b8a1"),a("379d"),a("7c78"),{data:function(){return{}},props:["previewDate","BigTitle","smallTitle"],mounted:function(){},watch:{}}),r=o,s=(a("92a6"),a("4ac2")),l=Object(s["a"])(r,i,n,!1,null,"d81dff84",null);t["a"]=l.exports},"21a1":function(e,t,a){},"2c4a":function(e,t,a){},"3f7e":function(e,t,a){"use strict";var i=a("e450"),n=a("a3e7").filter,o=a("529c"),r=o("filter");i({target:"Array",proto:!0,forced:!r},{filter:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},"722c":function(e,t,a){var i=a("8018");e.exports=/MSIE|Trident/.test(i)},"7eeb":function(e,t,a){var i=a("8018"),n=i.match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},"90b0":function(e,t,a){"use strict";a("21a1")},"92a6":function(e,t,a){"use strict";a("2c4a")},"9d77":function(e,t){var a=Math.floor,i=function(e,t){var r=e.length,s=a(r/2);return r<8?n(e,t):o(i(e.slice(0,s),t),i(e.slice(s),t),t)},n=function(e,t){var a,i,n=e.length,o=1;while(o<n){i=o,a=e[o];while(i&&t(e[i-1],a)>0)e[i]=e[--i];i!==o++&&(e[i]=a)}return e},o=function(e,t,a){var i=e.length,n=t.length,o=0,r=0,s=[];while(o<i||r<n)o<i&&r<n?s.push(a(e[o],t[r])<=0?e[o++]:t[r++]):s.push(o<i?e[o++]:t[r++]);return s};e.exports=i},a6eb:function(e,t,a){var i=a("8018"),n=i.match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},bbdf:function(e,t,a){"use strict";var i=a("599d"),n=a("e08f");e.exports=function(e){var t=String(n(this)),a="",o=i(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(a+=t);return a}},cbea:function(e,t,a){"use strict";var i=a("e450"),n=a("599d"),o=a("1460"),r=a("bbdf"),s=a("d50e"),l=1..toFixed,c=Math.floor,u=function(e,t,a){return 0===t?a:t%2===1?u(e,t-1,a*e):u(e*e,t/2,a)},f=function(e){var t=0,a=e;while(a>=4096)t+=12,a/=4096;while(a>=2)t+=1,a/=2;return t},d=function(e,t,a){var i=-1,n=a;while(++i<6)n+=t*e[i],e[i]=n%1e7,n=c(n/1e7)},p=function(e,t){var a=6,i=0;while(--a>=0)i+=e[a],e[a]=c(i/t),i=i%t*1e7},m=function(e){var t=6,a="";while(--t>=0)if(""!==a||0===t||0!==e[t]){var i=String(e[t]);a=""===a?i:a+r.call("0",7-i.length)+i}return a},g=l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){l.call({})}));i({target:"Number",proto:!0,forced:g},{toFixed:function(e){var t,a,i,s,l=o(this),c=n(e),g=[0,0,0,0,0,0],v="",h="0";if(c<0||c>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(v="-",l=-l),l>1e-21)if(t=f(l*u(2,69,1))-69,a=t<0?l*u(2,-t,1):l/u(2,t,1),a*=4503599627370496,t=52-t,t>0){d(g,0,a),i=c;while(i>=7)d(g,1e7,0),i-=7;d(g,u(10,i,1),0),i=t-1;while(i>=23)p(g,1<<23),i-=23;p(g,1<<i),d(g,1,1),p(g,2),h=m(g)}else d(g,0,a),d(g,1<<-t,0),h=m(g)+r.call("0",c);return c>0?(s=h.length,h=v+(s<=c?"0."+r.call("0",c-s)+h:h.slice(0,s-c)+"."+h.slice(s-c))):h=v+h,h}})},dae9:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"context"},[e._m(0),a("div",{staticClass:"change"},[4!=e.userLevel?a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.addLessonTable}},[e._v("新增课程表")]):e._e(),4!=e.userLevel?a("el-button",{attrs:{type:"",size:"mini"},on:{click:e.copy}},[e._v("复制")]):e._e(),4!=e.userLevel?a("el-button",{attrs:{type:"",size:"mini"},on:{click:e.delList}},[e._v("删除")]):e._e(),a("el-button",{attrs:{type:"",disabled:e.serachBtnStatus,size:"mini"},on:{click:e.query}},[e._v("刷新")])],1),a("div",{staticClass:"table"},[a("el-table",{attrs:{data:e.tableData,border:"","is-horizontal-resize":"","default-sort":{prop:"date",order:"descending"},"element-loading-background":"rgba(0, 0, 0, 0.8)"},on:{"selection-change":e.handleSelectionChange,"current-change":e.clickChange}},[e._v(" > "),a("el-table-column",{attrs:{label:"选择",width:"55"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio",{attrs:{label:t.row},model:{value:e.tableRadio,callback:function(t){e.tableRadio=t},expression:"tableRadio"}},[a("i")])]}}])}),a("el-table-column",{attrs:{label:"序号",type:"index",width:"50",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.start+t.$index+1))])]}}])}),a("el-table-column",{attrs:{prop:"Name",label:"日期"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"rowHeight"},[t.row.Diffweek<0?a("span",{staticClass:"readyTime"},[e._v(" "+e._s(t.row.BeginDate)+" - "+e._s(t.row.EndDate)+" ")]):e._e(),t.row.Diffweek>=0?a("span",{staticClass:"CurTime"},[e._v(" "+e._s(t.row.BeginDate)+" - "+e._s(t.row.EndDate)+" ")]):e._e(),1==t.row.Status&&0==t.row.Diffweek?a("i",{staticClass:"curIcon"}):e._e(),2==t.row.Status?a("span",{staticClass:"runTime"},[e._v(" "+e._s(t.row.BeginDate)+" - "+e._s(t.row.EndDate)+" ")]):e._e()])]}}])}),a("el-table-column",{attrs:{prop:"Name",label:"课程表名称",sortable:""}}),a("el-table-column",{attrs:{prop:"CreateColumn.CreatedAt",label:"最后编辑时间",formatter:e.filterFmtDate,sortable:""}}),4!=e.userLevel?a("el-table-column",{attrs:{prop:"Online",label:"是否上线",width:"120px",sortable:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#409EFF","inactive-color":"#D9D9D9"},on:{change:function(a){return e.changeWechat(a,t.row)}},model:{value:t.row.Online,callback:function(a){e.$set(t.row,"Online",a)},expression:"scope.row.Online"}})]}}],null,!1,1451840017)}):e._e(),a("el-table-column",{attrs:{prop:"Status",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.Diffweek>=0&&4!=e.userLevel?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.editName(t.row)}}},[e._v("编辑名称 ")]):e._e(),t.row.Diffweek>=0&&4!=e.userLevel?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.goEdit(t.row)}}},[e._v("修改课程 ")]):e._e(),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.seeWeek(t.row)}}},[e._v("预览本周")])]}}])})],1),a("br"),a("el-pagination",{attrs:{background:"",total:e.pageination.total,"page-size":e.pageination.pageItem},on:{"current-change":e.pageChange}})],1),a("el-dialog",{attrs:{title:"发布课程表",visible:e.dialogVisible,width:"650px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{staticClass:"dialogTitle"},[a("span",[e._v(e._s(e.form.name))])]),a("div",[a("span",{staticClass:"demonstration"},[e._v("选择发布日期(按周选取)")]),a("br"),a("br"),a("el-date-picker",{attrs:{type:"week","picker-options":{firstDayOfWeek:1},format:"yyyy 第 WW 周",placeholder:"选择周"},model:{value:e.form.week,callback:function(t){e.$set(e.form,"week",t)},expression:"form.week"}}),a("br"),a("br"),a("span",[e._v(" 微信可见 ")]),a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#409EFF","inactive-color":"#D9D9D9"},model:{value:e.form.wechat,callback:function(t){e.$set(e.form,"wechat",t)},expression:"form.wechat"}}),a("span",[e._v(" 微信可预约 ")]),a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#409EFF","inactive-color":"#D9D9D9"},model:{value:e.form.appoint,callback:function(t){e.$set(e.form,"appoint",t)},expression:"form.appoint"}})],1),a("div",{staticClass:"dialogFooter"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.public}},[e._v("确定")]),a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")])],1)]),a("el-dialog",{attrs:{title:"复制课程表",visible:e.dialogCopyVisible,width:"650px"},on:{"update:visible":function(t){e.dialogCopyVisible=t}}},[a("div",[a("span",{staticClass:"demonstration"},[e._v("选择发布日期(按周选取)")]),a("br"),a("br"),a("el-date-picker",{attrs:{type:"week","picker-options":{firstDayOfWeek:1},format:"yyyy 第 WW 周",placeholder:"选择周"},model:{value:e.copyForm.week,callback:function(t){e.$set(e.copyForm,"week",t)},expression:"copyForm.week"}})],1),a("div",{staticClass:"dialogFooter"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.confirmCopy}},[e._v("确定")]),a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogCopyVisible=!1}}},[e._v("取消")])],1)]),a("el-dialog",{attrs:{title:"编辑名称",visible:e.dialogNameVisible,width:"650px"},on:{"update:visible":function(t){e.dialogNameVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"160px"}},[a("el-form-item",{attrs:{label:"课程表名称"}},[a("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),a("div",{staticClass:"dialogFooter"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.confirmName}},[e._v("确定")]),a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogNameVisible=!1}}},[e._v("取消")])],1)],1),a("el-dialog",{attrs:{title:"",visible:e.previewShow,width:"1200px"},on:{"update:visible":function(t){e.previewShow=t}}},[a("preview",{attrs:{"preview-date":e.previewDate,"big-title":e.BigTitle,"small-title":e.smallTitle}}),a("div",{staticClass:"dialogFooter"},[a("el-button",{attrs:{size:"small"},on:{click:function(t){e.previewShow=!1}}},[e._v("关闭")])],1)],1)],1)},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"panel"},[a("h5",[e._v("课程表管理")])])}],o=(a("f5bd"),a("f49b"),a("3f7e"),a("cbea"),a("379d"),a("1f65")),r=a("b8a1"),s=a("7c78"),l={data:function(){return{serachBtnStatus:!1,previewShow:!1,previewDate:{},BigTitle:"",smallTitle:"",dialogVisible:!1,dialogCopyVisible:!1,dialogNameVisible:!1,dialogdata:[],dialogValue:[],start:0,draw:1,multipleSelection:[],pageination:{pageItem:100,pageoptions:pageOptions(),total:100,pageIndex:1},form:{Id:"",name:"",week:"",wechat:1,appoint:1},copyForm:{stbId:"",Id:"",name:"",week:"",wechat:1,appoint:1},tableData:[],tableRadio:[],userLevel:localStorage.userLevel}},mounted:function(){this.getTableQuery()},methods:{clickChange:function(e){this.tableRadio=e},editName:function(e){this.form.name=e.Name,this.form.stbId=e.StbId,this.dialogNameVisible=!0},seeWeek:function(e){var t=this;console.log(e);var a={token:localStorage.token,stbId:e.StbId},i=s.stringify(a);Object(r["yb"])(i).then((function(a){var i=a;0==i.Code?(t.BigTitle=e.Name,t.smallTitle=e.BeginDate+"至"+e.EndDate,t.previewDate=i.Rs,t.previewDate.SttPreviewClassList.sort((function(e,t){return e.ClassIndex-t.ClassIndex})),t.previewShow=!0):t.$message.error(i.Memo+" 错误码:"+i.Code)}))},addLessonTable:function(){this.$router.push({path:"/editLessonManage",query:{id:0}})},delList:function(){var e=this,t=this;if(0==this.tableRadio.length)return this.$message.error("请先选中一条记录"),!1;var a=t.tableRadio;if(a.Diffweek<0)return t.$message({showClose:!0,message:"已过期的课程表不可删除",type:"error"}),!1;var i={token:localStorage.token,stbId:a.StbId,status:9},n=s.stringify(i);this.$confirm("此操作将永久删除该课程表, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["sb"])(n).then((function(e){var a=e;0==a.Code?(t.$message({showClose:!0,message:"选中的课程表已删除!",type:"success"}),t.getTableQuery()):t.$message.error(a.Memo+" 错误码:"+a.Code)}))})).catch((function(){e.$message({type:"info",message:"已取消删除"})}))},confirmName:function(){var e=this,t=this;if(!this.form.name)return this.$message.error("名称不能为空"),!1;if(this.form.name.length<3)return this.$message.error("名称不能小于3个字符"),!1;if(this.form.name.length>20)return this.$message.error("名称不能大于20个字符"),!1;var a={token:localStorage.token,stbId:this.form.stbId,name:this.form.name},i=s.stringify(a);Object(r["pb"])(i).then((function(a){var i=a;0==i.Code?(t.$message({showClose:!0,message:"名称修改成功!",type:"success"}),e.getTableQuery(),e.dialogNameVisible=!1):t.$message.error(i.Memo+" 错误码:"+i.Code)}))},confirmCopy:function(){var e=this,t=this,a=this.copyForm;if(!a.week)return t.$message.error("没有选择发布周期"),!1;var i={token:localStorage.token,stbId:a.StbId,incomingDate:nonTfmtDatetoLength(a.week,10)},n=s.stringify(i);Object(r["xb"])(n).then((function(a){var i=a;0==i.Code?(t.$message({showClose:!0,message:"课程复制成功!",type:"success"}),e.dialogCopyVisible=!1,e.getTableQuery()):t.$message.error(i.Memo+" 错误码:"+i.Code)}))},copy:function(){var e=this;if(this.dialogCopyVisible=!0,0==this.tableRadio.length)return this.$message.error("请先选中一条记录"),!1;this.copyForm=e.tableRadio},openLessonTable:function(e){this.dialogVisible=!0,this.form.name=e.name,this.form.Id=e.Id,this.form.week=""},public:function(){var e=this,t=this;if(!this.form.week)return this.$message({showClose:!0,message:"错了哦,发布周期不能空",type:"error"}),!1;var a={token:localStorage.token,detectorid:this.form.Id,week:this.form.week,wechat:this.form.wechat,appoint:this.form.appoint},i=s.stringify(a);Object(r["Ec"])(i).then((function(a){var i=a;0==i.Code?(t.$message({showClose:!0,message:e.form.name+"已发布!",type:"success"}),t.getTableQuery(),e.dialogVisible=!1):t.$message.error(i.Memo+" 错误码:"+i.Code)}))},unpubilc:function(e){var t=this,a={token:localStorage.token,detectorid:e.Id,status:4},i=s.stringify(a);Object(r["Ec"])(i).then((function(e){var a=e;0==a.Code?(t.$message({showClose:!0,message:"选中的课程表已复制!",type:"success"}),t.getTableQuery()):t.$message.error(a.Memo+" 错误码:"+a.Code)}))},goEdit:function(e){this.$router.push({path:"/editLessonManage",query:{id:e.StbId,name:e.Name}})},handleSelectionChange:function(e){this.multipleSelection=e},query:function(){var e=this;e.serachBtnStatus=!0;var t=2;window.setInterval((function(){t--,t<0&&(t=2,e.serachBtnStatus=!1)}),1e3);this.getTableQuery(),this.$message.success("查询完毕")},getTableQuery:function(){var e=this;e.loading=!0;var t={token:localStorage.token,start:1,tableMax:9999},a=s.stringify(t);Object(r["qb"])(a).then((function(t){var a=t;0==a.Code?(e.loading=!1,a.Rs?(e.allTableData=a.Rs,e.recordsTotal=a.Rs.length):(e.allTableData=[],e.recordsTotal=0),e.setPaginations()):e.$message.error(a.Memo+" 错误码:"+a.Code)}))},setPaginations:function(){var e=this;e.pageination.total=e.recordsTotal,e.tableData=e.allTableData.filter((function(t,a){return a<e.pageination.pageItem}))},handleSizeChange:function(){var e=this;e.tableData=e.allTableData.filter((function(t,a){return a<e.pageination.pageItem})),e.draw=e.pageination.pageItem,e.getTableQuery()},pageChange:function(e){for(var t=this,a=t.pageination.pageItem*(e-1),i=t.pageination.pageItem*e,n=[],o=a;o<i;o++)t.allTableData[o]&&n.push(t.allTableData[o]),this.tableData=n;t.start=a*t.draw},sortChange:function(e){console.log(e)},filterFmtDate:function(e,t,a){return nonTfmtDate(a,11)},filterMoney:function(e,t,a){return parseFloat(a).toFixed(2)},changeWechat:function(e,t){var a=this,i={token:localStorage.token,stbId:t.StbId,online:e},n=s.stringify(i);Object(r["rb"])(n).then((function(i){var n=i;if(0==n.Code){var o=1==parseInt(e)?"上线":"下线";a.$message({showClose:!0,message:"当前课程表已"+o,type:"success"}),a.getTableQuery()}else a.$message.error(n.Memo+" 错误码:"+n.Code),t.Online=0}))}},watch:{$route:function(e){"lessonManage"==e.name&&this.getTableQuery()}},components:{preview:o["a"]}},c=l,u=(a("90b0"),a("4ac2")),f=Object(u["a"])(c,i,n,!1,null,"2d9cc8d4",null);t["default"]=f.exports},f49b:function(e,t,a){"use strict";var i=a("e450"),n=a("9c34"),o=a("eb35"),r=a("a4fc"),s=a("d50e"),l=a("9d77"),c=a("104f"),u=a("a6eb"),f=a("722c"),d=a("acb9"),p=a("7eeb"),m=[],g=m.sort,v=s((function(){m.sort(void 0)})),h=s((function(){m.sort(null)})),b=c("sort"),w=!s((function(){if(d)return d<70;if(!(u&&u>3)){if(f)return!0;if(p)return p<603;var e,t,a,i,n="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:a=3;break;case 68:case 71:a=4;break;default:a=2}for(i=0;i<47;i++)m.push({k:t+i,v:a})}for(m.sort((function(e,t){return t.v-e.v})),i=0;i<m.length;i++)t=m[i].k.charAt(0),n.charAt(n.length-1)!==t&&(n+=t);return"DGBEFHACIJK"!==n}})),y=v||!h||!b||!w,k=function(e){return function(t,a){return void 0===a?-1:void 0===t?1:void 0!==e?+e(t,a)||0:String(t)>String(a)?1:-1}};i({target:"Array",proto:!0,forced:y},{sort:function(e){void 0!==e&&n(e);var t=o(this);if(w)return void 0===e?g.call(t):g.call(t,e);var a,i,s=[],c=r(t.length);for(i=0;i<c;i++)i in t&&s.push(t[i]);s=l(s,k(e)),a=s.length,i=0;while(i<a)t[i]=s[i++];while(i<c)delete t[i++];return t}})},f5bd:function(e,t,a){var i=a("cdcb"),n=a("3d27").f,o=Function.prototype,r=o.toString,s=/^\s*function ([^ (]*)/,l="name";i&&!(l in o)&&n(o,l,{configurable:!0,get:function(){try{return r.call(this).match(s)[1]}catch(e){return""}}})}}]);
|