| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615 |
- !(function () {
- function e(e, t) {
- var n = Object.keys(e)
- if (Object.getOwnPropertySymbols) {
- var a = Object.getOwnPropertySymbols(e)
- t &&
- (a = a.filter(function (t) {
- return Object.getOwnPropertyDescriptor(e, t).enumerable
- })),
- n.push.apply(n, a)
- }
- return n
- }
- function t(t) {
- for (var a = 1; a < arguments.length; a++) {
- var r = null != arguments[a] ? arguments[a] : {}
- a % 2
- ? e(Object(r), !0).forEach(function (e) {
- n(t, e, r[e])
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r))
- : e(Object(r)).forEach(function (e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e))
- })
- }
- return t
- }
- function n(e, t, n) {
- return (
- t in e
- ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 })
- : (e[t] = n),
- e
- )
- }
- function a(e, t, n, a, r, i, c) {
- try {
- var s = e[i](c),
- o = s.value
- } catch (l) {
- return void n(l)
- }
- s.done ? t(o) : Promise.resolve(o).then(a, r)
- }
- function r(e) {
- return function () {
- var t = this,
- n = arguments
- return new Promise(function (r, i) {
- var c = e.apply(t, n)
- function s(e) {
- a(c, r, i, s, o, 'next', e)
- }
- function o(e) {
- a(c, r, i, s, o, 'throw', e)
- }
- s(void 0)
- })
- }
- }
- var i = document.createElement('style')
- ;(i.innerHTML =
- '._searchBand_1dppi_1{display:inline-block;font-size:.37333rem;font-weight:600;color:#333}._searchBand_1dppi_1 ._bandName_1dppi_7{display:inline-block;max-width:4.8rem;vertical-align:text-top}._gridContainer_1dppi_12{margin:0 .34667rem .32rem}._gridContainer_1dppi_12 ._title_1dppi_15{font-size:.69333rem;font-weight:700;color:#333;font-family:DINA}._gridContainer_1dppi_12 ._title_1dppi_15 i{font-style:normal;font-size:.32rem;color:#333}._gridContainer_1dppi_12 ._red_1dppi_26{color:#f67146}._gridContainer_1dppi_12 ._name_1dppi_29{padding-top:.21333rem;font-size:.32rem;color:#777}._gridClass_1dppi_34 ._img_1dppi_34{width:1.06667rem;height:1.06667rem;margin-right:.21333rem;border-radius:50%;overflow:hidden}._gridClass_1dppi_34 ._teacherName_1dppi_41{display:flex;align-items:center}._gridClass_1dppi_34 ._teacherName_1dppi_41 ._name_1dppi_29{padding:0;max-width:3.2rem;font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._gridClass_1dppi_34 ._teacherName_1dppi_41 .van-tag{margin-left:.21333rem;height:.45333rem;border-radius:.10667rem}._gridClass_1dppi_34 ._classCheckbox_1dppi_58{display:flex;justify-content:flex-end}._gridClass_1dppi_34 ._orchestraName_1dppi_62{padding-top:.08rem;font-size:.32rem;color:#777;line-height:.45333rem;max-width:5.86667rem}._gridClass_1dppi_34 ._title_1dppi_15{font-size:.64rem}._gridClass_1dppi_34 ._className_1dppi_72{padding:.45333rem .4rem 0;font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._gridClass_1dppi_34 ._className_1dppi_72 ._line_1dppi_79{display:inline-block;width:.10667rem;height:.32rem;background:#ff8057;border-radius:.08rem;margin-right:.16rem}._gridClass_1dppi_34 .van-grid-item:after{content:" ";position:absolute;top:50%;right:0;margin-top:-.26667rem;width:.02667rem;height:.53333rem;background:#eaeaea;border-radius:.02667rem}._gridClass_1dppi_34 .van-grid-item:last-child:after{display:none}._classCellGroup_1dppi_101{margin-bottom:.32rem;border-radius:.26667rem;overflow:hidden}._cellTeacher_bjfo6_1 ._img_bjfo6_1{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.32rem;flex-shrink:0}._cellTeacher_bjfo6_1 ._name_bjfo6_9{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:3.2rem}._cellTeacher_bjfo6_1 ._class_bjfo6_16{font-size:.32rem;color:#777;line-height:.45333rem}._cellTeacher_bjfo6_1 .van-tag{margin-top:.08rem;margin-right:.21333rem}._cellTeacher_bjfo6_1 ._checkboxValue_bjfo6_25{display:flex;justify-content:flex-end}._subjectContainer_bjfo6_29{display:flex}._subjectContainer_bjfo6_29>span{flex-shrink:0}._subjectContainer_bjfo6_29 ._tagSubject_bjfo6_35{margin-right:.26667rem;margin-top:.05333rem;margin-bottom:.05333rem;padding:.02667rem .21333rem}._cellTeacher_fnv0v_1 ._img_fnv0v_1{width:1.06667rem;height:1.06667rem;overflow:hidden;border-radius:50%;margin-right:.32rem;flex-shrink:0}._cellTeacher_fnv0v_1 ._name_fnv0v_9{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:3.2rem}._cellTeacher_fnv0v_1 ._class_fnv0v_16{font-size:.32rem;color:#777;line-height:.45333rem}._cellTeacher_fnv0v_1 .van-tag{margin-top:.08rem;margin-right:.21333rem}._cellTeacher_fnv0v_1 ._checkboxValue_fnv0v_25{display:flex;justify-content:flex-end}._subjectContainer_fnv0v_29{display:flex}._subjectContainer_fnv0v_29>span{flex-shrink:0}._subjectContainer_fnv0v_29 ._tagSubject_fnv0v_35{margin-right:.26667rem;margin-top:.05333rem;margin-bottom:.05333rem;padding:.02667rem .21333rem}\n'),
- document.head.appendChild(i),
- System.register(
- [
- './index-legacy.55bee427.js',
- './index-legacy.ec5d708a.js',
- './index-legacy.57c73898.js',
- './index.module-legacy.475a9872.js',
- './index-legacy.b30008f0.js',
- './icon_teacher-legacy.07765f44.js',
- './index-legacy.07eb86de.js',
- './index-legacy.ec34f3ff.js',
- './index-legacy.2f9d1390.js',
- './index-legacy.5d5123be.js',
- './index-legacy.cc7dc1ca.js',
- './index-legacy.3427fdb7.js',
- './index-legacy.118ddf1b.js',
- './index-legacy.8c2c62bc.js',
- './index-legacy.f56477a8.js',
- './index-legacy.79ba2023.js',
- './index-legacy.cf09ad36.js',
- './index-legacy.43317ab8.js',
- './icon_student-legacy.6118fd72.js',
- './index-legacy.53fd76ab.js',
- './index-legacy.cb8d2253.js',
- './index-legacy.13830cc7.js',
- './Picker-legacy.a502fc12.js',
- './index-legacy.27440dba.js',
- './index-legacy.698b918a.js',
- './index-legacy.579adf27.js',
- './index-legacy.c75fe8a2.js',
- './use-tab-status-legacy.8668a42b.js',
- './Checker-legacy.82853f5e.js',
- './index-legacy.bf0d95d4.js',
- './index-legacy.80babe20.js',
- './index-legacy.ea8a18a6.js',
- './index-legacy.0e661d48.js',
- './ImagePreview-legacy.f25f2846.js',
- './function-call-legacy.e2a89d7e.js',
- './utils-legacy.37743e8a.js'
- ],
- function (e) {
- 'use strict'
- var n,
- a,
- i,
- c,
- s,
- o,
- l,
- u,
- d,
- f,
- p,
- h,
- m,
- g,
- v,
- _,
- b,
- y,
- S,
- x,
- k,
- j,
- C,
- w,
- T,
- I,
- L,
- N,
- H,
- E,
- O,
- D,
- R,
- V,
- A,
- M,
- P,
- U,
- B,
- z,
- G,
- F,
- Y,
- q,
- W,
- Z,
- $,
- J,
- K
- return {
- setters: [
- function (e) {
- n = e.O
- },
- function (e) {
- a = e.e
- },
- function (e) {
- ;(i = e.D),
- (c = e.d),
- (s = e.r),
- (o = e.Z),
- (l = e.$),
- (u = e.c),
- (d = e.q),
- (f = e.ak),
- (p = e.P),
- (h = e.al),
- (m = e.m),
- (g = e.g),
- (v = e.an),
- (_ = e.aj),
- (b = e.B),
- (y = e.ag),
- (S = e.ah),
- (x = e.ai),
- (k = e.y),
- (j = e.a5),
- (C = e.a_),
- (w = e.o)
- },
- function (e) {
- T = e.s
- },
- function (e) {
- I = e.O
- },
- function (e) {
- L = e.i
- },
- function (e) {
- N = e.S
- },
- function (e) {
- H = e.L
- },
- function (e) {
- E = e.C
- },
- function (e) {
- O = e.C
- },
- function (e) {
- D = e.C
- },
- function (e) {
- R = e.I
- },
- function (e) {
- V = e.T
- },
- function (e) {
- A = e.C
- },
- function (e) {
- ;(M = e.G), (P = e.a)
- },
- function (e) {
- U = e.P
- },
- function (e) {
- B = e.O
- },
- function (e) {
- ;(z = e.T), (G = e.a)
- },
- function (e) {
- F = e.i
- },
- function (e) {
- Y = e.O
- },
- function (e) {
- q = e.O
- },
- function (e) {
- W = e.O
- },
- function (e) {
- Z = e.a
- },
- function (e) {
- $ = e.T
- },
- function (e) {
- J = e.F
- },
- function (e) {
- K = e.D
- },
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {}
- ],
- execute: function () {
- var Q = i(Z),
- X = {
- searchBand: '_searchBand_1dppi_1',
- bandName: '_bandName_1dppi_7',
- gridContainer: '_gridContainer_1dppi_12',
- title: '_title_1dppi_15',
- red: '_red_1dppi_26',
- name: '_name_1dppi_29',
- gridClass: '_gridClass_1dppi_34',
- img: '_img_1dppi_34',
- teacherName: '_teacherName_1dppi_41',
- classCheckbox: '_classCheckbox_1dppi_58',
- orchestraName: '_orchestraName_1dppi_62',
- className: '_className_1dppi_72',
- line: '_line_1dppi_79',
- classCellGroup: '_classCellGroup_1dppi_101'
- }
- var ee = c({
- name: 'practice-class',
- props: {
- height: { type: [String, Number], default: 'auto' },
- bottomHeight: { type: [String, Number], default: 0 },
- headerHeight: { type: [String, Number], default: 0 },
- selectItem: {
- type: Array,
- default: function () {
- return []
- }
- }
- },
- emits: ['close', 'confirm', 'update:selectItem'],
- setup: function (e, n) {
- var a = n.emit,
- i = s({
- showPopover: !1,
- orchestraId: null,
- orchestraName: null,
- orchestraList: [],
- isClick: !1,
- list: [],
- listState: { dataShow: !0, loading: !1, finished: !1 },
- params: { type: null, page: 1, rows: 20 },
- check: [],
- checkboxRefs: []
- }),
- c = (function () {
- var e = r(
- regeneratorRuntime.mark(function e() {
- var t, n, a, r
- return regeneratorRuntime.wrap(
- function (e) {
- for (;;)
- switch ((e.prev = e.next)) {
- case 0:
- return (
- (e.prev = 0),
- (e.next = 3),
- m.post('/api-school/orchestra/page', {
- data: {
- page: 1,
- rows: 100,
- schoolId: g.user.data.school.id,
- status: 'DONE'
- }
- })
- )
- case 3:
- ;(t = e.sent),
- (n = t.data),
- (a = n.rows || []),
- (r = []),
- a.forEach(function (e) {
- r.push({ text: e.name, value: e.id })
- }),
- (i.orchestraList = [].concat(r)),
- r.length > 0 &&
- ((i.orchestraId = r[0].value),
- (i.orchestraName = r[0].text)),
- (e.next = 14)
- break
- case 12:
- ;(e.prev = 12), (e.t0 = e.catch(0))
- case 14:
- case 'end':
- return e.stop()
- }
- },
- e,
- null,
- [[0, 12]]
- )
- })
- )
- return function () {
- return e.apply(this, arguments)
- }
- })(),
- v = (function () {
- var e = r(
- regeneratorRuntime.mark(function e() {
- var n, a, r
- return regeneratorRuntime.wrap(
- function (e) {
- for (;;)
- switch ((e.prev = e.next)) {
- case 0:
- if (((e.prev = 0), !i.isClick)) {
- e.next = 3
- break
- }
- return e.abrupt('return')
- case 3:
- return (
- (i.isClick = !0),
- (e.next = 6),
- m.post('/api-school/classGroup/page', {
- data: t(
- t({}, i.params),
- {},
- {
- schoolId: g.user.data.school.id,
- orchestraId: i.orchestraId
- }
- )
- })
- )
- case 6:
- if (
- ((n = e.sent),
- (a = n.data),
- (i.isClick = !1),
- (i.listState.loading = !1),
- (r = a || {}),
- !(i.list.length > 0 && 1 === r.current))
- ) {
- e.next = 13
- break
- }
- return e.abrupt('return')
- case 13:
- ;(i.list = i.list.concat(r.rows || [])),
- (i.listState.finished = r.current >= r.pages),
- (i.params.page = r.current + 1),
- (i.listState.dataShow = i.list.length > 0),
- (e.next = 24)
- break
- case 19:
- ;(e.prev = 19),
- (e.t0 = e.catch(0)),
- (i.listState.dataShow = !1),
- (i.listState.finished = !0),
- (i.isClick = !1)
- case 24:
- case 'end':
- return e.stop()
- }
- },
- e,
- null,
- [[0, 19]]
- )
- })
- )
- return function () {
- return e.apply(this, arguments)
- }
- })(),
- _ = function (e) {
- i.checkboxRefs[e].toggle()
- var t = []
- i.list.forEach(function (e) {
- i.check.includes(e.id) && t.push({ id: e.id, value: e.name, avatar: '' })
- }),
- a('update:selectItem', t)
- }
- o(
- function () {
- return e.selectItem
- },
- function () {
- b()
- },
- { deep: !0 }
- )
- var b = function () {
- var t = e.selectItem || [],
- n = []
- t.forEach(function (e) {
- n.push(e.id)
- }),
- (i.check = n)
- }
- return (
- l(
- r(
- regeneratorRuntime.mark(function e() {
- return regeneratorRuntime.wrap(function (e) {
- for (;;)
- switch ((e.prev = e.next)) {
- case 0:
- return (e.next = 2), c()
- case 2:
- return (e.next = 4), v()
- case 4:
- b()
- case 5:
- case 'end':
- return e.stop()
- }
- }, e)
- })
- )
- ),
- function () {
- var t
- return u(
- 'div',
- {
- class: [X.practiceClass, !i.listState.dataShow && 'emptyRootContainer'],
- style: {
- 'min-height': 'calc(100vh - '
- .concat(e.height, 'px - ')
- .concat(e.bottomHeight, 'px)')
- }
- },
- [
- i.orchestraList.length > 0 &&
- u(
- N,
- {
- position: 'top',
- offsetTop: e.headerHeight,
- style: { width: '100%' }
- },
- {
- default: function () {
- return [
- u('div', { class: 'searchGroup-single' }, [
- u(
- 'div',
- {
- class: [
- 'searchItem',
- i.showPopover ? 'searchItem-active' : ''
- ],
- onClick: function () {
- return (i.showPopover = !0)
- }
- },
- [u('span', null, [i.orchestraName])]
- )
- ])
- ]
- }
- }
- ),
- i.listState.dataShow
- ? u(
- H,
- {
- finished: i.listState.finished,
- finishedText: ' ',
- class: [X.liveList],
- onLoad: v,
- immediateCheck: !1
- },
- {
- default: function () {
- return [
- u(
- E,
- {
- class: [X.gridContainer, X.gridClass],
- modelValue: i.check,
- 'onUpdate:modelValue': function (e) {
- return (i.check = e)
- }
- },
- ((e = t =
- i.list.map(function (e) {
- return u(
- O,
- {
- class: X.classCellGroup,
- onClick: function () {
- return _(e.id)
- },
- border: !1
- },
- {
- default: function () {
- return [
- u(
- D,
- {
- center: !0,
- titleStyle: { flex: '0 auto' },
- valueClass: X.classCheckbox
- },
- {
- icon: function () {
- return u(
- R,
- { src: L, class: X.img },
- null
- )
- },
- title: function () {
- return u('div', { class: X.content }, [
- u('div', { class: X.teacherName }, [
- u(
- 'span',
- { class: ['van-ellipsis', X.name] },
- [e.teacherName]
- ),
- u(
- V,
- { type: 'primary' },
- {
- default: function () {
- return [e.name]
- }
- }
- )
- ]),
- u(
- 'div',
- {
- class: [
- X.orchestraName,
- 'van-ellipsis'
- ]
- },
- [e.orchestraName]
- )
- ])
- },
- value: function () {
- return u(
- A,
- {
- name: e.id,
- ref: function (t) {
- return (i.checkboxRefs[e.id] = t)
- },
- onClick: function (t) {
- t.preventDefault(),
- t.stopPropagation(),
- _(e.id)
- }
- },
- null
- )
- }
- }
- ),
- u(
- M,
- { border: !1, columnNum: 3 },
- {
- default: function () {
- return [
- u(P, null, {
- default: function () {
- return [
- u('p', { class: X.title }, [
- e.preStudentNum
- ]),
- u('p', { class: X.name }, [
- d('学员人数')
- ])
- ]
- }
- }),
- u(P, null, {
- default: function () {
- return [
- u('p', { class: [X.title] }, [
- e.courseScheduleNum -
- e.completeCourseScheduleNum
- ]),
- u('p', { class: X.name }, [
- d('剩余课时')
- ])
- ]
- }
- }),
- u(P, null, {
- default: function () {
- return [
- u('p', { class: X.title }, [
- e.courseScheduleNum
- ]),
- u('p', { class: X.name }, [
- d('总课时')
- ])
- ]
- }
- })
- ]
- }
- }
- )
- ]
- }
- }
- )
- })),
- 'function' == typeof e ||
- ('[object Object]' === Object.prototype.toString.call(e) &&
- !h(e))
- ? t
- : {
- default: function () {
- return [t]
- }
- })
- )
- ]
- var e
- }
- }
- )
- : u(f, { btnStatus: !1, tips: '暂无班级' }, null),
- u(
- p,
- {
- show: i.showPopover,
- 'onUpdate:show': function (e) {
- return (i.showPopover = e)
- },
- position: 'bottom',
- round: !0,
- class: 'popupBottomSearch',
- teleport: '#select-send-message'
- },
- {
- default: function () {
- return [
- u(
- U,
- {
- columns: i.orchestraList,
- onCancel: function () {
- return (i.showPopover = !1)
- },
- onConfirm: function (e) {
- ;(i.orchestraId = e.selectedOptions[0].value),
- (i.orchestraName = e.selectedOptions[0].text),
- (i.showPopover = !1),
- (i.params.page = 1),
- (i.list = []),
- (i.listState.dataShow = !0),
- (i.listState.loading = !1),
- (i.listState.finished = !1),
- v()
- }
- },
- null
- )
- ]
- }
- }
- )
- ]
- )
- }
- )
- }
- }),
- te = {
- cellTeacher: '_cellTeacher_bjfo6_1',
- img: '_img_bjfo6_1',
- name: '_name_bjfo6_9',
- class: '_class_bjfo6_16',
- checkboxValue: '_checkboxValue_bjfo6_25',
- subjectContainer: '_subjectContainer_bjfo6_29',
- tagSubject: '_tagSubject_bjfo6_35'
- }
- var ne = c({
- name: 'manage-list',
- props: {
- height: { type: [String, Number], default: 'auto' },
- bottomHeight: { type: [String, Number], default: 0 },
- headerHeight: { type: [String, Number], default: 0 },
- removeTeacherId: { type: String, default: '' },
- subjectIdList: {
- type: Array,
- default: function () {
- return []
- }
- },
- selectItem: {
- type: Array,
- default: function () {
- return []
- }
- }
- },
- emits: ['close', 'select', 'update:selectItem'],
- setup: function (e, n) {
- n.slots, n.attrs
- var a = n.emit,
- i = s({
- teacherStatus: !1,
- isLoad: !1,
- list: [],
- listState: { dataShow: !0, loading: !1, finished: !1 },
- params: { keyword: null, subjectIdList: e.subjectIdList, page: 1, rows: 20 },
- check: e.selectItem || [],
- checkboxRefs: []
- }),
- c = (function () {
- var e = r(
- regeneratorRuntime.mark(function e() {
- var n, a, r
- return regeneratorRuntime.wrap(
- function (e) {
- for (;;)
- switch ((e.prev = e.next)) {
- case 0:
- if (((e.prev = 0), !i.isLoad)) {
- e.next = 3
- break
- }
- return e.abrupt('return')
- case 3:
- return (
- (i.isLoad = !0),
- (e.next = 6),
- m.post('/api-school/schoolStaff/page', {
- data: t(
- t({}, i.params),
- {},
- { schoolId: g.user.data.school.id, status: 'ACTIVATION' }
- )
- })
- )
- case 6:
- if (
- ((n = e.sent),
- (i.listState.loading = !1),
- (a = n.data || {}),
- !(i.list.length > 0 && 1 === a.current))
- ) {
- e.next = 11
- break
- }
- return e.abrupt('return')
- case 11:
- ;(r = a.rows || []).forEach(function (e) {
- e.subjectNames = e.subjectName ? e.subjectName.split(',') : []
- }),
- (i.list = i.list.concat(r)),
- (i.listState.finished = a.current >= a.pages),
- (i.params.page = a.current + 1),
- (i.listState.dataShow = i.list.length > 0),
- (i.isLoad = !1),
- (e.next = 25)
- break
- case 20:
- ;(e.prev = 20),
- (e.t0 = e.catch(0)),
- (i.listState.dataShow = !1),
- (i.listState.finished = !0),
- (i.isLoad = !1)
- case 25:
- case 'end':
- return e.stop()
- }
- },
- e,
- null,
- [[0, 20]]
- )
- })
- )
- return function () {
- return e.apply(this, arguments)
- }
- })(),
- d = function (e) {
- i.checkboxRefs[e].toggle()
- var t = []
- i.list.forEach(function (e) {
- i.check.includes(e.id) &&
- t.push({ id: e.id, value: e.nickname, avatar: e.avatar })
- }),
- a('update:selectItem', t)
- }
- o(
- function () {
- return e.selectItem
- },
- function () {
- p()
- },
- { deep: !0 }
- )
- var p = function () {
- var t = e.selectItem || [],
- n = []
- t.forEach(function (e) {
- n.push(e.id)
- }),
- (i.check = n)
- }
- return (
- l(function () {
- c(), p(), console.log(e.height, e.bottomHeight, '11121212')
- }),
- function () {
- var t
- return u(
- 'div',
- {
- class: [!i.listState.dataShow && 'emptyRootContainer'],
- style: {
- 'min-height': 'calc(100vh - '
- .concat('auto' === e.height ? 0 : e.height, 'px - ')
- .concat(e.bottomHeight, 'px)')
- }
- },
- [
- u(
- N,
- {
- position: 'top',
- offsetTop: e.headerHeight,
- style: { width: '100%' }
- },
- {
- default: function () {
- return [
- u(
- B,
- {
- placeholder: '管理老师姓名/手机号',
- onSearch: function (e) {
- ;(i.params.keyword = e),
- (i.params.page = 1),
- (i.list = []),
- (i.listState.dataShow = !0),
- (i.listState.loading = !1),
- (i.listState.finished = !1),
- c()
- }
- },
- null
- )
- ]
- }
- }
- ),
- i.listState.dataShow
- ? u(
- H,
- {
- finished: i.listState.finished,
- finishedText: ' ',
- onLoad: c,
- style: { paddingTop: '12px' },
- immediateCheck: !1
- },
- {
- default: function () {
- return [
- u(
- E,
- {
- class: [te.gridContainer, te.gridClass],
- modelValue: i.check,
- 'onUpdate:modelValue': function (e) {
- return (i.check = e)
- }
- },
- ((e = t =
- i.list.map(function (e) {
- return u(
- O,
- {
- inset: !0,
- style: { marginBottom: '12px' },
- onClick: function () {
- return d(e.id)
- }
- },
- {
- default: function () {
- return [
- u(
- D,
- {
- center: !0,
- class: te.cellTeacher,
- valueClass: te.checkboxValue
- },
- {
- icon: function () {
- return u(
- R,
- {
- class: te.img,
- src: e.avatar || L,
- fit: 'cover'
- },
- null
- )
- },
- title: function () {
- return u('div', { class: te.content }, [
- u(
- 'p',
- { class: [te.name, 'van-ellipsis'] },
- [e.nickname]
- )
- ])
- },
- value: function () {
- return u(
- A,
- {
- name: e.id,
- ref: function (t) {
- return (i.checkboxRefs[e.id] = t)
- },
- onClick: function (t) {
- t.preventDefault(),
- t.stopPropagation(),
- d(e.id)
- }
- },
- null
- )
- }
- }
- )
- ]
- }
- }
- )
- })),
- 'function' == typeof e ||
- ('[object Object]' === Object.prototype.toString.call(e) &&
- !h(e))
- ? t
- : {
- default: function () {
- return [t]
- }
- })
- )
- ]
- var e
- }
- }
- )
- : u(f, { btnStatus: !1, tips: '暂无管理老师' }, null)
- ]
- )
- }
- )
- }
- }),
- ae = {
- cellTeacher: '_cellTeacher_bjfo6_1',
- img: '_img_bjfo6_1',
- name: '_name_bjfo6_9',
- class: '_class_bjfo6_16',
- checkboxValue: '_checkboxValue_bjfo6_25',
- subjectContainer: '_subjectContainer_bjfo6_29',
- tagSubject: '_tagSubject_bjfo6_35'
- }
- function re(e) {
- return (
- 'function' == typeof e ||
- ('[object Object]' === Object.prototype.toString.call(e) && !h(e))
- )
- }
- var ie = c({
- name: 'teacher-list',
- props: {
- height: { type: [String, Number], default: 'auto' },
- bottomHeight: { type: [String, Number], default: 0 },
- headerHeight: { type: [String, Number], default: 0 },
- selectItem: {
- type: Array,
- default: function () {
- return []
- }
- }
- },
- emits: ['close', 'select', 'update:selectItem'],
- setup: function (e, n) {
- var a = n.emit,
- i = s({
- teacherStatus: !1,
- isLoad: !1,
- list: [],
- listState: { dataShow: !0, loading: !1, finished: !1 },
- params: { keyword: null, page: 1, rows: 20 },
- check: e.selectItem || [],
- checkboxRefs: []
- }),
- c = (function () {
- var e = r(
- regeneratorRuntime.mark(function e() {
- var n, a, r
- return regeneratorRuntime.wrap(
- function (e) {
- for (;;)
- switch ((e.prev = e.next)) {
- case 0:
- if (((e.prev = 0), !i.isLoad)) {
- e.next = 3
- break
- }
- return e.abrupt('return')
- case 3:
- return (
- (i.isLoad = !0),
- (e.next = 6),
- m.post('/api-school/student/page', {
- data: t(
- t({}, i.params),
- {},
- { schoolId: g.user.data.school.id }
- )
- })
- )
- case 6:
- if (
- ((n = e.sent),
- (i.listState.loading = !1),
- (a = n.data || {}),
- !(i.list.length > 0 && 1 === a.current))
- ) {
- e.next = 11
- break
- }
- return e.abrupt('return')
- case 11:
- ;(r = a.rows || []).forEach(function (e) {
- e.subjectNames = e.subjectNames
- ? e.subjectNames.split(',')
- : []
- }),
- (i.list = i.list.concat(r)),
- (i.listState.finished = a.current >= a.pages),
- (i.params.page = a.current + 1),
- (i.listState.dataShow = i.list.length > 0),
- (i.isLoad = !1),
- (e.next = 25)
- break
- case 20:
- ;(e.prev = 20),
- (e.t0 = e.catch(0)),
- (i.listState.dataShow = !1),
- (i.listState.finished = !0),
- (i.isLoad = !1)
- case 25:
- case 'end':
- return e.stop()
- }
- },
- e,
- null,
- [[0, 20]]
- )
- })
- )
- return function () {
- return e.apply(this, arguments)
- }
- })(),
- d = function (e) {
- i.checkboxRefs[e].toggle()
- var t = []
- i.list.forEach(function (e) {
- i.check.includes(e.id) &&
- t.push({ id: e.id, value: e.nickname, avatar: e.avatar })
- }),
- a('update:selectItem', t)
- }
- o(
- function () {
- return e.selectItem
- },
- function () {
- p()
- },
- { deep: !0 }
- )
- var p = function () {
- var t = e.selectItem || [],
- n = []
- t.forEach(function (e) {
- n.push(e.id)
- }),
- (i.check = n)
- }
- return (
- l(function () {
- c(), p()
- }),
- function () {
- var t
- return u(
- 'div',
- {
- class: [!i.listState.dataShow && 'emptyRootContainer'],
- style: {
- 'min-height': 'calc(100vh - '
- .concat(e.height, 'px - ')
- .concat(e.bottomHeight, 'px)')
- }
- },
- [
- u(
- N,
- {
- position: 'top',
- offsetTop: e.headerHeight,
- style: { width: '100%' }
- },
- {
- default: function () {
- return [
- u(
- B,
- {
- placeholder: '学员名称/手机号',
- onSearch: function (e) {
- ;(i.params.keyword = e),
- (i.params.page = 1),
- (i.list = []),
- (i.listState.dataShow = !0),
- (i.listState.loading = !1),
- (i.listState.finished = !1),
- c()
- }
- },
- null
- )
- ]
- }
- }
- ),
- i.listState.dataShow
- ? u(
- H,
- {
- finished: i.listState.finished,
- finishedText: ' ',
- onLoad: c,
- style: { paddingTop: '12px' },
- immediateCheck: !1
- },
- {
- default: function () {
- return [
- u(
- E,
- {
- class: [ae.gridContainer, ae.gridClass],
- modelValue: i.check,
- 'onUpdate:modelValue': function (e) {
- return (i.check = e)
- }
- },
- re(
- (t = i.list.map(function (e) {
- return u(
- O,
- {
- inset: !0,
- style: { marginBottom: '12px' },
- onClick: function () {
- return d(e.id)
- }
- },
- {
- default: function () {
- return [
- u(
- D,
- {
- center: !0,
- class: ae.cellTeacher,
- valueClass: ae.checkboxValue
- },
- {
- icon: function () {
- return u(
- R,
- {
- class: ae.img,
- src: e.avatar || L,
- fit: 'cover'
- },
- null
- )
- },
- title: function () {
- return u('div', { class: ae.content }, [
- u(
- 'p',
- { class: [ae.name, 'van-ellipsis'] },
- [e.nickname]
- ),
- u('p', { class: ae.class }, [
- e.subjectNames &&
- e.subjectNames.map(function (e) {
- return u(
- V,
- {
- type: 'primary',
- class: ae.tagSubject,
- color: '#FFE7DA',
- textColor: '#F67146'
- },
- re(e)
- ? e
- : {
- default: function () {
- return [e]
- }
- }
- )
- })
- ])
- ])
- },
- value: function () {
- return u(
- A,
- {
- name: e.id,
- ref: function (t) {
- return (i.checkboxRefs[e.id] = t)
- },
- onClick: function (t) {
- t.preventDefault(),
- t.stopPropagation(),
- d(e.id)
- }
- },
- null
- )
- }
- }
- )
- ]
- }
- }
- )
- }))
- )
- ? t
- : {
- default: function () {
- return [t]
- }
- }
- )
- ]
- }
- }
- )
- : u(f, { btnStatus: !1, tips: '暂无学员' }, null)
- ]
- )
- }
- )
- }
- }),
- ce = {
- cellTeacher: '_cellTeacher_fnv0v_1',
- img: '_img_fnv0v_1',
- name: '_name_fnv0v_9',
- class: '_class_fnv0v_16',
- checkboxValue: '_checkboxValue_fnv0v_25',
- subjectContainer: '_subjectContainer_fnv0v_29',
- tagSubject: '_tagSubject_fnv0v_35'
- }
- function se(e) {
- return (
- 'function' == typeof e ||
- ('[object Object]' === Object.prototype.toString.call(e) && !h(e))
- )
- }
- var oe = c({
- name: 'teacher-list',
- props: {
- height: { type: [String, Number], default: 'auto' },
- bottomHeight: { type: [String, Number], default: 0 },
- headerHeight: { type: [String, Number], default: 0 },
- removeTeacherId: { type: String, default: '' },
- subjectIdList: {
- type: Array,
- default: function () {
- return []
- }
- },
- selectItem: {
- type: Array,
- default: function () {
- return []
- }
- }
- },
- emits: ['close', 'select', 'update:selectItem'],
- setup: function (e, n) {
- n.slots, n.attrs
- var a = n.emit,
- i = s({
- teacherStatus: !1,
- isLoad: !1,
- list: [],
- listState: { dataShow: !0, loading: !1, finished: !1 },
- params: { keyword: null, subjectIdList: e.subjectIdList, page: 1, rows: 20 },
- check: e.selectItem || [],
- checkboxRefs: []
- }),
- c = (function () {
- var n = r(
- regeneratorRuntime.mark(function n() {
- var a, r, c
- return regeneratorRuntime.wrap(
- function (n) {
- for (;;)
- switch ((n.prev = n.next)) {
- case 0:
- if (((n.prev = 0), !i.isLoad)) {
- n.next = 3
- break
- }
- return n.abrupt('return')
- case 3:
- return (
- (i.isLoad = !0),
- (n.next = 6),
- m.post('/api-school/teacher/page', {
- data: t(
- t({}, i.params),
- {},
- {
- schoolId: g.user.data.school.id,
- removeTeacherId: e.removeTeacherId,
- delFlag: !1
- }
- )
- })
- )
- case 6:
- if (
- ((a = n.sent),
- (i.listState.loading = !1),
- (r = a.data || {}),
- !(i.list.length > 0 && 1 === r.current))
- ) {
- n.next = 11
- break
- }
- return n.abrupt('return')
- case 11:
- ;(c = r.rows || []).forEach(function (e) {
- e.subjectNames = e.subjectName ? e.subjectName.split(',') : []
- }),
- (i.list = i.list.concat(c)),
- (i.listState.finished = r.current >= r.pages),
- (i.params.page = r.current + 1),
- (i.listState.dataShow = i.list.length > 0),
- (i.isLoad = !1),
- (n.next = 25)
- break
- case 20:
- ;(n.prev = 20),
- (n.t0 = n.catch(0)),
- (i.listState.dataShow = !1),
- (i.listState.finished = !0),
- (i.isLoad = !1)
- case 25:
- case 'end':
- return n.stop()
- }
- },
- n,
- null,
- [[0, 20]]
- )
- })
- )
- return function () {
- return n.apply(this, arguments)
- }
- })(),
- p = function (e) {
- i.checkboxRefs[e].toggle()
- var t = []
- i.list.forEach(function (e) {
- i.check.includes(e.id) &&
- t.push({ id: e.id, value: e.nickname, avatar: e.avatar })
- }),
- a('update:selectItem', t)
- }
- o(
- function () {
- return e.selectItem
- },
- function () {
- h()
- },
- { deep: !0 }
- )
- var h = function () {
- var t = e.selectItem || [],
- n = []
- t.forEach(function (e) {
- n.push(e.id)
- }),
- (i.check = n)
- }
- return (
- l(function () {
- c(), h()
- }),
- function () {
- var t
- return u(
- 'div',
- {
- class: [!i.listState.dataShow && 'emptyRootContainer'],
- style: {
- 'min-height': 'calc(100vh - '
- .concat(e.height, 'px - ')
- .concat(e.bottomHeight, 'px)')
- }
- },
- [
- u(
- N,
- {
- position: 'top',
- offsetTop: e.headerHeight,
- style: { width: '100%' }
- },
- {
- default: function () {
- return [
- u(
- B,
- {
- placeholder: '伴学老师姓名',
- onSearch: function (e) {
- ;(i.params.keyword = e),
- (i.params.page = 1),
- (i.list = []),
- (i.listState.dataShow = !0),
- (i.listState.loading = !1),
- (i.listState.finished = !1),
- c()
- }
- },
- null
- )
- ]
- }
- }
- ),
- i.listState.dataShow
- ? u(
- H,
- {
- finished: i.listState.finished,
- finishedText: ' ',
- style: { paddingTop: '12px' },
- onLoad: c,
- immediateCheck: !1
- },
- {
- default: function () {
- return [
- u(
- E,
- {
- class: [ce.gridContainer, ce.gridClass],
- modelValue: i.check,
- 'onUpdate:modelValue': function (e) {
- return (i.check = e)
- }
- },
- se(
- (t = i.list.map(function (e) {
- return u(
- O,
- {
- inset: !0,
- style: { marginBottom: '12px' },
- onClick: function () {
- return p(e.id)
- }
- },
- {
- default: function () {
- return [
- u(
- D,
- {
- center: !0,
- class: ce.cellTeacher,
- valueClass: ce.checkboxValue
- },
- {
- icon: function () {
- return u(
- R,
- {
- class: ce.img,
- src: e.avatar || L,
- fit: 'cover'
- },
- null
- )
- },
- title: function () {
- return u('div', { class: ce.content }, [
- u(
- 'p',
- { class: [ce.name, 'van-ellipsis'] },
- [e.nickname]
- )
- ])
- },
- value: function () {
- return u(
- A,
- {
- name: e.id,
- ref: function (t) {
- return (i.checkboxRefs[e.id] = t)
- },
- onClick: function (t) {
- t.preventDefault(),
- t.stopPropagation(),
- p(e.id)
- }
- },
- null
- )
- }
- }
- ),
- u(
- D,
- { center: !0 },
- {
- title: function () {
- return u(
- 'div',
- { class: ce.subjectContainer },
- [
- u('span', null, [d('声部:')]),
- u(
- 'div',
- {
- style: {
- display: 'flex',
- alignItems: 'center',
- flexWrap: 'wrap'
- }
- },
- [
- e.subjectNames &&
- e.subjectNames.map(function (
- e
- ) {
- return u(
- V,
- {
- type: 'primary',
- class: ce.tagSubject,
- color: '#FFE7DA',
- textColor: '#F67146'
- },
- se(e)
- ? e
- : {
- default: function () {
- return [e]
- }
- }
- )
- })
- ]
- )
- ]
- )
- }
- }
- )
- ]
- }
- }
- )
- }))
- )
- ? t
- : {
- default: function () {
- return [t]
- }
- }
- )
- ]
- }
- }
- )
- : u(f, { btnStatus: !1, tips: '暂无伴学老师' }, null)
- ]
- )
- }
- )
- }
- }),
- le = c({
- name: 'select-send',
- props: {
- selectList: {
- type: Object,
- default: function () {
- return {}
- }
- },
- selectStatus: { type: Boolean, default: !1 }
- },
- emits: ['close', 'confirm', 'update:selectList'],
- setup: function (e, t) {
- var n = t.emit,
- a = s({
- headerHeight: 0,
- height: 'auto',
- bottomHeight: 0,
- tabValue: 'class',
- selectClass: [],
- selectStudent: [],
- selectTeacher: [],
- selectManage: []
- }),
- i = (function () {
- var e = r(
- regeneratorRuntime.mark(function e() {
- var t
- return regeneratorRuntime.wrap(function (e) {
- for (;;)
- switch ((e.prev = e.next)) {
- case 0:
- ;(t = {
- class: a.selectClass,
- student: a.selectStudent,
- teacher: a.selectTeacher,
- school: a.selectManage
- }),
- n('close'),
- n('update:selectList', t),
- n('confirm', t)
- case 4:
- case 'end':
- return e.stop()
- }
- }, e)
- })
- )
- return function () {
- return e.apply(this, arguments)
- }
- })()
- o(
- function () {
- return e.selectList
- },
- function () {
- console.log('watch', e.selectList), c()
- },
- { deep: !0 }
- )
- var c = function () {
- var t = e.selectList || {}
- ;(a.selectClass = t.class || []),
- (a.selectTeacher = t.teacher || []),
- (a.selectManage = t.school || []),
- (a.selectStudent = t.student || [])
- }
- return (
- l(function () {
- var e = v(document.querySelector('.van-tab')).height
- ;(a.height = 'auto' === a.height ? e : a.height + e),
- c(),
- console.log(a, 'select')
- }),
- function () {
- return u(
- 'div',
- {
- class: T.orchestraDetail,
- style: { background: '#f6f6f6', minHeight: '100vh' },
- id: 'select-send-message'
- },
- [
- u(
- I,
- {
- onGetHeight: function (e) {
- console.log(e, 'height'),
- (a.height = 'auto' === a.height ? e : a.height + e),
- (a.headerHeight = e)
- }
- },
- {
- default: function () {
- return [u(_, { title: '发送对象' }, null)]
- }
- }
- ),
- u(
- z,
- {
- sticky: !0,
- lineWidth: 20,
- lineHeight: 4,
- active: a.tabValue,
- 'onUpdate:active': function (e) {
- return (a.tabValue = e)
- },
- offsetTop: a.headerHeight
- },
- {
- default: function () {
- return [
- u(
- G,
- { title: '班级列表', name: 'class' },
- {
- default: function () {
- return [
- u(
- ee,
- {
- height: a.height,
- headerHeight: a.headerHeight,
- bottomHeight: a.bottomHeight,
- selectItem: a.selectClass,
- 'onUpdate:selectItem': function (e) {
- return (a.selectClass = e)
- }
- },
- null
- )
- ]
- }
- }
- ),
- u(
- G,
- { title: '学员列表', name: 'student' },
- {
- default: function () {
- return [
- u(
- ie,
- {
- height: a.height,
- headerHeight: a.headerHeight,
- bottomHeight: a.bottomHeight,
- selectItem: a.selectStudent,
- 'onUpdate:selectItem': function (e) {
- return (a.selectStudent = e)
- }
- },
- null
- )
- ]
- }
- }
- ),
- u(
- G,
- { title: '伴学老师', name: 'teacher' },
- {
- default: function () {
- return [
- u(
- oe,
- {
- height: a.height,
- headerHeight: a.headerHeight,
- bottomHeight: a.bottomHeight,
- selectItem: a.selectTeacher,
- 'onUpdate:selectItem': function (e) {
- return (a.selectTeacher = e)
- }
- },
- null
- )
- ]
- }
- }
- ),
- u(
- G,
- { title: '管理老师', name: 'manage' },
- {
- default: function () {
- return [
- u(
- ne,
- {
- height: a.height,
- headerHeight: a.headerHeight,
- bottomHeight: a.bottomHeight,
- selectItem: a.selectManage,
- 'onUpdate:selectItem': function (e) {
- return (a.selectManage = e)
- }
- },
- null
- )
- ]
- }
- }
- )
- ]
- }
- }
- ),
- u(
- I,
- {
- position: 'bottom',
- onGetHeight: function (e) {
- a.bottomHeight = e
- }
- },
- {
- default: function () {
- return [
- u('div', { class: 'btnGroup' }, [
- u(
- b,
- { round: !0, block: !0, type: 'primary', onClick: i },
- {
- default: function () {
- return [d('确认')]
- }
- }
- )
- ])
- ]
- }
- }
- )
- ]
- )
- }
- )
- }
- })
- e(
- 'default',
- c({
- name: 'create-message',
- setup: function () {
- var e = y(),
- t = S(),
- i = s({
- id: t.query.id,
- type: 'ADD',
- bucket: 'i-m',
- sendStatus: !1,
- sendType: 'IMMEDIATELY',
- textMessage: null,
- sendTime: null,
- sendTimeStatus: !1,
- maxDate: x(new Date()).add(60, 'day').toDate(),
- currentDate: [],
- currentTime: [x().format('HH'), x().format('mm')],
- attachments: [],
- receives: [],
- selectStatus: !1,
- selectList: {},
- delSelectItem: {},
- delStatus: !1,
- sureLoading: !1,
- updateLoading: !1,
- closeLoading: !1,
- actions: [
- { name: '即时发送', value: 'IMMEDIATELY', selected: !0 },
- { name: '定时发送', value: 'SCHEDULED' }
- ]
- }),
- c = (function () {
- var t = r(
- regeneratorRuntime.mark(function t() {
- var n, a, r
- return regeneratorRuntime.wrap(
- function (t) {
- for (;;)
- switch ((t.prev = t.next)) {
- case 0:
- if (((t.prev = 0), i.sendType)) {
- t.next = 4
- break
- }
- return w('请选择发送方式'), t.abrupt('return')
- case 4:
- if (i.textMessage) {
- t.next = 7
- break
- }
- return w('请输入发送内容'), t.abrupt('return')
- case 7:
- if (!(i.receives.length <= 0)) {
- t.next = 10
- break
- }
- return w('请选择发送对象'), t.abrupt('return')
- case 10:
- if (
- ((n = []),
- i.attachments.forEach(function (e) {
- n.push({ imgUrl: e, imgMessage: e })
- }),
- (a = []),
- i.receives.forEach(function (e) {
- a.push({
- receiveType: e.receiveType,
- receiveId: e.receiveId
- })
- }),
- (r = {
- sendType: i.sendType,
- textMessage: i.textMessage,
- attachments: n,
- receives: a,
- sendTime: i.sendTime
- }),
- console.log(r, 'params'),
- i.id ? (i.updateLoading = !0) : (i.sureLoading = !0),
- !i.id)
- ) {
- t.next = 23
- break
- }
- return (
- (r.id = i.id),
- (t.next = 21),
- m.post('/api-school/imMessageBatchSending/update', {
- hideLoading: !1,
- data: r
- })
- )
- case 21:
- t.next = 25
- break
- case 23:
- return (
- (t.next = 25),
- m.post('/api-school/imMessageBatchSending/save', {
- hideLoading: !1,
- data: r
- })
- )
- case 25:
- e.back(),
- (i.sureLoading = !1),
- (i.updateLoading = !1),
- (t.next = 34)
- break
- case 30:
- ;(t.prev = 30),
- (t.t0 = t.catch(0)),
- (i.sureLoading = !1),
- (i.updateLoading = !1)
- case 34:
- case 'end':
- return t.stop()
- }
- },
- t,
- null,
- [[0, 30]]
- )
- })
- )
- return function () {
- return t.apply(this, arguments)
- }
- })(),
- o = (function () {
- var e = r(
- regeneratorRuntime.mark(function e() {
- var t, n, a, r, c, s
- return regeneratorRuntime.wrap(
- function (e) {
- for (;;)
- switch ((e.prev = e.next)) {
- case 0:
- if (((e.prev = 0), i.id)) {
- e.next = 3
- break
- }
- return e.abrupt('return')
- case 3:
- return (
- (e.next = 5),
- m.get('/api-school/imMessageBatchSending/detail/' + i.id)
- )
- case 5:
- ;(t = e.sent),
- (n = t.data),
- (i.sendType = n.sendType),
- (i.textMessage = n.textMessage),
- (i.sendTime = n.sendTime),
- (i.type = n.sendStatus),
- (a = n.receives || []),
- (r = { class: [], teacher: [], student: [], school: [] }),
- a.forEach(function (e) {
- var t = {
- receiveType: e.receiveType,
- receiveId: e.receiveId,
- receiveName: e.receiveName,
- avatar: e.avatar
- }
- i.receives.push(t)
- var n = {
- id: e.receiveId,
- value: e.receiveName,
- avatar: e.avatar
- }
- 'CLASS' === e.receiveType
- ? r.class.push(n)
- : 'STUDENT' === e.receiveType
- ? r.student.push(n)
- : 'TEACHER' === e.receiveType
- ? r.teacher.push(n)
- : 'SCHOOL' === e.receiveType && r.school.push(n)
- }),
- (i.selectList = r),
- (c = n.attachments || []),
- (s = []),
- c.forEach(function (e) {
- s.push(e.imgUrl || e.imgMessage)
- }),
- (i.attachments = s),
- (e.next = 24)
- break
- case 21:
- ;(e.prev = 21), (e.t0 = e.catch(0)), console.log(e.t0, 'e')
- case 24:
- case 'end':
- return e.stop()
- }
- },
- e,
- null,
- [[0, 21]]
- )
- })
- )
- return function () {
- return e.apply(this, arguments)
- }
- })(),
- f = k(function () {
- return 'SEND' === i.type
- }),
- h = (function () {
- var t = r(
- regeneratorRuntime.mark(function t() {
- return regeneratorRuntime.wrap(
- function (t) {
- for (;;)
- switch ((t.prev = t.next)) {
- case 0:
- return (
- (t.prev = 0),
- (i.closeLoading = !0),
- (t.next = 4),
- m.post('/api-school/imMessageBatchSending/remove', {
- requestType: 'form',
- hideLoading: !1,
- data: { id: i.id }
- })
- )
- case 4:
- setTimeout(function () {
- w('撤销成功')
- }, 100),
- setTimeout(function () {
- e.back(), (i.closeLoading = !1)
- }, 1100),
- (t.next = 11)
- break
- case 8:
- ;(t.prev = 8), (t.t0 = t.catch(0)), (i.closeLoading = !1)
- case 11:
- case 'end':
- return t.stop()
- }
- },
- t,
- null,
- [[0, 8]]
- )
- })
- )
- return function () {
- return t.apply(this, arguments)
- }
- })()
- return (
- l(function () {
- o()
- }),
- function () {
- return u('div', { class: T['create-message'] }, [
- u(_, null, null),
- u(
- O,
- { inset: !0, class: T.cellGroup },
- {
- default: function () {
- return [
- u(
- J,
- {
- inputAlign: 'right',
- label: '发送方式',
- modelValue: a[i.sendType],
- placeholder: '请选择发送方式',
- onClick: function () {
- f.value || (i.sendStatus = !0)
- },
- readonly: !0,
- isLink: !f.value,
- class: T.inputForm
- },
- null
- ),
- 'SCHEDULED' === i.sendType &&
- u(
- J,
- {
- inputAlign: 'right',
- label: '发送时间',
- modelValue: i.sendTime,
- placeholder: '请选择发送时间',
- onClick: function () {
- f.value || (i.sendTimeStatus = !0)
- },
- readonly: !0,
- isLink: !0,
- class: T.inputForm
- },
- null
- ),
- u(
- D,
- { title: '发送内容' },
- {
- label: function () {
- return u(
- J,
- {
- style: { padding: '0', marginTop: '12px' },
- placeholder: '请输入发送内容',
- modelValue: i.textMessage,
- 'onUpdate:modelValue': function (e) {
- return (i.textMessage = e)
- },
- type: 'textarea',
- rows: 3,
- showWordLimit: !0,
- maxlength: 400,
- readonly: f.value
- },
- null
- )
- }
- }
- ),
- u(
- D,
- { title: '上传附件' },
- {
- label: function () {
- return u(
- W,
- {
- modelValue: i.attachments,
- 'onUpdate:modelValue': function (e) {
- return (i.attachments = e)
- },
- maxCount: 9,
- bucket: i.bucket,
- disabled: f.value
- },
- null
- )
- }
- }
- ),
- u(
- J,
- {
- label: '发送对象',
- readonly: !0,
- inputAlign: 'right',
- class: T.sendObjPlaceholder,
- placeholder: f.value ? '' : '请选择发送对象',
- isLink: !f.value,
- border: !1,
- onClick: function () {
- f.value || (i.selectStatus = !0)
- }
- },
- null
- ),
- i.receives.map(function (e) {
- var t = F
- return (
- 'CLASS' === e.receiveType
- ? (t = './assets/icon_jiaofu.97430aa5.png')
- : 'STUDENT' === e.receiveType
- ? (t = F)
- : ('TEACHER' !== e.receiveType &&
- 'SCHOOL' !== e.receiveType) ||
- (t = L),
- u(
- D,
- {
- class: T.receives,
- title: e.receiveName,
- center: !0,
- border: !1
- },
- {
- icon: function () {
- return u(R, { class: T.img, src: e.avatar || t }, null)
- },
- extra: function () {
- return (
- !f.value &&
- u(
- j,
- {
- name: 'clear',
- color: '#d7d7d7',
- size: 20,
- onClick: function () {
- ;(i.delSelectItem = e), (i.delStatus = !0)
- }
- },
- null
- )
- )
- }
- }
- )
- )
- })
- ]
- }
- }
- ),
- u(
- I,
- { position: 'bottom' },
- {
- default: function () {
- return [
- 'ADD' === i.type &&
- u('div', { class: 'btnGroup' }, [
- u(
- b,
- {
- round: !0,
- block: !0,
- type: 'primary',
- onClick: c,
- disabled: i.sureLoading
- },
- {
- default: function () {
- return [d('确认发送')]
- }
- }
- )
- ]),
- 'WAIT' === i.type &&
- u('div', { class: ['btnGroup', 'btnMore'] }, [
- u(
- b,
- {
- round: !0,
- type: 'primary',
- onClick: c,
- disabled: i.updateLoading
- },
- {
- default: function () {
- return [d('修改')]
- }
- }
- ),
- u(
- b,
- {
- round: !0,
- color: '#64A9FF',
- onClick: h,
- disabled: i.closeLoading
- },
- {
- default: function () {
- return [d('撤销')]
- }
- }
- )
- ])
- ]
- }
- }
- ),
- u(
- q,
- {
- show: i.sendStatus,
- 'onUpdate:show': function (e) {
- return (i.sendStatus = e)
- },
- actions: i.actions,
- onSelect: function (e) {
- i.actions.forEach(function (e) {
- e.selected = !1
- }),
- (e.selected = !0),
- (i.sendType = e.value),
- (i.sendStatus = !1)
- }
- },
- null
- ),
- u(
- p,
- {
- show: i.sendTimeStatus,
- 'onUpdate:show': function (e) {
- return (i.sendTimeStatus = e)
- },
- position: 'bottom',
- round: !0,
- class: 'popupBottomSearch'
- },
- {
- default: function () {
- return [
- u(
- Q,
- {
- title: '发送时间',
- tabs: ['选择日期', '选择时间'],
- onCancel: function () {
- return (i.sendTimeStatus = !1)
- },
- onConfirm: function (e) {
- var t = e[0].selectedValues.join('-'),
- n = e[1].selectedValues.join(':')
- ;(i.sendTime = x(t + ' ' + n).format('YYYY-MM-DD HH:mm:ss')),
- (i.sendTimeStatus = !1)
- }
- },
- {
- default: function () {
- return [
- u(
- K,
- {
- minDate: new Date(),
- maxDate: i.maxDate,
- modelValue: i.currentDate,
- 'onUpdate:modelValue': function (e) {
- return (i.currentDate = e)
- },
- formatter: C
- },
- null
- ),
- u(
- $,
- {
- modelValue: i.currentTime,
- 'onUpdate:modelValue': function (e) {
- return (i.currentTime = e)
- },
- formatter: function (e, t) {
- return (
- 'hour' === e && (t.text += '时'),
- 'minute' === e && (t.text += '分'),
- t
- )
- }
- },
- null
- )
- ]
- }
- }
- )
- ]
- }
- }
- ),
- u(
- n,
- {
- modelValue: i.selectStatus,
- 'onUpdate:modelValue': function (e) {
- return (i.selectStatus = e)
- }
- },
- {
- default: function () {
- return [
- u(
- le,
- {
- selectList: i.selectList,
- 'onUpdate:selectList': function (e) {
- return (i.selectList = e)
- },
- onClose: function () {
- return (i.selectStatus = !1)
- },
- onConfirm: function (e) {
- var t = e.class || [],
- n = e.student || [],
- a = e.teacher || [],
- r = e.school || [],
- c = []
- t.forEach(function (e) {
- c.push({
- receiveType: 'CLASS',
- receiveId: e.id,
- receiveName: e.value,
- avatar: e.avatar
- })
- }),
- n.forEach(function (e) {
- c.push({
- receiveType: 'STUDENT',
- receiveId: e.id,
- receiveName: e.value,
- avatar: e.avatar
- })
- }),
- a.forEach(function (e) {
- c.push({
- receiveType: 'TEACHER',
- receiveId: e.id,
- receiveName: e.value,
- avatar: e.avatar
- })
- }),
- r.forEach(function (e) {
- c.push({
- receiveType: 'SCHOOL',
- receiveId: e.id,
- receiveName: e.value,
- avatar: e.avatar
- })
- }),
- (i.receives = c)
- }
- },
- null
- )
- ]
- }
- }
- ),
- u(
- Y,
- {
- show: i.delStatus,
- 'onUpdate:show': function (e) {
- return (i.delStatus = e)
- },
- showCancelButton: !0,
- message: '您是否删除该数据',
- onConfirm: function () {
- var e = i.selectList
- if ('CLASS' === i.delSelectItem.receiveType) {
- var t = e.class || [],
- n = t.findIndex(function (e) {
- return e.id === i.delSelectItem.receiveId
- })
- t.splice(n, 1)
- } else if ('SCHOOL' === i.delSelectItem.receiveType) {
- var a = e.school || [],
- r = a.findIndex(function (e) {
- return e.id === i.delSelectItem.receiveId
- })
- a.splice(r, 1)
- } else if ('TEACHER' === i.delSelectItem.receiveType) {
- var c = e.teacher || [],
- s = c.findIndex(function (e) {
- return e.id === i.delSelectItem.receiveId
- })
- c.splice(s, 1)
- } else if ('STUDENT' === i.delSelectItem.receiveType) {
- var o = e.student || [],
- l = o.findIndex(function (e) {
- return e.id === i.delSelectItem.receiveId
- })
- o.splice(l, 1)
- }
- ;(i.selectList = e), console.log(i.selectList, 'forms.selectList')
- var u = i.receives.findIndex(function (e) {
- return e.receiveId === i.delSelectItem.receiveId
- })
- i.receives.splice(u, 1)
- }
- },
- null
- )
- ])
- }
- )
- }
- })
- )
- }
- }
- }
- )
- })()
|