You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

503 lines
10 KiB

  1. <template>
  2. <view class="page">
  3. <view class="timeTable_sec3">
  4. <view class="tSec3Box">
  5. <view class="tSec3Time"><text></text> {{ pageInfo.lessonDate }} 第{{ pageInfo.jc }}节 <text></text></view>
  6. </view>
  7. </view>
  8. <view class="timeTable_sec4">
  9. <view class="tSec4Box">
  10. <view class="tSec4T">
  11. <div>{{ pageInfo.curriculum }}</div>
  12. </view>
  13. <view class="tSec4Con">
  14. <view class="studSeeSec2Txt" id="shouldArrive">
  15. <text class="text-xxl cuIcon cuIcon-profile"></text> {{ pageInfo.teacher }}
  16. <text class="text-xxl cuIcon cuIcon-locationfill" style="margin-left: 10px;"></text>
  17. {{ pageInfo.classRoomNo }}
  18. <view><text>应到</text> {{ weekData.records }} </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="statusType">
  24. <view>
  25. <view class="statusTypeLi sStatue1"><text></text>准时</view>
  26. <view class="statusTypeLi sStatue2"><text></text>早退</view>
  27. <view class="statusTypeLi sStatue3"><text></text>旷课</view>
  28. <view class="statusTypeLi sStatue4"><text></text>病假</view>
  29. <view class="statusTypeLi sStatue5"><text></text>迟到</view>
  30. <view class="statusTypeLi sStatue6"><text></text>事假</view>
  31. </view>
  32. </view>
  33. <view class="timeTable_sec2">
  34. <view class="timeTableList">
  35. <view v-if="weekData.rows.length == 0">暂时没有信息</view>
  36. <view v-if="weekData.rows.length != 0">
  37. <view :class="timeTableClass(k.Sort)" class="timeTableLi" v-for="(k, i) in weekData.rows"
  38. :key="k.StuNo" @click="tapTimeTable(i, timeTableClass(k.Sort))">
  39. <view>{{ k.StuName }} <text class="text-xxl cuIcon cuIcon-ellipse"></text></view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="timeTableAlert" :class="flag? 'active' : ''">
  45. <view class="timeTableAlertTop">
  46. <view class="timeTableAlertT">{{ weekData.rows[ind].StuName }}</view>
  47. <view class="timeTableAlertTxt">学号: {{ weekData.rows[ind].StuNo }} </view>
  48. </view>
  49. <view class="timeTableAlertList">
  50. <view v-for="(n, i) in Statue" :key="i"
  51. :class="n.className == className? 'active ' + n.className : n.className" class="timeTableAlertLi"
  52. @click="tapStatus(i)"><text></text>{{ n.txt }}</view>
  53. </view>
  54. </view>
  55. <view class="timeTableAlertZ" v-show="flag" @click="flag = false"></view>
  56. <view class="timeTableBtn" @click="tapBtn">确定</view>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. data() {
  62. return {
  63. pageInfo: {},
  64. weekData: {},
  65. flag: false,
  66. data: {},
  67. className: '',
  68. ind: 0,
  69. Statue: [{
  70. className: 'sStatue1',
  71. num: '0',
  72. txt: '准时'
  73. },
  74. {
  75. className: 'sStatue5',
  76. num: '1',
  77. txt: '迟到'
  78. },
  79. {
  80. className: 'sStatue2',
  81. num: '2',
  82. txt: '早退'
  83. },
  84. {
  85. className: 'sStatue4',
  86. num: '3',
  87. txt: '病假'
  88. },
  89. {
  90. className: 'sStatue6',
  91. num: '4',
  92. txt: '事假'
  93. },
  94. {
  95. className: 'sStatue3',
  96. num: '5',
  97. txt: '旷课'
  98. }
  99. ]
  100. }
  101. },
  102. methods: {
  103. init() {
  104. let _this = this;
  105. let _postParam = {
  106. pagination: {
  107. rows: "1000",
  108. page: "1",
  109. sidx: 'ClassNo',
  110. sord: 'DESC'
  111. },
  112. queryJson: JSON.stringify({
  113. year: _this.pageInfo.academicyear,
  114. semester: _this.pageInfo.semester,
  115. empno: _this.pageInfo.empno,
  116. lessonNo: _this.pageInfo.lessonNo,
  117. teachClassNo: _this.pageInfo.teachClassNo,
  118. lessonTime: _this.pageInfo.lessonTime,
  119. LessonSortNo: _this.pageInfo.lessonSortNo,
  120. })
  121. };
  122. _this.LOADING('加载数据中…');
  123. _this.HTTP_GET('/teachattendance/students', _postParam, '加载数据时出错').then(res => {
  124. this.HIDE_LOADING();
  125. console.log(res);
  126. _this.weekData = _this.COPY(res);
  127. });
  128. },
  129. tapTimeTable(num, str) {
  130. this.className = str;
  131. this.ind = num;
  132. this.flag = true;
  133. },
  134. tapStatus(num) {
  135. this.weekData.rows[this.ind].Sort = this.Statue[num].txt;
  136. this.weekData.rows[this.ind].kqType = this.Statue[num].num;
  137. this.flag = false;
  138. },
  139. tapBtn() {
  140. let _this = this;
  141. _this.weekData.rows.forEach((n, i) => {
  142. n.kqType = n.kqType != null ? n.kqType : '0'
  143. });
  144. _this.LOADING('保存数据中…');
  145. _this.HTTP_POST('/Learun/adms/EducationalAdministration/StuAttendanceLeave/apply', {
  146. lessonTime: _this.pageInfo.lessonTime,
  147. lessonDate: _this.pageInfo.lessonDate,
  148. classRoomNo: _this.pageInfo.classRoomNo,
  149. dataJson: JSON.stringify(_this.weekData.rows)
  150. }, '加载数据时出错').then(res => {
  151. _this.HIDE_LOADING();
  152. console.log(res.Result);
  153. if (res) {
  154. _this.TOAST('提交成功', 'success',_this.init());
  155. // _this.init();
  156. }
  157. });
  158. // _this.CONFIRM('数字化校园提示', '无法获取小程序登录授权码', true).then(res => {
  159. // // console.log(_this.weekData.rows)
  160. // if(res){
  161. // _this.LOADING('保存数据中…');
  162. // }
  163. // })
  164. }
  165. },
  166. computed: {
  167. timeTableClass() {
  168. return str => {
  169. return !str ? 'sStatue1' : str == "准时" ? 'sStatue1' : str == "早退" ? 'sStatue2' : str == "旷课" ?
  170. 'sStatue3' : str == "病假" ? 'sStatue4' : str == "迟到" ? 'sStatue5' : 'sStatue6';
  171. };
  172. }
  173. },
  174. created() {
  175. this.pageInfo = this.GET_PARAM(); //获取页面传递参数
  176. console.log(this.pageInfo)
  177. this.init();
  178. }
  179. }
  180. </script>
  181. <style lang="less" scoped>
  182. #semester2 {
  183. margin-bottom: 10px;
  184. }
  185. #weekTime2 text {
  186. margin: 0 10px;
  187. }
  188. .timeTable_sec2 {
  189. margin-bottom: 30px;
  190. background-color: #fff;
  191. }
  192. .noHtml {
  193. height: 100%;
  194. line-height: 60px;
  195. text-align: center;
  196. font-size: 14px;
  197. }
  198. .timeTable_sec3 {
  199. padding: 0px 12px 1px;
  200. text-align: center;
  201. background: #0c86d8;
  202. height: 35px;
  203. }
  204. .tSec3Time {
  205. text-align: center;
  206. line-height: 24px;
  207. font-size: 14px;
  208. color: #fff;
  209. }
  210. .tSec3Time text {
  211. display: inline-block;
  212. background-color: #b8e2ff;
  213. width: 6px;
  214. height: 6px;
  215. border-radius: 50%;
  216. vertical-align: middle;
  217. position: relative;
  218. top: -2px;
  219. margin: 0 10px;
  220. }
  221. .timeTable_sec4 {
  222. padding: 0 12px;
  223. /* margin-top: -65px; */
  224. margin-bottom: 10px;
  225. background: #0075c4;
  226. }
  227. .tSec4T {
  228. /* text-align: center; */
  229. margin-bottom: 10px;
  230. overflow: hidden;
  231. font-size: 16px;
  232. color: #fff;
  233. padding-top: 10px;
  234. }
  235. .tSec4Con {
  236. padding-bottom: 10px;
  237. }
  238. .tSec4Con .studSeeSec2Line {
  239. height: 25px;
  240. width: 1px;
  241. background: #d6dfe2;
  242. margin: 0 40px;
  243. }
  244. .tSec4Con .studSeeSec2Txt {
  245. color: #4fb1f3;
  246. font-size: 14px;
  247. }
  248. .tSec4Con .studSeeSec2Txt .text-xxl {
  249. margin-right: 5px;
  250. font-size: 16px;
  251. }
  252. .tSec4Con .studSeeSec2Txt view {
  253. float: right;
  254. font-size: 20px;
  255. margin-top: -2px;
  256. }
  257. .tSec4Con .studSeeSec2Txt view text {
  258. display: inline-block;
  259. line-height: 20px;
  260. font-size: 12px;
  261. padding: 0 10px;
  262. position: relative;
  263. background: #4fb1f3;
  264. color: #0075c4;
  265. border-radius: 2px;
  266. top: -3px;
  267. margin-right: 10px;
  268. }
  269. .tSec4Con .studSeeSec2Txt view text:after {
  270. content: '';
  271. position: absolute;
  272. border: 3px solid #4fb1f3;
  273. border-right-color: transparent;
  274. border-top-color: transparent;
  275. border-bottom-color: transparent;
  276. right: -6px;
  277. top: 50%;
  278. margin-top: -3px;
  279. }
  280. .timeTableList {
  281. overflow: hidden;
  282. padding: 3px 7px 18px;
  283. }
  284. .timeTableLi {
  285. width: 33.333333%;
  286. float: left;
  287. font-size: 14px;
  288. line-height: 16px;
  289. margin-top: 14px;
  290. padding: 0 7px;
  291. }
  292. .timeTableLi view {
  293. border: 1px solid #daeffd;
  294. padding: 13px 0;
  295. text-align: center;
  296. overflow: hidden;
  297. }
  298. .timeTableLi text {
  299. font-size: 12px;
  300. border-radius: 50%;
  301. height: 14px;
  302. width: 14px;
  303. line-height: 12px;
  304. position: relative;
  305. top: -1px;
  306. margin-left: 6px;
  307. }
  308. .timeTableBtn {
  309. font-size: 16px;
  310. margin: 10px 12px 20px;
  311. background: #0c86d8;
  312. border-radius: 4px;
  313. text-align: center;
  314. line-height: 40px;
  315. height: 40px;
  316. color: #fff;
  317. }
  318. .statusType {
  319. padding: 10px 12px;
  320. background: #fff;
  321. overflow: hidden;
  322. margin-bottom: 10px;
  323. }
  324. .statusTypeLi {
  325. width: 16.666667%;
  326. float: left;
  327. /* text-align: center; */
  328. font-size: 14px;
  329. line-height: 16px;
  330. }
  331. .statusType text {
  332. display: inline-block;
  333. color: #fff;
  334. line-height: 14px;
  335. font-size: 12px;
  336. border: 1px solid #cacaca;
  337. border-radius: 50%;
  338. height: 9px;
  339. width: 9px;
  340. line-height: 12px;
  341. margin-right: 5px;
  342. position: relative;
  343. top: 0px;
  344. }
  345. /*正常*/
  346. .sStatue1 text {
  347. background: #0089fe;
  348. color: #0089fe;
  349. border-color: #0089fe;
  350. }
  351. /*早退*/
  352. .sStatue2 text {
  353. background: #f2b60a;
  354. color: #f2b60a;
  355. border-color: #f2b60a;
  356. }
  357. /*3旷课*/
  358. .sStatue3 text {
  359. background: #e24545;
  360. color: #e24545;
  361. border-color: #e24545;
  362. }
  363. /*病假*/
  364. .sStatue4 text {
  365. background: #29cf41;
  366. color: #29cf41;
  367. border-color: #29cf41;
  368. }
  369. /*迟到*/
  370. .sStatue5 text {
  371. background: #ad5151;
  372. color: #ad5151;
  373. border-color: #ad5151;
  374. }
  375. /*事假*/
  376. .sStatue6 text {
  377. background: #84f193;
  378. color: #84f193;
  379. border-color: #84f193;
  380. }
  381. .timeTableAlertZ {
  382. width: 100%;
  383. height: 100%;
  384. z-index: 99;
  385. position: fixed;
  386. top: 0;
  387. left: 0;
  388. right: 0;
  389. bottom: 0;
  390. background-color: rgba(0, 0, 0, 0.5);
  391. // display: none;
  392. }
  393. .timeTableAlert {
  394. z-index: -1;
  395. position: fixed;
  396. top: 0;
  397. left: 0;
  398. right: 0;
  399. bottom: 0;
  400. margin: auto;
  401. width: 80%;
  402. height: 70%;
  403. background: #fff;
  404. border-radius: 4px;
  405. filter: alpha(opacity=0);
  406. -moz-opacity: 0;
  407. -khtml-opacity: 0;
  408. opacity: 0;
  409. transition: all 0.3s;
  410. -moz-transition: all 0.3s;
  411. -ms-transition: all 0.3s;
  412. -o-transition: all 0.3s;
  413. -webkit-transition: all 0.3s;
  414. overflow: hidden;
  415. }
  416. .timeTableAlert.active {
  417. z-index: 999;
  418. filter: alpha(opacity=100);
  419. -moz-opacity: 1;
  420. -khtml-opacity: 1;
  421. opacity: 1;
  422. }
  423. .timeTableAlertTop {
  424. background-color: #0c86d8;
  425. padding: 10px 12px;
  426. }
  427. .timeTableAlertT {
  428. color: #fff;
  429. font-size: 16px;
  430. }
  431. .timeTableAlertTxt {
  432. font-size: 14px;
  433. color: #b8e2ff;
  434. text-align: right;
  435. margin-top: 5px;
  436. }
  437. .timeTableAlertList {
  438. overflow: auto;
  439. max-height: calc(100% - 62px);
  440. }
  441. .timeTableAlertLi {
  442. line-height: 40px;
  443. text-align: center;
  444. font-size: 14px;
  445. color: #1a1a1a;
  446. }
  447. .timeTableAlertLi.active {
  448. background-color: #d1ecff !important;
  449. }
  450. .timeTableAlertLi:nth-child(2n) {
  451. background-color: #fbfdff;
  452. }
  453. .timeTableAlertLi:nth-child(2n - 1) {
  454. background-color: #ffffff;
  455. }
  456. </style>