PeriodChange.47289f2f.js.map 16 KB

1
  1. {"version":3,"sources":["webpack:///./src/views/teacher/PeriodChange.vue?67c8","webpack:///./src/views/teacher/PeriodChange.vue?54fd","webpack:///src/views/teacher/PeriodChange.vue","webpack:///./src/views/teacher/PeriodChange.vue?c68c","webpack:///./src/views/teacher/PeriodChange.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","class","dataShow","on","onSelectDay","key","model","value","callback","$$v","radioSelect","expression","_l","item","index","attrs","$event","onCheckRadio","slot","_v","_s","signInStatus","_f","startClassTime","endClassTime","ref","refInFor","radioDisabled","id","name","teachMode","teacherName","onChangeClass","_e","staticRenderFns","component"],"mappings":"uIAAA,yBAA+jB,EAAG,G,yCCAlkB,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,MAAM,CAACG,MAAM,CAACP,EAAIQ,SAAW,YAAc,KAAK,CAACJ,EAAG,aAAa,CAACK,GAAG,CAAC,YAAcT,EAAIU,eAAgBV,EAAY,SAAEI,EAAG,kBAAkB,CAACO,IAAI,OAAOC,MAAM,CAACC,MAAOb,EAAe,YAAEc,SAAS,SAAUC,GAAMf,EAAIgB,YAAYD,GAAKE,WAAW,gBAAgBjB,EAAIkB,GAAIlB,EAAY,SAAE,SAASmB,EAAKC,GAAO,OAAOhB,EAAG,iBAAiB,CAACO,IAAIS,GAAO,CAAChB,EAAG,WAAW,CAACiB,MAAM,CAAC,KAAO,aAAa,QAAS,GAAMZ,GAAG,CAAC,MAAQ,SAASa,GAAQ,OAAOtB,EAAIuB,aAAaJ,MAAS,CAACf,EAAG,WAAW,CAACoB,KAAK,WAAW,CAACxB,EAAIyB,GAAGzB,EAAI0B,GAAGP,EAAKQ,aAAe,MAAQ,UAAUvB,EAAG,WAAW,CAACoB,KAAK,SAAS,CAACxB,EAAIyB,GAAG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QAAF,CACI,YADJ,SACA,GACA,0EACQ,KAAR,iBAEQ,KAAR,iBAEM,KAAN,uCAEI,aATJ,SASA,GACA,qBACM,KAAN,iBACM,KAAN,oBAEI,cAdJ,SAcA,GAAM,IAAN,OACM,OAAN,OAAM,CAAN,CAAQ,KAAR,EAAQ,KAAR,yBACQ,IAAR,SACA,sBACU,EAAV,qBACU,EAAV,kCAII,eAvBJ,SAuBA,GAAM,IAAN,OACM,OAAN,OAAM,CAAN,CAAQ,MAAR,EAAQ,KAAR,yBACQ,IAAR,SACA,cACU,EAAV,yBACY,IAAZ,cACY,EAAZ,gCAEU,EAAV,kBAII,eAnCJ,SAmCA,GACM,IAAN,cACA,uDACM,OAAN,GAEI,cAxCJ,WAwCM,IAAN,OACA,uBACA,oBACA,4BACA,iCACA,kDACA,mCACM,KAAN,iBACQ,QAAR,MACA,gBACQ,OAAR,OAAQ,CAAR,CACU,kBAAV,UACU,kBAAV,OACA,iBACU,IAAV,SACA,aACY,EAAZ,eACY,WAAZ,WACA,wBACgB,OAAhB,wDAAkB,IAAlB,UACA,yBACgB,KAAhB,4BAAkB,IAAlB,UAEgB,EAAhB,2BAEA,MAEY,EAAZ,kBAGA,uBCrIqW,I,wBCQjWC,EAAY,eACd,EACA1C,EACAyC,GACA,EACA,KACA,WACA,MAIa,aAAAC,E","file":"js/PeriodChange.47289f2f.js","sourcesContent":["import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--10-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PeriodChange.vue?vue&type=style&index=0&id=100976b5&lang=less&scoped=true&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--10-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PeriodChange.vue?vue&type=style&index=0&id=100976b5&lang=less&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"periodchange\"},[_c('div',{class:[_vm.dataShow ? 'container' : '']},[_c('m-calendar',{on:{\"onSelectDay\":_vm.onSelectDay}}),(_vm.dataShow)?_c('van-radio-group',{key:\"data\",model:{value:(_vm.radioSelect),callback:function ($$v) {_vm.radioSelect=$$v},expression:\"radioSelect\"}},_vm._l((_vm.dataList),function(item,index){return _c('van-cell-group',{key:index},[_c('van-cell',{attrs:{\"icon\":\"underway-o\",\"center\":true},on:{\"click\":function($event){return _vm.onCheckRadio(item)}}},[_c('template',{slot:\"default\"},[_vm._v(_vm._s(item.signInStatus ? '已签到' : '未签到'))]),_c('template',{slot:\"title\"},[_vm._v(_vm._s(_vm._f(\"formatDate\")(item.startClassTime))+\"-\"+_vm._s(_vm._f(\"formatDate\")(item.endClassTime)))])],2),_c('van-cell',{staticClass:\"input-cell\",attrs:{\"title-class\":\"title-content\",\"center\":true},on:{\"click\":function($event){return _vm.onCheckRadio(item)}}},[_c('template',{slot:\"default\"},[_c('van-radio',{ref:\"radioes\",refInFor:true,attrs:{\"disabled\":_vm.radioDisabled,\"name\":item.id}})],1),_c('template',{slot:\"title\"},[_vm._v(_vm._s(item.name))]),_c('template',{slot:\"label\"},[_vm._v(_vm._s(_vm._f(\"teachModeStatus\")(item.teachMode))+\"   主讲老师:\"+_vm._s(item.teacherName))])],2)],1)}),1):_c('m-empty',{key:\"data\"})],1),(_vm.dataShow)?_c('van-sticky',[_c('div',{staticClass:\"button-group\"},[_c('van-button',{attrs:{\"type\":\"primary\",\"size\":\"large\"},on:{\"click\":_vm.onChangeClass}},[_vm._v(\"确认交换\")])],1)]):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"periodchange\">\r\n <div :class=\"[dataShow ? 'container' : '']\">\r\n <!-- <m-header /> -->\r\n <m-calendar @onSelectDay=\"onSelectDay\" />\r\n \r\n <van-radio-group v-if=\"dataShow\" key=\"data\" v-model=\"radioSelect\">\r\n <van-cell-group v-for=\"(item, index) in dataList\" :key=\"index\">\r\n <van-cell icon=\"underway-o\" :center=\"true\" @click=\"onCheckRadio(item)\">\r\n <template slot=\"default\">{{ item.signInStatus ? '已签到' : '未签到' }}</template>\r\n <template slot=\"title\">{{item.startClassTime | formatDate}}-{{item.endClassTime | formatDate}}</template>\r\n </van-cell>\r\n <van-cell class=\"input-cell\" title-class=\"title-content\" :center=\"true\" @click=\"onCheckRadio(item)\">\r\n <template slot=\"default\">\r\n <van-radio ref=\"radioes\" :disabled=\"radioDisabled\" :name=\"item.id\"></van-radio>\r\n </template>\r\n <template slot=\"title\">{{ item.name }}</template>\r\n <template slot=\"label\">{{ item.teachMode | teachModeStatus}} &nbsp; 主讲老师:{{ item.teacherName }}</template>\r\n </van-cell>\r\n </van-cell-group>\r\n </van-radio-group>\r\n <m-empty v-else key=\"data\" />\r\n </div>\r\n <van-sticky v-if=\"dataShow\">\r\n <div class=\"button-group\">\r\n <van-button type=\"primary\" @click=\"onChangeClass\" size=\"large\">确认交换</van-button>\r\n </div>\r\n </van-sticky>\r\n \r\n </div>\r\n</template>\r\n<script>\r\n// import MHeader from '@/components/MHeader'\r\nimport MCalendar from '@/components/MCalendar'\r\nimport MEmpty from '@/components/MEmpty'\r\nimport { browser } from '@/common/common'\r\nimport { getCourseSchedulesWithDate, \r\n getCourseScheduleDateByMonth, courseSwap } from '@/api/teacher'\r\nexport default {\r\n name: 'periodchange',\r\n components: { MCalendar, MEmpty },\r\n data() {\r\n return {\r\n dataShow: true,\r\n dataList: [],\r\n radioSelect: null,\r\n radioSelectList: [], // 选中的列表\r\n radioDisabled: true, // 今天或今天之前的数据禁用\r\n }\r\n },\r\n created() {\r\n document.title = '课程交换'\r\n let toDay = this.getFormartDate(new Date())\r\n this.getCourseDate(toDay)\r\n },\r\n mounted() {\r\n let params = this.$route.query\r\n if(params.Authorization) {\r\n localStorage.setItem('Authorization', decodeURI(params.Authorization))\r\n localStorage.setItem('userInfo', decodeURI(params.Authorization))\r\n }\r\n // this.getCourseMonth(toDay)\r\n },\r\n methods: {\r\n onSelectDay(value) {\r\n if(new Date(this.getFormartDate(new Date())) >= new Date(this.getFormartDate(value))) {\r\n this.radioDisabled = true\r\n } else {\r\n this.radioDisabled = false\r\n }\r\n this.getCourseDate(this.getFormartDate(value))\r\n },\r\n onCheckRadio(item) { // 单选按钮选中\r\n if(this.radioDisabled) return\r\n this.radioSelect = item.id\r\n this.radioSelectList = item\r\n },\r\n getCourseDate(date) {\r\n getCourseSchedulesWithDate({ date: date, type: 'VIP' }).then(res => {\r\n let result = res.data\r\n if(result.code == 200 && result.data) {\r\n this.dataList = result.data.rows\r\n this.dataShow = result.data.rows.length > 0 ? true : false\r\n }\r\n })\r\n },\r\n getCourseMonth(month) {\r\n getCourseScheduleDateByMonth({ month: month, type: 'VIP' }).then(res => {\r\n let result = res.data\r\n if(result.code == 200) {\r\n result.data.forEach(item => {\r\n let tempDate = new Date(item)\r\n this.getMonthDay.push(tempDate.getDate())\r\n })\r\n this.isCalendar = true\r\n }\r\n })\r\n },\r\n getFormartDate(date) {\r\n let checkDate = new Date(date)\r\n let checkDay = checkDate.getFullYear() + '-' + (checkDate.getMonth() + 1) + '-' + checkDate.getDate()\r\n return checkDay\r\n },\r\n onChangeClass() {\r\n let item = this.radioSelectList,\r\n params = this.$route.query,\r\n classTime = item.classDate.split(' ')[0],\r\n startTime = item.startClassTime.split(' ')[1]\r\n let firstClass = params.classDate + ' ' + params.name + ' ' + params.startTime + '<br/>与'\r\n let lastClass = classTime + ' ' + item.name + ' ' + startTime + '<br/>上课时间互换'\r\n this.$dialog.confirm({\r\n message: firstClass + lastClass\r\n }).then(() => {\r\n courseSwap({\r\n courseScheduleId1: params.checkId,\r\n courseScheduleId2: item.id\r\n }).then(res => {\r\n let result = res.data\r\n if(result.code == 200) {\r\n this.$toast('交换成功')\r\n setTimeout(() => {\r\n if(browser().iPhone) {\r\n window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api: 'back'}))\r\n } else if(browser().android) {\r\n DAYA.postMessage(JSON.stringify({api: 'back'}))\r\n } else {\r\n this.$router.push('/business')\r\n }\r\n }, 500)\r\n } else {\r\n this.$toast(result.msg)\r\n }\r\n })\r\n }).catch(() => {\r\n // on cancel\r\n });\r\n },\r\n }\r\n}\r\n</script>\r\n<style lang='less' scoped>\r\n@import url(\"../../assets/commonLess/variable.less\");\r\n.periodchange {\r\n // height: 100vh;\r\n // position: relative;\r\n // .container {\r\n // // height: 100%;\r\n // height: calc(100vh - 50px);\r\n // overflow-y: auto;\r\n // overflow-x: hidden;\r\n // }\r\n\r\n // .button-group {\r\n // width: 100%;\r\n // // position: absolute;\r\n // // bottom: 0;\r\n // // left: 0;\r\n // // z-index: 99;\r\n // .van-button--primary {\r\n // background: @mColor;\r\n // border: @mColor;\r\n // }\r\n // }\r\n\r\n // min-height: 100vh;\r\n height: 100vh;\r\n position: relative;\r\n background-color: #F3F4F8;\r\n .container {\r\n min-height: calc(100vh - 50px);\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n position: relative;\r\n }\r\n .button-group {\r\n width: 100%;\r\n // position: absolute;\r\n // bottom: 0;\r\n // left: 0;\r\n // z-index: 99;\r\n .van-button {\r\n font-size: .16rem;\r\n width: 100%;\r\n }\r\n .van-button--primary {\r\n background: @mColor;\r\n border-color: @mColor;\r\n }\r\n }\r\n}\r\n/deep/.van-cell__title {\r\n font-size: .16rem;\r\n color: @mFontColor;\r\n}\r\n/deep/.van-cell-group {\r\n margin-top: .05rem;\r\n // &:first-child {\r\n // margin-top: .12rem;\r\n // }\r\n}\r\n.title-content {\r\n font-weight: bold;\r\n .van-cell__label {\r\n font-weight: 400;\r\n margin-top: .06rem;\r\n display: flex;\r\n align-items: center;\r\n }\r\n .van-icon-location {\r\n margin-right: .05rem;\r\n }\r\n}\r\n/deep/.van-cell__value, /deep/.van-cell__label {\r\n color: @tFontColor;\r\n span {\r\n padding-right: .1rem;\r\n }\r\n}\r\n\r\n.input-cell {\r\n padding: .12rem .16rem .2rem;\r\n .van-radio {\r\n justify-content: flex-end;\r\n }\r\n}\r\n/deep/.van-radio__icon .van-icon {\r\n border-color: @sFontColor;\r\n}\r\n/deep/.van-radio__icon--checked .van-icon {\r\n background: @orangeColor;\r\n border-color: @orangeColor;\r\n}\r\n/deep/.icon {\r\n margin-top: .2rem;\r\n}\r\n</style>","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PeriodChange.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PeriodChange.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PeriodChange.vue?vue&type=template&id=100976b5&scoped=true&\"\nimport script from \"./PeriodChange.vue?vue&type=script&lang=js&\"\nexport * from \"./PeriodChange.vue?vue&type=script&lang=js&\"\nimport style0 from \"./PeriodChange.vue?vue&type=style&index=0&id=100976b5&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"100976b5\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}