| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565 |
- !(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.8f928ac8.js',
- './index-legacy.8895675d.js',
- './index-legacy.37a26c18.js',
- './index.module-legacy.475a9872.js',
- './index-legacy.86e58eb0.js',
- './icon_teacher-legacy.07765f44.js',
- './index-legacy.a9a76943.js',
- './index-legacy.88f968f8.js',
- './index-legacy.46c1a425.js',
- './index-legacy.a5bef69a.js',
- './index-legacy.1f5a1fbe.js',
- './index-legacy.d552d569.js',
- './index-legacy.5216aadb.js',
- './index-legacy.11b1b942.js',
- './index-legacy.e8fdcbbe.js',
- './index-legacy.31f31051.js',
- './index-legacy.2ac65fee.js',
- './index-legacy.bc5c4a06.js',
- './icon_student-legacy.6118fd72.js',
- './index-legacy.3cdbef0f.js',
- './index-legacy.b1d208cd.js',
- './index-legacy.cb3dc728.js',
- './index-legacy.e72ce0a8.js',
- './index-legacy.b08187e4.js',
- './index-legacy.0793a1ee.js',
- './index-legacy.c75fe8a2.js',
- './use-tab-status-legacy.203dc693.js',
- './Checker-legacy.bc354448.js',
- './index-legacy.72f6344c.js',
- './index-legacy.30c98e07.js',
- './index-legacy.f1efbcd8.js',
- './index-legacy.79f3b413.js',
- './ImagePreview-legacy.149d9543.js',
- './function-call-legacy.dbba1b13.js',
- './utils-legacy.366cb285.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,
- E,
- O,
- D,
- R,
- V,
- H,
- A,
- M,
- U,
- P,
- B,
- z,
- F,
- G,
- Y,
- q,
- W,
- Z,
- $,
- J
- return {
- setters: [
- function (e) {
- n = e.O
- },
- function (e) {
- a = e.d
- },
- function (e) {
- ;(i = e.D),
- (c = e.d),
- (s = e.r),
- (o = e.Z),
- (l = e.$),
- (u = e.c),
- (d = e.q),
- (f = e.ai),
- (p = e.P),
- (h = e.ak),
- (m = e.m),
- (g = e.f),
- (v = e.am),
- (_ = e.B),
- (b = e.ag),
- (y = e.aV),
- (S = e.ah),
- (x = e.y),
- (k = e.a5),
- (j = e.aj),
- (C = e.o)
- },
- function (e) {
- w = e.s
- },
- function (e) {
- T = e.O
- },
- function (e) {
- I = e.i
- },
- function (e) {
- L = e.S
- },
- function (e) {
- N = 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) {
- H = e.C
- },
- function (e) {
- ;(A = e.G), (M = e.a)
- },
- function (e) {
- ;(U = e.s), (P = e.P)
- },
- function (e) {
- B = e.O
- },
- function (e) {
- ;(z = e.T), (F = e.a)
- },
- function (e) {
- G = e.i
- },
- function (e) {
- Y = e.O
- },
- function (e) {
- q = e.O
- },
- function (e) {
- W = e.O
- },
- function (e) {
- Z = e.T
- },
- function (e) {
- $ = e.F
- },
- function (e) {
- J = e.D
- },
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {},
- function () {}
- ],
- execute: function () {
- var K = i(U),
- Q = {
- 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 X = c({
- name: 'practice-class',
- props: {
- height: { type: [String, Number], default: 'auto' },
- bottomHeight: { 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: [Q.practiceClass, !i.listState.dataShow && 'emptyRootContainer'],
- style: {
- 'min-height': 'calc(100vh - '
- .concat(e.height, 'px - ')
- .concat(e.bottomHeight, 'px)')
- }
- },
- [
- i.orchestraList.length > 0 &&
- u(
- L,
- { position: 'top', offsetTop: e.height, 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(
- N,
- {
- finished: i.listState.finished,
- finishedText: ' ',
- class: [Q.liveList],
- onLoad: v,
- immediateCheck: !1
- },
- {
- default: function () {
- return [
- u(
- E,
- {
- class: [Q.gridContainer, Q.gridClass],
- modelValue: i.check,
- 'onUpdate:modelValue': function (e) {
- return (i.check = e)
- }
- },
- ((e = t =
- i.list.map(function (e) {
- return u(
- O,
- {
- class: Q.classCellGroup,
- onClick: function () {
- return _(e.id)
- },
- border: !1
- },
- {
- default: function () {
- return [
- u(
- D,
- {
- center: !0,
- titleStyle: { flex: '0 auto' },
- valueClass: Q.classCheckbox
- },
- {
- icon: function () {
- return u(
- R,
- { src: I, class: Q.img },
- null
- )
- },
- title: function () {
- return u('div', { class: Q.content }, [
- u('div', { class: Q.teacherName }, [
- u(
- 'span',
- { class: ['van-ellipsis', Q.name] },
- [e.teacherName]
- ),
- u(
- V,
- { type: 'primary' },
- {
- default: function () {
- return [e.name]
- }
- }
- )
- ]),
- u(
- 'div',
- {
- class: [
- Q.orchestraName,
- 'van-ellipsis'
- ]
- },
- [e.orchestraName]
- )
- ])
- },
- value: function () {
- return u(
- H,
- {
- name: e.id,
- ref: function (t) {
- return (i.checkboxRefs[e.id] = t)
- },
- onClick: function (t) {
- t.preventDefault(),
- t.stopPropagation(),
- _(e.id)
- }
- },
- null
- )
- }
- }
- ),
- u(
- A,
- { border: !1, columnNum: 3 },
- {
- default: function () {
- return [
- u(M, null, {
- default: function () {
- return [
- u('p', { class: Q.title }, [
- e.preStudentNum
- ]),
- u('p', { class: Q.name }, [
- d('学员人数')
- ])
- ]
- }
- }),
- u(M, null, {
- default: function () {
- return [
- u('p', { class: [Q.title] }, [
- e.courseScheduleNum -
- e.completeCourseScheduleNum
- ]),
- u('p', { class: Q.name }, [
- d('剩余课时')
- ])
- ]
- }
- }),
- u(M, null, {
- default: function () {
- return [
- u('p', { class: Q.title }, [
- e.courseScheduleNum
- ]),
- u('p', { class: Q.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(
- P,
- {
- 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
- )
- ]
- }
- }
- )
- ]
- )
- }
- )
- }
- }),
- ee = {
- 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 te = c({
- name: 'manage-list',
- props: {
- height: { type: [String, Number], default: 'auto' },
- bottomHeight: { 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()
- }),
- 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(
- L,
- { position: 'top', offsetTop: e.height, 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(
- N,
- {
- finished: i.listState.finished,
- finishedText: ' ',
- onLoad: c,
- style: { paddingTop: '12px' },
- immediateCheck: !1
- },
- {
- default: function () {
- return [
- u(
- E,
- {
- class: [ee.gridContainer, ee.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: ee.cellTeacher,
- valueClass: ee.checkboxValue
- },
- {
- icon: function () {
- return u(
- R,
- {
- class: ee.img,
- src: e.avatar || I,
- fit: 'cover'
- },
- null
- )
- },
- title: function () {
- return u('div', { class: ee.content }, [
- u(
- 'p',
- { class: [ee.name, 'van-ellipsis'] },
- [e.nickname]
- )
- ])
- },
- value: function () {
- return u(
- H,
- {
- 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)
- ]
- )
- }
- )
- }
- }),
- ne = {
- 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 ae(e) {
- return (
- 'function' == typeof e ||
- ('[object Object]' === Object.prototype.toString.call(e) && !h(e))
- )
- }
- var re = c({
- name: 'teacher-list',
- props: {
- height: { type: [String, Number], default: 'auto' },
- bottomHeight: { 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(
- L,
- { position: 'top', offsetTop: e.height, 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(
- N,
- {
- finished: i.listState.finished,
- finishedText: ' ',
- onLoad: c,
- style: { paddingTop: '12px' },
- immediateCheck: !1
- },
- {
- default: function () {
- return [
- u(
- E,
- {
- class: [ne.gridContainer, ne.gridClass],
- modelValue: i.check,
- 'onUpdate:modelValue': function (e) {
- return (i.check = e)
- }
- },
- ae(
- (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: ne.cellTeacher,
- valueClass: ne.checkboxValue
- },
- {
- icon: function () {
- return u(
- R,
- {
- class: ne.img,
- src: e.avatar || I,
- fit: 'cover'
- },
- null
- )
- },
- title: function () {
- return u('div', { class: ne.content }, [
- u(
- 'p',
- { class: [ne.name, 'van-ellipsis'] },
- [e.nickname]
- ),
- u('p', { class: ne.class }, [
- e.subjectNames &&
- e.subjectNames.map(function (e) {
- return u(
- V,
- {
- type: 'primary',
- class: ne.tagSubject,
- color: '#FFE7DA',
- textColor: '#F67146'
- },
- ae(e)
- ? e
- : {
- default: function () {
- return [e]
- }
- }
- )
- })
- ])
- ])
- },
- value: function () {
- return u(
- H,
- {
- 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)
- ]
- )
- }
- )
- }
- }),
- ie = {
- 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 ce(e) {
- return (
- 'function' == typeof e ||
- ('[object Object]' === Object.prototype.toString.call(e) && !h(e))
- )
- }
- var se = c({
- name: 'teacher-list',
- props: {
- height: { type: [String, Number], default: 'auto' },
- bottomHeight: { 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(
- L,
- { position: 'top', offsetTop: e.height, 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(
- N,
- {
- finished: i.listState.finished,
- finishedText: ' ',
- style: { paddingTop: '12px' },
- onLoad: c,
- immediateCheck: !1
- },
- {
- default: function () {
- return [
- u(
- E,
- {
- class: [ie.gridContainer, ie.gridClass],
- modelValue: i.check,
- 'onUpdate:modelValue': function (e) {
- return (i.check = e)
- }
- },
- ce(
- (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: ie.cellTeacher,
- valueClass: ie.checkboxValue
- },
- {
- icon: function () {
- return u(
- R,
- {
- class: ie.img,
- src: e.avatar || I,
- fit: 'cover'
- },
- null
- )
- },
- title: function () {
- return u('div', { class: ie.content }, [
- u(
- 'p',
- { class: [ie.name, 'van-ellipsis'] },
- [e.nickname]
- )
- ])
- },
- value: function () {
- return u(
- H,
- {
- 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: ie.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: ie.tagSubject,
- color: '#FFE7DA',
- textColor: '#F67146'
- },
- ce(e)
- ? e
- : {
- default: function () {
- return [e]
- }
- }
- )
- })
- ]
- )
- ]
- )
- }
- }
- )
- ]
- }
- }
- )
- }))
- )
- ? t
- : {
- default: function () {
- return [t]
- }
- }
- )
- ]
- }
- }
- )
- : u(f, { btnStatus: !1, tips: '暂无伴学指导' }, null)
- ]
- )
- }
- )
- }
- }),
- oe = 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({
- 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 = e), c(), console.log(a, 'select')
- }),
- function () {
- return u(
- 'div',
- {
- class: w.orchestraDetail,
- style: { background: '#f6f6f6', minHeight: '100vh' },
- id: 'select-send-message'
- },
- [
- u(
- z,
- {
- sticky: !0,
- lineWidth: 20,
- lineHeight: 4,
- active: a.tabValue,
- 'onUpdate:active': function (e) {
- return (a.tabValue = e)
- }
- },
- {
- default: function () {
- return [
- u(
- F,
- { title: '班级列表', name: 'class' },
- {
- default: function () {
- return [
- u(
- X,
- {
- height: a.height,
- bottomHeight: a.bottomHeight,
- selectItem: a.selectClass,
- 'onUpdate:selectItem': function (e) {
- return (a.selectClass = e)
- }
- },
- null
- )
- ]
- }
- }
- ),
- u(
- F,
- { title: '学员列表', name: 'student' },
- {
- default: function () {
- return [
- u(
- re,
- {
- height: a.height,
- bottomHeight: a.bottomHeight,
- selectItem: a.selectStudent,
- 'onUpdate:selectItem': function (e) {
- return (a.selectStudent = e)
- }
- },
- null
- )
- ]
- }
- }
- ),
- u(
- F,
- { title: '伴学指导', name: 'teacher' },
- {
- default: function () {
- return [
- u(
- se,
- {
- height: a.height,
- bottomHeight: a.bottomHeight,
- selectItem: a.selectTeacher,
- 'onUpdate:selectItem': function (e) {
- return (a.selectTeacher = e)
- }
- },
- null
- )
- ]
- }
- }
- ),
- u(
- F,
- { title: '管理老师', name: 'manage' },
- {
- default: function () {
- return [
- u(
- te,
- {
- height: a.height,
- bottomHeight: a.bottomHeight,
- selectItem: a.selectManage,
- 'onUpdate:selectItem': function (e) {
- return (a.selectManage = e)
- }
- },
- null
- )
- ]
- }
- }
- )
- ]
- }
- }
- ),
- u(
- T,
- {
- position: 'bottom',
- onGetHeight: function (e) {
- a.bottomHeight = e
- }
- },
- {
- default: function () {
- return [
- u('div', { class: 'btnGroup' }, [
- u(
- _,
- { round: !0, block: !0, type: 'primary', onClick: i },
- {
- default: function () {
- return [d('确认')]
- }
- }
- )
- ])
- ]
- }
- }
- )
- ]
- )
- }
- )
- }
- })
- e(
- 'default',
- c({
- name: 'create-message',
- setup: function () {
- var e = b(),
- t = y(),
- i = s({
- id: t.query.id,
- type: 'ADD',
- bucket: 'i-m',
- sendStatus: !1,
- sendType: 'IMMEDIATELY',
- textMessage: null,
- sendTime: null,
- sendTimeStatus: !1,
- maxDate: S(new Date()).add(60, 'day').toDate(),
- currentDate: [],
- currentTime: [S().format('HH'), S().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 C('请选择发送方式'), t.abrupt('return')
- case 4:
- if (i.textMessage) {
- t.next = 7
- break
- }
- return C('请输入发送内容'), t.abrupt('return')
- case 7:
- if (!(i.receives.length <= 0)) {
- t.next = 10
- break
- }
- return C('请选择发送对象'), 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 = x(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 () {
- C('撤销成功')
- }, 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: w['create-message'] }, [
- u(
- O,
- { inset: !0, class: w.cellGroup },
- {
- default: function () {
- return [
- u(
- $,
- {
- inputAlign: 'right',
- label: '发送方式',
- modelValue: a[i.sendType],
- placeholder: '请选择发送方式',
- onClick: function () {
- f.value || (i.sendStatus = !0)
- },
- readonly: !0,
- isLink: !f.value,
- class: w.inputForm
- },
- null
- ),
- 'SCHEDULED' === i.sendType &&
- u(
- $,
- {
- inputAlign: 'right',
- label: '发送时间',
- modelValue: i.sendTime,
- placeholder: '请选择发送时间',
- onClick: function () {
- f.value || (i.sendTimeStatus = !0)
- },
- readonly: !0,
- isLink: !0,
- class: w.inputForm
- },
- null
- ),
- u(
- D,
- { title: '发送内容' },
- {
- label: function () {
- return u(
- $,
- {
- 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(
- $,
- {
- label: '发送对象',
- readonly: !0,
- inputAlign: 'right',
- class: w.sendObjPlaceholder,
- placeholder: f.value ? '' : '请选择发送对象',
- isLink: !f.value,
- border: !1,
- onClick: function () {
- f.value || (i.selectStatus = !0)
- }
- },
- null
- ),
- i.receives.map(function (e) {
- var t = G
- return (
- 'CLASS' === e.receiveType
- ? (t = './assets/icon_jiaofu.97430aa5.png')
- : 'STUDENT' === e.receiveType
- ? (t = G)
- : ('TEACHER' !== e.receiveType &&
- 'SCHOOL' !== e.receiveType) ||
- (t = I),
- u(
- D,
- {
- class: w.receives,
- title: e.receiveName,
- center: !0,
- border: !1
- },
- {
- icon: function () {
- return u(R, { class: w.img, src: e.avatar || t }, null)
- },
- extra: function () {
- return (
- !f.value &&
- u(
- k,
- {
- name: 'clear',
- color: '#d7d7d7',
- size: 20,
- onClick: function () {
- ;(i.delSelectItem = e), (i.delStatus = !0)
- }
- },
- null
- )
- )
- }
- }
- )
- )
- })
- ]
- }
- }
- ),
- u(
- T,
- { position: 'bottom' },
- {
- default: function () {
- return [
- 'ADD' === i.type &&
- u('div', { class: 'btnGroup' }, [
- u(
- _,
- {
- round: !0,
- block: !0,
- type: 'primary',
- onClick: c,
- disabled: i.sureLoading
- },
- {
- default: function () {
- return [d('确认发送')]
- }
- }
- )
- ]),
- 'WAIT' === i.type &&
- u('div', { class: ['btnGroup', 'btnMore'] }, [
- u(
- _,
- {
- round: !0,
- type: 'primary',
- onClick: c,
- disabled: i.updateLoading
- },
- {
- default: function () {
- return [d('修改')]
- }
- }
- ),
- u(
- _,
- {
- 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(
- K,
- {
- title: '发送时间',
- tabs: ['选择日期', '选择时间'],
- onCancel: function () {
- return (i.sendTimeStatus = !1)
- },
- onConfirm: function (e) {
- var t = e[0].selectedValues.join('-'),
- n = e[1].selectedValues.join(':')
- ;(i.sendTime = S(t + ' ' + n).format('YYYY-MM-DD HH:mm:ss')),
- (i.sendTimeStatus = !1)
- }
- },
- {
- default: function () {
- return [
- u(
- J,
- {
- minDate: new Date(),
- maxDate: i.maxDate,
- modelValue: i.currentDate,
- 'onUpdate:modelValue': function (e) {
- return (i.currentDate = e)
- },
- formatter: j
- },
- null
- ),
- u(
- Z,
- {
- 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(
- oe,
- {
- 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
- )
- ])
- }
- )
- }
- })
- )
- }
- }
- }
- )
- })()
|