chunk-31f1cd26.undefined.1670377698154.js 15 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-31f1cd26"],{"0091":function(e,t,a){var n=a("0fd2"),o=n.match(/AppleWebKit\/(\d+)\./);e.exports=!!o&&+o[1]},"10dd":function(e,t,a){var n=a("3b43"),o=a("5e68").EXISTS,i=a("ce5b"),r=a("98fb").f,s=Function.prototype,l=i(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=i(c.exec),d="name";n&&!o&&r(s,d,{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(e){return""}}})},"1c21":function(e,t,a){"use strict";a.r(t);var n=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",size:"mini"},on:{click:e.addLessonTable}},[e._v("新增课程表模板")]),a("el-button",{attrs:{type:"",size:"mini"},on:{click:e.copyDialog}},[e._v("复制")]),a("el-button",{attrs:{type:"danger",size:"mini"},on:{click:e.delList}},[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:"PlanName",label:"课程表模板名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"link",on:{click:function(a){return e.goEdit(t.row)}}},[e._v(" "+e._s(t.row.PlanName)+" ")])]}}])}),a("el-table-column",{attrs:{prop:"CreateColumn.CreatedAt",label:"最后编辑时间",formatter:e.filterFmtDate,sortable:""}}),a("el-table-column",{attrs:{prop:"ShopId",label:"是否跨店",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.changeShopId(a,t.row)}},model:{value:t.row.isAcross,callback:function(a){e.$set(t.row,"isAcross",a)},expression:"scope.row.isAcross"}})]}}])}),a("el-table-column",{attrs:{prop:"Status",label:"状态",width:"110",align:"center",sortable:""},scopedSlots:e._u([{key:"default",fn:function(t){return[2==t.row.Status?a("span",[e._v("已发布")]):e._e(),1==t.row.Status?a("span",[e._v("未发布")]):e._e()]}}])}),a("el-table-column",{attrs:{prop:"Status",label:"操作",width:"220px"},scopedSlots:e._u([{key:"default",fn:function(t){return[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("预览本周")]),a("el-button",{attrs:{type:"success",size:"mini"},on:{click:function(a){return e.openLessonTable(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.dialogCopyVisible,width:"640px"},on:{"update:visible":function(t){e.dialogCopyVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.copyForm,"label-width":"160px"}},[a("el-form-item",{attrs:{label:"新模板名称"}},[a("el-input",{attrs:{placeholder:"请输入新模板名称"},model:{value:e.copyForm.name,callback:function(t){e.$set(e.copyForm,"name",t)},expression:"copyForm.name"}})],1)],1),a("div",{staticClass:"dialogFooter"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.copy}},[e._v("确定")]),a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogCopyVisible=!1}}},[e._v("取消")])],1)],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.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.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)},o=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"panel"},[a("h5",[e._v("课程表模板")])])}],i=(a("a536"),a("10dd"),a("8ea3"),a("5a05"),a("89a8"),a("379d"),a("1f65")),r=a("b8a1"),s=a("daf0"),l={data:function(){return{previewShow:!1,superShopId:localStorage.SuperShopId,previewDate:{},BigTitle:"",smallTitle:"",dialogVisible:!1,dialogCopyVisible:!1,previewVisible:!1,dialogdata:[],dialogValue:[],start:0,draw:1,multipleSelection:[],pageination:{pageItem:10,pageoptions:pageOptions(),total:100,pageIndex:1},form:{Id:"",name:"",week:"",wechat:1,appoint:1},copyForm:{Id:"",name:""},tableData:[],tableRadio:[]}},mounted:function(){this.getTableQuery()},methods:{clickChange:function(e){this.tableRadio=e},seeWeek:function(e){var t=this,a={token:localStorage.token,planId:e.PlanId},n=s.stringify(a);Object(r["Ke"])(n).then((function(a){var n=a;0==n.Code?(t.BigTitle=e.PlanName,t.smallTitle=" ",t.previewDate=n.Rs,t.previewDate.SttPlanPreviewClassList.sort((function(e,t){return e.ClassIndex-t.ClassIndex})),t.previewShow=!0):t.$message.error(n.Memo+" 错误码:"+n.Code)}))},changeShopId:function(e,t){var a=this,n=0==e?localStorage.ShopId:localStorage.SuperShopId,o={token:localStorage.token,planId:t.PlanId,shopId:n},i=s.stringify(o);Object(r["Fe"])(i).then((function(e){var t=e;0==t.Code?a.$message({showClose:!0,message:"当前课程表模板已"+t.Memo,type:"success"}):a.$message.error(t.Memo+" 错误码:"+t.Code)}))},addLessonTable:function(){this.$router.push({path:"/editLessonTable",query:{id:0}})},delList:function(){var e=this,t=this;if(0==this.tableRadio.length)return this.$message.error("请先选中一条记录"),!1;var a=t.tableRadio,n={token:localStorage.token,planId:a.PlanId,status:9},o=s.stringify(n);this.$confirm("此操作将永久删除该课程表模板, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["Ge"])(o).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:"已取消删除"})}))},copyDialog:function(){var e=this;if(0==this.tableRadio.length)return this.$message.error("请先选中一条记录"),!1;var t=e.tableRadio;this.copyForm.name="",this.copyForm.Id=t.PlanId,this.dialogCopyVisible=!0},copy:function(){var e=this;if(!e.copyForm.name)return this.$message.error("错了哦,新模版名不能为空"),!1;if(e.copyForm.name.length>20)return this.$message.error("错了哦,新模版名字的字数超过20个字"),!1;var t={token:localStorage.token,planId:e.copyForm.Id,planName:e.copyForm.name},a=s.stringify(t);Object(r["He"])(a).then((function(t){var a=t;0==a.Code?(e.$message({showClose:!0,message:"选中的课程表已复制!",type:"success"}),e.dialogCopyVisible=!1,e.getTableQuery()):e.$message.error(a.Memo+" 错误码:"+a.Code)}))},openLessonTable:function(e){this.dialogVisible=!0,this.form.name=e.PlanName,this.form.Id=e.PlanId,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,planId:this.form.Id,incomingDate:nonTfmtDatetoLength(this.form.week,10),wxOrder:this.form.appoint},n=s.stringify(a);Object(r["Le"])(n).then((function(a){var n=a;0==n.Code?(t.$message({showClose:!0,message:e.form.name+"已发布!",type:"success"}),t.getTableQuery(),e.dialogVisible=!1):t.$message.error(n.Memo+" 错误码:"+n.Code)}))},unpubilc:function(e){var t=this,a={token:localStorage.token,detectorid:e.Id,status:4},n=s.stringify(a);Object(r["Hf"])(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)}))},goEdit:function(e){this.$router.push({path:"/editLessonTable",query:{id:e.PlanId,name:e.PlanName}})},handleSelectionChange:function(e){this.multipleSelection=e},getTableQuery:function(){var e=this;e.loading=!0;var t={token:localStorage.token},a=s.stringify(t);Object(r["Ee"])(a).then((function(t){var a=t;0==a.Code?(e.loading=!1,a.Rs?(a.Rs.map((function(e){e.isAcross=e.ShopId==localStorage.SuperShopId?1:0})),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),n=t.pageination.pageItem*e,o=[],i=a;i<n;i++)t.allTableData[i]&&o.push(t.allTableData[i]),this.tableData=o;t.start=a*t.draw},filterFmtDate:function(e,t,a){return nonTfmtDate(a,11)}},watch:{$route:function(e){"lessonTable"==e.name&&this.getTableQuery()}},components:{preview:i["a"]}},c=l,u=(a("f5a8"),a("cba8")),d=Object(u["a"])(c,n,o,!1,null,"65bb14f0",null);t["default"]=d.exports},"1f65":function(e,t,a){"use strict";var n=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(n){return n.WeekDay==t?a("em",{style:{background:n.ClassColor}},[e._v(" "+e._s(n.ClassName)+" ")]):e._e()})),e._l(e.previewDate.SttPreviewClassList,(function(n){return n.WeekDay==t?a("em",{style:{background:n.ClassColor}},[e._v(" "+e._s(n.ClassName)+" ")]):e._e()}))],2)}))],2)])])},o=[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("星期日")])])}],i=(a("b8a1"),a("379d"),a("daf0"),{data:function(){return{}},props:["previewDate","BigTitle","smallTitle"],mounted:function(){},watch:{}}),r=i,s=(a("92a6"),a("cba8")),l=Object(s["a"])(r,n,o,!1,null,"d81dff84",null);t["a"]=l.exports},"5a05":function(e,t,a){"use strict";var n=a("88d4"),o=a("34cd").filter,i=a("3a6d"),r=i("filter");n({target:"Array",proto:!0,forced:!r},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},"8a1d":function(e,t,a){var n=a("d47f"),o=Math.floor,i=function(e,t){var a=e.length,l=o(a/2);return a<8?r(e,t):s(e,i(n(e,0,l),t),i(n(e,l),t),t)},r=function(e,t){var a,n,o=e.length,i=1;while(i<o){n=i,a=e[i];while(n&&t(e[n-1],a)>0)e[n]=e[--n];n!==i++&&(e[n]=a)}return e},s=function(e,t,a,n){var o=t.length,i=a.length,r=0,s=0;while(r<o||s<i)e[r+s]=r<o&&s<i?n(t[r],a[s])<=0?t[r++]:a[s++]:r<o?t[r++]:a[s++];return e};e.exports=i},"92a6":function(e,t,a){"use strict";a("db51")},a536:function(e,t,a){"use strict";var n=a("88d4"),o=a("ce5b"),i=a("092e"),r=a("ac3c"),s=a("126a"),l=a("3ffc"),c=a("9ad2"),u=a("8a1d"),d=a("fbe3"),p=a("dd35"),f=a("b1a8"),m=a("0116"),g=a("0091"),v=[],h=o(v.sort),b=o(v.push),w=c((function(){v.sort(void 0)})),y=c((function(){v.sort(null)})),_=d("sort"),C=!c((function(){if(m)return m<70;if(!(p&&p>3)){if(f)return!0;if(g)return g<603;var e,t,a,n,o="";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(n=0;n<47;n++)v.push({k:t+n,v:a})}for(v.sort((function(e,t){return t.v-e.v})),n=0;n<v.length;n++)t=v[n].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}})),k=w||!y||!_||!C,S=function(e){return function(t,a){return void 0===a?-1:void 0===t?1:void 0!==e?+e(t,a)||0:l(t)>l(a)?1:-1}};n({target:"Array",proto:!0,forced:k},{sort:function(e){void 0!==e&&i(e);var t=r(this);if(C)return void 0===e?h(t):h(t,e);var a,n,o=[],l=s(t);for(n=0;n<l;n++)n in t&&b(o,t[n]);u(o,S(e)),a=o.length,n=0;while(n<a)t[n]=o[n++];while(n<l)delete t[n++];return t}})},b1a8:function(e,t,a){var n=a("0fd2");e.exports=/MSIE|Trident/.test(n)},c40a:function(e,t,a){"use strict";var n=a("d6be"),o=a("98fb"),i=a("d9c5");e.exports=function(e,t,a){var r=n(t);r in e?o.f(e,r,i(0,a)):e[r]=a}},c646:function(e,t,a){},d47f:function(e,t,a){var n=a("8735"),o=a("1c34"),i=a("126a"),r=a("c40a"),s=n.Array,l=Math.max;e.exports=function(e,t,a){for(var n=i(e),c=o(t,n),u=o(void 0===a?n:a,n),d=s(l(u-c,0)),p=0;c<u;c++,p++)r(d,p,e[c]);return d.length=p,d}},db51:function(e,t,a){},dd35:function(e,t,a){var n=a("0fd2"),o=n.match(/firefox\/(\d+)/i);e.exports=!!o&&+o[1]},f5a8:function(e,t,a){"use strict";a("c646")},fbe3:function(e,t,a){"use strict";var n=a("9ad2");e.exports=function(e,t){var a=[][e];return!!a&&n((function(){a.call(null,t||function(){return 1},1)}))}}}]);