mark-score.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <template>
  2. <el-dialog :visible.sync="show" title="标记点评给 马东/徐策 等5人" custom-class="content"
  3. style="background-color: #00142f63;backdrop-filter: blur(4px);" width="600px">
  4. <view class="ui-flex-column">
  5. <!-- <view class="ui-p" style="background: #022c5a80;border-bottom: 2px solid #051d37;">
  6. <text class="txt-white"> </text>
  7. </view> -->
  8. <view class="ui-flex-row">
  9. <view class="ui-flex-1 ui-flex-align-center ui-flex-row">
  10. <view class="ui-pl20">
  11. <view class="ui-flex-row ui-border-radius-20" @click="showType=true"
  12. style="background-color: #1C63A8;padding: 4px 8px;">
  13. <text class="txt-white f26 ui-mr10">全部类型</text>
  14. <u-icon color="#fff" name="list-dot"></u-icon>
  15. </view>
  16. </view>
  17. </view>
  18. <view style="width: 220px;" class="ui-p">
  19. <u-subsection :list="['表扬', '需改进']" mode="button" bgColor="#1b63a8" inactiveColor="#aec3ee"
  20. :current="curIndex" @change="curIndex=$event"></u-subsection>
  21. </view>
  22. <view class="ui-flex-1"></view>
  23. </view>
  24. <view style="background: #0000003b;">
  25. <u-tabs :list="list1" :scrollable="false" :activeStyle="{
  26. color: '#fff',
  27. fontWeight: 'bold',
  28. transform: 'scale(1.2)'
  29. }"
  30. :inactiveStyle="{
  31. color: '#959595',
  32. transform: 'scale(1)'
  33. }"></u-tabs>
  34. </view>
  35. <scroll-view scroll-y style="height: 400px;" show-scrollbar>
  36. <u-grid :col="6" :border="false" @click="toActive">
  37. <u-grid-item v-for="(item, index) in tagList" :key="index" class="ui-p"
  38. :class="{'no-select' : activeId >= 0 && activeId != index}">
  39. <u--image :src="'https://zhxy.obs.cn-hz1.ctyun.cn:443/static/tag_learn/' + tagIcons[index]"
  40. width="46px" height="46px"></u--image>
  41. <view class="ui-pt10">
  42. <text class="grid-text txt-white f28">{{item}}</text>
  43. </view>
  44. <u-badge v-if="activeId == index" absolute :offset="[0,10]" :value="score"></u-badge>
  45. </u-grid-item>
  46. </u-grid>
  47. </scroll-view>
  48. <view class="ui-p ui-flex" style="background-color: #1b63a870;justify-content: end;">
  49. <view class="ui-flex" style="width: 250px;">
  50. <u-button size="small" plain :text="score ? '取消选择' : '关闭点评'" @click="cancelAct"
  51. style="background-color: #0d4980;" class="ui-mr10"></u-button>
  52. <u-button size="small" :disabled="!score" type="primary" @click="submit" text="提交点评"></u-button>
  53. </view>
  54. </view>
  55. </view>
  56. <el-drawer append-to-body :visible.sync="showType" direction="ltr">
  57. <view class="ui-p" style="width: 400px;">
  58. <text>这里展示学生标签记录、以及类型切换</text>
  59. </view>
  60. <u-cell-group>
  61. <u-cell icon="setting-fill" isLink title="个人设置"></u-cell>
  62. <u-cell icon="integral-fill" isLink title="会员等级" value="新版本"></u-cell>
  63. </u-cell-group>
  64. </el-drawer>
  65. </el-dialog>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. show: false,
  72. curIndex: 0,
  73. score: 0, //加扣分分数
  74. activeId: -1, //选中项
  75. showType: false,
  76. list1: [{
  77. name: '全部',
  78. }, {
  79. name: '语文',
  80. }, {
  81. name: '数学'
  82. }, {
  83. name: '科技'
  84. }, {
  85. name: '音乐'
  86. }, {
  87. name: '美术'
  88. }, {
  89. name: '体育'
  90. }, {
  91. name: '思想'
  92. }, {
  93. name: '劳动'
  94. }],
  95. tagList: [
  96. '小测优秀',
  97. '作业加分',
  98. '口算优秀',
  99. '班级贡献',
  100. '优秀发言',
  101. '阅读认真',
  102. '卫生干净',
  103. '值日认真',
  104. '勤奋学习',
  105. '课堂积极',
  106. '乐于助人',
  107. '团队合作',
  108. '诚实守信',
  109. '书写工整',
  110. '数学优秀',
  111. '语文优秀',
  112. '英语优秀',
  113. '美术优秀',
  114. '音乐优秀',
  115. '体育优秀',
  116. '科学优秀',
  117. '社会优秀',
  118. '历史优秀',
  119. '地理优秀',
  120. '政治优秀',
  121. '物理优秀',
  122. '化学优秀',
  123. '生物优秀',
  124. '作文优秀',
  125. '诗歌优秀',
  126. '故事优秀',
  127. '演讲优秀',
  128. '表演优秀',
  129. '手工优秀',
  130. '实验优秀',
  131. '研究优秀',
  132. '科研优秀',
  133. '表现优秀',
  134. '表现突出',
  135. '进步明显',
  136. '专注听讲',
  137. '课外阅读',
  138. // '体育锻炼',
  139. // '社会实践',
  140. // '志愿服务',
  141. // '爱护环境',
  142. // '安全文明',
  143. // '爱国爱校',
  144. ],
  145. // 老师配置标签的时候,需要选择图标
  146. tagIcons: [
  147. 'a-001-pencil.png',
  148. 'a-010-astronomy.png',
  149. 'a-017-protractor.png',
  150. 'a-024-schoollocker.png',
  151. 'a-031-mortarboard.png',
  152. 'a-038-schoolbag.png',
  153. 'a-045-liquidglue.png',
  154. 'a-002-alarmclock.png',
  155. 'a-011-maths.png',
  156. 'a-018-squareruler.png',
  157. 'a-025-idea.png',
  158. 'a-032-certificate.png',
  159. 'a-039-ask.png',
  160. 'a-046-school.png',
  161. 'a-003-book.png',
  162. 'a-012-eraser.png',
  163. 'a-019-abacus.png',
  164. 'a-026-chemicals.png',
  165. 'a-033-medal.png',
  166. 'a-040-compass.png',
  167. 'a-047-books.png',
  168. 'a-004-notebook.png',
  169. 'a-013-schoolbell.png',
  170. 'a-020-physics.png',
  171. 'a-027-maths.png',
  172. 'a-034-diploma.png',
  173. 'a-041-clipboard.png',
  174. 'a-048-books.png',
  175. 'a-007-calendar.png',
  176. 'a-014-calculator.png',
  177. 'a-021-dna.png',
  178. 'a-028-paintpalette.png',
  179. 'a-035-trophy.png',
  180. 'a-042-computer.png',
  181. 'a-049-books.png',
  182. 'a-008-worldgrid.png',
  183. 'a-015-squareruler.png',
  184. 'a-022-schoollocker.png',
  185. 'a-029-atom.png',
  186. 'a-036-milkcarton.png',
  187. 'a-043-laptop.png',
  188. 'a-050-coffeemug.png',
  189. 'a-009-molecule.png',
  190. 'a-016-ruler.png',
  191. 'a-023-sharpener.png',
  192. 'a-030-eyeglasses.png',
  193. 'a-037-pen.png',
  194. 'a-044-microscope.png',
  195. ]
  196. }
  197. },
  198. methods: {
  199. // 外部访问使用
  200. open(id) {
  201. this.show = true;
  202. },
  203. toActive(index) {
  204. // 是否旧的选中项
  205. let always = this.activeId >= 0 && this.activeId == index;
  206. this.activeId = index;
  207. if (always) {
  208. this.score++;
  209. } else {
  210. this.score = 1;
  211. }
  212. },
  213. cancelAct() {
  214. if (this.score) {
  215. this.activeId = -1;
  216. this.score = 0;
  217. } else {
  218. this.show = false;
  219. }
  220. },
  221. submit() {
  222. console.log('提交')
  223. }
  224. }
  225. }
  226. </script>
  227. <style>
  228. /deep/ .content {
  229. background-image: url('https://zhxy.obs.cn-hz1.ctyun.cn:443/static/desk_bg/class_bj.jpg');
  230. background-size: auto;
  231. border: 1px solid #0d5396;
  232. }
  233. /deep/ .el-dialog__header {
  234. background: #022c5a80;
  235. border-bottom: 2px solid #051d37;
  236. }
  237. /deep/ .el-dialog__title {
  238. color: #fff;
  239. }
  240. /deep/ .el-dialog__body {
  241. padding: 0;
  242. }
  243. .no-select {
  244. opacity: .5;
  245. }
  246. </style>