unbind-legacy.ff30fb4d.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. !(function () {
  2. function e(e, t) {
  3. var n = Object.keys(e)
  4. if (Object.getOwnPropertySymbols) {
  5. var a = Object.getOwnPropertySymbols(e)
  6. t &&
  7. (a = a.filter(function (t) {
  8. return Object.getOwnPropertyDescriptor(e, t).enumerable
  9. })),
  10. n.push.apply(n, a)
  11. }
  12. return n
  13. }
  14. function t(t) {
  15. for (var a = 1; a < arguments.length; a++) {
  16. var r = null != arguments[a] ? arguments[a] : {}
  17. a % 2
  18. ? e(Object(r), !0).forEach(function (e) {
  19. n(t, e, r[e])
  20. })
  21. : Object.getOwnPropertyDescriptors
  22. ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r))
  23. : e(Object(r)).forEach(function (e) {
  24. Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e))
  25. })
  26. }
  27. return t
  28. }
  29. function n(e, t, n) {
  30. return (
  31. t in e
  32. ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 })
  33. : (e[t] = n),
  34. e
  35. )
  36. }
  37. function a(e, t, n, a, r, i, c) {
  38. try {
  39. var s = e[i](c),
  40. o = s.value
  41. } catch (l) {
  42. return void n(l)
  43. }
  44. s.done ? t(o) : Promise.resolve(o).then(a, r)
  45. }
  46. function r(e) {
  47. return function () {
  48. var t = this,
  49. n = arguments
  50. return new Promise(function (r, i) {
  51. var c = e.apply(t, n)
  52. function s(e) {
  53. a(c, r, i, s, o, 'next', e)
  54. }
  55. function o(e) {
  56. a(c, r, i, s, o, 'throw', e)
  57. }
  58. s(void 0)
  59. })
  60. }
  61. }
  62. var i = document.createElement('style')
  63. ;(i.innerHTML =
  64. '._unbindTips_1tv2q_1{font-size:.34667rem;padding:.26667rem .32rem;font-weight:500;color:#f67146;line-height:.48rem;background:#ffebdd;border-radius:.26667rem;margin:.32rem .34667rem}._detailCellGroup_1tv2q_11{margin:.32rem .34667rem;overflow:hidden;border-radius:.26667rem}._detailCell_1tv2q_11{padding:.4rem .34667rem}._detailCell_1tv2q_11 .van-cell__title{flex:1 auto;flex-basis:48%}._detailCell_1tv2q_11 ._teacherName_1tv2q_23{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._detailCell_1tv2q_11 ._teacherContent_1tv2q_29{display:flex;align-items:center;justify-content:space-between}._detailCell_1tv2q_11 ._teacherContent_1tv2q_29 ._content_1tv2q_34{width:1.86667rem}._detailCell_1tv2q_11 ._teacherContent_1tv2q_29 ._classNum_1tv2q_37{text-align:center;width:1.6rem}._detailCell_1tv2q_11 ._className_1tv2q_41{font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._detailCell_1tv2q_11 ._musicName_1tv2q_47{font-size:.37333rem;color:#777;line-height:.53333rem}._detailCell_1tv2q_11 ._nums_1tv2q_52{font-size:.53333rem;font-weight:700;color:#f67146;line-height:.64rem}._detailCell_1tv2q_11 ._numTip_1tv2q_58{font-size:.37333rem;color:#777;line-height:.53333rem}._name_nzdqe_1{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:7.2rem}._img_nzdqe_8{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.26667rem}._subjects_nzdqe_15 .van-tag+.van-tag{margin-left:.16rem}\n'),
  65. document.head.appendChild(i),
  66. System.register(
  67. [
  68. './index-legacy.c52b7cbb.js',
  69. './index-legacy.4e7f0184.js',
  70. './index-legacy.2ae28dc5.js',
  71. './index-legacy.4833415a.js',
  72. './index-legacy.fb25da3a.js',
  73. './icon_teacher-legacy.42ba77b1.js',
  74. './index-legacy.9fb17640.js',
  75. './index-legacy.51e5b886.js',
  76. './index-legacy.d61b8a1f.js',
  77. './index-legacy.ef15ba2a.js',
  78. './index-legacy.26638f55.js',
  79. './function-call-legacy.5d08d5e0.js',
  80. './index-legacy.261ae52e.js',
  81. './use-tab-status-legacy.17f6d490.js'
  82. ],
  83. function (e) {
  84. 'use strict'
  85. var n, a, i, c, s, o, l, u, d, f, m, _, h, p, g, v, b, y, j, q, w, S, C, x, N
  86. return {
  87. setters: [
  88. function (e) {
  89. n = e.O
  90. },
  91. function (e) {
  92. a = e.O
  93. },
  94. function (e) {
  95. ;(i = e.d),
  96. (c = e.R),
  97. (s = e.X),
  98. (o = e.k),
  99. (l = e.be),
  100. (u = e.F),
  101. (d = e.ad),
  102. (f = e.g),
  103. (m = e.s),
  104. (_ = e.b8),
  105. (h = e.aQ),
  106. (p = e.l),
  107. (g = e.B),
  108. (v = e.j)
  109. },
  110. function (e) {
  111. b = e.O
  112. },
  113. function (e) {
  114. y = e.O
  115. },
  116. function (e) {
  117. j = e.i
  118. },
  119. function (e) {
  120. q = e.L
  121. },
  122. function (e) {
  123. w = e.C
  124. },
  125. function (e) {
  126. S = e.I
  127. },
  128. function (e) {
  129. C = e.T
  130. },
  131. function (e) {
  132. x = e.C
  133. },
  134. function (e) {
  135. N = e.a
  136. },
  137. function () {},
  138. function () {}
  139. ],
  140. execute: function () {
  141. var O = {
  142. unbindTips: '_unbindTips_1tv2q_1',
  143. detailCellGroup: '_detailCellGroup_1tv2q_11',
  144. detailCell: '_detailCell_1tv2q_11',
  145. teacherName: '_teacherName_1tv2q_23',
  146. teacherContent: '_teacherContent_1tv2q_29',
  147. content: '_content_1tv2q_34',
  148. classNum: '_classNum_1tv2q_37',
  149. className: '_className_1tv2q_41',
  150. musicName: '_musicName_1tv2q_47',
  151. nums: '_nums_1tv2q_52',
  152. numTip: '_numTip_1tv2q_58'
  153. },
  154. T = { name: '_name_nzdqe_1', img: '_img_nzdqe_8', subjects: '_subjects_nzdqe_15' }
  155. function k(e) {
  156. return (
  157. 'function' == typeof e ||
  158. ('[object Object]' === Object.prototype.toString.call(e) && !d(e))
  159. )
  160. }
  161. var z = i({
  162. name: 'teacher',
  163. emits: ['close', 'select'],
  164. setup: function (e, i) {
  165. i.slots, i.attrs
  166. var d = i.emit,
  167. _ = c({
  168. schoolId: null,
  169. list: [],
  170. listState: { dataShow: !0, loading: !1, finished: !1 },
  171. params: { keyword: null, page: 1, rows: 20 },
  172. selectItem: {}
  173. }),
  174. h = (function () {
  175. var e = r(
  176. regeneratorRuntime.mark(function e() {
  177. var n, a, r
  178. return regeneratorRuntime.wrap(
  179. function (e) {
  180. for (;;)
  181. switch ((e.prev = e.next)) {
  182. case 0:
  183. return (
  184. (e.prev = 0),
  185. (e.next = 3),
  186. f.post('/api-school/teacher/page', {
  187. data: t(
  188. t({}, _.params),
  189. {},
  190. { schoolId: m.user.data.school.id }
  191. )
  192. })
  193. )
  194. case 3:
  195. if (
  196. ((n = e.sent),
  197. (_.listState.loading = !1),
  198. (a = n.data || {}),
  199. !(_.list.length > 0 && 1 === a.current))
  200. ) {
  201. e.next = 8
  202. break
  203. }
  204. return e.abrupt('return')
  205. case 8:
  206. ;(r = a.rows || []).forEach(function (e) {
  207. e.subjectNames = e.subjectName ? e.subjectName.split(',') : []
  208. }),
  209. (_.list = _.list.concat(r)),
  210. (_.listState.finished = a.current >= a.pages),
  211. (_.params.page = a.current + 1),
  212. (_.listState.dataShow = _.list.length > 0),
  213. (e.next = 20)
  214. break
  215. case 16:
  216. ;(e.prev = 16),
  217. (e.t0 = e.catch(0)),
  218. (_.listState.dataShow = !1),
  219. (_.listState.finished = !0)
  220. case 20:
  221. case 'end':
  222. return e.stop()
  223. }
  224. },
  225. e,
  226. null,
  227. [[0, 16]]
  228. )
  229. })
  230. )
  231. return function () {
  232. return e.apply(this, arguments)
  233. }
  234. })()
  235. return (
  236. s(function () {
  237. h()
  238. }),
  239. function () {
  240. var e
  241. return o(u, null, [
  242. o(
  243. a,
  244. { position: 'top' },
  245. {
  246. default: function () {
  247. return [
  248. o(n, { title: '交接老师' }, null),
  249. o(
  250. y,
  251. {
  252. placeholder: '请输入老师姓名',
  253. inputBackground: 'white',
  254. background: '#F8F8F8',
  255. onSearch: function (e) {
  256. ;(_.params.keyword = e),
  257. (_.params.page = 1),
  258. (_.list = []),
  259. (_.listState.dataShow = !0),
  260. (_.listState.loading = !1),
  261. (_.listState.finished = !1),
  262. h()
  263. }
  264. },
  265. null
  266. )
  267. ]
  268. }
  269. }
  270. ),
  271. _.listState.dataShow
  272. ? o(
  273. q,
  274. {
  275. loading: _.listState.loading,
  276. 'onUpdate:loading': function (e) {
  277. return (_.listState.loading = e)
  278. },
  279. finished: _.listState.finished,
  280. finishedText: ' ',
  281. class: [T.liveList],
  282. onLoad: h,
  283. immediateCheck: !1
  284. },
  285. k(
  286. (e = _.list.map(function (e) {
  287. return o(
  288. w,
  289. {
  290. onClick: function () {
  291. return (function (e) {
  292. d('select', e), d('close')
  293. })(e)
  294. }
  295. },
  296. {
  297. icon: function () {
  298. return o(S, { class: T.img, src: e.avatar || j }, null)
  299. },
  300. title: function () {
  301. return o('div', { class: T.content }, [
  302. o('p', { class: [T.name, 'van-ellipsis'] }, [e.nickname]),
  303. o('p', { class: T.subjects }, [
  304. e.subjectNames &&
  305. e.subjectNames.length > 0 &&
  306. e.subjectNames.map(function (e) {
  307. return o(
  308. C,
  309. { type: 'primary' },
  310. k(e)
  311. ? e
  312. : {
  313. default: function () {
  314. return [e]
  315. }
  316. }
  317. )
  318. })
  319. ])
  320. ])
  321. }
  322. }
  323. )
  324. }))
  325. )
  326. ? e
  327. : {
  328. default: function () {
  329. return [e]
  330. }
  331. }
  332. )
  333. : o(l, { btnStatus: !1, classImgSize: 'SMALL', tips: '暂无伴学指导' }, null)
  334. ])
  335. }
  336. )
  337. }
  338. })
  339. e(
  340. 'default',
  341. i({
  342. name: 'unbind',
  343. setup: function () {
  344. var e = _(),
  345. t = h(),
  346. i = c({ teacherStatus: !1, classList: [], selectTeacher: {} }),
  347. l = (function () {
  348. var t = r(
  349. regeneratorRuntime.mark(function t() {
  350. var n, a, r
  351. return regeneratorRuntime.wrap(
  352. function (t) {
  353. for (;;)
  354. switch ((t.prev = t.next)) {
  355. case 0:
  356. return (
  357. (t.prev = 0),
  358. (n = e.query),
  359. (t.next = 4),
  360. f.post('/api-school/classGroup/page', {
  361. data: {
  362. teacherId: n.id,
  363. schoolId: m.user.data.school.id,
  364. page: 1,
  365. rows: 100
  366. }
  367. })
  368. )
  369. case 4:
  370. ;(a = t.sent),
  371. (r = a.data),
  372. (i.classList = r.rows || []),
  373. (t.next = 11)
  374. break
  375. case 9:
  376. ;(t.prev = 9), (t.t0 = t.catch(0))
  377. case 11:
  378. case 'end':
  379. return t.stop()
  380. }
  381. },
  382. t,
  383. null,
  384. [[0, 9]]
  385. )
  386. })
  387. )
  388. return function () {
  389. return t.apply(this, arguments)
  390. }
  391. })(),
  392. y = function (e) {
  393. console.log(e, 'steacher'), (i.selectTeacher.sTeacher = e)
  394. },
  395. j = function () {
  396. console.log('submit')
  397. var n = !1,
  398. a = []
  399. if (
  400. (i.classList.forEach(function (e) {
  401. ;(!e.sTeacher || (e.sTeacher && !e.sTeacher.id)) && (n = !0),
  402. e.sTeacher && a.push({ classGroupId: e.id, teacherId: e.sTeacher.id })
  403. }),
  404. n)
  405. )
  406. v('请选择交接老师')
  407. else
  408. try {
  409. N({ title: '提示', message: '是否确认交接', showCancelButton: !0 }).then(
  410. r(
  411. regeneratorRuntime.mark(function n() {
  412. return regeneratorRuntime.wrap(function (n) {
  413. for (;;)
  414. switch ((n.prev = n.next)) {
  415. case 0:
  416. return (
  417. (n.next = 2),
  418. f.post('/api-school/classGroup/handoverTeacher', {
  419. data: {
  420. teacherId: e.query.id,
  421. updateTeacherList: [].concat(a)
  422. }
  423. })
  424. )
  425. case 2:
  426. setTimeout(function () {
  427. v('交接成功')
  428. }, 100),
  429. setTimeout(function () {
  430. t.replace('/companion-teacher')
  431. }, 1e3)
  432. case 4:
  433. case 'end':
  434. return n.stop()
  435. }
  436. }, n)
  437. })
  438. )
  439. )
  440. } catch (c) {}
  441. }
  442. return (
  443. s(function () {
  444. l()
  445. }),
  446. function () {
  447. var e, t
  448. return o(u, null, [
  449. o(n, null, null),
  450. o('div', { class: O.unbindTips }, [
  451. p('该伴学指导存在以下班级及课程未开始,请选择交接老师')
  452. ]),
  453. o(
  454. x,
  455. { inset: !0, class: O.detailCellGroup },
  456. ((t = e =
  457. i.classList.map(function (e) {
  458. return o(
  459. w,
  460. {
  461. center: !0,
  462. class: O.detailCell,
  463. isLink: !0,
  464. onClick: function () {
  465. return (function (e) {
  466. ;(i.teacherStatus = !0), (i.selectTeacher = e)
  467. })(e)
  468. }
  469. },
  470. {
  471. title: function () {
  472. return o('div', { class: O.teacherContent }, [
  473. o('div', { class: O.classInfo }, [
  474. o('p', { class: O.className }, [e.name]),
  475. o('p', { class: O.musicName }, [e.orchestraName])
  476. ]),
  477. o('div', { class: O.classNum }, [
  478. o('p', { class: O.nums }, [
  479. e.courseScheduleNum - e.completeCourseScheduleNum
  480. ]),
  481. o('p', { class: O.numTip }, [p('剩余课时')])
  482. ])
  483. ])
  484. },
  485. value: function () {
  486. return o('span', { class: O.teacherName }, [
  487. e.sTeacher && e.sTeacher.nickname
  488. ])
  489. }
  490. }
  491. )
  492. })),
  493. 'function' == typeof t ||
  494. ('[object Object]' === Object.prototype.toString.call(t) && !d(t))
  495. ? e
  496. : {
  497. default: function () {
  498. return [e]
  499. }
  500. })
  501. ),
  502. o(
  503. a,
  504. { position: 'bottom' },
  505. {
  506. default: function () {
  507. return [
  508. o(
  509. 'div',
  510. {
  511. class: ['btnGroup'],
  512. style: { paddingLeft: '13px', paddingRight: '13px' }
  513. },
  514. [
  515. o(
  516. g,
  517. { type: 'primary', round: !0, block: !0, onClick: j },
  518. {
  519. default: function () {
  520. return [p('确认交接')]
  521. }
  522. }
  523. )
  524. ]
  525. )
  526. ]
  527. }
  528. }
  529. ),
  530. o(
  531. b,
  532. {
  533. modelValue: i.teacherStatus,
  534. 'onUpdate:modelValue': function (e) {
  535. return (i.teacherStatus = e)
  536. }
  537. },
  538. {
  539. default: function () {
  540. return [
  541. o(
  542. z,
  543. {
  544. onClose: function () {
  545. return (i.teacherStatus = !1)
  546. },
  547. onSelect: y
  548. },
  549. null
  550. )
  551. ]
  552. }
  553. }
  554. )
  555. ])
  556. }
  557. )
  558. }
  559. })
  560. )
  561. }
  562. }
  563. }
  564. )
  565. })()