index.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319
  1. <template>
  2. <!-- 'padding-top':navHeight + 57+ 'px' -->
  3. <view :style="{'padding-top':navHeight + 'px'}" style="min-height: 100vh;background: #F5F5F5;" class="u-skeleton">
  4. <u-skeleton :loading="loading" :animation="true"></u-skeleton>
  5. <!-- 弹框 -->
  6. <u-popup v-model="show" mode="center" border-radius="24" width="85%">
  7. <view class="prop-content">
  8. <image src="../../static/image/index/icon_6.png" mode="" class="prop-image"></image>
  9. <view class="prop-title">
  10. {{detailMsg.lesson ? detailMsg.lesson.name :'未知'}}
  11. </view>
  12. <view class="content-item">
  13. <view class="prop-label">
  14. 授课老师:
  15. </view>
  16. <view class="prop-text">
  17. {{detailMsg.teacher.name == undefined ? '未知' : detailMsg.teacher.name}}
  18. </view>
  19. </view>
  20. <view class="content-item">
  21. <view class="prop-label">
  22. 实验室:
  23. </view>
  24. <view class="prop-text">
  25. {{detailMsg.room? detailMsg.room.name : '--'}}
  26. </view>
  27. </view>
  28. <view class="content-item">
  29. <view class="prop-label">
  30. 上课班级:
  31. </view>
  32. <view class="prop-text">
  33. {{detailMsg.grade ?detailMsg.grade.name :'--'}}
  34. </view>
  35. </view>
  36. <view class="content-item">
  37. <view class="prop-label">
  38. 授课方式:
  39. </view>
  40. <view class="prop-text">
  41. {{detailMsg.teach_type == 2 ? '实验' :'理论'}}({{detailMsg.group_name}})
  42. </view>
  43. </view>
  44. <view class="content-item">
  45. <view class="prop-label">
  46. 上课人数:
  47. </view>
  48. <view class="prop-text">
  49. {{detailMsg.student_nums}}人
  50. </view>
  51. </view>
  52. <view class="content-item">
  53. <view class="prop-label">
  54. 上课时间:
  55. </view>
  56. <view class="prop-text">
  57. {{detailMsg.day}} · 第{{detailMsg.week}}周 · {{detailMsg.week_index}} · {{detailMsg.time.name}}节
  58. </view>
  59. </view>
  60. <view class="content-item">
  61. <view class="prop-label">
  62. 上课内容:
  63. </view>
  64. <view class="prop-text">
  65. {{detailMsg.teach_title}}
  66. </view>
  67. </view>
  68. <view class="prop-srue" @click="show=false">
  69. 确定
  70. </view>
  71. </view>
  72. </u-popup>
  73. <!-- 弹框结束 -->
  74. <header-nav>
  75. <view style="font-size:#333333 ;font-weight: 550;font-size: 17px;display: inline-block;">
  76. 首页
  77. </view>
  78. </header-nav>
  79. <!-- :style="{'top':navHeight + 'px'}" -->
  80. <view class="daiban" v-if="hasmessage==1" :style="{'top':navHeight + 'px'}">
  81. <view class="notice-left">
  82. <u-icon name="bell-fill" class="notice-icon" size="34">
  83. </u-icon>
  84. <text> 您有新的未读消息!</text>
  85. </view>
  86. <view class="notice-right" @click="lookMessage">
  87. 立即查看
  88. </view>
  89. </view>
  90. <view class="index" :class="hasmessage==1 ?'has-message' :''">
  91. <view class="index-top">
  92. <view class="top-left">
  93. <view class="num">
  94. {{homeMsg.lesson_total_nums || 0}}
  95. </view>
  96. <view class="text">
  97. 今日教学任务
  98. </view>
  99. </view>
  100. <view class="top-right">
  101. <view class="num">
  102. {{homeMsg.wait_approve_nums || 0}}
  103. </view>
  104. <view class="text">
  105. 待审批任务数
  106. </view>
  107. </view>
  108. </view>
  109. <view class="index-top_2">
  110. <view class="top-left" @click="handleClick"
  111. v-if="$transformAuth('100205')|| $transformAuth('100101')||$transformAuth('100102')">
  112. <view class="num">
  113. <image src="../../static/image/index/icon_5.png" mode="aspectFill"></image>
  114. </view>
  115. <view class="text">
  116. 停调补课
  117. </view>
  118. </view>
  119. <view class="top-left top-middle open-order" @click="openOrder" v-if="$transformAuth('100103') && !is_admin">
  120. <view class="num">
  121. <image src="../../static/image/index/icon_3.png" mode="aspectFill"></image>
  122. </view>
  123. <view class="text">
  124. 预约实验室
  125. </view>
  126. </view>
  127. <view class="top-left top-middle" @click="goOrderlist"
  128. v-if="$transformAuth('100103')|| $transformAuth('100101')||$transformAuth('100102')">
  129. <view class="num">
  130. <image src="../../static/image/index/icon_3.png" mode="aspectFill"></image>
  131. </view>
  132. <view class="text">
  133. 开放预约
  134. </view>
  135. </view>
  136. <view class="top-left top-right" @click="checkAccount" v-if="$transformAuth('100301')">
  137. <view class="num">
  138. <image src="../../static/image/index/icon_4.png" mode="aspectFill"></image>
  139. </view>
  140. <view class="text">
  141. 账号审批
  142. </view>
  143. </view>
  144. </view>
  145. <!-- 实时课表 -->
  146. <view class="content_1" v-if="courseLsit.length>0">
  147. <view class="title">
  148. 今日实时课表
  149. </view>
  150. <view class="table">
  151. <u-tabs :list="courseLsit" count="nums" :offset="[18,7]" :current="currentRoom" @change="change">
  152. </u-tabs>
  153. <view class="table-list">
  154. <view class="table-item complete" @click="courseDetail(item)"
  155. v-for="(item,index) in courseLsit[currentRoom].data" :key="index">
  156. <view class="item-border">
  157. </view>
  158. <view class="">
  159. <view class="room-name">
  160. {{item.lesson == null ? '未知' : item.lesson.name}}({{item.teacher ?item.teacher.name :'未知'}})
  161. </view>
  162. <view class="teacher">
  163. <text style="padding: 2px;">{{item.time.name}}节</text>·<text
  164. style="padding: 2px;">{{item.grade.name}}</text>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. <!-- 通知公告 -->
  172. <view class="content_1">
  173. <view class="title">
  174. 通知公告
  175. </view>
  176. <view class="notice">
  177. <view class="notice-list" v-for="(item,index) in noticeList" :key='index'
  178. @click="noticeDetail(item.id)">
  179. <view class="list-item">
  180. <view class="notice-title">
  181. {{item.name}}
  182. </view>
  183. <view class="notice-time">
  184. <view class="time">
  185. {{item.updated_at}}
  186. </view>
  187. <view class="views">
  188. {{item.view_count}}人已看
  189. </view>
  190. </view>
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. <!-- 今日代办 -->
  196. <view class="content_1"
  197. v-if="$transformAuth('100103')||$transformAuth('100205') || $transformAuth('100301') || $transformAuth('100207')">
  198. <view class="title">
  199. 待审核
  200. <!-- {{$transformAuth('100301') && ($transformAuth('100101') || $transformAuth('100301')) && ($transformAuth('100207') || $transformAuth('100208')) ?'待审核' :'我的申请'}} -->
  201. </view>
  202. <view class="wait">
  203. <u-tabs :list="list " count="sort" :current="currentTab" v-if="$transformAuth('100301')"
  204. bg-color='#F5F5F5' @change="changeTab">
  205. </u-tabs>
  206. <u-tabs :list="teacherList " count="sort" :current="currentTab" v-else bg-color='#F5F5F5'
  207. @change="changeTab">
  208. </u-tabs>
  209. <view class="" v-if="currentTab==0">
  210. <!-- 停调补课申请 -->
  211. <view class="wait-list" v-for="(item,index) in handleList" :key="index">
  212. <view class="wait-title">
  213. <view class="left">
  214. {{item.lesson? item.lesson.name :'--'}}
  215. </view>
  216. <view class="right" @click="lookCheckStep(item)">
  217. <text v-if="item.status == 6" class="status_text"> {{ item.status_text }}</text>
  218. <text class="loading" v-if="item.status == 1 || item.status == 4">
  219. {{ item.status_text }}
  220. </text>
  221. <text class="loading" v-if="item.status == 2">待实验中心审核
  222. </text>
  223. <text class="fail" v-if="item.status == 3 || item.status == 5">
  224. {{ item.status_text }}</text>
  225. <text class="fail" v-if="item.status == 0 || item.status == 7">
  226. {{ item.status_text }}</text>
  227. </view>
  228. </view>
  229. <view class="wait-content">
  230. <view class="content-item">
  231. <view class="label">
  232. 申请人:
  233. </view>
  234. <view class="content-text">
  235. {{item.admin? item.admin.name:'--'}}
  236. </view>
  237. </view>
  238. <view class="content-item">
  239. <view class="label">
  240. 实验室:
  241. </view>
  242. <view class="content-text">
  243. {{ item.schedule_data.room ? item.schedule_data.room.name : '--' }}
  244. </view>
  245. </view>
  246. <view class="content-item">
  247. <view class="label">
  248. 上课时间:
  249. </view>
  250. <view class="content-text">
  251. 第{{ item.schedule_data ? item.schedule_data.week : '--' }}周 / 周{{
  252. item.schedule_data
  253. ? transformWeek(item.schedule_data.week_index)
  254. : '--'
  255. }}({{ item.schedule_data.day }}) /
  256. {{ item.schedule_data.time ? item.schedule_data.time.name : '--' }}节
  257. </view>
  258. </view>
  259. <view class="content-item">
  260. <view class="label">
  261. 申请类型:
  262. </view>
  263. <view class="content-text">
  264. <text style="color:red;" v-if="item.type == 1">停课</text>
  265. <text style="color:#FFAD33 ;" v-if="item.type == 2">调课</text>
  266. <text style="color:#13ce66 ;" v-if="item.type == 3">补课</text>
  267. </view>
  268. </view>
  269. </view>
  270. <view class="wait-time">
  271. <view class="time">
  272. 申请时间:{{item.created_at}}
  273. </view>
  274. <view class="buttom" @click="handleDetail(item.id)">
  275. 查看详情
  276. </view>
  277. </view>
  278. </view>
  279. </view>
  280. <!-- 开放预约申请 -->
  281. <view class="" v-if="currentTab==1">
  282. <!-- 停调补课申请 -->
  283. <view class="wait-list" v-for="(item,index) in openOrderList" :key="index">
  284. <view class="wait-title">
  285. <view class="left">
  286. <text v-if="item.template == 1">外院正常上班</text>
  287. <text v-if="item.template == 2">外院非正常上班</text>
  288. <text v-if="item.template == 3">信息技术学院教师</text>
  289. </view>
  290. <view class="right" @click="lookOpenCheckStep(item)">
  291. <text v-if="item.status == 7" class="status_text"> {{ item.status_text }}</text>
  292. <text class="loading"
  293. v-if=" item.status == 1 ||item.status == 2 ||item.status == 5 ||item.status == 3">
  294. {{ item.status_text }}
  295. </text>
  296. <text class="fail" v-if="item.status == 6 || item.status == 8 || item.status == 4">
  297. {{ item.status_text }}</text>
  298. <text class="fail" v-if="item.status == 0 ">
  299. {{ item.status_text }}</text>
  300. </view>
  301. </view>
  302. <view class="wait-content">
  303. <view class="content-item">
  304. <view class="label">
  305. 申请人:
  306. </view>
  307. <view class="content-text">
  308. {{item.applicant_name || '--'}}({{item.applicant_mobile || '--'}})
  309. </view>
  310. </view>
  311. <!-- <view class="content-item">
  312. <view class="label">
  313. 联系方式:
  314. </view>
  315. <view class="content-text">
  316. {{item.applicant_mobile || '--'}}
  317. </view>
  318. </view> -->
  319. <view class="content-item">
  320. <view class="label">
  321. 申请人部门:
  322. </view>
  323. <view class="content-text">
  324. {{ item.department || '--'}}
  325. </view>
  326. </view>
  327. <view class="content-item">
  328. <view class="label">
  329. 使用人数:
  330. </view>
  331. <view class="content-text">
  332. {{item.use_people_nums || '--'}}人
  333. </view>
  334. </view>
  335. <view class="content-item">
  336. <view class="label">
  337. 申请节数:
  338. </view>
  339. <view class="content-text">
  340. <!-- <u-tag :text="item.use_data.length" mode="light" size="mini" /> 节 -->
  341. {{item.use_data.length}}节
  342. </view>
  343. </view>
  344. <!-- <view class="content-item">
  345. <view class="label">
  346. 申请类型:
  347. </view>
  348. <view class="content-text">
  349. <text style="color:red;" v-if="item.type == 1">停课</text>
  350. <text style="color:#FFAD33 ;" v-if="item.type == 2">调课</text>
  351. <text style="color:#13ce66 ;" v-if="item.type == 3">补课</text>
  352. </view>
  353. </view> -->
  354. </view>
  355. <view class="wait-time">
  356. <view class="time">
  357. 申请时间:{{item.created_at}}
  358. </view>
  359. <view class="buttom" @click="openOrderDetail(item.id)">
  360. 查看详情
  361. </view>
  362. </view>
  363. </view>
  364. </view>
  365. <!-- 账号审核 -->
  366. <view class="" v-if="currentTab==2">
  367. <view class="message">
  368. <view class="msg-li" v-for="(item,index) in accountList" :key="index">
  369. <view class="li-top">
  370. <text style="font-size: 15px;font-weight: bold;color: #333333;">{{item.name}}
  371. {{item.mobile}}</text>
  372. <text style="font-size: 12px;font-weight: 400;color: #FFAD33;"
  373. v-if="item.check_status==0">待审核</text>
  374. <image src="/static/image/record/tongguo.png"
  375. style="width: 55px;height: 55px;margin-bottom: -38px;"
  376. v-if="item.check_status==1"></image>
  377. <image src="/static/image/record/shibai.png"
  378. style="width: 55px;height: 55px;margin-bottom: -38px;"
  379. v-if="item.check_status==2"></image>
  380. </view>
  381. <view class="li-center">
  382. <text>部门:{{item.department}}</text>
  383. <text>工号:{{item.account}}</text>
  384. </view>
  385. <view class="li-bottom">
  386. <text
  387. style="font-size: 13px;font-weight: 400;color: #333;">申请时间:{{item.created_at}}</text>
  388. <view @click="showTrue(item.id,item.check_status,item.check_result)"
  389. v-if="item.check_status!=1">
  390. <text>审核</text>
  391. </view>
  392. </view>
  393. </view>
  394. </view>
  395. </view>
  396. <view class="empty" style="padding-top: 20px;"
  397. v-if="(currentTab==0 && handleList.length==0) ||(currentTab==1 && openOrderList.length==0)|| (currentTab==2 && accountList.length==0)">
  398. <u-empty text="暂无申请" mode="list"></u-empty>
  399. </view>
  400. </view>
  401. </view>
  402. <!-- 账号审核弹窗 -->
  403. <view class="pop-bj" v-show="accountSshow"></view>
  404. <view class="pop" v-if="accountSshow">
  405. <image src="/static/image/record/laba.png" mode="" style="width: 91px;height: 68px;margin-top: -34px;">
  406. </image>
  407. <text class="txt1">温馨提示</text>
  408. <text class="txt2">是否确定通过审核?</text>
  409. <view class="pop-btn">
  410. <view @click="accountSshow=false" style="background: #F5F5F5;color: #333333;">
  411. <text>取消</text>
  412. </view>
  413. <view style="background: #3665FF;color: #fff;" @click="confirm">
  414. <text>确定</text>
  415. </view>
  416. </view>
  417. </view>
  418. </view>
  419. </view>
  420. </template>
  421. <script>
  422. var app = getApp()
  423. export default {
  424. data() {
  425. return {
  426. homeMsg: '', //首页的数据
  427. show: false,
  428. accountSshow: false,
  429. navHeight: app.globalData.navHeight,
  430. currentRoom: 0,
  431. currentTab: 0,
  432. page: 1,
  433. last: false,
  434. room_id: 0,
  435. list: [{
  436. name: '停/调/补课审核',
  437. }, {
  438. name: '开放预约审核',
  439. }, {
  440. name: '账号申请审核',
  441. }, ],
  442. teacherList: [{
  443. name: '停/调/补课审核',
  444. }, {
  445. name: '开放预约审核',
  446. }],
  447. courseLsit: [],
  448. noticeList: [1, 2],
  449. detailMsg: '',
  450. handleList: [], //停调补课申请列表
  451. openOrderList: [], //开放预约申请
  452. accountList: [], //账号审批列表
  453. // 账号审核弹框表单
  454. id: '',
  455. status: '',
  456. result: '',
  457. hasmessage: 0, //是否有未读消息
  458. checkStepShow: true, //审核进度弹框
  459. loading: true,
  460. a_total_page: 1,
  461. b_total_page: 1,
  462. c_total_page: 1,
  463. is_monitor: false,
  464. is_polling: false,
  465. is_admin: false,
  466. }
  467. },
  468. async onLoad() {
  469. console.log(this.$u.http.config.baseUrl, '.$u.http')
  470. await this.checkRole();
  471. await this.getHome();
  472. await this.getHandle();
  473. },
  474. onShow() {
  475. console.log(this.vuex_term_id, 'vuex_term_idvuex_term_idvuex_term_idvuex_term_id')
  476. // this.page = 1
  477. // this.last = false
  478. // this.currentTab = 0
  479. // this.handleList = []
  480. },
  481. onPullDownRefresh() {
  482. this.day = ''
  483. this.page = 1;
  484. this.last = false
  485. // this.handleList = [] //停调补课申请列表
  486. // this.openOrderList = [] //开放预约申请
  487. // this.accountList = [] //账号审批列表
  488. if (this.currentTab == 0) {
  489. this.getHandle()
  490. }
  491. if (this.currentTab == 1) {
  492. this.getOpenOrder()
  493. }
  494. if (this.currentTab == 2) {
  495. this.getAccountOrder()
  496. }
  497. this.getHome();
  498. uni.stopPullDownRefresh()
  499. },
  500. onReachBottom() {
  501. if (!this.last) {
  502. console.log(this.last, 'this.last')
  503. this.page++
  504. if (this.currentTab == 0 && this.a_total_page > this.page) {
  505. console.log(123)
  506. this.getHandle()
  507. }
  508. if (this.currentTab == 1 && this.b_total_page > this.page) {
  509. this.getOpenOrder()
  510. }
  511. if (this.currentTab == 2 && this.c_total_page > this.page) {
  512. this.getAccountOrder()
  513. }
  514. }
  515. },
  516. methods: {
  517. //判断权限
  518. checkRole() {
  519. let status = false
  520. let roles = this.$store.state.vuex_user.roles
  521. let arr = []
  522. roles.map(item => {
  523. arr.push(item.name)
  524. })
  525. let index = arr.indexOf('polling')
  526. if (index >= 0) this.is_polling = true
  527. let index2 = arr.indexOf('monitor')
  528. if (index2 >= 0) this.is_monitor = true
  529. let index3 = arr.indexOf('admin')
  530. if (index3 >= 0) this.is_admin = true
  531. console.log(index, index2, index3)
  532. },
  533. //查看停调补课审核进度
  534. lookCheckStep(item) {
  535. console.log(11)
  536. uni.navigateTo({
  537. url: '/pages/index/checkStep?id=' + item.id + '&time=' + item.created_at + '&apply_name=' +
  538. (item.admin ? item.admin.name : '--')
  539. })
  540. },
  541. //查看开放预约审核进度
  542. lookOpenCheckStep(item) {
  543. uni.navigateTo({
  544. url: '/pages/index/openCheckStep?id=' + item.id + '&time=' + item.created_at + '&enlength=' +
  545. item.enclosure.length + '&apply_name=' +
  546. (item.admin ? item.admin.name : '--')
  547. })
  548. },
  549. //获取用户未读消息
  550. getUserMessage() {
  551. this.$u.get('/news/message/user-message?is_read=0').then(res => {
  552. if (resd.data.list.length > 0) this.hasmessage = 1
  553. else this.hasmessage = 0
  554. })
  555. },
  556. //未读信息
  557. lookMessage() {
  558. uni.navigateTo({
  559. url: '/pages/laboratory/history'
  560. })
  561. },
  562. //通过审核
  563. showTrue(id, status, result) {
  564. this.accountSshow = true;
  565. this.id = id;
  566. this.status = status;
  567. this.result = result
  568. },
  569. confirm() {
  570. //确定通过审核,
  571. this.$u.post('/lab/account/check', {
  572. id: this.id,
  573. check_status: this.status,
  574. check_result: this.result,
  575. type: 3
  576. }).then(res => {
  577. console.log(res)
  578. this.$u.toast('审核成功');
  579. this.accountSshow = false;
  580. }).catch(err => {
  581. console.log(err)
  582. this.accountSshow = false;
  583. })
  584. },
  585. //转换日期
  586. transformWeek(week) {
  587. switch (week) {
  588. case 0:
  589. return '一'
  590. case 1:
  591. return '二'
  592. case 2:
  593. return '三'
  594. case 3:
  595. return '四'
  596. case 4:
  597. return '五'
  598. case 5:
  599. return '六'
  600. case 6:
  601. return '日'
  602. }
  603. },
  604. //获取账号待审批列表
  605. getAccountOrder() {
  606. let data = {
  607. status: 2,
  608. page: this.page
  609. }
  610. this.$u.get('/lab/account', data).then(res => {
  611. let data = res.data.list;
  612. this.c_total_page = res.data.meta.pagination.total_pages;
  613. if (data.length == 0) {
  614. this.last = true
  615. } else {
  616. this.accountList = this.accountList.concat(data)
  617. }
  618. })
  619. },
  620. //获取开放预约待审批
  621. getOpenOrder() {
  622. // "100101": "院系开放预约审核权限",
  623. // "100102": "实验中心开放预约审核权限",
  624. //2实验中心
  625. //3院系
  626. let status = 0
  627. if (this.$transformAuth('100101') && this.$transformAuth('100102')) status = '2,3'
  628. // 院系开放预约审核权限
  629. if (this.$transformAuth('100101') && !this.$transformAuth('100102')) status = '3'
  630. // 实验中心开放预约审核权限
  631. if (!this.$transformAuth('100101') && this.$transformAuth('100102')) status = '2'
  632. let data = {
  633. status: status,
  634. page: this.page
  635. }
  636. this.$u.get('/lab/open-appointment', data).then(res => {
  637. let data = res.data.list;
  638. this.b_total_page = res.data.meta.pagination.total_pages;
  639. console.log(res, 'course1')
  640. if (data.length == 0) {
  641. this.last = true
  642. } else {
  643. this.openOrderList = this.openOrderList.concat(data)
  644. }
  645. })
  646. },
  647. //获取停调补课待审核
  648. async getHandle() {
  649. // 1"待院系审核",
  650. //2"院系审核成功,待实验中心审核",
  651. // "100207": "院系审核排课权限",
  652. //"100208": "实验中心审核排课权限",
  653. let status = 0
  654. if (this.$transformAuth('100207') && this.$transformAuth('100208')) status = '1,2'
  655. // 院系开放预约审核权限
  656. if (this.$transformAuth('100207') && !this.$transformAuth('100208')) status = 1
  657. // 实验中心开放预约审核权限
  658. if (!this.$transformAuth('100207') && this.$transformAuth('100208')) status = 2
  659. console.log(status)
  660. let data = {
  661. status: status,
  662. page: this.page
  663. }
  664. await this.$u.get('/school/schedule/record', data).then(res => {
  665. let data = res.data.list;
  666. this.a_total_page = res.data.meta.pagination.total_pages;
  667. console.log(res, 'course1')
  668. if (data.length == 0) {
  669. this.last = true
  670. } else {
  671. this.handleList = this.handleList.concat(data)
  672. }
  673. })
  674. },
  675. //查看停调补课详情
  676. handleDetail(id) {
  677. uni.navigateTo({
  678. url: '/pages/record/tutorialDetail?id=' + id
  679. })
  680. },
  681. //开放预约相亲
  682. openOrderDetail(id) {
  683. uni.navigateTo({
  684. url: '/pages/record/reserveDetail?id=' + id
  685. })
  686. },
  687. //获取首页接口
  688. async getHome() {
  689. uni.showLoading()
  690. let dataTime
  691. let yy = new Date().getFullYear();
  692. let mm = (new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() +
  693. 1);
  694. let dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate();
  695. dataTime = `${yy}-${mm}-${dd}`;
  696. await this.$u.get('/lab/home-mobile', {
  697. day: '2022-06-01',
  698. room_id: this.room_id
  699. }).then(res => {
  700. console.log(res, 'home')
  701. this.noticeList = res.data.notices.list;
  702. this.homeMsg = res.data;
  703. this.loading = false;
  704. var lesson = res.data.lessons;
  705. for (var i = 0; i < lesson.length; i++) {
  706. for (var j = 0; j < lesson[i].data.length; j++) {
  707. if (lesson[i].data[j].week_index == 0) {
  708. lesson[i].data[j].week_index = '星期一'
  709. }
  710. if (lesson[i].data[j].week_index == 1) {
  711. lesson[i].data[j].week_index = '星期二'
  712. }
  713. if (lesson[i].data[j].week_index == 2) {
  714. lesson[i].data[j].week_index = '星期三'
  715. }
  716. if (lesson[i].data[j].week_index == 3) {
  717. lesson[i].data[j].week_index = '星期四'
  718. }
  719. if (lesson[i].data[j].week_index == 4) {
  720. lesson[i].data[j].week_index = '星期五'
  721. }
  722. if (lesson[i].data[j].week_index == 5) {
  723. lesson[i].data[j].week_index = '星期六'
  724. }
  725. if (lesson[i].data[j].week_index == 6) {
  726. lesson[i].data[j].week_index = '星期日'
  727. }
  728. }
  729. }
  730. console.log(lesson)
  731. this.courseLsit = lesson;
  732. uni.hideLoading()
  733. })
  734. },
  735. //选择当前实验室
  736. change(item) {
  737. this.currentRoom = item;
  738. },
  739. changeTab(item) {
  740. console.log(123)
  741. this.currentTab = item
  742. this.page = 1
  743. this.last = false
  744. if (item == 0) {
  745. this.page = 1
  746. this.last = false
  747. this.handleList = []
  748. this.getHandle()
  749. }
  750. if (item == 1) {
  751. this.page = 1
  752. this.last = false
  753. this.openOrderList = []
  754. this.getOpenOrder()
  755. }
  756. if (item == 2) {
  757. this.page = 1
  758. this.last = false
  759. this.accountList = [];
  760. this.getAccountOrder()
  761. }
  762. },
  763. //停调补课管理
  764. handleClick() {
  765. uni.navigateTo({
  766. url: '/pages/record/myClssList'
  767. })
  768. },
  769. //开放预约管理
  770. openOrder() {
  771. uni.navigateTo({
  772. url: '/pages/index/openOrder'
  773. })
  774. },
  775. //开放预约列表
  776. goOrderlist() {
  777. uni.navigateTo({
  778. url: '/pages/record/reserve'
  779. })
  780. },
  781. //账号审核
  782. checkAccount() {
  783. uni.navigateTo({
  784. url: '/pages/record/userApproval'
  785. })
  786. },
  787. //通知公告详情
  788. noticeDetail(id) {
  789. uni.navigateTo({
  790. url: '/pages/mine/noticeDetail?id=' + id
  791. })
  792. },
  793. //点击查看课程详情
  794. courseDetail(msg) {
  795. this.show = true;
  796. this.detailMsg = msg;
  797. }
  798. }
  799. }
  800. </script>
  801. <style lang="scss" scoped>
  802. // u-tabs{
  803. // border-radius: 8px!important;
  804. // }
  805. //弹框样式
  806. .prop-image {
  807. // position: absolute;
  808. // top: -50px;
  809. height: 68px;
  810. width: 90px;
  811. margin-top: -54px;
  812. position: fixed;
  813. }
  814. .prop-content {
  815. padding: 15px;
  816. display: flex;
  817. flex-direction: column;
  818. align-items: center;
  819. .prop-title {
  820. text-align: center;
  821. font-size: 18px;
  822. margin-bottom: 5px;
  823. font-weight: bold;
  824. color: #333333;
  825. margin-top: 30px;
  826. }
  827. .content-item {
  828. display: flex;
  829. color: #333333;
  830. margin-top: 8px;
  831. width: 100%;
  832. .prop-label {
  833. flex: 0 0 80px;
  834. font-size: 15px;
  835. font-weight: 550;
  836. }
  837. .prop-content {
  838. font-size: 15px;
  839. }
  840. }
  841. .prop-srue {
  842. width: 279px;
  843. height: 44px;
  844. background: #3665FF;
  845. text-align: center;
  846. margin-top: 30px;
  847. line-height: 44px;
  848. color: #FFFFFF;
  849. border-radius: 22px 22px 22px 22px;
  850. font-size: 16px;
  851. margin-bottom: 5px;
  852. }
  853. }
  854. //弹框样式结束
  855. .index {
  856. font-size: 14px;
  857. padding: 15px;
  858. background-color: #F5F5F5;
  859. }
  860. .has-message {
  861. padding-top: 57px;
  862. }
  863. .daiban {
  864. height: 42px;
  865. line-height: 42px;
  866. background: #d6dfff;
  867. color: #3665FF;
  868. padding: 0 15px;
  869. display: flex;
  870. align-items: center;
  871. position: fixed;
  872. width: 100%;
  873. left: 0;
  874. .notice-left {
  875. flex: 1;
  876. .notice-icon {
  877. display: inline-block;
  878. vertical-align: top;
  879. margin-right: 5px;
  880. }
  881. text {
  882. display: inline-block;
  883. vertical-align: top;
  884. }
  885. }
  886. .notice-right {
  887. display: inline-block;
  888. padding: 0 10px;
  889. background-color: #fff;
  890. height: 24px;
  891. font-size: 12px;
  892. border-radius: 12px;
  893. line-height: 24px;
  894. }
  895. }
  896. .index-top {
  897. display: flex;
  898. color: #FFFFFF;
  899. .top-left {
  900. margin-right: 11px;
  901. background-image: url(../../static/image/index/icon_1.png);
  902. background-position: center;
  903. background-size: 100%;
  904. background-repeat: no-repeat;
  905. }
  906. .top-right {
  907. background-image: url(../../static/image/index/icon_2.png);
  908. background-position: center;
  909. background-size: 100%;
  910. background-repeat: no-repeat;
  911. }
  912. .top-middle {
  913. margin-right: 11px;
  914. }
  915. .top-left,
  916. .top-right {
  917. flex: 1;
  918. height: 85px;
  919. text-align: center;
  920. }
  921. .num {
  922. font-size: 24px;
  923. font-weight: bold;
  924. margin-bottom: 5px;
  925. margin-top: 16px;
  926. }
  927. .text {
  928. font-size: 14px;
  929. font-weight: 400;
  930. }
  931. }
  932. .index-top_2 {
  933. display: flex;
  934. color: #FFFFFF;
  935. margin-top: 12px;
  936. .top-left {
  937. margin-right: 11px;
  938. background: linear-gradient(268deg, #FF9748 0%, #FF760D 100%);
  939. background-size: 100%;
  940. }
  941. .top-right {
  942. background: linear-gradient(268deg, #6B93F9 0%, #4376F8 100%);
  943. background-size: 100%;
  944. }
  945. .top-middle {
  946. background: linear-gradient(90deg, #24B54E 0%, #4DC671 100%);
  947. // margin-right: 11px;
  948. }
  949. .open-order {
  950. background: linear-gradient(90deg, #eccd46 0%, #eccd46 100%);
  951. }
  952. .top-left,
  953. .top-right,
  954. .top-middle {
  955. border-radius: 15px;
  956. flex: 1;
  957. height: 85px;
  958. text-align: center;
  959. }
  960. .top-left:last-child{
  961. margin-right: 0;
  962. }
  963. .num {
  964. font-size: 24px;
  965. font-weight: bold;
  966. margin-bottom: 5px;
  967. margin-top: 16px;
  968. image {
  969. height: 24px;
  970. width: 24px;
  971. }
  972. }
  973. .text {
  974. font-size: 14px;
  975. font-weight: 400;
  976. }
  977. }
  978. .content_1 {
  979. margin-top: 25px;
  980. .title {
  981. font-size: 16px;
  982. font-weight: bold;
  983. color: #333333;
  984. }
  985. .table {
  986. margin-top: 12px;
  987. border-radius: 8px;
  988. background-color: #FFFFFF;
  989. overflow: hidden;
  990. .table-item {
  991. padding: 15px 12px;
  992. border-top: solid 1px #F2F2F2;
  993. display: flex;
  994. .item-border {
  995. width: 4px;
  996. background-color: #30D143;
  997. border-radius: 2px;
  998. margin-right: 8px;
  999. }
  1000. .room-name {
  1001. margin-bottom: 5px;
  1002. color: #333333;
  1003. }
  1004. .teacher {
  1005. color: #999999;
  1006. font-size: 12px;
  1007. width: 100%;
  1008. // word-wrap: break-word;
  1009. // white-space: nowrap;
  1010. // overflow: hidden;
  1011. // text-overflow: ellipsis;
  1012. display: -webkit-box;
  1013. -webkit-box-orient: vertical;
  1014. -webkit-line-clamp: 1;
  1015. overflow: hidden;
  1016. }
  1017. .status_1 {
  1018. background-color: #FCBD12;
  1019. }
  1020. .status_2 {
  1021. background-color: #30D143;
  1022. }
  1023. }
  1024. }
  1025. .notice {
  1026. margin-top: 12px;
  1027. border-radius: 8px;
  1028. background-color: #FFFFFF;
  1029. overflow: hidden;
  1030. .notice-list {
  1031. padding: 12px;
  1032. border-bottom: solid 1px #E0E0E0;
  1033. .notice-title {
  1034. font-size: 15px;
  1035. font-weight: bold;
  1036. color: #333333;
  1037. }
  1038. .notice-time {
  1039. display: flex;
  1040. color: #9F9F9F;
  1041. margin-top: 10px;
  1042. font-size: 12px;
  1043. view {
  1044. flex: 1;
  1045. }
  1046. .views {
  1047. text-align: right;
  1048. }
  1049. }
  1050. }
  1051. .notice-list:last-child {
  1052. border: none;
  1053. }
  1054. }
  1055. .wait {
  1056. .wait-list {
  1057. background-color: #FFFFFF;
  1058. border-radius: 8px;
  1059. overflow: hidden;
  1060. margin-bottom: 20px;
  1061. }
  1062. .wait-title {
  1063. display: flex;
  1064. padding: 12px;
  1065. .left {
  1066. flex: 1;
  1067. font-size: 15px;
  1068. font-weight: bold;
  1069. color: #333333;
  1070. }
  1071. .right {
  1072. font-size: 12px;
  1073. font-weight: 400;
  1074. color: #FFAD33;
  1075. }
  1076. }
  1077. .wait-content {
  1078. border-bottom: solid 1px #F2F2F2;
  1079. border-top: solid 1px #F2F2F2;
  1080. padding: 12px;
  1081. .content-item {
  1082. display: flex;
  1083. line-height: 22px;
  1084. }
  1085. }
  1086. .wait-time {
  1087. padding: 12px;
  1088. display: flex;
  1089. align-items: center;
  1090. .time {
  1091. flex: 1;
  1092. }
  1093. .buttom {
  1094. padding: 5px 8px;
  1095. background-color: #3665FF;
  1096. color: #FFFFFF;
  1097. font-size: 12px;
  1098. border-radius: 26px;
  1099. }
  1100. }
  1101. }
  1102. }
  1103. .message {
  1104. width: 91.5%;
  1105. display: flex;
  1106. flex-direction: column;
  1107. margin: 0 auto;
  1108. // padding-top: 122px;
  1109. .msg-li {
  1110. width: 100%;
  1111. display: flex;
  1112. flex-direction: column;
  1113. padding: 12px 12px 9px 12px;
  1114. box-sizing: border-box;
  1115. background: white;
  1116. margin-top: 12px;
  1117. .li-top {
  1118. width: 100%;
  1119. display: flex;
  1120. align-items: center;
  1121. justify-content: space-between;
  1122. padding-bottom: 12px;
  1123. }
  1124. .li-center {
  1125. padding: 12px 0px;
  1126. border-top: 1px solid #F2F2F2;
  1127. border-bottom: 1px solid #F2F2F2;
  1128. display: flex;
  1129. flex-direction: column;
  1130. height: 63px;
  1131. justify-content: space-between;
  1132. font-size: 13px;
  1133. color: #333;
  1134. font-weight: 400;
  1135. }
  1136. .li-bottom {
  1137. display: flex;
  1138. align-items: center;
  1139. justify-content: space-between;
  1140. margin-top: 9px;
  1141. view {
  1142. width: 64px;
  1143. height: 28px;
  1144. background: #3665FF;
  1145. border-radius: 14px 14px 14px 14px;
  1146. opacity: 1;
  1147. display: flex;
  1148. align-items: center;
  1149. justify-content: center;
  1150. font-size: 12px;
  1151. color: #FFFFFF;
  1152. font-weight: 400;
  1153. }
  1154. }
  1155. }
  1156. }
  1157. // 账号审核弹框
  1158. .pop-bj {
  1159. width: 100vw;
  1160. height: 100vh;
  1161. background: #000000;
  1162. opacity: 0.6;
  1163. z-index: 2;
  1164. position: fixed;
  1165. top: 0;
  1166. left: 0;
  1167. }
  1168. .pop {
  1169. width: 327px;
  1170. height: 201px;
  1171. background: #FFFFFF;
  1172. border-radius: 12px 12px 12px 12px;
  1173. opacity: 1;
  1174. position: fixed;
  1175. transform: translate(-50%, -50%);
  1176. background: white;
  1177. z-index: 2;
  1178. top: 50%;
  1179. left: 50%;
  1180. display: flex;
  1181. flex-direction: column;
  1182. align-items: center;
  1183. .txt1 {
  1184. font-size: 18px;
  1185. font-weight: bold;
  1186. color: #333;
  1187. padding-top: 16px;
  1188. }
  1189. .txt2 {
  1190. padding-top: 16px;
  1191. font-size: 16px;
  1192. color: #333;
  1193. font-weight: 400;
  1194. }
  1195. .pop-btn {
  1196. margin-top: 24px;
  1197. width: 84%;
  1198. display: flex;
  1199. align-items: center;
  1200. justify-content: space-between;
  1201. view {
  1202. display: flex;
  1203. align-items: center;
  1204. justify-content: center;
  1205. width: 130px;
  1206. height: 44px;
  1207. font-size: 16px;
  1208. font-weight: bold;
  1209. border-radius: 22px;
  1210. opacity: 1;
  1211. }
  1212. }
  1213. }
  1214. .status_text,
  1215. .loading,
  1216. .fail {
  1217. display: inline-block;
  1218. padding-bottom: 3px;
  1219. cursor: pointer;
  1220. padding: 0 3px;
  1221. color: #13ce66;
  1222. // border-bottom: solid 2px #13ce66;
  1223. }
  1224. .loading {
  1225. color: #ffba00;
  1226. // border-bottom: solid 2px #ffba00;
  1227. }
  1228. .fail {
  1229. color: #ff4d4f;
  1230. // border-bottom: solid 2px #ff4d4f;
  1231. }
  1232. </style>