| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-46938b00"],{"053b":function(e,t,a){var o=a("1e2c"),i=a("d910").f,n=Function.prototype,r=n.toString,s=/^\s*function ([^ (]*)/,l="name";o&&!(l in n)&&i(n,l,{configurable:!0,get:function(){try{return r.call(this).match(s)[1]}catch(e){return""}}})},1191:function(e,t,a){},"20a5":function(e,t,a){"use strict";var o=a("1c8b"),i=a("3da3"),n=a("e1d9"),r=a("c7e6"),s=a("efe2"),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)},m=function(e){var t=0,a=e;while(a>=4096)t+=12,a/=4096;while(a>=2)t+=1,a/=2;return t},f=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({})}));o({target:"Number",proto:!0,forced:f},{toFixed:function(e){var t,a,o,s,l=n(this),f=i(e),d=[0,0,0,0,0,0],g="",p="0",h=function(e,t){var a=-1,o=t;while(++a<6)o+=e*d[a],d[a]=o%1e7,o=c(o/1e7)},b=function(e){var t=6,a=0;while(--t>=0)a+=d[t],d[t]=c(a/e),a=a%e*1e7},v=function(){var e=6,t="";while(--e>=0)if(""!==t||0===e||0!==d[e]){var a=String(d[e]);t=""===t?a:t+r.call("0",7-a.length)+a}return t};if(f<0||f>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(g="-",l=-l),l>1e-21)if(t=m(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){h(0,a),o=f;while(o>=7)h(1e7,0),o-=7;h(u(10,o,1),0),o=t-1;while(o>=23)b(1<<23),o-=23;b(1<<o),h(1,1),b(2),p=v()}else h(0,a),h(1<<-t,0),p=v()+r.call("0",f);return f>0?(s=p.length,p=g+(s<=f?"0."+r.call("0",f-s)+p:p.slice(0,s-f)+"."+p.slice(s-f))):p=g+p,p}})},"5d77":function(e,t,a){"use strict";var o=a("1191"),i=a.n(o);i.a},c7e6:function(e,t,a){"use strict";var o=a("3da3"),i=a("2732");e.exports="".repeat||function(e){var t=String(i(this)),a="",n=o(e);if(n<0||n==1/0)throw RangeError("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(a+=t);return a}},dae9:function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"context"},[e._m(0),a("div",{staticClass:"change"},[a("el-button",{attrs:{type:"primary"},on:{click:e.addLessonTable}},[e._v("新增课程表")]),a("el-button",{attrs:{type:""},on:{click:e.copy}},[e._v("复制")]),a("el-button",{attrs:{type:""},on:{click:e.delList}},[e._v("删除")]),a("el-button",{attrs:{type:""},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}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{prop:"Name",label:"日期"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"rowHeight"},[0==t.row.Online?a("span",{staticClass:"readyTime"},[e._v(" "+e._s(t.row.BeginDate)+" - "+e._s(t.row.EndDate)+" ")]):e._e(),1==t.row.Online?a("span",{staticClass:"CurTime"},[e._v(" "+e._s(t.row.BeginDate)+" - "+e._s(t.row.EndDate)+" ")]):e._e(),1==t.row.Status&&1==t.row.Online?a("i",{staticClass:"curIcon"}):e._e(),2==t.row.Status&&1==t.row.Online?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:"EndDate",label:"最后编辑时间",sortable:""}}),a("el-table-column",{attrs:{prop:"Online",label:"是否上线"},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"}})]}}])}),a("el-table-column",{attrs:{prop:"Status",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.editName(t.row)}}},[e._v("编辑名称")]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.goEdit(t.row)}}},[e._v("修改课程")]),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:"640px"},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:"640px"},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:"640px"},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)],1)},i=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"panel"},[a("h5",[e._v("课程表管理")])])}],n=(a("dbb3"),a("053b"),a("20a5"),a("379d"),a("b8a1")),r=a("1cfa"),s={data:function(){return{dialogVisible:!1,dialogCopyVisible:!1,dialogNameVisible:!1,dialogdata:[],dialogValue:[],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:[]}},mounted:function(){this.getTableQuery()},methods:{editName:function(e){this.form.name=e.Name,this.form.stbId=e.StbId,this.dialogNameVisible=!0},seeWeek:function(){console.log(123)},addLessonTable:function(){this.$router.push({path:"/editLessonManage",query:{id:0}})},delList:function(){var e=this,t=this;if(!this.multipleSelection.length)return t.$message({showClose:!0,message:"错了哦,需要先选中至少一条记录",type:"error"}),!1;if(1!=this.multipleSelection.length)return t.$message({showClose:!0,message:"错了哦,只能选中一条记录",type:"error"}),!1;var a=t.multipleSelection[0],o={token:localStorage.token,stbId:a.StbId,status:9},i=r.stringify(o);this.$confirm("此操作将永久删除该课程表, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(n["F"])(i).then((function(e){var a=e;0==a.Code?(t.$message({showClose:!0,message:"选中的课程表已删除!",type:"success"}),t.getTableQuery()):t.$message.error(a.Memo)}))})).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},o=r.stringify(a);Object(n["C"])(o).then((function(a){var o=a;0==o.Code?(t.$message({showClose:!0,message:"名称修改成功!",type:"success"}),e.getTableQuery(),e.dialogNameVisible=!1):t.$message.error(o.Memo)}))},confirmCopy:function(){var e=this,t=this,a=this.copyForm;if(!a.week)return t.$message.error("没有选择发布周期"),!1;var o={token:localStorage.token,stbId:a.StbId,incomingDate:nonTfmtDatetoLength(a.week,10)},i=r.stringify(o);Object(n["J"])(i).then((function(a){var o=a;0==o.Code?(t.$message({showClose:!0,message:"课程复制成功!",type:"success"}),e.dialogCopyVisible=!1,e.getTableQuery()):t.$message.error(o.Memo)}))},copy:function(){var e=this;return this.multipleSelection.length?1!=this.multipleSelection.length?(e.$message({showClose:!0,message:"错了哦,只能选中一条记录",type:"error"}),!1):(this.dialogCopyVisible=!0,void(this.copyForm=e.multipleSelection[0])):(e.$message({showClose:!0,message:"错了哦,需要先选中至少一条记录",type:"error"}),!1)},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},o=r.stringify(a);Object(n["ub"])(o).then((function(a){var o=a;0==o.Code?(t.$message({showClose:!0,message:e.form.name+"已发布!",type:"success"}),t.getTableQuery(),e.dialogVisible=!1):t.$message.error(o.Memo)}))},unpubilc:function(e){var t=this,a={token:localStorage.token,detectorid:e.Id,status:4},o=r.stringify(a);Object(n["ub"])(o).then((function(e){var a=e;0==a.Code?(t.$message({showClose:!0,message:"选中的课程表已复制!",type:"success"}),t.getTableQuery()):t.$message.error(a.Memo)}))},goEdit:function(e){this.$router.push({path:"/editLessonManage",query:{id:e.StbId,name:e.Name}})},handleSelectionChange:function(e){this.multipleSelection=e},query:function(){this.getTableQuery(),this.$message.success("查询完毕")},getTableQuery:function(){var e=this;e.loading=!0;var t={token:localStorage.token,start:1,tableMax:9999},a=r.stringify(t);Object(n["D"])(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)}))},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),o=t.pageination.pageItem*e,i=[],n=a;n<o;n++)t.allTableData[n]&&i.push(t.allTableData[n]),this.tableData=i;t.start=a*t.draw,t.getTableQuery()},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,o={token:localStorage.token,stbId:t.StbId,online:e},i=r.stringify(o);Object(n["E"])(i).then((function(e){var t=e;0==t.Code?(a.$message({showClose:!0,message:"当前课程表已"+t.Memo,type:"success"}),a.getTableQuery()):a.$message.error(t.Memo)}))}}},l=s,c=(a("5d77"),a("9ca4")),u=Object(c["a"])(l,o,i,!1,null,"1c04136f",null);t["default"]=u.exports},dbb3:function(e,t,a){"use strict";var o=a("1c8b"),i=a("5dfd").filter,n=a("1ea7"),r=a("ff9c"),s=n("filter"),l=r("filter");o({target:"Array",proto:!0,forced:!s||!l},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},e1d9:function(e,t,a){var o=a("2118");e.exports=function(e){if("number"!=typeof e&&"Number"!=o(e))throw TypeError("Incorrect invocation");return+e}}}]);
- //# sourceMappingURL=chunk-46938b00.79475882.js.map
|