!(function () { function e(e, c, t, r, n, a, o) { try { var s = e[a](o), i = s.value } catch (l) { return void t(l) } s.done ? c(i) : Promise.resolve(i).then(r, n) } function c(c) { return function () { var t = this, r = arguments return new Promise(function (n, a) { var o = c.apply(t, r) function s(c) { e(o, n, a, s, i, 'next', c) } function i(c) { e(o, n, a, s, i, 'throw', c) } s(void 0) }) } } var t = document.createElement('style') ;(t.innerHTML = '._dialogTitle_18ch9_1{padding-left:.66667rem;text-align:left;font-size:.48rem;font-weight:500;color:#333;line-height:.66667rem;padding-bottom:.32rem}._dialogTitle_18ch9_1 i{display:inline-block;width:.10667rem;height:.37333rem;background:#ff8057;border-radius:.05333rem;margin-right:.16rem}._coursePreview_18ch9_18{--van-dialog-message-font-size: .42667rem !important}._orchestraTabs_18ch9_21{font-weight:400;--van-tab-active-text-color: var(--van-primary-color);--van-tab-text-color: #333;--van-tab-font-size: .42667rem}._orchestraTabs_18ch9_21 .van-tabs__wrap{padding-bottom:.08rem}._orchestraTabs_18ch9_21 .van-tab__text--ellipsis{max-width:5.33333rem}._courseTabsContainer_18ch9_33{height:1.33333rem}._courseTabs_18ch9_33 .van-tabs__line{opacity:0}._courseTabs_18ch9_33 .van-tabs__nav{background:#f6f8f9}._courseTabs_18ch9_33 .van-tab__text{font-size:.37333rem;color:#aaa;line-height:.53333rem;background:#eaeaea;border-radius:.10667rem;padding:.08rem .24rem}._courseTabs_18ch9_33 .van-tab--active .van-tab__text{color:#fff;background:#ff8057}._cellGroup_18ch9_54{border-radius:.26667rem;overflow:hidden;margin:.08rem .34667rem .32rem}._cellGroup_18ch9_54 ._cellDatetime_18ch9_59{padding:.32rem .32rem .26667rem}._cellGroup_18ch9_54 ._cellTeacher_18ch9_62{padding:.26667rem .32rem .4rem}._cellGroup_18ch9_54 ._cellTeacher_18ch9_62 .van-button{margin:.10667rem 0}._cellGroup_18ch9_54 ._conflictGrouop_18ch9_68{padding:0 .32rem}._cellGroup_18ch9_54 ._cellDate_18ch9_59{display:flex;align-items:center;font-size:.37333rem;font-weight:500;color:#777;line-height:.53333rem}._cellGroup_18ch9_54 ._cellDate_18ch9_59 ._iconTimer_18ch9_79{font-size:.48rem;margin-right:.16rem}._cellGroup_18ch9_54 ._cellTime_18ch9_83{font-size:.37333rem;font-weight:500;color:#777;line-height:.53333rem}._cellGroup_18ch9_54 ._img_18ch9_89{width:1.12rem;height:1.12rem;overflow:hidden;border-radius:50%;margin-right:.26667rem;flex-shrink:0}._cellGroup_18ch9_54 ._cellTimeRange_18ch9_97{display:flex;align-items:center;padding:.32rem .32rem 0;font-size:.8rem;font-weight:700;color:#333;line-height:.93333rem;font-family:DINA}._cellGroup_18ch9_54 ._cellTimeRange_18ch9_97._conflictType_18ch9_107{color:#f44541}._cellGroup_18ch9_54 ._conflict_18ch9_68{font-size:.32rem;padding:.05333rem .10667rem;border-radius:.08rem;margin-right:.21333rem;margin-bottom:.4rem}._cellGroup_18ch9_54 ._teacherName_18ch9_117{font-size:.42667rem;font-weight:600;color:#333;max-width:3.2rem}._cellGroup_18ch9_54 ._btn_18ch9_123{padding:0 .74667rem;height:.85333rem;line-height:.8rem}\n'), document.head.appendChild(t), System.register( [ './index-legacy.57c73898.js', './index-legacy.b30008f0.js', './icon_teacher-legacy.07765f44.js', './create-legacy.8427d76a.js', './index-legacy.53fd76ab.js', './index-legacy.43317ab8.js', './index-legacy.5d5123be.js', './index-legacy.cc7dc1ca.js', './index-legacy.3427fdb7.js', './index-legacy.118ddf1b.js', './use-tab-status-legacy.8668a42b.js', './index-legacy.bf0d95d4.js', './index-legacy.07eb86de.js' ], function (e) { 'use strict' var t, r, n, a, o, s, i, l, u, f, h, d, _, p, m, g, b, T, v, C, y, I, G, x, A, k return { setters: [ function (e) { ;(t = e.d), (r = e.ah), (n = e.ag), (a = e.r), (o = e.R), (s = e.$), (i = e.c), (l = e.aj), (u = e.a5), (f = e.ai), (h = e.q), (d = e.B), (_ = e.F), (p = e.al), (m = e.m), (g = e.e) }, function (e) { b = e.O }, function (e) { T = e.i }, function (e) { v = e.f }, function (e) { C = e.O }, function (e) { ;(y = e.T), (I = e.a) }, function (e) { G = e.C }, function (e) { x = e.C }, function (e) { A = e.I }, function (e) { k = e.T }, function () {}, function () {}, function () {} ], execute: function () { var w = { dialogTitle: '_dialogTitle_18ch9_1', coursePreview: '_coursePreview_18ch9_18', orchestraTabs: '_orchestraTabs_18ch9_21', courseTabsContainer: '_courseTabsContainer_18ch9_33', courseTabs: '_courseTabs_18ch9_33', cellGroup: '_cellGroup_18ch9_54', cellDatetime: '_cellDatetime_18ch9_59', cellTeacher: '_cellTeacher_18ch9_62', conflictGrouop: '_conflictGrouop_18ch9_68', cellDate: '_cellDate_18ch9_59', iconTimer: '_iconTimer_18ch9_79', cellTime: '_cellTime_18ch9_83', img: '_img_18ch9_89', cellTimeRange: '_cellTimeRange_18ch9_97', conflictType: '_conflictType_18ch9_107', conflict: '_conflict_18ch9_68', teacherName: '_teacherName_18ch9_117', btn: '_btn_18ch9_123' } function N(e) { return ( 'function' == typeof e || ('[object Object]' === Object.prototype.toString.call(e) && !p(e)) ) } e( 'default', t({ name: 'course-preview', setup: function () { var e = r(), t = n(), p = a({ type: e.query.type, conflictStatus: !1, conflictMessage: '该时间段伴学老师在其他学校有课', tabValue: '', courseValue: '', selectClasses: [], selectCourse: [], choiceCourse: {}, isClick: !1, dialogStatus: !1, dialogMessage: '' }), E = o(), D = (function () { var t = c( regeneratorRuntime.mark(function c() { var t, r, n, a = arguments return regeneratorRuntime.wrap( function (c) { for (;;) switch ((c.prev = c.next)) { case 0: return ( !(a.length > 0 && void 0 !== a[0]) || a[0], (c.prev = 1), (c.next = 4), m.post('/api-school/orchestra/trainingPlanListCache', { requestType: 'form', data: { cacheId: e.query.cacheId } }) ) case 4: if (999 !== (t = c.sent).code) { c.next = 9 break } return ( (p.dialogStatus = !0), (p.dialogMessage = t.message), c.abrupt('return') ) case 9: S(t.data), v.planList.orchestra.length > 0 && ((r = v.selectOrchestraId ? { orchestraId: v.selectOrchestraId } : v.planList.orchestra[0]), (p.tabValue = r.orchestraId), (n = v.selectClassGroupId ? { classGroupId: v.selectClassGroupId } : v.planList.classes[r.orchestraId] ? v.planList.classes[r.orchestraId][0] : {}), (p.selectClasses = v.planList.classes[r.orchestraId] || []), (p.selectCourse = v.planList.course[n.classGroupId]), (p.courseValue = n.classGroupId), (v.selectOrchestraId = null), (v.selectClassGroupId = null)), (c.next = 15) break case 13: ;(c.prev = 13), (c.t0 = c.catch(1)) case 15: case 'end': return c.stop() } }, c, null, [[1, 13]] ) }) ) return function () { return t.apply(this, arguments) } })(), S = (function () { var e = c( regeneratorRuntime.mark(function e(c) { var t, r, n, a return regeneratorRuntime.wrap(function (e) { for (;;) switch ((e.prev = e.next)) { case 0: for (a in ((t = []), c.forEach(function (e) { ;-1 === t.findIndex(function (c) { return c.orchestraId === e.orchestraId }) && t.push({ orchestraId: e.orchestraId, orchestraName: e.orchestraName }) }), (r = {}), t.forEach(function (e) { c.forEach(function (c) { if (e.orchestraId === c.orchestraId) { var t = r[e.orchestraId] if (t) -1 === t.findIndex(function (e) { return e.classGroupId === c.classGroupId }) && r[e.orchestraId].push({ classGroupId: c.classGroupId, className: c.className }) else r[e.orchestraId] = [ { classGroupId: c.classGroupId, className: c.className } ] } }) }), (n = {}), r)) (r[a] || []).forEach(function (e) { var t = c.filter(function (c) { return c.classGroupId === e.classGroupId }) n[e.classGroupId] = t }) v.planList = { orchestra: t, classes: r, course: n } case 7: case 'end': return e.stop() } }, e) }) ) return function (c) { return e.apply(this, arguments) } })(), V = function (c) { ;(v.selectOrchestraId = p.tabValue || null), (v.selectClassGroupId = p.courseValue || null), t.push({ path: '/course-adjust', query: { id: c.id, cacheId: e.query.cacheId } }) }, L = (function () { var r = c( regeneratorRuntime.mark(function c() { var r return regeneratorRuntime.wrap( function (c) { for (;;) switch ((c.prev = c.next)) { case 0: return ( (c.prev = 0), (p.isClick = !0), (c.next = 4), m.post( '/api-school/orchestra/trainingPlan/' + e.query.cacheId, { hideLoading: !1 } ) ) case 4: if (999 !== (r = c.sent).code) { c.next = 9 break } return ( (p.dialogStatus = !0), (p.dialogMessage = r.message), c.abrupt('return') ) case 9: ;(p.isClick = !1), 'unbind' === e.query.type ? t.replace('/companion-teacher') : g({ api: 'back', content: {} }), (c.next = 17) break case 13: ;(c.prev = 13), (c.t0 = c.catch(0)), (p.isClick = !1), D(!1) case 17: case 'end': return c.stop() } }, c, null, [[0, 13]] ) }) ) return function () { return r.apply(this, arguments) } })() return ( s(function () { D() }), function () { var e, c return i('div', { class: w.coursePreview }, [ i( b, { position: 'top' }, { default: function () { return [ i(l, { border: !1 }, null), i( y, { lineWidth: 20, lineHeight: 4, active: p.tabValue, 'onUpdate:active': function (e) { return (p.tabValue = e) }, swipeThreshold: 3, class: w.orchestraTabs, onChange: function (e) { if ( (console.log(e, 'val', p.tabValue), !v.selectClassGroupId) ) { p.selectClasses = v.planList.classes[e] || [] var c = v.planList.classes[e] ? v.planList.classes[e][0] : {} ;(p.selectCourse = v.planList.course[c.classGroupId]), (p.courseValue = c.classGroupId) } } }, N( (e = v.planList.orchestra.map(function (e) { return i( I, { title: e.orchestraName, name: e.orchestraId }, null ) })) ) ? e : { default: function () { return [e] } } ), i('div', { class: w.courseTabsContainer }, [ p.courseValue && i( y, { swipeThreshold: 3, class: w.courseTabs, active: p.courseValue, 'onUpdate:active': function (e) { return (p.courseValue = e) }, lineHeight: 0, shrink: !0, ref: E, onChange: function (e) { p.selectCourse = v.planList.course[e] } }, N( (c = p.selectClasses.map(function (e) { return i( I, { title: e.className, name: e.classGroupId }, null ) })) ) ? c : { default: function () { return [c] } } ) ]) ] } } ), p.selectCourse.map(function (e) { return i( G, { inset: !0, class: w.cellGroup }, { default: function () { return [ i( x, { center: !0, class: w.cellDatetime }, { title: function () { return i('div', { class: w.cellDate }, [ i( u, { name: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA65JREFUWEfNmE1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dhYGC8hSih21meylHR8HDtQiQ6yLbH65J2Aq0H8WAcrQfCVCBBq1ToI4atATKXntyt7CdANkjqoMWtiFwe/3pjSZ/FaqHrkHrPNUbF8UGVC9dpRtQvfTY0NQurDzHaDQCPNH2OQa+QrzT/8tzTOvT+hY/WHVSc4rOvQGJ+h9D5Yk+CwAAAABJRU5ErkJggg==', class: w.iconTimer }, null ), f(e.classDate).format('YYYY-MM-DD') ]) }, value: function () { return i('span', { class: w.cellTime }, [ e.singleCourseTime, h('分钟') ]) } } ), i( 'div', { class: [ w.cellTimeRange, e.conflictType && e.conflictType.length > 0 && w.conflictType ] }, [ f(e.startTime).format('HH:mm'), h('-'), f(e.endTime).format('HH:mm') ] ), i( x, { center: !0, class: w.cellTeacher, border: !1 }, { icon: function () { return i( A, { src: e.teacherAvatar || T, class: w.img, fit: 'cover' }, null ) }, title: function () { return i('div', { class: w.teacherInfo }, [ i('p', { class: [w.teacherName, 'van-ellipsis'] }, [ e.teacherName ]), i( k, { color: '#FFE3DA', textColor: '#F67146', style: { fontWeight: '500', padding: '2px 6px 1px' } }, { default: function () { return [e.className] } } ) ]) }, value: function () { return i( d, { round: !0, plain: !0, type: 'primary', class: w.btn, onClick: function () { return V(e) } }, { default: function () { return [h('调整')] } } ) } } ), i( x, { center: !0, border: !1, class: [w.cellTeacher, w.conflictGrouop] }, { title: function () { return i(_, null, [ e.conflictType && e.conflictType.includes('STUDENT') && i( k, { class: w.conflict, color: '#F44541', size: 'large', onClick: function () { ;(p.conflictMessage = '学员时间冲突'), (p.conflictStatus = !0), (p.choiceCourse = e) } }, { default: function () { return [h('学员冲突')] } } ), e.conflictType && e.conflictType.includes('DIFF_SCHOOL_TEACHER') && i( k, { class: w.conflict, color: '#F44541', size: 'large', onClick: function () { ;(p.conflictMessage = '该时间段伴学老师在其他学校有课'), (p.conflictStatus = !0), (p.choiceCourse = e) } }, { default: function () { return [h('学校冲突')] } } ), e.conflictType && e.conflictType.includes('SAME_SCHOOL_TEACHER') && i( k, { class: w.conflict, color: '#ff8057', size: 'large', onClick: function () { ;(p.conflictMessage = '伴学老师在本学校时间有冲突'), (p.conflictStatus = !0), (p.choiceCourse = e) } }, { default: function () { return [h('老师冲突')] } } ), e.conflictType && e.conflictType.includes('LEAVE') && i( k, { class: w.conflict, color: '#F44541', size: 'large', onClick: function () { ;(p.conflictMessage = '伴学老师请假冲突'), (p.conflictStatus = !0), (p.choiceCourse = e) } }, { default: function () { return [h('老师请假')] } } ) ]) } } ) ] } } ) }), i( b, { position: 'bottom' }, { default: function () { return [ i('div', { class: 'btnGroup' }, [ i( d, { round: !0, block: !0, type: 'primary', onClick: L, disabled: p.isClick }, { default: function () { return [ 'change' === p.type || 'native' === p.type ? '确认调整' : '确认排课' ] } } ) ]) ] } } ), i( C, { title: '课程冲突', message: p.conflictMessage, show: p.conflictStatus, 'onUpdate:show': function (e) { return (p.conflictStatus = e) }, messageAlign: 'center', confirmButtonText: '去调整', cancelButtonText: '知道了', showCancelButton: !0, onConfirm: function () { ;(p.conflictStatus = !1), V(p.choiceCourse) } }, null ), i( C, { title: '提示', show: p.dialogStatus, 'onUpdate:show': function (e) { return (p.dialogStatus = e) }, message: p.dialogMessage, confirmButtonText: '确定', onConfirm: function () { t.back() } }, null ) ]) } ) } }) ) } } } ) })()