AllStudentHomework.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <!-- 活动解析 -->
  2. <template>
  3. <div>
  4. <!-- table 表格 -->
  5. <el-row :gutter="20" class="main-items">
  6. <!--数据监控-->
  7. <el-col :span="20" class="main" :offset="2">
  8. <el-row :gutter="20" class="main-header">
  9. <el-col :span="4" :offset="19">
  10. <div class="teach-block">
  11. <div class="Dayteach-Allot">
  12. <input
  13. type="text"
  14. placeholder="请输入学生名字"
  15. v-model="inputValue"
  16. class="Dayinput-with-Allot"
  17. />
  18. <span @click="GetGetTeacherCorrectDetailInfo()" class="DaySeachIcon el-icon-search"></span>
  19. </div>
  20. </div>
  21. </el-col>
  22. </el-row>
  23. <div>
  24. <el-table
  25. style="width: 100%"
  26. :data="StudentHomework01List"
  27. :header-cell-class-name="tableheaderClassName"
  28. :header-cell-style="{
  29. 'background-color': '#F6F7FB',
  30. 'color': '#393939',
  31. 'font-size': '16px'
  32. }"
  33. size="medium"
  34. border
  35. stripe
  36. >
  37. <el-table-column label="注册老师" header-align="center">
  38. <template slot-scope="scope">
  39. <div class="scope-list">
  40. <img
  41. :src="BASE_URL+scope.row.imgUrl"
  42. alt
  43. class="table-img"
  44. v-if="scope.row.imgUrl"
  45. />
  46. <img
  47. src="../../assets/img/user.jpg"
  48. alt
  49. v-if="!scope.row.imgUrl"
  50. class="table-img"
  51. />
  52. <span class="scope-name">{{scope.row.name}}</span>
  53. </div>
  54. </template>
  55. </el-table-column>
  56. <el-table-column prop="subject" label="科目" header-align="center"></el-table-column>
  57. <el-table-column prop="grade" label="年级" header-align="center"></el-table-column>
  58. <el-table-column prop="uploadTime" label="上传时间" header-align="center"></el-table-column>
  59. <el-table-column prop="uploadTime" label="作业图片" header-align="center" width="200">
  60. <template slot-scope="scope">
  61. <span
  62. class="ClickWork"
  63. @click="HomeworkWornglists(scope.row)"
  64. >查看</span>
  65. </template>
  66. </el-table-column>
  67. </el-table>
  68. <!-- 分页显示 -->
  69. <el-pagination
  70. background
  71. @size-change="handleSizeChange3"
  72. @current-change="pageChange3"
  73. :page-sizes="[10,50,100,200]"
  74. :current-page.sync="currentPage"
  75. layout="sizes, total,prev, pager, next"
  76. :hide-on-single-page="true"
  77. :total="parseInt(StudentHomework01List.pages)"
  78. ></el-pagination>
  79. </div>
  80. </el-col>
  81. </el-row>
  82. </div>
  83. </template>
  84. <script>
  85. import { mapGetters, mapActions } from "vuex";
  86. import { IMG_BASE_URL, APPOR_BASE_URL } from "@/config";
  87. export default {
  88. components: {},
  89. name: "actvResolveLabel",
  90. props: {},
  91. data() {
  92. return {
  93. inputValue: "",
  94. BASE_URL: IMG_BASE_URL,
  95. selMonth:this.monthFormatDate(),
  96. currentPage: 1,
  97. filters2: {
  98. MaxtimeValue: "",
  99. oneMonth: "",
  100. pageNo: 1,
  101. pageSize: 10
  102. }
  103. };
  104. },
  105. watch: {},
  106. computed: {
  107. ...mapGetters([
  108. "StudentHomework01List"
  109. ])
  110. },
  111. methods: {
  112. ...mapActions(["setUser"]),
  113. // 表格头部样式
  114. tableheaderClassName({ row, rowIndex }) {
  115. return "table-head-th";
  116. },
  117. // 作业原图
  118. HomeworkWornglists(v){
  119. this.$router.push({
  120. path: "/super/AllHomeWorkPictrue",
  121. query: {
  122. homeworkId: v.homeworkId,
  123. }
  124. });
  125. },
  126. // 批改明细
  127. GetGetTeacherCorrectDetailInfo() {
  128. this.$store.dispatch("GetStudentHomework01List", {
  129. pageNo: this.filters2.pageNo,
  130. pageSize: this.filters2.pageSize,
  131. oneMonth: this.selMonth,
  132. maxCreateTime: this.formatDate(),
  133. name: this.inputValue
  134. });
  135. },
  136. //年月时间封装
  137. monthFormatDate: function() {
  138. let date = new Date();
  139. let y = date.getFullYear();
  140. let MM = date.getMonth() + 1;
  141. MM = MM < 10 ? "0" + MM : MM;
  142. return y + "-" + MM;
  143. },
  144. //弹框
  145. isShow(str, img) {
  146. let _this = this;
  147. console.log(str);
  148. if (str == 1) {
  149. _this.hiddenModel = true;
  150. _this.isPigai = false;
  151. } else if (str == 2) {
  152. _this.isPigai = true;
  153. _this.hiddenModel = false;
  154. } else if (str == 3) {
  155. _this.cardShow = true;
  156. _this.imgCard = img;
  157. }
  158. },
  159. //关闭弹框
  160. allShowModel(str) {
  161. let _this = this;
  162. if (str == 1) {
  163. _this.hiddenModel = false;
  164. } else if (str == 2) {
  165. _this.isPigai = false;
  166. } else if (str == 3) {
  167. _this.cardShow = false;
  168. }
  169. },
  170. //时间封装
  171. formatDate: function() {
  172. let date = new Date();
  173. let y = date.getFullYear();
  174. let MM = date.getMonth() + 1;
  175. MM = MM < 10 ? "0" + MM : MM;
  176. let d = date.getDate();
  177. d = d < 10 ? "0" + d : d;
  178. let h = date.getHours();
  179. h = h < 10 ? "0" + h : h;
  180. let m = date.getMinutes();
  181. m = m < 10 ? "0" + m : m;
  182. let s = date.getSeconds();
  183. s = s < 10 ? "0" + s : s;
  184. return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
  185. },
  186. pageChange3(val) {
  187. this.currentPage = val;
  188. this.filters2.pageNo = val;
  189. this.GetGetTeacherCorrectDetailInfo();
  190. },
  191. handleSizeChange3(val) {
  192. this.filters2.pageSize = val;
  193. this.GetGetTeacherCorrectDetailInfo();
  194. },
  195. },
  196. mounted() {
  197. this.GetGetTeacherCorrectDetailInfo();
  198. }
  199. };
  200. </script>
  201. <!-- Add "scoped" attribute to limit CSS to this component only -->
  202. <style>
  203. .main {
  204. background-color: #fff;
  205. margin-top: 16px;
  206. padding: 0 !important;
  207. border: 1px solid #e1e1e1;
  208. min-height: 980px;
  209. }
  210. el-table {
  211. color: #999999;
  212. font-size: 18px;
  213. }
  214. .el-pagination.is-background .el-pager li:not(.disabled).active {
  215. background-color: #52cc60 !important;
  216. color: #fff;
  217. }
  218. .main-items {
  219. color: #393939;
  220. text-align: center;
  221. line-height: 80px;
  222. }
  223. .main-header-item {
  224. cursor: pointer;
  225. font-size: 16px;
  226. color: #7e7e7e;
  227. }
  228. .input-with-select .el-input-group__prepend {
  229. background-color: #fff;
  230. }
  231. .table-img {
  232. width: 36px;
  233. height: 36px;
  234. border-radius: 6px;
  235. }
  236. .showModel {
  237. width: 100%;
  238. height: 100%;
  239. position: fixed;
  240. top: 0;
  241. left: 0;
  242. background: #000000;
  243. opacity: 0.2;
  244. overflow: hidden;
  245. z-index: 1000;
  246. color: #fff;
  247. }
  248. .model {
  249. z-index: 1001;
  250. width: 40%;
  251. height: auto;
  252. position: fixed;
  253. top: 30%;
  254. left: 30%;
  255. margin: auto;
  256. background: #fff;
  257. border-radius: 10px;
  258. text-align: center;
  259. }
  260. .scope-name {
  261. margin-left: 13px;
  262. }
  263. .identity-card {
  264. width: 52px;
  265. height: 51px;
  266. border-radius: 4px;
  267. margin-right: 17px;
  268. }
  269. .model-text {
  270. background: rgba(255, 255, 255, 1);
  271. border-radius: 10px;
  272. }
  273. .model-btn {
  274. display: flex;
  275. justify-content: space-around;
  276. margin-bottom: 44px;
  277. }
  278. .model-btn-info-img {
  279. width: 451px;
  280. height: 298px;
  281. }
  282. .model-btn-items {
  283. width: 154px;
  284. height: 50px;
  285. line-height: 50px;
  286. text-align: center;
  287. font-size: 18px;
  288. border-radius: 4px;
  289. }
  290. .main-gay {
  291. background: rgba(246, 247, 251, 1);
  292. color: #7e7e7e;
  293. }
  294. .model-grdeen {
  295. background-color: #52cc60;
  296. color: #fff;
  297. }
  298. .model-text-items-close {
  299. position: absolute;
  300. top: 10px;
  301. right: 15px;
  302. }
  303. .model-text-items {
  304. position: relative;
  305. color: #000000;
  306. font-size: 24px;
  307. text-align: center;
  308. padding: 40px 0 50px 0;
  309. }
  310. .el-table {
  311. margin-top: 50px;
  312. }
  313. .el-table .table-head-th {
  314. background-color: #f6f7fb;
  315. font-size: 16px !important;
  316. color: #393939;
  317. }
  318. .page-block {
  319. text-align: center !important;
  320. margin-top: 15px;
  321. }
  322. .scope-list {
  323. margin-left: 18px;
  324. text-align: left;
  325. }
  326. .ApporStyles {
  327. display: inline-block;
  328. width: 200px;
  329. height: 40px;
  330. line-height: 40px;
  331. background-color: #fff;
  332. border-radius: 20px;
  333. font-size: 16px;
  334. color: #7c819d;
  335. cursor: pointer;
  336. }
  337. .navteacfertypeactive {
  338. background-color: #52cc60 !important;
  339. color: #fff !important;
  340. }
  341. .el-pagination .el-select .el-input {
  342. /* width: 120px; */
  343. margin: 0 -100px !important;
  344. }
  345. .ClickWork {
  346. font-size: 16px;
  347. text-decoration: underline;
  348. cursor: pointer;
  349. }
  350. .bank-active {
  351. color: #52cc60;
  352. font-size: 16px;
  353. text-decoration: underline;
  354. cursor: pointer;
  355. }
  356. .Dayinput-with-Allot {
  357. border: #b6b6b6;
  358. border-radius: 20px;
  359. height: 40px;
  360. width: 300px;
  361. font-size: 8px;
  362. color: #b6b6b6;
  363. text-align: left;
  364. line-height: 40px;
  365. background: #f1f2f4;
  366. padding: 0 10px;
  367. float: left;
  368. outline: none !important;
  369. box-shadow: none;
  370. }
  371. .Dayteach-Allot {
  372. width: 400px;
  373. position: relative;
  374. height: 40px;
  375. top: 15px;
  376. }
  377. .DaySeachIcon {
  378. position: absolute;
  379. font-size: 20px;
  380. color: #b6b6b6;
  381. right: 30%;
  382. margin-top: 10px;
  383. cursor: pointer;
  384. }
  385. </style>